/*
 * NEBULA TV — hoja de estilos (escenario fijo 1920×1080, legible a 3 m).
 * Compatible con Chromium M69: sin backdrop-filter, sin gap en flex (se usan márgenes),
 * sin aspect-ratio ni :focus-visible. Animaciones solo con transform/opacity.
 */
@font-face { font-family: 'Inter'; src: url('../assets/fonts/Inter-Regular.woff') format('woff'); font-weight: 400; }
@font-face { font-family: 'Inter'; src: url('../assets/fonts/Inter-Medium.woff') format('woff'); font-weight: 500; }
@font-face { font-family: 'Inter'; src: url('../assets/fonts/Inter-SemiBold.woff') format('woff'); font-weight: 600; }

:root {
  --blue: #0EA5FF;
  --violet: #8B5CF6;
  --lilac: #D8B4FE;
  --text: #F8FAFC;
  --muted: #94A3B8;
  --bg: #0B1020;
  --bg-2: #0F172A;
  --card: #1E293B;
  --card-2: #253247;
  --line: rgba(148, 163, 184, .16);
  --ok: #34D399;
  --err: #F87171;
  --grad: linear-gradient(135deg, #0EA5FF 0%, #6366F1 50%, #8B5CF6 100%);
  --safe-x: 96px;
  --safe-y: 48px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: var(--bg); }
body {
  font-family: 'Inter', 'SamsungOne', 'Tizen Sans', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text); font-size: 26px; line-height: 1.35;
  -webkit-font-smoothing: antialiased; cursor: default; user-select: none;
}
img { display: block; }
h1, h2, h3, p { margin: 0; }

/* ---------- Capas ---------- */
#av-player, #html-player { position: fixed; left: 0; top: 0; width: 100%; height: 100%; display: none; z-index: 0; background: #000; }
#html-player { object-fit: contain; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; z-index: 1; overflow: hidden; }
#app {
  position: absolute; inset: 0; left: 0; top: 0; width: 1920px; height: 1080px;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(139, 92, 246, .16), transparent 60%),
    radial-gradient(900px 600px at 0% 0%, rgba(14, 165, 255, .10), transparent 60%),
    var(--bg);
}
/* Durante la reproducción todo es transparente para dejar ver AVPlay/vídeo */
html.playing, html.playing body, #app.playing { background: transparent; }
#app.playing #header { display: none; }
#app.no-header #screens { top: 0; }

/* ---------- Cabecera ---------- */
#header {
  position: absolute; left: 0; top: 0; width: 1920px; height: 128px; padding: 0 var(--safe-x);
  display: flex; align-items: center; z-index: 5;
}
.brand { width: 250px; flex: none; }
.brand-logo { height: 64px; width: auto; }
.tabs { display: flex; align-items: center; margin-left: 40px; }
.tab {
  position: relative; font-size: 28px; font-weight: 500; color: var(--muted);
  padding: 14px 26px; margin-right: 8px; border-radius: 999px; transition: color .2s, background-color .2s;
}
.tab.active { color: var(--text); }
.tab.active::after { content: ''; position: absolute; left: 26px; right: 26px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--grad); }
.tab.focused { background: var(--text); color: var(--bg); }
.tab.focused::after { display: none; }
.header-right { margin-left: auto; display: flex; align-items: center; }
.clock { font-size: 28px; font-weight: 500; color: var(--text); margin: 0 28px; font-variant-numeric: tabular-nums; }
.status-dot { font-size: 20px; color: var(--muted); }
.status-dot.on::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); margin-right: 10px; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.icon-btn {
  width: 64px; height: 64px; border-radius: 50%; padding: 15px; color: var(--muted);
  background: rgba(30, 41, 59, .7); transition: transform .15s var(--ease), background-color .15s, color .15s; flex: none;
}
.icon-btn.focused { background: var(--text); color: var(--bg); transform: scale(1.1); }
.icon-btn.danger.focused { background: var(--err); color: #fff; }
.icon-btn[aria-disabled="true"] { opacity: .25; }

/* ---------- Pantallas ---------- */
#screens { position: absolute; left: 0; top: 128px; right: 0; bottom: 0; }
.screen { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: none; }
.screen.active { display: block; }
.screen-player, .screen-player.active { top: -128px; height: 1080px; }
#app.no-header .screen-player { top: 0; }

.eyebrow { font-size: 20px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--lilac); }
.dim { color: var(--muted); }
.badge { display: inline-block; font-size: 18px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: rgba(139, 92, 246, .22); color: var(--lilac); white-space: nowrap; }
.badge.q { background: rgba(14, 165, 255, .16); color: #7DD3FC; }
.fav { color: #FBBF24; }

/* ---------- Botones ---------- */
.btn-row { display: flex; align-items: center; flex-wrap: wrap; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; height: 72px; padding: 0 34px; margin: 0 18px 14px 0; border-radius: 16px;
  background: rgba(30, 41, 59, .85); color: var(--text); font-size: 26px; font-weight: 500;
  border: 2px solid var(--line); transition: transform .15s var(--ease), background-color .15s, color .15s; white-space: nowrap;
}
.btn.primary { background: var(--grad); border-color: transparent; }
.btn.danger { background: rgba(248, 113, 113, .16); border-color: rgba(248, 113, 113, .4); }
.btn.small { height: 56px; font-size: 22px; padding: 0 24px; }
.btn.focused { background: var(--text); color: var(--bg); border-color: var(--text); transform: scale(1.06); box-shadow: 0 12px 40px rgba(14, 165, 255, .28); }
.btn.danger.focused { background: var(--err); color: #fff; border-color: var(--err); }
.btn.busy { opacity: .6; }
.btn-icon { width: 30px; height: 30px; margin-right: 14px; flex: none; }

.chip-row { display: flex; align-items: center; flex-wrap: wrap; margin: 28px 0; }
.chip { padding: 14px 28px; margin: 0 14px 10px 0; border-radius: 999px; font-size: 24px; font-weight: 500; background: rgba(30, 41, 59, .8); color: var(--muted); border: 2px solid transparent; transition: transform .15s; }
.chip.selected { color: var(--text); border-color: rgba(139, 92, 246, .7); }
.chip.focused { background: var(--text); color: var(--bg); transform: scale(1.06); }
.list-count { color: var(--muted); font-size: 22px; margin-left: 12px; }

/* ---------- Barras de progreso ---------- */
.pbar { height: 6px; border-radius: 3px; background: rgba(148, 163, 184, .22); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--grad); border-radius: 3px; }
.pbar.thin { height: 4px; margin-top: 8px; }
.pbar.big { height: 10px; border-radius: 5px; margin: 24px 0 8px; }
.pbar.big i { transition: width .3s; }

/* ---------- Logos y carátulas ---------- */
.logo-box { position: relative; flex: none; border-radius: 12px; background: linear-gradient(145deg, #273449, #1A2436); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.logo-box img { position: absolute; left: 8%; top: 8%; width: 84%; height: 84%; object-fit: contain; }
.logo-box img.broken { display: none; }
.logo-box.has-img .logo-initials, .poster.has-img .poster-fallback { display: none; }
.logo-box.has-img { background: rgba(30, 41, 59, .55); }
.logo-initials { font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.logo-box.sm { width: 72px; height: 54px; } .logo-box.sm .logo-initials { font-size: 20px; }
.logo-box.md { width: 96px; height: 72px; } .logo-box.md .logo-initials { font-size: 26px; }
.logo-box.lg { width: 240px; height: 136px; } .logo-box.lg .logo-initials { font-size: 44px; }
.logo-box.xl { width: 200px; height: 150px; border-radius: 18px; } .logo-box.xl .logo-initials { font-size: 52px; }

.poster { position: relative; width: 100%; height: 100%; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #26324A 0%, #1B2235 60%, #241B3F 100%); }
.poster img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.poster img.broken { display: none; }
.poster-fallback { position: absolute; inset: 0; left: 0; top: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; padding: 18px; font-size: 22px; font-weight: 600; line-height: 1.2; color: rgba(248, 250, 252, .8); }
.poster-fallback span { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; }

/* ---------- Inicio ---------- */
.row { margin-bottom: 30px; }
.row-title { font-size: 28px; font-weight: 600; margin: 0 var(--safe-x) 16px; color: var(--text); }
.row-track { display: flex; overflow: hidden; padding: 16px var(--safe-x) 18px; }
.card { flex: none; margin-right: 28px; transition: transform .18s var(--ease); }
.card-title { font-size: 22px; font-weight: 500; margin-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 19px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.card.wide { width: 380px; } .card.wide .poster { height: 214px; }
.card.poster-card { width: 196px; } .card.poster-card .poster { height: 294px; }
.card.chan { width: 240px; }
.card.cat, .card.shortcut { width: 300px; height: 150px; padding: 26px 28px; border-radius: 20px; background: linear-gradient(145deg, rgba(37, 50, 71, .95), rgba(30, 27, 60, .95)); border: 2px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end; }
.card.cat.ghost { background: transparent; border-style: dashed; }
.cat-name { font-size: 26px; font-weight: 600; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cat-count { font-size: 20px; color: var(--muted); margin-top: 6px; }
.cat-icon, .sc-icon { width: 34px; height: 34px; color: var(--lilac); margin-bottom: auto; }
.card.focused { transform: scale(1.07); z-index: 2; }
.card.focused .poster, .card.chan.focused .logo-box { box-shadow: 0 0 0 4px var(--text), 0 18px 50px rgba(0, 0, 0, .55); }
.card.cat.focused, .card.shortcut.focused { background: var(--text); color: var(--bg); border-color: var(--text); }
.card.cat.focused .cat-count, .card.shortcut.focused .cat-count { color: #334155; }
.card.cat.focused .cat-icon, .card.shortcut.focused .sc-icon { color: var(--violet); }

/* Bienvenida / estados vacíos */
.welcome { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 120px; }
.empty-state { text-align: center; max-width: 1100px; margin: 0 auto; padding-top: 40px; }
.screen > .empty-state { padding-top: 180px; }
.empty-mark img { width: 150px; height: auto; margin: 0 auto 28px; opacity: .95; }
.empty-state h2 { font-size: 52px; font-weight: 600; margin-bottom: 18px; }
.empty-state p { font-size: 28px; color: var(--muted); }
.empty-state .btn-row { justify-content: center; }
.welcome-steps { margin: 40px 0 0; padding: 0; list-style: none; counter-reset: s; display: flex; }
.welcome-steps li { counter-increment: s; width: 400px; margin: 0 16px; padding: 22px 26px; border-radius: 18px; background: rgba(30, 41, 59, .6); font-size: 22px; color: var(--muted); }
.welcome-steps li::before { content: counter(s); display: block; font-size: 30px; font-weight: 600; color: var(--lilac); margin-bottom: 6px; }
.welcome-progress { margin-top: 30px; font-size: 26px; color: var(--lilac); }
.error-note { color: var(--err); font-size: 22px; margin-top: 18px; max-width: 1200px; text-align: center; }
.empty-note { padding: 40px; color: var(--muted); font-size: 26px; }
.loading-full { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.spinner { width: 64px; height: 64px; border-radius: 50%; border: 5px solid rgba(148, 163, 184, .2); border-top-color: var(--blue); animation: spin 1s linear infinite; margin-bottom: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Columna de categorías ---------- */
.rail { position: absolute; left: var(--safe-x); top: 10px; width: 360px; bottom: 60px; overflow: hidden; padding: 6px 10px 40px 0; }
.rail-item { display: flex; align-items: center; height: 68px; padding: 0 22px; margin-bottom: 6px; border-radius: 14px; color: var(--muted); font-size: 24px; font-weight: 500; transition: transform .15s var(--ease), background-color .15s; }
.rail-item.selected { color: var(--text); background: rgba(30, 41, 59, .9); }
.rail-item.selected::before { content: ''; width: 4px; height: 30px; border-radius: 2px; background: var(--grad); margin: 0 14px 0 -10px; flex: none; }
.rail-item.focused { background: var(--text); color: var(--bg); transform: scale(1.03); }
.rail-item.focused::before { background: var(--violet); }
.rail-icon { width: 28px; height: 28px; margin-right: 16px; flex: none; }
.rail-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-count { font-size: 19px; opacity: .7; margin-left: 10px; font-variant-numeric: tabular-nums; }
.rail-minor { height: 56px; font-size: 21px; }
.rail-sep { font-size: 17px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: rgba(148, 163, 184, .65); margin: 22px 0 8px 22px; min-height: 1px; }

/* ---------- TV en directo ---------- */
.live-center { position: absolute; left: 500px; top: 10px; width: 760px; bottom: 60px; }
.list-head { display: flex; align-items: baseline; height: 56px; padding-left: 8px; }
.list-title { font-size: 32px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80%; }
.ch-list { position: absolute; left: 0; right: 0; top: 64px; bottom: 0; }
.vlist { overflow: hidden; }
.vlist-track { position: relative; width: 100%; }
.vrow { position: absolute; left: 0; right: 0; display: flex; align-items: center; padding: 4px 6px; }
.ch-row { flex: 1; height: 92px; display: flex; align-items: center; padding: 0 20px 0 14px; border-radius: 16px; transition: transform .14s var(--ease), background-color .14s; }
.ch-row.focused { background: var(--text); color: var(--bg); transform: scale(1.02); }
.ch-row.focused .ch-epg, .ch-row.focused .ch-num { color: #475569; }
.ch-num { width: 56px; font-size: 20px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.ch-main { flex: 1; min-width: 0; margin-left: 20px; }
.ch-name { font-size: 25px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-epg { font-size: 20px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ch-row .badge { margin-left: 14px; }
.ch-row.focused .badge { background: rgba(139, 92, 246, .18); color: #6D28D9; }

.live-info { position: absolute; left: 1300px; right: var(--safe-x); top: 10px; bottom: 60px; padding: 30px; border-radius: 26px; background: linear-gradient(180deg, rgba(30, 41, 59, .75), rgba(30, 41, 59, .25)); overflow: hidden; }
.info-head { display: flex; align-items: center; }
.info-head .logo-box.xl { width: 150px; height: 112px; margin-right: 24px; }
.info-head h2 { font-size: 32px; font-weight: 600; line-height: 1.15; }
.info-meta { font-size: 20px; color: var(--muted); margin-top: 6px; }
.info-prog { margin-top: 34px; }
.prog-title { font-size: 30px; font-weight: 600; margin: 8px 0 14px; line-height: 1.2; }
.prog-desc { font-size: 21px; color: var(--muted); margin-top: 14px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.info-next { margin-top: 24px; font-size: 22px; }
.info-next .eyebrow { font-size: 17px; margin-right: 8px; }
.info-note { margin-top: 30px; color: var(--muted); font-size: 21px; }
.info-actions { position: absolute; left: 30px; right: 30px; bottom: 26px; display: flex; flex-direction: column; }
.info-actions .btn { margin: 0 0 12px; height: 62px; font-size: 22px; justify-content: flex-start; }
.info-actions .btn.focused { transform: scale(1.03); }
.hintbar { position: absolute; left: var(--safe-x); right: var(--safe-x); bottom: 14px; font-size: 19px; color: rgba(148, 163, 184, .75); }

/* ---------- Películas / Series ---------- */
.cat-main { position: absolute; left: 500px; right: 60px; top: 10px; bottom: 0; }
.poster-grid { position: absolute; left: 0; right: 0; top: 64px; bottom: 0; }
.vgrid { overflow: hidden; }
.vgrid-track { position: relative; }
.grow { position: absolute; left: 0; right: 0; display: flex; padding: 16px 10px; }
.gcell { width: 224px; flex: none; }
.gcell .card.poster-card { width: 196px; }

/* ---------- Fichas ---------- */
.detail { position: absolute; left: 0; top: 0; right: 0; bottom: 0; padding: 30px var(--safe-x) 0; display: flex; }
.detail-bg { position: absolute; right: 0; top: -128px; width: 1100px; height: 1080px; opacity: .22; overflow: hidden; }
.detail-bg img { width: 100%; height: 100%; object-fit: cover; }
.detail-bg::after { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: linear-gradient(90deg, var(--bg) 0%, rgba(11, 16, 32, .5) 50%, rgba(11, 16, 32, .9) 100%); }
.detail-poster { position: relative; width: 380px; height: 570px; flex: none; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); border-radius: 18px; }
.detail-body { position: relative; margin-left: 70px; flex: 1; min-width: 0; }
.detail-body h1 { font-size: 60px; font-weight: 600; line-height: 1.1; margin: 10px 0 16px; }
.detail-meta { font-size: 26px; color: var(--muted); }
.detail-bar { width: 520px; margin-top: 22px; }
.detail-plot { font-size: 25px; line-height: 1.5; max-width: 1100px; margin-top: 26px; color: #CBD5E1; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.show-detail .detail-body h1 { font-size: 52px; }
.season-tabs { display: flex; overflow: hidden; margin: 6px 0 10px; padding: 6px 4px; }
.season-tabs .chip { flex: none; }
.ep-list { position: absolute; left: 0; right: 40px; top: 470px; bottom: 40px; }
.show-detail .btn-row { margin-top: 22px; }
.ep-row { flex: 1; height: 124px; display: flex; align-items: center; padding: 0 24px; border-radius: 14px; background: rgba(30, 41, 59, .5); transition: transform .14s var(--ease); }
.ep-row.focused { background: var(--text); color: var(--bg); transform: scale(1.015); }
.ep-num { width: 140px; flex: none; font-size: 22px; font-weight: 600; color: var(--lilac); }
.ep-row.focused .ep-num { color: var(--violet); }
.ep-main { flex: 1; min-width: 0; }
.ep-title { font-size: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-dur { font-size: 20px; color: var(--muted); margin-left: 20px; }
.ep-done { font-size: 18px; color: var(--ok); }

/* ---------- Páginas genéricas (categorías fijadas, guía) ---------- */
.page { position: absolute; left: var(--safe-x); right: var(--safe-x); top: 10px; bottom: 0; }
.page.narrow { right: auto; width: 1300px; }
.page h1 { font-size: 52px; font-weight: 600; margin: 8px 0 12px; }
.page-lead { font-size: 24px; color: var(--muted); max-width: 1200px; }
.pin-list { max-height: 520px; overflow: hidden; }
.pin-row { display: flex; align-items: center; height: 88px; padding: 0 16px 0 26px; margin-bottom: 10px; border-radius: 18px; background: rgba(30, 41, 59, .6); }
.pin-row .icon-btn { margin-left: 14px; }
.pin-pos { width: 50px; font-size: 24px; color: var(--lilac); font-weight: 600; }
.pin-name { flex: 1; font-size: 27px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-count { font-size: 21px; color: var(--muted); margin: 0 20px; }
.map-list { position: absolute; left: 0; right: 0; top: 220px; bottom: 30px; }
.map-row { flex: 1; height: 84px; display: flex; align-items: center; padding: 0 22px; border-radius: 14px; }
.map-row.focused { background: var(--text); color: var(--bg); }
.map-main { flex: 1; min-width: 0; margin-left: 20px; }
.map-name { font-size: 24px; font-weight: 600; }
.map-sub { font-size: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-link { font-size: 19px; max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-link.ok { color: var(--ok); } .map-link.missing { color: var(--err); }
.map-row.focused .map-link.ok { color: #047857; } .map-row.focused .map-link.missing { color: #B91C1C; }

/* ---------- Ajustes ---------- */
.settings { position: absolute; left: var(--safe-x); right: var(--safe-x); top: 10px; bottom: 0; display: flex; }
.set-menu { width: 400px; flex: none; padding-top: 8px; }
.set-menu .eyebrow { margin: 0 0 18px 22px; }
.set-menu-item { height: 72px; display: flex; align-items: center; padding: 0 24px; margin-bottom: 6px; border-radius: 14px; font-size: 25px; font-weight: 500; color: var(--muted); transition: transform .15s var(--ease); }
.set-menu-item.selected { color: var(--text); background: rgba(30, 41, 59, .9); }
.set-menu-item.focused { background: var(--text); color: var(--bg); transform: scale(1.03); }
.set-panel { flex: 1; margin-left: 60px; overflow: hidden; padding: 4px 20px 120px 4px; height: 100%; }
.set-panel h2 { font-size: 40px; font-weight: 600; margin-bottom: 10px; }
.panel-lead { font-size: 22px; color: var(--muted); margin-bottom: 26px; max-width: 1100px; }
.set-group { margin-bottom: 30px; }
.set-group.dev { opacity: .8; }
.set-row { display: flex; align-items: center; min-height: 84px; padding: 14px 28px; margin-bottom: 8px; border-radius: 16px; background: rgba(30, 41, 59, .55); transition: transform .15s var(--ease), background-color .15s; }
.set-row.focused { background: var(--text); color: var(--bg); transform: scale(1.015); }
.set-text { flex: 1; min-width: 0; }
.set-label { font-size: 26px; font-weight: 500; }
.set-desc { font-size: 19px; color: var(--muted); margin-top: 4px; }
.set-row.focused .set-desc, .set-row.focused .set-value { color: #475569; }
.set-value { font-size: 22px; color: var(--lilac); margin-left: 24px; white-space: nowrap; max-width: 520px; overflow: hidden; text-overflow: ellipsis; }
.set-chevron { font-size: 34px; color: var(--muted); margin-left: 18px; }
.toggle-row .set-chevron { display: none; }
.primary-row { border: 2px solid rgba(139, 92, 246, .55); }
.danger-row .set-label { color: var(--err); }
.danger-row.focused { background: var(--err); } .danger-row.focused .set-label { color: #fff; }
.switch { width: 74px; height: 42px; border-radius: 21px; background: rgba(148, 163, 184, .35); position: relative; flex: none; transition: background-color .2s; }
.switch i { position: absolute; left: 4px; top: 4px; width: 34px; height: 34px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch.on { background: var(--violet); } .switch.on i { transform: translateX(32px); }
.pl-card { padding: 24px 28px; border-radius: 18px; border: 2px solid var(--line); margin-bottom: 16px; background: rgba(15, 23, 42, .6); }
.pl-card.active { border-color: rgba(139, 92, 246, .5); }
.pl-name { font-size: 28px; font-weight: 600; }
.pl-url { font-size: 20px; color: var(--muted); margin-top: 6px; word-break: break-all; }
.pl-status { margin-top: 12px; font-size: 21px; }
.pl-stats { margin-top: 8px; font-size: 21px; color: #CBD5E1; }
.st-ok { color: var(--ok); } .st-err { color: var(--err); } .st-none { color: var(--muted); }
.about-brand img { height: 90px; width: auto; margin: 10px 0 24px; }
.about-list { display: grid; grid-template-columns: 260px 1fr; margin: 0 0 26px; font-size: 23px; }
.about-list dt { color: var(--muted); padding: 8px 0; } .about-list dd { margin: 0; padding: 8px 0; }

/* ---------- Superposiciones ---------- */
#overlays { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; pointer-events: none; z-index: 20; }
.modal { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: rgba(5, 8, 18, .78); display: flex; align-items: center; justify-content: center; pointer-events: auto; opacity: 0; transition: opacity .18s; }
.modal.in { opacity: 1; }
.modal-card { width: 900px; max-height: 920px; padding: 48px 56px 40px; border-radius: 30px; background: linear-gradient(180deg, #1C2740, #141C2F); border: 1px solid rgba(148, 163, 184, .18); box-shadow: 0 40px 120px rgba(0, 0, 0, .6); transform: translateY(16px); transition: transform .22s var(--ease); }
.modal.in .modal-card { transform: none; }
.modal-card h2 { font-size: 38px; font-weight: 600; margin-bottom: 14px; }
.dialog-text { font-size: 23px; color: var(--muted); white-space: pre-line; max-height: 420px; overflow: hidden; }
.dialog.wide .modal-card { width: 1200px; }
.dialog-list { max-height: 560px; overflow: hidden; margin: 20px 0 0; padding-left: 30px; font-size: 22px; color: #CBD5E1; }
.dialog-list li { margin-bottom: 10px; word-break: break-word; }
.chooser .modal-card, .picker .modal-card { width: 1000px; }
.choose-list, .picker-list { height: 600px; margin-top: 24px; }
.choose-row { flex: 1; height: 76px; display: flex; align-items: center; padding: 0 26px; border-radius: 14px; font-size: 24px; }
.choose-row.focused { background: var(--text); color: var(--bg); }
.choose-check { width: 32px; color: var(--violet); }
.choose-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.choose-sub { font-size: 18px; color: var(--muted); margin-left: 18px; max-width: 480px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.choose-row.focused .choose-sub { color: #475569; }
.pick-main { flex: 1; height: 76px; display: flex; align-items: center; padding: 0 26px; border-radius: 14px; font-size: 24px; }
.pick-main.selected { color: var(--lilac); }
.pick-main.focused { background: var(--text); color: var(--bg); }
.pick-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-count { font-size: 19px; color: var(--muted); margin-left: 16px; }
.pick-pin { width: 170px; height: 64px; margin-left: 12px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 21px; color: var(--muted); background: rgba(30, 41, 59, .8); flex: none; }
.pick-pin.on { color: #FBBF24; }
.pick-pin.focused { background: var(--text); color: var(--bg); }
.progress-modal .pm-text { font-size: 24px; color: var(--muted); margin-top: 10px; }

/* Teclado en pantalla */
.osk-modal .modal-card { width: 1440px; padding: 40px 48px 36px; }
.osk-field { height: 92px; border-radius: 16px; background: #0B1020; border: 2px solid rgba(139, 92, 246, .55); overflow: hidden; display: flex; align-items: center; padding: 0 26px; margin-top: 16px; }
.osk-text { font-size: 32px; white-space: pre; font-variant-numeric: tabular-nums; }
.osk-placeholder { color: rgba(148, 163, 184, .5); }
.caret { display: inline-block; width: 3px; height: 40px; background: var(--blue); vertical-align: middle; margin: 0 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.osk-error { min-height: 34px; color: var(--err); font-size: 22px; margin: 8px 0 4px; }
.osk-row { display: flex; justify-content: center; margin-bottom: 10px; }
.key { width: 104px; height: 70px; margin: 0 5px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(30, 41, 59, .9); font-size: 30px; font-weight: 500; transition: transform .1s; }
.key.wide { width: auto; padding: 0 20px; min-width: 92px; font-size: 22px; }
.key.primary { background: var(--grad); }
.key.on { color: var(--lilac); }
.key.focused { background: var(--text); color: var(--bg); transform: scale(1.1); }
.osk-row.special { margin-top: 14px; }
.osk-native-row { text-align: center; margin-top: 10px; }
.osk-native { position: absolute; left: -2000px; top: 0; width: 1000px; height: 60px; font-size: 30px; }
.osk-native.on { left: 240px; top: 160px; z-index: 5; }

/* Avisos */
.toast { position: absolute; left: 50%; bottom: 60px; transform: translate(-50%, 40px); max-width: 1300px; padding: 22px 36px; border-radius: 18px; background: #F8FAFC; color: #0B1020; font-size: 24px; font-weight: 500; opacity: 0; transition: opacity .2s, transform .25s var(--ease); z-index: 30; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #FEE2E2; color: #7F1D1D; }

/* Arranque */
#splash { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(1000px 700px at 70% 20%, rgba(99, 102, 241, .25), transparent 60%), #070B17; transition: opacity .6s; }
#splash img { width: 620px; height: auto; }
#splash.out { opacity: 0; }
/* Mismo ancho que el logo: así se ve alineada (el logo pesa más a la izquierda y una barra corta parecía torcida) */
.splash-bar { width: 620px; height: 3px; background: rgba(148, 163, 184, .2); border-radius: 2px; margin-top: 36px; overflow: hidden; }
.splash-bar i { display: block; width: 30%; height: 100%; background: var(--grad); animation: load 1.2s var(--ease) infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

/* ---------- Reproductor ---------- */
.player-ui { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
.osd { position: absolute; left: 0; right: 0; opacity: 0; transition: opacity .25s, transform .25s var(--ease); }
.osd-top { top: 0; padding: 56px var(--safe-x) 120px; background: linear-gradient(180deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0)); transform: translateY(-20px); }
.osd-bottom { bottom: 0; padding: 120px var(--safe-x) 48px; background: linear-gradient(0deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0)); transform: translateY(20px); }
.osd-on .osd { opacity: 1; transform: none; }
.osd-chan { display: flex; align-items: center; }
.osd-chan > div:nth-child(3) { margin-left: 22px; }
.osd-num { font-size: 40px; font-weight: 600; margin-right: 26px; font-variant-numeric: tabular-nums; }
.osd-title { font-size: 40px; font-weight: 600; }
.osd-sub { font-size: 22px; color: #CBD5E1; margin-top: 4px; }
.osd-quality { margin-left: auto; font-size: 20px; color: #CBD5E1; text-align: right; }
.osd-quality .badge { margin-left: 12px; }
.osd-epg { margin-top: 26px; max-width: 1100px; font-size: 26px; }
.epg-now { font-weight: 600; } .epg-next { color: #CBD5E1; margin-top: 14px; }
.epg-time { color: var(--lilac); font-variant-numeric: tabular-nums; margin-right: 8px; }
.osd-epg .pbar { width: 520px; }
.osd-hints { font-size: 20px; color: rgba(226, 232, 240, .8); }
.osd-vod-title { font-size: 44px; font-weight: 600; }
.vod-bar { display: flex; align-items: center; margin-bottom: 18px; }
.vod-state { width: 52px; height: 52px; margin-right: 22px; }
.vod-time { font-size: 24px; font-variant-numeric: tabular-nums; min-width: 110px; }
.vod-progress { flex: 1; height: 8px; margin: 0 26px; }
.vod-unknown { font-size: 22px; color: #CBD5E1; margin-left: 24px; }
.p-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; flex-direction: column; align-items: center; color: #E2E8F0; font-size: 26px; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.p-loading.on { display: flex; }
.p-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 1000px; padding: 50px 60px; border-radius: 30px; background: rgba(15, 23, 42, .95); border: 1px solid rgba(148, 163, 184, .2); display: none; text-align: center; }
.p-panel.on { display: block; }
.p-panel h2 { font-size: 40px; font-weight: 600; margin: 10px 0 14px; }
.p-panel p { font-size: 24px; color: #CBD5E1; }
.p-panel .btn-row { justify-content: center; }
.p-error-icon { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto; background: rgba(248, 113, 113, .2); color: var(--err); font-size: 46px; font-weight: 600; line-height: 76px; }
/* Lista de canales sobre la imagen: transparente para seguir viendo el canal detrás */
.zap { position: absolute; left: 0; top: 0; bottom: 0; width: 760px; padding: 56px 30px 40px var(--safe-x); background: linear-gradient(90deg, rgba(5, 8, 18, .62) 55%, rgba(5, 8, 18, 0)); transform: translateX(-100%); transition: transform .25s var(--ease); }
.zap-row .ch-name, .zap-head, .zap-row .ch-num, .zap-row .ch-epg { text-shadow: 0 1px 6px rgba(0, 0, 0, .85); }
.zap-row.focused .ch-name, .zap-row.focused .ch-num, .zap-row.focused .ch-epg { text-shadow: none; }
.zap-on .zap { transform: none; }
.zap-head { font-size: 30px; font-weight: 600; margin-bottom: 20px; }
.zap-list { position: absolute; left: var(--safe-x); right: 60px; top: 120px; bottom: 40px; }
.zap-row { flex: 1; height: 78px; display: flex; align-items: center; padding: 0 16px; border-radius: 14px; }
.zap-row.selected .ch-name { color: var(--lilac); }
.zap-row.focused { background: var(--text); color: var(--bg); }
.zap-row.focused .ch-name { color: var(--bg); }
.digits { position: absolute; right: var(--safe-x); top: 56px; font-size: 80px; font-weight: 600; opacity: 0; text-shadow: 0 4px 20px rgba(0, 0, 0, .8); }
.digits.on { opacity: 1; }


/* ===================================================== v0.2 ===================================================== */

/* ---------- Inicio: banner de recomendaciones ---------- */
.screen-home, .screen-home.active { top: -128px; height: 1080px; overflow: hidden; }
.home-scroll { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden; }
.screen-home::after { content: ''; position: absolute; left: 0; top: 0; width: 1920px; height: 150px; background: linear-gradient(180deg, rgba(11, 16, 32, .92), rgba(11, 16, 32, 0)); pointer-events: none; z-index: 2; transition: height .2s; }
.screen-home.scrolled::after { height: 190px; background: linear-gradient(180deg, var(--bg) 0, var(--bg) 128px, rgba(11, 16, 32, 0) 190px); }
.banner { position: relative; height: 780px; overflow: hidden; }
.banner.calm { height: 560px; }
.banner-bg { position: absolute; left: 0; top: 0; width: 1920px; height: 780px; }
.banner-bg img { width: 100%; height: 100%; object-fit: cover; }
.banner-bg.soft { opacity: .35; width: 1920px; }
.banner-shade { position: absolute; left: 0; top: 0; width: 1920px; height: 780px;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(11, 16, 32, .92) 28%, rgba(11, 16, 32, .35) 60%, rgba(11, 16, 32, .1) 100%),
              linear-gradient(0deg, var(--bg) 0%, rgba(11, 16, 32, 0) 38%); }
.banner-poster { position: absolute; right: 180px; top: 170px; width: 340px; height: 510px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); border-radius: 18px; }
.banner-copy { position: absolute; left: var(--safe-x); bottom: 60px; width: 1000px; z-index: 1; }
.banner.calm .banner-copy { bottom: 40px; }
.banner-copy h1 { font-size: 68px; font-weight: 600; line-height: 1.05; margin: 12px 0 14px; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.banner-meta { font-size: 25px; color: #CBD5E1; }
.banner-plot { font-size: 25px; line-height: 1.45; color: #E2E8F0; margin-top: 18px; max-width: 980px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.banner-plot.dim { color: var(--muted); }
.banner .btn-row { margin-top: 28px; }
.banner-dots { position: absolute; left: 0; bottom: -36px; display: flex; }
.banner-dots i { width: 10px; height: 10px; border-radius: 5px; background: rgba(248, 250, 252, .3); margin-right: 10px; transition: width .3s; }
.banner-dots i.on { width: 34px; background: var(--text); }
.banner-hint { position: absolute; left: 260px; bottom: -40px; font-size: 18px; color: rgba(148, 163, 184, .8); white-space: nowrap; }
.rows { position: relative; padding: 40px 0 120px; }
.row-hint { font-size: 18px; font-weight: 400; color: var(--muted); margin-left: 18px; }
.card-tag { position: absolute; left: 10px; top: 10px; padding: 4px 12px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 17px; font-weight: 600; z-index: 1; }
.chan-art { position: relative; }
.card.chan .logo-box.lg { width: 240px; height: 136px; border-radius: 16px; }

/* Logos: solo la imagen (las iniciales son solo la alternativa) */
.logo-box.has-img img { left: 10%; top: 10%; width: 80%; height: 80%; }

/* ---------- Fichas con información ---------- */
.detail-bg.wide { width: 1920px; left: 0; opacity: .38; }
.detail-bg.wide::after { background: linear-gradient(90deg, var(--bg) 0%, rgba(11, 16, 32, .85) 40%, rgba(11, 16, 32, .45) 100%), linear-gradient(0deg, var(--bg), rgba(11, 16, 32, 0) 50%); }
.detail-credits { font-size: 21px; color: #CBD5E1; margin-top: 12px; max-width: 1100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-credits span { color: var(--muted); margin-right: 10px; }
.detail-source { font-size: 17px; color: rgba(148, 163, 184, .75); margin-top: 18px; }
.detail-plot.short { -webkit-line-clamp: 3; font-size: 23px; margin-top: 16px; }
.detail-note { font-size: 20px; color: var(--muted); margin-top: 10px; }
.show-detail .ep-list ~ .detail-source { position: absolute; bottom: 4px; }
.ep-row { padding: 0 20px 0 14px; }
.ep-row.current { box-shadow: inset 4px 0 0 var(--violet); }
.ep-still { width: 176px; height: 99px; border-radius: 10px; overflow: hidden; flex: none; margin-right: 20px; background: #273449; }
.ep-still img { width: 100%; height: 100%; object-fit: cover; }
.ep-num { width: 120px; }
.ep-title { font-size: 23px; font-weight: 600; display: flex; align-items: baseline; }
.ep-title .ep-dur { font-weight: 400; font-size: 19px; }
.ep-plot { font-size: 19px; color: var(--muted); margin-top: 4px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.ep-row.focused .ep-plot, .ep-row.focused .ep-dur { color: #475569; }

/* ---------- Guía TV ---------- */
.guide { position: absolute; left: var(--safe-x); right: var(--safe-x); top: 0; bottom: 0; }
.guide-top { display: flex; height: 200px; }
.guide-cat { width: 330px; flex: none; }
.guide-cat .btn { max-width: 330px; margin: 0; }
.guide-cat .btn span:last-child { overflow: hidden; text-overflow: ellipsis; }
.guide-day { font-size: 20px; color: var(--muted); margin-top: 16px; }
.guide .hintbar { left: 0; right: 0; }
.guide-info { flex: 1; margin-left: 40px; padding: 4px 0 0; overflow: hidden; }
.gi-chan { font-size: 20px; color: var(--lilac); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.gi-title { font-size: 34px; font-weight: 600; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gi-time { font-size: 21px; color: #CBD5E1; margin-top: 4px; }
.gi-desc { font-size: 20px; color: var(--muted); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.guide-times { position: relative; height: 40px; border-bottom: 1px solid var(--line); }
.guide-times span { position: absolute; top: 6px; font-size: 19px; color: var(--muted); font-variant-numeric: tabular-nums; }
.guide-grid { position: absolute; left: 0; right: 0; top: 248px; height: 644px; overflow: hidden; }
.guide-rows { position: relative; height: 100%; }
.g-row { position: absolute; left: 0; right: 0; height: 92px; display: flex; }
.g-ch { width: 330px; flex: none; display: flex; align-items: center; padding: 0 12px 0 4px; border-bottom: 1px solid var(--line); }
.g-num { width: 46px; color: var(--muted); font-size: 18px; font-variant-numeric: tabular-nums; }
.g-name { margin-left: 14px; font-size: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-progs { position: relative; flex: 1; margin-left: 10px; }
.g-prog { position: absolute; top: 6px; height: 78px; padding: 10px 14px; border-radius: 10px; background: rgba(30, 41, 59, .75); overflow: hidden; }
.g-prog.now { background: rgba(76, 70, 229, .28); }
.g-prog.past { opacity: .55; }
.g-prog.none { background: rgba(30, 41, 59, .35); color: var(--muted); }
.g-prog.focused { background: var(--text); color: var(--bg); opacity: 1; z-index: 2; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.g-title { font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-time { font-size: 17px; color: var(--muted); margin-top: 4px; }
.g-prog.focused .g-time { color: #475569; }
.guide-now { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--blue); box-shadow: 0 0 12px rgba(14, 165, 255, .7); z-index: 3; pointer-events: none; }

/* ---------- PIN y elementos ocultos ---------- */
.pin-modal .modal-card { width: 640px; text-align: center; }
.pin-dots { display: flex; justify-content: center; margin: 30px 0 10px; }
.pin-dots i { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--muted); margin: 0 14px; }
.pin-dots i.on { background: var(--text); border-color: var(--text); }
.pin-error { min-height: 32px; color: var(--err); font-size: 21px; }
.pin-grid { display: flex; flex-wrap: wrap; width: 396px; margin: 10px auto 0; }
.pin-key { width: 112px; height: 84px; margin: 7px 10px; font-size: 34px; }
.pick-hide { width: 140px; height: 64px; margin-left: 10px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--muted); background: rgba(30, 41, 59, .8); flex: none; }
.pick-hide.on { color: var(--lilac); }
.pick-hide.focused { background: var(--text); color: var(--bg); }
.pick-lock { width: 26px; height: 26px; margin-right: 12px; color: var(--lilac); flex: none; }
.pick-check { width: 30px; height: 30px; margin-right: 14px; color: var(--muted); flex: none; }
.pick-check.on { color: var(--violet); }
.pick-main.focused .pick-check { color: var(--violet); }
.picker-foot { margin-top: 14px; min-height: 10px; }
.picker .modal-card { width: 1120px; }
.lock-btn { display: none; margin-left: 16px; color: var(--lilac); }
#app.unlocked .lock-btn { display: block; }
.ch-row.moving { background: var(--violet); color: #fff; transform: scale(1.04); box-shadow: 0 12px 40px rgba(139, 92, 246, .5); }
.screen-live.reordering .ch-list { outline: 2px dashed rgba(139, 92, 246, .6); outline-offset: 6px; border-radius: 16px; }
.rail-random { color: var(--lilac); }
.dice { font-size: 24px; line-height: 28px; }

/* ---------- ¿Qué veo hoy? ---------- */
.random-modal .modal-card { width: 1300px; }
.rand { display: flex; margin-top: 18px; }
.rand-poster { width: 300px; height: 450px; flex: none; }
.rand-body { margin-left: 44px; min-width: 0; }
.rand-body h2 { font-size: 46px; margin-bottom: 8px; }
.rand-plot { font-size: 23px; line-height: 1.45; color: #E2E8F0; margin-top: 18px; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.rand-plot.dim { color: var(--muted); }
.rand-from { margin-top: 18px; font-size: 19px; color: var(--muted); }

/* v0.2.2 — aviso «Siguiente capítulo» en los últimos segundos del episodio */
.next-card { position: absolute; right: var(--safe-x); bottom: 150px; width: 560px; padding: 28px 32px; border-radius: 24px;
  background: rgba(15, 23, 42, .94); border: 1px solid rgba(148, 163, 184, .25); box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  display: none; z-index: 30; }
.next-card.on { display: block; }
.next-card .nc-eyebrow { font-size: 20px; color: var(--lilac); text-transform: uppercase; letter-spacing: .08em; }
.next-card .nc-title { font-size: 34px; font-weight: 600; margin-top: 6px; }
.next-card .nc-sub { font-size: 24px; color: #CBD5E1; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-card .btn-row { margin-top: 20px; }
.next-card .nc-hint { font-size: 18px; color: var(--muted); margin-top: 14px; }
.logo-file-note { font-size: 20px; color: var(--muted); }

/* v0.2.2 — ayuda si el arranque no termina */
.splash-help { margin-top: 60px; width: 1100px; text-align: center; }
.splash-help h2 { font-size: 40px; font-weight: 600; margin: 0 0 12px; }
.splash-help p { font-size: 24px; color: #CBD5E1; margin: 8px 0; }
.splash-help .splash-err { font-size: 20px; color: var(--err); }
.splash-help .splash-note { font-size: 20px; color: var(--muted); margin-top: 22px; }
.splash-help .btn-row { justify-content: center; margin-top: 26px; }

/* v0.3.2 — Mi lista */
.card-star { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border-radius: 20px; background: rgba(11, 16, 32, .8); display: flex; align-items: center; justify-content: center; color: #FACC15; }
.card-star svg { width: 24px; height: 24px; fill: currentColor; }
.list-hint { margin-left: auto; font-size: 20px; color: var(--muted); }
.btn.on { border-color: var(--violet); }

/*
 * v0.3.2 — Modo televisor (html.tv): el TU8500 tiene una GPU modesta. Sin animaciones de escala
 * ni sombras grandes difuminadas en el foco (obligan a repintar carátulas enteras en cada pulsación);
 * el foco se marca con color y borde, que se pinta al instante.
 */
.tv .tab, .tv .icon-btn, .tv .btn, .tv .chip, .tv .card, .tv .rail-item, .tv .ch-row, .tv .ep-row,
.tv .set-menu-item, .tv .set-row, .tv .key, .tv .switch i, .tv .banner-dots i, .tv .screen-home::after { transition: none; }
.tv .icon-btn.focused, .tv .btn.focused, .tv .chip.focused, .tv .card.focused, .tv .rail-item.focused, .tv .ch-row.focused,
.tv .info-actions .btn.focused, .tv .ep-row.focused, .tv .set-menu-item.focused, .tv .set-row.focused, .tv .key.focused { transform: none; }
.tv .btn.focused, .tv .g-prog.focused, .tv .modal-card { box-shadow: none; }
.tv .card.focused .poster, .tv .card.chan.focused .logo-box { box-shadow: 0 0 0 5px var(--text); }
.tv .card.focused .card-title { color: var(--text); }
.tv .toast, .tv .osd, .tv .zap, .tv .modal, .tv .modal-card { transition-duration: .1s; }

/* v0.3.4 — Subtítulos (AVPlay entrega el texto; se dibuja aquí) */
.subs { position: absolute; left: 160px; right: 160px; bottom: 90px; text-align: center; font-size: 44px; font-weight: 600; line-height: 1.3;
  color: #fff; text-shadow: 0 0 6px #000, 0 2px 4px #000, 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
  white-space: pre-line; display: none; z-index: 5; pointer-events: none; }
.subs.on { display: block; }
.osd-on .subs { bottom: 230px; }
.ep-hint { font-size: 20px; color: var(--muted); margin-top: 10px; }
/* v0.3.7 — Programas grabados (catch-up) */
.g-prog.past.rec { opacity: .9; }
.g-rec { color: var(--lilac); margin-right: 8px; font-weight: 700; }
.g-prog.focused .g-rec { color: var(--violet); }
/* «Últimos 7 días» */
.cu-layout { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.cu-chans { position: absolute; left: 480px; width: 600px; top: 10px; bottom: 0; }
.cu-chlist { position: absolute; left: 0; right: 0; top: 64px; bottom: 0; }
.cu-progs { position: absolute; left: 1110px; right: var(--safe-x); top: 10px; bottom: 0; }
.cu-days { white-space: nowrap; overflow: hidden; height: 76px; padding-top: 4px; }
.cu-days .chip { display: inline-block; }
.cu-days .chip.selected { color: var(--text); border-color: var(--violet); }
.cu-plist { position: absolute; left: 0; right: 0; top: 86px; bottom: 0; }
.cu-plist.loading::before { content: 'Cargando programas…'; display: block; padding: 20px; color: var(--muted); font-size: 24px; }
.cu-prog { flex: 1; height: 106px; display: flex; align-items: center; padding: 0 20px; border-radius: 16px; background: rgba(30, 41, 59, .5); }
.cu-prog.focused { background: var(--text); color: var(--bg); }
.cu-time { width: 110px; flex: none; font-size: 26px; font-weight: 600; }
.cu-time span { display: block; font-size: 18px; font-weight: 400; color: var(--muted); }
.cu-main { flex: 1; min-width: 0; }
.cu-title { font-size: 26px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-desc { font-size: 19px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.cu-prog.focused .cu-desc, .cu-prog.focused .cu-time span { color: #475569; }
.cu-play { width: 40px; flex: none; opacity: .6; }
.cu-play svg { width: 28px; height: 28px; }

/* ---------- Deportes hoy ---------- */
.card.sport { width: 330px; height: 206px; padding: 20px 24px; border-radius: 20px; background: linear-gradient(150deg, rgba(30, 41, 59, .96), rgba(17, 24, 39, .96)); border: 2px solid var(--line); display: flex; flex-direction: column; }
.card.sport.live { border-color: rgba(52, 211, 153, .6); }
.card.sport.done { opacity: .72; }
.sp-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sp-comp { font-size: 17px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 3px 10px; border-radius: 8px; background: rgba(14, 165, 255, .18); color: #7DD3FC; white-space: nowrap; }
.sp-comp.sp-basket { background: rgba(251, 146, 60, .18); color: #FDBA74; }
.sp-comp.sp-beisbol { background: rgba(248, 113, 113, .18); color: #FCA5A5; }
.sp-time { font-size: 21px; font-weight: 600; color: var(--text); white-space: nowrap; margin-left: 10px; }
.card.sport.live .sp-time { color: var(--ok); }
.sp-team { display: flex; align-items: center; font-size: 24px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; margin-bottom: 4px; }
.sp-team span { overflow: hidden; text-overflow: ellipsis; }
.sp-crest { flex: none; width: 34px; height: 34px; margin-right: 12px; display: flex; align-items: center; justify-content: center; }
.sp-crest img { max-width: 34px; max-height: 34px; }
.sp-crest.none { width: 34px; height: 34px; border-radius: 50%; background: rgba(148, 163, 184, .16); }
.sp-comp { display: flex; align-items: center; }
.sp-lg { flex: none; width: 24px; height: 24px; margin-right: 8px; border-radius: 6px; background: #F8FAFC; display: flex; align-items: center; justify-content: center; }
.sp-lg img { max-width: 20px; max-height: 20px; }
.sp-lg.none { display: none; }
.sp-tv { margin-top: auto; display: flex; align-items: center; font-size: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.sp-tv svg { width: 20px; height: 20px; flex: none; margin-right: 8px; }
.sp-tv span { overflow: hidden; text-overflow: ellipsis; }
.card.sport.focused { background: var(--text); color: var(--bg); border-color: var(--text); }
.card.sport.focused .sp-time, .card.sport.focused .sp-team { color: var(--bg); }
.card.sport.focused .sp-tv { color: #334155; }
.sports-slot:empty { display: none; }
.sp-title { display: flex; align-items: center; }
.sp-days { display: flex; margin-left: 22px; }
.sp-days .chip { padding: 6px 20px; margin: 0 10px 0 0; font-size: 20px; }
.sp-empty { font-size: 22px; color: var(--muted); padding: 30px 0; height: 206px; }
.zap-row .ch-epg { color: #CBD5E1; }
.home-end { justify-content: center; padding: 10px 0 40px; }

/* ---------- Versión web táctil (tablet) ---------- */
.nb-touch, .nb-touch body { touch-action: none; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
#touch-remote { position: fixed; right: 14px; bottom: 14px; z-index: 1000; display: flex; align-items: center; padding: 6px; border-radius: 999px;
  background: rgba(11, 16, 32, .72); border: 1px solid rgba(148, 163, 184, .25); transition: opacity .25s; }
#touch-remote.tr-hidden { opacity: 0; pointer-events: none; }
#touch-remote button { margin: 0 3px; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; border: 0; font: 600 16px/44px Inter, Arial, sans-serif; color: #F8FAFC; background: rgba(30, 41, 59, .9); }
#touch-remote button:active { background: #F8FAFC; color: #0B1020; }
#touch-remote .tr-c { min-width: 36px; width: 36px; height: 36px; padding: 0; }
#touch-remote .tr-red { background: #EF4444; } #touch-remote .tr-green { background: #22C55E; }
#touch-remote .tr-yellow { background: #EAB308; } #touch-remote .tr-blue { background: #3B82F6; }
