/* TriviaWorld. Layout: a game board (scorecard + question card over a full-width tappable world map);
   content pages reuse the same card and type scale. */
:root {
  --bg: #e7edf1;
  --panel: #ffffff;
  --ink: #16202b;
  --muted: #586777;
  --ocean: #c9d9e4;
  --land: #f9fbfa;
  --line: #a6b6c3;
  --border: #c3cfd9;
  --shadow: 0 1px 2px rgba(22,32,43,.08), 0 6px 20px rgba(22,32,43,.08);
  --c-geo: #2c6bd3;
  --c-ent: #db3f8b;
  --c-his: #e2ac0b;
  --c-art: #8a5732;
  --c-sci: #2b9a50;
  --c-spo: #ec741b;
  --good: #2b9a50;
  --bad: #c83b3b;
  --f-display: "Bungee", "Arial Black", Impact, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c131b; --panel: #15202c; --ink: #e6edf3; --muted: #93a3b4;
    --ocean: #0f1f2e; --land: #273849; --line: #3d5165; --border: #2c3d4f;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
    --c-art: #b47a4b; --c-geo: #4a87ea;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.45; margin: 0; display: flex; flex-direction: column; }
a { color: inherit; }
img, svg { max-width: 100%; }

/* ---------- site chrome ---------- */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1040px; width: 100%; margin: 0 auto; padding-inline: 16px; padding-block: 14px 4px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-pie { width: 36px; height: 36px; color: var(--ink); }
.wordmark { font-family: var(--f-display); font-size: clamp(20px, 3.6vw, 26px); line-height: 1; }
.wordmark span { color: var(--c-geo); }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; font-weight: 600; padding: 7px 11px; border-radius: 8px; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--panel); }
.site-nav a.nav-pro { color: var(--ink); border: 1.5px solid var(--ink); }
.pro-badge { font-family: var(--f-display); font-size: 12px; background: var(--ink); color: var(--bg); padding: 5px 9px 4px; border-radius: 6px; letter-spacing: .04em; }
.site-foot { margin-top: auto; max-width: 1040px; width: 100%; margin-inline: auto; padding-inline: 16px; padding-block: 24px; display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.site-foot a { color: var(--muted); }

.wrap { max-width: 1040px; width: 100%; margin: 0 auto; padding-inline: 16px; padding-block: 10px 8px; display: grid; gap: 12px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font: 700 15px/1 var(--f-body); padding: 13px 22px; border-radius: 10px; border: 0; cursor: pointer; background: var(--ink); color: var(--bg); letter-spacing: .01em; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn.wide { width: 100%; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
:focus-visible { outline: 3px solid var(--c-geo); outline-offset: 2px; }

/* ---------- round picker ---------- */
.modes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-block: 4px; }
.mode { flex: none; display: inline-flex; align-items: center; gap: 7px; font: 600 13px/1 var(--f-body); padding: 9px 12px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--panel); color: var(--ink); cursor: pointer; white-space: nowrap; }
.mode .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cat); }
.mode.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mode.locked { color: var(--muted); }
.mode.locked .dot { opacity: .45; }
.modes-label { flex: none; font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 8px; display: inline-flex; gap: 6px; align-items: center; }
.lock { font-family: var(--f-display); font-size: 11px; text-decoration: none; background: var(--ink); color: var(--bg); padding: 3px 6px 2px; border-radius: 4px; }

/* ---------- board ---------- */
.scoreline { display: flex; align-items: center; gap: 12px; }
.pie { width: 52px; height: 52px; flex: none; }
.pie .slot { stroke: var(--panel); stroke-width: 2.5; }
.pie .ring { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.round-tag { font-family: var(--f-mono); font-size: 13px; color: var(--muted); line-height: 1.3; font-variant-numeric: tabular-nums; }
.round-tag b { color: var(--ink); font-weight: 600; display: block; font-size: 14px; }

.qcard { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px 14px 20px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; position: relative; overflow: hidden; }
.qcard::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--cat, var(--muted)); }
.chip { font-family: var(--f-display); font-size: 12px; letter-spacing: .04em; color: #fff; background: var(--cat, var(--muted)); padding: 5px 9px 4px; border-radius: 6px; white-space: nowrap; justify-self: start; }
.qnum { font-family: var(--f-mono); font-size: 12px; color: var(--muted); justify-self: end; }
.qtext { grid-column: 1 / -1; font-size: clamp(17px, 2.4vw, 21px); font-weight: 600; margin: 2px 0 0; text-wrap: balance; }

.board { position: relative; background: #000; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
#map { width: 100%; height: clamp(320px, 52vw, 560px); }
#map .maplibregl-canvas { cursor: crosshair; }
.map-error { margin: 0; padding: 40px 20px; text-align: center; color: var(--muted); }
.maplibregl-ctrl-attrib { font-size: 11px; }
/* Pins are HTML markers on the map: the guess is an ink dot, the answer a pulsing dot in the category colour. */
.pin { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.5); }
.pin-guess { background: #16202b; cursor: grab; }
.pin-answer { width: 16px; height: 16px; background: var(--pin); position: relative; }
.pin-answer::after { content: ""; position: absolute; inset: -2.5px; border-radius: 50%; border: 2px solid var(--pin); animation: pulse 1.6s ease-out infinite; }
.pin-answer.still::after { animation: none; opacity: 0; }
@keyframes pulse { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
.zoom { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; z-index: 3; }
.zoom button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--ink); font: 600 18px/1 var(--f-body); cursor: pointer; box-shadow: var(--shadow); }
.hint { z-index: 3; position: absolute; left: 10px; top: 10px; font-size: 12px; background: rgba(0,0,0,.55); color: #fff; padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,.2); pointer-events: none; }

.bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 48px; }
/* The answer pop-up: a card that rises over the bottom of the map after each tap. */
.reveal { position: absolute; left: 50%; bottom: 14px; z-index: 4; width: min(440px, calc(100% - 24px)); background: var(--panel); color: var(--ink); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.45); padding: 16px 18px 18px; display: grid; gap: 10px; border-top: 6px solid var(--cat, var(--ink));
  opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 24px) scale(.96); transition: opacity .25s ease, transform .35s cubic-bezier(.2,1.4,.4,1), visibility 0s .35s; }
.reveal:empty { display: none; }
.reveal.show { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0) scale(1); transition: opacity .25s ease, transform .35s cubic-bezier(.2,1.4,.4,1); }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pop-answer { margin: 0; font-size: 22px; line-height: 1.15; text-wrap: balance; }
.pop-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-block: 8px; border-block: 1px solid var(--border); }
.pop-stats .v { font-size: 18px; }
.pop-stats .pts { color: var(--cat); font-size: 24px; }
.pop-need { margin: 0; font-size: 13px; color: var(--muted); }
.reveal .fact { margin: 0; color: var(--muted); font-size: 14px; }
.result { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; flex: 1 1 320px; }
.stat { display: grid; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.stat .v { font-family: var(--f-mono); font-weight: 600; font-size: 20px; font-variant-numeric: tabular-nums; }
.verdict { font-family: var(--f-display); font-size: 13px; padding: 6px 10px 5px; border-radius: 6px; letter-spacing: .03em; }
.verdict.win { background: var(--cat); color: #fff; }
.verdict.miss { color: var(--muted); border: 1.5px dashed var(--border); }
.fact { flex-basis: 100%; color: var(--muted); margin: 0; max-width: 70ch; }
.fact b { color: var(--ink); }
.waiting { color: var(--muted); }
.err { color: var(--bad); font-weight: 600; }

/* ---------- overlays ---------- */
.overlay { z-index: 5; position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(3px); }
.sheet { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; width: min(540px, 100%); display: grid; gap: 14px; max-height: 100%; overflow: auto; }
.sheet h2 { font-family: var(--f-display); font-weight: 400; font-size: 22px; margin: 0; line-height: 1.1; text-wrap: balance; }
.sheet p { margin: 0; }
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.cat-row { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.ring-dot { border: 2px solid var(--cat); }
.rules { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); }
.rules b { color: var(--ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.end-head { display: flex; gap: 16px; align-items: center; }
.big-pie { width: 88px; height: 88px; }
.big { font-family: var(--f-mono); font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.sub { color: var(--muted); font-size: 13px; }
table.recap { width: 100%; border-collapse: collapse; font-size: 14px; }
.recap td { padding: 7px 4px; border-top: 1px solid var(--border); vertical-align: middle; }
.recap td.num { font-family: var(--f-mono); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recap .ans { font-weight: 600; }
.statsrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.statsrow .v { font-family: var(--f-mono); font-size: 20px; font-weight: 600; }
.statsrow .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.dev-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1.5px dashed var(--border); border-radius: 10px; font-size: 13px; color: var(--muted); }
.toast {font-size: 13px; color: var(--good); min-height: 1em; }
pre.share { margin: 0; font: 13px/1.4 var(--f-mono); background: var(--bg); padding: 10px; border-radius: 8px; white-space: pre-wrap; user-select: all; }

/* ---------- content pages (sign-in, Pro, account) ---------- */
.page { max-width: 1040px; width: 100%; margin: 0 auto; padding-inline: 16px; padding-block: 24px 16px; display: grid; gap: 20px; }
.page h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 5vw, 40px); line-height: 1.05; margin: 0; text-wrap: balance; }
.lead { font-size: 17px; color: var(--muted); margin: 0; max-width: 60ch; }
.card { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.card h2 { margin: 0; font-size: 18px; }
.narrow { max-width: 460px; width: 100%; margin-inline: auto; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.form input { font: 16px var(--f-body); padding: 11px 12px; border-radius: 9px; border: 1.5px solid var(--border); background: var(--bg); color: var(--ink); width: 100%; }
.form input:focus { outline: none; border-color: var(--c-geo); }
.form small { font-weight: 400; color: var(--muted); }
.tabs { display: flex; gap: 6px; }
.tabs a { text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 8px; color: var(--muted); border: 1.5px solid transparent; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--border); background: var(--bg); }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--bg); border-left: 4px solid var(--c-geo); }
.notice.bad { border-left-color: var(--bad); }
.notice.good { border-left-color: var(--good); }
.notice p { margin: 0; }
.fine { font-size: 13px; color: var(--muted); margin: 0; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plan { position: relative; }
.plan.featured { outline: 2.5px solid var(--ink); }
.plan .price { font-family: var(--f-mono); font-size: 34px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.plan .per { font-size: 14px; color: var(--muted); font-family: var(--f-body); font-weight: 500; }
.plan .tag { position: absolute; top: -11px; right: 16px; font-family: var(--f-display); font-size: 11px; background: var(--c-sci); color: #fff; padding: 4px 8px 3px; border-radius: 5px; }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 10px 8px; border-top: 1px solid var(--border); text-align: left; }
.compare th:not(:first-child), .compare td:not(:first-child) { text-align: center; width: 90px; }
.compare thead th { border-top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.yes { color: var(--good); font-weight: 700; }
.no { color: var(--muted); }
.table-scroll { overflow-x: auto; }
.cat-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-strip > span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 9px; border-radius: 999px; background: var(--bg); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.history td.num { font-family: var(--f-mono); text-align: right; font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* ---------- question clock ---------- */
.clock { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.clock-track { flex: 1; height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.clock-bar { display: block; height: 100%; width: 100%; background: var(--cat, var(--ink)); border-radius: 999px; transition: width .1s linear; }
.clock-secs { font-family: var(--f-mono); font-weight: 600; font-size: 18px; min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }
.clock.low .clock-bar { background: var(--bad); }
.clock.low .clock-secs { color: var(--bad); }

/* ---------- prize league ---------- */
.site-nav a.nav-league { color: var(--good); }
.league-panel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px; border-radius: 10px; border: 2px solid var(--good); font-size: 14px; }
.league-panel span { flex: 1 1 220px; color: var(--muted); }
.league-panel a { font-weight: 700; color: var(--good); }
.prize-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.prize { display: grid; gap: 4px; padding: 16px; border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); border-top: 6px solid var(--medal, var(--border)); }
.prize-1 { --medal: #e2ac0b; } .prize-2 { --medal: #a9b4bf; } .prize-3 { --medal: #c27c3e; }
.prize-place { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.prize-amount { font-family: var(--f-mono); font-size: 30px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.prize-clock .prize-amount { font-size: 22px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.form .check input { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.legal .prose { max-width: 75ch; }
.prose h2 { font-size: 17px; margin: 10px 0 0; }
.prose p { margin: 0; }

/* ---------- wedge collection and badges ---------- */
.sub-pts { display: block; font-size: 11px; color: var(--muted); font-family: var(--f-body); }
.collection { display: grid; gap: 8px; padding: 12px; border-radius: 10px; background: var(--bg); }
.collection.teaser { gap: 4px; border: 1.5px dashed var(--border); background: transparent; }
.col-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.col-cell { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 8px; background: var(--panel); font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.col-wedge { width: 18px; height: 18px; background: var(--cat); clip-path: polygon(50% 100%, 0 0, 100% 0); border-radius: 2px; }
.col-new { position: absolute; top: -7px; right: -4px; font: 700 11px/1 var(--f-body); background: var(--cat); color: #fff; padding: 3px 5px; border-radius: 999px; }
.col-name { font: 600 11px/1.2 var(--f-body); color: var(--muted); text-align: center; }
.col-grid.big .col-cell { padding: 12px 6px; background: var(--bg); }
.col-grid.big b { font-size: 22px; }
.badges-new { list-style: none; margin: 0; padding: 10px; display: grid; gap: 6px; border-radius: 8px; background: var(--panel); border: 2px solid var(--c-his); }
.badges-title { font-family: var(--f-display); font-size: 13px; color: var(--c-his); }
.badge-new { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.badge-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.badge-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; background: var(--bg); min-width: 0; }
.badge-list li.locked .medal { filter: grayscale(1); opacity: .35; }
.badge-text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.medal { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--cat, var(--c-his)); background: var(--medal, #f2c94c); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.medal::after { content: "★"; color: #fff; font-size: 15px; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.medal.bronze { --medal: #c27c3e; }
.medal.silver { --medal: #a9b4bf; }
.medal.gold { --medal: #e2ac0b; }
.medal.star { --medal: var(--c-geo); --cat: var(--c-geo); }
.progress { display: block; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--cat, var(--c-geo)); }

/* ---------- stats (Pro) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 4px; padding: 16px; border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.tile .k, .strength .k { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.tile .v { font-family: var(--f-mono); font-size: 26px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.strengths { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.strength { display: grid; gap: 4px; padding: 16px; border-radius: 14px; background: var(--panel); border-left: 6px solid var(--cat); box-shadow: var(--shadow); }
.strength b { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.dot { background: var(--cat, currentColor); }
.cat-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.cat-table th, .cat-table td { padding: 10px 8px; border-top: 1px solid var(--border); text-align: left; vertical-align: middle; }
.cat-table thead th { border-top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cat-table th[scope="row"] { font-weight: 600; white-space: nowrap; }
.cat-table th[scope="row"] .dot { margin-right: 8px; vertical-align: -1px; }
.cat-table .num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar { display: inline-block; width: 120px; height: 10px; border-radius: 4px; background: var(--bg); vertical-align: middle; overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--ink); opacity: .75; border-radius: 0 4px 4px 0; }
.hbar-v { font-family: var(--f-mono); margin-left: 8px; font-variant-numeric: tabular-nums; }
.trend { position: relative; }
.trend svg { display: block; overflow: visible; }
.trend .grid { stroke: var(--border); stroke-width: 1; }
.trend .tick { fill: var(--muted); font: 11px var(--f-mono); }
.trend-line { fill: none; stroke: var(--c-geo); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend-end, .trend-dot { fill: var(--c-geo); stroke: var(--panel); stroke-width: 2; }
.trend .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: absolute; top: 4px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 6px 9px; border-radius: 8px; font-size: 13px; pointer-events: none; display: grid; white-space: nowrap; }
.map-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.map-filters .mode[aria-pressed="false"] { opacity: .45; }
.map-filters .mode[aria-pressed="false"] .dot { background: transparent; border: 2px solid var(--cat); }
.lines-toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-left: 6px; }
.stats-map { height: clamp(320px, 55vw, 520px); border-radius: 14px; overflow: hidden; background: #000; }
.map-pop { display: grid; gap: 4px; font: 13px/1.4 var(--f-body); color: #16202b; }
.map-pop p { margin: 0; }

/* ---------- groups ---------- */
.group-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.group-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px; border-radius: 10px; background: var(--bg); }
.group-list a { text-decoration: none; }
.invite { display: flex; gap: 8px; flex-wrap: wrap; }
.invite input { flex: 1 1 220px; min-width: 0; font: 14px var(--f-mono); padding: 11px 12px; border-radius: 9px; border: 1.5px solid var(--border); background: var(--bg); color: var(--ink); }
.code { font-family: var(--f-mono); letter-spacing: .12em; }
.form select { font: 16px var(--f-body); padding: 10px 12px; border-radius: 9px; border: 1.5px solid var(--border); background: var(--bg); color: var(--ink); }
.danger summary { cursor: pointer; color: var(--bad); font-weight: 600; font-size: 14px; }
.danger .form { margin-top: 10px; }

/* ---------- archive, ads, small helpers ---------- */
.btn.small { padding: 8px 12px; font-size: 13px; }
.archive-table td { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
a.mode { text-decoration: none; }
.ad-slot { display: grid; gap: 4px; justify-items: center; padding-block: 8px; min-width: 0; overflow: hidden; }
.ad-label { font-size: 11px; color: var(--muted); }
.ad-label a { color: var(--muted); }
.ad-placeholder { width: min(728px, 100%); height: 90px; display: grid; place-items: center; border: 1.5px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: 13px; }

/* ---------- leaderboard ---------- */
.board-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.board-table th, .board-table td { padding: 9px 8px; border-top: 1px solid var(--border); text-align: left; }
.board-table thead th { border-top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.board-table .num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.board-table .rank { width: 3.5em; font-family: var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.board-table tr.me td { background: color-mix(in srgb, var(--c-geo) 12%, transparent); font-weight: 600; }
.board-table.compact td { padding: 6px; font-size: 14px; }
.you { font-family: var(--f-display); font-size: 10px; background: var(--c-geo); color: #fff; padding: 2px 5px 1px; border-radius: 4px; vertical-align: 1px; }
.mini-board { display: grid; gap: 6px; padding: 12px; border-radius: 10px; background: var(--bg); }
.mini-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.mini-head a { font-size: 13px; color: var(--muted); }

@media (max-width: 560px) {
  #map { height: 62vh; min-height: 300px; }
  .stat .v { font-size: 17px; }
  .bar .btn, .actions .btn { flex: 1; }
  .statsrow .v { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } * { transition: none !important; scroll-behavior: auto !important; } }
