/* =====================================================================
   LYCAN ARCADE v2 - CB Interactive
   One brand colour (Amiga orange) for logo, primary buttons, band and active states.
   Magenta and cyan stay as neon light from the film.
   ===================================================================== */
:root {
  --bg: #070a12;
  --panel: #0b1020;
  --ink: #ffffff;
  --muted: #cfe3ff;
  --dim: #8a93a8;
  --brand: #ff8800;
  --brand-deep: #b84f00;
  --amiga-blue: #0055aa;
  --neon: #ff2bd6;
  --cyan: #2ef2ff;
  --crt-green: #39ff14;
  --header-h: 60px;
  --px: 'Press Start 2P', monospace;
  --vt: 'VT323', monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--vt); font-size: 22px; line-height: 1.2;
  overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 10001; left: 12px; top: -80px; background: var(--brand); color: #000; font-family: var(--px); font-size: 10px; padding: 14px 16px; border: 3px solid #000; }
.skip-link:focus { top: 12px; }
.filters-buttons { display: contents; }
:focus-visible { outline: 3px dashed var(--brand); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
section[id], footer[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  font-family: var(--px); font-size: 10px; letter-spacing: 0.04em; line-height: 1.2; padding: 12px 16px;
  border: 3px solid #000; box-shadow: 4px 4px 0 #000; text-decoration: none; color: #000; background: var(--brand);
  cursor: pointer; user-select: none; text-align: center; }
.btn:hover { background: #ffa53d; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }
.btn.ghost { background: #fff; }
.btn.ghost:hover { background: #e9f1ff; }
.btn-sm { min-height: 36px; padding: 8px 12px; font-size: 9px; box-shadow: 3px 3px 0 #000; }
@keyframes blink { to { visibility: hidden; } }

/* ---------- fixed header (outside the pinned story) ---------- */
.site-header { position: fixed; z-index: 9000; top: 0; left: 0; right: 0; height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 18px; background: rgba(5, 7, 14, 0.84); border-bottom: 2px solid var(--brand);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand img { width: 34px; height: 34px; image-rendering: pixelated; }
.brand-text { display: flex; flex-direction: column; gap: 4px; }
.brand-name { font-family: var(--px); font-size: 11px; letter-spacing: 0.06em; }
.brand-sub { font-family: var(--vt); font-size: 16px; color: var(--brand); letter-spacing: 0.08em; line-height: 1; }
.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.primary-nav a { font-family: var(--px); font-size: 9px; letter-spacing: 0.06em; text-decoration: none; color: var(--muted);
  padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center; }
.primary-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--brand); }
.primary-nav .btn { margin-left: 10px; color: #000; }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 2px solid var(--brand); background: #000;
  cursor: pointer; padding: 0; place-items: center; }
.burger span { display: block; width: 20px; height: 3px; background: var(--brand); box-shadow: 0 -7px 0 var(--brand), 0 7px 0 var(--brand); }

/* full-screen menu for phones: an Amiga requester */
.menu { position: fixed; z-index: 9500; inset: 0; background: rgba(0, 0, 0, 0.72); display: grid; place-items: start center;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 16px) 16px 24px; }
.menu-win { width: min(420px, 100%); background: var(--amiga-blue); border: 2px solid #fff; box-shadow: 8px 8px 0 #000; }
.menu-win ul { list-style: none; margin: 0; padding: 10px; }
.menu-win li a { display: flex; align-items: center; min-height: 56px; padding: 0 14px; font-family: var(--px); font-size: 13px;
  text-decoration: none; color: #fff; border-bottom: 2px dashed rgba(255, 255, 255, 0.25); }
.menu-win li:last-child a { border-bottom: 0; }
.menu-win li a:hover { background: rgba(0, 0, 0, 0.25); color: var(--brand); }
.menu-close { width: 44px; height: 100%; border: 0; border-right: 2px solid var(--amiga-blue); background: #fff; color: var(--amiga-blue);
  font-family: var(--px); font-size: 14px; cursor: pointer; }

/* ---------- Amiga window chrome (shared) ---------- */
.wb-bar { height: 26px; display: flex; align-items: center; background: repeating-linear-gradient(0deg, var(--amiga-blue) 0 2px, #fff 2px 4px);
  border-bottom: 2px solid #fff; }
.wb-gad { width: 26px; height: 100%; background: #fff; display: grid; place-items: center; border-right: 2px solid var(--amiga-blue); flex: none; }
.wb-gad i { display: block; width: 8px; height: 8px; border: 2px solid var(--amiga-blue); }
.wb-gad.depth { margin-left: auto; border-left: 2px solid var(--amiga-blue); border-right: 0; }
.wb-name { margin: 0; background: #fff; color: var(--amiga-blue); font-family: var(--px); font-size: 9px; line-height: 26px; padding: 0 10px;
  letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }

/* ---------- the scroll story ---------- */
.story { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #000; }
.story-poster, .story-poster img, .story canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-poster img { object-fit: cover; }
.story canvas { opacity: 0; transition: opacity 0.4s steps(4); }
.story canvas.ready { opacity: 1; }
.story-vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%); }

.beat { position: absolute; z-index: 3; left: max(6vw, 24px); bottom: 15vh; width: min(560px, 46vw);
  opacity: 0; visibility: hidden; pointer-events: none; }
.js .beat { visibility: visible; }
.beat-actions { pointer-events: auto; }
.beat::before { content: ''; position: absolute; z-index: -1; inset: -60px -90px -50px -80px;
  background: radial-gradient(ellipse at 35% 55%, rgba(3, 4, 10, 0.78) 0%, rgba(3, 4, 10, 0.5) 45%, transparent 72%); pointer-events: none; }
.beat-open { opacity: 1; visibility: visible; }
.eyebrow { font-family: var(--px); font-size: 10px; letter-spacing: 0.14em; color: var(--brand); margin: 0 0 18px;
  text-shadow: 2px 2px 0 #000; }
.beat .eyebrow, .interlude .eyebrow { display: inline-block; background: rgba(0, 0, 0, 0.8); padding: 5px 7px; }
.beat-title { margin: 0; font-family: var(--px); font-weight: 400; font-size: clamp(22px, 3.3vw, 50px); line-height: 1.35;
  letter-spacing: 0.02em; text-shadow: 4px 4px 0 #000, 0 0 28px rgba(255, 43, 214, 0.55); text-wrap: balance; }
.beat-title .line { display: block; }
.beat-title .accent { color: var(--brand); font-size: 0.7em; margin-top: 0.35em;
  text-shadow: 3px 3px 0 #000, 0 0 24px rgba(255, 136, 0, 0.55); }
.beat p:not(.eyebrow) { font-family: var(--vt); font-size: clamp(22px, 1.9vw, 30px); line-height: 1.15; color: #e7f0ff; margin: 18px 0 0;
  text-shadow: 2px 2px 0 #000; max-width: 34ch; }
.beat-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.beat-select { width: min(760px, 56vw); }
.beat-select .beat-title { font-size: clamp(24px, 3.8vw, 58px); }
.ar { font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', system-ui, sans-serif; font-size: 1.25em; line-height: 0; vertical-align: -0.08em; }

/* HUD row and stage rail */
.hud { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 0 max(16px, 2vw) calc(14px + env(safe-area-inset-bottom)); pointer-events: none; }
.hud a, .hud .hud-cue { pointer-events: auto; font-family: var(--px); font-size: 9px; letter-spacing: 0.08em; color: #fff;
  text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px;
  background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.28); }
.hud a:hover { border-color: var(--brand); color: var(--brand); }
.hud .hud-cue { pointer-events: none; }
.story[data-phase="run"] .hud .hud-cue { visibility: hidden; }
.stage-tag { position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); bottom: calc(26px + env(safe-area-inset-bottom));
  font-family: var(--px); font-size: 9px; letter-spacing: 0.08em; color: var(--muted); text-shadow: 2px 2px 0 #000; white-space: nowrap; pointer-events: none;
  background: rgba(0, 0, 0, 0.6); padding: 8px 10px; }
.stage-tag b { color: var(--brand); font-weight: 400; }
.hud .when-end { display: none; }
.story[data-phase="end"] .hud .when-end { display: inline-flex; }
.story[data-phase="end"] .hud .when-run { display: none; }
.story[data-phase="start"] .hud-cue .arrow { animation: blink 1s steps(2, start) infinite; }

.rail { position: absolute; z-index: 4; right: max(16px, 2vw); top: 50%; transform: translateY(-50%); list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px; }
.rail li { display: flex; justify-content: flex-end; }
.rail button { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 32px; min-width: 44px; padding: 0 4px;
  background: none; border: 0; cursor: pointer; font-family: var(--px); font-size: 8px; color: var(--muted); letter-spacing: 0.08em; }
.rail .pip { width: 10px; height: 10px; border: 2px solid #fff; background: transparent; flex: none; }
.rail .lbl { background: rgba(0, 0, 0, 0.72); padding: 3px 5px; opacity: 0; transform: translateX(6px); transition: opacity 0.2s steps(2), transform 0.2s steps(2); text-shadow: 2px 2px 0 #000; }
.rail button:hover .lbl, .rail button:focus-visible .lbl, .rail [aria-current="step"] .lbl { opacity: 1; transform: none; }
.rail [aria-current="step"] .pip { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 10px var(--brand); }
.rail .done .pip { background: #fff; }

/* ---------- brand band (marquee) ---------- */
.band { background: var(--brand); color: #000; border-top: 4px solid #000; border-bottom: 4px solid #000; overflow: hidden; }
.band-track { display: flex; width: max-content; animation: slide 40s linear infinite; }
.band:hover .band-track { animation-play-state: paused; }
.band:focus-within .band-track { animation: none; }
.band-run { display: contents; }
.band-track a, .band-track span { font-family: var(--px); font-size: 12px; letter-spacing: 0.06em; white-space: nowrap; padding: 16px 18px;
  text-decoration: none; color: #000; }
.band-track a:hover { background: #000; color: var(--brand); }
.band-track .star { padding: 16px 0; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.retro { background: var(--bg); color: #fff; padding: 90px 5vw 70px; position: relative;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px; }
.px-title { margin: 0 0 14px; font-family: var(--px); font-weight: 400; font-size: clamp(18px, 2.6vw, 32px); color: var(--brand); text-align: center;
  text-shadow: 4px 4px 0 #000, 0 0 24px rgba(255, 136, 0, 0.5); letter-spacing: 0.06em; line-height: 1.5; }
.px-sub { text-align: center; font-size: clamp(20px, 2vw, 26px); color: var(--muted); margin: 0 0 34px; letter-spacing: 0.08em; }
.px-sub::before, .px-sub::after { content: ' \259A\259A '; color: #555; }

/* values strip */
.values { padding-top: 70px; padding-bottom: 60px; }
.values-grid { list-style: none; margin: 0 auto; padding: 0; max-width: 1200px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.value { background: var(--panel); border: 2px solid #fff; box-shadow: 6px 6px 0 #000; padding: 22px 22px 24px; }
.value img { width: 48px; height: 48px; image-rendering: pixelated; margin-bottom: 16px; }
.value .num { font-family: var(--px); font-size: 10px; color: var(--brand); letter-spacing: 0.1em; }
.value h3 { font-family: var(--px); font-weight: 400; font-size: 13px; margin: 10px 0 12px; line-height: 1.5; }
.value p { margin: 0; color: var(--muted); font-size: 22px; line-height: 1.15; }

/* games: filters + grid */
.filters { max-width: 1500px; margin: 0 auto 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: #fff; color: var(--amiga-blue); border: 2px solid #fff; box-shadow: 6px 6px 0 #000; padding: 8px; }
.filters-label { font-family: var(--px); font-size: 9px; padding: 0 6px; }
.chip-btn { font-family: var(--px); font-size: 9px; letter-spacing: 0.04em; min-height: 40px; padding: 0 12px; cursor: pointer;
  background: #fff; color: var(--amiga-blue); border: 2px solid var(--amiga-blue); }
.chip-btn:hover { background: #e3eeff; }
.chip-btn[aria-pressed="true"] { background: var(--brand); color: #000; border-color: #000; box-shadow: 3px 3px 0 #000; }
.filters .count { margin-left: auto; font-family: var(--px); font-size: 9px; padding: 0 8px; }

.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 34px; max-width: 1500px; margin: 0 auto; }
.wb { background: var(--amiga-blue); border: 2px solid #fff; box-shadow: 6px 6px 0 #000; display: flex; flex-direction: column;
  transition: transform 0.15s steps(3), box-shadow 0.15s steps(3); }
.js .wb.pre { opacity: 0; }
.wb:hover { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 #000, 0 0 36px rgba(255, 136, 0, 0.35); }
.wb-idx { color: var(--brand-deep); margin-right: 6px; }
.wb-screen { position: relative; display: block; width: auto; aspect-ratio: 4 / 3; margin: 10px; padding: 0; border: 3px solid #111; background: #000;
  overflow: hidden; cursor: zoom-in; box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9); }
.wb-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1) contrast(1.04); }
.wb-screen::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.33) 0 1px, transparent 1px 3px); }
.wb-screen::before { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.6) 100%); }
.wb-body { padding: 4px 14px 16px; display: flex; flex-direction: column; flex: 1; }
.wb-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 10px; }
.chip { font-family: var(--px); font-size: 8px; padding: 6px 8px; background: #000; color: #fff; border: 2px solid #fff; box-shadow: 3px 3px 0 #000; }
.chip.engine { color: var(--brand); border-color: var(--brand); }
.led { display: inline-flex; align-items: center; gap: 8px; font-family: var(--px); font-size: 8px; margin-left: auto; }
.led::before { content: ''; width: 10px; height: 10px; background: var(--crt-green); box-shadow: 0 0 10px var(--crt-green);
  animation: blink 1.2s steps(2, start) infinite; }
.led.wip::before { background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.wb-genre { font-size: 24px; letter-spacing: 0.04em; }
.wb-desc { font-size: 22px; line-height: 1.15; color: var(--muted); margin: 6px 0 16px; flex: 1; }
.wb-actions { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid-note { max-width: 1500px; margin: 30px auto 0; text-align: center; color: var(--dim); font-size: 20px; }

/* interlude */
.interlude { position: relative; min-height: 70vh; display: flex; align-items: flex-end; padding: 0 6vw 10vh; overflow: hidden;
  background: #000 url('../frames/d/f_0336.webp') center / cover no-repeat; border-top: 4px solid #000; border-bottom: 4px solid #000; }
.interlude::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3, 4, 10, 0.85) 0%, rgba(3, 4, 10, 0.4) 55%, transparent 80%); }
.interlude::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px); }
.interlude-copy { position: relative; z-index: 1; max-width: 600px; }
.interlude-copy p:not(.eyebrow) { font-size: 26px; color: #e7f0ff; margin: 18px 0 0; text-shadow: 2px 2px 0 #000; }

/* HI-SCORE */
.hiscore { max-width: 1100px; margin: 0 auto; border: 4px solid var(--brand); background: #000; padding: 26px 4vw 30px;
  box-shadow: 0 0 30px rgba(255, 136, 0, 0.35), 8px 8px 0 #000; overflow-x: auto; }
.hiscore table { width: 100%; border-collapse: collapse; font-family: var(--px); font-size: clamp(8px, 1.05vw, 11px); }
.hiscore th { color: var(--brand); text-align: left; padding: 10px 8px; border-bottom: 2px dashed #333; letter-spacing: 0.08em; font-weight: 400; }
.hiscore td { padding: 10px 8px; color: #fff; border-bottom: 1px solid #15151f; white-space: nowrap; }
.hiscore tbody tr:nth-child(1) td { color: #ffd54a; }
.hiscore tbody tr:nth-child(2) td { color: #cfd8dc; }
.hiscore tbody tr:nth-child(3) td { color: #ff9e63; }
.hiscore td.ok { color: var(--crt-green); }
.hiscore td.wip { color: var(--brand); }
.hiscore .linkish { text-align: left; background: none; border: 0; padding: 0; min-height: 44px; font: inherit; color: inherit; cursor: pointer; text-decoration: underline;
  text-decoration-color: rgba(255, 136, 0, 0.6); text-underline-offset: 5px; }

/* footer */
.coinbar { text-align: center; padding: 70px 5vw calc(60px + env(safe-area-inset-bottom)); background: #000; border-top: 4px solid var(--brand); }
.coinbar .press { font-family: var(--px); font-size: clamp(14px, 2.4vw, 28px); text-shadow: 0 0 20px var(--neon); animation: blink 0.9s steps(2, start) infinite; }
.coinbar .credit { font-family: var(--px); font-size: 11px; color: var(--crt-green); margin-top: 26px; letter-spacing: 0.1em; }
.coinbar .continue { margin-top: 28px; }
.coinbar .small { font-size: 20px; color: var(--dim); margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.coinbar .small img { width: 22px; height: 22px; image-rendering: pixelated; }

/* ---------- INFO requester (dialog) ---------- */
.req { width: min(980px, 94vw); max-height: min(92vh, 900px); padding: 0; border: 2px solid #fff; background: var(--amiga-blue); color: #fff;
  box-shadow: 10px 10px 0 #000; overflow: hidden; }
.req::backdrop { background: rgba(0, 0, 0, 0.72); }
.req[open] { display: flex; flex-direction: column; }
.req .wb-bar { flex: none; }
.req-scroll { overflow-y: auto; flex: 1; }
.req-body { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; padding: 14px; }
.req-shot { position: relative; aspect-ratio: 16 / 9; border: 3px solid #111; background: #000; overflow: hidden; }
.req-shot img { width: 100%; height: 100%; object-fit: cover; }
.req-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.req-thumbs button { width: 92px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid #fff; background: #000; cursor: pointer; overflow: hidden; }
.req-thumbs button img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.req-thumbs button[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px #000, 0 0 12px var(--brand); }
.req-thumbs button[aria-pressed="true"] img { opacity: 1; }
.req-info h2 { font-family: var(--px); font-weight: 400; font-size: 15px; line-height: 1.5; margin: 4px 0 10px; }
.req-info .wb-genre { color: var(--brand); }
.req-info p { color: #e7f0ff; margin: 10px 0 14px; font-size: 22px; line-height: 1.18; }
.req-facts { list-style: none; margin: 0 0 18px; padding: 0; border-top: 2px dashed rgba(255, 255, 255, 0.3); }
.req-facts li { padding: 7px 0; border-bottom: 2px dashed rgba(255, 255, 255, 0.3); color: var(--muted); }
.req-facts li::before { content: '\25B8  '; color: var(--brand); }
.req-actions { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ---------- CRT overlay on everything ---------- */
.crt { position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.26) 0px, rgba(0, 0, 0, 0.26) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(255, 0, 60, 0.04) 0px, rgba(0, 255, 90, 0.03) 1px, rgba(0, 80, 255, 0.04) 2px, transparent 3px);
  mix-blend-mode: multiply; }
.crt::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.5) 100%); }
.crt::after { content: ''; position: absolute; left: 0; right: 0; height: 14vh; top: -14vh;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.05), transparent); animation: roll 7s linear infinite; }
@keyframes roll { to { top: 114vh; } }
.flicker { position: fixed; inset: 0; z-index: 9998; pointer-events: none; background: #fff; opacity: 0; animation: flick 4s infinite; }
@keyframes flick { 0%, 97%, 100% { opacity: 0; } 98% { opacity: 0.025; } 99% { opacity: 0.01; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .primary-nav { display: none; }
  .burger { display: grid; }
  .values-grid { grid-template-columns: 1fr; max-width: 560px; }
  .req-body { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  :root { --header-h: 56px; }
  body { font-size: 21px; }
  .brand img { width: 30px; height: 30px; }
  .brand-name { font-size: 10px; }
  .beat { left: 16px; right: 16px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .beat::before { inset: -70px -16px -90px -16px; background: linear-gradient(0deg, rgba(3, 4, 10, 0.9) 0%, rgba(3, 4, 10, 0.6) 60%, transparent 100%); }
  .beat p:not(.eyebrow) { display: none; }
  .beat-title { font-size: clamp(18px, 6.2vw, 30px); }
  .beat-select .beat-title { font-size: clamp(20px, 7vw, 32px); }
  .beat-actions .btn { flex: 1 1 auto; }
  .eyebrow { font-size: 9px; margin-bottom: 12px; }
  .rail { display: none; }
  .hud { padding-left: 12px; padding-right: 12px; }
  .stage-tag { left: 16px; transform: none; bottom: auto; top: calc(var(--header-h) + env(safe-area-inset-top) + 16px); font-size: 8px; }
  .retro { padding: 64px 16px 48px; }
  .wb-grid { grid-template-columns: 1fr; gap: 24px; }
  .filters { gap: 8px; padding: 8px; }
  .chip-btn { flex: 1 1 auto; min-height: 44px; }
  .filters .count { width: 100%; text-align: right; margin: 4px 0 0; }
  .interlude { min-height: 80vh; padding: 0 16px 10vh; background-image: url('../frames/m/f_0322.webp'); }
  .interlude::before { background: linear-gradient(0deg, rgba(3, 4, 10, 0.9) 0%, rgba(3, 4, 10, 0.5) 45%, transparent 75%); }
  /* full-screen sheet on phones; margins (not padding) keep it clear of the status bar and home
     indicator in apps that run the page edge to edge, and a tap on the band still is not a tap on the dialog */
  .req { width: 100vw; max-width: 100vw; border: 0; box-shadow: none;
    margin: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
    height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .req-thumbs button { width: auto; flex: 1; }
  .beat-select { width: auto; }
  .menu .wb-bar, .req .wb-bar { height: 44px; }
  .menu .wb-name, .req .wb-name { line-height: 44px; }
  .menu .wb-gad, .req .wb-gad { width: 44px; }
  .hiscore { padding: 18px 10px 20px; }
  .hiscore th:nth-child(3), .hiscore td:nth-child(3), .hiscore th:nth-child(4), .hiscore td:nth-child(4) { display: none; }
  .hiscore td { white-space: normal; }
}

/* reduced motion: no pin, no film, static panels (class set by arcade.js) and no blinking */
html.rm .story { height: auto; overflow: visible; }
html.rm .story canvas, html.rm .story-poster, html.rm .hud, html.rm .rail, html.rm .story-vignette, html.rm .stage-tag { display: none; }
html.rm .beat { position: relative; left: auto; right: auto; bottom: auto; width: auto; opacity: 1; visibility: visible;
  min-height: 72vh; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--header-h) + 40px) 6vw 56px;
  background: #000 center / cover no-repeat; }
html.rm .beat::before { inset: 0; background: linear-gradient(90deg, rgba(3, 4, 10, 0.85), rgba(3, 4, 10, 0.25) 70%); }
html.rm .beat > * { max-width: 600px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .band-track { width: auto; flex-wrap: wrap; justify-content: center; }
  .band-track [aria-hidden="true"] { display: none; }
}
