/* Ghostbusters · NYC Firehouse & Industrial Proton Containment Dual-Screen 3x5 Cabinet */
:root {
  --bg-0: #04070f;
  --steel-hi: #5c6678;
  --steel-mid: #282e3b;
  --steel-lo: #11151e;
  --hazard-y: #f5c400;
  --hazard-k: #141418;
  --ecto: #2dff7a;
  --ecto-lo: #0a7a38;
  --proton: #ff8c1a;
  --cyan: #38e8ff;
  --gozer: #d946ef;
  --crimson: #e61c32;
  --ink: #eef4ff;
  --muted: #98a6c4;
  --f-ui: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --f-ind: 'Black Ops One', 'Oswald', system-ui, sans-serif;
  --cell: clamp(78px, min(10.2vh, calc((100vw - 156px) / 5)), 102px);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg-0); overflow-x: clip; }
body {
  background:
    radial-gradient(960px 640px at 50% 8%, rgba(45, 255, 122, .16) 0%, rgba(16, 24, 48, .78) 42%, #060912 80%, #03050a 100%);
  color: var(--ink);
  font-family: var(--f-ui);
  letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent;
}
#ectodust { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
a { color: inherit; }
button { font-family: inherit; }
[hidden] { display: none !important; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 7px clamp(10px, 2.5vw, 24px);
  background: linear-gradient(180deg, rgba(6, 10, 20, .96), rgba(6, 10, 20, .74));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(45, 255, 122, .22);
}
.top-left { justify-self: start; display: flex; gap: 8px; }
.top-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.brand-mini {
  font-family: var(--f-ind); font-size: 13px; letter-spacing: .24em;
  color: rgba(238, 244, 255, .82); white-space: nowrap;
}
.pill-btn {
  padding: 6px 13px; border-radius: 999px; background: rgba(14, 19, 32, .92); color: var(--ink);
  border: 1px solid rgba(245, 196, 0, .48); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.pill-btn:hover { border-color: var(--ecto); color: #fff; }
.credits {
  display: flex; align-items: center; gap: 7px; padding: 4px 12px 4px 6px;
  border-radius: 999px; background: rgba(8, 12, 22, .95);
  border: 1px solid rgba(45, 255, 122, .55);
  transition: box-shadow .25s, transform .25s;
}
.credits.up { box-shadow: 0 0 22px rgba(45, 255, 122, .7); transform: scale(1.04); }
.credits-orb {
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #d6ffe5 0%, #2dff7a 52%, #065a24 100%);
  border: 1px solid rgba(210, 255, 226, .75);
}
.credits-num { font-weight: 700; font-size: 18px; color: var(--ecto); font-variant-numeric: tabular-nums; }
.credits-lbl { font-size: 10px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(245, 196, 0, .42);
  background: rgba(12, 16, 28, .92); color: var(--ink); font-size: 15px; cursor: pointer;
}
.icon-btn.off { opacity: .55; }

main { position: relative; z-index: 1; padding: 6px 8px 34px; }

/* ---------- Industrial Firehouse Dual-Screen Cabinet ---------- */
.gb-shell {
  width: fit-content; max-width: 100%; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
}

/* 1. Twin Ecto-1 Rotating Siren Beacons + Hazard Industrial Topper Sign */
.gb-topper {
  position: relative; z-index: 4;
  width: calc(var(--cell) * 5 + 118px); max-width: calc(100% - 16px);
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: end; gap: 10px;
  margin-bottom: -2px;
}
.siren-dome {
  height: 36px; border-radius: 18px 18px 4px 4px; position: relative;
  border: 2px solid #727c92; border-bottom: 5px solid #2b3140;
  box-shadow: inset 0 6px 10px rgba(255, 255, 255, .45);
}
.siren-blue {
  background: radial-gradient(circle at 50% 42%, #d6f4ff, #1da1ff 55%, #063d8a);
  box-shadow: 0 0 22px rgba(56, 232, 255, .8), inset 0 5px 8px rgba(255, 255, 255, .5);
  animation: sirenL 1.1s ease-in-out infinite;
}
.siren-red {
  background: radial-gradient(circle at 50% 42%, #ffe0e4, #ff243c 55%, #780412);
  box-shadow: 0 0 22px rgba(255, 36, 60, .8), inset 0 5px 8px rgba(255, 255, 255, .5);
  animation: sirenR 1.1s ease-in-out infinite;
}
@keyframes sirenL { 0%, 100% { filter: brightness(1.3); } 50% { filter: brightness(.55); } }
@keyframes sirenR { 0%, 100% { filter: brightness(.55); } 50% { filter: brightness(1.3); } }

.gb-marquee {
  position: relative; padding: 8px 18px 9px; border-radius: 14px 14px 4px 4px;
  background:
    repeating-linear-gradient(-45deg, rgba(245, 196, 0, .16) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, #272f40 0%, #141926 52%, #0a0e18 100%);
  border: 2.5px solid var(--hazard-y);
  box-shadow: 0 0 26px rgba(45, 255, 122, .24), inset 0 2px 1px rgba(255, 255, 255, .28), 0 10px 22px rgba(0, 0, 0, .85);
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.gb-marquee-emblem {
  width: 52px; height: 52px; object-fit: contain; flex: none;
  filter: drop-shadow(0 0 12px rgba(255, 45, 65, .75));
}
.gb-marquee-text { text-align: center; line-height: 1.02; }
.gb-marquee-text h1 {
  margin: 0; font-family: var(--f-ind); font-size: clamp(22px, 3vw, 36px); letter-spacing: .1em;
  background: linear-gradient(180deg, #ffffff 0%, #ffe88a 52%, #e09a00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 12px rgba(230, 28, 50, .75)) drop-shadow(0 3px 3px #000);
}
.gb-marquee-sub {
  margin-top: 2px; font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ecto); text-shadow: 0 0 8px rgba(45, 255, 122, .65);
}

/* 2. Industrial Riveted Steel Dual-Screen Housing */
.gb-cabinet {
  position: relative;
  width: calc(var(--cell) * 5 + 158px); max-width: 100%;
  border-radius: 16px 16px 14px 14px;
  background: linear-gradient(90deg, #3a4354 0%, #1b212e 4%, #0f141e 10%, #0a0e17 50%, #0f141e 90%, #1b212e 96%, #3a4354 100%);
  border: 2.5px solid #596378;
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, .28),
    inset 0 0 0 3px #141924,
    0 0 0 4px #05080f,
    0 34px 72px rgba(0, 0, 0, .92);
  padding: 10px 10px 0;
  transition: box-shadow .35s;
}
.gb-cabinet.win-pulse {
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, .36),
    inset 0 0 0 3px #142820,
    0 0 0 4px #05080f,
    0 0 46px rgba(45, 255, 122, .52),
    0 34px 72px rgba(0, 0, 0, .92);
}

.cab-frame {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) 14px; gap: 10px; align-items: stretch;
}
.ecto-rail {
  border-radius: 8px;
  background: linear-gradient(90deg, #1d2330, #596378 35%, #8a95ad 52%, #3a4254 80%, #161b26);
  border: 1px solid rgba(255, 255, 255, .22);
  display: flex; flex-direction: column; justify-content: space-between; padding: 9px 3px; gap: 14px;
}
.ecto-tube {
  flex: 1; border-radius: 999px;
  background: linear-gradient(180deg, #b8ffd6 0%, #2dff7a 45%, #38e8ff 100%);
  box-shadow: 0 0 12px rgba(45, 255, 122, .85), 0 0 22px rgba(56, 232, 255, .45);
  transition: background .3s, box-shadow .3s;
}
body.free-mode .ecto-tube {
  background: linear-gradient(180deg, #fae8ff 0%, #e879f9 50%, #9333ea 100%);
  box-shadow: 0 0 14px rgba(217, 70, 239, .9), 0 0 26px rgba(147, 51, 234, .65);
}

.screens-col { display: flex; flex-direction: column; gap: 9px; min-width: 0; }

/* ---------- UPPER MONITOR: LIVE ANIMATED NYC FIREHOUSE & STAY PUFT SHOWDOWN ---------- */
.upper-screen {
  border-radius: 10px; overflow: hidden;
  background: #070b14;
  border: 2px solid #3f495e;
  box-shadow: inset 0 0 0 1px rgba(45, 255, 122, .16), 0 8px 20px rgba(0, 0, 0, .82);
  padding: 6px;
  display: flex; flex-direction: column; gap: 6px;
}
.upper-video {
  position: relative; width: 100%; aspect-ratio: 860 / 280;
  border-radius: 6px; overflow: hidden; background: #050914;
  border: 1.5px solid rgba(56, 232, 255, .45);
}
#topbox-canvas { width: 100%; height: 100%; display: block; }
.upper-video-hud {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between; padding: 6px 8px;
}
.video-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.video-pill {
  padding: 2px 9px; border-radius: 4px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  background: rgba(6, 12, 22, .84); border: 1px solid var(--ecto); color: #d6ffe5;
}
.jp-strip { display: flex; gap: 5px; }
.jp-chip {
  padding: 2px 7px; border-radius: 4px; font-size: 9.5px; letter-spacing: .1em;
  background: rgba(6, 10, 20, .86); border: 1px solid rgba(245, 196, 0, .48); color: var(--muted);
}
.jp-chip b { color: #ffe88a; margin-left: 3px; font-variant-numeric: tabular-nums; }
.jp-chip.grand { border-color: rgba(255, 51, 82, .75); }
.jp-chip.grand b { color: #ff8599; }
.video-caption {
  align-self: center; max-width: 96%;
  padding: 2px 12px; border-radius: 4px;
  background: rgba(6, 10, 20, .84); border: 1px solid rgba(245, 196, 0, .62);
  font-family: var(--f-ui); font-size: 11px; font-weight: 700; letter-spacing: .16em;
  color: #fff4cc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 3 Bespoke Industrial Hazard-Striped Containment Glass Tubes (gb-tube-frame.webp) */
.tubes-strip {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 8px 4px; border-radius: 7px;
  background: linear-gradient(180deg, #131926, #080c15);
  border: 1px solid rgba(245, 196, 0, .38);
}
.tubes-trio {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; justify-items: center;
}
.tube-unit {
  position: relative; width: 100%; max-width: 174px; aspect-ratio: 680 / 274;
  border-radius: 8px; overflow: hidden; background: #040814;
  border: 1.5px solid rgba(245, 196, 0, .45); transition: transform .22s;
}
.tube-unit.surge { animation: tubePop 480ms ease-out; }
@keyframes tubePop { 40% { transform: scale(1.07); } }
.tube-unit.tube-green { border-color: rgba(45, 255, 122, .75); }
.tube-unit.tube-gold { border-color: rgba(245, 196, 0, .82); }
.tube-unit.tube-red { border-color: rgba(230, 28, 50, .85); }
.tube-img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.tube-glass {
  position: absolute; z-index: 2; left: 37%; right: 27%; top: 24%; bottom: 26%;
  border-radius: 4px; overflow: hidden; pointer-events: none; mix-blend-mode: screen;
}
.tube-glass::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .36) 0%, transparent 45%, rgba(0, 0, 0, .35) 100%);
}
.tube-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 45%;
  transition: width 460ms cubic-bezier(.22, .88, .32, 1); border-radius: 3px;
}
.tube-unit.tube-green .tube-fill { background: linear-gradient(90deg, #067834, #2dff7a 65%, #d6ffe5); box-shadow: 0 0 12px #2dff7a; }
.tube-unit.tube-gold .tube-fill { background: linear-gradient(90deg, #b86a00, #ffd447 65%, #fff7c2); box-shadow: 0 0 12px #ffd447; }
.tube-unit.tube-red .tube-fill { background: linear-gradient(90deg, #8c061c, #ff2a46 65%, #ffc2cc); box-shadow: 0 0 12px #ff2a46; }
.tube-unit.hot .tube-fill { animation: hotPulse 1.0s ease-in-out infinite; }
@keyframes hotPulse { 50% { filter: brightness(1.32) saturate(1.25); } }
.tubes-tagline {
  font-size: 10.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
  color: #ffe88a; text-shadow: 0 0 8px rgba(245, 196, 0, .45);
}

/* ---------- LOWER MONITOR: 3×5 CONTAINMENT GRID REELS ---------- */
.lower-screen {
  position: relative; border-radius: 10px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, rgba(22, 42, 66, .45), rgba(8, 12, 22, .96) 72%, #050811 100%);
  border: 2px solid #445066;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, .88), 0 10px 24px rgba(0, 0, 0, .85);
  padding: 14px 10px 9px;
}
.fs-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: -4px auto 8px; padding: 4px 14px; width: fit-content;
  border-radius: 999px; border: 1.5px solid var(--gozer); background: rgba(38, 8, 52, .94);
  color: #f5d0fe; letter-spacing: .16em; text-transform: uppercase; font-size: 12px;
  box-shadow: 0 0 20px rgba(217, 70, 239, .58);
}
.fs-banner img { width: 22px; height: 22px; object-fit: cover; border-radius: 5px; }
.fs-banner b { color: #f0abfc; }

.reel-stage {
  display: grid; grid-template-columns: 26px auto 26px; align-items: stretch; justify-content: center; gap: 7px;
}
.line-stack {
  display: flex; flex-direction: column; justify-content: space-between; padding: 10px 0; align-items: center;
}
.line-tag {
  width: 22px; height: 18px; border-radius: 4px; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; cursor: pointer;
  color: #060a12; background: var(--c); opacity: .62;
  transition: transform .15s, opacity .15s, box-shadow .15s;
}
.line-tag:hover, .line-tag.on { opacity: 1; transform: scale(1.14); box-shadow: 0 0 12px var(--c); }

.reels-outer {
  position: relative; padding: 6px; border-radius: 8px;
  border: 2px solid var(--hazard-y);
  background: linear-gradient(180deg, #1b2232, #090d16);
  box-shadow: inset 0 0 0 2px #070b14, 0 0 24px rgba(0, 0, 0, .85);
}
.grid-ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 8;
  padding: 2px 22px; white-space: nowrap;
  font-family: var(--f-ind); font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--hazard-y);
  background: #0b101b;
  border: 1.5px solid var(--hazard-y); border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .82);
}

.reels {
  position: relative; display: grid; grid-template-columns: repeat(5, var(--cell));
  overflow: hidden; border-radius: 4px;
  background: linear-gradient(180deg, #070d1c 0%, #0b1428 50%, #060a14 100%);
}
body.free-mode .reels { background: linear-gradient(180deg, #1c0829, #080412); }

.screen-glass {
  position: absolute; inset: 0; pointer-events: none; z-index: 7;
  background: linear-gradient(128deg, rgba(255, 255, 255, .07) 0%, transparent 36%);
}

.reel {
  position: relative; height: calc(var(--cell) * 3); overflow: hidden;
  border-right: 1.5px solid rgba(56, 232, 255, .28);
}
.reel:last-of-type { border-right: none; }
.reel::before, .reel::after { content: ''; position: absolute; left: 0; right: 0; height: 14%; z-index: 2; pointer-events: none; }
.reel::before { top: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent); }
.reel::after { bottom: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .8), transparent); }
.reel.spinning::after { height: 30%; animation: gloss 210ms linear infinite; background: linear-gradient(180deg, transparent, rgba(45, 255, 122, .2), transparent); }
@keyframes gloss { from { transform: translateY(-120%); } to { transform: translateY(420%); } }
.reel.tease { animation: tease 320ms ease-in-out infinite; background: radial-gradient(ellipse at 50% 50%, rgba(45, 255, 122, .28), transparent 72%); }
@keyframes tease {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(45, 255, 122, .7), inset 0 0 18px rgba(45, 255, 122, .4); }
  50% { box-shadow: inset 0 0 0 4px var(--hazard-y), inset 0 0 34px rgba(245, 196, 0, .85); }
}
.reel.reel-thud { animation: reelThud 220ms cubic-bezier(.22, .68, .35, 1.2); }
@keyframes reelThud { 0% { transform: translateY(5px); } 55% { transform: translateY(-2px); } 100% { transform: translateY(0); } }

.strip { will-change: transform; }
.strip.blur { filter: blur(1.8px) brightness(1.16) saturate(1.12); }
.cell { height: var(--cell); display: grid; place-items: center; padding: 4.5%; position: relative; }
.cell img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 8px;
  border: 1px solid rgba(56, 232, 255, .24);
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .82));
  user-select: none; transition: transform .22s, filter .22s;
}
.cell.cell-land img { animation: cellLand 420ms cubic-bezier(.18, .88, .32, 1.35); border-color: var(--ecto); filter: drop-shadow(0 0 14px rgba(45, 255, 122, .9)); }
@keyframes cellLand { 0% { transform: scale(.78); } 55% { transform: scale(1.15); } 100% { transform: scale(1); } }
.cell.win { animation: pop .75s ease-in-out infinite; z-index: 2; }
.cell.win img { border-color: var(--hazard-y); filter: drop-shadow(0 0 14px rgba(45, 255, 122, .95)) brightness(1.14); }
.cell.win::before {
  content: ''; position: absolute; inset: 3.5%; border-radius: 9px;
  border: 2px solid var(--ecto);
  background: radial-gradient(circle, rgba(45, 255, 122, .25), transparent 72%);
  box-shadow: 0 0 16px rgba(45, 255, 122, .8); pointer-events: none;
}
@keyframes pop { 50% { transform: scale(1.07); } }
.reels.has-win .cell:not(.win) img { opacity: .34; filter: grayscale(.4) brightness(.64); }

/* FULL-COLUMN STICKY EXPANDING GHOSTBUSTERS OVERLAY */
.expand-layer {
  position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr);
  pointer-events: none; z-index: 4;
}
.exp-col {
  grid-column: calc(var(--c) + 1); position: relative; height: 100%; overflow: hidden;
  border-left: 2.5px solid var(--ec, #ff8c1a); border-right: 2.5px solid var(--ec, #ff8c1a);
  background: radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--ec, #ff8c1a) 30%, #0b1426), #050914 84%);
  box-shadow: inset 0 0 24px color-mix(in srgb, var(--ec, #ff8c1a) 62%, transparent), 0 0 22px color-mix(in srgb, var(--ec, #ff8c1a) 55%, transparent);
  animation: colExpand 460ms cubic-bezier(.18, .92, .28, 1.15) forwards;
}
@keyframes colExpand {
  0% { transform: scaleY(.18); opacity: .2; }
  65% { transform: scaleY(1.03); opacity: 1; }
  100% { transform: scaleY(1); opacity: 1; }
}
.exp-col img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 14%;
  filter: drop-shadow(0 0 14px var(--ec, #ff8c1a));
}
.exp-badge-top {
  position: absolute; top: 5px; left: 3px; right: 3px; z-index: 2; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 2px 3px; border-radius: 4px; font-family: var(--f-ind); font-size: 9px;
  letter-spacing: .06em; text-transform: uppercase; color: #fff;
  background: rgba(6, 10, 20, .9); border: 1.5px solid var(--ec, #ff8c1a);
  box-shadow: 0 0 10px var(--ec, #ff8c1a);
}
.exp-badge-bot {
  position: absolute; bottom: 5px; left: 3px; right: 3px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 3px 3px; border-radius: 5px; background: rgba(6, 10, 20, .92);
  border: 1.5px solid var(--hazard-y);
}
.exp-badge-bot b { font-size: 12.5px; color: #ffe88a; letter-spacing: .08em; white-space: nowrap; }
.exp-badge-bot span { font-size: 8px; color: #b6c8e8; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }

.lines-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.lines-overlay .ln { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw .58s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.line-pill { animation: pillPop 280ms cubic-bezier(.2, .9, .3, 1.3) backwards; animation-delay: 110ms; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .85)); }
@keyframes pillPop { from { opacity: 0; transform: scale(.5); } }
.coin-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }

.win-flash { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .3s; padding: 0 12px; text-align: center; }
.win-flash.show { opacity: 1; }
.win-flash span {
  font-family: var(--f-ind); font-size: clamp(16px, 2.3vw, 26px); color: #fff8d6;
  padding: 7px 18px; border-radius: 8px; max-width: 94%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(6, 12, 22, .94); border: 2px solid var(--ecto);
  text-shadow: 0 0 16px var(--ecto), 0 0 30px rgba(245, 196, 0, .7);
  animation: pop .6s infinite;
}

/* Bottom P.K.E. Readout Bar inside Lower Monitor */
.screen-footer {
  display: grid; grid-template-columns: 1fr 1.25fr 0.72fr; gap: 10px;
  margin-top: 8px; padding: 0 32px;
}
.sf-pill {
  padding: 4px 12px; border-radius: 6px;
  background: #040a08;
  border: 1.5px solid rgba(45, 255, 122, .52);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .92);
  display: flex; align-items: baseline; justify-content: center; gap: 6px;
  font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--ecto);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sf-pill span { color: #7ac49a; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; }
.sf-pill.jackpot-pill { border-color: rgba(245, 196, 0, .75); color: #ffe88a; }
.sf-pill.jackpot-pill.win-lit {
  border-color: var(--ecto); background: radial-gradient(circle, rgba(20, 110, 56, .55), #040a08);
  box-shadow: 0 0 18px rgba(45, 255, 122, .65);
}

/* ---------- 3. INDUSTRIAL PROTON BUTTON DECK ---------- */
.gb-deck {
  position: relative; z-index: 3;
  width: calc(100% + 26px); max-width: calc(100vw - 14px);
  margin: 9px -13px 0; padding: 10px 15px 11px;
  border-radius: 10px 10px 12px 12px;
  background: linear-gradient(180deg, #2b3344 0%, #171c28 24%, #0d111a 74%, #060910 100%);
  border: 2px solid #596378; border-top-color: var(--hazard-y);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, .24), 0 18px 32px rgba(0, 0, 0, .9);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
}
.deck-left { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
.sq-btn {
  min-width: 40px; height: 42px; padding: 0 8px; border-radius: 7px; cursor: pointer;
  background: linear-gradient(180deg, #323c4e 0%, #191f2c 52%, #0e121b 100%);
  border: 1.5px solid rgba(154, 174, 210, .42); border-top-color: rgba(255, 255, 255, .36);
  color: #f2f7ff; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  box-shadow: 0 4px 0 #05080f; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
}
.sq-btn small { font-size: 8px; letter-spacing: .12em; color: var(--muted); font-weight: 500; }
.topbox-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.sq-btn:hover { border-color: var(--hazard-y); }
.sq-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #05080f; }
.sq-btn.accent { border-color: rgba(245, 196, 0, .75); color: #ffe88a; }

.deck-pad {
  background: #040b08; border: 1.5px solid rgba(45, 255, 122, .45);
  border-radius: 8px; padding: 6px 12px; min-height: 44px;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, .95);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0;
}
.msg {
  font-size: 11.5px; color: #b8ffd6; font-weight: 500; letter-spacing: .06em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.win-read {
  display: flex; align-items: baseline; gap: 6px; flex: none;
  padding-left: 10px; border-left: 1px solid rgba(45, 255, 122, .28);
}
.win-read span { font-size: 10px; letter-spacing: .2em; color: #7ac49a; text-transform: uppercase; }
.win-read b { font-size: 20px; color: var(--hazard-y); font-variant-numeric: tabular-nums; }

/* Chunky Industrial Hazard Red/Yellow BUST! Spin Button */
.spin-ring {
  padding: 5px; border-radius: 12px;
  background: repeating-linear-gradient(-45deg, var(--hazard-y) 0 7px, #141418 7px 14px);
  border: 1.5px solid #2b3240;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .88);
}
.spin-btn {
  min-width: 112px; height: 42px; padding: 0 16px; border-radius: 8px; cursor: pointer;
  border: 2px solid #ffd46a;
  background: linear-gradient(180deg, #ff5468 0%, #d41028 48%, #7a0312 100%);
  box-shadow: 0 4px 0 #3f0108, 0 0 20px rgba(230, 28, 50, .62), inset 0 2px 2px rgba(255, 255, 255, .45);
  color: #fff; font-family: var(--f-ind); font-size: 18px; letter-spacing: .16em; text-transform: uppercase;
  transition: transform 70ms ease, box-shadow 70ms ease, filter .18s; transform: translateY(-2px);
}
.spin-btn:hover:not(:disabled) { filter: brightness(1.1); }
.spin-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #3f0108; }
.spin-btn:disabled { transform: translateY(2px); box-shadow: 0 1px 0 #2e0106; filter: saturate(.55) brightness(.75); cursor: progress; }
body.free-mode .spin-btn {
  border-color: #f5d0fe;
  background: linear-gradient(180deg, #e879f9 0%, #a21caf 50%, #581c87 100%);
  box-shadow: 0 4px 0 #3b0764, 0 0 22px rgba(217, 70, 239, .75);
}

/* ---------- 4. CONTAINMENT BASE HANDLE & PULL-DOWN DRAWER ---------- */
.gb-base {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 8px 16px 10px;
}
.hazard-strip {
  flex: 1; height: 14px; border-radius: 4px;
  background: repeating-linear-gradient(-45deg, rgba(245, 196, 0, .42) 0 8px, rgba(16, 18, 24, .9) 8px 16px);
  border: 1px solid rgba(245, 196, 0, .35);
}
.drawer-handle {
  appearance: none; cursor: pointer;
  padding: 5px 18px; border-radius: 6px;
  background: linear-gradient(180deg, #252d3c, #101520);
  border: 1.5px solid rgba(245, 196, 0, .6);
  color: #ffe88a; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
}
.drawer-handle:hover { border-color: var(--ecto); color: #fff; }
.drawer-chevron { font-style: normal; transition: transform .28s ease; display: inline-block; }
.drawer-handle[aria-expanded="true"] .drawer-chevron { transform: rotate(180deg); }

.pt-drawer {
  max-height: 0; overflow: hidden; opacity: 0;
  width: calc(var(--cell) * 5 + 116px); max-width: calc(100% - 16px);
  margin: 0 auto; border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, #101726 0%, #060912 100%);
  border: 0 solid rgba(245, 196, 0, .52);
  box-shadow: inset 0 10px 24px rgba(0, 0, 0, .88), 0 22px 44px rgba(0, 0, 0, .85);
  transition: max-height .42s cubic-bezier(.22, .88, .32, 1), opacity .28s ease, margin .3s ease, border-width .2s;
}
.pt-drawer.open { max-height: 1180px; opacity: 1; margin-top: 4px; border-width: 1.5px; border-top: none; }
.pt-drawer-inner { padding: 14px 16px 18px; text-align: left; }
.pt-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.pt-drawer-head .kicker { display: block; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ecto); }
.pt-drawer-head h3 { margin: 0; font-family: var(--f-ind); font-size: 20px; color: #ffe88a; }
.pt-drawer-note { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.pt-head, .pt-row { display: grid; grid-template-columns: 44px 1fr 44px 44px 44px 44px; align-items: center; gap: 8px; padding: 4px 6px; }
.pt-head span:nth-child(2), .pt-head b { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pt-head b, .pt-row b { text-align: right; }
.pt-row { border-bottom: 1px solid rgba(56, 232, 255, .14); }
.pt-row img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; border: 1px solid rgba(245, 196, 0, .38); }
.pt-row b { color: #ffe88a; font-size: 15px; }
.pt-scatters-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.pt-scatter {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  background: rgba(6, 10, 20, .88); border: 1px solid rgba(45, 255, 122, .25); font-size: 12px; color: var(--muted);
}
.pt-scatter img { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; flex: none; }
.pt-scatter b { color: #fff; }

.pt-test-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 14px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 42, 26, .92), rgba(8, 12, 22, .96));
  border: 1.5px dashed rgba(45, 255, 122, .72);
}
.pt-test-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 240px; }
.pt-test-copy b { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--ecto); }
.pt-test-copy span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.test-mode-btn {
  background: linear-gradient(180deg, #ff5468, #c2102c); border-color: #ffe88a; color: #fff;
  box-shadow: 0 3px 0 #4d0310, 0 0 16px rgba(230, 28, 50, .5);
}
.test-mode-btn.active {
  background: linear-gradient(180deg, #7bffb6, #14b85e); border-color: #d8ffeb; color: #04180d;
  box-shadow: 0 3px 0 #064a24, 0 0 18px rgba(45, 255, 122, .55);
}

/* ---------- Modals: Stay Puft 7-Frame Boss Battle, Ghost Trap 3×5 Hold & Spin, Gozer ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 30px); opacity: 0;
  padding: 11px 18px; border-radius: 10px; background: rgba(7, 12, 22, .96); border: 1px solid var(--hazard-y);
  color: #fff; transition: all .3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { border-color: var(--ecto); }

.modal-wrap {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 14px;
  background: rgba(3, 6, 14, .86); backdrop-filter: blur(7px); opacity: 0; transition: opacity .3s;
}
.modal-wrap.in { opacity: 1; }
.modal {
  position: relative; width: min(720px, 100%); max-height: calc(100vh - 28px); overflow: auto;
  padding: clamp(16px, 2.8vw, 26px); border-radius: 16px; text-align: center;
  background: radial-gradient(560px 260px at 50% 0, rgba(45, 255, 122, .18), transparent 72%), linear-gradient(180deg, #131c2e, #060a14);
  border: 2px solid var(--hazard-y); box-shadow: 0 0 0 5px rgba(5, 8, 16, .92), 0 30px 80px rgba(0, 0, 0, .88);
}
.modal .kicker { margin: 0 0 4px; letter-spacing: .3em; font-size: 11px; text-transform: uppercase; color: var(--ecto); }
.modal h2 { margin: 0 0 6px; font-family: var(--f-ind); font-size: clamp(22px, 3.6vw, 34px); color: #ffe88a; }
.modal p { color: var(--muted); margin: 4px 0 12px; font-size: 14px; }
.modal .big-win { font-family: var(--f-ind); font-size: clamp(38px, 6.5vw, 60px); color: var(--ecto); text-shadow: 0 0 22px rgba(45, 255, 122, .65); margin: 8px 0; }
.bonus-art { width: 150px; margin: 10px auto; filter: drop-shadow(0 0 22px rgba(217, 70, 239, .65)); }
.bonus-art img { width: 100%; display: block; border-radius: 12px; border: 2px solid var(--hazard-y); }
.btn {
  appearance: none; border: 1.5px solid #ffe88a; cursor: pointer; border-radius: 10px; padding: 11px 22px;
  font-family: var(--f-ind); font-size: 16px; letter-spacing: .14em; text-transform: uppercase;
  color: #120902; background: linear-gradient(180deg, #fff2c2, #f5c400 55%, #a87600);
  box-shadow: 0 4px 0 #4d3307;
}
.btn.crimson { background: linear-gradient(180deg, #ff5468, #d41028 55%, #7a0312); color: #fff; box-shadow: 0 4px 0 #42010c; }
.btn.ecto { background: linear-gradient(180deg, #7bffb6, #19c769 55%, #087a3b); color: #03150b; box-shadow: 0 4px 0 #044a22; }
.btn.gozer { background: linear-gradient(180deg, #f0abfc, #a21caf 55%, #581c87); color: #fff; box-shadow: 0 4px 0 #2e1065; }
.btn:active { transform: translateY(3px); }

/* Stay Puft 7-Frame Interactive Boss Battle Stage */
.boss-arena {
  position: relative; max-width: 560px; margin: 6px auto 12px;
  border-radius: 14px; overflow: hidden; padding: 10px;
  background: radial-gradient(circle at 50% 40%, #1a1030, #060a14 82%);
  border: 2px solid var(--hazard-y);
  box-shadow: inset 0 0 32px rgba(255, 140, 26, .25);
}
.boss-frame-wrap {
  position: relative; height: 270px; display: flex; align-items: center; justify-content: center;
}
.boss-frame-wrap.shake { animation: bossShake 360ms ease; }
@keyframes bossShake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-8px, 4px) scale(1.03); }
  50% { transform: translate(8px, -4px) scale(1.05); }
  75% { transform: translate(-5px, 2px); }
}
.boss-frame-img {
  height: 100%; max-width: 100%; object-fit: contain; border-radius: 10px;
  filter: drop-shadow(0 0 24px rgba(255, 140, 26, .5));
}
.boss-squad {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(245, 196, 0, .35);
}
.boss-buster {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.boss-buster img {
  height: 86px; width: auto; max-width: 100%; object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .85));
}
.boss-buster span { font-size: 10px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.boss-hud {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 560px; margin: 0 auto 10px;
}
.boss-stat {
  padding: 5px 8px; border-radius: 8px; background: #050a14; border: 1px solid rgba(45, 255, 122, .45);
  display: flex; flex-direction: column; align-items: center;
}
.boss-stat span { font-size: 9.5px; letter-spacing: .18em; color: var(--muted); }
.boss-stat b { font-size: 19px; color: var(--ecto); font-variant-numeric: tabular-nums; }

/* Ghost Trap 3×5 Hold & Spin Board */
.hs-hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 480px; margin: 0 auto 10px; }
.hs-stat {
  padding: 5px 8px; border-radius: 8px; background: #050a14; border: 1px solid rgba(245, 196, 0, .48);
  display: flex; flex-direction: column; align-items: center;
}
.hs-stat span { font-size: 10px; letter-spacing: .2em; color: var(--muted); }
.hs-stat b { font-size: 20px; color: #ffe88a; font-variant-numeric: tabular-nums; }
.hs-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px;
  max-width: 480px; margin: 0 auto 14px; padding: 10px; border-radius: 12px;
  background: #050a14; border: 2px solid var(--hazard-y);
  box-shadow: inset 0 0 24px rgba(45, 255, 122, .2);
}
.hs-cell {
  aspect-ratio: 1; border-radius: 8px; position: relative; display: grid; place-items: center;
  background: rgba(14, 22, 36, .82); border: 1px dashed rgba(245, 196, 0, .28); overflow: hidden;
}
.hs-cell.locked {
  border: 2px solid var(--ecto); background: radial-gradient(circle, rgba(45, 255, 122, .28), #070d1a);
  box-shadow: 0 0 14px rgba(45, 255, 122, .65); animation: cellLand 360ms ease-out;
}
.hs-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .88; }
.hs-cell b {
  position: relative; z-index: 2; padding: 2px 6px; border-radius: 999px;
  background: rgba(5, 10, 18, .92); border: 1px solid var(--hazard-y); color: #ffe88a; font-size: 13px;
}

@media (max-width: 720px) {
  :root { --cell: calc((100vw - 74px) / 5); }
  .topbar { display: flex; justify-content: space-between; gap: 6px; padding: 6px 8px; }
  .brand-mini, .credits-lbl { display: none; }
  .gb-topper { width: calc(100% - 10px); grid-template-columns: 28px minmax(0, 1fr) 28px; gap: 5px; }
  .siren-dome { height: 26px; }
  .gb-marquee { padding: 6px 10px; gap: 8px; }
  .gb-marquee-emblem { width: 34px; height: 34px; }
  .gb-marquee-sub { font-size: 8.5px; letter-spacing: .12em; }
  .gb-cabinet { width: 100%; padding: 8px 6px 0; }
  .cab-frame { grid-template-columns: 8px minmax(0, 1fr) 8px; gap: 5px; }
  .ecto-rail { padding: 6px 1.5px; }
  .jp-strip { display: none; }
  .lower-screen { padding: 12px 5px 8px; }
  .reel-stage { grid-template-columns: 1fr; gap: 0; }
  .line-stack { display: none; }
  .screen-footer { padding: 0 2px; gap: 5px; }
  .sf-pill { font-size: 11px; padding: 3px 5px; gap: 3px; }
  .sf-pill span { font-size: 9px; }
  .gb-deck {
    width: auto; max-width: none; margin: 8px 2px 0; padding: 8px;
    grid-template-columns: 1fr auto; gap: 8px;
  }
  .deck-left { order: 2; grid-column: 1 / -1; justify-content: space-between; }
  .deck-pad { order: 1; min-height: 38px; padding: 5px 8px; }
  .spin-ring { order: 1; }
  .spin-btn { min-width: 84px; height: 38px; font-size: 15px; padding: 0 10px; }
  .sq-btn { flex: 1; height: 34px; font-size: 11px; }
  .hazard-strip { display: none; }
  .gb-base { justify-content: center; padding: 8px; }
  .pt-drawer { width: auto; max-width: none; margin: 0 6px; }
  .pt-scatters-grid { grid-template-columns: 1fr; }
  .exp-badge-top { font-size: 7.5px; }
  .exp-badge-bot b { font-size: 10.5px; }
  .exp-badge-bot span { font-size: 7px; }
}
