/* All ?g= broadcast graphics (graphics.html). */
/* ── Shared centred-card layout (countdown + soon/break) ─────── */
.gfx-card {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 120px;
}
.gfx-logo {
  height: 260px;
  width: auto;
  margin-bottom: 56px;
  filter: drop-shadow(0 8px 40px rgba(0, 0, 0, 0.45));
}
.gfx-eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 26px;
}
.gfx-title {
  font-family: var(--hero);
  font-size: 150px;
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
}
.gfx-sub {
  font-family: var(--head);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 30px;
  max-width: 1200px;
}

/* Thin red rule used as a divider accent */
.gfx-rule {
  width: 140px;
  height: 4px;
  border-radius: 3px;
  background: var(--red);
  margin: 44px 0 4px;
}

/* ── Full-frame event logo (g=logo) ──────────────────────────── */
.logohero-img {
  height: 760px;
  width: auto;
  max-width: 1680px;
  object-fit: contain;
  filter: drop-shadow(0 18px 70px rgba(0, 0, 0, 0.55));
}

/* ── Countdown clock ─────────────────────────────────────────── */
/* The clock is the focal element and sits lower-centre, below the page's
   top glow. Add a centred red wash behind it so the full frame carries the
   same subtle red gradient as the soon / break card. Removed when keyed. */
.gfx-countdown {
  background: none;
}
html.gfx-transparent .gfx-countdown { background: none; }

.gfx-clock {
  font-family: var(--display);
  font-size: 340px;
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  margin: 14px 0 0;
  text-shadow: 0 12px 60px rgba(0, 0, 0, 0.55);
}
.gfx-clock .sep { color: var(--red-bright); }
/* When the timer reaches zero we swap in a "live now" headline */
.gfx-clock.zero { font-size: 200px; color: var(--red-bright); }

/* ── Player intro · full versus card (g=intro) ───────────────── */
.gfx-intro {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 110px;
}
.gfx-intro .gfx-eyebrow { margin-bottom: 40px; }
.intro-logo {
  height: 210px;
  width: auto;
  object-fit: contain;
  margin-bottom: 64px;
  filter: drop-shadow(0 8px 40px rgba(0, 0, 0, 0.45));
}
.intro-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 56px;
  width: 100%;
  max-width: 1640px;
}
.intro-team { min-width: 0; text-align: center; }
/* Each side: the two players stacked, one per line — no team name. */
.intro-side {
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  /* Line spacing comes from .intro-player's descender padding below, not a
     gap — see the note there. */
  gap: 0;
}
.intro-player {
  font-family: var(--hero);
  font-size: 100px;
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  /* The fit guard in graphics.js shrinks long names to the column; ellipsis
     is the last resort so a name can never run under the VS. */
  overflow: hidden;
  text-overflow: ellipsis;
  /* Norman's descenders (J, G, Q) reach ~0.28em below the baseline — past a
     0.98 line box — so overflow:hidden would shear them off. Clipping happens
     at the padding box, so pad it out and pull most of it back with a negative
     margin: the stack stays tight, the tails survive. */
  padding-bottom: 0.3em;
  margin-bottom: -0.12em;
}
.intro-vs {
  font-family: var(--hero);
  font-size: 96px;
  line-height: 1;
  color: var(--red-bright);
  flex-shrink: 0;
}
.intro-foot {
  margin-top: 70px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Player intro · lower-third strap (g=intro&style=lower) ──── */
/* Reuses the bottom-anchored strap geometry from the result strap,
   but white-on-black brand styling with no scores. */
.gfx.intro-lower {
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 120px;
}
.lower-strap {
  display: flex;
  align-items: stretch;
  width: 1640px;
  background: rgba(0, 0, 0, 0.92);
  border-left: 12px solid var(--red);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
}
/* overflow:hidden so an extreme team name clips at the logo divider instead
   of running underneath the UBS lockup (players already ellipsize). */
.lower-main { flex: 1 1 auto; min-width: 0; padding: 30px 46px; overflow: hidden; }
.lower-eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 14px;
}
.lower-row {
  display: flex;
  align-items: baseline;
  gap: 26px;
  padding: 9px 0;
}
.lower-row + .lower-row { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.lower-team {
  font-family: var(--head);
  font-size: 60px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  flex-shrink: 0;
}
/* Players-only rows (?g=intro&style=lower): the names sit in the team line, so
   it has to be able to shrink and ellipsize like the secondary line does. */
.gfx.intro-lower.players-only .lower-team {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lower-players:empty { display: none; }
.lower-players {
  font-family: var(--head);
  font-weight: 600;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lower-logo {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 44px;
}
.lower-logo img { max-width: 100%; max-height: 130px; object-fit: contain; }

/* ── Set-won celebration card (g=setwon) ─────────────────────── */
.gfx-setwon {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 120px;
}
.setwon-eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 30px;
}
.setwon-team {
  font-family: var(--hero);
  font-size: 168px;
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
  text-shadow: 0 12px 60px rgba(0, 0, 0, 0.55);
  /* Clamp to the card so long names shrink (fit guard) instead of the flex
     item growing past the frame edges. */
  max-width: 100%;
}
/* One player per line — ellipsis is the last resort if a name is still too
   long at the fit guard's minimum size. */
/* padding-bottom / negative margin: see the note on .intro-player — the clip
   box has to reach past Norman's descenders or they shear off. */
.setwon-team .sw-player {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-bottom: 0.3em; margin-bottom: -0.12em;
}
.setwon-team .sw-player:empty { display: none; }
.setwon-score {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 22px;
  font-family: var(--head);
  font-weight: 700;
  font-size: 46px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}
.setwon-score .pill {
  font-family: var(--display);
  font-weight: 600;
  font-size: 76px;
  letter-spacing: 0.04em;
  color: var(--white);
  border-bottom: 6px solid var(--red);
  padding: 0 6px 8px;
  line-height: 1;
}
.setwon-sub {
  margin-top: 34px;
  font-family: var(--head);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Sponsor bug · "Presented by UBS" corner lockup (g=sponsor) ─ */
/* Almost always used with bg=transparent, keyed over the live feed. */
.gfx-sponsor { display: none; }
.gfx-sponsor.active { display: block; }
.sponsor-bug {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.78);
  border-radius: 10px;
  padding: 32px 56px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.45);
}
.sponsor-bug .sponsor-label {
  font-family: var(--body);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.sponsor-bug img { height: 92px; width: auto; object-fit: contain; }
/* Corner placement (1920×1080 canvas, 80px margin) */
.sponsor-bug.tl { top: 80px;    left: 100px; }
.sponsor-bug.tr { top: 80px;    right: 100px; }
.sponsor-bug.bl { bottom: 80px; left: 100px; }
.sponsor-bug.br { bottom: 80px; right: 100px; }

/* ── Event-logo bug with the live match clock (g=matchclock) ──── */
.gfx-clock { display: none; }
.gfx-clock.active { display: block; }
.clock-bug {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 40px;
  background: rgba(0, 0, 0, 0.78);
  border-radius: 10px;
  padding: 26px 48px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.45);
}
.clock-bug.off { display: none; }
.clock-bug img { height: 74px; width: auto; object-fit: contain; }
.clock-bug .clock-col {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding-left: 40px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}
.clock-bug .clock-label {
  font-family: var(--body);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.clock-bug .clock-time {
  font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
  font-size: 76px;
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.clock-bug.tl { top: 80px;    left: 100px; }
.clock-bug.tr { top: 80px;    right: 100px; }
.clock-bug.bl { bottom: 80px; left: 100px; }
.clock-bug.br { bottom: 80px; right: 100px; }
.gfx-clock.active .clock-bug { animation: gfx-in 0.4s ease both; }

/* ── Lower-third name super (g=super) ────────────────────────── */
.gfx-super { display: none; }
.gfx-super.active { display: block; }
.super-single, .super-full { display: none; position: absolute; }
.super-single.on { display: block; }
.super-full.on { display: flex; }

/* Single name super — anchored left or right, bottom of frame */
.super-single {
  bottom: 150px;
  max-width: 1200px;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 8px;
  padding: 28px 46px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
}
.super-single.left  { left: 120px;  text-align: left;  border-left: 12px solid var(--red); }
.super-single.right { right: 120px; text-align: right; border-right: 12px solid var(--red); }
.super-name {
  font-family: var(--head);
  font-size: 76px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.super-title {
  font-family: var(--head);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-top: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.super-title:empty { display: none; }

/* Full-width two-line lower third — white strap with the UBS lockup on the
   right, styled like the post-match result strap (black + red text on white). */
.super-full {
  left: 0; right: 0;
  bottom: 96px;
  justify-content: center;
}
.super-strap {
  display: flex;
  align-items: stretch;
  width: 1640px;
  min-height: 176px;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.38);
  font-family: var(--body);
}
/* Left spacer mirrors the logo column so the text block sits at the true
   horizontal centre of the strap (the logo + hairline balance on the right). */
.super-strap-spacer {
  width: 300px;
  flex-shrink: 0;
}
.super-strap-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 26px 40px;
}
.super-headline {
  font-family: var(--head);
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1a1a1a;
  /* Single line by design — the fit guard shrinks long headlines to fit. */
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.super-sub {
  font-family: var(--head);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 12px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.super-sub:empty { display: none; }
.super-strap-logo {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
}
.super-strap-logo img { max-width: 100%; max-height: 130px; object-fit: contain; }

/* Fade/slide-in so a director cut to the graphic feels intentional */
@keyframes gfx-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.gfx.active > * { animation: gfx-in 0.4s ease both; }
.gfx.intro-lower .lower-strap { animation: gfx-in 0.4s ease both; }
.gfx-sponsor.active .sponsor-bug { animation: gfx-in 0.4s ease both; }
.gfx-super.active .super-single.on, .gfx-super.active .super-full.on { animation: gfx-in 0.4s ease both; }

/* Empty / misconfigured state */
.gfx-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 200px;
  font-family: var(--body);
  font-size: 22px;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--muted);
  z-index: 2;
}
.gfx-empty code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 5px;
}
html.gfx-transparent .gfx-empty { display: none; }

/* ════════════════════════════════════════════════════════════
   GRAPHICS URL BUILDER  (builder.html)
   Operator-facing form that emits copy-paste OBS URLs.
   ════════════════════════════════════════════════════════════ */
.builder { max-width: 920px; margin: 0 auto; }
.builder h1 {
  font-family: var(--head); font-weight: 700; font-size: 30px;
  letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 6px;
}
.builder .lede { color: var(--muted); font-size: 14px; margin: 0 0 28px; max-width: 640px; line-height: 1.6; }
.bld-section {
  font-family: var(--head); font-weight: 700; font-size: 17px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--white);
  margin: 34px 0 16px; padding-bottom: 9px;
  border-bottom: 1px solid var(--border-strong);
}
.bld-section:first-of-type { margin-top: 8px; }
.bld-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
}
.bld-card > h2 {
  font-family: var(--head); font-weight: 700; font-size: 17px;
  letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 4px; color: var(--white);
}
.bld-card > .hint { color: var(--muted); font-size: 12.5px; margin: 0 0 18px; line-height: 1.55; }
.bld-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.bld-field { display: flex; flex-direction: column; gap: 6px; }
.bld-field .hint { color: var(--muted); font-size: 11.5px; margin: 0; line-height: 1.5; }
.bld-field.full { grid-column: 1 / -1; }
.bld-field label {
  font-family: var(--body); font-weight: 600; font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--stone);
}
.bld-field input[type="text"],
.bld-field input[type="datetime-local"],
.bld-field input[type="number"],
.bld-field select {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--white);
  font: inherit;
  font-size: 14px;
  padding: 11px 13px;
  width: 100%;
}
.bld-field select { appearance: none; cursor: pointer; }
.bld-field option { background: #111; color: var(--white); }
.bld-field input:focus, .bld-field select:focus { outline: none; border-color: var(--red); }
.bld-check { display: flex; align-items: center; gap: 9px; }
.bld-check input { width: 18px; height: 18px; accent-color: var(--red); }
.bld-out { display: flex; gap: 10px; margin-top: 18px; align-items: stretch; }
.bld-out input {
  flex: 1 1 auto; min-width: 0;
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  padding: 11px 13px;
}
.bld-btn {
  appearance: none; cursor: pointer;
  border: 1px solid var(--red-border);
  background: var(--red);
  color: var(--white);
  font-family: var(--head); font-weight: 700; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0 18px; border-radius: 8px; white-space: nowrap;
}
.bld-btn.ghost { background: transparent; border-color: var(--border-strong); }
.bld-btn:active { transform: translateY(1px); }
@media (max-width: 720px) { .bld-grid { grid-template-columns: 1fr; } }


/* ── Brand type weights (Norman/Borax/Poppins) ─────────────── */
.gfx-title, .setwon-team, .intro-player, .intro-vs { font-weight: 700; }
.point-display, .set-pip, .sets-count, .viewer-cell, .bug-cell, .bug-pt,
.r-set-cell, .gfx-clock, .setwon-score .pill, .viewer .point { font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   ADDITIONAL BROADCAST GRAPHICS
   Champion · order of play · up next · social bug · LIVE bug
   ════════════════════════════════════════════════════════════ */

/* ── Champion / trophy card ──────────────────────────────────── */
.champ-logo { height: 190px; margin-bottom: 38px; }
.champ-eyebrow {
  font-family: var(--body); font-weight: 600; font-size: 34px;
  letter-spacing: 0.5em; text-transform: uppercase; color: var(--red-bright);
  margin-bottom: 28px;
}
.champ-name {
  font-family: var(--hero); font-weight: 700; font-size: 150px; line-height: 0.98;
  text-transform: uppercase; color: var(--white); margin: 0; text-align: center;
  max-width: 100%;
}
/* One line per player — kept on one line so the fit-to-width guard in
   graphics.js can shrink long names instead of wrapping mid-name;
   ellipsis is the last resort past the guard's minimum size. */
/* padding-bottom / negative margin: see the note on .intro-player. */
.champ-player {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-bottom: 0.3em; margin-bottom: -0.12em;
}
.champ-rule { width: 160px; height: 5px; background: var(--red); border-radius: 3px; margin: 40px auto 0; }
.champ-club { width: 340px; height: 150px; margin: 44px auto 0; }
.champ-score {
  font-family: var(--display); font-weight: 600; font-size: 58px;
  letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.85); margin-top: 30px;
}
.champ-score:empty { display: none; }

/* ── Order of play ───────────────────────────────────────────── */
/* Full-frame on the pattern by default; in transparent (keyed) mode the
   content sits in a dark rounded panel so it reads over a live / drone shot. */
.gfx-schedule { flex-direction: column; align-items: center; justify-content: center; padding: 44px 150px; }
/* Order of play always sits in a dark panel so the list stays crisp over the
   brand pattern (full frame) or over a live / drone shot (transparent). */
.sched-panel {
  display: flex; flex-direction: column; align-items: center;
  width: auto; max-width: 1640px;
  background: rgba(0, 0, 0, 0.86);
  border-top: 5px solid var(--red);
  border-radius: 16px;
  padding: 38px 80px 44px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
html.gfx-transparent .gfx-schedule { padding: 0; }
.sched-logo { height: 164px; margin-bottom: 16px; }
/* Heading block: "Order of Play" with the event it covers under it. The event
   line is empty when the board carries every match (?event=all), and an empty
   line is display:none so it stops being a flex item and the gap goes with it. */
.sched-head {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; margin-bottom: 26px;
}
.sched-title {
  font-family: var(--hero); font-weight: 700; font-size: 66px; line-height: 1;
  text-transform: uppercase; color: var(--white); margin: 0;
}
.sched-event {
  font-family: var(--body); font-weight: 600; font-size: 26px; line-height: 1.2;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--red-bright);
  text-align: center;
}
.sched-event:empty { display: none; }
/* Optional free-text line under the heading ("Starting soon"), quieter than
   the red event line so the two read as heading → context. */
.sched-note {
  font-family: var(--body); font-weight: 600; font-size: 24px; line-height: 1.2;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  text-align: center;
}
.sched-note:empty { display: none; }
.sched-list { width: 1440px; }
.sched-row {
  display: flex; align-items: center; padding: 13px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.sched-row:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.sched-num {
  width: 230px; flex-shrink: 0;
  font-family: var(--body); font-weight: 600; font-size: 21px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--red-bright);
}
.sched-teams {
  flex: 1; display: flex; align-items: center; gap: 24px;
  font-family: var(--head); font-weight: 700; font-size: 40px;
  text-transform: uppercase; color: var(--white); min-width: 0;
}
/* Long team names ellipsize inside their share of the row rather than
   running under the status column. */
.sched-teams .sched-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-v { font-family: var(--body); font-weight: 400; font-size: 22px; color: var(--muted); flex-shrink: 0; }
.sched-status {
  width: 150px; flex-shrink: 0; text-align: right;
  font-family: var(--body); font-weight: 600; font-size: 22px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.sched-status.live { color: var(--red-bright); }
/* Long lists (a full 1PP knockout is 15 rows) drop to a compact grid so the
   bottom rows stay inside the 1080 frame — schedule-live.js sets .sched-tall
   from the row count. Short lists keep the doubled full-frame logo. */
#gfx-schedule.sched-tall .sched-logo { height: 82px; }
#gfx-schedule.sched-tall .sched-head { margin-bottom: 14px; }
#gfx-schedule.sched-tall .sched-row { padding: 5px 10px; }
#gfx-schedule.sched-tall .sched-teams { font-size: 30px; }
#gfx-schedule.sched-tall .sched-num { font-size: 18px; }
#gfx-schedule.sched-tall .sched-status { font-size: 19px; }
.sched-row.done .sched-teams { color: rgba(255, 255, 255, 0.5); }
/* Winner of a completed match: brand-red name, full strength — the loser
   keeps the dimmed treatment above. Same language as the bug's win row. */
.sched-row.done .sched-t.win { color: var(--red-bright); }
/* Centred in the list's fixed width — an event whose draw isn't in yet would
   otherwise strand one line against the left edge of a very wide panel. */
.sched-empty {
  font-family: var(--body); font-size: 30px; color: var(--muted);
  text-align: center; padding: 18px 0 6px;
}

/* ── Up next ─────────────────────────────────────────────────── */
.gfx-upnext .gfx-eyebrow {
  font-family: var(--body); font-weight: 600; font-size: 30px;
  letter-spacing: 0.46em; text-transform: uppercase; color: #000;
  margin-bottom: 40px;
}
/* Equal-width sides so a long name shrinks (via the fit guard) instead of
   pushing the VS off-centre or colliding with the other side. */
.un-grid { display: flex; align-items: center; justify-content: center; width: 100%; }
.un-side { text-align: center; flex: 1 1 0; min-width: 0; }
.un-player {
  font-family: var(--hero); font-weight: 700; font-size: 96px; line-height: 1.06;
  text-transform: uppercase; color: var(--white); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  /* Descender room inside the clip box — see the note on .intro-player. */
  padding-bottom: 0.3em; margin-bottom: -0.2em;
}
.un-vs { font-family: var(--hero); font-weight: 700; font-size: 84px; color: #000; margin: 0 64px; flex-shrink: 0; }
.un-label {
  font-family: var(--body); font-weight: 600; font-size: 28px;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--muted); margin-top: 50px;
}

/* ── Club logo plates (up-next + intro · roster in js/clubs.js) ── */
/* Club artwork arrives in every colour scheme, so each logo sits on a plate:
   white by default, dark for the clubs flagged `dark` in clubs.js (light
   artwork that would vanish on white). */
.club-chip {
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 16px; padding: 16px 26px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.4);
}
.club-chip img { max-width: 100%; max-height: 100%; object-fit: contain; }
.club-chip.dark {
  background: rgba(16, 18, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
/* Up next: plate centred above each team's stacked names. */
.un-club { width: 340px; height: 150px; margin: 0 auto 36px; }
/* Intro full card: same treatment, a touch smaller to keep names dominant. */
.intro-club { width: 320px; height: 140px; align-self: center; margin-bottom: 12px; }
/* Intro lower-third strap: a small plate at the left of each team row. */
.lower-club-holder { flex-shrink: 0; align-self: center; }
.lower-club { width: 128px; height: 76px; border-radius: 10px; padding: 8px 12px; }

/* ── Social handle / hashtag corner bug ──────────────────────── */
.gfx-social { display: none; }
.gfx-social.active { display: block; }
.social-bug {
  position: absolute; display: flex; flex-direction: column;
  background: rgba(0, 0, 0, 0.8); border-left: 6px solid var(--red);
  border-radius: 8px; padding: 18px 30px; box-shadow: 0 12px 50px rgba(0, 0, 0, 0.45);
}
.social-bug.tl { top: 80px; left: 100px; }
.social-bug.tr { top: 80px; right: 100px; }
.social-bug.bl { bottom: 80px; left: 100px; }
.social-bug.br { bottom: 80px; right: 100px; }
.social-handle {
  font-family: var(--head); font-weight: 700; font-size: 34px;
  letter-spacing: 0.02em; text-transform: uppercase; color: var(--white);
}
.social-tag {
  font-family: var(--body); font-weight: 600; font-size: 21px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-bright); margin-top: 6px;
}
.social-tag:empty, .social-handle:empty { display: none; }
.gfx-social.active .social-bug { animation: gfx-in 0.4s ease both; }

/* ── LIVE on-air indicator ───────────────────────────────────── */
.gfx-onair { display: none; }
.gfx-onair.active { display: block; }
.onair-bug {
  position: absolute; display: flex; align-items: center; gap: 14px;
  background: rgba(0, 0, 0, 0.8); border-radius: 8px; padding: 14px 26px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.45);
}
.onair-bug.tl { top: 80px; left: 100px; }
.onair-bug.tr { top: 80px; right: 100px; }
.onair-bug.bl { bottom: 80px; left: 100px; }
.onair-bug.br { bottom: 80px; right: 100px; }
.onair-dot {
  width: 18px; height: 18px; border-radius: 50%; background: var(--red-bright);
  animation: onair-pulse 1.5s ease-out infinite;
}
.onair-text {
  font-family: var(--head); font-weight: 700; font-size: 30px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--white);
}
@keyframes onair-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(181, 32, 64, 0.55); }
  70%  { box-shadow: 0 0 0 16px rgba(181, 32, 64, 0); }
  100% { box-shadow: 0 0 0 0 rgba(181, 32, 64, 0); }
}

/* ── Player profile · lower-third strap (g=profile) ───────────── */
/* Same strap family as the intro lower third: bottom-anchored, red left edge,
   UBS lockup behind a divider on the right. Three stacked lines — the name, the
   country in red under it, then the stat cells. Usually run with
   bg=transparent over the live court feed; without it the strap sits on the
   brand pattern. Data comes from js/players.js. */
/* Matches the intro strap's frame position, width and logo block, so cutting
   between the two lower thirds doesn't move the furniture. */
.gfx.profile-lower {
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 120px;
}
.plt-strap {
  display: flex;
  align-items: stretch;
  width: 1640px;
  background: rgba(0, 0, 0, 0.92);
  border-left: 12px solid var(--red);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
}
/* Optional headshot, full strap height at the left edge */
.plt-photo {
  display: none;
  width: 196px;
  flex-shrink: 0;
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.plt-photo.on { display: block; }
/* overflow:hidden so an extreme name clips at the logo divider instead of
   running underneath the UBS lockup (the name itself also ellipsizes). */
.plt-main { flex: 1 1 auto; min-width: 0; padding: 28px 46px 30px; overflow: hidden; }
.plt-name {
  font-family: var(--hero); font-weight: 700;
  /* Norman's rounded letters overshoot the em box top and bottom; anything
     much tighter than this line-height clips them against the overflow:hidden
     the ellipsis guard needs. (The fallback faces sit inside their line box,
     so the clipping only shows with the real webfont.) */
  font-size: 78px; line-height: 1.18;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--white);
  margin-top: -6px; /* pull the taller line box back up so the strap height holds */
  /* One line, so the fit-to-width guard in graphics.js can shrink a long name
     rather than wrap it; ellipsis is the last resort past the guard's floor. */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  /* Even at 1.18 the deepest tails (J, Q) graze the clip box — pad it out and
     take the padding straight back off so the strap height is unchanged. */
  padding-bottom: 0.3em; margin-bottom: -0.3em;
}
.plt-country {
  font-family: var(--body); font-weight: 600; font-size: 20px;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--red-bright);
  margin-top: 4px;
}
.plt-country:empty { display: none; }

/* Stat cells — the profile pack's panel flattened into a row */
.plt-stats {
  display: flex; align-items: flex-end;
  margin-top: 22px; padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.plt-stats:empty { display: none; }
.plt-stat { padding: 0 34px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.plt-stat:first-child { padding-left: 0; border-left: 0; }
.plt-stat-label {
  font-family: var(--body); font-weight: 600; font-size: 13px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 4px;
  white-space: nowrap;
}
.plt-stat-value {
  font-family: var(--head); font-weight: 700; font-size: 38px; line-height: 1;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
}
.plt-logo {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 44px;
}
.plt-logo img { max-width: 100%; max-height: 130px; object-fit: contain; }
.gfx.profile-lower.active .plt-strap { animation: gfx-in 0.45s ease both; }


/* ── Head-to-head panel (?g=h2h) ────────────────────────────────── */
.gfx-h2h { display: none; }
.gfx-h2h.active {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; gap: 44px; position: relative; z-index: 1;
}
.h2h-eyebrow {
  font-family: var(--head); font-size: 34px; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--red-bright);
}
.h2h-grid {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 70px; align-items: center; width: min(1560px, 88%);
}
.h2h-side { text-align: center; }
.h2h-name {
  font-family: var(--hero); font-size: 84px; line-height: 0.98;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.h2h-nick { margin-top: 14px; font-family: var(--head); font-size: 26px; color: var(--muted); }
.h2h-mid { display: flex; flex-direction: column; gap: 26px; align-items: center; }
.h2h-vs { font-family: var(--hero); font-size: 44px; color: var(--red-bright); }
.h2h-rows { display: flex; flex-direction: column; gap: 14px; min-width: 460px; }
.h2h-row {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 26px;
  align-items: baseline; border-bottom: 1px solid var(--border); padding-bottom: 10px;
}
.h2h-val { font-family: var(--head); font-size: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.h2h-label {
  font-size: 16px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); text-align: center; min-width: 170px;
}
