/* =========================================================================
   World Cup 2026 Live Stream — styles
   Theme: "stadium at night" — deep green-black, grass + gold + cyan neon,
   athletic display type. Iframe-first layout (stream above the fold).
   ========================================================================= */

:root {
  --bg:        #060a08;
  --bg-2:      #0a120d;
  --panel:     rgba(14, 24, 18, .72);
  --panel-2:   rgba(20, 32, 25, .9);
  --line:      rgba(120, 200, 150, .14);
  --line-2:    rgba(120, 200, 150, .28);

  --ink:       #eaf6ee;
  --muted:     #8aa597;
  --muted-2:   #5f7a6c;

  --grass:     #1fd65f;
  --grass-dk:  #0fa247;
  --gold:      #ffc94d;
  --cyan:      #2de2e6;
  --red:       #ff2d4b;

  --shadow:    0 24px 60px -20px rgba(0,0,0,.7);
  --radius:    18px;
  --radius-sm: 12px;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body:    "Archivo", system-ui, sans-serif;

  --topbar-h: 58px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* atmospheric background layers (gradient mesh + grid + vignette) */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 50% at 18% 0%,  rgba(31,214,95,.18), transparent 60%),
    radial-gradient(50% 45% at 88% 8%,  rgba(45,226,230,.12), transparent 60%),
    radial-gradient(70% 60% at 50% 110%, rgba(255,201,77,.10), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(rgba(120,200,150,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,200,150,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(75% 70% at 50% 35%, #000 40%, transparent 100%);
          mask-image: radial-gradient(75% 70% at 50% 35%, #000 40%, transparent 100%);
}

/* particle canvas */
.field {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* keep real content above canvas */
.topbar, .stage, .fab, .modal, .admin, .foot { position: relative; z-index: 2; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ───────── Top bar ───────── */
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(14px, 4vw, 36px);
  background: linear-gradient(180deg, rgba(6,10,8,.92), rgba(6,10,8,.55));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.ball { font-size: 22px; animation: spin 9s linear infinite; display: inline-block; }
.brand-txt {
  font-family: var(--display); font-weight: 800; letter-spacing: .04em;
  font-size: 22px; line-height: 1;
}
.brand-txt b { color: var(--grass); }
.brand-live {
  font-family: var(--display); font-weight: 800; font-size: 13px;
  letter-spacing: .22em; color: var(--bg);
  background: linear-gradient(180deg, var(--gold), #e7a82e);
  padding: 3px 8px 2px; border-radius: 6px;
}
.top-right { display: flex; align-items: center; gap: 14px; }
.hosts { display: inline-flex; gap: 6px; }
.hosts img {
  width: 26px; height: auto; border-radius: 3px;
  box-shadow: 0 0 0 1px var(--line-2);
}
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .14em;
  color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 5px 12px; background: rgba(255,45,75,.08);
}
.live-pill .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 0 rgba(255,45,75,.7); animation: pulse 1.8s infinite;
}
.live-pill.is-upcoming { background: rgba(45,226,230,.08); }
.live-pill.is-upcoming .dot { background: var(--cyan); animation: none; box-shadow: 0 0 8px var(--cyan); }

/* ───────── Stage (one match-unit per live match, stacked) ───────── */
.stage {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(14px, 2.4vw, 26px) clamp(12px, 4vw, 28px) 6px;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 26px);
}
.match-unit { display: flex; flex-direction: column; gap: clamp(12px, 2vw, 18px); animation: rise .5s both; }
.match-unit + .match-unit { padding-top: clamp(16px, 3vw, 26px); border-top: 1px dashed var(--line-2); }
.stage.multi .match-unit::before {
  content: "LIVE STREAM " counter(unit);
  counter-increment: unit;
  font-family: var(--display); font-weight: 800; font-size: 11px; letter-spacing: .18em;
  color: var(--muted); align-self: flex-start;
}
.stage.multi { counter-reset: unit; }
.vs-boot { grid-column: 1 / -1; margin: 0 auto; text-align: center; }

/* VS scoreboard */
.matchcard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(8px, 2vw, 22px);
  padding: clamp(12px, 2vw, 18px) clamp(14px, 3vw, 26px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  animation: rise .5s both;
}
.matchcard::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(31,214,95,.10), transparent 30%, transparent 70%, rgba(255,201,77,.10));
}
.team { display: flex; align-items: center; gap: 14px; min-width: 0; }
.team.right { flex-direction: row-reverse; text-align: right; }
.t-flag {
  width: 62px; height: 42px; object-fit: cover; border-radius: 7px;
  box-shadow: 0 0 0 1px var(--line-2), 0 8px 18px -8px rgba(0,0,0,.8);
  background: rgba(255,255,255,.04);
  flex-shrink: 0;
}
.t-meta { min-width: 0; }
.t-code {
  font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: .14em;
  display: inline-block; padding: 1px 7px; border-radius: 5px; margin-bottom: 3px;
  color: var(--bg);
}
.crest.a { background: linear-gradient(180deg, var(--grass), var(--grass-dk)); }
.crest.b { background: linear-gradient(180deg, var(--gold), #e7a82e); }
.t-name {
  font-family: var(--display); font-weight: 800; font-size: clamp(18px, 3.6vw, 30px);
  line-height: 1; letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.vs { text-align: center; min-width: 116px; }
.vs-status {
  font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: .2em;
  color: var(--cyan);
}
.vs-status.is-live { color: var(--red); }
.vs-status.is-ended { color: var(--muted); }
.vs-count {
  font-family: var(--display); font-weight: 900; letter-spacing: .02em;
  font-size: clamp(26px, 5.4vw, 40px); line-height: .95; margin: 2px 0;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #bfe9cf);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.vs-count.is-live {
  background: linear-gradient(180deg, #ff8aa0, var(--red));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.vs-info { font-size: 11px; color: var(--muted-2); letter-spacing: .03em; }

/* Player */
.player-shell { animation: rise .5s .06s both; }
.player-ratio {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(31,214,95,.10), 0 0 60px -20px rgba(31,214,95,.5);
}
.player-ratio iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

.strip {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-top: 12px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 12px; font-weight: 600; letter-spacing: .03em;
  color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 11px; background: rgba(255,255,255,.02);
}
.chip-live { color: var(--ink); }
.chip-live .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); margin-right: 5px; vertical-align: middle;
  animation: pulse 1.8s infinite;
}
.actions { display: flex; gap: 8px; }
.btn {
  font-family: var(--body); font-weight: 600; font-size: 13px;
  color: var(--ink); cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 10px;
  padding: 8px 13px; background: rgba(255,255,255,.03);
  transition: transform .12s, border-color .12s, background .12s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--grass); background: rgba(31,214,95,.10); }
.btn:active { transform: translateY(0); }
.btn-go { background: linear-gradient(180deg, var(--grass), var(--grass-dk)); color: var(--bg); border-color: transparent; }

.credit-line { text-align: center; margin: 4px 0 0; font-size: 12px; color: var(--muted); }

/* neon "Desperate Ishan" credit (keep) */
.neon-name {
  font-family: var(--display); font-weight: 800; letter-spacing: .04em;
  color: #fff;
  text-shadow:
    0 0 6px var(--cyan), 0 0 14px var(--cyan),
    0 0 22px rgba(255,45,75,.5);
}

/* ───────── Floating buttons ───────── */
.fab {
  position: fixed; bottom: 20px; z-index: 30;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: .08em;
  color: var(--ink); cursor: pointer;
  padding: 13px 20px; border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.fab:hover { transform: translateY(-3px); }
.fab-left { left: 20px; }
.fab-left:hover  { border-color: var(--grass); box-shadow: var(--shadow), 0 0 26px -6px var(--grass); }
.fab-right { right: 20px; }
.fab-right:hover { border-color: var(--gold);  box-shadow: var(--shadow), 0 0 26px -6px var(--gold); }
.fab-ic { font-size: 18px; line-height: 1; }
.fab-left  .fab-ic { color: var(--grass); }
.fab-right .fab-ic { color: var(--gold); }

/* ───────── Modals ───────── */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(3,6,5,.66); backdrop-filter: blur(5px);
  animation: fade .25s both;
}
.modal-panel {
  position: relative;
  width: min(1120px, 100%);
  max-height: 86vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel-2), rgba(8,14,10,.96));
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
  animation: slideUp .32s cubic-bezier(.22,1,.36,1) both;
}
@media (min-width: 720px) {
  .modal { align-items: center; }
  .modal-panel { border-radius: 22px; border-bottom: 1px solid var(--line-2); }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 3vw, 24px) 12px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  margin: 0; font-family: var(--display); font-weight: 800;
  font-size: clamp(22px, 4vw, 30px); letter-spacing: .03em;
}
.ttl-accent { color: var(--grass); }
.modal-x {
  background: none; border: 1px solid var(--line-2); color: var(--ink);
  width: 36px; height: 36px; border-radius: 10px; font-size: 22px; line-height: 1;
  cursor: pointer; transition: border-color .12s, background .12s;
}
.modal-x:hover { border-color: var(--red); background: rgba(255,45,75,.12); }

.modal-filter {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px clamp(16px, 3vw, 24px);
  border-bottom: 1px solid var(--line);
}
.modal-filter-sub { padding-top: 0; border-bottom: 1px solid var(--line); }
.f-chip {
  font-family: var(--body); font-weight: 600; font-size: 12.5px;
  color: var(--muted); cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; background: rgba(255,255,255,.02);
  transition: color .12s, border-color .12s, background .12s;
}
.f-chip:hover { color: var(--ink); border-color: var(--line-2); }
.f-chip.active { color: var(--bg); background: var(--grass); border-color: var(--grass); }

.modal-body {
  padding: clamp(14px, 3vw, 22px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* groups grid */
.grid-groups {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.group-card {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.group-card h3 {
  margin: 0 0 10px; font-family: var(--display); font-weight: 800;
  font-size: 18px; letter-spacing: .04em; color: var(--gold);
  display: flex; align-items: center; gap: 8px;
}
.group-card h3 .gtag {
  font-size: 12px; color: var(--bg); background: var(--gold);
  border-radius: 5px; padding: 1px 7px;
}
/* standings table */
.gtable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.gtable thead th {
  font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .08em;
  color: var(--muted-2); text-transform: uppercase; text-align: center; padding: 4px 4px 8px;
  border-bottom: 1px solid var(--line);
}
.gtable thead th.gt-tcol { text-align: left; }
.gtable tbody td { text-align: center; padding: 7px 4px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.gtable tbody tr:last-child td { border-bottom: 0; }
.gt-pos { color: var(--muted-2); font-size: 12px; width: 18px; }
.gt-team { text-align: left !important; display: flex; align-items: center; gap: 8px; color: var(--ink) !important; font-weight: 600; }
.gt-team img { width: 24px; height: 16px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px var(--line-2); flex-shrink: 0; }
.gt-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-pts { color: var(--ink) !important; font-weight: 800; font-family: var(--display); font-size: 15px; }
.gtable tr.qual .gt-pos { color: var(--grass); font-weight: 800; }
.gtable tr.qual { box-shadow: inset 2px 0 0 var(--grass); }

/* ───────── Tabs (knockout / groups) ───────── */
.modal-tabs {
  display: flex; gap: 6px;
  padding: 10px clamp(16px, 3vw, 24px) 0;
  border-bottom: 1px solid var(--line);
}
.m-tab {
  font-family: var(--display); font-weight: 700; font-size: 14px;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); cursor: pointer;
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 8px 14px 10px; transition: color .14s, border-color .14s;
}
.m-tab:hover { color: var(--ink); }
.m-tab.active { color: var(--grass); border-bottom-color: var(--grass); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fade .2s both; }
.tab-pane[data-pane="groups"] .modal-filter { padding-left: 0; padding-right: 0; }
.tab-pane .grid-groups { padding-top: 4px; }

/* ───────── Knockout bracket ─────────
   Recursive flex tree (see app.js koBranch). Boxes in fixed-width columns;
   pure-CSS connectors join each pair of feeders to the next round. */
.ko-wrap { --ko-w: 138px; --ko-c: 26px; --ko-line: var(--line-2); }
.ko-scroll {
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 6px 2px 10px;
}
.ko-bracket {
  display: flex; align-items: stretch; justify-content: center;
  width: max-content; gap: 0; /* size to content so fitKnockout() can measure + scale it */
}
.ko-half { display: flex; }

/* the recursive tree */
.ko-branch { display: flex; align-items: center; }
.ko-kids { display: flex; flex-direction: column; }
.ko-kid {
  flex: 1 1 0; display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.ko-self { display: flex; align-items: center; }
.ko-conn { width: var(--ko-c); align-self: stretch; position: relative; flex: 0 0 auto; }

/* connectors — left half: kids → bus → self (self on the right) */
.side-left > .ko-conn::before {           /* vertical bus between the two feeders */
  content: ""; position: absolute; left: 50%; top: 25%; height: 50%;
  width: 2px; background: var(--ko-line);
}
.side-left > .ko-conn::after {            /* bus → self */
  content: ""; position: absolute; left: 50%; right: 0; top: 50%;
  height: 2px; background: var(--ko-line);
}
.side-left .ko-kids > .ko-kid::after {    /* feeder → bus */
  content: ""; position: absolute; top: 50%; right: calc(var(--ko-c) * -0.5);
  width: calc(var(--ko-c) * 0.5); height: 2px; background: var(--ko-line);
}
/* right half mirrors */
.side-right > .ko-conn::before {
  content: ""; position: absolute; left: 50%; top: 25%; height: 50%;
  width: 2px; background: var(--ko-line);
}
.side-right > .ko-conn::after {
  content: ""; position: absolute; right: 50%; left: 0; top: 50%;
  height: 2px; background: var(--ko-line);
}
.side-right .ko-kids > .ko-kid::after {
  content: ""; position: absolute; top: 50%; left: calc(var(--ko-c) * -0.5);
  width: calc(var(--ko-c) * 0.5); height: 2px; background: var(--ko-line);
}

/* a match box */
.ko-tie {
  width: var(--ko-w); margin: 6px 0;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  border-radius: 9px; overflow: hidden;
  box-shadow: 0 6px 16px -12px rgba(0,0,0,.8);
}
.ko-tie-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 3px 8px; font-size: 9.5px; letter-spacing: .06em;
  background: rgba(255,255,255,.03); border-bottom: 1px solid var(--line);
}
.ko-rnd { font-family: var(--display); font-weight: 700; color: var(--muted); text-transform: uppercase; }
.ko-when { color: var(--muted-2); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.ko-slot {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 8px; min-height: 28px;
}
.ko-slot + .ko-slot { border-top: 1px solid var(--line); }
.ko-slot img { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px var(--line-2); flex-shrink: 0; }
.ko-tm {
  flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ko-sc { font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ko-slot.win .ko-tm { color: var(--grass); }
.ko-slot.win .ko-sc { color: var(--grass); }
.ko-slot.win { box-shadow: inset 2px 0 0 var(--grass); }
.ko-slot.lose { opacity: .42; }
.ko-slot.lose .ko-tm { text-decoration: line-through; }
.ko-slot.ko-tbd .ko-q {
  width: 22px; height: 15px; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 800; color: var(--muted-2);
  background: rgba(255,255,255,.04); border-radius: 2px; font-size: 11px;
}
.ko-tm-tbd { color: var(--muted-2); font-weight: 500; font-size: 11px; }
.ko-tie.st-live { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 0 18px -6px var(--red); }
.ko-tie.st-live .ko-when { color: var(--red); }
.ko-tie.st-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulse 1.1s infinite; }

/* centre column: champion + final + bronze */
.ko-mid {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 0 16px; flex: 0 0 auto;
}
.ko-champ {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 20px; min-width: 168px;
  background: linear-gradient(180deg, rgba(255,201,77,.12), rgba(255,201,77,.03));
  border: 1px solid rgba(255,201,77,.4); border-radius: 14px; text-align: center;
}
.ko-champ.is-champ { box-shadow: 0 0 30px -10px var(--gold); }
.ko-trophy { font-size: 26px; line-height: 1; }
.ko-champ img { width: 56px; height: 38px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px var(--line-2); }
.ko-champ-q {
  width: 44px; height: 44px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: 26px; color: var(--gold);
  border: 2px dashed rgba(255,201,77,.5); border-radius: 10px;
}
.ko-champ-name { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--gold); }
.ko-champ-sub { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ko-final-box .ko-tie { width: 176px; margin: 0; border-color: var(--line-2); }
.ko-final-box .ko-rnd { color: var(--gold); }
.ko-bronze { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.ko-bronze-ttl { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.ko-bronze .ko-tie { width: 168px; margin: 0; opacity: .92; }

.ko-hint { text-align: center; color: var(--muted-2); font-size: 11.5px; margin: 8px 0 0; }

@media (max-width: 560px) {
  .ko-wrap { --ko-w: 116px; --ko-c: 18px; }
  .ko-tie-head { font-size: 9px; }
  .ko-tm { font-size: 11px; }
}

/* ≥1180px: the knockout/groups modal fills the whole window, and the bracket is
   scaled by fitKnockout() to sit in it as one piece (no sideways scroll unless
   it truly can't fit). Below 1180px the modal keeps its bottom-sheet/centred
   look and the bracket scrolls sideways at natural size. */
@media (min-width: 1180px) {
  #groupsModal .modal-panel {
    width: 100vw; max-width: none;
    height: 100vh; max-height: none;
    border-radius: 0; border: 0;
  }
  #groupsModal .modal-body { flex: 1 1 auto; min-height: 0; }
  #koBody .ko-scroll { overflow-x: hidden; }
}

/* fixtures list */
.fx-day { margin: 0 0 8px; }
.fx-day:not(:first-child) { margin-top: 18px; }
.fx-day-label {
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .14em;
  color: var(--muted); text-transform: uppercase;
  padding: 0 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.fx-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center; gap: 12px;
  padding: 10px 8px; border-radius: 10px;
}
.fx-row:hover { background: rgba(255,255,255,.03); }
.fx-row.is-live { background: rgba(255,45,75,.08); box-shadow: inset 2px 0 0 var(--red); }
.fx-time { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.fx-time small { display: block; font-family: var(--body); font-weight: 500; font-size: 10px; color: var(--muted-2); letter-spacing: .04em; }
.fx-teams { display: grid; gap: 4px; min-width: 0; }
.fx-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fx-side img { width: 24px; height: 16px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px var(--line-2); flex-shrink: 0; }
.fx-side .fx-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-side.placeholder .fx-name { color: var(--muted-2); font-weight: 500; font-style: italic; }
.fx-meta { text-align: right; }
.fx-score { font-family: var(--display); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.fx-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px; display: inline-block;
}
.fx-badge.up   { color: var(--cyan); border: 1px solid rgba(45,226,230,.35); }
.fx-badge.live { color: #fff; background: var(--red); }
.fx-badge.done { color: var(--muted); border: 1px solid var(--line); }
.fx-group { font-size: 10px; color: var(--muted-2); letter-spacing: .08em; margin-top: 3px; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }

/* ───────── Channel switcher (10 squares under each stream) ───────── */
.ch-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  margin-top: 12px;
}
.ch-label {
  font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
}
.ch-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.ch {
  width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--ink); cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: rgba(255,255,255,.03);
  transition: transform .12s, border-color .12s, background .12s, color .12s, box-shadow .12s;
}
.ch:hover { transform: translateY(-2px); border-color: var(--grass); background: rgba(31,214,95,.10); }
.ch:active { transform: translateY(0); }
.ch.active {
  color: var(--bg);
  background: linear-gradient(180deg, var(--grass), var(--grass-dk));
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(31,214,95,.4), 0 0 18px -4px var(--grass);
}
.ch.dead {
  color: var(--muted-2); border-color: rgba(255,45,75,.4);
  background: rgba(255,45,75,.08); text-decoration: line-through; opacity: .72;
}
.ch.dead:hover { color: var(--ink); }
.ch-note { font-size: 11px; color: var(--muted-2); letter-spacing: .02em; }
/* pulse the active square while its dead-channel watchdog is running */
.ch-bar.scanning .ch.active { animation: chScan 1.2s ease-in-out infinite; }
@keyframes chScan {
  0%, 100% { box-shadow: 0 0 0 1px rgba(31,214,95,.4), 0 0 18px -4px var(--grass); }
  50%      { box-shadow: 0 0 0 1px rgba(45,226,230,.6), 0 0 22px -2px var(--cyan); }
}

/* ───────── Per-card owner override (revealed by body.admin-on) ───────── */
.card-admin { display: none; }
body.admin-on .card-admin {
  display: block;
  margin-top: 10px; padding: 12px 14px;
  background: rgba(255,201,77,.07);
  border: 1px solid var(--gold); border-radius: 12px;
}
.ca-head { font-size: 12px; color: var(--ink); margin-bottom: 9px; line-height: 1.45; }
.ca-head b { color: var(--gold); }
.ca-row { display: flex; flex-wrap: wrap; gap: 8px; }
.card-admin .ca-url {
  flex: 1; min-width: 200px;
  font-family: var(--body); font-size: 13px; color: var(--ink);
  background: rgba(0,0,0,.35); border: 1px solid var(--line-2);
  border-radius: 9px; padding: 8px 11px;
}
.card-admin .ca-url:focus { outline: none; border-color: var(--gold); }
.card-admin .ca-status { display: block; margin-top: 8px; font-size: 11px; color: var(--muted); word-break: break-all; }
.ca-urls { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.ca-urls li {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 8px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent;
  font-size: 12px; color: var(--muted);
  transition: background .12s, border-color .12s, color .12s;
}
.ca-urls li:hover { background: rgba(255,255,255,.04); color: var(--ink); }
.ca-urls li.active { background: rgba(255,201,77,.12); border-color: var(--gold); color: var(--ink); }
.ca-urls .cu-n {
  flex-shrink: 0; width: 22px; height: 22px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 12px;
  border-radius: 6px; background: rgba(255,255,255,.06); color: var(--muted);
}
.ca-urls li.active .cu-n { background: var(--gold); color: var(--bg); }
.ca-urls .cu-url {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}

/* ───────── Next matches (countdown list) ───────── */
.upnext { max-width: 1080px; margin: 0 auto; padding: 6px clamp(12px, 4vw, 28px) 24px; }
.upnext[hidden] { display: none; }
.upnext-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.upnext-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(20px, 3.6vw, 28px); letter-spacing: .03em; }
.upnext-sub { font-size: 12px; color: var(--muted); }
.upnext-list { display: flex; flex-direction: column; gap: 8px; }
.un-row {
  display: grid; grid-template-columns: 128px 1fr auto; align-items: center; gap: 16px;
  padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .12s, transform .12s;
}
.un-row:hover { border-color: var(--line-2); transform: translateX(2px); }
.un-when { text-align: center; }
.un-count {
  display: block; font-family: var(--display); font-weight: 900; font-size: 19px;
  color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1;
}
.un-when small { font-size: 10px; color: var(--muted-2); }
.un-teams { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.un-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.un-side img { width: 28px; height: 19px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--line-2); flex-shrink: 0; }
.un-side b { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.un-vs { color: var(--muted-2); font-size: 12px; font-style: italic; }
.un-grp { text-align: right; font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.un-grp small { display: block; color: var(--muted-2); margin-top: 2px; }
@media (max-width: 560px) {
  .un-row { grid-template-columns: 92px 1fr; gap: 10px; padding: 11px 12px; }
  .un-grp { display: none; }
}

/* ───────── Footer ───────── */
.foot {
  max-width: 1080px; margin: 0 auto;
  padding: 24px clamp(12px, 4vw, 28px) 110px;
  text-align: center; border-top: 1px solid var(--line);
}
.foot-disc { font-size: 12px; color: var(--muted-2); max-width: 620px; margin: 0 auto 10px; line-height: 1.6; }
.foot-credit { font-size: 13px; color: var(--muted); }

/* ───────── Animations ───────── */
@keyframes spin   { to { transform: rotate(360deg); } }
@keyframes pulse  { 0% { box-shadow: 0 0 0 0 rgba(255,45,75,.6); } 70% { box-shadow: 0 0 0 7px rgba(255,45,75,0); } 100% { box-shadow: 0 0 0 0 rgba(255,45,75,0); } }
@keyframes rise   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade   { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp{ from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

/* ───────── Responsive ───────── */
@media (max-width: 560px) {
  .brand-txt { font-size: 18px; }
  .hosts { display: none; }
  .t-flag { width: 46px; height: 31px; }
  .t-sub { display: none; }
  .fab { padding: 11px 15px; font-size: 14px; bottom: 14px; }
  .fab-left { left: 12px; } .fab-right { right: 12px; }
  .fab .fab-tx { display: none; }
  .fab-ic { font-size: 20px; }
  .strip { justify-content: center; }
  .ch-bar { justify-content: center; }
  .ch { width: 34px; height: 34px; font-size: 14px; border-radius: 9px; }
  .fx-row { grid-template-columns: 54px 1fr auto; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
