:root {
  color-scheme: dark;
  --ink: #11130f;
  --panel: #1b1e18;
  --paper: #f1e7ca;
  --muted: #a69d82;
  --acid: #d7ed67;
  --magenta: #e45bba;
  --line: #414332;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  background: radial-gradient(ellipse at 75% 15%, #282c1c 0, transparent 38rem), var(--ink);
}
a { color: var(--acid); text-decoration-thickness: 1px; text-underline-offset: .25em; }
a:hover { color: #fff7d9; }
a:focus-visible, canvas:focus-visible { outline: 3px solid var(--magenta); outline-offset: 4px; }
.cabinet { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 26px; }
.masthead { border-bottom: 1px solid var(--line); padding-bottom: 25px; }
.eyebrow, .control-label, .screen-topline { font-size: .72rem; font-weight: 600; letter-spacing: .13em; }
.eyebrow { color: var(--muted); text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 12px #d7ed6780; }
h1 { margin: 10px 0 0; font: 900 clamp(4.5rem, 13vw, 9.25rem)/.78 'Arial Narrow', 'Franklin Gothic Condensed', Impact, sans-serif; letter-spacing: -.055em; text-transform: uppercase; }
h1 span { color: var(--acid); }
.dek { margin: 24px 0 0; color: #c5bda4; font-size: .93rem; }
.runtime-note { max-width: 75ch; margin: 14px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.7; }
.play-area { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 34px; align-items: center; padding: 34px 0 40px; }
.screen-frame { min-width: 0; padding: 13px; background: linear-gradient(135deg, #2c3024, #171913 58%); border: 1px solid #444735; box-shadow: 0 20px 55px #0008, inset 0 1px #ffffff12; }
.screen-topline { display: flex; justify-content: space-between; gap: 1rem; padding: 0 3px 12px; color: var(--acid); font-size: .63rem; }
.screen-topline span:last-child { color: var(--muted); }
.screen-wrap { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #080a08; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; border: 0; padding: 0; image-rendering: pixelated; object-fit: contain; }
.scanlines { position: absolute; inset: 0; pointer-events: none; opacity: .16; background: repeating-linear-gradient(to bottom, transparent 0 3px, #030403 4px 5px); mix-blend-mode: multiply; }
.status { min-height: 1em; margin: 12px 3px 0; color: var(--muted); font-size: .7rem; }
.controls { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.control-label { margin: 0 0 16px; color: var(--magenta); }
.key-row { display: flex; align-items: center; gap: 6px; margin: 5px 0; color: #d8d0ba; font-size: .78rem; }
kbd { min-width: 27px; padding: 6px 7px; color: var(--paper); text-align: center; background: #282b23; border: 1px solid #4c4e3f; border-radius: 2px; box-shadow: 0 2px #11130f; font: 600 .72rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.key-row span { margin-left: 5px; color: var(--muted); }
.control-note { margin: 20px 0 25px; color: var(--muted); font-size: .7rem; line-height: 1.9; }
.controls a { font-size: .72rem; line-height: 1.6; }
footer { display: flex; justify-content: space-between; gap: 2rem; align-items: baseline; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .65rem; line-height: 1.7; }
footer p { max-width: 740px; margin: 0; }
footer a { flex: 0 0 auto; }

@media (max-width: 740px) {
  .cabinet { width: min(100% - 28px, 620px); padding-top: 26px; }
  .play-area { grid-template-columns: 1fr; gap: 20px; padding-top: 23px; }
  .controls { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 16px; }
  .control-label { grid-column: 1 / -1; margin-bottom: 5px; }
  .key-row { margin: 2px 0; }
  .control-note, .controls a { grid-column: 1 / -1; margin: 8px 0 0; }
  footer { flex-direction: column; gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.start-game {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  display: grid; place-content: center; justify-items: center; gap: 24px; padding: 32px;
  border: 0; background: #080a08; color: var(--acid);
  font: 600 clamp(.9rem, 2vw, 1.3rem)/1.7 ui-monospace, monospace;
  text-align: center; cursor: pointer;
}
.start-game:hover { background: #11150c; }
.start-game:focus-visible { outline: 3px solid var(--magenta); outline-offset: -6px; }
.start-game:disabled { cursor: wait; color: var(--muted); }
.start-game[hidden] { display: none; }

.start-thumbnail {
  width: min(480px, 100%); height: auto;
  border: 1px solid var(--line);
}
#start-text { max-width: 30ch; }
