/* Design tokens. Change the game's look here: theme, accent, typeface and button radius. */
:root {
  --bg: #0a0a0a;
  --panel: #131315;
  --line: rgba(255, 255, 255, 0.1);
  --fg: #f4f4f5;
  --muted: #9f9fa9;
  --accent: #54a2ff;
  --on-accent: #06101f;
  --bad: #ff6568;
  --good: #3ddc97;
  --font: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --radius: 0.625rem;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  /* Type scale: every text uses one of these steps. Two control heights. */
  --t-cap: 0.8125rem;    /* mono captions: years, km, costs, coordinates */
  --t-ui: 0.9375rem;     /* every control: nav, chips, hints, pills, lists */
  --t-body: 1.0625rem;   /* running text: hint text, search, details */
  --t-lead: 1.375rem;   /* moment clues */
  --t-title: 1.75rem;  /* box titles, stadium name */
  --t-q: clamp(2rem, calc(2.6 * var(--vw)), 2.625rem); /* every question, one or two moments */
  --h-ctl: 2.25rem;    /* secondary controls */
  --h-act: 2.875rem;    /* primary actions and the search field */
  /* Playing map */
  --map-land: #2b313b;
  --map-ocean: #10161f;
  --map-border: #4a5260;
  --map-road: #3a414c;
  --map-urban: #333a45;
  --map-ice: #8d97a5;
  /* Every size in this file is in rem, and the root font size is scaled by --z: the interface is drawn at 75% of its design size
     on desktop (as at 75% browser zoom) and at full size on phones. There is no CSS zoom: layout and measurements are real pixels. */
  --z: 1;
  --vw: 1vw;
  --vh: 1vh;
  color-scheme: dark;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
}
@supports (height: 1dvh) { :root { --vh: 1dvh; } }
@media (min-width: 761px) {
  :root { --z: 0.75; }
  /* One step up from the phone sizes, so that no line of text is under 12 px at this scale: every size below comes from these tokens. */
  :root { --t-cap: 0.875rem; --t-ui: 1rem; --t-body: 1.125rem; }
}
html { font-size: calc(100% * var(--z)); }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); font-size: 0.875rem; line-height: 1.45; }
[hidden] { display: none !important; }
#world-panel { position: relative; width: 100%; height: calc(100 * var(--vh)); }
/* The map has its own pixel density, so it is the one thing drawn at 1 / --z of the screen and scaled down by --z, which keeps the size
   of the world, the pins and the labels as designed. Everything else is real pixels. At --z: 1 (phones) this changes nothing. */
#globe-frame { position: absolute; left: 0; top: 0; width: calc(100% / var(--z)); height: calc(100% / var(--z)); transform: scale(var(--z)); transform-origin: 0 0; }
#globe { position: absolute; inset: 0; }
.maplibregl-ctrl.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib.maplibregl-compact { background: color-mix(in srgb, var(--panel) 85%, transparent); color: var(--muted); font-size: 0.6875rem; }
.maplibregl-ctrl-attrib a { color: var(--muted); }
.maplibregl-ctrl-attrib-button { filter: invert(1); opacity: 0.6; }
.maplibregl-ctrl-bottom-right { z-index: 3; }

button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 0.125rem solid var(--accent); outline-offset: 0.125rem; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.glass {
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  backdrop-filter: blur(0.75rem);
  -webkit-backdrop-filter: blur(0.75rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.25rem);
}
.btn { font: 600 var(--t-ui) var(--font); min-height: var(--h-act); padding: 0 1.25rem; border-radius: var(--radius); border: 1px solid transparent; white-space: nowrap; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.secondary { background: transparent; border-color: var(--line); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn:not(:disabled):hover { filter: brightness(1.1); }

/* Overlays sit above the globe; only their controls take pointer input. */
.nav, #question, .dock, .zoom, .timeline, .reveal-bar, .pin-label { position: absolute; z-index: 2; }
.nav { left: 0; right: 0; top: 0; z-index: 6; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; padding: 1.125rem 1.75rem; pointer-events: none; }
.nav > * { pointer-events: auto; }
.nav-start, .nav-tools { display: flex; align-items: center; gap: 0.875rem; min-width: 0; }
.nav-start { flex-wrap: wrap; }
.nav-tools { justify-content: flex-end; }
.career-back { display: inline-flex; align-items: center; gap: 0.3125rem; flex: none; min-height: var(--h-ctl); padding: 0 0.875rem 0 0.6875rem; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--panel) 75%, transparent); color: var(--fg); font: 600 var(--t-ui) var(--font); cursor: pointer; }
.career-back svg { width: 1.0625rem; height: 1.0625rem; }
.career-back:hover { background: color-mix(in srgb, var(--panel) 90%, var(--fg) 10%); }
/* In a career the back button takes the place of the game title. */
.nav-start:has(.career-back:not([hidden])) .brand { display: none; }
.brand { display: flex; align-items: center; gap: 0.5625rem; padding: 0; border: 0; background: none; color: var(--fg); font: 600 1.125rem var(--font); cursor: pointer; }
.brand:hover { filter: brightness(1.2); }
.brand svg { width: 1.375rem; height: 1.375rem; color: var(--accent); }
.modes { display: flex; gap: 0.25rem; }
.modes button { font: 500 var(--t-ui) var(--font); color: var(--muted); background: none; border: 0; height: var(--h-ctl); padding: 0 0.875rem; border-radius: var(--radius); }
.modes button[aria-pressed='true'] { color: var(--fg); background: rgba(127, 127, 127, 0.15); }
.me { font-family: var(--mono); font-size: var(--t-ui); color: var(--muted); white-space: nowrap; }
.me b { color: var(--fg); font-weight: 600; }

#question { top: calc(var(--nav-height, 3.625rem) + 0.5rem); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 0.875rem; padding: 0 7.5rem; text-align: center; pointer-events: none; }
#question h1 { margin: 0; max-width: 55rem; font-size: var(--t-q); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; text-shadow: 0 0.125rem 1.5rem rgba(0, 0, 0, 0.6); }
#question .kicker { pointer-events: auto; }
.kicker { display: flex; align-items: center; gap: 0.625rem; font-size: 0.875rem; color: var(--muted); margin: 0; }
.bars { display: flex; gap: 0.1875rem; }
.bars i { width: 1.625rem; height: 0.25rem; border-radius: 0.125rem; background: var(--line); }
.bars i.done { background: var(--good); }
.bars i.lost { background: var(--bad); }
.bars i.now { background: var(--accent); }
.player { display: flex; align-items: center; gap: 0.625rem; padding: 0.25rem 0.375rem 0.25rem 0.875rem; border-radius: 62.4375rem; font-size: var(--t-ui); border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 70%, transparent); color: var(--fg); }
.difficulty { display: flex; gap: 0.125rem; }
.difficulty button { font: 500 var(--t-cap) var(--font); padding: 0.1875rem 0.625rem; border-radius: 62.4375rem; border: 0; background: none; color: var(--muted); }
.difficulty button[aria-pressed='true'] { background: var(--fg); color: var(--bg); }
.difficulty button:disabled { opacity: 0.5; cursor: default; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.chip { display: inline-flex; align-items: center; gap: 0.5rem; height: var(--h-ctl); padding: 0 0.875rem; border-radius: var(--radius); border: 1px solid var(--line); font-size: var(--t-ui); background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(0.5rem); }
.chip small { color: var(--muted); }
.chip .mono, .chip small { font-size: var(--t-cap); }
.chip.wrong { border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: color-mix(in srgb, var(--bad) 16%, var(--panel)); }
.chip.wrong .mono { color: var(--bad); }
.chip.right { border-color: color-mix(in srgb, var(--good) 50%, transparent); background: color-mix(in srgb, var(--good) 16%, var(--panel)); }
.chip.empty { border-style: dashed; color: var(--muted); }

.pin-label { transform: translate(-50%, -100%); padding: 0.375rem 0.6875rem; font-size: 0.875rem; font-weight: 600; white-space: nowrap; pointer-events: none; }

.zoom { right: 1.25rem; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; overflow: hidden; }
.zoom button { width: 2.5rem; height: 2.5rem; border: 0; background: none; font-size: 1.25rem; }
.zoom button + button { border-top: 1px solid var(--line); }

.dock { left: 50%; bottom: 1.5rem; transform: translateX(-50%); width: min(45rem, calc(100% - 2rem)); display: flex; flex-direction: column; gap: 0.625rem; }
.career .dock { bottom: 8rem; }
.hint { margin: 0; font-size: var(--t-body); line-height: 1.4; padding: 0.75rem 1rem; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.hints { display: flex; justify-content: center; gap: 0.5rem; }
.hints button { display: flex; align-items: center; gap: 0.5rem; font: 500 var(--t-ui) var(--font); height: var(--h-ctl); padding: 0 0.875rem; border-radius: var(--radius); border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 80%, transparent); }
.hints small { font-family: var(--mono); font-size: var(--t-cap); color: var(--muted); }
.hints button:disabled { opacity: 0.4; cursor: default; }
.results { display: flex; flex-direction: column; padding: 0.25rem; }
.results:empty { display: none; }
.results button { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.625rem 0.875rem; border: 0; border-radius: var(--radius); background: none; text-align: left; font-size: var(--t-ui); }
.results button:hover, .results button[aria-selected='true'] { background: rgba(127, 127, 127, 0.15); }
.results small { color: var(--muted); font-size: 0.875rem; }
.results .none { padding: 0.5rem 0.75rem; font-size: var(--t-cap); color: var(--muted); }
.search-row { display: flex; align-items: center; gap: 0.625rem; min-height: var(--h-act); padding: 0.375rem 0.5rem 0.375rem 1rem; }
.search-row svg { flex: none; width: 1.125rem; height: 1.125rem; color: var(--muted); }
.search-row input { flex: 1; min-width: 0; padding: 0.5625rem 0; border: 0; outline: none; background: transparent; color: var(--fg); font: 500 var(--t-body) var(--font); }
.search-row input::placeholder { color: var(--muted); }
.search-row input::-webkit-search-cancel-button { display: none; }

.timeline { left: 1.5rem; right: 1.5rem; bottom: 1.25rem; display: flex; margin: 0; padding: 0.875rem 1.25rem; list-style: none; }
.timeline li { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; gap: 1px; padding-top: 1rem; font-size: 0.875rem; }
.timeline li::before { content: ''; position: absolute; top: 0.25rem; left: 0; right: 0; height: 0.125rem; background: var(--accent); }
.timeline li::after { content: ''; position: absolute; top: 0; left: 0; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--accent); border: 0.125rem solid var(--panel); }
.timeline li.current::before, .timeline li.future::before { background: repeating-linear-gradient(90deg, var(--line) 0 0.375rem, transparent 0.375rem 0.625rem); }
.timeline li.current::after { background: var(--panel); border-color: var(--accent); }
.timeline li.future::after { background: var(--line); }
.timeline b { font-size: var(--t-cap); font-weight: 600; padding-right: 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline li.current b { color: var(--accent); }
.timeline li.future b { color: var(--muted); }

.revealing .game-ui, .revealing .pin-label { display: none !important; }
.reveal-bar { left: 50%; bottom: 1.75rem; transform: translateX(-50%); display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 0.875rem 0.875rem 1.375rem; width: min(47.5rem, calc(100% - 2rem)); }
.reveal-info { flex: 1; min-width: 0; }
.reveal-info h2 { margin: 0 0 0.125rem; font-size: var(--t-title); line-height: 1.2; letter-spacing: -0.02em; }
.reveal-info p { margin: 0; font-size: var(--t-ui); line-height: 1.3; color: var(--muted); }
.reveal-info .status { color: var(--accent); }
.reveal-info .credit { font-size: 0.875rem; opacity: 0.8; }
.link { padding: 0; border: 0; background: none; color: var(--accent); font-size: inherit; text-decoration: underline; text-underline-offset: 0.125rem; }
#ai-note, #pro-note { width: min(35rem, calc(100% - 2rem)); max-height: calc(100% - 3rem); overflow: auto; padding: 1.375rem 1.625rem; color: var(--fg); }
#ai-note::backdrop, #pro-note::backdrop { background: rgba(6, 10, 18, 0.6); }
#ai-note h2, #pro-note h2 { margin: 0 0 0.625rem; font-size: 1.125rem; letter-spacing: -0.01em; }
#ai-note p, #pro-note p { margin: 0 0 0.625rem; font-size: var(--t-ui); line-height: 1.55; color: var(--muted); }
#ai-note form, #pro-note form { display: flex; justify-content: flex-end; margin-top: 0.375rem; }

/* Porthole reveal (src/reveal-photo.js): the globe darkens and leans in, the image opens from the pin. */
#globe { transition: transform 2.4s cubic-bezier(0.22, 1, 0.36, 1); transform-origin: var(--pin-x, 50%) var(--pin-y, 50%); }
.falling #globe { transform: scale(1.12); }
#veil { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; background: radial-gradient(circle at var(--pin-x, 50%) var(--pin-y, 50%), rgba(6, 10, 18, 0.35), rgba(6, 10, 18, 0.85) 60%); backdrop-filter: blur(0.1875rem); transition: opacity 0.9s ease; }
.falling #veil { opacity: 1; }
#porthole { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; }
#porthole.visible { opacity: 1; }
#porthole img { position: absolute; display: block; object-fit: cover; transform: scale(1.1); }
#porthole img.drift { transform: scale(1); transition: transform 9s cubic-bezier(0.22, 1, 0.36, 1); }
.ripple { position: absolute; z-index: 1; width: 1.5rem; height: 1.5rem; margin: -0.75rem 0 0 -0.75rem; border-radius: 50%; border: 0.125rem solid var(--accent); pointer-events: none; animation: ripple 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
@keyframes ripple { from { transform: scale(0.4); opacity: 1; } to { transform: scale(14); opacity: 0; } }
#ring { position: absolute; z-index: 1; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(0.2); transition: opacity calc(var(--open-ms, 650ms) * 0.5) ease, transform var(--open-ms, 650ms) cubic-bezier(0.65, 0, 0.35, 1); }
#ring.open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#ring.grown { transform: translate(-50%, -50%) scale(1.15); transition: opacity 0.3s ease, transform var(--grow-ms, 800ms) cubic-bezier(0.65, 0, 0.35, 1); }
#ring svg { display: block; overflow: visible; }
#ring .compass { transform: rotate(-70deg); transition: transform calc(var(--open-ms, 650ms) * 2) cubic-bezier(0.22, 1, 0.36, 1); }
#ring.open .compass { transform: rotate(0deg); }
#ring .tick { stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.5; }
#ring .tick.major { stroke: var(--fg); stroke-width: 2; }
#ring .edge { fill: none; stroke: var(--accent); stroke-width: 2; filter: drop-shadow(0 0 0.5rem var(--accent)); }
#ring .north { fill: var(--accent); }
#ring text { font: 500 var(--t-cap) var(--mono); fill: var(--fg); }
#ring text.big { font: 600 1.5rem var(--mono); }
#ring text.label { font: 500 0.75rem var(--mono); fill: var(--muted); letter-spacing: 0.12em; }

.result { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 50%, transparent); }
.result section { width: min(28.75rem, calc(100% - 2rem)); padding: 1.75rem 1.875rem; display: flex; flex-direction: column; gap: 0.75rem; text-align: center; }
.result .kicker { justify-content: center; }
#result-detail { font-size: var(--t-ui); }
.result h2 { margin: 0; font-size: var(--t-title); letter-spacing: -0.02em; }
.result p { margin: 0; }
.points { font-family: var(--mono); font-size: 3.25rem; line-height: 1; color: var(--accent); }
.result .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.5rem; }
/* Where there is no system share sheet: the usual networks and a copy button, under the buttons. */
.share-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0; padding: 0.75rem; border-radius: var(--radius); background: rgba(127, 127, 127, 0.1); }
.share-menu .btn { display: inline-flex; align-items: center; padding: 0.5rem 0.875rem; font-size: var(--t-cap); text-decoration: none; color: var(--fg); }
#share { display: inline-flex; align-items: center; gap: 0.4375rem; }

#map-message { position: absolute; z-index: 5; top: calc(var(--nav-height, 3.625rem) + 0.5rem); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); padding: 0.625rem 1.125rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.875rem; text-align: center; }
#map-message p { margin: 0.25rem 0; }
#map-message button { margin: 0.25rem; padding: 0.5rem 0.875rem; border-radius: var(--radius); border: 1px solid var(--line); background: transparent; }

@media (max-width: 760px) {
  .nav { grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 0.75rem; padding: 0.75rem 1rem; }
  .nav-start { gap: 0.5rem; }
  .nav-tools { gap: 0.75rem; }
  .brand { font-size: 1.0625rem; }
  .career-back { min-height: 2.375rem; padding: 0.4375rem 0.875rem 0.4375rem 0.6875rem; font-size: 0.9375rem; }
  .modes { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  #question { padding: 0 1rem; }
  /* Phones are not zoomed out: the controls keep their compact size so the guesses stay on one line. */
  .chips { gap: 0.375rem; }
  .chip, .hints button { height: 2rem; padding: 0 0.5625rem; font-size: 0.8125rem; }
  .search-row input { font-size: 0.9375rem; }
  .player { flex-wrap: wrap; justify-content: center; }
  .kicker { justify-content: center; }
  .timeline { left: 1rem; right: 1rem; overflow-x: auto; }
  .timeline li { flex: 0 0 8.75rem; }
  .reveal-bar { flex-wrap: wrap; padding: 0.875rem; }
  .reveal-info { flex-basis: 100%; }
  .reveal-bar > button { flex: 1 1 auto; }
}
@media (max-width: 420px) { .me { font-size: 0.6875rem; } #points-label { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.debug { position: fixed; left: 1rem; top: 4rem; z-index: 6; margin: 0; padding: 0.625rem 0.75rem; font: 0.75rem/1.5 var(--mono); color: var(--fg); white-space: pre; pointer-events: none; }

/* Reveal: the question stays beside the porthole, wired to its edge. */
.reveal-question { position: absolute; z-index: 2; left: 4rem; top: 30%; width: 25rem; display: flex; flex-direction: column; gap: 1rem; pointer-events: none; opacity: 0; }
.reveal-question.in { opacity: 1; animation: reveal-question-in 0.9s ease both; }
.reveal-question.cramped { display: none; }
#reveal-question-text { margin: 0; font-size: var(--t-q); line-height: 1.08; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; text-shadow: 0 0.125rem 1.5rem rgba(0, 0, 0, 0.6); }
#reveal-question-text span, #question h1 span { color: var(--accent); }
.reveal-wire { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; }
.reveal-wire.on { opacity: 1; transition: opacity 0.6s ease 1.1s; }
.reveal-wire path { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 1.2; }
.reveal-wire circle { fill: var(--accent); }
@keyframes reveal-question-in { from { opacity: 0; transform: translateY(0.625rem); } }
@media (max-width: 760px) { .reveal-question, .reveal-wire { display: none; } }
@media (prefers-reduced-motion: reduce) { .reveal-question { animation: none; } }
/* Soft dark wash behind the text (no box) so it stays readable over the lit 3D city. */
.reveal-question::before { content: ''; position: absolute; z-index: -1; inset: -5.625rem -8.75rem -6.875rem -4rem; background: radial-gradient(ellipse 60% 55% at 35% 45%, rgba(10, 10, 10, 0.82), rgba(10, 10, 10, 0.5) 55%, transparent 100%); pointer-events: none; }
.reveal-question .kicker { font-size: 0.875rem; color: var(--fg); opacity: 0.75; text-shadow: 0 1px 0.5rem rgba(0, 0, 0, 0.8); }

/* Two memories share one stadium and one answer. Markers align with the centre
   of each clue on the globe, and become a vertical rail beside the portrait. */
.moment-clues { --moment-gap: 3.125rem; display: grid; grid-template-columns: 1fr 1fr; gap: var(--moment-gap); width: min(49.375rem, 100%); padding: 0; margin: 0.875rem 0 0.25rem; list-style: none; }
.moment-clues li { position: relative; padding: 1.125rem 0 0; }
.moment-clues li::before { content: ''; position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 0.4375rem; height: 0.4375rem; border: 1px solid var(--accent); border-radius: 50%; background: var(--bg); }
.moment-clues li:first-child::after { content: ''; position: absolute; top: 0.1875rem; left: calc(50% + 0.4375rem); width: calc(100% + var(--moment-gap) - 0.875rem); height: 1px; background: #4b5360; }
.moment-clues time { font: 500 var(--t-cap) var(--mono); color: #c5c5d3; }
.moment-clues p { margin: 0.625rem 0 0; font-size: var(--t-lead); line-height: 1.3; letter-spacing: -0.012em; color: #e6e6ee; }
.moment-clues strong { color: var(--accent); font-weight: 500; }
.reveal-question .moment-clues { display: flex; flex-direction: column; gap: 1.875rem; margin: 0.5rem 0 0; }
.reveal-question .moment-clues li { padding: 0 0 0 1.375rem; }
.reveal-question .moment-clues li::before { left: 0; top: 0.3125rem; transform: none; }
.reveal-question .moment-clues li:first-child::after { width: 1px; height: auto; left: 0.1875rem; top: 1.375rem; bottom: -1.5rem; }
@media (max-width: 1100px) {
  html:has(body.multi-moment.revealing), body.multi-moment.revealing { height: auto; overflow: auto; }
  .multi-moment.revealing #world-panel { height: auto; min-height: calc(100 * var(--vh)); padding-top: calc(var(--nav-height, 3.625rem) + min(calc(90 * var(--vw)), 31.25rem) + 5rem); padding-bottom: 1.5rem; }
  .multi-moment.revealing #reveal-question { display: flex; position: relative; inset: auto; width: min(42.5rem, calc(100% - 3rem)); margin: 0 auto; gap: 1rem; }
  .multi-moment.revealing .reveal-bar { position: relative; inset: auto; transform: none; margin: 1.75rem auto 0; }
  .multi-moment.revealing .reveal-wire { display: none; }
}
@media (max-width: 760px) {
  .multi-moment #question::before { content: ''; position: absolute; z-index: -1; inset: -0.5rem 0 -1.5rem; background: linear-gradient(var(--bg) 65%, rgba(10, 10, 10, 0.9) 90%, transparent); }
  .multi-moment .zoom { top: auto; bottom: 14.25rem; transform: none; flex-direction: row; }
  .multi-moment .zoom button + button { border-top: 0; border-left: 1px solid var(--line); }
  #question .moment-clues { display: flex; flex-direction: column; gap: 1.25rem; margin: 0.5rem 0; text-align: left; }
  #question .moment-clues li { padding: 0 0 0 1.375rem; }
  #question .moment-clues li::before { left: 0; top: 0.3125rem; transform: none; }
  #question .moment-clues li:first-child::after { width: 1px; height: auto; left: 0.1875rem; top: 1.375rem; bottom: -0.9375rem; }
  .moment-clues p { font-size: 1rem; margin-top: 0.3125rem; }
  .multi-moment #question h1 { font-size: 1.625rem; }
  .multi-moment #reveal-question-text { font-size: 1.5rem; }
  .reveal-question .moment-clues p { font-size: 1rem; }
}

/* Career picker: a calm editorial screen over the dimmed globe. Rules instead of boxes, one accent. */
.picking #globe { pointer-events: none; }
.picking .game-ui, .picking .pin-label { display: none !important; }
.career-picker { position: absolute; inset: 0; z-index: 1; pointer-events: none; animation: cp-in 0.7s var(--spring, ease) both; --edge: clamp(1.5rem, calc(5.5 * var(--vw)), 5rem); }
.career-picker > * { pointer-events: auto; }
.career-picker::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(10, 10, 10, 0.85) 0%, rgba(10, 10, 10, 0.25) 35%, rgba(10, 10, 10, 0.25) 65%, rgba(10, 10, 10, 0.85) 100%); }
.cp-left { position: absolute; left: var(--edge); top: max(7.75rem, calc(var(--nav-height, 3.625rem) + 1.5rem)); width: clamp(15rem, calc(27 * var(--vw)), 25rem); display: flex; flex-direction: column; gap: 0.5rem; }
.cp-kick { margin: 0; display: flex; align-items: center; gap: 0.625rem; font-size: var(--t-ui); color: var(--muted); }
.cp-kick::before { content: ''; width: 1.125rem; height: 1px; background: var(--accent); }
.cp-first { margin: 0; font-size: clamp(1.625rem, calc(2.5 * var(--vw)), 2.25rem); font-weight: 300; line-height: 1.1; letter-spacing: -0.02em; color: rgba(255, 255, 255, 0.75); }
.cp-last { margin: 0; font-size: clamp(3.25rem, calc(5.6 * var(--vw)), 5rem); font-weight: 600; line-height: 0.95; letter-spacing: -0.045em; }
.cp-meta { margin: 0; font: 500 var(--t-ui) var(--mono); letter-spacing: 0.02em; color: var(--muted); }
.cp-levels { margin-top: 2.5rem; width: min(100%, 21.25rem); }
.cp-levels button { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.875rem 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.16); background: none; font-size: var(--t-body); text-align: left; color: rgba(255, 255, 255, 0.65); transition: color 0.3s ease; }
.cp-levels button:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.cp-levels button::before { content: ''; width: 0.3125rem; height: 0.3125rem; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transition: background 0.3s ease, box-shadow 0.3s ease; }
.cp-levels button:not(:disabled):hover { color: var(--fg); }
.cp-levels button[aria-pressed='true'] { color: var(--fg); }
.cp-levels button[aria-pressed='true']::before { background: var(--accent); box-shadow: 0 0 0 0.1875rem color-mix(in srgb, var(--accent) 25%, transparent); }
.cp-levels button:disabled { opacity: 0.35; cursor: default; }
.cp-road { position: absolute; right: calc(var(--edge) + 4.5rem); top: max(7.75rem, calc(var(--nav-height, 3.625rem) + 1.5rem)); }
.cp-road svg { display: block; height: min(32.5rem, calc(calc(100 * var(--vh)) - 16.25rem)); width: auto; overflow: visible; }
/* The road is an SVG drawn at 32.5rem tall for a 520-unit viewBox, so it is already scaled by --z: its text is divided by --z to come out at the same size as the rest of the interface. */
.cp-road text { font: 500 calc(var(--t-ui) / var(--z)) var(--font); fill: rgba(255, 255, 255, 0.8); }
.cp-road text.y { font: 500 calc(var(--t-cap) / var(--z)) var(--mono); fill: rgba(255, 255, 255, 0.55); }
.cp-road text.past { fill: rgba(255, 255, 255, 0.95); }
.cp-road text.y.past, .cp-road text.y.now { fill: var(--accent); }
.cp-road text.now { fill: #fff; }
.cp-road .way { fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.2; stroke-dasharray: 3 5; }
.cp-road .dot { fill: rgba(255, 255, 255, 0.55); }
.cp-road .big { fill: #fff; }
.cp-road .past, .cp-road .now { fill: var(--accent); }
.cp-road text.past, .cp-road text.now { fill: rgba(255, 255, 255, 0.95); }
.cp-road .way-done { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.cp-road .halo { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0.5; }
.cp-road g { animation: cp-pop 0.5s var(--spring, ease) both; }
.cp-tabs { position: absolute; left: var(--edge); right: calc(var(--edge) + 22rem); bottom: 3rem; display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 0.375rem; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.cp-tabs button { position: relative; flex: 0 0 auto; min-width: 7.75rem; padding: 0.75rem 0.25rem 0 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.16); background: none; display: flex; flex-direction: column; text-align: left; white-space: nowrap; color: rgba(255, 255, 255, 0.55); transition: color 0.3s ease; }
.cp-tabs button small { font-size: 0.875rem; }
.cp-tabs button b { font-size: var(--t-lead); font-weight: 500; letter-spacing: -0.02em; }
.cp-tabs button:hover { color: var(--fg); }
.cp-tabs button[aria-pressed='true'] { color: var(--fg); border-top: 0.125rem solid var(--fg); padding-top: 0.6875rem; }
.cp-tabs button[aria-pressed='true'] b { color: var(--accent); }
.cp-soon-tag { position: absolute; right: 0.25rem; top: 0.875rem; color: var(--muted); font-size: 0.625rem; line-height: 1.4; }
.career-picker.coming-soon::before { background: rgba(10, 10, 10, 0.88); animation: cp-in 0.3s ease-out; }
.cp-coming-soon { position: absolute; inset: var(--nav-height, 3.625rem) var(--edge) 11rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-align: center; pointer-events: none; animation: cp-in 0.3s ease-out; }
.cp-coming-soon h2 { margin: 0; font-size: clamp(2.5rem, calc(5 * var(--vw)), 5rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; }
.cp-coming-soon p { margin: 0; font-size: var(--t-lead); color: var(--muted); }
.picking:has(.career-picker.coming-soon) .me { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .career-picker.coming-soon::before, .cp-coming-soon { animation: none; }
}
/* A player known by one name: the name is centred in the tab instead of sitting under an empty line. */
.cp-tabs button.single { justify-content: center; }
.cp-go { position: absolute; right: var(--edge); bottom: 3rem; display: flex; flex-direction: column; align-items: flex-end; gap: 0.625rem; }
.cp-go .btn { min-height: 3.25rem; padding: 0 1.75rem; font-size: var(--t-body); }
@keyframes cp-in { from { opacity: 0; } }
@keyframes cp-pop { from { opacity: 0; transform: translateY(0.375rem); } }
@media (max-width: 760px) {
  .cp-road { display: none; }
  .cp-left { top: calc(var(--nav-height, 5.625rem) + 1.25rem); width: calc(100% - 2 * var(--edge)); }
  .cp-levels { margin-top: 1.375rem; }
  .cp-tabs { right: var(--edge); bottom: 10.25rem; overflow-x: auto; }
  .cp-go { left: var(--edge); bottom: 3.5rem; align-items: stretch; gap: 0.375rem; }
  .cp-go .btn { margin-top: 0.25rem; }
  #cp-progress { font-size: 0.8125rem; }
}
@media (prefers-reduced-motion: reduce) { .career-picker, .cp-road g { animation: none; } }
/* Very short phones: tighten the picker so the level list (all three levels are now selectable) clears the player tabs. */
@media (max-width: 760px) and (max-height: 700px) {
  .cp-last { font-size: 2.75rem; }
  .cp-levels { margin-top: 0.75rem; }
  .cp-levels button { padding: 0.5625rem 0; font-size: 1rem; }
}

/* Review of a finished day: the globe stays free, the answer dock is hidden, and a bar jumps between the questions. */
.result section { position: relative; }
.result-close { position: absolute; top: 0.625rem; right: 0.75rem; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.5rem; line-height: 1; }
.result-close:hover { color: var(--fg); background: rgba(127, 127, 127, 0.15); }
.reviewing #dock { display: none !important; }
/* Over the free globe the question must stay readable: a soft dark fade behind it, only while reviewing. */
.reviewing:not(.reviewing-ring) #question { background: linear-gradient(rgba(10, 10, 10, 0.92) 55%, rgba(10, 10, 10, 0)); padding-bottom: 2.25rem; }
.timeline li button { display: flex; flex-direction: column; width: 100%; margin: -1rem 0 0; padding: 1rem 0 0.375rem; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.timeline li button:hover span { color: var(--fg); }
.timeline li.viewing::after { width: 0.875rem; height: 0.875rem; top: -0.125rem; left: -0.125rem; background: var(--panel); border-color: var(--accent); }
.timeline li.viewing span { color: var(--accent); font-weight: 700; }
.career .review-bar { display: none !important; }
.timeline li.summary { flex: 0 0 auto; padding: 0 0 0 0.875rem; justify-content: center; }
.timeline li.summary::before, .timeline li.summary::after { display: none; }
.timeline li.summary button { display: inline-flex; align-items: center; width: auto; height: var(--h-ctl); margin: 0; padding: 0 0.875rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: var(--t-ui); }
.timeline li.summary button:hover { color: var(--fg); }

/* Finished-career review with a still porthole: no flight, no opening, no drift; the timeline stays below. */
.reviewing-ring #question, .reviewing-ring .zoom { display: none !important; }
.reviewing-ring .reveal-bar { bottom: 6rem; width: min(32.5rem, calc(100% - 2rem)); }
.reviewing-ring .reveal-bar > button { display: none; }
.reviewing-ring .reveal-question.in, .reviewing-ring .reveal-wire.on { animation: none; transition: none; }
.static-view #globe, .static-view #veil, .static-view #porthole, .static-view #porthole img, .static-view #ring, .static-view #ring .compass { transition: none !important; animation: none !important; }
.static-view #veil { opacity: 1; }
.picking :is(#porthole, #ring, #veil, .reveal-question, .reveal-wire, .reveal-bar),
.archiving :is(#porthole, #ring, #veil, .reveal-question, .reveal-wire, .reveal-bar) { display: none !important; }
.review-bar { position: absolute; z-index: 2; left: 50%; bottom: 1.75rem; transform: translateX(-50%); display: flex; gap: 0.375rem; padding: 0.5rem; max-width: calc(100% - 2rem); overflow-x: auto; }
.review-bar button { padding: 0.5rem 0.875rem; border: 0; border-radius: var(--radius); background: none; color: var(--muted); font-size: var(--t-ui); white-space: nowrap; }
.review-bar button:hover { color: var(--fg); }
.review-bar button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); }
.review-bar button[data-summary] { border-left: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) 0; margin-left: 0.25rem; padding-left: 1rem; }
.revealing .review-bar, .picking .review-bar { display: none !important; }
.reviewing .chip.empty { display: none; }

.cp-road .lead { fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; }
.cp-road .lead.past, .cp-road .lead.now { stroke: color-mix(in srgb, var(--accent) 60%, transparent); }
.cp-road .arrow { fill: rgba(255, 255, 255, 0.5); }
.cp-road .arrow.past, .cp-road .arrow.now { fill: var(--accent); }

.cp-levels button small { margin-left: auto; font: 500 1rem var(--mono); color: var(--muted); }

/* ---------- archive: every Daily since #1, editorial like the career picker ---------- */
.archiving #globe { pointer-events: none; }
.archiving .game-ui, .archiving .pin-label, .archiving #result, .archiving #review-bar, .archiving #timeline { display: none !important; }
.archive { position: absolute; inset: 0; z-index: 1; animation: cp-in 0.7s var(--spring, ease) both; --edge: clamp(1.5rem, calc(5.5 * var(--vw)), 5rem); --top: max(7.75rem, calc(var(--nav-height, 3.625rem) + 1.5rem)); --left-w: clamp(15rem, calc(27 * var(--vw)), 25rem); --warn: #f5c451; }
.archive::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(10, 10, 10, 0.88) 0%, rgba(10, 10, 10, 0.5) 45%, rgba(10, 10, 10, 0.82) 100%); }
.ar-left { position: absolute; left: var(--edge); top: var(--top); bottom: 3rem; width: var(--left-w); display: flex; flex-direction: column; gap: 0.5rem; }
.ar-title { margin: 0.375rem 0 0.125rem; font-size: clamp(3.5rem, calc(6.4 * var(--vw)), 6rem); font-weight: 600; line-height: 0.95; letter-spacing: -0.05em; }
.ar-total { margin: 2.25rem 0 0; } .ar-total small { font-size: 0.875rem; color: var(--muted); }
.ar-total b { display: block; font: 600 clamp(2.25rem, calc(3.6 * var(--vw)), 3.25rem)/1.05 var(--mono); letter-spacing: -0.05em; }
.ar-total b span { font-size: var(--t-ui); color: var(--muted); letter-spacing: 0; margin-left: 0.375rem; }
.ar-filters { margin-top: auto; width: min(100%, 21.25rem); }
.ar-filters button { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.875rem 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.16); background: none; font-size: var(--t-body); text-align: left; color: rgba(255, 255, 255, 0.65); transition: color 0.3s ease; }
.ar-filters button:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.ar-filters button::before { content: ''; width: 0.3125rem; height: 0.3125rem; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transition: background 0.3s ease, box-shadow 0.3s ease; }
.ar-filters button small { margin-left: auto; font: 500 0.875rem var(--mono); color: var(--muted); }
.ar-filters button:hover, .ar-filters button[aria-pressed='true'] { color: var(--fg); }
.ar-filters button[aria-pressed='true']::before { background: var(--accent); box-shadow: 0 0 0 0.1875rem color-mix(in srgb, var(--accent) 25%, transparent); }
.ar-list { position: absolute; top: calc(var(--top) - 1.5rem); bottom: 0; right: var(--edge); width: min(45rem, calc(100% - 2 * var(--edge) - var(--left-w) - 3rem)); overflow-y: auto; padding: 1.5rem 0.125rem 4.5rem; scrollbar-width: none; -webkit-mask-image: linear-gradient(#0000, #000 1.5rem calc(100% - 4.5rem), #0000); mask-image: linear-gradient(#0000, #000 1.5rem calc(100% - 4.5rem), #0000); }
.ar-list::-webkit-scrollbar { display: none; }
.ar-empty { color: var(--muted); font-size: var(--t-body); }
.ar-item { margin-bottom: 0.5rem; }
.ar-row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.375rem; border-radius: 0.875rem; background: rgba(19, 19, 21, 0.78); border: 1px solid var(--line); color: var(--fg); text-align: left; transition: border-color 0.15s ease, background 0.15s ease; }
.ar-row:hover { border-color: rgba(255, 255, 255, 0.3); }
.ar-item.today > .ar-row { border-color: var(--accent); }
.ar-item.open > .ar-row { border-color: rgba(255, 255, 255, 0.35); background: rgba(30, 30, 34, 0.9); }
.ar-l, .ar-r { display: flex; flex-direction: column; gap: 1px; }
.ar-l b { font: 600 var(--t-lead) var(--mono); letter-spacing: -0.04em; }
.ar-l > span { color: var(--muted); font-size: 0.875rem; }
.ar-r { text-align: right; align-items: flex-end; }
.ar-r b { font: 600 var(--t-body) var(--mono); letter-spacing: -0.03em; }
.ar-r > span { color: var(--muted); font-size: 0.875rem; }
.ar-r i { font-style: normal; display: inline-block; transition: transform 0.26s cubic-bezier(0.23, 1, 0.32, 1); }
.ar-item.open .ar-r i { transform: rotate(180deg); }
.ar-item .good { color: var(--good); } .ar-item .warn { color: var(--warn); } .ar-item .accent { color: var(--accent); }
.ar-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.22s cubic-bezier(0.23, 1, 0.32, 1); }
.ar-item.open .ar-panel { grid-template-rows: 1fr; transition-duration: 0.3s; }
.ar-panel > div { overflow: hidden; min-height: 0; }
.ar-pad { padding: 0.5rem 0.25rem 0.625rem; }
.ar-q, .ar-acts { opacity: 0; transform: translateY(-0.375rem) scale(0.97); transform-origin: top center; transition: opacity 0.12s ease, transform 0.16s cubic-bezier(0.23, 1, 0.32, 1); }
.ar-item.open .ar-q, .ar-item.open .ar-acts { opacity: 1; transform: none; transition: opacity 0.26s ease calc(var(--i) * 50ms), transform 0.34s cubic-bezier(0.23, 1, 0.32, 1) calc(var(--i) * 50ms); }
.ar-qs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.ar-q { display: grid; gap: 0.125rem; padding: 0.75rem 0.875rem; border-radius: 0.75rem; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--fg); text-align: left; }
.ar-q:hover { background: rgba(255, 255, 255, 0.08); }
.ar-q:active, .ar-acts .btn:active, .ar-confirm .btn:active { transform: scale(0.97); }
.ar-q b { font-size: var(--t-ui); font-weight: 600; }
.ar-q small { font: 500 0.875rem var(--mono); color: var(--muted); }
.ar-q.won { border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.ar-q.lost { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.ar-acts { margin-top: 0.625rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.archive .btn.danger { background: none; border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: #ffb1b3; }
.archive .btn.danger:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: var(--bad); filter: none; }
.ar-confirm { display: none; margin-top: 0.625rem; padding: 0.875rem 1rem; border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 8%, transparent); border-radius: 0.75rem; font-size: var(--t-ui); gap: 0.75rem; }
.ar-confirm p { margin: 0; }
.ar-confirm div { display: flex; gap: 0.5rem; }
.ar-item.confirming .ar-confirm { display: grid; }
@media (max-width: 760px) {
  .archive { overflow-y: auto; }
  .ar-left { position: static; width: auto; padding: calc(var(--nav-height, 5.625rem) + 1.25rem) var(--edge) 0; }
  .ar-title { font-size: 3.25rem; }
  .ar-total { margin-top: 0.625rem; }
  .ar-filters { display: flex; gap: 0.375rem; width: auto; margin-top: 0.875rem; overflow-x: auto; }
  .ar-filters button { width: auto; flex: none; padding: 0.5rem 0.75rem; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 62.4375rem; font-size: 0.875rem; }
  .ar-filters button:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
  .ar-filters button::before { display: none; }
  .ar-filters button[aria-pressed='true'] { border-color: var(--accent); }
  .ar-list { position: static; width: auto; overflow: visible; padding: 1rem var(--edge) 3rem; -webkit-mask-image: none; mask-image: none; }
  .ar-qs { grid-template-columns: 1fr; }
}

/* A step lost for good (all attempts spent) shows in red on the career timeline. */
.timeline li.lost::after { background: var(--bad); }
.timeline li.lost span, .timeline li.lost.viewing span { color: var(--bad); }
.timeline li.lost.viewing::after { background: var(--panel); border-color: var(--bad); }

/* Pro: what is locked says so quietly; nothing is hidden, the lock sits where the count would. */
.lock { vertical-align: -1px; margin-right: 0.25rem; }
.cp-levels button small .lock { margin: 0 0 0 0.5rem; }
.ar-item.locked > .ar-row { opacity: 0.6; }
.ar-item.locked > .ar-row:hover { opacity: 0.9; }
.pro-line { margin: 1.125rem 0 0; font-size: var(--t-cap); color: var(--muted); }
.pro-line .link { color: var(--accent); }


/* Pro dialog: sign in, then pay once */
.pro-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.25rem 0 0.75rem; }
.pro-actions .btn { flex: 1 1 auto; }
#pro-note .pro-legal { font-size: var(--t-cap); margin: 0 0 0.25rem; }
#pro-note .pro-legal a { color: var(--accent); }
#pro-status:empty { display: none; }

/* Plan chip at the top right: Free or Pro, with the initial of the signed-in account */
.plan-chip { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2rem; padding: 0 0.25rem 0 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 75%, transparent); color: var(--muted); font: 600 var(--t-cap) var(--font); cursor: pointer; }
.plan-chip:hover { color: var(--fg); border-color: rgba(255, 255, 255, 0.25); }
.plan-chip:has(.avatar[hidden]) { padding-right: 0.75rem; }
.plan-chip.is-pro { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.avatar { display: grid; place-items: center; width: 1.625rem; height: 1.625rem; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: var(--fg); font: 600 var(--t-cap) var(--font); }
.is-pro .avatar { background: rgba(6, 16, 31, 0.18); color: var(--on-accent); }
.icon-btn { display: grid; place-items: center; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--fg); background: rgba(255, 255, 255, 0.08); }

/* The Pro, Account and About views: a panel over the game, in the same layout as the archive. It is read, not played, so it is drawn
   in real pixels (not scaled by --z): body text 16 px, captions 14 px, buttons 48 px tall. */
.hub { position: fixed; left: 0; right: 0; bottom: 0; top: calc(var(--nav-height, 51px)); z-index: 5; display: grid; grid-template-columns: 266px minmax(0, 760px); column-gap: 64px; padding: 35px 24px 14px calc(var(--hub-edge, clamp(21px, calc(5.5 * var(--vw)), 70px)) + clamp(0px, 5vw, 96px)); font-size: 14px; line-height: 1.5; background: rgba(8, 8, 9, 0.95); backdrop-filter: blur(14px); color: var(--fg); animation: cp-in 0.4s var(--spring, ease) both; }
.hub[hidden] { display: none; }
.hub-close { position: absolute; top: 14px; right: 21px; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--fg); font-size: 21px; line-height: 1; cursor: pointer; }
.hub-close:hover { background: rgba(255, 255, 255, 0.08); }
.hub-side { display: flex; flex-direction: column; min-height: 0; }
.hub .cp-kick { font-size: 13px; }
.hub .ar-title { margin: 5.5px 0 7px; font-size: 49px; }
.hub .cp-meta { font-size: 13px; letter-spacing: 0; overflow-wrap: anywhere; }
.hub-tabs { margin-top: 24.5px; width: 100%; }
.hub-tabs button { padding: 14px 0; font-size: 16px; }
.hub-body { overflow-y: auto; min-height: 0; padding: 0 2px 42px; scrollbar-width: none; }
.hub-body::-webkit-scrollbar { display: none; }
.hub-card { margin: 0 0 14px; padding: 21px 24.5px; border: 1px solid var(--line); border-radius: 10.5px; background: color-mix(in srgb, var(--panel) 90%, transparent); }
.hub-card h3 { margin: 0 0 10.5px; font-size: 17.5px; letter-spacing: -0.01em; }
.hub-card p { margin: 0 0 10.5px; font-size: 14px; line-height: 1.55; }
.hub-card .muted { color: #b4b4bd; }
.hub-card a:not(.btn) { color: var(--accent); text-underline-offset: 0.2em; }
.hub-row { display: flex; justify-content: space-between; gap: 21px; padding: 12.5px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hub-row:first-of-type { border-top: 0; }
.hub-row span { color: #b4b4bd; text-align: right; }
.hub-list { margin: 0 0 17.5px; padding-left: 17.5px; font-size: 15px; line-height: 1.8; }
.hub-buy { display: flex; flex-direction: column; align-items: flex-start; gap: 10.5px; padding-top: 17.5px; border-top: 1px solid var(--line); }
.hub-price { font: 600 35px var(--mono); letter-spacing: -0.04em; }
.hub-price small { margin-left: 7px; font: 400 13px var(--font); letter-spacing: 0; color: #b4b4bd; }
.hub-card p.hub-fine { margin: 0; font-size: 13px; color: #b4b4bd; }
.hub-card p.hub-status { padding: 10.5px 14px; border-radius: 9px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.hub-card p.hub-ok { color: var(--good); }
.hub-card p.hub-error { color: #ff8a8c; }
.hub .btn { min-height: 42px; padding: 0 21px; font-size: 14px; }
.hub-card .btn { display: inline-flex; align-items: center; text-decoration: none; }
.hub-card a.btn.secondary { color: var(--fg); }
.hub-social { display: flex; flex-wrap: wrap; gap: 12.5px 21px; font-size: 14px; }
@media (max-width: 1100px) { .hub { grid-template-columns: 240px minmax(0, 1fr); column-gap: 40px; } }
@media (max-width: 760px) {
  .hub { display: block; overflow-y: auto; padding: 21px 14px 28px; }
  .hub-side { margin-bottom: 14px; }
  .hub .ar-title { font-size: 38.5px; }
  .hub-tabs { margin-top: 14px; display: flex; gap: 7px; }
  .hub-tabs button { flex: 1; width: auto; justify-content: center; border: 1px solid var(--line) !important; border-radius: 9px; padding: 10.5px 7px; font-size: 14px; }
  .hub-tabs button::before { display: none; }
  .hub-body { overflow: visible; padding-bottom: 14px; }
  .hub-close { top: 10.5px; right: 14px; }
  .hub-card { padding: 17.5px; }
}
