  :root {
    --brand: #2563EB; --accent: #6D28D9;
    --ink: #0F0A2E; --paper: #FBFAFF;
    --purple-deep: #4C1D95; --purple-light: #C4B5FD;
    --blue-light: #93C5FD; --line: #E9E5F5;
  }
  * { -webkit-font-smoothing: antialiased; }
  html, body { -webkit-tap-highlight-color: transparent; overscroll-behavior: none; font-family: 'Inter', sans-serif; color: var(--ink); }
  .font-ethno { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; font-weight: 700; }
  .display { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.035em; font-weight: 700; }
  .num { font-variant-numeric: tabular-nums; }

  /* ===== Pickleland signature design language ===== */
  /* Animated purple→blue shimmer for key headings */
  .text-gradient {
    background: linear-gradient(120deg, #6D28D9 0%, #2563EB 50%, #6D28D9 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 8s ease infinite;
  }
  @keyframes shimmer { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
  .bg-gradient-brand { background: linear-gradient(120deg, #6D28D9, #2563EB); }

  /* Soft radial mesh page backdrop */
  .gradient-mesh {
    background:
      radial-gradient(ellipse 70% 50% at 20% 10%, rgba(196, 181, 253, 0.45) 0%, transparent 50%),
      radial-gradient(ellipse 60% 40% at 80% 30%, rgba(147, 197, 253, 0.4) 0%, transparent 50%),
      radial-gradient(ellipse 80% 60% at 50% 100%, rgba(196, 181, 253, 0.3) 0%, transparent 50%),
      #FBFAFF;
    background-attachment: fixed;
  }

  /* Frosted glass card */
  .glass { background: rgba(255,255,255,0.65); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.6); }

  /* Hover lift with purple shadow */
  .lift { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
  .lift:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -25px rgba(76, 29, 149, 0.25); }

  /* Pill badge */
  .pill { display:inline-flex; align-items:center; gap:8px; padding:8px 16px; border-radius:999px; font-size:13px; font-weight:600; }

  /* Live pulse dot */
  .pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); animation: pulse 2s infinite; }
  @keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,0.7)} 70%{box-shadow:0 0 0 12px rgba(34,197,94,0)} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0)} }

  /* Faint pickleball-court grid pattern */
  .court-pattern {
    background-image:
      linear-gradient(0deg, transparent 49%, rgba(109, 40, 217, 0.06) 49%, rgba(109, 40, 217, 0.06) 51%, transparent 51%),
      linear-gradient(90deg, transparent 49%, rgba(37, 99, 235, 0.06) 49%, rgba(37, 99, 235, 0.06) 51%, transparent 51%);
    background-size: 60px 60px;
  }

  /* Hand-drawn underline accent */
  .underline-accent { position: relative; white-space: nowrap; }
  .underline-accent::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 14px;
    background: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 14' xmlns='http://www.w3.org/2000/svg'><path d='M2 9 Q 50 1 100 7 T 198 7' stroke='%236D28D9' stroke-width='4' fill='none' stroke-linecap='round'/></svg>") no-repeat;
    background-size: 100% 100%;
  }
  @media (prefers-reduced-motion: reduce) {
    .text-gradient, .pulse-dot { animation: none; }
  }

  /* Section headings → Space Grotesk display treatment */
  main h2, main h3 { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; }

  /* Lift + frosted feel on the standard content cards (bg-white + rounded-xl) */
  main .bg-white.rounded-xl {
    background: rgba(255,255,255,0.78) !important;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-color: rgba(109, 40, 217, 0.10) !important;
    transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
  }
  main .bg-white.rounded-xl:hover {
    box-shadow: 0 24px 50px -28px rgba(76, 29, 149, 0.30);
  }

  input, button, select { font-size: 16px !important; }
  .score-input {
    width: 3.5rem; height: 3rem; text-align: center; font-size: 1.5rem;
    border: 2px solid #d1d5db; border-radius: 0.5rem; font-weight: bold;
  }
  .score-input:focus { outline: none; border-color: var(--brand); }
  /* Scroll score picker */
  /* Score modal row layout */
  .cfg-btn { transition: all .15s ease; }
  .score-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 6px 0;
  }
  .score-row-team {
    display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1;
  }
  .score-row-input {
    display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  }
  .sp-btn-sm {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 700; color: var(--brand); cursor: pointer;
    background: #f3f4f6; border: none; border-radius: 10px; transition: background 0.1s;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }
  .sp-btn-sm:active { background: #dbeafe; }
  .sp-win-btn {
    height: 40px; padding: 0 10px; display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem; font-weight: 800; color: white; cursor: pointer;
    background: linear-gradient(120deg, #6D28D9, #2563EB);
    border: none; border-radius: 10px; transition: opacity 0.1s;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }
  .sp-win-btn:active { opacity: 0.8; }
  .sp-input {
    width: 56px; height: 44px; text-align: center; font-size: 1.5rem; font-weight: 800;
    color: #111; background: white; border: 2px solid #d1d5db; border-radius: 10px;
    outline: none; -moz-appearance: textfield; touch-action: manipulation;
  }
  .sp-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(65,100,234,0.15); }
  /* Hide number input spinners */
  .sp-input::-webkit-outer-spin-button,
  .sp-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

  /* ===== Tab nav — brand segmented pill bar ===== */
  .tab-nav-track {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
    max-width: 100%; padding: 5px; border-radius: 16px;
    background: rgba(15, 10, 46, 0.04);
    border: 1px solid var(--line);
  }
  .tab-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 15px; border: none; border-radius: 11px;
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px; line-height: 1;
    color: #4B5563; background: transparent; cursor: pointer; white-space: nowrap;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
  }
  .tab-btn:hover { color: var(--purple-deep); background: rgba(109, 40, 217, 0.08); }
  .tab-btn.tab-active {
    color: #fff;
    background: linear-gradient(120deg, #6D28D9, #2563EB);
    box-shadow: 0 6px 16px -6px rgba(76, 29, 149, 0.55);
  }
  .tab-btn.tab-active:hover { color: #fff; }

  @media (max-width: 640px) {
    .tabs-wrap { flex-wrap: wrap; }
    .tab-btn { font-size: 12.5px; padding: 7px 12px; }
    .bracket-round { min-width: 180px; }
    .bracket-match { padding: 6px 8px; }
    .bracket-match .text-sm { font-size: 12px !important; }
    .sp-btn-sm { width: 44px; height: 44px; font-size: 1.5rem; }
    .sp-input { width: 60px; height: 48px; font-size: 1.6rem; }
    .sp-win-btn { height: 44px; }
    main { padding: 8px; }
    header h1 { font-size: 1.1rem; }
  }
  @media (min-width: 641px) and (max-width: 1024px) {
    /* iPad sizing */
    .sp-btn-sm { width: 44px; height: 44px; font-size: 1.5rem; }
    .sp-input { width: 60px; height: 48px; font-size: 1.6rem; }
    .sp-win-btn { height: 44px; }
  }
  /* ---- BRACKET CSS ---- */
  .bracket { display: flex; overflow-x: auto; padding: 16px 0; gap: 0; position: relative; }
  .bracket-round { display: flex; flex-direction: column; justify-content: space-around; min-width: 220px; position: relative; }
  .bracket-spacer { width: 40px; min-width: 40px; position: relative; }
  .bracket-match {
    position: relative; margin: 6px 0; padding: 8px 12px;
    background: white; border: 2px solid #e5e7eb; border-radius: 10px;
    cursor: pointer; transition: border-color 0.15s;
  }
  .bracket-match:hover { border-color: var(--brand); }
  .bracket-match.scored { border-color: var(--brand); background: var(--brand-bg, #EFF6FF); }
  .bracket-match.bye { opacity: 0.7; cursor: default; }
  .bracket-match.champion { border-color: #2563EB; background: #EFF6FF; }
  /* Podium — Pickleland brand winners' stage (stacked horizontal bars) */
  .podium-wrapper { margin: 16px auto 0; max-width: 560px; position: relative; }
  .podium-title {
    text-align: center; font-family: 'Space Grotesk', sans-serif;
    font-size: 1.7rem; font-weight: 700; margin-bottom: 28px; letter-spacing: 0.01em;
    display: flex; align-items: center; justify-content: center; gap: 0.5em;
    background: linear-gradient(120deg, #6D28D9, #2563EB);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
  .podium-trophy {
    width: 1.3em; height: 1.3em; display: inline-block; flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(224,147,10,0.35));
  }
  .podium-stage { position: relative; }
  .podium-cards {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 0 12px; position: relative;
  }
  .podium-card {
    border-radius: 16px; width: 100%;
    display: flex; flex-direction: row; align-items: center; gap: 16px;
    padding: 16px 22px; position: relative; overflow: hidden;
  }
  .podium-card > .podium-medal,
  .podium-card > .podium-info { position: relative; z-index: 2; }
  .podium-info { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
  /* Champion — full brand gradient, longest + tallest bar */
  .podium-card.gold {
    order: 1; width: 100%; padding: 22px 24px;
    background: linear-gradient(120deg, #7C3AED 0%, #6D28D9 48%, #2563EB 100%);
    box-shadow: 0 20px 44px -14px rgba(76,29,149,0.6), inset 0 0 0 1px rgba(255,255,255,0.14);
  }
  .podium-card.gold::before {
    content: ''; position: absolute; top: -60%; left: -30%; width: 35%; height: 220%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.32), transparent);
    transform: rotate(18deg); z-index: 1; animation: podiumShine 4s ease-in-out infinite;
  }
  /* Persistent glossy sheen so the champion always reads as "lit" (incl. on TV) */
  .podium-card.gold::after {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.05) 38%, transparent 60%);
  }
  @keyframes podiumShine { 0%, 55% { left: -35%; } 100% { left: 125%; } }
  /* 2nd — steel/silver, a bit shorter & narrower */
  .podium-card.silver {
    order: 2; width: 88%; padding: 15px 22px;
    background: linear-gradient(120deg, #D3DAE4 0%, #9AA7B6 55%, #74828F 100%);
    box-shadow: 0 14px 30px -16px rgba(15,10,46,0.45), inset 0 0 0 1px rgba(255,255,255,0.25);
  }
  /* 3rd — copper/bronze, shortest bar (names still fit) */
  .podium-card.bronze {
    order: 3; width: 76%; padding: 13px 22px;
    background: linear-gradient(120deg, #D9A878 0%, #BE7C46 55%, #9A5A2C 100%);
    box-shadow: 0 14px 30px -16px rgba(120,60,20,0.45), inset 0 0 0 1px rgba(255,255,255,0.22);
  }
  .podium-rank {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    margin-bottom: 2px;
  }
  .podium-card.gold .podium-rank { color: rgba(255,255,255,0.9); font-size: 0.7rem; }
  .podium-card.silver .podium-rank { color: rgba(255,255,255,0.95); }
  .podium-card.bronze .podium-rank { color: rgba(255,255,255,0.95); }
  .podium-medal { line-height: 1; flex-shrink: 0; }
  .podium-medal img { width: 2.8em; height: 2.8em; display: block; filter: drop-shadow(0 4px 8px rgba(15, 10, 46, 0.3)); }
  .podium-card.gold .podium-medal { z-index: 2; }
  .podium-card.gold .podium-medal img { width: 4em; height: 4em; }
  .podium-card.silver .podium-medal img { width: 3.1em; height: 3.1em; }
  .podium-card.bronze .podium-medal img { width: 2.6em; height: 2.6em; }
  .podium-card.gold .podium-medal::after {
    content: ''; position: absolute; inset: -12px; border-radius: 50%; z-index: -1;
    background: radial-gradient(circle, rgba(255,255,255,0.5), transparent 65%);
  }
  .podium-team {
    font-family: 'Space Grotesk', sans-serif; font-weight: 700; line-height: 1.15;
    word-break: break-word; text-align: left; color: #fff;
  }
  .podium-card.gold .podium-team { font-size: 1.7rem; }
  .podium-card.silver .podium-team { font-size: 1.25rem; }
  .podium-card.bronze .podium-team { font-size: 1.05rem; }
  /* Rank number — leftmost element (order:-1), sits beside the medal */
  .podium-no {
    order: -1; flex-shrink: 0; z-index: 2; text-align: center; line-height: 1;
    font-family: 'Space Grotesk', sans-serif; font-weight: 800;
    color: rgba(255,255,255,0.92); text-shadow: 0 2px 8px rgba(15,10,46,0.28);
  }
  .podium-card.gold .podium-no { font-size: 3rem; width: 1.2em; }
  .podium-card.silver .podium-no { font-size: 2.2rem; width: 1.2em; }
  .podium-card.bronze .podium-no { font-size: 1.9rem; width: 1.2em; }
  @media (max-width: 640px) {
    .podium-title { font-size: 1.35rem; }
    .podium-card { gap: 10px; padding: 14px 16px; }
    .podium-card.gold { padding: 18px 18px; }
    .podium-card.silver { width: 92%; }
    .podium-card.bronze { width: 84%; }
    .podium-card.gold .podium-team { font-size: 1.35rem; }
    .podium-card.silver .podium-team { font-size: 1.1rem; }
    .podium-card.bronze .podium-team { font-size: 0.98rem; }
    .podium-card.gold .podium-medal img { width: 3.1em; height: 3.1em; }
    .podium-card.gold .podium-no { font-size: 2.4rem; }
    .podium-card.silver .podium-no { font-size: 1.9rem; }
    .podium-card.bronze .podium-no { font-size: 1.7rem; }
  }
  /* Connector lines */
  .bracket-round:not(:first-child) .bracket-match::before {
    content: ''; position: absolute; left: -24px; top: 50%; width: 24px; height: 2px;
    background: #cbd5e1;
  }
  .bracket-round:not(:last-child) .bracket-match::after {
    content: ''; position: absolute; right: -24px; top: 50%; width: 24px; height: 2px;
    background: #cbd5e1;
  }
  .bracket-connector {
    position: absolute; right: -24px; width: 2px; background: #cbd5e1;
  }
  /* Standings public view — header is non-sticky here, but keep it
     `relative` (not `static`) so it stays the containing block for its
     absolutely-positioned decorative blob; otherwise the blob escapes the
     header's overflow:hidden and bleeds past the right edge, causing
     horizontal scroll on the public site. */
  .public-view header { position: relative; }
  .public-view .admin-only { display: none; }

  /* ---- TV MODE ---- */
  .tv-mode header, .tv-mode #tabNav, .tv-mode #publicNav, .tv-mode main, .tv-mode #siteFooter { display: none !important; }
  .tv-mode #tvDashboard { display: flex !important; }
  #tvDashboard {
    display: none; flex-direction: column; height: 100vh; overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
      radial-gradient(ellipse 70% 50% at 20% 8%, rgba(196, 181, 253, 0.40) 0%, transparent 50%),
      radial-gradient(ellipse 60% 45% at 85% 25%, rgba(147, 197, 253, 0.38) 0%, transparent 50%),
      radial-gradient(ellipse 90% 60% at 50% 100%, rgba(196, 181, 253, 0.28) 0%, transparent 55%),
      #FBFAFF;
  }
  /* TV header bar — kept intentionally compact so matchup cards and the
     announcement banner have maximum vertical space. */
  .tv-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 16px; background: linear-gradient(120deg, #6D28D9 0%, #2563EB 100%);
    color: white; flex-shrink: 0; min-height: 0;
  }
  .tv-header h1 { font-size: 0.95rem; font-weight: 700; font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; }
  /* Announcement banner — pinned to the bottom of the TV dashboard /
     public matches view. Brand-gradient background with a marquee that
     scrolls the message right-to-left. Hidden when state.announcement
     is empty. Used for "lunch at noon", "court 3 closed", etc. */
  .announce-banner {
    flex-shrink: 0;
    background: linear-gradient(120deg, #6D28D9 0%, #2563EB 100%);
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
  }
  .announce-banner.hidden { display: none; }
  .announce-banner-track {
    display: inline-block;
    padding: 10px 0;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    /* The track contains two copies of the message back-to-back so the
       marquee loops seamlessly without a gap when the first copy ends. */
    animation: announce-scroll 30s linear infinite;
    will-change: transform;
  }
  .announce-banner-track > span { padding: 0 36px; }
  .announce-banner-track > span::before { content: '📢  '; opacity: 0.85; }
  @keyframes announce-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }
  /* Pre-tournament rules screen — full-screen takeover on the TV. */
  .tv-rules-overlay {
    position: fixed; inset: 0; z-index: 50;
    display: none; align-items: center; justify-content: center; padding: 4vh 4vw;
    background:
      radial-gradient(ellipse 70% 55% at 18% 6%, rgba(196, 181, 253, 0.55) 0%, transparent 55%),
      radial-gradient(ellipse 65% 50% at 88% 22%, rgba(147, 197, 253, 0.5) 0%, transparent 55%),
      linear-gradient(135deg, #2b1a66 0%, #1e2a78 55%, #14225f 100%);
  }
  .tv-rules-card {
    width: min(960px, 92vw); max-height: 92vh; overflow: auto;
    background: rgba(255,255,255,0.97); border: 1px solid rgba(109,40,217,0.18);
    border-radius: 24px; padding: clamp(20px, 4vh, 44px) clamp(24px, 4vw, 56px);
    box-shadow: 0 40px 120px -40px rgba(15,10,46,0.8);
  }
  .tv-rules-head { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(12px, 2vh, 22px); }
  .tv-rules-logo {
    width: clamp(48px, 6vh, 68px); height: clamp(48px, 6vh, 68px); flex-shrink: 0;
    border-radius: 18px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(120deg, #6D28D9, #2563EB); box-shadow: 0 10px 28px -10px rgba(76,29,149,0.7);
  }
  .tv-rules-logo img { width: 62%; height: 62%; }
  .tv-rules-kicker { font-size: clamp(0.7rem, 1.4vh, 0.95rem); font-weight: 800; text-transform: uppercase; letter-spacing: 0.22em; color: #6D28D9; }
  .tv-rules-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.02em; color: #0F0A2E; font-size: clamp(1.6rem, 4.6vh, 3rem); line-height: 1.05; }
  .tv-rules-intro { color: #3F3A5A; font-size: clamp(1rem, 2.1vh, 1.4rem); margin-bottom: clamp(12px, 2.4vh, 26px); }
  .tv-rules-list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(10px, 1.8vh, 20px); }
  .tv-rules-list li {
    display: flex; align-items: flex-start; gap: clamp(12px, 1.8vw, 20px);
    background: #F5F3FF; border: 1px solid rgba(109,40,217,0.12); border-radius: 16px;
    padding: clamp(12px, 2.2vh, 22px) clamp(14px, 2vw, 24px);
    color: #0F0A2E; font-size: clamp(1.05rem, 2.5vh, 1.65rem); line-height: 1.3;
  }
  .tv-rules-list li strong { color: #1E40AF; }
  .tv-rules-n {
    flex-shrink: 0; width: clamp(34px, 4.4vh, 48px); height: clamp(34px, 4.4vh, 48px);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(120deg, #6D28D9, #2563EB); color: #fff; font-weight: 800; font-size: clamp(1rem, 2.4vh, 1.5rem);
    box-shadow: 0 8px 20px -8px rgba(76,29,149,0.6);
  }
  .tv-rules-ok {
    display: block; width: 100%; margin-top: clamp(16px, 3vh, 32px);
    padding: clamp(14px, 2.6vh, 22px); border: none; border-radius: 16px; cursor: pointer;
    background: linear-gradient(120deg, #6D28D9, #2563EB); color: #fff;
    font-weight: 800; font-size: clamp(1.2rem, 2.8vh, 1.8rem); letter-spacing: 0.01em;
    box-shadow: 0 18px 40px -16px rgba(76,29,149,0.7);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
  }
  .tv-rules-ok:hover, .tv-rules-ok:focus { transform: translateY(-2px); box-shadow: 0 24px 50px -16px rgba(76,29,149,0.75); outline: 3px solid rgba(147,197,253,0.8); }
  .tv-rules-ok:active { transform: translateY(0); }
  .tv-rules-foot { text-align: center; margin-top: clamp(14px, 2.6vh, 28px); color: #6D6A85; font-size: clamp(0.85rem, 1.7vh, 1.15rem); font-weight: 600; }
  .tv-header .tv-round-info { font-size: 0.8rem; font-weight: 700; opacity: 0.9; }
  /* Live indicator — continuous motion keeps Fire TV / Roku screensavers
     from kicking in. The dot pulses every 1.4s, plus a JS-driven clock
     ticks each second to guarantee pixel changes the OS counts as activity. */
  .tv-live-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 7px 2px 5px; border-radius: 999px;
    background: rgba(0,0,0,0.18); color: #fff;
    font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em;
  }
  .tv-live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.7);
    animation: tv-live-blink 1.4s ease-in-out infinite;
  }
  @keyframes tv-live-blink {
    0%   { opacity: 1;   transform: scale(1);    box-shadow: 0 0 0 0   rgba(34,197,94,0.7); }
    50%  { opacity: 0.3; transform: scale(0.85); box-shadow: 0 0 0 6px rgba(34,197,94,0);   }
    100% { opacity: 1;   transform: scale(1);    box-shadow: 0 0 0 0   rgba(34,197,94,0);   }
  }
  .tv-live-clock {
    margin-left: 4px; font-variant-numeric: tabular-nums;
    font-size: 0.65rem; font-weight: 700; opacity: 0.9;
  }
  /* Next matches strip */
  .tv-next-strip {
    display: grid; gap: 6px; padding: 7px 16px; flex-shrink: 0;
    background: rgba(255,255,255,0.55); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(109, 40, 217, 0.10);
  }
  .tv-court-card {
    display: block;
    padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(109, 40, 217, 0.10);
    background: rgba(255,255,255,0.7); box-shadow: 0 8px 24px -18px rgba(76, 29, 149, 0.25);
    min-width: 0;
  }
  .tv-court-card.active { border-color: rgba(5, 150, 105, 0.5); background: rgba(236,253,245,0.9); }
  .tv-court-card.upnext { opacity: 0.72; }
  .tv-court-num {
    display: inline-block;
    padding: 2px 10px 2px 8px;
    font-weight: 800; font-size: 0.85rem; color: #2563EB;
    text-transform: uppercase; letter-spacing: 0.04em;
    border-left: 4px solid #2563EB;
    line-height: 1.2;
  }
  /* Live status tag replacing the old court number */
  .tv-status {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 999px;
    font-weight: 800; font-size: 0.62rem; letter-spacing: 0.05em;
    text-transform: uppercase; line-height: 1.3;
  }
  .tv-status-now { color: #fff; background: #059669; }
  .tv-status-next { color: #64748b; background: rgba(100,116,139,0.14); }
  .tv-status-now .tv-live-dot { background: #fff; }
  .tv-court-teams { flex: 1; min-width: 0; font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
  .tv-court-teams .team-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tv-court-pool { font-size: 0.7rem; color: #9ca3af; font-weight: 700; text-transform: uppercase; }
  /* Pool standings grid */
  .tv-pools-area {
    flex: 1; overflow: hidden; padding: 12px 24px; display: grid; gap: 12px;
  }
  .tv-pool-card {
    background: rgba(255,255,255,0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 14px; border: 1px solid rgba(109, 40, 217, 0.10);
    box-shadow: 0 12px 32px -22px rgba(76, 29, 149, 0.30);
    overflow: hidden; display: flex; flex-direction: column;
  }
  .tv-pool-card h3 {
    padding: 9px 14px; font-weight: 700; font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; color: #fff;
    background: linear-gradient(120deg, #6D28D9 0%, #2563EB 100%);
    margin: 0; flex-shrink: 0;
  }
  .tv-pool-card table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
  .tv-pool-card th { text-align: left; padding: 4px 10px; font-size: 0.7rem; text-transform: uppercase; color: #9ca3af; border-bottom: 1px solid #f1f5f9; }
  .tv-pool-card td { padding: 5px 10px; border-bottom: 1px solid #f8fafc; }
  .tv-pool-card tr:last-child td { border-bottom: none; }
  .tv-pool-card .rank { font-weight: 800; width: 24px; }
  .tv-pool-card .team-col { font-weight: 700; }
  .tv-pool-card .num-col { text-align: right; font-weight: 600; }
  /* TV playoffs */
  .tv-playoffs-area { flex: 1; overflow: auto; padding: 12px 24px; min-height: 0; display: flex; }
  .tv-playoffs-area .bracket-svg-wrap { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
  .tv-playoffs-area .bracket-svg { width: 100%; height: 100%; }
  /* Fullscreen podium when champion decided — bracket hidden, nothing else */
  .tv-playoffs-area.tv-podium-fullscreen {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #f8fafc 0%, #EFF6FF 100%);
  }
  .tv-podium { max-width: 820px; width: 100%; padding: 24px; }
  .tv-podium .podium-title { font-size: 3rem; margin-bottom: 38px; }
  .tv-podium .podium-trophy { width: 1.1em; height: 1.1em; }
  .tv-podium .podium-cards { gap: 20px; }
  .tv-podium .podium-card { border-radius: 22px; gap: 24px; }
  .tv-podium .podium-card.gold { padding: 30px 36px; }
  .tv-podium .podium-card.silver { padding: 24px 36px; }
  .tv-podium .podium-card.bronze { padding: 20px 36px; }
  .tv-podium .podium-medal img { width: 4rem; height: 4rem; }
  .tv-podium .podium-card.gold .podium-medal img { width: 5.4rem; height: 5.4rem; }
  .tv-podium .podium-card.silver .podium-medal img { width: 4.4rem; height: 4.4rem; }
  .tv-podium .podium-card.bronze .podium-medal img { width: 3.6rem; height: 3.6rem; }
  .tv-podium .podium-card.gold .podium-team { font-size: 2.8rem; }
  .tv-podium .podium-card.silver .podium-team { font-size: 2rem; }
  .tv-podium .podium-card.bronze .podium-team { font-size: 1.6rem; }
  .tv-podium .podium-rank { font-size: 0.9rem; }
  .tv-podium .podium-card.gold .podium-rank { font-size: 1rem; }
  .tv-podium .podium-pmark {
    position: absolute; top: 16px; right: 20px; z-index: 1; pointer-events: none;
    width: 2.4rem; height: 2.4rem; opacity: 0.16;
  }
  .tv-podium .podium-card.gold .podium-no { font-size: 4.6rem; }
  .tv-podium .podium-card.silver .podium-no { font-size: 3.4rem; }
  .tv-podium .podium-card.bronze .podium-no { font-size: 2.9rem; }
  .tv-playoffs-area .bracket-match { padding: 10px 14px; }
  .tv-playoffs-area .bracket-match .text-sm { font-size: 0.9rem; }
  .tv-playoffs-area #championBanner { font-size: 2rem; padding: 24px; margin: 16px 0; }
