/* 16-bit RPG theme: the whole site is a game. Blue menu windows, hard pixel shadows, stepped motion. */
@view-transition { navigation: auto; }

:root {
  --bg: #0c0a24;
  --bg-2: #130f3a;
  --win-a: #2a3fc4;
  --win-b: #0d1570;
  --line: #3b3690;
  --ink: #fff8e7;
  --muted: #bcb9e6;
  --gold: #ffd23f;
  --gold-lo: #c98a00;
  --on-gold: #1a1202;
  --pink: #ff5fa2;
  --cyan: #59e6ff;
  --green: #62f58a;
  --red: #ff6b6b;
  --wrap: 1220px;
  --top-h: 64px;
  --font: "Anuphan", "Noto Sans Thai", system-ui, sans-serif;
  --display: "Chakra Petch", "Anuphan", sans-serif;
  --pixel: "Press Start 2P", "Chakra Petch", monospace;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 20px); }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.75; overflow-x: hidden; }
main { position: relative; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { list-style: none; }
.mono, code { font-family: var(--mono); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--on-gold); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; position: relative; }
.narrow { max-width: 860px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 99; background: var(--gold); color: var(--on-gold); padding: 8px 14px; font-weight: 700; }
.skip:focus { top: 12px; }

/* scroll progress = EXP bar */
.progress { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 40; background: repeating-linear-gradient(90deg, var(--green) 0 10px, #2fb85a 10px 12px); transform: scaleX(0); transform-origin: 0 50%; }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}

/* CRT scanlines over everything (kept light; the QR code sits above them) */
.crt { position: fixed; inset: 0; z-index: 45; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px); }
.donate-box .qr { position: relative; z-index: 46; }

/* the menu window every panel is built from */
.win { background: linear-gradient(180deg, var(--win-a), var(--win-b)); border: 3px solid var(--ink); border-radius: 8px; box-shadow: 0 0 0 3px #05041a, 8px 8px 0 rgba(0, 0, 0, .45); }

/* header */
.top { position: sticky; top: 0; z-index: 30; height: var(--top-h); background: #08071c; border-bottom: 3px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 100%; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 18px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand-mark { width: 12px; height: 12px; background: var(--gold); box-shadow: 12px 0 var(--pink), 0 12px var(--cyan), 12px 12px var(--green); margin: 0 12px 12px 0; animation: spin4 1.2s steps(1) infinite; }
@keyframes spin4 {
  25% { box-shadow: 12px 0 var(--gold), 0 12px var(--green), 12px 12px var(--cyan); background: var(--cyan); }
  50% { box-shadow: 12px 0 var(--cyan), 0 12px var(--pink), 12px 12px var(--gold); background: var(--green); }
  75% { box-shadow: 12px 0 var(--green), 0 12px var(--gold), 12px 12px var(--pink); background: var(--pink); }
}
.top nav { display: flex; align-items: center; gap: 2px; }
.top nav a { position: relative; padding: 8px 12px 8px 22px; text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; }
.top nav a::before, .faq summary::before, .req-list li::before { content: ""; position: absolute; left: 8px; top: 50%; margin-top: -6px; border: 6px solid transparent; border-left: 9px solid var(--gold); opacity: 0; }
.top nav a:hover, .top nav a:focus-visible { color: var(--ink); }
.top nav a:hover::before, .top nav a:focus-visible::before { opacity: 1; animation: nudge .5s steps(2) infinite; }
@keyframes nudge { 50% { transform: translateX(3px); } }
.top nav .nav-donate { color: var(--on-gold); background: var(--gold); padding: 5px 14px; margin-left: 8px; box-shadow: inset -3px -3px 0 var(--gold-lo), inset 3px 3px 0 #fff3b0, 0 4px 0 #000; font-weight: 700; }
.top nav .nav-donate::before { content: none; }
.top nav .nav-donate:hover { color: var(--on-gold); transform: translateY(2px); box-shadow: inset -3px -3px 0 var(--gold-lo), inset 3px 3px 0 #fff3b0, 0 2px 0 #000; }
.snd { margin-left: 10px; padding: 7px 8px; font-family: var(--pixel); font-size: 8px; line-height: 1.4; background: #1a1650; color: var(--muted); border: 2px solid var(--line); white-space: nowrap; }
.snd[aria-pressed="true"] { color: var(--green); border-color: var(--green); }

/* buttons: chunky, pressable */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; font-family: var(--display); font-weight: 700; font-size: 17px; text-decoration: none; white-space: nowrap; border: 3px solid #05041a; transition: transform .05s, box-shadow .05s; }
.btn-primary { background: var(--gold); color: var(--on-gold); box-shadow: inset -4px -4px 0 var(--gold-lo), inset 4px 4px 0 #fff3b0, 0 6px 0 #05041a; }
.btn-ghost { background: #2a2a6e; color: var(--ink); box-shadow: inset -4px -4px 0 #15154a, inset 4px 4px 0 #5a5ac0, 0 6px 0 #05041a; }
.btn:hover { transform: translateY(2px); filter: brightness(1.08); }
.btn-primary:hover { box-shadow: inset -4px -4px 0 var(--gold-lo), inset 4px 4px 0 #fff3b0, 0 4px 0 #05041a; }
.btn-ghost:hover { box-shadow: inset -4px -4px 0 #15154a, inset 4px 4px 0 #5a5ac0, 0 4px 0 #05041a; }
.btn:active { transform: translateY(6px); box-shadow: inset 4px 4px 0 rgba(0, 0, 0, .3), 0 0 0 #05041a; }
.btn-lg { min-height: 64px; font-size: 20px; padding: 0 28px; }
.btn small { font-family: var(--font); font-weight: 600; opacity: .8; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: default; }
.press-start { font-family: var(--pixel); font-size: 13px; flex-direction: column; gap: 2px; padding: 8px 20px; animation: flash 1s steps(1) infinite; }
@keyframes flash { 50% { background: #fff3b0; } }

/* type */
h1, h2, h3, .mod-name, .donate-title, .panel-title { font-family: var(--display); }
h1 { font-size: clamp(38px, 5.6vw, 76px); line-height: 1.2; font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(27px, 3.2vw, 42px); line-height: 1.3; font-weight: 700; margin-bottom: 12px; text-wrap: balance; text-shadow: 3px 3px 0 #05041a; }
h3 { font-size: 20px; margin: 28px 0 6px; color: var(--cyan); }
.kicker { display: block; margin-bottom: 14px; font-family: var(--pixel); font-size: 11px; line-height: 1.6; letter-spacing: .04em; text-transform: uppercase; color: var(--pink); text-shadow: 2px 2px 0 #05041a; }
.eyebrow { display: block; margin-bottom: 16px; font-size: 15px; font-weight: 600; color: var(--cyan); }
.blink { font-family: var(--pixel); font-size: 11px; color: var(--gold); margin-right: 8px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lede { font-size: 18px; color: var(--ink); }

/* ===== title screen ===== */
.hero { position: relative; overflow: hidden; min-height: min(92vh, 900px); display: grid; align-items: center; padding: 56px 0 120px; background: linear-gradient(#0b0930, #2c1a6e 45%, #9a3a8c 72%, #120f3d 72%); }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; image-rendering: pixelated; }
/* Mode 7 style floor rushing toward the player */
.floor { position: absolute; left: -60%; right: -60%; bottom: 0; height: 26%; transform-origin: 50% 100%; transform: perspective(260px) rotateX(64deg);
  background-color: #1a1454;
  background-image: linear-gradient(45deg, #2b1f7c 25%, transparent 25%, transparent 75%, #2b1f7c 75%), linear-gradient(45deg, #2b1f7c 25%, transparent 25%, transparent 75%, #2b1f7c 75%);
  background-size: 96px 96px; background-position: 0 0, 48px 48px; animation: floor 1.4s linear infinite; }
@keyframes floor { to { background-position: 0 96px, 48px 144px; } }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; pointer-events: none; background: linear-gradient(180deg, #120f3d 0%, transparent 34%, transparent 70%, var(--bg) 100%); }
/* power-on wipe: bars rest off-screen, so no animation = nothing covered */
.hero::before { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; background: #fff8e7; transform: scaleY(0); animation: poweron .7s steps(7) backwards; }
@keyframes poweron { 0% { transform: scaleY(1); background: #000; } 40% { transform: scaleY(.012); background: #fff8e7; } 100% { transform: scaleY(0); } }
.hero-in { z-index: 2; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 48px; align-items: center; }
.hero-copy > *, .hero-side > * { animation: pop .5s steps(5) backwards; animation-delay: calc(.6s + var(--d, 0) * .12s); }
.hero-copy > :nth-child(2) { --d: 1; } .hero-copy > :nth-child(3) { --d: 2; } .hero-copy > :nth-child(4) { --d: 3; } .hero-copy > :nth-child(5) { --d: 4; }
.hero-side > :nth-child(1) { --d: 2; } .hero-side > :nth-child(2) { --d: 4; }
@keyframes pop { from { opacity: 0; transform: translateY(24px); } }
.hero h1 { font-size: clamp(44px, 6.6vw, 96px); line-height: 1.14; text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 #2a3fc4, 12px 12px 0 #05041a; margin-bottom: 30px; }
.hero h1 .line { display: block; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .eyebrow { text-shadow: 2px 2px 0 #05041a; }

/* dialogue box */
.dialog { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; padding: 16px 40px 18px 16px; max-width: 600px; margin-bottom: 22px; cursor: default; }
.face { width: 56px; height: 56px; border: 3px solid var(--ink); image-rendering: pixelated; background: #000; }
.who { display: block; font-family: var(--pixel); font-size: 10px; color: var(--gold); line-height: 1.6; margin-bottom: 2px; }
.dialog .lede { font-size: 17px; line-height: 1.65; }
.next { position: absolute; right: 14px; bottom: 12px; border: 7px solid transparent; border-top: 10px solid var(--ink); border-bottom: 0; animation: bob .6s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

.search label { display: block; font-family: var(--pixel); font-size: 0; color: var(--cyan); margin-bottom: 8px; }
.search label::before { content: "SEARCH"; font-size: 10px; text-shadow: 2px 2px 0 #05041a; }
.search-row { display: flex; gap: 14px; flex-wrap: wrap; max-width: 600px; align-items: stretch; }
.search input, .req-body input, .req-body textarea { min-height: 52px; padding: 0 16px; border: 3px solid var(--ink); border-radius: 0; background: #05041a; color: var(--ink); font: inherit; outline: none; box-shadow: inset 4px 4px 0 rgba(255, 255, 255, .06); }
.search input { flex: 1 1 240px; }
.search input::placeholder, .req-body ::placeholder { color: #7f7bb4; }
.search input:focus, .req-body input:focus, .req-body textarea:focus { border-color: var(--gold); }
/* HUD */
.stats { display: flex; gap: 28px; margin-top: 30px; flex-wrap: wrap; }
.stats b { display: block; font-family: var(--pixel); font-size: clamp(14px, 1.5vw, 19px); line-height: 1.6; color: var(--gold); text-shadow: 3px 3px 0 #05041a; font-weight: 400; }
.stats span { font-size: 13px; color: var(--ink); text-shadow: 2px 2px 0 #05041a; }

/* the game screen: shots swap with a mosaic */
.screen { padding: 10px; }
.reel { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.reel figure { position: absolute; inset: 0; opacity: 0; }
.reel img { width: 100%; height: 100%; object-fit: cover; }
.reel figcaption { position: absolute; left: 0; bottom: 0; padding: 6px 12px; background: #05041a; color: var(--ink); font-family: var(--display); font-size: 14px; font-weight: 700; }
.reel figcaption span { font-family: var(--pixel); font-size: 8px; color: var(--green); margin-right: 10px; text-transform: uppercase; }
.reel canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.reel.gl figure { animation: none; opacity: 0; }
.reel.gl figure.on { opacity: 1; }
.reel.gl img { animation: none; visibility: hidden; }
.reel::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(0, 0, 0, .55); }
.hero-donate { margin-top: 22px; }

/* donate window */
.donate-box { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; padding: 16px; }
.donate-box .qr { width: 132px; background: #fff; padding: 6px; border: 3px solid #05041a; }
.donate-title { font-weight: 700; font-size: 20px; color: var(--gold); line-height: 1.4; }
.donate-title::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 10px; border-radius: 50%; background: var(--gold); box-shadow: inset -3px -3px 0 var(--gold-lo); animation: coin .8s steps(4) infinite; }
@keyframes coin { 50% { transform: scaleX(.15); } }
.donate-sub { color: var(--ink); opacity: .85; font-size: 14px; line-height: 1.55; margin: 2px 0 10px; }
.bank > div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; padding: 4px 0; border-top: 2px dotted rgba(255, 255, 255, .25); font-size: 14px; }
.bank dt { color: var(--cyan); }
.copy { margin-left: 6px; padding: 0 10px; border: 2px solid var(--ink); background: #05041a; color: var(--ink); font-size: 12px; }
.copy:hover { color: var(--on-gold); background: var(--gold); border-color: var(--gold); }
#donate .donate-box { margin-top: 26px; grid-template-columns: 200px 1fr; padding: 26px; gap: 28px; }
#donate .donate-box .qr { width: 200px; }
#donate .bank > div { font-size: 16px; padding: 7px 0; grid-template-columns: 90px 1fr; }

/* ticker of game names */
.marquee { overflow: hidden; padding: 14px 0; background: var(--gold); border-top: 3px solid #05041a; border-bottom: 3px solid #05041a; position: relative; z-index: 2; }
.marquee-in { display: flex; align-items: center; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { font-family: var(--display); font-size: clamp(20px, 2.4vw, 30px); font-weight: 700; line-height: 1.2; white-space: nowrap; color: var(--on-gold); text-transform: uppercase; }
.marquee span.g { color: #b3134f; }
.marquee i { width: 10px; height: 10px; margin: 0 clamp(18px, 2.4vw, 36px); background: var(--on-gold); transform: rotate(45deg); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee-in { animation-play-state: paused; }

/* stages */
.section { position: relative; padding: 92px 0; }
.section.alt { background: var(--bg-2); border-top: 3px solid var(--line); border-bottom: 3px solid var(--line);
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 12px 12px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head h2 { margin: 0; }
.section-head > [data-count] { font-family: var(--pixel); font-size: 10px; color: var(--green); }
.panel-title { padding: 16px 20px 6px; font-weight: 700; color: var(--gold); }

/* scroll reveal in sprite-like steps (only when JS is running; see inline script in <head>) */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .4s steps(4), transform .4s steps(4); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* select game */
.mods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 44px 22px; }
.mods.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 32px 18px; }
.mod-link { position: relative; display: block; text-decoration: none; color: var(--ink); outline: none; }
.box { position: relative; display: block; aspect-ratio: 3 / 4; }
.box .cover { border: 3px solid var(--ink); box-shadow: 0 0 0 3px #05041a, 6px 6px 0 rgba(0, 0, 0, .5); transition: transform .12s steps(2); }
.box .cover > img { filter: saturate(.95); }
/* the cursor: bouncing pointer + flashing frame on the chosen game */
.mod-link::before { content: ""; position: absolute; left: 50%; top: -26px; margin-left: -11px; border: 11px solid transparent; border-top: 14px solid var(--gold); border-bottom: 0; filter: drop-shadow(0 3px 0 #05041a); opacity: 0; z-index: 3; }
.mod-link:hover::before, .mod-link:focus-visible::before { opacity: 1; animation: bob .5s steps(2) infinite; }
.mod-link:hover .cover, .mod-link:focus-visible .cover { transform: translateY(-6px); border-color: var(--gold); animation: select .5s steps(1) infinite; }
@keyframes select { 50% { border-color: var(--ink); } }
.mods:hover .mod-link:not(:hover) .cover > img, .mods:focus-within .mod-link:not(:focus-visible):not(:hover) .cover > img { filter: saturate(.35) brightness(.55); }
.mod-name { display: block; font-weight: 700; font-size: 16px; line-height: 1.4; margin-top: 16px; }
.mod-link:hover .mod-name, .mod-link:focus-visible .mod-name { color: var(--gold); }
.mod-meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.mod-tag { font-size: 12px; color: #8d89c9; line-height: 1.5; margin-top: 2px; }
.dl-count { font-size: 13px; color: var(--green); margin-top: 2px; }
.mods.small .mod-name { font-size: 15px; }
.mods.small .mod-tag { display: none; }
.empty { padding: 28px; border: 3px dashed var(--line); color: var(--muted); text-align: center; }
/* HP bar = how much of the game is translated */
.hp { display: block; height: 14px; margin-top: 8px; padding: 2px; border: 2px solid var(--ink); background: #05041a; }
.hp i { display: block; height: 100%; width: calc(var(--p) * 1%); background: repeating-linear-gradient(90deg, var(--green) 0 6px, transparent 6px 8px); }
.js [data-reveal] .hp i { width: 0; }
.js [data-reveal].in .hp i { width: calc(var(--p) * 1%); transition: width .9s steps(12) .35s; }
dd .hp { display: inline-block; width: min(240px, 60%); vertical-align: middle; margin: 0 0 0 10px; }

/* cover (box art) */
.cover { position: relative; display: block; width: 100%; height: 100%; container-type: inline-size; background: #17152e; color: #fff; overflow: hidden; }
.cover > img { width: 100%; height: 100%; object-fit: cover; }
.cover-band { position: absolute; z-index: 1; top: 0; left: 0; display: flex; gap: 2.4cqw; padding: 2cqw 3.6cqw; font-family: var(--pixel); font-size: max(7px, 3.4cqw); line-height: 1.5; background: var(--pink); color: #fff; border-right: 3px solid #05041a; border-bottom: 3px solid #05041a; }
.cover-band span { color: #fff3b0; }
.cover-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 4cqw 5cqw; font-family: var(--display); font-size: 9.4cqw; font-weight: 700; line-height: 1.2; background: #05041a; border-top: 3px solid var(--ink); }
.typo-cover { position: absolute; inset: 0; display: grid; place-items: center; background: hsl(var(--h) 45% 22%); }
.typo-cover b { font-family: var(--pixel); font-size: 44cqw; line-height: 1; color: hsl(var(--h) 70% 74%); }

/* font check: the sample line sits in a dialogue box */
.why { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.checks li { position: relative; padding-left: 32px; margin-top: 12px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 14px; height: 14px; background: var(--green); box-shadow: 3px 3px 0 #05041a; clip-path: polygon(0 50%, 25% 50%, 40% 70%, 80% 10%, 100% 30%, 42% 100%); }
.specimen { overflow: hidden; }
.spec-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; background: #05041a; }
.spec-tabs button { padding: 10px 8px; border: 2px solid var(--line); background: #1a1650; color: var(--muted); font-family: var(--display); font-size: 15px; font-weight: 700; }
.spec-tabs button:hover { color: var(--ink); }
.spec-tabs button[aria-selected="true"] { color: var(--on-gold); background: var(--gold); border-color: var(--gold); }
.spec-board { display: flex; flex-direction: column; }
.spec-text { aspect-ratio: 16 / 8.2; display: flex; align-items: flex-end; justify-content: center; text-align: center; padding: 0 20px 9%; font-size: clamp(26px, 3.6vw, 44px); line-height: 1.7; font-weight: 600; word-break: break-word; color: #fff; text-shadow: 3px 3px 0 #05041a;
  background:
    linear-gradient(transparent 56%, rgba(5, 4, 26, .86) 56%),
    linear-gradient(#3fd0ff 0 34%, #8be3ff 34% 46%, #4fc55e 46% 52%, #2f9b45 52%); }
.spec-text .tofu { display: inline-block; width: .5em; height: .72em; border: .06em solid #fff; margin: 0 .04em; align-self: flex-end; margin-bottom: .42em; }
.spec-text .bad { color: var(--red); }
.spec-text .dot { color: #8d89c9; font-weight: 400; }
.spec-note { padding: 14px 20px 18px; font-size: 15px; min-height: 4.6em; }

/* how to play */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 22px 22px 24px; background: linear-gradient(180deg, var(--win-a), var(--win-b)); border: 3px solid var(--ink); border-radius: 8px; box-shadow: 0 0 0 3px #05041a, 8px 8px 0 rgba(0, 0, 0, .45); }
.steps li::before { content: "QUEST " counter(s); display: block; font-family: var(--pixel); font-size: 11px; color: var(--gold); margin-bottom: 12px; text-shadow: 2px 2px 0 #05041a; }
.steps li + li::after { content: ""; position: absolute; left: -27px; top: 50%; margin-top: -10px; border: 10px solid transparent; border-left: 13px solid var(--gold); animation: nudge .5s steps(2) infinite; }
.steps b { display: block; font-family: var(--display); font-size: 21px; }
.steps span { font-size: 15px; opacity: .88; }

/* help */
.faq { margin-top: 22px; padding: 6px 22px; }
.faq details + details { border-top: 2px dotted rgba(255, 255, 255, .25); }
.faq summary { cursor: pointer; padding: 18px 0 18px 30px; font-family: var(--display); font-weight: 700; font-size: 18px; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { left: 4px; top: 30px; margin: 0; opacity: .55; }
.faq summary:hover { color: var(--gold); }
.faq summary:hover::before { opacity: 1; animation: nudge .5s steps(2) infinite; }
.faq details[open] summary { color: var(--gold); }
.faq details[open] summary::before { opacity: 1; transform: rotate(90deg); animation: none; }
.faq details p { padding: 0 0 20px 30px; animation: pop .3s steps(3); }

/* quest board */
.request { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.req-form { margin-top: 24px; }
.req-body { display: grid; gap: 8px; padding: 22px; }
.req-body label { font-family: var(--display); font-weight: 700; margin-top: 6px; }
.req-body label .muted { font-family: var(--font); font-weight: 400; }
.req-body input, .req-body textarea { width: 100%; resize: vertical; }
.req-body textarea { padding: 12px 16px; }
.req-body .btn { justify-self: start; margin-top: 10px; }
.req-err { color: #ffb3b3; font-size: 15px; font-weight: 600; }
.req-ok { color: var(--green); font-weight: 700; }
.req-list { counter-reset: r; padding: 6px 20px; }
.req-list li { counter-increment: r; position: relative; display: grid; grid-template-columns: 34px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 2px dotted rgba(255, 255, 255, .25); }
.req-list li::before { content: counter(r, decimal-leading-zero); position: static; margin: 0; border: 0; opacity: 1; font-family: var(--pixel); font-size: 10px; color: var(--gold); }
.req-list li.req-empty { display: block; border: 0; opacity: .85; }
.req-list li.req-empty::before { content: none; }
.req-list .votes { font-family: var(--pixel); font-size: 11px; color: var(--green); }
.req-list button { padding: 2px 12px; background: var(--gold); color: var(--on-gold); border: 2px solid #05041a; font-weight: 700; box-shadow: 0 3px 0 #05041a; }
.req-list button:hover:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #05041a; }
.req-list button:disabled { background: #1a1650; color: var(--muted); box-shadow: none; cursor: default; }
.req-hint { font-size: 13px; padding: 6px 20px 18px; color: var(--ink); opacity: .8; }

/* ===== game page = status screen ===== */
.backdrop { position: absolute; inset: 0 0 auto 0; height: 640px; overflow: hidden; pointer-events: none; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.3) brightness(.4) contrast(1.1); }
.backdrop.tint { background: hsl(var(--h) 45% 16%); }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 10, 36, .3), var(--bg) 96%), repeating-conic-gradient(rgba(12, 10, 36, .55) 0 25%, transparent 0 50%) 0 0 / 4px 4px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); padding: 24px 0 8px; }
.crumbs a { color: var(--ink); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.game-hero { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; padding: 28px 0 52px; border-bottom: 3px solid var(--line); }
.game-info > * { animation: pop .4s steps(4) backwards; animation-delay: calc(.1s + var(--d, 0) * .08s); }
.game-info > :nth-child(2) { --d: 1; } .game-info > :nth-child(3) { --d: 2; } .game-info > :nth-child(4) { --d: 3; } .game-info > :nth-child(5) { --d: 4; } .game-info > :nth-child(n+6) { --d: 5; }
.game-info h1 { font-size: clamp(30px, 4vw, 50px); text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 #05041a; margin-bottom: 8px; }
.game-info .lede { margin: 14px 0 26px; max-width: 52ch; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 28px; padding: 8px 22px; }
.facts div { padding: 11px 0; border-bottom: 2px dotted rgba(255, 255, 255, .25); }
.facts .wide { grid-column: 1 / -1; }
.facts dt { font-size: 13px; color: var(--cyan); }
.facts dd { font-weight: 700; }
.hash { margin-top: 16px; font-size: 12px; color: #8d89c9; overflow-wrap: anywhere; }
.hash span { font-weight: 700; margin-right: 4px; }
.game-body { display: grid; grid-template-columns: 1fr 340px; gap: 56px; padding: 8px 0; }
.game-side { position: sticky; top: calc(var(--top-h) + 24px); align-self: start; margin-top: 48px; }
.game-side .donate-box { grid-template-columns: 1fr; }
.game-side .qr { width: 180px; }
.block { padding: 48px 0 0; }
.block h2 { font-size: clamp(24px, 2.6vw, 32px); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.gallery .shot { display: block; overflow: hidden; border: 3px solid var(--ink); box-shadow: 0 0 0 3px #05041a, 6px 6px 0 rgba(0, 0, 0, .5); cursor: zoom-in; }
.gallery .shot:first-child { grid-column: 1 / -1; }
.gallery img { width: 100%; }
.gallery a:hover { border-color: var(--gold); }
.callout { background: #2a1a05; border: 3px solid var(--gold); padding: 16px 20px; margin-bottom: 18px; }
.callout b { color: var(--gold); }
.callout ul { margin-top: 4px; padding-left: 20px; list-style: square; }
.howto { counter-reset: h; }
.howto li { counter-increment: h; position: relative; padding: 16px 0 16px 58px; border-bottom: 2px dotted var(--line); }
.howto li::before { content: counter(h); position: absolute; left: 0; top: 14px; width: 38px; height: 38px; display: grid; place-items: center; background: var(--win-a); border: 3px solid var(--ink); box-shadow: 3px 3px 0 #05041a; color: var(--gold); font-family: var(--pixel); font-size: 12px; }
.lightbox { margin: auto; max-width: min(1280px, 94vw); max-height: 92vh; border: 3px solid var(--ink); background: #000; padding: 0; overflow: hidden; cursor: zoom-out; }
.lightbox[open] { animation: pop .25s steps(3); }
.lightbox::backdrop { background: rgba(5, 4, 26, .92); }
.lightbox img { max-height: 92vh; width: auto; }

/* game over (404) */
.over { text-align: center; min-height: 60vh; display: grid; align-items: center; }
.over-big { font-family: var(--pixel); font-size: clamp(28px, 6vw, 64px); line-height: 1.4; color: var(--red); text-shadow: 4px 4px 0 #05041a; margin-bottom: 24px; animation: blink 1.2s steps(1) infinite; }
.over .lede { margin: 12px 0 28px; }

/* footer */
.foot { border-top: 3px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--muted); background: #08071c; }
.foot-in { display: grid; gap: 6px; }
.thanks { font-family: var(--pixel); font-size: 11px; color: var(--gold); margin-bottom: 10px; }

/* cheat code reward */
.toast { position: fixed; left: 50%; top: 96px; transform: translateX(-50%); z-index: 60; padding: 14px 20px; text-align: center; font-family: var(--display); font-weight: 700; animation: pop .3s steps(3); }
.toast b { display: block; font-family: var(--pixel); font-size: 11px; color: var(--gold); margin-bottom: 4px; }
.rain { position: fixed; top: -24px; z-index: 59; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); box-shadow: inset -4px -4px 0 var(--gold-lo); pointer-events: none; animation: fall 2.6s steps(26) forwards, coin .5s steps(4) infinite; }
@keyframes fall { to { top: 110vh; } }

/* page-to-page: box art flies into place */
::view-transition-group(*) { animation-duration: .4s; animation-timing-function: steps(6); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; animation-timing-function: steps(4); }

/* responsive */
@media (max-width: 1100px) {
  .mods { grid-template-columns: repeat(4, 1fr); }
  .hero-in { grid-template-columns: 1fr; gap: 40px; }
  .hero-side { max-width: 620px; }
  .snd { display: none; }
}
@media (max-width: 1000px) {
  .mods { grid-template-columns: repeat(3, 1fr); }
  .why, .request { grid-template-columns: 1fr; gap: 36px; }
  .game-body { grid-template-columns: 1fr; }
  .game-side { position: static; margin-top: 36px; }
  .game-hero { grid-template-columns: 240px 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  :root { --top-h: 92px; }
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .top-in { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
  .top nav { width: calc(100% + 36px); margin: 0 -18px; padding: 0 8px 4px; overflow-x: auto; scrollbar-width: none; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { padding: 4px 8px 4px 10px; }
  .top nav a::before { content: none; }
  .top nav .nav-donate { padding: 2px 12px; }
  .hero { min-height: 0; padding: 36px 0 90px; }
  .hero h1 { text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 #05041a; }
  .dialog { grid-template-columns: 44px 1fr; gap: 12px; padding-right: 30px; }
  .face { width: 44px; height: 44px; }
  .stats { gap: 18px; }
  .mods { grid-template-columns: repeat(2, 1fr); gap: 34px 16px; }
  .steps { grid-template-columns: 1fr; }
  .steps li + li::after { left: 50%; top: -30px; margin: 0 0 0 -10px; transform: rotate(90deg); animation: none; }
  .game-hero { grid-template-columns: 1fr; gap: 26px; }
  .game-cover { max-width: 210px; }
  .donate-box, #donate .donate-box { grid-template-columns: 1fr; }
  .donate-box .qr, #donate .donate-box .qr { width: 190px; margin: 0 auto; }
  .gallery { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .btn-lg { width: 100%; white-space: normal; text-align: center; padding: 10px 20px; }
  .facts { grid-template-columns: 1fr; }
  .win { box-shadow: 0 0 0 3px #05041a, 5px 5px 0 rgba(0, 0, 0, .45); }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reel figure:first-child { opacity: 1; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js [data-reveal] .hp i { width: calc(var(--p) * 1%); }
  .crt { display: none; }
}
