/* TVNova v3 — публичный сайт */
:root {
    color-scheme: dark;
    --bg: #12141f;
    --surface: #1a1d2b;
    --surface2: #232739;
    --border: rgba(255, 255, 255, .08);
    --border-strong: rgba(255, 255, 255, .16);
    --text: #eef0f7;
    --muted: #9aa0b8;
    --faint: #6d7390;
    --accent: #8b7cff;
    --accent-ink: #ffffff;
    --accent-soft: rgba(139, 124, 255, .16);
    --live: #ff5d73;
    --ok: #3fd69a;
    --warn: #f3b847;
    --track: rgba(255, 255, 255, .09);
    --shadow: 0 12px 40px rgba(0, 0, 0, .35);
    --header-bg: rgba(18, 20, 31, .88);
    --r-lg: 18px;
    --r-md: 12px;
    --r-sm: 8px;
    --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --display: "Unbounded", "Onest", system-ui, sans-serif;
    --wrap: 1280px;
}
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f3f4f8;
    --surface: #ffffff;
    --surface2: #eceef5;
    --border: rgba(20, 24, 50, .09);
    --border-strong: rgba(20, 24, 50, .18);
    --text: #161a2c;
    --muted: #5d6380;
    --faint: #8a8fa8;
    --accent: #5b48e8;
    --accent-soft: rgba(91, 72, 232, .1);
    --live: #e5364f;
    --ok: #0d9e66;
    --warn: #b97800;
    --track: rgba(20, 24, 50, .1);
    --shadow: 0 10px 30px rgba(30, 35, 70, .12);
    --header-bg: rgba(243, 244, 248, .9);
}
:root[data-theme="oled"] {
    --bg: #000;
    --surface: #0d0d12;
    --surface2: #17171f;
    --border: rgba(255, 255, 255, .09);
    --header-bg: rgba(0, 0, 0, .9);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "tnum" 0;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.tnum, time { font-variant-numeric: tabular-nums; }
.wrap { width: min(var(--wrap), calc(100% - 32px)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip-link:focus { top: 12px; }

/* ---------- Шапка ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--header-bg);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 22px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; letter-spacing: -.4px; white-space: nowrap; }
.logo:hover { color: var(--text); }
.logo-mark {
    width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
    background: var(--accent); color: #fff;
}
.logo-mark svg { width: 16px; height: 16px; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--muted); font-size: 15px; font-weight: 500; }
.main-nav a:hover { color: var(--text); background: var(--surface2); }
.main-nav a[aria-current="page"] { color: var(--text); background: var(--surface2); }

.header-search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.header-search input {
    width: 100%; height: 40px; padding: 0 14px 0 38px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px; outline: none;
}
.header-search input:focus { border-color: var(--accent); }
.header-search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.suggest {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px);
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md);
    box-shadow: var(--shadow); overflow: hidden; z-index: 60; max-height: 70vh; overflow-y: auto;
}
.suggest[hidden] { display: none; }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.suggest a:hover, .suggest a.is-active { background: var(--surface2); color: var(--text); }
.suggest .s-logo { width: 34px; height: 34px; flex: 0 0 34px; }
.suggest .s-title { font-weight: 600; font-size: 14px; }
.suggest .s-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .s-group { padding: 8px 12px 4px; font-size: 12px; color: var(--faint); }
.suggest .s-all { justify-content: center; color: var(--accent); font-weight: 600; font-size: 14px; border-top: 1px solid var(--border); }

.icon-btn {
    width: 40px; height: 40px; display: inline-grid; place-items: center; flex: 0 0 40px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

.theme-menu { position: relative; }
.theme-menu .menu {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; padding: 6px;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow);
}
.theme-menu .menu[hidden] { display: none; }
.theme-menu .menu button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none;
    border-radius: var(--r-sm); cursor: pointer; text-align: left; font-size: 14px;
}
.theme-menu .menu button:hover { background: var(--surface2); }
.theme-menu .menu button[aria-checked="true"] { color: var(--accent); font-weight: 600; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border-strong); }

/* ---------- Общие блоки ---------- */
main { min-height: 60vh; }
.page-head { padding: 28px 0 8px; }
.page-head h1 {
    font-family: var(--display); font-weight: 600; letter-spacing: -.02em;
    font-size: clamp(24px, 3.4vw, 38px); line-height: 1.15; margin: 0 0 8px; max-width: 26ch;
}
.page-head .lead { color: var(--muted); max-width: 62ch; margin: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--faint); padding-top: 18px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span[aria-hidden] { opacity: .6; }

.section { padding: 26px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-title h2 { font-size: 21px; letter-spacing: -.01em; margin: 0; }
.section-title .more { color: var(--accent); font-size: 14px; font-weight: 600; white-space: nowrap; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
    font-size: 14px; font-weight: 500;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-current="true"], .chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .n { color: var(--faint); font-size: 12px; }
.chip[aria-current="true"] .n, .chip.is-on .n { color: rgba(255, 255, 255, .75); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 14px; }
.toolbar .count { color: var(--muted); font-size: 14px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.seg a { padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--muted); font-weight: 500; }
.seg a[aria-current="true"] { background: var(--surface2); color: var(--text); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border-strong);
    background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer;
}
.btn:hover { color: var(--text); border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Логотип канала ----------
 * Логотипы из EPG рисуются под тёмный фон (часто белый текст на прозрачном PNG).
 *   тёмная/OLED — сплошная тёмная подложка, фильтр не нужен;
 *   светлая — светлая подложка, а белые надписи читаются за счёт тонкого тёмного контура (drop-shadow).
 * Без градиентов: сплошной цвет + рамка.
 */
:root {
    --logo-bg: #141a24;
    --logo-ring: inset 0 0 0 1px rgba(255, 255, 255, .07);
    --logo-filter: none;
    --logo-fallback: rgba(255, 255, 255, .7);
}
:root[data-theme="light"] {
    --logo-bg: #f7f8f9;
    --logo-ring: inset 0 0 0 1px rgba(69, 91, 132, .14), 0 1px 2px rgba(20, 30, 60, .08);
    /* Тонкий тёмный контур делает белые надписи читаемыми на светлой подложке.
       Более лёгкий вариант: подложка #e9edf4 и контур rgba(52,62,82,.23) / rgba(52,62,82,.7) / rgba(20,30,60,.18). */
    --logo-filter: drop-shadow(0 0 .7px rgba(40, 50, 72, .22)) drop-shadow(0 0 .7px rgba(40, 50, 72, .15)) drop-shadow(0 1px 1px rgba(20, 30, 60, .25));
    --logo-fallback: var(--muted);
}
:root[data-theme="oled"] {
    --logo-bg: #0b0e14;
    --logo-ring: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.ch-logo {
    position: relative; display: grid; place-items: center; overflow: hidden; flex: 0 0 auto;
    background: var(--logo-bg); border-radius: var(--r-md);
    box-shadow: var(--logo-ring);
}
.ch-logo img {
    width: 100%; height: 100%; object-fit: contain; padding: 12%;
    filter: var(--logo-filter);
}
.ch-logo .fallback {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: transparent; color: var(--logo-fallback); font-weight: 800; font-size: 1.1em;
}
.ch-logo img + .fallback { display: none; }
.ch-logo.broken img { display: none; }
.ch-logo.broken .fallback { display: grid; }

/* ---------- Сетка каналов ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(232px, 100%), 1fr)); gap: 12px; }
.card {
    position: relative; display: flex; flex-direction: column; gap: 12px; padding: 14px; min-width: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    transition: border-color .15s;
}
.card:hover { border-color: var(--border-strong); color: var(--text); }
.card-top { display: flex; align-items: center; gap: 12px; min-width: 0; padding-right: 26px; }
.card .ch-logo { width: 54px; height: 54px; }
.card-name { font-weight: 700; font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--faint); font-size: 12px; margin-top: 3px; }
.badge { display: inline-block; white-space: nowrap; padding: 1px 6px; border-radius: 5px; font-size: 11px; font-weight: 700; background: var(--surface2); color: var(--muted); }
.badge-hd { color: var(--accent); background: var(--accent-soft); }
.now { min-height: 58px; }
.now-title { font-size: 14px; font-weight: 500; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.now-title.empty { color: var(--faint); }
.progress { height: 4px; border-radius: 4px; background: var(--track); margin-top: 9px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--live); border-radius: inherit; }
.now-times { display: flex; justify-content: space-between; gap: 8px; color: var(--faint); font-size: 12px; margin-top: 6px; }
.next-line { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-top: 1px solid var(--border); padding-top: 10px; }
.next-line b { color: var(--faint); font-weight: 500; }
.fav-toggle {
    position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%;
    background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; z-index: 2;
}
.fav-toggle:hover { color: var(--live); background: var(--surface2); }
.fav-toggle[aria-pressed="true"] { color: var(--live); }
.fav-toggle svg { width: 17px; height: 17px; }
.card .stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }

/* компактная строка канала (избранное, недавние) */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 170px); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.rail-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); text-align: center; }
.rail-item .ch-logo { width: 64px; height: 64px; }
.rail-item .nm { font-weight: 600; font-size: 13px; line-height: 1.3; }
.rail-item .pg { color: var(--muted); font-size: 12px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 26px 0 8px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; }
.pagination [aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); }

.empty { padding: 48px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); }
.empty h2, .empty h3 { margin: 0 0 6px; }
.empty p { color: var(--muted); margin: 0 auto 16px; max-width: 46ch; }

/* ---------- Главная ---------- */
.home-hero { padding: 34px 0 6px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; }
.home-hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 4vw, 46px); line-height: 1.1; letter-spacing: -.025em; margin: 0 0 12px; max-width: 18ch; }
.home-hero p { color: var(--muted); max-width: 56ch; margin: 0; font-size: 17px; }
.clock { text-align: right; }
.clock .t { font-family: var(--display); font-size: clamp(34px, 5vw, 58px); line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; }
.clock .d { color: var(--muted); font-size: 14px; margin-top: 6px; }
.clock .live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--live); margin-right: 8px; vertical-align: middle; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .clock .live-dot { animation: none; } }

.collections { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.collection { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.collection .ic { font-size: 24px; line-height: 1; }
.collection .nm { font-weight: 700; font-size: 15px; }
.collection .n { color: var(--faint); font-size: 12px; }

.seo-text { color: var(--muted); max-width: 75ch; font-size: 15px; }
.seo-text h2 { color: var(--text); font-size: 19px; margin: 0 0 10px; }
.seo-text h3 { color: var(--text); font-size: 16px; margin: 20px 0 6px; }
.seo-text p { margin: 0 0 12px; }
.faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); }
.faq details p { margin: 8px 0 0; }

/* ---------- Страница канала ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; padding-top: 14px; }
.watch-head { display: flex; align-items: center; gap: 14px; margin: 12px 0 14px; }
.watch-head .ch-logo { width: 58px; height: 58px; }
.watch-head h1 { font-size: clamp(20px, 2.6vw, 28px); line-height: 1.2; margin: 0; letter-spacing: -.015em; }
.watch-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.watch-head .actions { margin-left: auto; display: flex; gap: 8px; }

.player {
    position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-lg); overflow: hidden;
    box-shadow: var(--shadow);
}
.player video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.player-overlay {
    position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
    background: rgba(0, 0, 0, .55); color: #fff; z-index: 3;
}
.player-overlay[hidden] { display: none; }
.player-overlay p { margin: 10px 0 14px; max-width: 40ch; color: rgba(255, 255, 255, .85); }
.player-overlay .btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }
.player-overlay .btn-primary { background: var(--accent); border-color: var(--accent); }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.unmute {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4;
    display: inline-flex; gap: 10px; align-items: center;
    padding: 16px 26px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .85);
    background: rgba(0, 0, 0, .72); color: #fff; font-size: 18px; font-weight: 700; cursor: pointer;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
}
.unmute:hover { background: var(--accent); border-color: var(--accent); }
.unmute[hidden] { display: none; }
.unmute svg { width: 22px; height: 22px; }

.player-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; }
.source {
    display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
    border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500;
}
.source:hover { border-color: var(--border-strong); }
.source[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.source .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.source .dot.working { background: var(--ok); }
.source .dot.unstable { background: var(--warn); }
.source.failed { opacity: .5; text-decoration: line-through; }
.player-tools { margin-left: auto; display: flex; gap: 6px; }
.player-tools .icon-btn { width: 36px; height: 36px; flex-basis: 36px; }
.report-note { color: var(--muted); font-size: 13px; }

.now-panel { margin-top: 18px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.now-panel .lbl { display: inline-flex; align-items: center; gap: 7px; color: var(--live); font-size: 13px; font-weight: 700; }
.now-panel .lbl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.now-panel h2.lbl { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.4; }
.now-panel .now-name { margin: 4px 0 2px; font-size: 19px; line-height: 1.3; }
.today { margin-top: 18px; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.today h2 { font-size: 17px; margin: 0 0 6px; }
.today p { margin: 0; color: var(--muted); line-height: 1.65; max-width: 72ch; }
.today p time { color: var(--text); font-weight: 600; }
.overlay-title { font-size: 20px; font-weight: 700; margin: 0 !important; color: #fff !important; }
.now-source { color: var(--muted); font-size: 13px; }
.now-source b { color: var(--text); font-weight: 600; }
.now-panel .desc { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

.schedule { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.schedule-head { padding: 14px 16px 0; }
.schedule-head h2 { font-size: 17px; margin: 0 0 10px; }
.schedule-head h2 a:hover { color: var(--accent); }
.day-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.day-tabs a, .day-tabs button {
    flex: 0 0 auto; padding: 6px 10px; border-radius: var(--r-sm); font-size: 13px; color: var(--muted);
    border: 0; background: none; cursor: pointer; text-align: center; line-height: 1.25;
}
.day-tabs [aria-selected="true"], .day-tabs [aria-current="true"] { background: var(--surface2); color: var(--text); font-weight: 600; }
.day-tabs small { display: block; font-size: 11px; color: var(--faint); }
.prog-list { list-style: none; margin: 0; padding: 6px 0; }
.watch .prog-list { max-height: 640px; overflow-y: auto; scrollbar-width: thin; }
.prog { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 9px 16px; position: relative; }
.prog time { color: var(--muted); font-size: 14px; padding-top: 1px; }
.prog .t { font-size: 14px; line-height: 1.4; }
.prog .c { color: var(--faint); font-size: 12px; }
.prog .d { color: var(--muted); font-size: 13px; margin-top: 4px; }
.prog-more summary { cursor: pointer; list-style: none; }
.prog-more summary::-webkit-details-marker { display: none; }
.prog-more summary::after { content: " +"; color: var(--faint); font-weight: 400; }
.prog-more[open] summary::after { content: " −"; }
.prog-more summary:hover { color: var(--accent); }
.tz-note { color: var(--faint); font-size: 12px; margin: -4px 0 8px; }
.lead .tz-note { display: block; margin: 4px 0 0; font-size: 13px; }
.prog.past { opacity: .5; }
.prog.current { background: var(--accent-soft); }
.prog.current::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--live); }
.prog.current time { color: var(--live); font-weight: 700; }
.prog.current .t { font-weight: 700; }
.prog .progress { margin-top: 7px; }
.prog-empty { padding: 26px 16px; color: var(--muted); font-size: 14px; }
.programme-page .prog { grid-template-columns: 64px minmax(0, 1fr); padding: 12px 18px; }

.about { margin-top: 24px; color: var(--muted); max-width: 75ch; }
.about h2 { color: var(--text); font-size: 18px; margin: 0 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ---------- Телепрограмма (все каналы) ---------- */
.guide { display: grid; gap: 8px; }
.guide-row {
    display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr); gap: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
}
.guide-ch { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-right: 1px solid var(--border); min-width: 0; }
.guide-ch .ch-logo { width: 40px; height: 40px; border-radius: var(--r-sm); }
.guide-ch .nm { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-cell { padding: 10px 14px; min-width: 0; font-size: 14px; }
.guide-cell + .guide-cell { border-left: 1px solid var(--border); color: var(--muted); }
.guide-cell time { color: var(--faint); font-size: 12px; margin-right: 6px; }
.guide-cell .tt { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-cell.now-cell time { color: var(--live); font-weight: 700; }

/* ---------- Статичные страницы ---------- */
.prose { max-width: 70ch; color: var(--muted); }
.prose h2 { color: var(--text); font-size: 20px; margin: 28px 0 8px; }
.prose a { color: var(--accent); }
.contact-card { display: inline-flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin: 8px 0 16px; }
.contact-card a { font-size: 20px; font-weight: 700; color: var(--accent); }

/* ---------- Подвал ---------- */
.site-footer { margin-top: 48px; border-top: 1px solid var(--border); padding: 28px 0 36px; color: var(--muted); font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.footer-cols h3 { color: var(--text); font-size: 14px; margin: 0 0 10px; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-cols p { margin: 8px 0 0; max-width: 40ch; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--faint); font-size: 13px; }
.footer-bottom a { color: var(--muted); }

.toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90;
    background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
}
.toast[hidden] { display: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
    .watch { grid-template-columns: minmax(0, 1fr); }
    .watch .prog-list { max-height: 460px; }
    .main-nav a { padding: 8px 9px; }
}
@media (max-width: 860px) {
    .menu-btn { display: inline-grid; }
    .main-nav {
        display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; gap: 2px;
        padding: 10px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px; font-size: 16px; }
    .header-row { gap: 10px; }
    .header-search { max-width: none; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .guide-row { grid-template-columns: 1fr; }
    .guide-ch { border-right: 0; border-bottom: 1px solid var(--border); }
    .guide-cell + .guide-cell { border-left: 0; border-top: 1px solid var(--border); }
    .home-hero { grid-template-columns: 1fr; }
    .clock { text-align: left; display: flex; align-items: baseline; gap: 12px; }
}
@media (max-width: 560px) {
    .wrap { width: calc(100% - 32px); }
    .logo-text { display: none; }
    .grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .sources { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }
    .source { flex: 0 0 auto; }
    .card { padding: 12px; gap: 10px; }
    .now { min-height: 0; }
    .player { border-radius: 0; margin-inline: -16px; }
    .watch-head .actions .btn span { display: none; }
    .footer-cols { grid-template-columns: 1fr; }
    .player-tools { margin-left: 0; }
}
