/* Yarnball Network - the channel deck (js/tvset.js, R2). The deck is the one loud thing on the
   page: a 16:9 screen, the On YBN rundown beside it (a compact list under it below 900px), the
   scores + YBN ticker rows and the deck bar. Dark in both themes. Text inside the screen scales
   with it (container query units) but never below phone-legible. Studio geometry comes from
   art/tv-v1/studio/layout.json. */
.tvs { --tv-ink: #fff6e3; --tv-dim: #a9b6d2; --tv-navy: #1f3049; --tv-deep: #0c1326; --tv-gold: #f2c14e; --tv-red: #c4372d; --tv-cream: #f3ead8;
    margin: 0 0 14px; }
.tvs-set { display: grid; grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: "tube rail" "under rail" "line line" "bar bar";
    background: #0c1326; border-radius: 10px; overflow: hidden; color: var(--tv-ink); font-family: var(--fd, "Arial Narrow", sans-serif);
    box-shadow: inset 0 0 0 1px #000, 0 2px 0 #fff1 inset, 0 6px 18px #0005; }
.tvs-tube { grid-area: tube; min-width: 0; background: #000; }
.tvs-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--tv-deep); color: var(--tv-ink); container-type: inline-size; }
/* a gentle CRT: scanlines + vignette, only on the screen */
.tvs-screen::after { content: ""; position: absolute; inset: 0; z-index: 8; pointer-events: none;
    background: repeating-linear-gradient(#0000 0 2px, #0000001a 2px 3px), radial-gradient(ellipse at center, #0000 60%, #0007 100%); }
.tvs-under { grid-area: under; min-width: 0; }

/* On YBN: the show on air (gold bar + progress), then what follows, live games tagged */
.tvs-rail { grid-area: rail; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #101a31; color: #d9e1f1; border-left: 1px solid #000; }
.tvs-rail header { display: flex; align-items: center; gap: 8px; padding: 9px 12px 8px; background: var(--tv-navy); border-bottom: 3px solid var(--tv-gold); }
.tvs-rail header img { width: 24px; height: 24px; }
.tvs-rail header b { font-weight: 800; font-size: 17px; line-height: 1; font-stretch: 75%; color: var(--tv-ink); }
.tvs-rail ol { list-style: none; margin: 0; padding: 0; flex: 1 1 0; min-height: 0; overflow: hidden; }
.tvs-rail li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 2px 8px; padding: 8px 12px; border-bottom: 1px solid #1d2a47; }
.tvs-rail li time { font-weight: 700; font-size: 12px; line-height: 1.35; font-stretch: 80%; color: #8ea0c4; }
.tvs-rail li b { min-width: 0; font-weight: 700; font-size: 14px; line-height: 1.25; font-stretch: 80%; color: var(--tv-ink); }
.tvs-rail li small { grid-column: 2; color: #93a2c2; font-family: var(--fb, Verdana, sans-serif); font-size: 10.5px; line-height: 1.35; }
.tvs-rail li.now { background: linear-gradient(90deg, #f2c14e22, transparent); box-shadow: inset 4px 0 var(--tv-gold); }
.tvs-rail li.now time { color: var(--tv-gold); }
.tvs-rail li.game b::after { content: "LIVE GAME"; margin-left: 6px; padding: 1px 4px; border-radius: 2px; background: var(--tv-red); color: #fff;
    font-size: 9.5px; letter-spacing: 0.3px; vertical-align: 1px; white-space: nowrap; }
.tvs-prog { grid-column: 2; height: 4px; margin-top: 3px; border-radius: 2px; overflow: hidden; background: #23345a; }
.tvs-prog i { display: block; width: 0; height: 100%; background: var(--tv-gold); }

/* the stage: the 16:9 scene, fitted to the screen */
.tvs-stage { position: absolute; inset: 0; overflow: hidden; background: #20374b; container-type: size; }
.tvs-scene { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(100cqw, 177.78cqh); height: min(56.25cqw, 100cqh); overflow: hidden; container-type: inline-size; }
.tvs-scene > img, .tvs-rig img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; user-select: none; }
.tvs-rig { position: absolute; }
.tvs-mon { position: absolute; display: flex; align-items: center; justify-content: center; text-align: center; }
/* The monitor is a short 2:1 box (about 18.75cqw of the scene tall): the card is sized to fit
   all five lines in it, and no line wraps (a wrapped score line is what pushed it out). */
.tvs-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.22em; width: 100%; max-height: 100%;
    box-sizing: border-box; padding: 0 4%; overflow: hidden; font-size: 1.85cqw; line-height: 1.1; }
.tvs-card > * { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvs-kick { font-size: 0.95em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tv-gold); }
.tvs-card > b { font-size: 1.9em; font-weight: 800; font-stretch: condensed; }
.tvs-card small { font-size: 0.95em; letter-spacing: 0.06em; color: var(--tv-dim); }
.tvs-card em { font-style: normal; font-size: 0.85em; color: var(--tv-dim); }
.tvs-match { display: flex; align-items: center; justify-content: center; gap: 0.45em; font-size: 1.45em; }
.tvs-match b { white-space: nowrap; }
.tvs-match span { color: var(--tv-dim); font-size: 0.75em; }
.tvs-match .tvs-logo { width: 1.35em; height: 1.35em; }
.tvs-open, .tvs-brb { position: absolute; inset: 0; display: none; }
.tvs-open { align-items: center; justify-content: center; background: radial-gradient(circle at 50% 45%, #2a4063d9, #0c1326f2 70%); }
.tvs-open img { width: 72%; height: auto; animation: tvs-pop 0.6s ease-out both; }
.tvs-wm { font-size: 8cqw; font-weight: 800; font-stretch: condensed; color: var(--tv-ink); text-transform: uppercase; text-align: center;
    text-shadow: 0 0.05em 0 #1f3049, 0 0 0.3em #3a7bd5; animation: tvs-pop 0.6s ease-out both; }
.tvs-brb img { position: absolute; inset: 0; width: 100%; height: 100%; }
.tvs-back { position: absolute; right: 3%; bottom: 4%; padding: 0.2em 0.6em; font-size: 2.2cqw; border-radius: 3px; background: #0c1326cc; color: var(--tv-ink); }
.tvs-scene[data-scene="open"] .tvs-open { display: flex; }
.tvs-scene[data-scene="brb"] .tvs-brb { display: block; }
.tvs-scene[data-scene="open"] .tvs-mon { visibility: hidden; }
@keyframes tvs-pop { from { transform: scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- the studio (TV3): cameras. Boxes from art/tv-v1/studio/layout.json, as % of 1920 x 1080 ---- */
.tvs-bg.single { display: none; }
.tvs-rig { position: absolute; left: 3.6458%; top: 25.926%; width: 31.25%; height: 55.556%; }
.tvs-rig.pixel { left: 65.104%; }
.tvs-rig img { display: none; }
.tvs-rig img.on { display: block; }
.tvs-mon { left: 31.25%; top: 9.444%; width: 37.5%; height: 33.333%; overflow: hidden; }
/* single camera: one host in the left seat, the monitor on the right */
.tvs-scene[data-cam="single"] .tvs-bg.wide { display: none; }
.tvs-scene[data-cam="single"] .tvs-bg.single { display: block; }
.tvs-scene[data-cam="single"] .tvs-rig { display: none; left: 6.25%; top: 14.815%; width: 37.5%; height: 66.667%; }
.tvs-scene[data-cam="single"][data-host="biscuit"] .tvs-rig.biscuit,
.tvs-scene[data-cam="single"][data-host="pixel"] .tvs-rig.pixel { display: block; }
.tvs-scene[data-cam="single"] .tvs-mon { left: 48.75%; top: 13.333%; width: 37.5%; height: 35.556%; }
/* full-screen graphic */
.tvs-full { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 4% 6% 17%;
    background: radial-gradient(circle at 50% 30%, #34507a, #1f3049 55%, #0c1326); }
.tvs-full::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1.2%; background: linear-gradient(90deg, var(--tv-red), var(--tv-gold)); }
.tvs-scene[data-cam="full"] .tvs-full { display: flex; animation: tvs-in 0.35s ease-out both; }
@keyframes tvs-in { from { opacity: 0; transform: translateY(2%); } to { opacity: 1; transform: none; } }

/* highlights (TV4): the diamond on the left (field.js, 524 x 510 view), the clip panel on the
   right with the countdown number, the REPLAY bug, and a branded wipe driven by the clock */
.tvs-clip { position: absolute; inset: 0; display: none; overflow: hidden;
    background: linear-gradient(135deg, #1f3049, #0c1326 60%); }
.tvs-scene[data-cam="clip"] .tvs-clip { display: block; }
.tvs-dia { position: absolute; left: 0; top: 0; height: 100%; aspect-ratio: 524 / 510; line-height: 0; background: #5c3d24;
    border-right: 0.4cqw solid var(--tv-gold); }
.tvs-dia .yb-under { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.tvs-court { position: relative; display: block; width: 100%; height: 100%; }
.tvs-clip.slow .tvs-dia { filter: saturate(0.75) contrast(1.05); }
.tvs-cinfo { position: absolute; left: 60.5%; right: 3%; top: calc(4% + clamp(26px, 6.5cqw, 56px) + 1.5%); display: flex; flex-direction: column; gap: 0.25em;
    font-size: max(8px, 2.3cqw); line-height: 1.1; color: var(--tv-ink); }
.tvs-rank { font-size: 4.2em; line-height: 0.9; font-weight: 800; font-stretch: condensed; color: var(--tv-gold);
    text-shadow: 0.05em 0.05em 0 var(--tv-red); animation: tvs-pop 0.5s ease-out both; }
.tvs-ckick { font-size: 0.8em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tv-gold); }
.tvs-cname { font-size: 1.6em; font-weight: 800; font-stretch: condensed; overflow-wrap: break-word; }
.tvs-ctag { align-self: flex-start; padding: 0.1em 0.45em; border-radius: 3px; font-size: 0.85em; font-weight: 800; letter-spacing: 0.06em;
    background: var(--tv-red); color: #fff; }
.tvs-cgame { font-size: 0.85em; color: var(--tv-dim); }
.tvs-rbug { position: absolute; left: 1.5%; top: 3%; padding: 0.15em 0.5em; border-radius: 3px; font-size: max(7px, 1.8cqw); font-weight: 800; letter-spacing: 0.1em;
    background: #0c1326cc; color: var(--tv-ink); border-left: 0.25em solid var(--tv-gold); }
.tvs-rbug:empty { display: none; }
.tvs-rbug.slow { border-left-color: var(--tv-red); }
/* the Codex replay wipe (TV7): one 3840 x 1080 strip, two screens wide with an opaque middle;
   starts at left -200% and moves translateX(0 -> 150%) of its own width (art README) */
.tvs-wipe { position: absolute; top: 0; left: -200%; width: 200%; height: 100%; z-index: 2; display: none; pointer-events: none; will-change: transform; }
.tvs-wipe img { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; }
.tvs-scene[data-cam="clip"] .tvs-cap { left: 60.5%; right: 3%; }
.tvs-scene[data-cam="clip"] .tvs-said { -webkit-line-clamp: 5; }

/* the lower third (1988 cable): the show plate on cream | the navy title with the booth caption
   under a gold rule | the red time block. The caption types out; the untyped rest holds its space. */
.tvs-lower { position: absolute; left: 3%; right: 3%; bottom: 5%; z-index: 3; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch;
    filter: drop-shadow(0 3px 0 #0008); font-size: clamp(10px, 1.9cqw, 19px); line-height: 1.2; }
.tvs-lplate { display: grid; place-items: center; padding: 0.35em 0.7em; background: var(--tv-cream); color: var(--tv-navy); }
.tvs-lplate img { height: 2.1em; width: auto; max-width: 8em; }
.tvs-lplate b { max-width: 7em; font-weight: 800; font-stretch: 75%; font-size: 1.05em; line-height: 1; text-align: center; text-transform: uppercase; letter-spacing: 0.03em; }
.tvs-ltxt { min-width: 0; padding: 0.4em 0.8em 0.45em; background: var(--tv-navy); color: var(--tv-ink); border-top: 0.22em solid var(--tv-gold); }
.tvs-lhead { display: flex; align-items: baseline; gap: 0.6em; min-width: 0; }
.tvs-lhead b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-stretch: 75%; font-size: 1.3em; line-height: 1.1; }
.tvs-lhead em { flex: none; margin-left: auto; font-style: normal; font-size: 0.8em; color: var(--tv-dim); }
.tvs-ltime { display: grid; place-items: center; padding: 0 0.75em; background: var(--tv-red); color: #fff; font-weight: 800; font-stretch: 75%; font-size: 1.2em; white-space: nowrap; }
/* newsroom (phase 3): a running story takes over the plate and the title */
.tvs-lower[data-news=breaking] .tvs-lplate { background: var(--tv-red); color: #fff; }
.tvs-lower[data-news=breaking] .tvs-lplate b { animation: tvs-newsblink 1s steps(2, start) 3; }
.tvs-lower[data-news=breaking] .tvs-ltxt { border-top-color: var(--tv-red); }
.tvs-lower[data-news=developing] .tvs-lplate { background: var(--tv-gold); }
@keyframes tvs-newsblink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .tvs-lower[data-news=breaking] .tvs-lplate b { animation: none; } }
/* the booth caption: the speaker's chip, then the line */
.tvs-cap { display: none; align-items: baseline; gap: 0.55em; margin-top: 0.3em; }
.tvs-cap.on { display: flex; }
.tvs.nocc .tvs-cap { display: none !important; }
.tvs-cap .tvs-who { flex: none; padding: 0.12em 0.45em 0.05em; border-radius: 2px; font-size: 0.72em; font-weight: 800; letter-spacing: 0.08em; color: var(--tv-deep); background: #f29b4c; }
.tvs-cap .tvs-who.pixel { background: #dfe6f5; }
.tvs-cap .tvs-who:empty { display: none; }
.tvs-cap:is([data-mood="excited"], [data-mood="fist"]) .tvs-who { box-shadow: 0 0 0 2px var(--tv-red); }
.tvs-said { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; min-height: 1.35em;
    font-family: var(--fb, Verdana, sans-serif); font-size: 0.82em; line-height: 1.35; color: #e3e9f6; }
.tvs-rest { color: transparent; }
/* the lower third is the studio's: breaks, ads and bumpers have their own cards. Under the
   open's big wordmark and beside a replay only the caption shows (nothing at all without one). */
.tvs-scene:not([data-scene="studio"]) .tvs-lower { display: none; }
.tvs-scene[data-scene="open"] .tvs-lower { display: grid; left: 8%; right: 8%; bottom: 6%; grid-template-columns: minmax(0, 1fr); }
.tvs-scene[data-cam="clip"] .tvs-lower { left: 60.5%; right: 3%; bottom: 4%; grid-template-columns: minmax(0, 1fr); }
.tvs-scene:is([data-scene="open"], [data-cam="clip"]) :is(.tvs-lplate, .tvs-lhead, .tvs-ltime) { display: none; }
.tvs-scene:is([data-scene="open"], [data-cam="clip"]) .tvs-cap { margin-top: 0; }
.tvs-scene:is([data-scene="open"], [data-cam="clip"]) .tvs-lower:not(:has(.tvs-cap.on)),
.tvs.nocc .tvs-scene:is([data-scene="open"], [data-cam="clip"]) .tvs-lower { display: none; }
.tvs-scene[data-cam="clip"] .tvs-said { -webkit-line-clamp: 5; }

/* ---- graphics package (js/tvgfx.js). ots = on the studio monitor, full = the whole screen ---- */
.tvg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35em; width: 100%; height: 100%; text-align: center; box-sizing: border-box;
    min-width: 0; overflow-wrap: anywhere; color: var(--tv-ink); font-size: 1.75cqw; line-height: 1.15; }
.tvg > * { max-width: 100%; flex-shrink: 0; }
.tvg > .tvg-who { flex-shrink: 1; }
.tvg.full { font-size: 2.2cqw; height: auto; }
.tvg-kick { font-size: 0.85em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tv-gold); }
.tvg b { font-weight: 800; }
.tvg small { font-size: 0.8em; color: var(--tv-dim); }
.tvg-logo { width: 1.4em; height: 1.4em; flex-shrink: 0; object-fit: contain; vertical-align: middle; font-size: inherit; }   /* (em = the graphic's size, not the site's img font) */
.tvg-logo.sm { width: 1.15em; height: 1.15em; margin-right: 0.3em; }
.tvg-logo.big { width: 4.2em; height: 4.2em; }
.tvg-chip { display: inline-block; border-radius: 50%; background: var(--c); }
.tvg-face { width: 5.6em; height: 5.6em; flex: none; font-size: inherit; border-radius: 50%; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c, #2a4063) 60%, #fff 10%), #0c1326); }
.tvg-team { display: inline-flex; align-items: center; color: var(--tv-dim); }
.tvg-line { font-size: 0.9em; color: var(--tv-ink); }
/* player / team card: picture left, words right */
.tvg-player, .tvg-team1, .tvg-clip { flex-direction: row; gap: 0.8em; padding: 0 5%; text-align: left; border-left: 0.35em solid var(--c, var(--tv-gold)); }
.tvg-player .tvg-who, .tvg-team1 .tvg-who, .tvg-clip .tvg-who { display: flex; flex-direction: column; gap: 0.2em; min-width: 0; }
.tvg-player b, .tvg-team1 b, .tvg-clip b { font-size: 1.55em; font-stretch: condensed; line-height: 1; }
.tvg-player.full .tvg-face { width: 9em; height: 9em; }
.tvg-rank { font-size: 4.5em !important; color: var(--tv-gold); text-shadow: 0 0.05em 0 #8a3a12; flex: none; }
.tvg-clip .tvg-line { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* tables: standings, leaders, linescore */
.tvg-table table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.tvg-table th { text-align: center; font-size: 0.75em; font-weight: 700; color: var(--tv-dim); letter-spacing: 0.06em; padding: 0.15em 0.5em; }
.tvg-table :is(th, td) { vertical-align: middle; border-bottom: 0; }
.tvg-table td { padding: 0.2em 0.5em; border-top: 1px solid #ffffff1f; }
.tvg-table .n { text-align: center; font-variant-numeric: tabular-nums; }
.tvg-table .t { text-align: left; white-space: normal; }
.tvg-table .f { width: 1%; }
.tvg-table tr.line td { border-bottom: 2px solid var(--tv-gold); }
.tvg-table tr.won td { color: #fff; font-weight: 700; }
.tvg-table .rhe { border-left: 2px solid #ffffff33; }
/* Inning cells share identical widths and alignment; the club keeps its own column. */
.tvg-ls table { table-layout: fixed; }
.tvg-ls :is(th, td) { text-align: center; padding-inline: 0.2em; }
.tvg-ls .t { white-space: nowrap; }
/* club column sized in type, not %: crest + three letters at any width (th em is 0.75 of a cell) */
.tvg-ls th.t { width: 5.6em; }
/* totals (SO, R, H, E) hold two digits; th em is 0.75 of the cells, so 2.6em ~ 2ch of a cell */
.tvg-ls th.x { width: 2.6em; }
.tvg-lead table { width: auto; min-width: 55%; }   /* ranked lists stay compact: the value sits near its name */
.tvg-lead .f { width: auto; padding: 0.1em; }   /* (a % width here would stretch the auto table to the full screen) */
.tvg-lead .tvg-face { width: 2.2em; height: 2.2em; }
.tvg-lead .t small { margin-left: 0.4em; }
.tvg-lead .big { font-size: 1.3em; color: var(--tv-gold); font-weight: 800; }
.tvg.ots.tvg-table { font-size: 1.4cqw; }
.tvg.ots.tvg-final { font-size: 1.25cqw; }
/* final score */
.tvg-score { display: flex; align-items: center; gap: 1.2em; }
.tvg-score em { font-style: normal; color: var(--tv-dim); }
.tvg-side { display: flex; flex-direction: column; align-items: center; gap: 0.15em; opacity: 0.75; }
.tvg-side.won { opacity: 1; }
.tvg-side span { font-weight: 700; letter-spacing: 0.06em; }
.tvg-side b { font-size: 3.2em; line-height: 1; }
.tvg-side.won b { color: var(--tv-gold); }
.tvg-dec { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3em 1.1em; font-size: 0.85em; color: var(--tv-dim); }
.tvg-dec i { font-style: normal; font-weight: 800; color: var(--tv-gold); }
/* pregame: tape / starters / lineups / picks / countdown */
.tvg-cols { display: flex; align-items: flex-start; justify-content: center; gap: 1.4em; width: 100%; }
.tvg-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0.2em; padding-top: 0.3em; border-top: 0.25em solid var(--c); }
.tvg-col > b { font-size: 1.15em; }
.tvg-rec { font-size: 2em; font-weight: 800; font-variant-numeric: tabular-nums; }
.tvg-mid { flex: 0 0 auto; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 0.4em; }
.tvg-mid em, .tvg-vs em { font-style: normal; font-size: 1.4em; color: var(--tv-dim); }
.tvg-order ol { margin: 0.2em 0 0; padding: 0 0 0 1.4em; text-align: left; width: 100%; }
.tvg-order li { margin: 0 0 0.25em; }
.tvg-order li i { font-style: normal; color: var(--tv-dim); font-size: 0.8em; }
.tvg-order li small { display: block; }
.tvg-odds { display: flex; width: 86%; height: 1.5em; border-radius: 0.75em; overflow: hidden; margin-top: 0.2em; font-size: 0.85em; }
.tvg-odds span { display: flex; align-items: center; justify-content: center; min-width: 3.5em; background: var(--c); white-space: nowrap; }
.tvg-odds i { font-style: normal; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000c; }
.tvg-odds i.dk { color: #0c1326; text-shadow: none; }
.tvg-vs { display: flex; align-items: center; gap: 0.8em; }
.tvg-cd { font-size: 3em; color: var(--tv-gold); font-variant-numeric: tabular-nums; }
.tvg.ots .tvg-logo.big { width: 3.4em; height: 3.4em; }
.tvg.ots.tvg-tape { font-size: 1.4cqw; }
.tvg.ots.tvg-tape .tvg-odds { display: none; }
.tvg.ots.tvg-tape .tvg-face { width: 3.6em; height: 3.6em; }
/* full-screen tape: the tallest pregame graphic. Smaller crests keep it inside the TV frame at
   readable type, so it does not fall back to the frameless graphic-room layout on mid-size screens. */
.tvg-tape.full .tvg-logo.big { width: 3.2em; height: 3.2em; }
.tvg-tape.full .tvg-rec { font-size: 1.7em; line-height: 1.05; }
/* classics / debate */
.tvg-wm { width: 80%; height: auto; }
.tvg-debate b { font-size: 2.2em; font-stretch: condensed; }
.tvg-debate em { font-style: normal; color: var(--tv-red); }
/* story graphics: stat card, ranked board, two-sided versus */
.tvg-card { flex-direction: row; gap: 0.8em; padding: 0 5%; text-align: left; border-left: 0.35em solid var(--c, var(--tv-gold)); }
.tvg-card .tvg-who { display: flex; flex-direction: column; gap: 0.25em; min-width: 0; }
.tvg-card > .tvg-who > b { font-size: 1.55em; font-stretch: condensed; line-height: 1; }
.tvg-card.full .tvg-face { width: 8em; height: 8em; }
/* stat tiles (tvgfx statGrid): value over label, one row per group, columns line up across rows */
.tvg-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(3.4em, max-content)); gap: 0.25em; margin-top: 0.25em; }
.tvg-grid.lab { grid-template-columns: max-content repeat(var(--n), minmax(3.4em, max-content)); }
.tvg-grid em { font-style: normal; font-size: 0.68em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--tv-dim); align-self: center; text-align: right; padding-right: 0.5em; }
.tvg-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.25em 0.55em 0.2em; text-align: center;
    background: #ffffff12; border-top: 0.15em solid color-mix(in srgb, var(--c, var(--tv-gold)) 70%, #fff 30%); border-radius: 2px; }
.tvg-tile b { font-size: 1.35em; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.05; white-space: nowrap; }
.tvg-tile i { font-style: normal; font-size: 0.62em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--tv-dim); line-height: 1.1; margin-top: 0.2em; }
/* head-to-head (tale of the tape, starters): left value | label | right value */
.tvg-cmp { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); width: min(100%, 30em); }
.tvg-chead { display: flex; flex-direction: column; align-items: center; gap: 0.15em; padding-bottom: 0.3em; border-bottom: 0.22em solid var(--c); min-width: 0; }
.tvg-chead b { font-size: 1.2em; line-height: 1.05; }
.tvg-chead small { display: inline-flex; align-items: center; }
.tvg-chead .tvg-logo.big { width: 3em; height: 3em; }
.tvg-chead .tvg-face { width: 3.6em; height: 3.6em; }
.tvg-cmid { align-self: center; padding: 0 0.7em; color: var(--tv-dim); font-size: 1.2em; }
.tvg-cmp > .v { font-size: 1.25em; font-weight: 800; text-align: center; padding: 0.2em 0.3em; border-top: 1px solid #ffffff1f; font-variant-numeric: tabular-nums; color: #fff; overflow-wrap: anywhere; }
.tvg-cmp > i { display: flex; align-items: center; justify-content: center; padding: 0 0.6em; border-top: 1px solid #ffffff1f; text-align: center;
    font-style: normal; font-size: 0.66em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--tv-dim); }
.tvg-cmp > :nth-child(4), .tvg-cmp > :nth-child(5), .tvg-cmp > :nth-child(6) { border-top: 0; }
/* lineups: a small table per club */
.tvg-lineups .tvg-cols { align-items: flex-start; }
.tvg-order { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 0.2em; padding-top: 0.25em; border-top: 0.22em solid var(--c); }
.tvg-order .tvg-team b { color: var(--tv-ink); }
.tvg-order td.p { color: var(--tv-dim); font-size: 0.85em; }
.tvg-order th:first-child, .tvg-order td:first-child { width: 1.2em; color: var(--tv-dim); }
.tvg-order table { table-layout: fixed; }   /* both clubs' tables share column widths */
.tvg-order th:nth-child(n+3) { width: 3.2em; }
.tvg-note { font-size: 0.85em; color: var(--tv-dim); }
.tvg-head { font-size: 1.15em; line-height: 1.1; max-width: 92%; }
.tvg-board .t b { font-weight: 700; }
.tvg-board .tvg-face { width: 1.8em; height: 1.8em; }   /* five ranked rows fit inside the TV frame at readable type */
.tvg-board .t small { display: block; margin: 0; }
.tvg-board tr.me td { color: #fff; background: #ffffff14; }
.tvg-board tr.me .big { color: var(--tv-gold); }
.tvg-board .big { color: var(--tv-ink); }
.tvg-versus .tvg-col > b { font-size: 1.25em; }
.tvg-versus .tvg-host { font-size: 0.8em; color: var(--c); }
.tvg.ots.tvg-card { font-size: 1.45cqw; }
/* full-screen side-by-side cards hug their content, so the club-color bar sits beside it, not at the screen edge */
.tvg.full:is(.tvg-player, .tvg-team1, .tvg-clip, .tvg-card) { width: fit-content; max-width: 100%; padding-right: 0; }

/* phones: the studio scene is about 246 x 138 px and its monitor about 90 x 45, so graphics do
   not go on the TV at all: they sit in a readable panel under it (.tvs-gpanel, tvset.js) and the
   camera stays on the hosts. */
@media (max-width: 640px) {
    /* the monitor's own card (no graphic): just the segment name and the matchup */
    .tvs-card { font-size: 9px; gap: 1px; padding: 0 3px; }
    .tvs-card > :is(.tvs-kick, small, em) { display: none; }
    .tvs-card > b { font-size: 12px; }
    .tvs-match { font-size: 10px; }
    .tvs-match { gap: 0.3em; }
    .tvs-match span { font-size: 1em; }
    .tvs-match .tvs-logo { display: none; }
    /* the rest of the studio's small print */
    .tvs-back { font-size: 10px; }
    .tvs-rbug { font-size: 9px; }
    .tvs-cinfo { font-size: 10px; }
    .tvs-ckick, .tvs-ctag { font-size: 9px; }
    .tvs-scene .tvs-fcd { font-size: 10px; }
    .tvs-scene .tvs-fcd b { font-size: 9px; }
}

/* the deck bar: Sound / Captions / Full screen */
.tvs-ctl { grid-area: bar; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; background: #0c1326; border-top: 1px solid #1d2a47;
    color: #93a2c2; font: 11px/1.3 var(--fb, Verdana, sans-serif); }
.tvs-ctl .knob { padding: 7px 12px; border-radius: 4px; cursor: pointer; color: #e5ebf7; font: 700 13px/1 var(--fd, sans-serif); font-stretch: 80%;
    background: linear-gradient(#34496f, #22324f); border: 1px solid #0a1224; box-shadow: inset 0 1px #ffffff2a; }
.tvs-ctl .knob:hover { background: linear-gradient(#3e5784, #283a5d); }
.tvs-ctl .knob[aria-pressed="true"] { background: linear-gradient(#f6cf6b, #e0aa2e); color: var(--tv-navy); box-shadow: inset 0 1px #fff8; }
.tvs-ctl .knob:focus-visible { outline: 3px solid var(--tv-gold); outline-offset: 2px; }
.tvs-ctl .knob[hidden] { display: none; }
.tvs-sp { flex: 1; }

/* the ticker rows: scores, then the YBN news crawl */
.tvs-line { grid-area: line; border-top: 1px solid #000; font-size: 13px; line-height: 1; font-weight: 700; font-stretch: 80%; }
.tvs-deck { display: flex; min-width: 0; }
.tvs-deck > b { flex: 0 0 auto; width: 4.8em; padding: 7px 0; text-align: center; font-weight: 800; }
.tvs-deck.top { background: #0a1020; color: #e9eefa; }
.tvs-deck.top > b { background: var(--tv-red); color: #fff; }
.tvs-deck.news { background: #142039; color: #c6d1e8; font-weight: 600; }
.tvs-deck.news > b { background: var(--tv-gold); color: var(--tv-navy); }
.tvs-win { flex: 1 1 auto; min-width: 0; overflow: hidden; padding: 7px 0; }
.tvs-track { display: inline-block; white-space: nowrap; will-change: transform; }
.tk { display: inline-block; padding: 0 1.1em; border-right: 1px solid #ffffff1f; }
.tk b { color: #fff; }
.tk small { font-size: 0.85em; color: var(--tv-gold); letter-spacing: 0.03em; }
.tk i { font-style: normal; color: var(--tv-ink); }
.tk.live u { text-decoration: none; color: #fff; background: var(--tv-red); padding: 0 0.3em; border-radius: 2px; }

/* the YBN bug (top right) and the game-time clock */
.tvs-bug { position: absolute; top: 4%; right: 2.4%; z-index: 5; display: flex; align-items: center; gap: 0.4em; font-size: clamp(9px, 1.25cqw, 14px); }
.tvs-bug img { width: clamp(26px, 6.5cqw, 56px); height: auto; opacity: 0.92; filter: drop-shadow(0 1px 2px #0008); }
.tvs-tag { padding: 0.05em 0.4em; border-radius: 2px; background: var(--tv-red); color: #fff; font-weight: 800; letter-spacing: 0.06em; }
.tvs-gclock { position: absolute; display: none; z-index: 5; padding: 0.1em 0.45em; border-radius: 2px; font-size: clamp(9px, 1.2cqw, 14px); font-weight: 700;
    background: #0c1326bf; color: var(--tv-ink); }

/* narrow: the rundown moves under the screen as a compact list (the next three things on air) */
@media (max-width: 900px) {
    .tvs-set { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tube" "under" "rail" "line" "bar"; }
    .tvs-rail { border-left: 0; border-top: 1px solid #000; }
    .tvs-rail ol { flex: none; }
    .tvs-rail li { padding: 6px 12px; }
    .tvs-rail li:nth-child(n+4) { display: none; }
    .tvs-rail li small { display: none; }
    .tvs-rail li.now small { display: block; }
}
/* phones: the caption runs under the screen like subtitles (a steady strip, so the page does not
   jump as lines come and go); the news crawl row goes */
@media (max-width: 640px) {
    .tvs-lhead em { display: none; }
    .tvs-under > .tvs-cap { display: flex; margin: 0; padding: 8px 12px 9px; min-height: calc(2 * 1.35 * 14px + 17px); box-sizing: border-box;
        background: var(--tv-navy); border-top: 3px solid var(--tv-gold); font-size: 16px; }
    .tvs-under > .tvs-cap:not(.on) > * { visibility: hidden; }
    .tvs-under > .tvs-cap .tvs-said { font-size: 14px; -webkit-line-clamp: 4; }
    .tvs-under > .tvs-cap .tvs-who { font-size: 11px; }
}
@media (max-width: 560px) { .tvs-deck.news, .tvs-same { display: none; } }

/* game time on phones: the watch panel's diamond leads, and the deck shows only the rundown, the
   tickers and Captions (the 16:9 screen is too small for the diamond and its scorebug) */
.tvs.strip :is(.tvs-tube, .tvs-under) { display: none; }
.tvs.strip .tvs-ctl :is([data-tvk="snd"], [data-tvk="view"]) { display: none; }

@media (prefers-reduced-motion: reduce) { .tvs-open img, .tvs-wm, .tvs-scene[data-cam="full"] .tvs-full { animation: none; } }

/* ---- commercial breaks (TV5): WBRB card -> ads -> bumper. Ad frames are 1600 x 900 (16:9) ---- */
.tvs-ad { position: absolute; inset: 0; display: none; overflow: hidden; background: #000; }
.tvs-scene[data-scene="ad"] .tvs-ad { display: block; }
.tvs-scene[data-scene="bump"] .tvs-open { display: flex; flex-direction: column; gap: 0.6em; }
.tvs-ret { font-size: 2.4cqw; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tv-gold); animation: tvs-pop 0.5s ease-out both; }
.tvs-adimgs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.45s ease; user-select: none; }
.tvs-adimgs img.on { opacity: 1; }
.tvs-adcap { position: absolute; left: 7%; right: 7%; bottom: 5%; display: flex; flex-direction: column; align-items: center; gap: 0.3em; text-align: center; pointer-events: none; }
.tvs-advo { padding: 0.25em 0.7em; font-size: max(11px, 2.7cqw); font-weight: 800; font-stretch: condensed; line-height: 1.15; color: #fff;
    background: #000000b3; border-radius: 4px; text-shadow: 0 1px 0 #000; animation: tvs-pop 0.4s ease-out both; }
.tvs-adfine { padding: 0.15em 0.5em; font-size: max(9px, 1.3cqw); color: #ffffffe6; background: #000000a6; border-radius: 3px; }
.tvs-ad.end .tvs-adcap { bottom: 2%; gap: 0.2em; }
.tvs-ad.end .tvs-advo { font-size: max(10px, 2.2cqw); }
.tvs-adfine:empty { display: none; }
.tvs-adgo { position: absolute; right: 3%; top: 5%; padding: 0.35em 0.8em; font-size: max(11px, 2.1cqw); font-weight: 800; text-decoration: none;
    color: var(--tv-deep); background: var(--tv-gold); border: 2px solid #fff; border-radius: 6px; box-shadow: 0 2px 8px #0008; }
.tvs-adgo:hover, .tvs-adgo:focus-visible { background: #fff; }
.tvs-adno { position: absolute; left: 2.5%; top: 4%; padding: 0.15em 0.5em; font-size: max(9px, 1.3cqw); letter-spacing: 0.08em; text-transform: uppercase;
    color: #fff; background: #0009; border-radius: 3px; }
.tvs-screen:has(.tvs-scene[data-scene="ad"]) :is(.tvs-bug, .tvs-clock) { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .tvs-adimgs img { transition: none; } }

/* ---- game time + special programming (TV6) ---- */
/* the booth over the diamond (moved into the watch panel's .yb-stage by pages.js) */
.tvs-gcap { position: absolute; left: 3%; right: 3%; bottom: 3%; z-index: 2; display: none; padding: 0.45em 0.75em 0.5em; pointer-events: none;
    border-radius: 0 4px 4px 4px; background: #0c1326e0; border-top: 3px solid #f29b4c; color: #f4ecd8; font-family: var(--fd, "Arial Narrow", sans-serif);
    font-size: clamp(12px, 1.9vw, 17px); line-height: 1.25; text-align: left; }
.tvs-gcap.on { display: block; }
.tvs-gcap.nocc { display: none !important; }
.tvs-gcap .tvs-who { position: absolute; left: 0; bottom: 100%; padding: 0.1em 0.6em 0.05em; border-radius: 3px 3px 0 0; font-size: 0.75em; letter-spacing: 0.08em;
    color: #0c1326; background: #f29b4c; }
.tvs-gcap .tvs-who.pixel { background: #dfe6f5; }
.tvs-gcap .tvs-who:empty { display: none; }
.tvs-gcap:has(.tvs-who.pixel) { border-top-color: #dfe6f5; }
.tvs-gcap[data-mood="excited"], .tvs-gcap[data-mood="fist"] { border-top-color: #c4372d; }
.tvs-gsaid { display: block; overflow-wrap: anywhere; }
.yb-side .tvs-gcap { position: relative; left: auto; right: auto; bottom: auto; flex: none; margin: 1.9em 10px 10px; font-size: 14px; }
@media (max-width: 640px) { .yb-side .tvs-gcap { order: -1; font-size: 14px; padding: 0.5em 0.65em; } }
.yb-row.won, .tvs-csrow.won { box-shadow: inset 4px 0 0 var(--tv-gold, #f2c14e); background: #f2c14e26; }
.yb-row em small, .tvs-csrow em small { display: block; font-size: 11px; font-weight: 700; }

/* event ribbon: in the network bug */
.tvs-ev:empty { display: none; }
.tvs-ev { padding: 0.05em 0.45em; border-radius: 2px; font-weight: 800; letter-spacing: 0.06em; white-space: nowrap;
    background: var(--tv-ink); color: var(--tv-navy); }
.tvs-bug .tvs-ev { margin-right: 0.2em; box-shadow: 0 1px 3px #0008; }
.tvs[data-ev="series"] .tvs-ev, .tvs[data-ev="champ"] .tvs-ev { background: linear-gradient(180deg, #ffe08a, var(--tv-gold) 60%, #c99a1e); }
.tvs[data-ev="decider"] .tvs-ev { background: var(--tv-red); color: #fff; animation: tvs-pulse 1.6s ease-in-out infinite; }
.tvs[data-ev="semi"] .tvs-ev { background: #dfe6f5; }
.tvs[data-ev="opening"] .tvs-ev { background: #7fd18b; color: #0b2e14; }
.tvs[data-ev="off"] .tvs-ev { background: #ffffff26; color: var(--tv-dim); }
@keyframes tvs-pulse { 50% { filter: brightness(1.35); } }
/* playoff dressing: gold trim on the rundown */
.tvs:is([data-ev="series"], [data-ev="decider"], [data-ev="champ"]) .tvs-rail header { border-bottom-color: #ffe08a; background: linear-gradient(90deg, #3a2a08, #1f3049 70%); }

/* special shows without Codex wordmarks: a ribboned text wordmark */
.tvs-wm { padding: 0.15em 0.5em; border-top: 0.06em solid var(--tv-gold); border-bottom: 0.06em solid var(--tv-gold);
    background: linear-gradient(90deg, transparent, #1f3049d9 15%, #1f3049d9 85%, transparent); }
.tvs[data-ev="series"] .tvs-wm, .tvs[data-ev="champ"] .tvs-wm, .tvs[data-ev="decider"] .tvs-wm { color: #ffe08a; text-shadow: 0 0.05em 0 #3a2a08, 0 0 0.35em #f2c14e; }
.tvs[data-ev="opening"] .tvs-wm { border-color: #7fd18b; }

/* the Classic's scorebug (right of the diamond) */
.tvs-cscore { display: flex; flex-direction: column; gap: 0.15em; margin-top: 0.3em; }
.tvs-csrow { display: flex; align-items: center; gap: 0.4em; padding: 0.15em 0.4em; border-radius: 3px; background: #ffffff12; font-size: 1.25em; }
.tvs-csrow.bat { background: #ffffff26; box-shadow: inset 0.18em 0 0 var(--tv-gold); }
.tvs-csrow .tvs-logo { width: 1.3em; height: 1.3em; }
.tvs-csrow em { margin-left: auto; font-style: normal; font-weight: 800; }
.tvs-cinn { font-weight: 800; letter-spacing: 0.06em; color: var(--tv-gold); }
.tvs-couts { color: var(--tv-dim); font-weight: 700; }
.tvs-couts i { display: inline-block; width: 0.6em; height: 0.6em; margin-right: 0.15em; border-radius: 50%; border: 1px solid var(--tv-dim); vertical-align: middle; }
.tvs-couts i.on { background: var(--tv-red); border-color: var(--tv-red); }
@media (max-width: 640px) { .tvs-csrow { font-size: 1.05em; } }
@media (prefers-reduced-motion: reduce) { .tvs[data-ev="decider"] .tvs-ev { animation: none; } }
/* phones: no ribbon on the small bug; the clip panel drops below the bug */
@media (max-width: 640px) {
    .tvs-bug .tvs-ev { display: none; }
    .tvs-scene[data-cam="clip"] .tvs-cinfo { top: 27%; gap: 0.15em; }
}

/* ---- TV7: the rest of the Codex pack ---- */
/* desk nameplates: the same 768 canvas as the rig, plate at (230, 698, 308, 45); name in DOM */
.tvs-plate { position: absolute; left: 3.6458%; top: 25.926%; width: 31.25%; height: 55.556%; pointer-events: none; }
.tvs-plate.pixel { left: 65.104%; }
.tvs-plate img { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; }
.tvs-plate b { position: absolute; left: 29.95%; top: 90.89%; width: 40.1%; height: 5.86%; display: flex; align-items: center; justify-content: center;
    font-size: 1.1cqw; font-weight: 800; letter-spacing: 0.14em; color: #3a2414; }
.tvs-scene[data-cam="single"] .tvs-plate { display: none; left: 6.25%; top: 14.815%; width: 37.5%; height: 66.667%; }
.tvs-scene[data-cam="single"][data-host="biscuit"] .tvs-plate.biscuit,
.tvs-scene[data-cam="single"][data-host="pixel"] .tvs-plate.pixel { display: block; }
.tvs-scene[data-cam="single"] .tvs-plate b { font-size: 1.3cqw; }
/* the rugside field camera (first-pitch countdown): one host as the reporter, no desk */
.tvs-bg.field, .tvs-fcd { display: none; }
.tvs-scene[data-cam="field"] :is(.tvs-bg.wide, .tvs-bg.single, .tvs-desk, .tvs-mon, .tvs-plate) { display: none; }
.tvs-scene[data-cam="field"] .tvs-bg.field { display: block; }
/* no desk out here, so a waist-up close-up: the bust (960 px of 1080) sits low enough that the
   screen edge crops it at rig y 630, above the paws and the hard cut at y 734 that a desk would hide */
.tvs-scene[data-cam="field"] .tvs-rig { display: none; left: 2.604%; top: 27.083%; width: 50%; height: 88.889%; }
.tvs-scene[data-cam="field"][data-host="biscuit"] .tvs-rig.biscuit,
.tvs-scene[data-cam="field"][data-host="pixel"] .tvs-rig.pixel { display: block; }
.tvs-scene[data-cam="field"] .tvs-fcd { display: flex; }
.tvs-fcd { position: absolute; right: 4%; top: 24%; flex-direction: column; align-items: flex-end; gap: 0.25em; font-size: max(9px, 2.1cqw); line-height: 1.1;
    animation: tvs-in 0.35s ease-out both; }
.tvs-fcd b { padding: 0.15em 0.55em; border-radius: 2px; background: var(--tv-red); color: #fff; font-size: 0.8em; letter-spacing: 0.1em; text-transform: uppercase; }
.tvs-fcd span { display: flex; align-items: baseline; gap: 0.4em; padding: 0.25em 0.65em; border-radius: 3px; background: #0c1326e6; color: var(--tv-ink);
    border-left: 0.25em solid var(--tv-gold); }
.tvs-fcd i { font-style: normal; font-weight: 800; font-size: 1.7em; color: var(--tv-gold); font-variant-numeric: tabular-nums; }
/* stingers: Top 5 Plays / Highlights / Breaking slam on at a segment's start (tvset.js drives it) */
.tvs-sting { position: absolute; inset: 0; z-index: 4; display: none; align-items: center; justify-content: center; pointer-events: none;
    background: radial-gradient(ellipse at 50% 50%, #0c1326cc 20%, #0c132655 60%, transparent 80%); }
.tvs-sting img { width: 68%; height: auto; user-select: none; }
/* Please Stand By: when the set fails to draw */
.tvs-tech { position: absolute; inset: 0; z-index: 6; display: none; background: #0c1326; }
.tvs-tech img { width: 100%; height: 100%; }
.tvs.tech .tvs-tech { display: block; }
@media (prefers-reduced-motion: reduce) { .tvs-fcd { animation: none; } }

/* ---- game time on the console (wide screens). The set stays on at first pitch: pages.js docks
   the watch panel's diamond + scorebug (.yb-main) into .tvs-feed, the controls and channels
   (#watch.docked-tv) under the set, the linescore + lineups into the second screen (.tv2).
   The feed copies the highlight layout: diamond on the left, gold seam, the graphics column. ---- */
.tvlive { --tvw: 100%; }
.tvs-feed { display: none; }
.tvs.game :is(.tvs-stage, .tvs-under, .tvs-tag) { display: none; }
.tvs.game .tvs-feed { display: block; position: absolute; inset: 0; overflow: hidden; }
/* the network bug moves to the diamond's empty top-left corner (the column's top is the score);
   the remote under the deck has its own Sound switch */
.tvs.game .tvs-bug { right: auto; left: 1.4%; top: 2.2%; }
.tvs.game .tvs-gclock { display: block; left: 1.4%; top: calc(2.2% + clamp(26px, 6.5cqw, 56px) + 4px); }
.tvs.game .tvs-ctl [data-tvk="snd"] { display: none; }

.tvs-feed .yb-main { display: flex; height: 100%; border: 0; border-radius: 0; background: var(--tv-deep); }
.tvs-feed .yb-stage { flex: none; height: 100%; aspect-ratio: 524 / 510; border-right: max(2px, 0.35cqw) solid var(--tv-gold); }
.tvs-feed .yb-court { height: 100%; }
.tvs-feed .yb-side { flex: 1 1 0; display: flex; flex-direction: column; min-width: 0; color: var(--tv-ink); border: 0;
    font-size: max(10px, 1.3cqw); background: linear-gradient(180deg, #2a4063, #1f3049 55%, #101a31); }
/* the score bug: two club bars, the inning, the situation */
.tvs-feed .yb-bug { padding: 1.4cqw 1.5cqw 1.2cqw; border-bottom: 1px solid #ffffff26; }
.tvs-feed .yb-bugtop { font-size: 1em; margin-bottom: 0.9cqw; gap: 0.6em; }
.tvs-feed .yb-inn { font-size: max(14px, 2.2cqw); }
.tvs-feed .yb-live, .tvs-feed .yb-tag { font-size: 0.95em; letter-spacing: 0.06em; font-weight: 800; border-radius: 2px; }
.tvs-feed .yb-teams { gap: 0.45cqw; }
.tvs-feed .yb-row { grid-template-columns: 3.1em 1fr auto; gap: 0.8cqw; padding: 0.45cqw 1cqw; border-left-width: max(5px, 0.8cqw); background: #0c13268c; }
.tvs-feed .yb-row.bat { background: #f4ecd81f; }
.tvs-feed .yb-row.won { background: #f2c14e26; box-shadow: inset 4px 0 0 var(--tv-gold); }
.tvs-feed .yb-row b { font-size: max(16px, 2.6cqw); }
.tvs-feed .yb-row em { font-size: max(20px, 3.4cqw); color: #fff; }
.tvs-feed .yb-row .yb-muted { font-size: 0.95em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvs-feed .yb-sit { gap: 1.6cqw; margin-top: 1cqw; }
.tvs-feed .yb-bases { width: max(40px, 5.4cqw); height: auto; }
.tvs-feed .yb-cnt { font-size: 1em; color: var(--tv-dim); }
.tvs-feed .yb-cnt i { width: max(9px, 1.05cqw); height: max(9px, 1.05cqw); }
.tvs-feed .yb-muted { color: var(--tv-dim); }
/* at-bat: batter vs pitcher and the pitch box */
.tvs-feed .yb-duel { font-size: 1em; padding: 1cqw 1.5cqw; min-height: 0; border-bottom: 1px solid #ffffff26; background: #0c132659; }
.tvs-feed .yb-role { background: var(--tv-gold); color: #1f3049; font-weight: 800; }
.tvs-feed .yb-line { color: var(--tv-ink); }
.tvs-feed .yb-zone { width: max(44px, 5.8cqw); height: auto; }
/* last plays, newest on top; the booth caption sits at the foot when someone is talking */
.tvs-feed .yb-ticker { flex: 1 1 0; min-height: 0; padding: 0.8cqw 1.5cqw; font-size: max(10px, 1.2cqw); }
.tvs-feed .yb-now { background: #0c13268c; }
.tvs-feed .yb-plays .run { color: var(--tv-gold); }
.tvs-feed .yb-side .tvs-gcap { position: relative; left: auto; right: auto; bottom: auto; flex: none; margin: 1.9em 1cqw 1cqw;
    font-size: max(11px, 1.45cqw); border-radius: 0 3px 3px 3px; background: #0c1326; box-shadow: 0 0 0 1px #ffffff1a; }

/* the remote: scrubber, transport, channels (the other games of the slot) */
#watch.docked { margin: 0 0 12px; }
#watch.docked-tv { display: flex; flex-direction: column; gap: 6px; max-width: var(--tvw); margin: 0 auto 12px; padding: 8px 10px 10px;
    background: var(--mast); color: var(--mast-ink); border: 1px solid #000; border-radius: 8px; box-sizing: border-box; }
#watch.docked-tv .yb-scrub { order: 1; margin: 0; }
#watch.docked-tv .yb-ctl { order: 2; margin: 0; }
#watch.docked-tv .yb-ctl label { color: var(--mast-ink); }
#watch.docked-tv .yb-board { order: 3; margin: 2px -10px -10px; border-top: 1px solid #000; border-bottom: 0; }
#watch.docked-tv .yb-board::before { content: "Channels"; flex: none; align-self: center; padding: 0 10px; color: var(--gold); font: 800 13px/1 var(--fd); font-stretch: 80%; text-transform: uppercase; letter-spacing: .4px; }
#watch.docked-tv .yb-board:has(.yb-mini:only-of-type) { display: none; }

/* the second screen: linescore always in view, the rest behind tabs */
.tv2 { display: flex; flex-direction: column; max-width: var(--tvw); margin: 0 auto 14px; overflow: hidden; box-sizing: border-box;
    background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.tv2-box, .tv2-box > .yb-stats:not([hidden]) { display: contents; }
.tv2 .yb-ls { order: 1; padding: 8px 10px 4px; background: var(--mast); color: var(--mast-ink); }
.tv2-tabs { order: 2; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px; padding: 6px 10px 0; background: var(--mast); border-bottom: 3px solid var(--hi); }
.tv2-tabs button { padding: 6px 12px 5px; border: 0; border-radius: 5px 5px 0 0; cursor: pointer; background: transparent; color: var(--mast-muted);
    font: condensed 800 15px/1 var(--fd); letter-spacing: 0.02em; }
.tv2-tabs button:hover { color: #fff; background: #ffffff14; }
.tv2-tabs button[aria-selected="true"] { background: var(--hi); color: #1f3049; }
.tv2-tabs button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.tv2-tog { display: none; margin-left: auto; align-self: center; padding-bottom: 4px; }
.tv2-tog .feedtog { float: none; margin: 0; }
.tv2[data-tab="plays"] .tv2-tog { display: block; }
.tv2 .yb-lus { order: 3; display: none; padding: 10px; background: var(--mast); color: var(--mast-ink); }
.tv2[data-tab="lineups"] .yb-lus { display: grid; }
.tv2-pane { order: 3; display: none; padding: 10px 14px 4px; min-width: 0; }
.tv2-pane .pbp { max-height: min(460px, 55vh); }
.tv2-pane .note { margin: 4px 0 8px; }
.tv2[data-tab="plays"] [data-pane="plays"], .tv2[data-tab="box"] [data-pane="box"], .tv2[data-tab="wp"] [data-pane="wp"],
.tv2[data-tab="scoring"] [data-pane="scoring"] { display: block; }
@media (max-width: 640px) {
    .tv2-tabs { padding: 6px 4px 0; }
    .tv2-tabs button { padding: 6px 8px 5px; font-size: 13px; }
    .tv2-pane { padding: 8px 10px 4px; }
}
.tv2-tog .feedtog button { color: var(--mast-ink); border-color: #ffffff40; background: transparent; }
.tv2-tog .feedtog button.on { background: var(--hi); border-color: var(--hi); color: #1f3049; }
/* changing channels (or the cut from the studio at first pitch): a quick CRT roll-in.
   The set is re-attached on every Live TV render, which is when the channel changes. */
.tvs.game .tvs-feed { animation: tvs-chan 0.38s ease-out both; }
@keyframes tvs-chan {
    0% { transform: scaleY(0.02); filter: brightness(3) saturate(0); }
    45% { transform: scaleY(1); filter: brightness(1.6) saturate(0.4); }
    100% { transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) { .tvs.game .tvs-feed { animation: none; } }

/* Readable replay coverage and graphics, with an optional frame-free viewing mode. */
.tvs-detail { display: none; }
.tvs-cduel { display: flex; flex-direction: column; gap: 0.3em; margin-top: 0.5em; font-size: 0.85em; }
.tvs-cinfo .yb-sit { flex-wrap: wrap; gap: 0.45em; }
.tvs-cinfo .yb-cnt { font-size: max(11px, 0.65em); }
.tvs-cinfo .yb-cnt i { width: 8px; height: 8px; }
.tvs-static-ticker { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.tvs-static-ticker summary { cursor: pointer; font-weight: 700; }
.tvs-static-scores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tvs-static-scores .tk { border: 1px solid var(--line); padding: 6px 8px; }
.tvs-static-scores .tk :is(b,i,small) { color: inherit; }
.tvs-static-news { padding-left: 20px; line-height: 1.6; }
/* Full screen: the deck fills the display (Fullscreen API), or the window where the API is missing
   (.expanded). The screen keeps 16:9 inside whatever room the rundown and the rows leave. */
html.tvs-lock { overflow: hidden; }
.tvs-set:fullscreen, .tvs.expanded .tvs-set { position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100%; border-radius: 0; box-shadow: none;
    grid-template-rows: minmax(0, 1fr) auto auto auto; }
.tvs-set:fullscreen .tvs-tube, .tvs.expanded .tvs-tube { display: grid; place-items: center; min-height: 0; container-type: size; }
.tvs-set:fullscreen .tvs-screen, .tvs.expanded .tvs-screen { width: min(100cqw, 177.78cqh); }
@media (max-width: 900px) { .tvs-set:fullscreen .tvs-rail, .tvs.expanded .tvs-rail { display: none; } }
/* A graphic that cannot fit at readable type sizes gets as much height as it needs. */
.tvs.graphic-room .tvs-screen { aspect-ratio: auto; }
.tvs.graphic-room .tvs-stage { position: relative; inset: auto; container-type: inline-size; }
.tvs.graphic-room .tvs-scene { position: relative; inset: auto; transform: none; width: 100%; height: auto; }
.tvs.graphic-room .tvs-full { position: relative; min-height: 240px; }
/* The plain scores + headlines list stands in for the moving ticker only when motion is reduced. */
.tvs-static-ticker { display: none; }
@media (prefers-reduced-motion: reduce) { .tvs-line { display: none; } .tvs-static-ticker { display: block; } }
/* Phones: replays keep the 16:9 screen (the diamond centred in it); the clip panel's words move
   under the screen at reading size. */
@media (max-width: 640px) {
    .tvs.has-clip .tvs-dia { left: 50%; transform: translateX(-50%); border-left: 0.4cqw solid var(--tv-gold); }
    .tvs.has-clip .tvs-cinfo { display: none; }
    .tvs.has-clip .tvs-detail { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--tv-deep); color: var(--tv-ink);
        border-top: 3px solid var(--tv-gold); font-size: 14px; line-height: 1.3; }
    .tvs-detail .tvs-cgame { display: block; font-size: 14px; }
    .tvs-detail .tvs-cname { font-size: 20px; }
    .tvs-detail :is(.tvs-ckick,.tvs-ctag) { font-size: 12px; }
    .tvs-detail .tvs-rank { font-size: 24px; }
    .tvs-detail .tvs-cscore { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .tvs-detail .yb-sit { flex-wrap: wrap; }
    .tvs-detail .tvs-cduel { font-size: 14px; }
}

/* Phones: the beat's graphic in a panel under the screen (and its caption), at reading size, every
   row at once. It holds the segment card between graphics, so the page does not jump. */
.tvs-gpanel { display: none; }
@media (max-width: 640px) {
    .tvs.has-panel .tvs-gpanel { display: flex; align-items: center; justify-content: center; padding: 12px 10px; min-height: 150px; box-sizing: border-box;
        background: linear-gradient(180deg, #1f3049, var(--tv-deep) 70%); color: var(--tv-ink); border-top: 1px solid #ffffff1f;
        font-family: var(--fd, "Arial Narrow", sans-serif); line-height: 1.2; }
    .tvs-gpanel.in > * { animation: tvs-gin 0.25s ease-out both; }
    .tvs-gpanel .tvg.full { font-size: 15px; gap: 6px; height: auto; width: 100%; }
    .tvs-gpanel .tvg.full:is(.tvg-player, .tvg-team1, .tvg-card) { width: 100%; gap: 12px; padding: 0 0 0 10px; border-left-width: 4px; }
    .tvs-gpanel .tvg-face { width: 64px; height: 64px; }
    .tvs-gpanel .tvg.full:is(.tvg-player, .tvg-card) .tvg-face { width: 72px; height: 72px; }
    .tvs-gpanel .tvg.full .tvg-logo.big { width: 64px; height: 64px; }
    .tvs-gpanel .tvg-kick { font-size: 12px; }
    .tvs-gpanel .tvg-who > b { font-size: 22px; }
    .tvs-gpanel :is(.tvg-team, .tvg-line, .tvg-note, small) { font-size: 13px; }
    /* cards: portrait beside the name, then the stat tiles across the whole panel */
    .tvs-gpanel .tvg.full:is(.tvg-player, .tvg-card, .tvg-team1) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 3px; align-items: center; text-align: left; }
    .tvs-gpanel .tvg.full:is(.tvg-player, .tvg-card, .tvg-team1) > .tvg-who { display: contents; }
    .tvs-gpanel .tvg.full:is(.tvg-player, .tvg-card, .tvg-team1) > :is(.tvg-face, .tvg-logo) { grid-row: 1 / span 3; grid-column: 1; }
    .tvs-gpanel .tvg.full:is(.tvg-player, .tvg-card, .tvg-team1) > .tvg-who > * { grid-column: 2; }
    .tvs-gpanel .tvg.full:is(.tvg-player, .tvg-card, .tvg-team1) > .tvg-who > :is(.tvg-grid, .tvg-note, .tvg-line) { grid-column: 1 / -1; }
    .tvs-gpanel .tvg.full .tvg-who > .tvg-grid { margin-top: 8px; }
    .tvs-gpanel .tvg-grid { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); width: 100%; }
    .tvs-gpanel .tvg-grid.lab { grid-template-columns: max-content repeat(var(--n), minmax(0, 1fr)); }
    .tvs-gpanel .tvg-tile { padding: 4px 2px 3px; }
    .tvs-gpanel .tvg-tile b { font-size: 19px; }
    .tvs-gpanel .tvg-tile i, .tvs-gpanel .tvg-grid em { font-size: 10px; white-space: normal; overflow-wrap: normal; hyphens: none; }
    .tvs-gpanel table { font-size: 14px; }
    .tvs-gpanel :is(th, td) { padding: 4px 4px; }
    .tvs-gpanel th { font-size: 11px; }
    .tvs-gpanel .tvg-lead table { width: 100%; }
    .tvs-gpanel .tvg-lead .tvg-face, .tvs-gpanel .tvg-board .tvg-face { width: 28px; height: 28px; }
    .tvs-gpanel .tvg-ls table { font-size: clamp(11px, 3.6vw, 14px); }
    .tvs-gpanel .tvg-ls :is(th, td) { padding-inline: 1px; }
    .tvs-gpanel .tvg-ls th.x { width: 1.9em; }
    .tvs-gpanel .tvg-ls th.t { width: 4.4em; }
    .tvs-gpanel .tvg-lineups .tvg-cols { flex-direction: column; gap: 10px; }
    .tvs-gpanel .tvg-order { width: 100%; }
    .tvs-gpanel .tvg-cmp { width: 100%; }
    .tvs-gpanel .tvg-cmp > .v { font-size: 17px; }
    .tvs-gpanel .tvg-cmp > i { font-size: 10px; padding: 0 6px; }
    .tvs-gpanel .tvg-chead .tvg-logo.big { width: 44px; height: 44px; }
    .tvs-gpanel .tvg-chead .tvg-face { width: 52px; height: 52px; }
    .tvs-gpanel .tvg-chead b { font-size: 17px; }
    .tvs-gpanel .tvg-odds { width: 100%; height: 22px; font-size: 12px; }
    .tvs-gpanel .tvg-final .tvg-side b { font-size: 40px; }
    .tvs-gpanel .tvg-versus .tvg-col > b { font-size: 17px; }
    .tvs-gpanel .tvg-rec { font-size: 26px; }
    .tvs-gpanel .tvg-cd { font-size: 34px; }
    .tvs-gpanel .tvg-wm { width: auto; max-width: 80%; max-height: 80px; }
    .tvs-gpanel .tvs-pcard { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14px; text-align: center; }
    .tvs-gpanel .tvs-pcard > :is(.tvs-kick, small, em) { display: block; }
    .tvs-gpanel .tvs-pcard > .tvs-kick { font-size: 12px; color: var(--tv-gold); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
    .tvs-gpanel .tvs-pcard > b { font-size: 22px; }
    .tvs-gpanel .tvs-pcard em { font-style: normal; font-size: 12px; color: var(--tv-dim); }
    .tvs-gpanel .tvs-pcard small { font-size: 12px; color: var(--tv-dim); }
    .tvs-gpanel .tvs-match { font-size: 18px; }
    .tvs-gpanel .tvs-match .tvs-logo { display: inline-block; width: 28px; height: 28px; }
}
@keyframes tvs-gin { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tvs-gpanel.in > * { animation: none; } }
