/* AURORA RING · "Klondike Luxe": spruce-night blue, gold leaf, glacier light. One deliberate dark theme. */
@font-face { font-family: 'Fraunces'; src: url('fonts/Fraunces.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/Fraunces-Italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/Fraunces-ext.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+0300-036F; }
@font-face { font-family: 'Lilita One'; src: url('fonts/LilitaOne.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('fonts/Nunito.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }

/* layout: full-bleed WebGL ring with DOM overlays pinned to safe-area corners */
:root {
  color-scheme: dark;
  --night: #0b1426; --night-2: #12203a; --ink: #1c1610;
  --snow: #f3f6fa; --mist: #a9b8cf; --glacier: #9ed8e8;
  --gold: #f2b33d; --gold-hi: #ffe6a3; --gold-lo: #a86a12;
  --fireweed: #e24a84; --aurora: #3bf0a8; --aurora-v: #8e6cf0; --ember: #ff7a45;
  --paper: #efe6cf; --paper-ink: #2a1f14;
  --foil: linear-gradient(100deg, var(--gold-lo) 0%, var(--gold) 22%, var(--gold-hi) 38%, var(--gold) 52%, var(--gold-lo) 72%, var(--gold) 100%);
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --game: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  --ui: 'Nunito', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  --top: max(12px, env(safe-area-inset-top, 0px));
  --bot: max(12px, env(safe-area-inset-bottom, 0px));
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--snow); overflow: hidden; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: none; }
body { font: 500 15px/1.45 var(--ui); }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
#ui > #hud, #ui > .grain, #ui > .cursorlight { pointer-events: none; }
[hidden] { display: none !important; }
.num { font-family: var(--game); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

.grain { position: fixed; inset: -50%; opacity: .07; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); animation: grain 1.2s steps(6) infinite; mix-blend-mode: overlay; }
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -3%); } }
.cursorlight { position: fixed; inset: 0; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 220, 150, .06), transparent 60%); }
#ui[data-screen="hud"] .cursorlight, #ui[data-screen="results"] .cursorlight { display: none; }

/* ---------- buttons */
.btn { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: 0 1.15em; border: 1px solid rgba(242, 179, 61, .45); background: rgba(11, 20, 38, .55); color: var(--snow); font: 700 14px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; border-radius: 2px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .35s var(--ease), background .25s, border-color .25s, color .25s; }
.btn small { font-weight: 600; letter-spacing: .04em; text-transform: none; color: var(--mist); font-size: 12px; }
.btn:hover { border-color: var(--gold); background: rgba(242, 179, 61, .12); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--foil); background-size: 220% 100%; color: var(--ink); border-color: transparent; animation: shine 6s linear infinite; box-shadow: 0 8px 30px -10px rgba(242, 179, 61, .6); }
.btn.primary:disabled { filter: grayscale(.8) brightness(.6); animation: none; cursor: default; }
.btn.ghost { border-color: rgba(169, 184, 207, .3); }
.btn.sq { width: 44px; padding: 0; font-size: 20px; }
.btn.ink { background: transparent; color: var(--paper-ink); border-color: rgba(42, 31, 20, .5); backdrop-filter: none; }
@keyframes shine { to { background-position: -220% 0; } }

/* ---------- loading */
#loading { position: fixed; inset: 0; display: grid; place-items: center; background: var(--night); z-index: 50; transition: opacity .8s var(--ease), visibility .8s; }
#loading.done { opacity: 0; visibility: hidden; }
#loading b { font: italic 800 28px var(--display); letter-spacing: .2em; background: var(--foil); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 3s linear infinite; }
#loading i { display: block; height: 1px; margin-top: 14px; background: var(--gold); transform-origin: left; animation: load 1.2s var(--ease) infinite; }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); opacity: 0; } }

/* ---------- title */
#title { position: fixed; inset: 0; padding: var(--top) var(--gut-r) var(--bot) var(--gut); display: flex; flex-direction: column; justify-content: center; background: linear-gradient(90deg, rgba(11, 20, 38, .82) 0%, rgba(11, 20, 38, .35) 46%, transparent 70%); }
.t-copy { max-width: min(540px, 52vw); display: flex; flex-direction: column; gap: 12px; }
.kicker { margin: 0; font: 700 12px var(--ui); letter-spacing: .42em; text-transform: uppercase; color: var(--gold); }
.kicker span { color: var(--mist); letter-spacing: .3em; }
.wordmark { margin: 0; font: italic 900 clamp(46px, 9.4vw, 132px)/.86 var(--display); font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 144; letter-spacing: -.02em; text-wrap: balance; }
.wordmark .w { display: inline-block; white-space: nowrap; background: none; animation: none; filter: none; }
.wordmark .w span { display: inline-block; background: var(--foil); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise 1.1s var(--ease) both, shine 9s linear infinite; animation-delay: calc(var(--i) * 45ms), 0s; filter: drop-shadow(0 4px 24px rgba(242, 179, 61, .25)); }
@keyframes rise { from { opacity: 0; transform: translateY(.35em) rotate(4deg); } }
.tag { margin: 0; max-width: 42ch; color: #d7e0ee; font: 500 15px/1.5 var(--ui); }
.t-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 4px; }
.t-nav .btn { min-width: 240px; justify-content: space-between; }
.t-nav .btn.primary { justify-content: center; min-width: 240px; font-size: 15px; }
.t-nav .row { display: flex; flex-wrap: wrap; gap: 6px; }
.t-nav .row .btn { min-width: 0; }
.rank { margin: 6px 0 0; color: var(--mist); font-size: 13px; }
.rank .lbl, .lbl { font: 700 11px var(--ui); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-right: .4em; }
.rank em { color: #7d8ca6; }
.june-link { align-self: flex-start; color: var(--mist); font: 700 12px var(--ui); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 10px 0; }
.june-link:hover { color: var(--gold-hi); }
.tip { position: absolute; right: var(--gut-r); bottom: var(--bot); max-width: 34ch; margin: 0; text-align: right; color: var(--mist); font: italic 400 14px/1.4 var(--display); }

/* ---------- chapter select */
#select { position: fixed; inset: 0; padding: var(--top) var(--gut-r) var(--bot) var(--gut); }
#select .back { position: absolute; top: var(--top); left: var(--gut); }
.hero-chip { position: absolute; top: var(--top); right: var(--gut-r); min-height: 44px; padding: 0 14px; border: 1px solid rgba(169, 184, 207, .3); background: rgba(11, 20, 38, .6); border-radius: 2px; font-size: 14px; }
.hero-chip u { color: var(--gold); margin-left: .4em; text-underline-offset: 3px; }
.ch-card { position: absolute; left: 50%; top: calc(var(--top) + 54px); transform: translateX(-50%); width: min(560px, calc(100% - 32px)); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ch-num { margin: 0; display: flex; align-items: baseline; gap: 12px; font: italic 300 22px var(--display); color: var(--gold); }
.ch-num small { font: 700 11px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--mist); font-style: normal; }
#ch-name { margin: 0; font: italic 800 clamp(30px, 5.6vw, 58px)/1 var(--display); font-variation-settings: 'SOFT' 100, 'WONK' 1; text-shadow: 0 4px 30px rgba(0, 0, 0, .5); text-wrap: balance; }
.ch-meta { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font: 700 11px var(--ui); letter-spacing: .22em; text-transform: uppercase; color: #cfd9e8; }
.ch-meta span + span::before { content: '·'; margin-right: 14px; color: var(--gold); }
.ch-row { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--mist); }
.sparks { display: inline-flex; gap: 6px; }
.spk { width: 14px; height: 14px; transform: rotate(45deg); border: 1px solid rgba(158, 216, 232, .6); }
.spk.on { background: linear-gradient(135deg, var(--aurora), var(--aurora-v)); border-color: transparent; box-shadow: 0 0 12px var(--aurora); }
.medal { text-transform: uppercase; letter-spacing: .14em; font: 800 11px var(--ui); }
.medal.gold { color: var(--gold); } .medal.silver { color: #d8e0ec; } .medal.bronze { color: #d89a5a; }
.ch-actions { display: flex; gap: 8px; margin-top: 6px; }
.dots { position: absolute; left: 50%; bottom: calc(var(--bot) + 30px); transform: translateX(-50%); display: flex; gap: 6px; }
.dot { width: 36px; height: 36px; border: 1px solid rgba(169, 184, 207, .3); background: rgba(11, 20, 38, .55); border-radius: 50%; color: var(--mist); font-size: 14px; }
.dot.on { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 179, 61, .15); }
.dot.locked { opacity: .45; }
.hint { position: absolute; left: 0; right: 0; bottom: var(--bot); margin: 0; text-align: center; font: italic 400 13px var(--display); color: var(--mist); }

/* ---------- story */
#story { position: fixed; inset: 0; padding: var(--top) var(--gut-r) var(--bot) var(--gut); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: end; gap: 12px; background: radial-gradient(ellipse at 30% 60%, rgba(255, 255, 255, .06), transparent 60%), var(--bgc, rgba(11, 20, 38, .92)); cursor: pointer; }
#story[data-bg="party"] { --bgc: linear-gradient(160deg, #3a1f4a, #0b1426 70%); }
#story[data-bg="map"] { --bgc: linear-gradient(160deg, #3a2a16, #0b1426 75%); }
#story[data-bg="sky"], #story[data-bg="aurora"] { --bgc: linear-gradient(170deg, #0c3a3a, #1a1446 55%, #0b1426); }
#story[data-bg="cabin"] { --bgc: linear-gradient(170deg, #0c3a3a 0%, #2a1a3e 40%, #3a2410 100%); }
#story[data-bg="chilkoot"] { --bgc: linear-gradient(170deg, #f2a6b8 0%, #6a6aa8 45%, #0b1426); }
#story[data-bg="breakup"] { --bgc: linear-gradient(170deg, #4ab0d8, #1a5a6a 55%, #0b1426); }
#story[data-bg="dawson"] { --bgc: linear-gradient(170deg, #ffb46a, #6a4a8a 55%, #0b1426); }
#story[data-bg="bonanza"] { --bgc: linear-gradient(170deg, #e8c070, #6a4a2a 55%, #0b1426); }
#story[data-bg="tombstone"] { --bgc: linear-gradient(170deg, #c8584a, #4a2a3a 55%, #0b1426); }
#story[data-bg="kluane"] { --bgc: linear-gradient(170deg, #9ad0f2, #2a4a8a 55%, #0b1426); }
#story[data-bg="quest"] { --bgc: linear-gradient(170deg, #e8eef6, #8a9ab8 50%, #0b1426); }
.st-art { align-self: stretch; display: grid; place-items: end center; min-height: 0; }
.st-art img { width: min(42vw, 420px); max-height: min(78vh, 520px); max-width: 100%; object-fit: contain; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .45)); }
.st-art img.pop { animation: popin .6s var(--ease); }
@keyframes popin { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.st-box { background: rgba(11, 20, 38, .78); border: 1px solid rgba(242, 179, 61, .35); padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.st-top { margin: 0; display: flex; justify-content: space-between; font: 800 12px var(--ui); letter-spacing: .24em; text-transform: uppercase; }
.st-top span { color: var(--mist); }
#st-text { margin: 0; min-height: 3.2em; font: 500 clamp(17px, 2.3vw, 24px)/1.35 var(--display); font-variation-settings: 'SOFT' 50; text-wrap: pretty; }
#st-text.narr { font-style: italic; color: var(--gold-hi); }
.st-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- HUD */
#hud { position: fixed; inset: 0; }
#hud button { pointer-events: auto; }
.hud-l { position: absolute; top: var(--top); left: var(--gut); display: flex; align-items: center; gap: 10px; }
.goldring { position: relative; width: 48px; height: 48px; }
.goldring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.goldring .track { fill: rgba(11, 20, 38, .55); stroke: rgba(242, 179, 61, .25); stroke-width: 3; }
.goldring .arc { fill: none; stroke: var(--gold); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 113; stroke-dashoffset: 113; transition: stroke-dashoffset .2s; }
.fever .goldring .arc { stroke: var(--gold-hi); filter: drop-shadow(0 0 6px var(--gold)); }
.goldring .nug { position: absolute; inset: 14px; border-radius: 40% 55% 45% 60%; background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 45%, var(--gold-lo)); box-shadow: 0 0 10px rgba(242, 179, 61, .5); }
.goldtxt b { display: block; font-size: 26px; line-height: 1; color: var(--snow); text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
.goldtxt small, .goldtxt { font: 800 10px var(--ui); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.scoretxt { margin-left: 6px; display: flex; align-items: baseline; gap: 6px; }
.scoretxt b { font-size: 17px; color: #dbe4f2; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.mult { font: 400 18px var(--game); color: var(--aurora); opacity: 0; transition: opacity .2s; }
.mult.on { opacity: 1; }
.hud-c { position: absolute; top: calc(var(--top) + 4px); left: 50%; transform: translateX(-50%); width: min(36vw, 340px); text-align: center; }
.hud-c p { margin: 0 0 6px; font: 800 10px var(--ui); letter-spacing: .26em; text-transform: uppercase; color: #e6edf7; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog { height: 3px; background: rgba(243, 246, 250, .22); overflow: hidden; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); transform-origin: left; transform: scaleX(0); }
.hud-c .glyph { position: absolute; right: -18px; top: 13px; color: var(--gold); font-size: 13px; }
.hud-r { position: absolute; top: var(--top); right: var(--gut-r); display: flex; gap: 12px; align-items: center; }
.hearts { display: flex; gap: 6px; }
.locket { width: 18px; height: 18px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; border: 2px solid var(--gold); transform: rotate(-45deg); position: relative; }
.locket.on { background: radial-gradient(circle at 40% 35%, #ffb0b8, var(--ember) 60%, #a83030); border-color: var(--gold-hi); }
.bubble { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--glacier); box-shadow: inset 0 0 8px var(--glacier); }
.ability { position: absolute; right: var(--gut-r); bottom: var(--bot); width: 72px; height: 72px; border: 0; background: rgba(11, 20, 38, .55); border-radius: 50%; display: grid; place-items: center; }
.ability svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ability .track { fill: none; stroke: rgba(242, 179, 61, .3); stroke-width: 3; }
.ability .arc { fill: none; stroke: rgba(11, 20, 38, .85); stroke-width: 5; stroke-dasharray: 151; }
.ability span { font-size: 26px; color: var(--mist); }
.ability.ready { box-shadow: 0 0 0 2px var(--gold), 0 0 24px rgba(242, 179, 61, .55); }
.ability.ready span { color: var(--gold-hi); }
.toasts { position: absolute; left: var(--gut); bottom: var(--bot); display: flex; flex-direction: column; gap: 6px; max-width: min(440px, 70vw); }
.toast { display: flex; flex-direction: column; gap: 2px; padding: 9px 13px; background: rgba(11, 20, 38, .72); border-left: 3px solid var(--gold); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: slidein .45s var(--ease); transition: opacity .4s, transform .4s; }
.toast b { font: 800 10px var(--ui); letter-spacing: .22em; text-transform: uppercase; }
.toast span { font: 500 15px/1.3 var(--display); }
.toast.out { opacity: 0; transform: translateX(-12px); }
@keyframes slidein { from { opacity: 0; transform: translateX(-16px); } }
.pops { position: absolute; left: 0; right: 0; top: 30%; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pop { font: 400 22px var(--game); letter-spacing: .03em; color: var(--snow); text-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 0 18px rgba(0, 0, 0, .4); animation: popup 1.1s var(--ease) forwards; text-transform: uppercase; }
.pop.big { font-size: 32px; }
.pop.gold { color: var(--gold-hi); } .pop.cool { color: var(--glacier); } .pop.aur { color: var(--aurora); } .pop.fever { color: var(--gold); } .pop.warn { color: var(--ember); }
@keyframes popup { 0% { opacity: 0; transform: translateY(14px) scale(.8); } 18% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-18px); } }
.count { position: absolute; inset: 0; display: grid; place-items: center; font: 400 clamp(64px, 14vw, 140px) var(--game); color: var(--gold-hi); text-shadow: 0 6px 0 var(--gold-lo), 0 0 40px rgba(242, 179, 61, .5); pointer-events: none; }
.count.go { animation: count .8s var(--ease); }
@keyframes count { from { opacity: 0; transform: scale(1.6); } }
.fps { position: absolute; right: var(--gut-r); top: calc(var(--top) + 52px); margin: 0; font: 700 11px var(--ui); color: var(--mist); }
.tutorial { position: absolute; left: 50%; top: 56%; transform: translateX(-50%); padding: 14px 18px; text-align: center; background: rgba(11, 20, 38, .7); border: 1px solid rgba(242, 179, 61, .4); animation: slidein .5s var(--ease); }
.tutorial p { margin: 2px 0; } .tutorial .kb { color: var(--mist); font-size: 12px; }
#ui.fever::after { content: ''; position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(242, 179, 61, .35); animation: pulse 1s ease-in-out infinite alternate; }
#ui.hurt::before { content: ''; position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px rgba(255, 90, 80, .55); animation: hurt .5s forwards; }
@keyframes pulse { to { box-shadow: inset 0 0 70px rgba(242, 179, 61, .2); } }
@keyframes hurt { to { opacity: 0; } }

/* ---------- menus */
#pause, #settings { position: fixed; inset: 0; display: grid; place-items: center; padding: var(--top) var(--gut-r) var(--bot) var(--gut); background: rgba(5, 10, 20, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.panel.menu { width: min(380px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 22px; background: rgba(11, 20, 38, .88); border: 1px solid rgba(242, 179, 61, .35); max-height: 100%; overflow-y: auto; touch-action: pan-y; }
.panel.menu h2 { margin: 0 0 6px; font: italic 800 30px var(--display); color: var(--gold); }
.settings label { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-weight: 700; }
.settings label.chk { justify-content: flex-start; font-weight: 600; }
.settings select, .settings input[type=range] { width: 52%; accent-color: var(--gold); }
.settings select { min-height: 36px; background: var(--night-2); color: var(--snow); border: 1px solid rgba(169, 184, 207, .3); border-radius: 2px; padding: 0 8px; }
.settings input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--gold); }
.small { color: var(--mist); font-size: 12px; margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- results: the Klondike Nugget */
#results { position: fixed; inset: 0; display: grid; place-items: center; padding: var(--top) var(--gut-r) var(--bot) var(--gut); background: rgba(5, 10, 20, .5); overflow-y: auto; touch-action: pan-y; }
.paper { width: min(880px, 100%); max-height: 100%; overflow-y: auto; background: var(--paper); color: var(--paper-ink); padding: 16px 22px 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); transform: rotate(-.6deg); animation: paperin .8s var(--ease); background-image: radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, .5), transparent 50%), radial-gradient(ellipse at 100% 100%, rgba(150, 110, 60, .18), transparent 60%); touch-action: pan-y; }
@keyframes paperin { from { opacity: 0; transform: translateY(40px) rotate(-3deg) scale(.96); } }
.np-mast { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; border-bottom: 3px double var(--paper-ink); padding-bottom: 4px; }
.np-mast h1 { margin: 0; font: 900 clamp(26px, 5vw, 46px)/1 var(--display); font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0; letter-spacing: -.01em; text-align: center; white-space: nowrap; }
.np-ear { margin: 0; font: 700 10px var(--ui); letter-spacing: .18em; text-transform: uppercase; }
.np-ear:last-child { text-align: right; }
.np-date { margin: 4px 0; text-align: center; font: italic 500 12px var(--display); border-bottom: 1px solid rgba(42, 31, 20, .5); padding-bottom: 4px; }
.np-head { margin: 8px 0 2px; font: 900 clamp(22px, 4.2vw, 40px)/1.02 var(--display); font-variation-settings: 'opsz' 100, 'SOFT' 0; text-align: center; text-transform: uppercase; text-wrap: balance; }
.np-sub { margin: 0 0 10px; text-align: center; font: italic 500 13px var(--display); }
.np-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto; gap: 16px; align-items: start; border-top: 1px solid rgba(42, 31, 20, .45); padding-top: 10px; }
.np-body figure { margin: 0; }
.np-body img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; filter: grayscale(1) sepia(.55) contrast(1.25) brightness(1.05); mix-blend-mode: multiply; border: 1px solid var(--paper-ink); }
figcaption { font: italic 400 11px/1.3 var(--display); margin-top: 4px; }
.np-stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.np-stats div { border-bottom: 1px dotted rgba(42, 31, 20, .45); padding-bottom: 2px; }
.np-stats dt { font: 700 9px var(--ui); letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.np-stats dd { margin: 0; font-size: 19px; }
.np-news { margin: 10px 0 0; padding-left: 16px; font: 500 13px/1.35 var(--display); }
.np-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.stamp { width: 104px; height: 104px; border: 3px solid #a8321e; border-radius: 50%; color: #a8321e; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-12deg); outline: 1px solid #a8321e; outline-offset: -8px; mix-blend-mode: multiply; }
.stamp b { font: 400 26px var(--game); line-height: 1; }
.stamp small { font: 800 8px var(--ui); letter-spacing: .2em; text-transform: uppercase; }
.paper .medal { color: var(--paper-ink); }
.np-next { margin: 10px 0 6px; text-align: center; font: italic 600 15px var(--display); color: #7a3a14; }
.np-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; border-top: 3px double var(--paper-ink); padding-top: 10px; }

/* ---------- lists: cast, cards, board, credits */
.screen.list { position: fixed; inset: 0; padding: var(--top) var(--gut-r) var(--bot) var(--gut); background: linear-gradient(180deg, rgba(11, 20, 38, .9), rgba(11, 20, 38, .97)); display: flex; flex-direction: column; gap: 12px; }
.lh { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lh h2 { margin: 0; font: italic 800 clamp(24px, 4vw, 38px) var(--display); color: var(--gold); }
.lh p { margin: 0; color: var(--mist); margin-left: auto; }
.grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding-bottom: 12px; touch-action: pan-y; align-content: start; }
.card.hero { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px; text-align: left; background: rgba(18, 32, 58, .8); border: 1px solid rgba(169, 184, 207, .18); border-radius: 2px; transition: border-color .2s, transform .3s var(--ease); }
.card.hero:hover { border-color: var(--gold); transform: translateY(-2px); }
.card.hero.cur { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.card.hero .ph { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, rgba(242, 179, 61, .18), transparent 65%); }
.card.hero img { width: 100%; height: 100%; object-fit: contain; }
.card.hero b { font: italic 800 18px var(--display); color: var(--c); }
.card.hero i { font: 800 10px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-style: normal; }
.card.hero small { color: var(--mist); font-size: 12px; line-height: 1.35; }
.card.hero em { margin-top: auto; padding-top: 6px; font: 800 11px var(--ui); letter-spacing: .14em; text-transform: uppercase; font-style: normal; }
.card.hero.locked img { filter: brightness(0) drop-shadow(0 0 1px rgba(242, 179, 61, .6)); opacity: .7; }
.card.hero.nope { animation: nope .4s; }
@keyframes nope { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.kcard { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: linear-gradient(160deg, #18294a, #0e1a30); border: 1px solid rgba(242, 179, 61, .5); outline: 1px solid rgba(242, 179, 61, .25); outline-offset: -6px; min-height: 230px; }
.kcard header { display: flex; justify-content: space-between; font: 800 10px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.kcard .fact b { display: block; font: 400 30px var(--game); color: var(--gold-hi); line-height: 1; }
.kcard .fact small { font: 700 11px var(--ui); color: var(--mist); }
.kcard h3 { margin: 0; font: italic 800 20px var(--display); }
.kcard p { margin: 0; font-size: 13px; color: #d4ddea; line-height: 1.45; }
.kcard footer { margin-top: auto; font: italic 400 11px var(--display); color: #8a9ab4; }
.kcard.locked { opacity: .55; border-style: dashed; }
.board-wrap { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; touch-action: pan-y; }
.board { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.board li { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 10px; align-items: baseline; padding: 10px 12px; background: rgba(18, 32, 58, .7); border-left: 2px solid rgba(242, 179, 61, .3); }
.board li.you { border-left-color: var(--aurora); background: rgba(59, 240, 168, .08); }
.board b { font: italic 800 17px var(--display); } .board em { color: var(--mist); font-size: 13px; }
.panel.missions { padding: 14px; background: rgba(18, 32, 58, .7); border: 1px solid rgba(242, 179, 61, .3); }
.missions h3 { margin: 0 0 8px; font: italic 800 20px var(--display); color: var(--gold); }
.missions ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.credits { flex: 1; min-height: 0; overflow-y: auto; columns: 2 280px; column-gap: 28px; touch-action: pan-y; padding-bottom: 20px; }
.credits section { break-inside: avoid; margin-bottom: 18px; }
.credits h4 { margin: 0 0 6px; font: 800 11px var(--ui); letter-spacing: .3em; color: var(--gold); }
.credits p { margin: 0 0 4px; display: flex; flex-direction: column; }
.credits b { font: italic 700 17px var(--display); } .credits span { color: var(--mist); font-size: 13px; }
.credits .ack p { font: italic 400 15px/1.5 var(--display); color: #d7e0ee; }
.credits .love { font: italic 700 18px var(--display); color: var(--gold-hi); }

/* ---------- phone portrait */
@media (max-aspect-ratio: 1/1) {
  #title { justify-content: flex-end; background: linear-gradient(0deg, rgba(11, 20, 38, .92) 0%, rgba(11, 20, 38, .55) 55%, transparent 80%); }
  .t-copy { max-width: none; }
  .wordmark { font-size: clamp(52px, 17vw, 96px); }
  .tip { display: none; }
  .t-nav > .btn { min-width: 0; width: 100%; }
  .t-nav .row .btn { flex: 1 1 28%; padding: 0 .6em; font-size: 12px; }
  .wordmark { margin-bottom: 2px; }
  .ch-card { top: auto; bottom: calc(var(--bot) + 84px); }
  #story { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .st-art img { max-height: 46vh; }
  .np-body { grid-template-columns: 1fr; }
  .np-side { flex-direction: row; justify-content: center; }
  .np-mast { grid-template-columns: 1fr; } .np-ear { display: none; }
  .board-wrap { grid-template-columns: 1fr; }
  .hud-c { top: calc(var(--top) + 58px); width: 62vw; }
}
/* ---------- short landscape phones */
@media (max-height: 460px) and (min-aspect-ratio: 1/1) {
  .tip { display: none; } .kicker { font-size: 10px; }
  .t-copy { gap: 7px; } .tag { font-size: 13px; } .t-nav { gap: 6px; } .t-nav .btn { min-height: 38px; min-width: 210px; }
  .wordmark { font-size: clamp(38px, 13vh, 76px); }
  .rank { font-size: 12px; margin-top: 2px; }
  .ch-card { top: calc(var(--top) + 46px); gap: 3px; } #ch-name { font-size: clamp(26px, 5vw, 40px); }
  .dots { bottom: calc(var(--bot) + 22px); } .hint { display: none; }
  .paper { padding: 8px 14px; } .np-head { font-size: 21px; margin-top: 4px; } .np-sub, figcaption, .np-date { display: none; } .np-body { gap: 10px; padding-top: 6px; } .np-body img { aspect-ratio: 16 / 9; max-height: 34vh; } .stamp { width: 78px; height: 78px; } .np-stats dd { font-size: 16px; } .np-news { margin-top: 4px; font-size: 12px; } .np-next { margin: 4px 0; font-size: 13px; } .np-actions { padding-top: 6px; } .np-mast h1 { font-size: 26px; }
  .st-art img { max-height: 70vh; }
}
#ui.rm *, #ui.rm *::before, #ui.rm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
