/* CityTap: flat, quiet, newspaper feel. One typeface, black on white, phone first.
   The subway bullets appear in the logo only. */
:root {
  --ink: #121212;
  --ink-2: #3a3a3c;
  --muted: #787c7e;
  --rule: #d3d6da;
  --rule-soft: #e9eaec;
  --paper: #ffffff;
  --wash: #f4f4f1;
  --pin: #d62d20;
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --bullet-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
[hidden] { display: none !important; }

/* ---------- logo ---------- */
.bullet { display: inline-block; width: 1em; height: 1em; flex: none; }
.bullet svg { display: block; width: 100%; height: 100%; }
.logo { font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif; display: inline-flex; align-items: center; gap: .07em; font-weight: 800; letter-spacing: -.025em; font-size: 26px; line-height: 1; }
.logo .word { margin-right: .1em; }
.logo .bullet { width: .98em; height: .98em; }

/* ---------- page: ad rail | game | ad rail ---------- */
.page { display: grid; grid-template-columns: 1fr minmax(0, 640px) 1fr; height: 100dvh; }
.rail { display: flex; justify-content: center; padding: 76px 16px 16px; }
.game { grid-column: 2; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--rule-soft); border-right: 1px solid var(--rule-soft); }
@media (max-width: 1100px) { .page { grid-template-columns: 0 1fr 0; } .rail { display: none; } .game { border: 0; } }

.ad { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ad-label { font-size: 11px; color: var(--muted); }
.ad-box { background: var(--wash); }
.ad-tall .ad-box { width: 300px; height: 600px; }
.rail .ad { position: sticky; top: 76px; align-self: flex-start; }
.ad-mobile { display: none; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule-soft); }
.ad-mobile .ad-box { width: 320px; height: 50px; max-width: 100vw; }
.ad-inline { margin: 24px 0 0; }
.ad-inline .ad-box { width: 300px; height: 250px; }
@media (max-width: 1100px) { .ad-mobile { display: flex; } }

/* ---------- header ---------- */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 52px; padding: 0 10px; border-bottom: 1px solid var(--rule); flex: none; }
.topbar .right { display: flex; justify-content: flex-end; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: none; border-radius: 50%; position: relative; }
.icon-btn:hover { background: var(--wash); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .signed-in { position: absolute; right: 6px; bottom: 7px; width: 8px; height: 8px; border-radius: 50%; background: #2e7d32; border: 1.5px solid #fff; }

/* ---------- prompt (centered) ---------- */
.promptbar { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule); flex: none; }
.round { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.photo { margin: 0 auto 10px; max-width: 340px; cursor: zoom-in; }
.photo img { display: block; width: 100%; height: 132px; object-fit: cover; border-radius: 6px; background: var(--wash); }
.photo figcaption { font-size: 10px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask { font-size: 15px; color: var(--ink-2); }
.name { font-size: 24px; line-height: 1.15; letter-spacing: -.015em; font-weight: 800; margin-top: 2px; }
.promptbar.done .name { font-size: 34px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.promptbar.done .name small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.promptbar.done .round { margin-bottom: 6px; }
.done-note { font-size: 13px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.bottombar.done .status { display: none; }
.bottombar.done .pill { flex: 1; }
@media (max-width: 420px) { .name { font-size: 21px; } .photo img { height: 116px; } }
@media (max-height: 700px) { .photo img { height: 92px; } }

/* ---------- map ---------- */
.board { position: relative; flex: 1; min-height: 0; background: var(--wash); }
#map { position: absolute; inset: 0; }
.maplibregl-canvas { cursor: crosshair !important; }
.maplibregl-ctrl-attrib { font-size: 10px; }

.pin { width: 22px; height: 30px; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.35)); cursor: pointer; }
.pin.small { width: 18px; height: 25px; }
.photo-pin:hover { box-shadow: 0 0 0 2px var(--ink), 0 2px 8px rgba(0,0,0,.3); }
.photo-pin { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); overflow: hidden; display: grid; place-items: center; cursor: pointer; }
.photo-pin img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-pin span { font-size: 20px; }
.guess { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 2.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.maplibregl-popup-content { font-family: var(--font); font-size: 14px; font-weight: 600; padding: 7px 10px; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }

/* ---------- bottom bar ---------- */
.bottombar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--rule); flex: none; min-height: 68px; }
.bottombar .status { flex: 1; min-width: 0; }
.hint { color: var(--muted); font-size: 14px; }
.result { display: flex; align-items: baseline; gap: 10px; }
.result-score { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.result-of { font-size: 14px; color: var(--muted); margin-left: -7px; }
.result-dist { font-size: 14px; color: var(--ink-2); }

.pill { border-radius: 8px; padding: 0 22px; height: 48px; font-weight: 700; font-size: 15px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.pill.dark { background: var(--ink); color: #fff; }
.pill:not(:disabled):active { transform: translateY(1px); }
.pill:disabled { background: var(--paper); border-color: var(--rule); color: #b0b3b6; cursor: default; }
.pill.wide { width: 100%; max-width: 260px; }
.pill.full { width: 100%; }
.pill svg { width: 14px; height: 14px; }
.textlink { background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); padding: 4px; font-size: inherit; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 40; background: var(--wash); display: grid; place-items: center; text-align: center; padding: 24px; }
.splash-inner { display: flex; flex-direction: column; align-items: center; max-width: 380px; }
.splash .logo { font-size: 44px; margin-bottom: 22px; }
.splash h1 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; margin: 0 0 10px; }
.splash p { font-size: 17px; color: var(--ink-2); margin: 0 0 28px; line-height: 1.45; }
.splash .pill { margin-bottom: 10px; }
.splash-date { margin-top: 22px; font-size: 14px; color: var(--ink-2); }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(255,255,255,.6); display: flex; justify-content: center; align-items: center; padding: 16px; }
.modal-card { position: relative; background: var(--paper); width: 100%; max-width: 460px; max-height: calc(100dvh - 32px); overflow-y: auto;
  border-radius: 10px; border: 1px solid var(--rule-soft); box-shadow: 0 4px 24px rgba(0,0,0,.16); padding: 36px 24px 24px; animation: rise .22s ease-out; }
.modal-card.narrow { max-width: 400px; }
@media (max-width: 520px) { .modal { padding: 0; align-items: stretch; } .modal-card { max-height: 100dvh; border-radius: 0; border: 0; box-shadow: none; padding: 44px 20px 24px; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; top: 8px; right: 8px; }
.modal h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.lead { font-size: 17px; color: var(--ink-2); margin: 0 0 16px; line-height: 1.4; }
.help-list { padding-left: 20px; margin: 0; font-size: 15px; line-height: 1.5; }
.help-list li { margin-bottom: 8px; }

/* how-to-play demo */
.demo { position: relative; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; margin: 2px 0 18px; background: #fff; }
.demo-top { text-align: center; font-size: 12px; color: var(--ink-2); padding: 8px 10px 9px; border-bottom: 1px solid var(--rule); }
.demo-top b { display: block; font-size: 16px; color: var(--ink); font-weight: 800; margin-top: 1px; }
.demo-stage { position: relative; height: 190px; background: var(--wash); }
.demo-map { position: absolute; inset: 0; }
.demo-credit { position: absolute; right: 6px; bottom: 4px; font-size: 9px; color: var(--muted); z-index: 2; }
.demo-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.demo-line line { stroke: #2b3a4a; stroke-opacity: .55; stroke-width: 2.5; stroke-linecap: round; }
.demo-guess { position: absolute; width: 22px; height: 30px; transform: translate(-50%, -100%); opacity: 0; }
.demo-guess .pin, .demo-answer .pin { width: 22px; height: 30px; }
.demo-guess.show { opacity: 1; }
.demo-guess.show .pin-in { animation: pinDrop .5s cubic-bezier(.3,1.4,.5,1) both; }
.demo-ring { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; opacity: 0; pointer-events: none; }
.demo-ring.on { opacity: 1; }
.demo-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.demo-ring circle { fill: rgba(18,18,18,.08); stroke: #121212; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 95; stroke-dashoffset: 95; transition: stroke-dashoffset 420ms linear; }
.demo-ring.go circle { stroke-dashoffset: 0; }
.demo-hand.hold svg { transform: scale(.9); transition: transform .15s; }
.demo-answer { position: absolute; width: 22px; height: 30px; transform: translate(-50%, -100%) translateY(-16px); opacity: 0; transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .2s; }
.demo-answer.show { transform: translate(-50%, -100%); opacity: 1; }
.demo-answer .pin { width: 22px; height: 30px; }
.demo-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-2); min-height: 44px; }
.demo-status b { font-size: 17px; font-weight: 800; color: var(--ink); }
.demo-btn { border: 1.5px solid var(--rule); color: #b0b3b6; border-radius: 6px; padding: 6px 12px; font-weight: 700; transition: background .2s, color .2s, transform .1s; }
.demo-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.demo-btn.press { transform: scale(.92); }
.demo-hand { position: absolute; left: 0; top: 0; width: 30px; height: 30px; z-index: 3; pointer-events: none; transition: transform .9s cubic-bezier(.45,.05,.3,1), opacity .3s; }
.demo-hand svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.demo-hand .ripple { position: absolute; left: 3px; top: -6px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; }
.demo-hand.tap .ripple { animation: ripple .45s ease-out; }
@keyframes ripple { from { transform: scale(.3); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.steps li { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--muted); transition: color .2s; }
.steps li span { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1.5px solid var(--rule); display: grid; place-items: center; font-size: 12px; font-weight: 800; transition: all .2s; }
.steps li.on { color: var(--ink); font-weight: 600; }
.steps li.on span { background: var(--ink); color: #fff; border-color: var(--ink); }
.help-foot { margin: 16px 0 0; font-size: 15px; font-weight: 600; }
.muted-note { font-size: 13px; color: var(--muted); margin: 16px 0 0; }

/* results */
.res-head { text-align: center; padding-top: 10px; }
.res-score { font-size: 56px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.res-score small { font-size: 18px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.res-brag { margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.res-brag .tier { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; display: inline-block; }
.res-brag .pct { font-size: 14px; color: var(--muted); }
.res-emoji { font-size: 18px; margin-top: 10px; word-spacing: 4px; font-variant-numeric: tabular-nums; }
.share { display: flex; gap: 10px; justify-content: center; margin: 16px 0 0; }
.share .pill { flex: 1; max-width: 170px; }

.places { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.places li { display: grid; grid-template-columns: 26px 1fr auto; column-gap: 10px; align-items: baseline; }
.places .e { font-size: 19px; line-height: 1; }
.places .nm { font-weight: 700; font-size: 15px; }
.places .nm span { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.places .sc { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.places .fact { grid-column: 2 / 4; font-size: 13px; line-height: 1.4; color: var(--ink-2); margin-top: 2px; }

.block { margin-top: 24px; padding: 16px; background: var(--wash); border-radius: 10px; }
.block h3 { font-size: 16px; font-weight: 800; margin: 0 0 10px; letter-spacing: -.01em; }
.block p { margin: 0 0 12px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.cta { text-align: center; }
.cta p { margin-bottom: 12px; }
.cta .pill { width: 100%; max-width: 280px; }
.cta .sub-link { font-size: 13px; color: var(--muted); margin-top: 8px; }
.you { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.you b { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.you span { font-size: 12px; color: var(--muted); }

.boro-head { font-size: 19px; font-weight: 800; letter-spacing: -.015em; text-align: center; margin: 2px 0 2px; }
.boro-sub { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.medals { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; padding: 4px 0 2px; }
.medal-col { display: flex; flex-direction: column; align-items: center; text-align: center; }
.medal { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; position: relative;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.45), 0 2px 6px rgba(0,0,0,.18); }
.medal span { font-size: 22px; font-weight: 800; color: rgba(0,0,0,.72); text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.m1 .medal { width: 68px; height: 68px; background: radial-gradient(circle at 35% 30%, #fff3b0, #f2c230 45%, #c99a12 100%); }
.m1 .medal span { font-size: 28px; }
.m2 .medal { background: radial-gradient(circle at 35% 30%, #ffffff, #c9ced4 50%, #9ba2aa 100%); }
.m3 .medal { background: radial-gradient(circle at 35% 30%, #ffd9b3, #d98c4a 50%, #a8612a 100%); }
.medal-name { font-size: 14px; font-weight: 700; margin-top: 8px; line-height: 1.2; }
.medal-name em { display: block; font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); }
.medal-pts { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.m1 .medal-name { font-size: 15px; }
.m1 { padding-bottom: 14px; }
.rest { margin-top: 12px; display: grid; gap: 6px; }
.rest div { display: grid; grid-template-columns: 22px 1fr auto; font-size: 14px; }
.rest div span { color: var(--muted); font-weight: 700; }
.rest div b { font-variant-numeric: tabular-nums; font-weight: 600; }
.rest div.me { font-weight: 700; }
.note { font-size: 12px; color: var(--muted); margin-top: 10px; }

.next { text-align: center; margin-top: 22px; font-size: 14px; color: var(--ink-2); }
.next b { font-variant-numeric: tabular-nums; color: var(--ink); }

/* account */
.field { display: block; text-align: left; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input { width: 100%; height: 46px; border: 1px solid var(--rule); border-radius: 8px; padding: 0 12px; font-size: 16px; }
.field input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--rule); background: var(--paper); padding: 8px 13px; border-radius: 8px; font-size: 14px; }
.chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.form-error { color: #b3261e; font-size: 13px; min-height: 18px; margin: -4px 0 8px; }
.switch { text-align: center; font-size: 14px; color: var(--muted); margin-top: 12px; }

/* photo viewer */
.photo-view { background: rgba(0,0,0,.88); flex-direction: column; gap: 10px; cursor: zoom-out; }
.photo-view img { max-width: 100%; max-height: 82vh; border-radius: 4px; }
.photo-view-name { color: #fff; font-size: 18px; font-weight: 700; text-align: center; }
.photo-view-name:empty { display: none; }
.photo-view-credit { color: #c9c9c9; font-size: 12px; text-align: center; max-width: 90vw; }
.photo-view-credit a { color: #fff; }
.help-links { display: flex; justify-content: center; gap: 16px; margin: 14px 0 0; font-size: 12px; }
.help-links a { color: var(--muted); }

.toast { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; max-width: calc(100vw - 48px); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 6px; z-index: 60; font-weight: 600; font-size: 14px; }

/* ---------- borough leaderboards (js/boards.js) ---------- */
.tb { --team: #888; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--team); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .02em; flex: none; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.tb.sm { width: 22px; height: 22px; font-size: 9px; }
.tb.xl { width: 58px; height: 58px; font-size: 19px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 3px 10px rgba(0,0,0,.15); }
.you-tag { font-style: normal; font-size: 10px; font-weight: 800; background: var(--ink); color: #fff; border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 2px; }
.mv { font-size: 11px; font-weight: 800; color: var(--muted); min-width: 26px; text-align: center; }
.mv.up { color: #14a06a; } .mv.down { color: #d62d20; }
.lb-head { font-size: 19px; font-weight: 800; letter-spacing: -.015em; text-align: center; margin-bottom: 14px; }
.lb-call { font-size: 13px; color: var(--ink-2); text-align: center; margin-top: 14px; }
.lb-call.strong { font-size: 15px; font-weight: 700; color: var(--ink); }

/* 1. race */
.lanes { display: grid; gap: 10px; }
.lane { display: grid; grid-template-columns: 112px 1fr 34px; gap: 8px; align-items: center; }
.lane-label { font-size: 13px; font-weight: 600; white-space: nowrap; display: flex; align-items: center; }
.lane-rank { width: 16px; color: var(--muted); font-weight: 800; }
.lane.me .lane-label { font-weight: 800; }
.track { position: relative; height: 30px; border-radius: 15px; background: repeating-linear-gradient(90deg, #e6e3da 0 12px, #eeebe3 12px 24px); }
.track::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 6px; border-radius: 0 15px 15px 0;
  background: repeating-linear-gradient(0deg, #121212 0 5px, #fff 5px 10px); }
.runner { position: absolute; top: 0; left: calc((100% - 30px) * var(--x)); animation: run 1.1s cubic-bezier(.2,.8,.2,1) var(--d) both; }
@keyframes run { from { left: 0; } }
.runner .crown { position: absolute; top: -15px; left: 50%; transform: translateX(-50%) rotate(-12deg); font-style: normal; font-size: 15px; }
.lane-pts { font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }

/* 2. jumbotron */
.lb-score { background: #101216; color: #fff; border-radius: 10px; padding: 14px 14px 12px; margin: -16px; }
.sb-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: #ffcf33; margin-bottom: 10px; }
.live { color: #c9ccd1; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #ff3b30; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.sb-row { display: grid; grid-template-columns: 20px 30px 1fr 30px 48px; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 8px; }
.sb-row + .sb-row { margin-top: 2px; }
.sb-row.me { background: rgba(255,207,51,.12); box-shadow: inset 0 0 0 1px rgba(255,207,51,.45); }
.sb-rank { font-size: 18px; font-weight: 800; color: #8a8f98; }
.sb-row:first-of-type .sb-rank { color: #ffcf33; }
.sb-name { font-size: 15px; font-weight: 700; }
.sb-pts { font-size: 22px; font-weight: 800; text-align: right; color: #ffcf33; font-variant-numeric: tabular-nums; }
.lb-score .mv { color: #8a8f98; } .lb-score .mv.up { color: #4ade80; } .lb-score .mv.down { color: #ff6b5e; }
.lb-score .you-tag { background: #ffcf33; color: #111; }
.sb-call { font-size: 13px; color: #c9ccd1; text-align: center; margin-top: 10px; }
.boro:has(.lb-score) { background: #101216; }

/* 3. head to head */
.vs-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; }
.vs-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vs-name { font-size: 15px; font-weight: 800; margin-top: 4px; }
.vs-name .you-tag { display: table; margin: 3px auto 0; }
.vs-pts { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.vs-rank { font-size: 12px; color: var(--muted); font-weight: 700; }
.vs-mid { font-size: 22px; font-weight: 800; font-style: italic; color: var(--muted); }
.tug { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin-top: 14px; gap: 2px; }
.tug i { display: block; height: 100%; }
.vs-strip { display: flex; justify-content: space-between; margin-top: 14px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.vs-strip span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 5px; border-radius: 6px; }
.vs-strip span.me { background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }

/* 4. league table */
.lg-row { display: grid; grid-template-columns: 18px 1fr 36px 26px 86px; gap: 8px; align-items: center; padding: 8px 4px; font-size: 14px; }
.lg-row + .lg-row { border-top: 1px solid #e6e3da; }
.lg-h { font-size: 11px; font-weight: 700; color: var(--muted); padding-top: 0; }
.lg-row.me { background: #fff; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--ink); }
.lg-rank { font-weight: 800; color: var(--muted); }
.lg-name { display: flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.lg-row b { text-align: right; font-variant-numeric: tabular-nums; }
.wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.wk i { display: block; height: 10px; border-radius: 3px; background: #e2dfd6; }

/* 5. turf war */
.turf-map { display: block; width: 100%; max-width: 300px; margin: 0 auto; overflow: visible; }
.turf-key { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.turf-key span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 5px; border-radius: 6px; }
.turf-key span.me { background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }

/* 0. bars + map (default board) */
.combo { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; align-items: center; }
.cb-bars { display: grid; gap: 9px; }
.cb-label { font-size: 13px; font-weight: 700; margin-bottom: 3px; display: flex; align-items: center; white-space: nowrap; }
.cb-row.out .cb-label { color: var(--muted); font-weight: 600; }
.cb-track { height: 24px; }
.cb-bar { height: 100%; width: var(--w); min-width: 46px; border-radius: 6px; background: var(--c);
  display: flex; align-items: center; justify-content: flex-end; padding-right: 7px; box-sizing: border-box;
  animation: grow 1s cubic-bezier(.2,.8,.2,1) var(--d) both; }
.cb-bar span { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; animation: fadein .3s ease-out calc(var(--d) + .7s) both; }
.cb-row.me .cb-bar { box-shadow: 0 0 0 2px var(--ink); }
@keyframes grow { from { width: 0; min-width: 0; } }
@keyframes fadein { from { opacity: 0; } }
.cb-map .turf-map { max-width: 100%; }
@media (max-width: 380px) { .combo { grid-template-columns: 1fr; } .cb-map { max-width: 220px; margin: 0 auto; } }

/* test build bar */
.test-bar { margin-top: 22px;
  display: flex; align-items: center; gap: 8px; background: #121212; color: #fff; border-radius: 999px; padding: 6px 8px 6px 14px;
  font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.25); white-space: nowrap; }
.test-bar span { color: #b9bcc2; }
.test-bar button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: #2a2d33; color: #fff; font-size: 18px; line-height: 1; }
.test-next { margin-top: 10px; max-width: 350px; background: #ffc21a !important; border-color: #ffc21a !important; color: #121212 !important; }

/* compact prompt bar */
.prompt-text { min-width: 0; }
.promptbar .round { font-size: 12px; margin-bottom: 1px; }
.promptbar .ask { font-size: 13px; }
.promptbar .name { font-size: 20px; margin-top: 0; }
.thumb { flex: none; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--wash); cursor: zoom-in; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promptbar.done { text-align: center; }
.promptbar.done .round { margin-bottom: 2px; }
@media (max-width: 420px) { .promptbar .name { font-size: 18px; } .thumb { width: 54px; height: 54px; } }

/* press and hold */
#map, .maplibregl-canvas-container { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.hold-ring { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; pointer-events: none; z-index: 3; }
.hold-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hold-ring circle { fill: rgba(18,18,18,.08); stroke: #121212; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 95; stroke-dashoffset: 95; transition: stroke-dashoffset 280ms linear; }
.hold-ring.go circle { stroke-dashoffset: 0; }

/* pin drop: falls in, squashes, settles */
.pin { width: 24px; height: 33px; }
.pin-in { width: 100%; height: 100%; transform-origin: 50% 100%; }
.pin-in.drop { animation: pinDrop .5s cubic-bezier(.3,1.4,.5,1) both; }
.pin-in.drop.late { animation-duration: .45s; }
@keyframes pinDrop {
  0%   { transform: translateY(-60px) scale(.9); opacity: 0; }
  55%  { transform: translateY(0) scale(1.12, .8); opacity: 1; }
  75%  { transform: translateY(-4px) scale(.94, 1.08); }
  100% { transform: none; }
}
.land-shadow { width: 18px; height: 6px; border-radius: 50%; background: rgba(0,0,0,.35); filter: blur(1.5px); pointer-events: none;
  animation: landShadow .5s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes landShadow { 0% { transform: scale(2.2); opacity: 0; } 55% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1); opacity: .7; } }

/* score count-up pop */
.result-score.pop { animation: pop .35s cubic-bezier(.3,1.8,.5,1); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.result-score { display: inline-block; transform-origin: 50% 70%; }
.result.great .result-score { color: #14a06a; }
.result.perfect .result-score { color: #121212; background: #ffc21a; border-radius: 8px; padding: 0 6px; }

/* confetti burst on pin plant (color set per score) */
.confetti { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 4; }
.confetti i { position: absolute; left: -3px; top: -4px; width: 6px; height: 9px; border-radius: 1.5px;
  animation: confetti .85s cubic-bezier(.15,.7,.35,1) both; box-shadow: 0 0 0 .5px rgba(0,0,0,.08); }
@keyframes confetti {
  0%   { transform: translate(0, 0) rotate(0) scale(.6); opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 46px)) rotate(var(--r)) scale(.9); opacity: 0; }
}

/* where you actually tapped, on a miss */
.result-where { font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.result-where b { font-weight: 700; color: var(--ink); }
.where-tag { background: #121212; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.25); pointer-events: none; animation: fadein .3s ease-out .5s both; }
.test-bar .tb-reset { width: auto; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #3a3d44; }

/* mute button */
.sound-btn .x { display: none; }
.sound-btn.muted .w1, .sound-btn.muted .w2 { display: none; }
.sound-btn.muted .x { display: inline; }

/* end-of-game tally */
.tally-item { display: inline-block; opacity: 0; transform: translateY(8px) scale(.85); transition: opacity .2s, transform .3s cubic-bezier(.3,1.6,.5,1); }
.tally-item.in { opacity: 1; transform: none; }
#resTotal { display: inline-block; transform-origin: 50% 80%; }
#resTotal.land { animation: totalLand .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes totalLand { 0% { transform: scale(1); } 40% { transform: scale(1.1); } 100% { transform: scale(1); } }
/* rank: a gentle settle, not a stamp */
.res-brag.pre .tier, .res-brag.pre .pct { opacity: 0; }
.res-brag.in .tier { animation: rankIn .42s cubic-bezier(.25,1.5,.5,1) both; }
.res-brag.in .pct { animation: fadein .4s ease-out .2s both; }
@keyframes rankIn { 0% { opacity: 0; transform: scale(1.7) rotate(-3deg); } 60% { opacity: 1; transform: scale(.95) rotate(0); } 100% { opacity: 1; transform: none; } }
.res-brag .best { font-style: normal; font-size: 11px; font-weight: 800; background: #ffc21a; color: #121212; border-radius: 5px; padding: 2px 6px; margin-left: 8px; vertical-align: 4px; }
/* your borough gets your points */
.boro-plus { margin-left: 6px; font-size: 12px; font-weight: 800; color: #14a06a; animation: plusIn .6s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes plusIn { from { opacity: 0; transform: translateY(8px) scale(.7); } to { opacity: 1; transform: none; } }

/* round score in the top bar during the reveal */
.prompt-score .ps-line { display: flex; align-items: baseline; gap: 8px; }
.ps-num { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; display: inline-block; transform-origin: 50% 70%; font-variant-numeric: tabular-nums; }
.ps-num.pop { animation: pop .35s cubic-bezier(.3,1.8,.5,1); }
.ps-of { font-size: 14px; color: var(--muted); margin-left: -6px; }
.ps-dist { font-size: 14px; color: var(--ink-2); }
.ps-where { font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.ps-where b { color: var(--ink); }
.prompt-score.great .ps-num { color: #14a06a; }
.prompt-score.perfect .ps-num { color: #121212; background: #ffc21a; border-radius: 8px; padding: 0 6px; }
.hint b { color: var(--ink); font-weight: 700; }
/* running total, bottom right */
.run-total { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--muted); }
.run-total b { font-size: 24px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; display: inline-block; }
.run-total.bump b { animation: pop .4s cubic-bezier(.3,1.8,.5,1); }
/* during play the bottom bar is centered: the hint line, with the running total under it */
.bottombar:not(.done) { flex-direction: column; justify-content: center; align-items: center; gap: 2px; text-align: center; }
.bottombar:not(.done) .status { flex: none; }
.bottombar:not(.done) .run-total { justify-content: center; }

/* label under your pin: what you tapped, then the score + distance. No box: map-label style text with a white halo. */
.pin-card { color: #121212; text-align: center; pointer-events: none; white-space: nowrap; animation: fadein .25s ease-out .2s both;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 4px #fff, 0 0 6px #fff, 0 0 8px rgba(255,255,255,.9); }
.pin-card .pc-where { font-size: 13px; font-weight: 700; }
.pin-card .pc-line { display: flex; align-items: baseline; justify-content: center; gap: 5px; margin-top: -1px; }
.pin-card .pc-line[hidden] { display: none; }
.pin-card .pc-num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; display: inline-block; font-variant-numeric: tabular-nums; transform-origin: 50% 70%; }
.pin-card .pc-num.pop { animation: pop .35s cubic-bezier(.3,1.8,.5,1); }
.pin-card .pc-of { font-size: 12px; font-weight: 600; color: #4a4a4a; margin-left: -3px; }
.pin-card .pc-dist { font-size: 13px; font-weight: 600; color: #3a3a3c; }
/* bottom bar during play: running total on top, a bigger hint under it */
.bottombar:not(.done) .run-total { order: 0; }
.bottombar:not(.done) .status { order: 1; }
.bottombar:not(.done) .hint { font-size: 16px; color: var(--ink-2); }

/* round count sits with the total in the bottom bar */
.bottombar { position: relative; }
.run-total { color: var(--muted); }
.run-total b { font-size: 26px; }
.run-total .rt-of { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: -3px; }
.bottombar:not(.done) .run-total b { font-size: 28px; }

/* round progress dots, under the total */
.round-dots { display: flex; gap: 6px; justify-content: center; margin: 1px 0 3px; }
.round-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--rule-soft); }
.round-dots i.now { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.round-dots i.done { animation: pop .35s cubic-bezier(.3,1.8,.5,1); }
.bottombar:not(.done) .round-dots { order: 1; }
.bottombar:not(.done) .status { order: 2; }
/* bottom bar order: total, hint (smaller), then the dots */
.bottombar:not(.done) .hint { font-size: 14px; }
.bottombar:not(.done) .status { order: 1; }
.bottombar:not(.done) .round-dots { order: 2; margin: 5px 0 1px; }
/* stats card: centered title like the other cards */
#youBlock h3 { text-align: center; }

/* Splash subline is only used for messages (already played, load error); hide it when empty. */
#splashSub:empty { display: none; }
#splashSub:empty + #playBtn { margin-top: 18px; }

/* Sign-up subtitle stays on one line, shrinking a little on narrow phones. */
.lead.one-line { white-space: nowrap; font-size: 15.5px; }   /* shrunk to fit by fitLine() in game.js */

/* ADS OFF until AdSense approves the site. The slots stay in index.html; delete this rule to bring them back. */
.ad, .rail { display: none !important; }

/* Start screen city switcher */
.city-switch { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.city-switch a { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; background: var(--paper); }
.city-switch a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
