/* OUTLIER — pixel-art mission control */
:root {
  --space: #0b1430;
  --space-2: #121d42;
  --space-3: #1c2a5a;
  --cream: #f4ead5;
  --cream-2: #cfc3a6;
  --ink: #17132b;
  --ink-soft: #4a4363;
  --orange: #ff6b35;
  --orange-2: #b4421b;
  --mustard: #f2b134;
  --mustard-2: #c98a1f;
  --teal: #3fb8af;
  --rose: #e85d75;
  --violet: #8c7ae6;
  --line: #2a3a72;
  --muted: #a9b0d0;
  --grey: #9aa3c7;
  --grey2: #5b6286;
  --px: 4px;
  --display: 'Pixelify Sans', 'Silkscreen', ui-monospace, monospace;
  --body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --label: 'Silkscreen', 'Pixelify Sans', ui-monospace, monospace;
  --mono: 'VT323', ui-monospace, monospace;
  --t-liftoff: #9aa3c7;
  --t-orbit: var(--teal);
  --t-moonshot: var(--mustard);
  --t-deep-space: var(--violet);
  --t-outlier: var(--orange);
  --t-miss: #5b6286;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--space);
  color: var(--cream); font-family: var(--display); font-size: 18px; line-height: 1.45; overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: var(--px) solid var(--mustard); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
canvas.px { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
::selection { background: var(--orange); color: var(--ink); }

/* ---------- FX layers ---------- */
.fx-bg, .fx-fg { position: fixed; inset: 0; width: 100vw; height: 100vh; image-rendering: pixelated; pointer-events: none; }
.fx-bg { z-index: 0; }
.fx-fg { z-index: 90; }
.crt {
  position: fixed; inset: 0; pointer-events: none; z-index: 95;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, .45) 100%);
  animation: crt-flicker 6s steps(1) infinite;
}
@keyframes crt-flicker { 0%, 100% { opacity: 1; } 47% { opacity: .85; } 48% { opacity: 1; } 83% { opacity: .92; } }
[data-fx="off"] .crt { display: none; }
[data-fx="lite"] .crt { animation: none; opacity: .6; }
body.alarm::before {
  content: ''; position: fixed; inset: 0; z-index: 85; pointer-events: none;
  box-shadow: inset 0 0 0 calc(var(--px) * 2) var(--rose), inset 0 0 120px rgba(232, 93, 117, .55);
  animation: alarm .5s steps(2) infinite;
}
@keyframes alarm { 50% { opacity: .25; } }

/* ---------- pixel boxes: notched corners via stacked hard shadows ---------- */
.px-box {
  --bc: var(--line); --bg: var(--space-2);
  background: var(--bg);
  box-shadow: 0 calc(var(--px) * -1) 0 0 var(--bc), 0 var(--px) 0 0 var(--bc), calc(var(--px) * -1) 0 0 0 var(--bc), var(--px) 0 0 0 var(--bc),
    0 0 0 0 transparent, var(--px) calc(var(--px) * 2) 0 0 rgba(0, 0, 0, .45);
  margin: var(--px);
}
.px-card {
  background: var(--cream); color: var(--ink);
  box-shadow: 0 calc(var(--px) * -1) 0 0 var(--cream), 0 var(--px) 0 0 var(--cream), calc(var(--px) * -1) 0 0 0 var(--cream), var(--px) 0 0 0 var(--cream),
    0 calc(var(--px) * 3) 0 0 var(--cream-2), calc(var(--px) * 2) calc(var(--px) * 5) 0 0 rgba(0, 0, 0, .5);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 12px clamp(16px, 4vw, 40px); background: rgba(11, 20, 48, .88); backdrop-filter: blur(6px);
  border-bottom: var(--px) solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--label); font-weight: 700; font-size: 22px; letter-spacing: .08em; }
.brand .logo { width: 44px; height: 28px; }
.brand:hover span { color: var(--orange); text-shadow: 2px 0 var(--teal), -2px 0 var(--rose); }
.nav { display: flex; gap: 6px; margin-right: auto; }
.nav a { text-decoration: none; padding: 6px 12px; font-family: var(--label); font-size: 14px; color: var(--muted); }
.nav a:hover { color: var(--cream); background: var(--space-3); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--cream); box-shadow: 0 var(--px) 0 var(--cream-2); }
.nav-icons { display: flex; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; justify-content: center; padding: 0 8px;
  background: var(--space-2); border: 0; cursor: pointer; color: var(--cream);
  box-shadow: 0 -3px 0 var(--line), 0 3px 0 var(--line), -3px 0 0 var(--line), 3px 0 0 var(--line);
}
.icon-btn:hover { background: var(--space-3); color: var(--mustard); }
.fx-btn span { font-family: var(--label); font-size: 12px; text-transform: uppercase; }

main { position: relative; z-index: 2; flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 40px) 72px; outline: none; }


/* ---------- type & buttons ---------- */
h1, h2, h3 { line-height: 1.05; margin: 0; font-weight: 700; }
.eyebrow { font-family: var(--label); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mustard); }
.lede { color: var(--muted); font-size: 21px; max-width: 34ch; }
.page-title { font-size: clamp(34px, 5vw, 52px); margin: 10px 0 28px; text-shadow: 4px 4px 0 var(--orange-2); }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px;
  border: 0; cursor: pointer; font-family: var(--label); font-size: 15px; text-decoration: none; text-transform: uppercase; letter-spacing: .04em;
  --b: var(--ink); --s: var(--orange-2);
  box-shadow: 0 -4px 0 0 var(--b), 0 4px 0 0 var(--b), -4px 0 0 0 var(--b), 4px 0 0 0 var(--b), 4px 8px 0 0 var(--s);
  margin: 4px; transition: transform .08s steps(2), box-shadow .08s steps(2);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 0 -4px 0 0 var(--b), 0 4px 0 0 var(--b), -4px 0 0 0 var(--b), 4px 0 0 0 var(--b), 6px 10px 0 0 var(--s); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 -4px 0 0 var(--b), 0 4px 0 0 var(--b), -4px 0 0 0 var(--b), 4px 0 0 0 var(--b); }
.btn-primary { background: var(--orange); color: var(--ink); overflow: hidden; }
.btn-primary::after { /* pixel shine sweep */
  content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 22%;
  background: repeating-linear-gradient(90deg, rgba(255, 248, 232, .55) 0 4px, transparent 4px 8px);
  animation: shine 2.8s steps(14) infinite; pointer-events: none;
}
@keyframes shine { 0%, 55% { left: -40%; } 100% { left: 130%; } }
.btn-ghost { background: var(--space-2); color: var(--cream); --b: var(--line); --s: rgba(0, 0, 0, .5); }
.btn-ghost:hover { color: var(--mustard); }
.btn-cream { background: var(--cream); color: var(--ink); --b: var(--ink); --s: var(--cream-2); }
.btn-outline { background: transparent; color: var(--ink); --b: var(--ink-soft); --s: transparent; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.blink { animation: blink 1s steps(2) infinite; color: var(--orange); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: center; min-height: 480px; }
.hero h1 { font-size: clamp(50px, 7.6vw, 92px); margin: 14px 0 18px; text-shadow: 5px 5px 0 rgba(0, 0, 0, .45); }
.hero h1 .w { display: inline-block; animation: word-in .5s steps(5) both; animation-delay: calc(var(--d) * 110ms + 250ms); }
@keyframes word-in { from { transform: translateY(40px); opacity: 0; clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.hero h1 em { font-style: normal; color: var(--orange); position: relative; }
.glitchy::before, .glitchy::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; }
.glitchy::before { color: var(--teal); animation: glitch-a 3.2s steps(1) infinite; }
.glitchy::after { color: var(--rose); animation: glitch-b 3.2s steps(1) infinite; }
@keyframes glitch-a { 0%, 88%, 100% { clip-path: inset(0 0 100% 0); transform: none; } 89% { clip-path: inset(10% 0 55% 0); transform: translate(-6px, 0); } 92% { clip-path: inset(60% 0 8% 0); transform: translate(5px, 0); } 95% { clip-path: inset(30% 0 40% 0); transform: translate(-3px, 0); } }
@keyframes glitch-b { 0%, 88%, 100% { clip-path: inset(0 0 100% 0); transform: none; } 90% { clip-path: inset(50% 0 20% 0); transform: translate(6px, 0); } 93% { clip-path: inset(5% 0 70% 0); transform: translate(-5px, 0); } 96% { clip-path: inset(75% 0 2% 0); transform: translate(4px, 0); } }
.hero .row { margin-top: 28px; }
.hero-meta { margin-top: 22px; font-family: var(--mono); font-size: 21px; color: var(--muted); display: flex; gap: 6px 18px; flex-wrap: wrap; }
.hero-meta b { color: var(--mustard); font-weight: 400; }
.hero-canvas { width: 100%; height: auto; aspect-ratio: 200 / 145; }

.section { margin-top: 90px; }
.section > h2 { font-size: clamp(32px, 4.4vw, 48px); margin: 10px 0 26px; text-shadow: 4px 4px 0 rgba(0, 0, 0, .45); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 22px; transition: transform .1s steps(2); }
.step:hover { transform: translateY(-4px); --bc: var(--orange); }
.step::before { counter-increment: step; content: '0' counter(step); font-family: var(--label); color: var(--orange); font-size: 20px; }
.step h3 { font-size: 22px; margin: 10px 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

.tier-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tier-card {
  padding: 18px; background: var(--cream); color: var(--ink); position: relative; margin: 4px;
  box-shadow: 0 -4px 0 var(--cream), 0 4px 0 var(--cream), -4px 0 0 var(--cream), 4px 0 0 var(--cream), 0 12px 0 var(--tc);
  transition: transform .1s steps(2);
}
.tier-card:hover { transform: translateY(-6px) rotate(-1deg); }
.tier-card .tier-body { width: 64px; height: auto; margin: -4px 0 6px; }
.tier-card .pts { font-family: var(--mono); font-size: 22px; color: var(--ink-soft); }
.tier-card h3 { font-size: 24px; margin: 4px 0; }
.tier-card p { margin: 0; font-size: 15px; color: var(--ink-soft); }

.route-card { padding: 20px 12px 10px; }
.faq { display: grid; gap: 14px; max-width: 760px; }
.faq details { padding: 16px 20px; }
.faq details[open] { --bc: var(--mustard); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 19px; list-style: none; }
.faq summary::before { content: '▸ '; color: var(--orange); display: inline-block; transition: transform .1s steps(2); }
.faq details[open] summary::before { transform: rotate(90deg); }
.faq p { color: var(--muted); margin: 10px 0 0; }

/* ---------- route ---------- */
.route { margin-top: 30px; }
.route-wrap { overflow-x: auto; }
.route-px { position: relative; }
.route-px canvas { width: 100%; height: auto; aspect-ratio: 340 / 46; }
.route-px.labelled { min-width: 640px; padding-bottom: 56px; }
.route-labels span {
  position: absolute; top: calc(100% - 56px); transform: translateX(-50%); white-space: nowrap; text-align: center;
  font-family: var(--mono); font-size: 18px; line-height: 1; color: var(--muted);
}
.route-labels span.low { top: calc(100% - 30px); }
.route-labels span.reached { color: var(--cream); }
.route-labels small { display: block; font-size: 15px; color: var(--t-miss); }

/* ---------- category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.cat {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 160px; padding: 20px; text-decoration: none;
  animation: pop-in .35s steps(4) both; animation-delay: calc(var(--i) * 45ms); transition: transform .1s steps(2);
}
.cat:hover { transform: translate(-3px, -5px); --bc: var(--cc); }
.cat:hover .glyph { animation: wobble .4s steps(4) infinite; }
@keyframes wobble { 50% { transform: rotate(-8deg) scale(1.08); } }
.cat .glyph { width: 56px; height: 56px; background: var(--cc); display: grid; place-items: center; box-shadow: 0 -4px 0 var(--cc), 0 4px 0 var(--cc), -4px 0 0 var(--cc), 4px 0 0 var(--cc); margin: 4px; }
.cat .glyph canvas { width: 36px; height: 36px; }
.cat h3 { font-size: 23px; }
.cat span { font-family: var(--mono); font-size: 19px; color: var(--muted); }
@keyframes pop-in { from { transform: scale(.6) translateY(20px); opacity: 0; } }

/* ---------- game ---------- */
.game { max-width: 780px; margin: 0 auto; }
.game-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; font-family: var(--label); font-size: 12px; color: var(--muted); text-transform: uppercase; }
.pips { display: flex; gap: 6px; }
.pip { width: 24px; height: 12px; background: var(--space-3); box-shadow: 0 0 0 2px var(--line); }
.pip.done { background: var(--pc, var(--muted)); }
.pip.now { background: var(--cream); animation: blink 1s steps(2) infinite; }
.score-chip { color: var(--mustard); font-family: var(--mono); font-size: 26px; }

.card { padding: clamp(22px, 5vw, 40px); position: relative; margin: 4px; }
.stage-top { display: flex; justify-content: space-between; align-items: center; }
.q-num { font-family: var(--mono); font-size: 24px; color: var(--ink-soft); }
.cat-tag {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--label); font-size: 12px; text-transform: uppercase;
  background: var(--ink); color: var(--cream); padding: 5px 10px; box-shadow: 0 -3px 0 var(--ink), 0 3px 0 var(--ink), -3px 0 0 var(--ink), 3px 0 0 var(--ink); margin: 3px;
}
.cat-tag .px-icon { width: 18px; height: 18px; background: var(--cc, var(--orange)); padding: 2px; box-sizing: content-box; }
.prompt { font-size: clamp(32px, 5.6vw, 50px); margin: 20px 0 26px; line-height: 1.05; min-height: 1.05em; }
.prompt .caret { color: var(--orange); animation: blink .8s steps(2) infinite; margin-left: 4px; font-size: .8em; }
.standby { font-family: var(--mono); font-size: 26px; color: var(--ink-soft); padding: 60px 0; text-align: center; }

.fuel { height: 20px; background: var(--ink); padding: 4px; margin-bottom: 8px; }
.fuel > div {
  height: 100%; width: 100%; transition: width .1s steps(1);
  background: repeating-linear-gradient(90deg, var(--mustard) 0 10px, var(--orange) 10px 12px, transparent 12px 14px);
}
.fuel.low > div { background: repeating-linear-gradient(90deg, var(--rose) 0 10px, #ff9aab 10px 12px, transparent 12px 14px); animation: blink .5s steps(2) infinite; }
.fuel-label { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 22px; color: var(--ink-soft); margin-bottom: 18px; line-height: 1; }
.answer-form { display: flex; gap: 16px; align-items: center; }
.answer-input {
  flex: 1 1 auto; min-width: 0; height: 60px; border: 0; background: #fffaf0; padding: 0 18px; margin: 4px;
  font: 600 24px var(--display); color: var(--ink);
  box-shadow: 0 -4px 0 var(--ink), 0 4px 0 var(--ink), -4px 0 0 var(--ink), 4px 0 0 var(--ink), inset 4px 4px 0 var(--cream-2);
}
.answer-input:focus { outline: none; box-shadow: 0 -4px 0 var(--orange), 0 4px 0 var(--orange), -4px 0 0 var(--orange), 4px 0 0 var(--orange), inset 4px 4px 0 var(--cream-2); }
.answer-form .btn { height: 60px; }
.game-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 15px; color: var(--ink-soft); }
.linkish { background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-soft); font-family: var(--display); }
.linkish:hover { color: var(--orange-2); }
.hint { min-height: 26px; margin-top: 10px; font-size: 17px; font-weight: 600; color: var(--rose); }
.confirm { --bg: #fff3d6; --bc: var(--mustard); color: var(--ink); margin-top: 14px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; animation: pop-in .25s steps(3) both; }

.reveal { text-align: center; }
.badge {
  display: inline-grid; justify-items: center; gap: 2px; margin: 18px auto 12px; padding: 14px 26px 10px; background: var(--ink); color: var(--tc);
  box-shadow: 0 -4px 0 var(--tc), 0 4px 0 var(--tc), -4px 0 0 var(--tc), 4px 0 0 var(--tc), 6px 10px 0 rgba(0, 0, 0, .35);
  animation: stamp .5s cubic-bezier(.3, 1.7, .5, 1) both; transform: rotate(-4deg);
}
.badge .badge-body { width: 84px; height: auto; }
.badge-name { font-family: var(--label); font-size: 20px; text-transform: uppercase; }
.badge-pts { font-family: var(--mono); font-size: 28px; color: var(--cream); line-height: 1; }
.badge.tier-outlier { animation: stamp .5s cubic-bezier(.3, 1.7, .5, 1) both, rainbow-border 1s steps(6) .5s infinite; }
@keyframes rainbow-border { 0% { --tc: var(--orange); } 33% { --tc: var(--mustard); } 66% { --tc: var(--rose); } }
@keyframes stamp { from { transform: rotate(-4deg) scale(3); opacity: 0; } 60% { opacity: 1; } }
.reveal .your { font-size: 32px; font-weight: 700; }
.reveal .share { color: var(--ink-soft); margin: 4px 0 16px; font-family: var(--mono); font-size: 22px; }
.popular { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 22px; }
.chip { font-size: 15px; padding: 3px 10px; background: var(--cream-2); color: var(--ink); animation: pop-in .3s steps(3) both; animation-delay: calc(var(--i) * 60ms + 300ms); }
.chip.rare { background: #ffc9a8; }
.hist-label { font-family: var(--label); font-size: 12px; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- results ---------- */
.results .results-top { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end; margin-top: 18px; }
.big-score { font-size: clamp(72px, 13vw, 132px); font-weight: 700; line-height: .9; text-shadow: 6px 6px 0 var(--cream-2); }
.big-score small { font-size: .28em; color: var(--ink-soft); text-shadow: none; }
.dest { font-family: var(--mono); color: var(--ink-soft); font-size: 24px; }
.result-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.result-list li {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 10px 14px; background: #fffaf0;
  box-shadow: -4px 0 0 var(--tc); margin-left: 4px; animation: row-in .4s steps(4) both; animation-delay: calc(var(--i) * 110ms + 200ms);
}
@keyframes row-in { from { transform: translateX(-30px); opacity: 0; } }
.result-list .row-body { width: 40px; height: auto; }
.result-list .q { font-size: 15px; color: var(--ink-soft); }
.result-list .a { font-weight: 700; }
.result-list .p { font-family: var(--mono); font-size: 26px; text-align: right; line-height: 1; }
.result-list .p small { display: block; font-family: var(--label); font-size: 12px; color: var(--ink-soft); text-transform: uppercase; margin-top: 4px; }
.hist-head { margin-top: 24px; }
.hist { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 10px; }
.hist div { flex: 1; background: var(--cream-2); min-height: 4px; height: var(--h); animation: grow .5s steps(5) both; animation-delay: calc(var(--i) * 40ms); }
.hist div.me { background: var(--orange); }
@keyframes grow { from { height: 4px; } }
.actions { margin-top: 26px; }

/* ---------- archive / stats ---------- */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.archive-day { padding: 14px; text-decoration: none; animation: pop-in .3s steps(3) both; animation-delay: calc(var(--i) * 25ms); }
.archive-day:hover { --bc: var(--cream); transform: translateY(-3px); }
.archive-day b { display: block; font-size: 24px; }
.archive-day span { font-family: var(--mono); font-size: 18px; color: var(--muted); }
.archive-day.played { --bc: var(--teal); }
.archive-day.played em { font-style: normal; color: var(--teal); font-family: var(--mono); font-size: 18px; display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; margin: 18px 0; }
.stat-grid b { display: block; font-family: var(--mono); font-size: 44px; font-weight: 400; line-height: 1; }
.stat-grid span { font-family: var(--label); font-size: 12px; color: var(--ink-soft); text-transform: uppercase; }

/* ---------- dialog / toast / overlays ---------- */
.dialog {
  border: 0; padding: 0; max-width: min(560px, calc(100vw - 40px)); width: 100%; background: var(--cream); color: var(--ink); overflow: visible;
  box-shadow: 0 -4px 0 var(--cream), 0 4px 0 var(--cream), -4px 0 0 var(--cream), 4px 0 0 var(--cream), 8px 14px 0 rgba(0, 0, 0, .55);
}
.dialog[open] { animation: pop-in .25s steps(3) both; }
.dialog::backdrop { background: rgba(6, 10, 26, .78); }
.dialog-body { padding: 30px; max-height: 85vh; overflow: auto; }
.dialog h2 { font-size: 34px; margin: 6px 0 12px; }
.dialog .eyebrow { color: var(--orange-2); }
.dialog p, .dialog li { color: var(--ink-soft); }
.dialog .close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; background: var(--ink); color: var(--cream); cursor: pointer; font-size: 18px; }
.dialog .close:hover { background: var(--orange); color: var(--ink); }
.mini-tiers { display: grid; gap: 8px; padding: 0; list-style: none; }
.mini-tiers li { display: flex; gap: 10px; align-items: center; }
.mini-tiers .mini-body { width: 26px; height: auto; flex: none; }
.mini-tiers .grow { flex: 1; }
.mini-tiers .bar { width: 120px; height: 10px; background: var(--cream-2); overflow: hidden; }
.mini-tiers .bar span { display: block; height: 100%; background: var(--tc); }
.small { font-size: 14px; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 96;
  background: var(--cream); color: var(--ink); padding: 12px 20px; font-family: var(--label); font-size: 14px; text-transform: uppercase;
  box-shadow: 0 -4px 0 var(--cream), 0 4px 0 var(--cream), -4px 0 0 var(--cream), 4px 0 0 var(--cream), 6px 8px 0 rgba(0, 0, 0, .5);
  transition: transform .2s steps(3), opacity .2s steps(3);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { text-align: center; padding: 40px; }
.loading { text-align: center; padding: 90px 0; font-family: var(--mono); font-size: 26px; color: var(--muted); }
.prose { max-width: 680px; } .prose p { color: var(--muted); }

.float-text {
  position: fixed; z-index: 92; pointer-events: none; transform: translate(-50%, -50%);
  font-family: var(--label); font-size: 44px; font-weight: 700; text-shadow: 4px 4px 0 var(--ink), -2px -2px 0 var(--ink);
  animation: float-up 1.2s steps(12) forwards;
}
@keyframes float-up { 0% { transform: translate(-50%, 0) scale(.5); opacity: 0; } 15% { transform: translate(-50%, -20px) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -110px) scale(1); opacity: 0; } }
.slam {
  position: fixed; left: 50%; top: 38%; z-index: 93; pointer-events: none; white-space: nowrap;
  font-family: var(--label); font-weight: 700; font-size: clamp(44px, 10vw, 120px); color: var(--sc);
  text-shadow: 6px 6px 0 var(--ink), -4px 0 0 var(--teal), 4px 0 0 var(--rose);
  animation: slam 1.4s cubic-bezier(.2, 1.6, .4, 1) forwards;
}
@keyframes slam {
  0% { transform: translate(-50%, -50%) scale(4) rotate(-12deg); opacity: 0; }
  18% { transform: translate(-50%, -50%) scale(.92) rotate(-4deg); opacity: 1; }
  26% { transform: translate(-50%, -50%) scale(1.05) rotate(-4deg); }
  75% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); opacity: 1; clip-path: inset(0); }
  100% { transform: translate(-50%, -60%) scale(1) rotate(-4deg); opacity: 0; clip-path: inset(40% 0 40% 0); }
}
.countdown {
  position: fixed; inset: 0; z-index: 88; display: grid; place-content: center; text-align: center; gap: 10px;
  background: radial-gradient(circle, rgba(11, 20, 48, .9), rgba(6, 10, 26, .97)); cursor: pointer;
  animation: fade-in .25s steps(4) both;
}
@keyframes fade-in { from { opacity: 0; } }
.countdown.out { animation: fade-out .3s steps(3) forwards; }
@keyframes fade-out { to { opacity: 0; } }
.cd-title { font-family: var(--label); font-size: 16px; color: var(--mustard); text-transform: uppercase; letter-spacing: .14em; }
.cd-num { font-family: var(--label); font-weight: 700; font-size: clamp(90px, 22vw, 220px); line-height: 1; color: var(--cream); text-shadow: 8px 8px 0 var(--orange-2), -4px 0 0 var(--teal); min-height: 1em; }
.cd-num.pop { animation: cd-pop .5s steps(5) both; }
@keyframes cd-pop { from { transform: scale(2.4); opacity: 0; } 40% { opacity: 1; } }
.cd-hint { font-family: var(--mono); font-size: 20px; color: var(--muted); }

/* Glitch: RGB split + sliced jitter on the whole view */
.glitch { animation: glitch-view .38s steps(1) both; }
@keyframes glitch-view {
  0% { filter: drop-shadow(-4px 0 0 rgba(63, 184, 175, .8)) drop-shadow(4px 0 0 rgba(232, 93, 117, .8)); clip-path: inset(0 0 0 0); }
  20% { clip-path: inset(12% 0 60% 0); transform: translate(-10px, 0); }
  40% { clip-path: inset(55% 0 10% 0); transform: translate(8px, 0); filter: hue-rotate(80deg); }
  60% { clip-path: inset(30% 0 35% 0); transform: translate(-5px, 2px); }
  80% { clip-path: none; transform: translate(3px, 0); filter: drop-shadow(3px 0 0 rgba(242, 177, 52, .8)); }
  100% { clip-path: none; transform: none; filter: none; }
}
.shake { animation: shake .3s steps(4); }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { order: -1; max-width: 420px; width: 100%; margin: 0 auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .tier-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .topbar { gap: 10px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; flex-wrap: wrap; justify-content: center; gap: 2px; margin: 0; }
  .nav a { padding: 6px 8px; font-size: 12px; }
  .nav-icons { margin-left: auto; }
  .steps, .tier-strip { grid-template-columns: 1fr; }
  .answer-form { flex-direction: column; align-items: stretch; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .results .results-top { grid-template-columns: 1fr; }
  .pip { width: 14px; }
  .game-actions { flex-direction: column; }
}
[data-fx="off"] *, [data-fx="off"] *::before, [data-fx="off"] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  [data-fx="lite"] .hero h1 .w, [data-fx="lite"] .glitchy::before, [data-fx="lite"] .glitchy::after { animation: none; }
}

/* ================= layout v2 ================= */
.muted { color: var(--muted); } .px-card .muted, .dialog .muted { color: var(--ink-soft); }
.center { text-align: center; justify-content: center; }
.eyebrow.dark { color: var(--orange-2); }
.h3 { font-size: 26px; margin: 0 0 10px; }
.pad { padding: 22px; } .pad h3 { font-size: 22px; margin-bottom: 8px; } .pad p { margin: 0; color: var(--muted); }

/* nav dropdown */
.dropdown { position: relative; }
.dd-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 230px; padding: 8px;
  grid-template-columns: 1fr; gap: 2px; max-height: 70vh; overflow: auto;
}
.dropdown:hover .dd-menu, .dropdown:focus-within .dd-menu { display: grid; }
.dropdown::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.dd-menu a { padding: 8px 10px; text-decoration: none; font-family: var(--display); font-size: 16px; color: var(--cream); }
.dd-menu a:hover { background: var(--space-3); color: var(--mustard); }
.nav-hot { color: var(--mustard) !important; }
.nav-hot::before { content: '● '; color: var(--rose); animation: blink 1.2s steps(2) infinite; }

/* centered hero */
.hero-c { position: relative; display: grid; place-items: center; padding: 10px 0 20px; }
.hero-scene { width: min(520px, 100%); margin-bottom: -70px; position: relative; z-index: 0; }
.hero-panel { position: relative; z-index: 1; width: min(720px, 100%); text-align: center; padding: 30px clamp(18px, 4vw, 40px) 22px; }
.wordmark {
  position: relative; display: inline-block; font-family: var(--label); font-weight: 700; font-size: clamp(54px, 11vw, 110px); line-height: 1;
  color: var(--ink); letter-spacing: .04em; margin: 10px 0 8px; text-shadow: 5px 5px 0 var(--orange);
}
.wordmark.glitchy::before { color: var(--teal); text-shadow: none; } .wordmark.glitchy::after { color: var(--rose); text-shadow: none; }
.tagline { font-family: var(--mono); font-size: 24px; color: var(--ink-soft); margin: 0 0 18px; }
.status-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 18px; padding-top: 14px; border-top: 4px dashed var(--cream-2); }
.status-line a { font-family: var(--label); font-size: 12px; color: var(--ink-soft); text-decoration: none; }
.status-line a:hover { color: var(--orange-2); }
.btn-outline:hover { color: var(--orange-2); }

/* intro */
.intro h1 { font-size: clamp(32px, 5vw, 54px); text-shadow: 4px 4px 0 var(--orange-2); }
.lede.wide { max-width: 60ch; }
.intro-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; margin-top: 18px; }
.intro-grid p { color: var(--muted); }
.note { padding: 14px 18px; font-size: 16px; color: var(--muted); } .note b { color: var(--mustard); }
.demo { padding: 22px; transform: rotate(1.5deg); }
.demo-prompt { font-size: 30px; font-weight: 700; margin: 14px 0; line-height: 1.05; }
.demo .fuel > div { animation: demo-fuel 6s steps(24) infinite; }
@keyframes demo-fuel { from { width: 100%; } to { width: 10%; } }
.demo-input { background: #fffaf0; font-size: 22px; font-weight: 600; padding: 12px 16px; margin: 10px 4px; box-shadow: 0 -4px 0 var(--ink), 0 4px 0 var(--ink), -4px 0 0 var(--ink), 4px 0 0 var(--ink); }
.demo-input .caret { color: var(--orange); animation: blink .8s steps(2) infinite; }
.demo-badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 12px; background: var(--ink); color: var(--tc); font-family: var(--label); font-size: 13px; }
.demo-badge .mini-body { width: 22px; height: auto; }

.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.tips div { border-left: 4px solid var(--orange); padding: 4px 12px; }
.tips b { display: block; font-family: var(--label); font-size: 13px; color: var(--mustard); text-transform: uppercase; }
.tips span { color: var(--muted); font-size: 15px; }

.tier-table { padding: 8px 0; }
.tier-table .tr { display: grid; grid-template-columns: 1.3fr .6fr 1fr 1.3fr; gap: 12px; align-items: center; padding: 12px 20px; border-left: 6px solid var(--tc, transparent); }
.tier-table .tr + .tr { border-top: 2px dashed var(--line); }
.tier-table .th { font-family: var(--label); font-size: 12px; color: var(--muted); text-transform: uppercase; }
.tier-table .tier-name { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--tc); }
.tier-table .mini-body { width: 30px; height: auto; }
.tier-table b { font-family: var(--mono); font-weight: 400; font-size: 26px; }
.tier-table span { color: var(--muted); }
.tier-table .ex { color: var(--cream); font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.strategy { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.strategy li { color: var(--muted); padding-left: 26px; position: relative; }
.strategy li::before { content: '▸'; position: absolute; left: 0; color: var(--orange); }
.strategy b { color: var(--cream); }
.route-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; position: relative; }
.route-list::before { content: ''; position: absolute; left: 37px; top: 30px; bottom: 30px; border-left: 4px dotted var(--grey2); }
.route-list li { display: grid; grid-template-columns: 78px 1fr; gap: 16px; align-items: center; padding: 8px 0; position: relative; }
.route-list .route-body { width: 64px; height: auto; justify-self: center; background: var(--space); }
.route-list b { font-size: 22px; } .route-list .pts { font-family: var(--mono); font-size: 20px; color: var(--mustard); margin-left: 12px; }
.route-list p { margin: 2px 0 0; color: var(--muted); font-size: 16px; }

/* footer v2 */
.footer { position: relative; z-index: 2; margin-top: 70px; border-top: var(--px) solid var(--line); background: rgba(11, 20, 48, .85); padding: 0 clamp(16px, 4vw, 40px) 22px; }
.foot-banner { max-width: 1080px; margin: -36px auto 34px; padding: 26px; text-align: center; background: var(--orange); color: var(--ink);
  box-shadow: 0 -4px 0 var(--orange), 0 4px 0 var(--orange), -4px 0 0 var(--orange), 4px 0 0 var(--orange), 6px 12px 0 var(--orange-2); }
.foot-title { font-family: var(--label); font-weight: 700; font-size: clamp(22px, 3.4vw, 34px); }
.foot-sub { margin: 6px 0 14px; }
.foot-banner .btn-primary { background: var(--ink); color: var(--cream); --b: var(--ink); --s: rgba(0,0,0,.35); }
.foot-cols { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 2fr 1fr; gap: 26px; }
.foot-cols h4 { font-family: var(--label); font-size: 13px; color: var(--mustard); text-transform: uppercase; margin: 0 0 10px; }
.foot-cols a, .foot-link { display: block; color: var(--muted); text-decoration: none; padding: 3px 0; font-size: 16px; text-align: left; }
.foot-cols a:hover, .foot-link:hover { color: var(--cream); }
.foot-link { text-decoration: none; }
.foot-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; max-width: 1080px; margin: 26px auto 0; padding-top: 16px; border-top: 2px dashed var(--line); font-family: var(--mono); font-size: 18px; color: var(--muted); }

/* ================= multiplayer ================= */
canvas.critter { width: 36px; height: auto; aspect-ratio: 12 / 13; flex: none; }
.room-entry { max-width: 820px; margin: 0 auto; }
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 26px; }
.entry-card { padding: 24px; display: grid; gap: 14px; margin: 4px; }
.entry-card.narrow { max-width: 420px; }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-family: var(--label) !important; }
.jinx-word, .jinx { color: var(--rose); }
.jinx { font-family: var(--label); font-size: 12px; background: var(--rose); color: var(--cream); padding: 2px 6px; margin-left: 6px; vertical-align: middle; }
.hint-dark { color: var(--rose); min-height: 24px; font-weight: 600; }
.room { max-width: 1040px; margin: 0 auto; }
.room-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 28px; margin: 4px; }
.room-code { font-family: var(--label); font-weight: 700; font-size: clamp(48px, 10vw, 84px); letter-spacing: .14em; line-height: 1; text-shadow: 5px 5px 0 var(--orange); }
.room-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; margin-top: 26px; }
.crew-box, .launch-box { padding: 20px; }
.crew-box h3, .launch-box h3 { font-size: 22px; margin-bottom: 12px; }
.crew-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.crew-list li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--space); animation: pop-in .3s steps(3) both; animation-delay: calc(var(--i) * 50ms); }
.px-card .crew-list li { background: #fffaf0; }
.crew-list li.me { box-shadow: inset 4px 0 0 var(--mustard); }
.crew-list li.offline { opacity: .45; }
.crew-list .crew-name { flex: 1; font-weight: 600; } .crew-list small { color: var(--muted); font-weight: 400; }
.crown { color: var(--mustard); }
.crew-score { font-family: var(--mono); font-weight: 400; font-size: 26px; }
.crew-list .tick { font-family: var(--label); color: var(--muted); }
.crew-list li.answered .tick { color: var(--teal); }
.crew-list li.answered { box-shadow: inset -4px 0 0 var(--teal); }
.kick { color: var(--muted); font-size: 13px; }
.field { display: grid; gap: 6px; font-family: var(--label); font-size: 12px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.field select { font: 600 17px var(--display); padding: 10px; background: var(--space); color: var(--cream); border: 0; box-shadow: 0 0 0 4px var(--line); }
.launch-box .btn { margin-top: 10px; width: calc(100% - 8px); }
.room-play { display: grid; grid-template-columns: 1fr 280px; gap: 22px; align-items: start; }
.room-play .game { max-width: none; }
.room-play .crew-box { position: sticky; top: 90px; }
.prompt.small { font-size: clamp(24px, 4vw, 34px); margin: 14px 0; }
.transmitted { text-align: center; font-size: 22px; padding: 22px 0 8px; }
.result-list.mp li { grid-template-columns: 36px 1fr auto; }
.next-bar { height: 10px; background: var(--ink); padding: 2px; margin: 22px 0 8px; }
.next-bar > div { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--teal) 0 8px, transparent 8px 10px); }
.mp-countdown { display: grid; place-items: center; gap: 12px; min-height: 50vh; text-align: center; }
.final-card { padding: clamp(22px, 5vw, 40px); margin: 4px; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 12px; margin: 22px auto 26px; max-width: 560px; }
.pod { display: grid; justify-items: center; gap: 4px; animation: pop-in .5s steps(5) both; }
.pod-1 { animation-delay: .5s; } .pod-2 { animation-delay: .25s; } .pod-3 { animation-delay: 0s; }
.pod-critter { width: 64px !important; }
.pod-1 .pod-critter { width: 84px !important; }
.pod-name { font-weight: 700; } .pod-score { font-family: var(--mono); font-size: 26px; line-height: 1; }
.pod-block { width: 100%; display: grid; place-items: center; font-family: var(--label); font-weight: 700; font-size: 32px; color: var(--cream); background: var(--ink); }
.pod-1 .pod-block { height: 110px; background: var(--mustard); color: var(--ink); }
.pod-2 .pod-block { height: 80px; background: var(--grey); color: var(--ink); }
.pod-3 .pod-block { height: 56px; background: #c9874f; color: var(--ink); }

@media (max-width: 860px) {
  .intro-grid, .two-col, .strategy, .room-cols, .room-play, .entry-grid { grid-template-columns: 1fr; }
  .tips { grid-template-columns: 1fr 1fr; }
  .room-play .crew-box { position: static; }
  .foot-cols { grid-template-columns: 1fr 1fr; } .foot-cols .wide { grid-column: 1 / -1; order: 3; }
  .tier-table .tr { grid-template-columns: 1.4fr .6fr 1.2fr; } .tier-table .tr > :nth-child(4) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .tips { grid-template-columns: 1fr; }
  .foot-cats { grid-template-columns: 1fr 1fr; }
  .dropdown .dd-menu { position: fixed; top: 110px; left: 16px; right: 16px; }
}

/* footer brand */
.foot-brand { display: grid; gap: 10px; align-content: start; }
.foot-cols a.foot-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 0; }
.foot-planet { width: 52px; height: 33px; flex: none; }
.foot-word { font-family: var(--label); font-weight: 700; font-size: 24px; letter-spacing: .08em; color: var(--cream); text-shadow: 3px 3px 0 var(--orange-2); }
.foot-logo:hover .foot-word { color: var(--orange); }
.foot-tag { margin: 0; color: var(--muted); font-size: 15px; max-width: 26ch; }
.foot-cols a.made-by { display: inline-block; justify-self: start; margin-top: 4px; padding: 6px 12px; font-family: var(--label); font-size: 12px; color: var(--ink); background: var(--mustard); text-transform: uppercase;
  box-shadow: 0 -3px 0 var(--mustard), 0 3px 0 var(--mustard), -3px 0 0 var(--mustard), 3px 0 0 var(--mustard), 4px 6px 0 var(--mustard-2); margin-left: 3px; }
.foot-cols a.made-by b { font-family: var(--display); font-weight: 700; font-size: 16px; text-transform: none; letter-spacing: 0; }
.foot-cols a.made-by:hover { background: var(--orange); color: var(--ink); }
.foot-base a { color: var(--mustard); text-decoration: none; font-family: var(--display); font-size: 16px; } .foot-base a:hover { color: var(--orange); }
@media (max-width: 860px) { .foot-brand { grid-column: 1 / -1; } }
.reveal .badge { display: grid; width: fit-content; margin: 22px auto 14px; }
.reveal .share { margin-bottom: 22px; }

/* ================= v1.1 ================= */
/* autocorrect suggestion: second Enter sends */
.suggest {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; width: calc(100% - 8px); margin: 14px 4px 0; padding: 12px 16px;
  background: #fff3d6; color: var(--ink); border: 0; cursor: pointer; text-align: left; font: 500 17px var(--display);
  box-shadow: 0 -3px 0 var(--mustard), 0 3px 0 var(--mustard), -3px 0 0 var(--mustard), 3px 0 0 var(--mustard);
  animation: pop-in .2s steps(3) both;
}
.suggest:hover { background: #ffe9b8; }
.suggest-key { margin-left: auto; font-family: var(--label); font-size: 12px; color: var(--ink-soft); text-transform: uppercase; }
kbd { font-family: var(--label); font-size: 12px; padding: 2px 6px; background: var(--ink); color: var(--cream); }

/* changelog */
.changelog { max-width: 780px; margin: 0 auto; }
.cl-entry { position: relative; padding: 22px 24px 8px; margin: 22px 4px; background: var(--space-2);
  box-shadow: 0 -4px 0 var(--line), 0 4px 0 var(--line), -4px 0 0 var(--line), 4px 0 0 var(--line), 4px 8px 0 rgba(0,0,0,.45); }
.cl-entry:first-of-type { box-shadow: 0 -4px 0 var(--orange), 0 4px 0 var(--orange), -4px 0 0 var(--orange), 4px 0 0 var(--orange), 4px 8px 0 rgba(0,0,0,.45); }
.cl-entry header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.cl-version { font-family: var(--label); font-weight: 700; font-size: 26px; color: var(--mustard); }
.cl-date { font-family: var(--mono); font-size: 20px; color: var(--muted); }
.cl-entry p { color: var(--muted); margin: 4px 0 10px; }
.cl-entry h4 { font-family: var(--label); font-size: 12px; text-transform: uppercase; margin: 16px 0 6px; color: var(--teal); }
.cl-entry h4.cl-fixed { color: var(--rose); } .cl-entry h4.cl-changed { color: var(--mustard); } .cl-entry h4.cl-removed { color: var(--grey); }
.cl-entry ul { margin: 0 0 12px; padding-left: 20px; }
.cl-entry li { color: var(--cream); margin: 6px 0; line-height: 1.45; }
.cl-entry li::marker { content: '▸ '; color: var(--orange); }
.cl-entry li .sub { display: block; color: var(--muted); padding-left: 14px; font-size: 15px; }
.cl-entry li .sub::before { content: '· '; color: var(--orange); }
.cl-entry code, .dialog code { font-family: var(--mono); font-size: 18px; background: rgba(0,0,0,.25); padding: 0 4px; }
.cl-entry a { color: var(--mustard); }
/* changelog inside the What's new dialog */
.news .cl-entry { background: #fffaf0; box-shadow: none; margin: 12px 0; padding: 14px 16px 4px; }
.news .cl-entry li { color: var(--ink); } .news .cl-entry p, .news .cl-date { color: var(--ink-soft); }
.news .cl-version { color: var(--orange-2); font-size: 20px; }
.news .cl-entry li .sub { color: var(--ink-soft); }

/* update banner */
.update-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 97; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px;
  width: max-content; max-width: calc(100vw - 32px); padding: 10px 14px 10px 18px; background: var(--ink); color: var(--cream);
  box-shadow: 0 -4px 0 var(--mustard), 0 4px 0 var(--mustard), -4px 0 0 var(--mustard), 4px 0 0 var(--mustard), 6px 10px 0 rgba(0,0,0,.5);
  animation: banner-in .4s steps(4) both;
}
@keyframes banner-in { from { transform: translate(-50%, 140%); } }
.update-banner a { color: var(--mustard); font-size: 15px; }
.upd-dot { width: 10px; height: 10px; background: var(--teal); animation: blink 1s steps(2) infinite; }
.upd-x { color: var(--muted); text-decoration: none; }

/* room entry: shared callsign */
.callsign-card { display: grid; gap: 10px; padding: 20px 24px; margin: 26px 4px 0; }
.entry-card .muted { margin: 0; }

/* ---- bug fixes ---- */
.nav a.nav-hot[aria-current="page"] { color: var(--ink) !important; }
.nav a.nav-hot[aria-current="page"]::before { color: var(--rose); }
.nav, .dropdown { align-items: center; }
.dropdown { display: flex; }
.dd-trigger { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 640px) {
  .topbar { position: relative; }             /* sticky bar was eating ~135px of a phone screen */
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat { min-height: 0; padding: 14px; gap: 10px; }
  .cat .glyph { width: 40px; height: 40px; } .cat .glyph canvas { width: 26px; height: 26px; }
  .cat h3 { font-size: 17px; } .cat span { font-size: 16px; }
  .suggest-key { margin-left: 0; }
}

/* ================= v1.2 card choreography ================= */
/* prompt card: incoming transmission */
.incoming { display: flex; justify-content: space-between; align-items: center; margin: -6px 0 14px; font-family: var(--label); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-2); }
.stage-in .incoming span:first-child { animation: blink .18s steps(2) 5; }
.sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.sig i { width: 4px; background: var(--teal); animation: sig 1.2s steps(1) infinite; }
.sig i:nth-child(1) { height: 4px; } .sig i:nth-child(2) { height: 7px; animation-delay: .15s; } .sig i:nth-child(3) { height: 10px; animation-delay: .3s; } .sig i:nth-child(4) { height: 14px; animation-delay: .45s; }
@keyframes sig { 50% { background: var(--cream-2); } }
.stage-in { animation: warp-in .55s steps(7) both; }
@keyframes warp-in {
  0% { transform: perspective(700px) translateZ(-700px) rotateX(28deg); opacity: 0; filter: brightness(3); }
  45% { opacity: 1; }
  78% { transform: perspective(700px) translateZ(40px) rotateX(-2deg); filter: brightness(1.3); }
  100% { transform: none; filter: none; }
}
.stage-in::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px; pointer-events: none; z-index: 3;
  background: linear-gradient(transparent, rgba(255, 248, 232, .9) 40%, rgba(63, 184, 175, .6) 60%, transparent);
  animation: scan .55s steps(11) .3s both;
}
@keyframes scan { from { top: 0; opacity: 1; } 90% { opacity: 1; } to { top: calc(100% - 14px); opacity: 0; } }
.scramble { color: var(--orange); opacity: .8; }
.fuel.fueling > div { transition: width .6s steps(15); }

/* answer card: flip in, then the rarity meter charges */
.reveal-in { animation: flip-in .42s steps(6) both; }
@keyframes flip-in { from { transform: perspective(900px) rotateY(80deg) scale(.9); filter: brightness(2.2); } }
.rarity-meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 20px auto 4px; max-width: 520px; }
.rarity-meter .seg { display: grid; gap: 5px; justify-items: center; }
.rarity-meter .seg i { display: block; width: 100%; height: 16px; background: var(--cream-2); box-shadow: inset 0 0 0 2px rgba(23, 19, 43, .15); }
.rarity-meter .seg b { font-family: var(--label); font-size: 12px; color: var(--ink-soft); text-transform: uppercase; white-space: nowrap; }
.rarity-meter .seg.on i { background: var(--tc); animation: seg-pop .22s steps(3); }
.rarity-meter .seg.on b { color: var(--ink); }
.rarity-meter .seg.hit i { animation: seg-hit .5s steps(2) infinite; box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--tc); }
@keyframes seg-pop { from { transform: scaleY(2.4); filter: brightness(2); } }
@keyframes seg-hit { 50% { filter: brightness(1.5); } }
.analyzing .rarity-meter { animation: meter-buzz .12s steps(2) infinite; }
@keyframes meter-buzz { 50% { transform: translateX(1px); } }
.charge { animation: charge .26s steps(4); }
@keyframes charge { 50% { filter: brightness(2.4) saturate(0); transform: scale(1.025); } }
body.blackout::after { content: ''; position: fixed; inset: 0; z-index: 89; background: #000; animation: blackout .26s steps(3) both; pointer-events: none; }
@keyframes blackout { 0% { opacity: 0; } 30%, 80% { opacity: .92; } 100% { opacity: 0; } }
.badge-slot:empty { display: none; }
.btn.wait { visibility: hidden; }
.drop span { display: inline-block; animation: drop .32s steps(4) both; animation-delay: calc(var(--i) * 32ms); }
@keyframes drop { from { transform: translateY(-34px) scale(1.7) rotate(-8deg); opacity: 0; } }

/* ---- tier looks (applied to the card once it locks) ---- */
#stage.locked > *, .px-card.locked > * { position: relative; z-index: 1; }
/* orbit: teal frame, orbit ring around the badge */
.locked.tier-orbit { box-shadow: 0 -4px 0 var(--teal), 0 4px 0 var(--teal), -4px 0 0 var(--teal), 4px 0 0 var(--teal), 0 12px 0 #2a7f79, 8px 18px 0 rgba(0,0,0,.5); }
.locked.tier-orbit .badge::after {
  content: ''; position: absolute; inset: -22px -34px; border: 3px dotted var(--teal); border-radius: 50%; transform: rotateX(70deg);
  animation: orbit-spin 2.4s steps(24) infinite; pointer-events: none;
}
@keyframes orbit-spin { to { transform: rotateX(70deg) rotateZ(360deg); } }
/* moonshot: gold frame, the card lands with a bounce, twinkling stars */
.locked.tier-moonshot { animation: land .5s steps(6) both; box-shadow: 0 -4px 0 var(--mustard), 0 4px 0 var(--mustard), -4px 0 0 var(--mustard), 4px 0 0 var(--mustard), 0 12px 0 var(--mustard-2), 8px 18px 0 rgba(0,0,0,.5); }
@keyframes land { 0% { transform: translateY(-18px) rotate(-1deg); } 40% { transform: translateY(6px) scaleY(.97); } 70% { transform: translateY(-4px); } }
.locked.tier-moonshot::before, .locked.tier-deep-space::before, .locked.tier-outlier::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(var(--mustard) 1.5px, transparent 2px), radial-gradient(var(--cream) 1px, transparent 1.5px);
  background-size: 46px 46px, 31px 31px; background-position: 0 0, 15px 20px; animation: twinkle 1.4s steps(2) infinite;
}
@keyframes twinkle { 50% { opacity: .35; } }
/* deep space: the card itself becomes a nebula */
.locked.tier-deep-space {
  color: var(--cream); overflow: hidden;
  background: radial-gradient(ellipse at 20% 15%, rgba(140,122,230,.55), transparent 55%), radial-gradient(ellipse at 85% 80%, rgba(63,184,175,.35), transparent 55%), #17123a;
  box-shadow: 0 -4px 0 var(--violet), 0 4px 0 var(--violet), -4px 0 0 var(--violet), 4px 0 0 var(--violet), 0 12px 0 #5a4bb0, 8px 18px 0 rgba(0,0,0,.5), 0 0 40px rgba(140,122,230,.45);
  transition: background .3s steps(3);
}
.locked.tier-deep-space::before { background-image: radial-gradient(var(--violet) 1.5px, transparent 2px), radial-gradient(var(--cream) 1px, transparent 1.5px); animation: drift 6s linear infinite, twinkle 1.6s steps(2) infinite; }
@keyframes drift { to { background-position: 0 -460px, 15px -290px; } }
.locked.tier-deep-space .share, .locked.tier-outlier .share { color: var(--muted); }
.locked.tier-deep-space .badge, .locked.tier-outlier .badge { animation: stamp .5s cubic-bezier(.3,1.7,.5,1) both, levitate 1.6s steps(8) .5s infinite; }
@keyframes levitate { 50% { transform: rotate(-4deg) translateY(-8px); } }
.locked.tier-deep-space .your { text-shadow: 3px 3px 0 #5a4bb0; }
/* outlier: holographic foil card, light rays, rainbow answer, ribbon */
.locked.tier-outlier {
  color: var(--cream); overflow: hidden; background: #120d2e;
  animation: foil-edge .9s steps(1) infinite, card-quake .5s steps(5);
}
.locked.tier-outlier::before {
  content: ''; position: absolute; left: 50%; top: 30%; width: 220%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 0; pointer-events: none;
  background: repeating-conic-gradient(rgba(255,107,53,.22) 0 9deg, transparent 9deg 18deg, rgba(242,177,52,.16) 18deg 27deg, transparent 27deg 36deg);
  animation: rays 8s steps(48) infinite;
}
@keyframes rays { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes foil-edge {
  0% { box-shadow: 0 -4px 0 var(--orange), 0 4px 0 var(--mustard), -4px 0 0 var(--rose), 4px 0 0 var(--teal), 0 12px 0 var(--orange-2), 8px 18px 0 rgba(0,0,0,.5), 0 0 50px rgba(255,107,53,.55); }
  25% { box-shadow: 0 -4px 0 var(--mustard), 0 4px 0 var(--teal), -4px 0 0 var(--orange), 4px 0 0 var(--violet), 0 12px 0 var(--mustard-2), 8px 18px 0 rgba(0,0,0,.5), 0 0 50px rgba(242,177,52,.55); }
  50% { box-shadow: 0 -4px 0 var(--teal), 0 4px 0 var(--violet), -4px 0 0 var(--mustard), 4px 0 0 var(--rose), 0 12px 0 #2a7f79, 8px 18px 0 rgba(0,0,0,.5), 0 0 50px rgba(63,184,175,.55); }
  75% { box-shadow: 0 -4px 0 var(--violet), 0 4px 0 var(--rose), -4px 0 0 var(--teal), 4px 0 0 var(--orange), 0 12px 0 #5a4bb0, 8px 18px 0 rgba(0,0,0,.5), 0 0 50px rgba(140,122,230,.55); }
}
@keyframes card-quake { 20% { transform: translate(-6px, 3px) rotate(-.6deg); } 40% { transform: translate(5px, -4px) rotate(.5deg); } 60% { transform: translate(-3px, 2px); } 80% { transform: translate(2px, -1px); } }
.locked.tier-outlier .your span, .locked.tier-outlier .your {
  background: linear-gradient(90deg, var(--orange), var(--mustard), var(--teal), var(--violet), var(--rose), var(--orange)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil-text 1.6s linear infinite;
}
.locked.tier-outlier .your span { animation: drop .32s steps(4) both, foil-text 1.6s linear infinite; animation-delay: calc(var(--i) * 32ms), 0s; }
@keyframes foil-text { to { background-position: 300% 0; } }
.locked.tier-outlier .cat-tag { box-shadow: 0 -3px 0 var(--orange), 0 3px 0 var(--orange), -3px 0 0 var(--orange), 3px 0 0 var(--orange); }
.ribbon {
  position: absolute !important; top: 22px; right: -46px; z-index: 2 !important; width: 190px; padding: 6px 0; transform: rotate(38deg);
  background: var(--orange); color: var(--ink); text-align: center; font-family: var(--label); font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  box-shadow: 0 3px 0 var(--orange-2); animation: ribbon-in .4s steps(4) .1s both;
}
@keyframes ribbon-in { from { transform: rotate(38deg) translateX(120px); } }
/* miss: TV static, no signal */
.locked.tier-miss { filter: grayscale(.75); }
.locked.tier-miss::after {
  content: 'NO SIGNAL'; position: absolute; inset: 0; z-index: 2; display: grid; place-items: start center; padding-top: 16px; pointer-events: none;
  font-family: var(--label); font-size: 14px; letter-spacing: .3em; color: rgba(23,19,43,.55);
  background: repeating-linear-gradient(0deg, rgba(23,19,43,.12) 0 2px, transparent 2px 4px), repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 1px, transparent 1px 3px);
  animation: static .15s steps(3) infinite, static-fade 1.6s steps(8) forwards;
}
@keyframes static { 33% { background-position: 0 2px, 1px 0; } 66% { background-position: 0 -1px, -2px 0; } }
@keyframes static-fade { to { opacity: .35; } }
[data-fx="off"] .locked::before, [data-fx="off"] .locked::after { animation: none !important; }
.locked.tier-deep-space .rarity-meter .seg b, .locked.tier-outlier .rarity-meter .seg b { color: var(--muted); }
.locked.tier-deep-space .rarity-meter .seg:not(.on) i, .locked.tier-outlier .rarity-meter .seg:not(.on) i { background: rgba(244,234,213,.15); }
.locked.tier-deep-space .result-list li, .locked.tier-outlier .result-list li { background: rgba(255,250,240,.92); color: var(--ink); }
.crew-results.pending { visibility: hidden; }
.crew-results { animation: pop-in .3s steps(3) both; }

/* ================= mission control effects ================= */
.mc-banner {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 98; display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px); padding: 12px 18px; background: var(--ink); color: var(--cream); font-size: 18px;
  box-shadow: 0 -4px 0 var(--mustard), 0 4px 0 var(--mustard), -4px 0 0 var(--mustard), 4px 0 0 var(--mustard), 6px 10px 0 rgba(0,0,0,.5);
  animation: mc-in .45s steps(5) both;
}
.mc-banner.out { animation: mc-out .4s steps(4) forwards; }
@keyframes mc-in { from { transform: translate(-50%, -160%); } }
@keyframes mc-out { to { transform: translate(-50%, -160%); opacity: 0; } }
.mc-tag { font-family: var(--label); font-size: 12px; text-transform: uppercase; color: var(--mustard); white-space: nowrap; animation: blink .4s steps(2) 6; }
.mc-critter { position: fixed; left: -140px; z-index: 98; display: flex; align-items: center; gap: 10px; pointer-events: none; animation: mc-fly 6.5s linear forwards; }
.mc-critter canvas { width: 72px; height: auto; animation: mc-bob .5s steps(2) infinite; }
.mc-bubble { background: var(--cream); color: var(--ink); padding: 8px 12px; font-weight: 600; max-width: 260px; box-shadow: 0 -3px 0 var(--cream), 0 3px 0 var(--cream), -3px 0 0 var(--cream), 3px 0 0 var(--cream), 4px 6px 0 rgba(0,0,0,.4); }
@keyframes mc-fly { to { transform: translateX(calc(100vw + 300px)) rotate(8deg); } }
@keyframes mc-bob { 50% { transform: translateY(-6px); } }
html.troll-flip body { transform: rotate(180deg); transition: transform .6s steps(6); }
html.troll-rainbow body { animation: troll-rainbow 1.2s linear infinite; }
@keyframes troll-rainbow { to { filter: hue-rotate(360deg); } }
html.troll-barrel body { animation: troll-barrel 1.3s steps(16); }
@keyframes troll-barrel { to { transform: rotate(360deg); } }
html.troll-blackout body::after { content: ''; position: fixed; inset: 0; z-index: 99; background: #000; animation: blackout 1.8s steps(6) both; pointer-events: none; }

/* ================= accounts, leaderboard, paste penalty ================= */
.acct-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 0; cursor: pointer; background: var(--mustard); color: var(--ink);
  font-family: var(--label); font-size: 12px; text-transform: uppercase; box-shadow: 0 -3px 0 var(--mustard), 0 3px 0 var(--mustard), -3px 0 0 var(--mustard), 3px 0 0 var(--mustard); margin: 0 3px; }
.acct-btn:hover { background: var(--orange); }
.acct-btn[hidden] { display: none; }
canvas.acct-critter { width: 24px; } canvas.acct-critter.big { width: 56px; }
.acct-tabs { display: flex; gap: 10px; margin: 14px 0 6px; }
.acct-form { display: grid; gap: 12px; margin-top: 10px; }
.acct-form label { display: grid; gap: 6px; font-family: var(--label); font-size: 12px; text-transform: uppercase; color: var(--ink-soft); }
.key-input { letter-spacing: .08em; text-transform: uppercase; font-family: var(--mono) !important; }
.key-box { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 16px; margin: 14px 0; background: var(--ink); }
.key-box code { font-family: var(--mono); font-size: 26px; color: var(--mustard); letter-spacing: .06em; word-break: break-all; }
.acct-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 8px; } .acct-head h2 { margin: 0; }
.ban-notice { position: sticky; top: 0; z-index: 25; padding: 10px clamp(16px, 4vw, 40px); background: var(--rose); color: var(--ink); font-size: 15px; text-align: center; }
.pasted-note { font-family: var(--label); font-size: 12px; text-transform: uppercase; color: var(--rose); margin: -4px 0 8px; }
.rank-chip { display: inline-block; margin: 18px 4px 0; padding: 8px 14px; background: var(--mustard); color: var(--ink); font-family: var(--label); font-size: 12px; text-transform: uppercase; text-decoration: none; border: 0; cursor: pointer;
  box-shadow: 0 -3px 0 var(--mustard), 0 3px 0 var(--mustard), -3px 0 0 var(--mustard), 3px 0 0 var(--mustard), 4px 6px 0 var(--mustard-2); animation: pop-in .4s steps(4) both; }
.rank-chip.ghost { background: var(--cream-2); box-shadow: 0 -3px 0 var(--cream-2), 0 3px 0 var(--cream-2), -3px 0 0 var(--cream-2), 3px 0 0 var(--cream-2); }
.board { max-width: 760px; margin: 0 auto; }
.board-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.board-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.board-list li { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: var(--space-2); box-shadow: inset 4px 0 0 var(--line); animation: row-in .35s steps(4) both; animation-delay: calc(var(--i) * 40ms); }
.board-list li.me { box-shadow: inset 4px 0 0 var(--mustard); background: #22285a; }
.board-list li.top1 { box-shadow: inset 4px 0 0 var(--mustard), 0 0 24px rgba(242,177,52,.25); }
.board-list .rank { width: 34px; text-align: center; font-family: var(--mono); font-size: 26px; color: var(--muted); }
.board-list canvas { width: 30px; }
.board-list .who { flex: 1; font-weight: 600; font-size: 18px; } .board-list small { color: var(--muted); font-weight: 400; }
.board-list .days { font-family: var(--mono); font-size: 18px; color: var(--muted); }
.board-list .pts { font-family: var(--mono); font-weight: 400; font-size: 30px; color: var(--mustard); min-width: 70px; text-align: right; }
.board-empty { padding: 28px; text-align: center; color: var(--muted); margin: 4px 4px 22px; }
.board-empty a { color: var(--mustard); }
@media (max-width: 640px) { .acct-btn span { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
/* top bar: room for Leaderboard + account button */
.nav a, .dd-trigger { white-space: nowrap; }
.acct-btn span { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1320px) {
  .topbar { gap: 14px; }
  .nav a { padding: 6px 9px; font-size: 13px; }
  .fx-btn span { display: none; }
}
@media (max-width: 1140px) and (min-width: 641px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .nav { order: 3; width: 100%; justify-content: center; margin: 0; }
  .nav-icons { margin-left: auto; }
}
@media (max-width: 640px) {
  .brand { font-size: 18px; gap: 6px; } .brand .logo { width: 36px; height: 23px; }
  .nav-icons { gap: 6px; }
  .icon-btn { min-width: 34px; height: 34px; padding: 0 6px; }
  .acct-btn { height: 34px; padding: 0 8px; font-size: 12px; gap: 6px; }
  .acct-btn span { max-width: 72px; }
  .nav a { padding: 5px 7px; font-size: 12px; }
}

/* ================= landing page v2 ================= */
.lp-hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px; min-height: min(78vh, 640px); padding: 8px 0 26px; }
.lp-status { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; background: rgba(18, 29, 66, .85); font-family: var(--label); font-size: 12px; text-transform: uppercase; color: var(--muted);
  box-shadow: 0 -3px 0 var(--line), 0 3px 0 var(--line), -3px 0 0 var(--line), 3px 0 0 var(--line); margin: 3px; }
.lp-status .dot { width: 9px; height: 9px; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: blink 1.4s steps(2) infinite; }
.lp-status.offline .dot { background: var(--grey2); box-shadow: none; animation: none; }
.lp-status .sep { color: var(--line); }
.lp-word {
  position: relative; font-family: var(--label); font-weight: 700; font-size: clamp(64px, 11.5vw, 148px); line-height: .9; letter-spacing: .02em; margin: 26px 0 14px;
  color: var(--cream); text-shadow: 6px 6px 0 var(--orange-2), 12px 12px 0 rgba(0,0,0,.35); animation: word-in .6s steps(6) both;
}
.lp-tag { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; margin: 0 0 12px; line-height: 1.1; }
.lp-tag em { font-style: normal; color: var(--orange); }
.lp-sub { color: var(--muted); font-size: 19px; max-width: 46ch; margin: 0; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 16px; margin: 28px 0 22px; }
.btn-big { min-height: 60px; padding: 0 30px; font-size: 16px; }
.lp-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--mono); font-size: 21px; color: var(--muted); }
.lp-facts b { color: var(--mustard); font-weight: 400; }
.lp-art { position: relative; }
.lp-art::before { content: ''; position: absolute; inset: 10% 6%; background: radial-gradient(circle, rgba(255,107,53,.18), transparent 65%); filter: blur(10px); z-index: -1; }
.lp-art .hero-canvas { width: 100%; max-width: 560px; margin: 0 auto; }

.lp-ticker { position: relative; left: 50%; width: 100vw; margin-left: -50vw; overflow: hidden; padding: 12px 0; border-block: 4px solid var(--line); background: rgba(11, 20, 48, .75); }
.lp-track { display: inline-flex; align-items: center; gap: 22px; white-space: nowrap; animation: ticker 90s linear infinite; }
.lp-ticker:hover .lp-track { animation-play-state: paused; }
.lp-track span { font-family: var(--mono); font-size: 22px; color: var(--cream); }
.lp-track i { font-style: normal; color: var(--orange); }
@keyframes ticker { to { transform: translateX(-50%); } }

.lp-sec { margin-top: 96px; }
.lp-head { margin-bottom: 24px; }
.lp-head h2, .lp-try h2 { font-size: clamp(30px, 4.2vw, 46px); margin: 8px 0 8px; text-shadow: 4px 4px 0 rgba(0,0,0,.45); }
.lp-head p { color: var(--muted); margin: 0; max-width: 60ch; }

.lp-try { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.lp-try-copy p { color: var(--muted); font-size: 18px; }
.lp-tips { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.lp-tips li { padding-left: 24px; position: relative; color: var(--muted); }
.lp-tips li::before { content: '▸'; position: absolute; left: 0; color: var(--orange); }
.lp-tips b { color: var(--cream); }
.lp-demo { min-height: 330px; transform: rotate(-1deg); transition: transform .2s steps(3); }
.lp-demo:hover, .lp-demo:focus-within { transform: none; }
.lp-demo-q { font-size: clamp(26px, 3vw, 34px); margin: 4px 0 20px; line-height: 1.1; }
.lp-demo .reveal { margin-top: -6px; }
.lp-demo .rarity-meter { margin-top: 6px; }

.lp-spectrum { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 4px; box-shadow: 0 -4px 0 var(--line), 0 4px 0 var(--line), -4px 0 0 var(--line), 4px 0 0 var(--line), 6px 10px 0 rgba(0,0,0,.4); }
.lp-band { position: relative; display: grid; justify-items: start; gap: 4px; padding: 18px 16px 16px; background: var(--space-2); border-top: 6px solid var(--tc); transition: background .15s steps(2); }
.lp-band + .lp-band { border-left: 2px dashed var(--line); }
.lp-band:hover { background: var(--space-3); }
.lp-band .band-body { width: 46px; height: auto; margin-bottom: 4px; }
.lp-band b { font-size: 20px; color: var(--tc); }
.lp-band .pts { font-family: var(--mono); font-size: 26px; line-height: 1; }
.lp-band .ex { font-size: 15px; color: var(--muted); }
.lp-band .ex::before { content: '“'; } .lp-band .ex::after { content: '”'; }
.lp-route { margin-top: 34px; overflow-x: auto; }

.lp-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.lp-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lp-mode { display: flex; align-items: center; gap: 14px; padding: 18px; text-decoration: none; transition: transform .1s steps(2); animation: pop-in .35s steps(4) both; animation-delay: calc(var(--i) * 60ms); }
.lp-mode:hover { transform: translate(-3px, -4px); --bc: var(--cc); }
.lp-mode .glyph { flex: none; width: 48px; height: 48px; display: grid; place-items: center; background: var(--cc); box-shadow: 0 -3px 0 var(--cc), 0 3px 0 var(--cc), -3px 0 0 var(--cc), 3px 0 0 var(--cc); margin: 3px; }
.lp-mode .glyph canvas { width: 30px; height: 30px; }
.lp-mode b { display: block; font-size: 20px; } .lp-mode small { display: block; color: var(--muted); font-size: 14px; }
.lp-mode .arrow { margin-left: auto; color: var(--cc); font-size: 22px; }
.lp-board { padding: 16px 18px; min-height: 220px; }
.lp-board ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.lp-board li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--space); animation: row-in .35s steps(4) both; animation-delay: calc(var(--i) * 70ms); }
.lp-board .rank { width: 28px; text-align: center; font-family: var(--mono); font-size: 22px; color: var(--muted); }
.lp-board canvas { width: 26px; } .lp-board .who { flex: 1; font-weight: 600; }
.lp-board li b { font-family: var(--mono); font-weight: 400; font-size: 26px; color: var(--mustard); }
.lp-more { display: inline-block; margin-top: 12px; color: var(--mustard); font-family: var(--label); font-size: 12px; text-transform: uppercase; text-decoration: none; }
.lp-empty { padding: 34px 10px; text-align: center; color: var(--muted); line-height: 1.6; } .lp-empty a { color: var(--mustard); }

.lp-cats { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-cat { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; background: var(--space-2); text-decoration: none; font-weight: 600;
  box-shadow: 0 -3px 0 var(--line), 0 3px 0 var(--line), -3px 0 0 var(--line), 3px 0 0 var(--line); margin: 3px; transition: transform .1s steps(2); }
.lp-cat:hover { transform: translateY(-3px); box-shadow: 0 -3px 0 var(--cc), 0 3px 0 var(--cc), -3px 0 0 var(--cc), 3px 0 0 var(--cc); }
.lp-cat .glyph { width: 30px; height: 30px; display: grid; place-items: center; background: var(--cc); }
.lp-cat .glyph canvas { width: 20px; height: 20px; }
.lp-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.lp-faq details { padding: 16px 20px; }
.lp-faq details[open] { --bc: var(--mustard); }
.lp-faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; }
.lp-faq summary::before { content: '▸ '; color: var(--orange); }
.lp-faq p { color: var(--muted); margin: 10px 0 0; } .lp-faq a { color: var(--mustard); }

@media (max-width: 960px) {
  .lp-hero { grid-template-columns: 1fr; min-height: 0; text-align: center; }
  .lp-art { order: -1; max-width: 420px; margin: 0 auto -10px; }
  .lp-sub { margin: 0 auto; } .lp-cta, .lp-facts { justify-content: center; }
  .lp-try, .lp-split { grid-template-columns: 1fr; gap: 26px; }
  .lp-spectrum { grid-template-columns: 1fr; }
  .lp-band { grid-template-columns: 52px 1fr auto; align-items: center; justify-items: start; border-top: 0; border-left: 6px solid var(--tc); padding: 12px 16px; }
  .lp-band + .lp-band { border-left: 6px solid var(--tc); border-top: 2px dashed var(--line); }
  .lp-band .band-body { grid-row: span 2; margin: 0; } .lp-band .pts { grid-column: 3; grid-row: 1; } .lp-band .ex { grid-column: 2 / 4; }
}
@media (max-width: 640px) {
  .lp-word { margin-top: 18px; }
  .lp-modes, .lp-faq { grid-template-columns: 1fr; }
  .lp-sec { margin-top: 70px; }
  .lp-demo { transform: none; }
}
[data-fx="off"] .lp-track { animation: none; }
/* landing fixes: keep the wordmark from squeezing the art column */
.lp-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.lp-word { font-size: clamp(60px, 9.2vw, 132px); }
.lp-art .hero-canvas { width: 100%; max-width: 580px; }
.lp-route { overflow-y: hidden; padding-bottom: 6px; }
.lp-split { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.lp-mode b { white-space: nowrap; }
.lp-mode .arrow { display: none; }
@media (max-width: 960px) { .lp-hero { grid-template-columns: 1fr; } }
.lp-word { font-size: clamp(54px, 6.8vw, 100px); letter-spacing: .01em; animation: lp-word-in .6s steps(6) both; white-space: nowrap; }
@keyframes lp-word-in { from { transform: translateY(30px) scale(.96); opacity: 0; } }
.lp-demo { min-height: 0; }
@media (max-width: 960px) { .lp-word { font-size: clamp(54px, 15vw, 110px); } }
@media (max-width: 960px) { .lp-try, .lp-split { grid-template-columns: minmax(0, 1fr); } .lp-try > *, .lp-split > * { min-width: 0; } }

/* ===== landing v2.1: full-width Earth horizon, how-it-works strip ===== */
.lp-horizon { position: relative; left: 50%; width: 100vw; margin-left: -50vw; margin-top: -28px; line-height: 0; pointer-events: none; }
.lp-horizon canvas { width: 100%; height: auto; aspect-ratio: 480 / 64; display: block; }
.lp-horizon + .lp-ticker { margin-top: 0; border-top: 0; }
.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: none; }
.lp-steps li { position: relative; display: grid; gap: 6px; padding: 22px 22px 20px; background: var(--space-2);
  box-shadow: 0 -4px 0 var(--line), 0 4px 0 var(--line), -4px 0 0 var(--line), 4px 0 0 var(--line), 4px 8px 0 rgba(0,0,0,.45); margin: 4px; }
.lp-steps li:not(:last-child)::after { content: '▸'; position: absolute; right: -24px; top: 50%; transform: translateY(-50%); color: var(--orange); font-size: 22px; z-index: 1; }
.lp-steps .n { font-family: var(--label); color: var(--orange); font-size: 20px; }
.lp-steps b { font-size: 22px; } .lp-steps span:last-child { color: var(--muted); font-size: 16px; }
.lp-band .ex::before, .lp-band .ex::after { content: none; }
@media (max-width: 860px) { .lp-steps { grid-template-columns: 1fr; } .lp-steps li::after { display: none; } .lp-horizon { margin-top: -14px; } }

/* ===== badges, skins, leagues, share card ===== */
.acct-sub { font-size: 18px; margin: 20px 0 10px; } .acct-sub small { font-family: var(--mono); font-size: 18px; color: var(--ink-soft); font-weight: 400; }
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.skin { position: relative; display: grid; justify-items: center; gap: 4px; padding: 8px 6px; border: 0; cursor: pointer; background: #fffaf0; color: var(--ink);
  box-shadow: 0 0 0 3px var(--cream-2); font: 600 12px var(--display); }
.skin canvas { width: 84px; height: auto; aspect-ratio: 30 / 11; background: var(--navy, #0b1430); }
.skin.on { box-shadow: 0 0 0 3px var(--orange); } .skin:hover:not(.locked) { box-shadow: 0 0 0 3px var(--mustard); }
.skin.locked { cursor: not-allowed; opacity: .55; } .skin.locked canvas { filter: grayscale(1) brightness(.6); }
.skin i { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 12px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ach { display: grid; grid-template-columns: 30px 1fr; gap: 2px 8px; align-items: center; padding: 8px; background: #fffaf0; opacity: .5; filter: grayscale(1); }
.ach.got { opacity: 1; filter: none; box-shadow: inset 3px 0 0 var(--mustard); }
.ach canvas { grid-row: span 3; width: 26px; height: 26px; background: var(--mustard); padding: 3px; box-sizing: content-box; }
.ach b { font-size: 14px; } .ach small { font-size: 12px; color: var(--ink-soft); line-height: 1.25; }
.ach-skin { font-family: var(--label); font-size: 12px; color: var(--orange-2); text-transform: uppercase; }
.league-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 26px; }
.league-card { display: grid; gap: 4px; padding: 16px 18px; text-decoration: none; transition: transform .1s steps(2); }
.league-card:hover { transform: translateY(-3px); --bc: var(--mustard); }
.league-card b { font-size: 20px; } .league-card span { color: var(--muted); font-size: 14px; }
.league-card code, .league-invite code { font-family: var(--mono); font-size: 22px; color: var(--mustard); letter-spacing: .12em; }
.league-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; margin: 0 4px 18px; }
.league-invite span { font-family: var(--label); font-size: 12px; text-transform: uppercase; color: var(--muted); }
.lg-leave { margin-left: auto; color: var(--muted) !important; }
.lg-link { margin-left: auto; }
.share-img { display: block; width: 100%; height: auto; margin: 6px 0 14px; image-rendering: pixelated; box-shadow: 0 0 0 4px var(--ink); }
.dialog:has(.share-img) { max-width: min(760px, calc(100vw - 40px)); }

/* ================= readability: pixel fonts for display, a legible face for reading ================= */
body { font-family: var(--body); font-size: 18px; line-height: 1.55; }
h1, h2, h3, h4, .page-title, .lp-tag, .prompt, .lp-demo-q, .your, .reveal .your, .big-score, .demo-prompt, .room-code,
.cd-num, .tier-card h3, .step h3, .lp-steps b, .lp-band b, .lp-mode b, .cat h3, .league-card b, .board-list .who,
.crew-list .crew-name, .badge-name, .foot-title, .wordmark, .lp-word { font-family: var(--display); }
/* answers and inputs are read and typed constantly: keep them in the legible face, bold */
.answer-input, .demo-input, .result-list .a, .crew-list .crew-name, .board-list .who, .lp-board .who, .chip { font-family: var(--body); font-weight: 700; letter-spacing: 0; }
.answer-input { font-size: 22px; }
.reveal .your { font-family: var(--body); font-weight: 700; }
p, li, .lede, .lp-sub, .tips span, .lp-tips li, .faq p, .lp-faq p, .step p, .lp-steps span:last-child, .tier-card p, .dialog p, .dialog li,
.result-list .q, .cl-entry li, .cl-entry p, .note, .hint, .hint-dark, .muted, small, .small, .cat span, .lp-mode small, .lp-cat, .league-card span,
.pasted-note, .suggest, .confirm, .toast, .mc-bubble, .ban-notice, .foot-tag, .foot-sub { font-family: var(--body); }
.faq summary, .lp-faq summary { font-family: var(--body); font-weight: 700; }
.lede, .lp-sub { font-size: 20px; }
.muted, .tips span, .lp-tips li, .step p, .lp-steps span:last-child, .faq p, .lp-faq p, .cl-entry li { color: #c3c8e2; } /* a touch brighter than --muted for body copy */
.px-card .muted, .dialog p, .dialog li { color: var(--ink-soft); }
/* small pixel labels: give them room to breathe */
.eyebrow, .cat-tag, .hist-label, .status-line a, .lp-status, .incoming, .rarity-meter .seg b, .badge-name, .kbd, kbd { letter-spacing: .1em; }
.nav a { font-size: 14px; }
/* Pixelify draws "fi" as a ligature that reads like "A", and its 5 looks like 8: no ligatures anywhere, and the
   prompt (the most important text in the game) plus any heading that carries numbers use the legible face. */
* { font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0; }
.prompt, .lp-demo-q, .demo-prompt { font-family: var(--body); font-weight: 700; letter-spacing: -.01em; line-height: 1.12; }
.lp-steps b, .step h3 { font-family: var(--body); font-weight: 700; }
/* Silkscreen's "&" reads as "$" ("BOOKS $ ART"): text that can contain an ampersand uses the legible face. */
.cat-tag, .foot-cols h4, .dd-menu a, .linkish, .hist-label, .rarity-meter .seg b, .pasted-note, .ach-skin { font-family: var(--body); font-weight: 700; }
.cat-tag { font-size: 13px; letter-spacing: .08em; }
.foot-cols h4 { font-size: 13px; letter-spacing: .12em; }
.game-head > span:first-child { font-family: var(--body); font-weight: 700; letter-spacing: .1em; font-size: 13px; }
.foot-cols .foot-link { font-weight: 400; }
.results-cta { justify-content: flex-end; }
@media (max-width: 640px) { .results-cta { justify-content: stretch; } .results-cta .btn { flex: 1 1 auto; } }
