/* The site's face (Heebo, Hebrew and Latin), kept with the theme. */
@font-face {
    font-family: 'Heebo';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url(../fonts/heebo-hebrew.woff2) format('woff2');
    unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
    font-family: 'Heebo';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url(../fonts/heebo-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   TV Split :: assets/css/theme.css

   Colour: two sets of tokens on <html data-theme>. Dark is near-black with
   surfaces that step lighter as they rise (shadows do not read on dark), off-
   white text and a softened accent; light is a cool grey page with white
   surfaces. Body text is >= 4.5:1 on its surface in both. The video stage is
   dark in both - a picture framed in white is glare.

   Layout: logical properties throughout, so right-to-left needs no overrides.
   Touch targets are 44px and up.
   ========================================================================== */

:root {
    --tvs-accent: #01a6d4;
    --tvs-hdr: 60px;
    --tvs-drawer-w: 340px;
    --tvs-radius: 12px;
    --tvs-ease: cubic-bezier(.2, .7, .2, 1);
    --tvs-font: 'Heebo', system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif;
    --tvs-stage: #05070a;
}

:root,
[data-theme="dark"] {
    --bg: #0f1115;
    --surface: #161a21;
    --surface-2: #1c212a;
    --surface-3: #242a35;
    --line: rgba(255, 255, 255, .09);
    --line-2: rgba(255, 255, 255, .16);
    --text: #e8ebf1;
    --text-2: #a7afbd;
    --text-3: #7d8696;
    --accent: color-mix(in srgb, var(--tvs-accent) 78%, #ffffff);
    --accent-bg: color-mix(in srgb, var(--tvs-accent) 22%, transparent);
    --on-accent: #06121a;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --scrim: rgba(3, 5, 8, .6);
    /* behind a channel's logo: a dark plate in dark */
    --logo-bg: #2a3240;
    --logo-fg: #cfd6e0;
    --logo-line: rgba(255, 255, 255, .12);
}

[data-theme="light"] {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-2: #f1f3f7;
    --surface-3: #e7eaf0;
    --line: rgba(15, 23, 42, .09);
    --line-2: rgba(15, 23, 42, .16);
    --text: #121722;
    --text-2: #4f5868;
    --text-3: #6b7484;
    --accent: color-mix(in srgb, var(--tvs-accent) 82%, #000000);
    --accent-bg: color-mix(in srgb, var(--tvs-accent) 13%, transparent);
    --on-accent: #ffffff;
    --shadow: 0 10px 30px rgba(15, 23, 42, .14);
    --scrim: rgba(15, 23, 42, .38);
    /* behind a channel's logo: white in light, as in the chat */
    --logo-bg: #ffffff;
    --logo-fg: #4f5868;
    --logo-line: rgba(15, 23, 42, .14);
}

/* Browsers without color-mix() keep the plain accent. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
    :root, [data-theme] { --accent: var(--tvs-accent); --accent-bg: rgba(1, 166, 212, .18); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--tvs-hdr) + 12px); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.65 var(--tvs-font);
    -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-bg); }
.tvs-i { display: block; flex: 0 0 auto; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
}
.tvs-skip:focus {
    clip: auto; clip-path: none; width: auto; height: auto;
    inset-inline-start: 12px; top: 12px; z-index: 100010;
    padding: 10px 16px; background: var(--surface); color: var(--text);
    border-radius: 8px; box-shadow: var(--shadow);
}

/* -- buttons --------------------------------------------------------------- */
.tvs-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0;
    border: 1px solid transparent; border-radius: 10px;
    background: transparent; color: var(--text);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.tvs-icon-btn:hover { background: var(--surface-3); }
.tvs-btn, .tvs-comments .submit, .tvs-entry .wp-block-button__link, input[type="submit"], button[type="submit"]:not(.tvs-icon-btn) {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 18px;
    border: 0; border-radius: 999px;
    background: var(--tvs-accent); color: #fff;
    font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.tvs-btn:hover, .tvs-comments .submit:hover, input[type="submit"]:hover { filter: brightness(1.08); color: #fff; }

/* -- header ---------------------------------------------------------------- */
.tvs-header {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 1000;
    height: var(--tvs-hdr);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(1.4) blur(10px);
}
@supports (backdrop-filter: blur(1px)) {
    .tvs-header { background: color-mix(in srgb, var(--surface) 86%, transparent); }
}
.tvs-header__in {
    height: 100%;
    display: flex; align-items: center; gap: 10px;
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
}
.tvs-header__sp { flex: 1 1 auto; }
/* TV and radio, always a press away, at the far end of the header. */
.tvs-hbtn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px;
    border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
    color: var(--text); font-family: var(--tvs-font); font-weight: 800; font-size: 15px; letter-spacing: .2px; text-decoration: none; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.tvs-hbtn--tv { background: #d6001c; border-color: #d6001c; color: #fff; }
.tvs-hbtn--tv:hover { background: #b80018; border-color: #b80018; color: #fff; }
.tvs-hbtn--radio:hover, .tvs-hbtn--radio.is-on { border-color: var(--accent); color: var(--accent); }
.tvs-hbtn--chat { background: #01a6d4; border-color: #01a6d4; color: #fff; }
.tvs-hbtn--chat:hover { background: #0189b0; border-color: #0189b0; color: #fff; }
.tvs-hbtn.is-on { box-shadow: 0 0 0 2px var(--accent-bg); }
@media (max-width: 560px) {
    .tvs-hbtn { width: 40px; min-height: 40px; padding: 0; justify-content: center; }
    .tvs-hbtn span { display: none; }
}
.tvs-brand { display: flex; align-items: center; min-width: 0; }
.tvs-brand__name { color: var(--text); font-weight: 800; font-size: 19px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvs-brand .custom-logo { display: block; max-height: 40px; width: auto; }

.tvs-chbtn {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 0 16px;
    border: 1px solid var(--line-2); border-radius: 999px;
    background: var(--surface-2); color: var(--text);
    font: inherit; font-weight: 700; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.tvs-chbtn:hover { border-color: var(--accent); }
.tvs-chbtn[aria-expanded="true"] { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }

.tvs-nav__list { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tvs-nav__list a {
    display: flex; align-items: center; min-height: 44px; padding: 0 12px;
    border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 600;
}
.tvs-nav__list a:hover, .tvs-nav__list .current-menu-item > a { color: var(--text); background: var(--surface-2); }
.tvs-nav__list .sub-menu {
    position: absolute; min-width: 200px; margin: 0; padding: 6px; list-style: none;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
    display: none;
}
.tvs-nav__list li { position: relative; }
.tvs-nav__list li:hover > .sub-menu, .tvs-nav__list li:focus-within > .sub-menu { display: block; }
.tvs-nav__list .sub-menu { z-index: 5; top: 100%; inset-inline-start: 0; }
.tvs-nav__list .sub-menu a { min-height: 38px; white-space: nowrap; }
/* an item with a sub-menu says so */
.tvs-nav__list .menu-item-has-children > a::after {
    content: ''; width: 7px; height: 7px; margin-inline-start: 7px; margin-top: -4px;
    border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .6;
}
.tvs-navbtn { display: none; }

.tvs-scheme__sun { display: none; }
[data-theme="dark"] .tvs-scheme__moon { display: none; }
[data-theme="dark"] .tvs-scheme__sun { display: block; }

/* The app (inc/pwa.php): an install button, and how to on iPhone. */
.tvs-install[hidden] { display: none; }
.tvs-install { color: var(--accent); }
.tvs-ios-tip { position: fixed; inset: 0; z-index: 100010; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); padding: 16px; }
.tvs-ios-tip[hidden] { display: none; }
.tvs-ios-tip__box { width: min(420px, 100%); background: var(--surface); color: var(--text); border-radius: 18px; padding: 18px 20px 16px; box-shadow: var(--shadow); margin-bottom: env(safe-area-inset-bottom); }
.tvs-ios-tip__box h2 { margin: 0 0 8px; font-size: 18px; }
.tvs-ios-tip__box ol { margin: 0 0 12px; padding-inline-start: 22px; line-height: 1.9; }
.tvs-ios-tip__box svg { vertical-align: -4px; color: var(--accent); }
.tvs-ios-tip__ok { width: 100%; min-height: 44px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
/* The install offer (Split TV > App): a sheet at the bottom, a bar at the top,
   a card in the corner, or a window in the middle. */
.tvs-pwa { position: fixed; z-index: 100009; pointer-events: none; }
.tvs-pwa__card {
    position: relative; pointer-events: auto;
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center;
    padding: 16px 18px; background: var(--surface); color: var(--text);
    border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
    transition: transform .26s var(--tvs-ease), opacity .26s;
}
.tvs-pwa__icon { grid-row: 1 / 3; width: 52px; height: 52px; border-radius: 13px; }
.tvs-pwa__t { display: block; font-size: 16.5px; font-weight: 800; line-height: 1.35; padding-inline-end: 22px; }
.tvs-pwa__p { margin: 3px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.tvs-pwa__act { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 10px; }
.tvs-pwa__ok, .tvs-pwa__no { min-height: 42px; padding: 0 20px; border-radius: 999px; font: inherit; font-weight: 800; cursor: pointer; }
.tvs-pwa__ok { border: 0; background: var(--accent); color: #fff; }
.tvs-pwa__ok:hover { filter: brightness(1.08); }
.tvs-pwa__ok[hidden] { display: none; }
.tvs-pwa__no { border: 1px solid var(--line-2); background: transparent; color: var(--text); }
.tvs-pwa__x { position: absolute; top: 6px; inset-inline-end: 8px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--text-3); font-size: 24px; line-height: 1; cursor: pointer; }
.tvs-pwa--sheet { inset-inline: 0; bottom: 0; display: flex; justify-content: center; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); }
.tvs-pwa--sheet .tvs-pwa__card { width: min(520px, 100%); border-radius: 18px; transform: translateY(120%); }
.tvs-pwa--bar { inset-inline: 0; top: calc(var(--tvs-hdr) + var(--wp-admin--admin-bar--height, 0px)); }
.tvs-pwa--bar .tvs-pwa__card { grid-template-columns: auto minmax(0, 1fr) auto; border-radius: 0; border-inline: 0; padding: 10px 16px; transform: translateY(-120%); opacity: 0; }
.tvs-pwa--bar .tvs-pwa__icon { grid-row: auto; width: 38px; height: 38px; }
.tvs-pwa--bar .tvs-pwa__act { grid-column: auto; margin: 0; }
.tvs-pwa--bar .tvs-pwa__p { display: none; }
.tvs-pwa--card { bottom: calc(16px + env(safe-area-inset-bottom)); inset-inline-end: 16px; width: min(380px, calc(100% - 32px)); }
.tvs-pwa--card .tvs-pwa__card { border-radius: 16px; transform: translateY(20px); opacity: 0; }
.tvs-pwa--modal { inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: transparent; pointer-events: auto; transition: background .26s; }
.tvs-pwa--modal .tvs-pwa__card { width: min(440px, 100%); border-radius: 18px; transform: scale(.94); opacity: 0; }
.tvs-pwa--modal.is-in { background: var(--scrim); }
.tvs-pwa.is-in .tvs-pwa__card { transform: none; opacity: 1; }
@media (max-width: 600px) {
    .tvs-pwa--card { inset-inline: 12px; width: auto; }
    .tvs-pwa--bar .tvs-pwa__card { grid-template-columns: auto minmax(0, 1fr); }
    .tvs-pwa--bar .tvs-pwa__act { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .tvs-pwa__card { transition: none; } }
/* In the installed app the address bar is gone - so is the space for it. */
@media (display-mode: standalone) { .tvs-header { padding-top: env(safe-area-inset-top); } }

@media (max-width: 899px) {
    :root { --tvs-hdr: 56px; }
    .tvs-navbtn { display: inline-flex; }
    .tvs-nav {
        position: fixed; inset-inline: 0;
        top: calc(var(--tvs-hdr) + var(--wp-admin--admin-bar--height, 0px));
        background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        padding: 8px 12px 14px; display: none;
    }
    .tvs-nav.is-open { display: block; }
    .tvs-nav__list { flex-direction: column; }
    .tvs-nav__list .sub-menu { position: static; display: block; box-shadow: none; border: 0; padding-inline-start: 14px; }
    .tvs-brand__name { font-size: 17px; }
}
@media (max-width: 480px) {
    .tvs-chbtn { padding: 0 12px; }
}

/* -- the channel list ------------------------------------------------------ */
.tvs-drawer {
    display: flex; flex-direction: column;
    min-width: 0; min-height: 0;
    background: var(--surface);
    color: var(--text);
}
.tvs-drawer:focus { outline: none; }
.tvs-drawer__grip { display: none; }
.tvs-drawer__grip, .tvs-drawer__hd, .tvs-search, .tvs-chips, .tvs-empty { flex: 0 0 auto; }
.tvs-drawer__hd { display: flex; align-items: center; gap: 4px; padding: 10px 10px 4px 14px; padding-inline: 14px 8px; }
.tvs-drawer__title { flex: 1 1 auto; margin: 0; font-size: 17px; font-weight: 800; }
.tvs-drawer__count { color: var(--text-3); font-weight: 600; font-size: 14px; }
.tvs-density__cards { display: none; }
.tvs-drawer[data-density="compact"] .tvs-density__rows { display: none; }
.tvs-drawer[data-density="compact"] .tvs-density__cards { display: block; }

.tvs-search { position: relative; margin: 4px 12px 8px; }
.tvs-search .tvs-i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.tvs-search__q {
    width: 100%; height: 44px;
    padding-inline: 40px 12px;
    border: 1px solid var(--line-2); border-radius: 10px;
    background: var(--surface-2); color: var(--text);
    font: inherit; font-size: 15px;
}
.tvs-search__q::placeholder { color: var(--text-3); }
.tvs-search__q:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }

/* The filters in one row that wraps - nothing hides off its edge: the fixed
   ones as chips, the categories in a list that opens. */
.tvs-chips {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 12px 10px;
    border-bottom: 1px solid var(--line);
}
.tvs-catsel {
    flex: 1 1 130px; min-width: 0; max-width: 100%; min-height: 34px; padding: 0 10px;
    border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--text-2);
    font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.tvs-catsel.is-on { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
/* The list under "All": a heading for each category, staying on top while its channels pass, folding on a press. */
.tvs-grp { position: sticky; top: -6px; z-index: 2; margin: 6px 0 2px; background: var(--surface); grid-column: 1 / -1; }
.tvs-grp__b {
    display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 4px 10px;
    border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text);
    font: inherit; font-size: 14px; font-weight: 800; text-align: start; cursor: pointer;
}
.tvs-grp__b:hover { color: var(--accent); }
.tvs-grp__l { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvs-grp__n { color: var(--text-3); font-size: 12px; font-weight: 700; }
.tvs-grp__i { flex: 0 0 auto; transition: transform .15s; }
.tvs-grp.is-closed .tvs-grp__i { transform: rotate(90deg); }
[dir="rtl"] .tvs-grp.is-closed .tvs-grp__i { transform: rotate(-90deg); }
.tvs-chip {
    flex: 0 0 auto;
    min-height: 34px; padding: 0 12px;
    border: 1px solid var(--line-2); border-radius: 999px;
    background: transparent; color: var(--text-2);
    font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.tvs-chip:hover { color: var(--text); border-color: var(--text-3); }
.tvs-chip[aria-pressed="true"] { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.tvs-chip--fav { color: #e0a800; }

/* Television | Radio - a segmented switch above the categories. */
.tvs-kinds {
    flex: 0 0 auto;
    display: flex; gap: 4px;
    margin: 0 12px 8px; padding: 3px;
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface-2);
}
.tvs-kinds[hidden] { display: none; }
.tvs-kind {
    flex: 1 1 0; min-width: 0;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 40px; padding: 0 10px;
    border: 0; border-radius: 9px;
    background: transparent; color: var(--text-2);
    font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
    transition: background-color .15s, color .15s;
}
.tvs-kind:hover { color: var(--text); }
.tvs-kind[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.tvs-kind__n {
    min-width: 22px; padding: 1px 6px;
    border-radius: 999px;
    background: var(--surface-3); color: var(--text-3);
    font-size: 11.5px; font-weight: 700; line-height: 1.5;
}
.tvs-kind[aria-pressed="true"] .tvs-kind__n { background: var(--accent-bg); color: var(--accent); }
.tvs-empty__go {
    margin-top: 10px; min-height: 36px; padding: 0 16px;
    border: 1px solid var(--accent); border-radius: 999px;
    background: var(--accent-bg); color: var(--accent);
    font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.tvs-ch.is-radio .tvs-ch__logo { color: var(--accent); }
/* In dark the plate is dark, and half the logos are drawn in black: a thin
   light outline keeps them readable without a white box on a dark page. */
[data-theme="dark"] .tvs-ch__logo img,
[data-theme="dark"] .tvs-sidetv__ch img,
[data-theme="dark"] .tvs-live__logo img,
[data-theme="dark"] .tvs-tvpick__logo img,
[data-theme="dark"] .tvs-st__logo img,
[data-theme="dark"] .tvs-mch__logo img { filter: drop-shadow(0 0 .6px rgba(255, 255, 255, .95)) drop-shadow(0 0 .6px rgba(255, 255, 255, .95)) drop-shadow(0 0 2px rgba(255, 255, 255, .35)); }
/* The wall's own logo plates (its channel list, the compact strip, a station's
   artwork): white in light, as in the chat. In dark they stay white too - the
   wall draws its logos as backgrounds, and a black logo on a dark plate would
   disappear - but a softer white, so they do not glare. */
html #stv_wrap .stv_pi .stv_pth.stv_haslogo,
html #stv_wrap .stv_strip_b.stv_haslogo,
html #stv_wrap .stv_tile .stv_radio_logo.stv_haslogo,
html #stv_wrap .stv_hold_v.stv_haslogo { background-color: #fff; }
[data-theme="dark"] #stv_wrap .stv_pi .stv_pth.stv_haslogo,
[data-theme="dark"] #stv_wrap .stv_strip_b.stv_haslogo,
[data-theme="dark"] #stv_wrap .stv_tile .stv_radio_logo.stv_haslogo,
[data-theme="dark"] #stv_wrap .stv_hold_v.stv_haslogo { background-color: #e6e9ee; }
.tvs-ch__logo .tvs-i { width: 22px; height: 22px; }
.tvs-drawer[data-density="compact"] .tvs-ch__logo .tvs-i { width: 16px; height: 16px; }

.tvs-list {
    flex: 1 1 auto; min-height: 0;
    margin: 0; padding: 6px 6px 14px;
    list-style: none; overflow-y: auto; overscroll-behavior: contain;
}
.tvs-list__more { height: 1px; }
/* Nothing to list: the message sits under the filters, not at the far end. */
.tvs-list:empty { flex: 0 0 auto; padding: 0; }
.tvs-empty { margin: 18px 16px; color: var(--text-3); text-align: center; font-size: 14px; }
.tvs-empty[hidden] { display: none; }

.tvs-ch { display: flex; align-items: center; gap: 2px; border-radius: 10px; }
.tvs-ch:hover { background: var(--surface-2); }
.tvs-ch__main {
    flex: 1 1 auto; min-width: 0;
    display: flex; align-items: center; gap: 12px;
    min-height: 60px; padding: 8px 10px;
    border: 0; border-radius: 10px;
    background: transparent; color: inherit;
    font: inherit; text-align: start; cursor: pointer;
}
.tvs-ch__logo {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    width: 64px; height: 40px;
    border-radius: 8px;
    background: var(--logo-bg);
    border: 1px solid var(--logo-line);
    color: var(--logo-fg); font-weight: 800; font-size: 14px;
    overflow: hidden;
}
.tvs-ch__logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.tvs-ch__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tvs-ch__name { font-weight: 700; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvs-ch__meta { color: var(--text-3); font-size: 12.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvs-ch__on { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.tvs-ch.is-on .tvs-ch__main { background: var(--accent-bg); }
.tvs-ch.is-on .tvs-ch__name { color: var(--accent); }
.tvs-ch.is-on .tvs-ch__on { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.tvs-ch__fav {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    border: 0; border-radius: 10px;
    background: transparent; color: var(--text-3);
    font-size: 18px; line-height: 1; cursor: pointer;
    opacity: .55;
}
.tvs-ch:hover .tvs-ch__fav, .tvs-ch__fav:focus-visible { opacity: 1; }
.tvs-ch__fav[aria-pressed="true"] { color: #f5b301; opacity: 1; }
.tvs-ch__fav:hover { background: var(--surface-3); }

/* Compact: one line a channel, as many as fit - still a 44px target. */
.tvs-drawer[data-density="compact"] .tvs-ch__main { min-height: 44px; padding: 4px 10px; gap: 10px; }
.tvs-drawer[data-density="compact"] .tvs-ch__logo { width: 40px; height: 26px; border-radius: 6px; font-size: 11px; }
.tvs-drawer[data-density="compact"] .tvs-ch__meta { display: none; }
.tvs-drawer[data-density="compact"] .tvs-ch__name { font-size: 14.5px; }

/* -- the TV page ------------------------------------------------------------
   The list and the wall share one grid row. Opening the list widens its
   column and the wall's narrows - the wall reflows on its own, no stream is
   restarted. Below 900px the list leaves the grid and becomes a sheet. */
.tvs-app {
    display: grid;
    grid-template-columns: 0 minmax(0, 1fr) var(--tvs-ads-cur, 0px);
    height: calc(100vh - var(--tvs-hdr) - var(--wp-admin--admin-bar--height, 0px));
    height: calc(100dvh - var(--tvs-hdr) - var(--wp-admin--admin-bar--height, 0px));
    min-height: 360px;
    background: var(--tvs-stage);
    transition: grid-template-columns .22s var(--tvs-ease);
}
html[data-drawer="open"] .tvs-app { grid-template-columns: var(--tvs-drawer-w) minmax(0, 1fr) var(--tvs-ads-cur, 0px); }
/* Ads (Split TV > Ads, or the "TV page - beside the screen" widget area) on
   the far side. The screen's own width comes first: channels.js gives the list
   what the picture cannot use, and opens the column (data-ads="on") only when
   there is room left for it - its ads are not loaded before then. */
.tvs-app--ads[data-ads="on"] { --tvs-ads-cur: var(--tvs-ads-w, 300px); }
.tvs-ads {
    grid-column: 3; grid-row: 1;
    min-width: 0; min-height: 0;
    overflow-x: hidden; overflow-y: auto;
    padding: 12px;
    background: var(--surface); color: var(--text);
    border-inline-start: 1px solid var(--line);
}
.tvs-ads .widget { margin: 0 0 12px; }
.tvs-ads img, .tvs-ads iframe { max-width: 100%; height: auto; }
.tvs-app:not([data-ads="on"]) .tvs-ads { visibility: hidden; padding: 0; border: 0; }
/* A wide list (the picture could not use the room) shows two columns or more. */
.tvs-app .tvs-drawer--dock { container: tvsdrawer / inline-size; }
@container tvsdrawer (min-width: 560px) {
    .tvs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 6px; align-content: start; }
    .tvs-list__more { grid-column: 1 / -1; }
}
.tvs-app .tvs-drawer--dock {
    overflow: hidden;
    border-inline-end: 1px solid var(--line);
    transition: visibility 0s .22s;
}
html:not([data-drawer="open"]) .tvs-app .tvs-drawer--dock { visibility: hidden; }
html[data-drawer="open"] .tvs-app .tvs-drawer--dock { visibility: visible; transition: none; }
.tvs-stage { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.tvs-noplugin { margin: 0; padding: 40px; color: #a7afbd; text-align: center; }

/* The wall fills the stage, edge to edge - less the ad bands above and below it. */
.tvs-stage .stv_host,
.tvs-stage .stv_host.stv_host_fill {
    flex: 1 1 0;
    height: auto !important;
    min-height: 0;
    aspect-ratio: auto;
    margin: 0;
    border-radius: 0;
}
.tvs-stage .stv_host.stv_host_away { flex: 0 0 auto; height: auto !important; }
/* Ad bands (Split TV > Ads): part of the layout, never over a picture. */
.tvs-adband {
    flex: 0 0 auto;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
    padding: 6px 8px;
    background: var(--bg);
    overflow: hidden;
}
/* A band with nothing for this screen size takes no room at all. */
@media (min-width: 900px) {
    .tvs-adband:not(:has(.stv-ad:not(.stv-ad--dev-mobile))) { display: none; }
}
@media (max-width: 899px) {
    .tvs-adband:not(:has(.stv-ad:not(.stv-ad--dev-desktop))) { display: none; }
}
.tvs-adbar { padding: 10px 16px 0; }
.tvs-adbar:not(:has(.stv-ad)) { display: none; }
.tvs-ads .stv-ad { margin-bottom: 12px; }
.tvs-sticky-ad { position: sticky; top: calc(var(--tvs-hdr) + var(--wp-admin--admin-bar--height, 0px) + 16px); }
/* Around the exact 16:9 windows: the page itself - white in light, dark in dark. */
.tvs-stage #stv_wrap { --stv-exact-bg: var(--bg); }
/* The theme's list is the channel list here - in compact too, which on this
   page is one channel in the same frame. The wall's own "Channels" button
   stays only when the theme's button was put in the toolbar; it then opens
   the theme's list (channels.js). */
.tvs-extpick:not(.tvs-chpos-wall):not(.tvs-chpos-both) #stv_wrap:not(.stv_mode_compact) .stv_b_pick,
.tvs-extpick #stv_wrap:not(.stv_mode_compact) .stv_tab { display: none !important; }
.tvs-extpick.tvs-chpos-wall #stv_wrap .stv_b_pick,
.tvs-extpick.tvs-chpos-both #stv_wrap .stv_b_pick { display: inline-flex !important; }
.tvs-extpick #stv_wrap .stv_b_pick[aria-expanded="true"] { background: var(--accent-bg); border-color: var(--accent); }
/* At the far end of the header, it sits before the light / dark switch. */
.tvs-chbtn--end { margin-inline-end: 4px; }

@media (min-width: 1500px) { :root { --tvs-drawer-w: 380px; } }
@media (min-width: 900px) and (max-width: 1100px) { :root { --tvs-drawer-w: 300px; } }

.tvs-under { padding-block: 32px; }

/* Phones, one channel on screen: the screen shrinks to that channel and the
   channels follow under it as logos (templates/tv.php). */
.tvs-tvpick { display: none; }
@media (max-width: 899px) {
    .tvs-app:has(#stv_wrap.stv_mode_one),
    .tvs-app.tvs-app--ads:has(#stv_wrap.stv_mode_one) { height: auto; min-height: 0; grid-template-rows: none; }
    .tvs-app:has(#stv_wrap.stv_mode_one) .tvs-stage { height: calc(100vw * 9 / 16 + 50px); }
    .tvs-app:has(#stv_wrap.stv_mode_one) .tvs-tvpick { display: block; grid-column: 1; grid-row: 2; }
    .tvs-app:has(#stv_wrap.stv_mode_one) .tvs-ads { grid-row: 3; }
    .tvs-tvpick { padding: 14px 12px 24px; background: var(--bg); }
    .tvs-tvpick h2 { margin: 0 0 10px; font-size: 18px; font-weight: 800; color: var(--text); }
    .tvs-tvpick ul { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); margin: 0; padding: 0; list-style: none; }
    .tvs-tvpick__ch { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
    .tvs-tvpick__ch.is-on { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
    .tvs-tvpick__logo { display: flex; align-items: center; justify-content: center; width: 72px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--logo-bg); border: 1px solid var(--logo-line); color: var(--logo-fg); font-weight: 800; font-size: 13px; }
    .tvs-tvpick__logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
    .tvs-tvpick__nm { max-width: 100%; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* -- the sheet (phones, and every page that is not the TV page) ------------ */
.tvs-drawer--float {
    position: fixed;
    z-index: 100004;
    top: calc(var(--tvs-hdr) + var(--wp-admin--admin-bar--height, 0px));
    bottom: 0;
    inset-inline-start: 0;
    width: min(400px, 92vw);
    border-inline-end: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateX(calc(-100% * var(--tvs-dir, 1)));
    visibility: hidden;
    transition: transform .22s var(--tvs-ease), visibility 0s .22s;
}
[dir="rtl"] .tvs-drawer--float { --tvs-dir: -1; }
html[data-drawer="open"] .tvs-drawer--float { transform: none; visibility: visible; transition: transform .22s var(--tvs-ease); }
.tvs-backdrop { position: fixed; inset: 0; z-index: 100003; background: var(--scrim); }
.tvs-backdrop[hidden] { display: none; }
html.tvs-sheet-open, html.tvs-sheet-open body { overflow: hidden; }

@media (max-width: 899px) {
    .tvs-app, html[data-drawer="open"] .tvs-app { grid-template-columns: minmax(0, 1fr); }
    /* On a phone the ads go under the screen, never beside it. */
    .tvs-app--ads { height: auto; grid-template-rows: calc(100dvh - var(--tvs-hdr) - var(--wp-admin--admin-bar--height, 0px)) auto; }
    .tvs-ads, .tvs-app:not([data-ads="on"]) .tvs-ads { grid-column: 1; grid-row: 2; visibility: visible; padding: 12px; border: 0; border-top: 1px solid var(--line); }
    .tvs-drawer--float,
    .tvs-app .tvs-drawer--dock {
        position: fixed;
        z-index: 100004;
        inset-inline: 0;
        top: auto;
        bottom: 0;
        width: auto;
        height: min(78dvh, 680px);
        max-height: calc(100dvh - 40px);
        border: 1px solid var(--line);
        border-bottom: 0;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, .45);
        padding-bottom: env(safe-area-inset-bottom);
        transform: translateY(105%);
        visibility: hidden;
        transition: transform .24s var(--tvs-ease), visibility 0s .24s;
    }
    html[data-drawer="open"] .tvs-drawer--float,
    html[data-drawer="open"] .tvs-app .tvs-drawer--dock { transform: none; visibility: visible; transition: transform .24s var(--tvs-ease); }
    .tvs-drawer__grip { display: block; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--line-2); }
    .tvs-chbtn span { display: inline; }
}
@media (max-width: 380px) { .tvs-chbtn span { display: none; } }

@media (prefers-reduced-motion: reduce) {
    .tvs-app, .tvs-drawer, .tvs-drawer--float, .tvs-app .tvs-drawer--dock { transition: none !important; }
}

/* -- the wall in the light scheme ------------------------------------------
   Its controls follow the page; the pictures stay on black. */
[data-theme="light"] #stv_wrap .stv_hd { background: var(--surface); border-bottom-color: var(--line); color: var(--text); }
[data-theme="light"] #stv_wrap .stv_ttl { color: var(--text); }
[data-theme="light"] #stv_wrap .stv_hbtn { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
[data-theme="light"] #stv_wrap .stv_hbtn:hover,
[data-theme="light"] #stv_wrap .stv_hbtn.stv_act,
[data-theme="light"] #stv_wrap .stv_hbtn.stv_hbtn_on { background: var(--accent-bg); border-color: var(--accent); color: var(--text); }
[data-theme="light"] #stv_wrap .stv_vmenu { background: var(--surface); border-color: var(--line-2); color: var(--text); box-shadow: var(--shadow); }
[data-theme="light"] #stv_wrap .stv_vmenu button { color: var(--text); }
[data-theme="light"] #stv_wrap .stv_strip { background: var(--surface-2); }
[data-theme="light"] #stv_wrap .stv_strip_b { border-color: var(--line-2); }
[data-theme="light"] #stv_wrap .stv_picker { background: var(--surface); color: var(--text); border-color: var(--line); }
[data-theme="light"] #stv_wrap .stv_pick_hd input { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
[data-theme="light"] #stv_wrap .stv_cat { background: transparent; border-color: var(--line-2); color: var(--text-2); }
[data-theme="light"] #stv_wrap .stv_kind { color: var(--text-2); }
[data-theme="light"] #stv_wrap.stv_mode_compact { border-color: var(--line-2); }
#stv_wrap.stv_inline { font-family: var(--tvs-font); }

/* -- blog and pages -------------------------------------------------------- */
.tvs-wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.tvs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-block: 32px 48px; }
.tvs-no-sidebar .tvs-layout { grid-template-columns: minmax(0, 860px); justify-content: center; }
@media (max-width: 1023px) { .tvs-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 20px 36px; } }
.tvs-full { padding-block: 0; }

.tvs-page-title, .tvs-entry__title { margin: 0 0 18px; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.2; letter-spacing: -.01em; }
.tvs-entry {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--tvs-radius);
    padding: clamp(18px, 3vw, 36px);
}
.tvs-entry--full { background: none; border: 0; border-radius: 0; padding: 0; }
.tvs-entry__hd { margin-bottom: 18px; }
.tvs-entry__img { margin: 0 0 22px; }
.tvs-entry__img img { border-radius: 10px; width: 100%; }
.tvs-entry__content > * { margin-block: 0 1.1em; }
.tvs-entry__content h2, .tvs-entry__content h3 { line-height: 1.3; margin-block: 1.6em .6em; }
.tvs-entry__content blockquote { margin-inline: 0; padding-inline-start: 18px; border-inline-start: 4px solid var(--accent); color: var(--text-2); }
.tvs-entry__content pre, .tvs-entry__content code { background: var(--surface-2); border-radius: 6px; }
.tvs-entry__content pre { padding: 14px; overflow: auto; }
.tvs-entry__content code { padding: .1em .35em; }
.tvs-entry__content table { width: 100%; border-collapse: collapse; }
.tvs-entry__content th, .tvs-entry__content td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; }
.alignwide { width: min(1100px, 100vw - 32px); max-width: none; margin-inline: calc(50% - min(550px, 50vw - 16px)); }
.alignfull { width: 100vw; max-width: none; margin-inline: calc(50% - 50vw); }
.alignleft { float: left; margin-inline-end: 1.2em; }
.alignright { float: right; margin-inline-start: 1.2em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, figcaption { color: var(--text-3); font-size: 14px; }
.tvs-meta { color: var(--text-3); font-size: 14px; }
.tvs-meta a { color: inherit; }
.tvs-tags a { display: inline-block; margin: 0 6px 6px 0; padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); font-size: 13px; text-decoration: none; }

.tvs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.tvs-card {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--tvs-radius);
    overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tvs-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.tvs-card__img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tvs-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.tvs-card__title { margin: 0; font-size: 19px; line-height: 1.35; }
.tvs-card__title a { color: var(--text); text-decoration: none; }
.tvs-card__title a:hover { color: var(--accent); }
.tvs-card__excerpt { color: var(--text-2); font-size: 15px; }
.tvs-card__excerpt p { margin: 0; }

.navigation.pagination { margin-top: 28px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; height: 44px; padding: 0 12px;
    border: 1px solid var(--line-2); border-radius: 10px;
    color: var(--text); text-decoration: none; font-weight: 600;
}
.page-numbers.current { background: var(--tvs-accent); border-color: var(--tvs-accent); color: #fff; }
.post-navigation .nav-links { justify-content: space-between; margin-top: 22px; }
.post-navigation a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; }

.tvs-sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--tvs-radius); padding: 18px 20px; }
.widget-title { margin: 0 0 12px; font-size: 16px; font-weight: 800; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--text); text-decoration: none; }
.widget a:hover { color: var(--accent); }
/* The plugin's own widget sits naturally in the sidebar. */
.widget.stv_wp_widget .stv_wp_wlist a { background: var(--surface-2); color: var(--text) !important; }
.widget.stv_wp_widget .stv_wp_wlist img { background: var(--logo-bg); border: 1px solid var(--logo-line); border-radius: 6px; }

input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"]:not(.tvs-search__q), input[type="number"], textarea, select {
    width: 100%; min-height: 44px; padding: 10px 12px;
    border: 1px solid var(--line-2); border-radius: 10px;
    background: var(--surface-2); color: var(--text); font: inherit;
}
textarea { min-height: 120px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1 1 auto; }

.tvs-comments { margin-top: 28px; }
.tvs-comments__list { margin: 0 0 24px; padding: 0; list-style: none; }
.tvs-comments__list .comment-body { padding: 14px 16px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.tvs-comments__list .children { list-style: none; padding-inline-start: 22px; }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-inline-end: 8px; }
.comment-metadata, .comment-metadata a { color: var(--text-3); font-size: 13px; }
.comment-respond { background: var(--surface); border: 1px solid var(--line); border-radius: var(--tvs-radius); padding: 20px; }
.sticky .tvs-card__title::before { content: "★ "; color: #f5b301; }

/* -- footer ---------------------------------------------------------------- */
.tvs-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
.tvs-footer__widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; padding-block: 28px 8px; }
.tvs-footer__widgets .widget { background: transparent; border: 0; padding: 0; }
.tvs-footer__cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; padding-block: 30px 22px; }
.tvs-footer__name { display: inline-block; margin-bottom: 8px; color: var(--text); font-size: 20px; font-weight: 900; text-decoration: none; }
.tvs-footer__about p, .tvs-footer__note p { margin: 0; font-size: 14px; line-height: 1.7; }
.tvs-footer__col h2 { margin: 0 0 10px; color: var(--text); font-size: 15px; font-weight: 800; }
.tvs-footer__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.tvs-footer__col ul.tvs-footer__two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.tvs-footer__col a, .tvs-footer__info a { color: var(--text-2); text-decoration: none; }
.tvs-footer__col a:hover, .tvs-footer__info a:hover, .tvs-footer__nav a:hover { color: var(--accent); text-decoration: underline; }
.tvs-footer__note .tvs-footer__nav { margin-top: 10px; }
.tvs-footer__info { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 900px) { .tvs-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tvs-footer__cols { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.tvs-footer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-block: 14px calc(14px + env(safe-area-inset-bottom)); font-size: 13.5px; }
.tvs-footer__bar p { margin: 0; }
.tvs-footer__nav ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.tvs-footer__nav a { color: var(--text-2); text-decoration: none; }
.tvs-tv .tvs-footer { display: none; }
.tvs-tv .tvs-under + .tvs-footer, .tvs-tv.tvs-show-footer .tvs-footer { display: block; }
