/* BGPVR TV App v2 — shared Smart TV player */

:root {
  --surface:      #1A1A2E;
  --surface-var:  #16213E;
  --card-bg:      #0F3460;
  --primary:      #1565C0;
  --accent:       #42A5F5;
  --live-red:     #E53935;
  --success:      #43A047;
  --text:         #FFFFFF;
  --text-muted:   #B0BEC5;
  --divider:      rgba(255,255,255,0.07);
  --focus-ring:   rgba(66,165,245,0.4);
  --nav-h:        56px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%; overflow: hidden;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── Utility ──────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(255,255,255,0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}
.spinner.sm { width: 20px; height: 20px; border-width: 2px; }
.spinner.lg { width: 48px; height: 48px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

.v-divider { width: 1px; background: var(--divider); flex-shrink: 0; }

/* ── Login ────────────────────────────────────────────────────────────────── */
.login-screen {
  position: fixed; top:0; right:0; bottom:0; left:0;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.login-lang-toggle {
  position: absolute; top: 12px; right: 14px;
  display: flex; gap: 5px;
}
.login-lang-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; padding: 3px 9px;
  font-size: 12px; cursor: pointer; color: #8899bb;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  outline: none;
}
.login-lang-btn.active { background: rgba(0,212,255,0.15); border-color: #00d4ff; color: #fff; }
.login-lang-btn:focus  { border-color: #00d4ff; color: #fff; }
@media (pointer: coarse) { .login-lang-btn { min-height: 44px; } }

.login-card {
  width: min(440px, calc(100vw - 40px));
  position: relative;
  background: var(--surface-var);
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 38px 36px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.32);
}
.login-logo   { height: 44px; margin-bottom: 8px; }
.login-title { font-size: 22px; line-height: 1.15; letter-spacing: 0; text-align: center; }
.login-tagline { color: var(--text-muted); font-size: 14px; line-height: 1.45; text-align: center; margin-bottom: 4px; }
.login-err    { color: var(--live-red); font-size: 13px; text-align: center; background: rgba(229,57,53,0.1); border: 1px solid rgba(229,57,53,0.25); border-radius: 8px; padding: 8px 14px; width: 100%; }
.manual-login {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.login-input  {
  width: 100%; height: 44px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--divider);
  color: var(--text); font-family: inherit; font-size: 14px;
  padding: 0 14px; outline: none;
  transition: border-color 0.15s;
}
.login-input:focus { border-color: var(--accent); }
.login-input::placeholder { color: var(--text-muted); }
.login-btn {
  width: 100%; height: 46px; border-radius: 8px;
  background: var(--primary); color: #fff;
  border: none; font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.15s;
  margin-top: 4px;
}
.login-btn:hover  { background: #1976D2; }
.login-btn:active { background: #0D47A1; }
.login-btn:disabled { opacity: 0.6; cursor: default; }
.login-note { color: var(--text-muted); font-size: 11px; text-align: center; }

/* ── Splash ───────────────────────────────────────────────────────────────── */
.splash {
  position: fixed; top:0; right:0; bottom:0; left:0; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  z-index: 99;
}
.splash-logo    { height: 52px; }
.splash-msg     { color: var(--text-muted); font-size: 13px; }

/* ── App shell ────────────────────────────────────────────────────────────── */
.app {
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh; overflow: hidden;
}

/* ── Nav bar ──────────────────────────────────────────────────────────────── */
.navbar {
  height: var(--nav-h); flex-shrink: 0;
  background: var(--surface-var);
  border-bottom: 1px solid var(--divider);
  display: flex; align-items: center;
  padding: 0 12px 0 16px; gap: 0;
  z-index: 50;
}
.nb-brand { flex-shrink: 0; margin-right: 16px; display: flex; align-items: center; gap: 9px; }
.nb-logo  { height: 32px; display: block; }
.nb-product {
  color: var(--text-muted); font-size: 12px; font-weight: 700;
  letter-spacing: 0; padding: 3px 7px; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; white-space: nowrap;
}

.nb-tabs {
  flex: 1; display: flex; align-items: center;
  overflow-x: auto; gap: 2px;
  scrollbar-width: none;
}
.nb-tabs::-webkit-scrollbar { display: none; }

.nbtab {
  height: 40px; padding: 0 14px;
  display: flex; align-items: center; gap: 7px;
  background: none; border: none;
  color: var(--text-muted); font-family: inherit;
  font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nbtab i { font-size: 14px; }
.nbtab:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nbtab.active { color: var(--accent); background: rgba(66,165,245,0.1); font-weight: 600; }
.nbtab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 10px; right: 10px;
  height: 2px; background: var(--accent); border-radius: 1px;
}
.nbtab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.nb-right  { flex-shrink: 0; margin-left: 12px; }
.nb-clock  { color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.nb-user {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text-muted);
  margin-right: 14px;
}
.nb-user i { font-size: 12px; }
.nb-expiry {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  border: 1px solid transparent; border-radius: 6px;
  padding: 2px 8px; margin-right: 12px;
}
.nb-expiry--alert { background: color-mix(in srgb, currentColor 12%, transparent); }
.nb-weather {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-right: 10px;
}
.nb-weather i { font-size: 14px; }

/* ── Sections container ───────────────────────────────────────────────────── */
.sections {
  flex: 1; overflow: hidden; position: relative; min-height: 0;
}
.section {
  position: absolute; top:0; right:0; bottom:0; left:0;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ── Shared player wrap (moved to slots via JS) ──────────────────────────── */
.shared-player-wrap {
  position: absolute; top: -9999px; left: -9999px;
  width: 100%; height: 100%; background: #000;
}
.player-slot {
  flex: 1; min-width: 0; position: relative; background: #000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* When moved into slot, fill it */
.player-slot .shared-player-wrap,
.player-slot > .shared-player-wrap {
  position: absolute; top:0; right:0; bottom:0; left:0; top: 0; left: 0; width: 100%; height: 100%;
}

#live-player.video-js {
  position: absolute !important;
  top:0 !important; right:0 !important; bottom:0 !important; left:0 !important;
  width: 100% !important; height: 100% !important;
}

.player-ph {
  position: absolute; top:0; right:0; bottom:0; left:0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--text-muted); pointer-events: none; z-index: 2;
  background: var(--surface);
}
.player-ph i    { font-size: 52px; color: var(--accent); opacity: 0.7; }
.player-ph span { font-size: 15px; }

.buf-spin {
  position: absolute; top:0; right:0; bottom:0; left:0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

.stream-err {
  position: absolute; top:0; right:0; bottom:0; left:0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; background: rgba(0,0,0,0.8);
}
.stream-err i    { font-size: 36px; color: var(--text-muted); }
.stream-err span { color: var(--text-muted); font-size: 14px; }
.err-name        { font-size: 16px; font-weight: 700; color: #fff; }
.retry-btn {
  margin-top: 6px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px; padding: 9px 22px;
  font-family: inherit; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.retry-btn:hover { background: #1976D2; }

.player-actions {
  position: absolute; bottom: 14px; right: 14px; z-index: 100;
  display: flex;
  opacity: 1; transition: opacity 0.2s;   /* always visible — TV remotes have no hover */
  pointer-events: auto;
}
.pact-btn + .pact-btn { margin-left: 12px; }   /* no flex gap on old webOS */
.pact-btn {
  height: 48px; min-width: 48px; padding: 0 16px;
  background: rgba(0,0,0,0.6); color: #fff;
  border: 1px solid rgba(255,255,255,0.22); border-radius: 10px;
  font-family: inherit; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  backdrop-filter: blur(8px);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.pact-btn i { font-size: 18px; }
.pact-btn:hover,
.pact-btn:focus { background: rgba(21,101,192,0.75); border-color: var(--accent); outline: none; transform: scale(1.06); }
.pact-btn:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
/* Phone width: six bar buttons (Quality, Sound & subtitles, CC, Record, Stop, Fullscreen) must fit; targets stay 44 px */
@media (max-width: 480px) {
  .pact-btn + .pact-btn { margin-left: 6px; }
  .pact-btn { min-width: 44px; padding: 0 10px; }
}
/* Record: neutral until a recording is actually running, then solid red + pulse
   — so it's unmistakable and never confused with the Stop button. */
#live-record i, #live-stop i { color: #fff; }
#live-record.recording { background: #e53935; border-color: #ff6b67; animation: recpulse 1.4s ease-in-out infinite; }
@keyframes recpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(229,57,53,.55); } 50% { box-shadow: 0 0 0 7px rgba(229,57,53,0); } }

/* Quality (2.9.393): the button shows the version on screen; its in-page menu sits mid-player (clear of the docked
   buttons and the info bar in fullscreen). Old-engine rules: no flex gap, no grid. */
#live-quality { font-weight: 700; letter-spacing: 0.04em; }
.q-menu {
  position: absolute; top: 50%; left: 50%; z-index: 110; transform: translate(-50%, -50%);
  min-width: 200px; padding: 8px;
  background: rgba(13,17,23,0.94); border: 1px solid rgba(240,246,252,0.18); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.q-title { padding: 6px 12px 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.q-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 48px; padding: 0 14px; margin-top: 4px;
  background: transparent; color: #fff; border: 1px solid transparent; border-radius: 8px;
  font-family: inherit; font-size: 16px; font-weight: 700; letter-spacing: 0.04em; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.q-item:hover, .q-item:focus, .q-item.tv-hover { background: rgba(21,101,192,0.75); border-color: var(--accent); outline: none; }
.q-item:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
.q-tick { visibility: hidden; margin-left: 16px; font-size: 15px; color: var(--accent); }
/* Sound & subtitles (s3097): the Quality menu's look; up to 4 + 4 tracks scroll inside a small player, long names shorten */
.tr-menu { min-width: 240px; max-width: calc(100% - 24px); max-height: calc(100% - 24px); overflow-y: auto; overscroll-behavior: contain; }
.tr-menu .q-item { font-weight: 600; letter-spacing: 0; -webkit-user-select: none; user-select: none; }
.tr-menu [role="group"] + .q-title { margin-top: 8px; }
.q-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-item.on .q-tick { visibility: visible; }
.q-item.on:hover .q-tick, .q-item.on:focus .q-tick { color: #fff; }
/* the qualities of a channel with versions, in its list tile */
.ch-q { flex-shrink: 0; padding: 2px 5px; font-size: 10px; font-weight: 700; white-space: nowrap;
        color: var(--text-muted); border: 1px solid rgba(255,255,255,0.2); border-radius: 4px; }

/* ── EPG strip (bottom of player) ────────────────────────────────────────── */
.epg-strip {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 6;
  background: var(--surface-var);
  border-top: 1px solid var(--divider);
  display: flex; flex-direction: column; height: 200px;
}
/* Browse mode with the EPG strip open: reserve its height below the video so
   the schedule never covers the picture (fullscreen hides the strip and the
   overrides further down reset these). */
.shared-player-wrap.epg-open #live-player.video-js { top:0 !important; right:0 !important; bottom:200px !important; left:0 !important; }
.shared-player-wrap.epg-open .player-ph,
.shared-player-wrap.epg-open .buf-spin,
.shared-player-wrap.epg-open .stream-err { bottom: 200px; }
.shared-player-wrap.epg-open .player-actions { bottom: 212px; }
.epg-strip-hdr {
  padding: 8px 14px;
  background: rgba(21,101,192,0.6);
  border-bottom: 1px solid var(--divider);
  font-size: 13px; font-weight: 600; color: #fff;
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.epg-strip-list {
  flex: 1; overflow-y: auto; padding: 4px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.epg-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 10px; border-radius: 6px; border: 1px solid transparent;
  margin-bottom: 2px;
}
.epg-item.now { background: rgba(66,165,245,0.1); border-color: rgba(66,165,245,0.25); }
.epg-item:not(.now) { opacity: 0.65; }
.epg-time  { font-size: 12px; font-weight: 600; color: var(--text-muted); width: 42px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.epg-item.now .epg-time { color: var(--accent); }
.epg-title { flex: 1; font-size: 13px; }
.now-badge {
  background: var(--live-red); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 5px;
  border-radius: 3px; flex-shrink: 0;
}
.epg-loading { padding: 16px; display: flex; justify-content: center; }

/* ── Split-section layout ─────────────────────────────────────────────────── */
.split-section { flex-direction: row !important; }

/* ── Channel panel ────────────────────────────────────────────────────────── */
.ch-panel {
  width: 320px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--divider);
  overflow: hidden;
}
.panel-top {
  flex-shrink: 0;
  background: var(--surface-var);
  border-bottom: 1px solid var(--divider);
}
.panel-search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--divider);
}
.panel-search i { color: var(--text-muted); font-size: 13px; flex-shrink: 0; }
.panel-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 13px;
}
.panel-search input::placeholder { color: var(--text-muted); }

.panel-cats {
  display: flex; gap: 4px; flex-wrap: nowrap;
  overflow-x: auto; padding: 6px 8px;
  scrollbar-width: none;
}
.panel-cats::-webkit-scrollbar { display: none; }

/* Category buttons (rendered by JS as .panel-cat-btn) — horizontal pills by
   default (Live TV / Radio, few categories). */
.panel-cat-btn {
  height: 28px; padding: 0 10px;
  background: none; border: 1px solid var(--divider);
  border-radius: 14px; color: var(--text-muted);
  font-family: inherit; font-size: 12px; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.panel-cat-btn:hover  { border-color: var(--accent); color: #fff; }
.panel-cat-btn.active { background: var(--primary); border-color: var(--accent); color: #fff; font-weight: 600; }

/* Public Streams: many countries → category list as a scrollable LEFT column
   (like the app) instead of an unscrollable top bar. */
.ch-panel.cats-left { flex-direction: row; width: 360px; }
.ch-panel.cats-left .panel-cats {
  flex-direction: column; flex-wrap: nowrap;
  overflow-y: auto; overflow-x: hidden;
  width: 118px; flex-shrink: 0;
  border-right: 1px solid var(--divider);
  padding: 6px 4px; gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.ch-panel.cats-left .panel-cats::-webkit-scrollbar { display: block; width: 4px; }
.ch-panel.cats-left .panel-cats::-webkit-scrollbar-track { background: transparent; }
.ch-panel.cats-left .panel-cats::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.ch-panel.cats-left .panel-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
.ch-panel.cats-left .panel-cat-btn {
  height: auto; width: 100%;
  text-align: left; padding: 7px 9px;
  border: 1px solid transparent; border-radius: 6px;
  white-space: normal; line-height: 1.25;
}
.ch-panel.cats-left .panel-cat-btn:hover  { background: rgba(255,255,255,0.06); border-color: transparent; color: #fff; }
.ch-panel.cats-left .panel-cat-btn.active { background: var(--primary); border-color: transparent; color: #fff; }

.cat-tab {
  height: 28px; padding: 0 10px;
  background: none; border: 1px solid var(--divider);
  border-radius: 14px; color: var(--text-muted);
  font-family: inherit; font-size: 12px; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cat-tab:hover  { border-color: var(--accent); color: #fff; }
.cat-tab.active { background: var(--primary); border-color: var(--accent); color: #fff; font-weight: 600; }

.panel-list {
  flex: 1; overflow-y: auto; padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.panel-list::-webkit-scrollbar { width: 4px; }
.panel-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* ── Channel tile ─────────────────────────────────────────────────────────── */
.ch-tile {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: var(--card-bg);
  border: 2px solid var(--divider);
  border-radius: 14px; margin-bottom: 6px;
  min-height: 70px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  /* will-change:transform removed: an always-on layer hint on ~600 tiles forced
     the TV GPU to hold a compositor layer per tile (layer explosion). The 0.15s
     transform transition composites on demand without it. */
  user-select: none;
}
.ch-tile:hover { background: rgba(21,52,96,0.9); border-color: rgba(66,165,245,0.35); transform: scale(1.025); box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.ch-tile:focus-visible { outline: none; border-color: var(--accent); transform: scale(1.025); box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.ch-tile.active { background: rgba(21,101,192,0.2); border-color: var(--accent) !important; box-shadow: 0 0 0 1px rgba(66,165,245,0.15); }

.ch-logo {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 6px;
  background: var(--surface-var); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ch-logo img { width: 100%; height: 100%; object-fit: contain; }
.ch-logo i   { color: var(--text-muted); font-size: 18px; }

.ch-info  { flex: 1; min-width: 0; overflow: hidden; }
.ch-name  { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-tile.active .ch-name { font-weight: 700; }
/* s3124 (D597): the "Promoted" tag after the name, outside its ellipsis (margin, not flex gap: webOS 4 = Chrome 53) */
.ch-line  { display: flex; align-items: center; min-width: 0; }
.ch-line .ch-name { min-width: 0; }
.ch-promo { flex: none; margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: var(--accent); color: #001018;
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1.5; }
.ch-now   { font-size: 11px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-now.epg-scroll {
  overflow: visible;
  text-overflow: clip;
  animation: epg-ticker 11s ease-in-out 1.5s infinite;
}
@keyframes epg-ticker {
  0%, 18%  { transform: translateX(0); }
  82%, 100% { transform: translateX(calc(-1 * var(--epg-scroll-dist, 0px))); }
}

.ch-prog-bar  { height: 2px; background: rgba(255,255,255,0.1); border-radius: 1px; overflow: hidden; margin-top: 5px; }
.ch-prog-fill { height: 100%; background: var(--accent); border-radius: 1px; }
.ch-prog-times { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-muted); margin-top: 2px; }

.ch-right { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.live-badge {
  background: rgba(229,57,53,0.15); color: var(--live-red);
  border: 1px solid rgba(229,57,53,0.25);
  font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; letter-spacing: 0.3px;
}
.playing-icon { color: var(--accent); font-size: 13px; }
.fav-star     { color: rgba(255,255,255,0.2); font-size: 13px; cursor: pointer; transition: color 0.15s; }
.fav-star:hover  { color: rgba(255,215,0,0.6); }
.fav-star.active { color: #FFD700; }

.empty-state  { padding: 28px; text-align: center; color: var(--text-muted); font-size: 14px; }
.empty-state.err { color: var(--live-red); }
.err-state    { padding: 28px; text-align: center; color: var(--live-red); font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ── Radio art column ─────────────────────────────────────────────────────── */
.radio-art-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  background: #000; padding: 32px;
}
.radio-artwork {
  position: relative;
  width: 200px; height: 200px;
  border-radius: 16px; overflow: hidden;
  background: var(--card-bg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.radio-logo-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.radio-logo-wrap i   { font-size: 64px; color: var(--accent); }
.radio-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.radio-info-block    { text-align: center; }
.radio-station-name  { font-size: 20px; font-weight: 700; }
.radio-prog-name     { font-size: 14px; color: var(--text-muted); margin-top: 6px; }
/* 2.9.510 Live+ radio: the song on air (cover, title, artist, next). Plain flex without gap: old TV engines (webOS 4, Tizen 5) */
.radio-np { display: flex; align-items: center; width: 100%; max-width: 440px; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; background: var(--card-bg); text-align: left; }
.radio-np.hidden { display: none; }
.radio-np-cover { width: 72px; height: 72px; flex: 0 0 72px; margin-right: 14px; border-radius: 8px; object-fit: cover; background: rgba(255,255,255,0.06); }
.radio-np-text { min-width: 0; flex: 1 1 auto; }
.radio-np-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.radio-np-title { margin-top: 2px; font-size: 17px; font-weight: 700; overflow: hidden; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.radio-np-artist, .radio-np-next { margin-top: 3px; font-size: 14px; color: var(--text-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.radio-np-next { font-size: 12px; }
.radio-controls      { display: flex; gap: 12px; align-items: center; margin-top: 4px; }
.radio-controls.hidden { display: none; }
.radio-ctrl-btn {
  height: 38px; min-width: 42px; padding: 0 16px;
  background: rgba(255,255,255,0.08); color: #fff;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 8px;
  font-family: inherit; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background 0.15s, border-color 0.15s;
}
.radio-ctrl-btn:hover { background: rgba(21,101,192,0.7); border-color: var(--accent); }

/* ── Home section ─────────────────────────────────────────────────────────── */
.home-content {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

/* ── Dashboard header ─────────────────────────────────────────────────────── */
.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.dash-header-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-header-right { display: flex; align-items: center; gap: 10px; }
.dash-greeting { font-size: 18px; font-weight: 700; color: var(--text); }
/* 2.9.389: the day's greeting + small lines, own row, left half (never over the picture's logo slot,
   bottom centre). 2 lines each at most. No flex gap (LG webOS). */
.dash-occasion { flex: 0 0 100%; max-width: 50%; margin-top: 2px; }
.dash-occ-greeting, .dash-occ-line {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6); overflow-wrap: break-word;
}
.dash-occ-greeting { font-size: 24px; font-weight: 700; line-height: 1.25; color: var(--text); }
.dash-occ-line { font-size: 14px; line-height: 1.4; color: var(--text-muted); margin-top: 4px; -webkit-line-clamp: 3; }   /* D352: every name of the day */
@media (max-width: 700px) { .dash-occasion { max-width: 100%; } .dash-occ-greeting { font-size: 20px; } }
.dash-expiry {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; border: 1px solid;
  font-size: 12px; font-weight: 600;
}
.dash-weather-widget {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.dash-weather-widget i { font-size: 16px; }

/* ── Dashboard card grid ──────────────────────────────────────────────────── */
.dash-grid {
  display: flex; gap: 14px; height: 300px; margin-bottom: 28px;
}
.dash-col-left  { flex: 1; display: flex; flex-direction: column; }
.dash-col-right { flex: 1.4; display: flex; flex-direction: column; gap: 12px; }
.dash-row-top   { display: flex; gap: 12px; flex: 3; }
.dash-row-bot   { display: flex; gap: 12px; flex: 2; }

.dash-card {
  flex: 1; border-radius: 14px; padding: 20px;
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: pointer; position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.15s, box-shadow 0.15s;
  outline: none;
}
.dash-card:hover, .dash-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.dash-card-large { flex: 1; }
.dash-card-icon {
  position: absolute; top: 16px; right: 18px;
  font-size: 28px; opacity: 0.25;
}
.dash-card-large .dash-card-icon { font-size: 44px; top: 18px; right: 20px; }
.dash-card-label {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px;
}
.dash-card-large .dash-card-label { font-size: 15px; margin-bottom: 4px; }
.dash-card-count {
  font-size: 32px; font-weight: 800; color: #fff; line-height: 1;
}
.dash-card-large .dash-card-count { font-size: 48px; }
.dash-card-sub {
  font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 1px;
}

.dash-rows { margin-top: 4px; }

@media (max-width: 700px) {
  .dash-grid { flex-direction: column; height: auto; }
  .dash-col-left, .dash-col-right { flex: none; }
  .dash-col-left { height: 140px; }
  .dash-row-top, .dash-row-bot { height: 110px; }
  .dash-card-count { font-size: 22px; }
  .dash-card-large .dash-card-count { font-size: 28px; }
}

.home-row { margin-bottom: 28px; }
.home-row-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--text); }

/* Channel rows: grid fills the full width, wraps to next line for long lists */
.home-row-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

/* VOD/movie rows: fixed-width horizontal scroll (portrait posters must not stretch) */
.home-row-scroll.vod-row {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.home-row-scroll.vod-row::-webkit-scrollbar { height: 3px; }
.home-row-scroll.vod-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.home-card {
  border-radius: 10px; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--divider);
  cursor: pointer; transition: transform 0.15s, border-color 0.15s;
  outline: none;
}
.home-card:hover, .home-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(66,165,245,0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.home-card-channel { padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.home-card-channel .hc-logo {
  width: 52px; height: 52px; border-radius: 8px;
  background: var(--surface-var); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.home-card-channel .hc-logo img { width: 100%; height: 100%; object-fit: contain; }
.home-card-channel .hc-logo i   { font-size: 28px; color: var(--accent); }
.hc-name { font-size: 12px; font-weight: 600; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hc-now  { font-size: 10px; color: var(--text-muted); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }

.home-card-movie { flex-shrink: 0; width: 130px; min-width: 130px; }
.home-card-movie .hc-poster {
  width: 130px; height: 185px; position: relative;
  background: var(--surface-var); display: flex; align-items: center; justify-content: center;
}
.home-card-movie .hc-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-card-movie .hc-poster i   { font-size: 36px; color: var(--text-muted); }
.hc-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(0,0,0,0.4); }
.hc-prog-fill { height: 100%; background: var(--accent); }
.home-card-movie .hc-name { font-size: 11px; padding: 6px 8px 10px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

.home-welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; gap: 16px; text-align: center; }
.home-logo    { height: 52px; }
.home-welcome h2 { font-size: 22px; }
.home-welcome p  { color: var(--text-muted); }
.home-shortcuts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.home-shortcuts button {
  height: 44px; padding: 0 20px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.home-shortcuts button:hover { background: #1976D2; }

/* ── Section bar ──────────────────────────────────────────────────────────── */
/* Recently Added shelf inside Movies/Series sections */
.sec-recently-row {
  padding: 16px 16px 16px;
  flex-shrink: 0;
  border-bottom: 2px solid var(--divider);
}
.sec-recently-row .home-row-title { font-size: 14px; margin-bottom: 10px; }
.sec-recently-row .home-row-scroll.vod-row { gap: 10px; }

.sec-grid-label {
  flex-shrink: 0;
  padding: 10px 16px 6px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sec-bar {
  height: 52px; flex-shrink: 0;
  background: var(--surface-var);
  border-bottom: 1px solid var(--divider);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; overflow-x: auto;
  scrollbar-width: none;
}
.sec-bar::-webkit-scrollbar { display: none; }
.sec-title { font-size: 15px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.sec-cats  { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.sec-cats::-webkit-scrollbar { display: none; }

.cat-chip {
  height: 30px; padding: 0 12px;
  background: var(--card-bg); border: 1px solid var(--divider);
  border-radius: 15px; color: var(--text-muted);
  font-family: inherit; font-size: 12px; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.cat-chip:hover  { border-color: var(--accent); color: #fff; }
.cat-chip.active { background: var(--primary); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ── Poster grid ──────────────────────────────────────────────────────────── */
.poster-grid {
  flex: 1; overflow-y: auto; padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.poster-grid .grid-loading {
  grid-column: 1/-1; display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 48px; color: var(--text-muted);
}

.poster-card {
  border-radius: 8px; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--divider);
  cursor: pointer; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.poster-card:hover, .poster-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(66,165,245,0.35);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.pc-thumb {
  position: relative; padding-top: 150%; /* 2:3 ratio */
  background: var(--surface-var); overflow: hidden;
}
.pc-thumb img {
  position: absolute; top:0; right:0; bottom:0; left:0; width: 100%; height: 100%; object-fit: cover;
}
.pc-nothumb {
  position: absolute; top:0; right:0; bottom:0; left:0; display: flex; align-items: center; justify-content: center;
}
.pc-nothumb i   { font-size: 36px; color: var(--text-muted); opacity: 0.5; }
/* 2.9.430: a film / series locked on a PIN-locked account (opens the account-PIN pad) */
.pc-lock {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.72); color: var(--text); font-size: 14px;
}
.pc-progress    { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: rgba(0,0,0,0.5); }
.pc-prog-fill   { height: 100%; background: var(--accent); }
.pc-rating {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.72); color: #FFD700;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  display: flex; align-items: center; gap: 3px;
}
.pc-name { padding: 7px 8px 4px; font-size: 12px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 36px; }
.pc-year { padding: 0 8px 7px; font-size: 11px; color: var(--text-muted); }

/* ── Series detail overlay ────────────────────────────────────────────────── */
.series-detail {
  position: absolute; top:0; right:0; bottom:0; left:0; z-index: 30;
  background: var(--surface);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.sd-header {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 20px 24px;
  background: var(--surface-var);
  border-bottom: 1px solid var(--divider);
  flex-shrink: 0;
}
.sd-back-btn {
  height: 36px; padding: 0 14px;
  background: rgba(255,255,255,0.07); border: 1px solid var(--divider);
  border-radius: 6px; color: var(--text-muted);
  font-family: inherit; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0; align-self: flex-start;
  transition: background 0.15s, color 0.15s;
}
.sd-back-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

.sd-cover {
  width: 100px; height: 148px; object-fit: cover;
  border-radius: 8px; flex-shrink: 0;
  background: var(--card-bg);
}
.sd-meta { flex: 1; min-width: 0; }
.sd-meta h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.sd-tags    { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sd-tag     { background: var(--card-bg); border: 1px solid var(--divider); border-radius: 4px; padding: 2px 8px; font-size: 12px; color: var(--text-muted); }
.sd-plot    { font-size: 13px; color: var(--text-muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.sd-season-tabs {
  display: flex; gap: 6px; padding: 12px 16px;
  background: var(--surface-var); border-bottom: 1px solid var(--divider);
  overflow-x: auto; flex-shrink: 0;
  scrollbar-width: none;
}
.sd-season-tabs::-webkit-scrollbar { display: none; }
.season-tab {
  height: 32px; padding: 0 16px;
  background: none; border: 1px solid var(--divider);
  border-radius: 6px; color: var(--text-muted);
  font-family: inherit; font-size: 13px; cursor: pointer; flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.season-tab:hover  { border-color: var(--accent); color: #fff; }
.season-tab.active { background: var(--primary); border-color: var(--accent); color: #fff; font-weight: 600; }

.sd-episodes {
  flex: 1; overflow-y: auto; padding: 8px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.episode-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px; border-radius: 8px; border: 1px solid var(--divider);
  background: var(--card-bg); margin-bottom: 6px;
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.episode-row:hover  { background: rgba(21,52,96,0.9); border-color: rgba(66,165,245,0.2); }
.episode-row:focus-visible { outline: none; border-color: var(--accent); }

.ep-thumb {
  width: 96px; height: 54px; border-radius: 6px; flex-shrink: 0;
  background: var(--surface-var); position: relative;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-thumb i   { font-size: 24px; color: var(--text-muted); opacity: 0.5; }
.ep-progress  { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(0,0,0,0.4); }
.ep-progress div { height: 100%; background: var(--accent); }

.ep-info { flex: 1; min-width: 0; }
.ep-num  { font-size: 11px; color: var(--accent); font-weight: 600; }
.ep-title{ font-size: 14px; font-weight: 600; }
.ep-dur  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ep-plot { font-size: 12px; color: var(--text-muted); margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.ep-play-btn {
  align-self: center; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  border: none; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.1s;
}
.ep-play-btn:hover { background: #1976D2; transform: scale(1.08); }

/* ── Guide (programme guide 4.1.0, docs/epg_guide) ─────────────────────────
   No flex `gap`, no CSS grid, no position:sticky, no clamp(): webOS 4.x is
   Chromium 53. Row height MUST match G.rowH in tv-v2.js (64 / 72 tv-scale). */
.guide-header {
  height: 56px; flex-shrink: 0;
  background: var(--surface-var); border-bottom: 1px solid var(--divider);
  display: flex; align-items: center; padding: 0 16px; overflow: hidden;
}
.guide-header > * + * { margin-left: 10px; }
.g-datebox { display: flex; align-items: center; height: 38px; padding: 0 4px; border: 1px solid var(--divider); border-radius: 10px; background: rgba(255,255,255,0.05); flex-shrink: 0; }
.guide-date { font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap; margin: 0 4px 0 8px; }
.g-chip { font-size: 11px; color: var(--text-muted); margin-right: 8px; white-space: nowrap; }
.g-icon {
  width: 34px; height: 30px; border-radius: 8px; flex-shrink: 0; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: #fff; font-size: 13px;
  display: flex; align-items: center; justify-content: center; font-family: inherit;
}
.g-icon:hover, .g-icon.tv-hover { border-color: var(--accent); }
.g-icon.active { background: rgba(66,165,245,0.22); border-color: var(--accent); }
.g-pill {
  height: 38px; padding: 0 14px; border-radius: 19px; flex-shrink: 0; cursor: pointer;
  border: 1px solid var(--accent); background: rgba(66,165,245,0.14); color: #fff;
  display: flex; align-items: center; font-size: 14px; font-family: inherit; white-space: nowrap;
}
.g-pill > i { font-size: 10px; color: var(--live-red); margin-right: 8px; }
.g-pill > i.fa-arrows-left-right { font-size: 12px; color: #fff; }
.g-dd {
  height: 38px; padding: 0 12px; border-radius: 10px; flex-shrink: 0; cursor: pointer;
  border: 1px solid var(--divider); background: rgba(255,255,255,0.05); color: #fff;
  display: flex; align-items: center; font-size: 14px; font-family: inherit; white-space: nowrap; max-width: 260px;
}
.g-dd > span { overflow: hidden; text-overflow: ellipsis; }
.g-dd > i { margin-left: 8px; color: var(--text-muted); font-size: 12px; }
.g-switch {
  height: 38px; padding: 0 8px; border-radius: 10px; flex-shrink: 0; cursor: pointer;
  border: 1px solid transparent; background: none; color: #fff;
  display: flex; align-items: center; font-size: 14px; font-family: inherit; white-space: nowrap;
}
.g-sw { width: 36px; height: 20px; border-radius: 10px; background: rgba(255,255,255,0.18); position: relative; margin-right: 10px; flex-shrink: 0; transition: background 0.15s; }
.g-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.g-switch.active .g-sw { background: var(--accent); }
.g-switch.active .g-sw::after { left: 18px; }
.g-zoom { display: flex; align-items: center; flex-shrink: 0; }
.g-zoom > i { color: #fff; font-size: 13px; margin-right: 8px; }
.g-range { width: 110px; margin: 0; }
.g-tvonly { display: none; }
.guide-tv .g-tvonly { display: flex; }
.guide-tv .g-pconly { display: none; }
.guide-sep { flex: 1; }
.g-search {
  display: flex; align-items: center; height: 38px; width: 190px; flex-shrink: 0; padding: 0 10px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--divider); border-radius: 10px;
}
.g-search > i { color: var(--text-muted); font-size: 12px; margin-right: 8px; }
.g-search input { flex: 1; min-width: 0; background: none; border: none; color: #fff; font-family: inherit; font-size: 13px; outline: none; }
.g-search input:focus { color: #fff; }
.g-search input.sn-item:focus { outline: none; box-shadow: none; }
.guide-tv .g-search { width: 200px; }
/* Desktop windows narrower than the toolbar (~1300 px): drop the zoom slider and
   narrow the two boxes — the header is overflow:hidden and clipped the Search box. */
@media (max-width: 1320px) { .g-zoom { display: none; } .g-search { width: 150px; } }
@media (max-width: 1100px) { .g-search { width: 120px; } }

.guide-body { flex: 1; display: flex; overflow: hidden; min-height: 0; position: relative; }
.guide-ch-col {
  width: 250px; flex-shrink: 0; overflow: hidden; position: relative;
  border-right: 1px solid var(--divider);
  margin-top: 32px; /* below the time ruler, rows line up with the grid */
}
.guide-ch-rows { position: relative; }
.guide-ch-cell {
  position: absolute; left: 0; right: 0; height: 64px;
  display: flex; align-items: center; padding: 0 10px;
  border-bottom: 1px solid var(--divider); cursor: pointer; overflow: hidden;
}
.guide-ch-cell > * + * { margin-left: 10px; }
.g-num { width: 34px; text-align: right; font-size: 13px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.g-logo {
  width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; overflow: hidden;
  background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center;
}
.g-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.g-logo i { color: var(--text-muted); font-size: 16px; }
.g-name { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.g-name b { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-name small { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.guide-ch-cell.g-playing { background: rgba(66,165,245,0.10); }
.guide-ch-cell.g-playing b { color: var(--accent); }
.guide-ch-cell:hover, .guide-ch-cell.g-focus { background: rgba(255,255,255,0.06); }
.guide-ch-cell.g-focus { box-shadow: inset 0 0 0 2px var(--accent); }

.guide-timeline { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.guide-time-hdr {
  height: 32px; flex-shrink: 0; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--divider); background: var(--surface-var);
}
.guide-time-slot {
  position: absolute; top: 0; bottom: 0; padding-left: 6px;
  display: flex; align-items: center; white-space: nowrap;
  font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--divider);
}
.guide-time-slot.hour { color: #fff; font-weight: 600; }
.guide-now-chip {
  position: absolute; top: 4px; transform: translateX(-50%); z-index: 3;
  background: var(--live-red); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px; font-variant-numeric: tabular-nums;
}

.guide-grid {
  flex: 1; overflow-y: auto; overflow-x: hidden; position: relative;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.guide-rows { position: relative; }
.guide-row { position: absolute; left: 0; right: 0; height: 64px; border-bottom: 1px solid var(--divider); overflow: hidden; }
.guide-row.g-row-focus { background: rgba(255,255,255,0.03); }
.guide-prog {
  position: absolute; top: 6px; bottom: 6px; min-width: 3px;
  border-radius: 8px; overflow: hidden; padding: 0 10px;
  background: var(--card-bg); border: 1px solid rgba(255,255,255,0.14);
  display: flex; flex-direction: column; justify-content: center; cursor: pointer;
}
.guide-prog.past { background: transparent; border-color: var(--divider); }
.guide-prog.past .gp-title { color: var(--text-muted); font-weight: 400; }
.guide-prog.now { background: rgba(66,165,245,0.18); border-color: rgba(66,165,245,0.55); }
.guide-prog.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-color: transparent; }
.guide-prog:hover { border-color: var(--accent); }
.guide-prog.g-focus {
  outline: 2px solid var(--accent); outline-offset: -2px; z-index: 2;
  box-shadow: 0 0 0 3px rgba(66,165,245,0.35); background: rgba(66,165,245,0.28);
}
.gp-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(66,165,245,0.18); pointer-events: none; }
.gp-time { position: relative; font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.guide-prog.now .gp-time { margin-right: 64px; overflow: hidden; text-overflow: ellipsis; }   /* keep clear of the ON NOW badge */
.gp-title { position: relative; font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-now {
  position: absolute; right: 8px; top: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: #fff;
  background: var(--live-red); padding: 1px 6px; border-radius: 4px;
}
.guide-prog.t-narrow { padding: 0 6px; }
.guide-prog.t-narrow .gp-time, .guide-prog.t-narrow .gp-now { display: none; }
.guide-prog.t-micro { padding: 0; }
.guide-prog.t-micro .gp-time, .guide-prog.t-micro .gp-title, .guide-prog.t-micro .gp-now { display: none; }
.guide-empty { position: absolute; left: 12px; top: 0; bottom: 0; display: flex; align-items: center; font-size: 13px; font-style: italic; color: var(--text-muted); }
.guide-skel { position: absolute; left: 10px; right: 45%; top: 18px; height: 28px; border-radius: 8px; background: rgba(255,255,255,0.05); }
.guide-now-line { position: absolute; top: 0; width: 2px; background: var(--live-red); z-index: 2; pointer-events: none; }

.guide-foot {
  height: 40px; flex-shrink: 0; display: flex; align-items: center; padding: 0 14px;
  background: var(--surface-var); border-top: 1px solid var(--divider);
  font-size: 12px; color: var(--text-muted); overflow: hidden; white-space: nowrap;
}
.guide-foot kbd {
  display: inline-block; padding: 1px 7px; margin: 0 5px 0 14px;
  border: 1px solid rgba(255,255,255,0.25); border-radius: 5px;
  color: #fff; font-family: inherit; font-size: 11px;
}
.guide-foot kbd:first-child { margin-left: 0; }
.guide-foot kbd.red    { background: #c62828; border-color: #c62828; }
.guide-foot kbd.green  { background: #2e7d32; border-color: #2e7d32; }
.guide-foot kbd.yellow { background: #f9a825; border-color: #f9a825; color: #000; }
.guide-foot kbd.blue   { background: #1565c0; border-color: #1565c0; }

/* Programme details panel (OK on a past/future block, INFO, I) */
.guide-details {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4050;
  width: 720px; max-width: 90vw;
  background: linear-gradient(135deg, rgba(18,24,38,0.98), rgba(13,17,23,0.98));
  border: 1px solid rgba(255,255,255,0.16); border-radius: 18px;
  padding: 26px 30px; color: #fff; box-shadow: 0 18px 50px rgba(0,0,0,0.6);
}
.guide-details.hidden { display: none; }
.gd-ch { display: flex; align-items: center; color: var(--text-muted); font-size: 14px; }
.gd-ch > * + * { margin-left: 10px; }
.gd-ch img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,0.06); }
.gd-ch .gp-now { position: static; }
.gd-title { font-size: 26px; font-weight: 700; margin-top: 10px; line-height: 1.2; }
.gd-time { font-size: 15px; color: #c9d1d9; margin-top: 6px; font-variant-numeric: tabular-nums; }
.gd-prog { height: 6px; background: rgba(255,255,255,0.2); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.gd-prog-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.gd-desc { font-size: 15px; line-height: 1.45; color: #e6edf3; margin-top: 14px; max-height: 7.3em; overflow: hidden; }
.gd-desc.dim { color: #8b949e; font-style: italic; }
.gd-btns { display: flex; margin-top: 20px; }
.gd-btns > * + * { margin-left: 10px; }
.gd-btn {
  height: 44px; padding: 0 20px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06);
  color: #fff; font-size: 15px; font-weight: 600; font-family: inherit;
  display: flex; align-items: center;
}
.gd-btn > i { margin-right: 8px; }
.gd-btn.primary { background: var(--accent); border-color: var(--accent); color: #04222b; }
.gd-btn.g-focus, .gd-btn:hover { outline: 2px solid #fff; outline-offset: 2px; }

.guide-loading, .guide-error {
  display: flex; align-items: center; justify-content: center;
  height: 80px; color: var(--text-muted); font-size: 13px;
}

/* Phase 2: the guide is an overlay over the live section. The navbar hides,
   the shared player is pinned into the strip (it never leaves #live-slot). */
.guide-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 3990; display: flex; flex-direction: column; background: var(--bg, #0b1220); }
.guide-overlay.hidden { display: none; }
body.app-guide .navbar { display: none !important; }
body.app-guide .shared-player-wrap {
  position: fixed !important; top: 8px !important; left: 16px !important; right: auto !important; bottom: auto !important;
  width: 256px !important; height: 144px !important; z-index: 3995 !important; border-radius: 8px; overflow: hidden;
}
body.app-guide #live-player.video-js, body.app-guide .shared-player-wrap.epg-open #live-player.video-js { top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; }
body.app-guide .shared-player-wrap .player-actions, body.app-guide .shared-player-wrap .epg-strip { display: none !important; }
body.app-guide .shared-player-wrap .player-ph, body.app-guide .shared-player-wrap .buf-spin, body.app-guide .shared-player-wrap .stream-err { bottom: 0 !important; }
body.app-guide .shared-player-wrap .player-ph span { display: none; }
body.app-guide.app-guide-collapsed .shared-player-wrap { display: none !important; }
.guide-strip { height: 160px; flex-shrink: 0; display: flex; align-items: center; padding: 0 20px 0 0; border-bottom: 1px solid var(--divider); }
.gs-player { width: 256px; height: 144px; margin: 0 20px 0 16px; flex-shrink: 0; border-radius: 8px; background: #000; }
.gs-info { flex: 1; min-width: 0; }
.gs-ch { display: flex; align-items: center; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.gs-ch > * + * { margin-left: 10px; }
.gs-ch .gp-now { position: static; }
.gs-title { font-size: 24px; font-weight: 700; color: #fff; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-title.dim { color: var(--text-muted); font-weight: 500; }
.gs-desc { font-size: 14px; color: #c9d1d9; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 900px; min-height: 1.4em; }
.gs-time { display: flex; align-items: center; margin-top: 8px; font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.gs-bar { display: block; width: 360px; height: 4px; background: rgba(255,255,255,0.18); border-radius: 2px; margin: 0 12px; overflow: hidden; }
.gs-bar i { display: block; height: 100%; background: var(--accent); }
.gs-actions { display: flex; flex-direction: column; align-items: flex-end; margin-left: 16px; flex-shrink: 0; }
.gs-btn {
  height: 44px; padding: 0 18px; border-radius: 22px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.35); background: transparent; color: #fff;
  font-size: 15px; font-family: inherit; display: flex; align-items: center; white-space: nowrap;
}
.gs-btn kbd { margin-left: 10px; font-size: 11px; font-family: inherit; border: 1px solid rgba(255,255,255,0.3); border-radius: 4px; padding: 0 5px; color: var(--text-muted); }
.gs-btn:hover { border-color: #fff; }
.gs-link { margin-top: 10px; padding: 4px 6px; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--accent); font-size: 14px; font-family: inherit; cursor: pointer; white-space: nowrap; }
body.app-guide-collapsed .guide-strip { height: 56px; padding-left: 16px; }
body.app-guide-collapsed .gs-player { display: none; }
body.app-guide-collapsed .gs-info { display: flex; align-items: center; }
body.app-guide-collapsed .gs-ch { flex-shrink: 0; margin-right: 14px; }
body.app-guide-collapsed .gs-title { font-size: 16px; margin: 0; flex: 1; }
body.app-guide-collapsed .gs-desc, body.app-guide-collapsed .gs-time { display: none; }
body.app-guide-collapsed .gs-actions { flex-direction: row; align-items: center; }
body.app-guide-collapsed .gs-btn { height: 36px; font-size: 13px; }
body.app-guide-collapsed .gs-link { margin: 0 0 0 14px; }

/* List popup: channel groups, search results */
.guide-list {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4040;
  width: 560px; max-width: 90vw; max-height: 70vh; display: flex; flex-direction: column;
  background: linear-gradient(135deg, rgba(18,24,38,0.98), rgba(13,17,23,0.98));
  border: 1px solid rgba(255,255,255,0.16); border-radius: 16px; padding: 14px;
  color: #fff; box-shadow: 0 18px 50px rgba(0,0,0,0.6);
}
.guide-list.hidden { display: none; }
.gl-title { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 4px 8px 10px; }
.gl-items { overflow-y: auto; flex: 1; min-height: 0; }
.gl-item { display: flex; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 16px; color: #fff; }
.gl-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.gl-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-sub { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.gl-item small { color: var(--text-muted); margin-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gl-item.g-sel .gl-label::before { content: '✓ '; color: var(--accent); }
.gl-item:hover, .gl-item.g-focus { background: rgba(66,165,245,0.22); outline: 2px solid var(--accent); outline-offset: -2px; }
.gl-empty { padding: 14px 12px; color: var(--text-muted); font-style: italic; }

/* Compact rows (the ☰ toolbar button); must match gRowH() in tv-v2.js */
.guide-compact .guide-row, .guide-compact .guide-ch-cell { height: 52px; }
.guide-compact .g-name small { display: none; }
.guide-compact .g-logo { width: 32px; height: 32px; }
.guide-compact .guide-prog { top: 4px; bottom: 4px; flex-direction: row; align-items: center; }
.guide-compact .gp-time { margin-right: 8px; }
.guide-compact .gp-now { top: 50%; margin-top: -8px; }

/* 10-foot sizing on real TVs (.tv-scale) */
.tv-scale .guide-header { height: 62px; }
.tv-scale .g-datebox, .tv-scale .g-pill, .tv-scale .g-dd, .tv-scale .g-switch, .tv-scale .g-search { height: 42px; font-size: 16px; }
.tv-scale .guide-date { font-size: 17px; }
.tv-scale .g-chip { font-size: 12px; }
.tv-scale .g-icon { width: 38px; height: 34px; font-size: 15px; }
.tv-scale .g-search input { font-size: 15px; }
.tv-scale .guide-strip { height: 170px; }
.tv-scale .gs-title { font-size: 28px; }
.tv-scale .gs-desc { font-size: 16px; }
.tv-scale .gs-time { font-size: 14px; }
.tv-scale .gs-btn { height: 50px; font-size: 17px; }
.tv-scale .gs-link { font-size: 16px; }
.tv-scale .guide-compact .guide-row, .tv-scale .guide-compact .guide-ch-cell { height: 58px; }
.tv-scale .gl-item { font-size: 18px; padding: 12px 14px; }
.tv-scale .gl-sub { font-size: 14px; }
.tv-scale .guide-ch-col { width: 290px; margin-top: 36px; }
.tv-scale .guide-time-hdr { height: 36px; }
.tv-scale .guide-time-slot { font-size: 14px; }
.tv-scale .guide-ch-cell, .tv-scale .guide-row { height: 72px; }
.tv-scale .g-name b { font-size: 17px; }
.tv-scale .g-name small { font-size: 13px; }
.tv-scale .g-num { font-size: 15px; width: 40px; }
.tv-scale .g-logo { width: 46px; height: 46px; }
.tv-scale .gp-title { font-size: 16px; }
.tv-scale .gp-time { font-size: 12px; }
.tv-scale .gp-now { font-size: 11px; }
.tv-scale .guide-foot { height: 44px; font-size: 14px; }
.tv-scale .guide-foot kbd { font-size: 13px; }
.tv-scale .guide-details { width: 860px; }
.tv-scale .gd-title { font-size: 30px; }
.tv-scale .gd-desc { font-size: 17px; }
.tv-scale .gd-btn { height: 52px; font-size: 17px; }

/* s3126 programme types (board frame C, owner Q3 Q4 Q9). Old-engine rules as above: no gap, grid, inset, clamp, :focus-within.
   Fills and icon colours = the approved app board; a dimmed programme loses its colour like a past one (Q3, 9.8:1 grey title). */
.guide-prog.ty-film { background: #4E2475; }
.guide-prog.ty-sport { background: #16502D; }
.guide-prog.ty-news { background: #5A3C00; }
.guide-prog.ty-kids { background: #74265A; }
.guide-prog[class*="ty-"] .gp-time { color: #D6DEE2; }   /* the muted grey over the ON NOW tint on a type colour is 3.9:1 */
.guide-prog.g-dim { background: transparent; border-color: rgba(255,255,255,0.14); }
.guide-prog.g-dim .gp-title, .guide-prog.g-dim .gp-time { color: var(--text-muted); }
.guide-prog.g-dim .gp-title { font-weight: 400; }
.g-ty-ic { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.125em; margin-right: 6px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-ty-film { color: #C9A4F0; }
.g-ty-sport { color: #7FD69B; }
.g-ty-news { color: #F5C451; }
.g-ty-kids { color: #F49AC8; }
.g-ty-all, .g-ty-coming { color: var(--text-muted); }
.g-dd > .g-ty-ic { margin-right: 8px; }
.g-dd.active { background: rgba(66,165,245,0.22); border-color: var(--accent); }
.gl-item > .g-ty-ic { margin-right: 10px; }
.gl-sep { height: 1px; background: rgba(255,255,255,0.14); margin: 6px 8px; }
.gl-title > span { display: inline-block; }
.gl-right { float: right; margin-left: 12px; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.gl-item > .g-sw { margin: 0 0 0 12px; }
.gl-item > .g-sw.on { background: var(--accent); }
.gl-item > .g-sw.on::after { left: 18px; }
.g-none { padding: 80px 40px; text-align: center; color: var(--text-muted); font-size: 15px; }
.g-none > b { display: block; color: #fff; font-size: 22px; margin-bottom: 12px; }
.g-none .gd-btns { -webkit-box-pack: center; justify-content: center; }
.gd-btn > .g-ty-ic { margin-right: 8px; color: inherit; }
/* Q9: on TVs the two search boxes are icon buttons; OK opens the box over the toolbar's end, leaving it closes it */
.guide-header { position: relative; }
.guide-tv .g-search { width: 44px; padding: 0; -webkit-box-pack: center; justify-content: center; }
.guide-tv .g-search > i { margin: 0; }
.guide-tv .g-search input { -webkit-box-flex: 0; flex: 0 0 auto; width: 1px; padding: 0; }
.guide-tv .g-search.g-foc { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(66,165,245,0.35); }
.guide-tv .g-search.g-open { position: absolute; right: 16px; top: 50%; margin-top: -21px; width: 360px; padding: 0 12px; z-index: 5;
  -webkit-box-pack: start; justify-content: flex-start; background: #161b22; }
.guide-tv .g-search.g-open > i { margin-right: 8px; }
.guide-tv .g-search.g-open input { -webkit-box-flex: 1; flex: 1; width: auto; }
/* a toolbar wider than the screen (BG, large TV text): only the switch of "Only with EPG", no "Today" chip (the date stays),
   tighter spacing */
.g-tight #guide-onlyepg > span, .g-tight .g-chip { display: none; }
.g-tight #guide-onlyepg .g-sw { margin-right: 0; }
.guide-header.g-tight > * + * { margin-left: 6px; }
/* /s3126 */

@media (max-width: 900px) {
  .guide-ch-col { width: 170px; }
  .g-search, .g-zoom, .guide-foot, .g-name small { display: none; }
  .guide-strip { height: 100px; }
  .gs-player, body.app-guide .shared-player-wrap { display: none !important; }
}

/* ── Search ───────────────────────────────────────────────────────────────── */
.search-bar-wrap { padding: 14px 16px; flex-shrink: 0; }
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--card-bg); border: 1px solid var(--divider);
  border-radius: 10px; padding: 0 14px; height: 46px;
  transition: border-color 0.15s;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar i    { color: var(--text-muted); font-size: 14px; flex-shrink: 0; }
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 15px;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-clear {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 4px; font-size: 14px;
  transition: color 0.12s;
}
.search-clear:hover { color: #fff; }

.search-results {
  flex: 1; overflow-y: auto; padding: 0 16px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.search-group       { margin-bottom: 20px; }
.search-group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--accent); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }

.search-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  background: var(--card-bg); border: 1px solid var(--divider);
  margin-bottom: 4px; cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.search-row:hover, .search-row:focus-visible {
  background: rgba(21,52,96,0.9); border-color: rgba(66,165,245,0.2);
  outline: none;
}
.sr-thumb {
  width: 40px; height: 40px; border-radius: 6px; flex-shrink: 0;
  background: var(--surface-var); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.sr-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sr-thumb i   { font-size: 16px; color: var(--text-muted); }
.sr-info { flex: 1; min-width: 0; }
.sr-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sr-play { color: var(--text-muted); font-size: 20px; flex-shrink: 0; }

/* ── Settings ─────────────────────────────────────────────────────────────── */
.settings-body {
  flex: 1; overflow-y: auto; padding: 20px 20px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px; align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.settings-card {
  background: var(--card-bg); border: 1px solid var(--divider);
  border-radius: 10px; overflow: hidden;
}
#sc-messages-card {
  overflow: visible;
  height: auto !important;
  align-self: start;
}
.sc-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; color: var(--accent);
  display: flex; align-items: center; gap: 8px;
}
.sc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--divider);
  font-size: 14px;
}
.sc-row:last-child { border-bottom: none; }
.sc-label { color: var(--text-muted); }
.sc-val   { font-weight: 500; }
.sc-active { color: var(--success); }
.sc-row-link { text-decoration: none; color: inherit; cursor: pointer; transition: background .15s; }
.sc-row-link:hover, .sc-row-link:focus { background: var(--divider); }
.sc-row-link .sc-val { color: var(--accent); }

.sc-opts  { display: flex; flex-direction: column; gap: 0; }
.sc-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border: none; border-bottom: 1px solid var(--divider);
  background: none; color: var(--text); font-family: inherit;
  cursor: pointer; text-align: left;
  transition: background 0.12s;
}
.sc-opt:last-child { border-bottom: none; }
.sc-opt:hover  { background: rgba(255,255,255,0.04); }
.sc-opt.active { background: rgba(21,101,192,0.15); }
.sc-opt i { font-size: 15px; color: var(--text-muted); width: 20px; text-align: center; flex-shrink: 0; }
.sc-opt.active i { color: var(--accent); }
.sc-opt div { display: flex; flex-direction: column; gap: 2px; }
.sc-opt strong { font-size: 13px; }
.sc-opt span   { font-size: 11px; color: var(--text-muted); }
.sc-opt.active::after { content: '✓'; margin-left: auto; color: var(--accent); font-weight: 700; }

.sc-signout {
  grid-column: 1/-1;
  height: 44px; padding: 0 20px;
  background: rgba(229,57,53,0.1); color: var(--live-red);
  border: 1px solid rgba(229,57,53,0.25); border-radius: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  align-self: start;
  transition: background 0.15s;
}
.sc-signout:hover { background: rgba(229,57,53,0.2); }

/* ── VOD Player Overlay ───────────────────────────────────────────────────── */
.vod-overlay {
  position: fixed; top:0; right:0; bottom:0; left:0; z-index: 200;
  background: #000;
}
#vod-player.video-js {
  position: absolute !important; top:0 !important; right:0 !important; bottom:0 !important; left:0 !important;
  width: 100% !important; height: 100% !important;
}
.vod-ui {
  position: absolute; top:0; right:0; bottom:0; left:0; z-index: 10;
  display: flex; flex-direction: column;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 30%, transparent 65%, rgba(0,0,0,0.85) 100%);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.vod-ui.visible { opacity: 1; pointer-events: auto; }

.vod-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px;
}
.vod-back {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); flex-shrink: 0;
  transition: background 0.15s;
}
.vod-back:hover { background: rgba(255,255,255,0.15); }
.vod-title-block { flex: 1; min-width: 0; }
.vod-title-block span { display: block; }
#vod-title { font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vod-sub   { font-size: 13px; color: rgba(255,255,255,0.65); }

.vod-center {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.vod-err {
  background: rgba(0,0,0,0.7); color: rgba(255,255,255,0.8);
  padding: 12px 24px; border-radius: 8px;
  display: flex; align-items: center; gap: 10px; font-size: 14px;
}
.vod-err i { color: var(--live-red); }

.vod-bottom { padding: 0 24px 28px; }
.vod-seekrow {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.vod-seekrow span { font-size: 13px; color: rgba(255,255,255,0.7); font-variant-numeric: tabular-nums; width: 42px; }
#vod-dur { text-align: right; }

.vod-seekbar {
  flex: 1; height: 20px; position: relative;
  display: flex; align-items: center; cursor: pointer;
}
.vod-seek-track {
  position: absolute; left: 0; right: 0; height: 4px;
  background: rgba(255,255,255,0.2); border-radius: 2px;
}
.vod-seek-fill {
  position: absolute; left: 0; height: 4px;
  background: var(--accent); border-radius: 2px; width: 0%;
  pointer-events: none;
}
.vod-seek-handle {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); pointer-events: none;
  left: 0%; transition: transform 0.1s;
}
.vod-seekbar:hover .vod-seek-handle { transform: translate(-50%, -50%) scale(1.3); }

.vod-ctrlrow {
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.vod-ctrl-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 16px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; transition: background 0.15s;
  position: relative;
}
.vod-ctrl-btn span { font-size: 9px; position: absolute; bottom: 6px; }
.vod-ctrl-btn:hover { background: rgba(255,255,255,0.18); }
.vod-pp-btn { width: 56px; height: 56px; font-size: 20px; background: var(--primary); border-color: transparent; }
.vod-pp-btn:hover { background: #1976D2; }

/* ── Fullscreen Info Bar ──────────────────────────────────────────────────── */
.info-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
  padding: 52px 28px 24px;
  transform: translateY(100%);
  transition: transform 0.28s ease;
  pointer-events: none;
}
.info-bar.visible { transform: translateY(0); pointer-events: auto; }

/* ── Promo cards (operator ads) — owner-approved redesign ───────────────────
   One family: home banner, live filmstrip (desktop/tablet), live QR card (TV).
   NO flex `gap` anywhere (collapses to 0 on webOS < Chromium 84) — margins. */
.bgp-sponsored { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #f5b64e;
  font-weight: 700; display: inline-flex; align-items: center; white-space: nowrap; }
.bgp-sponsored::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #f5b64e; margin-right: 6px; }
.bgp-title { font-weight: 800; font-size: 19px; letter-spacing: -.01em; line-height: 1.2; color: #fff;
  overflow: hidden; text-overflow: ellipsis; }
.bgp-body { color: #9aa4b2; font-size: 14px; line-height: 1.45; margin-top: 4px; }
.bgp-cta { background: var(--accent, #2dd4bf); color: #04222b; border: 0; border-radius: 11px;
  font-weight: 800; font-size: 15px; padding: 12px 22px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.bgp-cta:hover, .bgp-cta:focus { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(45,212,191,.32); outline: none; }
.bgp-dismiss { background: rgba(255,255,255,.06); color: #9aa4b2; border: 1px solid rgba(255,255,255,.16);
  border-radius: 11px; font-weight: 600; font-size: 14px; padding: 12px 16px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.bgp-dismiss:hover, .bgp-dismiss:focus { color: #fff; border-color: #8b9bb0; outline: none; }
.bgp-banner { background: linear-gradient(135deg, #12324a, #0c1c2e); flex-shrink: 0; position: relative;
  overflow: hidden; display: flex; align-items: center; justify-content: center; }
/* contain, NOT cover. Since 2.9.292 every upload is fitted server-side onto a
   16:9 canvas with a background sampled from its own border (promo_creative.py),
   so the image is already a complete rectangle. `cover` then crops that 16:9
   picture into a ~118x147 portrait panel and throws away most of its width — a
   wordmark logo renders as one enormous letter. The panel's gradient fills
   whatever contain leaves over. */
.bgp-banner img { width: 100%; height: 100%; object-fit: contain; }
.bgp-banner i { display: none; font-size: 30px; color: #3d5a78; }
.bgp-banner.noimg i { display: block; }
.bgp-timer { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent, #2dd4bf);
  width: 100%; opacity: .85; animation: bgpTimer linear forwards; transform-origin: left; }
@keyframes bgpTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .bgp-timer { animation: none; } }

/* Live overlay shell (both variants) */
/* SIZE SCALES WITH THE SCREEN. These were fixed pixels, so the card held the same
   physical size from 720p to 4K -- on a 4K panel it rendered at roughly a quarter
   of its intended relative size, a small chip in the corner of a very large TV.

   EVERY clamp() IS PRECEDED BY A PIXEL FALLBACK AND THAT IS NOT OPTIONAL.
   clamp() needs Chrome 79. This player runs on webOS 4.1 (Chrome 53) and Tizen 5
   (Chrome 63) through the TV launchers, and those simply discard a declaration
   they cannot parse -- so they keep the px line above and render exactly as they
   do today. Delete a fallback and you take out the LG and Samsung builds.
   vmin, not vw, so an ultrawide window does not inflate the card.

   POSITION comes from the campaign: .bgp-pos-* is set by the renderer, and the
   server whitelists the value so nothing an operator types reaches this sheet. */
.bgp-live { position: fixed; z-index: 4060; overflow: hidden;
  right: 24px; bottom: 110px; font-size: 14px;
  right: clamp(16px, 2.2vmin, 40px); bottom: clamp(80px, 11vmin, 170px);
  font-size: clamp(13px, 1.25vmin, 20px);
  background: linear-gradient(180deg, rgba(20,28,42,.97), rgba(11,16,26,.98));
  border: 1px solid rgba(255,255,255,.16); border-radius: 16px; box-shadow: 0 20px 55px rgba(0,0,0,.6); }
/* Option A — filmstrip */
.bgp-live-strip { display: flex; width: 440px; width: clamp(320px, 34vmin, 720px); max-width: 74vw; }

/* Four corners, one campaign field. The vertical offsets differ on purpose:
   the bottom needs to clear the transport controls, the top needs to clear the
   channel banner. */
.bgp-live.bgp-pos-bottom-right { top: auto; left: auto; bottom: 110px; right: 24px; bottom: clamp(80px, 11vmin, 170px); right: clamp(16px, 2.2vmin, 40px); }
.bgp-live.bgp-pos-bottom-left  { top: auto;  bottom: clamp(80px, 11vmin, 170px); right: auto; left: clamp(16px, 2.2vmin, 40px); }
.bgp-live.bgp-pos-top-right    { bottom: auto; top: clamp(60px, 8vmin, 130px);   left: auto; right: clamp(16px, 2.2vmin, 40px); }
.bgp-live.bgp-pos-top-left     { bottom: auto; top: clamp(60px, 8vmin, 130px);   right: auto; left: clamp(16px, 2.2vmin, 40px); }
.bgp-live-strip .bgp-banner { width: 118px; align-self: stretch; min-height: 120px; }
.bgp-ls-body { padding: 14px 16px 16px; min-width: 0; flex: 1; }
/* Two lines, not one. A single nowrap line ellipsised most real campaign titles
   ("Pacostar GOOGLE 1 — our recommended box" became "Pacostar GOOGLE 1 …") while
   the card had empty space below it. -webkit-line-clamp is old WebKit syntax and
   works on webOS 4.1 / Tizen 5; where it is unsupported the title simply wraps,
   which is still better than losing it. */
.bgp-ls-body .bgp-title { margin-top: 7px; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bgp-ls-actions { margin-top: 12px; display: flex; align-items: center; }
.bgp-ls-actions .bgp-cta { padding: 10px 16px; font-size: 14px; }
.bgp-ls-actions .bgp-dismiss { padding: 10px 14px; font-size: 13px; margin-left: 10px; }
/* ── Size scales the CARD, not just its box (2.9.293) ──────────────────────
   .bgp-title/.bgp-body/.bgp-cta are absolute px, so setting a campaign's
   size_pct widened the overlay and left the text the same — a "bigger banner"
   that was mostly extra whitespace. Inside .bgp-live these are re-expressed
   against the container's own font-size, which _promoPlaceStyle() sets in
   proportion to size_pct. Scoped to .bgp-live so the home card is untouched.
   The divisor is the container default, clamp(13px, 1.25vmin, 20px) ~= 13.5px
   at 1080p, which is what these px values were designed against. */
.bgp-live .bgp-title     { font-size: 1.41em; }
.bgp-live .bgp-body      { font-size: 1.04em; }
.bgp-live .bgp-sponsored { font-size: 0.78em; }
.bgp-live .bgp-sponsored::before { width: 0.44em; height: 0.44em; margin-right: 0.44em; }
/* 32% of the CARD, not an em width. In em the panel grew with the font-size, and
   the font-size follows the height -- so making a banner taller also made it
   wider, which is exactly what an independent height must not do. 118/367 of the
   client's default card = 32%. */
.bgp-live-strip .bgp-banner { width: 32%; min-height: 0; }
/* A column, so the call to action can be pushed to the bottom edge. Before
   this it sat straight after the body text, which left it stranded in the middle
   of any banner given an explicit height. */
.bgp-ls-body { padding: 1.04em 1.19em 1.19em; display: flex; flex-direction: column; }
.bgp-ls-actions { margin-top: auto; padding-top: 0.89em; }
/* With an explicit height the card must clip, not spill. min-height drops to 0
   so a short banner is genuinely short instead of being held open by the panel. */
.bgp-live-strip { overflow: hidden; }
.bgp-live-strip[style*="height"] .bgp-banner { min-height: 0; }
.bgp-live-strip[style*="height"] .bgp-ls-body { overflow: hidden; }
.bgp-ls-actions .bgp-cta { padding: 0.74em 1.19em; font-size: 1.04em; border-radius: 0.81em; }
.bgp-ls-actions .bgp-dismiss { padding: 0.74em 1.04em; font-size: 0.96em; border-radius: 0.81em; }

/* ── Creative formats (2.9.296) ────────────────────────────────────────────
   banner: the artwork IS the advert, so the image panel fills the card and the
   disclosure is overlaid on a scrim rather than dropped -- it has no off switch.
   text:   no artwork at all; the body column simply takes the whole width. */
.bgp-live-strip.bgp-fmt-banner { position: fixed; padding: 0; overflow: hidden; }
.bgp-live-strip.bgp-fmt-banner .bgp-banner { width: 100%; height: 100%; min-height: 0; }
.bgp-live-strip.bgp-fmt-banner .bgp-banner img { object-fit: contain; }
.bgp-fmt-overlay { position: absolute; top: 0; left: 0; padding: 6px 10px;
  background: rgba(3, 6, 12, .72); border-radius: 12px 0 8px 0; z-index: 2; }
.bgp-live-strip.bgp-fmt-banner .bgp-fmt-cta { position: absolute; right: 10px; bottom: 12px; z-index: 2; }
.bgp-live-strip.bgp-fmt-banner .bgp-fmt-x { position: absolute; right: 10px; top: 10px; z-index: 2;
  padding: 6px 10px; font-size: 12px; }
.bgp-live-strip.bgp-fmt-text .bgp-banner { display: none; }
.bgp-live-strip.bgp-fmt-text .bgp-ls-body { width: 100%; }

/* Option B — QR card (TV) */
.bgp-live-qr { width: 400px; width: clamp(300px, 30vmin, 620px); max-width: 70vw; padding: 16px 18px 18px; }
.bgp-lq-top { display: flex; align-items: flex-start; }
.bgp-lq-text { min-width: 0; flex: 1; }
.bgp-lq-text .bgp-title { margin-top: 7px; font-size: 18px; }
.bgp-scan { color: var(--accent, #2dd4bf); font-size: 13px; font-weight: 600; margin-top: 9px; }
.bgp-qr { width: 148px; height: 148px; border-radius: 10px; background: #fff; flex-shrink: 0;
  margin-left: 14px; padding: 8px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.bgp-qr img, .bgp-qr canvas { max-width: 100%; max-height: 100%; }
.bgp-lq-close { margin-top: 13px; width: 100%; }

/* ── TV ad card (owner, 24 Sep 2026: "look more like this" — the Fire TV
   "Want more info? / Send to phone" card) ───────────────────────────────────
   Dark glass card with a bright white rounded border, artwork tile + text on
   top, ONE big full-width light button underneath that has the remote's focus,
   and a small key hint. Everything inside is in em, so _promoPlaceStyle()'s
   font-size scales the whole card with the operator's size setting.
   Rules kept from the family above: a px fallback before every clamp() (webOS
   4.1 = Chrome 53 drops clamp and keeps the px line), no flex `gap`. */
.bgp-live.bgp-tvcard {
  /* ~26% of a 16:9 screen — the Fire TV card's share of the picture. */
  width: 480px; font-size: 16px; padding: 18px 20px 15px;
  width: clamp(420px, 46vmin, 880px); max-width: 80vw; font-size: clamp(15px, 1.6vmin, 27px);
  padding: 1.15em 1.3em 1em;
  background: rgba(15, 19, 27, .93);
  border: 3px solid rgba(255, 255, 255, .92); border-radius: 1.35em;
  box-shadow: 0 1.4em 3.6em rgba(0, 0, 0, .55); color: #fff; box-sizing: border-box; }
.bgp-tvc-top { display: flex; align-items: flex-start; }
.bgp-tvc-art { width: 6.6em; height: 3.7em; flex-shrink: 0; margin-right: 1em; margin-top: .15em;
  border-radius: .6em; overflow: hidden; background: #262d39;
  display: flex; align-items: center; justify-content: center; }
.bgp-tvc-art img { width: 100%; height: 100%; object-fit: cover; }
/* No artwork: the Fire TV card's yellow glyph on a dark tile. */
.bgp-tvc-art i { display: none; color: #f5c542; font-size: 1.55em; }
.bgp-tvc-art.noimg { width: 3.3em; height: 3.3em; }
.bgp-tvc-art.noimg i { display: block; }
.bgp-tvc-text { min-width: 0; flex: 1; }
.bgp-tvcard .bgp-sponsored { font-size: .74em; }
.bgp-tvcard .bgp-sponsored::before { width: .5em; height: .5em; margin-right: .5em; }
.bgp-tvcard .bgp-title { font-size: 1.42em; margin-top: .3em; white-space: normal; line-height: 1.22;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bgp-tvcard .bgp-body { font-size: 1.02em; color: #c7cfda; margin-top: .3em; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Banner creative: the artwork is the advert, so it spans the card. */
.bgp-tvcard.bgp-fmt-banner .bgp-tvc-hero { position: relative; border-radius: .75em; overflow: hidden;
  background: #262d39; line-height: 0; }
.bgp-tvcard.bgp-fmt-banner .bgp-tvc-hero img { width: 100%; height: auto; }
.bgp-tvcard.bgp-fmt-banner .bgp-fmt-overlay { border-radius: .75em 0 .6em 0; }
/* The big button. Light by default, pure white with a halo when focused —
   the focused state is what the viewer sees, because it takes focus on show. */
.bgp-tvc-btn { display: block; width: 100%; box-sizing: border-box; margin-top: 1em;
  padding: .8em 1em; border: 0; border-radius: .7em; cursor: pointer;
  background: #dde4ee; color: #111823; font-family: inherit; font-weight: 700;
  font-size: 1.14em; line-height: 1.2; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgp-tvc-btn:focus, .bgp-tvc-btn:hover,
.sn-item.bgp-tvc-btn:focus, .sn-item.bgp-tvc-btn:focus-visible { background: #fff; outline: none;
  border: 0; transform: none; box-shadow: 0 0 0 .22em rgba(255, 255, 255, .32); }
.bgp-tvc-hint { margin-top: .65em; text-align: center; color: #8d98a8; font-size: .8em;
  letter-spacing: .02em; }
.bgp-tvc-hint b { color: #c7cfda; font-weight: 700; }
/* Link ads on a TV (4.0.4, owner 24 Sep): the QR code sits IN the card — no
   button, so OK stays with the TV. A light panel under the text. */
.bgp-tvc-scan { display: flex; align-items: center; margin-top: 1em; padding: .7em;
  border-radius: .85em; background: rgba(255, 255, 255, .06); }
.bgp-tvc-qr { width: 7.6em; height: 7.6em; flex-shrink: 0; box-sizing: border-box; padding: .45em;
  background: #fff; border-radius: .6em; display: flex; align-items: center; justify-content: center; }
.bgp-tvc-qr img, .bgp-tvc-qr canvas { max-width: 100%; max-height: 100%; }
.bgp-tvc-scantext { margin-left: 1em; min-width: 0; }
.bgp-tvc-scantext b { display: block; font-size: 1.12em; color: #fff; line-height: 1.3; }
.bgp-tvc-scantext span { display: block; margin-top: .35em; color: #8d98a8; font-size: .92em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Countdown: a quiet white line clipped by the rounded corners. */
.bgp-tvcard .bgp-timer { background: rgba(255, 255, 255, .5); height: 2px; }

/* Full-screen "open on your phone" QR, same family: white rounded frame,
   big button. Opened by the card's button when the call to action is a link. */
.bgp-qrov { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 6000;
  display: flex; align-items: center; justify-content: center; background: rgba(3, 6, 12, .82); }
.bgp-qrov-card { font-size: 15px; font-size: clamp(14px, 1.45vmin, 22px);
  width: 420px; width: clamp(360px, 36vmin, 640px); max-width: 90vw; box-sizing: border-box;
  padding: 1.6em 1.8em 1.4em; text-align: center; color: #fff;
  background: rgba(15, 19, 27, .96); border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 1.35em; box-shadow: 0 1.4em 3.6em rgba(0, 0, 0, .6); }
.bgp-qrov-card .bgp-title { font-size: 1.35em; }
.bgp-qrov-sub { color: #c7cfda; font-size: 1em; margin-top: .4em; }
.bgp-qrov-code { display: inline-block; background: #fff; padding: .8em; border-radius: .9em;
  line-height: 0; margin-top: 1.1em; }
.bgp-qrov-url { color: #8d98a8; font-size: .8em; margin-top: .9em; word-break: break-all; }

/* ── Home banner (web TV 4.0.3 — owner, 24 Sep: "can we make the banner looking
   better in the /tv?") ────────────────────────────────────────────────────────
   Same family as the hero card below it and the TV ad card: a rounded card with
   a quiet frame; the artwork in an INSET rounded tile, padded in the artwork's
   own background colour (sampled from the image by _promoTileFromArt, so a
   wordmark fitted edge to edge never touches the tile's edge); Sponsored above
   the title; the call to action as the hero's white "Watch" button; a small
   round dismiss in the corner. No flex `gap` (collapses on webOS < Chromium 84);
   no aspect-ratio (Chrome 88+). */
.bgp-homebar { display: flex; align-items: center; position: relative; overflow: hidden;
  margin: 0 0 18px; padding: 14px 58px 14px 14px; box-sizing: border-box;
  background: #16213a;
  background: linear-gradient(215deg, #22386a, #16213a 55%, #101626);
  border: 1px solid rgba(255, 255, 255, .10); border-radius: 16px; transition: border-color .15s; }
.bgp-homebar:hover, .bgp-homebar.bgp-hb-focus { border-color: rgba(255, 255, 255, .32); }
.bgp-hb-art { width: 176px; height: 99px; flex-shrink: 0; border-radius: 12px; overflow: hidden;
  background: #1d2638; display: flex; align-items: center; justify-content: center; }
.bgp-hb-art img { width: 100%; height: 100%; object-fit: contain; padding: 10px 14px; box-sizing: border-box; }
.bgp-hb-art i { display: none; color: #f5c542; font-size: 30px; }
.bgp-hb-art.noimg { width: 99px; background: #262d39; }
.bgp-hb-art.noimg i { display: block; }
.bgp-hb-body { flex: 1; min-width: 0; padding: 0 24px; }
.bgp-hb-body .bgp-title { display: block; font-size: 21px; margin-top: 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgp-hb-body .bgp-body { margin-top: 5px; font-size: 14px; color: #aab4c3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bgp-hb-actions { flex-shrink: 0; display: flex; align-items: center; }
/* = .hm2-btn.hm2-btn-w, the hero's Watch button */
.bgp-hb-cta { display: inline-block; padding: 10px 22px; border-radius: 11px; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 15px; white-space: nowrap;
  background: #fff; color: #0c1526; border: 2.5px solid #fff; }
.bgp-hb-cta i { margin-left: 8px; }
.bgp-hb-cta:hover, .bgp-hb-cta:focus, .sn-item.bgp-hb-cta:focus, .sn-item.bgp-hb-cta:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 14px rgba(66, 165, 245, .55); }
.bgp-hb-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; padding: 0;
  border-radius: 50%; cursor: pointer; font-family: inherit; font-size: 13px; line-height: 28px;
  text-align: center; color: #9aa6b6; background: rgba(12, 18, 30, .55);
  border: 1px solid rgba(255, 255, 255, .14); }
.bgp-hb-x:hover, .bgp-hb-x:focus, .sn-item.bgp-hb-x:focus, .sn-item.bgp-hb-x:focus-visible {
  color: #fff; border-color: rgba(255, 255, 255, .55); outline: none; box-shadow: none; }
/* Narrow screens (phones, a portrait tablet): stack — artwork on top, a
   full-width button. */
@media (max-width: 700px) {
  .bgp-homebar { flex-wrap: wrap; padding: 12px; }
  .bgp-hb-art, .bgp-hb-art.noimg { width: 100%; height: 150px; }
  .bgp-hb-body { flex-basis: 100%; padding: 12px 2px 0; }
  .bgp-hb-body .bgp-title { white-space: normal; }
  .bgp-hb-actions { flex-basis: 100%; margin-top: 12px; }
  .bgp-hb-cta { width: 100%; text-align: center; }
}
/* On a TV: the Fire-TV-style frame (quiet until the remote is on the banner,
   then white) and the big light button of the live TV card. */
.bgp-homebar.bgp-homebar-tv { border: 2px solid rgba(255, 255, 255, .22); border-radius: 20px;
  padding: 16px 64px 16px 16px; }
.bgp-homebar.bgp-homebar-tv.bgp-hb-focus { border-color: rgba(255, 255, 255, .9); }
.bgp-homebar-tv .bgp-hb-actions { width: 280px; }
.bgp-homebar-tv .bgp-tvc-btn { margin-top: 0; font-size: 17px; padding: 14px 16px; }

/* ── Channel-surf preview card (CH+/-) ──────────────────────────────────────── */
#zap-osd {
  position: fixed; left: 50%; top: 8%; transform: translateX(-50%); z-index: 4050;
  display: none; align-items: center; min-width: 640px; max-width: 84vw;
  background: linear-gradient(135deg, rgba(18,24,38,.97), rgba(13,17,23,.97));
  border: 1px solid rgba(255,255,255,.16); border-radius: 18px;
  padding: 22px 30px; color: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.6);
}
#zap-osd .zap-logo { width: 104px; height: 104px; border-radius: 14px; background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
#zap-osd .zap-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
#zap-osd .zap-logo i { font-size: 42px; color: #6b7684; }
#zap-osd .zap-body { min-width: 0; flex: 1; margin-left: 22px; }
#zap-osd .zap-head { display: flex; align-items: baseline; margin-bottom: 10px; }
#zap-osd .zap-num { font-size: 36px; font-weight: 800; color: var(--accent, #2dd4bf); font-variant-numeric: tabular-nums; flex-shrink: 0; }
#zap-osd .zap-name { font-size: 30px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 16px; }
#zap-osd .zap-now { font-size: 19px; color: #e6edf3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#zap-osd .zap-now.zap-dim { color: #8b949e; }
#zap-osd .zap-nowdot { color: var(--accent, #2dd4bf); margin-right: 9px; font-size: 14px; }
#zap-osd .zap-time { color: #9aa4b2; font-size: 15px; margin-left: 10px; }
#zap-osd .zap-prog { height: 7px; background: rgba(255,255,255,.2); border-radius: 4px; margin: 11px 0 6px; overflow: hidden; max-width: 460px; }
#zap-osd .zap-prog-fill { height: 100%; background: #2dd4bf; border-radius: 4px; }
#zap-osd .zap-mins { font-size: 15px; color: #c9d1d9; font-weight: 700; }
#zap-osd .zap-hint { font-size: 15px; color: #8b949e; margin-top: 11px; }

/* NB: no flex `gap` anywhere in the info bar / zap card / buttons — webOS
   before Chromium 84 ignores it, collapsing all spacing to 0 (number glued to
   the channel name, badges glued to the clock). Margins work everywhere. */
.ib-row1 { display: flex; align-items: center; margin-bottom: 10px; }
.ib-row1 > * + * { margin-left: 16px; }
/* Channel-number badge (was the red "LIVE" chip). Accent, tabular digits. */
.ib-live { background: var(--accent, #2dd4bf); color: #04222b; font-size: 19px; font-weight: 800; padding: 3px 12px; border-radius: 7px; letter-spacing: 0.3px; flex-shrink: 0; font-variant-numeric: tabular-nums; min-width: 1.6em; text-align: center; }
.ib-ch-name { font-size: 26px; font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Clock: readable from the couch (was 13px grey — invisible on a TV). */
.ib-clock   { font-size: 26px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ib-epg     { display: flex; flex-direction: column; }
.ib-epg > * + * { margin-top: 5px; }
.ib-epg-row { display: flex; align-items: center; font-size: 15px; }
.ib-epg-row > * + * { margin-left: 8px; }
#ib-badges > * + * { margin-left: 6px; }
.ib-epg-row i { font-size: 12px; color: rgba(255,255,255,0.5); flex-shrink: 0; }
.ib-epg-row b { font-weight: 700; color: rgba(255,255,255,0.85); flex-shrink: 0; }
.ib-epg-row span { color: rgba(255,255,255,0.7); }
.ib-time    { font-size: 11px; color: rgba(255,255,255,0.4); font-variant-numeric: tabular-nums; margin-left: 4px; flex-shrink: 0; }

/* ── Number OSD ───────────────────────────────────────────────────────────── */
.num-osd {
  position: fixed; top: 76px; right: 24px; z-index: 150;
  background: rgba(0,0,0,0.85); border: 2px solid var(--accent);
  border-radius: 10px; padding: 10px 24px;
  font-size: 48px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  transition: opacity 0.2s;
}
.num-osd.visible { display: block !important; }

/* ── Volume OSD ───────────────────────────────────────────────────────────── */
.vol-osd {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 150;
  background: rgba(0,0,0,0.85); border-radius: 12px; padding: 10px 20px;
  display: flex; align-items: center; gap: 12px; min-width: 200px;
  pointer-events: none;
  transition: opacity 0.2s;
}
.vol-osd i     { color: #fff; font-size: 15px; flex-shrink: 0; }
.vol-track     { flex: 1; height: 4px; background: rgba(255,255,255,0.18); border-radius: 2px; overflow: hidden; }
.vol-fill      { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.15s; }
.vol-osd.visible { display: flex !important; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 9000;
  background: rgba(0,0,0,0.88); color: #fff;
  padding: 9px 22px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  pointer-events: none; white-space: nowrap;
  transition: opacity 0.3s;
}
.toast.visible { display: block !important; opacity: 1; }

/* ── Still watching? (web TV 4.1.2) ──────────────────────────────────────────
   Owner 28 Sep 2026. Same family as the TV ad card / QR overlay. Old-engine rules:
   no flex gap, no CSS grid, no clamp(), no sticky (webOS 4 = Chromium 53).
   Above the PIN pad / toast (9000), the QR overlay (6000) and the guide (3990). */
.idle-ov { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9100;
  display: flex; align-items: center; justify-content: center; background: rgba(3, 6, 12, .62); }
.idle-card { width: 560px; max-width: 90%; box-sizing: border-box; padding: 26px 30px 20px;
  text-align: center; color: #fff; font-size: 16px; background: rgba(15, 19, 27, .96);
  border: 2px solid rgba(255, 255, 255, .9); border-radius: 20px; }
.tv-scale .idle-card { width: 760px; font-size: 22px; }
.idle-title { font-size: 1.6em; font-weight: 800; line-height: 1.2; }
.idle-sub { margin-top: .4em; color: #c7cfda; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idle-body { margin-top: .8em; color: #e6edf3; }
.idle-cd { margin-top: 1em; color: #e6edf3; font-weight: 700; }
.idle-bar { height: 6px; margin-top: .6em; background: rgba(255, 255, 255, .18); border-radius: 3px; overflow: hidden; }
.idle-bar-fill { height: 100%; width: 100%; background: var(--accent); }
.idle-btns { margin-top: 1.2em; white-space: nowrap; }
.idle-btn { display: inline-block; min-width: 40%; margin: 0 .35em; padding: .75em 1.2em; border: 0;
  border-radius: .7em; background: rgba(255, 255, 255, .12); color: #fff; font-family: inherit;
  font-size: 1em; font-weight: 700; cursor: pointer; }
.idle-btn:focus, .idle-btn:hover { background: #fff; color: #111823; outline: none;
  box-shadow: 0 0 0 .22em rgba(255, 255, 255, .32); }
.idle-hint { margin-top: .9em; color: #8d98a8; font-size: .8em; }
/* tvAsk (s2926): the same card asks the questions the browser's prompt() / confirm() used to ask. */
.tv-ask-label { display: block; }
.tv-ask-input { display: block; width: 100%; box-sizing: border-box; margin-top: 1em; padding: .65em .8em;
  border: 2px solid rgba(255, 255, 255, .28); border-radius: .7em; background: rgba(255, 255, 255, .08);
  color: #fff; font-family: inherit; font-size: 1em; outline: none; }
.tv-ask-input:focus { border-color: #fff; box-shadow: 0 0 0 .22em rgba(255, 255, 255, .32); }
.idle-btn.tv-ask-danger { color: #ffb4ad; }
.idle-btn.tv-ask-danger:focus, .idle-btn.tv-ask-danger:hover { background: #da3633; color: #fff; }

/* ── Video.js overrides ───────────────────────────────────────────────────── */
.vjs-default-skin .vjs-big-play-button { display: none !important; }
.video-js .vjs-control-bar {
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent) !important;
}
.video-js .vjs-play-progress,
.video-js .vjs-volume-level { background: var(--accent) !important; }
.video-js .vjs-slider       { background: rgba(255,255,255,0.2) !important; }

/* ── Fullscreen (CSS class, NOT the browser Fullscreen API) ────────────────── */
/* setFullscreen() toggles body.app-fs. The real requestFullscreen()/exit path
   hung the webOS compositor on Stop→Back; a class that expands the player and
   hides the chrome is reliable on every engine. Longhand offsets only — the
   `inset` shorthand is unsupported on webOS 6 / Chromium 79. */
body.app-fs .navbar,
body.app-fs .ch-panel,
body.app-fs .v-divider,
body.app-fs .epg-strip        { display: none !important; }
/* Action buttons AUTO-HIDE in fullscreen (not gone): they fade in with the info
   bar (body.fs-chrome, set by revealFsInfoBar on any key/pointer activity) and
   fade back out after a few seconds — so Stop / exit-fullscreen stay reachable. */
/* Fullscreen: the action buttons are DOCKED INTO the info bar's TOP ROW as a
   flex item after the clock (_dockPlayerActions) — flowing in the row means
   they can never overlap the badges/clock, and they slide away WITH the bar. */
.ib-row1 .player-actions {
  position: static; bottom: auto; right: auto;
  opacity: 1 !important; pointer-events: auto !important; flex-shrink: 0;
}
/* CC (subtitles) toggle: lit accent when burn-in is active. */
.pact-btn.active { background: var(--accent, #2dd4bf); border-color: var(--accent, #2dd4bf); color: #04222b; }
.pact-btn.active i { color: #04222b; }
/* Desktop real fullscreen keeps the buttons in the player (info bar is outside
   the fullscreened element there). Pin them bottom-right — override the windowed
   .epg-open 212px lift so they don't float mid-screen. */
body.app-fs .shared-player-wrap.epg-open .player-actions,
body.app-fs .shared-player-wrap .player-actions { bottom: 20px !important; right: 24px !important; }

/* Expand the live player to cover the whole viewport. */
body.app-fs .shared-player-wrap {
  position: fixed !important;
  top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
  width: 100vw !important; height: 100vh !important; height: 100dvh !important; z-index: 4000 !important;
}
body.app-fs #live-player.video-js,
body.app-fs .shared-player-wrap.epg-open #live-player.video-js {
  top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
}
body.app-fs .shared-player-wrap.epg-open .player-ph,
body.app-fs .shared-player-wrap.epg-open .buf-spin,
body.app-fs .shared-player-wrap.epg-open .stream-err { bottom: 0 !important; }
/* The info bar and any promo/OSD must sit above the expanded player. */
body.app-fs .info-bar { z-index: 4001 !important; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ch-panel { width: 280px; }
  .nb-tabs .nbtab span { display: none; }
  .nbtab { padding: 0 10px; }
}

@media (max-width: 640px) {
  .ch-panel { width: 100%; border-right: none; border-bottom: 1px solid var(--divider); max-height: 40vh; }
  .split-section { flex-direction: column !important; }
  .v-divider { display: none; }
  .player-slot { min-height: 50vw; flex: none; height: 50vw; }
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .settings-body { grid-template-columns: 1fr; }
}

/* ── EPG strip items ──────────────────────────────────────────────────────── */
.epg-strip-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-bottom: 1px solid var(--divider);
  font-size: 13px;
}
.epg-strip-item:last-child { border-bottom: none; }
.epg-strip-item.current    { background: rgba(21,101,192,0.15); }
.epg-strip-item .epg-time  { font-size: 11px; color: var(--text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.epg-strip-item .epg-title { flex: 1; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Poster grid extras ───────────────────────────────────────────────────── */
.pc-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.pc-no-img {
  position: absolute; top:0; right:0; bottom:0; left:0; display: flex; align-items: center;
  justify-content: center; background: var(--surface-variant);
}
.pc-no-img i { font-size: 28px; color: var(--text-muted); }
.grid-empty {
  grid-column: 1/-1; padding: 40px; text-align: center;
  color: var(--text-muted); font-size: 14px;
}

/* ── Home extras ──────────────────────────────────────────────────────────── */
.home-loading, .home-empty {
  display: flex; align-items: center; justify-content: center;
  height: 200px; color: var(--text-muted); font-size: 14px; gap: 10px;
}
.hc-logo-icon { font-size: 28px; color: var(--accent); }
.hm-cover     { width: 100%; height: 100%; object-fit: cover; border-radius: 6px 6px 0 0; }
.hm-cover-ph  {
  width: 100%; aspect-ratio: 2/3; background: var(--surface-variant);
  border-radius: 6px 6px 0 0; display: flex; align-items: center; justify-content: center;
}
.hm-cover-ph i { font-size: 28px; color: var(--text-muted); }
.hm-title {
  font-size: 11px; padding: 5px 6px 7px; font-weight: 500;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.hm-progress { height: 3px; background: rgba(0,0,0,0.4); margin: 0 6px 4px; border-radius: 2px; }
.hm-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; }

/* ── Panel empty ──────────────────────────────────────────────────────────── */
.panel-empty {
  padding: 24px 16px; text-align: center;
  color: var(--text-muted); font-size: 13px;
}

/* ── Series detail episodes ───────────────────────────────────────────────── */
.sd-season-btn {
  flex-shrink: 0; padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--divider); background: transparent;
  color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.sd-season-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.sd-season-btn:hover  { border-color: var(--accent); color: var(--accent); }
.sd-empty, .sd-error  { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
.spinner-inline       { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }

.sd-ep-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid var(--divider); cursor: pointer;
  transition: background 0.15s;
}
.sd-ep-row:hover    { background: rgba(255,255,255,0.04); }
.sd-ep-row:last-child { border-bottom: none; }
.sd-ep-thumb {
  width: 120px; height: 68px; flex-shrink: 0; border-radius: 6px;
  overflow: hidden; background: var(--surface-variant); position: relative;
}
.sd-ep-thumb img    { width: 100%; height: 100%; object-fit: cover; }
.sd-ep-thumb-ph     { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.sd-ep-thumb-ph i   { font-size: 24px; color: var(--text-muted); }
.sd-ep-prog         { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(0,0,0,0.4); }
.sd-ep-prog-fill    { height: 100%; background: var(--accent); }
.sd-ep-info         { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sd-ep-num          { font-size: 11px; color: var(--accent); font-weight: 600; }
.sd-ep-watched      { color: var(--success, #3fb950); margin-left: 4px; }   /* s3035: watched on any device */
.sd-ep-title        { font-size: 14px; font-weight: 500; }
.sd-ep-dur          { font-size: 11px; color: var(--text-muted); }
.sd-ep-plot         { font-size: 12px; color: var(--text-muted); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ── Search results ───────────────────────────────────────────────────────── */
.sr-section       { margin-bottom: 28px; }
.sr-section-title { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 7px; margin-bottom: 12px; padding: 0 4px; }
.sr-grid          { display: flex; flex-wrap: wrap; gap: 10px; }
.sr-ch-card       {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 90px; padding: 10px 6px; border-radius: 10px;
  background: var(--surface-variant); cursor: pointer; transition: background 0.15s;
}
.sr-ch-card:hover { background: var(--card-bg); }
.sr-logo  { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--surface); }
.sr-logo img { width: 100%; height: 100%; object-fit: contain; }
.sr-logo i   { font-size: 20px; color: var(--text-muted); }
.sr-name  { font-size: 11px; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sr-empty { padding: 40px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ── Settings extras ──────────────────────────────────────────────────────── */
.sc-title {
  font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.05em; display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--divider);
}
.sc-btn {
  margin-top: 14px; padding: 9px 20px; border-radius: 8px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex;
  align-items: center; gap: 7px; transition: all 0.15s;
  background: rgba(255,255,255,0.07); color: #fff;
}
.sc-btn:hover       { background: rgba(255,255,255,0.12); }
.sc-btn-danger      { background: rgba(229,57,53,0.12); color: var(--live-red); }
.sc-btn-danger:hover { background: rgba(229,57,53,0.25); }
.sc-btn-active      { background: var(--accent, #2979ff) !important; color: #fff !important; }
.sc-select {
  background: var(--surface-variant); border: 1px solid var(--divider);
  color: #fff; padding: 6px 12px; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.sc-select:focus { outline: none; border-color: var(--accent); }

/* ── QR Login ─────────────────────────────────────────────────────────────── */
.login-divider {
  display: flex; align-items: center; gap: 12px; margin: 2px 0; width: 100%;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.1);
}
.login-divider span { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

.qr-toggle-btn {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 8px;
  border: 1px solid var(--accent); background: var(--accent);
  color: #06101b; font-size: 15px; font-weight: 800; font-family: inherit;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.qr-toggle-btn:hover { background: #64b5f6; border-color: #64b5f6; }

.manual-toggle-btn {
  width: 100%; min-height: 42px; padding: 10px 16px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.13); background: rgba(255,255,255,0.04);
  color: var(--text-muted); font-size: 13px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.manual-toggle-btn:hover { color: #fff; border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); }

.qr-section { width: 100%; margin-top: 6px; text-align: center; }
.qr-canvas  {
  display: inline-block; padding: 12px; background: #fff;
  border-radius: 12px; margin-bottom: 12px;
}
.qr-canvas img    { display: block !important; }
.qr-canvas canvas { display: none  !important; }
.qr-instruction { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; line-height: 1.5; }
.qr-code-text   { font-size: 12px; color: rgba(255,255,255,0.65); margin-bottom: 14px; }
.qr-code-text #qr-code-val { font-weight: 700; color: var(--accent); letter-spacing: 0.12em; }

.qr-status {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px; color: var(--text-muted); margin-bottom: 14px;
}
.qr-spinner {
  width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.qr-cancel-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-muted); padding: 7px 16px; border-radius: 8px;
  font-size: 12px; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s;
}
.qr-cancel-btn:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.sc-row-btn   { border-bottom: none; padding-top: 8px; padding-bottom: 14px; }
.sc-server    { font-size: 12px; color: var(--text-muted); word-break: break-all; text-align: right; max-width: 60%; }

/* ── Spatial navigation focus ring ───────────────────────────────────────── */
.sn-item:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(66,165,245,0.25);
}
.sn-item:focus-visible { outline: 2px solid var(--accent); }

/* Air-mouse pointer highlight (TV): the JS adds .tv-hover on mouseover so the
   pointed item lights up like the D-pad focus ring / the web player's :hover. */
.tv-hover { outline: 2px solid var(--accent); outline-offset: 2px; }
.nbtab.tv-hover { background: rgba(255,255,255,0.10); color: #fff; outline: none; }
.dash-card.tv-hover, .home-card.tv-hover, .poster-card.tv-hover, .pc-card.tv-hover {
  border-color: var(--accent); transform: scale(1.025);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25); outline: none;
}
.ch-tile.tv-hover {
  background: rgba(21,52,96,0.9); border-color: rgba(66,165,245,0.35);
  transform: scale(1.025); outline: none;
}

/* (Fullscreen button visibility is handled by the body.app-fs / .fs-chrome
   rules above — the old :fullscreen pseudo-class rules were removed with the
   switch away from the browser Fullscreen API.) */

/* ── TV-scale (10-foot UI) ────────────────────────────────────────────────── */
.tv-scale { font-size: 20px; }
.tv-scale .navbar     { height: 68px; }
.tv-scale .nbtab      { padding: 0 18px; font-size: 15px; }
/* 4.2 §1.2: VIDAA gets no .tv-scale (JS), so its navbar repeats the two TV rules under html.cu-tv */
html.cu-tv:not(.tv-scale) .navbar { height: 68px; }
html.cu-tv:not(.tv-scale) .nbtab  { padding: 0 18px; font-size: 15px; }
.tv-scale .ch-tile    { min-height: 82px; }
.tv-scale .ch-logo    { width: 54px; height: 54px; }
.tv-scale .ch-name    { font-size: 16px; }
.tv-scale .pc-card    { font-size: 14px; }
.tv-scale .vod-ctrl-btn { width: 60px; height: 60px; font-size: 22px; }

/* ── Favourites star on channel tiles ────────────────────────────────────── */
.ch-fav { font-size: 10px; color: #ffc107; flex-shrink: 0; margin-left: auto; }

/* ── Home VOD progress bar (inside .hc-poster) ───────────────────────────── */
.hc-poster { position: relative; }
.hm-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(0,0,0,0.4); }
.hm-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; }

/* ── Navbar messages button ──────────────────────────────────────────────── */
.nb-msg-btn {
  position: relative; background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 18px;
  padding: 6px 10px; border-radius: 6px;
  transition: color 0.15s;
}
.nb-msg-btn:hover { color: var(--accent); }
.nb-msg-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: var(--accent); color: #fff;
  border-radius: 8px; font-size: 10px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* ── Parental PIN Overlay ─────────────────────────────────────────────────── */
.pin-overlay {
  position: fixed; top:0; right:0; bottom:0; left:0; z-index: 9000;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
}
.pin-box {
  background: #161b22; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 36px 40px; text-align: center;
  min-width: 300px; max-width: 360px;
}
.pin-icon { font-size: 40px; color: var(--accent); margin-bottom: 16px; }
.pin-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.pin-sub   { font-size: 12px; color: var(--text-muted); margin-bottom: 24px; }
.pin-dots  { display: flex; gap: 12px; justify-content: center; margin-bottom: 8px; }
.pin-dot   {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3); background: transparent;
  transition: background 0.15s;
}
.pin-dot.filled { background: var(--accent); border-color: var(--accent); }
.pin-err   { color: #f87171; font-size: 12px; margin-bottom: 8px; }
.pin-pad   {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 20px;
}
.pin-key {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; color: #fff; font-size: 20px; font-weight: 600;
  padding: 14px 0; cursor: pointer; font-family: inherit;
  transition: background 0.1s;
}
.pin-key:hover, .pin-key:focus { background: rgba(255,255,255,0.15); outline: none; }
.pin-key:active { background: var(--accent); }
.pin-key:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
.pin-cancel { color: var(--text-muted); font-size: 16px; }
.pin-ok     { grid-column: 1 / -1; font-size: 18px; }   /* 2.9.430: PINs are 4-8 digits, so OK sends (no auto-send at 4) */
.pin-del    { font-size: 16px; }
/* s3126 the account gate (profiles, Add): the lock beside the title (the big lock above it pushed OK off a 720 screen at
   150 %); a person's name on one line with an ellipsis, a sentence on up to two lines */
.pin-acct .pin-icon { display: inline-block; font-size: 16px; margin: 0 8px 0 0; vertical-align: middle; }
.pin-acct .pin-title { display: inline-block; vertical-align: middle; }
.pin-acct .pin-sub { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pin-acct.pin-name .pin-sub { display: block; white-space: nowrap; text-overflow: ellipsis; }
/* the lock + "PIN" badge under a locked person's name, like the Child one */
.pf-badge.pf-lock { margin-top: -6px; font-size: 13px; font-weight: 600; color: #e6edf3; background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.4); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.pf-lock > i { font-size: 11px; margin-right: 2px; }
/* /s3126 */

/* ── Multi-view button ─────────────────────────────────────────────────────── */
.mv-toggle-btn {
  background: none; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px; color: var(--text-muted); cursor: pointer;
  padding: 4px 7px; font-size: 13px; flex-shrink: 0; line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.mv-toggle-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.mv-toggle-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Multi-view overlay ────────────────────────────────────────────────────── */
.mv-overlay {
  flex: 1; display: flex; flex-direction: column;
  background: #0a0a12; overflow: hidden; min-width: 0;
}
.mv-overlay.hidden { display: none; }

.mv-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
}
.mv-title { font-size: 15px; font-weight: 600; color: var(--text); }
.mv-hint-text { font-size: 12px; color: var(--text-muted); flex: 1; }
.mv-close-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; color: var(--text); cursor: pointer;
  padding: 6px 14px; font-size: 13px; font-family: inherit;
  transition: background 0.15s;
}
.mv-close-btn:hover { background: rgba(255,255,255,0.18); }

.mv-grid {
  flex: 1; display: flex; gap: 4px; padding: 4px; overflow: hidden;
}

.mv-cell {
  flex: 1; position: relative; background: #111;
  border-radius: 8px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; transition: border-color 0.2s;
}
.mv-cell.mv-active { border-color: var(--accent); }
.mv-cell:not(.mv-active):hover { border-color: rgba(255,255,255,0.3); }

.mv-cell video {
  width: 100%; height: 100%; object-fit: contain; display: block; background: #000;
}

.mv-cell-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 20px 12px 10px;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.mv-cell-name {
  font-size: 13px; font-weight: 500; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.mv-cell-audio-icon {
  background: var(--accent); border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; flex-shrink: 0;
}
.mv-cell-audio-icon.hidden { display: none; }

.mv-cell-empty {
  position: absolute; top:0; right:0; bottom:0; left:0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.15); font-size: 48px; pointer-events: none;
}
.mv-cell:not(.mv-empty) .mv-cell-empty { display: none; }

/* ── Continue Watching: remove badge ─────────────────────────────────────── */
/* Hidden until the card is hovered (mouse) or focused (D-pad), so it never
   clutters the row. Touch/D-pad users can also long-press the card. */
.cw-card .hc-poster { position: relative; }
.cw-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(10, 12, 18, 0.82);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
  z-index: 3;
}
.cw-card:hover .cw-remove,
.cw-card:focus .cw-remove,
.cw-card:focus-within .cw-remove,
.cw-card.sn-focused .cw-remove { opacity: 1; transform: scale(1); }
.cw-remove:hover { background: #dc2626; transform: scale(1.1); }
/* Coarse pointers (touch/TV) have no hover — long-press is the gesture there,
   so keep the badge faintly visible as an affordance rather than invisible. */
@media (hover: none) {
  .cw-remove { opacity: .65; transform: scale(1); }
}

/* ── Modern home (4.0) — hero + strips + section pills ─────────────────────
   LG Chromium 68 safe: no flex gap (margins), longhand offsets only. */
.hm2-hero-row { display: flex; margin: 10px 0 4px 0; }
.hm2-hero {
  flex: 7 1 0%; min-width: 0; min-height: 240px; position: relative;
  overflow: hidden; border-radius: 16px; border: 1px solid rgba(255,255,255,0.09);
  background: #17203b;
  background: linear-gradient(215deg, #2b4a8a, #17203b 55%, #101425);
  padding: 26px 30px; display: flex; flex-direction: column; justify-content: center;
}
.hm2-hero-logo {
  position: absolute; right: 36px; top: 50%; transform: translateY(-50%);
  max-height: 130px; max-width: 260px; width: auto; height: auto; opacity: 0.85;
}
.hm2-upnext {
  flex: 3 1 0%; min-width: 0; margin-left: 14px; overflow: hidden;
  border-radius: 16px; background: #101425;
  border: 1px solid rgba(255,255,255,0.09); padding: 16px 20px;
}
.hm2-chl { color: #93a0b8; font-size: 14px; font-weight: 600; position: relative; z-index: 1; }
.hm2-ttl {
  font-size: 28px; font-weight: 800; color: #eef2fa; margin: 5px 0 2px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 72%; position: relative; z-index: 1;
}
.hm2-meta { color: #93a0b8; font-size: 13px; position: relative; z-index: 1; }
.hm2-bar {
  height: 5px; border-radius: 2px; background: rgba(255,255,255,0.14);
  overflow: hidden; margin-top: 9px;
}
.hm2-bar-hero { max-width: 320px; position: relative; z-index: 1; }
.hm2-fill { display: block; height: 100%; background: var(--accent); }
.hm2-cta { margin-top: 18px; position: relative; z-index: 1; }
.hm2-btn {
  display: inline-block; padding: 9px 20px; border-radius: 11px;
  font-weight: 700; font-size: 14px; margin-right: 10px; cursor: pointer;
  background: rgba(255,255,255,0.10); border: 2.5px solid rgba(255,255,255,0.25);
  color: #fff; font-family: inherit;
}
.hm2-btn i { margin-right: 6px; }
.hm2-btn-w { background: #fff; color: #0c1526; border-color: #fff; }
.hm2-btn:focus, .hm2-btn:hover {
  border-color: var(--accent); outline: none;
  box-shadow: 0 0 14px rgba(66,165,245,0.55);
}
.hm2-un-title {
  font-size: 11px; letter-spacing: 0.16em; color: #93a0b8;
  font-weight: 700; margin-bottom: 8px;
}
.hm2-un-row {
  font-size: 13.5px; color: #c7d0e0; padding: 3.5px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hm2-un-t { display: inline-block; width: 54px; color: #93a0b8; }
.hm2-dim { color: #6b7688; }
/* 2.9.469 (s3069 5c): a browser (not a TV: html.cu-tv keeps the rules above): the channel line, title, times and bar stay clear of
   the logo (260 px at most, 36 px in from the edge); up to 900 px Up next goes under the hero and the title wraps to two lines;
   on a phone the logo is a small mark at the top right and the channel line makes room for it. The title had run under the logo
   and the Watch / Guide buttons. */
html:not(.cu-tv) .hm2-chl, html:not(.cu-tv) .hm2-ttl, html:not(.cu-tv) .hm2-meta { max-width: calc(100% - 290px); }
html:not(.cu-tv) .hm2-bar-hero { width: calc(100% - 290px); }
@media (max-width: 900px) {
  html:not(.cu-tv) .hm2-hero-row { display: block; }
  html:not(.cu-tv) .hm2-hero { min-height: 0; }
  html:not(.cu-tv) .hm2-upnext { margin: 10px 0 0 0; }
  html:not(.cu-tv) .hm2-ttl { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
}
@media (max-width: 640px) {
  html:not(.cu-tv) .hm2-hero { padding: 16px 16px 18px; }
  html:not(.cu-tv) .hm2-hero-logo { top: 16px; right: 16px; transform: none; max-width: 72px; max-height: 40px; }
  html:not(.cu-tv) .hm2-chl { min-height: 40px; max-width: none; padding-right: 84px; }
  html:not(.cu-tv) .hm2-ttl, html:not(.cu-tv) .hm2-meta { max-width: none; }
  html:not(.cu-tv) .hm2-bar-hero { width: auto; }
  html:not(.cu-tv) .hm2-ttl { font-size: 22px; }
  html:not(.cu-tv) .hm2-btn { margin-bottom: 6px; }
}
/* strip cards — override the old centered-column channel card */
.hm2-strip .home-row-scroll { padding-bottom: 4px; }
.home-card-channel.hm2-card {
  display: inline-block; vertical-align: top; text-align: left;
  width: 196px; min-width: 196px; margin-right: 10px; padding: 10px 13px;
  background: #1e2438; border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px; overflow: hidden; cursor: pointer;
}
.home-card-channel.hm2-card:focus, .home-card-channel.hm2-card:hover {
  background: #2a4a7a; border: 2.5px solid var(--accent);
  padding: 8px 11px; outline: none;
  box-shadow: 0 0 14px rgba(66,165,245,0.45);
}
.hm2-card-r1 {
  font-size: 13.5px; font-weight: 700; color: #eef2fa;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hm2-card-logo {
  width: 22px; height: 22px; vertical-align: middle;
  margin-right: 7px; border-radius: 5px;
}
.hm2-card-name { vertical-align: middle; }
.hm2-np {
  color: #93a0b8; font-size: 12px; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hm2-card .hm2-bar { height: 3.5px; margin-top: 7px; }
/* section pills — compact quick links with counts */
.hm2-pills { margin: 18px 0 8px 0; text-align: center; }
.dash-card.hm2-pill {
  display: inline-block; vertical-align: middle; width: auto; height: auto;
  margin: 0 8px 8px 0; padding: 8px 16px; border-radius: 999px;
  background: rgba(30,36,56,0.6); border: 1px solid rgba(255,255,255,0.09);
  color: #c7d0e0; font-size: 13px; font-weight: 600; cursor: pointer;
}
.dash-card.hm2-pill i { margin-right: 7px; font-size: 13px; }
.dash-card.hm2-pill .dash-card-count {
  display: inline; font-size: 12px; color: #93a0b8; margin-left: 7px;
}
.dash-card.hm2-pill:focus, .dash-card.hm2-pill:hover {
  background: var(--accent); border-color: var(--accent); color: #fff; outline: none;
}
.dash-card.hm2-pill:focus .dash-card-count,
.dash-card.hm2-pill:hover .dash-card-count { color: rgba(255,255,255,0.85); }

/* 4.0 polish: the old .home-row-scroll flex sizing squeezed strip cards to
   ~90px (flex-basis beats width in flex layout) — pin the basis; and hide
   progress tracks entirely when a channel has no EPG (demo channels). */
.home-card-channel.hm2-card { flex: 0 0 196px; }
.hm2-bar:empty { visibility: hidden; }

/* 4.0: the legacy channel row is a 90px-track GRID (repeat(auto-fill,
   minmax(90px,1fr))) — 196px strip cards overflowed their tracks and
   overlapped. Strips are a horizontal flex scroller instead. */
.hm2-strip .home-row-scroll {
  display: flex; grid-template-columns: none; gap: 0;
  overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.hm2-strip .home-row-scroll::-webkit-scrollbar { height: 3px; }
.hm2-strip .home-row-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1); border-radius: 2px; }

/* 4.0: don't butcher the card highlight — the scroller clipped the ring
   top/bottom and the NEXT card painted over its right edge. Padding gives the
   glow room inside the scrollport (negative margin keeps alignment), z-index
   lifts the highlighted card above its neighbours. */
.hm2-strip .home-row-scroll {
  padding: 6px 5px 10px 5px;
  margin: -6px -5px 0 -5px;
}
.home-card-channel.hm2-card { position: relative; }
.home-card-channel.hm2-card:focus, .home-card-channel.hm2-card:hover {
  z-index: 2;
}

/* 4.0: navbar focus for TV/D-pad — the 2px rectangular outline read as a
   broken box (and could clip). Inset ring + pill background instead. */
.nbtab:focus, .nbtab:focus-visible {
  outline: none !important;
  background: rgba(66,165,245,0.18);
  color: var(--accent);
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* 4.0: wide channel logos (HBO, MAX…) were squashed into the 22px square —
   letterbox them instead of distorting. */
.hm2-card-logo { object-fit: contain; }

/* 2.9.484 (D362): Skip intro / Skip credits pill and the Next episode card (bottom right; margins, not flex gaps: old webOS) */
.vod-skip {
  position: absolute; right: 32px; bottom: 48px; z-index: 12; overflow: hidden;
  min-height: 48px; padding: 0 22px; border-radius: 24px;
  background: rgba(20,20,20,0.82); border: 1px solid rgba(255,255,255,0.35); color: #fff;
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: bottom 0.22s ease-out, opacity 0.22s ease-out;
}
#vod-ui.visible ~ .vod-skip { bottom: 128px; }          /* above the time bar while the controls are up */
.vod-skip:hover, .vod-skip:focus { background: #fff; color: #111; outline: none; }
.vod-skip:focus { box-shadow: 0 0 0 3px var(--accent); }   /* :focus, not :focus-visible: Chrome < 86 (webOS <= 5, Tizen <= 5.5) drops the rule */
.vod-skip-line { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); transition: width 0.3s linear; }
.vod-next {
  position: absolute; right: 32px; bottom: 48px; z-index: 12; display: flex; align-items: center;
  width: 520px; max-width: calc(100% - 32px); padding: 14px; border-radius: 14px;
  background: rgba(16,16,16,0.92); border: 1px solid rgba(255,255,255,0.18); color: #fff;
  animation: vod-next-in 0.22s ease-out;
}
#vod-ui.visible ~ .vod-next { bottom: 128px; }
.vod-next-img { flex: 0 0 144px; height: 81px; margin-right: 14px; border-radius: 8px; background: #2a2a2a center / cover no-repeat; }
.vod-next-b { min-width: 0; flex: 1; }
.vod-next-k { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,0.7); }
.vod-next-t { display: block; margin: 2px 0 10px; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vod-next-row { display: flex; flex-wrap: wrap; align-items: center; }
.vod-next-row > button { min-height: 44px; margin: 0 8px 4px 0; padding: 0 16px; border-radius: 22px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.vod-next-play { display: inline-flex; align-items: center; background: #fff; color: #111; border: 0; }
.vod-next-play i { margin: 0 8px 0 2px; }
.vod-next-stay { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.vod-next-row > button:focus { outline: none; box-shadow: 0 0 0 3px var(--accent); }
.vod-next-stay:hover, .vod-next-stay:focus { background: rgba(255,255,255,0.14); }
.vod-next-ring { width: 26px; height: 26px; margin-left: -6px; transform: rotate(-90deg); }
.vod-next-ring circle { fill: none; stroke-width: 3; }
.vod-next-ring-bg { stroke: rgba(0,0,0,0.15); }
.vod-next-ring-fg { stroke: #111; stroke-dasharray: 100.53; stroke-dashoffset: 0; transition: stroke-dashoffset 0.3s linear; }
@keyframes vod-next-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .vod-skip, .vod-next { right: 16px; bottom: 24px; }
  .vod-next { left: 16px; width: auto; max-width: none; }
  .vod-next-img { flex-basis: 96px; height: 54px; }
  #vod-ui.visible ~ .vod-skip, #vod-ui.visible ~ .vod-next { bottom: 136px; }
}
@media (prefers-reduced-motion: reduce) {
  .vod-skip, .vod-skip-line, .vod-next-ring-fg { transition: none; }
  .vod-next { animation: none; }
}

/* ── Catch-up 4.2 ── */
/* S2: the resume prompt (§2.7) and the preparing card (§2.7.1), a layer inside #vod-overlay above the
   video and the player's UI (z 220 in the overlay's stacking), below the PIN pad and the idle cards.
   Three layouts: `tv` (html.cu-tv, CSS px at 1920, text floor 21 px), `desk`, `phone` (≤ 640 px).
   The §7.3 rules apply (margins instead of flex gap, no grid, no sticky, fixed sizes; no transitions on TV). */
.cu-rp { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 220; color: #fff;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.cu-rp.hidden { display: none; }
.vod-overlay.cu-rp-up .vod-ui { display: none; }
.cu-rp-back { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-color: #233246; }
.cu-rp-logo, .cu-rp-chname { position: absolute; left: 50%; top: 68%; transform: translate(-50%, -50%); opacity: 0.08; }
.cu-rp-logo { width: 240px; height: 120px; object-fit: contain; }
.cu-rp-chname { font-size: 96px; font-weight: 900; color: #fff; white-space: nowrap; }
.cu-rp-shade { position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.38) 50%, rgba(0,0,0,0.45) 100%); }
.cu-rp-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; padding: 20px 24px; }
.cu-rp-top .vod-back { margin-right: 14px; }
.cu-rp-top .vod-title-block { flex: 1; min-width: 0; }
.cu-rp-top .vod-title-block span { display: block; }
.cu-rp-top #cu-rp-title { font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-rp-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); width: 420px; max-width: calc(100% - 32px);
  box-sizing: border-box; padding: 22px 24px 20px; border-radius: 16px; background: #121b2e; border: 1px solid #2a3654;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55); }
.cu-rp-meta { font-size: 13px; color: #aab6cc; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-rp-title { font-size: 20px; font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.cu-rp-title i { color: var(--live-red); margin-right: 6px; }
.cu-rp-prep-title { display: flex; align-items: center; }
.cu-rp-spin { width: 20px; height: 20px; border-width: 3px; margin-right: 10px; }
.cu-rp-bar { position: relative; height: 5px; border-radius: 3px; background: #243049; margin-bottom: 10px; }
.cu-rp-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #f59e0b; }
.cu-rp-built { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #8d9ab3; }
.cu-rp-bar .cu-rp-tick { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; background: #f59e0b; }
.cu-rp-where { font-size: 12px; color: #8d9ab3; margin-bottom: 14px; }
.cu-rp-ready { font-size: 13px; color: #e2e8f0; margin-bottom: 4px; }
.cu-rp-ready + .cu-rp-btns, .cu-rp-bar + .cu-rp-btns { margin-top: 12px; }
.cu-rp-btns { display: flex; margin-top: 2px; }
.cu-rp-btn { flex: 1; height: 42px; border-radius: 8px; font-size: 15px; font-weight: 600; color: #fff; background: #16213a;
  border: 1px solid #3a4867; cursor: pointer; outline: none; font-family: inherit; padding: 0 8px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.cu-rp-btn + .cu-rp-btn { margin-left: 12px; }
.cu-rp-pri { background: #1565C0; border-color: #1565C0; font-weight: 700; }
.cu-rp-btn:focus, .cu-rp-btn.cu-on { box-shadow: 0 0 0 3px #fff, 0 6px 22px rgba(66,165,245,0.45); }
.cu-rp-hint { display: none; }
.cu-rp-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.cu-rp-play { width: 96px; height: 96px; border-radius: 50%; font-size: 40px; line-height: 1; padding: 0 0 0 6px;
  background: rgba(21,101,192,0.9); border: 2px solid #fff; color: #fff; cursor: pointer; }
.cu-rp-seek { position: absolute; left: 24px; right: 24px; bottom: 28px; display: flex; align-items: center; }
.cu-rp-seek span { font-size: 13px; color: rgba(255,255,255,0.7); font-variant-numeric: tabular-nums; width: 42px; }
.cu-rp-seek span:last-child { text-align: right; width: 60px; }
.cu-rp-track { position: relative; flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.2); margin: 0 10px; }
.cu-rp-track .cu-rp-saved { position: absolute; left: 0; top: 0; bottom: 0; background: #f59e0b; border-radius: 2px; }
.cu-rp-track .cu-rp-built { position: absolute; left: 0; top: 0; bottom: 0; background: #8d9ab3; border-radius: 2px; }
.cu-rp-track .cu-rp-tick { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; background: #f59e0b; }
@media (hover: hover) {
  html:not(.cu-tv) .cu-rp-btn:hover { background: #1e2b4a; }
  html:not(.cu-tv) .cu-rp-pri:hover { background: #1976D2; }
  html:not(.cu-tv) .cu-rp-play:hover { background: #1976D2; }
}
/* phone (§2.7): the card spans the width minus 32 px, buttons 48 px, the seek row above the safe area */
@media (max-width: 640px) {
  html:not(.cu-tv) .cu-rp-card { width: calc(100% - 32px); padding: 18px 16px 16px; }
  html:not(.cu-tv) .cu-rp-btn { height: 48px; }
  html:not(.cu-tv) .cu-rp-seek { left: 16px; right: 16px; bottom: 0; padding-bottom: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  html:not(.cu-tv) .cu-rp-top { padding: 14px 16px; }
}
/* tv (§2.1, §2.7, §2.7.1): CSS px at 1920 = board px × 1.5; the text floor 21 px; one ring, no transitions (§8) */
.cu-tv .cu-rp * { transition: none; }
.cu-tv .cu-rp-top { padding: 30px 36px; }
.cu-tv .cu-rp-top .vod-back { width: 60px; height: 60px; font-size: 24px; margin-right: 21px; }
.cu-tv .cu-rp-top #cu-rp-title { font-size: 27px; }
.cu-tv .cu-rp-top .vod-sub { font-size: 21px; }
.cu-tv .cu-rp-card { width: 762px; padding: 42px 48px 36px; border-radius: 27px; transform: translate(-50%, -56%); }
.cu-tv .cu-rp-meta { font-size: 25.5px; margin-bottom: 12px; }
.cu-tv .cu-rp-title { font-size: 40.5px; margin-bottom: 21px; }
.cu-tv .cu-rp-spin { width: 42px; height: 42px; border-width: 5px; margin-right: 18px; }
.cu-tv .cu-rp-bar { height: 10.5px; border-radius: 5px; margin-bottom: 18px; }
.cu-tv .cu-rp-bar .cu-rp-tick { top: -4px; bottom: -4px; width: 4px; }
.cu-tv .cu-rp-where { font-size: 22.5px; margin-bottom: 27px; }
.cu-tv .cu-rp-ready { font-size: 24px; margin-bottom: 8px; }
.cu-tv .cu-rp-ready + .cu-rp-btns, .cu-tv .cu-rp-bar + .cu-rp-btns { margin-top: 24px; }
.cu-tv .cu-rp-btn { height: 84px; border-radius: 15px; font-size: 28.5px; }
.cu-tv .cu-rp-btn + .cu-rp-btn { margin-left: 21px; }
.cu-tv .cu-rp-btn:focus, .cu-tv .cu-rp-btn.cu-on { box-shadow: 0 0 0 4px #fff, 0 9px 33px rgba(66,165,245,0.45); }
.cu-tv .cu-rp-hint { display: block; margin-top: 24px; text-align: center; font-size: 21px; color: #8d98a8; }
.cu-tv .cu-rp-seek { left: 36px; right: 36px; bottom: 42px; }
.cu-tv .cu-rp-seek span { font-size: 21px; width: 100px; }
.cu-tv .cu-rp-track { height: 6px; }
.cu-tv .cu-rp-track .cu-rp-tick { top: -6px; bottom: -6px; width: 4px; }
.cu-tv .cu-rp-logo { width: 480px; height: 240px; }
.cu-tv .cu-rp-chname { font-size: 180px; }
.cu-tv .cu-rp-play { width: 160px; height: 160px; font-size: 64px; }
.cu-tv .cu-rp-center .spinner.lg { width: 72px; height: 72px; border-width: 6px; }
/* S3: the library (§2.3), the show page (§2.5), the Насрочени page (§2.4), the item menu (§2.6), the undo bar (§2.9),
   the room chooser (§2.11) and the navbar width fix (§1.2). Base = `desk`; `.cu-tv` = TV (CSS px at 1920, text floor
   21 px, one ring at a time, no transitions); `phone` under @media (max-width: 640px) and html:not(.cu-tv).
   §7.3: margins instead of flex gap, no grid, no sticky, no clamp function, fixed sizes, hover rules only under (hover: hover). */
.cu-f { outline: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* -- the section bar -- */
.cu-bar { padding: 0 16px; overflow: visible; }
.cu-bar .sec-title { margin-right: 14px; }
.cu-bar .sec-title i { margin-right: 6px; }
.cu-chips { display: flex; align-items: center; flex-shrink: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 8px 6px; margin: -8px -6px; }
.cu-chips::-webkit-scrollbar { display: none; }
.cu-chip { height: 30px; padding: 0 12px; margin-right: 6px; background: var(--card-bg); border: 1px solid var(--divider); border-radius: 15px; color: var(--text-muted);
  font-family: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.cu-chip.active { background: var(--primary); border-color: var(--accent); color: #fff; font-weight: 600; }
.cu-upcwrap { display: inline-flex; align-items: center; flex-shrink: 0; }
.cu-sep { display: inline-block; width: 1px; height: 18px; background: rgba(255,255,255,0.14); margin: 0 10px 0 6px; flex-shrink: 0; }
.cu-upc { position: relative; height: 30px; padding: 0 12px; background: none; border: 1px solid rgba(255,255,255,0.22); border-radius: 15px; color: #fff;
  font-family: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0; display: inline-flex; align-items: center; }
.cu-upc i { margin-right: 6px; font-size: 11px; }
.cu-upc-badge { display: none; }
.cu-free { margin-left: auto; padding-left: 12px; font-size: 12px; color: #8d9ab3; white-space: nowrap; flex-shrink: 0; }
/* -- the body: rows, cards, tiles, grids, channel sections -- */
.cu-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 20px 24px 24px 24px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
.cu-rowwrap { margin-bottom: 24px; }
.cu-rowtitle { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; }
.cu-chtitle { display: inline-flex; align-items: center; }
.cu-chlogo { width: 30px; height: 30px; object-fit: contain; margin-right: 10px; }
.cu-rowbox { position: relative; }
.cu-row { position: relative; display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden; padding: 8px 6px 26px 6px; margin: -8px -6px -26px -6px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
.cu-grid { display: flex; flex-wrap: wrap; align-items: flex-start; padding: 8px 6px 0 6px; margin: -8px -6px 0 -6px; }
.cu-grid .cu-tile { margin: 0 16px 20px 0; }
.cu-card, .cu-tile { flex-shrink: 0; margin-right: 16px; cursor: pointer; position: relative; }
.cu-card { width: 300px; }
.cu-tile { width: 220px; }
.cu-cardbox { position: relative; width: 100%; height: 169px; border-radius: 10px; overflow: hidden; background: #233246; }
.cu-tile .cu-cardbox { height: 124px; }
.cu-art { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; }
.cu-art::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(0,0,0,0.22)); }
.cu-logo { width: 85%; height: 85%; object-fit: contain; position: relative; z-index: 1; }
.cu-chname { position: relative; z-index: 1; font-size: 16px; font-weight: 800; color: rgba(255,255,255,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90%; padding: 0 6px; }
.cu-chbadge { position: absolute; top: 11px; left: 11px; z-index: 2; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: rgba(0,0,0,0.55); color: #fff;
  max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-cwbar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,0.18); z-index: 2; }
.cu-cwfill { height: 100%; background: #f59e0b; }
.cu-dot { position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: #3b82f6; z-index: 2; }
.cu-badge { position: absolute; top: 8px; right: 8px; z-index: 2; min-width: 18px; height: 18px; line-height: 18px; padding: 0 6px; border-radius: 9px; background: #3b82f6; color: #fff;
  font-size: 11px; font-weight: 700; text-align: center; }
.cu-ttl { margin-top: 8px; font-size: 14px; font-weight: 600; color: #e6edf3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-sub { margin-top: 2px; font-size: 12px; color: #8d9ab3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-play { display: none; position: absolute; left: 50%; top: 50%; z-index: 3; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,255,255,0.92);
  color: #0b1220; font-size: 20px; line-height: 52px; text-align: center; padding-left: 4px; box-sizing: border-box; }
.cu-more { display: none; position: absolute; top: 8px; right: 8px; z-index: 4; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.6); color: #fff; font-size: 13px; cursor: pointer; align-items: center; justify-content: center; }
.cu-tile .cu-more { right: auto; left: 8px; }
.cu-lrow { display: flex; align-items: center; height: 76px; margin-bottom: 8px; cursor: pointer; position: relative; }
.cu-lthumb { position: relative; width: 108px; height: 61px; border-radius: 8px; overflow: hidden; margin-right: 12px; flex-shrink: 0; background: #233246; }
.cu-linfo { flex: 1; min-width: 0; }
.cu-lrow .cu-ttl { margin-top: 0; font-size: 15px; }
.cu-art-sm .cu-chname { font-size: 12px; }
.cu-arrow { display: none; position: absolute; top: 50%; z-index: 5; width: 36px; height: 36px; margin-top: -36px; padding: 0; border-radius: 50%; background: rgba(22,33,62,0.95);
  border: 1px solid rgba(255,255,255,0.22); color: #fff; font-size: 13px; cursor: pointer; align-items: center; justify-content: center; }
.cu-arrow-l { left: -12px; }
.cu-arrow-r { right: -12px; }
html:not(.cu-tv) .cu-arrow { display: flex; }
.cu-arrow.hidden { display: none !important; }
.cu-freefoot { display: none; }
/* -- states (§2.8) -- */
.cu-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 24px; color: var(--text-muted); }
.cu-state-ic { font-size: 40px; color: #3a4867; margin-bottom: 14px; }
.cu-state-ic.cu-ok { color: #43A047; }
.cu-state-t { font-size: 16px; font-weight: 600; color: #e6edf3; }
.cu-state-s { font-size: 13px; margin-top: 6px; }
.cu-state .cu-btn { margin: 16px 0 0 0; }
/* -- the show page (§2.5) and the Насрочени page (§2.4): under the navbar, inside .sections, one scroller -- */
.cu-page { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 30; background: var(--surface); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.cu-hero { position: relative; height: 320px; max-height: 50vh; overflow: hidden; }
.cu-hero-nodesc { height: 260px; }
.cu-hero-art { position: absolute; right: 70px; top: 48px; z-index: 1; }
.cu-hero-logo { width: 220px; height: 110px; object-fit: contain; opacity: 0.9; }
.cu-hero-chname { font-size: 40px; font-weight: 800; color: rgba(255,255,255,0.42); white-space: nowrap; }
.cu-hero-shade { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; background: linear-gradient(to right, rgba(26,26,46,0.97) 0%, rgba(26,26,46,0.78) 45%, rgba(26,26,46,0.15) 100%); }
.cu-hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 100px; z-index: 1; background: linear-gradient(to bottom, rgba(26,26,46,0), #1A1A2E); }
.cu-pagehead { position: absolute; top: 12px; left: 24px; z-index: 3; }
.cu-backpill { height: 28px; padding: 0 12px; border-radius: 14px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); color: #fff; font-family: inherit;
  font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; }
.cu-backpill i { margin-right: 6px; }
.cu-hero-text { position: absolute; left: 24px; right: 24px; bottom: 20px; z-index: 2; }
.cu-meta { font-size: 13px; color: #aab6cc; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-title { font-size: 32px; font-weight: 800; line-height: 1.15; margin: 0 0 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cu-desc { font-size: 14px; line-height: 1.45; color: #c3cde0; max-width: 700px; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cu-btns { display: flex; flex-wrap: wrap; align-items: center; }
.cu-btn { height: 40px; padding: 0 16px; margin: 0 12px 0 0; border-radius: 8px; background: rgba(22,33,58,0.92); border: 1px solid #3a4867; color: #fff; font-family: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; }
.cu-btn i { margin-right: 6px; }
.cu-pri { background: #fff; border-color: #fff; color: #0b1220; font-weight: 700; }
.cu-eplist-wrap { padding: 16px 24px 24px 24px; }
.cu-listtitle { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.cu-ep { display: flex; align-items: center; height: 64px; padding: 0 12px; margin-bottom: 8px; border-radius: 10px; background: #212a46; cursor: pointer; position: relative; }
.cu-epthumb { position: relative; width: 112px; height: 58px; border-radius: 6px; overflow: hidden; flex-shrink: 0; margin-right: 12px; background: #233246; }
.cu-epthumb .cu-cwbar { height: 4px; }
.cu-epinfo { flex: 1; min-width: 0; }
.cu-ep1 { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-ep2 { font-size: 12.5px; color: #8d9ab3; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-epstate { flex-shrink: 0; width: 180px; padding-left: 10px; text-align: right; font-size: 13px; font-weight: 700; white-space: nowrap; }
.cu-st-new { color: #60a5fa; }
.cu-st-left { color: #f59e0b; }
.cu-st-w { color: #8d9ab3; }
.cu-ep .cu-more, .cu-lrow .cu-more { position: static; margin-left: 10px; flex-shrink: 0; }
.cu-pagetitle { font-size: 22px; font-weight: 800; margin: 56px 24px 14px 24px; }
.cu-ulist { padding: 0 24px 24px 24px; }
.cu-urow { display: flex; align-items: center; min-height: 64px; padding: 10px 14px; margin-bottom: 8px; border-radius: 10px; background: #212a46; position: relative; }
.cu-uinfo { flex: 1; min-width: 0; }
.cu-ut { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-us { font-size: 12.5px; color: #8d9ab3; margin-top: 3px; }
.cu-ubadge { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 5px; vertical-align: middle; }
.cu-ub-rec { color: #fff; background: #E53935; }
.cu-ub-shared { color: #B0BEC5; border: 1px solid rgba(255,255,255,0.25); }
.cu-ub-failed { color: #f87171; border: 1px solid rgba(248,113,113,0.4); }
.cu-uact { flex-shrink: 0; margin-left: 12px; height: 32px; line-height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid #3a4867; background: rgba(22,33,58,0.92);
  font-size: 13px; font-weight: 600; white-space: nowrap; }
.cu-usub { font-size: 14px; font-weight: 700; color: #B0BEC5; margin: 18px 0 10px 0; }
/* -- the item menu (§2.6), the confirm dialog, the room chooser (§2.11) -- */
.cu-menu { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 8000; }
.cu-menu.hidden { display: none; }
.cu-mback { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.55); }
.cu-menu-desk .cu-mback { background: transparent; }
.cu-mcard { position: absolute; background: #16213E; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,0.5); overflow: hidden; padding: 6px 0; }
.cu-menu-desk .cu-mcard { width: 300px; left: 0; top: 0; }
.cu-menu-desk.cu-menu-confirm .cu-mback { background: rgba(0,0,0,0.5); }
.cu-menu-desk.cu-menu-confirm .cu-mcard, .cu-menu-desk #cu-room .cu-mcard { width: 380px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.cu-menu-tv .cu-mcard { width: 600px; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 18px; padding: 10px 0; }
.cu-mhead { padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 6px; }
.cu-mt { font-size: 13.5px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cu-ms { font-size: 12px; color: #8d9ab3; margin-top: 2px; }
.cu-mbody { font-size: 13px; color: #c3cde0; margin-top: 6px; line-height: 1.4; }
.cu-mi { display: flex; align-items: center; width: 100%; height: 40px; padding: 0 16px; background: none; border: none; color: #fff; font-family: inherit; font-size: 13.5px;
  text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-mi i { margin-right: 8px; width: 16px; text-align: center; }
.cu-mi:focus, .cu-mi.cu-on { background: rgba(66,165,245,0.18); }
.cu-mi-danger { color: #f87171; }
.cu-mi-cur { color: #42A5F5; }
/* -- the undo bar (§2.9) -- */
.cu-undo { position: fixed; left: 50%; bottom: 28px; z-index: 8500; transform: translateX(-50%); max-width: 90%; display: flex; align-items: center; overflow: hidden;
  padding: 10px 14px 12px 16px; border-radius: 12px; background: #16213E; border: 1px solid rgba(255,255,255,0.14); font-size: 14px; color: #fff; }
.cu-undo.hidden { display: none; }
.cu-undo-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-undo-btn { margin-left: 14px; padding: 4px 8px; border-radius: 6px; background: none; border: none; color: #42A5F5; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cu-undo-line { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #42A5F5; animation: cu-undo-shrink 6s linear forwards; }
@keyframes cu-undo-shrink { from { width: 100%; } to { width: 0; } }
/* -- Settings: the room row (§2.11) -- */
.sc-room { width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--divider); color: inherit; font-family: inherit; cursor: pointer; }
.sc-room .sc-label { flex: 1; min-width: 0; padding-right: 10px; }
.sc-room .sc-label small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sc-room .sc-val { flex-shrink: 0; white-space: nowrap; }
.sc-room .sc-val i { margin-left: 6px; font-size: 11px; }
.sc-room:focus { background: var(--divider); }
/* -- focus (§2.3): the ring on the card box or the element; `tv` always, desk / phone after an arrow key (html.cu-kbd) -- */
.cu-tv .cu-f:focus:not(.cu-card):not(.cu-tile):not(.cu-chip), .cu-tv .cu-f.cu-on:not(.cu-card):not(.cu-tile):not(.cu-chip),
.cu-tv .cu-card:focus .cu-cardbox, .cu-tv .cu-card.cu-on .cu-cardbox, .cu-tv .cu-tile:focus .cu-cardbox, .cu-tv .cu-tile.cu-on .cu-cardbox {
  box-shadow: 0 0 0 4px #fff, 0 9px 33px rgba(66,165,245,0.45); }
.cu-tv .cu-chip:focus, .cu-tv .cu-chip.cu-on { box-shadow: 0 0 0 3px #fff; }
html.cu-kbd .cu-f:focus:not(.cu-card):not(.cu-tile), html.cu-kbd .cu-f.cu-on:not(.cu-card):not(.cu-tile),
html.cu-kbd .cu-card:focus .cu-cardbox, html.cu-kbd .cu-card.cu-on .cu-cardbox, html.cu-kbd .cu-tile:focus .cu-cardbox, html.cu-kbd .cu-tile.cu-on .cu-cardbox {
  box-shadow: 0 0 0 3px #fff, 0 6px 22px rgba(66,165,245,0.45); }
.cu-tv .cu-f.cu-on .cu-ttl, .cu-tv .cu-f:focus .cu-ttl, html.cu-kbd .cu-f.cu-on .cu-ttl, html.cu-kbd .cu-f:focus .cu-ttl { color: #fff; font-weight: 700; }
.cu-tv .cu-ep:focus, .cu-tv .cu-ep.cu-on, .cu-tv .cu-urow:focus, .cu-tv .cu-urow.cu-on, html.cu-kbd .cu-ep:focus, html.cu-kbd .cu-ep.cu-on, html.cu-kbd .cu-urow:focus, html.cu-kbd .cu-urow.cu-on { background: #2b3558; }
.cu-tv .cu-f.tv-hover { outline: none; }
.cu-tv .cu-f.tv-hover .cu-more { display: flex; }
/* -- hover rules: desk only (§2.3); the LG Magic Remote matches (hover: hover), hence html:not(.cu-tv) -- */
@media (hover: hover) {
  html:not(.cu-tv) .cu-card:hover .cu-cardbox, html:not(.cu-tv) .cu-tile:hover .cu-cardbox { box-shadow: 0 0 0 2.5px #42A5F5, 0 8px 22px rgba(0,0,0,0.45); }
  html:not(.cu-tv) .cu-cw:hover .cu-play { display: block; }
  html:not(.cu-tv) .cu-f:hover .cu-more { display: flex; }
  html:not(.cu-tv) .cu-ep:hover, html:not(.cu-tv) .cu-urow:hover, html:not(.cu-tv) .cu-lrow:hover { background: #2b3558; }
  html:not(.cu-tv) .cu-chip:hover { border-color: var(--accent); color: #fff; }
  html:not(.cu-tv) .cu-upc:hover { border-color: var(--accent); }
  html:not(.cu-tv) .cu-btn:hover { box-shadow: 0 0 0 2px #42A5F5; }
  html:not(.cu-tv) .cu-backpill:hover { background: rgba(255,255,255,0.14); }
  html:not(.cu-tv) .cu-mi:hover { background: rgba(66,165,245,0.18); }
  html:not(.cu-tv) .cu-arrow:hover, html:not(.cu-tv) .cu-more:hover { background: #1565C0; }
  html:not(.cu-tv) .cu-undo-btn:hover { background: rgba(66,165,245,0.18); }
}
@media (hover: none) {
  html:not(.cu-tv) .cu-more { display: flex; opacity: 0.6; }
}
/* -- the navbar width fix (§1.2): ≤ 1600 px the profile is a 32 px avatar and the "TV App" pill goes; phones also hide the clock -- */
@media (max-width: 1600px) {
  html:not(.cu-tv) .nb-product { display: none; }
  html:not(.cu-tv) .nb-right { display: flex; align-items: center; }
  html:not(.cu-tv) .nb-user { width: 32px; height: 32px; border-radius: 16px; margin-right: 0; padding: 0; justify-content: center; overflow: hidden; cursor: pointer;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); }
  html:not(.cu-tv) .nb-user .nb-user-name { display: none; }
  html:not(.cu-tv) .nb-user i { font-size: 13px; }
  html:not(.cu-tv) .nb-clock, html:not(.cu-tv) .nb-expiry, html:not(.cu-tv) .nb-weather { margin-left: 14px; margin-right: 0; }
}
/* -- phone (§2.1, ≤ 640 px): chips on their own row, the Насрочени icon button, list rows, the bottom sheet, safe areas -- */
@media (max-width: 640px) {
  html:not(.cu-tv) #nb-clock, html:not(.cu-tv) .nb-expiry, html:not(.cu-tv) .nb-weather { display: none; }   /* the avatar is the only item at the right */
  html:not(.cu-tv) .nb-right { margin-left: 8px; }
  html:not(.cu-tv) .cu-bar { height: auto; min-height: 52px; padding: 0 0 0 16px; flex-wrap: wrap; overflow: visible; }
  html:not(.cu-tv) .cu-bar .sec-title { order: 1; flex: 1; min-width: 0; height: 52px; line-height: 52px; font-size: 17px; margin-right: 0; overflow: hidden; text-overflow: ellipsis; }
  html:not(.cu-tv) .cu-upcwrap { order: 2; margin-right: 10px; }
  html:not(.cu-tv) .cu-sep { display: none; }
  html:not(.cu-tv) .cu-upc { width: 44px; height: 44px; padding: 0; border: none; border-radius: 22px; background: rgba(255,255,255,0.08); justify-content: center; }
  html:not(.cu-tv) .cu-upc i { margin: 0; font-size: 16px; }
  html:not(.cu-tv) .cu-upc-lbl { display: none; }
  html:not(.cu-tv) .cu-upc-badge { display: block; position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 9px;
    background: #3b82f6; color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
  html:not(.cu-tv) .cu-upc-0 .cu-upc-badge { display: none; }
  html:not(.cu-tv) .cu-free { display: none; }
  html:not(.cu-tv) .cu-chips { order: 3; width: 100%; height: 50px; margin: 0; padding: 0 16px 0 0; border-top: 1px solid var(--divider); }
  html:not(.cu-tv) .cu-chips:empty { display: none; }
  html:not(.cu-tv) .cu-chip { position: relative; height: 32px; padding: 0 14px; margin-right: 8px; border-radius: 16px; font-size: 13px; }
  html:not(.cu-tv) .cu-chip::after { content: ''; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }
  html:not(.cu-tv) .cu-scroll { padding: 6px 0 16px 16px; }
  html:not(.cu-tv) .cu-rowwrap { margin-bottom: 18px; }
  html:not(.cu-tv) .cu-rowtitle { font-size: 15px; margin-bottom: 10px; }
  html:not(.cu-tv) .cu-row { padding: 0 16px 0 0; margin: 0; scrollbar-width: none; }
  html:not(.cu-tv) .cu-row::-webkit-scrollbar { display: none; }
  html:not(.cu-tv) .cu-grid { padding: 0 16px 0 0; margin: 0; }
  html:not(.cu-tv) .cu-list, html:not(.cu-tv) .cu-ulist { padding-right: 16px; }
  html:not(.cu-tv) .cu-card { width: 220px; margin-right: 10px; }
  html:not(.cu-tv) .cu-card .cu-cardbox { height: 124px; }
  html:not(.cu-tv) .cu-chbadge { display: none; }
  html:not(.cu-tv) .cu-cwbar { height: 4px; }
  html:not(.cu-tv) .cu-ttl { font-size: 13px; }
  html:not(.cu-tv) .cu-sub { font-size: 12px; }
  html:not(.cu-tv) .cu-more { display: none !important; }
  html:not(.cu-tv) .cu-arrow { display: none !important; }
  html:not(.cu-tv) .cu-freefoot { display: block; padding: 14px 16px 14px 0; font-size: 12px; color: #8d9ab3; text-align: center; }
  html:not(.cu-tv) .cu-hero { height: auto; max-height: none; padding-top: 58px; }   /* one column: the pill above, the text in flow */
  html:not(.cu-tv) .cu-hero-nodesc { height: auto; }
  html:not(.cu-tv) .cu-hero-text { position: relative; left: auto; right: auto; bottom: auto; padding: 0 16px 10px 16px; }
  html:not(.cu-tv) .cu-hero-art { right: 16px; top: 14px; }
  html:not(.cu-tv) .cu-hero-logo { width: 90px; height: 45px; }
  html:not(.cu-tv) .cu-hero-chname { font-size: 20px; }
  html:not(.cu-tv) .cu-pagehead { top: 10px; left: 16px; }
  html:not(.cu-tv) .cu-backpill { height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; }
  html:not(.cu-tv) .cu-title { font-size: 24px; }
  html:not(.cu-tv) .cu-desc { -webkit-line-clamp: 4; margin-bottom: 10px; }
  html:not(.cu-tv) .cu-btn { height: 44px; margin: 0 8px 8px 0; }
  html:not(.cu-tv) .cu-eplist-wrap { padding: 12px 16px 16px 16px; }
  html:not(.cu-tv) .cu-listtitle { font-size: 15px; }
  html:not(.cu-tv) .cu-ep { height: auto; min-height: 64px; padding: 8px 10px; }
  html:not(.cu-tv) .cu-epthumb { width: 80px; height: 45px; margin-right: 10px; }
  html:not(.cu-tv) .cu-ep1 { font-size: 14px; }
  html:not(.cu-tv) .cu-ep2 { font-size: 12px; }
  html:not(.cu-tv) .cu-epinfo .cu-st { display: block; margin-top: 3px; font-size: 12px; font-weight: 700; }
  html:not(.cu-tv) .cu-pagetitle { font-size: 20px; margin: 56px 16px 12px 16px; }
  html:not(.cu-tv) .cu-ulist { padding: 0 16px 16px 16px; }
  html:not(.cu-tv) .cu-urow { flex-wrap: wrap; }
  html:not(.cu-tv) .cu-uact { margin: 8px 0 0 0; width: 100%; text-align: center; }
  html:not(.cu-tv) .cu-menu .cu-mback { background: rgba(0,0,0,0.55); }
  html:not(.cu-tv) .cu-menu .cu-mcard { left: 0; right: 0; bottom: 0; top: auto; width: auto; transform: none; border-radius: 16px 16px 0 0;
    padding-bottom: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  html:not(.cu-tv) .cu-mt { font-size: 15px; }
  html:not(.cu-tv) .cu-ms { font-size: 13px; }
  html:not(.cu-tv) .cu-mi { height: 52px; font-size: 15px; }
  html:not(.cu-tv) .cu-undo { bottom: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); }
}
/* -- tv (§2.1): CSS px at 1920 = board px × 1.5; the text floor 21 px; no transitions (§8) -- */
.cu-tv .cu-f, .cu-tv .cu-more, .cu-tv .cu-mi, .cu-tv .cu-cardbox { transition: none; }
.cu-tv .cu-bar { height: 72px; padding: 0 32px; }
.cu-tv .cu-bar .sec-title { font-size: 22px; margin-right: 27px; }
.cu-tv .cu-chips { padding: 12px 8px; margin: -12px -8px; }
.cu-tv .cu-chip { height: 45px; padding: 0 21px; margin-right: 12px; border-radius: 23px; font-size: 21px; }
.cu-tv .cu-sep { height: 27px; margin: 0 20px 0 8px; }
.cu-tv .cu-upc { height: 45px; padding: 0 21px; border-radius: 23px; font-size: 21px; }
.cu-tv .cu-upc i { margin-right: 9px; font-size: 21px; }
.cu-tv .cu-free { padding-left: 20px; font-size: 21px; }
.cu-tv .cu-scroll { padding: 21px 32px 32px 32px; scrollbar-width: none; }
.cu-tv .cu-scroll::-webkit-scrollbar { display: none; }
.cu-tv .cu-rowwrap { margin-bottom: 30px; }
.cu-tv .cu-rowtitle { font-size: 26px; margin-bottom: 15px; }
.cu-tv .cu-chlogo { width: 30px; height: 30px; margin-right: 12px; }
.cu-tv .cu-row { padding: 12px 8px 40px 8px; margin: -12px -8px -40px -8px; scrollbar-width: none; }
.cu-tv .cu-row::-webkit-scrollbar { display: none; }
.cu-tv .cu-grid { padding: 12px 8px 0 8px; margin: -12px -8px 0 -8px; }
.cu-tv .cu-grid .cu-tile { margin: 0 24px 30px 0; }
.cu-tv .cu-card { width: 432px; margin-right: 24px; }
.cu-tv .cu-card .cu-cardbox { height: 243px; border-radius: 15px; }
.cu-tv .cu-tile { width: 330px; margin-right: 24px; }
.cu-tv .cu-tile .cu-cardbox { height: 186px; border-radius: 15px; }
.cu-tv .cu-chname { font-size: 24px; }
.cu-tv .cu-art-sm .cu-chname { font-size: 21px; }
.cu-tv .cu-chbadge { top: 15px; left: 15px; padding: 3px 10px; border-radius: 7px; font-size: 21px; }
.cu-tv .cu-cwbar { height: 8px; }
.cu-tv .cu-dot { top: 12px; right: 12px; width: 15px; height: 15px; }
.cu-tv .cu-badge { top: 12px; right: 12px; min-width: 28px; height: 28px; line-height: 28px; padding: 0 9px; border-radius: 14px; font-size: 21px; }
.cu-tv .cu-ttl { margin-top: 12px; font-size: 22.5px; }
.cu-tv .cu-sub { margin-top: 3px; font-size: 21px; }
.cu-tv .cu-more { top: 12px; right: 12px; width: 45px; height: 45px; font-size: 21px; }
.cu-tv .cu-tile .cu-more { left: 12px; }
.cu-tv .cu-state { padding: 90px 32px; }
.cu-tv .cu-state-ic { font-size: 60px; margin-bottom: 21px; }
.cu-tv .cu-state-t { font-size: 27px; }
.cu-tv .cu-state-s { font-size: 22.5px; margin-top: 9px; }
.cu-tv .cu-state .cu-btn { margin-top: 24px; }
.cu-tv .cu-hero { height: 450px; }
.cu-tv .cu-hero-nodesc { height: 360px; }
.cu-tv .cu-hero-art { right: 105px; top: 70px; }
.cu-tv .cu-hero-logo { width: 330px; height: 165px; }
.cu-tv .cu-hero-chname { font-size: 60px; }
.cu-tv .cu-hero-fade { height: 150px; }
.cu-tv .cu-pagehead { top: 18px; left: 56px; }
.cu-tv .cu-backpill { height: 42px; padding: 0 18px; border-radius: 21px; font-size: 21px; }
.cu-tv .cu-backpill i { margin-right: 9px; }
.cu-tv .cu-hero-text { left: 56px; right: 56px; bottom: 30px; }
.cu-tv .cu-meta { font-size: 21px; margin-bottom: 9px; }
.cu-tv .cu-title { font-size: 52px; margin-bottom: 12px; }
.cu-tv .cu-desc { font-size: 22.5px; max-width: 1050px; margin-bottom: 21px; }
.cu-tv .cu-btn { height: 69px; padding: 0 27px; margin-right: 18px; border-radius: 13px; font-size: 24px; }
.cu-tv .cu-btn i { margin-right: 9px; }
.cu-tv .cu-eplist-wrap { padding: 24px 56px 56px 56px; }
.cu-tv .cu-listtitle { font-size: 24px; margin-bottom: 15px; }
.cu-tv .cu-ep { height: 114px; padding: 0 21px; margin-bottom: 13px; border-radius: 15px; }
.cu-tv .cu-epthumb { width: 186px; height: 96px; border-radius: 9px; margin-right: 21px; }
.cu-tv .cu-epthumb .cu-cwbar { height: 6px; }
.cu-tv .cu-ep1 { font-size: 25.5px; }
.cu-tv .cu-ep2 { font-size: 21px; margin-top: 4px; }
.cu-tv .cu-epstate { width: 345px; font-size: 21px; }
.cu-tv .cu-ep .cu-more { margin-left: 21px; }
.cu-tv .cu-pagetitle { font-size: 36px; margin: 84px 56px 21px 56px; }
.cu-tv .cu-ulist { padding: 0 56px 56px 56px; }
.cu-tv .cu-urow { min-height: 96px; padding: 15px 21px; margin-bottom: 13px; border-radius: 15px; }
.cu-tv .cu-ut { font-size: 25.5px; }
.cu-tv .cu-us { font-size: 21px; margin-top: 5px; }
.cu-tv .cu-ubadge { margin-left: 12px; padding: 2px 10px; border-radius: 7px; font-size: 21px; }
.cu-tv .cu-uact { height: 45px; line-height: 43px; padding: 0 18px; border-radius: 12px; font-size: 21px; margin-left: 18px; }
.cu-tv .cu-usub { font-size: 24px; margin: 27px 0 15px 0; }
.cu-tv .cu-mhead { padding: 18px 27px; margin-bottom: 9px; }
.cu-tv .cu-mt { font-size: 27px; }
.cu-tv .cu-ms { font-size: 21px; margin-top: 4px; }
.cu-tv .cu-mbody { font-size: 22.5px; margin-top: 9px; }
.cu-tv .cu-mi { height: 69px; padding: 0 27px; font-size: 24px; }
.cu-tv .cu-mi:focus, .cu-tv .cu-mi.cu-on { box-shadow: inset 0 0 0 3px #fff; background: rgba(66,165,245,0.18); }
.cu-tv .cu-mi i { margin-right: 12px; width: 24px; }
.cu-tv .cu-undo { bottom: 42px; padding: 15px 21px 18px 24px; border-radius: 18px; font-size: 24px; }
.cu-tv .cu-undo-btn { margin-left: 21px; padding: 6px 12px; font-size: 24px; }
.cu-tv .cu-undo-line { height: 4px; }
.cu-tv .sc-room { padding: 14px 16px; }
.cu-tv .sc-room .sc-label, .cu-tv .sc-room .sc-val, .cu-tv .sc-room .sc-val i { font-size: 21px; }
.cu-tv .sc-room .sc-label small { font-size: 21px; margin-top: 4px; }
