/* Geopard – light, flat and calm: one accent (amber), plain surfaces, regular text weight; green / red only
   mean right / wrong. Everything is driven by the tokens below. Stage sizes are video pixels (1080 x 1920);
   the pages are normal responsive pages with the same tokens. */
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(fonts/Poppins-Bold.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(fonts/Poppins-Regular.woff2) format("woff2"); }

/* Two token sets, no inversion: dark is the default, light via <html data-theme="light"> (settings). Colours, font
   and radii come from packages/design/tokens.json (shared with the videos): never write a colour here.
   Maps get their own colours per mode: land clearly apart from the background, borders apart from the land. */
/* <tokens> GENERATED from packages/design/tokens.json by scripts/design-tokens.mjs – edit the tokens, not this block. */
:root {
  --bg: #0F1424;
  --surface: #1A2238;
  --field: #1A2238;
  --raised: #232C46;
  --text: #EEF1F8;
  --dark: #0F1424;
  --muted: #9AA5C0;
  --accent: #F2A516;
  --good: #2BC48A;
  --bad: #F0616A;
  --land: #2B3860;
  --border: #5A6B96;
  --glow: #0F1424;
  --c3: #5AB8FF;
  --c4: #B98CFF;
  --sunken: #141B2E;
  --line: #2A3450;
  --line-strong: #3B4768;
  --glass: rgba(255, 255, 255, .06);
  --accent-hover: #FFB82E;
  --accent-ink: #F7BE4F;
  --accent-soft: rgba(242, 165, 22, .16);
  --on-accent: #141A2E;
  --on-accent-soft: rgba(20, 26, 46, .12);
  --good-ink: #6EE0B4;
  --good-soft: rgba(43, 196, 138, .16);
  --bad-ink: #FF9AA0;
  --bad-soft: rgba(240, 97, 106, .16);
  --info-bg: rgba(110, 168, 255, .12);
  --info-line: rgba(110, 168, 255, .35);
  --info-ink: #BFD8FF;
  --route-under: #0F1424;
  --chrome: rgba(15, 20, 36, .9);
  --scrim: rgba(20, 26, 46, .55);
  --skel-hi: #222B44;
  --backdrop: rgba(5, 8, 16, .6);
  --shade: rgba(0, 0, 0, .35);
  --disabled: #5D6886;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .22);
  --shadow-up: 0 12px 40px rgba(0, 0, 0, .5);
  --start-a: #161E36;
  --start-b: #0B1020;
  --hero-bg: #1A2238;
  --hero-text: #EEF1F8;
  --hero-line: #2E3A5C;
  --hero-btn: rgba(255, 255, 255, .06);
  --globe-sea: #141C33;
  --globe-0: #2B3860;
  --globe-1: #36487A;
  --globe-2: #425696;
  --globe-3: #7A6236;
  --globe-rim: #2E3A5C;
  --trophy: #F5B700;
  --trophy-soft: rgba(245, 183, 0, .12);
  --trophy-line: rgba(245, 183, 0, .35);
  --medal-2: #D7DCE6;
  --medal-3: #EBC39E;
  --fade: 15, 20, 36;
  --font: Poppins, "Helvetica Neue", Helvetica, Arial, "Segoe UI", "DejaVu Sans", sans-serif;
  --r-card: 16px;
  --r-btn: 14px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --field: #FFFFFF;
  --raised: #EDF0F5;
  --text: #141A2E;
  --dark: #141A2E;
  --muted: #5E6782;
  --accent: #F2A516;
  --good: #1FA971;
  --bad: #E5484D;
  --land: #C3CEE3;
  --border: #7D8BAA;
  --glow: #F4F6FA;
  --c3: #3B82F6;
  --c4: #8B5CF6;
  --sunken: #EDF0F5;
  --line: #E2E5EE;
  --line-strong: #C9CFDC;
  --glass: rgba(20, 26, 46, .06);
  --accent-hover: #E59A0C;
  --accent-ink: #8F5D00;
  --accent-soft: #FDF1D8;
  --on-accent: #141A2E;
  --on-accent-soft: rgba(20, 26, 46, .12);
  --good-ink: #0C6B47;
  --good-soft: #E3F6EE;
  --bad-ink: #A3262B;
  --bad-soft: #FCE7E8;
  --info-bg: #E8F2FD;
  --info-line: #BBD7F5;
  --info-ink: #1E4E7E;
  --route-under: #FFFFFF;
  --chrome: rgba(255, 255, 255, .92);
  --scrim: rgba(20, 26, 46, .55);
  --skel-hi: #F7F8FB;
  --backdrop: rgba(20, 26, 46, .35);
  --shade: rgba(20, 26, 46, .12);
  --disabled: #A3A9B8;
  --shadow: 0 1px 2px rgba(20, 26, 46, .05), 0 6px 20px rgba(20, 26, 46, .06);
  --shadow-up: 0 12px 40px rgba(20, 26, 46, .16);
  --start-a: #EEF2F9;
  --start-b: #FFFFFF;
  --hero-bg: #141A2E;
  --hero-text: #F4F6FA;
  --hero-line: #141A2E;
  --hero-btn: rgba(255, 255, 255, .08);
  --globe-sea: #E6ECF6;
  --globe-0: #C3CEE3;
  --globe-1: #AEBCD8;
  --globe-2: #98AACC;
  --globe-3: #E8C98C;
  --globe-rim: #C9D2E3;
  --trophy: #F5B700;
  --trophy-soft: rgba(245, 183, 0, .12);
  --trophy-line: rgba(245, 183, 0, .35);
  --medal-2: #D7DCE6;
  --medal-3: #EBC39E;
  --fade: 244, 246, 250;
  color-scheme: light;
}
/* </tokens> */
:root {
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); touch-action: manipulation; }
body {
  font-family: var(--font); font-weight: 400;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  min-height: 100vh; min-height: 100dvh;
}
body.playing { overflow: hidden; }
/* an app, not a document: no text selection and no iOS long-press callout (copy / look up / link preview) –
   except where people type or copy on purpose */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable], .selectable { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg { -webkit-user-drag: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, b, strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------- shared pills (tags only) */
.pill {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  font-weight: 700; line-height: 1; white-space: nowrap; color: var(--dark); background: var(--surface);
}

/* ================================================================ HOME */
.home { max-width: 560px; margin: 0 auto;
  padding: calc(14px + var(--safe-t)) max(16px, var(--safe-r)) 40px max(16px, var(--safe-l)); }
.home .pill { font-size: 12px; padding: 6px 11px; letter-spacing: .02em; }
.home .pill.small { font-size: 11px; padding: 5px 10px; }
.home .pill.glass { background: var(--sunken); color: var(--muted); }
.home .pill.good { background: var(--good-soft); color: var(--good-ink); }
.home .pill.bad { background: var(--bad-soft); color: var(--bad-ink); }
.home .pill.yellow { background: var(--accent-soft); color: var(--accent-ink); }
.home .pill.big { font-size: 28px; padding: 10px 20px; }
.btnpill { border: 0; cursor: pointer; }
/* top: brand in the middle, avatar right; the safe-area padding of .home keeps both clear of the notch */
.topbar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; justify-content: center; margin: 4px 0; font-size: 0; }
.home .brand .pill { font-size: clamp(24px, 7.5vw, 34px); padding: .28em .7em; letter-spacing: .06em; text-decoration: none;
  background: var(--accent); color: var(--dark); }
.arrow { position: relative; display: inline-block; width: 30px; height: 4px; background: var(--text); border-radius: 4px; flex: none; }
.arrow::before, .arrow::after {
  content: ""; position: absolute; right: -1px; top: 0; width: 50%; height: 100%; background: var(--text);
  border-radius: 4px; transform-origin: right center;
}
.arrow::before { transform: rotate(40deg); }
.arrow::after { transform: rotate(-40deg); }
.tagline { text-align: center; color: var(--muted); margin: 8px 0 22px; font-size: 15px; }
.home h2 { font-size: 20px; margin: 8px 0 2px; }
.muted { color: var(--muted); margin: 2px 0 10px; font-size: 14px; }
.muted.small { font-size: 13px; margin-top: 12px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px;
  box-shadow: var(--shadow);
}
.cardhead { display: flex; gap: 8px; align-items: center; }
.levels { display: flex; gap: 8px; margin: 14px 0 16px; }
.lvl {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; font-weight: 700;
  color: var(--dark); background: var(--good-soft);
}
.lvl.accent { background: var(--accent-soft); }
.lvl.bad { background: var(--bad-soft); }
.lvl.rim { box-shadow: 0 0 0 2px var(--bad) inset; }
.lvl.ok, .lvl.no { position: relative; }
.lvl.ok::after, .lvl.no::after {
  position: absolute; right: -5px; bottom: -5px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; border: 2px solid var(--surface); color: #fff;
}
.lvl.ok::after { content: "✓"; background: var(--good); }
.lvl.no::after { content: "✕"; background: var(--bad); }
/* one button shape: primary = amber, secondary (ghost) = white with a line */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; cursor: pointer;
  border-radius: var(--r-btn); padding: 13px 22px; font-size: 16px; font-weight: 700; text-decoration: none; text-align: center;
  transition: transform .15s, background-color .15s, border-color .15s;
}
.btn:active { transform: scale(.98); }
.btn.yellow { background: var(--accent); color: var(--dark); }
.btn.yellow:hover { background: var(--accent-hover); }
.btn.wide { width: 100%; font-size: 17px; padding: 15px; }
.result { display: flex; align-items: center; gap: 12px; }
.endless { margin-top: 30px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tilecard {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 108px;
  padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); text-decoration: none;
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.tilecard:hover { border-color: var(--line-strong); }
.tilecard:active { transform: scale(.98); }
.tilecard .ttitle { font-size: 14.5px; line-height: 1.25; font-weight: 700; }
/* preview: the real game (scripts/thumbs.mjs), full tile width, 4:3 – grey box while it loads */
.tilecard .thumb { display: block; width: calc(100% + 24px); height: auto; aspect-ratio: 4 / 3; margin: -12px -12px 2px; object-fit: cover;
  border-radius: var(--r-card) var(--r-card) 0 0; background: var(--sunken); border-bottom: 1px solid var(--line); }
.tilecard .pill.small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tilecard .best { margin-top: auto; font-size: 12px; color: var(--accent-ink); font-weight: 700; }
.videos { margin-top: 30px; }
.links { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.social { background: var(--surface); border-color: var(--line); color: var(--text); flex: 1; min-width: 140px; }
.btn.social svg { width: 22px; height: 22px; fill: currentColor; }
footer { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; font-size: 13px; }
footer a { color: var(--muted); }
footer .credits { width: 100%; color: var(--muted); font-size: 12px; margin: 0; }
.boot-error { max-width: 420px; margin: 30vh auto 0; text-align: center; padding: 16px; display: grid; gap: 18px; }
@keyframes pop { from { transform: scale(0); } }
@keyframes fade { from { opacity: 0; } }

/* ---------------------------------------------------------------- loading: boot screen, spinner, skeletons */
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: var(--bg); z-index: 90; }
.boot > * { animation: fade .2s .35s both; }        /* only visible when loading takes a while */
.boot .pill { font-size: 30px; padding: 10px 22px; letter-spacing: .06em; background: var(--accent); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { display: grid; gap: 8px; }
.skel i { display: block; height: 46px; border-radius: 12px; background: linear-gradient(90deg, var(--sunken) 0, var(--skel-hi) 50%, var(--sunken) 100%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skel i.short { width: 55%; height: 18px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ================================================================ STAGE (video pixels) */
/* the stage stays inside the safe area (notch, Dynamic Island, home indicator) */
.playbox { position: fixed; inset: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l); }
.viewport { overflow: hidden; background: var(--bg); }
.frame { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; transform-origin: 0 0; }
/* phones (taller than 9:16): the map runs into the bands above and below the stage;
   wide screens: the stage is a rounded card in the middle */
.stage { position: absolute; inset: 0; clip-path: inset(-1500px 0 -1500px 0); }
@media (min-aspect-ratio: 10/16) {
  .stage { clip-path: inset(0 round 56px); }
  .frame::after { content: ""; position: absolute; inset: 0; border-radius: 56px; pointer-events: none;
    box-shadow: 0 0 0 2px var(--line), 0 30px 90px var(--shade); }
}
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer.map { transform-origin: 540px 800px; }
.layer.gradTop {
  top: -1500px; bottom: auto; height: 2020px;
  background: linear-gradient(to bottom, var(--bg) 0, var(--bg) 1400px, rgba(var(--fade), .96) 1500px, rgba(var(--fade), .86) 1786px, rgba(var(--fade), 0) 2020px);
}
.layer.gradBottom {
  top: 1130px; bottom: -1500px;
  background: linear-gradient(to bottom, rgba(var(--fade), 0) 0, rgba(var(--fade), .85) 237px, rgba(var(--fade), .97) 790px, var(--bg) 900px);
}
.stage button, .stage .choice { pointer-events: auto; cursor: pointer; }
.stage.locked .choice, .stage.locked .field { pointer-events: none; cursor: default; }

.row { position: absolute; left: 540px; display: flex; align-items: center; transform: translate(-50%, -50%); white-space: nowrap; }
.row.head { gap: 14px; }
.row.scores { gap: 22px; }
.stage .pill { box-shadow: inset 0 0 0 3px var(--glass); }
.word { color: var(--text); line-height: 1; font-weight: 700; }
.row .arrow { height: 8px; }
.row .arrow::before, .row .arrow::after { width: 40%; }
.status, .verdict, .bigtext, .sub, .message, .cta, .pill.abs {
  position: absolute; left: 540px; transform: translate(-50%, -50%); white-space: nowrap; line-height: 1;
}
.status { top: 416px; color: var(--text); font-size: 46px; font-weight: 700; text-align: center; }
/* a white underlay keeps the verdict readable over a coloured country */
.verdict { font-size: 58px; font-weight: 700; background: var(--surface); padding: 18px 34px; border-radius: 40px;
  box-shadow: 0 6px 24px var(--shade); }
.bigtext { font-size: 62px; font-weight: 700; }
.sub { font-size: 36px; color: var(--muted); }
.message { width: 900px; white-space: normal; text-align: center; font-size: 44px; line-height: 1.3; }
.cta { border: 0; border-radius: 40px; font-size: 50px; padding: 34px 100px; min-width: 460px; font-weight: 700; }
.cta:active { filter: brightness(.95); }
.cta:focus:not(:focus-visible) { outline: none; }
/* end screens: wide pair in thumb reach – primary (amber) above, "Home" (white, outlined) below */
.cta.wide { min-width: 0; width: 820px; padding: 38px 40px; font-size: 52px; }
.cta.second { background: var(--surface) !important; box-shadow: inset 0 0 0 4px var(--line-strong); }

/* answer fields (STYLEGUIDE §5) */
.field {
  position: absolute; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0;
  background: var(--surface); border: 3px solid var(--line-strong); border-radius: 30px; color: var(--text);
  font-size: 54px; font-weight: 700; line-height: 1; text-align: center; box-shadow: 0 4px 0 var(--line);
  transition: opacity .3s, background-color .3s, box-shadow .2s, border-color .2s;
}
.field span { display: inline-block; white-space: nowrap; }
.field .q { font-size: 64px; color: var(--muted); }
.field.probe { visibility: hidden; left: 0; top: 0; width: auto; border: 0; white-space: nowrap; }
.field:disabled { cursor: default; }
.choice { transition: transform .12s, border-color .2s, box-shadow .2s, opacity .3s; }
@media (hover: hover) { .stage:not(.locked) .choice:hover { border-color: var(--accent); } }
.stage:not(.locked) .field.choice:active, .stage:not(.locked) .tile.choice:active { transform: scale(.97); }
.stage:not(.locked) .maplabel.choice:active { filter: brightness(.92); }
.picked:not(.open) { box-shadow: 0 0 0 6px var(--text); }

/* tiles */
.tile {
  position: absolute; padding: 0; margin: 0; background: var(--surface); border: 3px solid var(--line-strong);
  border-radius: 30px; overflow: hidden; color: var(--text);
}
.tile .letter { position: absolute; left: 12px; top: 12px; z-index: 2; background: var(--sunken) !important; }
.tile .letter.center { left: 50%; top: 18px; transform: translateX(-50%); }
.tile .body { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .3s; }
.tile.duel .body { top: 84px; left: 20px; right: 20px; bottom: 20px; }
.tile .body.col { flex-direction: column; gap: 14px; }
.tile .note { position: absolute; left: 50%; bottom: 12px; z-index: 3; transform: translateX(-50%); max-width: calc(100% - 20px); }
.flag { display: block; height: auto; border-radius: 4px; box-shadow: 0 0 0 2px var(--shade); }
.tname { font-size: 30px; line-height: 1.1; text-align: center; font-weight: 700; }
.shape { display: block; overflow: visible; }
.tile .shape.overlay { position: absolute; }
.freetext { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; line-height: 1; font-weight: 700; }
.city .cname { font-size: 50px; line-height: 1.05; text-align: center; margin-top: 16px; white-space: nowrap; font-weight: 700; }
.city .cland { font-size: 30px; color: var(--muted); text-align: center; line-height: 1.1; }
.hl .flags { position: absolute; top: 0; left: 0; right: 0; height: 130px; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: center; }
.hl .flags.n1 .flag { width: 220px; max-height: 130px; object-fit: contain; }
.hl .flags.n2 .flag { width: 120px; }
.hl .flags.n3 .flag, .hl .flags.n4 .flag { width: 86px; }
.hl .hlname { position: absolute; top: 165px; left: 0; right: 0; transform: translateY(-50%); font-size: 40px; line-height: 1.08; text-align: center; font-weight: 700; }
.hl .hlq { position: absolute; top: 310px; left: 0; right: 0; transform: translateY(-50%); font-size: 112px; color: var(--line-strong); text-align: center; line-height: 1; font-weight: 700; }
.hl .bar { position: absolute; bottom: 62px; left: 50%; width: 110px; height: 0; transform: translateX(-50%); border-radius: 6px 6px 0 0; }
.hl .hlval { position: absolute; bottom: 14px; left: 0; right: 0; font-size: 38px; text-align: center; line-height: 1; font-weight: 700; }

/* map */
.mapview { position: absolute; inset: 0; }
.mapview svg { position: absolute; left: 0; top: 0; overflow: visible; }
.mapview.edged { -webkit-mask-image: linear-gradient(to bottom, transparent 516px, #000 576px, #000 1024px, transparent 1084px);
  mask-image: linear-gradient(to bottom, transparent 516px, #000 576px, #000 1024px, transparent 1084px); }
path.land { fill: var(--land); stroke: var(--border); stroke-width: 1.8; stroke-linejoin: round;
  transition: fill .6s, fill-opacity .6s, stroke .6s; }
path.marked { stroke: var(--text); stroke-width: 2.5; stroke-opacity: .7; }
.route { fill: none; stroke: var(--text); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.route.under { stroke: var(--route-under) !important; stroke-width: 13; stroke-opacity: .9; }
.lat .route { stroke-width: 5; }
.lat .route.under { stroke-width: 9; stroke-opacity: .7; }
.mring.thick { stroke-width: 6; }
.labels { position: absolute; inset: 0; }
.maplabel {
  position: absolute; transform: translate(-50%, -50%); border-radius: 999px; padding: 11px 20px;
  font-size: 32px; font-weight: 700; line-height: 1; white-space: nowrap; z-index: 2; transition: opacity .3s, background-color .3s;
  box-shadow: 0 0 0 2px var(--glass), 0 4px 12px var(--shade);
}
.maplabel.big { font-size: 34px; padding: 12px 22px; }
.maplabel.small { font-size: 28px; padding: 9px 16px; }
.maplabel.pick { pointer-events: auto; cursor: pointer; }
.qmark { position: absolute; transform: translate(-50%, -50%); color: var(--accent); line-height: 1; font-weight: 700; }

/* ranking rows */
.rows { position: absolute; inset: 0; }
.rankrow {
  position: absolute; left: 130px; width: 800px; height: 96px; display: flex; align-items: center; padding-right: 26px;
  background: var(--surface); border: 3px solid var(--line-strong); border-radius: 30px; color: var(--text); font-weight: 700;
}
.rankrow .rk { width: 100px; text-align: center; font-size: 44px; flex: none; }
.rankrow .flag { width: 72px; flex: none; margin-left: 4px; }
.rankrow .rn { margin: 0 auto 0 24px; display: inline-block; white-space: nowrap; line-height: 1; }
.rankrow .rv { font-size: 34px; color: var(--muted); white-space: nowrap; font-weight: 400; }
.rankrow.first { background: var(--accent); border-color: var(--accent); color: var(--dark); }
.rankrow.first .rv { color: var(--dark); }

/* countdown ring */
.ring { position: absolute; left: 540px; width: 160px; height: 160px; transform: translate(-50%, -50%); }
.ring svg { position: absolute; inset: 0; }
.count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 72px; line-height: 1; font-weight: 700; color: var(--text); }

/* top bar of the stage (not in the videos) */
/* three columns: close | progress / score (always centred) | flag + sound – the sides may differ in width */
.nav { position: absolute; left: 0; top: 30px; width: 1080px; height: 110px; padding: 0 44px; display: grid;
  grid-template-columns: 1fr auto 1fr; align-items: center; z-index: 5; pointer-events: none; }
.nav > :first-child { justify-self: start; }
.nav > .navright { justify-self: end; }
.navbtn { pointer-events: auto; width: 104px; height: 104px; border-radius: 50%; border: 3px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; }
.navbtn svg { width: 50px; height: 50px; fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.navbtn svg .f { fill: var(--text); stroke: none; }
.navbtn.active { background: var(--accent-soft); border-color: var(--accent); }
.navmid { display: flex; gap: 16px; align-items: center; }
.pdot { width: 24px; height: 24px; border-radius: 50%; background: var(--line-strong); transition: background .3s, transform .3s; }
.pdot.now { background: var(--text); transform: scale(1.15); }
.pdot.ok { background: var(--good); }
.pdot.bad { background: var(--bad); }
.navscore { font-size: 46px; font-weight: 700; min-width: 120px; text-align: center; padding: 14px 30px; border-radius: 999px; background: var(--surface); border: 3px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================================================================ PAGES (account, profile, leaderboard …) */
.page { padding-bottom: 60px; }
.pagehead { margin: 0 0 16px; }
.phbar { display: flex; justify-content: flex-end; align-items: center; min-height: 44px; }   /* left: room for the back pill */
.pagehead h1 { font-size: 26px; margin: 12px 0 0; overflow-wrap: anywhere; }
/* back pill on every sub page: fixed top left (aligned with the content column), clear of the notch – like the imprint */
.backpill { position: fixed; z-index: 42; top: calc(14px + var(--safe-t));
  left: max(16px, var(--safe-l), calc(50% - 264px)); display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 18px 0 12px; border-radius: 999px; text-decoration: none; color: var(--text); font-size: 15px; font-weight: 700;
  background: var(--chrome); border: 1px solid var(--line); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color .15s, transform .15s; }
.backpill:hover { background: var(--surface); border-color: var(--line-strong); }
.backpill:active { transform: scale(.96); background: var(--accent-soft); }
.backpill .ico { width: 20px; height: 20px; }
body.playing .backpill { display: none; }

/* avatar button + menu */
.acct { position: relative; justify-self: end; flex: none; }
.avatarbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); padding: 0; cursor: pointer; overflow: hidden;
  display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.avatarbtn:active { transform: scale(.94); }
.avatarbtn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.avatarbtn .avatarsvg, .bigavatar .avatarsvg { display: block; line-height: 0; }
.avatarbtn svg { display: block; width: 100%; height: 100%; }
.acctmenu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-up);
  display: grid; gap: 2px; animation: rise .18s both; }
.acctmenu[hidden] { display: none; }
.accthead { margin: 6px 12px 6px; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acctmenu a, .acctmenu button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  border: 0; background: none; color: var(--text); text-decoration: none; font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.acctmenu a:hover, .acctmenu button:hover, .acctmenu a:focus-visible, .acctmenu button:focus-visible { background: var(--sunken); outline: none; }
.acctmenu .ico { color: var(--accent-ink); }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a.btnpill { text-decoration: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.home section + section, .home .card + section, .home section + .card { margin-top: 24px; }
.home h3 { font-size: 14px; margin: 18px 0 8px; color: var(--muted); }
.tilecard.mixed { flex-direction: row; align-items: center; min-height: 0; margin-bottom: 10px; }
.mixedicon { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: var(--dark); display: grid; place-items: center; flex: none; }
.mixedtext { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.mixedtext .muted { margin: 0; }
.tilecard.mixed .best { margin: 0; }
.btn.ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn.ghost:hover { border-color: var(--text); }
.btn.danger { background: var(--surface); color: var(--bad); border-color: var(--bad); }
.btn.small { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.installbtn { margin-top: 12px; }
.result .btn { padding: 11px 16px; }
.result { flex-wrap: wrap; }

/* forms */
.form { display: grid; gap: 14px; }
.form h2 { margin: 0; font-size: 18px; }
.field-row { display: grid; gap: 6px; }
.flabel { font-size: 13px; color: var(--muted); }
.fhint { font-size: 12.5px; color: var(--muted); }
input, select, textarea {
  width: 100%; font: 400 16px/1.3 Poppins, sans-serif; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
textarea { resize: vertical; }
.form-msg { color: var(--bad); margin: 0; min-height: 1px; font-size: 14px; }
.form-msg:empty { display: none; }
.alt { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 18px; font-size: 14px; }
.alt a { color: var(--accent-ink); }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; cursor: pointer; }
.switch input { appearance: none; width: 50px; height: 30px; padding: 0; border-radius: 99px; background: var(--line-strong); border: 0;
  position: relative; cursor: pointer; flex: none; transition: background .2s; box-shadow: none; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px var(--shade); transition: transform .2s; }
.switch input:checked { background: var(--good); }
.switch input:checked::after { transform: translateX(20px); }
.radios { display: grid; gap: 8px; }
.radio { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.radio input { width: 20px; height: 20px; accent-color: var(--accent); padding: 0; }
.recovery { display: block; padding: 14px; border-radius: 12px; background: var(--accent-soft); border: 1px dashed var(--accent); color: var(--accent-ink);
  font: 700 18px/1.4 ui-monospace, Menlo, monospace; letter-spacing: 1px; text-align: center; word-break: break-all; -webkit-user-select: all; user-select: all; -webkit-touch-callout: default; }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }

/* modal, toast, consent */
.modal { position: fixed; inset: 0; z-index: 50; background: var(--backdrop); display: grid; place-items: center; padding: 16px;
  animation: fade .2s both; }
.modal-card { width: min(440px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow-up); animation: rise .25s both; }
.modal-card.wide { width: min(720px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--sunken); color: var(--text); font-size: 22px; cursor: pointer; flex: none; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--text); color: var(--bg); border-radius: 12px; padding: 12px 16px; font-size: 14px; text-align: center;
  box-shadow: var(--shadow-up); animation: rise .25s both; transition: opacity .4s, transform .4s; }
.toast.gold { background: var(--accent); color: var(--dark); }
.toast.out { opacity: 0; transform: translateY(10px); }
.consent { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 55;
  width: min(520px, calc(100% - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px;
  box-shadow: var(--shadow-up); font-size: 13.5px; line-height: 1.45; animation: rise .3s both; }
.consent p { margin: 0 0 12px; color: var(--text); }
.consent a { color: var(--accent-ink); }
.consent-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent .btn { padding: 11px; font-size: 15px; }
.consent .btn:not(.yellow) { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
body.playing .consent { display: none; }   /* never over a question; back after the round */

/* leaderboard */
.tabs { display: flex; gap: 4px; background: var(--sunken); padding: 4px; border-radius: 12px; }
.tab { flex: 1; text-align: center; white-space: nowrap; padding: 9px 6px; border-radius: 9px; text-decoration: none; font-size: 13px; color: var(--muted); }
.tab.on { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow); }
.lb { display: grid; gap: 8px; }
.lb h3 { margin: 6px 0 2px; }
.lbl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lbl li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); }
.lbl li.me { background: var(--accent-soft); border-color: var(--accent); }
.lbr { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); font-size: 13px; font-weight: 700; }
.r1 .lbr { background: var(--accent); color: var(--dark); }
.r2 .lbr { background: var(--medal-2); color: var(--dark); }
.r3 .lbr { background: var(--medal-3); color: var(--dark); }
.lbn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbs { font-variant-numeric: tabular-nums; font-weight: 700; }
.lbme { margin: 6px 0 0; color: var(--accent-ink); font-weight: 700; }

/* archive, practice */
.archive { display: grid; gap: 8px; }
.arch { display: grid; grid-template-columns: 60px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.arch.done { opacity: .8; }
.archn { color: var(--accent-ink); font-weight: 700; }
.archd { color: var(--muted); font-size: 14px; }
.archs { display: flex; gap: 4px; }
.archs i { width: 12px; height: 12px; border-radius: 4px; background: var(--good); }
.archs i.no { background: var(--bad); }
.lvpick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lvpick .lvl { width: auto; height: 44px; border: 1px solid transparent; font: 700 13px Poppins, sans-serif; opacity: .6; cursor: pointer; }
.lvpick .lvl.sel { opacity: 1; border-color: var(--text); }

/* profile */
.profilehead { display: flex; align-items: center; gap: 16px; }
.profilehead h2 { margin: 0; }
.profilehead .muted { margin: 2px 0 0; }
.profilehead .btn { margin-left: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.kv { font-size: 22px; font-weight: 700; }
.kl { font-size: 12px; color: var(--muted); }
.acc { display: grid; gap: 8px; margin-top: 14px; }
.accrow { display: grid; grid-template-columns: 112px 1fr 40px 34px; gap: 8px; align-items: center; font-size: 13px; }
.accname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accbar { height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.accfill { display: block; height: 100%; background: var(--good); border-radius: 99px; }
.accpct { text-align: right; font-weight: 700; }
.accn { color: var(--muted); text-align: right; font-size: 11px; }
.cal { display: flex; flex-wrap: wrap; gap: 6px; }
.calday { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; text-decoration: none; font-size: 13px; font-weight: 700; color: var(--dark); background: var(--bad-soft); }
.calday.s3, .calday.s4 { background: var(--accent-soft); }
.calday.s5 { background: var(--good-soft); }
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ach { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 8px; padding: 10px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); opacity: .45; filter: grayscale(1); }
.ach.got { opacity: 1; filter: none; border-color: var(--accent); }
.achicon { grid-row: span 2; font-size: 26px; line-height: 36px; text-align: center; }
.achname { font-size: 13px; font-weight: 700; }
.achdesc { font-size: 11.5px; color: var(--muted); }

/* ================================================================ STAGE additions */
.navright { display: flex; gap: 22px; }
.navbtn.hidden { visibility: hidden; }
.navbtn svg path { fill: none; }
.status.loading { color: var(--muted); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .4; } }
/* loading between questions: a spinner under the status line */
.stagespin { position: absolute; left: 540px; top: 820px; width: 84px; height: 84px; margin-left: -42px; border-radius: 50%;
  border: 9px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.crowd { position: absolute; left: 540px; transform: translate(-50%, -50%); white-space: nowrap; font-size: 30px; color: var(--accent-ink); }
.dist { position: absolute; left: 540px; transform: translateX(-50%); width: 900px; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.distline { font-size: 34px; color: var(--accent-ink); font-weight: 700; text-align: center; line-height: 1.25; white-space: normal; }
.distline.abs { position: absolute; left: 540px; transform: translate(-50%, -50%); width: 900px; }
.bars { display: flex; gap: 22px; align-items: flex-end; height: 200px; }
.barcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; width: 92px; height: 100%; }
.barfill { width: 70px; background: var(--line-strong); border-radius: 10px 10px 4px 4px; }
.barcol.mine .barfill { background: var(--accent); }
.barnum { font-size: 26px; color: var(--muted); }
.barlbl { font-size: 26px; color: var(--muted); }
.barcol.mine .barlbl { color: var(--accent-ink); font-weight: 700; }
html.rm *, html.rm *::before, html.rm *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }

.card.form .btn.wide { font-size: 16px; padding: 13px; }
.captcha:empty { display: none; } .captcha { min-height: 65px; }
.okmsg { color: var(--good); margin: 0; font-weight: 700; }
.fact { position: absolute; left: 540px; transform: translateX(-50%); width: 920px; padding: 18px 26px; border-radius: 30px;
  background: var(--good-soft); border: 3px solid var(--good); font-size: 32px; line-height: 1.3; text-align: center; color: var(--text); }
.fact b { color: var(--good-ink); }
.hardswitch { margin: -4px 0 14px; font-size: 14px; }
.hardswitch small { font-size: 12.5px; }
.linkcard { display: flex; flex-direction: column; gap: 2px; text-decoration: none; margin-top: 24px; }
.linkcard .muted { margin: 0; }
.duelcard { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-top: 14px; }
.duelicon { font-size: 28px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); flex: none; }
.duelicon.big { width: 72px; height: 72px; font-size: 38px; }
.dueltext { display: flex; flex-direction: column; gap: 2px; }
.dueltext .muted { margin: 0; }
.duelhead { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.duelhead h2 { margin: 6px 0 0; }
.cmprow { display: grid; grid-template-columns: 1fr 60px 90px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cmprow.head { color: var(--muted); font-size: 12px; }
.cmprow.head b { text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmpa { text-align: center; font-size: 18px; font-weight: 700; }
.cmpa.ok { color: var(--good); }
.cmpa.no { color: var(--bad); }
.cmpverdict { text-align: center; font-size: 20px; font-weight: 700; margin: 14px 0 0; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.pod b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pod.p1 { background: var(--accent-soft); border-color: var(--accent); }
.podm { font-size: 26px; }
.lbn .member { color: var(--accent-ink); font-size: .8em; }
/* streak freeze + reminder */
.freezenote { margin: 4px 0 10px; padding: 9px 12px; border-radius: 12px; background: var(--info-bg); border: 1px solid var(--info-line); color: var(--info-ink); font-size: 14px; }
.pill.freeze { margin-left: 6px; }
.card.remind { display: grid; gap: 12px; }
.remindrow { display: flex; align-items: center; gap: 12px; }
.remindrow > div { flex: 1; min-width: 0; }
.remindrow p { margin: 2px 0 0; }
.remindrow select { flex: 1; min-width: 0; }
.remindrow .btn { flex: 1; }
.remindset { display: grid; gap: 10px; }
.remindset:empty { display: none; }
/* full-width buttons between cards (settings, duel) never touch them */
.page > .card + .btn, .page > .btn + .card, .page > .btn + .btn, .page > .card + a.btn { margin-top: 14px; }

/* landscape on a phone (touch, low and wide – a portrait phone with the keyboard open stays below 3:2) */
.rotate { display: none; }
@media (orientation: landscape) and (max-height: 520px) and (min-aspect-ratio: 3/2) and (pointer: coarse) {
  .rotate { display: flex; position: fixed; inset: 0; z-index: 100; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; padding: 24px; text-align: center; background: var(--bg); font-size: 20px; }
  .rotate .muted { margin: 0; font-size: 15px; }
  body { overflow: hidden; }
}
.rotateicon { width: 44px; height: 76px; border: 4px solid var(--accent); border-radius: 10px; margin-bottom: 10px; animation: turn 1.8s ease-in-out infinite; }
@keyframes turn { 0%, 30% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0); } }

/* help (FAQ), licences, report/contact forms */
.faq { display: grid; gap: 8px; margin-bottom: 24px; }
.faq details, .lic details { padding: 0; }
.faq summary, .lic summary { cursor: pointer; padding: 14px 16px; min-height: 44px; list-style: none; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.faq summary::-webkit-details-marker, .lic summary::-webkit-details-marker { display: none; }
.faq summary::after, .lic summary::after { content: "+"; margin-left: auto; color: var(--accent-ink); font-size: 20px; line-height: 1; flex: none; }
.faq details[open] summary::after, .lic details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 16px 16px; color: var(--text); line-height: 1.55; font-size: 14.5px; }
.lic { display: grid; gap: 8px; }
.lic summary { flex-wrap: wrap; }
.lic summary .muted { margin: 0; font-size: 13px; font-weight: 400; }
.lic details > p { margin: 0 16px 8px; color: var(--muted); overflow-wrap: anywhere; }
.lic details a { color: var(--accent-ink); }
.lictext { margin: 0 12px 12px; padding: 12px; max-height: 320px; overflow: auto; border-radius: 10px; background: var(--sunken);
  font: 400 12px/1.45 ui-monospace, Menlo, monospace; white-space: pre-wrap; color: var(--text); }
.radio.check { align-items: flex-start; font-size: 14px; line-height: 1.4; }
.radio.check input { margin-top: 2px; flex: none; }
.small { font-size: 13px; }

/* training: continent chips (multi-select) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: 400 14px Poppins, sans-serif; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; }
.chips .chip:active { transform: scale(.96); }
.chips .chip.on { background: var(--accent); border-color: var(--accent); color: var(--dark); font-weight: 700; }
.regions .muted.small { margin: -6px 0 2px; }
option:disabled { color: var(--disabled); }

/* avatar: profile hub, editor, shop */
.bigavatar { width: 96px; height: 96px; border-radius: 50%; background: var(--sunken); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; }
.hub { display: grid; padding: 6px; margin-top: 14px; }
.hubrow { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 12px; border-radius: 12px; text-decoration: none; }
.hubrow:hover, .hubrow:active { background: var(--sunken); }
.hubrow > .ico:first-child { color: var(--accent-ink); width: 24px; height: 24px; }
.hubrow > .ico:last-child { color: var(--line-strong); margin-left: auto; width: 18px; height: 18px; }
.hubtext { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hubtext small { font-size: 12.5px; margin: 0; }
.avatarpreview { display: grid; place-items: center; margin: 0 auto 18px; width: 176px; height: 176px; border-radius: 50%;
  background: var(--sunken); border: 1px solid var(--line); overflow: hidden; }
.avatarslots { display: grid; gap: 14px; }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.part { position: relative; aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--sunken); padding: 0;
  cursor: pointer; display: grid; place-items: center; overflow: hidden; }
.part.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); }
.part.swatch { border-radius: 50%; }
.part.locked { opacity: .45; cursor: not-allowed; }
.part .ico { position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; color: var(--muted); }
.partsvg { line-height: 0; }
.shopgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shopitem { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.shopitem .partsvg { border-radius: 50%; background: var(--sunken); overflow: hidden; }

/* ================================================================ START PAGE (name, three actions, globe) */
/* the start page never scrolls: one screen, the globe may be cut off at the bottom */
.start { height: 100vh; height: 100dvh; overflow: hidden; touch-action: manipulation; }
body.startbg { overflow: hidden; }
body.startbg { background: linear-gradient(180deg, var(--start-a) 0, var(--start-b) 70%) fixed; }
.hero { position: relative; margin-top: 4vh; padding: 26px 20px 20px; border-radius: 24px; background: var(--hero-bg);
  border: 1px solid var(--hero-line); color: var(--hero-text); box-shadow: var(--shadow-up); text-align: center; }
.logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; font-size: clamp(30px, 9vw, 40px);
  letter-spacing: .01em; }
.logo .acct { justify-self: auto; }
.logo .avatarbtn { width: 48px; height: 48px; border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); }
.logo .acctmenu { left: 0; right: auto; text-align: left; font-size: 15px; letter-spacing: 0; }
.herotag { margin: 6px 0 22px; font-size: 14.5px; opacity: .75; }
.heroactions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.herobtn { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 72px; padding: 12px 18px; border-radius: 18px;
  text-decoration: none; text-align: left; background: var(--hero-btn); border: 1px solid rgba(255, 255, 255, .12); color: var(--hero-text);
  transition: transform .15s, background-color .15s; }
.herobtn:active { transform: scale(.98); }
.herobtn:hover { background: rgba(255, 255, 255, .1); }
.herobtn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.herobtn.primary:hover { background: var(--accent-hover); }
.heroicon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); flex: none; }
.herobtn.primary .heroicon { background: var(--on-accent-soft); }
.heroicon .ico { width: 24px; height: 24px; }
.herotext { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.herotext b { font-size: 18px; }
.herotext small { font-size: 13px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.herorow { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 12px; }
.herobtn.trophy { justify-content: center; padding: 0; color: var(--trophy); background: var(--trophy-soft); border-color: var(--trophy-line); }
.herobtn.trophy .ico { width: 34px; height: 34px; }
.herobtn .badge { position: absolute; top: 10px; right: 12px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px;
  background: var(--bad); color: #FFFFFF; font-style: normal; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.globewrap { margin: 26px auto 0; width: min(100%, 440px); aspect-ratio: 1; }
.globe { display: block; width: 100%; height: 100%; }
.globe .sea { fill: var(--globe-sea); }
.globe path { stroke: var(--globe-sea); stroke-width: .8; stroke-linejoin: round; }
.globe .g0 { fill: var(--globe-0); } .globe .g1 { fill: var(--globe-1); } .globe .g2 { fill: var(--globe-2); } .globe .g3 { fill: var(--globe-3); }
.globe .rim { stroke: var(--globe-rim); stroke-width: 2; }

/* friends + groups */
.inline { display: flex; gap: 8px; align-items: center; }
.inline input, .inline select { flex: 1; min-width: 0; }
.inline .btn { flex: none; }
.flist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.frow { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 4px; border-radius: 12px; }
.frow.link { text-decoration: none; padding-right: 8px; }
.frow.link:hover { background: var(--sunken); }
.frow.link > .ico:last-child { margin-left: auto; color: var(--line-strong); width: 18px; height: 18px; }
.frow .btn.small { min-height: 36px; }
.fav { width: 40px; height: 40px; border-radius: 50%; background: var(--sunken); overflow: hidden; display: grid; place-items: center; flex: none; line-height: 0; }
.fav.emoji { font-size: 20px; line-height: 1; }
.fname { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.fname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fname small { font-size: 12.5px; margin: 0; }
.code { letter-spacing: .12em; font-family: ui-monospace, Menlo, monospace; color: var(--accent-ink); }
.gname { display: flex; align-items: center; gap: 8px; }
.gname .fav { width: 28px; height: 28px; }
.tick { color: var(--good); font-weight: 700; }

/* world map (map-tap games): zoomable, markers keep their size, lines don't thicken */
.worldview { position: absolute; overflow: hidden; touch-action: none; pointer-events: auto; border-radius: 28px; cursor: crosshair; }
.worldsvg { position: absolute; left: 0; top: 0; display: block; }
.worldsvg .wland { fill: var(--land); stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.worldsvg.noborders .wland { stroke: none; }
.worldsvg .wedge { fill: none; stroke: var(--text); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.worldview.full { border-radius: 28px 28px 0 0; }
.maphelp { position: absolute; left: 50%; transform: translate(-50%, -50%); z-index: 5; pointer-events: auto; cursor: pointer;
  padding: 22px 54px; border-radius: 99px; border: 2px solid rgba(255, 255, 255, .35); font: 700 40px/1 var(--font);
  background: var(--scrim); color: #FFFFFF; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.maphelp:disabled { opacity: .45; cursor: default; }
.mapsteps { position: absolute; left: 50%; transform: translateX(-50%); z-index: 5; pointer-events: none; padding: 10px 26px;
  border-radius: 99px; font-size: 30px; font-weight: 600; background: var(--scrim); color: #FFFFFF; white-space: nowrap; }
.worldsvg .wdotin { transform: scale(var(--zs, 1)); }
.worldsvg .wline { vector-effect: non-scaling-stroke; }
.zoomhint { position: absolute; left: 540px; transform: translate(-50%, -50%); font-size: 28px; color: var(--muted); white-space: nowrap; }

/* true size slider (stage px): a long track with a big thumb, easy to grab on a phone */
.sizeslider { position: absolute; left: 130px; width: 820px; height: 90px; margin: 0; transform: translateY(-50%); pointer-events: auto;
  appearance: none; -webkit-appearance: none; background: transparent; touch-action: none; }
.sizeslider::-webkit-slider-runnable-track { height: 18px; border-radius: 9px; background: var(--line-strong); }
.sizeslider::-moz-range-track { height: 18px; border-radius: 9px; background: var(--line-strong); }
.sizeslider::-webkit-slider-thumb { -webkit-appearance: none; width: 84px; height: 84px; margin-top: -33px; border-radius: 50%;
  background: var(--accent); border: 6px solid var(--surface); box-shadow: 0 4px 14px var(--shade); }
.sizeslider::-moz-range-thumb { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); border: 6px solid var(--surface); }
.worldsvg.noborders .wland.option { fill: var(--line-strong); cursor: pointer; }
