/* Quiz Knight website. Colours from design/art/art-bible.md; frames are the game's own UI sprites. */

@font-face {
  font-family: "Determination";
  src: url("fonts/determination.woff2") format("woff2"), url("fonts/determination.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #191410;
  --leather: #512E29;
  --wood: #AE9561;
  --parchment: #F5E1B1;
  --night: #1C2F3F;
  --slate: #61798B;
  --gold: #EBBE5E;
  --correct: #B0D603;
  --wrong: #B83535;
  --forest: #0C260A;
  --navy: #042F5C;
  --stone: #2A2A33;

  --pixel: "Determination", "Courier New", monospace;
  --book: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font: 18px/1.65 var(--book);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #F7D68A; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, .pixel { font-family: var(--pixel); font-weight: normal; letter-spacing: 0.01em; line-height: 1.15; }
h2 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 16px; color: var(--gold); }
h3 { font-size: 24px; margin: 0 0 8px; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--gold); color: var(--ink); padding: 8px 12px; font-family: var(--pixel); }
.skip:focus { left: 8px; }

.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-header { background: var(--ink); border-bottom: 4px solid #000; position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--parchment); text-decoration: none; font-family: var(--pixel); font-size: 22px; }
.brand img { width: 32px; height: 41px; }
.site-nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; font-family: var(--pixel); font-size: 19px; }
.site-nav a { color: var(--parchment); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); }
@media (max-width: 640px) { .site-nav .wide { display: none; } .site-nav ul { gap: 16px; } }

/* ---------- frames from the game's sprites ---------- */
.panel {
  color: var(--ink);
  /* Stone frame from the game's panel sprite; flat parchment inside (a tiled texture shows seams). */
  border: 44px solid transparent;
  border-image: url("img/ui-panel-9-slice.png") 22 / 44px round;
  background: radial-gradient(ellipse at 50% 40%, #E4C795 0%, #DBB885 60%, #D2AC77 100%) padding-box;
  image-rendering: pixelated;
  padding: 18px 22px;
}
.panel a { color: var(--leather); }
.panel a.btn { color: #fff; }
.panel a.btn-gold { color: var(--ink); }
.panel :focus-visible { outline-color: var(--ink); }
@media (max-width: 560px) {
  .panel { border-width: 22px; border-image-width: 22px; padding: 14px 12px; }
  .stage .panel { margin-top: -14px; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 18px;
  font: 22px/1.1 var(--pixel); text-decoration: none; text-align: center;
  border: 16px solid transparent;
  border-image: url("img/ui-gray-button.png") 8 fill / 16px stretch;
  image-rendering: pixelated;
  color: #fff; cursor: pointer; background: none;
}
.btn:hover { filter: brightness(1.12); color: #fff; }
.btn-gold { border-image-source: url("img/ui-yellow-button.png"); color: var(--ink); }
.btn-gold:hover { color: var(--ink); }
.btn small { display: block; font-size: 15px; opacity: 0.85; }

/* ---------- hero: a playable ten-stage run on the game's dungeon wall ---------- */
.hero {
  padding: 28px 0 48px;
  background:
    radial-gradient(ellipse 55% 45% at 8% 35%, rgba(255, 140, 40, 0.16), transparent 70%),
    radial-gradient(ellipse 55% 45% at 92% 30%, rgba(255, 140, 40, 0.12), transparent 70%),
    linear-gradient(rgba(14, 11, 9, 0.72), rgba(25, 20, 16, 0.97) 90%),
    url("img/wall.png") 0 0 / 512px 512px;
  image-rendering: pixelated;
}
@media (min-width: 900px) { .hero { padding: 44px 0 64px; } }

.hero-grid { display: grid; gap: 18px; grid-template-areas: "head" "stage" "body"; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1.1fr; grid-template-areas: "head stage" "body stage"; column-gap: 56px; row-gap: 0; }
  .hero-head { align-self: end; }
  .hero-body { align-self: start; }
}
.hero-head { grid-area: head; text-align: center; }
.stage { grid-area: stage; }
.hero-body { grid-area: body; text-align: center; }
@media (min-width: 900px) { .hero-head, .hero-body { text-align: left; } }

.hero-logo { width: 292px; margin: 0 auto 6px; }
@media (min-width: 900px) { .hero-logo { width: 438px; margin: 0 0 8px -14px; } }
.hero h1 { font-size: clamp(28px, 5.4vw, 50px); margin: 0; color: var(--parchment); text-wrap: balance; }
@media (min-width: 900px) { .hero h1 { margin-bottom: 16px; } }
.hero .pitch { font-size: 19px; max-width: 36ch; margin: 6px auto 20px; color: #E9D6A8; }
@media (min-width: 900px) { .hero .pitch { margin-left: 0; font-size: 20px; } }
.cta { min-width: min(100%, 320px); }
.soon { font-family: var(--pixel); font-size: 17px; color: #CDBE9C; margin: 10px 0 18px; text-wrap: balance; }
.soon strong { font-weight: normal; color: var(--parchment); }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 10px; justify-content: center; font-family: var(--pixel); font-size: 17px; }
@media (min-width: 900px) { .tags { justify-content: flex-start; } }
.tags li { padding: 4px 12px; border-radius: 999px; background: var(--forest); color: #CFEFA0; border: 2px solid #2E5A22; }
.tags li.age { background: var(--leather); color: var(--parchment); border-color: #7A4A40; }
.store-note { font-size: 15px; color: #BFB39A; margin: 0; }

/* stage: HUD, room, question card, stacked like the game screen */
.stage { max-width: 560px; width: 100%; margin: 0 auto; }
.hud {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: #14110E; border: 4px solid #000; border-bottom: 0;
  font-family: var(--pixel); font-size: 17px; color: var(--parchment);
}
.hud-stage { white-space: nowrap; }
.bar { flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; height: 24px; padding: 3px; background: #2B2420; border: 3px solid #6E5638; border-radius: 3px; }
.bar i { background: #3A302A; }
.bar i.on { background: url("img/bar-fill.png") center / 100% 100%; animation: seg-pop 0.35s steps(3); }
@keyframes seg-pop { 0% { transform: scaleY(1.6); } 100% { transform: scaleY(1); } }
.hud-coins { display: flex; align-items: center; gap: 6px; }
.hud-coins img { width: 20px; height: 20px; }
.hud-coins b { font-weight: normal; min-width: 2ch; text-align: right; color: var(--gold); }
@media (max-width: 420px) { .hud { font-size: 15px; gap: 8px; } .bar { height: 20px; gap: 2px; } }

.room { position: relative; aspect-ratio: 288 / 150; overflow: hidden; border: 4px solid #000; border-bottom: 0; background: #000; }
.room canvas { display: none; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.room.live canvas { display: block; }
.room.live .room-fallback { display: none; }
.room img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; transition: opacity 0.22s; }
.room.is-leaving img { opacity: 0; }
.room.shake { animation: shake 0.36s steps(6); }
.room.hurt::after { content: ""; position: absolute; inset: 0; background: rgba(184, 53, 53, 0.28); animation: fade-out 0.4s forwards; }
@keyframes shake {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6px, 2px); } 40% { transform: translate(5px, -2px); }
  60% { transform: translate(-4px, 1px); } 80% { transform: translate(3px, 0); } 100% { transform: translate(0, 0); }
}
@keyframes fade-out { to { opacity: 0; } }
.fx-layer { position: absolute; inset: 0; pointer-events: none; }
.fx {
  position: absolute; transform: translate(-50%, -50%);
  width: calc(var(--w) * var(--s) * 1px); height: calc(var(--h) * var(--s) * 1px);
  background: var(--img) 0 0 / calc(var(--w) * var(--frames) * var(--s) * 1px) 100% no-repeat;
  image-rendering: pixelated;
  animation: fx-play var(--dur) steps(var(--frames)) forwards;
}
@keyframes fx-play { to { background-position-x: calc(var(--w) * var(--frames) * var(--s) * -1px); } }
.coin-pop {
  position: absolute; transform: translate(-50%, 0); display: flex; align-items: center; gap: 4px;
  font: 24px/1 var(--pixel); color: var(--gold); text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
  animation: rise 1s ease-out forwards;
}
.coin-pop img { width: 22px; height: 22px; image-rendering: pixelated; }
@keyframes rise { 0% { opacity: 0; transform: translate(-50%, 6px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -56px); } }
.cleared { position: absolute; left: 50%; top: 10%; transform: translateX(-50%); font: clamp(22px, 5vw, 34px)/1 var(--pixel); color: var(--gold); text-shadow: 3px 3px 0 #000; white-space: nowrap; }

.stage .panel { margin-top: -26px; position: relative; }
@media (max-width: 560px) { .stage .panel { margin-top: -12px; } }
.question { text-align: center; }
.question .label { font-family: var(--pixel); font-size: 16px; color: var(--leather); margin: 0 0 4px; }
.question .q { font: clamp(20px, 3.4vw, 25px)/1.2 var(--pixel); color: var(--ink); margin: 0 0 12px; min-height: 2.4em; display: flex; align-items: center; justify-content: center; text-wrap: balance; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.answer {
  font: 21px/1.1 var(--pixel); color: var(--ink); min-height: 54px; padding: 6px;
  background: #91D5DD; border: 3px solid var(--ink); border-radius: 4px;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.18); cursor: pointer;
  transition: background-color 0.15s, transform 0.08s;
}
.answer:hover:not([disabled]) { background: #A9E2E8; }
.answer:active:not([disabled]) { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.answer.is-correct { background: var(--correct); }
.answer.is-wrong { background: var(--wrong); color: #fff; }
.answer.is-out { background: #8C8C8C; color: #3B3B3B; }
.answer[disabled] { cursor: default; }
.verdict { font-family: var(--pixel); font-size: 19px; min-height: 1.4em; margin: 12px 0 4px; color: var(--leather); }
.after { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.next[hidden], .answers[hidden] { display: none; }
.btn:active { transform: translateY(2px); }

@media (prefers-reduced-motion: reduce) {
  .room.shake, .bar i.on, .sprite { animation: none; }
  .walker { animation: none; transform: translateX(var(--x)); }
  .fx, .coin-pop, .room.hurt::after { display: none; }
  .room img { transition: none; }
}

/* ---------- sections ---------- */
section { padding: 80px 0; }
.band-night { background: var(--night); }
/* B7: the game's dungeon wall behind sections, darkened so text stays readable. */
.textured { background: linear-gradient(rgba(25, 20, 16, 0.93), rgba(25, 20, 16, 0.93)), url("img/wall.png") 0 0 / 512px 512px; image-rendering: pixelated; }
.band-night.textured { background: linear-gradient(rgba(28, 47, 63, 0.92), rgba(28, 47, 63, 0.95)), url("img/wall.png") 0 0 / 512px 512px; }
.textured img:not(.px) { image-rendering: auto; }
.lead { font-size: 20px; max-width: var(--measure); color: #E9D6A8; }

.steps { list-style: none; counter-reset: step; display: grid; gap: 18px; padding: 0; margin: 28px 0 0; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; padding: 22px 22px 20px; background: var(--ink); border: 3px solid #000; box-shadow: inset 0 0 0 3px #3A3A44; }
.steps li { display: flex; flex-direction: column; }
.steps li::before { content: counter(step); font-family: var(--pixel); font-size: 40px; color: var(--gold); display: block; line-height: 1; margin-bottom: 10px; order: 1; }
.steps li img { width: 100%; height: 190px; object-fit: contain; background: #0C0A08; border: 3px solid #000; margin-bottom: 16px; order: 0; }
.steps li h3 { order: 2; }
.steps li p { order: 3; }
.steps h3 { color: var(--parchment); }
.steps p { margin: 0; color: #D9C9A3; }

.modes { display: grid; gap: 24px; margin-top: 28px; }
@media (min-width: 860px) { .modes { grid-template-columns: 1fr 1fr; } }
.mode { padding: 28px; border: 3px solid #000; display: grid; gap: 18px; align-content: start; }
.mode-mp { background: var(--forest); box-shadow: inset 0 0 0 3px #2E5A22, 0 0 24px rgba(120, 220, 60, 0.12); }
.mode-sp { background: var(--navy); box-shadow: inset 0 0 0 3px #2A5C8E; }
.mode h3 { font-size: 30px; color: #fff; }
.mode p { color: #E8EEDC; margin: 0; }
.mode-sp p { color: #DCE6F2; }
.mode figure { margin: 0; }
.mode img { border: 3px solid #000; }
.mode figcaption { font-size: 15px; color: #C9D3BC; margin-top: 8px; }

.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1.1fr 0.9fr; gap: 56px; } }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.checks li { padding-left: 30px; position: relative; max-width: 52ch; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 12px; height: 12px; background: var(--gold); box-shadow: 3px 3px 0 var(--leather); }

.pets { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 4px 0; padding: 26px 22px 18px; background: #14110E; border: 3px solid #000; box-shadow: inset 0 -14px 0 #2B2620; }
.pets .sprite { --s: 3; }

/* animated sprite strips (frames and speed come from sprites.css) */
.sprite {
  display: inline-block; --s: 2;
  width: calc(var(--w) * var(--s) * 1px); height: calc(var(--h) * var(--s) * 1px);
  background: var(--img) 0 0 / calc(var(--w) * var(--frames) * var(--s) * 1px) 100% no-repeat;
  image-rendering: pixelated;
  animation: fx-play var(--dur) steps(var(--frames)) infinite;
}

/* B3: the three bots */
.rivals { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 12px; }
@media (min-width: 520px) { .rivals { grid-template-columns: repeat(3, 1fr); } }
.rival { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 8px; background: rgba(0, 0, 0, 0.28); border: 2px solid #2A5C8E; }
.rival-gear { display: flex; gap: 2px; }
.rival-gear img { width: 64px; height: 64px; }
.rival-name { font: 21px/1.1 var(--pixel); color: #fff; }
.rival-level { font: 16px/1.2 var(--pixel); color: #BFD3EA; }

/* B4: loot wall in the shop's rarity colours */
.loot-title { margin: 48px 0 14px; color: var(--parchment); }
.loot-wall { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 18px 8px; }
.loot { text-align: center; background: url("img/frame-common.png") top center / 110px 115px no-repeat; image-rendering: pixelated; }
.loot > :first-child { display: block; width: 64px; height: 64px; margin: 25px auto 30px; }
.loot img { image-rendering: pixelated; }
.loot-rare { background-image: url("img/frame-rare.png"); }
.loot-epic { background-image: url("img/frame-epic.png"); }
.loot-legendary { background-image: url("img/frame-legendary.png"); }
.loot-name { display: block; font: 16px/1.15 var(--pixel); color: var(--parchment); }
.loot-rarity { display: block; font: 14px/1.4 var(--pixel); color: #A5A5A5; }
.loot-rare .loot-rarity { color: #7FB4F0; }
.loot-epic .loot-rarity { color: #C893F0; }
.loot-legendary .loot-rarity { color: var(--gold); }

/* B2 / B8: pets walking along the dungeon floor */
.parade {
  position: relative; height: 118px; overflow: hidden;
  background:
    linear-gradient(transparent 84px, #4A433B 84px, #3A342E 90px, #24201C 90px, #1B1815 100%),
    linear-gradient(rgba(14, 11, 9, 0.84), rgba(14, 11, 9, 0.84)),
    url("img/wall.png") 0 0 / 256px 256px;
  image-rendering: pixelated; border-top: 4px solid #000; border-bottom: 4px solid #000;
}
.walker { position: absolute; left: 0; bottom: 30px; animation: fx-play var(--dur) steps(var(--frames)) infinite, walk var(--speed, 26s) linear var(--delay, 0s) infinite; }
.walker.flyer { bottom: 58px; }
@keyframes walk { from { transform: translateX(-120px); } to { transform: translateX(calc(100vw + 40px)); } }
.w1 { --delay: 0s; --x: 6vw; }
.w2 { --delay: -4s; --x: 22vw; }
.w3 { --delay: -9s; --speed: 34s; --x: 40vw; }
.w4 { --delay: -14s; --x: 56vw; }
.w5 { --delay: -6s; --speed: 22s; --x: 70vw; }
.w6 { --delay: -19s; --x: 84vw; }
.parade-mini { height: 96px; background-size: auto, auto, 256px 256px; background-image: linear-gradient(transparent 64px, #4A433B 64px, #3A342E 70px, #24201C 70px, #1B1815 100%), linear-gradient(rgba(14, 11, 9, 0.84), rgba(14, 11, 9, 0.84)), url("img/wall.png"); }
.parade-mini .walker { bottom: 28px; }
.parade-mini .walker.flyer { bottom: 26px; }
.sprite.anim-chick-run { --s: 3; }

/* B6: leaderboards and medals */
.ladder { margin-top: 56px; display: grid; gap: 28px; align-items: end; }
@media (min-width: 860px) { .ladder { grid-template-columns: 1.1fr 0.9fr; gap: 56px; } }
.ladder h3 { font-size: 30px; color: var(--gold); }
.ladder p { max-width: 52ch; color: #E8EEDC; }
.boards { display: flex; flex-wrap: wrap; gap: 8px; }
.boards span { font: 17px/1 var(--pixel); padding: 8px 14px; background: #0F1B26; border: 2px solid #4A6C8C; color: var(--parchment); }
.podium { list-style: none; padding: 0; margin: 0; display: flex; justify-content: center; align-items: flex-end; gap: 10px; }
.podium li { display: grid; justify-items: center; gap: 4px; width: 33%; max-width: 150px; text-align: center; }
.podium img { width: 49px; height: 61px; }
.podium .p1 img { width: 54px; height: 68px; }
.podium span { font: 19px/1.1 var(--pixel); color: #fff; }
.podium small { font: 15px/1 var(--pixel); color: #BFD3EA; }
.podium li::after { content: ""; display: block; width: 100%; margin-top: 6px; background: #3A3A44; border: 3px solid #000; box-shadow: inset 0 4px 0 #55555F; }
.podium .p1::after { height: 96px; background: #6E5638; box-shadow: inset 0 4px 0 #8C7048; }
.podium .p2::after { height: 64px; }
.podium .p3::after { height: 42px; }

.chests { display: grid; gap: 18px; }
.chests figure { margin: 0; }
.chests img { border: 3px solid #000; }
.chests figcaption { font-size: 16px; color: #D9C9A3; margin-top: 8px; }

/* screenshot shelf */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 22px; overflow-x: auto; padding: 8px 4px 22px; scroll-snap-type: x mandatory; margin-top: 26px; }
.shelf figure { margin: 0; scroll-snap-align: start; }
.phone { padding: 10px; background: #0D0D10; border-radius: 30px; border: 2px solid #3A3A44; box-shadow: 0 0 0 4px #000; }
.phone img { border-radius: 20px; width: 100%; aspect-ratio: 540 / 1140; object-fit: cover; object-position: top; }
.shelf figcaption { font-family: var(--pixel); font-size: 18px; text-align: center; margin-top: 10px; color: var(--parchment); }

/* notify */
.notify .panel { max-width: 760px; margin: 0 auto; }
.notify h2 { color: var(--leather); }
.notify form { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin: 6px 0 12px; }
.notify label { width: 100%; font-family: var(--pixel); font-size: 18px; }
.notify input {
  flex: 1 1 240px; min-height: 56px; padding: 0 14px; font: 19px var(--book); color: var(--ink);
  background: #FFF6DC; border: 3px solid var(--ink); border-radius: 4px;
}
.notify .fine { font-size: 15px; color: #45331F; margin: 0; }

/* ---------- inner pages ---------- */
.page-head { background: linear-gradient(#000, var(--ink)); padding: 48px 0 24px; }
.page-head h1 { font-size: clamp(36px, 6vw, 56px); margin: 0 0 8px; color: var(--gold); }
.page-head p { color: #E9D6A8; max-width: var(--measure); margin: 0; }
.doc { padding: 24px 0 80px; }
.doc .panel { max-width: 860px; }
.doc .panel > :first-child { margin-top: 0; }
.prose { font-size: 18px; }
.prose h2 { font-size: 28px; color: var(--leather); margin: 1.6em 0 0.5em; }
.prose h3 { font-size: 22px; color: var(--leather); margin: 1.3em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose p, .prose li { max-width: var(--measure); }
.table-scroll { overflow-x: auto; margin: 0 0 1.2em; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; }
@media (max-width: 600px) {
  /* Two-column legal tables read as stacked pairs on phones. */
  .prose thead { position: absolute; left: -9999px; }
  .prose table, .prose tbody, .prose tr, .prose td { display: block; }
  .prose tr { padding: 10px 0; border-bottom: 2px solid rgba(81, 46, 41, 0.35); }
  .prose tr td { border: 0; padding: 2px 0; }
  .prose tr td:first-child { font-weight: bold; color: var(--leather); }
}
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 2px solid rgba(81, 46, 41, 0.35); }
.prose th { font-family: var(--pixel); font-weight: normal; font-size: 17px; color: var(--leather); }
.prose code { font: inherit; }
mark.todo { background: #FFD966; color: var(--ink); padding: 0 4px; border-radius: 3px; outline: 2px dashed #B8860B; }

.draft-banner { background: var(--wrong); color: #fff; padding: 14px 0; font-family: var(--pixel); font-size: 19px; border-bottom: 4px solid #000; }
.draft-banner p { margin: 0; }

.faq details { border-bottom: 2px solid rgba(81, 46, 41, 0.3); padding: 12px 0; }
.faq summary { font-family: var(--pixel); font-size: 21px; color: var(--leather); cursor: pointer; }
.faq details[open] summary { margin-bottom: 8px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0 0 1.4em; }
.facts dt { font-family: var(--pixel); color: var(--leather); font-size: 18px; }
.facts dd { margin: 0; }
.downloads { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); list-style: none; padding: 0; margin: 0 0 1.4em; }
.downloads a { display: block; text-decoration: none; color: var(--leather); font-family: var(--pixel); font-size: 17px; }
.downloads img { background: #2A2A33; border: 3px solid var(--ink); margin-bottom: 6px; aspect-ratio: 1; object-fit: contain; width: 100%; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }

/* ---------- 404 ---------- */
.lost { padding: 48px 0 80px; }
.lost-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .lost-grid { grid-template-columns: 0.9fr 1.1fr; gap: 56px; } }
.lost-scene { max-width: 420px; margin: 0 auto; border: 4px solid #000; }
.lost-code { font: 72px/1 var(--pixel); color: var(--gold); margin: 0 0 8px; }
.lost h1 { font-size: clamp(32px, 5vw, 48px); margin: 0 0 14px; color: var(--parchment); }
.lost p { max-width: 44ch; color: #E9D6A8; }
.lost-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; max-width: none !important; }

/* ---------- footer ---------- */
.site-footer { background: #000; color: #BFB39A; padding: 40px 0 48px; font-size: 15px; }
.site-footer nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0 0 18px; font-family: var(--pixel); font-size: 19px; }
.site-footer nav a { color: var(--parchment); text-decoration: none; }
.site-footer nav a:hover { color: var(--gold); }
.site-footer p { max-width: 90ch; margin: 0 0 8px; }
.site-footer .age { font-family: var(--pixel); font-size: 18px; color: var(--parchment); }

/* Tap targets: menu links at least 34px tall. */
.site-nav a, .site-footer nav a { display: inline-block; padding: 6px 0; }
