/* ============================================================================
   MYROSLAV 31-IN-1 — AUTHENTIC NEO-GEO / FAMICOM ARCADE CABINET SYSTEM
   Zero purple AI gradients, zero blurry glow slop, crisp hardware contrast.
   ============================================================================ */

:root {
  color-scheme: dark;

  /* Matte Arcade Cabinet Surfaces */
  --bg-void: #0b0c10;
  --bg-cabinet: #13151d;
  --bg-panel: #191c27;
  --bg-inset: #0e1017;
  --border-subtle: #2c3144;
  --border-strong: #464e6b;

  /* Authentic 16-Bit Hardware Accents */
  --gold: #f5b800;
  --gold-bright: #ffd84d;
  --gold-shade: #8f6300;
  --crimson: #e62937;
  --crimson-shade: #7d111a;
  --cobalt: #2278ff;
  --cobalt-shade: #0e3d8c;
  --emerald: #19c964;
  --emerald-shade: #0b6330;
  --amber: #f5820b;

  /* Text & Contrast (WCAG AA/AAA) */
  --text: #f5f2e8;
  --muted: #a6aec4;
  --ink-dark: #101218;

  /* Typography */
  --font-display: 'Russo One', system-ui, sans-serif;
  --font-pixel: 'Press Start 2P', 'Courier New', monospace;
  --font-body: 'Rubik', system-ui, -apple-system, sans-serif;

  /* Hard-edged Cabinet Shadows */
  --shadow-hard: 0 5px 0 #050608;
  --shadow-btn: 0 4px 0 #050608;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background-color: var(--bg-void);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: var(--ink-dark);
}

/* Global Visible Focus Ring (Web Floor) */
:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 3px;
}

/* ============================================================================
   SUBTLE HARDWARE BACKGROUND (CRISP PERSPECTIVE GRID, NO PURPLE SLOP)
   ============================================================================ */
.arcade-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--bg-void);
}

.retro-grid-floor {
  position: absolute;
  left: -40%;
  right: -40%;
  bottom: -14%;
  height: 46vh;
  background-image:
    linear-gradient(to right, rgba(245, 184, 0, 0.14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 184, 0, 0.16) 1px, transparent 1px);
  background-size: 64px 44px;
  transform: perspective(520px) rotateX(68deg);
  transform-origin: center top;
  animation: gridScroll 4s linear infinite;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,1) 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,1) 100%);
}

@keyframes gridScroll {
  from { background-position: 0 0; }
  to   { background-position: 0 44px; }
}

/* Confetti / Coin FX Canvas */
#fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
}

/* Optional CRT Scanlines */
body.crt-on::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.15) 3px,
    rgba(0, 0, 0, 0.15) 4px
  );
}

/* Screen Shake & Flash FX (Action-driven, never looping) */
body.fx-shake {
  animation: screenShake 0.36s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes screenShake {
  15%, 85% { transform: translate3d(-4px, 0, 0); }
  30%, 70% { transform: translate3d(6px, -2px, 0); }
  45%, 55% { transform: translate3d(-6px, 2px, 0); }
}

.flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  pointer-events: none;
  opacity: 0;
  background: var(--gold-bright);
}

.flash-overlay.fire {
  animation: hitFlash 0.28s ease-out;
}

@keyframes hitFlash {
  0%   { opacity: 0.42; }
  100% { opacity: 0; }
}

/* ============================================================================
   TYPOGRAPHY & BESPOKE PIXEL SVG ICONS
   ============================================================================ */
.pixel {
  font-family: var(--font-pixel);
  letter-spacing: 0.02em;
}

.display-font {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Authentic 16-Bit Stepped Gold Title (No gradient-text slop) */
.arcade-gold-title {
  color: var(--gold-bright);
  text-shadow: 0 3px 0 var(--gold-shade), 0 6px 0 #050608;
}

.px-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  vertical-align: middle;
  fill: currentColor;
  shape-rendering: crispEdges;
}

.px-icon-lg {
  width: 44px;
  height: 44px;
}

.px-icon-xl {
  width: 84px;
  height: 84px;
}

/* ============================================================================
   CABINET SURFACES
   ============================================================================ */
.cabinet-panel {
  background-color: var(--bg-panel);
  border: 3px solid var(--border-subtle);
  border-radius: 6px;
  box-shadow: var(--shadow-hard);
}

/* ============================================================================
   TOP ARCADE HEADER
   ============================================================================ */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background-color: var(--bg-cabinet);
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 4px 0 #050608;
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  text-align: left;
}

.brand-badge {
  background-color: var(--crimson);
  color: #fff;
  padding: 7px 11px;
  font-size: 11px;
  border: 2px solid #fff;
  box-shadow: 3px 3px 0 #050608;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 23px;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 var(--gold-shade), 0 4px 0 #050608;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================================
   COIN-OP TACTILE BUTTONS
   ============================================================================ */
.btn {
  font-family: var(--font-display);
  font-size: 15px;
  padding: 11px 18px;
  min-height: 44px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  background-color: #24293b;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.08s ease, background-color 0.12s ease, border-color 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.2;
}

.btn:hover {
  background-color: #2f364d;
  border-color: var(--gold);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #050608;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-sm { font-size: 13px; padding: 8px 14px; min-height: 38px; }
.btn-lg { font-size: 18px; padding: 15px 26px; min-height: 54px; }

.btn-yellow {
  background-color: var(--gold);
  color: var(--ink-dark);
  border-color: var(--gold-bright);
  box-shadow: 0 4px 0 var(--gold-shade);
}
.btn-yellow:hover { background-color: var(--gold-bright); border-color: #fff; }

.btn-cyan {
  background-color: var(--cobalt);
  color: #fff;
  border-color: #7ab0ff;
  box-shadow: 0 4px 0 var(--cobalt-shade);
}
.btn-cyan:hover { background-color: #3b88ff; border-color: #fff; }

.btn-green {
  background-color: var(--emerald);
  color: var(--ink-dark);
  border-color: #82f0ae;
  box-shadow: 0 4px 0 var(--emerald-shade);
}
.btn-green:hover { background-color: #36de7d; border-color: #fff; }

.btn-red {
  background-color: var(--crimson);
  color: #fff;
  border-color: #ff8c95;
  box-shadow: 0 4px 0 var(--crimson-shade);
}
.btn-red:hover { background-color: #f53b49; border-color: #fff; }

.btn-blue {
  background-color: var(--cobalt);
  color: #fff;
  border-color: #7ab0ff;
  box-shadow: 0 4px 0 var(--cobalt-shade);
}
.btn-blue:hover { background-color: #3b88ff; border-color: #fff; }

.btn-ghost {
  background-color: var(--bg-inset);
  color: var(--muted);
  border-color: var(--border-subtle);
  box-shadow: 0 3px 0 #050608;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); background-color: #181c29; }

/* ============================================================================
   MAIN STAGE & SCREENS
   ============================================================================ */
.main-stage {
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.screen {
  display: none;
  animation: screenIn 0.2s ease-out;
}

.screen.active {
  display: block;
}

@keyframes screenIn {
  from { transform: translateY(8px); }
  to   { transform: translateY(0); }
}

/* ============================================================================
   HOME MARQUEE HEADER & CARTRIDGE SELECTOR
   ============================================================================ */
.hero-marquee {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 22px 28px;
  margin-bottom: 24px;
  background-color: var(--bg-cabinet);
  border: 4px solid var(--gold);
  border-radius: 8px;
  box-shadow: var(--shadow-hard);
}

.hero-marquee h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.15;
}

.hero-meta {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

.hero-coin-counter {
  padding: 10px 16px;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-strong);
  border-radius: 4px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--gold-bright);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 14px;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--text);
}

.section-heading::after {
  content: "";
  flex: 1;
  height: 2px;
  background-color: var(--border-subtle);
}

.cartridge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 16px;
}

/* Real <button> cartridges for full keyboard/remote accessibility */
.cartridge {
  appearance: none;
  font: inherit;
  text-align: left;
  width: 100%;
  background-color: var(--bg-panel);
  border: 3px solid var(--border-subtle);
  border-left: 6px solid var(--cobalt);
  border-radius: 6px;
  padding: 18px 20px;
  cursor: pointer;
  color: var(--text);
  box-shadow: var(--shadow-hard);
  transition: transform 0.1s ease, border-color 0.12s ease, background-color 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cartridge:hover {
  border-color: var(--gold);
  background-color: #202434;
}

.cartridge:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #050608;
}

.cartridge.alco {
  border-left-color: var(--crimson);
}

.cartridge.alco:hover {
  border-color: var(--crimson);
}

.cartridge.bonus {
  border-left-color: var(--amber);
  border-style: dashed;
  border-left-style: solid;
}

.cart-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.cart-num {
  font-size: 11px;
  color: var(--gold);
}

.cart-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 3px;
  background-color: var(--bg-inset);
  border: 1px solid var(--border-strong);
  color: var(--muted);
}

.cart-tag.alco-tag {
  background-color: rgba(230, 41, 55, 0.16);
  border-color: var(--crimson);
  color: #ff9ea5;
}

.cart-head-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-icon-wrap {
  color: var(--gold-bright);
  flex-shrink: 0;
}

.cartridge.alco .cart-icon-wrap {
  color: #ff6b76;
}

.cart-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
  line-height: 1.2;
}

.cart-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.42;
}

/* ============================================================================
   GAME HEADER INSIDE EACH GAME
   ============================================================================ */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 20px;
  border-radius: 6px;
  background-color: var(--bg-cabinet);
  border: 3px solid var(--border-subtle);
  border-left: 6px solid var(--gold);
  box-shadow: var(--shadow-hard);
}

.game-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--gold-bright);
}

/* ============================================================================
   1. PRICE GAME ("СКІЛЬКИ ЦЕ КОШТУЄ?")
   ============================================================================ */
.price-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 960px) {
  .price-stage { grid-template-columns: 1fr; }
}

.product-card {
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.product-cat {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-bright);
  background-color: var(--bg-inset);
  padding: 6px 14px;
  border-radius: 4px;
  border: 2px solid var(--border-strong);
}

.product-icon {
  color: var(--gold);
  padding: 18px;
  background-color: var(--bg-inset);
  border: 3px solid var(--border-subtle);
  border-radius: 8px;
}

.product-name {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
}

.product-hint {
  font-size: 18px;
  color: var(--muted);
}

.price-reveal-box {
  margin-top: 6px;
  padding: 16px 32px;
  border-radius: 6px;
  border: 3px solid var(--gold);
  background-color: var(--bg-inset);
  min-width: 290px;
}

.price-reveal-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.price-reveal-value {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--gold-bright);
}

.price-inputs-panel {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
}

.duel-input-card {
  padding: 16px;
  border-radius: 6px;
  background-color: var(--bg-inset);
  border: 3px solid var(--border-subtle);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.duel-input-card.p1 { border-left: 6px solid var(--crimson); }
.duel-input-card.p2 { border-left: 6px solid var(--cobalt); }
.duel-input-card.winner {
  border-color: var(--emerald);
  background-color: #10261b;
}

.duel-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.arcade-select, .arcade-input {
  background-color: var(--bg-cabinet);
  color: var(--text);
  border: 2px solid var(--border-strong);
  border-radius: 4px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  width: 100%;
  min-height: 46px;
}

.arcade-input:focus-visible, .arcade-select:focus-visible {
  border-color: var(--gold-bright);
}

.price-num-input {
  font-family: var(--font-display);
  font-size: 28px;
  text-align: center;
  color: var(--gold-bright);
  padding: 10px;
}

.price-diff {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  min-height: 22px;
  color: var(--muted);
}

.price-result-banner {
  padding: 14px 16px;
  border-radius: 6px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 19px;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-subtle);
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================================
   2. PEPPA PUZZLE DUEL
   ============================================================================ */
.peppa-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 20px;
}

@media (max-width: 960px) {
  .peppa-grid { grid-template-columns: 1fr; }
}

.peppa-timer-box {
  padding: 26px;
  text-align: center;
}

.big-clock {
  font-size: clamp(44px, 5vw, 66px);
  color: var(--gold-bright);
  text-shadow: 0 4px 0 #050608;
  margin: 16px 0 24px;
}

.peppa-players {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.peppa-player-box {
  padding: 16px;
  border-radius: 6px;
  background-color: var(--bg-inset);
  border: 3px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.peppa-player-box.p1 { border-top: 5px solid var(--crimson); }
.peppa-player-box.p2 { border-top: 5px solid var(--cobalt); }

.peppa-finish-time {
  font-size: 20px;
  color: var(--emerald);
  min-height: 28px;
}

.leaderboard-panel {
  padding: 22px;
}

.leaderboard-list {
  list-style: none;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 4px;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-subtle);
  font-size: 18px;
  font-weight: 700;
}

.leaderboard-row:first-child {
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* ============================================================================
   3. CHRONOLOGY
   ============================================================================ */
.chrono-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chrono-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.chrono-card {
  background-color: var(--bg-inset);
  border: 3px solid var(--border-strong);
  border-radius: 6px;
  padding: 16px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-btn);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, background-color 0.3s ease;
}

.chrono-card.entering {
  animation: chronoCardIn 0.35s ease-out;
}

@keyframes chronoCardIn {
  0%   { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

.chrono-card.revealed {
  border-color: var(--emerald);
  background-color: #10241a;
}

.chrono-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-subtle);
}

.chrono-player-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold-bright);
}

.chrono-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  background-color: var(--bg-inset);
  border: 2px solid var(--gold);
  border-radius: 6px;
}

.chrono-countdown {
  font-family: var(--font-pixel);
  font-size: 26px;
  color: var(--gold-bright);
}

.chrono-countdown.danger {
  color: var(--crimson);
}

@keyframes cardPop {
  0%   { transform: rotateY(80deg); opacity: 0.4; }
  100% { transform: rotateY(0deg); opacity: 1; }
}

.chrono-num {
  font-size: 11px;
  color: var(--muted);
}

.chrono-text {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.chrono-year {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--gold-bright);
  text-align: center;
  padding: 8px;
  border-radius: 4px;
  background-color: var(--bg-cabinet);
  border: 2px solid var(--border-subtle);
}

/* ============================================================================
   4. BLACK BOX (TIMER + HOST HINTS)
   ============================================================================ */
.blackbox-stage {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: 30px;
}

.timer-presets {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.huge-timer {
  font-size: clamp(72px, 9vw, 108px);
  color: var(--gold-bright);
  text-shadow: 0 5px 0 #050608;
  margin: 14px 0 22px;
}

.huge-timer.danger {
  color: var(--crimson);
}

.host-spoiler {
  margin-top: 26px;
  padding: 16px;
  border-radius: 6px;
  background-color: var(--bg-inset);
  border: 2px dashed var(--border-strong);
  text-align: left;
}

.host-spoiler summary {
  cursor: pointer;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--muted);
  padding: 4px 0;
}

.host-spoiler-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.spoiler-chip {
  appearance: none;
  font: inherit;
  text-align: left;
  padding: 10px 12px;
  border-radius: 4px;
  background-color: var(--bg-panel);
  border: 2px solid var(--border-subtle);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}

.spoiler-chip:hover { border-color: var(--gold); }
.spoiler-chip.used { opacity: 0.4; text-decoration: line-through; }

/* ============================================================================
   5. DARTS TOURNAMENT + DARTS SHOT
   ============================================================================ */
.darts-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.darts-duel-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 24px;
}

@media (max-width: 820px) {
  .darts-duel-box { grid-template-columns: 1fr; }
}

.dart-side {
  padding: 20px;
  border-radius: 6px;
  background-color: var(--bg-inset);
  border: 3px solid var(--border-subtle);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dart-side.red-dart { border-top: 6px solid var(--crimson); }
.dart-side.blue-dart { border-top: 6px solid var(--cobalt); }

.dart-score-big {
  font-family: var(--font-display);
  font-size: 64px;
  margin: 4px 0;
}

.dart-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.bracket-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .bracket-grid { grid-template-columns: 1fr; }
}

.bracket-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-around;
}

.bracket-col-title {
  text-align: center;
  color: var(--gold);
  font-size: 12px;
  margin-bottom: 4px;
}

.match-card {
  background-color: var(--bg-inset);
  border: 2px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-player {
  appearance: none;
  font: inherit;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 4px;
  background-color: var(--bg-panel);
  color: var(--text);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}

.match-player:hover { border-color: var(--gold); }
.match-player.advancing {
  border-color: var(--emerald);
  color: var(--emerald);
  background-color: #10241a;
}

/* ============================================================================
   6. ALCO SLOTS 777 — HARDWARE CABINET MACHINE
   ============================================================================ */
.roster-bar {
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.roster-chip {
  padding: 8px 14px;
  min-height: 40px;
  border-radius: 4px;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-subtle);
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.roster-chip.active {
  background-color: var(--crimson);
  border-color: #ff8c95;
  color: #fff;
}

/* ============================================================================
   6. ALCO SLOTS 777 — POLISHED VEGAS GOLD-BRONZE CABINET + SIDE LEVER
   ============================================================================ */
.slot-cabinet-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 1120px;
  margin: 0 auto;
}

.slot-machine {
  flex: 1;
  min-width: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #3a230b 0%, #241507 18%, #16100b 100%);
  border: 6px solid var(--gold);
  box-shadow:
    inset 0 0 0 4px #6b4508,
    0 10px 0 #050608;
  overflow: hidden;
  position: relative;
}

.slot-crown {
  padding: 16px 24px 18px;
  background: linear-gradient(180deg, #4f2f0d 0%, #291707 100%);
  border-bottom: 4px solid var(--gold);
  text-align: center;
}

.slot-crown-title {
  font-size: 32px;
  letter-spacing: 0.06em;
}

.slot-marquee-bulbs {
  display: flex;
  justify-content: space-between;
  padding: 0 6px 12px;
}

.slot-bulb {
  width: 22px;
  height: 10px;
  border-radius: 2px;
  background-color: var(--gold-bright);
  border: 2px solid #8c5a00;
}

.slot-bulb:nth-child(even) {
  background-color: var(--crimson);
  border-color: var(--crimson-shade);
}

.slot-machine.is-spinning .slot-bulb {
  animation: slotBulbBlink 0.28s steps(2, start) infinite;
}

.slot-machine.is-spinning .slot-bulb:nth-child(even) {
  animation-delay: 0.14s;
}

@keyframes slotBulbBlink {
  0%   { opacity: 1; }
  100% { opacity: 0.25; }
}

.slot-reels-housing {
  padding: 20px 26px 24px;
  background-color: #0f0b08;
}

.slot-col-headers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  text-align: center;
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--gold-bright);
}

.slot-window-frame {
  position: relative;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #b88114 0%, #f5b800 50%, #8c5d06 100%);
  box-shadow: inset 0 3px 0 #fff0a6, 0 6px 0 #050608;
}

/* Red triangular payline pointers on left & right edges (no line over faces!) */
.slot-pointer-left,
.slot-pointer-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  z-index: 12;
  pointer-events: none;
}

.slot-pointer-left {
  left: -4px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 22px solid var(--crimson);
}

.slot-pointer-right {
  right: -4px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-right: 22px solid var(--crimson);
}

.slot-reels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background-color: #090705;
  padding: 6px;
  border-radius: 6px;
}

@media (max-width: 880px) {
  .slot-reels, .slot-col-headers { grid-template-columns: 1fr; }
}

/* Cylindrical Drum Viewport (260px tall -> 160px center cell + 50px top/bottom neighbor peeks) */
.reel-viewport {
  position: relative;
  height: 260px;
  overflow: hidden;
  border: 3px solid #5c3d08;
  border-radius: 4px;
  background-color: #1c1914;
}

/* Realistic Cylindrical Drum Shading (dark top/bottom, bright center) */
.reel-viewport::before,
.reel-viewport::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 68px;
  pointer-events: none;
  z-index: 8;
}

.reel-viewport::before {
  top: 0;
  background: linear-gradient(180deg, rgba(10, 7, 4, 0.94) 0%, rgba(10, 7, 4, 0.52) 55%, transparent 100%);
}

.reel-viewport::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(10, 7, 4, 0.94) 0%, rgba(10, 7, 4, 0.52) 55%, transparent 100%);
}

.reel-viewport.landed {
  border-color: var(--emerald);
}

.reel-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  will-change: transform;
}

/* Warm Cream-Gold Drum Cells (classic Vegas reel contrast!) */
.slot-cell {
  height: 160px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 2px solid #3d2e17;
  background: linear-gradient(180deg, #272118 0%, #332a1d 50%, #272118 100%);
}

.slot-cell:nth-child(even) {
  background: linear-gradient(180deg, #211b13 0%, #2b2318 50%, #211b13 100%);
}

.slot-cell-badge {
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 3px;
  background-color: var(--crimson);
  color: #fff;
  border: 2px solid #ff8c95;
}

.slot-cell-badge.gold-badge {
  background-color: var(--gold);
  color: var(--ink-dark);
  border-color: var(--gold-bright);
}

.slot-cell-text {
  font-size: 20px;
  font-weight: 800;
  color: #fff6db;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 2px 0 #090705;
}

.slot-cell-avatar {
  width: 88px;
  height: 88px;
  border-radius: 4px;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 3px 0 #090705;
  image-rendering: pixelated;
}

/* Bottom Hardware Deck (Coin Slot + Speaker Grill) */
.slot-bottom-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 24px;
  background: linear-gradient(180deg, #26180a 0%, #140d06 100%);
  border-top: 4px solid #6b4508;
}

.slot-coin-plate {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background-color: #0d0a07;
  border: 2px solid #6b4508;
  border-radius: 4px;
}

.coin-slit {
  display: inline-block;
  width: 6px;
  height: 22px;
  background-color: #000;
  border: 2px solid var(--gold-shade);
  border-radius: 2px;
}

.slot-deck-hint {
  font-size: 11px;
  color: var(--gold-bright);
}

.slot-tray-grill {
  width: 96px;
  height: 24px;
  border-radius: 3px;
  border: 2px solid #5c3d08;
  background: repeating-linear-gradient(
    90deg,
    #0a0806 0px,
    #0a0806 6px,
    #3b2810 6px,
    #3b2810 10px
  );
}

/* ============================================================================
   ONE-ARMED BANDIT SIDE LEVER (CLICK OR DRAG DOWN TO PULL!)
   ============================================================================ */
.slot-lever-mount {
  position: relative;
  width: 88px;
  height: 320px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

@media (max-width: 880px) {
  .slot-cabinet-wrap { flex-direction: column; gap: 16px; }
  .slot-lever-mount { height: 120px; width: 100%; justify-content: center; }
}

.lever-housing {
  width: 34px;
  height: 108px;
  background: linear-gradient(180deg, #b88114 0%, #f5b800 45%, #6b4508 100%);
  border: 3px solid #3a230b;
  border-left: none;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 6px 0 #050608;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lever-bolt {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background-color: #241507;
  border: 2px solid #ffe484;
}

.slot-lever-btn {
  appearance: none;
  background: transparent;
  border: none;
  cursor: grab;
  position: absolute;
  left: 18px;
  top: 50%;
  width: 64px;
  height: 270px;
  transform: translateY(-50%);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slot-lever-btn:active {
  cursor: grabbing;
}

.lever-arm {
  position: absolute;
  bottom: 128px;
  left: 50%;
  width: 16px;
  height: 132px;
  margin-left: -8px;
  background: linear-gradient(90deg, #8b95ad 0%, #eef2fa 45%, #6b748a 100%);
  border: 2px solid #2b3040;
  border-radius: 8px;
  transform-origin: center bottom;
  transition: transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lever-knob {
  position: absolute;
  top: -36px;
  left: 50%;
  width: 54px;
  height: 54px;
  margin-left: -27px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ff8c95 0%, #e62937 45%, #7d111a 100%);
  border: 3px solid #3b080d;
  box-shadow: 0 5px 0 #050608;
}

.slot-lever-btn.pulled .lever-arm {
  transform: scaleY(-0.84);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.lever-hint-label {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--gold-bright);
  white-space: nowrap;
}

/* ============================================================================
   7. CROCODILE ROULETTE
   ============================================================================ */
.croc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .croc-layout { grid-template-columns: 1fr; }
}

.croc-card {
  padding: 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.croc-topic-box {
  width: 100%;
  padding: 20px;
  border-radius: 6px;
  background-color: var(--bg-inset);
  border: 3px solid var(--emerald);
  font-size: 26px;
  font-weight: 800;
  color: var(--gold-bright);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.victim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.victim-btn {
  padding: 12px 14px;
  min-height: 48px;
  border-radius: 6px;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-subtle);
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
}

.victim-btn:hover { border-color: var(--crimson); }

.bite-badge {
  background-color: var(--crimson);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-pixel);
  font-size: 12px;
}

/* ============================================================================
   8. HIGHER / LOWER (CARDS)
   ============================================================================ */
.hl-stage {
  max-width: 860px;
  margin: 0 auto;
  padding: 26px;
  text-align: center;
}

.playing-card {
  width: 210px;
  height: 290px;
  margin: 18px auto;
  background-color: #f8f6f0;
  color: #14161f;
  border: 4px solid var(--gold);
  box-shadow: 0 8px 0 #050608;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border-radius: 10px;
}

.playing-card.flip-anim {
  animation: cardFlip 0.3s ease-out;
}

@keyframes cardFlip {
  0%   { transform: rotateY(85deg); }
  100% { transform: rotateY(0deg); }
}

.playing-card.red-suit { color: #c81928; }

.card-corner {
  font-family: var(--font-display);
  font-size: 30px;
  text-align: left;
}

.card-corner.bottom {
  text-align: right;
  transform: rotate(180deg);
}

.card-center-suit {
  font-size: 78px;
  line-height: 1;
}

.hl-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 14px 0;
  flex-wrap: wrap;
}

.stat-pill {
  padding: 10px 18px;
  border-radius: 6px;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-subtle);
  font-size: 18px;
  font-weight: 700;
}

/* ============================================================================
   9-11. BONUS GAMES
   ============================================================================ */
.center-card-stage {
  max-width: 840px;
  margin: 0 auto;
  padding: 30px;
  text-align: center;
}

.big-word-display {
  padding: 36px 24px;
  margin: 20px 0;
  border-radius: 6px;
  background-color: var(--bg-inset);
  border: 3px solid var(--gold);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================================
   BOTTOM ARCADE TICKER BAR
   ============================================================================ */
.arcade-ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background-color: var(--bg-cabinet);
  border-top: 2px solid var(--border-strong);
  padding: 9px 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--gold);
  padding-left: 100%;
  animation: tickerScroll 30s linear infinite;
}

@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ============================================================================
   PARTY SCREENSAVER OVERLAY ("РЕЖИМ ЗАСТІЛЛЯ")
   ============================================================================ */
.screensaver-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--bg-void);
  z-index: 500;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
}

.screensaver-overlay.active { display: flex; }

.screensaver-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.2;
  margin: 22px 0 16px;
}

.screensaver-sub {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 34px;
}

/* ============================================================================
   NATIVE <dialog> SCOREBOARD MODAL
   ============================================================================ */
dialog.scoreboard-dialog {
  margin: auto;
  width: min(780px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px;
  background-color: var(--bg-panel);
  color: var(--text);
  border: 4px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 10px 0 #050608;
}

dialog.scoreboard-dialog::backdrop {
  background: rgba(5, 6, 10, 0.85);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 4px;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-subtle);
  gap: 10px;
}

.score-row:first-child {
  border-color: var(--gold);
}

.score-name { font-size: 18px; font-weight: 700; }
.score-controls { display: flex; align-items: center; gap: 10px; }
.score-val {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--gold-bright);
  min-width: 38px;
  text-align: center;
}

/* Helpers */
.flex-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.flex-center { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--muted); }
.text-yellow { color: var(--gold-bright); }
.text-cyan { color: #7ab0ff; }
.text-green { color: var(--emerald); }
.text-red { color: #ff6b76; }

/* ============================================================================
   MORTAL KOMBAT 16-BIT FIGHTER PORTRAITS & ROSTER STRIP
   ============================================================================ */
.fighter-roster-strip {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}

@media (max-width: 1100px) {
  .fighter-roster-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .fighter-roster-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.fighter-tile {
  appearance: none;
  font: inherit;
  background-color: var(--bg-cabinet);
  border: 3px solid var(--border-subtle);
  border-radius: 4px;
  padding: 5px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  box-shadow: 0 3px 0 #050608;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.fighter-tile:hover {
  border-color: var(--gold);
  background-color: #202434;
}

.fighter-tile-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border: 2px solid var(--border-strong);
  border-radius: 2px;
  image-rendering: pixelated;
}

.fighter-tile-name {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fighter-tile-pts {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--gold);
}

.duel-avatar {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 3px 0 #050608;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.duel-avatar-lg {
  width: 108px;
  height: 108px;
  border-radius: 6px;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 4px 0 #050608;
  image-rendering: pixelated;
  margin: 0 auto;
}

.avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  image-rendering: pixelated;
  flex-shrink: 0;
}

.avatar-xs {
  width: 26px;
  height: 26px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  image-rendering: pixelated;
  flex-shrink: 0;
}

.roster-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.score-player-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Interactive Fighter Picker Trigger Button */
.fighter-pick-btn {
  appearance: none;
  font: inherit;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background-color: var(--bg-cabinet);
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 3px 0 #050608;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.fighter-pick-btn:hover {
  border-color: var(--gold);
  background-color: #202434;
}

.fighter-pick-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fighter-pick-name {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
}

.fighter-pick-hint {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

/* Fighter Picker Modal Grid (2 rows x 5 cols on TV) */
.picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 720px) {
  .picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.picker-tile {
  appearance: none;
  font: inherit;
  background-color: var(--bg-inset);
  border: 3px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 0 #050608;
}

.picker-tile:hover {
  border-color: var(--gold);
  background-color: #202434;
}

.picker-tile.selected {
  border-color: var(--emerald);
  background-color: #10241a;
}

.picker-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--border-strong);
  image-rendering: pixelated;
}

.picker-tile-name {
  font-family: var(--font-display);
  font-size: 16px;
}

.champion-showcase {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  padding: 14px 24px;
  background-color: var(--bg-inset);
  border: 3px solid var(--gold);
  border-radius: 6px;
}

/* ============================================================================
   PRICE GAME SETUP & LIVE DUEL SCORE BAR
   ============================================================================ */
.price-setup-box {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px;
  text-align: center;
}

.price-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin: 24px 0 28px;
}

@media (max-width: 720px) {
  .price-setup-grid { grid-template-columns: 1fr; }
}

.duel-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: var(--bg-cabinet);
  border: 2px solid var(--gold);
  border-radius: 4px;
}

.duel-score-num {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--gold-bright);
  min-width: 28px;
  text-align: center;
}

.score-mini-btn {
  appearance: none;
  font-family: var(--font-pixel);
  font-size: 12px;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  border: 2px solid var(--border-strong);
  background-color: var(--bg-panel);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.score-mini-btn:hover { border-color: var(--gold); }
.score-mini-btn.minus:hover { border-color: var(--crimson); color: #ff8c95; }

/* ============================================================================
   UNIFIED ARCADE SCORE +1 (1-UP) & -1 (FIGHTER DAMAGE HIT) ANIMATIONS
   ============================================================================ */
.fx-score-anchor {
  position: relative;
}

.fx-float-delta {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  font-family: var(--font-pixel);
  font-size: 22px;
  pointer-events: none;
  z-index: 60;
  white-space: nowrap;
  text-shadow: 0 3px 0 #050608;
  animation: floatDeltaUp 0.9s ease-out forwards;
}

.fx-float-delta.gain {
  color: var(--emerald);
}

.fx-float-delta.loss {
  color: var(--crimson);
}

@keyframes floatDeltaUp {
  0%   { opacity: 1; transform: translate(-50%, 0); }
  75%  { opacity: 1; transform: translate(-50%, -34px); }
  100% { opacity: 0; transform: translate(-50%, -48px); }
}

/* 16-bit Arcade Damage Blink + Hit Knockback Shake */
.fx-hit-damage {
  animation: fighterDamageHit 0.48s steps(2, end);
}

@keyframes fighterDamageHit {
  0%   { background-color: #5c0f16; border-color: var(--crimson); transform: translateX(-6px); }
  20%  { background-color: var(--bg-inset); border-color: var(--crimson); transform: translateX(6px); }
  40%  { background-color: #6b1119; border-color: #ff6b76; transform: translateX(-5px); }
  60%  { background-color: var(--bg-inset); border-color: var(--crimson); transform: translateX(4px); }
  80%  { background-color: #5c0f16; border-color: var(--crimson); transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

.fx-hit-damage img {
  filter: sepia(1) saturate(6) hue-rotate(-50deg) brightness(1.05);
}

/* 16-bit Arcade Point Gain Flash */
.fx-score-gain {
  animation: fighterScoreGain 0.45s ease-out;
}

@keyframes fighterScoreGain {
  0%   { border-color: var(--emerald); background-color: #123322; transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

/* ============================================================================
   REDUCED MOTION SUPPORT (Web Floor)
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  .retro-grid-floor,
  .ticker-track,
  .screen,
  .chrono-card.revealed,
  .playing-card.flip-anim,
  .reel.landed,
  body.fx-shake,
  .flash-overlay.fire,
  .fx-float-delta,
  .fx-hit-damage,
  .fx-score-gain {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================================
   TV EDITION — uniform scale for living-room TV (set by JS: --tv-scale)
   Logical canvas ≈ 1500 × 880, zoomed to fit the real screen.
   ============================================================================ */
.top-bar,
.main-stage,
.arcade-ticker,
dialog.scoreboard-dialog {
  zoom: var(--tv-scale, 1);
}

.main-stage {
  max-width: 1560px;
  padding: 18px 22px 24px;
}

/* The scrolling ticker only ate TV space */
.arcade-ticker { display: none; }

/* Photos are real portraits: smooth downscaling, not nearest-neighbour noise */
.fighter-tile-img, .duel-avatar, .duel-avatar-lg, .avatar-sm, .avatar-xs,
.picker-tile img, .slot-cell-avatar img, .slot-cell-avatar {
  image-rendering: auto;
}

/* ---------- HOME: marquee + roster ---------- */
.home-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 16px;
}

.home-marquee {
  padding: 14px 24px 16px;
  background-color: var(--bg-cabinet);
  border: 4px solid var(--gold);
  border-radius: 8px;
  box-shadow: var(--shadow-hard);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 400px;
}

.home-kicker {
  font-size: 11px;
  color: var(--crimson);
  margin-bottom: 8px;
}

.home-title {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1.05;
  white-space: nowrap;
}

.home-lvl {
  display: inline-block;
  color: var(--ink-dark);
  background-color: var(--gold);
  text-shadow: none;
  padding: 2px 10px 4px;
  margin-left: 6px;
  box-shadow: 0 4px 0 var(--gold-shade), 0 8px 0 #050608;
  animation: lvlBlink 2.4s steps(1) infinite;
}

@keyframes lvlBlink {
  0%, 88% { background-color: var(--gold); }
  89%, 100% { background-color: var(--gold-bright); }
}

.home-sub {
  margin-top: 10px;
  font-size: 17px;
  color: var(--muted);
}

.home-roster {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.home-roster .fighter-tile {
  padding: 6px 5px 7px;
  gap: 4px;
  justify-content: flex-start;
  position: relative;
}

.home-roster .fighter-tile-name { font-size: 15px; }
.home-roster .fighter-tile-pts { font-size: 11px; }

.home-roster .fighter-tile.leader {
  border-color: var(--gold);
}

.home-roster .fighter-tile.leader::before {
  content: "1UP";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-pixel);
  font-size: 9px;
  padding: 3px 5px;
  background-color: var(--gold);
  color: var(--ink-dark);
  box-shadow: 0 2px 0 #050608;
}

/* ---------- HOME: 4-column cartridge board ---------- */
.cart-board {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.cart-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-col-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
  padding: 2px 2px 4px;
  border-bottom: 3px solid var(--cobalt);
}

.cart-col.alco .cart-col-head { border-bottom-color: var(--crimson); }
.cart-col.bonus .cart-col-head { border-bottom-color: var(--amber); }

.cart-col-key {
  font-size: 11px;
  color: var(--ink-dark);
  background-color: var(--cobalt);
  padding: 5px 7px;
  box-shadow: 0 2px 0 #050608;
}
.cart-col.alco .cart-col-key { background-color: var(--crimson); color: #fff; }
.cart-col.bonus .cart-col-key { background-color: var(--amber); }

.cart-board .cartridge {
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-areas:
    "icon tag"
    "icon title"
    "icon desc";
  column-gap: 14px;
  row-gap: 3px;
  align-items: center;
  align-content: center;
  padding: 10px 14px 11px 12px;
}

.cart-board .cart-icon-wrap {
  grid-area: icon;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-strong);
  border-radius: 4px;
}

.cart-board .cart-icon-wrap .px-icon { width: 36px; height: 36px; }
.cart-board .cart-title { grid-area: title; font-size: 21px; }
.cart-board .cart-tag   {
  grid-area: tag;
  justify-self: start;
  font-size: 11px;
  padding: 1px 7px;
  white-space: nowrap;
}
.cart-board .cart-desc  { grid-area: desc; font-size: 15px; line-height: 1.3; }

.cart-board .cartridge:hover .cart-icon-wrap { border-color: var(--gold); }

/* ============================================================================
   ATTRACT MODE — the TV loop shown between games (vh-based, no zoom)
   ============================================================================ */
.attract {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  flex-direction: column;
  background-color: var(--bg-void);
  background-image:
    linear-gradient(rgba(34, 120, 255, 0.07) 2px, transparent 2px),
    linear-gradient(90deg, rgba(34, 120, 255, 0.07) 2px, transparent 2px);
  background-size: 6vh 6vh;
  cursor: pointer;
  color: var(--text);
}

.attract.active { display: flex; }

.attract-topline,
.attract-bottom {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.4vh 4vw;
}

.attract-brand { font-size: 1.6vh; color: var(--crimson); }
.attract-clock { font-size: 2.4vh; color: var(--gold-bright); }

.attract-dots { display: flex; gap: 1vh; }
.attract-dots i {
  width: 1.2vh;
  height: 1.2vh;
  background-color: var(--border-strong);
}
.attract-dots i.on { background-color: var(--gold); }

.attract-bottom {
  justify-content: center;
  font-size: 1.5vh;
  color: var(--muted);
  animation: qBlink 1.4s steps(1) infinite;
}

.attract-slide {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5vw;
  min-height: 0;
}

.attract-slide > * { animation: slideIn 0.5s steps(6) both; }

/* transform only: content must never stay invisible if a frame is skipped */
@keyframes slideIn {
  from { transform: translateY(4vh); }
  to   { transform: translateY(0); }
}

/* Slide: title */
.as-title { text-align: center; }
.as-title .as-kicker { font-size: 2vh; color: var(--crimson); margin-bottom: 3vh; }
.as-title h2 {
  font-family: var(--font-display);
  font-size: 13vh;
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 1vh 0 var(--gold-shade), 0 2vh 0 #050608;
}
.as-title .as-lvl {
  display: inline-block;
  margin-top: 4vh;
  font-family: var(--font-pixel);
  font-size: 4vh;
  color: var(--ink-dark);
  background-color: var(--gold);
  padding: 1.6vh 2.4vh;
  box-shadow: 0 0.8vh 0 var(--gold-shade), 0 1.6vh 0 #050608;
}
.as-title .as-wish {
  margin-top: 5vh;
  font-family: var(--font-display);
  font-size: 4.4vh;
}
.as-title .as-coin {
  margin-top: 4vh;
  font-size: 2.2vh;
  color: var(--gold);
  animation: qBlink 1s steps(1) infinite;
}

/* Slide: leaderboard */
.as-board { width: min(150vh, 100%); }
.as-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 3vh;
}
.as-head h2 {
  font-family: var(--font-display);
  font-size: 6vh;
  color: var(--gold-bright);
  text-shadow: 0 0.6vh 0 var(--gold-shade), 0 1.2vh 0 #050608;
}
.as-head span { font-size: 1.8vh; color: var(--muted); }

.as-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4vh 3vh; }
.as-row {
  display: grid;
  grid-template-columns: 5vh 8vh 1fr 9vh;
  align-items: center;
  gap: 2vh;
  padding: 1vh 2vh 1vh 1vh;
  background-color: var(--bg-panel);
  border: 0.4vh solid var(--border-subtle);
  border-radius: 0.6vh;
  box-shadow: 0 0.6vh 0 #050608;
}
.as-row.top1 { border-color: var(--gold); }
.as-row.top2 { border-color: #c9d1e6; }
.as-row.top3 { border-color: #c77b3a; }
.as-rank { font-family: var(--font-pixel); font-size: 2.2vh; color: var(--muted); text-align: center; }
.as-row.top1 .as-rank { color: var(--gold); }
.as-row img { width: 8vh; height: 8vh; object-fit: cover; border-radius: 0.4vh; border: 0.3vh solid var(--border-strong); }
.as-name { font-family: var(--font-display); font-size: 3.4vh; }
.as-bar { height: 1.2vh; margin-top: 0.8vh; background-color: var(--bg-inset); }
.as-bar i { display: block; height: 100%; background-color: var(--gold); }
.as-pts { font-family: var(--font-display); font-size: 4.4vh; color: var(--gold-bright); text-align: right; }

/* Slide: fighter card */
.as-fighter {
  display: grid;
  grid-template-columns: 52vh 1fr;
  gap: 6vh;
  align-items: center;
  width: min(150vh, 100%);
}
.as-portrait {
  position: relative;
  border: 0.8vh solid var(--gold);
  box-shadow: 1.4vh 1.4vh 0 #050608;
  background-color: var(--bg-panel);
}
.as-portrait img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.as-portrait .as-p-tag {
  position: absolute;
  left: -0.8vh;
  bottom: -0.8vh;
  font-family: var(--font-pixel);
  font-size: 1.8vh;
  padding: 1.2vh 1.6vh;
  background-color: var(--crimson);
  color: #fff;
}
.as-f-kicker { font-size: 2vh; color: var(--crimson); margin-bottom: 2vh; }
.as-f-name {
  font-family: var(--font-display);
  font-size: 11vh;
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 0.8vh 0 var(--gold-shade), 0 1.6vh 0 #050608;
}
.as-f-role { font-size: 3.4vh; color: var(--muted); margin: 2vh 0 4vh; }
.as-stat { margin-bottom: 2.4vh; }
.as-stat-top {
  display: flex;
  justify-content: space-between;
  font-size: 2.8vh;
  margin-bottom: 1vh;
}
.as-stat-top b { font-family: var(--font-pixel); font-size: 2.2vh; color: var(--gold-bright); }
.as-stat-bar {
  height: 2.4vh;
  background-color: var(--bg-inset);
  border: 0.3vh solid var(--border-strong);
}
.as-stat-bar i {
  display: block;
  height: 100%;
  background-image: repeating-linear-gradient(90deg, var(--gold) 0 2.2vh, transparent 2.2vh 2.6vh);
  animation: barFill 1.2s steps(12) both;
}
@keyframes barFill { from { width: 0; } }
.as-f-live {
  margin-top: 3vh;
  display: flex;
  gap: 2vh;
  flex-wrap: wrap;
}
.as-chip {
  font-family: var(--font-pixel);
  font-size: 1.7vh;
  padding: 1.2vh 1.6vh;
  background-color: var(--bg-panel);
  border: 0.3vh solid var(--border-strong);
  color: var(--text);
}
.as-chip b { color: var(--gold-bright); }

/* Slide: records */
.as-records { width: min(150vh, 100%); }
.as-rec-grid { display: flex; justify-content: center; gap: 3vh; }
.as-rec-grid .as-rec { flex: 0 1 46vh; }
.as-rec {
  padding: 3vh;
  background-color: var(--bg-panel);
  border: 0.4vh solid var(--border-subtle);
  border-top: 1vh solid var(--cobalt);
  box-shadow: 0 0.8vh 0 #050608;
  text-align: center;
}
.as-rec.red { border-top-color: var(--crimson); }
.as-rec.gold { border-top-color: var(--gold); }
.as-rec-label { font-size: 1.7vh; color: var(--muted); margin-bottom: 2.4vh; }
.as-rec img { width: 16vh; height: 16vh; object-fit: cover; border: 0.4vh solid var(--border-strong); }
.as-rec-name { font-family: var(--font-display); font-size: 4vh; margin-top: 2vh; }
.as-rec-val { font-family: var(--font-display); font-size: 5vh; color: var(--gold-bright); margin-top: 1vh; }
.as-rec-empty { font-size: 3vh; color: var(--muted); padding: 6vh 0; }

/* ============================================================================
   VERSUS SPLASH
   ============================================================================ */
.versus {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: none;
  overflow: hidden;
  background-color: #050608;
}
.versus.active { display: block; }

.vs-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3vh;
}
.vs-left  { left: 0;  background-color: var(--crimson-shade); border-right: 0.6vh solid #050608; }
.vs-right { right: 0; background-color: var(--cobalt-shade);  border-left: 0.6vh solid #050608; }
.versus.active .vs-left  { animation: vsInLeft 0.45s steps(5) both; }
.versus.active .vs-right { animation: vsInRight 0.45s steps(5) both; }

@keyframes vsInLeft  { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes vsInRight { from { transform: translateX(100%); }  to { transform: none; } }

.vs-half img {
  width: 44vh;
  height: 44vh;
  object-fit: cover;
  border: 1vh solid #fff;
  box-shadow: 1.6vh 1.6vh 0 #050608;
}
.vs-name {
  font-family: var(--font-display);
  font-size: 9vh;
  color: #fff;
  text-shadow: 0 0.8vh 0 #050608;
}
.vs-tag { font-size: 2vh; color: rgba(255, 255, 255, 0.75); }

.vs-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.vs-game {
  position: absolute;
  top: 6vh;
  font-size: 2.6vh;
  color: var(--gold-bright);
  background-color: #050608;
  padding: 1.6vh 2.4vh;
}
.vs-mark {
  font-family: var(--font-display);
  font-size: 26vh;
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 1.4vh 0 var(--gold-shade), 0 2.8vh 0 #050608;
}
.versus.active .vs-mark { animation: vsSlam 0.35s 0.4s steps(4) both; }
@keyframes vsSlam { from { transform: scale(3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.vs-count {
  position: absolute;
  bottom: 7vh;
  font-family: var(--font-pixel);
  font-size: 9vh;
  color: #fff;
  text-shadow: 0 0.8vh 0 #050608;
}

/* ============================================================================
   FINALE — GAME OVER, AWARDS, CREDITS
   ============================================================================ */
.finale {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-void);
  cursor: pointer;
  color: var(--text);
  overflow: hidden;
}
.finale.active { display: flex; }

.finale-stage {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4vh 6vw;
}
.finale-stage > * { animation: slideIn 0.5s steps(6) both; }

.finale-hint {
  padding: 2.4vh;
  font-size: 1.5vh;
  color: var(--muted);
}

.fn-over {
  font-family: var(--font-pixel);
  font-size: 12vh;
  line-height: 1.2;
  color: var(--crimson);
  text-shadow: 0 1vh 0 var(--crimson-shade), 0 2vh 0 #050608;
}
.fn-sub { margin-top: 5vh; font-family: var(--font-display); font-size: 5vh; }
.fn-sub2 { margin-top: 3vh; font-size: 2.2vh; color: var(--gold); }

.fn-award { display: flex; flex-direction: column; align-items: center; gap: 2.6vh; }
.fn-award-kicker { font-size: 2.2vh; color: var(--muted); }
.fn-award-title {
  font-family: var(--font-display);
  font-size: 8vh;
  color: var(--gold-bright);
  text-shadow: 0 0.8vh 0 var(--gold-shade), 0 1.6vh 0 #050608;
  line-height: 1.05;
}
.fn-award img {
  width: 40vh;
  height: 40vh;
  object-fit: cover;
  border: 1vh solid var(--gold);
  box-shadow: 1.6vh 1.6vh 0 #050608;
}
.fn-award-name { font-family: var(--font-display); font-size: 7vh; }
.fn-award-why { font-size: 3vh; color: var(--muted); max-width: 90vh; }

.fn-credits { width: 100%; height: 100%; overflow: hidden; position: relative; }
.fn-credits-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  animation: creditsRoll 34s linear forwards;
}
@keyframes creditsRoll { to { transform: translateY(calc(-100% - 90vh)); } }
.fn-cr-block { margin-bottom: 9vh; }
.fn-cr-role { font-size: 2vh; color: var(--gold); margin-bottom: 1.6vh; }
.fn-cr-name { font-family: var(--font-display); font-size: 5vh; }
.fn-cr-big {
  font-family: var(--font-display);
  font-size: 9vh;
  color: var(--gold-bright);
  text-shadow: 0 0.8vh 0 var(--gold-shade), 0 1.6vh 0 #050608;
}
.fn-cr-faces { display: flex; justify-content: center; gap: 2vh; flex-wrap: wrap; margin-top: 4vh; }
.fn-cr-faces img { width: 13vh; height: 13vh; object-fit: cover; border: 0.5vh solid var(--border-strong); }

@media (prefers-reduced-motion: reduce) {
  .home-lvl, .attract-bottom, .as-title .as-coin,
  .attract-slide > *, .finale-stage > *, .as-stat-bar i,
  .versus.active .vs-left, .versus.active .vs-right, .versus.active .vs-mark {
    animation: none !important;
  }
  .fn-credits-track { animation-duration: 0.01s; }
}

/* Chronology setup: all 10 players in one row so the start button stays on screen */
#chrono-player-picker { grid-template-columns: repeat(9, minmax(0, 1fr)); }

/* ============================================================================
   PRICE GAME — lamp bank layout
   ============================================================================ */
.price-setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 560px;
  gap: 20px;
  align-items: start;
}

.price-setup-layout .price-setup-box { margin: 0; }

.price-rules {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 4px 0 18px;
  font-size: 16px;
  color: var(--muted);
}
.price-rules b { font-family: var(--font-display); color: var(--gold-bright); font-size: 20px; }

.price-stage {
  grid-template-columns: 400px minmax(0, 1fr) minmax(0, 0.95fr);
}

.price-bank-panel { padding: 14px 16px 16px; }

.price-bank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  min-height: 30px;
}
.price-bank-head .pixel { font-size: 11px; }

.price-bank { display: flex; flex-direction: column; gap: 6px; }

.pb-row {
  display: grid;
  grid-template-columns: 26px 128px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-subtle);
  border-radius: 4px;
}
.pb-row.played .pb-title, .pb-row.played .pb-icon { opacity: 0.4; }
.pb-icon { color: var(--gold); display: grid; place-items: center; }
.pb-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pb-lamps { display: flex; flex-wrap: wrap; gap: 5px; }

.pb-lamp {
  width: 18px;
  height: 18px;
  border: 2px solid #050608;
  box-shadow: 0 2px 0 #050608;
}
.pb-lamp.on {
  background-color: var(--gold);
  box-shadow: inset -3px -3px 0 var(--gold-shade), inset 3px 3px 0 var(--gold-bright), 0 2px 0 #050608;
}
.pb-lamp.off { background-color: #1d202c; border-color: #2a2e3d; box-shadow: none; }
.pb-lamp.flicker {
  background-color: #fff;
  box-shadow: inset -3px -3px 0 #c9d1e6, 0 0 0 2px var(--gold-bright);
}
.pb-lamp.current {
  background-color: var(--crimson);
  border-color: #fff;
  box-shadow: none;
  animation: lampBlink 0.5s steps(1) infinite;
}
@keyframes lampBlink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0.35; } }

.price-setup-layout .pb-row { grid-template-columns: 28px 150px 1fr; padding: 8px 10px; }
.price-setup-layout .pb-title { font-size: 15px; }
.price-setup-layout .pb-lamp { width: 22px; height: 22px; }

.product-card { padding: 22px; gap: 12px; }
.product-name { font-size: 28px; }
.product-card.lot-in > * { animation: slideIn 0.35s steps(5) both; }

.price-source {
  min-height: 20px;
  font-size: 14px;
  color: var(--muted);
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .pb-lamp.current, .product-card.lot-in > * { animation: none !important; }
}

/* ============================================================================
   CHRONOLOGY — setup + full-screen show (vh-based)
   ============================================================================ */
.chrono-setup { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }

.chrono-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chrono-how-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 16px;
  line-height: 1.35;
}
.chrono-how-step b {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--ink-dark);
  background-color: var(--gold);
  padding: 6px 8px;
}
.chrono-how-step em { color: var(--gold-bright); font-style: normal; font-weight: 700; }

.chrono-setup-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.chrono-setup-row .chrono-controls { margin: 0; flex: 1; justify-content: flex-end; }
.chrono-setup-label { font-family: var(--font-display); font-size: 17px; display: inline-flex; gap: 10px; align-items: center; }
.chrono-setup-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 2px solid var(--border-subtle);
}

/* ---------- full-screen show ---------- */
.cshow {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: none;
  flex-direction: column;
  background-color: var(--bg-void);
  background-image:
    linear-gradient(rgba(245, 184, 0, 0.05) 2px, transparent 2px),
    linear-gradient(90deg, rgba(245, 184, 0, 0.05) 2px, transparent 2px);
  background-size: 6vh 6vh;
  color: var(--text);
}
.cshow.active { display: flex; }

.cshow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2vh;
  padding: 2vh 3vw;
}
.cshow-theme { font-size: 1.7vh; color: var(--gold); }
.cshow-phase { font-size: 1.7vh; color: var(--crimson); }

.cshow-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4vw;
}
.cshow-stage > * { animation: slideIn 0.4s steps(5) both; }

.cshow-actions {
  display: flex;
  justify-content: center;
  gap: 2vh;
  padding: 2.4vh;
  min-height: 11vh;
  align-items: center;
}
.cshow-actions .btn-lg { font-size: 2.2vh; padding: 1.6vh 3vh; min-height: 6vh; }

.cs-big-title {
  font-family: var(--font-display);
  font-size: 9vh;
  line-height: 1.05;
  color: var(--gold-bright);
  text-shadow: 0 0.8vh 0 var(--gold-shade), 0 1.6vh 0 #050608;
  text-align: center;
}
.cs-mid-title { font-family: var(--font-display); font-size: 4.2vh; text-align: center; }
.cs-sub { font-size: 3.2vh; color: var(--muted); text-align: center; margin-top: 3vh; }

.cs-faces { display: flex; justify-content: center; gap: 2vh; margin-top: 4vh; }
.cs-faces img { width: 11vh; height: 11vh; object-fit: cover; border: 0.5vh solid var(--border-strong); }

/* rules */
.cs-rules { width: min(150vh, 100%); display: flex; flex-direction: column; gap: 2.4vh; }
.cs-rules .cs-big-title { margin-bottom: 2vh; }
.cs-rule {
  display: flex;
  gap: 3vh;
  align-items: center;
  font-size: 3.6vh;
  line-height: 1.3;
  padding: 2vh 3vh;
  background-color: var(--bg-panel);
  border: 0.4vh solid var(--border-subtle);
  box-shadow: 0 0.6vh 0 #050608;
}
.cs-rule b {
  font-size: 3vh;
  color: var(--ink-dark);
  background-color: var(--gold);
  padding: 1.4vh 1.8vh;
  flex: 0 0 auto;
}
.cs-rule em { font-style: normal; color: var(--gold-bright); }

/* deal: one big card */
.cs-deal {
  display: grid;
  grid-template-columns: 46vh 1fr;
  gap: 6vh;
  align-items: center;
  width: min(165vh, 100%);
}
.cs-deal-who { text-align: center; }
.cs-deal-who img {
  width: 44vh;
  height: 44vh;
  object-fit: cover;
  border: 0.9vh solid var(--gold);
  box-shadow: 1.4vh 1.4vh 0 #050608;
}
.cs-deal-name { font-family: var(--font-display); font-size: 8vh; margin-top: 3vh; }
.cs-deal-tag { font-size: 1.7vh; color: var(--muted); margin-top: 1.4vh; }
.cs-deal-card {
  padding: 5vh 5vh 4vh;
  background-color: var(--bg-panel);
  border: 0.6vh solid var(--gold);
  box-shadow: 1.4vh 1.4vh 0 #050608;
}
.cs-deal-q { font-size: 2vh; color: var(--crimson); margin-bottom: 3vh; }
.cs-deal-text { font-family: var(--font-display); font-size: 6.4vh; line-height: 1.15; }
.cs-deal-bar { height: 1.6vh; margin-top: 5vh; background-color: var(--bg-inset); border: 0.3vh solid var(--border-strong); }
.cs-deal-bar i { display: block; height: 100%; width: 100%; background-color: var(--gold); }

/* hide */
.cs-hide { text-align: center; }
.cs-backs { display: flex; justify-content: center; gap: 2.4vh; margin-bottom: 6vh; }
.cs-back {
  width: 16vh;
  height: 22vh;
  display: grid;
  place-items: center;
  font-size: 7vh;
  color: var(--gold-bright);
  background-color: var(--cobalt-shade);
  border: 0.6vh solid #fff;
  box-shadow: 1vh 1vh 0 #050608;
  animation: backDrop 0.5s steps(5) both;
}
.cs-back:nth-child(2) { animation-delay: 0.1s; }
.cs-back:nth-child(3) { animation-delay: 0.2s; }
.cs-back:nth-child(4) { animation-delay: 0.3s; }
.cs-back:nth-child(5) { animation-delay: 0.4s; }
@keyframes backDrop { from { transform: translateY(-30vh); } to { transform: none; } }

/* timer */
.cs-timer { text-align: center; width: 100%; }
.cs-timer-hint {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-pixel);
  font-size: 2.2vh;
  color: var(--gold);
  width: min(150vh, 100%);
  margin: 0 auto 2vh;
}
.cs-timer-num {
  font-family: var(--font-display);
  font-size: 44vh;
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 1.6vh 0 var(--gold-shade), 0 3.2vh 0 #050608;
}
.cs-timer-num.danger { color: #ff4d5a; text-shadow: 0 1.6vh 0 var(--crimson-shade), 0 3.2vh 0 #050608; }

/* lock: host clicks the line; slots are flip cards */
.cs-lock { width: min(160vh, 100%); text-align: center; }
.cs-lock .cs-mid-title { margin-bottom: 2.4vh; }
.cs-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2vh; }
.cs-slot { height: 40vh; position: relative; perspective: 140vh; cursor: pointer; }
.cs-flip {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(.3, 1.4, .5, 1);
}
.cs-slot.flipped .cs-flip { transform: rotateY(180deg); }
.cs-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4vh;
  background-color: var(--bg-panel);
  border: 0.5vh dashed var(--border-strong);
  box-shadow: 0 0.8vh 0 #050608;
}
.cs-slot.filled .cs-front { border-style: solid; border-color: var(--gold); }
.cs-slot.pop .cs-front { animation: slotPop 0.35s steps(4); }
@keyframes slotPop { 0% { transform: scale(0.82); } 60% { transform: scale(1.06); } 100% { transform: none; } }
.cs-backface {
  transform: rotateY(180deg);
  border-style: solid;
  justify-content: flex-start;
  padding: 2vh 1.4vh 1.4vh;
  gap: 1.2vh;
}
.cs-slot.ok .cs-backface { border-color: var(--emerald); }
.cs-slot.bad .cs-backface { border-color: var(--crimson); }
.cs-slot.flipped { cursor: default; }
.cs-slot-n {
  position: absolute;
  top: 1vh;
  left: 1vh;
  font-size: 1.8vh;
  color: var(--muted);
}
.cs-front img { width: 18vh; height: 18vh; object-fit: cover; border: 0.4vh solid var(--border-strong); }
.cs-slot-name { font-family: var(--font-display); font-size: 3.4vh; }
.cs-slot-empty { font-family: var(--font-pixel); font-size: 6vh; color: var(--border-strong); }
.cs-b-year {
  font-family: var(--font-display);
  font-size: 6.4vh;
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 0.5vh 0 var(--gold-shade), 0 1vh 0 #050608;
}
.cs-b-who { display: flex; align-items: center; gap: 1.2vh; }
.cs-b-who img { width: 6vh; height: 6vh; object-fit: cover; border: 0.3vh solid var(--border-strong); }
.cs-b-who span { font-family: var(--font-display); font-size: 2.8vh; }
.cs-b-text { font-size: 2.2vh; line-height: 1.3; flex: 1; display: flex; align-items: center; }
.cs-backface .cs-col-verdict { font-size: 1.4vh; }

.cs-pool { display: flex; justify-content: center; align-items: center; gap: 2vh; margin-top: 3vh; min-height: 17vh; }
.cs-pool .cs-verdict { margin: 0; }
.cs-pick {
  appearance: none;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
  padding: 1.2vh;
  background-color: var(--bg-panel);
  border: 0.4vh solid var(--border-strong);
  box-shadow: 0 0.6vh 0 #050608;
}
.cs-pick:hover { border-color: var(--gold); }
.cs-pick.used { visibility: hidden; }
.cs-pick img { width: 11vh; height: 11vh; object-fit: cover; }
.cs-pick span { font-family: var(--font-display); font-size: 2.6vh; }

/* hidden cards + timer on one screen */
.cs-hide { text-align: center; width: 100%; }
.cs-hide .cs-backs { margin-bottom: 3vh; }
.cs-hide .cs-back { width: 12vh; height: 17vh; font-size: 6vh; }
.cs-hide .cs-big-title { font-size: 7vh; margin-bottom: 2vh; }
.cs-hide .cs-timer-num { font-size: 30vh; }

/* reveal */
.cs-reveal { width: min(170vh, 100%); }
.cs-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2vh; }
.cs-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2vh;
  padding: 2.4vh 1.6vh;
  min-height: 56vh;
  background-color: var(--bg-panel);
  border: 0.5vh solid var(--border-subtle);
  box-shadow: 0 0.8vh 0 #050608;
  visibility: hidden;
}
.cs-col.shown { visibility: visible; animation: slideIn 0.4s steps(5) both; }
.cs-col-year {
  font-family: var(--font-display);
  font-size: 7vh;
  color: var(--gold-bright);
  text-shadow: 0 0.6vh 0 var(--gold-shade), 0 1.2vh 0 #050608;
}
.cs-col-img { width: 15vh; height: 15vh; object-fit: cover; border: 0.4vh solid var(--border-strong); }
.cs-col-name { font-family: var(--font-display); font-size: 3vh; }
.cs-col-text { font-size: 2.3vh; line-height: 1.3; color: var(--text); flex: 1; }
.cs-col-verdict {
  font-family: var(--font-pixel);
  font-size: 1.4vh;
  line-height: 1.5;
  padding: 1.2vh;
  width: 100%;
}
.cs-col-verdict.ok { background-color: var(--emerald-shade); color: #b7ffd3; }
.cs-col-verdict.bad { background-color: var(--crimson-shade); color: #ffc2c7; }
.cs-col.shown:has(.ok) { border-color: var(--emerald); }
.cs-col.shown:has(.bad) { border-color: var(--crimson); }
.cs-verdict {
  margin-top: 3vh;
  text-align: center;
  font-family: var(--font-display);
  font-size: 5vh;
  min-height: 6vh;
}
.cs-verdict b { color: var(--gold-bright); }
.cs-verdict .win { color: var(--gold-bright); text-shadow: 0 0.6vh 0 var(--gold-shade), 0 1.2vh 0 #050608; }

@media (prefers-reduced-motion: reduce) {
  .cshow-stage > *, .cs-back, .cs-col.shown { animation: none !important; }
}

/* ============================================================================
   PUZZLE RACE — setup + records + full-screen race
   ============================================================================ */
.pz-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.pz-setup { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.pz-label { font-family: var(--font-display); font-size: 17px; display: flex; align-items: baseline; gap: 12px; }
.pz-label-hint { font-family: var(--font-body); font-size: 14px; color: var(--muted); font-weight: 400; }

.pz-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pz-mode {
  appearance: none;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background-color: var(--bg-inset);
  border: 3px solid var(--border-subtle);
  box-shadow: 0 4px 0 #050608;
}
.pz-mode:hover { border-color: var(--gold); }
.pz-mode.active { border-color: var(--gold); background-color: #2a2412; }
.pz-mode.hard.active { border-color: var(--crimson); background-color: #2a1216; }
.pz-mode-title { font-family: var(--font-display); font-size: 19px; }
.pz-mode.active .pz-mode-title { color: var(--gold-bright); }
.pz-mode.hard.active .pz-mode-title { color: #ff7a85; }
.pz-mode-desc { font-size: 14px; line-height: 1.3; color: var(--muted); }

.pz-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.pz-vs { align-self: center; font-size: 22px; color: var(--gold-bright); text-shadow: 0 3px 0 #050608; }
.pz-side {
  padding: 10px 12px 12px;
  background-color: var(--bg-inset);
  border: 3px solid var(--border-subtle);
  border-top-width: 6px;
}
.pz-side.a { border-top-color: var(--crimson); }
.pz-side.b { border-top-color: var(--cobalt); }
.pz-side-tag { font-size: 11px; }
.pz-side.a .pz-side-tag { color: #ff7a85; }
.pz-side.b .pz-side-tag { color: #7fb2ff; }
.pz-side-slots { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.pz-slot {
  appearance: none;
  font: inherit;
  color: var(--text);
  width: 130px;
  height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: var(--bg-panel);
  border: 3px dashed var(--border-strong);
}
.pz-slot.filled { border-style: solid; cursor: pointer; animation: slotPop 0.3s steps(4); }
.pz-side.a .pz-slot.filled { border-color: var(--crimson); }
.pz-side.b .pz-slot.filled { border-color: var(--cobalt); }
.pz-slot img { width: 68px; height: 68px; object-fit: cover; }
.pz-slot-name { font-family: var(--font-display); font-size: 16px; }
.pz-slot-empty { font-size: 30px; color: var(--border-strong); }
.pz-slot-role { font-size: 8px; color: var(--muted); }

.pz-picker { grid-template-columns: repeat(10, minmax(0, 1fr)); margin-top: 0; gap: 10px; }
.pz-picker .picker-tile { padding: 6px; gap: 5px; }
.pz-picker .picker-tile-name { font-size: 14px; }
.picker-tile.pz-in-a { border-color: var(--crimson); background-color: #2a1216; }
.picker-tile.pz-in-b { border-color: var(--cobalt); background-color: #121a2e; }

.pz-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 2px solid var(--border-subtle);
}

/* records */
.pz-records { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.pz-rec-head { display: flex; justify-content: space-between; align-items: center; }
.pz-rec-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pz-rec-count { opacity: 0.7; margin-left: 4px; }
.pz-rec-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pz-rec-empty { color: var(--muted); text-align: center; padding: 40px 10px; line-height: 1.5; font-size: 16px; }
.pz-rec {
  display: grid;
  grid-template-columns: 34px auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-subtle);
  font-size: 15px;
}
.pz-rec-n { font-size: 12px; color: var(--muted); text-align: center; }
.pz-rec-faces { display: flex; }
.pz-rec-faces img { width: 30px; height: 30px; object-fit: cover; border: 2px solid var(--border-strong); }
.pz-rec-faces img + img { margin-left: -8px; }
.pz-rec-name { font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-rec-time { font-size: 12px; color: var(--text); }

.pz-rec.top { padding: 10px 12px; font-size: 18px; border-width: 3px; }
.pz-rec.top .pz-rec-n { font-size: 15px; color: var(--ink-dark); padding: 7px 0; }
.pz-rec.top .pz-rec-faces img { width: 42px; height: 42px; }
.pz-rec.top .pz-rec-time { font-size: 15px; }
.pz-rec.r1 { border-color: var(--gold); background-color: #2a2412; }
.pz-rec.r1 .pz-rec-n { background-color: var(--gold); }
.pz-rec.r1 .pz-rec-time { color: var(--gold-bright); }
.pz-rec.r2 { border-color: #b8c2d6; background-color: #1e2230; }
.pz-rec.r2 .pz-rec-n { background-color: #b8c2d6; }
.pz-rec.r3 { border-color: #c98a4b; background-color: #261b12; }
.pz-rec.r3 .pz-rec-n { background-color: #c98a4b; }
.pz-rec.fresh { outline: 3px solid var(--emerald); outline-offset: 2px; }

/* ---------- full-screen race ---------- */
.pz-stage { padding: 0 3vw; }
.pz-race { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 3vh; padding-bottom: 1vh; }
.pz-lane {
  appearance: none;
  font: inherit;
  color: var(--text);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2vh;
  cursor: pointer;
  background-color: var(--bg-panel);
  border: 0.6vh solid var(--border-subtle);
  border-top-width: 1.6vh;
  box-shadow: 0 1vh 0 #050608;
}
.pz-lane:disabled { cursor: default; }
.pz-lane.a { border-top-color: var(--crimson); }
.pz-lane.b { border-top-color: var(--cobalt); }
.pz-lane:not(:disabled):hover { background-color: #202434; }
.pz-lane-tag { font-size: 1.8vh; }
.pz-lane.a .pz-lane-tag { color: #ff7a85; }
.pz-lane.b .pz-lane-tag { color: #7fb2ff; }
.pz-lane-faces { display: flex; gap: 3vh; }
.pz-face { display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.pz-face img { width: 26vh; height: 26vh; object-fit: cover; border: 0.6vh solid var(--border-strong); }
.pz-lane.team .pz-face img { width: 20vh; height: 20vh; }
.pz-face-role { font-size: 1.5vh; color: var(--muted); }
.pz-lane-names { font-family: var(--font-display); font-size: 5vh; }
.pz-lane-clock {
  font-family: var(--font-display);
  font-size: 13vh;
  line-height: 1;
  color: var(--text);
  text-shadow: 0 0.8vh 0 #050608;
}
.pz-lane-status { font-size: 1.9vh; color: var(--muted); min-height: 3vh; }
.pz-lane-status b { color: var(--gold-bright); }
.pz-new-rec { animation: blink 0.6s steps(2) infinite; }

.pz-lane.done.first { border-color: var(--gold); }
.pz-lane.done.first .pz-lane-clock { color: var(--gold-bright); text-shadow: 0 0.8vh 0 var(--gold-shade), 0 1.6vh 0 #050608; }
.pz-lane.done.second .pz-lane-clock { color: #c9d2e3; }
.pz-lane.dnf { opacity: 0.55; }
.pz-lane-place {
  position: absolute;
  top: 2vh;
  right: 2vh;
  font-size: 5vh;
  padding: 1.4vh 2vh;
  color: var(--ink-dark);
  background-color: #b8c2d6;
  box-shadow: 0.6vh 0.6vh 0 #050608;
  animation: slotPop 0.35s steps(4);
}
.pz-lane.first .pz-lane-place { background-color: var(--gold); }

.pz-count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: 34vh;
  color: var(--gold-bright);
  text-shadow: 0 1.4vh 0 var(--gold-shade), 0 2.8vh 0 #050608;
  background-color: rgba(8, 9, 14, 0.72);
}
.pz-count.beat { animation: pzBeat 0.5s steps(5); }
.pz-count.gone { display: none; }
@keyframes pzBeat { from { transform: scale(1.5); } to { transform: none; } }
@keyframes blink { 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  .pz-count.beat, .pz-lane-place, .pz-slot.filled, .pz-new-rec { animation: none !important; }
}

/* ---------- player dropdowns (all duels) ---------- */
.fighter-dd { cursor: default; justify-content: flex-start; padding: 8px 10px; }
.fighter-dd:hover { background-color: var(--bg-cabinet); }
.fighter-dd-photo {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  flex: 0 0 auto;
  line-height: 0;
}
.fighter-dd-photo:hover .duel-avatar { outline: 3px solid var(--gold); }
.fighter-select {
  flex: 1 1 auto;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  background-color: var(--bg-inset);
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(-45deg, transparent 50%, var(--gold) 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 13px) 50%;
  background-size: 7px 7px;
  background-repeat: no-repeat;
  border: 2px solid var(--border-strong);
  border-radius: 4px;
  padding: 10px 38px 10px 12px;
  cursor: pointer;
}
.fighter-select:hover, .fighter-select:focus { border-color: var(--gold); outline: none; }
.fighter-select option { background-color: var(--bg-panel); color: var(--text); font-family: var(--font-body); }
.vs-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* puzzle slots with dropdown */
.pz-slot { width: 170px; height: auto; min-height: 150px; padding: 8px; gap: 6px; justify-content: flex-start; }
.pz-slot-face { appearance: none; border: 0; padding: 0; background: none; cursor: pointer; line-height: 0; }
.pz-slot .pz-slot-empty { height: 68px; display: grid; place-items: center; }
.pz-select { width: 100%; font-size: 16px; padding: 6px 30px 6px 8px; background-position: calc(100% - 16px) 50%, calc(100% - 10px) 50%; background-size: 6px 6px; }

/* ============================================================================
   DARTS RACE — setup + full-screen board
   ============================================================================ */
.dr-setup { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.dr-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.dr-team-card {
  padding: 12px 14px;
  background-color: var(--bg-inset);
  border: 3px solid var(--border-subtle);
  border-top-width: 6px;
  min-height: 118px;
}
.dr-team-card.g { border-top-color: var(--emerald); }
.dr-team-card.r { border-top-color: var(--crimson); }
.dr-team-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 10px; }
.dr-team-card.g .dr-team-head { color: #6dffa8; }
.dr-team-card.r .dr-team-head { color: #ff7a85; }
.dr-team-list { display: flex; flex-wrap: wrap; gap: 8px; }
.dr-team-member {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background-color: var(--bg-panel);
  border: 2px solid var(--border-subtle);
  font-family: var(--font-display);
  font-size: 16px;
}
.dr-team-member img { width: 34px; height: 34px; object-fit: cover; }
.picker-tile.dr-in-g { border-color: var(--emerald); background-color: #10241a; }
.picker-tile.dr-in-r { border-color: var(--crimson); background-color: #2a1216; }
.dr-tile-tag { font-size: 8px; color: var(--muted); }
.picker-tile.dr-in-g .dr-tile-tag { color: #6dffa8; }
.picker-tile.dr-in-r .dr-tile-tag { color: #ff7a85; }

/* ---------- show layout ---------- */
.dr-board-wrap { flex: 1 1 auto; min-height: 0; padding: 0 2.4vw; display: flex; align-items: center; }
.dr-board {
  position: relative;
  width: 100%;
  height: 50vh;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.8vh;
}
.dr-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6vh;
  background-color: var(--bg-panel);
  border: 0.4vh solid var(--border-subtle);
  box-shadow: 0 0.5vh 0 #050608;
}
.dr-cell-n { position: absolute; top: 0.6vh; left: 0.7vh; font-size: 1.3vh; color: var(--muted); }
.dr-cell .px-icon { width: 4.4vh; height: 4.4vh; fill: currentColor; }
.dr-cell-label { font-family: var(--font-display); font-size: 1.7vh; text-align: center; line-height: 1.1; }
.dr-cell-big { font-size: 1.7vh; color: var(--gold-bright); }
.dr-cell.start { background-color: #202434; border-color: var(--border-strong); }
.dr-cell.finish { background-color: #2a2412; border-color: var(--gold); color: var(--gold-bright); }
.dr-cell.kz     { color: #c9a2ff; border-color: #6b47b8; background-color: #1d1530; }
.dr-cell.croc   { color: #6dffa8; border-color: #1f7a46; background-color: #102017; }
.dr-cell.alco   { color: var(--gold-bright); border-color: var(--gold-shade); background-color: #241d0c; }
.dr-cell.boost  { color: #7fd8ff; border-color: #1f6f99; background-color: #0f1d27; }
.dr-cell.trap   { color: #ff7a85; border-color: var(--crimson-shade); background-color: #241014; }
.dr-cell.tele   { color: #ff9ff3; border-color: #8a3b80; background-color: #24102a; }
.dr-cell.sniper { color: #ffb36b; border-color: #9a5212; background-color: #24170b; }

.dr-token {
  position: absolute;
  z-index: 3;
  width: 6.4vh;
  height: 6.4vh;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 0.5vh solid #fff;
  box-shadow: 0.6vh 0.6vh 0 #050608;
  font-size: 2.2vh;
  color: #fff;
  transition: left 0.2s ease-out, top 0.2s ease-out;
}
.dr-token.g { background-color: var(--emerald); }
.dr-token.r { background-color: var(--crimson); }
.dr-token.active { animation: drBob 0.8s steps(2) infinite; }
.dr-token.trapped { outline: 0.5vh dashed #ff7a85; outline-offset: 0.5vh; }
@keyframes drBob { 50% { transform: translate(-50%, -62%); } }

.dr-toast {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 2vh 4vh;
  font-family: var(--font-display);
  font-size: 5vh;
  white-space: nowrap;
  color: var(--text);
  background-color: rgba(8, 9, 14, 0.92);
  border: 0.6vh solid var(--border-strong);
  box-shadow: 1vh 1vh 0 #050608;
  pointer-events: none;
  display: none;
}
.dr-toast.show { display: block; animation: pzBeat 0.3s steps(3); }
.dr-toast.gold { color: var(--gold-bright); border-color: var(--gold); }
.dr-toast.good, .dr-toast.g { color: #6dffa8; border-color: var(--emerald); }
.dr-toast.bad, .dr-toast.r { color: #ff7a85; border-color: var(--crimson); }

/* bottom panel */
.dr-panel {
  display: grid;
  grid-template-columns: 1fr 2.3fr 1fr;
  gap: 2vh;
  padding: 2vh 2.4vw 2.6vh;
  min-height: 27vh;
}
.dr-roster {
  padding: 1.4vh;
  background-color: var(--bg-panel);
  border: 0.4vh solid var(--border-subtle);
  border-top-width: 1vh;
  opacity: 0.55;
}
.dr-roster.g { border-top-color: var(--emerald); }
.dr-roster.r { border-top-color: var(--crimson); }
.dr-roster.on { opacity: 1; }
.dr-roster.g.on { border-color: var(--emerald); }
.dr-roster.r.on { border-color: var(--crimson); }
.dr-roster-head { font-size: 1.4vh; margin-bottom: 1.2vh; }
.dr-roster.g .dr-roster-head { color: #6dffa8; }
.dr-roster.r .dr-roster-head { color: #ff7a85; }
.dr-roster-faces { display: flex; flex-wrap: wrap; gap: 1vh; }
.dr-face { appearance: none; padding: 0; border: 0.4vh solid var(--border-strong); background: none; cursor: pointer; line-height: 0; }
.dr-face img { width: 7vh; height: 7vh; object-fit: cover; }
.dr-face.now { border-color: var(--gold); box-shadow: 0 0 0 0.4vh var(--gold-shade); }
.dr-roster-trap { margin-top: 1vh; font-size: 1.2vh; color: #ff7a85; }

.dr-turn {
  display: flex;
  flex-direction: column;
  gap: 1.8vh;
  padding: 1.6vh 2vh;
  background-color: var(--bg-panel);
  border: 0.5vh solid var(--border-strong);
  border-top-width: 1vh;
}
.dr-turn.g { border-top-color: var(--emerald); }
.dr-turn.r { border-top-color: var(--crimson); }
.dr-turn-who { display: flex; align-items: center; gap: 2vh; }
.dr-turn-who img { width: 9vh; height: 9vh; object-fit: cover; border: 0.5vh solid var(--gold); }
.dr-turn-kicker { font-size: 1.5vh; }
.dr-turn.g .dr-turn-kicker { color: #6dffa8; }
.dr-turn.r .dr-turn-kicker { color: #ff7a85; }
.dr-turn-name { font-family: var(--font-display); font-size: 4.4vh; line-height: 1.1; }
.dr-turn-note { font-size: 2vh; color: var(--gold-bright); }
.dr-hits { display: grid; grid-template-columns: 1.4fr repeat(9, 1fr) 1.6fr; gap: 1vh; }
.dr-hit {
  appearance: none;
  font-family: var(--font-display);
  font-size: 3.6vh;
  color: var(--ink-dark);
  min-height: 8vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background-color: var(--gold);
  border: 0.4vh solid #050608;
  box-shadow: 0 0.6vh 0 #050608;
  cursor: pointer;
}
.dr-hit:nth-child(odd):not(.miss):not(.bull) { background-color: #2b2f3f; color: var(--gold-bright); }
.dr-hit small { font-family: var(--font-pixel); font-size: 1vh; margin-top: 0.6vh; }
.dr-hit.miss { background-color: #3a3f52; color: var(--text); font-size: 2.4vh; }
.dr-hit.bull { background-color: var(--crimson); color: #fff; }
.dr-hit:hover:not(:disabled) { filter: brightness(1.2); }
.dr-hit:active:not(:disabled) { transform: translateY(0.4vh); box-shadow: 0 0.2vh 0 #050608; }
.dr-hit:disabled { opacity: 0.35; cursor: default; }
.dr-hit.small { min-height: 7vh; font-size: 3vh; }
.dr-hit.aim { outline: 0.5vh solid #fff; outline-offset: 0.3vh; }

/* modal */
.dr-modal-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  background-color: rgba(5, 6, 10, 0.78);
}
.dr-modal-layer.open { display: grid; }
.dr-modal {
  width: min(120vh, 90vw);
  padding: 4vh 5vh;
  text-align: center;
  background-color: var(--bg-panel);
  border: 0.8vh solid var(--border-strong);
  box-shadow: 1.6vh 1.6vh 0 #050608;
  animation: slideIn 0.3s steps(4) both;
}
.dr-modal.kz { border-color: #6b47b8; }
.dr-modal.croc { border-color: var(--emerald); }
.dr-modal.alco { border-color: var(--gold); }
.dr-modal.sniper { border-color: #9a5212; }
.dr-modal.win.g { border-color: var(--emerald); }
.dr-modal.win.r { border-color: var(--crimson); }
.dr-modal-kicker { display: inline-flex; align-items: center; gap: 1.2vh; font-size: 1.8vh; color: var(--muted); }
.dr-modal-kicker .px-icon { width: 3vh; height: 3vh; fill: currentColor; }
.dr-modal-title {
  font-family: var(--font-display);
  font-size: 7vh;
  line-height: 1.1;
  margin: 2vh 0;
  color: var(--gold-bright);
  text-shadow: 0 0.6vh 0 var(--gold-shade), 0 1.2vh 0 #050608;
}
.dr-modal-body { font-size: 3vh; line-height: 1.4; display: flex; flex-direction: column; align-items: center; gap: 1.6vh; }
.dr-modal-body b { color: var(--gold-bright); }
.dr-modal-timer { font-family: var(--font-display); font-size: 12vh; line-height: 1; color: var(--text); }
.dr-modal-timer.danger { color: #ff4d5a; }
.dr-modal-target {
  font-size: 10vh;
  padding: 2vh 4vh;
  color: var(--ink-dark);
  background-color: #ffb36b;
  box-shadow: 1vh 1vh 0 #050608;
}
.dr-modal-hits { display: grid; grid-template-columns: repeat(11, 1fr); gap: 0.8vh; width: 100%; margin-top: 1vh; }
.dr-modal-faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 2vh; }
.dr-modal-faces span { display: flex; flex-direction: column; align-items: center; gap: 0.8vh; font-family: var(--font-display); font-size: 2.6vh; }
.dr-modal-faces img { width: 12vh; height: 12vh; object-fit: cover; border: 0.5vh solid var(--border-strong); }
.dr-modal-faces.big img { width: 18vh; height: 18vh; border-color: var(--gold); }
.dr-modal-actions { display: flex; justify-content: center; gap: 2vh; margin-top: 3.4vh; }
.dr-modal-actions .btn { font-size: 2.4vh; padding: 1.6vh 3.4vh; min-height: 6.4vh; }

@media (prefers-reduced-motion: reduce) {
  .dr-token.active, .dr-toast.show, .dr-modal { animation: none !important; }
}

/* darts race: winding road look */
.dr-board {
  height: 56vh;
  grid-template-rows: 1fr 0.62fr 1fr 0.62fr 1fr;
  column-gap: 1.6vh;
  row-gap: 0.4vh;
}
.dr-road { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; overflow: visible; pointer-events: none; }
.dr-cell { z-index: 1; margin: 0.5vh 0; border-radius: 1.2vh; }
.dr-cell:not(.kz):not(.croc):not(.alco):not(.boost):not(.trap):not(.tele):not(.sniper):not(.start):not(.finish) {
  background-color: #1c2030;
  border-color: #3a4160;
}
.dr-cell.turn { margin: 0 1.2vh; }
.dr-cell.turn .dr-cell-label { font-size: 1.4vh; }
.dr-cell.turn .px-icon { width: 3vh; height: 3vh; }
.dr-board { column-gap: 3.4vh; row-gap: 0.6vh; }
.dr-cell { margin: 0.9vh 0; }
.dr-cell.turn { margin: 0.2vh 0; }

/* ============================================================================
   BLACK BOX — rules + setup, full-screen countdown
   ============================================================================ */
.bb-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; }
.bb-rules, .bb-setup { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.bb-rule {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  font-size: 20px;
  line-height: 1.4;
  background-color: var(--bg-inset);
  border: 2px solid var(--border-subtle);
}
.bb-rule b { flex: 0 0 auto; font-size: 16px; color: var(--ink-dark); background-color: var(--gold); padding: 9px 11px; }
.bb-rule em { font-style: normal; color: var(--gold-bright); font-weight: 700; }
.bb-setup .btn-sm { align-self: flex-start; }
.bb-times { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.bb-times .btn { padding-left: 0; padding-right: 0; }
.bb-time-hint { font-size: 14px; color: var(--muted); }
.bb-go { margin-top: auto; width: 100%; font-size: 26px; min-height: 72px; }

.bb-show { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2vh; width: 100%; }
.bb-who { display: flex; align-items: center; gap: 2.4vh; font-family: var(--font-display); font-size: 6vh; }
.bb-who img { width: 14vh; height: 14vh; object-fit: cover; border: 0.6vh solid var(--gold); box-shadow: 0.8vh 0.8vh 0 #050608; }
.bb-count { font-size: 30vh; color: var(--gold-bright); text-shadow: 0 1.4vh 0 var(--gold-shade), 0 2.8vh 0 #050608; animation: pzBeat 0.5s steps(5); }
.bb-timer {
  font-family: var(--font-display);
  font-size: 38vh;
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 1.6vh 0 var(--gold-shade), 0 3.2vh 0 #050608;
}
.bb-timer.danger { color: #ff4d5a; text-shadow: 0 1.6vh 0 var(--crimson-shade), 0 3.2vh 0 #050608; animation: blink 0.5s steps(2) infinite; }
.bb-bar { width: min(120vh, 80%); height: 2.2vh; background-color: var(--bg-inset); border: 0.4vh solid var(--border-strong); margin-top: 2vh; }
.bb-bar i { display: block; height: 100%; width: 100%; background-color: var(--gold); transition: width 1s linear; }
.bb-result { font-family: var(--font-display); font-size: 14vh; line-height: 1.1; margin-top: 4vh; }
.bb-result.win { color: #6dffa8; text-shadow: 0 1vh 0 var(--emerald-shade), 0 2vh 0 #050608; }
.bb-result.lose { color: #ff7a85; text-shadow: 0 1vh 0 var(--crimson-shade), 0 2vh 0 #050608; }
.bb-sub { font-size: 3.4vh; color: var(--muted); }
.bb-sub b { color: var(--gold-bright); }
#bb-show .cshow-actions .btn { font-size: 2.4vh; padding: 1.6vh 3.2vh; min-height: 6.6vh; }

/* play tracker */
.home-roster .fighter-tile { appearance: none; font: inherit; color: var(--text); cursor: pointer; }
.home-roster .fighter-tile.next-up { border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-shade), 0 4px 0 #050608; }
.home-roster .fighter-tile.next-up .fighter-tile-pts { color: #6dffa8; }
.home-plays-hint { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 360px; line-height: 1.35; }
.link-btn { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--gold); text-decoration: underline; cursor: pointer; }
.picker-tile { position: relative; }
.play-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  min-width: 22px;
  padding: 4px 5px;
  font-size: 9px;
  text-align: center;
  color: var(--ink-dark);
  background-color: var(--gold);
  box-shadow: 2px 2px 0 #050608;
}
.home-plays-reset { font-size: 13px; margin-left: 10px; }
.cart-board .cartridge { padding-top: 6px; padding-bottom: 7px; }
.cart-col { gap: 8px; }

/* ============================================================================
   ATTRACT MODE v2 — starfield, synth floor, flying pixel sprites
   ============================================================================ */
.attract { background-image: none; background-color: #05060c; overflow: hidden; }
.att-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.attract-topline, .attract-slide, .attract-bottom { position: relative; z-index: 2; }
.att-stars {
  position: absolute;
  inset: -100% 0 0 0;
  background-repeat: repeat;
  animation: attStars 30s linear infinite;
}
.att-stars.s1 {
  background-image:
    radial-gradient(2px 2px at 20% 30%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 70% 10%, #a6e4ff 50%, transparent 51%),
    radial-gradient(2px 2px at 40% 80%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 90% 60%, #ffd84d 50%, transparent 51%),
    radial-gradient(2px 2px at 5% 55%, #fff 50%, transparent 51%);
  background-size: 34vh 34vh;
  opacity: 0.7;
}
.att-stars.s2 {
  background-image:
    radial-gradient(3px 3px at 30% 20%, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 80% 70%, #ff6fae 50%, transparent 51%),
    radial-gradient(3px 3px at 55% 45%, #fff 50%, transparent 51%);
  background-size: 58vh 58vh;
  animation-duration: 16s;
}
@keyframes attStars { from { transform: translateY(0); } to { transform: translateY(50%); } }
.att-floor {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: -2vh;
  height: 42vh;
  background-image:
    linear-gradient(rgba(255, 60, 170, 0.55) 0.3vh, transparent 0.3vh),
    linear-gradient(90deg, rgba(255, 60, 170, 0.55) 0.3vh, transparent 0.3vh);
  background-size: 8vh 8vh;
  transform: perspective(40vh) rotateX(62deg);
  transform-origin: 50% 100%;
  animation: attFloor 1.2s linear infinite;
  mask-image: linear-gradient(to top, #000 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent 100%);
}
@keyframes attFloor { from { background-position: 0 0; } to { background-position: 0 8vh; } }
.att-sprites { position: absolute; inset: 0; }
.att-sprite { position: absolute; left: 0; width: 9vh; animation-timing-function: steps(60); animation-fill-mode: both; }
.att-sprite svg { width: 100%; height: auto; filter: drop-shadow(0.6vh 0.6vh 0 #000); }
.att-sprite.ltr { animation-name: attFlyR; }
.att-sprite.rtl { animation-name: attFlyL; }
@keyframes attFlyR { from { transform: translateX(-12vh) translateY(0); } 50% { transform: translateX(50vw) translateY(-4vh); } to { transform: translateX(105vw) translateY(0); } }
@keyframes attFlyL { from { transform: translateX(105vw) scaleX(-1); } 50% { transform: translateX(50vw) translateY(4vh) scaleX(-1); } to { transform: translateX(-12vh) scaleX(-1); } }

/* title */
.att-title { text-align: center; }
.att-1up { font-size: 2.2vh; color: var(--crimson); margin-bottom: 3vh; animation: blink 1s steps(2) infinite; }
.att-logo { font-family: var(--font-display); font-size: 17vh; line-height: 1; letter-spacing: 0.5vh; }
.att-logo span {
  display: inline-block;
  color: var(--gold-bright);
  text-shadow: 0 0.8vh 0 var(--gold-shade), 0 1.6vh 0 #c2185b, 0 2.4vh 0 #050608;
  animation: attWave 1.6s ease-in-out infinite;
}
@keyframes attWave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3vh); } }
.att-lvl {
  display: inline-block;
  margin-top: 4vh;
  font-size: 4vh;
  padding: 1.6vh 3vh;
  color: var(--ink-dark);
  background-color: #ff6fae;
  box-shadow: 0.8vh 0.8vh 0 #050608;
  animation: attHue 3s steps(6) infinite;
}
@keyframes attHue { 0% { background-color: #ff6fae; } 33% { background-color: #ffd84d; } 66% { background-color: #6dffa8; } 100% { background-color: #ff6fae; } }
.att-coin { margin-top: 6vh; font-size: 4.2vh; color: #fff; text-shadow: 0 0 2vh rgba(255, 216, 77, 0.8); animation: blink 0.9s steps(2) infinite; }
.att-copy { margin-top: 4vh; font-size: 1.6vh; color: var(--muted); }

/* player select */
.att-select { text-align: center; width: min(150vh, 100%); }
.att-head { font-size: 4.4vh; color: var(--gold-bright); text-shadow: 0.5vh 0.5vh 0 #c2185b; margin-bottom: 4vh; }
.att-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2.4vh; }
.att-cell {
  position: relative;
  padding: 1.2vh;
  background-color: #0e1022;
  border: 0.6vh solid #2b3160;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2vh;
}
.att-cell img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; filter: grayscale(0.7) brightness(0.7); }
.att-cell span { font-size: 1.6vh; color: var(--muted); }
.att-cell.on { border-color: var(--gold-bright); box-shadow: 0 0 0 0.6vh var(--crimson), 0 0 4vh rgba(255, 216, 77, 0.5); }
.att-cell.on img { filter: none; }
.att-cell.on span { color: var(--gold-bright); }
.att-cell.on::before {
  content: "P1";
  position: absolute;
  top: -2.6vh;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-pixel);
  font-size: 1.6vh;
  padding: 0.6vh 1vh;
  color: #fff;
  background-color: var(--crimson);
}
.att-cell.locked { animation: attLock 0.18s steps(2) 6; }
@keyframes attLock { 50% { border-color: #fff; box-shadow: 0 0 0 0.6vh #fff, 0 0 6vh #fff; } }
.att-ready { margin-top: 4vh; font-size: 3.4vh; color: #6dffa8; min-height: 4vh; }

/* high scores */
.att-scores { width: min(110vh, 100%); text-align: center; }
.att-head.rainbow { animation: attRain 1.2s steps(6) infinite; }
@keyframes attRain { 0% { color: #ff4d5a; } 20% { color: #ffd84d; } 40% { color: #6dffa8; } 60% { color: #7fd8ff; } 80% { color: #ff6fae; } 100% { color: #ff4d5a; } }
.att-row {
  display: grid;
  grid-template-columns: 1fr 2.4fr 1fr;
  font-size: 3vh;
  padding: 0.9vh 0;
}
.att-row.head { font-size: 1.8vh; color: var(--muted); border-bottom: 0.3vh dashed #2b3160; margin-bottom: 1vh; animation: none; }
.att-row span:nth-child(2) { text-align: left; padding-left: 4vh; }
.att-row.c0 { color: #ff4d5a; } .att-row.c1 { color: #ffd84d; } .att-row.c2 { color: #6dffa8; }
.att-row.c3 { color: #7fd8ff; } .att-row.c4 { color: #ff6fae; } .att-row.c5 { color: #ffffff; }
@keyframes attType { from { visibility: hidden; } to { visibility: visible; } }

@media (prefers-reduced-motion: reduce) {
  .att-stars, .att-floor, .att-logo span, .att-lvl, .att-coin, .att-1up, .att-head.rainbow { animation: none !important; }
}
.att-row.pending { visibility: hidden; }
.att-floor { height: 60vh; transform: perspective(50vh) rotateX(58deg); }

/* ============================================================================
   ALCO GAMES v2 — shared roster, Higher/Lower hot potato, Alco target, Black/White
   ============================================================================ */
.alco-roster-label { font-size: 11px; margin-right: 6px; }

.hl2-wrap { padding: 22px 26px; display: flex; flex-direction: column; gap: 18px; }
.hl2-stage { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: center; }
.hl2-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.hl2-label { font-size: 12px; color: var(--muted); }
.hl2-avatar { width: 120px; height: 120px; object-fit: cover; border: 5px solid var(--gold); box-shadow: 6px 6px 0 #050608; }
.hl2-name { font-family: var(--font-display); font-size: 34px; }
.hl2-sub { font-size: 15px; color: var(--muted); line-height: 1.4; }
.hl2-sub b { color: var(--gold-bright); }
.hl2-bank { font-family: var(--font-pixel); font-size: 96px; color: #ff6a76; text-shadow: 0 7px 0 var(--crimson-shade), 0 14px 0 #050608; line-height: 1.1; }
.hl2-table { display: flex; align-items: center; gap: 26px; }
.hl2-card {
  position: relative; width: 200px; height: 280px; border-radius: 14px;
  background: #fbf7ec; color: #14161f; border: 5px solid #fff;
  box-shadow: 8px 8px 0 #050608; display: flex; align-items: center; justify-content: center;
}
.hl2-card.red { color: #d3202e; }
.hl2-card.prev { width: 150px; height: 210px; opacity: 0.55; transform: rotate(-6deg); }
.hl2-card.prev .hl2-suit { font-size: 80px; }
.hl2-card.back { background: repeating-linear-gradient(45deg, var(--crimson) 0 12px, var(--crimson-shade) 12px 24px); border-color: #fff; color: #fff; }
.hl2-card.back .pixel { font-size: 48px; }
.hl2-suit { font-size: 120px; line-height: 1; }
.hl2-corner { position: absolute; top: 12px; left: 14px; font-family: var(--font-display); font-size: 30px; line-height: 1; text-align: center; }
.hl2-corner.bottom { top: auto; left: auto; bottom: 12px; right: 14px; transform: rotate(180deg); }
.hl2-card.flip { animation: slotPop 0.35s steps(4); }
.hl2-msg { text-align: center; font-family: var(--font-display); font-size: 28px; min-height: 40px; color: var(--gold-bright); }
.hl2-msg b { color: #fff; }
.hl2-msg.good { color: #6dffa8; }
.hl2-msg.bad { color: #ff7a85; }
.hl2-msg.warn { color: var(--amber); }
.hl2-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hl2-actions .btn-lg { font-size: 22px; min-width: 200px; }

.at-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 18px; }
.at-left, .at-right { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.at-thrower { display: flex; align-items: center; gap: 18px; }
.at-thrower img { width: 96px; height: 96px; object-fit: cover; border: 5px solid var(--gold); box-shadow: 5px 5px 0 #050608; }
.at-legend { display: flex; flex-direction: column; gap: 8px; }
.at-rule { display: flex; align-items: center; gap: 14px; padding: 10px 12px; background: var(--bg-inset); border: 3px solid var(--border-subtle); font-size: 19px; font-weight: 700; }
.at-ring { flex: 0 0 72px; text-align: center; padding: 8px 0; font-size: 14px; color: var(--ink-dark); background: var(--muted); }
.at-rule.miss .at-ring { background: #8b93ab; }
.at-rule.r1 .at-ring { background: var(--cobalt); color: #fff; }
.at-rule.r2 .at-ring { background: var(--emerald); }
.at-rule.r3 .at-ring { background: var(--amber); }
.at-rule.bull .at-ring { background: var(--crimson); color: #fff; }
.at-rule.hit { border-color: var(--gold-bright); background: #2a2410; box-shadow: 0 0 0 3px var(--gold) inset; }
.at-res { min-height: 190px; padding: 22px; border: 4px solid var(--border-strong); background: var(--bg-inset); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 10px; animation: slotPop 0.35s steps(4); }
.at-res.idle { color: var(--muted); font-size: 22px; animation: none; }
.at-res-title { font-family: var(--font-display); font-size: 52px; line-height: 1.1; }
.at-res-text { font-size: 22px; }
.at-res.miss .at-res-title { color: #c3c9da; }
.at-res.r1 .at-res-title { color: #6aa6ff; }
.at-res.r2 .at-res-title { color: #6dffa8; }
.at-res.r3 .at-res-title { color: #ffb257; }
.at-res.bull { border-color: var(--gold); }
.at-res.bull .at-res-title { color: var(--gold-bright); }
.at-hits .dr-hit { min-height: 84px; font-size: 32px; }
.at-hits .dr-hit small { font-size: 9px; }
.at-next { text-align: center; font-size: 22px; color: var(--muted); min-height: 30px; }
.at-next b { color: var(--gold-bright); font-family: var(--font-display); font-size: 28px; }

.bw-wrap { padding: 22px 26px; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.bw-rules { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; font-size: 17px; color: var(--muted); }
.bw-rules b { color: var(--ink-dark); background: var(--gold); padding: 4px 7px; margin-right: 6px; font-size: 11px; }
.bw-rules em { font-style: normal; color: var(--gold-bright); font-weight: 700; }
.bw-card { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.bw-kicker { font-size: 13px; color: var(--muted); }
.bw-options { display: grid; grid-template-columns: 1fr auto 1fr; gap: 26px; align-items: center; width: 100%; }
.bw-opt { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 30px 20px; border: 5px solid; min-height: 260px; justify-content: center; text-align: center; }
.bw-opt.white { background: #f3efe2; color: #14161f; border-color: #fff; box-shadow: 8px 8px 0 #050608; }
.bw-opt.black { background: #07080c; color: #fff; border-color: #5a6280; box-shadow: 8px 8px 0 #050608; }
.bw-stone { width: 74px; height: 58px; border-radius: 50%; }
.bw-opt.white .bw-stone { background: radial-gradient(circle at 35% 30%, #fff, #cfcabb 70%); border: 3px solid #a9a395; }
.bw-opt.black .bw-stone { background: radial-gradient(circle at 35% 30%, #5b6070, #0b0c10 70%); border: 3px solid #2c3144; }
.bw-text { font-family: var(--font-display); font-size: 44px; line-height: 1.15; }
.bw-or { font-size: 20px; color: var(--gold); }
.bw-hint { font-size: 18px; color: var(--muted); }
.bw-result { min-height: 110px; display: flex; align-items: center; justify-content: center; }
.bw-count { font-size: 72px; color: var(--gold-bright); text-shadow: 0 6px 0 var(--gold-shade), 0 12px 0 #050608; animation: pzBeat 0.5s steps(5); }
.bw-verdict { font-family: var(--font-display); font-size: 44px; padding: 14px 30px; border: 5px solid; animation: slotPop 0.35s steps(4); }
.bw-verdict.white { background: #f3efe2; color: #14161f; border-color: #fff; }
.bw-verdict.black { background: #07080c; color: #fff; border-color: #5a6280; }
.bw-verdict.tie { background: var(--crimson); color: #fff; border-color: #ff8c95; }
.bw-actions { display: flex; gap: 14px; justify-content: center; }
.bw-actions .btn-lg { font-size: 22px; min-width: 220px; }
.bw-btn-white { background: #f3efe2; color: #14161f; border-color: #fff; }
.bw-btn-black { background: #07080c; color: #fff; border-color: #5a6280; }

/* ============================================================================
   SPARE GAMES v2 — Alias, Bomb (full-screen), Never Have I Ever
   ============================================================================ */
.sp-two { grid-template-columns: repeat(2, 1fr); }
.sp-three { grid-template-columns: repeat(3, 1fr); }
.sp-recs { display: flex; flex-direction: column; gap: 6px; }
.sp-rec { display: flex; align-items: center; gap: 12px; padding: 6px 10px; background: var(--bg-inset); border: 2px solid var(--border-subtle); font-size: 18px; font-weight: 700; }
.sp-rec img { width: 36px; height: 36px; object-fit: cover; }
.sp-rec .pixel { font-size: 12px; width: 18px; color: var(--muted); }
.sp-rec-name { flex: 1; }
.sp-rec b { font-family: var(--font-pixel); font-size: 16px; color: var(--gold-bright); }
.sp-rec.r1 { border-color: var(--gold); }
.sp-rec.r1 .pixel { color: var(--gold-bright); }

.al-stage { width: 100%; display: grid; grid-template-columns: 1fr 2.4fr 1fr; grid-template-rows: auto auto; gap: 3vh 4vh; align-items: center; }
.al-side { display: flex; justify-content: center; }
.sp-who { flex-direction: column; gap: 1.4vh; font-size: 4.4vh; }
.al-word {
  font-family: var(--font-display); font-size: 13vh; line-height: 1.05; text-align: center; color: #fff;
  padding: 5vh 3vh; background: var(--bg-inset); border: 0.8vh solid var(--gold); box-shadow: 1.2vh 1.2vh 0 #050608;
  min-height: 34vh; display: flex; align-items: center; justify-content: center; word-break: break-word;
}
.al-word.pop { animation: slotPop 0.3s steps(4); }
.al-meta { display: flex; flex-direction: column; align-items: center; gap: 2vh; }
.al-timer { font-family: var(--font-pixel); font-size: 12vh; color: var(--gold-bright); text-shadow: 0 1vh 0 var(--gold-shade), 0 2vh 0 #050608; }
.al-timer.danger { color: #ff4d5a; text-shadow: 0 1vh 0 var(--crimson-shade), 0 2vh 0 #050608; animation: blink 0.5s steps(2) infinite; }
.al-score { font-size: 3.6vh; color: var(--muted); }
.al-score b { font-family: var(--font-pixel); color: #6dffa8; font-size: 5vh; margin-left: 1vh; }
.al-bar { grid-column: 1 / -1; width: 100%; margin: 0; }
.cshow-actions .al-ok { min-width: 40vh; font-size: 3vh; }

.bm-stage { display: flex; flex-direction: column; align-items: center; gap: 4vh; width: 100%; }
.bm-stage .sp-who { flex-direction: row; font-size: 4vh; }
.bm-stage .sp-who img { width: 9vh; height: 9vh; }
.bm-task { font-family: var(--font-display); font-size: 8vh; line-height: 1.15; text-align: center; max-width: 150vh; color: #fff; }
.bm-bomb-row { display: flex; align-items: center; width: min(140vh, 90%); }
.bm-fuse { position: relative; flex: 1; height: 2.4vh; background: #2c3144; border-top: 0.5vh dashed #5a6280; }
.bm-fuse i { display: block; height: 100%; width: 100%; background: repeating-linear-gradient(90deg, #c8a46a 0 2vh, #8f6a33 2vh 4vh); }
.bm-spark { position: absolute; top: 50%; left: 100%; width: 5vh; height: 5vh; margin: -2.5vh 0 0 -2.5vh; border-radius: 50%; background: radial-gradient(circle, #fff 0 20%, #ffd84d 35%, #f5820b 60%, transparent 70%); animation: blink 0.2s steps(2) infinite; }
.bm-bomb { flex: 0 0 auto; width: 30vh; height: 30vh; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #59607a, #14161f 65%); border: 0.8vh solid #050608; display: flex; align-items: center; justify-content: center; box-shadow: 1.2vh 1.2vh 0 #050608; }
.bm-bomb-timer { font-family: var(--font-pixel); font-size: 7vh; color: var(--gold-bright); }
.bm-bomb.hot { animation: pzBeat 0.25s steps(3) infinite; }
.bm-bomb.hot .bm-bomb-timer { color: #ff4d5a; }
.bm-boom { font-size: 26vh; color: #ff4d5a; text-shadow: 0 1.6vh 0 var(--amber), 0 3.2vh 0 var(--crimson-shade), 0 4.8vh 0 #050608; animation: pzBeat 0.4s steps(4); }

.nv-wrap { padding: 24px 28px; display: flex; flex-direction: column; gap: 22px; align-items: center; }
.nv-rules { font-size: 19px; text-align: center; max-width: 1100px; }
.nv-rules b { color: var(--gold-bright); }
.nv-card {
  width: 100%; min-height: 470px; padding: 40px 60px; background: var(--bg-inset); border: 6px solid var(--gold);
  box-shadow: 10px 10px 0 #050608; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 22px;
}
.nv-count { font-size: 14px; color: var(--muted); }
.nv-lead { font-family: var(--font-pixel); font-size: 26px; color: var(--gold); }
.nv-text { font-family: var(--font-display); font-size: 64px; line-height: 1.2; color: #fff; animation: slotPop 0.3s steps(4); }
.nv-actions { display: flex; gap: 14px; }
.nv-actions .btn-lg { font-size: 24px; min-width: 380px; }

/* ============================================================================
   HOME BOARD v3 — two big columns (+ optional spare column from the top bar)
   ============================================================================ */
.cart-board { grid-template-columns: 1fr 1fr; gap: 30px; }
.cart-board.show-spare { grid-template-columns: 1fr 1fr 0.8fr; gap: 22px; }
#spare-col { display: none; }
.cart-board.show-spare #spare-col { display: flex; animation: spareIn 0.35s steps(5); }
@keyframes spareIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

#btn-spare.is-on { color: var(--ink-dark); background-color: var(--amber); border-color: #ffb257; }

.cart-col { gap: 12px; }
.cart-col-head { font-size: 26px; gap: 12px; padding-bottom: 8px; position: relative; border-bottom-width: 4px; }
.cart-col-key { font-size: 13px; padding: 6px 9px; }
.cart-col-head::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 4px; width: 22%;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  opacity: 0.55; animation: headSweep 4.5s linear infinite;
}
.cart-col.alco .cart-col-head::after { animation-delay: -2.2s; }
@keyframes headSweep { from { left: -22%; } to { left: 100%; } }

/* big cards */
.cart-board .cartridge {
  position: relative; overflow: hidden;
  grid-template-columns: 78px 1fr;
  column-gap: 18px; row-gap: 4px;
  padding: 14px 20px 15px 16px;
  min-height: 112px;
  transition: transform 0.12s steps(3), box-shadow 0.12s steps(3), border-color 0.12s, background-color 0.12s;
  animation: cartIn 0.42s steps(6) backwards;
}
.cart-board .cart-icon-wrap { width: 78px; height: 78px; transition: transform 0.15s steps(3); }
.cart-board .cart-icon-wrap .px-icon { width: 48px; height: 48px; }
.cart-board .cart-title { font-size: 28px; line-height: 1.1; }
.cart-board .cart-tag { font-size: 12px; padding: 2px 8px; }
.cart-board .cart-desc { font-size: 17px; color: var(--muted); }

.cart-col .cartridge:nth-of-type(1) { animation-delay: 0.03s; }
.cart-col .cartridge:nth-of-type(2) { animation-delay: 0.09s; }
.cart-col .cartridge:nth-of-type(3) { animation-delay: 0.15s; }
.cart-col .cartridge:nth-of-type(4) { animation-delay: 0.21s; }
.cart-col .cartridge:nth-of-type(5) { animation-delay: 0.27s; }
.cart-col.alco .cartridge { animation-name: cartInR; }
@keyframes cartIn  { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@keyframes cartInR { from { opacity: 0; transform: translateX(36px); }  to { opacity: 1; transform: none; } }

/* alco column gets a warm tint */
.cart-col.alco .cartridge { background-image: linear-gradient(100deg, rgba(230, 41, 55, 0.10), transparent 55%); }

/* shine sweep + START prompt on hover/focus */
.cart-board .cartridge::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.13), transparent);
  transform: skewX(-18deg); pointer-events: none; opacity: 0;
}
.cart-board .cartridge::before {
  content: "▶ START"; position: absolute; right: 14px; top: 12px;
  font-family: var(--font-pixel); font-size: 10px; color: var(--gold-bright);
  opacity: 0; pointer-events: none;
}
.cart-board .cartridge:hover,
.cart-board .cartridge:focus-visible {
  transform: translate(-3px, -4px);
  box-shadow: 7px 9px 0 #050608, 0 0 0 2px var(--gold), 0 0 26px rgba(245, 184, 0, 0.35);
}
.cart-board .cartridge.alco:hover,
.cart-board .cartridge.alco:focus-visible {
  box-shadow: 7px 9px 0 #050608, 0 0 0 2px var(--crimson), 0 0 26px rgba(230, 41, 55, 0.4);
}
.cart-board .cartridge:hover::after,
.cart-board .cartridge:focus-visible::after { opacity: 1; animation: cartShine 0.7s ease-out; left: 130%; }
.cart-board .cartridge:hover::before,
.cart-board .cartridge:focus-visible::before { animation: lvlBlink 0.8s steps(1) infinite; opacity: 1; }
.cart-board .cartridge.alco::before { color: #ff8c95; }
.cart-board .cartridge:hover .cart-icon-wrap,
.cart-board .cartridge:focus-visible .cart-icon-wrap { animation: iconBob 0.6s steps(2) infinite; }
@keyframes cartShine { from { left: -60%; } to { left: 130%; } }
@keyframes iconBob { 50% { transform: translateY(-4px) rotate(-4deg); } }
.cart-board .cartridge:active { transform: translate(0, 2px); box-shadow: 0 1px 0 #050608; }

/* narrower cards when the spare column is shown */
.cart-board.show-spare .cartridge { grid-template-columns: 62px 1fr; min-height: 96px; padding: 11px 14px 12px 12px; column-gap: 14px; }
.cart-board.show-spare .cart-icon-wrap { width: 62px; height: 62px; }
.cart-board.show-spare .cart-icon-wrap .px-icon { width: 38px; height: 38px; }
.cart-board.show-spare .cart-title { font-size: 23px; }
.cart-board.show-spare .cart-desc { font-size: 15px; }

@media (max-width: 900px) {
  .cart-board, .cart-board.show-spare { grid-template-columns: 1fr; }
}

/* ---------- Higher / Lower: next player ---------- */
.hl2-next { opacity: 0.75; }
.hl2-next .hl2-avatar { width: 88px; height: 88px; border-color: var(--border-strong); }
.hl2-next .hl2-name { font-size: 26px; }

/* ---------- Alco target: info board ---------- */
.at-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: stretch; }
.at-board-panel { padding: 22px; display: grid; place-items: center; }
.at-board { width: 100%; max-width: 560px; max-height: 66vh; aspect-ratio: 1; overflow: visible; filter: drop-shadow(8px 10px 0 #050608); }
.at-num { font-family: var(--font-pixel); font-size: 6px; fill: #fff; text-anchor: middle; paint-order: stroke; stroke: #050608; stroke-width: 1.6px; }
.at-num.bull { font-size: 8px; fill: var(--gold-bright); }
.at-miss-label { font-family: var(--font-pixel); font-size: 6px; fill: #8b93ab; text-anchor: middle; }
.at-dart { animation: dartThunk 3.2s steps(8) infinite; }
.at-dart line { stroke: var(--gold-bright); stroke-width: 3; stroke-linecap: square; }
.at-dart path { fill: #e8ecf5; }
.at-dart .at-fletch { fill: var(--crimson); }
@keyframes dartThunk {
  0% { transform: translate(60px, -60px); opacity: 0; }
  12% { transform: none; opacity: 1; }
  16% { transform: translate(1px, -1px); }
  85% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 0; }
}
.at-scheme { padding: 24px 26px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.at-scheme-head { font-size: 13px; color: var(--gold-bright); text-align: center; }
.at-legend { gap: 10px; }
.at-rule { padding: 12px 14px; align-items: center; }
.at-rule .at-ring { flex: 0 0 86px; font-size: 16px; padding: 12px 0; }
.at-rule-body { display: flex; flex-direction: column; gap: 3px; }
.at-rule-title { font-family: var(--font-display); font-size: 26px; font-weight: 400; line-height: 1.1; }
.at-rule-text { font-size: 17px; font-weight: 400; color: var(--muted); }
.at-rule.bull { border-color: var(--gold); }
.at-rule.bull .at-rule-title { color: var(--gold-bright); }
.at-foot { text-align: center; font-size: 18px; color: var(--muted); }

@media (max-width: 900px) { .at-layout { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .cart-board .cartridge, .cart-col-head::after, .at-dart,
  .cart-board .cartridge:hover .cart-icon-wrap, .cart-board.show-spare #spare-col { animation: none !important; }
}

@keyframes qBlink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0.25; }
}
.bw-result:empty { display: none; }
