/* =========================================================
   CHUNK ARCADE (alpha)
   Everything inside .cabinet is sized in cqw (1cqw = 1% of
   the cabinet width) so the whole machine scales as one unit.
   ========================================================= */

:root {
  --night: #0b0221;
  --deep: #1a0638;
  --pink: #ff2bd6;
  --hot: #ff3c8e;
  --cyan: #29f3ff;
  --yellow: #ffe53b;
  --orange: #ff8a3d;
  --purple: #7b2cff;
  --lime: #c6ff3d;
  --red: #ff2448;

  --pixel: "Press Start 2P", ui-monospace, Menlo, monospace;

  /* Cabinet is ~1.5x taller than wide. Fit it to the viewport height
     on desktop, the width on phones, and never below 290px. */
  --chrome-h: 132px;
  --cab-w: clamp(290px, min(88vw, 640px, calc((100vh - var(--chrome-h)) / 1.5)), 640px);

  color-scheme: dark;
}

@supports (height: 100svh) {
  :root { --cab-w: clamp(290px, min(88vw, 640px, calc((100svh - var(--chrome-h)) / 1.5)), 640px); }
}

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

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: #fff;
  font-family: var(--pixel);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; color: inherit; }

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

/* ---------------------------------------------------------
   Backdrop: sky, sun, mountains, scrolling grid
   --------------------------------------------------------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  --horizon: 62%;
  background:
    linear-gradient(180deg,
      #05010f 0%,
      #12032b 30%,
      #2b0752 48%,
      #6a0d6b 57%,
      #c4127e var(--horizon),
      #12002a var(--horizon),
      #07010f 100%);
}

.stars {
  position: absolute;
  inset: 0 0 40% 0;
  background-image:
    radial-gradient(1.5px 1.5px at 6% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 14% 34%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 22% 8%, #ffd6f5 50%, transparent 51%),
    radial-gradient(1px 1px at 31% 22%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 39% 44%, #b9f6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 47% 6%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 30%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 63% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 71% 40%, #ffd6f5 50%, transparent 51%),
    radial-gradient(2px 2px at 79% 10%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 87% 28%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 94% 6%, #b9f6ff 50%, transparent 51%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
.stars--b {
  background-image:
    radial-gradient(1px 1px at 3% 46%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 18% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 52%, #b9f6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 43% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 59% 4%, #ffd6f5 50%, transparent 51%),
    radial-gradient(1px 1px at 67% 26%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 83% 48%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 97% 32%, #fff 50%, transparent 51%);
  animation-duration: 6s;
  animation-delay: -3s;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }

.sun, .sun-glow {
  position: absolute;
  left: 50%;
  width: min(70vmin, 720px);
  aspect-ratio: 1;
  bottom: calc(100% - var(--horizon));
  transform: translate(-50%, 38%);
  border-radius: 50%;
}
.sun {
  background: linear-gradient(180deg, var(--yellow) 0%, var(--orange) 34%, var(--hot) 58%, #c4127e 80%);
  -webkit-mask-image: linear-gradient(180deg,
    #000 0 44%, transparent 44% 46.5%,
    #000 46.5% 52%, transparent 52% 55%,
    #000 55% 59.5%, transparent 59.5% 63.5%,
    #000 63.5% 67%, transparent 67% 72%,
    #000 72% 74.5%, transparent 74.5%);
          mask-image: linear-gradient(180deg,
    #000 0 44%, transparent 44% 46.5%,
    #000 46.5% 52%, transparent 52% 55%,
    #000 55% 59.5%, transparent 59.5% 63.5%,
    #000 63.5% 67%, transparent 67% 72%,
    #000 72% 74.5%, transparent 74.5%);
}
.sun-glow {
  transform: translate(-50%, 38%) scale(1.5);
  background: radial-gradient(closest-side, rgba(255, 60, 142, .55), rgba(255, 43, 214, .18) 60%, transparent);
  filter: blur(10px);
}

.mountains {
  position: absolute;
  left: 0;
  width: 100%;
  height: 14vh;
  bottom: calc(100% - var(--horizon));
}
.mountains .m-back { fill: #1d0536; stroke: rgba(41, 243, 255, .55); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.mountains .m-front { fill: #12002a; stroke: rgba(255, 43, 214, .6); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

.floor {
  position: absolute;
  left: 0; right: 0;
  top: var(--horizon);
  bottom: 0;
  overflow: hidden;
  perspective: 260px;
  perspective-origin: 50% 0%;
}
.grid {
  position: absolute;
  left: -150%;
  right: -150%;
  top: 0;
  height: 300%;
  transform-origin: 50% 0;
  transform: rotateX(78deg);
  background-image:
    linear-gradient(rgba(255, 43, 214, .9) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 43, 214, .9) 2px, transparent 2px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
  animation: gridScroll 1.1s linear infinite;
}
@keyframes gridScroll { to { background-position: 0 64px; } }

/* Faint scanlines + vignette over the whole page */
.fx-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 3px);
}

/* ---------------------------------------------------------
   Top bar + legend
   --------------------------------------------------------- */
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 4px;
}
.brand {
  font-size: 10px;
  letter-spacing: .12em;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 43, 214, .8);
}
.brand b { color: var(--cyan); font-weight: normal; }

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 9px;
  letter-spacing: .08em;
  background: rgba(11, 2, 33, .6);
  border: 2px solid var(--cyan);
  border-radius: 4px;
  color: var(--cyan);
  box-shadow: 0 0 10px rgba(41, 243, 255, .35), inset 0 0 8px rgba(41, 243, 255, .2);
  cursor: pointer;
  touch-action: manipulation;
}
.sound-toggle:hover { background: rgba(41, 243, 255, .12); }
.sound-toggle[aria-pressed="false"] { color: #8a7aa8; border-color: #5a4a78; box-shadow: none; }
.sound-icon {
  width: 10px; height: 10px;
  background: currentColor;
  clip-path: polygon(0 30%, 35% 30%, 75% 0, 75% 100%, 35% 70%, 0 70%);
}
.sound-toggle:focus-visible,
.arcade-btn:focus-visible,
.coin-slot:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.legend {
  position: relative;
  z-index: 5;
  padding: 6px 16px max(14px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 9px;
  line-height: 1.9;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .78);
}
.legend p { margin: 0; }
.legend i { font-style: normal; color: var(--pink); margin: 0 .6em; }
.legend kbd {
  display: inline-block;
  min-width: 2.2em;
  margin: 0 2px;
  padding: 3px 5px 2px;
  font: inherit;
  color: var(--night);
  background: #e8e2f5;
  border-radius: 3px;
  box-shadow: 0 2px 0 #8a7aa8;
}
.legend-fine { margin-top: 4px !important; font-size: 7px; color: rgba(255, 255, 255, .45); }
.legend-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .legend-keys { display: none; }
  .legend-touch { display: block; }
}

.noscript {
  position: fixed; inset: auto 0 40% 0; z-index: 60;
  text-align: center; font-size: 12px; color: var(--yellow);
}

/* ---------------------------------------------------------
   Stage + cabinet shell
   --------------------------------------------------------- */
.stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 0;
}

.cabinet {
  position: relative;
  width: var(--cab-w);
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  animation: cabIn 1s cubic-bezier(.2, .9, .25, 1) both;
}
@keyframes cabIn {
  from { opacity: 0; transform: translateY(40px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* Neon T-molding down both sides */
.cabinet::before,
.cabinet::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 21cqw;
  bottom: 6cqw;
  width: 1.1cqw;
  border-radius: 1cqw;
  background: linear-gradient(180deg, var(--pink), var(--purple) 60%, var(--cyan));
  box-shadow: 0 0 1.4cqw rgba(255, 43, 214, .9), 0 0 4cqw rgba(255, 43, 214, .45);
}
.cabinet::before { left: -.55cqw; }
.cabinet::after  { right: -.55cqw; }

.cabinet-shadow {
  width: calc(var(--cab-w) * 1.25);
  height: calc(var(--cab-w) * .08);
  margin-top: calc(var(--cab-w) * -.035);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0));
  pointer-events: none;
}

/* ---------------------------------------------------------
   Marquee
   --------------------------------------------------------- */
.marquee {
  position: relative;
  z-index: 4;
  width: 106cqw;
  height: 21cqw;
  margin-left: -3cqw;
  padding: 1.6cqw 2.2cqw;
  border-radius: 2.6cqw 2.6cqw .8cqw .8cqw;
  background: linear-gradient(180deg, #34204f, #140a22 70%);
  box-shadow:
    0 1.2cqw 2cqw rgba(0, 0, 0, .65),
    inset 0 .35cqw 0 rgba(255, 255, 255, .14),
    inset 0 -.4cqw 0 rgba(0, 0, 0, .5);
}
.marquee-panel {
  position: relative;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 1.2cqw;
  overflow: hidden;
  background:
    radial-gradient(130% 150% at 50% 125%, #ff2bd6 0%, #7b2cff 34%, #22074a 64%, #0b0221 100%);
  box-shadow:
    inset 0 0 3cqw rgba(0, 0, 0, .85),
    0 0 5cqw rgba(255, 43, 214, .45);
  animation: marqueeOn 1.6s steps(1, end) .2s both;
}
/* sunset bands across the bottom of the sign */
.marquee-panel::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34%;
  background: linear-gradient(180deg,
    transparent 0 18%, rgba(255, 229, 59, .35) 18% 26%,
    transparent 26% 38%, rgba(255, 138, 61, .35) 38% 52%,
    transparent 52% 64%, rgba(255, 60, 142, .4) 64% 82%,
    transparent 82%);
}
/* plastic glare */
.marquee-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, .16) 0 18%, transparent 18% 24%, rgba(255, 255, 255, .06) 24% 28%, transparent 28%);
  pointer-events: none;
}
@keyframes marqueeOn {
  0%   { filter: brightness(.12) saturate(.4); }
  8%   { filter: brightness(1.2); }
  12%  { filter: brightness(.2) saturate(.5); }
  20%  { filter: brightness(1); }
  24%  { filter: brightness(.35); }
  30%  { filter: brightness(1.15); }
  100% { filter: none; }
}

.logo {
  position: relative;
  z-index: 1;
  transform: skewX(-9deg) translate(-2.5cqw, -2.2cqw);
}
.logo-chunk {
  position: relative;
  display: block;
  font-family: "Bungee", "Arial Black", Impact, sans-serif;
  font-size: 12.6cqw;
  line-height: 1;
  letter-spacing: .03em;
  color: transparent;
  background: linear-gradient(180deg,
    #ffffff 0%, #c8f8ff 26%, #5b7bff 47%, #160233 49.5%,
    #ff74ee 52%, #ffd0f7 74%, #ffffff 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-stroke: .14cqw rgba(255, 255, 255, .7);
  filter:
    drop-shadow(0 .45cqw 0 #3b0a5c)
    drop-shadow(0 0 1.6cqw rgba(41, 243, 255, .5));
}
/* RGB-split glitch layers */
.logo-chunk::before,
.logo-chunk::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: none;
  -webkit-text-stroke: 0;
  opacity: 0;
  pointer-events: none;
}
.logo-chunk::before { color: var(--cyan); animation: glitchA 7s infinite 3s; }
.logo-chunk::after  { color: var(--pink); animation: glitchB 7s infinite 3s; }
@keyframes glitchA {
  0%, 91%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  92% { opacity: .9; transform: translate(-1.2cqw, 0); clip-path: inset(10% 0 55% 0); }
  94% { opacity: .9; transform: translate(1cqw, 0); clip-path: inset(60% 0 8% 0); }
  96% { opacity: .9; transform: translate(-.6cqw, 0); clip-path: inset(35% 0 40% 0); }
  97% { opacity: 0; }
}
@keyframes glitchB {
  0%, 91%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  92% { opacity: .9; transform: translate(1.2cqw, 0); clip-path: inset(50% 0 20% 0); }
  94% { opacity: .9; transform: translate(-1cqw, 0); clip-path: inset(5% 0 70% 0); }
  96% { opacity: .9; transform: translate(.8cqw, 0); clip-path: inset(75% 0 2% 0); }
  97% { opacity: 0; }
}
.logo-arcade {
  position: absolute;
  right: -6.5cqw;
  bottom: -3.3cqw;
  font-family: "Mr Dafoe", "Brush Script MT", cursive;
  font-size: 10.5cqw;
  line-height: 1;
  color: #ffe1f7;
  transform: skewX(9deg) rotate(-9deg);
  text-shadow:
    0 0 .3cqw #fff,
    0 0 1cqw var(--pink),
    0 0 2.2cqw var(--pink),
    0 0 4.5cqw var(--hot);
  white-space: nowrap;
}

/* The "(alpha)" neon tube sign bolted to the corner */
.alpha-sign {
  position: absolute;
  top: -4.2cqw;
  right: -3.5cqw;
  z-index: 5;
  padding: .3cqw 2.2cqw .9cqw;
  border-radius: 1.4cqw;
  background:
    radial-gradient(circle at 1.4cqw 1.4cqw, #8d8a99 .45cqw, transparent .55cqw),
    radial-gradient(circle at calc(100% - 1.4cqw) 1.4cqw, #8d8a99 .45cqw, transparent .55cqw),
    #0a0612;
  border: .35cqw solid #2e2440;
  box-shadow: 0 1cqw 2.2cqw rgba(0, 0, 0, .7), 0 0 3cqw rgba(198, 255, 61, .2);
  transform: rotate(9deg);
  animation: alphaSwing 5s ease-in-out infinite alternate;
}
.alpha-sign span {
  display: block;
  font-family: "Neonderthaw", "Brush Script MT", cursive;
  font-size: 8.4cqw;
  line-height: 1;
  color: #f4ffd9;
  text-shadow:
    0 0 .3cqw #fff,
    0 0 1cqw var(--lime),
    0 0 2.4cqw var(--lime),
    0 0 5cqw #6dff2a;
  animation: neonFlicker 5.5s linear infinite 1.4s;
}
@keyframes alphaSwing { from { transform: rotate(8deg); } to { transform: rotate(11deg); } }
@keyframes neonFlicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: .25; text-shadow: none; }
}

/* ---------------------------------------------------------
   Bezel + CRT screen
   --------------------------------------------------------- */
.bezel {
  position: relative;
  z-index: 2;
  padding: 0 7cqw;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .04), transparent 8%, transparent 92%, rgba(255, 255, 255, .04)),
    linear-gradient(180deg, #120a1e, #07040d);
}
.bezel-strip {
  height: 4.6cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  font-size: max(1.45cqw, 6px);
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .55);
  white-space: nowrap;
}
.bezel-stripes {
  flex: 1;
  height: 1.2cqw;
  background: linear-gradient(180deg,
    var(--pink) 0 22%, transparent 22% 39%,
    var(--purple) 39% 61%, transparent 61% 78%,
    var(--cyan) 78% 100%);
  opacity: .8;
}

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 3.2cqw;
  overflow: hidden;
  background: #030206;
  box-shadow:
    0 0 0 .7cqw #1d1430,
    0 0 0 1.2cqw #000,
    0 0 5cqw rgba(123, 44, 255, .35);
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.screen canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(128deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .04) 20%, transparent 36%),
    radial-gradient(60% 40% at 72% 0%, rgba(255, 255, 255, .06), transparent 70%);
  box-shadow:
    inset 0 0 2.4cqw rgba(0, 0, 0, .9),
    inset 0 0 0 .3cqw rgba(255, 255, 255, .05);
}
/* No-WebGL fallback: CSS scanlines over the plain canvas */
.screen.no-gl::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px 3px);
}

/* ---------------------------------------------------------
   Control panel
   --------------------------------------------------------- */
.panel {
  position: relative;
  z-index: 4;
  width: 110cqw;
  height: 22cqw;
  margin-left: -5cqw;
}
.panel-surface {
  position: absolute;
  inset: 0 0 18% 0;
  clip-path: polygon(4.55% 0, 95.45% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(102deg,
      transparent 0 66%,
      rgba(255, 43, 214, .5) 66% 67.6%,
      transparent 67.6% 69%,
      rgba(123, 44, 255, .5) 69% 70.4%,
      transparent 70.4% 71.8%,
      rgba(41, 243, 255, .45) 71.8% 73%,
      transparent 73%),
    radial-gradient(60% 120% at 28% 70%, rgba(255, 43, 214, .14), transparent 70%),
    linear-gradient(180deg, #1b1030 0%, #2d1a4a 100%);
}
.panel-surface::after {
  /* far edge seam */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: .5cqw;
  background: rgba(0, 0, 0, .55);
}
.panel-lip {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 18%;
  border-radius: 0 0 1cqw 1cqw;
  background: linear-gradient(180deg, #2a1a40, #120a1e);
  border-top: .55cqw solid var(--pink);
  box-shadow: 0 -.2cqw 1.6cqw rgba(255, 43, 214, .75), 0 1.2cqw 2cqw rgba(0, 0, 0, .6);
}

.panel-label {
  position: absolute;
  top: 15.6cqw;
  font-size: max(1.3cqw, 6px);
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .6);
  transform: translateX(-50%);
  pointer-events: none;
}
.panel-label--joy { left: 25cqw; }
.panel-label--btn { left: 73cqw; }

/* Joystick */
.joystick {
  position: absolute;
  left: 14cqw;
  top: -1cqw;
  width: 22cqw;
  height: 17cqw;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.joystick.is-dragging { cursor: grabbing; }
.joy-base {
  position: absolute;
  left: 50%;
  bottom: 2.6cqw;
  width: 13cqw;
  height: 4.8cqw;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #45405a, #121019 68%);
  box-shadow: 0 .55cqw 0 #050308, inset 0 .3cqw .4cqw rgba(255, 255, 255, .18);
}
.joy-base::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 5cqw; height: 1.9cqw;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #050308;
}
.joy-stick {
  position: absolute;
  left: 50%;
  bottom: 5cqw;
  width: 7.6cqw;
  height: 13cqw;
  margin-left: -3.8cqw;
  transform-origin: 50% 100%;
  transition: transform .22s cubic-bezier(.3, 1.8, .5, 1);
  pointer-events: none;
}
.joystick.is-dragging .joy-stick { transition: transform .05s linear; }
.joy-shaft {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1.7cqw;
  height: 8.5cqw;
  margin-left: -.85cqw;
  border-radius: .5cqw;
  background: linear-gradient(90deg, #5e5a6a, #f1eef8 38%, #9d99aa 66%, #3a3646);
}
.joy-ball {
  position: absolute;
  left: 0;
  top: 0;
  width: 7.6cqw;
  height: 7.6cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff 0 5%, #ff8fc4 11%, #ff1f6b 38%, #a6003d 72%, #45001a 100%);
  box-shadow: 0 .9cqw 1.4cqw rgba(0, 0, 0, .55), 0 0 2.4cqw rgba(255, 31, 107, .45);
}

/* Arcade buttons */
.panel-buttons {
  position: absolute;
  left: 55cqw;
  top: .5cqw;
  display: flex;
  gap: 2cqw;
}
.arcade-btn {
  position: relative;
  width: 15cqw;
  height: 14cqw;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  --cap: #ff2bd6;
  --cap-hi: #ffd3f3;
  --cap-side: #74005c;
  --glow: rgba(255, 43, 214, .8);
}
.arcade-btn--cyan {
  --cap: #29f3ff;
  --cap-hi: #e0ffff;
  --cap-side: #005d6b;
  --glow: rgba(41, 243, 255, .8);
}
/* housing ring */
.arcade-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6.2cqw;
  width: 12.4cqw;
  height: 7.4cqw;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #2b2638 55%, #0b0910 72%);
  box-shadow: 0 .5cqw 0 #050308, inset 0 0 0 .45cqw #3d3650, inset 0 .25cqw .3cqw rgba(255, 255, 255, .2);
}
/* plunger */
.arcade-btn .cap {
  position: absolute;
  left: 50%;
  top: 5.6cqw;
  width: 9.6cqw;
  height: 6cqw;
  margin-left: -4.8cqw;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 30%, var(--cap-hi) 0 8%, var(--cap) 42%, color-mix(in srgb, var(--cap) 60%, #000) 100%);
  box-shadow: 0 1.5cqw 0 var(--cap-side), 0 1.5cqw 1.6cqw rgba(0, 0, 0, .5);
  transform: translateY(-1.3cqw);
  transition: transform .06s ease-out, box-shadow .06s ease-out, filter .15s;
}
.arcade-btn .glyph {
  font-size: 2.3cqw;
  color: rgba(0, 0, 0, .38);
  text-shadow: 0 .15cqw 0 rgba(255, 255, 255, .45);
  transform: scaleY(.7);
  line-height: 1;
}
.arcade-btn:hover .cap { filter: brightness(1.12); }
.arcade-btn.is-pressed .cap,
.arcade-btn:active .cap {
  transform: translateY(-.2cqw);
  box-shadow: 0 .4cqw 0 var(--cap-side), 0 .4cqw .8cqw rgba(0, 0, 0, .5);
}
.arcade-btn.is-lit .cap {
  filter: brightness(1.35) saturate(1.2);
  box-shadow: 0 .4cqw 0 var(--cap-side), 0 0 2.6cqw var(--glow), 0 0 6cqw var(--glow);
}

/* ---------------------------------------------------------
   Lower body + coin door
   --------------------------------------------------------- */
.cab-body {
  position: relative;
  z-index: 1;
  height: 28cqw;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(123, 44, 255, .18), transparent 70%),
    linear-gradient(180deg, #1c112e, #0d0716);
}
.side-stripes {
  position: absolute;
  top: 4cqw;
  width: 26cqw;
  height: 15cqw;
  background: linear-gradient(180deg,
    var(--yellow) 0 12%, transparent 12% 20%,
    var(--orange) 20% 36%, transparent 36% 44%,
    var(--hot) 44% 64%, transparent 64% 72%,
    var(--purple) 72% 100%);
  opacity: .85;
}
.side-stripes--l { left: 0;  clip-path: polygon(0 0, 100% 0, 72% 100%, 0 100%); }
.side-stripes--r { right: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 28% 100%); }

.coin-door {
  position: relative;
  z-index: 1;
  width: 46cqw;
  height: 22cqw;
  margin-top: -1cqw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  padding: 0 2cqw;
  border-radius: 1.6cqw;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #a19dae 0%, #6c6878 45%, #47434f 100%);
  box-shadow:
    inset 0 .3cqw 0 rgba(255, 255, 255, .45),
    inset 0 -.4cqw 0 rgba(0, 0, 0, .4),
    0 .8cqw 1.6cqw rgba(0, 0, 0, .7);
}
.rivet {
  position: absolute;
  width: 1.3cqw; height: 1.3cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #8a8696 50%, #3a3644);
}
.rivet:nth-child(1) { left: 1.2cqw; top: 1.2cqw; }
.rivet:nth-child(2) { right: 1.2cqw; top: 1.2cqw; }
.rivet:nth-child(3) { left: 1.2cqw; bottom: 1.2cqw; }
.rivet:nth-child(4) { right: 1.2cqw; bottom: 1.2cqw; }

.credit-led {
  padding: 1cqw 1cqw .8cqw;
  min-width: 12cqw;
  text-align: center;
  font-size: max(1.25cqw, 5px);
  line-height: 1.5;
  letter-spacing: .06em;
  color: #ff3a4f;
  background: #170006;
  border-radius: .5cqw;
  box-shadow: inset 0 0 0 .3cqw #2b0710, inset 0 0 1.2cqw #000;
  text-shadow: 0 0 .6cqw #ff2448, 0 0 1.4cqw #ff2448;
  max-width: 100%;
}
@container (max-width: 420px) {
  .credit-led { min-width: 0; padding: .8cqw .6cqw; word-spacing: 100vw; }
}

.coin-slot {
  position: relative;
  width: 13cqw;
  height: 18cqw;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 40cqw;
  touch-action: manipulation;
}
.coin-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  border-radius: 1.2cqw;
  background: linear-gradient(180deg, #ff6a7c 0%, #ff1f45 45%, #a8001f 100%);
  box-shadow:
    0 0 0 .55cqw #d4d1de,
    0 0 0 .8cqw #3d3a48,
    inset 0 .3cqw .4cqw rgba(255, 255, 255, .5),
    0 0 2.4cqw rgba(255, 36, 72, .9);
  animation: coinPulse 1.4s ease-in-out infinite;
  transition: transform .08s;
}
.coin-text {
  font-size: max(1.35cqw, 6px);
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 0 .6cqw #fff, 0 0 1.2cqw rgba(255, 255, 255, .7);
}
.slit {
  width: 1.5cqw;
  height: 6.6cqw;
  border-radius: 1cqw;
  background: #000;
  box-shadow: 0 0 0 .45cqw #e7e4ee, 0 0 0 .7cqw #4a4656, inset 0 0 .6cqw #000;
}
@keyframes coinPulse {
  0%, 100% { filter: brightness(.92); box-shadow: 0 0 0 .55cqw #d4d1de, 0 0 0 .8cqw #3d3a48, inset 0 .3cqw .4cqw rgba(255, 255, 255, .5), 0 0 1.6cqw rgba(255, 36, 72, .6); }
  50%      { filter: brightness(1.15); box-shadow: 0 0 0 .55cqw #d4d1de, 0 0 0 .8cqw #3d3a48, inset 0 .3cqw .4cqw rgba(255, 255, 255, .5), 0 0 4.4cqw rgba(255, 36, 72, 1); }
}
.coin-slot:hover .coin-face { filter: brightness(1.25); }
.coin-slot:active .coin-face,
.coin-slot.is-pressed .coin-face { transform: scale(.96); }

.coin-hint {
  position: absolute;
  left: 50%;
  top: -4.6cqw;
  font-size: 2.6cqw;
  color: var(--yellow);
  text-shadow: 0 0 1cqw var(--yellow);
  transform: translateX(-50%);
  animation: hintBounce 1s ease-in-out infinite;
  pointer-events: none;
}
.coin-slot.is-hinting .coin-hint { animation-duration: .35s; color: #fff; }
.coin-slot.is-hinting .coin-face { animation-duration: .35s; }
@keyframes hintBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, .9cqw); }
}

.coin {
  position: absolute;
  left: 50%;
  top: -10cqw;
  width: 7cqw;
  height: 7cqw;
  margin-left: -3.5cqw;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 2.6cqw;
  color: #7a4a00;
  background: radial-gradient(circle at 34% 28%, #fffbd0 0 8%, #ffd84a 34%, #e09a00 72%, #8a5600 100%);
  box-shadow: inset 0 0 0 .5cqw rgba(255, 255, 255, .28), inset 0 0 0 .9cqw rgba(138, 86, 0, .35);
  opacity: 0;
  pointer-events: none;
}
.coin.is-dropping { animation: coinDrop .62s cubic-bezier(.5, 0, .9, .6) forwards; }
@keyframes coinDrop {
  0%   { opacity: 0; transform: translateY(-3cqw) rotateY(0deg); }
  14%  { opacity: 1; transform: translateY(0) rotateY(0deg); }
  55%  { opacity: 1; transform: translateY(9cqw) rotateY(70deg); }
  85%  { opacity: 1; transform: translateY(15.5cqw) rotateY(88deg); }
  100% { opacity: 0; transform: translateY(17cqw) rotateY(90deg); }
}

.coin-return {
  display: grid;
  place-items: center;
  width: 8cqw;
  height: 6cqw;
  border-radius: .6cqw;
  background: linear-gradient(180deg, #2a2733, #0e0c12);
  box-shadow: inset 0 0 0 .4cqw #8a8696, inset 0 .8cqw 1cqw rgba(0, 0, 0, .9);
}
.coin-return span {
  font-size: max(1cqw, 5px);
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .5);
  transform: translateY(1.4cqw);
}

.sticker {
  position: absolute;
  z-index: 2;
  right: 18cqw;
  bottom: 1.6cqw;
  padding: .9cqw 1.4cqw .8cqw;
  font-size: max(1.25cqw, 6px);
  letter-spacing: .08em;
  color: #111;
  background: var(--yellow);
  transform: rotate(-7deg);
  box-shadow: 0 .3cqw .6cqw rgba(0, 0, 0, .5);
  clip-path: polygon(0 6%, 4% 0, 97% 3%, 100% 18%, 98% 100%, 60% 96%, 3% 100%, 1% 70%);
  pointer-events: none;
}

.kickplate {
  position: relative;
  height: 6cqw;
  display: grid;
  place-items: center;
  border-radius: 0 0 .8cqw .8cqw;
  background:
    repeating-linear-gradient(90deg, transparent 0 1.8cqw, rgba(0, 0, 0, .7) 1.8cqw 2.4cqw) 50% 50% / 60% 45% no-repeat,
    linear-gradient(180deg, #120a1c, #07040b);
  border-top: .35cqw solid #2c1f40;
}
.kickplate .badge {
  position: absolute;
  right: 5cqw;
  font-size: max(1cqw, 5px);
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .45);
}

/* ---------------------------------------------------------
   Short landscape phones: let the page scroll rather than
   shrinking the cabinet to a postage stamp.
   --------------------------------------------------------- */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --cab-w: clamp(290px, min(70vw, 460px), 460px); }
  .stage { padding-top: 20px; }
}

/* ---------------------------------------------------------
   Reduced motion
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .grid, .stars, .alpha-sign, .alpha-sign span, .logo-chunk::before, .logo-chunk::after,
  .coin-face, .coin-hint, .marquee-panel, .cabinet {
    animation: none !important;
  }
  .coin.is-dropping { animation-duration: .01s; }
}
