/* vrc.dj TV - the channel overview and a channel page's brand band
   (/tv/channels, /tv; the cards are views/tv_ident.php's render_tv_card(),
   the overview's keys _js/tv-menu.js).

   Every card is the same parts: .tvs-pic (the still of what is on),
   .tvs-band (the channel's brand), .tvs-plate (what is playing),
   .tvs-count, .tvs-logo. A system channel's card is then skinned by its
   design (.tvs--<design>): its shape, what happens to the still, details
   that may hang past the card, its own word for the people watching.
   The lineup: 1 rig, 2 concrete (SUBLVL), 3 brush (THE RAW CHANNEL), 6 graffiti
   (UNDERPASS), 7 week (7 DAYS), 9 clouds (window seat), 10 destination
   (NIGHT BUS). Idle
   motion is slow and small; each card's signature move plays only while it
   is pointed at or has focus. Reduced motion: nothing moves. The cards draw
   their own colours in both themes; the overview's page and plain cards
   follow the theme. */

/* ── a channel page's head: the band, on air, hosted by ────────── */
.tvp-band { position: relative; flex: 0 1 380px; min-width: 200px; height: 54px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--border-bright); }
.tvp-host { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tvp-by { font-size: 12px; color: color-mix(in srgb, var(--text) 72%, transparent); white-space: nowrap; }
.tvp-bot { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--white); }
.tvp-bot em { font-style: normal; font-size: .68em; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 1px 4px; border-radius: 3px; background: #5865f2; color: #fff; }
.tvp-board-note { display: none; margin: 8px 0 0; font-size: .86rem; font-weight: 700; color: var(--tv-tone-ink); }
.tvp.is-off .tvp-board-note { display: block; }
.tvp.is-off .tvp-watch { opacity: .45; pointer-events: none; }
@media (max-width: 767px) {
  .tvp-head:has(.tvp-band) { flex-wrap: wrap; row-gap: 8px; }
  .tvp-band { flex: 1 1 100%; height: 50px; border-radius: 0; margin: 0 -12px; box-shadow: none; }
}

/* ── the overview (/tv/channels) ───────────────────────────────── */
.tvm { display: flex; flex-direction: column; align-items: center; padding: 18px 24px 24px; }
.tvm-head { width: min(1120px, 100%); display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.tvm-title { margin: 0; font-size: 1.6rem; font-weight: 900; letter-spacing: -.02em; color: var(--white); }
.tvm-hint { font-size: .85rem; color: color-mix(in srgb, var(--text) 60%, transparent); }
.tvm-grid { width: min(1120px, 100%); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; }
/* the cards come in one after another, as the Wii's channels do (--i, render_tv_menu());
   only while the grid is .is-entering, which tv-menu.js takes away once they are in -
   a card's own hover animation (the kick) would otherwise restart it */
.tvm-grid.is-entering > * { animation: tvm-in .46s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--i, 0) * 26ms); }
@keyframes tvm-in { from { opacity: 0; scale: .94; } }
/* the Wii's bar: TV guide on the left, the clock, Back on the right; its top
   edge rises round each button (pages/tv_channels.php draws it at 13% and 87%) */
.tvm-bar { position: relative; width: min(1120px, 100%); height: 120px; margin-top: 30px; clip-path: inset(-40px 0 0 0 round 0 0 16px 16px);
  animation: tvm-bar-in .5s .15s cubic-bezier(.2,.8,.2,1) backwards; }
.tvm-bar-bg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 -3px 10px rgba(0,0,0,.18)); }
.tvm-bar-f { fill: color-mix(in srgb, var(--bg-elevated) 88%, #fff 12%); }
.tvm-bar-e { fill: none; stroke: color-mix(in srgb, var(--text) 16%, transparent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.tvm-btn { --tvm-ring: color-mix(in srgb, var(--text) 18%, transparent); position: absolute; bottom: 24px; width: 74px; height: 74px; margin-left: -37px; border-radius: 50%;
  display: grid; place-items: center; text-decoration: none; color: #5b6573; background: radial-gradient(circle at 50% 28%, #fff, #e9edf1 58%, #cdd4db);
  box-shadow: 0 0 0 3px var(--tvm-ring), 0 6px 14px rgba(0,0,0,.28), inset 0 -2px 4px rgba(0,0,0,.08); transition: box-shadow .18s, color .18s, translate .18s var(--ease); }
.tvm-btn--l { left: 13%; } .tvm-btn--r { left: 87%; }
.tvm-btn .bi { font-size: 26px; }
.tvm-btn span { position: absolute; top: calc(100% + 6px); font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 62%, transparent); white-space: nowrap; }
.tvm-btn:hover, .tvm-btn:focus-visible { --tvm-ring: #34bfff; color: #1592d6; translate: 0 -2px; outline: none; }
.tvm-btn:active { translate: 0 0; }
.tvm-bar .tvm-clock { position: absolute; left: 50%; bottom: 30px; translate: -50% 0; }
@keyframes tvm-bar-in { from { opacity: 0; translate: 0 24px; } }
:root[data-motion="reduce"] :is(.tvm-grid.is-entering > *, .tvm-bar) { animation: none; }
:root[data-motion="reduce"] .tvm-btn { transition: none; }
.tvm-clock { position: relative; display: flex; flex-direction: column; align-items: center; padding: 8px 18px 6px; border-radius: 5px; --wr-c: #e2e8f0;
  background: linear-gradient(180deg, var(--rig-case-1), var(--rig-case-2) 60%, var(--rig-case-3)); border: 1.5px solid var(--rig-case-edge); box-shadow: 0 10px 20px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.09); }
.tvm-clock-win { display: flex; align-items: center; padding: 5px 11px; border-radius: 3px; background: var(--rig-window); box-shadow: inset 0 2px 6px #000; }
.tvm-clock .wr-sg { font-size: 22px; gap: 5px; align-items: center; }
.tvm-clock .wr-dg { filter: none; }
.tvm-clock-date { margin-top: 3px; font-size: 8px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: rgba(255,255,255,.55); }

/* ── a card ────────────────────────────────────────────────────── */
.tvs { --a: var(--tv-tone); --b: var(--tv-tone-2); position: relative; display: block; aspect-ratio: 16 / 10; text-decoration: none; color: #fff; outline: none; transition: transform .25s var(--ease), filter .25s; }
.tvs:hover, .tvs:focus-visible { z-index: 3; color: #fff; }
.tvs-shell { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: #0b0d14; }
.tvs-pic { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #000; }
.tvs-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter .45s; }
/* the still grey at rest; marked, only the channel's own colour comes through
   (tv_ident_colour_pass(), --tvs-pass). A design tunes the picture with
   --tvs-look (and --tvs-look-on when marked), never with its own filter. The
   change is a cut, never a transition: a running filter transition is drawn
   by the compositor, which cannot draw the pass, so the still showed in full
   colour until it ended. A design that times the cut delays a 0s transition. */
.tvs--pass .tvs-still { filter: grayscale(1) var(--tvs-look, ); transition: none; }
.tvs--pass:is(:hover, :focus-visible) .tvs-still { filter: var(--tvs-pass) var(--tvs-look-on, var(--tvs-look, )); }
.tvs-pass { position: absolute; width: 0; height: 0; overflow: hidden; }
.tvs-bars { position: absolute; inset: 0; filter: saturate(.7) brightness(.78);
  background:
    linear-gradient(90deg, #1f2a6b 0 14.28%, #111 14.28% 28.57%, #8a2b8a 28.57% 42.85%, #111 42.85% 57.14%, #1d8a8a 57.14% 71.42%, #111 71.42% 85.71%, #bdbdbd 85.71%) 0 100% / 100% 30% no-repeat,
    linear-gradient(90deg, #bdbdbd 0 14.28%, #bdbd2b 14.28% 28.57%, #2bbdbd 28.57% 42.85%, #2bbd2b 42.85% 57.14%, #bd2bbd 57.14% 71.42%, #bd2b2b 71.42% 85.71%, #2b2bbd 85.71%) 0 0 / 100% 70% no-repeat; }
.tvs-band { position: relative; flex: 0 0 25%; overflow: hidden; }
.tvs-gname { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 10px; background: var(--a); color: var(--tv-on, #fff); font-size: 15px; font-weight: 900; }
.tvs-plate { position: relative; flex: 0 0 auto; display: flex; align-items: baseline; gap: 8px; padding: 6px 10px 7px; font-size: 12px; min-width: 0; background: #0b0d14; }
.tvs-now { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.tvs-now--off { display: none; }
.tvs-by { font-weight: 500; opacity: .72; }
.tvs-tag { flex: 0 0 auto; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--a); }
.tvs-logo { position: absolute; left: 8px; top: 8px; z-index: 5; width: 30px; height: 30px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1.5px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.35); }
.tvs-count { position: absolute; right: 8px; top: 8px; z-index: 5; font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 7px; color: #fff; background: rgba(8,11,20,.78); border-radius: 3px; white-space: nowrap; }
.tvs[aria-current] .tvs-shell { box-shadow: 0 0 0 2px color-mix(in srgb, var(--a) 70%, transparent); }
.tvs:is(:hover, :focus-visible) .tvs-shell { outline: 2px solid var(--a); outline-offset: 3px; }
.tvs:is(:hover, :focus-visible) { transform: translateY(-4px); }
.tvs-empty { aspect-ratio: 16 / 10; border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--text) 6%, transparent), color-mix(in srgb, var(--text) 2.5%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 9%, transparent), inset 0 2px 6px rgba(0,0,0,.16); }
/* NIGHT BUS outside the viewer's night */
.tvs.is-off .tvs-still { filter: brightness(.3) saturate(.5) blur(1px); }
.tvs.is-off .tvs-now--off { display: block; }
.tvs.is-off .tvs-now:not(.tvs-now--off), .tvs.is-off .tvs-count { display: none; }

/* the generic card (a user channel): the picture, the host's colour */
.tvs--generic .tvs-band { flex-basis: 22%; }

/* ── 1 · rig: the card is the site's hardware ─────────────────── */
.tvs--rig .tvs-shell { padding: 15px 8px 0; border-radius: 6px; background: linear-gradient(180deg, var(--rig-case-1), var(--rig-case-2) 60%, var(--rig-case-3)); border: 1.5px solid var(--rig-case-edge); box-shadow: 0 10px 22px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.09); }
.tvs--rig .tvs-pic { border-radius: 2px; box-shadow: 0 0 0 3px var(--rig-window); }
.tvs--rig .tvs-band { flex-basis: 22%; margin: 6px 0 0; border-radius: 3px; box-shadow: inset 0 1px 3px #000; }
.tvs--rig .tvs-plate { padding: 5px 2px 6px; color: #e5e9f0; background: none; }
.tvs--rig .wr-scr { width: 6px; height: 6px; }
.tvs--rig .wr-scr--tl { left: 4px; top: 4px; } .tvs--rig .wr-scr--tr { right: 4px; top: 4px; } .tvs--rig .wr-scr--bl { left: 4px; bottom: 4px; } .tvs--rig .wr-scr--br { right: 4px; bottom: 4px; }
.tvs-tally { position: absolute; left: 50%; top: 3px; translate: -50% 0; display: flex; align-items: center; gap: 4px; font-size: 7px; font-weight: 900; letter-spacing: .26em; text-transform: uppercase; color: #ffd5db; }
.tvs-tally i { width: 5px; height: 5px; border-radius: 50%; background: #ff3b55; animation: tvs-blink 2.4s steps(1) infinite; }
.tvs--rig .tvs-count { top: 6px; right: 6px; font-size: 9.5px; letter-spacing: .04em; color: rgba(255,255,255,.75); background: rgba(5,7,12,.82); }
.tvs--rig:is(:hover, :focus-visible) .tvs-tally i { animation: none; }

/* ── 2 · concrete: SUBLVL - hard corners, a lift down to its level ── */
.tvs--concrete .tvs-shell { border-radius: 0; background: #1d1f22; border: 1px solid #3a3d41; }
.tvs--concrete { --tvs-look: contrast(1.25) brightness(.85); --tvs-look-on: contrast(1.1); }
.tvs-strobe { position: absolute; left: 0; right: 0; top: -30%; height: 22%; z-index: 2; background: linear-gradient(180deg, transparent, rgba(255,255,255,.2) 45%, rgba(255,255,255,.28) 50%, transparent); animation: tvs-sweep 3.4s cubic-bezier(.7,0,.3,1) infinite; pointer-events: none; }
.tvs-tape { position: absolute; right: -34px; bottom: 16px; z-index: 3; width: 128px; height: 13px; rotate: -36deg; background: repeating-linear-gradient(45deg, var(--a) 0 8px, #111 8px 16px); box-shadow: 0 2px 4px rgba(0,0,0,.5); }
.tvs--concrete .tvs-band { border-top: 1px solid #000; }
.tvs--concrete .tvs-plate { background: #111214; color: #e3e6e8; font: 700 11px/1.2 Bahnschrift, 'Roboto Condensed', 'Arial Narrow', sans-serif; font-stretch: 85%; letter-spacing: .12em; text-transform: uppercase; }
.tvs--concrete .tvs-by { color: var(--a); opacity: .8; }
.tvs--concrete .tvs-count { border-radius: 0; background: #111; color: var(--a); font: 700 10.5px/1 Bahnschrift, 'Roboto Condensed', sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.tvs--concrete .tvs-logo { border-radius: 0; }
.tvs--concrete:is(:hover, :focus-visible) .tvs-shell { outline-offset: 0; }
.tvs--concrete:is(:hover, :focus-visible) .tvs-strobe { animation-duration: 1.1s; }
/* marked, the band's display rides from 0 down to the level, a floor per
   half second, and the still comes up in colour as it arrives */
.tvs--concrete { --tvs-ride: calc(.5s * var(--tv-n)); }
.tvs--concrete:is(:hover, :focus-visible) .tvi-cn-roll { animation: tvs-floors var(--tvs-ride) steps(var(--tv-n), jump-start) both; }
.tvs--concrete:is(:hover, :focus-visible) .tvi-cn-step { animation: tvs-floor .5s cubic-bezier(.6,0,.3,1) var(--tv-n) both; }
.tvs--concrete:is(:hover, :focus-visible) .tvi-cn-arr svg { animation: tvs-arr .4s linear calc(var(--tv-n) * 1.25); }
.tvs--concrete:is(:hover, :focus-visible) .tvs-still { transition: filter 0s var(--tvs-ride) allow-discrete; }

/* ── 3 · brush: WARPAINT - torn, tilted, red on black, it kicks ── */
.tvs--brush { rotate: -1.4deg; }
.tvs--brush .tvs-shell { border-radius: 0; background: #0b0909; clip-path: var(--torn); }
.tvs--brush { --tvs-look: contrast(1.6) brightness(1.05); --tvs-look-on: contrast(1.3); }
.tvs-duo { position: absolute; inset: 0; z-index: 1; background: var(--a); mix-blend-mode: multiply; transition: opacity .3s; }
.tvs--brush:is(:hover, :focus-visible) .tvs-duo { opacity: 0; }
.tvs--brush .tvs-pic::after { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(120% 90% at 50% 40%, transparent 50%, rgba(0,0,0,.55)); }
.tvs--brush .tvs-plate { background: #0b0909; color: var(--b); padding-bottom: 9px; }
.tvs--brush .tvs-now { font: 400 14px/1.05 Impact, Anton, 'Arial Narrow', sans-serif; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; }
.tvs--brush .tvs-by { color: var(--a); opacity: 1; }
.tvs--brush .tvs-count { top: auto; bottom: 9px; right: 10px; rotate: -3deg; border-radius: 0; background: var(--b); color: #0b0909; font: 400 12.5px/1 Impact, Anton, 'Arial Narrow', sans-serif; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px 3px;
  clip-path: polygon(0 8%, 6% 0, 30% 6%, 55% 0, 80% 7%, 100% 0, 97% 50%, 100% 100%, 70% 93%, 45% 100%, 20% 94%, 0 100%, 3% 50%); }
.tvs--brush .tvs-logo { border-radius: 0; rotate: -4deg; }
.tvs-splat { position: absolute; z-index: 4; pointer-events: none; fill: var(--a); }
.tvs-splat--a { right: -22px; top: -24px; rotate: 20deg; }
.tvs-splat--b { left: -16px; bottom: -14px; rotate: 160deg; fill: var(--b); opacity: .9; }
.tvs--brush:is(:hover, :focus-visible) .tvs-shell { outline: none; }
.tvs--brush:is(:hover, :focus-visible)::before { content: ''; position: absolute; inset: -5px; z-index: -1; background: var(--b); clip-path: var(--torn); }
.tvs--brush:is(:hover, :focus-visible) { transform: none; animation: tvs-kick .4s cubic-bezier(.2,.9,.3,1) infinite; }

/* ── 6 · graffiti: UNDERPASS - a poster on a wall, a tag sprayed over it ── */
.tvs--graffiti .tvs-shell { border-radius: 4px; border: 1px solid #000;
  background: linear-gradient(90deg, rgba(0,0,0,.4) 1px, transparent 1px) 0 0 / 33.4% 100%, linear-gradient(180deg, transparent 62%, rgba(0,0,0,.35)), color-mix(in srgb, var(--b) 5%, #1d1d21); }
.tvs--graffiti .tvs-pic { margin: 8px 9px 2px 8px; rotate: -1.2deg; overflow: visible; background: none; box-shadow: 0 6px 12px rgba(0,0,0,.55);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%); }
.tvs--graffiti { --tvs-look: contrast(1.15); }
.tvs-paste { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.13) 31%, transparent 33%, transparent 62%, rgba(255,255,255,.1) 63%, transparent 65%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.05) 0 1px, transparent 1px 3px); mix-blend-mode: screen; }
.tvs-peel { position: absolute; right: 0; bottom: 0; z-index: 2; width: 20px; height: 20px; background: linear-gradient(315deg, transparent 50%, #e9e2cf 50%, #c9c0aa); box-shadow: -2px -2px 4px rgba(0,0,0,.35); }
.tvs-mark { position: absolute; left: 7%; bottom: 9%; z-index: 3; width: 46%; height: 62%; overflow: visible; pointer-events: none; }
.tvs-mark path { fill: none; stroke: var(--b); stroke-width: 6.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.tvs-mark-ground { stroke-width: 7.5; }
.tvs-mist { position: absolute; left: 8%; top: 32%; z-index: 3; width: 34%; height: 46%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--b) 55%, transparent) 0 1px, transparent 1.5px) 0 0 / 5px 5px; -webkit-mask: radial-gradient(closest-side, #000, transparent); mask: radial-gradient(closest-side, #000, transparent); }
.tvs--graffiti .tvs-band { margin: 0 0 0; }
.tvs--graffiti .tvs-plate { background: #121215; color: #f2f2f2; font: 900 10.5px/1.2 'Arial Black', Impact, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.tvs--graffiti .tvs-by { color: var(--a); opacity: 1; }
.tvs--graffiti .tvs-logo { border-radius: 2px; rotate: 3deg; }
/* the count is a "Hello my name is" sticker slapped on the poster */
.tvs--graffiti .tvs-count { top: 9px; right: 12px; padding: 13px 8px 4px; border-radius: 4px; rotate: 5deg; background: #fff; color: #16161a; box-shadow: 0 2px 4px rgba(0,0,0,.45);
  font: 700 11px/1.1 'Ink Free', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive; overflow: hidden; }
.tvs--graffiti .tvs-count::before { content: 'HELLO' / ''; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: #e2231a; color: #fff; font: 900 7px/10px 'Arial Black', sans-serif; letter-spacing: .14em; text-align: center; }
.tvs--graffiti:is(:hover, :focus-visible) .tvs-shell { outline-color: var(--a); }
.tvs--graffiti:is(:hover, :focus-visible) .tvs-mark path { animation: tvs-spray .35s cubic-bezier(.4,0,.2,1) forwards; }
.tvs--graffiti:is(:hover, :focus-visible) .tvs-mark-arch { animation-duration: .55s; animation-delay: .3s; }
.tvs--graffiti:is(:hover, :focus-visible) .tvs-mark-inner { animation-duration: .45s; animation-delay: .82s; }
.tvs--graffiti:is(:hover, :focus-visible) .tvs-mist { animation: tvs-mist 1s ease-out forwards; }
.tvs--graffiti:is(:hover, :focus-visible) .tvi-drips { animation: tvi-drip-run 1.6s cubic-bezier(.3,0,.2,1) forwards; }

/* ── 7 · week: 7 DAYS - the Flavor of the Week's sash, on a card ── */
.tvs--week .tvs-shell { border-radius: 8px; background: #14111c; border: 1.5px solid color-mix(in srgb, var(--a) 60%, #000); }
.tvs--week .tvs-plate { background: #14111c; color: #f3eee6; }
.tvs--week .tvs-by { color: color-mix(in srgb, var(--a) 70%, #fff); opacity: 1; }
.tvs--week .tvs-count { background: var(--b); color: #181320; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 9.5px; }
.tvs--week .tvs-logo { border-radius: 2px; transform: skewX(-10deg); }
.tvs-sash { --fg: oklch(from var(--a) clamp(0, (.62 - l) * 100, 1) 0 0); position: absolute; left: 10px; bottom: 9px; z-index: 4; display: inline-grid; rotate: -4deg; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.tvs-sash-band { position: absolute; inset: 3px -12px; overflow: hidden; transform: skewX(16deg); }
.tvs-sash-run { --ft-n: 1; position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 16.97px);
  background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(0,0,0,.38) 6px 12px), repeating-linear-gradient(-45deg, var(--a) 0 12px);
  animation: fotw-tape-run 1.6s linear infinite; }
.tvs-sash-plate { position: relative; z-index: 1; padding: 6px 14px; background: var(--a); color: var(--fg); font-size: 12.5px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; line-height: 1; transform: skewX(-16deg); }
.tvs-sash-plate::after { content: ''; position: absolute; inset: 2px; border: 1px solid color-mix(in srgb, var(--fg) 45%, transparent); }
.tvs-sash-plate > span { display: inline-block; transform: skewX(16deg); }
.tvs-sash-tape { position: relative; z-index: 2; justify-self: end; margin: -5px -14px 0 0; padding: 3px 7px; background: linear-gradient(180deg, #fbf8f1, #efe8d8); color: #181320; font-size: 7.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1; white-space: nowrap; transform: rotate(5deg) skewX(-16deg);
  -webkit-mask: linear-gradient(90deg, rgba(0,0,0,.55), #000 5px, #000 calc(100% - 5px), rgba(0,0,0,.55)); mask: linear-gradient(90deg, rgba(0,0,0,.55), #000 5px, #000 calc(100% - 5px), rgba(0,0,0,.55)); }
.tvs-sash-tape > span { display: inline-block; transform: skewX(16deg); }
.tvs--week:is(:hover, :focus-visible) .tvs-sash { animation: tvs-slap .9s cubic-bezier(.3,1.5,.5,1) both; }
.tvs--week:is(:hover, :focus-visible) .tvs-sash-run, .tvs--week:is(:hover, :focus-visible) .tvi-wk-run { animation-duration: .6s; }

/* ── 9 · clouds: window seat - the set seen through a cabin window, the
   same picture blurred into the haze outside, stars in the dark ─────── */
.tvs-spark { position: absolute; width: 10px; height: 10px; background: #fff6d6; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: tvs-twinkle 1.8s ease-in-out infinite; animation-delay: var(--d); }
.tvs-spark--s { width: 7px; height: 7px; }
.tvs--clouds .tvs-shell { border-radius: 20px; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 12px 24px rgba(10,6,40,.45);
  background: linear-gradient(180deg, color-mix(in srgb, var(--a) 40%, #1a1442), #16113a 70%, #100b2c); }
.tvs-haze { position: absolute; inset: -25%; z-index: 0; width: 150%; height: 150%; object-fit: cover; filter: blur(30px) saturate(1.4) brightness(.62); transition: filter .45s; }
.tvs--clouds .tvs-shell::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(22,16,58,.1), rgba(22,16,58,.45) 55%, rgba(16,11,44,.9)); }
.tvs--clouds .tvs-pic { position: absolute; inset: 0; z-index: 2; flex: none; overflow: visible; background: none; }
.tvs-win-view, .tvs-win { position: absolute; left: 6%; top: 8%; width: 58%; height: 56%; }
.tvs-win-view { overflow: hidden; clip-path: url(#tvs-win-clip); }
.tvs--clouds .tvs-still { scale: 1.08; filter: brightness(1.06); animation: tvs-glide 24s ease-in-out infinite alternate; }
.tvs-win { z-index: 3; overflow: visible; pointer-events: none; }
.tvs-win-edge { fill: none; stroke: rgba(255,255,255,.75); stroke-width: 1.5; vector-effect: non-scaling-stroke; transition: stroke .3s; }
.tvs-star { z-index: 3; background: #fff6d6; }
.tvs--clouds .tvs-band { position: absolute; left: 67%; right: 5%; top: 25%; height: 40%; flex: none; z-index: 3; }
.tvs--clouds .tvi--strip { background: none; overflow: visible; }
.tvs--clouds .tvi-win, .tvs--clouds .tvi-ws-star { display: none; }
.tvs--clouds .tvi-w--clouds { left: 0; top: 0; translate: none; white-space: normal; font-size: 29cqw; line-height: 1.02; }
.tvs--clouds .tvs-plate { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 0 12px 9px; background: none; color: #fff; text-transform: lowercase; }
.tvs--clouds .tvs-now { font-weight: 600; }
.tvs--clouds .tvs-by { color: var(--b); opacity: 1; }
.tvs--clouds .tvs-tag { color: var(--b); }
.tvs--clouds .tvs-count { top: 10px; right: 10px; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); text-transform: lowercase; }
.tvs--clouds:is(:hover, :focus-visible) .tvs-still { animation-duration: 6s; }
.tvs--clouds:is(:hover, :focus-visible) .tvs-win-edge { stroke: #fff; }
.tvs--clouds:is(:hover, :focus-visible) .tvs-haze { filter: blur(30px) saturate(1.4) brightness(.8); }

/* ── 10 · destination: NIGHT BUS - the card is the front of a bus ── */
.tvs--destination .tvs-shell { padding: 6px 6px 0; border-radius: 18px 18px 8px 8px; background: linear-gradient(180deg, color-mix(in srgb, var(--b) 80%, #3a4a78), var(--b) 40%, color-mix(in srgb, var(--b) 80%, #000)); border: 2px solid #0a1022; }
.tvs--destination .tvs-band { order: -1; flex-basis: 23%; margin-bottom: 5px; border-radius: 6px 6px 2px 2px; box-shadow: inset 0 0 0 1.5px #1d2438; }
.tvs--destination .tvs-pic { border-radius: 9px 9px 3px 3px; box-shadow: inset 0 0 0 2px #0a1022; }
.tvs-drop { position: absolute; z-index: 2; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 38% 32%, rgba(255,255,255,.7), rgba(255,255,255,.12) 45%, rgba(255,255,255,.04) 70%); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.tvs-lamp { position: absolute; left: -40%; top: var(--y, 14%); z-index: 1; width: 18%; height: 30%; skew: -30deg; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--a) 32%, transparent) 50%, transparent); animation: tvs-pass 2.6s linear infinite; animation-delay: var(--dl); mix-blend-mode: screen; }
.tvs-wiper { position: absolute; left: 10%; bottom: 3px; z-index: 3; width: 48%; height: 2.5px; border-radius: 2px; background: #05070d; transform-origin: 0 50%; rotate: -3deg; animation: tvs-wipe 5s ease-in-out infinite; }
.tvs--destination .tvs-plate { color: color-mix(in srgb, var(--a) 85%, #fff); justify-content: center; padding: 6px 30px 8px; background: none; }
.tvs--destination .tvs-now { text-align: center; flex: 0 1 auto; }
.tvs-light { position: absolute; bottom: 8px; z-index: 3; width: 13px; height: 9px; border-radius: 5px; background: radial-gradient(circle at 40% 40%, #fff6d8, var(--a) 55%, color-mix(in srgb, var(--a) 60%, #000)); box-shadow: 0 0 0 1.5px #0a1022; }
.tvs-light--l { left: 9px; } .tvs-light--r { right: 9px; }
.tvs--destination.is-off .tvs-wiper { animation: none; }
.tvs--destination.is-off .tvs-lamp { animation-duration: 5.5s; }
.tvs--destination:is(:hover, :focus-visible) .tvs-light { background: radial-gradient(circle at 40% 40%, #fff, #fff2c0 50%, var(--a)); }
.tvs--destination:is(:hover, :focus-visible) .tvs-wiper { animation: tvs-wipe 1.3s ease-in-out infinite; }

/* ── 4 · afterhours: 4AM - the still through blinds, the day's first blue behind them ── */
.tvs--afterhours .tvs-shell { border-radius: 10px; background: #0a0d16; border: 1px solid #1b2130; }
.tvs--afterhours { --tvs-look: brightness(.68) contrast(1.05); --tvs-look-on: brightness(.85); }
.tvs-dawn { position: absolute; inset: 0; z-index: 1; background: radial-gradient(90% 120% at 100% 55%, color-mix(in srgb, var(--b) 55%, transparent), transparent 65%); mix-blend-mode: screen; pointer-events: none; }
.tvs-blinds { position: absolute; inset: 0; z-index: 2; background: repeating-linear-gradient(180deg, rgba(7,9,16,.76) 0 8px, transparent 8px 12px); transition: opacity .6s var(--ease); pointer-events: none; }
.tvs--afterhours .tvs-plate { background: #0a0d16; color: #dfe6f5; font: 700 11px/1.3 ui-monospace, 'Cascadia Code', Consolas, monospace; }
.tvs--afterhours .tvs-by { color: var(--a); opacity: .85; }
.tvs--afterhours .tvs-count { background: #000; color: var(--a); font: 700 10.5px/1 ui-monospace, 'Cascadia Code', Consolas, monospace; letter-spacing: .06em; text-shadow: 0 0 6px color-mix(in srgb, var(--a) 60%, transparent); box-shadow: 0 0 0 1px rgba(255,255,255,.07); }
.tvs--afterhours .tvs-logo { border-radius: 4px; }
.tvs--afterhours:is(:hover, :focus-visible) .tvs-blinds { opacity: .22; }

/* ── 5 · prism: 5D - a cut card, a sheen crossing the still like light over a facet ── */
.tvs--prism .tvs-shell { --cut: 14px; border-radius: 0; border: 2px solid transparent;
  background: linear-gradient(#0a0714, #0a0714) padding-box, linear-gradient(135deg, var(--a), #fff 45%, var(--b)) border-box;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.tvs--prism { --tvs-look: saturate(1.15) contrast(1.05); }
.tvs-iris { position: absolute; inset: -40% -30%; z-index: 2; translate: -34% 0; background: linear-gradient(115deg, transparent 30%, color-mix(in srgb, var(--a) 55%, transparent) 42%, rgba(255,255,255,.5) 48%, color-mix(in srgb, var(--b) 55%, transparent) 54%, transparent 66%); mix-blend-mode: screen; opacity: .55; pointer-events: none; }
.tvs-facet { position: absolute; z-index: 4; width: 24px; height: 2px; pointer-events: none; }
.tvs-facet--tl { left: -3px; top: 8px; rotate: -45deg; background: #fff; opacity: .8; }
.tvs-facet--br { right: -3px; bottom: 8px; rotate: -45deg; background: var(--b); }
.tvs--prism .tvs-plate { background: #0a0714; color: #efeaff; }
.tvs--prism .tvs-by { color: var(--b); opacity: 1; }
.tvs--prism .tvs-count { background: linear-gradient(135deg, var(--a), var(--b)); color: #fff; font-weight: 800; letter-spacing: .04em; border-radius: 3px; }
.tvs--prism .tvs-logo { border-radius: 3px; }
.tvs--prism:is(:hover, :focus-visible) .tvs-shell { outline-color: #fff; }
.tvs--prism:is(:hover, :focus-visible) .tvs-iris { animation: tvs-iris 1.1s cubic-bezier(.4,0,.2,1) forwards; }

/* ── 8 · dial: 88.8 FM - the card is a radio: the dial on top, the grille over the still, VU meters ── */
.tvs--dial .tvs-shell { padding: 7px 7px 0; border-radius: 16px 16px 10px 10px; border: 2px solid #1a1008;
  background: linear-gradient(180deg, color-mix(in srgb, var(--b) 80%, #fff), var(--b) 40%, color-mix(in srgb, var(--b) 70%, #000)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.tvs--dial .tvs-band { order: -1; flex-basis: 24%; margin-bottom: 6px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px #1a1008, 0 1px 0 rgba(255,255,255,.12); }
.tvs--dial .tvs-pic { border-radius: 6px; box-shadow: inset 0 0 0 2px #1a1008; }
.tvs--dial { --tvs-look: sepia(.35) brightness(.8); --tvs-look-on: brightness(.9); }
.tvs-glass { position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle, rgba(0,0,0,.6) 0 1.1px, transparent 1.6px) 0 0 / 5px 5px; opacity: .6; transition: opacity .5s; pointer-events: none; }
.tvs-vu { position: absolute; bottom: 6px; z-index: 3; width: 44px; height: auto; padding: 3px 3px 1px; border-radius: 4px 4px 2px 2px; background: #f3e9d2; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.tvs-vu--l { left: 8px; } .tvs-vu--r { left: 58px; }
.tvs-vu-arc { fill: none; stroke: #8a7a5a; stroke-width: 2; }
.tvs-vu-red { fill: none; stroke: var(--a); stroke-width: 2.5; }
.tvs-vu-needle { stroke: #1a1008; stroke-width: 2; stroke-linecap: round; transform-origin: 30px 31px; animation: tvs-vu 2.3s ease-in-out infinite alternate; }
.tvs-vu--r .tvs-vu-needle { animation-delay: -1.1s; animation-duration: 1.9s; }
.tvs-vu-pin { fill: #1a1008; }
.tvs-knob { position: absolute; bottom: 7px; z-index: 3; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff8e8, #c8b08a 40%, #5c3e22 85%); box-shadow: 0 1px 3px rgba(0,0,0,.7), inset 0 0 0 1px rgba(0,0,0,.3); }
.tvs-knob::after { content: ''; position: absolute; left: 50%; top: 2px; width: 2px; height: 5px; translate: -50% 0; background: #1a1008; }
.tvs-knob--l { right: 32px; } .tvs-knob--r { right: 10px; }
.tvs--dial .tvs-plate { padding-right: 56px; background: none; color: #f3e9d2; font: 700 11.5px/1.3 ui-monospace, 'Cascadia Code', Consolas, monospace; }
.tvs--dial .tvs-by { color: color-mix(in srgb, var(--a) 80%, #fff); opacity: 1; }
.tvs--dial .tvs-count { background: #1a1008; color: var(--a); font: 700 10.5px/1 ui-monospace, 'Cascadia Code', Consolas, monospace; letter-spacing: .06em; border-radius: 3px; }
.tvs--dial .tvs-logo { border-radius: 4px; }
.tvs--dial:is(:hover, :focus-visible) .tvs-glass { opacity: .3; }
.tvs--dial:is(:hover, :focus-visible) .tvi-dl-needle { animation: tvs-tune .9s cubic-bezier(.3,0,.2,1) both; }
.tvs--dial:is(:hover, :focus-visible) .tvi-dl-glow { animation: none; opacity: 1; }
.tvs--dial:is(:hover, :focus-visible) .tvs-vu-needle { animation-duration: .7s; }

/* ── 11 · basement: THE BASEMENT - a low ceiling, one bulb, the still in its cone of light ── */
.tvs--basement .tvs-shell { border-radius: 6px; background: #141010; border: 1px solid #2a2222; }
.tvs--basement { --tvs-look: brightness(.45); --tvs-look-on: brightness(.6); }
.tvs-beam { position: absolute; left: 0; right: 0; top: 0; z-index: 3; height: 11px; background: linear-gradient(180deg, #3c3c40, #26262a 50%, #141416); box-shadow: 0 2px 5px rgba(0,0,0,.7); pointer-events: none; }
.tvs-bulb { position: absolute; left: 58%; top: 10px; z-index: 4; width: 2px; height: 26px; transform-origin: 50% 0; animation: tvs-sway 4.5s ease-in-out infinite alternate; pointer-events: none; }
.tvs-bulb-cord { position: absolute; inset: 0; background: #0d0d0d; }
.tvs-bulb-glass { position: absolute; left: 50%; top: 100%; translate: -50% -18%; width: 12px; height: 16px; border-radius: 42% 42% 50% 50% / 30% 30% 70% 70%; background: radial-gradient(circle at 50% 62%, #fff, var(--a) 38%, color-mix(in srgb, var(--a) 55%, #000) 78%); box-shadow: 0 0 5px var(--a), 0 0 16px color-mix(in srgb, var(--a) 55%, transparent); }
.tvs-cone { position: absolute; left: 50%; top: 100%; translate: -50% 0; width: 200px; height: 200px; background: conic-gradient(from 146deg at 50% 0, transparent 0deg, color-mix(in srgb, var(--a) 22%, transparent) 20deg, color-mix(in srgb, var(--a) 34%, transparent) 34deg, color-mix(in srgb, var(--a) 22%, transparent) 48deg, transparent 68deg); mix-blend-mode: screen; }
.tvs--basement .tvs-plate { background: #141010; color: #e9e0d2; font: 400 11.5px/1.2 Impact, Anton, 'Arial Narrow', sans-serif; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.tvs--basement .tvs-by { color: var(--a); opacity: 1; }
.tvs--basement .tvs-count { background: #1b1b1b; color: #f3f3f3; border: 1px dashed rgba(255,255,255,.4); rotate: -2deg; font: 700 11px/1.1 'Ink Free', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive; }
.tvs--basement .tvs-logo { border-radius: 2px; }
.tvs--basement:is(:hover, :focus-visible) .tvs-bulb { animation: tvs-knock 2.2s cubic-bezier(.35,.8,.4,1) infinite alternate; }
.tvs--basement:is(:hover, :focus-visible) .tvs-bulb-glass { animation: tvs-flick .7s steps(1) 1; }

@keyframes tvs-iris { to { translate: 34% 0; } }
@keyframes tvs-vu { from { rotate: -34deg; } to { rotate: 26deg; } }
@keyframes tvs-tune { from { left: 62%; } to { left: 5.9%; } }
@keyframes tvs-sway { from { rotate: -3deg; } to { rotate: 3deg; } }
@keyframes tvs-knock { from { rotate: -16deg; } to { rotate: 14deg; } }
@keyframes tvs-flick { 0%, 100% { opacity: 1; } 12% { opacity: .2; } 20% { opacity: 1; } 34% { opacity: .5; } 44% { opacity: 1; } }
@keyframes tvs-spray { to { stroke-dashoffset: 0; } }
@keyframes tvs-mist { 0% { opacity: 0; scale: .6; } 20% { opacity: .9; } 100% { opacity: 0; scale: 1.25; } }
@keyframes tvi-drip-run { from { scale: 1 1; } to { scale: 1 1.7; } }
@keyframes tvs-floors { from { transform: translateY(0); } to { transform: translateY(calc(var(--tv-n) * -1em)); } }
@keyframes tvs-floor { from { transform: translateY(1em); } to { transform: translateY(0); } }
@keyframes tvs-arr { from { translate: 0 -50%; } to { translate: 0 0; } }
@keyframes tvs-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .25; } }
@keyframes tvs-sweep { 0% { top: -30%; } 55%, 100% { top: 115%; } }
@keyframes tvs-kick { 0% { transform: scale(1.04); } 10% { transform: scale(1.085) rotate(.6deg); } 35% { transform: scale(1.045); } 100% { transform: scale(1.04); } }
@keyframes tvs-twinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 45% { transform: scale(1) rotate(45deg); opacity: 1; } 70% { transform: scale(.4) rotate(70deg); opacity: .6; } }
@keyframes tvs-slap { 0% { rotate: -16deg; scale: 1.35; opacity: 0; } 35% { rotate: 2deg; scale: .96; opacity: 1; } 60% { rotate: -6deg; scale: 1.02; } 100% { rotate: -4deg; scale: 1; } }
@keyframes tvs-glide { from { translate: -3% 0; } to { translate: 3% 0; } }
@keyframes tvs-pass { from { left: -40%; } to { left: 120%; } }
@keyframes tvs-wipe { 0%, 72%, 100% { rotate: -3deg; } 84% { rotate: -64deg; } }

/* ── off air (render_tv_card() with an off look): the channel keeps its slot
   and its identity, greyed, and its picture plays the look - static, its own
   test card, a set switched off, or maintenance tape. A dead end: no link,
   no count. A disabled slot (.tvs-empty) says nothing about which channel
   could be there. tv-menu.js runs the snow and the test card's clock. ── */
.tvs--off { cursor: default; }
.tvs--off:is(:hover, :focus-visible) { transform: none; }
.tvs--off .tvs-shell { outline: none !important; }
.tvs--off .tvs-band { filter: grayscale(.9) brightness(.62); }
.tvs--off .tvs-plate { color: color-mix(in srgb, #fff 60%, transparent) !important; }
.tvs--off .tvs-plate .tvs-now { font-weight: 700; letter-spacing: .02em; }
.tvo { position: absolute; inset: 0; z-index: 2; display: block; overflow: hidden; background: #050608; }
/* static: snow, a rolling sync bar, the set's OSD; pointed at, the channel almost comes through */
.tvo--static canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: .82; }
.tvo--static::before { content: ''; position: absolute; left: 0; right: 0; height: 28%; z-index: 1; background: linear-gradient(180deg, transparent, rgba(255,255,255,.14) 40%, rgba(0,0,0,.35) 60%, transparent); animation: tvo-roll 3.2s linear infinite; }
.tvo--static::after { content: ''; position: absolute; inset: 0; z-index: 1; background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 1px, transparent 1px 3px); }
.tvo-osd { position: absolute; z-index: 2; font: 700 13px/1 ui-monospace, 'Cascadia Code', Consolas, monospace; letter-spacing: .08em; color: #7dff8a; text-shadow: 1px 1px 0 #000; }
.tvo-osd--ch { left: 10px; top: 9px; font-size: 16px; }
.tvo-osd--ns { right: 10px; bottom: 9px; animation: tvo-blink 1.6s steps(1) infinite; }
.tvo-ghost { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; opacity: 0; transition: opacity .6s; }
.tvo-ghost .tvi { position: relative; inset: auto; width: 70%; height: 34%; opacity: .7; filter: blur(.6px) grayscale(.3); }
.tvs--off-static:hover canvas { opacity: .45; }
.tvs--off-static:hover .tvo-ghost { opacity: 1; animation: tvo-jitter .18s steps(2) infinite; }
/* test card: the channel's own, PLEASE STAND BY, the viewer's time */
.tvo--testcard { background: #6c6f73; }
.tvo--testcard svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tvo-grid { stroke: rgba(255,255,255,.55); stroke-width: .8; fill: none; }
.tvo-ring { fill: none; stroke: #fff; stroke-width: 1.4; }
.tvo-tc-name { font: 700 10px/1 Arial, sans-serif; fill: #fff; letter-spacing: .1em; text-anchor: middle; }
.tvo-tc-sb { font: 700 7.5px/1 Arial, sans-serif; fill: #111; letter-spacing: .14em; text-anchor: middle; }
.tvo-tc-clock { font: 700 9px/1 ui-monospace, Consolas, monospace; fill: #fff; text-anchor: middle; }
.tvo--testcard .tvi-a { fill: var(--a); } .tvo--testcard .tvi-b { fill: var(--b); }
.tvo-w { fill: #fff; } .tvo-y { fill: #ffd400; } .tvo-c { fill: #18c7d8; } .tvo-k { fill: #111; }
.tvo-tone { fill: #7dff8a; }
.tvs--off-testcard:hover .tvo-tone { animation: tvo-blink .5s steps(1) infinite; }
/* switched off: the picture collapses to a line, the line to a dot, the dot fades; pointed at, it tries to come on */
.tvo--off { background: radial-gradient(120% 90% at 50% 50%, #101317, #040506 70%); }
.tvo--off::before { content: ''; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; margin-top: -1px; background: #e9f6ff; transform-origin: center; animation: tvo-off 5s cubic-bezier(.6,0,.2,1) infinite; }
.tvo--off::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.05) 46%, transparent 52%); }
.tvo--off b { position: absolute; left: 10px; bottom: 9px; font: 800 10px/1 system-ui, sans-serif; letter-spacing: .24em; color: rgba(255,255,255,.38); text-transform: uppercase; }
.tvs--off-off:hover .tvo--off::before { animation: tvo-try 1.3s steps(1) infinite; }
/* maintenance: taped off, a work lamp blinking */
.tvo--maintenance { background: repeating-linear-gradient(135deg, #121316 0 6px, #0d0e10 6px 12px); }
.tvo-tape { position: absolute; left: -12%; right: -12%; height: 22px; display: flex; align-items: center; justify-content: center; gap: 18px; overflow: hidden; white-space: nowrap;
  background: repeating-linear-gradient(-45deg, #f5c400 0 12px, #141414 12px 24px); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.tvo-tape span { padding: 2px 7px; background: #f5c400; color: #141414; font: 900 10px/1 'Arial Black', Impact, sans-serif; letter-spacing: .12em; }
.tvo-tape--1 { top: 30%; rotate: -9deg; animation: tvo-flutter 4s ease-in-out infinite; }
.tvo-tape--2 { top: 52%; rotate: 7deg; animation: tvo-flutter 4.6s ease-in-out infinite reverse; }
.tvo-lamp { position: absolute; right: 12px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: #ff9f1a; box-shadow: 0 0 0 2px #2a1a05; animation: tvo-blink 1.1s steps(1) infinite; }
.tvs--off-maintenance:hover .tvo-tape--1 { animation-duration: .5s; }
@keyframes tvo-roll { from { top: -30%; } to { top: 110%; } }
@keyframes tvo-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .15; } }
@keyframes tvo-jitter { 0% { translate: 0 0; } 50% { translate: 2px -1px; } }
@keyframes tvo-off {
  0% { transform: scale(1, 1); opacity: .9; }
  6% { transform: scale(1, 1); opacity: 1; }
  28% { transform: scale(.02, 1.5); opacity: 1; }
  32% { transform: scale(.012, 2); opacity: 1; }
  70% { transform: scale(.012, 2); opacity: 0; }
  100% { transform: scale(1, 1); opacity: 0; }
}
@keyframes tvo-try { 0% { transform: scale(1, 1); opacity: .9; } 10% { opacity: .2; } 20% { transform: scale(1, 30); opacity: .35; } 30% { transform: scale(1, 1); opacity: .9; } 60% { transform: scale(.02, 1); opacity: 1; } }
@keyframes tvo-flutter { 0%, 100% { translate: 0 0; } 50% { translate: 0 2px; } }

/* a disabled slot (render_tv_slot_disabled()): frosted glass, the slot's
   number pressed into it, a light crossing now and then; with a line from
   Settings (tv_slot_note), the number moves up and the line scrolls under it
   in a band of the same glass, the same text on every slot. */
.tvs-slot { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; overflow: hidden; isolation: isolate; }
.tvs-slot::after { content: ''; position: absolute; top: 0; bottom: 0; left: -50%; width: 40%; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--text) 8%, transparent), transparent); animation: tvs-slot-sheen 7s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .45s); }
.tvs-slot-n { font: 900 54px/1 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: -.02em; color: color-mix(in srgb, var(--text) 3%, transparent);
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--text) 17%, transparent); text-shadow: 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent), 0 -1px 0 rgba(0,0,0,.18); }
.tvs-slot.has-run .tvs-slot-n { font-size: 44px; margin-top: 6px; }
.tvs-slot-run { position: relative; align-self: stretch; height: 22px; overflow: hidden; display: flex; align-items: center;
  background: color-mix(in srgb, var(--text) 3.5%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 9%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--text) 6%, transparent), inset 0 2px 4px rgba(0,0,0,.14); }
.tvs-slot-track { display: inline-flex; flex: none; white-space: nowrap; animation: tvs-slot-run calc(var(--len) * .26s + 6s) linear infinite; }
.tvs-slot-track span { padding-right: 3.2em; font: 800 10.5px/1 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: .22em; text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 30%, transparent); -webkit-text-stroke: .35px color-mix(in srgb, var(--text) 14%, transparent);
  text-shadow: 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent), 0 -1px 0 rgba(0,0,0,.22); }
.tvs-slot-track span::after { content: '\2022'; margin-left: 3.2em; opacity: .55; }
.tvs-slot-track span:last-child::after { content: none; }
@keyframes tvs-slot-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tvs-slot-sheen { 0%, 62% { left: -50%; } 100% { left: 125%; } }
:root[data-motion="reduce"] .tvs-slot-track span + span { display: none; }
:root[data-motion="reduce"] .tvs-slot-run { justify-content: center; }
:root[data-motion="reduce"] .tvs-slot-track span { padding-right: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 767px) {
  .tvs-slot-n { font-size: 34px; }
  .tvs-slot.has-run .tvs-slot-n { font-size: 28px; margin-top: 2px; }
  .tvs-slot { gap: 6px; }
  .tvs-slot-run { height: 18px; }
  .tvs-slot-track span { font-size: 9px; }
}

:root[data-motion="reduce"] .tvs, :root[data-motion="reduce"] .tvs * { animation: none !important; transition: none !important; }

/* phones: two columns, no dim slots, the count in the line */
@media (max-width: 767px) {
  .tvm { padding: 4px 12px 0; }
  .tvm-head { flex-wrap: wrap; row-gap: 2px; margin-bottom: 10px; }
  .tvm-title { font-size: 1.3rem; }
  .tvm-hint { display: none; }
  .tvm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  /* phones keep every slot: a channel is always at its number */
  .tvs-plate { padding: 4px 7px 5px; font-size: 10.5px; }
  .tvs-tag, .tvs-by { display: none; }
  .tvs-logo { left: 5px; top: 5px; width: 22px; height: 22px; }
  .tvs-count { right: 5px; top: 5px; font-size: 9px !important; padding: 2px 5px; }
  .tvs--brush .tvs-now { font-size: 11.5px; }
  .tvs--rig .tvs-shell { padding: 12px 6px 0; }
  .tvs-splat svg { width: 40px; height: 40px; }
  .tvs-tape { width: 90px; height: 10px; right: -26px; bottom: 10px; }
  .tvs-light { width: 9px; height: 6px; bottom: 6px; }
  .tvs--destination .tvs-plate { padding: 4px 18px 6px; }
  .tvs--clouds .tvs-plate { padding: 0 7px 6px; }
  .tvs-blinds { background: repeating-linear-gradient(180deg, rgba(7,9,16,.76) 0 5px, transparent 5px 8px); }
  .tvs--prism .tvs-shell { --cut: 10px; }
  .tvs-vu { width: 32px; bottom: 4px; } .tvs-vu--l { left: 5px; } .tvs-vu--r { left: 41px; }
  .tvs-knob { width: 12px; height: 12px; bottom: 5px; } .tvs-knob--l { right: 24px; } .tvs-knob--r { right: 7px; }
  .tvs--dial .tvs-plate { padding-right: 40px; }
  .tvs-bulb { height: 18px; } .tvs-cone { width: 140px; height: 140px; }
  .tvm-bar { width: calc(100% + 24px); height: 96px; margin: 20px -12px 0; clip-path: none; }
  .tvm-btn { width: 56px; height: 56px; margin-left: -28px; bottom: 20px; }
  .tvm-btn .bi { font-size: 20px; }
  .tvm-btn span { top: calc(100% + 4px); font-size: 9px; }
  .tvm-bar .tvm-clock { bottom: 24px; }
  .tvm-clock .wr-sg { font-size: 16px; gap: 4px; }
  .tvm-clock { padding: 5px 11px 4px; }
}
