:root {
  --bg-top: #09111f;
  --bg-bottom: #0d1a2c;
  --panel: rgba(10, 21, 38, 0.88);
  --panel-border: #37517c;
  --panel-highlight: #a1c0f0;
  --text: #ecf4ff;
  --muted: #9fb4d4;
  --accent: #f5c542;
  --accent-dark: #9e7200;
  --danger: #ff7676;
  --field: #1f7a3a;
  --field-dark: #185e2d;
  --field-light: #2e9a49;
  --line: rgba(255, 255, 255, 0.92);
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  font-family: "Trebuchet MS", "Verdana", sans-serif;
}

body {
  position: relative;
}

.backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(80, 123, 196, 0.25), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.02) 75%, transparent 75%, transparent 100%);
  background-size: auto, 18px 18px;
  pointer-events: none;
}

.shell {
  position: relative;
  z-index: 1;
  width: calc(100vw - 12px);
  max-width: none;
  margin: 6px auto 18px;
  display: grid;
  gap: 16px;
}

.panel {
  position: relative;
  padding: 16px;
  border: 2px solid var(--panel-border);
  background: var(--panel);
  box-shadow: 0 12px 28px var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.03);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  align-items: end;
}

.eyebrow,
.panel-kicker,
.hero-meta strong,
.stage-meta,
label span {
  font-family: "Lucida Console", "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
}

h1,
h2,
h3,
button,
select,
input {
  font-family: "Lucida Console", "Courier New", monospace;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  line-height: 1.05;
}

h2,
h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy,
#play-caption,
#sim-notes,
#box-score,
#play-log,
#rosters,
#league-grid,
#scoreboard,
#live-stats {
  color: var(--muted);
}

.hero-copy {
  max-width: 66ch;
  margin: 12px 0 0;
  line-height: 1.55;
}

.hero-meta {
  display: grid;
  gap: 10px;
  align-self: stretch;
}

.stat-chip {
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-chip strong {
  display: block;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 6px;
}

.stat-chip span {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
}

.controls .control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
}

select,
input,
button {
  min-height: 44px;
  border: 2px solid #5a7bb4;
  background: #13233f;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.9rem;
}

button {
  cursor: pointer;
  background: linear-gradient(180deg, #f5c542, #b98605);
  border-color: #f7d980;
  color: #191201;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

button.secondary {
  background: #1c355f;
  border-color: #6b8cc2;
  color: var(--text);
}

.button-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.stage-grid,
.top-grid,
.lower-grid,
.bottom-grid,
.sim-support-grid {
  display: grid;
  gap: 16px;
}

.stage-grid {
  grid-template-columns: minmax(0, 1.82fr) minmax(360px, 1fr);
  align-items: start;
}

body:not(.debug-mode) .controls,
body:not(.debug-mode) .play-controls,
body:not(.debug-mode) .sim-support-grid,
body:not(.debug-mode) .play-caption-strip {
  display: none;
}

.sim-column {
  min-width: 0;
  display: grid;
  gap: 16px;
  align-content: start;
}

.top-grid {
  grid-template-columns: 1.3fr 1fr;
}

.lower-grid,
.bottom-grid,
.sim-support-grid {
  grid-template-columns: 1fr 1fr;
}

.panel-title-row,
.stage-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.stage-panel {
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-screen {
  position: relative;
  display: grid;
  gap: 10px;
}

.field-viewport {
  position: relative;
}

.stage-screen:fullscreen {
  --fullscreen-gap: clamp(6px, 1.2vh, 14px);
  --fullscreen-hud-space: clamp(84px, 15vh, 118px);
  width: 100vw;
  height: 100vh;
  background: #020713;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: var(--fullscreen-gap);
  box-sizing: border-box;
  padding:
    max(8px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  overflow: hidden;
}

.stage-screen:fullscreen .field-viewport {
  --field-aspect: 1.7647;
  --field-aspect-ratio: 960 / 544;
  width: min(calc(100vw - 20px), calc((100vh - var(--fullscreen-hud-space) - var(--fullscreen-gap)) * var(--field-aspect)));
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - var(--fullscreen-hud-space) - var(--fullscreen-gap));
  aspect-ratio: var(--field-aspect-ratio);
  display: grid;
  place-items: center;
  min-height: 0;
}

.stage-screen:fullscreen #field-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
}

.stage-screen:fullscreen .broadcast-hud {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 12;
  width: min(784px, calc(100vw - 32px));
  transform: none;
  pointer-events: none;
}

.stage-screen:fullscreen .play-caption-strip {
  display: none;
}

@media (orientation: landscape) {
  .stage-screen:fullscreen {
    --fullscreen-hud-space: clamp(78px, 14vh, 104px);
  }

  .stage-screen:fullscreen .broadcast-hud {
    width: min(980px, calc(100vw - 32px));
  }

  .stage-screen:fullscreen .broadcast-scorebar {
    width: 100%;
  }

  .stage-screen:fullscreen .broadcast-main-row {
    grid-template-columns: minmax(0, 1fr) clamp(216px, 24vw, 270px) minmax(0, 1fr);
  }
}

@media (orientation: landscape) and (max-height: 680px) {
  .stage-screen:fullscreen {
    --fullscreen-gap: clamp(4px, 0.9vh, 9px);
    --fullscreen-hud-space: clamp(68px, 13vh, 88px);
    grid-template-rows: 1fr;
    padding:
      max(4px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  .stage-screen:fullscreen .field-viewport {
    width: min(calc(100vw - 16px), calc((100vh - 12px) * var(--field-aspect)));
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 12px);
  }

  .stage-screen:fullscreen .broadcast-hud {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: max(10px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
  }

  .stage-screen:fullscreen .broadcast-scorebar {
    --scorebug-height: clamp(40px, 7vh, 49px);
    --scorebug-strip-height: clamp(18px, 3.1vh, 21px);
    width: min(560px, calc(100vw - 40px));
    border-radius: 5px;
  }

  .stage-screen:fullscreen .broadcast-main-row {
    grid-template-columns: minmax(0, 1fr) clamp(112px, 19vw, 142px) minmax(0, 1fr);
  }

  .stage-screen:fullscreen .broadcast-team {
    grid-template-columns: clamp(44px, 8vh, 58px) minmax(0, 1fr);
    padding-right: clamp(6px, 1.2vw, 10px);
  }

  .stage-screen:fullscreen .broadcast-team-home {
    grid-template-columns: minmax(0, 1fr) clamp(44px, 8vh, 58px);
    padding-right: 0;
    padding-left: clamp(6px, 1.2vw, 10px);
  }

  .stage-screen:fullscreen .broadcast-team-logo-wrap {
    width: clamp(44px, 8vh, 58px);
    height: var(--scorebug-height);
  }

  .stage-screen:fullscreen .broadcast-team-city {
    font-size: min(var(--team-city-size, 0.56rem), 0.56rem);
    letter-spacing: min(var(--team-city-tracking, 0.1em), 0.1em);
  }

  .stage-screen:fullscreen .broadcast-team-name {
    font-size: min(var(--team-name-size, 0.82rem), 0.82rem);
  }

  .stage-screen:fullscreen .broadcast-team-score {
    min-width: 38px;
    font-size: clamp(2.15rem, 6.6vh, 2.72rem);
  }

  .stage-screen:fullscreen .broadcast-state {
    gap: clamp(14px, 3vw, 22px);
    padding: 0 10px;
    font-size: 0.58rem;
  }

  .stage-screen:fullscreen .broadcast-game-clock {
    font-size: clamp(0.78rem, 2.3vh, 0.94rem);
  }

  .stage-screen:fullscreen .broadcast-down-distance {
    font-size: clamp(0.7rem, 2vh, 0.8rem);
  }

  .stage-screen:fullscreen .broadcast-final-label {
    font-size: clamp(0.78rem, 2.1vh, 0.9rem);
  }
}

@media (orientation: landscape) and (max-height: 480px) {
  .stage-screen:fullscreen {
    --fullscreen-hud-space: clamp(58px, 13vh, 70px);
  }

  .stage-screen:fullscreen .broadcast-scorebar {
    width: min(500px, calc(100vw - 32px));
  }
}

.live-stats-panel,
.league-panel,
.roster-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.live-stats-panel {
  max-height: none;
}

.live-stats {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding-right: 6px;
  flex: 1;
  min-height: 0;
}

.roster-panel .roster-wrap,
.league-panel .league-grid {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.live-stats-meta-line {
  color: var(--accent);
  font-size: 0.72rem;
  font-family: "Lucida Console", "Courier New", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-stats-section {
  display: grid;
  gap: 10px;
}

.live-stats-section h3 {
  font-size: 0.8rem;
}

.live-stats-team-banner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.live-stats-team-label {
  appearance: none;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  min-height: 0;
  padding: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font: inherit;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.live-stats-team-label strong {
  font-size: 0.82rem;
}

.live-stats-team-label span {
  color: var(--text);
}

.live-stats-team-label.active {
  border-color: rgba(245, 197, 66, 0.62);
  background:
    linear-gradient(90deg, rgba(245, 197, 66, 0.18), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 3px 0 0 rgba(245, 197, 66, 0.86),
    0 0 0 1px rgba(245, 197, 66, 0.08);
}

.live-stats-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.live-stats-team {
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-self: start;
}

.live-stats-team-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 8px;
  color: var(--text);
}

.live-stats-team-head strong {
  font-size: 0.82rem;
}

.live-stats-team-head span {
  color: var(--panel-highlight);
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.live-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.live-stats-table th,
.live-stats-table td {
  padding: 5px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
  white-space: nowrap;
}

.live-stats-table th:first-child,
.live-stats-table td:first-child {
  text-align: left;
}

.live-stats-table th {
  color: var(--panel-highlight);
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}

.live-stats-player {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-stats-empty {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.stage-meta {
  color: var(--accent);
  font-size: 0.72rem;
}

#field-canvas {
  width: 100%;
  height: auto;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: #0c1b10;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.fullscreen-button {
  position: absolute;
  right: 14px;
  bottom: 58px;
  z-index: 10;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(219, 250, 255, 0.24);
  background: rgba(4, 10, 20, 0.34);
  color: rgba(232, 250, 255, 0.74);
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
  cursor: pointer;
  transition: opacity 150ms ease, background 150ms ease, border-color 150ms ease;
}

.stage-screen:fullscreen .fullscreen-button {
  bottom: 14px;
}

.stage-screen:not(:fullscreen) .field-viewport:hover .fullscreen-button {
  opacity: 0.42;
}

.fullscreen-button:focus-visible {
  opacity: 0.42;
}

.stage-screen:fullscreen.fullscreen-controls-visible .fullscreen-button {
  opacity: 0.42;
}

.stage-screen.fullscreen-hint-visible .fullscreen-button {
  opacity: 0.42;
  background: rgba(4, 12, 24, 0.58);
  border-color: rgba(219, 250, 255, 0.36);
}

.fullscreen-button:hover,
.fullscreen-button:focus-visible {
  opacity: 0.78;
  background: rgba(4, 12, 24, 0.62);
  border-color: rgba(219, 250, 255, 0.42);
  outline: none;
}

.stage-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(5, 12, 22, 0.9), rgba(9, 20, 36, 0.94)),
    radial-gradient(circle at top, rgba(111, 190, 255, 0.18), transparent 42%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease;
}

.stage-loading-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.pregame-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 34px);
  background:
    radial-gradient(circle at 24% 44%, rgba(191, 133, 64, 0.22), transparent 28%),
    radial-gradient(circle at 76% 44%, rgba(42, 197, 225, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(2, 6, 12, 0.98), rgba(4, 10, 19, 0.99));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 520ms ease, visibility 520ms ease;
}

.pregame-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pregame-card {
  width: min(820px, 100%);
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  text-align: center;
}

.pregame-matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(14px, 3vw, 34px);
  align-items: center;
  padding: clamp(14px, 3vw, 28px);
  border: 1px solid rgba(209, 238, 255, 0.18);
  background:
    linear-gradient(90deg, rgba(191, 133, 64, 0.14), rgba(8, 18, 32, 0.92) 32%, rgba(8, 18, 32, 0.92) 68%, rgba(42, 197, 225, 0.13)),
    rgba(3, 9, 18, 0.92);
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.pregame-kicker {
  margin: 0;
  color: var(--accent);
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: clamp(0.64rem, 1.4vw, 0.8rem);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pregame-team {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.pregame-team img {
  width: clamp(82px, 16vw, 148px);
  height: clamp(82px, 16vw, 148px);
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.56));
}

.pregame-team span,
.pregame-center span,
.pregame-center small {
  color: rgba(236, 244, 255, 0.72);
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: clamp(0.58rem, 1.2vw, 0.76rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pregame-team strong {
  color: #f7fbff;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: clamp(1rem, 2.8vw, 1.9rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.pregame-center {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-width: clamp(112px, 18vw, 172px);
  padding: 10px 14px;
  border-inline: 1px solid rgba(245, 197, 66, 0.28);
}

.pregame-center strong {
  color: var(--accent);
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: clamp(1.1rem, 2.6vw, 1.9rem);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .pregame-matchup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 11px;
  }

  .pregame-center {
    grid-column: 1 / -1;
    order: -1;
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border-inline: 0;
    border-block: 1px solid rgba(245, 197, 66, 0.22);
  }

  .pregame-overlay {
    padding: 10px;
  }

  .pregame-card {
    gap: 9px;
  }

  .pregame-team {
    gap: 5px;
  }

  .pregame-team img {
    width: 58px;
    height: 58px;
  }

  .pregame-team span,
  .pregame-center span,
  .pregame-center small {
    font-size: 0.52rem;
    letter-spacing: 0.1em;
  }

  .pregame-team strong {
    font-size: clamp(0.78rem, 4.2vw, 0.98rem);
    line-height: 1.05;
  }

  .pregame-center strong {
    font-size: clamp(0.98rem, 5vw, 1.14rem);
  }
}

.stage-loading-overlay.error .stage-loading-fill {
  background: linear-gradient(90deg, #ff8a8a, #ff5f5f);
  box-shadow: 0 0 18px rgba(255, 118, 118, 0.35);
}

.stage-loading-card {
  width: min(420px, 100%);
  padding: 18px 20px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(11, 23, 40, 0.96), rgba(8, 16, 30, 0.98));
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.stage-loading-kicker,
.stage-loading-meta {
  margin: 0;
  font-family: "Lucida Console", "Courier New", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stage-loading-kicker {
  color: var(--accent);
  font-size: 0.72rem;
}

.stage-loading-title {
  margin: 10px 0 8px;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.12;
}

.stage-loading-status {
  margin: 0 0 14px;
  color: rgba(236, 244, 255, 0.78);
  font-size: 0.84rem;
  line-height: 1.45;
}

.stage-loading-bar {
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.stage-loading-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #6cb8ff, #f5c542);
  box-shadow: 0 0 18px rgba(111, 190, 255, 0.32);
  transition: width 120ms linear;
}

.stage-loading-meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(236, 244, 255, 0.72);
  font-size: 0.66rem;
}

.score-grid {
  display: grid;
  gap: 12px;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

.score-table th,
.score-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.score-table th:first-child,
.score-table td:first-child {
  text-align: left;
}

.score-banner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.team-score {
  padding: 14px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.team-score .label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.team-score .value {
  margin-top: 6px;
  font-size: 2.6rem;
  color: var(--text);
}

.summary {
  line-height: 1.5;
  color: var(--text);
}

.note-list,
.highlight-list,
.leader-list,
.stat-list {
  display: grid;
  gap: 8px;
}

.note-item,
.highlight-item,
.leader-item,
.stat-row,
.play-row,
.player-row,
.team-card {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.note-section h3,
.roster-card h3,
.box-card h3 {
  margin-bottom: 10px;
}

.league-grid,
.roster-wrap,
.play-log,
#sim-notes,
#box-score {
  max-height: 540px;
  overflow: auto;
  padding-right: 6px;
}

.league-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.team-card {
  display: grid;
  gap: 8px;
}

.team-card .team-head,
.roster-card .team-head,
.play-row .play-head,
.stat-row,
.leader-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.roster-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.roster-card,
.box-columns {
  display: grid;
  gap: 10px;
}

.player-row {
  display: grid;
  grid-template-columns: 52px 44px 1fr 54px;
  gap: 8px;
  align-items: center;
}

.player-row strong,
.play-row strong,
.team-card strong,
.roster-card strong {
  color: var(--text);
}

.play-log {
  display: grid;
  gap: 8px;
}

.play-row {
  display: grid;
  gap: 8px;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.play-row.active {
  border-color: var(--accent);
  background: rgba(245, 197, 66, 0.12);
  transform: translateX(4px);
}

.box-score-layout {
  display: grid;
  gap: 14px;
}

.box-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.small-note {
  color: var(--muted);
  font-size: 0.84rem;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid transparent;
}

/* ── Catalog embed mode ────────────────────────────────────────────────────
   Applied by app.js when ?embed=1 is in the URL.  Strips all chrome so only
   the 960×544 canvas fills the iframe used by catalog.html's card grid.
   ────────────────────────────────────────────────────────────────────────── */
body.catalog-embed {
  overflow: hidden;
}

body.catalog-embed .backdrop,
body.catalog-embed .controls,
body.catalog-embed .sim-support-grid,
body.catalog-embed .live-stats-panel,
body.catalog-embed .play-controls,
body.catalog-embed .play-caption-strip {
  display: none;
}

body.catalog-embed .shell {
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 0;
}

body.catalog-embed .stage-grid {
  display: block;
}

body.catalog-embed .sim-column {
  gap: 0;
}

body.catalog-embed .stage-panel {
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

body.catalog-embed .broadcast-hud,
body.catalog-embed .stage-panel,
body.catalog-embed #field-canvas {
  width: 100%;
}

body.catalog-embed .stage-panel::after {
  display: none;
}

body.catalog-embed .stage-screen {
  gap: 0;
}

@media (max-width: 1080px) {
  .hero,
  .stage-grid,
  .top-grid,
  .lower-grid,
  .bottom-grid,
  .sim-support-grid,
  .controls .control-grid,
  .visual-suite-controls,
  .roster-wrap,
  .box-columns {
    grid-template-columns: 1fr;
  }

  .button-row {
    grid-template-columns: 1fr;
  }

  .league-grid {
    grid-template-columns: 1fr;
  }
}




.broadcast-hud {
  display: flex;
  justify-content: center;
}

.broadcast-scorebar {
  --scorebug-height: 69px;
  --scorebug-strip-height: 27px;
  --scorebug-border: rgba(171, 213, 235, 0.35);
  --scorebug-panel: #07111c;
  --scorebug-deep: #020812;
  display: grid;
  grid-template-rows: var(--scorebug-height) var(--scorebug-strip-height);
  width: min(784px, 100%);
  border: 1px solid var(--scorebug-border);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    var(--scorebug-deep);
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.38),
    inset 0 0 0 2px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  overflow: hidden;
  font-family: "Arial Narrow", "Roboto Condensed", "Trebuchet MS", Arial, sans-serif;
}

.broadcast-scorebar-empty {
  grid-template-rows: 50px;
}

.broadcast-network {
  display: none;
}

.broadcast-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px minmax(0, 1fr);
  min-width: 0;
  border-bottom: 1px solid var(--scorebug-border);
}

.broadcast-team {
  --team-primary: #27406d;
  --team-secondary: #172339;
  --team-accent: #f5c542;
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  padding: 0 19px 0 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--team-primary) 78%, #05070b), color-mix(in srgb, var(--team-secondary) 58%, #061321) 58%, rgba(5, 13, 23, 0.96)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 7px);
  border-inline-start: 4px solid var(--team-accent);
  overflow: hidden;
}

.broadcast-team-home {
  grid-template-columns: minmax(0, 1fr) 96px;
  padding: 0 0 0 19px;
  text-align: right;
  border-inline-start: 0;
  border-inline-end: 4px solid var(--team-accent);
  background:
    linear-gradient(270deg, color-mix(in srgb, var(--team-primary) 78%, #05070b), color-mix(in srgb, var(--team-secondary) 58%, #061321) 58%, rgba(5, 13, 23, 0.96)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 7px);
}

.broadcast-team-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: var(--scorebug-height);
  border-radius: 0;
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--team-accent) 18%, transparent), transparent 64%),
    rgba(0, 0, 0, 0.2);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.11);
}

.broadcast-team-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.72));
}

.broadcast-team-home .broadcast-team-logo-wrap {
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.11);
}

.broadcast-team-copy {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  padding: 0 11px;
  text-transform: uppercase;
  overflow: hidden;
}

.broadcast-team-meta {
  min-height: 10px;
}

.broadcast-team-city {
  color: color-mix(in srgb, var(--team-accent) 72%, #f8fcff);
  font-size: var(--team-city-size, 0.8rem);
  font-weight: 700;
  letter-spacing: var(--team-city-tracking, 0.18em);
  line-height: 1;
  overflow: visible;
  white-space: nowrap;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.55);
}

.broadcast-team-name {
  color: #f7fbff;
  font-size: var(--team-name-size, 1.24rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 0.98;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.52),
    0 0 12px rgba(255, 255, 255, 0.14);
}

.broadcast-possession-dot {
  position: absolute;
  right: 13px;
  top: 10px;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--team-accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--team-accent) 75%, white);
}

.broadcast-team-home .broadcast-possession-dot {
  right: auto;
  left: 13px;
}

.broadcast-score-center {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  gap: 14px;
  background:
    radial-gradient(circle at center bottom, rgba(99, 166, 218, 0.18), transparent 54%),
    linear-gradient(180deg, #122033, #06101c 62%, #040a12);
  border-inline: 1px solid rgba(171, 213, 235, 0.24);
}

.broadcast-score-center::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 50%;
  width: 1px;
  background: rgba(226, 242, 255, 0.22);
  box-shadow: 0 0 10px rgba(105, 180, 235, 0.22);
  transform: translateX(-50%);
  pointer-events: none;
}

.broadcast-team-score {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  color: #f9fbff;
  font-size: 3.84rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.5),
    0 0 14px rgba(255, 255, 255, 0.16);
}

.broadcast-score-away {
  border-right: 0;
}

.broadcast-score-home {
  border-left: 0;
}

.broadcast-state {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 0 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    #040b13;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5fbff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.broadcast-state-wide {
  grid-template-columns: 1fr;
  min-height: 50px;
}

.broadcast-state-final {
  grid-template-columns: 1fr;
  justify-items: center;
  place-content: center;
  gap: 0;
}

.broadcast-final-label {
  color: #f7fbff;
  font-size: 1.18rem;
  font-weight: 950;
  letter-spacing: 0.22em;
  line-height: 1;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 0 14px rgba(216, 236, 255, 0.24);
}

.broadcast-state-top,
.broadcast-state-bottom {
  display: contents;
}

.broadcast-game-clock {
  position: relative;
  font-size: 1.24rem;
  line-height: 1;
}

.broadcast-game-clock::before,
.broadcast-game-clock::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 1px;
  height: 14px;
  background: color-mix(in srgb, var(--scorebug-border) 58%, #f4b96a);
  transform: translateY(-50%);
}

.broadcast-game-clock::before {
  left: -18px;
}

.broadcast-game-clock::after {
  right: -18px;
}

.broadcast-down-distance {
  font-size: 1.02rem;
  justify-self: center;
}

.broadcast-spot {
  color: rgba(245, 251, 255, 0.72);
  font-size: 0.72rem;
  display: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broadcast-state-meta {
  display: none;
}

.broadcast-state-kicker {
  color: #d8a55f;
  font-size: 0.96rem;
  font-weight: 900;
}

@media (max-width: 900px) {
  .broadcast-scorebar {
    --scorebug-height: 62px;
    --scorebug-strip-height: 28px;
    grid-template-rows: var(--scorebug-height) var(--scorebug-strip-height);
    border-radius: 6px;
  }

  .broadcast-main-row {
    grid-template-columns: minmax(0, 1fr) 130px minmax(0, 1fr);
  }

  .broadcast-team {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 0 10px 0 0;
  }

  .broadcast-team-home {
    grid-template-columns: minmax(0, 1fr) 58px;
    padding: 0 0 0 10px;
  }

  .broadcast-team-logo-wrap {
    width: 58px;
    height: var(--scorebug-height);
  }

  .broadcast-team-logo {
    width: 100%;
    height: 100%;
  }

  .broadcast-team-copy {
    padding: 0 6px;
  }

  .broadcast-team-city {
    font-size: min(var(--team-city-size, 0.58rem), 0.58rem);
    letter-spacing: min(var(--team-city-tracking, 0.08em), 0.08em);
  }

  .broadcast-team-name {
    font-size: min(var(--team-name-size, 0.78rem), 0.78rem);
  }

  .broadcast-team-score {
    min-width: 42px;
    font-size: 2.7rem;
  }

  .broadcast-score-center {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .broadcast-state {
    grid-template-columns: auto auto auto;
    justify-content: center;
    gap: 22px;
    min-width: 0;
    padding: 4px 10px;
    font-size: 0.72rem;
  }

  .broadcast-game-clock,
  .broadcast-down-distance {
    font-size: 0.9rem;
  }

  .broadcast-state-kicker {
    font-size: 0.9rem;
  }

  .broadcast-final-label {
    font-size: 1rem;
  }

  .broadcast-game-clock::before {
    left: -12px;
  }

  .broadcast-game-clock::after {
    right: -12px;
  }

  .broadcast-spot {
    display: none;
    font-size: 0.62rem;
  }
}

@media (max-width: 640px) {
  .shell {
    width: calc(100vw - 10px);
    margin-top: 5px;
    gap: 10px;
  }

  .panel {
    padding: 10px;
  }

  .stage-grid,
  .sim-column,
  .stage-screen {
    gap: 10px;
  }

  .stage-panel {
    padding: 8px;
  }

  .broadcast-scorebar {
    --scorebug-height: 66px;
    --scorebug-strip-height: 27px;
    width: 100%;
  }

  .broadcast-main-row {
    grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr);
  }

  .broadcast-team {
    grid-template-columns: 28px minmax(0, 1fr);
    padding-right: 1px;
    border-inline-start-width: 3px;
  }

  .broadcast-team-home {
    grid-template-columns: minmax(0, 1fr) 28px;
    padding-left: 1px;
    border-inline-end-width: 3px;
  }

  .broadcast-team-logo-wrap {
    width: 28px;
  }

  .broadcast-team-logo {
    padding: 2px;
  }

  .broadcast-team-copy {
    gap: 2px;
    padding: 0 3px;
  }

  .broadcast-team-city {
    font-size: 0.48rem;
    letter-spacing: 0.04em;
    line-height: 1.05;
    white-space: normal;
  }

  .broadcast-team-name {
    font-size: clamp(0.54rem, 2.9vw, 0.7rem);
    line-height: 1.03;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .broadcast-score-center {
    gap: 2px;
    padding-inline: 4px;
  }

  .broadcast-team-score {
    min-width: 42px;
    font-size: 1.94rem;
    letter-spacing: 0;
  }

  .broadcast-state {
    grid-template-columns: auto auto minmax(0, auto);
    gap: 13px;
    padding: 4px 6px;
    letter-spacing: 0.04em;
  }

  .broadcast-state-kicker {
    font-size: 0.72rem;
  }

  .broadcast-game-clock,
  .broadcast-down-distance {
    font-size: 0.8rem;
  }

  .broadcast-game-clock::before {
    left: -7px;
  }

  .broadcast-game-clock::after {
    right: -7px;
  }

  .live-stats-panel {
    padding: 12px;
  }

  .panel-title-row {
    align-items: center;
    margin-bottom: 10px;
  }

  .panel-title-row h2 {
    font-size: 0.96rem;
  }

  .live-stats {
    gap: 12px;
    padding-right: 0;
  }

  .live-stats-team-banner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .live-stats-team-label {
    min-width: 0;
    display: grid;
    gap: 4px;
    align-content: center;
    padding: 9px 10px;
  }

  .live-stats-team-label strong {
    min-width: 0;
    font-size: 0.7rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .live-stats-team-label span {
    justify-self: end;
    font-size: 0.78rem;
    font-weight: 900;
  }

  .live-stats-team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow-x: visible;
    padding-bottom: 4px;
  }

  .live-stats-team {
    padding: 10px;
  }

  .live-stats-team-head {
    position: sticky;
    left: 0;
    z-index: 1;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .live-stats-team-head strong {
    max-width: 21ch;
    color: var(--text);
    font-size: 0.78rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .live-stats-section h3 {
    font-size: 0.76rem;
  }

  .live-stats-table {
    table-layout: fixed;
    font-size: 0.66rem;
  }

  .live-stats-table th,
  .live-stats-table td {
    padding: 5px 3px;
  }

  .live-stats-table th:nth-child(n+6),
  .live-stats-table td:nth-child(n+6) {
    display: none;
  }

  .live-stats-table th {
    font-size: 0.56rem;
    letter-spacing: 0;
  }

  .live-stats-table th:first-child,
  .live-stats-table td:first-child {
    width: 45%;
  }

  .live-stats-player {
    max-width: none;
    white-space: normal;
    line-height: 1.15;
  }
}

.play-caption-strip {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.35;
}

/* ── Video-style play controls ─────────────────────────────── */

.play-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.play-ctrl-btn {
  flex-shrink: 0;
  min-height: 34px;
  min-width: 34px;
  padding: 4px 6px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-transform: none;
  font-weight: normal;
  letter-spacing: 0;
}

.play-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.play-progress-bar {
  flex: 1;
  min-width: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
}

.play-progress-bar:hover {
  background: rgba(255, 255, 255, 0.22);
}

.play-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  pointer-events: none;
}

.play-mode-group {
  display: flex;
  flex-shrink: 0;
}

.play-mode-btn {
  min-height: 34px;
  padding: 4px 10px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: normal;
  margin-left: -1px;
  position: relative;
}

.play-mode-btn.active {
  background: rgba(245, 197, 66, 0.18);
  border-color: var(--accent);
  color: var(--accent);
  z-index: 1;
}

.play-mode-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

body.visual-test-page .controls,
body.visual-test-page .sim-support-grid,
body.visual-test-page .live-stats-panel,
body.visual-test-page .play-caption-strip,
body.visual-test-page .play-controls {
  display: none;
}

body.visual-test-page .shell {
  width: min(1320px, calc(100vw - 12px));
  margin: 6px auto 16px;
}

body.visual-test-page .stage-grid {
  grid-template-columns: 1fr;
}

body.visual-suite-page .shell {
  width: calc(100vw - 8px);
  max-width: none;
  margin: 4px auto 16px;
}

.suite-hero {
  padding-top: 20px;
}

.suite-intro {
  display: grid;
  gap: 10px;
}

.visual-suite-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.visual-suite-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.visual-suite-note {
  margin: 12px 0 0;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(820px, 100%), 1fr));
  gap: 24px;
}

.visual-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 14px;
}

.visual-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.visual-card-head strong,
.visual-card-head a {
  color: var(--text);
}

.visual-card-head a {
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.visual-card-head span,
.visual-card-meta,
.visual-empty {
  color: var(--muted);
  font-size: 0.78rem;
}

.visual-card-head > div {
  display: grid;
  gap: 4px;
}

.visual-card-meta {
  font-family: "Lucida Console", "Courier New", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual-card iframe {
  width: 100%;
  aspect-ratio: 960 / 544;
  border: 0;
  background: #07111b;
}

.visual-empty {
  padding: 24px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.stats-page .backdrop {
  opacity: 0.82;
}

.stats-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 24px));
  margin: 18px auto 28px;
  display: grid;
  gap: 14px;
}

.stats-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 138px;
  padding: 18px 22px;
  background:
    linear-gradient(90deg, rgba(191, 133, 64, 0.2), transparent 34%, transparent 66%, rgba(42, 197, 225, 0.18)),
    linear-gradient(180deg, rgba(12, 22, 36, 0.96), rgba(5, 10, 18, 0.98));
}

.stats-scoreboard-team {
  min-width: 0;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.stats-scoreboard-team--home {
  grid-template-columns: minmax(0, 1fr) 86px;
  text-align: right;
}

.stats-scoreboard-team img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.48));
}

.stats-scoreboard-team span {
  display: block;
  color: var(--accent);
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.stats-scoreboard-team strong {
  display: block;
  overflow-wrap: anywhere;
  color: #f7fbff;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: clamp(1.45rem, 4vw, 2.45rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stats-scoreboard-score {
  display: grid;
  grid-template-columns: auto 1px auto;
  gap: 18px;
  align-items: center;
  color: #fff;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: clamp(3.1rem, 9vw, 5.5rem);
  font-weight: 900;
  line-height: 0.9;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.56);
}

.stats-scoreboard-score i {
  display: block;
  width: 1px;
  height: 72%;
  background: rgba(255, 255, 255, 0.2);
}

.stats-page-panel {
  width: 100%;
}

.stats-scoreboard {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 12px;
}

.stats-scoreboard-kicker {
  color: var(--accent);
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.stats-final-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stats-final-team {
  min-width: 0;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(209, 238, 255, 0.14);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(3, 9, 18, 0.56);
}

.stats-final-team--winner {
  border-color: rgba(245, 197, 66, 0.38);
  box-shadow: inset 4px 0 0 rgba(245, 197, 66, 0.72);
}

.stats-final-team img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.48));
}

.stats-final-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.stats-final-copy span {
  color: var(--accent);
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.stats-final-copy strong {
  color: #f7fbff;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: clamp(1.08rem, 2.2vw, 1.6rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.stats-final-team b {
  color: #fff;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.56);
}

@media (max-width: 780px) {
  .stats-scoreboard {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .stats-scoreboard-team,
  .stats-scoreboard-team--home {
    grid-template-columns: 72px minmax(0, 1fr);
    text-align: left;
  }
}

@media (max-width: 640px) {
  .stats-shell {
    width: calc(100vw - 12px);
    margin: 8px auto 18px;
    gap: 10px;
  }

  .stats-scoreboard {
    min-height: 0;
    padding: 12px;
    text-align: left;
  }

  .stats-final-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stats-final-team {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
  }

  .stats-final-team--winner {
    box-shadow: inset 3px 0 0 rgba(245, 197, 66, 0.72);
  }

  .stats-final-team img {
    width: 56px;
    height: 56px;
  }

  .stats-final-copy span {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .stats-final-copy strong {
    font-size: clamp(0.92rem, 5vw, 1.16rem);
  }

  .stats-final-team b {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }
}
