/* Thanksgiving Photo Hunt. One font, plain look: NYC subway signs + a turkey-orange accent. */
:root {
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ink: #111;
  --muted: #666;
  --line: #d6d6d6;
  --bg: #f7f5f0;
  --white: #fff;
  --orange: #e8590c;   /* turkey / 6th Ave line orange */
  --green: #00933c;    /* Easy */
  --yellow: #fccc0a;   /* Medium */
  --red: #ee352e;      /* Hard */
  --ok: #00933c;
  --warn-bg: #fff4d6;
  --radius: 6px;
  /* Type scale: four sizes, nothing else. Display = the one main message on a screen; title = section
     headings and big moments; body = text, inputs and buttons (buttons at 700); small = meta and captions. */
  --fs-display: 2rem;     --fw-display: 800;
  --fs-title: 1.375rem;   --fw-title: 700;
  --fs-body: 1.0625rem;   --fw-body: 400;   --fw-button: 700;
  --fs-small: 0.875rem;   --fw-small: 400;
  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 20px/1.4 var(--font); -webkit-text-size-adjust: 100%; }
body.big { font-size: 24px; }
body.admin { font-size: 15px; }
h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 1.6em; } h2 { font-size: 1.2em; } h3 { font-size: 1em; }
p { margin: 0 0 .7em; }
img { max-width: 100%; display: block; }
a { color: var(--ink); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .8em; }
.center { text-align: center; }
.stack > * + * { margin-top: .75rem; }
.row { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.error { color: var(--red); font-weight: 700; }

/* Buttons and fields */
button, .btn {
  font: inherit; font-weight: 700; min-height: 52px; padding: .4em 1em; border-radius: var(--radius);
  border: 2px solid var(--ink); background: var(--white); color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { opacity: .5; }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: var(--white); }
.btn-bad { color: var(--red); border-color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; text-decoration: underline; font-weight: 400; }
.btn-big { width: 100%; min-height: 64px; font-size: 1.1em; }
.btn-small { min-height: 36px; padding: .15em .7em; font-size: .85em; border-width: 1px; }
input, select {
  font: inherit; min-height: 52px; padding: .35em .6em; border-radius: var(--radius);
  border: 1px solid #999; background: var(--white); color: var(--ink); width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--orange); outline-offset: 0; }
label { font-weight: 700; display: block; margin-bottom: .3em; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1em; }
.note { padding: .7em .9em; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid #f0d78a; font-size: .9em; }
.note.good { background: #e3f4e9; border-color: #a9d8b8; }
.note.info { background: var(--white); border-color: var(--line); }
.spinner { width: 40px; height: 40px; border: 4px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: spin .9s linear infinite; margin: .4em auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Subway-style round bullets: teams and difficulty */
.bullet {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 1.5em; height: 1.5em; border-radius: 50%; color: var(--white); font-weight: 700; font-size: .8em; line-height: 1;
}
.bullet.d1 { background: var(--green); }
.bullet.d2 { background: var(--yellow); color: var(--ink); }
.bullet.d3 { background: var(--red); }
.diff { display: inline-flex; align-items: center; gap: .35em; font-weight: 700; white-space: nowrap; }
.swatch { display: inline-block; width: .85em; height: .85em; border-radius: 50%; vertical-align: -.08em; flex: none; }

/* Segmented filter */
.seg { display: flex; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.seg button { flex: 1; min-height: 48px; border: 0; border-radius: 0; font-size: .9em; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button.on { background: var(--ink); color: var(--white); }

/* ---------- Player page (body.player) ----------
   Four type sizes only (tokens at the top), left-aligned, one primary thing per screen.
   Shared pieces are re-set with :where(body.player) so they keep the same specificity as the
   shared rules above: admin and the TV are untouched, and the player components below still win.
   Components: .btn-primary / button (secondary) / .btn-ghost (text), each big (52px, default) or
   .btn-small (40px); .btn-big = full width; .card; h2 = section heading; .badge; .sheet > .panel. */
body.player { --radius: 12px; --r-sm: 6px; font: 400 var(--fs-body)/1.45 var(--font); }
/* "Aa" bigger text: every size steps up together. */
body.player.big { --fs-display: 2.375rem; --fs-title: 1.625rem; --fs-body: 1.25rem; --fs-small: 1.0625rem; }
:where(body.player) h1 { font-size: var(--fs-display); font-weight: 800; line-height: 1.1; margin: 0 0 var(--sp-2); letter-spacing: -.01em; }
:where(body.player) h2 { font-size: var(--fs-title); font-weight: 700; line-height: 1.2; margin: 0 0 var(--sp-2); }
:where(body.player) h3 { font-size: var(--fs-body); font-weight: 700; margin: 0 0 var(--sp-1); }
:where(body.player) p { margin: 0 0 var(--sp-3); }
:where(body.player) .small { font-size: var(--fs-small); }
:where(body.player) .stack > * + * { margin-top: var(--sp-3); }
:where(body.player) .error:empty, :where(body.player) .loc-msg:empty { display: none; }
:where(body.player) button, :where(body.player) .btn {
  font: 700 var(--fs-body)/1.2 var(--font); min-height: 52px; padding: var(--sp-2) var(--sp-4); border: 2px solid var(--ink);
  border-radius: var(--radius); gap: var(--sp-2);
}
:where(body.player) .btn-big { width: 100%; min-height: 52px; font-size: var(--fs-body); }
:where(body.player) .btn-small { min-height: 40px; padding: var(--sp-1) var(--sp-3); font-size: var(--fs-body); border-width: 2px; }
/* Text button: no box, left-aligned with the text around it. */
:where(body.player) .btn-ghost { width: auto; border-color: transparent; background: transparent; font-weight: 700; padding-left: 0; padding-right: 0;
  text-decoration: underline; text-underline-offset: 3px; justify-content: flex-start; text-align: left; }
:where(body.player) input, :where(body.player) select { font-size: var(--fs-body); min-height: 52px; padding: 0 var(--sp-3); border: 2px solid #999; border-radius: var(--radius); }
:where(body.player) label { font-size: var(--fs-body); font-weight: 700; margin-bottom: var(--sp-2); }
body.player .card { border-radius: var(--radius); padding: var(--sp-4); }
body.player .card h2 { font-size: var(--fs-title); }
:where(body.player) .note { font-size: var(--fs-body); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); }
:where(body.player) .bullet { font-size: var(--fs-small); width: 1.5em; height: 1.5em; }
:where(body.player) .diff { gap: var(--sp-1); }
.badge { display: inline-block; font-size: var(--fs-small); font-weight: 700; line-height: 1.3; padding: 2px var(--sp-2); border-radius: var(--r-sm, 4px); background: var(--ink); color: var(--white); white-space: nowrap; }

.sign { background: var(--ink); color: var(--white); padding: calc(var(--sp-2) + env(safe-area-inset-top)) var(--sp-4) var(--sp-2); position: sticky; top: 0; z-index: 30; }
.sign .top { display: flex; align-items: center; gap: var(--sp-2); }
.sign .team { display: flex; align-items: center; gap: var(--sp-2); font-weight: 700; flex: 1; min-width: 0; }
.sign .team .tn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sign .clock { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sign .clock.over { color: #ffb38a; }
.sign .text-btn { min-width: 40px; padding: 0 var(--sp-2); border-color: #777; background: transparent; color: var(--white); }
.sign .score { display: flex; gap: var(--sp-2); margin-top: var(--sp-1); font-size: var(--fs-small); color: #ccc; }
.sign .score b { color: var(--white); }
.progress { height: 6px; background: #333; border-radius: 3px; overflow: hidden; margin-top: var(--sp-2); }
.progress span { display: block; height: 100%; background: var(--orange); }
.screen { max-width: 640px; margin: 0 auto; padding: var(--sp-4); }
main.with-tabs { padding-bottom: calc(60px + var(--sp-5) + env(safe-area-inset-bottom)); }
/* Bottom tab bar: navigation, not buttons. */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs button { flex: 1; border: 0; border-radius: 0; min-height: 60px; flex-direction: column; gap: 2px; font-size: var(--fs-small); font-weight: 400; color: var(--muted); background: var(--white); border-top: 4px solid transparent; padding: var(--sp-1); }
.tabs button svg { width: 24px; height: 24px; }
.tabs button.on { color: var(--ink); font-weight: 700; border-top-color: var(--orange); }
.notes { margin-bottom: var(--sp-4); }
.seg { display: flex; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; margin-bottom: var(--sp-3); }
.seg button { flex: 1; min-height: 48px; border: 0; border-radius: 0; font-size: var(--fs-body); }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button.on { background: var(--ink); color: var(--white); }
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chips button { flex: 1 1 auto; min-width: 0; padding: 0 var(--sp-2); white-space: nowrap; gap: var(--sp-1); }
.chips button.on { background: var(--ink); color: var(--white); }
body.big .chips button { flex-grow: 0; } /* when they wrap, keep natural widths */
.list-tools { display: flex; align-items: center; margin: var(--sp-3) 0; }
.list-tools select { width: auto; min-height: 40px; padding: 0 var(--sp-2); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7em; }
body.player .grid { gap: var(--sp-3); }
.tile { position: relative; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); display: block; text-align: left; min-height: 0; font-weight: 400; }
.tile img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #e5e5e5; }
.tile .num { position: absolute; top: var(--sp-2); left: var(--sp-2); background: var(--ink); color: var(--white); font-weight: 700; font-size: var(--fs-small); line-height: 1.3; padding: 2px var(--sp-2); border-radius: var(--r-sm); }
.tile .meta { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-1); padding: var(--sp-2); font-size: var(--fs-small); }
.tile.found img { opacity: .45; }
.tile .stamp { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-1); font-weight: 700; font-size: var(--fs-small); text-align: center; padding: var(--sp-2); }
.tile .stamp .check { width: 44px; height: 44px; border-radius: 50%; background: var(--ok); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: var(--fs-title); }
.tile .stamp.wait .check { background: var(--yellow); color: var(--ink); }
.tile .stamp.no .check { background: var(--red); }
.tile.sent-pic .inset { position: absolute; right: var(--sp-2); top: var(--sp-2); width: 34%; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--white); border-radius: var(--r-sm); box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.tile .pill { position: absolute; left: var(--sp-2); bottom: calc(var(--fs-small) * 1.45 + var(--sp-2) * 3); background: var(--ink); color: var(--white); font-size: var(--fs-small); font-weight: 700; line-height: 1.3; padding: 2px var(--sp-2); border-radius: var(--r-sm); max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .pill.yes { background: var(--ok); } .tile .pill.no { background: var(--red); }
/* Side-by-side: the photo you were hunting vs. your team's picture. Tap to stack them big. */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); cursor: zoom-in; }
.compare.big { grid-template-columns: 1fr; cursor: zoom-out; }
.compare figure { margin: 0; }
.compare img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius); background: #e5e5e5; touch-action: pan-x pan-y pinch-zoom; }
.compare.big img { aspect-ratio: auto; object-fit: contain; }
.compare figcaption { font-size: var(--fs-small); font-weight: 700; color: var(--muted); margin-top: var(--sp-1); }
.empty { text-align: center; color: var(--muted); padding: 2em 1em; }
body.player .empty { text-align: left; padding: var(--sp-6) 0; }
.detail-top { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); font-weight: 700; }
.detail-top .diff { font-weight: 700; }
.detail img.full { width: 100%; border-radius: var(--radius); touch-action: pan-x pan-y pinch-zoom; background: #e5e5e5; }
.detail-title { margin: var(--sp-4) 0 var(--sp-1); }
.action { margin-top: var(--sp-4); }
.sheet { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet .panel { background: var(--white); width: 100%; max-width: 520px; border-radius: 16px 16px 0 0; padding: var(--sp-5) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom)); text-align: left; }
.sheet .panel > h1, .sheet .panel > h2 { margin-bottom: 0; }
.sheet .emoji { font-size: 3rem; line-height: 1; }
.score-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.score-row:last-child { border-bottom: 0; }
.score-row .rank { font-weight: 700; width: 1.4em; color: var(--muted); }
.score-row .pts { font-weight: 700; font-size: var(--fs-title); text-align: right; line-height: 1; }
.score-row .pts small { display: block; font-size: var(--fs-small); font-weight: 400; color: var(--muted); margin-top: 2px; }
.score-row.me .name::after { content: " (you)"; color: var(--muted); font-weight: 400; }
.counts { display: flex; gap: .7em; font-size: .8em; margin-top: .25em; flex-wrap: wrap; }
.counts span { display: inline-flex; align-items: center; gap: .25em; }
.counts .bullet { font-size: .75em; }
body.player .counts { gap: var(--sp-3); font-size: var(--fs-small); margin-top: var(--sp-1); }
body.player .counts span { gap: var(--sp-1); }
body.player .counts .bullet { font-size: var(--fs-small); }
.scores-foot { margin-top: var(--sp-4); }
.winner { text-align: center; padding: 1em; border-radius: var(--radius); color: var(--white); margin-bottom: 1em; }
body.player .winner { text-align: left; padding: var(--sp-4); margin-bottom: var(--sp-4); }
.join-title { padding: var(--sp-5) 0 var(--sp-2); }
.join-title .turkey { font-size: 3rem; line-height: 1; margin-bottom: var(--sp-3); }
.join-form { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.join-form label { margin: 0; }
.join-how { margin-top: var(--sp-5) !important; }
.team-btn { width: 100%; color: var(--white); border: 0; justify-content: space-between; text-align: left; }
.team-btn > span { flex: none; }
.team-btn small { font-weight: 400; font-size: var(--fs-small); opacity: .9; text-align: right; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.allow-mock { max-width: 300px; background: #eee; border-radius: 12px; padding: var(--sp-4); font-size: var(--fs-small); text-align: center; }
.allow-mock .btns { display: flex; border-top: 1px solid #ccc; margin: var(--sp-3) calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)); }
.allow-mock .btns span { flex: 1; padding: var(--sp-3); color: #007aff; }
.allow-mock .btns span + span { border-left: 1px solid #ccc; font-weight: 700; outline: 3px solid var(--orange); outline-offset: -3px; border-radius: 0 0 12px 0; }
canvas#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; }
.roster { display: flex; flex-wrap: wrap; gap: 2px var(--sp-3); font-size: var(--fs-small); color: var(--muted); margin-top: 2px; }
.roster b { color: var(--ink); }
/* "Red team found something!" pop-ups */
.toasts { position: fixed; top: 100px; left: 0; right: 0; z-index: 78; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); pointer-events: none; padding: 0 var(--sp-4); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--sp-3); background: var(--ink); color: var(--white); border-radius: var(--radius); padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-3); font-size: var(--fs-body); max-width: 480px; box-shadow: 0 4px 14px rgba(0,0,0,.25); animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .4s, transform .4s; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast .burst { width: 1.2em; height: 1.2em; border-radius: 50%; flex: none; position: relative; }
.toast .burst::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; color: inherit; opacity: .0; animation: ring 1s ease-out 2; }
@keyframes pop { from { transform: scale(.6) translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ring { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }

/* Map */
.map-wrap { position: relative; isolation: isolate; } /* keep the map's layers under the header and pop-ups */
#map { height: calc(100vh - 220px); height: calc(100dvh - 220px); border-radius: var(--radius); border: 1px solid var(--line); background: #e8e8e8; }
.map-buttons { position: absolute; right: var(--sp-3); bottom: 28px; z-index: 500; display: flex; gap: var(--sp-2); }
.map-buttons button { min-height: 52px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.map-key { position: absolute; left: var(--sp-3); top: var(--sp-3); z-index: 500; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-small); line-height: 1.6; }
.leaflet-container { font-family: var(--font); }
.leaflet-control-attribution { font-size: 10px; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #0039a6; border: 3px solid var(--white); box-shadow: 0 0 0 2px #0039a6; }
.find-pin { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 1px rgba(0,0,0,.4); color: var(--white); font: 700 13px/20px var(--font); text-align: center; }
.num-pin { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 1px rgba(0,0,0,.4); color: var(--white); font: 700 11px/20px var(--font); text-align: center; }
.num-pin.d2 { color: var(--ink); }
.num-pin.sel { outline: 3px solid var(--orange); outline-offset: 1px; }
.player-pin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.player-pin.stale { opacity: .4; }
.find-pin.miss { background: #888 !important; }
.key-pin { display: inline-block; width: 1.3em; height: 1.3em; border-radius: 50%; color: var(--white); font-weight: 700; line-height: 1.3em; text-align: center; vertical-align: -.2em; }
.leaflet-tooltip.mate-label { background: var(--white); border: 1px solid #999; border-radius: 4px; padding: 0 .35em; font: 700 11px/1.5 var(--font); box-shadow: none; }
.leaflet-tooltip.mate-label::before { display: none; }

/* ---------- Admin ---------- */
.a-head { position: sticky; top: 0; z-index: 1100; display: flex; align-items: center; gap: 1em; padding: .5em 1em; background: var(--ink); color: var(--white); flex-wrap: wrap; }
.a-head .brand { font-weight: 700; font-size: 1.1em; }
.a-head nav { display: flex; gap: 2px; flex-wrap: wrap; }
.a-head nav button { min-height: 36px; border: 0; background: transparent; color: #bbb; font-size: .9em; padding: 0 .8em; border-bottom: 3px solid transparent; border-radius: 0; }
.a-head nav button.on { color: var(--white); border-bottom-color: var(--orange); }
.status { font-weight: 700; font-size: .85em; padding: .2em .6em; border-radius: var(--radius); }
.status.setup { background: #444; } .status.live { background: var(--ok); } .status.ended { background: var(--red); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 1em; }
body.admin button { min-height: 38px; }
body.admin .btn-big { min-height: 50px; }
body.admin input, body.admin select { min-height: 38px; }
.layout { display: grid; grid-template-columns: 300px 1fr; gap: 1em; align-items: start; }
.layout > *, .cols > * { min-width: 0; } /* let long content wrap instead of widening the page */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; align-items: start; }
@media (max-width: 900px) { .layout, .cols { grid-template-columns: 1fr; } }
.card h2 { font-size: 1.05em; display: flex; align-items: center; gap: .5em; }
.count { font-weight: 400; color: var(--muted); }
.count.hot { color: var(--white); background: var(--red); padding: 0 .45em; border-radius: var(--radius); font-weight: 700; }
.drop { border: 2px dashed #aaa; border-radius: var(--radius); padding: 1.1em; text-align: center; }
.drop.over { border-color: var(--orange); background: #fff3eb; }
.prow { display: flex; gap: .8em; align-items: center; padding: .6em 0; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
.prow .n { font-weight: 700; color: var(--muted); width: 1.8em; text-align: right; flex: none; }
.prow img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius); background: #e5e5e5; flex: none; }
.prow .pf { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: .4em; align-items: center; }
.prow .f-diff { order: 1; } .prow .f-pts { order: 2; width: 76px; } .prow .f-rad { order: 3; width: 76px; }
.prow .f-title { order: 4; flex: 1 1 200px; width: auto; } .prow .f-hint { order: 5; flex: 1 1 200px; width: auto; }
.prow input { min-height: 34px !important; padding: .2em .5em; font-size: .9em; }
.prow .pact { display: flex; flex-direction: column; gap: .3em; align-items: flex-end; flex: none; }
.unit { position: relative; display: block; }
.unit input { padding-right: 2em; }
.unit i { position: absolute; right: .5em; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .75em; color: var(--muted); pointer-events: none; }
.dseg { display: inline-flex; border: 1px solid #999; border-radius: var(--radius); overflow: hidden; }
.dseg button { min-height: 32px !important; padding: 0 .6em; border: 0; border-radius: 0; font-size: .8em; font-weight: 400; color: var(--muted); }
.dseg button + button { border-left: 1px solid #999; }
.dseg button.on { font-weight: 700; color: var(--white); }
.dseg button.on[data-d="1"] { background: var(--green); }
.dseg button.on[data-d="2"] { background: var(--yellow); color: var(--ink); }
.dseg button.on[data-d="3"] { background: var(--red); }
.pin-btn { min-height: 32px !important; padding: 0 .6em; font-size: .8em; border-width: 1px; white-space: nowrap; }
.pin-btn.need { background: var(--warn-bg); border-color: #d9a400; }
.x-btn { min-height: 32px !important; width: 32px; padding: 0; border: 0; background: transparent; color: var(--muted); font-weight: 400; }
.x-btn:hover { color: var(--red); }
.team-row { display: flex; gap: .4em; align-items: center; margin-bottom: .4em; }
.team-row input[type=color] { width: 38px; min-height: 38px; padding: 2px; }
.map-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1em; height: calc(100vh - 90px); }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; height: auto; } #adminMap { height: 60vh !important; } }
#adminMap { height: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.side { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.side-head { padding: .8em 1em .6em; border-bottom: 1px solid var(--line); }
.side-list { overflow-y: auto; flex: 1; }
.side-item { display: flex; gap: .6em; align-items: center; padding: .4em 1em; cursor: pointer; border-left: 4px solid transparent; }
.side-item:hover { background: var(--bg); }
.side-item.sel { background: #fff3eb; border-left-color: var(--orange); }
.side-item img { width: 42px; height: 42px; object-fit: cover; border-radius: 4px; }
.side-item .t { flex: 1; min-width: 0; font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filters { display: flex; gap: .3em; flex-wrap: wrap; margin-top: .5em; }
.filters button { min-height: 28px !important; font-size: .78em; padding: 0 .6em; border-width: 1px; font-weight: 400; }
.filters button.on { background: var(--ink); color: var(--white); font-weight: 700; }
.map-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 800; background: var(--ink); color: var(--white); padding: .5em .9em; border-radius: var(--radius); display: flex; gap: .7em; align-items: center; font-size: .9em; white-space: nowrap; }
.radius-bar { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .6em .8em; }
.radius-bar .unit input { min-height: 32px !important; }
.radius-bar select { min-height: 32px !important; font-size: .9em; }
.rad-pre { min-height: 30px !important; font-weight: 400; padding: 0 .55em; border-width: 1px; }
.hint-rad { display: inline-flex; align-items: center; gap: .4em; padding: 0 .6em; border-left: 1px solid #555; border-right: 1px solid #555; }
.hint-rad input[type=range] { width: 140px; min-height: 0; padding: 0; accent-color: var(--orange); }
.map-hint button { min-height: 28px !important; font-size: .8em; padding: 0 .7em; border-color: var(--white); background: transparent; color: var(--white); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1em; margin-bottom: 1em; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .8em 1em; border-top: 6px solid var(--c, var(--line)); }
.stat .v { font-weight: 700; font-size: 2em; line-height: 1.1; }
.stat .k { color: var(--muted); font-size: .85em; }
#liveMap { height: 420px; border-radius: var(--radius); }
.judge-item { padding: .8em 0; border-bottom: 1px solid var(--line); }
.judge-item:last-child { border-bottom: 0; }
.judge-pics { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; margin-bottom: .5em; }
.judge-pics figure { margin: 0; }
.judge-pics img, .judge-pics .nopic { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); background: #eee; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.judge-pics figcaption { font-size: .75em; color: var(--muted); margin-top: .2em; }
.feed { max-height: 640px; overflow-y: auto; }
.feed-item { display: flex; gap: .7em; align-items: center; padding: .45em 0; border-bottom: 1px solid var(--line); }
.feed-item img { width: 46px; height: 46px; object-fit: cover; border-radius: 4px; background: #eee; flex: none; }
.tag { font-size: .75em; font-weight: 700; padding: 0 .4em; border-radius: 4px; }
.tag.auto, .tag.approved { background: #e3f4e9; color: var(--ok); }
.tag.pending { background: var(--warn-bg); color: #8a6d00; }
.tag.rejected, .tag.far { background: #fde6e5; color: var(--red); }
.judge-row img { width: 52px; height: 52px; }
.nopic-sm { width: 52px; height: 52px; border-radius: 4px; background: #eee; color: var(--muted); font-size: .7em; display: flex; align-items: center; justify-content: center; flex: none; }
.jbtns { display: flex; gap: .3em; flex: none; flex-wrap: wrap; justify-content: flex-end; max-width: 210px; }
.jbtns button { min-height: 32px !important; padding: 0 .6em; font-size: .8em; border-width: 1px; }
.jbtns button:disabled { opacity: 1; }
.jbtns .on-yes { background: var(--ok); border-color: var(--ok); color: var(--white); }
.jbtns .on-no { background: var(--red); border-color: var(--red); color: var(--white); }
.kick-btn { min-height: 32px !important; font-size: .78em; font-weight: 400; padding: 0 .6em; border-width: 1px; color: var(--red); border-color: #e3a19e; }
.flip { min-height: 28px !important; font-size: .75em; font-weight: 400; padding: 0 .5em; white-space: nowrap; flex: none; }
.tv-link { min-height: 30px !important; color: var(--white); border-color: #777; background: transparent; margin-right: .4em; }
.qr svg { width: 100%; height: auto; display: block; }
.tv { position: fixed; inset: 0; background: var(--white); z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2em; text-align: center; }
.tv h1 { font-size: 3em; }
.tv .qr { width: min(55vh, 80vw); }
.tv .close { position: absolute; top: 1em; right: 1em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6em; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.gallery figcaption { font-size: .78em; color: var(--muted); margin-top: .2em; }
.login { max-width: 380px; margin: 12vh auto; width: calc(100% - 32px); }

/* Pending-judge shortcut in the admin header */
.judge-pill { min-height: 30px !important; padding: 0 .7em; font-size: .85em; background: var(--red); border-color: var(--red); color: var(--white); margin-right: .4em; }

/* Big photo viewer (admin): tap a picture to see it large; judge right from it */
.lightbox { position: fixed; inset: 0; z-index: 3000; background: #000; display: flex; flex-direction: column; padding: max(.6em, env(safe-area-inset-top)) .6em max(.6em, env(safe-area-inset-bottom)); gap: .6em; }
.lb-pics { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .6em; }
.lb-pics figure { margin: 0; display: flex; flex-direction: column; min-height: 0; }
.lb-pics img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.lb-pics figcaption { color: #ddd; font-size: .9em; text-align: center; padding-top: .2em; }
.lb-info { color: #fff; text-align: center; font-size: .95em; }
.lb-btns { display: flex; gap: .5em; }
.lb-btns button { flex: 1; min-height: 54px; font-size: 1.05em; padding: 0 .4em; white-space: nowrap; }
@media (max-width: 700px), (orientation: portrait) { .lb-pics { grid-auto-flow: row; grid-auto-rows: 1fr; grid-auto-columns: auto; } }

/* ---------- Admin on phones ---------- */
@media (max-width: 700px) {
  body.admin input, body.admin select, body.admin textarea { font-size: 16px; } /* stops iPhone zooming in on tap */
  .a-head { padding: .35em .6em 0; gap: .3em .6em; }
  .a-head .brand { font-size: 1em; }
  .a-head nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .a-head nav::-webkit-scrollbar { display: none; }
  .a-head nav button { flex: 1 0 auto; padding: 0 .7em; min-height: 42px !important; font-size: .9em; white-space: nowrap; }
  .a-head .tv-link { display: none; }
  .wrap { padding: .6em; }
  .card { padding: .8em; }

  /* Score cards: one compact line per team */
  .tiles { grid-template-columns: 1fr; gap: .4em; margin-bottom: .8em; }
  .stat { display: grid; grid-template-columns: 1fr auto; column-gap: .6em; align-items: center; padding: .45em .7em; border-top: 1px solid var(--line); border-left: 6px solid var(--c, var(--line)); }
  .stat > .row { grid-column: 1; }
  .stat .v { grid-column: 2; grid-row: 1 / span 2; font-size: 1.6em; text-align: right; }
  .stat .counts { grid-column: 1; margin-top: .1em; }

  /* Judge queue: big buttons for thumbs */
  .judge-item .row button, .judge-item > .btn-ok { min-height: 52px !important; font-size: 1.05em; }
  .judge-pics { gap: .4em; }

  /* Every photo sent: pictures + text on top, buttons full width underneath */
  .judge-row { display: grid; grid-template-columns: 56px 56px 1fr 36px; gap: .3em .5em; align-items: start; padding: .6em 0; }
  .judge-row > a, .judge-row > .nopic-sm { grid-row: 1; }
  .judge-row img, .judge-row .nopic-sm { width: 56px; height: 56px; }
  .judge-row .grow { grid-row: 1; grid-column: 3; }
  .judge-row .x-btn { grid-row: 1; grid-column: 4; min-height: 36px !important; }
  .judge-row .jbtns { grid-row: 2; grid-column: 1 / -1; max-width: none; flex-wrap: nowrap; }
  .judge-row .jbtns button { flex: 1; min-height: 44px !important; font-size: .95em; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filters button { flex: none; min-height: 36px !important; }
  .feed { max-height: none; }

  /* Map tab: the radius slider bar wraps and sits at the bottom of the map */
  .map-layout { gap: .6em; }
  #adminMap { height: 62vh !important; }
  .map-hint { white-space: normal; flex-wrap: wrap; justify-content: center; left: 8px; right: 8px; transform: none; top: auto; bottom: 28px; text-align: center; }
  .hint-rad { border: 0; padding: 0; width: 100%; justify-content: center; }
  .hint-rad input[type=range] { flex: 1; width: auto; max-width: 220px; }
  .side-list { max-height: 50vh; }
  .side-item { padding: .5em .8em; }

  /* Photo rows */
  .prow { gap: .5em; align-items: flex-start; }
  .prow .n { width: 1.4em; }
  .prow img { width: 56px; height: 56px; }
  .prow .f-pts, .prow .f-rad { width: 84px; }
  .prow .pact { gap: .5em; }
  .radius-bar .row { gap: .35em; }
  #liveMap { height: 300px; }
}

/* ---------- Player full screens: lobby, countdown, game over ---------- */
body.locked { overflow: hidden; }
#screen { position: fixed; inset: 0; z-index: 75; color: var(--white); overflow-y: auto; -webkit-overflow-scrolling: touch; transition: background .4s; }
/* On a team color: buttons are white with ink text. */
#screen .btn, #screen button, .team-reveal .btn-big { background: var(--white); color: var(--ink); border-color: var(--white); }
/* The lobby fits on one screen, no scrolling: the team list takes what's left and names are cut to fit. */
.lob { max-width: 560px; margin: 0 auto; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--sp-4);
  padding: calc(var(--sp-4) + env(safe-area-inset-top)) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom)); }
.lob-top { font-weight: 700; font-size: var(--fs-small); opacity: .9; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lob-hero { flex: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.lob-hero h1 { margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.lob-you { margin: 0; }
.lob-dots { display: inline-flex; gap: .15em; margin-left: .3em; vertical-align: middle; }
.lob-dots i { width: .18em; height: .18em; border-radius: 50%; background: var(--white); opacity: .4; animation: dot 1.2s infinite; }
.lob-dots i:nth-child(2) { animation-delay: .2s; } .lob-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 30% { opacity: 1; transform: translateY(-3px); } }
/* Location: a plain status line; a real small button when there's something to fix. */
.lob-loc { margin: 0; display: flex; align-items: center; gap: var(--sp-3); font-weight: 700; min-height: 40px; }
.lob-teams { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-2); }
.lob-team { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); flex: none; }
.lob-team.mine { box-shadow: inset 0 0 0 3px var(--ink); }
.lob-th { display: flex; align-items: center; gap: var(--sp-2); min-height: 40px; }
.lob-tn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lob-n { font-size: var(--fs-small); color: var(--muted, #666); }
#screen .lob-th .btn-small { background: var(--white); color: var(--ink); border-color: var(--ink); }
.lob-here { font-size: var(--fs-small); font-weight: 700; white-space: nowrap; }
.lob-names { font-size: var(--fs-small); line-height: 1.35; margin: 2px 0 var(--sp-1); display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.lob-names.l1 { -webkit-line-clamp: 1; } .lob-names.l2 { -webkit-line-clamp: 2; } .lob-names.l3 { -webkit-line-clamp: 4; }
.lob-howbtn { flex: none; }

/* How-to cards: Next / Back, swipe, dots, Skip */
.sheet.tour .panel { display: flex; flex-direction: column; gap: var(--sp-3); touch-action: pan-y; }
.sheet.tour .panel > * + * { margin-top: 0; }
.tour-top { display: flex; align-items: center; gap: var(--sp-3); }
.tour-parts { display: flex; flex: 1; min-width: 0; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.tour-parts button { flex: 1; min-width: 0; min-height: 36px; padding: 0 var(--sp-2); border: 0; border-radius: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-parts button + button { border-left: 2px solid var(--ink); }
.tour-parts button.on { background: var(--ink); color: var(--white); }
.tour-skip { flex: none; }
.tour-card h2 { margin: var(--sp-3) 0 var(--sp-1); }
.tour-card p { margin: 0; min-height: calc(5 * 1.45em); } /* room for 5 lines, so Next / Back stay put */
.tour-card.in-next { animation: tourNext .3s ease-out; }
.tour-card.in-back { animation: tourBack .3s ease-out; }
@keyframes tourNext { from { opacity: 0; transform: translateX(40px); } }
@keyframes tourBack { from { opacity: 0; transform: translateX(-40px); } }
.tour-dots { display: flex; gap: 6px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tour-dots i.done { background: #999; }
.tour-dots i.on { background: var(--orange); width: 20px; border-radius: 4px; }
.tour-dots i.gap { margin-left: 10px; }
.tour-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--sp-3); }
.tour-nav button { white-space: nowrap; padding: var(--sp-2); }
.tour-nav button:disabled { visibility: hidden; }
/* If the card is taller than the screen (big text, small phone), Next / Back stay in view at the bottom. */
.sheet.tour .tour-nav { position: sticky; bottom: calc(-1 * (var(--sp-4) + env(safe-area-inset-bottom))); background: var(--white); margin: 0 calc(-1 * var(--sp-4)) calc(-1 * (var(--sp-4) + env(safe-area-inset-bottom))); padding: var(--sp-1) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom)); }
body.big .ta { height: 112px; }
body.big .ta > * { zoom: .75; }
@media (max-height: 640px) { .ta { height: 112px; } .ta > * { zoom: .75; } }

/* The little drawings on the cards. Fixed size so the cards don't jump around. */
.ta { height: 150px; background: #f4f1ec; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 13px; overflow: hidden; position: relative; }
.ta .bullet { font-size: 11px; }
.ta-pic { display: flex; align-items: center; justify-content: center; width: 64px; aspect-ratio: 1; border-radius: 6px; font-size: 30px; background: linear-gradient(160deg, hsl(var(--h) 55% 72%), hsl(var(--h) 45% 52%)); box-shadow: 0 1px 3px rgba(0,0,0,.2); flex: none; }
.ta-hunt { display: flex; gap: 0; }
.ta-hunt .ta-pic { width: 74px; border: 3px solid #fff; margin: 0 -6px; }
.ta-hunt .ta-pic:nth-child(1) { transform: rotate(-8deg); } .ta-hunt .ta-pic:nth-child(3) { transform: rotate(8deg); }
.ta-hunt .ta-pic:nth-child(2) { transform: translateY(-6px); z-index: 1; }
.ta-cap { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.ta-pts { display: grid; gap: 8px; width: 210px; }
.ta-pts div { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 15px; }
.ta-pts .bullet { font-size: 13px; }
.ta-pts em { margin-left: auto; font-style: normal; font-weight: 700; }
.ta-spot { display: flex; align-items: center; gap: 12px; }
.ta-spot svg { width: 118px; height: 118px; flex: none; }
.ta-spot ul { list-style: none; margin: 0; padding: 0; text-align: left; display: grid; gap: 8px; font-size: 12.5px; font-weight: 700; }
.ta-spot li { display: flex; align-items: center; gap: 6px; }
.ta-spot i { width: 14px; height: 14px; border-radius: 50%; flex: none; font-style: normal; display: flex; align-items: center; justify-content: center; }
.ta-spot i.g { background: #d7f0df; border: 2px solid #00933c; }
.ta-spot i.y { background: #fff4d6; border: 2px dashed #d4a106; }
.ta-spot i.x { color: var(--red); font-size: 14px; }
.ta-tile { position: relative; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ta-tile .ta-pic { width: 104px; border-radius: 0; box-shadow: none; opacity: .45; }
.ta-badge { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 700; font-size: 11px; text-align: center; padding: 4px; }
.ta-badge b { width: 30px; height: 30px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.ta-badge.wait b { background: var(--yellow); color: var(--ink); font-size: 14px; }
.ta-secret, .ta-two { display: flex; align-items: center; gap: 18px; }
.ta-shh { font-size: 44px; line-height: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ta-shh small { font-size: 12px; font-weight: 700; }
.ta-end { display: flex; align-items: center; gap: 10px; }
.ta-sign { background: var(--ink); color: #fff; font-weight: 700; border-radius: 6px; padding: 6px 10px; display: flex; align-items: center; gap: 6px; }
.ta-big { font-size: 38px; line-height: 1; }
.ta-arrow { font-size: 20px; color: var(--muted); }
.ta-phone { width: 200px; height: 138px; background: var(--bg); border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; font-size: 9px; }
.ta-seg { display: flex; margin: 6px 6px 0; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; font-weight: 700; }
.ta-seg span { flex: 1; text-align: center; padding: 2px 0; }
.ta-seg span.on { background: var(--ink); color: #fff; }
.ta-chips { display: flex; gap: 3px; padding: 4px 6px 0; font-weight: 700; font-size: 8px; }
.ta-chips span { display: flex; align-items: center; gap: 2px; border: 1px solid #bbb; border-radius: 4px; padding: 1px 3px; background: #fff; }
.ta-chips span.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ta-chips .bullet { font-size: 7px; font-style: normal; }
.ta-grid { display: flex; gap: 5px; padding: 5px 6px; flex: 1; min-height: 0; }
.ta-grid .ta-pic { width: auto; height: 100%; font-size: 22px; flex: 1; border-radius: 4px; }
.ta-tabs { display: flex; background: #fff; border-top: 1px solid var(--line); margin-top: auto; flex: none; }
.ta-tabs span { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 2px 0 3px; color: var(--muted); border-top: 2.5px solid transparent; font-size: 8px; }
.ta-tabs span.on { color: var(--ink); border-top-color: var(--orange); font-weight: 700; }
.ta-tabs svg { width: 13px; height: 13px; }
.ta-detail { padding: 6px; gap: 5px; }
.ta-detail .ta-pic.wide { width: 100%; height: 62px; aspect-ratio: auto; font-size: 28px; border-radius: 4px; }
.ta-btn { position: relative; background: var(--ink); color: #fff; font-weight: 700; text-align: center; padding: 6px 4px; border-radius: 4px; font-size: 10px; }
.ta-btn::after { content: ""; position: absolute; inset: -4px; border: 2.5px solid var(--orange); border-radius: 7px; animation: taPulse 1.4s ease-out infinite; }
@keyframes taPulse { from { opacity: 1; transform: scale(.96); } to { opacity: 0; transform: scale(1.06); } }
.ta-link { text-align: center; text-decoration: underline; font-size: 9px; }
.ta-map > svg { width: 100%; flex: 1; min-height: 0; display: block; }
.ta-scores { padding: 0; }
.ta-note { margin: 6px 6px 3px; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; font-size: 8.5px; }
.ta-srow { display: flex; align-items: center; gap: 5px; padding: 3px 8px; font-size: 10px; border-bottom: 1px solid var(--line); }
.ta-srow .bullet { font-size: 8px; }
.ta-help { width: 240px; display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.ta-help .ta-sign { border-radius: 0; padding: 8px 10px; }
.ta-help .hl { border: 1.5px solid #fff; border-radius: 4px; padding: 1px 7px; font-size: 12px; box-shadow: 0 0 0 3px var(--orange); margin-left: 6px; }
.ta-locbar { display: flex; align-items: center; gap: 6px; background: #c0261c; color: #fff; padding: 6px 10px; font-size: 11.5px; }
.ta-locbar span { flex: 1; }
.ta-locbar > b { background: #fff; color: var(--ink); border-radius: 4px; padding: 2px 8px; }
.sheet.tall .panel { max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.loc-bar { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-2) calc(-1 * var(--sp-4)) calc(-1 * var(--sp-2)); padding: var(--sp-2) var(--sp-4); font-size: var(--fs-small); }
.loc-bar.off { background: #c0261c; color: #fff; }
.loc-bar.searching { background: #f2c94c; color: #1f1a17; }
.loc-bar span { flex: 1; }
.loc-bar button { flex: none; background: #fff; color: #1f1a17; border-color: #fff; }
.loc-help { text-align: left; }
.loc-steps { margin: var(--sp-1) 0; padding-left: 1.3em; }
.loc-steps li + li { margin-top: var(--sp-2); }
.loc-url { font-weight: 700; background: #f4f1ec; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm, 6px); user-select: all; }
.loc-msg:empty { display: none; }
/* Countdown, GO and game over: the one place things are centered (the whole screen is one message). */
.cd { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--sp-6) var(--sp-5); gap: var(--sp-3); }
.cd p { font-size: var(--fs-title); font-weight: 700; margin: 0; }
.cd-n { font-size: 8rem; font-weight: 800; line-height: 1; animation: cdpop .9s ease-out; text-shadow: 0 2px 6px rgba(0,0,0,.25); }
.cd-n.go { font-size: 6rem; }
@keyframes cdpop { from { transform: scale(1.6); opacity: .3; } 40% { transform: scale(1); opacity: 1; } }
.cd.over { max-width: 420px; margin: 0 auto; }
.cd.over h1 { margin: 0; }
.cd.over p { font-size: var(--fs-body); font-weight: 400; }
.cd.over p.small { font-size: var(--fs-small); opacity: .85; }
.cd.over .btn { margin-top: var(--sp-3); }
.cd-icon { font-size: 4rem; line-height: 1; }

.loc-tag { font-size: .85em; font-weight: 700; padding: .05em .45em; border-radius: 4px; white-space: nowrap; }
.loc-tag.ok { color: #0a6b2e; background: #e3f5e9; }
.loc-tag.warn { color: #7a5600; background: #fdf1cc; }
.loc-tag.bad { color: #fff; background: #c0261c; }
.loc-bar.out { background: #e8590c; color: #fff; }
.home-pin { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 3px solid #1f1a17; box-shadow: 0 2px 6px rgba(0,0,0,.35); font-size: 18px; line-height: 28px; text-align: center; }
.home-label { font-weight: 700; font-size: 12px; padding: 1px 6px; }
.key-home { display: inline-block; width: 1.4em; text-align: center; }
.map-buttons button.hidden { display: none; }
.host-msg { z-index: 90; }
.host-msg .panel { max-height: 85vh; overflow-y: auto; }
.hm-icon { font-size: 3rem; line-height: 1; }
.hm-one + .hm-one { border-top: 1px solid rgba(0,0,0,.1); padding-top: var(--sp-3); }
.hm-from { margin-bottom: var(--sp-1); }
.hm-text { font-size: var(--fs-title); font-weight: 700; line-height: 1.25; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.player-pin.out { box-shadow: 0 0 0 3px #c0261c, 0 0 10px #c0261c; }
.rt-toggle { display: flex; gap: .6em; align-items: flex-start; cursor: pointer; }
.rt-toggle input { width: 1.2em; height: 1.2em; min-height: 0; padding: 0; margin-top: .15em; flex: none; }
.adult-box { display: inline-flex; align-items: center; gap: .25em; font-size: .75em; font-weight: 700; padding: .15em .5em; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; }
.adult-box.on { background: #1f1a17; color: #fff; border-color: #1f1a17; }
.adult-box input { margin: 0; width: auto; min-height: 0; height: auto; padding: 0; }
.lob-count { font-size: .75em; opacity: .8; font-weight: 400; }
/* Random teams: "You're on the Blue team!" A one-message moment, so it's centered like the countdown. */
.team-reveal { position: fixed; inset: 0; z-index: 88; color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--sp-5) var(--sp-4); animation: trIn .5s cubic-bezier(.2, 1.3, .4, 1); overflow-y: auto; }
.tr-in { max-width: 26em; width: 100%; }
.tr-small { font-size: var(--fs-title); font-weight: 700; opacity: .9; margin: 0 0 var(--sp-3); }
.team-reveal h1 { margin: 0 0 var(--sp-4); text-shadow: 0 2px 4px rgba(0,0,0,.25); }
.tr-mates { margin: 0 0 var(--sp-5); }
@keyframes trIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
