/* tv.css — TV-Anzeige (1920×1080 oder ähnlich) */

body.tv-mode {
  background: var(--deep);
  color: white;
  font-size: var(--fs-body-tv);
  font-weight: 700;
  margin: 0;
}
body.tv-mode h1, body.tv-mode h2, body.tv-mode h3 { color: white; }

/* === TV-Index === */
.tv-index {
  min-height: 100vh;
  padding: 64px;
  position: relative;
  overflow: hidden;
}
.tv-index .deco-circle, .tv-index .deco-square { z-index: 0; }
.tv-index .tv-hero-header { position: relative; z-index: 2; margin-bottom: 48px; }
.tv-index .caps-label {
  font-size: 22px;
  letter-spacing: 4px;
  color: var(--sun);
}
.tv-index h1 {
  font-size: 72px;
  color: white;
  margin: 8px 0 4px;
}
.tv-index .subline { font-size: 24px; opacity: 0.7; }

.tv-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  position: relative;
  z-index: 2;
}
.tv-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 32px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 900;
  font-size: 44px;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 8px 8px 0 var(--sun);
  transition: transform 0.1s;
}
.tv-tile:hover { transform: translateY(-4px); text-decoration: none; }
.tv-tile .tv-tile-emoji { font-size: 80px; margin-bottom: 16px; }
.tv-tile.beachvolleyball { background: var(--ocean); color: white; }
.tv-tile.bierpong        { background: var(--coral); color: white; box-shadow: 8px 8px 0 var(--sun); }
.tv-tile.flunkyball      { background: var(--sun); color: var(--deep); box-shadow: 8px 8px 0 var(--coral); }
.tv-tile.leberschuss     { background: white; color: var(--deep); box-shadow: 8px 8px 0 var(--coral); }

/* === TV-Bracket-Page === */
.tv-page {
  min-height: 100vh;
  padding: 24px 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tv-page .deco-circle, .tv-page .deco-square { z-index: 0; }

.tv-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
}
.tv-page-header .left .caps-label {
  font-size: 14px;
  color: var(--sun);
  letter-spacing: 3px;
}
.tv-page-header .left h1 {
  font-size: 56px;
  color: white;
  margin: 4px 0 0;
  line-height: 1;
}
.tv-page-header .right { text-align: right; }
.tv-page-header .section-badge {
  display: inline-block;
  background: var(--coral);
  color: white;
  padding: 8px 14px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 1px;
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--sun);
  text-transform: uppercase;
}
.tv-clock {
  font-size: 36px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: white;
  margin-top: 8px;
  display: block;
}
.tv-connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 10px;
}
.tv-connection::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.tv-connection.ok { color: #52D272; }
.tv-connection.down { color: var(--coral); }

.tv-bracket-area {
  flex: 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* TV-Override für Bracket-Look: alle Spalten teilen sich die volle Breite, Karten und Schrift
   skalieren an der verfügbaren Fläche (cqw/cqh) — so füllt jedes Bracket (2–6 Runden, 1–8
   Spiele je Spalte) die Seite ohne horizontales Schrumpfen oder Scrollen. */
body.tv-mode .bracket-wrapper {
  padding: 0;
  overflow: visible;
  width: 100%;
  display: flex;
  align-items: stretch;
  transition: transform 0.2s ease;
}
body.tv-mode .bracket {
  --bracket-gap: clamp(14px, 3.2cqw, 44px);
  gap: var(--bracket-gap);
  width: 100%;
  align-items: stretch;
}
/* Connector line light enough to read against the dark TV background. */
body.tv-mode .bracket-pair::after { border-color: rgba(255,255,255,0.28); }
body.tv-mode .tv-bracket-area { align-items: center; justify-content: flex-start; }
/* bracket-fit clamps the page to a definite viewport height so the bracket area (flex:1,
   min-height:0) is bounded, and makes it a size-container the cq-based bracket resolves
   against. Scoped to the bracket slides; group-phase keeps its natural (min-height) sizing. */
body.tv-mode.bracket-fit .tv-page { height: 100vh; }
body.tv-mode.bracket-fit .tv-bracket-area { min-height: 0; overflow: hidden; justify-content: flex-start; }
body.tv-mode #tv-bracket-container { container-type: size; }

/* Double-elim results slide (after the champion is decided). */
body.tv-mode .tv-de-results { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
body.tv-mode .tv-de-title { font-size: 26px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; color: var(--sun); }
body.tv-mode .tv-de-podium { display: flex; gap: 40px; align-items: flex-end; }
body.tv-mode .tv-de-place { display: flex; flex-direction: column; align-items: center; gap: 6px; }
body.tv-mode .tv-de-place .medal { font-size: 56px; }
body.tv-mode .tv-de-place .pl-label { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; }
body.tv-mode .tv-de-place .pl-team { font-size: 30px; font-weight: 900; }
body.tv-mode .tv-de-flair { text-align: center; font-size: 18px; line-height: 1.6; }
body.tv-mode .tv-de-flair .flair-title { font-weight: 900; color: var(--coral); margin-bottom: 4px; }
body.tv-mode .bracket-col {
  flex: 1 1 0;
  min-width: 0;
  gap: clamp(6px, 2.4cqh, 22px);
}
body.tv-mode .bracket-col-title {
  font-size: clamp(13px, 1.7cqw, 20px);
  color: var(--sun);
  opacity: 1;
  letter-spacing: 2px;
  font-weight: 900;
  margin-bottom: clamp(2px, 0.6cqh, 8px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.tv-mode .bracket-section-label { display: none; }
body.tv-mode .match-card {
  background: white;
  border-color: var(--deep);
  width: 100%;
  min-width: 0;
  padding: clamp(8px, 1.6cqh, 16px) clamp(10px, 1.6cqw, 18px);
  border-width: clamp(3px, 0.5cqw, 4px);
  box-shadow: clamp(3px, 0.6cqw, 6px) clamp(3px, 0.6cqw, 6px) 0 var(--sun);
}
body.tv-mode .match-card.reported { border-color: var(--sun); box-shadow: clamp(3px, 0.6cqw, 6px) clamp(3px, 0.6cqw, 6px) 0 var(--coral); }
body.tv-mode .match-card.waiting {
  background: rgba(244,241,222,0.15);
  border-style: dashed;
  border-color: rgba(255,255,255,0.25);
  box-shadow: none;
}
body.tv-mode .match-card.waiting .match-team.empty { color: rgba(255,255,255,0.4); }
body.tv-mode .match-card .field-badge {
  font-size: clamp(11px, 1.1cqw, 14px);
  padding: 3px 10px 3px 8px;
  gap: 7px;
}
body.tv-mode .match-card .field-badge::before { width: 8px; height: 8px; }
body.tv-mode .match-team { padding: clamp(3px, 0.9cqh, 8px) 4px; font-size: clamp(15px, 1.65cqw, 26px); }
body.tv-mode .match-team.winner .team-score { font-size: clamp(18px, 2.1cqw, 36px); }
body.tv-mode .match-team .team-score { font-size: clamp(16px, 1.9cqw, 30px); }

/* TV-Override für Gruppenphase (group-render.js: .tv-group wrapper) */
body.tv-mode .tv-group .caps-label {
  font-size: 22px;
  letter-spacing: 2px;
}
body.tv-mode .tv-group .group-standings {
  margin-top: 20px;
  /* .card gives a white background on light pages; on the dark TV it makes the
     white standings text unreadable — drop it so text sits on the navy body. */
  background: transparent;
  box-shadow: none;
}
body.tv-mode .tv-group .standings-table {
  font-size: 24px;
}
body.tv-mode .tv-group .standings-table th,
body.tv-mode .tv-group .standings-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
body.tv-mode .tv-group .standings-table th {
  font-size: 16px;
  letter-spacing: 1.5px;
}
body.tv-mode .tv-group .group-matches {
  gap: 12px;
  margin: 16px 0 28px;
}
body.tv-mode .tv-group .group-match {
  padding: 14px 18px;
  border-width: 3px;
  border-radius: 10px;
  /* Dark translucent card instead of the light-page white (`var(--card,#fff)`),
     so the inherited white text is readable on the TV. */
  background: rgba(244, 241, 222, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: white;
}
body.tv-mode .tv-group .group-match .gm-teams {
  font-size: 24px;
  gap: 14px;
}
body.tv-mode .tv-group .group-match .gm-score {
  font-size: 28px;
  font-weight: 900;
}
body.tv-mode .tv-group .group-section-title {
  font-size: 32px;
  margin-top: 32px;
}
body.tv-mode .tv-group .ko-match .ko-label {
  font-size: 18px;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
body.tv-mode .tv-group .group-knockout {
  gap: 18px;
}

/* Endrunde-Bracket (Layout C): Medaillen-Bracket groß links, Platzierungen als Seitenleiste. */
body.tv-mode .tv-group .ko-c { display: flex; gap: 32px; align-items: stretch; }
body.tv-mode .tv-group .ko-main { flex: 7; display: flex; align-items: center; gap: 8px; }
body.tv-mode .tv-group .ko-semis { display: flex; flex-direction: column; justify-content: center; gap: 46px; }
body.tv-mode .tv-group .ko-connector { flex: 0 0 40px; align-self: stretch; color: rgba(255, 255, 255, 0.3); }
body.tv-mode .tv-group .ko-connector svg { width: 40px; height: 100%; display: block; }
body.tv-mode .tv-group .ko-final-col { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
body.tv-mode .tv-group .ko-node { display: flex; flex-direction: column; gap: 5px; }
body.tv-mode .tv-group .ko-node .ko-label {
  font-size: 15px; letter-spacing: 2px; text-transform: uppercase; opacity: 0.55; margin: 0;
}
body.tv-mode .tv-group .ko-node--semi .gm-teams { font-size: 24px; }
body.tv-mode .tv-group .ko-node--final .ko-label { color: var(--sun); opacity: 1; font-size: 20px; }
body.tv-mode .tv-group .ko-node--final .group-match { border-color: var(--sun); border-width: 4px; padding: 16px 20px; }
body.tv-mode .tv-group .ko-node--final .gm-teams { font-size: 32px; }
body.tv-mode .tv-group .ko-node--final .gm-score { font-size: 36px; }
body.tv-mode .tv-group .ko-side {
  flex: 3; border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 24px; display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
body.tv-mode .tv-group .ko-side-title {
  font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; opacity: 0.5;
}
body.tv-mode .tv-group .ko-side .ko-node .ko-label { font-size: 13px; }
body.tv-mode .tv-group .ko-side .gm-teams { font-size: 18px; }
body.tv-mode .tv-group .ko-side .group-match { padding: 9px 13px; }

/* Endstand / Ergebnis-Screen — Top 3 groß, restliche Plätze als kompakte Liste darunter */
body.tv-mode .tv-results {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px; padding: 8px 0;
}
body.tv-mode .tv-results-title {
  font-size: 40px; color: var(--sun); letter-spacing: 3px; text-transform: uppercase;
}
/* Top 3 — large medal cards side by side */
body.tv-mode .tv-results-top3 {
  display: flex; align-items: stretch; justify-content: center;
  gap: 24px; width: min(1200px, 94%);
}
body.tv-mode .tv-results-podium {
  flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; border-radius: 14px; padding: 26px 18px;
}
body.tv-mode .tv-results-podium .rp-medal { font-size: 56px; line-height: 1; }
body.tv-mode .tv-results-podium .rp-place {
  font-size: 14px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; opacity: 0.7;
}
body.tv-mode .tv-results-podium .rp-name { font-size: 32px; font-weight: 900; line-height: 1.15; }
body.tv-mode .tv-results-podium .rp-members { font-size: 15px; font-weight: 400; opacity: 0.55; }
body.tv-mode .tv-results-podium.place-1 {
  background: rgba(255, 210, 63, 0.18); border: 3px solid var(--sun); transform: scale(1.06);
}
body.tv-mode .tv-results-podium.place-1 .rp-medal { font-size: 68px; }
body.tv-mode .tv-results-podium.place-1 .rp-name { font-size: 38px; color: var(--sun); }
body.tv-mode .tv-results-podium.place-2 { background: rgba(255, 255, 255, 0.10); border: 2px solid rgba(255, 255, 255, 0.22); }
body.tv-mode .tv-results-podium.place-3 { background: rgba(255, 124, 92, 0.15); border: 2px solid rgba(255, 124, 92, 0.4); }
/* Places 4+ — compact two-column list */
body.tv-mode .tv-results-rest {
  display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 8px 28px; width: min(900px, 90%);
}
body.tv-mode .tv-results-rest-row {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 9px 18px;
}
body.tv-mode .tv-results-rest-row .rr-place { font-size: 20px; font-weight: 900; color: rgba(255, 255, 255, 0.45); min-width: 34px; }
body.tv-mode .tv-results-rest-row .rr-name { font-size: 20px; font-weight: 700; }

.tv-champion-block {
  background: var(--sun);
  border: 4px solid var(--deep);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 6px 6px 0 var(--coral);
  text-align: center;
  align-self: center;
  margin-top: 32px;
}
.tv-champion-block .trophy { font-size: 60px; line-height: 1; }
.tv-champion-block .champion-label {
  font-size: 16px;
  color: var(--deep);
  font-weight: 900;
  letter-spacing: 2px;
  margin-top: 6px;
  text-transform: uppercase;
}
.tv-champion-block .champion-name {
  font-size: 28px;
  color: var(--deep);
  font-weight: 900;
  margin-top: 6px;
}

.tv-ticker {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  position: relative;
  z-index: 2;
}
.tv-ticker-live {
  background: var(--coral);
  color: white;
  padding: 18px 24px;
  border-radius: 6px;
  font-weight: 900;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 4px 4px 0 var(--sun);
  white-space: normal;
  flex: 0 1 auto;
  max-width: 58%;
  line-height: 1.3;
}
.tv-ticker-live .pulse-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  animation: pulse 1s infinite;
  flex: 0 0 auto;
}
.tv-ticker-live .field-chip {
  background: rgba(255,255,255,0.28);
  padding: 3px 12px;
  border-radius: 4px;
  font-size: 0.72em;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.tv-ticker-live.stale {
  background: var(--deep);
  border: 2px solid rgba(255,255,255,0.3);
  font-size: 18px;
  box-shadow: none;
}
.tv-ticker-live.stale .pulse-dot { animation: none; opacity: 0.5; }
.tv-ticker-next {
  background: white;
  color: var(--deep);
  padding: 18px 24px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 20px;
  flex: 1 1 320px;
  min-width: 280px;
  box-shadow: 4px 4px 0 var(--ocean);
  line-height: 1.3;
}
.tv-ticker-next .up-label {
  color: var(--ocean);
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-right: 12px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* --- TV-Mutterflicker --- */
.tv-mutterflicker {
  margin-top: 12px;
  background: var(--sun);
  color: var(--deep);
  padding: 12px 16px;
  border-radius: 6px;
  border: 3px solid var(--deep);
  box-shadow: 4px 4px 0 var(--coral);
  min-width: 220px;
  text-align: left;
}
.mutterflicker-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.mutterflicker-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 800;
  margin-top: 2px;
}
.mutterflicker-count {
  font-variant-numeric: tabular-nums;
  margin-left: 12px;
  color: var(--coral);
}

/* ===== TV Stats Page ===== */

/* --- Podium slide --- */
.podium-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;   /* vertically centered in the viewport, no dead space up top */
  flex: 1;
  min-height: 0;
  padding: 8px 40px;
  gap: 8px;
}
.podium-tournament-label {
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sun);
  margin-bottom: 2px;
}
.podium-tournament-name {
  font-size: 40px;
  font-weight: 900;
  color: white;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.05;
}
.podium-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  width: 100%;
  max-width: 1120px;
}
.podium-rest {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  max-width: 1000px;
  margin-top: 22px;
}
.podium-rest-row { font-size: 21px; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.podium-rest-pos { color: var(--sun); font-weight: 900; margin-right: 6px; }
.podium-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 320px;
}
.podium-team-info {
  text-align: center;
  margin-bottom: 14px;
}
.podium-team-info + .podium-team-info {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.podium-team-name {
  font-size: 30px;
  font-weight: 900;
  color: white;
  line-height: 1.2;
}
.podium-team-members {
  font-size: 15px;
  font-weight: 400;
  opacity: 0.55;
  margin-top: 5px;
}
.podium-block {
  width: 100%;
  border-radius: 10px 10px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 22px;
  font-size: 52px;
}
.podium-rank {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 10px;
  opacity: 0.85;
}
/* Gold — 1st (tallest, centre) */
.podium-place.place-1 .podium-team-name { color: var(--sun); font-size: 38px; }
.podium-place.place-1 .podium-block { height: 240px; background: #b8901a; box-shadow: 0 -6px 0 var(--sun); }
.podium-place.place-1 .podium-block { font-size: 64px; }
/* Silver — 2nd */
.podium-place.place-2 .podium-team-name { color: #c8c8d8; }
.podium-place.place-2 .podium-block { height: 168px; background: #52525e; box-shadow: 0 -6px 0 #b0b0c0; }
/* Bronze — 3rd */
.podium-place.place-3 .podium-team-name { color: #d4895a; }
.podium-place.place-3 .podium-block { height: 120px; background: #6b4010; box-shadow: 0 -6px 0 #b87333; }

/* --- Stats overview --- */
.stats-overview {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  padding: 8px 32px 24px;
  flex: 1;
  width: 100%;           /* the tv-bracket-area centers its children — force full width here */
  min-height: 0;
  align-content: center; /* centre the card block vertically instead of clinging to the top */
  box-sizing: border-box;
}
.stats-right-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stats-right-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 14px 18px;
  min-height: 0;
}
.stat-card.gold {
  border-color: rgba(232,197,71,0.3);
  background: rgba(232,197,71,0.07);
}
.stat-card-title {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 10px;
}
.stat-ranking-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
}
.stat-ranking-pos  { font-size: 12px; opacity: 0.5; width: 18px; font-weight: 700; }
.stat-ranking-name { font-size: 16px; font-weight: 900; flex: 1; }
.stat-ranking-pts  { font-size: 15px; color: var(--sun); font-weight: 900; font-variant-numeric: tabular-nums; }
.stat-highlight { font-size: 26px; font-weight: 900; color: var(--sun); line-height: 1.2; }
.stat-sub { font-size: 12px; opacity: 0.5; margin-top: 4px; font-weight: 400; }
.stat-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.stat-tag {
  background: rgba(184,115,51,0.2);
  border: 1px solid rgba(184,115,51,0.4);
  color: #d4895a;
  font-size: 12px;
  font-weight: 900;
  border-radius: 4px;
  padding: 3px 9px;
}
.stat-muttern-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 800; padding: 3px 0; }
.stat-muttern-count { color: var(--coral); }

/* Turnier-Sieger rows */
.stat-champ-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.stat-champ-row:last-child { border-bottom: none; }
.stat-champ-emoji { font-size: 26px; width: 32px; text-align: center; }
.stat-champ-tournament { font-size: 15px; opacity: 0.6; flex: 0 0 42%; }
.stat-champ-team { font-size: 20px; font-weight: 900; color: var(--sun); flex: 1; text-align: right; }

/* Festival-in-Zahlen tiles */
.stat-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-num-tile {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.stat-num-value { font-size: 30px; font-weight: 900; color: white; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-num-label { font-size: 11px; opacity: 0.55; font-weight: 700; letter-spacing: 0.5px; margin-top: 5px; }

/* --- Placeholder --- */
.stats-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.stats-placeholder-text { font-size: 32px; opacity: 0.35; font-weight: 700; }

/* --- 5th tile on TV index --- */
.tv-stats-tile { margin-top: 32px; position: relative; z-index: 2; }
.tv-tile.stats  { background: var(--sun); color: var(--deep); box-shadow: 8px 8px 0 var(--coral); padding: 32px; font-size: 36px; }

/* === QR-Code Overlay === */
#qr-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: background 0.15s;
}
#qr-toggle:hover,
#qr-toggle.active { background: rgba(255, 255, 255, 0.2); }

#qr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}
#qr-overlay.visible { display: flex; }

.qr-box {
  background: var(--cream, #fffdf4);
  border-radius: 20px;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.qr-url {
  font-family: monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--deep, #1a1a2e);
  letter-spacing: 0.5px;
}
.qr-hint {
  font-size: 12px;
  color: var(--deep, #1a1a2e);
  opacity: 0.45;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Finals-focused layout on TV — larger, emphasised final */
body.tv-mode .finals-focus { gap: 48px; padding: 0; overflow: visible; }
body.tv-mode .finals-focus .ff-col--early { --ff-w: 210px; }
body.tv-mode .finals-focus .ff-col--semi  { --ff-w: 300px; }
body.tv-mode .finals-focus .ff-col--final { --ff-w: 420px; }
body.tv-mode .finals-focus .ff-col--semi .match-team .team-name { font-size: 24px; }
body.tv-mode .finals-focus .ff-col--final .match-team .team-name { font-size: 34px; }
body.tv-mode .finals-focus .ff-col--final .ff-col-title { font-size: 22px; }
