:root {
  color-scheme: dark;
  --bg: #05070f; --bg2: #0a1020; --panel: rgba(13, 19, 38, 0.9); --solid: #0e1529; --raise: #141d36;
  --line: rgba(148, 180, 255, 0.14); --line2: rgba(255, 184, 77, 0.38);
  --text: #eef2ff; --muted: #97a3c2; --accent: #ffb84d; --ink: #1a1205; --teal: #2dd4bf;
  --good: #4ade80; --bad: #ff6b6b; --warn: #facc15; --r: 14px;
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--bg); }
body { min-height: 100vh; background: radial-gradient(1200px 600px at 70% -10%, #13204a55, transparent), var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; }
h1 { font-size: 26px; } h2 { font-size: 20px; margin-bottom: 10px; } h3 { font-size: 16px; margin-bottom: 8px; }
img { max-width: 100%; }
.muted { color: var(--muted); } .small { font-size: 13px; } .err { color: var(--bad); min-height: 1em; } .good { color: var(--good); } .bad { color: var(--bad); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 18px 16px 40px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.grid.tight { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.card.hero { border-color: var(--line2); }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.section-title h2 { margin: 0; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: rgba(5, 7, 15, 0.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.brand { color: var(--accent); font-weight: 800; font-size: 18px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav .main { display: flex; gap: 2px; flex: 1; }
.nav a.on, .nav .drop a.on { color: var(--accent); }
.nav .main a, .nav .drop a { color: var(--text); padding: 6px 10px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.nav .main a:hover, .nav .drop a:hover { background: var(--raise); text-decoration: none; }
.nav .drop { position: relative; }
.nav .drop summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.nav .drop summary::-webkit-details-marker { display: none; }
.nav .drop > div { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; display: grid; gap: 2px; padding: 8px; background: var(--solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px #000a; }
.nav .drop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.nav .burger { display: none; }
.nav .burger summary { font-size: 20px; }
.nav .who { display: flex; gap: 10px; align-items: center; white-space: nowrap; margin-left: auto; }
.nav .who .me { color: var(--text); }
@media (max-width: 899px) { .nav .main, .nav .more { display: none; } .nav .burger { display: block; } .hide-sm { display: none; } }
.foot { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding-top: 18px; padding-bottom: 30px; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 15px system-ui, sans-serif; padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--raise); color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--line2); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.big { padding: 14px 28px; font-size: 17px; border-radius: 999px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--teal); cursor: pointer; font: inherit; padding: 0; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
label { display: grid; gap: 5px; font-size: 14px; color: var(--muted); }
label.check { display: flex; gap: 9px; align-items: center; color: var(--text); }
label.check input { width: auto; }
/* Group challenge geography: native disclosure and checkboxes, no dropdown dependency. */
.gc-scope { grid-column: 1 / -1; position: relative; min-width: 0; }
.gc-scope summary { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg2); cursor: pointer; }
.gc-scope summary span { display: block; overflow-wrap: anywhere; margin-top: 3px; }
.gc-scope-menu { position: absolute; z-index: 10; top: calc(100% + 6px); width: 100%; background: var(--solid); border: 1px solid var(--line); border-radius: 9px; padding: 12px; box-shadow: 0 12px 30px #0008; }
.gc-scope-menu > p { margin: 8px 0; }
.gc-scope-menu .row { flex-wrap: nowrap; }
.gc-scope-menu input[type="search"] { flex: 1; min-width: 0; }
.gc-scope-options { max-height: 260px; overflow-y: auto; margin-bottom: 10px; }
.gc-scope-options fieldset { border: 0; padding: 0; min-width: 0; margin-bottom: 10px; }
.gc-scope-options legend { color: var(--accent); font-weight: 600; padding: 6px 0; }
.gc-scope-options label { padding: 7px 4px; cursor: pointer; }
.gc-scope-options label:hover { background: var(--raise); }
.gc-scope-options [hidden] { display: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--ink); border-color: transparent; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 10px 14px; font: 600 14px system-ui, sans-serif; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--accent); border-color: var(--accent); }

/* data */
table { width: 100%; border-collapse: collapse; }
td, th { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
tr.me td { background: rgba(255, 184, 77, 0.08); }
.board td:first-child { width: 2.2em; color: var(--muted); }
.flag { width: 1.3em; height: 0.98em; object-fit: cover; border-radius: 2px; vertical-align: -0.12em; margin-right: 6px; box-shadow: 0 0 0 1px #0006; }
.user { color: var(--text); font-weight: 600; }
.tier { color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { background: var(--raise); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font: 800 26px system-ui, sans-serif; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.bar { height: 8px; background: var(--raise); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent)); border-radius: 99px; }
.lvl { display: grid; grid-template-columns: 7.5em 1fr 3.4em; gap: 8px; align-items: center; font-size: 13px; }
.empty { color: var(--muted); padding: 14px 0; text-align: center; }
.tile { position: relative; display: grid; align-content: end; min-height: 120px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--text);
  background: linear-gradient(160deg, #1b2a52, #0d1426); overflow: hidden; }
.tile:hover { border-color: var(--line2); text-decoration: none; }
.tile b { font-size: 17px; } .tile span { color: var(--muted); font-size: 13px; }
.tile .done { position: absolute; top: 10px; right: 10px; background: var(--good); color: #052e14; border-radius: 99px; padding: 1px 9px; font-size: 12px; font-weight: 700; }
.tile .ico { position: absolute; top: 10px; left: 12px; font-size: 28px; }
.feed li { list-style: none; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed { padding: 0; }
.story { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
.story img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.story h4 { margin-bottom: 4px; } .story p { font-size: 14px; }
.story:not(:has(img)) { grid-template-columns: 1fr; }
.badge-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.badge { border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; background: var(--raise); }
.badge .i { font-size: 30px; } .badge b { display: block; font-size: 14px; } .badge span { font-size: 12px; color: var(--muted); }
.badge.locked .i { opacity: 0.5; filter: grayscale(1); }
.achievement-label { color: var(--teal); font-weight: 700; letter-spacing: 0.08em; margin-bottom: 4px; font-size: 11px; }
.achievement-tools { margin-bottom: 16px; }
.achievement-tools input { flex: 1; min-width: 140px; }
.achievement-tools select { width: auto; }
.badge[hidden] { display: none; }
.place-history { text-align: left; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.history-places { margin: 10px 0 14px; }
.history-photo { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.history-body h4 { font-size: 18px; margin-bottom: 4px; }
.history-body > p { line-height: 1.65; margin: 10px 0; font-size: 14px; }
.history-body .row { margin-top: 12px; }
.results tr[data-i]:focus-visible { outline-offset: -2px; }

/* modal & toast */
.modal-back { position: fixed; inset: 0; z-index: 100; background: #000a; display: grid; place-items: center; padding: 16px; }
.modal { position: relative; width: min(440px, 100%); max-height: 90vh; overflow: auto; background: var(--solid); border: 1px solid var(--line2); border-radius: 16px; padding: 22px; }
.modal .x { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
#toasts { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--solid); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 14px; box-shadow: 0 8px 30px #000a; transition: opacity 0.4s, transform 0.4s; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.big-ico { font-size: 22px; vertical-align: middle; }

/* globe pages */
body.game { overflow: hidden; height: 100dvh; }
#globe { position: fixed; inset: 0; cursor: crosshair; }
.hud { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; width: min(600px, calc(100% - 20px)); display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; backdrop-filter: blur(6px); }
.hud .t { color: var(--accent); font-weight: 800; white-space: nowrap; }
.hud .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud .score { margin-left: auto; font: 800 20px ui-monospace, Consolas, monospace; color: var(--accent); }
.hud .home { font-size: 18px; color: var(--text); text-decoration: none; }
#card { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 5; width: min(600px, calc(100% - 20px)); max-height: 62dvh; overflow: auto;
  padding: 14px 16px; background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; backdrop-filter: blur(6px); text-align: center; }
#card .meta { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
#card .meta .x { color: var(--accent); }
#card .target { font-size: 23px; font-weight: 800; margin: 4px 0 2px; }
#card .hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
#card .big { font: 800 30px ui-monospace, Consolas, monospace; color: var(--accent); margin: 2px 0; }
#card .quip { color: #cfd6ee; font-style: italic; font-size: 14px; }
#card .fact { margin: 8px 0 2px; font-size: 14px; color: #d6dcf2; }
#card .btn { margin-top: 10px; }
#card .clue { font-size: 18px; font-style: italic; margin: 6px 0; }
#card .event { font-size: 16px; margin: 6px 0; text-align: left; }
.clue-photo { max-height: 34dvh; border-radius: 10px; margin: 6px auto 0; display: block; }
.flag-big { height: 90px; border-radius: 6px; margin: 8px auto 0; display: block; box-shadow: 0 0 0 1px #0008; }
.clock { position: relative; height: 22px; background: var(--raise); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.clock i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--teal), var(--good)); transition: width 0.1s linear; }
.clock i.low { background: linear-gradient(90deg, var(--bad), var(--warn)); }
.clock b { position: relative; font: 700 13px ui-monospace, monospace; line-height: 22px; }
.gl-anchor { width: 0; height: 0; }
.pin { position: absolute; left: 0; top: 0; width: max-content; pointer-events: none; transform: translate(-50%, -100%); font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 3px #000); text-align: center; }
.pin span { display: block; font: 600 12px system-ui, sans-serif; background: var(--panel); padding: 2px 7px; border-radius: 6px; white-space: nowrap; margin-bottom: 2px; color: var(--text); }
.pin.label-only { transform: translate(-50%, -50%); }
.pin.small { font-size: 16px; }
table.results { margin: 8px 0; }
table.results td { padding: 5px 4px; }
.results-head { display: grid; gap: 4px; }
@media (max-width: 480px) { #card .target { font-size: 19px; } #card { padding: 12px; } .hud .sub { display: none; } }
table.results td:first-child { width: 1.8em; }
.globe-mini { width: 220px; height: 220px; flex: none; margin: -10px 0; }
.hero-grid { display: flex; gap: 20px; align-items: center; }
@media (max-width: 700px) { .hero-grid { flex-direction: column; } .globe-mini { width: 180px; height: 180px; } }
.kpi { font: 800 44px system-ui, sans-serif; color: var(--teal); line-height: 1; }
.list-scroll { max-height: 420px; overflow: auto; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--raise); border: 1px solid var(--line); font-size: 12px; }
.round-chips { display: inline-flex; gap: 3px; }
.round-chips i { font-style: normal; font-size: 11px; padding: 1px 5px; border-radius: 5px; background: #1e293b; }
.round-chips i.hi { background: #14532d; } .round-chips i.mid { background: #713f12; } .round-chips i.lo { background: #7f1d1d; }

/* ===== game HUD v2 (globe pages) ===== */
.hud2 { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.hud2 > * { pointer-events: auto; }
.gbar { position: absolute; top: max(8px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(640px, calc(100% - 16px)); height: 40px; display: flex; align-items: center; gap: 10px;
  padding: 0 8px; background: rgba(9, 14, 30, 0.82); border: 1px solid rgba(255, 184, 77, 0.45); border-radius: 12px; backdrop-filter: blur(8px); }
.menu-btn { background: none; border: 0; color: var(--text); font: 700 15px system-ui, sans-serif; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.menu-btn:hover { background: var(--raise); }
.gtitle { color: var(--accent); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsub { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtop { position: absolute; top: calc(max(8px, env(safe-area-inset-top)) + 46px); left: 50%; transform: translateX(-50%); width: min(640px, calc(100% - 16px)); display: flex; gap: 6px; align-items: stretch; }
.gstats { display: grid; gap: 6px; align-content: start; }
.chip-stat { min-width: 76px; padding: 5px 8px; text-align: center; background: rgba(9, 14, 30, 0.82); border: 1px solid rgba(45, 212, 191, 0.5); border-radius: 10px; backdrop-filter: blur(8px); }
.chip-stat span { display: block; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--teal); }
.chip-stat b { display: inline-block; font: 800 22px ui-monospace, Consolas, monospace; color: #fff; line-height: 1.1; }
.chip-stat.bump b { animation: bump 0.45s ease; }
@keyframes bump { 40% { transform: scale(1.25); color: var(--accent); } }
.prompt { flex: 1; min-width: 0; padding: 7px 12px 9px; background: rgba(9, 14, 30, 0.84); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; backdrop-filter: blur(8px); text-align: center; position: relative; overflow: hidden; }
.prompt[hidden] { display: none; }
.p-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.p-label .x { color: var(--accent); }
.p-name { font-size: clamp(18px, 4.6vw, 25px); font-weight: 800; line-height: 1.2; margin: 2px 0; }
.p-where { font-weight: 600; color: #c9d2ec; font-size: 0.8em; }
.p-hint { color: var(--muted); font-size: 12.5px; }
.p-clue { font-size: 16px; font-style: italic; margin: 4px 0; }
.p-event { font-size: 14px; text-align: left; margin: 4px 0; max-height: 7.5em; overflow: auto; }
.p-photo { max-height: 22dvh; max-width: 100%; border-radius: 8px; margin: 4px auto 2px; display: block; cursor: zoom-in; }
.p-flagrow { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 4px 0; }
.p-flag { height: 54px; border-radius: 4px; box-shadow: 0 0 0 1px #0008; }
.p-confirm { margin-top: 6px; }
.p-result { font-size: 18px; margin: 2px 0; padding-right: 70px; }
.p-result b { font: 800 22px ui-monospace, monospace; color: var(--accent); }
.p-next { position: absolute; right: 8px; bottom: 9px; }
.p-auto { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.p-auto i { display: block; height: 100%; width: 100%; background: var(--accent); opacity: 0.6; }
.p-clock { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: #1e293b; }
.p-clock i { display: block; height: 100%; background: var(--good); transition: width 0.1s linear; }
.p-clock i.low { background: var(--bad); }
.zoom { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.zoom button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(9, 14, 30, 0.8); color: #fff; font-size: 22px; cursor: pointer; backdrop-filter: blur(6px); }
.zoom button:hover { border-color: var(--accent); }
.target-dot { width: 14px; height: 14px; border-radius: 50%; background: #ffd666; box-shadow: 0 0 0 3px rgba(255, 214, 102, 0.35), 0 0 18px #ffd666; transform: translate(-50%, -50%); }
.score-card { position: absolute; left: 0; top: 0; width: max-content; transform: translate(calc(16px + var(--dx, 0px)), -50%); min-width: 150px; max-width: min(260px, 70vw); padding: 8px 11px; border-radius: 10px; pointer-events: none;
  background: rgba(6, 10, 24, 0.86); border: 1px solid rgba(255, 214, 102, 0.55); box-shadow: 0 6px 24px #000a; font: 600 13px ui-monospace, Consolas, monospace; color: #eaf2ff; animation: cardIn 0.25s ease; }
@media (max-width: 600px) { .score-card { transform: translate(calc(-50% + var(--dx, 0px)), calc(-100% - 18px)); max-width: min(250px, 80vw); } }
@keyframes cardIn { from { opacity: 0; } }
.score-card .sc-n { font: 800 15px system-ui, sans-serif; color: #fff; }
.score-card .sc-w { color: #b8c4e4; font-weight: 500; font-family: system-ui, sans-serif; }
.score-card .sc-d { color: #7dd3fc; }
.score-card .sc-s { color: var(--accent); font-size: 15px; }
.score-card .sc-b { color: var(--good); }
.score-card .sc-q { color: #cbd5f5; font-style: italic; font-family: system-ui, sans-serif; font-weight: 500; }
.score-card .sc-f { color: #d6dcf2; font-family: system-ui, sans-serif; font-weight: 400; font-size: 12.5px; margin-top: 3px; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 4px; }
.sheet { position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, calc(100% - 16px)); max-height: min(74dvh, 720px); overflow: auto;
  padding: 16px 16px 12px; background: rgba(9, 14, 30, 0.95); border: 1px solid rgba(255, 184, 77, 0.45); border-radius: 18px; box-shadow: 0 -10px 40px #000c; text-align: center; animation: sheetIn 0.3s ease; }
.sheet[hidden] { display: none; }
@keyframes sheetIn { from { transform: translate(-50%, 30px); opacity: 0; } }
.sheet .big:not(.btn) { font: 800 34px ui-monospace, Consolas, monospace; color: var(--accent); margin: 2px 0; }
.sheet .review { margin-top: 8px; width: 100%; }
.sheet tr[data-i] { cursor: pointer; }
.sheet tr[data-i]:hover td { background: rgba(255, 255, 255, 0.04); }
.sheet-pill { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(9, 14, 30, 0.92); color: var(--text); font: 700 14px system-ui, sans-serif; cursor: pointer; }
.sheet-pill[hidden] { display: none; }
.modal-back.drawer { place-items: stretch start; padding: 0; }
.modal-back.drawer .modal { width: min(330px, 88vw); max-height: none; height: 100%; border-radius: 0 18px 18px 0; animation: drawerIn 0.22s ease; }
@keyframes drawerIn { from { transform: translateX(-30px); opacity: 0; } }
.drawer-nav { display: grid; gap: 2px; margin: 12px 0; }
.drawer-nav a { color: var(--text); padding: 9px 10px; border-radius: 9px; }
.drawer-nav a:hover { background: var(--raise); text-decoration: none; }
.drawer-in h4 { margin: 10px 0 6px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.drawer-in label.check { padding: 4px 0; font-size: 14px; }
.who-row { margin-top: 6px; font-size: 14px; }
.coach { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); width: min(360px, calc(100% - 40px)); padding: 16px; text-align: center; border-radius: 16px;
  background: rgba(6, 10, 24, 0.9); border: 1px solid rgba(45, 212, 191, 0.7); box-shadow: 0 0 30px rgba(45, 212, 191, 0.25); }
.coach b { color: var(--teal); }
@media (max-width: 520px) { .chip-stat { min-width: 62px; padding: 4px 6px; } .chip-stat b { font-size: 19px; } .gbar .menu-btn span { display: none; } .zoom { bottom: 96px; } }

/* first-visit welcome: floats in over the arriving globe, waits for a spin */
.welcome { position: absolute; left: 50%; top: 23%; transform: translateX(-50%); width: min(640px, calc(100% - 32px)); text-align: center; pointer-events: none !important; transition: opacity .6s, transform .6s; }
.welcome h1 { margin: 0; font: 800 clamp(30px, 7vw, 54px)/1.08 system-ui, sans-serif; letter-spacing: -0.5px; background: linear-gradient(100deg, #7dd3fc, #fff 45%, #ffd666); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.75)); animation: w-in 1s cubic-bezier(.2, .8, .2, 1) both; }
.welcome p { margin: 12px 0 0; font: 600 clamp(17px, 3.6vw, 22px) system-ui, sans-serif; color: #e6edff; text-shadow: 0 2px 10px #000; animation: w-in 1s .45s cubic-bezier(.2, .8, .2, 1) both; }
.welcome .w-hand { margin-top: 14px; font-size: 34px; filter: drop-shadow(0 2px 6px #000); animation: w-in .8s .9s both, w-swipe 2.2s 1.7s ease-in-out infinite; }
.welcome.out { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(0.97); }
@keyframes w-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
@keyframes w-swipe { 0%, 100% { transform: translateX(-46px) rotate(-12deg); } 50% { transform: translateX(46px) rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .welcome * { animation: none !important; } }
/* MapTap-style round prompt: tier band (blue → yellow → orange → red), "Tap as close as you can to …" */
.p-label .p-band { margin: -7px -12px 5px; padding: 3px 8px; font: 600 12px system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: #10131f; background: #8fd8ff; }
.p-label .p-band.b2 { background: #ffe14d; } .p-label .p-band.b3 { background: #ff9f43; } .p-label .p-band.b4 { background: #ff6b5b; }
.p-band.final { margin: -7px -12px 5px; padding: 3px 8px; font: 600 12px system-ui, sans-serif; color: #10131f; background: var(--teal); }
.p-label .p-lead { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--text); }
.p-final { font-size: 14px; } .p-final b { font: 800 22px ui-monospace, Consolas, monospace; }
.p-share { margin-top: 6px; }
/* typed tag at the tap and a subtitle-style answer card, each line on its own dark strip */
.guess-tag { position: absolute; left: 0; top: 0; width: max-content; transform: translate(calc(12px + var(--dx, 0px)), -130%); pointer-events: none; font: 600 13px ui-monospace, Consolas, monospace; color: #c8f7ff; }
.guess-tag span, .score-card div span { background: rgba(4, 10, 26, 0.74); padding: 1px 5px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.score-card { background: none; border: 0; box-shadow: none; padding: 0; line-height: 1.55; }
.score-card .sc-n, .score-card .sc-q { font-family: ui-monospace, Consolas, monospace; }
.score-card .sc-q { color: #ff9a4d; }
.prompt:has(.p-result) .p-lead { display: none; }

/* sponsor cards: a postcard with a stamp-like dashed edge, always labelled */
.ad-slot { margin-top: 12px; text-align: left; }
.ad-slot:empty { display: none; }
.ad-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1.5px dashed var(--line2); border-radius: 12px; background: linear-gradient(135deg, rgba(255, 184, 77, 0.10), rgba(45, 212, 191, 0.08)), var(--solid); color: var(--text); text-decoration: none; text-align: left; }
.ad-card:hover { border-color: var(--accent); }
.ad-card img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: rgba(255, 255, 255, 0.07); }
.ad-body { display: grid; gap: 2px; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.ad-body b { font-size: 15px; }
.ad-tag { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
button.ad-near { margin-top: 6px; font-size: 13px; }
.ticker { display: flex; margin-top: 14px; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; background: var(--solid); font-size: 14px; }
.ticker:empty { display: none; }
.ticker-tag { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #d62839; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.ticker-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s steps(2) infinite; }
.ticker-view { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
.ticker-run { display: flex; width: max-content; animation: ticker 30s linear infinite; }
.ticker-run > div { display: flex; }
.ticker:hover .ticker-run, .ticker:focus-within .ticker-run { animation-play-state: paused; }
.ticker-run a { display: flex; align-items: center; gap: 8px; padding: 9px 0 9px 16px; white-space: nowrap; color: var(--text); text-decoration: none; }
.ticker-run a::after { content: '◆'; margin-left: 8px; color: var(--accent); font-size: 9px; }
.ticker-run a:hover b { color: var(--accent); }
.ticker-run img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.ticker-run i { color: var(--muted); font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: 0.25; } }
.beacon { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% + 9px)); display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; width: max-content; pointer-events: auto; color: var(--text); text-decoration: none; font: 600 12px system-ui, sans-serif; }
.pulse-dot { display: block; flex: none; width: 14px; height: 14px; border-radius: 50%; background: #2dd4bf; border: 2px solid #fff; animation: beacon 1.6s ease-out infinite; }
.globe-mini .pulse-dot { width: 9px; height: 9px; border-width: 1.5px; }
.beacon span { display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(5, 7, 15, 0.85); border: 1px solid rgba(45, 212, 191, 0.7); }
.beacon:hover span { border-color: var(--accent); }
.beacon img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.beacon small { font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
@keyframes beacon { from { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.75); } to { box-shadow: 0 0 0 14px rgba(45, 212, 191, 0); } }
@media (prefers-reduced-motion: reduce) { .ticker-run, .ticker-tag::before, .pulse-dot { animation: none; } .ticker-view { overflow-x: auto; } }
.bonus-ad { margin-top: 12px; text-align: center; }
label[hidden] { display: none; }

/* hold to drop: the ring that charges under your finger (shows after 120 ms, so ordinary spins never flash it) */
#globe { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.hold-ring { position: fixed; z-index: 30; width: 76px; height: 76px; margin: -38px 0 0 -38px; pointer-events: none; opacity: 0; animation: hold-in 0.1s 0.12s forwards; }
.hold-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.hold-ring circle { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 5; }
.hold-ring .arc { stroke: #ffb347; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 6px #ff8a3d); animation: hold-charge calc(var(--ms) - 120ms) 0.12s linear forwards; }
.hold-ring i { position: absolute; inset: 29px; border-radius: 50%; background: #ffe1a6; box-shadow: 0 0 12px 4px #ff9a3d; transform: scale(0.3); animation: hold-glow calc(var(--ms) - 120ms) 0.12s ease-in forwards; }
.hold-ring.fired { animation: hold-out 0.45s ease-out forwards; }
@keyframes hold-in { to { opacity: 1; } }
@keyframes hold-charge { to { stroke-dashoffset: 0; stroke: #fff1cf; } }
@keyframes hold-glow { to { transform: scale(1); } }
@keyframes hold-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.8); } }
/* the one-time invite */
.hold-invite { text-align: center; }
.hold-invite h2 { color: #ffc46b; margin: 8px 0; }
.hold-invite .row { margin: 16px 0 10px; flex-wrap: nowrap; }
.hold-invite .row .btn { flex: 1; justify-content: center; }

/* achievement cards: stacked at the top, glowing ring round the icon, a shimmer on arrival, a draining timer bar */
#achs { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 210; display: grid; gap: 10px; width: min(520px, calc(100% - 24px)); pointer-events: none; }
.ach { position: relative; display: flex; gap: 16px; align-items: center; padding: 16px 52px 18px 16px; border-radius: 22px; overflow: hidden; pointer-events: auto;
  background: linear-gradient(160deg, #1a1d30, #0d0f1d); border: 1.5px solid color-mix(in srgb, var(--teal) 55%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--teal) 22%, transparent), 0 14px 40px #000c; animation: ach-in 0.55s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.ach::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.13) 50%, transparent 65%); transform: translateX(-100%); animation: ach-shine 1.1s 0.35s ease-out; pointer-events: none; }
.ach.gold { --teal: #f5c842; }
.ach.out { animation: ach-out 0.35s ease-in forwards; }
.ach-ico { flex: none; position: relative; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #262b46, #11142a);
  box-shadow: 0 0 0 4px var(--teal), 0 0 20px 5px color-mix(in srgb, var(--teal) 55%, transparent), inset 0 0 12px #000a; }
.ach-ico span { font-size: 31px; animation: ach-pop 0.6s 0.15s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.ach-ico::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid var(--teal); opacity: 0; animation: ach-burst 0.9s 0.2s ease-out; }
.ach-body { min-width: 0; line-height: 1.3; }
.ach-kicker { color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: 0.26em; text-transform: uppercase; }
.ach-body b { display: block; color: #fff; font-size: 20px; margin: 3px 0 2px; }
.ach-desc { color: var(--teal); font-size: 14px; }
.ach-quip { color: var(--muted); font-size: 14px; margin-top: 2px; }
.ach-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 9px; border: 0; background: #ffffff14; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.ach-x:hover, .ach-x:focus-visible { color: var(--text); background: #ffffff24; }
.ach-bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--teal); box-shadow: 0 0 8px var(--teal); transform-origin: left; animation: ach-drain var(--ms) linear forwards; }
.ach:hover .ach-bar, .ach:active .ach-bar, .ach:focus-within .ach-bar { animation-play-state: paused; }
@keyframes ach-in { from { opacity: 0; transform: translateY(-24px) scale(0.92); } }
@keyframes ach-out { to { opacity: 0; transform: translateY(-12px) scale(0.96); } }
@keyframes ach-shine { to { transform: translateX(100%); } }
@keyframes ach-pop { from { transform: scale(0) rotate(-25deg); } }
@keyframes ach-burst { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }
@keyframes ach-drain { to { transform: scaleX(0); } }
@media (max-width: 420px) { .ach { gap: 12px; padding: 14px 46px 16px 14px; } .ach-ico { width: 56px; height: 56px; } .ach-ico span { font-size: 26px; } .ach-body b { font-size: 18px; } }
/* the drain bar is the timer, so it keeps running with reduced motion; everything decorative stops */
@media (prefers-reduced-motion: reduce) { .ach, .ach::before, .ach-ico span, .ach-ico::after { animation: none; } }
