@font-face {
  font-family: "Jersey10";
  src: url("./assets/fonts/Jersey10-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Silkscreen";
  src: url("./assets/fonts/Silkscreen-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ChakraPetch";
  src: url("./assets/fonts/ChakraPetch-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ChakraPetch";
  src: url("./assets/fonts/ChakraPetch-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky: #0b1120;
  --navy: #0e182d;
  --navy-deep: #09101f;
  --panel-border: #233b63;
  --cyan: #38c7f4;
  --gold-top: #ffd84d;
  --gold-bot: #f1a41b;
  --gold-edge: #fff2b8;
  --gold-shadow: #7a4b06;
  --emerald: #2ce68a;
  --crimson: #ff4d6a;
  --ink: #f6f9ff;
  --ink-muted: #b7c8e6;
  --ink-dim: #7f95ba;
  --outline: #151220;
  --turf-a: #1a4b2c;
  --turf-b: #205734;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--sky);
  color: var(--ink);
  font-family: "ChakraPetch", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

/* Full-bleed stadium dusk sky + mowed turf extending edge-to-edge under Duo/iOS safe areas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--sky);
  background-image:
    radial-gradient(900px 420px at 78% 12%, rgba(56, 199, 244, 0.11), transparent 70%),
    radial-gradient(760px 380px at 18% 8%, rgba(255, 216, 77, 0.08), transparent 65%),
    linear-gradient(180deg, #0b1120 0%, #0d1629 36%, rgba(11, 17, 32, 0.62) 60%, rgba(11, 17, 32, 0.9) 100%),
    repeating-linear-gradient(
      180deg,
      var(--turf-a) 0px,
      var(--turf-a) 36px,
      var(--turf-b) 36px,
      var(--turf-b) 72px
    );
}

/* Folded iPhone Duo (382x580 webview beside Safari's #0b1120 right toolbar rail):
   melt turf stripes & stadium glow seamlessly into #0b1120 before the right rail so there is zero vertical seam */
html.duo-folded body::before {
  background-image:
    linear-gradient(90deg, rgba(11, 17, 32, 0) 64%, rgba(11, 17, 32, 0.78) 88%, #0b1120 100%),
    radial-gradient(320px 260px at 36% 10%, rgba(56, 199, 244, 0.10), transparent 72%),
    radial-gradient(280px 240px at 14% 6%, rgba(255, 216, 77, 0.08), transparent 70%),
    linear-gradient(180deg, #0b1120 0%, #0c1426 38%, rgba(11, 17, 32, 0.66) 62%, #0b1120 100%),
    repeating-linear-gradient(
      180deg,
      var(--turf-a) 0px,
      var(--turf-a) 32px,
      var(--turf-b) 32px,
      var(--turf-b) 64px
    );
}

html.duo-folded .wrap {
  padding-left: 16px;
  padding-right: 16px;
}

html.duo-folded .topbar {
  padding-top: 10px;
  padding-bottom: 10px;
}

html.duo-folded .hero {
  padding: 4px 0 24px;
}

html.duo-folded .hero-grid {
  gap: 20px;
}

html.duo-folded .hero-title {
  font-size: 56px;
}

html.duo-folded .hero-copy {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.42;
}

html.duo-folded .cta-stack {
  margin-top: 16px;
  gap: 10px;
}

html.duo-folded .btn {
  padding: 12px 14px;
}

html.duo-folded .btn-label {
  font-size: 21px;
}

html.duo-folded .device-frame {
  width: min(268px, 100%);
  padding: 8px;
  border-radius: 26px;
}

html.duo-folded .footer {
  border-top: none;
  background: linear-gradient(90deg, rgba(9, 16, 31, 0.85) 0%, #0b1120 96%);
  position: relative;
}

html.duo-folded .footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(35, 59, 99, 0.65) 0%, rgba(35, 59, 99, 0.35) 72%, rgba(11, 17, 32, 0) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img.pixel,
.pixel-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(24px, calc(env(safe-area-inset-left, 0px) + 16px));
  padding-right: max(24px, calc(env(safe-area-inset-right, 0px) + 16px));
}

/* Minimal top bar */
.topbar {
  padding-top: max(16px, calc(env(safe-area-inset-top, 0px) + 8px));
  padding-bottom: 16px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 2px solid var(--outline);
  box-shadow: 0 2px 0 var(--outline);
  display: block;
}

.brand-word {
  font-family: "Jersey10", monospace;
  font-size: 27px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
  text-shadow: 2px 2px 0 var(--outline);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topnav a {
  font-family: "Silkscreen", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  transition: color 120ms ease;
}

.topnav a:hover {
  color: var(--gold-top);
}

/* Main Hero Stage */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero {
  position: relative;
  padding: 6px 0 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 48px;
  align-items: center;
}

.hero-title {
  margin: 0;
  font-family: "Jersey10", monospace;
  font-size: clamp(64px, 8.6vw, 108px);
  line-height: 0.88;
  letter-spacing: 0.025em;
  color: #ffffff;
  text-shadow:
    5px 5px 0 var(--outline),
    -2px -2px 0 var(--outline),
    2px -2px 0 var(--outline),
    -2px 2px 0 var(--outline);
}

.hero-copy {
  margin: 22px 0 0;
  max-width: 470px;
  font-size: 19px;
  line-height: 1.5;
  font-weight: 600;
  color: #e4eefc;
  text-shadow: 0 2px 6px rgba(9, 14, 26, 0.75);
}

/* Game-authentic tactile buttons */
.cta-stack {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 410px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 90ms ease, box-shadow 90ms ease, filter 120ms ease;
}

.btn-gold {
  background: linear-gradient(180deg, var(--gold-top) 0%, var(--gold-bot) 100%);
  border: 2px solid var(--gold-edge);
  color: #0e1320;
  box-shadow: 0 5px 0 var(--gold-shadow), 0 10px 24px rgba(0, 0, 0, 0.38);
}

.btn-gold:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 6px 0 var(--gold-shadow), 0 12px 26px rgba(0, 0, 0, 0.42);
}

.btn-gold:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--gold-shadow);
}

.btn-static {
  cursor: default;
  justify-content: center;
}

.btn-static:hover,
.btn-static:active {
  filter: none;
  transform: none;
  box-shadow: 0 5px 0 var(--gold-shadow), 0 10px 24px rgba(0, 0, 0, 0.38);
}

.btn-cyan {
  background: rgba(14, 24, 45, 0.94);
  border: 2px solid var(--cyan);
  color: #ffffff;
  box-shadow: 0 5px 0 #070d1a, 0 10px 22px rgba(0, 0, 0, 0.32);
}

.btn-cyan:hover {
  background: #142547;
  transform: translateY(-1px);
  box-shadow: 0 6px 0 #070d1a, 0 12px 24px rgba(0, 0, 0, 0.36);
}

.btn-cyan:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #070d1a;
}

.btn-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.apple-svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}

.btn-label {
  font-family: "Jersey10", monospace;
  font-size: 28px;
  line-height: 0.95;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.btn-chevron {
  font-family: "Silkscreen", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.btn-cyan .btn-chevron {
  color: var(--gold-top);
}

/* Right Column: Live Playable Pixel-Bezel iPhone Showcase */
.stage-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.device-frame {
  position: relative;
  width: min(304px, 100%);
  padding: 10px;
  background: #0c1220;
  border: 3px solid #2e4b78;
  border-radius: 30px;
  box-shadow:
    0 10px 0 #070b14,
    0 24px 56px rgba(0, 0, 0, 0.58),
    0 0 36px rgba(56, 199, 244, 0.14);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.device-frame:hover {
  border-color: #3d639b;
  box-shadow:
    0 10px 0 #070b14,
    0 26px 60px rgba(0, 0, 0, 0.62),
    0 0 42px rgba(44, 230, 138, 0.18);
}

.device-screen {
  position: relative;
  border-radius: 21px;
  overflow: hidden;
  background: #0b1120;
  aspect-ratio: 220 / 468;
  border: 2px solid #050810;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.phone-stage {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  cursor: pointer;
}

.phone-stage.is-active {
  opacity: 1;
  pointer-events: auto;
}

.phone-stage.stage-dark {
  background:
    radial-gradient(220px 140px at 50% 0%, rgba(56, 199, 244, 0.16), transparent 72%),
    linear-gradient(180deg, #0b1326 0%, #0a1727 56%, #0d241b 100%);
}

#pitchCanvas,
#lbwCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Shared In-Game Phone HUD Overlay (PLAY & LBW) */
.phone-top-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.hud-sfx-btn {
  appearance: none;
  pointer-events: auto;
  background: rgba(14, 24, 45, 0.92);
  border: 2px solid #2b456f;
  border-radius: 2px;
  padding: 4px 7px;
  font-family: "Silkscreen", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--outline);
  transition: background-color 100ms ease, border-color 100ms ease, color 100ms ease;
}

.hud-sfx-btn:hover {
  border-color: var(--cyan);
  color: #ffffff;
}

.hud-sfx-btn.is-on {
  background: var(--emerald);
  border-color: #a9ffd4;
  color: #06180f;
}

.hud-delivery {
  flex: 1;
  text-align: center;
  background: rgba(11, 19, 36, 0.88);
  border: 2px solid #29446e;
  border-radius: 2px;
  padding: 4px 6px;
  font-family: "Silkscreen", monospace;
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: #eef5ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 0 var(--outline);
}

.hud-delivery.is-lbw {
  border-color: var(--cyan);
}

.phone-callout {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: "Jersey10", monospace;
  font-size: 46px;
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow:
    3px 3px 0 var(--outline),
    -2px -2px 0 var(--outline),
    2px -2px 0 var(--outline),
    -2px 2px 0 var(--outline);
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
  transition: opacity 120ms ease, transform 160ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.phone-callout.is-visible {
  opacity: 1;
  transform: scale(1);
}

.phone-callout.is-six {
  color: var(--gold-top);
}

.phone-callout.is-four {
  color: var(--cyan);
}

.phone-callout.is-out {
  color: var(--crimson);
}

.phone-bottom-hud {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}

.hud-hint {
  align-self: center;
  background: rgba(11, 18, 34, 0.88);
  border: 1.5px solid rgba(56, 199, 244, 0.55);
  border-radius: 2px;
  padding: 3px 8px;
  font-family: "Silkscreen", monospace;
  font-size: 8px;
  letter-spacing: 0.04em;
  color: var(--gold-top);
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 0 var(--outline);
}

.hud-scorebar {
  background: rgba(11, 19, 36, 0.94);
  border: 2px solid #2b456f;
  border-left: 4px solid var(--cyan);
  border-radius: 2px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  box-shadow: 0 3px 0 var(--outline);
}

.hud-scorebar.is-pak {
  border-left-color: var(--emerald);
}

.hud-team {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.hud-code {
  font-family: "Silkscreen", monospace;
  font-size: 9px;
  color: var(--cyan);
}

.hud-code.is-pak {
  color: var(--emerald);
}

.hud-score {
  font-family: "Jersey10", monospace;
  font-size: 22px;
  line-height: 0.9;
  color: #ffffff;
}

.hud-overs {
  font-family: "Silkscreen", monospace;
  font-size: 7.5px;
  color: var(--ink-dim);
  white-space: nowrap;
}

.hud-timeline {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.hud-pill {
  min-width: 15px;
  height: 15px;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #172746;
  border: 1px solid #304c7a;
  border-radius: 2px;
  font-family: "Silkscreen", monospace;
  font-size: 8px;
  color: #d6e4fb;
}

.hud-pill.is-six {
  background: var(--gold-top);
  border-color: var(--gold-edge);
  color: #141118;
}

.hud-pill.is-four {
  background: var(--cyan);
  border-color: #b5eeff;
  color: #071824;
}

.hud-pill.is-out {
  background: var(--crimson);
  border-color: #ff9faf;
  color: #ffffff;
}

/* STAGE 2: Animated LBW Ball-Tracker Card */
.lbw-banner {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%) scale(0.75);
  background: linear-gradient(180deg, #4b1420 0%, #2a0a12 100%);
  border: 2px solid var(--crimson);
  padding: 3px 14px;
  font-family: "Jersey10", monospace;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--outline);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 160ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.lbw-banner.is-visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.lbw-overlay {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.lbw-card {
  background: rgba(11, 18, 34, 0.96);
  border: 2px solid var(--gold-top);
  border-radius: 2px;
  padding: 8px;
  box-shadow: 0 4px 0 var(--outline);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lbw-card-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: "Silkscreen", monospace;
  font-size: 7px;
  letter-spacing: 0.04em;
  color: var(--gold-top);
  margin-bottom: 1px;
}

.lbw-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--crimson);
  display: inline-block;
}

.lbw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #101d36;
  border: 1px solid #243b63;
  padding: 4px 7px;
  font-family: "Silkscreen", monospace;
  font-size: 7.5px;
  color: var(--ink-muted);
}

.lbw-val {
  padding: 2px 7px;
  min-width: 72px;
  text-align: center;
  background: #1b2c4e;
  color: var(--ink-dim);
  border-radius: 1px;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.lbw-row.is-lit .lbw-val {
  background: #e33458;
  color: #ffffff;
  transform: scale(1.03);
}

.lbw-verdict {
  text-align: center;
  padding: 5px 6px;
  font-family: "Silkscreen", monospace;
  font-size: 8px;
  letter-spacing: 0.04em;
  background: #162442;
  color: var(--ink-dim);
  border: 1px solid #294370;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.lbw-verdict.is-lit {
  background: #e33458;
  border-color: #ff9cb0;
  color: #ffffff;
}

/* STAGE 3: Animated SUPER 5 CUP Bracket */
.cup-screen {
  height: 100%;
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
}

.cup-head,
.wheel-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cup-head-trophy {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.cup-title,
.wheel-title {
  font-family: "Jersey10", monospace;
  font-size: 24px;
  line-height: 0.92;
  letter-spacing: 0.03em;
  color: var(--gold-top);
  text-shadow: 2px 2px 0 var(--outline);
}

.cup-sub,
.wheel-sub {
  font-family: "Silkscreen", monospace;
  font-size: 7px;
  letter-spacing: 0.04em;
  color: var(--cyan);
  margin-top: 2px;
}

.cup-group {
  background: rgba(13, 23, 44, 0.94);
  border: 1.5px solid #263f6b;
  border-radius: 2px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cup-group-hdr {
  display: grid;
  grid-template-columns: 1fr 34px 26px;
  font-family: "Silkscreen", monospace;
  font-size: 7px;
  color: var(--gold-top);
  border-bottom: 1px solid #223861;
  padding-bottom: 3px;
  text-align: right;
}

.cup-group-hdr span:first-child {
  text-align: left;
}

.cup-row {
  display: grid;
  grid-template-columns: 1fr 34px 26px;
  align-items: center;
  font-family: "Silkscreen", monospace;
  font-size: 8px;
  color: var(--ink-muted);
  padding: 2.5px 4px;
  border-left: 2px solid transparent;
  text-align: right;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.cup-row.is-qualified {
  background: rgba(44, 230, 138, 0.14);
  border-left-color: var(--emerald);
  color: #ffffff;
}

.cup-team {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-align: left;
}

.cup-pts {
  color: var(--gold-top);
}

.swatch {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  display: inline-block;
  border: 1px solid #080d18;
}
.sw-pak { background: #1ea858; }
.sw-ind { background: #2994f2; }
.sw-aus { background: #f5c836; }
.sw-eng { background: #3652b8; }
.sw-nzl { background: #4a5568; }
.sw-rsa { background: #267d46; }
.sw-sri { background: #1e4ea8; }
.sw-win { background: #9c253b; }

.cup-ko {
  background: rgba(13, 23, 44, 0.96);
  border: 1.5px solid var(--cyan);
  border-radius: 2px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cup-ko-hdr {
  font-family: "Silkscreen", monospace;
  font-size: 7.5px;
  color: var(--cyan);
}

.cup-sf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.cup-match {
  background: #0d172e;
  border: 1.5px solid #243b63;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.cup-match.is-resolved {
  border-color: var(--emerald);
  background: rgba(44, 230, 138, 0.12);
}

.cup-mlbl {
  font-family: "Silkscreen", monospace;
  font-size: 6.5px;
  color: var(--ink-dim);
}

.cup-mteams {
  font-family: "Silkscreen", monospace;
  font-size: 8px;
  color: var(--ink-muted);
}

.cup-match.is-resolved strong {
  color: var(--gold-top);
}

.cup-final {
  background: #0c162b;
  border: 1.5px solid #354c75;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.cup-final.is-unlocked {
  border-color: var(--gold-top);
  background: rgba(255, 216, 77, 0.13);
  box-shadow: 0 0 14px rgba(255, 216, 77, 0.25);
}

.cup-flbl {
  font-family: "Silkscreen", monospace;
  font-size: 6.5px;
  color: var(--gold-top);
}

.cup-fteams {
  font-family: "Silkscreen", monospace;
  font-size: 8.5px;
  color: #ffffff;
}

.cup-cta {
  background: linear-gradient(180deg, var(--gold-top) 0%, var(--gold-bot) 100%);
  border: 2px solid var(--gold-edge);
  color: #0e1320;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Silkscreen", monospace;
  font-size: 8.5px;
  box-shadow: 0 3px 0 var(--gold-shadow);
  transition: filter 160ms ease, transform 160ms ease;
}

.cup-cta.is-pulsing {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* STAGE 4: Animated 360° Wagon Wheel */
.wheel-screen {
  height: 100%;
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.wheel-panel {
  background: rgba(13, 23, 44, 0.95);
  border: 1.5px solid #263f6b;
  border-radius: 2px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wheel-panel-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-family: "Silkscreen", monospace;
  font-size: 7.5px;
  color: var(--gold-top);
}

.wheel-meta {
  font-size: 7px;
  color: #e4eefc;
}

.wheel-canvas-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wheelCanvas {
  width: 100%;
  height: auto;
  display: block;
}

.w-dir {
  position: absolute;
  font-family: "Silkscreen", monospace;
  font-size: 6.5px;
  color: var(--ink-dim);
  pointer-events: none;
}

.w-top { top: 2px; left: 50%; transform: translateX(-50%); }
.w-bot { bottom: 2px; left: 50%; transform: translateX(-50%); }
.w-left { left: 4px; top: 50%; transform: translateY(-50%); }
.w-right { right: 4px; top: 50%; transform: translateY(-50%); }

.wheel-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: "Silkscreen", monospace;
  font-size: 7px;
  color: var(--ink-muted);
}

.leg-dot {
  width: 7px;
  height: 4px;
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}
.leg-dot.is-six { background: var(--gold-top); }
.leg-dot.is-four { background: var(--emerald); }
.leg-dot.is-run { background: var(--cyan); }

.wheel-card {
  background: rgba(13, 23, 44, 0.96);
  border: 1.5px solid #263f6b;
  border-top: 3px solid var(--emerald);
  border-radius: 2px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wheel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.w-stat {
  background: #0c162b;
  border: 1px solid #223861;
  padding: 5px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.w-slbl {
  font-family: "Silkscreen", monospace;
  font-size: 6.5px;
  color: var(--ink-dim);
}

.w-sval {
  font-family: "Jersey10", monospace;
  font-size: 22px;
  line-height: 0.95;
  color: #ffffff;
}

.w-sval.is-gold { color: var(--gold-top); }
.w-sval.is-em { color: var(--emerald); }

.wheel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #0c162b;
  border: 1px solid #223861;
  padding: 5px 7px;
  font-family: "Silkscreen", monospace;
  font-size: 7px;
  color: var(--ink-muted);
}

.wheel-row strong.is-gold { color: var(--gold-top); }
.wheel-row strong.is-cyan { color: var(--cyan); }

/* Crisp Auto-Cycling Arcade Screen Switcher Tabs */
.shot-tabs {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: min(344px, 100%);
}

.shot-tab {
  position: relative;
  overflow: hidden;
  appearance: none;
  background: rgba(14, 24, 45, 0.9);
  border: 2px solid var(--panel-border);
  border-radius: 2px;
  padding: 8px 4px 10px;
  font-family: "Silkscreen", monospace;
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color 110ms ease, color 110ms ease, background-color 110ms ease;
}

.shot-tab:hover {
  border-color: var(--cyan);
  color: #ffffff;
}

.shot-tab[aria-selected="true"] {
  background: var(--emerald);
  border-color: #a9ffd4;
  color: #06180f;
}

.tab-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0%;
  background: #062b19;
  pointer-events: none;
}

/* Broadcast Scorebug Strip with Animated Real Voxel Sprites */
.scorebug-section {
  padding: 6px 0 42px;
}

.scorebug {
  background: rgba(13, 23, 43, 0.95);
  border: 2px solid var(--panel-border);
  border-left: 5px solid var(--cyan);
  border-radius: 2px;
  box-shadow: 0 6px 0 #070c17;
  padding: 20px 24px;
}

.scorebug-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.spec-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border-left: 2px solid rgba(56, 199, 244, 0.25);
  padding-left: 16px;
}

.spec-item:first-child {
  border-left: none;
  padding-left: 0;
}

.spec-sprite {
  width: 72px;
  height: 70px;
  display: block;
}

.spec-trophy-wrap {
  width: 72px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spec-trophy {
  width: 62px;
  height: 62px;
  object-fit: contain;
  display: block;
  animation: trophyBob 2.4s steps(4, end) infinite;
}

@keyframes trophyBob {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 3px 0 #151220);
  }
  50% {
    transform: translateY(-4px);
    filter: drop-shadow(0 6px 0 #151220) brightness(1.08);
  }
}

.spec-head {
  font-family: "Silkscreen", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gold-top);
  margin: 0 0 6px;
}

.spec-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--ink-muted);
}

/* Secondary Pages (Privacy & Support) */
.doc-stage {
  padding: 22px 0 56px;
}

.doc-card {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(13, 23, 43, 0.96);
  border: 2px solid var(--panel-border);
  border-top: 4px solid var(--gold-top);
  border-radius: 2px;
  box-shadow: 0 8px 0 #070c17;
  padding: 32px 32px 36px;
}

.doc-title {
  margin: 0 0 22px;
  font-family: "Jersey10", monospace;
  font-size: clamp(44px, 6vw, 60px);
  line-height: 0.95;
  letter-spacing: 0.03em;
  color: #ffffff;
  text-shadow: 3px 3px 0 var(--outline);
}

.doc-card h2 {
  margin: 26px 0 8px;
  font-family: "Silkscreen", monospace;
  font-size: 12px;
  letter-spacing: 0.07em;
  color: var(--gold-top);
}

.doc-card p,
.doc-card li {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--ink-muted);
}

.doc-card ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.doc-card strong {
  color: #ffffff;
}

.doc-link {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-link:hover {
  color: var(--gold-top);
}

/* Minimal 1-line Footer */
.footer {
  border-top: 2px solid rgba(35, 59, 99, 0.6);
  background: rgba(9, 16, 31, 0.9);
  padding-top: 18px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: "Silkscreen", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--gold-top);
}

@media (prefers-reduced-motion: reduce) {
  .spec-trophy {
    animation: none;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .scorebug-rows {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .spec-item {
    border-left: none;
    border-top: 2px solid rgba(56, 199, 244, 0.2);
    padding-left: 0;
    padding-top: 16px;
  }

  .spec-item:first-child {
    border-top: none;
    padding-top: 0;
  }
}

@media (max-width: 880px) {
  .hero {
    padding: 8px 0 32px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-copy {
    font-size: 17px;
  }

  .cta-stack {
    max-width: 100%;
  }

  .scorebug {
    padding: 18px;
  }

  .doc-card {
    padding: 24px 20px 28px;
  }
}

@media (max-width: 520px) {
  .wrap {
    padding-left: max(18px, calc(env(safe-area-inset-left, 0px) + 14px));
    padding-right: max(18px, calc(env(safe-area-inset-right, 0px) + 14px));
  }

  .brand-word {
    font-size: 22px;
  }

  .topnav {
    gap: 14px;
  }

  .btn {
    padding: 14px 16px;
  }

  .btn-label {
    font-size: 22px;
  }

  .device-frame {
    width: min(286px, 100%);
  }

  .spec-item {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px;
  }

  .spec-sprite,
  .spec-trophy-wrap {
    width: 60px;
    height: 58px;
  }

  .spec-trophy {
    width: 54px;
    height: 54px;
  }
}
