/* MUMBLECHASM: a home-computer tape you load, not a landing page.
   Palette lifted from the game; neon from the arcade next door. */

@font-face {
  font-family: "Mumblechasm Lettering";
  src: url("fonts/mumblechasm-lettering.woff") format("woff");
  font-display: block;
}

:root {
  --ink: #111421;
  --night: #172137;
  --deep: #0b0e18;
  --plum: #1d1030;
  --brass: #f3cc79;
  --cream: #fff0c3;
  --dim: #d6ccab;
  --copper: #bc7546;
  --teal: #497f80;
  --mint: #91c7af;
  --rust: #b96353;
  --pink: #ff3c8e;
  --pink-dark: #8a1f5c;
  --cyan: #3ce8ff;
  --yellow: #ffe14a;
  --zx-red: #e8352b;
  --zx-green: #3fcf4a;
  --zx-blue: #2b3fd8;
  --plastic: #2a2a35;

  --pixel: "Mumblechasm Lettering", "Courier New", monospace;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --max: 1100px;
  --gutter: 16px;
  --bw: 12px;
  --u: 3px;
}

@media (min-width: 600px) {
  :root { --gutter: 32px; --bw: 20px; --u: 4px; }
}
@media (min-width: 1000px) {
  :root { --bw: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ink);
  color: var(--cream);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

/* CRT scanlines over everything; purely decorative. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background:
    repeating-linear-gradient(to bottom, rgb(0 0 0 / 0.14) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgb(0 0 0 / 0.35) 100%);
}

img { max-width: 100%; height: auto; }

a { color: var(--cyan); text-underline-offset: 0.2em; }
a:hover { color: var(--yellow); }

:focus-visible {
  outline: 3px dashed var(--cyan);
  outline-offset: 4px;
}

code, pre, kbd { font-family: var(--mono); }

code {
  background: rgb(255 240 195 / 0.1);
  padding: 0.1em 0.35em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 12px 16px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 18px;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }

/* ---------- Pixel type ---------- */

.tape-header,
.tagline,
.btn,
.section-title,
.section-sub,
.stage-sign,
.stage-status,
.ticker,
.tape-side,
.tape-title,
.tape-spec,
.release-line,
.first-launch summary,
.first-launch dt,
.gallery figcaption,
.coin-screen,
.stats,
.features,
.scores th,
.scores td:not(:last-child),
.keys,
.review .score,
.review footer,
.site-footer,
.toast {
  font-family: var(--pixel);
  font-size: 18px;
  line-height: 1.333;
  -webkit-font-smoothing: none;
  font-smooth: never;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */

.btn {
  --face: var(--pink);
  --edge: var(--pink-dark);
  --label: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 20px;
  border: 3px solid var(--ink);
  background: var(--face);
  color: var(--label);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--edge), 0 10px 18px rgb(0 0 0 / 0.45);
  transition: transform 80ms steps(2), box-shadow 80ms steps(2), filter 120ms;
}
.btn:hover { color: var(--label); filter: brightness(1.12); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--edge), 0 3px 6px rgb(0 0 0 / 0.45); }

.btn-ghost {
  --face: transparent;
  --edge: #127c8c;
  --label: var(--cyan);
  border-color: var(--cyan);
}
.btn-ghost:hover { --face: rgb(60 232 255 / 0.12); }

.btn-ring { --face: var(--brass); --edge: var(--copper); }
.btn-small {
  --face: var(--night);
  --edge: #05070d;
  --label: var(--cream);
  min-height: 44px;
  border-color: var(--dim);
}
.btn-small[aria-pressed="false"] { --label: var(--dim); border-style: dashed; }

.btn-load {
  --face: var(--yellow);
  --edge: #a3801c;
  width: 100%;
  font-size: 27px;
  min-height: 64px;
}

.btn kbd {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  background: var(--ink);
  color: var(--brass);
  font-family: var(--pixel);
  font-size: 18px;
  box-shadow: inset 0 -3px 0 #000;
}

/* ---------- Hero: a Spectrum screen mid-load ---------- */

.hero {
  position: relative;
  padding: var(--bw);
  isolation: isolate;
}

.tape-border {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--zx-blue);
}

/* The four-stripe badge from the corner of a rubber-key machine. */
.tape-border::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: calc(var(--bw) * 7);
  height: var(--bw);
  background: linear-gradient(115deg,
    transparent 0 18%,
    var(--zx-red) 18% 34%,
    var(--yellow) 34% 50%,
    var(--zx-green) 50% 66%,
    var(--cyan) 66% 82%,
    transparent 82%);
}

/* Loading stripes: chunky red/cyan for the header, then busy blue/yellow data. */
.tape-border::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  visibility: hidden;
  background: repeating-linear-gradient(to bottom, var(--zx-red) 0 18px, var(--cyan) 18px 36px);
}

.hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px var(--gutter) 40px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 30%, rgb(255 60 142 / 0.12), transparent 70%),
    var(--ink);
  text-align: center;
}
@media (min-width: 1000px) {
  .hero { padding-inline: max(var(--bw), calc((100% - 1200px) / 2)); }
}

.tape-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 8px;
  color: var(--cyan);
  text-align: left;
}
.tape-status { display: inline-grid; }
.tape-status > * { grid-area: 1 / 1; text-align: right; }
.tape-status .loading-text { visibility: hidden; color: var(--yellow); }

/* ---------- Logo ---------- */

.logo-wrap {
  --sun: min(62vw, 320px);
  --logo-size: 36px;
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: calc(var(--sun) * 0.96);
}

.sun {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--sun);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: linear-gradient(to bottom, var(--yellow) 0%, #ff9a3c 45%, var(--pink) 80%);
  -webkit-mask: linear-gradient(to bottom,
    #000 0 52%, transparent 52% 56%,
    #000 56% 64%, transparent 64% 69%,
    #000 69% 75%, transparent 75% 81%,
    #000 81% 85%, transparent 85% 92%,
    #000 92% 94%, transparent 94%);
  mask: linear-gradient(to bottom,
    #000 0 52%, transparent 52% 56%,
    #000 56% 64%, transparent 64% 69%,
    #000 69% 75%, transparent 75% 81%,
    #000 81% 85%, transparent 85% 92%,
    #000 92% 94%, transparent 94%);
}

.logo {
  --p: calc(1em / 9);
  position: relative;
  display: grid;
  margin: 0;
  font-family: var(--pixel);
  font-weight: normal;
  font-size: var(--logo-size);
  line-height: 1;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  margin-top: calc(var(--sun) * 0.44 - var(--logo-size) * 0.5);
}
.logo > span { grid-area: 1 / 1; white-space: nowrap; }

.logo-shadow {
  color: #120c22;
  text-shadow:
    var(--p) 0 #120c22, calc(var(--p) * -1) 0 #120c22,
    0 var(--p) #120c22, 0 calc(var(--p) * -1) #120c22,
    var(--p) var(--p) #120c22, calc(var(--p) * -1) var(--p) #120c22,
    var(--p) calc(var(--p) * -1) #120c22, calc(var(--p) * -1) calc(var(--p) * -1) #120c22,
    calc(var(--p) * 2) calc(var(--p) * 2) var(--pink),
    calc(var(--p) * 3) calc(var(--p) * 3) #120c22;
}

/* Chrome bands, one per font pixel row (the glyphs fill 1/9 to 8/9 of the line). */
.logo-face {
  color: var(--cream);
  background: linear-gradient(to bottom,
    #ffffff 0 22.3%,
    var(--cream) 22.3% 44.5%,
    var(--brass) 44.5% 55.6%,
    var(--pink) 55.6% 66.7%,
    #ff8a5c 66.7% 77.8%,
    var(--yellow) 77.8%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (min-width: 420px) { .logo-wrap { --logo-size: 45px; } }
@media (min-width: 600px) { .logo-wrap { --logo-size: 63px; } }
@media (min-width: 800px) { .logo-wrap { --logo-size: 81px; } }
@media (min-width: 1100px) { .logo-wrap { --logo-size: 108px; } }

.tagline {
  margin: 16px 0 0;
  color: var(--yellow);
  font-size: 18px;
  text-shadow: 3px 3px 0 var(--pink-dark);
}
@media (min-width: 600px) { .tagline { font-size: 27px; } }

.pitch {
  max-width: 50ch;
  margin: 16px auto 0;
  color: var(--cream);
  font-size: 1.125rem;
  text-wrap: balance;
}
.pitch em { color: var(--brass); font-style: normal; text-decoration: underline wavy var(--pink) 2px; text-underline-offset: 0.25em; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 20px;
  margin: 24px 0 0;
}

/* ---------- The bell stage ---------- */

.stage-wrap {
  max-width: 960px;
  margin: 32px auto 0;
}

.stage {
  --floor: calc(10 * var(--u));
  position: relative;
  height: calc(62 * var(--u));
  overflow: hidden;
  border: 3px solid var(--brass);
  background:
    repeating-linear-gradient(to right, transparent 0 calc(12 * var(--u)), rgb(255 240 195 / 0.035) calc(12 * var(--u)) calc(13 * var(--u))),
    linear-gradient(to bottom, #1a1433 0%, var(--night) 70%);
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--copper), 0 18px 32px rgb(0 0 0 / 0.5);
  cursor: pointer;
}

/* Synthwave floor: brass skirting, then a grid running to the horizon. */
.stage::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--floor);
  border-top: var(--u) solid var(--brass);
  background: #170b26;
}
.stage::after {
  content: "";
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: 0;
  height: calc(var(--floor) - var(--u));
  background-image:
    linear-gradient(to bottom, var(--pink) 2px, transparent 2px),
    linear-gradient(to right, var(--pink) 2px, transparent 2px);
  background-size: 48px 24px;
  transform: perspective(120px) rotateX(38deg);
  transform-origin: 50% 0;
  opacity: 0.75;
}

.stage-sign {
  position: absolute;
  top: calc(3 * var(--u));
  right: calc(4 * var(--u));
  padding: 6px 10px;
  border: 3px solid var(--copper);
  background: #2a1a12;
  color: var(--brass);
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 4px 0 #000, 0 8px 12px rgb(0 0 0 / 0.4);
}

.actor {
  position: absolute;
  left: 0;
  z-index: 2;
}
.actor svg { display: block; width: 100%; height: 100%; overflow: visible; }

.guest {
  width: calc(28 * var(--u));
  height: calc(22 * var(--u));
  bottom: calc(var(--floor) - var(--u));
  z-index: 3;
}
.guest .stick-swing { visibility: hidden; }
.guest.is-shoving .stick { visibility: hidden; }
.guest.is-shoving .stick-swing { visibility: visible; }

.porter {
  width: calc(42 * var(--u));
  height: calc(26 * var(--u));
  bottom: calc(var(--floor) - 2 * var(--u));
}
.porter svg { transform-origin: calc(21 * var(--u)) 50%; }
.porter.is-facing-left svg { transform: scaleX(-1); }

.porter .frame-b,
.porter .legs-kneel { visibility: hidden; }
.porter.is-step .frame-a { visibility: hidden; }
.porter.is-step .frame-b { visibility: visible; }
.porter.is-kneeling .legs-stand { visibility: hidden; }
.porter.is-kneeling .legs-kneel { visibility: visible; }

.porter .body,
.porter .head { transition: transform 160ms steps(2); }
.porter.is-kneeling .body { transform: translateY(4px); }
.porter.is-bowing .head { transform: translate(1px, 3px); }

.porter.is-idle .body { animation: breathe 1.6s steps(1) infinite; }
@keyframes breathe { 50% { transform: translateY(1px); } }

.alert {
  position: absolute;
  left: 50%;
  bottom: 100%;
  translate: -50% 0;
  color: var(--yellow);
  font-family: var(--pixel);
  font-size: calc(9 * var(--u));
  line-height: 1;
  text-shadow: var(--u) var(--u) 0 var(--zx-red);
  visibility: hidden;
}
.porter.is-alert .alert { visibility: visible; animation: alert-pop 0.4s steps(3) both; }
@keyframes alert-pop {
  from { transform: translateY(var(--u)) scale(0.4); }
  to { transform: none; }
}

.ripple {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  width: calc(80 * var(--u));
  height: calc(80 * var(--u));
  margin: 0 0 calc(-40 * var(--u)) calc(-40 * var(--u));
  border-radius: 50%;
  border: var(--u) solid var(--brass);
  box-shadow: 0 0 0 calc(var(--u) * 2) rgb(243 204 121 / 0.25), inset 0 0 0 calc(var(--u) * 2) rgb(243 204 121 / 0.25);
  pointer-events: none;
  opacity: 0;
}
.ripple.is-ringing { animation: ripple 0.9s steps(9) both; }
@keyframes ripple {
  from { transform: scale(0.05); opacity: 1; }
  80% { opacity: 1; }
  to { transform: scale(1.6); opacity: 0; }
}

.stage-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.stage-status {
  min-height: 3em;
  margin: 18px auto 0;
  max-width: 60ch;
  color: var(--mint);
  text-wrap: balance;
}
.stage-status::before { content: "> "; color: var(--pink); }

/* ---------- Ticker ---------- */

.ticker {
  overflow: hidden;
  background: var(--yellow);
  color: var(--ink);
  border-block: 4px solid var(--ink);
  box-shadow: inset 0 -4px 0 #d9b520;
}
.ticker-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 24px;
  margin: 0;
  padding: 12px var(--gutter);
}
.ticker.is-scrolling .ticker-track {
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: max-content;
  padding-inline: 0;
  animation: ticker var(--ticker-duration, 60s) linear infinite;
}
.ticker.is-scrolling:hover .ticker-track { animation-play-state: paused; }
.ticker-track > span { white-space: nowrap; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Panels ---------- */

.panel {
  position: relative;
  padding-block: 88px;
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2));
}
@media (min-width: 800px) { .panel { padding-block: 120px; } }

.section-title {
  --shade: var(--pink-dark);
  margin: 0;
  color: var(--title, var(--cyan));
  font-size: 27px;
  font-weight: normal;
  line-height: 1.1;
  text-shadow: 3px 3px 0 var(--shade), 6px 6px 0 #000;
}
@media (min-width: 600px) { .section-title { font-size: 45px; text-shadow: 5px 5px 0 var(--shade), 10px 10px 0 #000; } }

.section-sub {
  margin: 12px 0 0;
  color: var(--dim);
}

.panel > .section-title + :not(.section-sub),
.panel > .section-sub + * { margin-top: 48px; }

.fine-print {
  margin: 24px 0 0;
  color: var(--dim);
  font-size: 0.95rem;
}

/* ---------- Download: two sides of one tape ---------- */

.panel-download {
  --title: var(--yellow);
  background:
    radial-gradient(circle at 15% 20%, rgb(255 60 142 / 0.18), transparent 40%),
    radial-gradient(circle at 85% 80%, rgb(60 232 255 / 0.12), transparent 40%),
    var(--plum);
  text-align: center;
}
.panel-download::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 12px;
  background: conic-gradient(var(--yellow) 25%, var(--plum) 0 50%, var(--yellow) 0 75%, var(--plum) 0) 0 0 / 12px 12px;
  opacity: 0.35;
}

.tapes {
  display: grid;
  gap: 40px;
  max-width: 900px;
  margin-inline: auto;
}
@media (min-width: 760px) { .tapes { grid-template-columns: 1fr 1fr; gap: 48px; } }

.tape {
  --label-a: var(--cyan);
  --label-b: var(--zx-blue);
  position: relative;
  display: grid;
  gap: 18px;
  padding: 22px 22px 26px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 14px 14px, #55556a 3px, transparent 4px),
    radial-gradient(circle at calc(100% - 14px) 14px, #55556a 3px, transparent 4px),
    radial-gradient(circle at 14px calc(100% - 14px), #55556a 3px, transparent 4px),
    radial-gradient(circle at calc(100% - 14px) calc(100% - 14px), #55556a 3px, transparent 4px),
    linear-gradient(to bottom, #34343f, var(--plastic));
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.12), 0 8px 0 #121218, 0 20px 36px rgb(0 0 0 / 0.55);
  text-align: left;
}
.tape-windows { rotate: -1.2deg; }
.tape-mac { --label-a: var(--yellow); --label-b: var(--pink); rotate: 1.2deg; }

.tape-label {
  position: relative;
  padding: 14px 16px 16px;
  border-radius: 4px;
  background:
    linear-gradient(to bottom, transparent 0 62%, var(--label-a) 62% 72%, transparent 72% 76%, var(--label-b) 76% 86%, transparent 86%),
    var(--cream);
  color: var(--ink);
  min-height: 150px;
}
.tape-side {
  position: absolute;
  top: 14px;
  right: 16px;
  margin: 0;
  color: var(--rust);
}
.tape-title {
  margin: 0;
  font-size: 45px;
  font-weight: normal;
  line-height: 1;
}
.tape-spec { margin: 10px 0 0; color: #3c3552; }

.tape-window {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 64px;
  margin-inline: 12%;
  border: 3px solid #121218;
  border-radius: 32px;
  background: linear-gradient(to bottom, #4a3324, #2b1d16);
  box-shadow: inset 0 3px 8px rgb(0 0 0 / 0.6);
}
.reel {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, var(--cream) 0 10%, transparent 0 33%, var(--cream) 0 43%, transparent 0 66%, var(--cream) 0 76%, transparent 0),
    radial-gradient(circle, var(--plastic) 0 7px, #eee3c0 8px 14px, #1a1208 15px);
  -webkit-mask: radial-gradient(circle, #000 0 21px, transparent 22px);
}
.tape:hover .reel,
.tape:focus-within .reel,
.tape.is-loading .reel { animation: reel 1.2s steps(6) infinite; }
@keyframes reel { to { rotate: 1turn; } }

.tape-howto { margin: 0; color: var(--dim); font-size: 0.95rem; }

.release-line { margin-top: 56px; color: var(--cream); }
.release-line a { color: var(--cyan); }

.first-launch {
  max-width: 720px;
  margin: 40px auto 0;
  border: 3px dashed var(--dim);
  text-align: left;
}
.first-launch summary {
  padding: 16px 20px;
  cursor: pointer;
  color: var(--yellow);
  list-style: none;
}
.first-launch summary::-webkit-details-marker { display: none; }
.first-launch summary::before { content: "+ "; color: var(--pink); }
.first-launch[open] summary::before { content: "- "; }
.first-launch summary:hover { background: rgb(255 225 74 / 0.08); }
.first-launch > :not(summary) { margin-inline: 20px; }
.first-launch > p { margin-top: 0; }
.first-launch dl { margin-bottom: 20px; }
.first-launch dt { margin-top: 16px; color: var(--cyan); }
.first-launch dd { margin: 4px 0 0; }
.first-launch pre {
  overflow-x: auto;
  margin: 12px 0 0;
  padding: 12px 14px;
  background: var(--ink);
  border: 2px solid rgb(63 207 74 / 0.35);
}
.first-launch pre code { background: none; padding: 0; color: var(--zx-green); }

/* ---------- Story ---------- */

.panel-story { --title: var(--brass); --shade: var(--copper); }
.panel-story .section-title { --shade: #5a3220; }

.story {
  display: grid;
  gap: 40px;
  align-items: start;
}
@media (min-width: 860px) {
  .story { grid-template-columns: 1fr 1.1fr; gap: 64px; }
  .story > .crt { position: sticky; top: 32px; margin-top: 8px; }
}

.story-text { max-width: 62ch; }
.story-text p { margin: 0 0 1.1em; }
.story-text strong { color: var(--brass); font-weight: 700; }
.story-text .lead { font-size: 1.3rem; line-height: 1.5; color: var(--cream); }

/* ---------- CRT frames ---------- */

.crt {
  position: relative;
  margin: 0;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(145deg, #3a3a46, #1d1d25);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.1), 0 10px 24px rgb(0 0 0 / 0.5);
}
.crt img {
  display: block;
  width: 100%;
  border-radius: 10px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.crt a { position: relative; display: block; border-radius: 10px; overflow: hidden; }
.crt a::after,
.panel-story .crt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgb(0 0 0 / 0.22) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgb(0 0 0 / 0.45) 100%);
  box-shadow: inset 0 0 24px rgb(60 232 255 / 0.12);
}
.panel-story .crt::after { inset: 12px; }

/* ---------- Gallery ---------- */

.panel-screens { --title: var(--pink); --shade: #3c0f2a; background: var(--deep); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 36px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) {
  .gallery li:first-child { grid-column: span 2; grid-row: span 2; }
  .gallery li:first-child figcaption { font-size: 27px; }
}
.gallery figcaption {
  margin: 14px 4px 2px;
  color: var(--cyan);
}
.gallery .crt { transition: transform 160ms steps(3), box-shadow 160ms; }
.gallery .crt:hover,
.gallery .crt:focus-within { transform: translateY(-4px); box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.1), 0 0 0 3px var(--pink), 0 14px 28px rgb(0 0 0 / 0.55); }

/* The last cabinet in the row is waiting for a coin. */
.crt .coin-screen {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  aspect-ratio: 16 / 9;
  padding: 16px;
  background:
    radial-gradient(ellipse at center, rgb(255 60 142 / 0.16), transparent 70%),
    #08060f;
  color: var(--yellow);
  text-align: center;
  text-decoration: none;
}
.coin-title { font-size: 27px; text-shadow: 3px 3px 0 var(--pink-dark); }
.coin-sub { color: var(--cyan); font-size: 14px; }
.coin-slot {
  width: 12px;
  height: 34px;
  border: 3px solid var(--brass);
  border-radius: 3px;
  background: #000;
  box-shadow: 0 0 0 3px #3a2a12, 0 0 18px rgb(255 60 142 / 0.6);
}
.coin-screen:hover .coin-slot,
.coin-screen:focus-visible .coin-slot { box-shadow: 0 0 0 3px #3a2a12, 0 0 26px var(--pink); }

/* ---------- Specs: the back of the cassette box ---------- */

.panel-specs { --title: var(--mint); --shade: #20453b; background: var(--night); }

.panel-specs .stats,
.panel-specs .features {
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 860px) {
  .panel-specs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 72px; align-items: start; }
  .panel-specs .section-title { grid-column: 1 / -1; }
}
.panel-specs .stats { margin-top: 48px; }
.panel-specs .features { margin-top: 48px; }

.stats li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  font-size: 27px;
}
.stats li::before {
  content: "";
  order: 1;
  flex: 1;
  min-width: 24px;
  border-bottom: 3px dotted rgb(145 199 175 / 0.5);
  translate: 0 -6px;
}
.stats .stat-label { order: 0; color: var(--cream); }
.stats .stat-num { order: 2; color: var(--yellow); }
.stats li:nth-child(5) .stat-num { color: var(--pink); }

.features li {
  position: relative;
  padding: 10px 0 10px 32px;
  color: var(--cream);
  border-bottom: 2px solid rgb(255 240 195 / 0.08);
}
.features li::before {
  content: ">";
  position: absolute;
  left: 4px;
  color: var(--pink);
}

/* ---------- High scores ---------- */

.panel-scores {
  --title: var(--yellow);
  --shade: #6d1414;
  background:
    radial-gradient(ellipse at 50% 0%, rgb(43 63 216 / 0.35), transparent 60%),
    #05050a;
  text-align: center;
}

.scores {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  border-collapse: collapse;
  text-align: left;
}
.scores thead th {
  padding: 0 12px 14px;
  color: var(--dim);
  font-weight: normal;
  border-bottom: 3px solid var(--zx-blue);
}
.scores tbody th,
.scores td { padding: 14px 12px; vertical-align: baseline; font-weight: normal; }
.scores tbody tr { color: var(--row); }
.scores tbody tr:nth-child(1) { --row: #ff5a4f; }
.scores tbody tr:nth-child(2) { --row: var(--yellow); }
.scores tbody tr:nth-child(3) { --row: var(--zx-green); }
.scores tbody tr:nth-child(4) { --row: var(--cyan); }
.scores tbody tr:nth-child(5) { --row: var(--pink); }
.scores tbody tr.you { --row: var(--cream); }
.scores td:last-child { color: var(--cream); font-size: 1rem; }
.scores tbody th,
.scores td:nth-child(3) { white-space: nowrap; }
.scores tr.you th::after { content: " <"; animation: blink 0.8s steps(1) infinite; }

@media (max-width: 699px) {
  .scores thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .scores tbody,
  .scores tr { display: block; }
  .scores tbody tr {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    padding: 14px 0;
    border-bottom: 2px dashed rgb(255 240 195 / 0.15);
  }
  .scores tbody th,
  .scores td { display: block; padding: 0; }
  .scores td:nth-child(3) { grid-column: 2; }
  .scores td:last-child { grid-column: 1 / -1; margin-top: 6px; }
}

/* ---------- Controls: rubber keys ---------- */

.panel-controls { --title: var(--cyan); --shade: #0d4b56; background: var(--night); }

.keys {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 18px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.keys li { display: flex; align-items: center; gap: 16px; }
.keycaps { display: inline-flex; gap: 8px; flex: none; min-width: 108px; }
.keys kbd {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  padding: 0 10px;
  border-radius: 6px 6px 8px 8px;
  background: linear-gradient(to bottom, #4a4a55, #303039);
  color: #fff;
  font-family: var(--pixel);
  font-size: 18px;
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.18), 0 5px 0 #121218, 0 8px 12px rgb(0 0 0 / 0.45);
}
.keys kbd.wide { min-width: 108px; }
.keys kbd.is-pressed { translate: 0 4px; box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.18), 0 1px 0 #121218; background: linear-gradient(to bottom, var(--pink), #b02064); }

/* ---------- Reviews: a magazine page ---------- */

.panel-reviews {
  --title: var(--ink);
  --shade: var(--pink);
  background: var(--yellow);
  color: var(--ink);
}
.panel-reviews .section-title { text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 var(--cyan); }
.panel-reviews .section-sub { color: #4a3d0a; }

.reviews {
  display: grid;
  gap: 48px 40px;
}
@media (min-width: 760px) {
  .reviews { grid-template-columns: 1.15fr 1fr; align-items: start; }
  .reviews .review:nth-child(2) { margin-top: 56px; }
  .reviews .review:nth-child(3) { margin-top: -24px; }
}

.review {
  position: relative;
  margin: 0;
  padding: 28px 28px 24px;
  border: 4px solid var(--ink);
  background: #fffaf0;
  box-shadow: 10px 10px 0 var(--ink);
  rotate: var(--tilt, -1deg);
}
.review:nth-child(2) { --tilt: 1.4deg; }
.review:nth-child(3) { --tilt: 0.6deg; }
.review:nth-child(4) { --tilt: -1.8deg; }

.review p { margin: 0; font-size: 1.15rem; line-height: 1.5; }
.review .score {
  position: absolute;
  top: -34px;
  right: -14px;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  background: var(--pink);
  color: #fff;
  font-size: 27px;
  text-shadow: 3px 3px 0 var(--ink);
  clip-path: polygon(50% 0%, 61% 18%, 81% 9%, 79% 31%, 100% 38%, 85% 54%, 97% 73%, 75% 76%, 69% 97%, 50% 85%, 31% 97%, 25% 76%, 3% 73%, 15% 54%, 0% 38%, 21% 31%, 19% 9%, 39% 18%);
  rotate: 10deg;
}
.review:nth-child(2) .score { background: var(--zx-blue); }
.review:nth-child(3) .score { background: var(--zx-green); color: var(--ink); text-shadow: 2px 2px 0 #fff; }
.review:nth-child(4) .score { background: var(--zx-red); }
.review .score-long { font-size: 18px; }
@media (max-width: 759px) { .review .score { right: -6px; } }
.review > p:not(.score) { padding-right: 72px; }
.review footer { margin-top: 18px; color: #6b1238; }
.review footer::before { content: "- "; }

/* ---------- Footer: the continue screen ---------- */

.site-footer {
  padding: 96px var(--gutter) 72px;
  background: #000;
  color: var(--dim);
  text-align: center;
}
.site-footer p { max-width: 60ch; margin: 18px auto 0; }
.site-footer a:not(.btn) { color: var(--cyan); }

.continue {
  margin: 0 0 32px !important;
  color: var(--zx-red);
  font-size: 45px;
  text-shadow: 4px 4px 0 #4d0d0a;
}
.continue-count { display: inline-block; min-width: 1.2ch; color: var(--yellow); }
.continue.is-over .continue-count { display: none; }
.secret-hint { color: var(--pink) !important; }
.back-to-top { display: inline-block; margin-top: 28px; }

/* ---------- Toast + parade (the classic secret) ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 150;
  max-width: calc(100% - 32px);
  padding: 14px 20px;
  translate: -50% 0;
  border: 3px solid var(--yellow);
  background: var(--ink);
  color: var(--yellow);
  text-align: center;
  box-shadow: 0 8px 0 #000, 0 14px 28px rgb(0 0 0 / 0.6);
}

.parade {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 140;
  height: calc(26 * var(--u));
  pointer-events: none;
  overflow: hidden;
}
.parade .marcher {
  position: absolute;
  bottom: 0;
  left: 0;
  width: calc(42 * var(--u));
  height: calc(26 * var(--u));
}
.parade svg { display: block; width: 100%; height: 100%; overflow: visible; }
.parade .frame-b,
.parade .legs-kneel,
.parade .alert { visibility: hidden; }
.parade .marcher.is-step .frame-a { visibility: hidden; }
.parade .marcher.is-step .frame-b { visibility: visible; }

.is-party .hero,
.is-party .ticker,
.is-party main,
.is-party .site-footer { animation: party 1.4s steps(14); }
@keyframes party { to { filter: hue-rotate(360deg); } }

/* ---------- The load sequence (CSS only; nothing waits on JS) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .tape-border::before {
    visibility: visible;
    animation:
      tape-jitter 90ms steps(1) 24,
      tape-phase 2.2s steps(1) forwards;
  }
  .tape-status .loading-text {
    visibility: visible;
    animation: blink 0.5s steps(1) 4, vanish 0s 2.2s forwards;
  }
  .tape-status .ready-text { animation: hide-until 0s 2.2s backwards; }
  .logo { animation: paint-in 2.2s steps(9) backwards; }
}

@keyframes tape-jitter {
  0% { background-position: 0 0; }
  33% { background-position: 0 11px; }
  66% { background-position: 0 23px; }
}
@keyframes tape-phase {
  0% { background-image: repeating-linear-gradient(to bottom, var(--zx-red) 0 18px, var(--cyan) 18px 36px); }
  40% { background-image: repeating-linear-gradient(to bottom, var(--zx-blue) 0 4px, var(--yellow) 4px 7px); }
  100% { visibility: hidden; }
}
@keyframes vanish { to { visibility: hidden; } }
@keyframes hide-until { from, to { visibility: hidden; } }
@keyframes paint-in {
  from { clip-path: inset(-20% -10% 120% -10%); }
  to { clip-path: inset(-20% -10% -30% -10%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blink,
  .scores tr.you th::after,
  .porter.is-idle .body { animation: none; }
  .btn,
  .gallery .crt,
  .porter .body,
  .porter .head { transition: none; }
  .tape:hover .reel,
  .tape:focus-within .reel,
  .tape.is-loading .reel { animation: none; }
  .ripple.is-ringing { animation: ripple-still 0.9s steps(1) both; }
  .is-party .hero,
  .is-party .ticker,
  .is-party main,
  .is-party .site-footer { animation: none; }
}
@keyframes ripple-still {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(1); opacity: 0; }
}
