/* =====================================================================
   1. ZERO-DEPENDENCY RESET & SYSTEM DESIGN TOKENS
   ===================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #140812;
  --bg-radial: #331122;
  --panel-bg: #260a14;
  --gold: #fbbf24;
  --gold-deep: #b45309;
  --gold-pale: #fef08a;
  --blue-tile-top: #2563eb;
  --blue-tile-bot: #172554;
  --blue-border: #93c5fd;
  --red-strike: #dc2626;
  --green-win: #059669;
  --slate-dark: #0f172a;
  --text-white: #ffffff;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 25%, var(--bg-radial) 0%, var(--bg-dark) 80%);
  color: var(--text-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

.display-font {
  font-family: "Arial Black", "Impact", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.03em;
}

button, select, input, textarea {
  font-family: inherit;
  touch-action: manipulation;
}

button {
  cursor: pointer;
  border: none;
  transition: transform 0.1s ease, filter 0.15s ease;
}

button:active:not(:disabled) {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

/* =====================================================================
   2. TOP BAR & STATUS INDICATORS
   ===================================================================== */
.top-bar {
  width: 100%;
  background: rgba(10, 4, 9, 0.94);
  border-bottom: 2px solid rgba(251, 191, 36, 0.45);
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title {
  font-size: clamp(15px, 2.2vw, 21px);
  font-weight: 900;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1.1;
}

.brand-sub {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-pale);
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pill-badge {
  min-height: 36px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1e293b;
  border: 1.5px solid rgba(251, 191, 36, 0.4);
  color: var(--gold-pale);
}

.pill-badge.awake-ok {
  border-color: #34d399;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.65);
}

.pill-badge.awake-warn {
  border-color: #fbbf24;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.65);
}

.pill-badge.room-live {
  background: var(--gold);
  color: #0f172a;
  border-color: #ffffff;
}

.top-btn {
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 10px;
  background: #1e293b;
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  color: var(--gold-pale);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.top-btn.gold {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--gold);
  color: var(--gold);
}

/* =====================================================================
   3. LOBBY / ROLE SELECTION VIEW
   ===================================================================== */
.lobby-wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 20px 14px 40px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-banner {
  background: linear-gradient(155deg, #3b0d1b 0%, #1c060e 100%);
  border: 3px solid var(--gold);
  border-radius: 22px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

.hero-title {
  font-size: clamp(22px, 4vw, 36px);
  color: var(--gold);
  text-transform: uppercase;
  margin: 6px 0;
}

.hero-desc {
  font-size: 14px;
  color: #fde68a;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.45;
}

.role-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 860px) {
  .role-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.role-card {
  background: linear-gradient(165deg, #2d0b17 0%, #16050c 100%);
  border: 2.5px solid rgba(251, 191, 36, 0.6);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

.role-card h2 {
  font-size: 20px;
  color: var(--gold);
  text-transform: uppercase;
}

.role-card p {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.4;
}

.lobby-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.lobby-grid-2 > * {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 860px) {
  .lobby-grid-2 {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
}

.lobby-host-card {
  justify-content: flex-start;
  border-color: rgba(251, 191, 36, 0.85);
}

.lobby-join-card {
  justify-content: flex-start;
}

.setup-deck-tools summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  color: #93c5fd;
  user-select: none;
}

.tv-mode-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 340px) {
  .tv-mode-group {
    grid-template-columns: 1fr;
  }
}

.tv-mode-btn {
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.tv-mode-btn:hover:not(:disabled) {
  border-color: rgba(251, 191, 36, 0.75);
}

.tv-mode-btn.is-selected {
  background: rgba(245, 158, 11, 0.24);
  border-color: var(--gold);
  color: #fef08a;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35);
}

.tv-mode-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-pale);
}

.input-pair {
  display: flex;
  gap: 8px;
}

.lobby-input {
  width: 100%;
  min-height: 48px;
  background: #0f172a;
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 8px 12px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
}

.action-btn {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 10px 16px;
}

.btn-gold {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  color: #0f172a;
  border: 2px solid #fef08a;
}

.btn-blue {
  background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%);
  color: #ffffff;
  border: 2px solid #93c5fd;
}

.btn-red {
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  border: 2px solid #fca5a5;
}

.btn-slate {
  background: #1e293b;
  color: var(--gold-pale);
  border: 2px solid rgba(251, 191, 36, 0.5);
}

.buzzer-split-btns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.buzzer-split-btns > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 460px) {
  .buzzer-split-btns .action-btn {
    font-size: 13px;
    padding: 8px 10px;
  }
}

/* =====================================================================
   4. SHARED STAGE & MARQUEE PANEL STYLES
   ===================================================================== */
.stage-wrap {
  max-width: 1520px;
  margin: 0 auto;
  padding: 12px 14px 32px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.marquee-panel {
  background: linear-gradient(155deg, #3b0d1b 0%, #1c060e 100%);
  border: 3.5px solid var(--gold);
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65), inset 0 0 18px rgba(0, 0, 0, 0.8);
  padding: 16px;
}

.bulb-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.bulb-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fef08a;
  box-shadow: 0 0 8px #f59e0b;
}

/* =====================================================================
   5. TV DISPLAY MODE (WIDESCREEN 16:9 CAST VIEW & SOLO BOARD)
   ===================================================================== */
.tv-top-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pot-box {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  border: 3.5px solid var(--gold);
  border-radius: 18px;
  padding: 8px 28px;
  text-align: center;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.35);
  min-width: 210px;
}

.pot-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.pot-value {
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.05;
}

.mult-pill {
  display: inline-block;
  background: rgba(251, 191, 36, 0.22);
  border: 1px solid var(--gold);
  color: var(--gold-pale);
  font-size: 11px;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.arena-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}

@media (min-width: 920px) {
  .arena-grid {
    grid-template-columns: 260px 1fr 260px;
  }
}

@media (min-width: 1280px) {
  .arena-grid {
    grid-template-columns: 300px 1fr 300px;
  }
}

.team-display-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.team-display-card.winner-glow {
  border-color: #ffffff;
  background: linear-gradient(165deg, #78350f 0%, #451a03 100%);
  box-shadow: 0 0 36px rgba(251, 191, 36, 0.95);
}

.team-display-name {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 900;
  color: var(--gold);
  text-transform: uppercase;
}

.team-display-score {
  width: 100%;
  background: rgba(0, 0, 0, 0.75);
  border: 2.5px solid rgba(251, 191, 36, 0.7);
  border-radius: 18px;
  padding: 18px 10px;
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.prompt-banner {
  background: linear-gradient(90deg, #090d16 0%, #172554 50%, #090d16 100%);
  border: 2.5px solid var(--gold);
  border-radius: 16px;
  padding: 14px 18px;
  text-align: center;
}

.prompt-question {
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.3;
  margin-top: 6px;
}

.answers-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .answers-columns {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
}

.answer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feud-tile {
  width: 100%;
  min-height: 70px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-align: left;
  position: relative;
}

.feud-tile.interactive-tile {
  cursor: pointer;
}

.feud-tile.interactive-tile:hover {
  filter: brightness(1.12);
}

.feud-tile.just-revealed {
  animation: tileFlipIn 0.35s ease;
}

@keyframes tileFlipIn {
  0% { transform: rotateX(80deg); opacity: 0.35; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

.feud-tile.hidden-state {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 50%, #172554 100%);
  border: 2.5px solid #93c5fd;
  justify-content: center;
}

.tile-num-badge {
  width: 54px;
  height: 44px;
  border-radius: 999px;
  background: radial-gradient(circle, #3b82f6 0%, #1e3a8a 100%);
  border: 2px solid #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
}

.feud-tile.revealed-state {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  border: 2.5px solid var(--gold);
  justify-content: space-between;
  padding-left: 14px;
}

.tile-ans-text {
  font-size: clamp(14px, 1.6vw, 19px);
  font-weight: 900;
  text-transform: uppercase;
  color: #ffffff;
  padding-right: 10px;
  line-height: 1.2;
}

.tile-pts-box {
  align-self: stretch;
  min-width: 66px;
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  border-left: 2.5px solid #fef08a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  padding: 0 10px;
}

.feud-tile-empty {
  min-height: 70px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
  border: 2px dashed rgba(148, 163, 184, 0.25);
}

.buzzer-banner-tv {
  background: #0f172a;
  border: 2px solid rgba(251, 191, 36, 0.45);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: center;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.buzzer-banner-tv.active {
  background: var(--gold);
  color: #0f172a;
  border-color: #ffffff;
}

/* Single-Screen ("Solo") Bottom Toolbar */
.solo-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.solo-shortcut-hint {
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 700;
}

/* =====================================================================
   6. HOST REMOTE CONTROL MODE (MOBILE-FIRST ANSWER KEY + CONTROLS)
   ===================================================================== */
.host-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 900px) {
  .host-grid {
    grid-template-columns: 1.3fr 1fr;
  }
}

.host-answer-btn {
  width: 100%;
  min-height: 60px;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  margin-bottom: 10px;
  border: 2px solid rgba(251, 191, 36, 0.5);
  background: #0f172a;
  color: #ffffff;
}

.host-answer-btn.is-revealed {
  background: linear-gradient(90deg, #065f46 0%, #047857 100%);
  border-color: #6ee7b7;
}

.host-answer-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.host-answer-btn.is-revealed:disabled {
  opacity: 0.92;
  cursor: default;
}

.top-btn:disabled,
.action-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.host-ans-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
}

.host-rank-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: #0f172a;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.host-pts-pill {
  background: rgba(0, 0, 0, 0.55);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
  flex-shrink: 0;
}

.host-team-box {
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(251, 191, 36, 0.45);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.host-team-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  background: #0f172a;
  border: 1.5px solid var(--gold);
  border-radius: 10px;
  padding: 6px 10px;
  color: var(--gold);
  font-weight: 900;
  font-size: 16px;
  text-transform: uppercase;
}

.host-team-input.team-1-input {
  border-color: rgba(96, 165, 250, 0.8);
  color: #dbeafe;
}

.host-team-input.team-2-input {
  border-color: rgba(248, 113, 113, 0.8);
  color: #fee2e2;
}

/* =====================================================================
   7. GIANT FULL-SCREEN TEAM BUZZER MODE (PHONES 3 & 4)
   ===================================================================== */
.buzzer-stage {
  min-height: calc(100vh - 64px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.giant-buzzer-btn {
  flex: 1;
  min-height: 320px;
  width: 100%;
  border-radius: 32px;
  border: 8px solid #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
}

.giant-buzzer-btn.team-1-theme {
  background: radial-gradient(circle, #3b82f6 0%, #1e3a8a 100%);
}

.giant-buzzer-btn.team-2-theme {
  background: radial-gradient(circle, #ef4444 0%, #991b1b 100%);
}

.giant-buzzer-btn.won-state {
  background: radial-gradient(circle, #10b981 0%, #065f46 100%);
  border-color: #fef08a;
}

.giant-buzzer-btn.locked-out-state {
  background: #1e293b;
  border-color: #475569;
  opacity: 0.65;
  cursor: not-allowed;
}

.giant-buzz-icon {
  font-size: 76px;
  line-height: 1;
}

.giant-buzz-title {
  font-size: clamp(28px, 7vw, 48px);
  font-weight: 900;
  text-transform: uppercase;
  color: #ffffff;
}

.giant-buzz-sub {
  font-size: 16px;
  font-weight: 800;
  color: #fef08a;
  text-transform: uppercase;
}

/* =====================================================================
   8. FAST MONEY, EDIT ROUND MODAL & OVERLAYS
   ===================================================================== */
.fm-row {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(251, 191, 36, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

@media (min-width: 820px) {
  .fm-row {
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: center;
  }
}

.fm-in-pair {
  display: flex;
  gap: 6px;
}

.fm-txt {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  background: #020617;
  border: 1.5px solid #334155;
  border-radius: 8px;
  padding: 6px 10px;
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

.fm-num {
  width: 68px;
  min-height: 42px;
  background: rgba(251, 191, 36, 0.2);
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  text-align: center;
  color: var(--gold);
  font-size: 18px;
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow-y: auto;
}

.modal-card {
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(165deg, #2d0b17 0%, #14050b 100%);
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.strike-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px;
  pointer-events: none;
}

#tvView.embedded-in-host .big-red-x {
  width: 190px;
  height: 190px;
  font-size: 136px;
}

.big-red-x {
  width: clamp(95px, 24vw, 210px);
  height: clamp(95px, 24vw, 210px);
  background: var(--red-strike);
  border: 8px solid #ffffff;
  border-radius: 26px;
  box-shadow: 0 0 45px rgba(220, 38, 38, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(64px, 16vw, 150px);
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.be-specific-banner {
  padding: clamp(18px, 3.5vw, 34px) clamp(26px, 5vw, 54px);
  background: linear-gradient(155deg, #1e293b 0%, #0f172a 100%);
  border: 6px solid var(--gold);
  border-radius: 24px;
  box-shadow: 0 0 42px rgba(251, 191, 36, 0.85);
  color: #fef08a;
  font-size: clamp(26px, 5.2vw, 58px);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.15;
}

#tvView.embedded-in-host .be-specific-banner {
  font-size: 48px;
  padding: 24px 44px;
}

.toast-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: #0f172a;
  border: 2px solid var(--gold);
  color: #fef08a;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
  text-align: center;
  max-width: 92vw;
}

/* =====================================================================
   9. TURN SHOT-CLOCK TIMER, QUESTION REVEAL & BOARD CONTROL
   ===================================================================== */
.turn-timer-pill {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  border: 2px solid var(--gold);
  color: var(--gold);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.turn-timer-pill.running {
  background: rgba(6, 95, 70, 0.85);
  border-color: #34d399;
  color: #a7f3d0;
}

.turn-timer-pill.urgent {
  background: rgba(185, 28, 28, 0.9);
  border-color: #fca5a5;
  color: #ffffff;
  animation: pulseUrgent 0.55s infinite alternate;
}

.turn-timer-pill.expired {
  background: #dc2626;
  border-color: #ffffff;
  color: #ffffff;
}

@keyframes pulseUrgent {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

.prompt-banner.question-hidden {
  background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  border-style: dashed;
  border-color: rgba(251, 191, 36, 0.65);
}

.prompt-banner.question-hidden .prompt-question {
  color: #fde68a;
  font-style: italic;
  opacity: 0.92;
}

.team-display-card.playing-glow {
  border-color: #34d399;
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.65);
}

.control-badge {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  color: #cbd5e1;
}

.control-badge.active-control {
  background: #059669;
  border-color: #a7f3d0;
  color: #ffffff;
}

.setup-step-box {
  background: rgba(0, 0, 0, 0.48);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(251, 191, 36, 0.38);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.buzzer-banner-tv.steal-alert {
  background: linear-gradient(90deg, #991b1b 0%, #dc2626 50%, #991b1b 100%);
  color: #ffffff;
  border-color: #fef08a;
  box-shadow: 0 0 24px rgba(220, 38, 38, 0.85);
}

.fm-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.fm-chip-btn {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fef08a;
  line-height: 1.2;
}

.fm-chip-btn:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: var(--gold);
}

.fm-chip-btn.zero-chip {
  background: rgba(153, 27, 27, 0.65);
  border-color: #fca5a5;
  color: #ffffff;
}

.winner-stage-card {
  text-align: center;
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.winner-trophy {
  font-size: clamp(56px, 9vw, 92px);
  line-height: 1;
}

.winner-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 680px;
  margin-top: 8px;
}

.qr-card-box {
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #0f172a;
}

/* =====================================================================
   10. ADAPTIVE FULL-VIEWPORT TV DISPLAY (CLASSIC GAME SHOW LAYOUT)
   ===================================================================== */
body.tv-viewport-lock,
body:has(#tvView:not(.hidden):not(.embedded-in-host)) {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.tv-viewport-lock .top-bar,
body:has(#tvView:not(.hidden):not(.embedded-in-host)) .top-bar {
  display: none !important;
}

.tv-floating-controls {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 60;
  display: flex;
  gap: 6px;
  opacity: 0.32;
  transition: opacity 0.2s ease;
}
.tv-floating-controls:hover,
.tv-floating-controls:focus-within {
  opacity: 1;
}
#tvView.embedded-in-host .tv-floating-controls,
:fullscreen .tv-floating-controls,
:-webkit-full-screen .tv-floating-controls,
body.is-fullscreen .tv-floating-controls {
  display: none !important;
}

/* Hide the top navigation buttons completely when in Fullscreen Mode */
:fullscreen .top-bar,
:-webkit-full-screen .top-bar,
body.is-fullscreen .top-bar {
  display: none !important;
}

#tvView {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: clamp(6px, 1.1vh, 16px) clamp(10px, 1.6vw, 28px);
  gap: clamp(6px, 1.1vh, 14px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(circle at 50% 18%, #27272a 0%, #18181b 58%, #09090b 100%);
  transition: background 0.35s ease;
}

/* Shift entire TV stage background to match whose turn it is (Team 1 = Blue, Team 2 = Red) */
#tvView.tv-turn-team1 {
  background: radial-gradient(circle at 50% 18%, #1d4ed8 0%, #0f172a 58%, #020617 100%);
}

#tvView.tv-turn-team2 {
  background: radial-gradient(circle at 50% 18%, #b91c1c 0%, #450a0a 58%, #140306 100%);
}

/* Distinctive Team Colors: Team 1 = Blue, Team 2 = Red */
#tvTeam1Card,
.tv-team1-pod {
  background: linear-gradient(165deg, #1e3a8a 0%, #0f172a 100%);
  border-color: #60a5fa;
}

#tvTeam1Card .team-display-name {
  color: #93c5fd;
}

#tvTeam2Card,
.tv-team2-pod {
  background: linear-gradient(165deg, #7f1d1d 0%, #2a0a0f 100%);
  border-color: #f87171;
}

#tvTeam2Card .team-display-name {
  color: #fca5a5;
}

.tv-team-pod {
  transition: opacity 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.tv-team-pod.is-inactive-turn {
  opacity: 0.56;
  filter: saturate(0.7);
}

#tvTeam1Card.playing-glow,
#tvTeam1Card.winner-glow {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.75), 0 0 38px rgba(59, 130, 246, 0.95);
}

#tvTeam2Card.playing-glow,
#tvTeam2Card.winner-glow {
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.75), 0 0 38px rgba(239, 68, 68, 0.95);
}

#tvView.tv-turn-team1 .buzzer-banner-tv.active {
  border-color: #60a5fa;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.85), rgba(15, 23, 42, 0.9));
  color: #dbeafe;
}

#tvView.tv-turn-team2 .buzzer-banner-tv.active {
  border-color: #f87171;
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.85), rgba(42, 10, 15, 0.9));
  color: #fee2e2;
}

/* Top Scoreboard & Central Shot-Clock HUD */
.tv-top-hud {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: clamp(8px, 1.4vw, 22px);
}

@media (max-width: 820px) {
  .tv-top-hud {
    grid-template-columns: 1fr 1fr;
  }
  .tv-center-hud {
    grid-column: 1 / -1;
    order: -1;
  }
}

.tv-team-pod {
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: clamp(6px, 1.1vh, 14px) clamp(12px, 1.6vw, 22px) !important;
  gap: clamp(10px, 1.4vw, 20px) !important;
  border-radius: 18px;
}

.tv-team-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.tv-team-pod-right .tv-team-meta {
  align-items: flex-end;
  text-align: right;
}

.tv-team-pod .team-display-name {
  font-size: clamp(16px, min(2.2vw, 3.2vh), 32px);
  line-height: 1.1;
  word-break: break-word;
  text-align: left;
}

.tv-team-pod-right .team-display-name {
  text-align: right;
}

.tv-team-pod .team-display-score {
  width: auto;
  min-width: clamp(78px, 9.5vw, 150px);
  padding: clamp(6px, 1.1vh, 14px) clamp(12px, 1.6vw, 22px);
  font-size: clamp(28px, min(4.2vw, 6vh), 64px);
  border-radius: 14px;
  flex-shrink: 0;
}

/* Center HUD: Pot + Giant Central Timer + Round Info */
.tv-center-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.7vh, 8px);
}

.tv-center-hud-main {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 16px);
}

#tvView .pot-box {
  padding: clamp(4px, 0.8vh, 10px) clamp(16px, 2.2vw, 32px);
  min-width: clamp(145px, 14vw, 230px);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#tvView .pot-value {
  font-size: clamp(26px, min(3.8vw, 5.2vh), 54px);
}

/* Giant Central Shot-Clock Timer in the Middle Top */
.tv-hero-timer {
  min-width: clamp(110px, 11vw, 175px);
  padding: clamp(4px, 0.8vh, 10px) clamp(14px, 1.8vw, 26px);
  border-radius: 16px;
  border-width: 3.5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.35);
}

.tv-timer-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--gold-pale);
  line-height: 1;
}

.tv-timer-digits {
  font-size: clamp(28px, min(4vw, 5.5vh), 58px);
  line-height: 1.05;
  font-weight: 900;
}

.tv-center-hud-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.tv-center-hud-meta .pill-badge {
  min-height: 26px;
  padding: 3px 10px;
  font-size: clamp(10px, min(1.1vw, 1.7vh), 13px);
}

.tv-strikes-pill {
  border-color: #ef4444;
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.55);
}

/* Full-Width Bottom Question & Answer Board */
#tvMainBoardWrap.tv-board-fullwrap {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.tv-center-board {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(8px, 1.3vh, 16px);
  min-height: 0;
  height: 100%;
  width: 100%;
  padding: clamp(10px, 1.5vh, 22px) clamp(14px, 2vw, 32px);
  overflow: hidden;
}

#tvView .prompt-banner {
  flex: 0 0 auto;
  padding: clamp(8px, 1.4vh, 20px) clamp(14px, 2vw, 32px);
  border-width: 3px;
}

#tvView .prompt-question {
  font-size: clamp(18px, min(2.6vw, 3.8vh), 40px);
  line-height: 1.22;
  margin-top: clamp(2px, 0.5vh, 6px);
}

#tvAnswerGrid.answers-columns {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1.4vw, 20px);
  align-items: stretch;
}

#tvAnswerGrid .answer-col {
  display: grid;
  grid-template-rows: repeat(var(--rows-per-col, 4), 1fr);
  gap: clamp(8px, 1.3vh, 16px);
  min-height: 0;
  height: 100%;
}

#tvAnswerGrid .feud-tile,
#tvAnswerGrid .feud-tile-empty {
  min-height: 0;
  height: 100%;
  border-radius: 16px;
}

#tvAnswerGrid .feud-tile.revealed-state {
  padding-left: clamp(14px, 1.8vw, 26px);
  border-width: 3px;
}

#tvAnswerGrid .feud-tile.hidden-state {
  border-width: 3px;
}

#tvAnswerGrid .tile-num-badge {
  width: clamp(46px, min(5.2vw, 7vh), 82px);
  height: clamp(36px, min(4.2vw, 5.8vh), 66px);
  font-size: clamp(20px, min(2.8vw, 4.2vh), 42px);
  border-width: 2.5px;
}

#tvAnswerGrid .tile-ans-text {
  font-size: clamp(15px, min(2.1vw, 3.3vh), 34px);
  line-height: 1.18;
}

#tvAnswerGrid .tile-pts-box {
  min-width: clamp(64px, 6.8vw, 116px);
  font-size: clamp(20px, min(2.9vw, 4.4vh), 46px);
  border-left-width: 3px;
}

#tvView .buzzer-banner-tv {
  flex: 0 0 auto;
  padding: clamp(6px, 1vh, 12px) 16px;
  font-size: clamp(14px, min(1.8vw, 2.6vh), 26px);
}

#tvFastMoneyWrap {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.3vh, 16px);
  padding: clamp(10px, 1.6vh, 22px);
  overflow: hidden;
}

#tvFmRows {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  gap: clamp(6px, 1.1vh, 14px);
}

.tv-fm-row {
  margin-bottom: 0;
  min-height: 0;
  height: 100%;
  padding: clamp(6px, 1vh, 14px) clamp(10px, 1.5vw, 20px);
  align-items: center;
}

.tv-fm-prompt {
  font-weight: 800;
  color: #fde68a;
  font-size: clamp(13px, min(1.5vw, 2.3vh), 22px);
  line-height: 1.22;
}

.tv-fm-ans-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #020617;
  padding: clamp(6px, 1.1vh, 14px) clamp(10px, 1.4vw, 18px);
  border-radius: 10px;
  border: 1.5px solid #334155;
  height: 100%;
  min-height: 0;
}

.tv-fm-ans-text {
  font-weight: 900;
  font-size: clamp(13px, min(1.6vw, 2.5vh), 24px);
  text-transform: uppercase;
}

.tv-fm-pts-text {
  color: var(--gold);
  font-weight: 900;
  font-size: clamp(16px, min(2vw, 3vh), 30px);
}

#tvWinnerWrap {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  justify-content: center;
  overflow: hidden;
  padding: clamp(14px, 2.5vh, 40px);
}

#tvView .solo-controls-bar {
  flex: 0 0 auto;
  padding: clamp(6px, 0.8vh, 12px) clamp(10px, 1.4vw, 18px);
  gap: 6px;
}

/* =====================================================================
   11. GUIDED HOST GAME FLOW COACH BAR & PHASE STEPPER
   ===================================================================== */
.flow-coach-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #172554 100%);
  border: 3px solid var(--gold);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
}

.flow-coach-card.steal-phase {
  background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 55%, #991b1b 100%);
  border-color: #fef08a;
  box-shadow: 0 0 28px rgba(220, 38, 38, 0.7);
}

.flow-coach-card.win-phase {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 55%, #047857 100%);
  border-color: #fef08a;
}

.flow-coach-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.flow-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.flow-step-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  color: #94a3b8;
}

.flow-step-pill.active {
  background: var(--gold);
  border-color: #ffffff;
  color: #0f172a;
}

.flow-step-pill.done {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #a7f3d0;
}

.flow-coach-body {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.flow-coach-info {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flow-coach-headline {
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.2;
}

.flow-coach-sub {
  font-size: 13px;
  font-weight: 700;
  color: #fde68a;
  line-height: 1.35;
}

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

.flow-coach-actions .action-btn {
  width: auto;
  min-height: 44px;
  padding: 8px 16px;
  font-size: 13px;
}





/* =====================================================================
   12. AUTHENTIC-RULES AUDIT: BOARD CONTROL, STEAL, REVEALS & BUZZER LOCK
   ===================================================================== */

/* Active board control = glowing GOLD scoreboard panel (overrides older green glow) */
.team-display-card.playing-glow {
  border-color: #fde047;
  box-shadow: 0 0 0 3px rgba(253, 224, 71, 0.55), 0 0 34px rgba(251, 191, 36, 0.85);
}

.control-badge.active-control {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  border-color: #fef08a;
  color: #0f172a;
}

/* Stealing team during "Chance to Steal" */
.team-display-card.steal-glow {
  border-color: #fca5a5;
  background: linear-gradient(165deg, #7f1d1d 0%, #450a0a 100%);
  animation: stealPulse 0.8s ease-in-out infinite alternate;
}

.team-display-card.steal-glow .control-badge.active-control {
  background: #dc2626;
  border-color: #fef08a;
  color: #ffffff;
}

@keyframes stealPulse {
  0% { box-shadow: 0 0 14px rgba(220, 38, 38, 0.55); }
  100% { box-shadow: 0 0 40px rgba(250, 204, 21, 0.95); }
}

/* Host: pre-highlighted Award Pot button for the stealing team */
.action-btn.steal-award-highlight {
  background: linear-gradient(180deg, #ef4444 0%, #991b1b 100%);
  color: #ffffff;
  border-color: #fef08a;
  animation: stealPulse 0.8s ease-in-out infinite alternate;
}

/* Host: unrevealed tiles after the pot is awarded (0-point "missed answer" reveals) */
.host-answer-btn.is-missed-reveal {
  border-style: dashed;
  background: rgba(15, 23, 42, 0.75);
  opacity: 0.92;
}

.host-answer-btn.is-missed-reveal .host-pts-pill {
  color: #cbd5e1;
  border-color: #64748b;
  font-size: 12px;
}

/* Buzzer phones: hide the mode-switcher nav to prevent accidental exits mid-round */
body.buzzer-nav-locked .top-bar .status-cluster > *:not(#roomCodeBadge):not(#wakeLockBadge) {
  display: none !important;
}

.buzzer-exit-hold-btn {
  display: none;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1.5px dashed rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.8);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  --hold-pct: 0%;
  background: linear-gradient(
    90deg,
    rgba(220, 38, 38, 0.55) var(--hold-pct),
    rgba(15, 23, 42, 0.8) var(--hold-pct)
  );
}

.buzzer-exit-hold-btn.holding {
  color: #ffffff;
  border-color: #fca5a5;
}

body.buzzer-nav-locked .buzzer-exit-hold-btn {
  display: block;
}

/* Inline Face-Off & Play/Pass Decision Bar directly above the Host Answer List */
.host-answers-wrong-bar {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.host-answers-wrong-bar .action-btn {
  flex: 2 1 200px;
  min-height: 44px;
  font-size: 14px;
}

.host-answers-wrong-bar .host-specific-btn {
  flex: 1 1 150px;
}

.faceoff-decision-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
}

.faceoff-decision-bar.pass-play-highlight {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.85), rgba(30, 41, 59, 0.92));
  border: 2.5px solid #fbbf24;
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.4);
}

.faceoff-decision-bar.steal-highlight {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.85), rgba(30, 41, 59, 0.92));
  border: 2.5px solid #f87171;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.4);
}

.fodb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.fodb-title {
  font-size: 13px;
  color: #fef08a;
  letter-spacing: 0.04em;
}

.fodb-winner-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fodb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fodb-subnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(251, 191, 36, 0.35);
  font-size: 12px;
  color: #cbd5e1;
}

/* Host Guided Teleprompter Script Box (🎙️ SAY + 👉 DO) */
.host-script-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.script-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.script-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.say-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
}

.do-badge {
  background: rgba(59, 130, 246, 0.28);
  border: 1px solid rgba(96, 165, 250, 0.65);
  color: #bfdbfe;
}

.script-text {
  font-size: 13px;
}

.say-text {
  color: #fef08a;
  font-weight: 700;
  font-style: italic;
}

.do-text {
  color: #e2e8f0;
  font-weight: 600;
}

/* =====================================================================
   13. STREAMLINED HOST CONSOLE + LIVE EMBEDDED 16:9 TV MONITOR
   ===================================================================== */
.host-top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  position: relative;
  z-index: 30;
}

.host-more-menu {
  position: relative;
}

.host-more-summary {
  list-style: none;
  cursor: pointer;
}

.host-more-summary::-webkit-details-marker {
  display: none;
}

.host-more-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  padding: 8px;
  border-radius: 12px;
  background: #0f172a;
  border: 2px solid var(--gold);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 70;
}

.host-more-dropdown .top-btn {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.host-more-popout,
.host-more-mobile-only {
  display: none;
}

.host-mobile-tabs {
  display: none;
  gap: 4px;
}

.host-mobile-tab {
  min-height: 34px;
  padding: 4px 10px;
  font-size: 13px;
}

.host-script-collapse-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.host-round-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex: 1 1 280px;
}

.host-round-select {
  flex: 1;
  min-width: 180px;
  min-height: 38px;
  font-size: 13px;
  letter-spacing: normal;
  text-align: left;
}

.host-stage-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.host-workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

@media (min-width: 960px) {
  .host-workspace-grid {
    grid-template-columns: 1.25fr 1fr;
  }
}

.host-primary-col,
.host-tv-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.host-main-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Top Quick-Action Bar: Show Q + Timer + Wrong Answer (X) in one row */
.host-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.65);
  border: 2px solid rgba(251, 191, 36, 0.45);
}

.host-quick-reveal-btn {
  flex: 1 1 210px;
  min-height: 46px;
  font-size: 13px;
  padding: 8px 12px;
}

.host-quick-timer-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.host-quick-timer-group .turn-timer-pill {
  font-size: 16px;
  min-height: 36px;
  padding: 4px 12px;
}

.host-quick-btn {
  width: auto;
  min-height: 38px;
  padding: 6px 12px;
  font-size: 13px;
}

.host-quick-pause-btn,
.host-script-toggle-btn {
  min-height: 36px;
  padding: 5px 10px;
  font-size: 12px;
}

.host-quick-strike-btn {
  width: auto;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 8px 16px;
  font-size: 14px;
}

.host-question-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1.5px solid rgba(251, 191, 36, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
}

.host-question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.host-prompt-text {
  font-size: 16px;
  font-weight: 800;
  color: #fef08a;
  line-height: 1.35;
  margin: 0;
}

.host-board-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

/* Live Embedded 16:9 TV Screen Monitor in Host Mode */
.host-tv-monitor-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.host-tv-monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.host-tv-monitor-dock {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 18%, #27272a 0%, #09090b 100%);
  border: 2.5px solid var(--gold);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.85), 0 8px 24px rgba(0, 0, 0, 0.65);
}

#tvView.embedded-in-host {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 1280px !important;
  height: 720px !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 14px 22px !important;
  gap: 12px !important;
  transform-origin: top left !important;
  transform: scale(var(--tv-scale, 0.42)) !important;
  pointer-events: none !important;
  user-select: none !important;
}

/* Fixed 720p virtual canvas proportions inside the embedded TV monitor */
#tvView.embedded-in-host .tv-top-hud {
  grid-template-columns: 1fr auto 1fr !important;
  gap: 16px !important;
}

#tvView.embedded-in-host .tv-center-hud {
  grid-column: auto !important;
  order: 0 !important;
}

#tvView.embedded-in-host .tv-team-pod .team-display-name {
  font-size: 24px !important;
}

#tvView.embedded-in-host .tv-team-pod .team-display-score {
  font-size: 46px !important;
  min-width: 110px !important;
  padding: 8px 16px !important;
}

#tvView.embedded-in-host .pot-value {
  font-size: 40px !important;
}

#tvView.embedded-in-host .tv-timer-digits {
  font-size: 42px !important;
}

#tvView.embedded-in-host .prompt-question {
  font-size: 28px !important;
}

#tvView.embedded-in-host #tvAnswerGrid .tile-num-badge {
  width: 58px !important;
  height: 46px !important;
  font-size: 28px !important;
}

#tvView.embedded-in-host #tvAnswerGrid .tile-ans-text {
  font-size: 23px !important;
}

#tvView.embedded-in-host #tvAnswerGrid .tile-pts-box {
  min-width: 86px !important;
  font-size: 32px !important;
}

#tvView.embedded-in-host .buzzer-banner-tv {
  font-size: 20px !important;
  padding: 8px 16px !important;
}

/* Compact Team Scores & Collapsible Manual Overrides */
.host-scores-card {
  padding: 12px;
}

.host-scores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 560px) {
  .host-scores-grid {
    grid-template-columns: 1fr;
  }
}

.host-overrides-drawer {
  padding: 10px 14px;
}

.host-overrides-summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fde68a;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.host-overrides-summary::-webkit-details-marker {
  display: none;
}

.host-overrides-summary::after {
  content: "▼ Show";
  font-size: 11px;
  color: #94a3b8;
}

.host-overrides-drawer[open] .host-overrides-summary::after {
  content: "▲ Hide";
}

.host-overrides-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(251, 191, 36, 0.35);
}

.host-override-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deck-picker-pill {
  cursor: pointer;
  gap: 6px;
  border-color: rgba(251, 191, 36, 0.5);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.deck-picker-pill:hover {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.16);
}

.deck-pill-select {
  background: transparent;
  border: none;
  color: #fde68a;
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  cursor: pointer;
  outline: none;
  max-width: 240px;
}

/* Compact answer board spacing on both desktop & mobile */
.host-main-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
}

#hostAnswersList,
.host-answer-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.host-answer-btn {
  min-height: 44px;
  padding: 6px 10px;
  margin-bottom: 0;
}

/* Desktop / laptop (>= 960px): scale Host Mode to fit the window with no page scrolling */
@media (min-width: 960px) {
  body:has(#hostView:not(.hidden)) .top-bar {
    padding: 5px 14px;
    flex-wrap: nowrap;
  }

  body:has(#hostView:not(.hidden)) #roleSubtitle {
    display: none;
  }

  #hostView {
    height: auto;
    overflow: visible;
    padding: 6px 14px 14px;
    gap: 6px;
  }

  #hostView > .flow-coach-card {
    flex: 0 0 auto;
    padding: 6px 10px;
    gap: 4px;
  }

  #hostView .flow-coach-top {
    flex-wrap: nowrap;
    gap: 6px;
  }

  #hostView .flow-step-pill:not(.active) {
    display: none;
  }

  #hostView .flow-coach-headline {
    font-size: 15px;
    line-height: 1.15;
  }

  #hostView .faceoff-decision-bar {
    margin-top: 2px;
    gap: 4px;
  }

  #hostView .faceoff-decision-bar .top-btn,
  #hostView .faceoff-decision-bar .action-btn {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 12px;
  }

  #hostView .host-score-strip {
    margin-bottom: 4px;
    gap: 6px;
  }

  #hostView .host-strip-team {
    padding: 4px 10px;
  }

  #hostView .host-strip-score {
    font-size: 16px;
  }

  #hostView .host-answers-wrong-bar .action-btn {
    min-height: 36px;
    padding: 5px 10px;
    font-size: 13px;
  }

  #hostView .host-question-box {
    flex: 0 0 auto;
    padding: 5px 10px;
  }

  #hostView .host-prompt-text {
    font-size: 14px;
    line-height: 1.25;
  }

  #hostView .host-workspace-grid {
    flex: 0 0 auto;
    min-height: 0;
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }

  #hostView .host-primary-col,
  #hostView .host-tv-col {
    height: auto;
    min-height: 0;
    gap: 8px;
  }

  #hostView .host-main-card {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
  }

  #hostView .host-question-box {
    flex: 0 0 auto;
    padding: 8px 10px;
  }

  #hostView #hostAnswersList {
    flex: 0 0 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  #hostView .host-answer-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
  }

  #hostView .host-answer-btn {
    flex: 0 0 auto;
    min-height: 44px;
    height: auto;
    padding: 6px 10px;
    margin-bottom: 0;
  }

  #hostView .host-ans-left {
    font-size: 14px;
    gap: 8px;
    white-space: normal;
    line-height: 1.2;
    text-align: left;
  }

  #hostView .host-rank-circle {
    width: 26px;
    height: 26px;
    font-size: 13px;
    flex-shrink: 0;
  }

  #hostView .host-answers-wrong-bar {
    flex: 0 0 auto;
    margin-top: 2px;
  }

  #hostView #hostFmControls {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
  }

  #hostView .host-tv-monitor-card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  #hostView .host-tv-monitor-dock {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 220px;
    margin: 0;
  }
}

@media (min-width: 960px) and (max-height: 480px) {
  #hostView .host-workspace-grid {
    grid-template-columns: 1fr;
  }

  #hostView .host-tv-monitor-dock {
    max-width: 760px;
    margin: 0 auto;
  }
}

@media (max-width: 959px) {
  .host-tv-monitor-card {
    margin-top: 2px;
  }
}

@media (max-width: 640px) {
  body:has(#hostView:not(.hidden)) .top-bar {
    padding: 4px 10px;
    flex-wrap: nowrap;
    gap: 6px;
  }

  body:has(#hostView:not(.hidden)) #topBrandIcon {
    font-size: 18px !important;
  }

  body:has(#hostView:not(.hidden)) #topBrandTitle {
    font-size: 13px;
  }

  body:has(#hostView:not(.hidden)) #roleSubtitle,
  body:has(#hostView:not(.hidden)) #wakeLockBadge,
  body:has(#hostView:not(.hidden)) #btnMute,
  body:has(#hostView:not(.hidden)) #btnFullscreen,
  body:has(#hostView:not(.hidden)) #btnLeaveRoom {
    display: none !important;
  }

  body:has(#hostView:not(.hidden)) #roomCodeBadge {
    min-height: 24px;
    padding: 2px 8px;
    font-size: 10px;
  }

  #hostView {
    padding: 6px 8px 14px;
    gap: 6px;
  }

  .host-top-nav {
    padding: 5px 8px;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .host-mobile-tabs {
    display: none !important;
  }

  .host-round-nav {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .host-round-nav .top-btn {
    padding: 4px 8px;
    min-height: 32px;
    font-size: 12px;
  }

  .host-round-select {
    min-width: 0;
    width: 100%;
    min-height: 32px;
    padding: 4px 6px;
    font-size: 12px;
  }

  .host-desktop-stage-btn,
  .host-popout-btn {
    display: none;
  }

  .host-more-popout,
  .host-more-mobile-only {
    display: flex;
  }

  .host-stage-nav {
    flex: 0 0 auto;
    width: auto;
    gap: 4px;
  }

  .host-more-summary {
    min-height: 32px;
    padding: 4px 10px;
  }

  .flow-coach-card {
    padding: 6px 8px;
    gap: 5px;
    border-width: 2px;
    border-radius: 14px;
  }

  .flow-coach-top {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
  }

  .flow-stepper {
    flex: 0 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .flow-step-pill.active {
    padding: 3px 7px;
    font-size: 10px;
    white-space: nowrap;
  }

  .flow-step-pill:not(.active) {
    display: none;
  }

  .host-quick-timer-group {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .host-quick-timer-group .turn-timer-pill {
    min-height: 28px;
    padding: 2px 7px;
    font-size: 12px;
    white-space: nowrap;
  }

  .host-quick-pause-btn,
  .host-script-toggle-btn {
    min-height: 28px;
    padding: 2px 7px;
    font-size: 11px;
    white-space: nowrap;
  }

  .flow-coach-headline {
    font-size: 13px;
  }

  .faceoff-decision-bar {
    margin-top: 4px;
    padding: 6px 8px;
    gap: 5px;
  }

  .faceoff-decision-bar .action-btn {
    min-height: 36px !important;
    font-size: 12px !important;
    padding: 5px 8px !important;
  }

  .host-main-card {
    padding: 8px;
    gap: 6px;
    border-width: 2px;
    border-radius: 14px;
  }

  .host-answers-wrong-bar {
    gap: 6px;
  }

  .host-answers-wrong-bar .action-btn {
    min-height: 38px;
    font-size: 12px;
    padding: 5px 8px;
  }

  .host-question-box {
    padding: 6px 8px;
  }

  .host-question-meta {
    margin-bottom: 3px;
  }

  .host-prompt-text {
    font-size: 13px;
    line-height: 1.25;
  }

  #hostAnswersList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .host-answer-col {
    gap: 5px;
  }

  .host-answer-btn {
    height: auto;
    min-height: 40px;
    padding: 6px 7px;
    border-radius: 10px;
    gap: 5px;
    align-items: center;
  }

  .host-ans-left {
    font-size: 12px;
    gap: 5px;
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
    text-align: left;
  }

  .host-rank-circle {
    width: 20px;
    height: 20px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .host-pts-pill {
    font-size: 11px;
    padding: 2px 6px;
    flex-shrink: 0;
  }
}

.deck-pill-select option {
  background: #0f172a;
  color: #f8fafc;
}

body:has(#lobbyView:not(.hidden)) .top-bar {
  display: none;
}

/* =====================================================================
   STREAMLINED HOST HEADER, SCORE STRIP & CONTEXTUAL POPOVER
   ===================================================================== */
.host-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 auto;
}

.host-round-pill-btn {
  font-size: 11px;
  min-height: 30px;
  padding: 4px 10px;
  border-color: rgba(251, 191, 36, 0.55);
  color: var(--gold);
  background: rgba(15, 23, 42, 0.9);
}

.host-clickable-stepper {
  cursor: pointer;
}

.host-timer-pill-btn {
  cursor: pointer;
  border: 1.5px solid rgba(251, 191, 36, 0.45);
}

.host-score-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
}

.host-strip-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.host-strip-team.team-1 {
  border-color: rgba(59, 130, 246, 0.55);
}

.host-strip-team.team-2 {
  border-color: rgba(239, 68, 68, 0.55);
}

.host-devices-btn {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11px;
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
}

.host-devices-btn.is-ready {
  border-color: rgba(52, 211, 153, 0.8);
  background: rgba(6, 78, 59, 0.55);
  color: #6ee7b7;
}

.host-devices-btn.is-partial {
  border-color: rgba(96, 165, 250, 0.8);
  background: rgba(30, 58, 138, 0.5);
  color: #dbeafe;
}

.host-strip-team.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.45), 0 4px 12px rgba(251, 191, 36, 0.18);
  background: rgba(30, 41, 59, 0.95);
}

.host-strip-name {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.host-strip-score {
  font-size: 18px;
  color: var(--gold);
  flex-shrink: 0;
}

.host-strip-pot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(120, 53, 15, 0.35);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  cursor: pointer;
}

.host-strip-pot-label {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fde68a;
}

.host-strip-pot-val {
  font-size: 16px;
  color: #fff;
  line-height: 1.05;
}

.host-popover-card {
  max-width: 460px;
}

.host-popover-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.host-popover-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
}

.host-tv-monitor-dock .tv-team-pod,
.host-tv-monitor-dock #tvQuestionOverlay,
.host-tv-monitor-dock #tvStrikesPill {
  cursor: pointer;
}

.host-tv-monitor-dock .tv-team-pod:hover,
.host-tv-monitor-dock #tvQuestionOverlay:hover,
.host-tv-monitor-dock #tvStrikesPill:hover {
  outline: 2px solid rgba(251, 191, 36, 0.75);
  outline-offset: 2px;
}

.host-question-box.is-swappable {
  cursor: pointer;
  border: 1.5px dashed rgba(251, 191, 36, 0.65);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.host-question-box.is-swappable:hover {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.08);
}

.host-question-swap-hint {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: 0.02em;
}

.round-tree-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 48vh;
  overflow-y: auto;
}

.round-tree-group {
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 10px;
  padding: 6px 8px;
}

.round-tree-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  padding: 2px 4px;
}

.round-tree-count {
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 700;
}

.round-tree-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  padding-left: 6px;
  border-left: 2px solid rgba(251, 191, 36, 0.28);
}

.round-tree-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}

.round-tree-item:hover {
  border-color: var(--gold);
  background: rgba(30, 41, 59, 0.95);
}

.round-tree-item.is-used {
  opacity: 0.65;
}

.round-tree-item.is-current {
  border-color: var(--gold);
  background: rgba(120, 53, 15, 0.35);
}

.round-tree-q {
  flex: 1 1 auto;
}

.round-tree-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.round-tree-item.is-used .round-tree-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.round-tree-item.is-current .round-tree-badge {
  background: rgba(251, 191, 36, 0.25);
  color: var(--gold);
}

/* =====================================================================
   COMBO 1v1 SHARED TEAM BUZZER VIEW
   ===================================================================== */
body:has(#comboBuzzerView:not(.hidden)),
body:has(#buzzerView:not(.hidden)) {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body:has(#comboBuzzerView:not(.hidden)) .top-bar,
body:has(#buzzerView:not(.hidden)) .top-bar {
  display: none;
}

.combo-buzzer-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: max(clamp(6px, 1.2dvh, 14px), env(safe-area-inset-top))
    max(clamp(6px, 1.2dvh, 14px), env(safe-area-inset-right))
    max(clamp(6px, 1.2dvh, 14px), env(safe-area-inset-bottom))
    max(clamp(6px, 1.2dvh, 14px), env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2dvh, 12px);
  overflow: hidden;
  box-sizing: border-box;
}

.combo-buzzer-btn {
  flex: 1 1 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  padding: clamp(6px, 1.5dvh, 18px);
  gap: clamp(2px, 0.8dvh, 10px);
  border-width: clamp(4px, 0.8dvh, 8px);
  border-radius: clamp(18px, 3dvh, 32px);
  overflow: hidden;
  box-sizing: border-box;
}

.combo-buzzer-btn .giant-buzz-icon {
  font-size: clamp(44px, min(13dvh, 22vw), 150px);
  line-height: 1;
  flex-shrink: 0;
}

.combo-buzzer-btn .giant-buzz-title {
  font-size: clamp(24px, min(7.5dvh, 10vw), 96px);
  line-height: 1.05;
  max-width: 100%;
  overflow-wrap: break-word;
}

.combo-buzzer-btn .giant-buzz-sub {
  font-size: clamp(13px, min(3.2dvh, 4.4vw), 38px);
  line-height: 1.15;
  max-width: 100%;
}

#comboBuzzerView .combo-buzzer-btn {
  padding: clamp(4px, 1dvh, 14px) clamp(8px, 2.5vw, 18px);
  gap: clamp(2px, 0.5dvh, 8px);
}

#comboBuzzerView .combo-buzzer-btn .giant-buzz-icon {
  font-size: clamp(28px, min(7.5dvh, 15vw), 88px);
}

#comboBuzzerView .combo-buzzer-btn .giant-buzz-title {
  font-size: clamp(18px, min(4.6dvh, 7.8vw), 56px);
  line-height: 1.05;
}

#comboBuzzerView .combo-buzzer-btn .giant-buzz-sub {
  font-size: clamp(12px, min(2.4dvh, 4.2vw), 26px);
  line-height: 1.15;
}

.combo-buzzer-top {
  transform: rotate(180deg);
}

.combo-middle-panel {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: clamp(4px, 1dvh, 8px) clamp(8px, 2vw, 12px);
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.6dvh, 6px);
}

.combo-middle-mirrored {
  transform: rotate(180deg);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 3px;
  border-top: 1px solid rgba(251, 191, 36, 0.2);
}

.combo-middle-upright {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 3px;
  border-top: 1px solid rgba(251, 191, 36, 0.2);
}

.combo-middle-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.combo-middle-controls .pill-badge {
  font-size: clamp(12px, 2dvh, 24px) !important;
  padding: clamp(4px, 0.6dvh, 10px) clamp(10px, 1.4vw, 20px) !important;
}

.combo-middle-controls .turn-timer-pill {
  font-size: clamp(14px, 2.4dvh, 28px) !important;
  padding: clamp(4px, 0.6dvh, 10px) clamp(12px, 1.6vw, 24px) !important;
}

.combo-middle-controls .buzzer-exit-hold-btn {
  font-size: clamp(12px, 2dvh, 24px) !important;
  padding: clamp(5px, 0.7dvh, 12px) clamp(14px, 1.8vw, 28px) !important;
  min-height: clamp(32px, 4dvh, 52px) !important;
}

.combo-scores-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 4px 12px;
  min-width: 0;
  font-size: clamp(14px, 2.5dvh, 30px);
  color: #e2e8f0;
}

.combo-status-banner {
  font-size: clamp(15px, 2.8dvh, 34px);
  color: var(--gold);
  text-align: center;
  overflow-wrap: anywhere;
}

.giant-buzz-icon.is-big-timer {
  font-family: "Oswald", "Anton", Impact, sans-serif;
  font-size: clamp(48px, min(14dvh, 24vw), 180px);
  font-weight: 900;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}

#comboBuzzerView .combo-buzzer-btn .giant-buzz-icon.is-big-timer {
  font-size: clamp(32px, min(8.5dvh, 17vw), 104px);
}

.giant-buzz-icon.is-big-timer.is-urgent {
  color: #fecaca;
}

/* =====================================================================
   TV LIVE QR JOIN OVERLAY
   ===================================================================== */
.tv-qr-overlay {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 2, 10, 0.86);
  backdrop-filter: blur(6px);
}

.tv-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 32px;
  max-width: 720px;
  width: 100%;
  text-align: center;
  border: 3px solid var(--gold);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.tv-qr-card:has(#tvQrDualWrap:not(.hidden)) {
  max-width: 1120px;
}

.tv-qr-single-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.tv-qr-dual-wrap {
  display: flex;
  justify-content: space-between;
  gap: clamp(80px, 14vw, 240px);
  width: 100%;
  align-items: center;
}

.tv-qr-dual-side {
  flex: 1 1 0;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid rgba(251, 191, 36, 0.3);
}

.tv-qr-dual-side.t1 {
  border-color: rgba(59, 130, 246, 0.75);
}

.tv-qr-dual-side.t2 {
  border-color: rgba(239, 68, 68, 0.75);
}

.tv-qr-dual-side.is-connected {
  border-color: #34d399;
  background: rgba(6, 78, 59, 0.45);
}

.tv-qr-dual-title {
  font-size: 20px;
  color: #ffffff;
}

.tv-qr-role-label {
  font-size: 26px;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.tv-qr-code-wrap {
  background: #ffffff;
  padding: 14px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tv-qr-connected-panel {
  width: 248px;
  height: 248px;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(6, 95, 70, 0.92) 0%, rgba(4, 120, 87, 0.85) 100%);
  border: 3px solid #6ee7b7;
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  box-sizing: border-box;
}

.tv-qr-connected-icon {
  font-size: 64px;
  line-height: 1;
}

.tv-qr-connected-text {
  font-size: 28px;
  color: #d1fae5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tv-qr-room-pill {
  font-size: 21px;
  font-weight: 800;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  border-radius: 999px;
  padding: 8px 20px;
}

.tv-qr-url {
  font-size: 20px;
  font-weight: 800;
  color: #fef08a;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  border-radius: 12px;
  padding: 8px 16px;
  word-break: break-all;
  max-width: 100%;
  line-height: 1.35;
}

/* 4-QR Grid Modal on Host */
.qr-modal-wide {
  max-width: 780px;
  width: 96vw;
  text-align: center;
  align-items: center;
}

.qr-tv-strip {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  border: 2px solid rgba(96, 165, 250, 0.45);
  text-align: left;
}

.qr-tv-strip-info {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.qr-tv-manual-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(96, 165, 250, 0.35);
  min-width: 0;
}

.qr-tv-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.qr-tv-direct-url {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #fef08a;
  word-break: break-all;
  user-select: all;
  line-height: 1.35;
}

.qr-tv-short-hint {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.35;
}

.qr-tv-short-hint strong {
  color: #93c5fd;
}

.qr-tv-strip-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 150px;
  text-align: center;
}

.qr-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-width: 0;
}

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

.qr-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 12px;
  width: 100%;
}

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

.qr-dual-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.qr-dual-half {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.qr-dual-label {
  font-size: 11px;
  font-weight: 800;
}

.qr-dual-label.t1 {
  color: #93c5fd;
}

.qr-dual-label.t2 {
  color: #fca5a5;
}

.qr-grid-img-sm {
  width: 100%;
  max-width: 112px;
  height: auto;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
}

.qr-grid-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  border: 2px solid rgba(251, 191, 36, 0.35);
  color: #ffffff;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.qr-grid-card:hover:not(:disabled) {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.qr-grid-card.is-active-on-tv {
  border-color: #34d399;
  background: rgba(6, 78, 59, 0.45);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.35);
}

.qr-grid-card:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.qr-grid-card.is-greyed-out {
  opacity: 0.4;
  filter: grayscale(1);
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.65);
}

.qr-grid-card.is-greyed-out .qr-grid-img {
  opacity: 0.55;
  filter: blur(1.5px);
}

.qr-grid-card.is-complete {
  border-color: rgba(52, 211, 153, 0.75);
  background: rgba(6, 78, 59, 0.32);
  opacity: 0.92;
}

.qr-connected-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 10px;
  background: linear-gradient(155deg, rgba(6, 95, 70, 0.92) 0%, rgba(4, 120, 87, 0.85) 100%);
  border: 2px solid #34d399;
  color: #ecfdf5;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.35);
  padding: 8px;
  box-sizing: border-box;
}

.qr-connected-panel.qr-connected-sm {
  width: 100%;
  max-width: 116px;
  aspect-ratio: 1 / 1;
}

.qr-connected-icon {
  font-size: 28px;
  line-height: 1;
}

.qr-connected-text {
  font-size: 12px;
  color: #a7f3d0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.qr-grid-title {
  font-size: 14px;
  color: var(--gold);
}

.qr-grid-img {
  width: 140px;
  height: 140px;
  background: #ffffff;
  padding: 6px;
  border-radius: 10px;
  display: block;
  object-fit: contain;
}

.qr-grid-img.qr-grid-img-sm {
  width: 100%;
  max-width: 116px;
  height: auto;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
}

.qr-grid-url {
  font-size: 12.5px;
  font-weight: 800;
  color: #fef08a;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 8px;
  padding: 5px 8px;
  width: 100%;
  word-break: break-all;
  line-height: 1.3;
  user-select: all;
}

.qr-manual-hint {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.65);
  border-radius: 8px;
  padding: 5px 8px;
  width: 100%;
  line-height: 1.3;
}

.qr-manual-hint strong {
  color: #93c5fd;
}

.qr-grid-status {
  font-size: 11px;
  font-weight: 800;
  color: #93c5fd;
}

.qr-grid-card.is-active-on-tv .qr-grid-status {
  color: #6ee7b7;
}

.app-build-badge {
  text-align: center;
  font-size: 11px;
  color: rgba(253, 230, 138, 0.55);
  padding: 6px 12px 10px;
}

body.tv-viewport-lock .app-build-badge,
body:has(#tvView:not(.hidden):not(.embedded-in-host)) .app-build-badge,
body.buzzer-nav-locked .app-build-badge,
body:has(#buzzerView:not(.hidden)) .app-build-badge,
body:has(#comboBuzzerView:not(.hidden)) .app-build-badge {
  display: none !important;
}

/* =====================================================================
   VISUAL BOARD THEMES (#9: CLASSIC / HOLIDAY / FRC NEON / CLASSROOM CLEAN)
   ===================================================================== */
body[data-theme="holiday"] {
  --bg-dark: #062114;
  --bg-radial: #7f1d1d;
  --panel-bg: #142b1d;
  --gold: #fcd34d;
  --gold-deep: #b91c1c;
  --gold-pale: #fef08a;
  --blue-tile-top: #15803d;
  --blue-tile-bot: #064e3b;
  --blue-border: #86efac;
  --slate-dark: #062114;
}

body[data-theme="holiday"] .marquee-panel,
body[data-theme="holiday"] .role-card {
  background: linear-gradient(155deg, #5c1118 0%, #0a2e1c 100%);
}

body[data-theme="holiday"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #16a34a 0%, #15803d 50%, #064e3b 100%);
  border-color: #86efac;
}

body[data-theme="holiday"] .tile-num-badge {
  background: radial-gradient(circle, #dc2626 0%, #7f1d1d 100%);
  border-color: #fde047;
}

body[data-theme="frc"] {
  --bg-dark: #030712;
  --bg-radial: #1e1b4b;
  --panel-bg: #0b1120;
  --gold: #38bdf8;
  --gold-deep: #0284c7;
  --gold-pale: #bae6fd;
  --blue-tile-top: #0284c7;
  --blue-tile-bot: #082f49;
  --blue-border: #67e8f9;
  --slate-dark: #020617;
}

body[data-theme="frc"] .marquee-panel,
body[data-theme="frc"] .role-card {
  background: linear-gradient(155deg, #0f172a 0%, #090d1f 100%);
}

body[data-theme="frc"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #0ea5e9 0%, #0369a1 50%, #082f49 100%);
  border-color: #67e8f9;
}

body[data-theme="frc"] .tile-num-badge {
  background: radial-gradient(circle, #22d3ee 0%, #0c4a6e 100%);
  border-color: #a5f3fc;
}

body[data-theme="frc"] .tile-pts-box {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border-left-color: #bae6fd;
}

body[data-theme="classroom"] {
  --bg-dark: #0f172a;
  --bg-radial: #1e3a5f;
  --panel-bg: #172554;
  --gold: #38bdf8;
  --gold-deep: #1d4ed8;
  --gold-pale: #e0f2fe;
  --blue-tile-top: #2563eb;
  --blue-tile-bot: #1e3a8a;
  --blue-border: #93c5fd;
  --slate-dark: #0f172a;
}

body[data-theme="classroom"] .marquee-panel,
body[data-theme="classroom"] .role-card {
  background: linear-gradient(155deg, #1e293b 0%, #0f172a 100%);
}

body[data-theme="classroom"] .tile-pts-box {
  background: linear-gradient(180deg, #0284c7 0%, #1d4ed8 100%);
  border-left-color: #bae6fd;
}

body[data-theme="midnight"] {
  --bg-dark: #09090b;
  --bg-radial: #27272a;
  --panel-bg: #18181b;
  --gold: #facc15;
  --gold-deep: #ca8a04;
  --gold-pale: #fef9c3;
  --blue-tile-top: #3f3f46;
  --blue-tile-bot: #18181b;
  --blue-border: #fde047;
  --slate-dark: #09090b;
}

body[data-theme="midnight"] .marquee-panel,
body[data-theme="midnight"] .role-card {
  background: linear-gradient(155deg, #27272a 0%, #09090b 100%);
}

body[data-theme="midnight"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #3f3f46 0%, #27272a 50%, #18181b 100%);
  border-color: #fde047;
}

body[data-theme="midnight"] .tile-num-badge {
  background: radial-gradient(circle, #eab308 0%, #854d0e 100%);
  border-color: #fef08a;
}

body[data-theme="sunset"] {
  --bg-dark: #1e0a3c;
  --bg-radial: #7c2d12;
  --panel-bg: #2e1065;
  --gold: #fbbf24;
  --gold-deep: #db2777;
  --gold-pale: #fde68a;
  --blue-tile-top: #db2777;
  --blue-tile-bot: #701a75;
  --blue-border: #f9a8d4;
  --slate-dark: #17072b;
}

body[data-theme="sunset"] .marquee-panel,
body[data-theme="sunset"] .role-card {
  background: linear-gradient(155deg, #4c1d95 0%, #3b0764 55%, #7c2d12 100%);
}

body[data-theme="sunset"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #ec4899 0%, #be185d 50%, #701a75 100%);
  border-color: #fbcfe8;
}

body[data-theme="sunset"] .tile-num-badge {
  background: radial-gradient(circle, #f97316 0%, #9a3412 100%);
  border-color: #fde68a;
}

body[data-theme="harvest"] {
  --bg-dark: #1c0f06;
  --bg-radial: #7c2d12;
  --panel-bg: #2a160a;
  --gold: #f59e0b;
  --gold-deep: #b45309;
  --gold-pale: #fef3c7;
  --blue-tile-top: #c2410c;
  --blue-tile-bot: #7c2d12;
  --blue-border: #fdba74;
  --slate-dark: #1c0f06;
}

body[data-theme="harvest"] .marquee-panel,
body[data-theme="harvest"] .role-card {
  background: linear-gradient(155deg, #451a03 0%, #271105 100%);
}

body[data-theme="harvest"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #d97706 0%, #b45309 50%, #78350f 100%);
  border-color: #fed7aa;
}

body[data-theme="harvest"] .tile-num-badge {
  background: radial-gradient(circle, #dc2626 0%, #7f1d1d 100%);
  border-color: #fde68a;
}

body[data-theme="winter"] {
  --bg-dark: #061826;
  --bg-radial: #0c4a6e;
  --panel-bg: #0b253a;
  --gold: #7dd3fc;
  --gold-deep: #0284c7;
  --gold-pale: #e0f2fe;
  --blue-tile-top: #0284c7;
  --blue-tile-bot: #075985;
  --blue-border: #bae6fd;
  --slate-dark: #061826;
}

body[data-theme="winter"] .marquee-panel,
body[data-theme="winter"] .role-card {
  background: linear-gradient(155deg, #0c4a6e 0%, #082f49 100%);
}

body[data-theme="winter"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 50%, #075985 100%);
  border-color: #e0f2fe;
}

body[data-theme="winter"] .tile-num-badge {
  background: radial-gradient(circle, #38bdf8 0%, #0369a1 100%);
  border-color: #f0f9ff;
}

body[data-theme="spooky"] {
  --bg-dark: #11071f;
  --bg-radial: #4c1d95;
  --panel-bg: #1e0b36;
  --gold: #fb923c;
  --gold-deep: #ea580c;
  --gold-pale: #ffedd5;
  --blue-tile-top: #7e22ce;
  --blue-tile-bot: #4c1d95;
  --blue-border: #fdba74;
  --slate-dark: #11071f;
}

body[data-theme="spooky"] .marquee-panel,
body[data-theme="spooky"] .role-card {
  background: linear-gradient(155deg, #3b0764 0%, #17062b 100%);
}

body[data-theme="spooky"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #ea580c 0%, #c2410c 50%, #7c2d12 100%);
  border-color: #fed7aa;
}

body[data-theme="spooky"] .tile-num-badge {
  background: radial-gradient(circle, #9333ea 0%, #4c1d95 100%);
  border-color: #fdba74;
}

body[data-theme="patriotic"] {
  --bg-dark: #071330;
  --bg-radial: #7f1d1d;
  --panel-bg: #0f204a;
  --gold: #f8fafc;
  --gold-deep: #b91c1c;
  --gold-pale: #e2e8f0;
  --blue-tile-top: #1d4ed8;
  --blue-tile-bot: #1e3a8a;
  --blue-border: #fca5a5;
  --slate-dark: #071330;
}

body[data-theme="patriotic"] .marquee-panel,
body[data-theme="patriotic"] .role-card {
  background: linear-gradient(155deg, #1e3a8a 0%, #0f172a 60%, #7f1d1d 100%);
}

body[data-theme="patriotic"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 50%, #1e3a8a 100%);
  border-color: #f8fafc;
}

body[data-theme="patriotic"] .tile-num-badge {
  background: radial-gradient(circle, #dc2626 0%, #991b1b 100%);
  border-color: #f8fafc;
}

body[data-theme="marigold"] {
  --bg-dark: #250821;
  --bg-radial: #831843;
  --panel-bg: #3b0d35;
  --gold: #fbbf24;
  --gold-deep: #d97706;
  --gold-pale: #fef08a;
  --blue-tile-top: #d97706;
  --blue-tile-bot: #92400e;
  --blue-border: #fde047;
  --slate-dark: #250821;
}

body[data-theme="marigold"] .marquee-panel,
body[data-theme="marigold"] .role-card {
  background: linear-gradient(155deg, #500724 0%, #3b0764 100%);
}

body[data-theme="marigold"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 50%, #92400e 100%);
  border-color: #fef08a;
}

body[data-theme="marigold"] .tile-num-badge {
  background: radial-gradient(circle, #db2777 0%, #831843 100%);
  border-color: #fde047;
}

body[data-theme="crimson-gold"] {
  --bg-dark: #260508;
  --bg-radial: #991b1b;
  --panel-bg: #3d090f;
  --gold: #fde047;
  --gold-deep: #ca8a04;
  --gold-pale: #fef9c3;
  --blue-tile-top: #b91c1c;
  --blue-tile-bot: #7f1d1d;
  --blue-border: #fde047;
  --slate-dark: #260508;
}

body[data-theme="crimson-gold"] .marquee-panel,
body[data-theme="crimson-gold"] .role-card {
  background: linear-gradient(155deg, #7f1d1d 0%, #450a0a 100%);
}

body[data-theme="crimson-gold"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 50%, #7f1d1d 100%);
  border-color: #fde047;
}

body[data-theme="crimson-gold"] .tile-num-badge {
  background: radial-gradient(circle, #eab308 0%, #854d0e 100%);
  border-color: #fef9c3;
}

body[data-theme="emerald"] {
  --bg-dark: #031c10;
  --bg-radial: #065f46;
  --panel-bg: #052e1b;
  --gold: #fde047;
  --gold-deep: #ca8a04;
  --gold-pale: #fef9c3;
  --blue-tile-top: #059669;
  --blue-tile-bot: #064e3b;
  --blue-border: #6ee7b7;
  --slate-dark: #031c10;
}

body[data-theme="emerald"] .marquee-panel,
body[data-theme="emerald"] .role-card {
  background: linear-gradient(155deg, #065f46 0%, #022c22 100%);
}

body[data-theme="emerald"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #10b981 0%, #059669 50%, #064e3b 100%);
  border-color: #a7f3d0;
}

body[data-theme="emerald"] .tile-num-badge {
  background: radial-gradient(circle, #eab308 0%, #854d0e 100%);
  border-color: #fef9c3;
}

body[data-theme="rose"] {
  --bg-dark: #250816;
  --bg-radial: #831843;
  --panel-bg: #3b0d24;
  --gold: #fbcfe8;
  --gold-deep: #be185d;
  --gold-pale: #fdf2f8;
  --blue-tile-top: #be185d;
  --blue-tile-bot: #831843;
  --blue-border: #f9a8d4;
  --slate-dark: #250816;
}

body[data-theme="rose"] .marquee-panel,
body[data-theme="rose"] .role-card {
  background: linear-gradient(155deg, #500724 0%, #2d0718 100%);
}

body[data-theme="rose"] .feud-tile.hidden-state {
  background: linear-gradient(180deg, #e11d48 0%, #be185d 50%, #881337 100%);
  border-color: #fbcfe8;
}

body[data-theme="rose"] .tile-num-badge {
  background: radial-gradient(circle, #f43f5e 0%, #9f1239 100%);
  border-color: #fce7f3;
}

/* =====================================================================
   INSTANT DEMO, DECK TAG FILTERING, AI BUILDER, BUZZ TEST & TOURNAMENT
   ===================================================================== */
.demo-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.demo-cta-btn {
  min-height: 36px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 900;
  border-radius: 999px;
}

.host-demo-banner {
  padding: 10px 14px;
  border-radius: 16px;
  border-width: 2.5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.9), rgba(88, 28, 135, 0.85));
}

.host-demo-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.deck-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deck-search-input {
  width: 100%;
  font-size: 12px;
  text-transform: none;
  padding: 6px 10px;
  min-height: 34px;
}

.deck-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.deck-tag-pill {
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 800;
  min-height: 25px;
}

.deck-tag-pill.active {
  background: rgba(251, 191, 36, 0.2);
  color: #fef08a;
  border-color: var(--gold);
}

.qr-test-buzz-bar {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

@keyframes testPingFlash {
  0% { filter: brightness(1); transform: scale(1); }
  25% { filter: brightness(1.45); transform: scale(1.03); box-shadow: 0 0 32px rgba(251, 191, 36, 0.9); }
  50% { filter: brightness(1); transform: scale(1); }
  75% { filter: brightness(1.45); transform: scale(1.03); box-shadow: 0 0 32px rgba(251, 191, 36, 0.9); }
  100% { filter: brightness(1); transform: scale(1); }
}

.test-ping-flash {
  animation: testPingFlash 0.65s ease;
}

.ai-builder-textarea {
  width: 100%;
  min-height: 150px;
  border-radius: 12px;
  border: 1.5px solid rgba(251, 191, 36, 0.4);
  background: rgba(2, 6, 23, 0.88);
  color: #f8fafc;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.ai-builder-status {
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.ai-builder-status.ok {
  border-color: #22c55e;
  color: #86efac;
  background: rgba(6, 78, 59, 0.4);
}

.ai-builder-status.err {
  border-color: #ef4444;
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.45);
}

.tournament-bracket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 10px;
  width: 100%;
}

.bracket-match-card {
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bracket-match-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.25);
}

.bracket-match-title {
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-pale);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bracket-team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.65);
  font-size: 12.5px;
  font-weight: 700;
  color: #e2e8f0;
}

.bracket-team-row.winner {
  background: rgba(6, 95, 70, 0.55);
  border: 1px solid #34d399;
  color: #ffffff;
}

.tv-winner-bracket-strip {
  width: 100%;
  max-width: 780px;
  margin-top: 12px;
}




