:root{
  --bg:#07090d;--panel:#11151d;--panel2:#171c25;--text:#f5f7fb;--muted:#aeb6c2;
  --accent:#2f8cff;--danger:#d43b45;--header-h:86px;--page-x:4.2vw;--card-gap:14px;
  --card-h:min(30.5vw,510px);--card-w:calc((100% - (var(--card-gap) * 4))/5);
}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;background:var(--bg);color:var(--text);font-family:Arial,Helvetica,sans-serif;overflow:hidden}
button,input,select{font:inherit}
button{color:inherit}
button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #fff;outline-offset:3px}
[hidden]{display:none!important}
#tvApp{width:100vw;height:100vh;background:var(--bg);overflow:hidden}
.tv-header{height:var(--header-h);padding:0 var(--page-x);display:flex;align-items:center;gap:28px;position:relative;z-index:10;background:linear-gradient(180deg,rgba(5,7,10,.98),rgba(5,7,10,.84))}
.tv-logo{width:150px;flex:0 0 auto}.tv-logo img{display:block;width:100%;height:auto}
#tvNav{display:flex;align-items:center;gap:4px;flex:1;overflow:hidden}
.tv-nav-button,.tv-header-actions button{border:0;background:transparent;padding:12px 15px;border-radius:7px;color:#c8ced7;font-size:18px}
.tv-nav-button.current{color:#fff;font-weight:700}.tv-nav-button:focus,.tv-header-actions button:focus{background:rgba(255,255,255,.13)}
.tv-header-actions{display:flex;align-items:center;gap:8px}.tv-icon-button{width:48px;height:48px;padding:10px!important}.tv-icon-button svg,.tv-back-chevron svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.tv-account-button.signed-in{width:48px;height:48px;padding:6px!important;border-radius:7px!important}.tv-account-button.signed-in img{width:100%;height:100%;border-radius:50%}
.tv-boot{position:fixed;z-index:100;inset:0;background:#06080b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;color:#c7ced8}.tv-boot img{width:250px}
#tvHome{height:calc(100vh - var(--header-h));overflow-y:auto;overflow-x:hidden;padding-bottom:70px;scroll-behavior:auto}
.tv-hero{height:420px;position:relative;overflow:hidden;background:#11151d}.tv-hero>img{position:absolute;inset:0 0 0 auto;width:72%;height:100%;object-fit:cover;object-position:center 35%}.tv-hero-shade{position:absolute;inset:0;background:linear-gradient(90deg,#07090d 0%,rgba(7,9,13,.96) 22%,rgba(7,9,13,.65) 48%,rgba(7,9,13,.08) 75%),linear-gradient(0deg,#07090d 0%,transparent 42%)}
.tv-hero-content{position:absolute;left:var(--page-x);top:50%;transform:translateY(-50%);width:45%;max-width:760px}.tv-kicker{margin:0;color:#dce4ee;font-size:14px;letter-spacing:.16em;font-weight:700}.tv-hero h1,.tv-detail-copy h1{margin:12px 0 10px;font-size:54px;line-height:1.04;letter-spacing:-.02em}.tv-hero #tvHeroMeta,.tv-detail #tvDetailDate{font-size:18px;font-weight:700}.tv-hero #tvHeroDescription,.tv-detail #tvDetailDescription{font-size:18px;line-height:1.4;color:#d3d7de;max-width:720px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.tv-primary{border:0;background:#fff!important;color:#0b0d11!important;padding:14px 24px!important;border-radius:6px!important;font-weight:700!important}.tv-primary:focus{background:#e9edf3!important}
.tv-rating{display:flex;align-items:center;gap:9px;color:#ffd466}.tv-stars{position:relative;display:inline-block;color:#555}.tv-stars-fill{position:absolute;left:0;top:0;overflow:hidden;color:#ffd466;white-space:nowrap}.tv-rating-score{color:#dfe4eb;font-size:15px}
.tv-message{margin:7px var(--page-x) 0;min-height:21px;color:#9ca6b3;font-size:14px}
.tv-rows{padding-top:4px}.tv-collection{margin:18px 0 28px;padding:0 var(--page-x);contain:layout style}.tv-collection h2{font-size:24px;margin:0 0 10px;font-weight:700}.tv-fixed-carousel{position:relative;width:100%;height:calc(var(--card-h) + 8px);overflow:hidden}.tv-poster-track{position:absolute;left:0;top:0;width:100%;height:var(--card-h);display:flex;gap:var(--card-gap);transform:translate3d(0,0,0);transition:transform 150ms cubic-bezier(.2,.8,.2,1)}.tv-poster-track.no-animate{transition:none}.tv-card{position:relative;flex:0 0 var(--card-w);height:var(--card-h);border-radius:9px;overflow:hidden;background:#171b23}.tv-card-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#171b23}.tv-card-fallback{position:absolute;inset:0;display:grid;place-items:center;padding:20px;text-align:center;background:linear-gradient(135deg,#1a2330,#11161e);color:#9ea8b5;font-weight:700}.tv-card img:not([hidden])+.tv-card-fallback{display:none}.tv-card.is-loading::before,.tv-card-skeleton::before{content:'';position:absolute;inset:0;background:linear-gradient(100deg,#171b23 20%,#232a35 48%,#171b23 74%)}
.tv-row-focus-anchor{position:absolute;z-index:5;left:0;top:0;width:var(--card-w);height:var(--card-h);border:0;border-radius:9px;background:transparent;box-shadow:inset 0 0 0 4px rgba(255,255,255,.98),0 5px 20px rgba(0,0,0,.32);padding:0}.tv-row-focus-anchor:focus{outline:none;box-shadow:inset 0 0 0 5px #fff,0 5px 22px rgba(0,0,0,.4)}
.tv-row-meta{display:flex;align-items:baseline;gap:12px;margin-top:8px;min-height:28px;color:#dfe4ea}.tv-row-meta strong{font-size:17px}.tv-row-meta small{font-size:14px;color:#98a2af}
.tv-layer{position:fixed;z-index:30;inset:0;background:#07090d;overflow:auto}.tv-back-chevron{border:0;background:rgba(17,20,27,.74);width:48px;height:48px;border-radius:50%;padding:9px;color:#fff}.tv-back-chevron:focus{background:#fff;color:#0a0c10}
.tv-detail{position:relative;min-height:100%;background:#07090d;padding-bottom:55px}.tv-detail>img{position:absolute;top:0;right:0;width:76%;height:72vh;object-fit:cover;object-position:center 30%}.tv-detail-shade{position:absolute;inset:0 0 auto 0;height:76vh;background:linear-gradient(90deg,#07090d 0%,rgba(7,9,13,.98) 22%,rgba(7,9,13,.65) 48%,rgba(7,9,13,.08) 72%),linear-gradient(0deg,#07090d 0%,rgba(7,9,13,.72) 20%,transparent 58%)}.tv-detail-back{position:absolute;z-index:5;top:28px;left:var(--page-x)}.tv-detail-copy{position:relative;z-index:2;padding:14vh var(--page-x) 30px;width:52%;min-height:66vh}.tv-detail-copy #tvDetailStatus{font-size:14px;color:#aab3bf;min-height:20px}.tv-detail-copy .tv-primary{margin-top:12px}.tv-series-browser{position:relative;z-index:3;padding:0 var(--page-x) 36px}.tv-season-row{display:flex;align-items:center;gap:18px}.tv-season-row h2,.tv-episode-heading h2{font-size:24px;margin:0}.tv-season-list{display:flex;gap:9px;overflow:hidden}.tv-season-chip{border:1px solid rgba(255,255,255,.2);background:#222731;color:#fff;border-radius:5px;padding:9px 14px}.tv-season-chip.selected{background:#fff;color:#111}.tv-episode-heading{margin-top:22px;display:flex;align-items:baseline;gap:12px}.tv-episode-heading span{color:#98a2af}.tv-episode-rail{margin-top:10px;display:flex;gap:14px;overflow:hidden;padding:4px 4px 10px}.tv-episode-card{flex:0 0 calc((100vw - (var(--page-x) * 2) - 28px)/3);max-width:560px;min-width:420px;border:0;background:#151922;color:#fff;border-radius:8px;overflow:hidden;text-align:left;padding:0}.tv-episode-card img,.tv-episode-fallback{display:block;width:100%;height:180px;object-fit:cover;background:#1c222c}.tv-episode-fallback{display:grid;place-items:center;font-size:28px}.tv-episode-copy{display:flex;flex-direction:column;gap:4px;padding:12px 14px}.tv-episode-copy strong{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tv-episode-copy small{font-size:13px;color:#a9b2be}.tv-episode-card:focus{outline:none;box-shadow:inset 0 0 0 4px #fff}.tv-episode-card.selected{background:#202632}
.tv-form{position:relative;width:min(700px,88vw);margin:7vh auto;padding:34px 42px 42px;background:#141820;border-radius:12px}.tv-form>.tv-back-chevron{margin-bottom:8px}.tv-form h1{font-size:40px;margin:10px 0 6px}.tv-form h2{font-size:24px}.tv-form p{color:#b2bbc7}.tv-form label{display:block;margin:14px 0;color:#dfe4eb}.tv-form input,.tv-form select{width:100%;margin-top:7px;padding:13px 14px;border:1px solid #4c5562;border-radius:5px;background:#0c0f14;color:#fff}.tv-form input:focus,.tv-form select:focus{border-color:#fff;outline:2px solid #fff}.tv-form button:not(.tv-back-chevron){border:0;background:#252b35;color:#fff;padding:12px 16px;border-radius:6px;margin:5px 4px 5px 0}.tv-settings-form{width:min(1160px,92vw)}.tv-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:32px}.tv-settings-grid>section{background:#0f1319;padding:22px;border-radius:9px}.tv-settings-actions{display:flex;flex-wrap:wrap;gap:8px}.tv-danger{background:#3a171b!important;color:#ffced2!important}
.tv-search-panel{height:100%;display:grid;grid-template-columns:44% 56%}.tv-search-left{padding:4vh 3vw 3vh var(--page-x);background:#0e1117}.tv-search-left h1{font-size:42px;margin:8px 0 18px}.tv-search-input-wrap{height:58px;border:2px solid #48515d;border-radius:6px;display:flex;align-items:center;gap:12px;padding:0 12px;background:#090c11}.tv-search-input-wrap:focus{border-color:#fff}.tv-search-input-wrap svg{width:26px;height:26px;fill:none;stroke:#b9c0ca;stroke-width:2.6}.tv-search-input-wrap input{flex:1;border:0;background:transparent;color:#fff;font-size:21px;outline:none}.tv-search-input-wrap button{border:0;background:transparent;color:#fff;font-size:30px}.tv-search-hint{color:#8f99a7;font-size:14px}.tv-search-keyboard{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.tv-search-key{height:54px;border:0;border-radius:5px;background:#262c36;color:#fff}.tv-search-key:focus{background:#fff;color:#111;outline:none}.tv-search-suggestions button{display:block;width:100%;text-align:left;background:transparent;color:#dfe4eb;border:0;padding:8px}.tv-search-results-wrap{padding:5vh 3.4vw;overflow:auto}.tv-search-results{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.tv-search-card{border:0;background:#141820;color:#fff;border-radius:7px;overflow:hidden;text-align:left;padding:0}.tv-search-art{display:block;aspect-ratio:2/3;background:#1b2029}.tv-search-art img{width:100%;height:100%;object-fit:cover}.tv-search-card strong,.tv-search-card small{display:block;padding:8px 10px 0}.tv-search-card small{padding-top:0;padding-bottom:10px;color:#9fa8b4}.tv-search-card:focus{outline:none;box-shadow:inset 0 0 0 4px #fff}
.tv-diagnostic-panel{width:min(1000px,92vw);margin:5vh auto;padding:28px 34px;background:#12161d;border-radius:10px}.tv-diagnostic-panel h1{font-size:38px}.tv-diagnostic-panel pre{white-space:pre-wrap;background:#080a0e;padding:18px;border-radius:7px;max-height:62vh;overflow:auto;color:#d5dbe4}.tv-diagnostic-flow{margin:14px 0;padding:14px;background:#0c0f14;border-radius:7px}.tv-diagnostic-step{display:grid;grid-template-columns:16px 1fr auto;gap:10px;padding:8px 0;border-bottom:1px solid #202631}.tv-diagnostic-dot{width:10px;height:10px;border-radius:50%;background:#58606d;margin-top:5px}.status-ok .tv-diagnostic-dot{background:#42c07a}.status-error .tv-diagnostic-dot{background:#e45662}.status-running .tv-diagnostic-dot{background:#ffcc55}.tv-muted{color:#98a2af}
.tv-player{background:transparent!important;overflow:hidden}.tv-player #tvPlayerMount,.tv-player #videoStage,.tv-player #avplaySurface{position:absolute;inset:0;background:transparent!important}.tv-player-top{position:absolute;z-index:5;top:0;left:0;right:0;padding:24px var(--page-x);background:linear-gradient(180deg,rgba(0,0,0,.7),transparent);transition:opacity .18s}.tv-player-controls{position:absolute;z-index:6;left:var(--page-x);right:var(--page-x);bottom:5.5vh;display:grid;grid-template-columns:72px 1fr 72px;align-items:center;gap:14px;padding:16px 18px;background:rgba(10,12,16,.78);border-radius:8px;transition:opacity .18s}.tv-player-top.is-idle,.tv-player-controls.is-idle{opacity:0;visibility:hidden;pointer-events:none}.tv-time{font-size:15px;color:#e8ebf0;text-align:center}.tv-seek{width:100%;appearance:none;background:transparent;height:26px}.tv-seek{--seek-pct:0%}.tv-seek::-webkit-slider-runnable-track{height:5px;background:linear-gradient(90deg,#fff 0 var(--seek-pct),rgba(255,255,255,.34) var(--seek-pct) 100%);border-radius:3px}.tv-seek::-webkit-slider-thumb{appearance:none;width:18px;height:18px;margin-top:-6px;border-radius:50%;background:#fff}.tv-seek:focus{outline:none}.tv-seek:focus::-webkit-slider-runnable-track{height:7px;background:linear-gradient(90deg,#fff 0 var(--seek-pct),rgba(255,255,255,.52) var(--seek-pct) 100%)}.tv-player-options{position:absolute;right:18px;bottom:62px;display:flex;gap:8px}.tv-player-options button{border:0;background:rgba(42,46,54,.94);color:#fff;border-radius:5px;padding:10px 13px}.tv-player-options button:focus{background:#fff;color:#111}.tv-next-episode{position:absolute;right:4vw;bottom:16vh;width:360px;padding:20px;background:rgba(12,14,18,.93);border-radius:8px}.tv-next-episode h2{margin:5px 0;font-size:20px}#vodSubtitleOverlay{position:absolute;left:10%;right:10%;bottom:14%;text-align:center;font-size:28px;text-shadow:0 2px 4px #000}
body.avplay-active #tvApp>.tv-header,body.avplay-active #tvHome,body.avplay-active #tvDetail,body.avplay-active #tvLogin,body.avplay-active #tvSettings,body.avplay-active #tvAbout,body.avplay-active #tvDiagnosticModal,body.avplay-active #tvPerformance,body.avplay-active #tvPinGate,body.avplay-active #tvSearch{visibility:hidden!important}.tv-player{visibility:visible!important}
@media(max-height:760px){:root{--header-h:74px;--card-h:min(27vw,400px)}.tv-hero{height:330px}.tv-hero h1,.tv-detail-copy h1{font-size:44px}.tv-detail-copy{padding-top:11vh}.tv-episode-card img,.tv-episode-fallback{height:145px}}

/* 223: explicit focus, native video plane and compact controls. */
button:focus,input:focus,select:focus,[tabindex]:focus{outline:3px solid #fff;outline-offset:3px}
.tv-header{gap:20px}#tvNav{overflow:visible;min-width:0;padding:8px 6px}.tv-nav-button{white-space:nowrap;padding:12px 11px}.tv-header-actions{flex-shrink:0;padding:7px}.tv-header-actions button:focus{outline-offset:2px}
.tv-hero-navigation{display:inline-flex;align-items:center;gap:12px;margin-left:22px}.tv-hero-navigation button{border:1px solid #667080;background:#161b24;color:#fff;border-radius:50%;width:40px;height:40px;font-size:25px}.tv-hero-navigation span{font-size:14px;color:#bfc6d0}
.tv-card-fallback{z-index:0}.tv-card-poster{z-index:1}.tv-card.is-loading .tv-card-fallback{display:grid!important}.tv-row-focus-anchor{box-shadow:none}.tv-row-focus-anchor:focus{outline:none;box-shadow:inset 0 0 0 5px #fff}
.tv-detail-copy{padding-top:19vh;min-height:64vh}.tv-rating{font-size:23px}.tv-rating-score{font-size:20px}.tv-detail-copy h1{font-size:50px}
.tv-episode-card{flex:0 0 280px;min-width:0;max-width:340px;min-height:86px;border:1px solid #343d4c}.tv-episode-copy{padding:18px}.tv-season-list{padding:6px}.tv-season-chip:focus{outline-offset:1px}
.tv-player-top{display:flex;align-items:center;gap:22px}.tv-player-top #tvPlayerTitle{font-size:26px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv-player-controls{grid-template-columns:72px minmax(140px,1fr) 72px auto;gap:18px}.tv-player-options{position:static;display:flex;gap:12px;max-width:440px}.tv-player-options button{max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tv-next-episode{z-index:8}
html.avplay-active,body.avplay-active,body.avplay-active #tvApp{background:transparent!important}
#avplaySurface{width:100%;height:100%;border:0}.tv-player #tvPlayerMount{z-index:0}#vodSubtitleOverlay{z-index:1}
.tv-settings-form{margin:3vh auto;padding:24px 32px}.tv-settings-grid>section{padding:16px}.tv-settings-grid label{margin:10px 0}
@media(max-width:1366px){.tv-logo{width:115px}.tv-header{gap:12px}.tv-nav-button{font-size:16px;padding:10px 8px}.tv-detail-copy{padding-top:18vh}.tv-detail-copy h1{font-size:40px}.tv-player-options{max-width:320px}.tv-player-options button{max-width:150px}}

/* Hide scrollbars while preserving remote and wheel scrolling. */
*{scrollbar-width:none}*::-webkit-scrollbar{width:0;height:0;display:none}.tv-episode-card:focus,.tv-season-chip:focus{outline:none;box-shadow:inset 0 0 0 3px #fff;background:#273141}.tv-episode-card{height:92px;border-radius:8px}.tv-season-chip{height:44px;border-radius:8px}

.tv-next-episode.is-idle{visibility:hidden;pointer-events:none}

.tv-player-controls{max-width:1500px;margin:0 auto;grid-template-columns:72px minmax(140px,1fr) 72px minmax(220px,auto)}

/* 224: unobtrusive hero pagination and stable carousel slots. */
.tv-hero-dots{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;z-index:3;padding:8px 12px;border-radius:20px;background:rgba(0,0,0,.18)}
.tv-hero-dots:empty{display:none}.tv-hero-dot{display:block;width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.36)}.tv-hero-dot.active{background:#fff;box-shadow:0 0 0 2px rgba(255,255,255,.15)}
.tv-poster-track{transition:transform 140ms ease-out}.tv-fixed-carousel{background:transparent}.tv-hero>img,.tv-detail>img{backface-visibility:hidden}

/* Full-width artwork; shading belongs to the text, not a black side column. */
.tv-hero>img,.tv-detail>img{left:0;right:0;width:100%;object-position:center 35%}
.tv-hero-shade{background:linear-gradient(90deg,rgba(7,9,13,.78),rgba(7,9,13,.42) 45%,rgba(7,9,13,.08) 78%),linear-gradient(0deg,#07090d,transparent 30%)}
.tv-detail-shade{background:linear-gradient(90deg,rgba(7,9,13,.8),rgba(7,9,13,.4) 48%,rgba(7,9,13,.08) 80%),linear-gradient(0deg,#07090d,rgba(7,9,13,.45) 20%,transparent 55%)}

.tv-detail.is-movie{height:100vh;min-height:100vh;padding-bottom:0;overflow:hidden}.tv-detail.is-movie>img{width:100%;height:100%;inset:0;object-fit:cover}.tv-detail.is-movie .tv-detail-shade{height:100%;background:linear-gradient(90deg,rgba(7,9,13,.8),rgba(7,9,13,.4) 48%,rgba(7,9,13,.08) 80%),linear-gradient(0deg,rgba(7,9,13,.32),transparent 35%)}.tv-detail.is-movie .tv-detail-copy{min-height:0;padding-top:22vh}


.tv-player.is-preparing #tvPlayerControls{visibility:hidden}.tv-player.is-preparing::after{content:"Preparando reproducción…";position:absolute;bottom:8vh;left:50%;transform:translateX(-50%);z-index:8;padding:12px 20px;border-radius:8px;background:rgba(7,9,13,.8);color:#fff;font-size:18px}

#vodSubtitleOverlay{z-index:3;white-space:pre-line;pointer-events:none;font-size:clamp(24px,2.5vw,42px);line-height:1.25;font-weight:600;color:white;text-shadow:0 2px 3px #000,2px 0 3px #000,-2px 0 3px #000;bottom:15%;background:transparent}#tvPlayerTrackStatus{position:absolute;z-index:9;bottom:17vh;right:5vw;max-width:70vw;padding:10px 16px;background:rgba(0,0,0,.85);border-radius:6px;font-size:18px}
/* 226: directional controls and full detail artwork. */
.tv-player-controls{grid-template-columns:72px minmax(140px,1fr) 72px;max-width:1100px;bottom:14vh}
.tv-player-options{position:absolute;top:calc(100% + 12px);bottom:auto;right:0;max-width:440px}
.tv-next-episode{right:var(--page-x);bottom:28vh;width:auto;padding:0;background:transparent}
.tv-next-episode .tv-primary{background:#fff;color:#111;padding:14px 24px;font-size:21px}
.tv-next-episode .tv-primary:focus{outline:3px solid #fff;outline-offset:5px}
.tv-detail>img{width:100%;height:100%;min-height:100vh}
.tv-detail .tv-detail-shade{height:100%;background:linear-gradient(90deg,rgba(7,9,13,.8),rgba(7,9,13,.4) 48%,rgba(7,9,13,.08) 80%),linear-gradient(0deg,rgba(7,9,13,.3),transparent 55%)}
.tv-series-browser{background:transparent}.tv-episode-card{background:rgba(15,19,26,.65)}.tv-episode-card.selected{background:rgba(35,42,52,.7)}
.tv-search-panel{grid-template-columns:clamp(300px,27vw,410px) minmax(0,1fr)}
.tv-search-left{padding:24px 24px;overflow:auto}.tv-search-left h1{font-size:30px;margin:8px 0 12px}
.tv-search-input-wrap{gap:8px;padding:0 8px}.tv-search-input-wrap input{min-width:0;width:0;font-size:18px}
.tv-search-keyboard{gap:6px}.tv-search-key{height:44px;font-size:18px}
.tv-search-results{gap:20px;padding:6px}.tv-search-card{position:relative;min-width:0}
.tv-search-card:focus{outline:3px solid #fff;outline-offset:3px;box-shadow:none}
.tv-search-card:focus:after{content:'';position:absolute;inset:0;border:3px solid #fff;border-radius:7px;pointer-events:none}
.tv-search-card strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv-search-suggestions button:focus{outline:2px solid white;outline-offset:-2px;background:#272e39}

.tv-next-episode{bottom:2vh}.tv-search-card{scroll-margin:12px}.tv-search-results-wrap{scroll-padding:12px}

/* Application keyboard, independent of catalog and player. */
.tv-app-keyboard{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.72)}
.tv-keyboard-box{width:420px;max-height:94vh;overflow:auto;background:#151a23;border:1px solid #414956;border-radius:16px;padding:22px;box-shadow:0 16px 60px #000}
.tv-keyboard-box h2{font-size:24px;margin:0 0 14px;color:#fff}.tv-keyboard-value{height:46px;border:1px solid #566070;border-radius:6px;padding:10px;color:white;overflow:hidden;white-space:nowrap;text-align:right;margin-bottom:16px;font-size:22px}
.tv-keyboard-row{display:flex;gap:8px;margin:8px 0}.tv-keyboard-row button{flex:1;min-width:0;height:44px;border:0;border-radius:6px;background:#2b3341;color:white;font-size:16px;padding:2px}
#tvKeyboardKeys.numeric{max-width:264px;margin:auto}#tvKeyboardKeys.numeric button{height:58px;font-size:23px}#tvKeyboardKeys.numeric button:last-child[aria-label="Listo"]{font-size:18px}
.tv-keyboard-row button:focus,#tvKeyboardClose:focus{outline:3px solid white;outline-offset:2px;background:#fff;color:#111}


#tvKeyboardStatus{color:#fff;font-size:15px;min-height:18px;margin:8px 0;text-align:center}

/* 230: full descriptive metadata and balanced episode tones. */
.tv-inline-logo{width:110px;height:auto;vertical-align:middle;display:inline-block}
.tv-detail-copy{width:min(1120px,85vw);max-width:none}.tv-detail.is-movie{height:auto;min-height:100vh;overflow:visible;padding-bottom:45px}.tv-detail.is-movie .tv-detail-copy{padding-top:15vh}
.tv-detail #tvDetailDescription{display:block;-webkit-line-clamp:unset;max-width:none;overflow:visible;white-space:pre-line;overflow-wrap:anywhere}
#tvDetailText:focus{outline:2px solid rgba(255,255,255,.8);outline-offset:8px;border-radius:4px}#tvDetailMetadata{display:grid;grid-template-columns:140px 1fr;gap:8px 16px;font-size:17px;line-height:1.5;color:#eee}#tvDetailMetadata dt{font-weight:bold}#tvDetailMetadata dd{margin:0;overflow-wrap:anywhere}
.tv-stars{font-size:28px}.tv-rating-score{font-size:22px}
.tv-episode-card:nth-child(3n+1),.tv-episode-card.selected:nth-child(3n+1){background:rgba(35,39,45,.55)}.tv-episode-card:nth-child(3n+2),.tv-episode-card.selected:nth-child(3n+2){background:rgba(61,65,71,.55)}.tv-episode-card:nth-child(3n),.tv-episode-card.selected:nth-child(3n){background:rgba(84,88,94,.55)}
.tv-player.is-preparing::after{content:'';width:60px;height:60px;box-sizing:border-box;border:4px solid rgba(255,255,255,.2);border-top-color:#fff;border-right-color:#fff;border-radius:50%;top:calc(50% - 30px);left:calc(50% - 30px);bottom:auto;padding:0;background:transparent;transform:none;animation:tv-spinner .85s linear infinite;z-index:20}
@keyframes tv-spinner{to{transform:rotate(360deg)}}
#tvPlayerAudio:before,#tvPlayerSubtitles:before{content:'';display:inline-block;vertical-align:middle;width:24px;height:24px;margin-right:9px;background:currentColor;mask:center/contain no-repeat; -webkit-mask:center/contain no-repeat}
#tvPlayerAudio:before{-webkit-mask-image:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Ccircle cx="7" cy="6" r="4"/%3E%3Cpath d="M0 23v-5c0-5 14-5 14 0v5zM14 7h5v2h-5zm0-4 5-3 1 2-5 3zm0 8 6 3-1 2-6-3z"/%3E%3C/svg%3E')}
#tvPlayerSubtitles:before{-webkit-mask-image:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath fill-rule="evenodd" d="M2 3h20v18H2zm2 2v14h16V5zm2 6h5v2H6zm7 0h5v2h-5zm-7 4h12v2H6z"/%3E%3C/svg%3E')}

.tv-player-options{max-width:650px}#tvPlayerAspect{min-width:110px}#tvPlayerAspect:before{content:'▭';font-size:24px;margin-right:8px;vertical-align:middle}

#tvDetailText{max-height:40vh;overflow:auto;padding:4px;scrollbar-width:none}#tvDetailText::-webkit-scrollbar{display:none}.tv-player-options button{max-width:210px}

/* 231: wider recommendation copy with a reserved play action. */
.tv-hero-content{width:62%;max-width:1120px;top:20px;bottom:48px;transform:none;display:flex;flex-direction:column;align-items:flex-start}
.tv-hero h1{font-size:44px;line-height:1.08;margin:8px 0;flex-shrink:0;max-width:100%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.tv-hero #tvHeroMeta{font-size:16px;margin:5px 0;flex-shrink:0}.tv-hero .tv-rating{margin:5px 0;flex-shrink:0}
.tv-hero #tvHeroDescription{font-size:17px;line-height:1.4;max-width:none;width:100%;margin:8px 0 12px;min-height:0;flex:0 1 auto;-webkit-line-clamp:5}
#tvHeroOpen{flex-shrink:0;margin-top:auto}
@media(max-height:760px){.tv-hero-content{top:14px;bottom:40px;width:66%}.tv-hero h1{font-size:34px;margin:6px 0}.tv-hero #tvHeroDescription{font-size:16px;line-height:1.3;margin:6px 0 8px;-webkit-line-clamp:4}.tv-hero #tvHeroMeta{font-size:15px;margin:3px 0}.tv-hero .tv-rating{margin:3px 0}}

/* 231: matching vector voice and screen controls. */
#tvPlayerAudio:before{-webkit-mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2021v-3.5C1.7%2016%201%2014%201%2011.5A7.5%207.5%200%200%201%208.5%204c3.4%200%205.5%202.3%205.5%205l2%203h-3v2h2v2h-3v5%22%2F%3E%3Cpath%20d%3D%22M19%2010c1.3%201.1%201.3%202.9%200%204m3-7c2.7%202.9%202.7%207.1%200%2010%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%2210.5%22%20cy%3D%229%22%20r%3D%22.9%22%2F%3E%3C%2Fsvg%3E');mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2021v-3.5C1.7%2016%201%2014%201%2011.5A7.5%207.5%200%200%201%208.5%204c3.4%200%205.5%202.3%205.5%205l2%203h-3v2h2v2h-3v5%22%2F%3E%3Cpath%20d%3D%22M19%2010c1.3%201.1%201.3%202.9%200%204m3-7c2.7%202.9%202.7%207.1%200%2010%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%2210.5%22%20cy%3D%229%22%20r%3D%22.9%22%2F%3E%3C%2Fsvg%3E')}
#tvPlayerAspect:before{content:"";display:inline-block;width:24px;height:24px;vertical-align:middle;margin-right:9px;background:currentColor;-webkit-mask:center/contain no-repeat;mask:center/contain no-repeat;-webkit-mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%222%22%20y%3D%224%22%20width%3D%2220%22%20height%3D%2214%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M9%2021h6m-3-3v3M5%209V7h3m11%206v2h-3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E');mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%222%22%20y%3D%224%22%20width%3D%2220%22%20height%3D%2214%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M9%2021h6m-3-3v3M5%209V7h3m11%206v2h-3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E')}

.tv-player-options button:disabled{opacity:.38;cursor:default;box-shadow:none;outline:none}

/* 233: readable half-screen copy and consistent branding. */
.tv-branded-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.tv-branded-heading img{width:140px;height:auto}
.tv-stars{font-size:23px}.tv-rating-score{font-size:20px}
.tv-hero-content{width:calc(50% - var(--page-x));max-width:none}.tv-hero #tvHeroDescription{font-size:20px;line-height:1.35}
.tv-detail-copy{width:50%;max-width:none;padding-right:0}.tv-detail #tvDetailDescription{font-size:20px;line-height:1.45}
@media(max-height:760px){.tv-hero-content{width:calc(50% - var(--page-x))}.tv-hero #tvHeroDescription{font-size:18px;line-height:1.3}.tv-detail #tvDetailDescription{font-size:19px}}

#tvDetailMetadata{display:block;margin:10px 0;font-size:18px;line-height:1.5}.tv-metadata-line{margin:5px 0}#tvDetailMetadata dt,#tvDetailMetadata dd{display:inline;margin:0}#tvDetailMetadata dt{margin-right:.4em;color:#fff}#tvDetailMetadata dd{color:#d3d7de}

#tvDetailText{max-height:none;overflow:visible;padding:0}

#tvPlayerAudio:before{-webkit-mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M1.4%2011C.2%206.3%203.2%202%207.5%202c3.2%200%205.5%201.6%206.1%204.4-2.8.5-5-.2-6.6-1.5C7%207.5%205.6%209%203.2%209.5V12z%22%2F%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2021v-3.5C1.7%2016%201%2014%201%2011.5A7.5%207.5%200%200%201%208.5%204c3.4%200%205.5%202.3%205.5%205l2%203h-3v2h2v2h-3v5M19%2010c1.3%201.1%201.3%202.9%200%204m2-7c2.7%202.9%202.7%207.1%200%2010%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%2210.5%22%20cy%3D%229%22%20r%3D%22.9%22%2F%3E%3C%2Fsvg%3E');mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M1.4%2011C.2%206.3%203.2%202%207.5%202c3.2%200%205.5%201.6%206.1%204.4-2.8.5-5-.2-6.6-1.5C7%207.5%205.6%209%203.2%209.5V12z%22%2F%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2021v-3.5C1.7%2016%201%2014%201%2011.5A7.5%207.5%200%200%201%208.5%204c3.4%200%205.5%202.3%205.5%205l2%203h-3v2h2v2h-3v5M19%2010c1.3%201.1%201.3%202.9%200%204m2-7c2.7%202.9%202.7%207.1%200%2010%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%2210.5%22%20cy%3D%229%22%20r%3D%22.9%22%2F%3E%3C%2Fsvg%3E')}

/* 234: fit the complete frame inside the 4:3 native surface. */
.tv-player[data-aspect='4:3'] #avplaySurface{left:12.5%;right:auto;width:75%;height:100%}

/* 235: compact recommendation facts and local welcome artwork. */
.tv-hero h1{font-size:36px;line-height:1.1;margin:7px 0}.tv-hero-facts{display:flex;align-items:center;gap:16px;flex-wrap:wrap;flex-shrink:0;max-width:100%}.tv-hero .tv-hero-facts #tvHeroMeta,.tv-hero .tv-hero-facts #tvHeroRating{margin:4px 0;font-size:16px;line-height:1.3}.tv-hero-facts .tv-rating-score{font-size:16px}.tv-hero-facts .tv-stars{font-size:18px}.tv-hero-facts .tv-rating{gap:7px}.tv-hero #tvHeroDescription{-webkit-line-clamp:6}
.tv-login-brand{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-bottom:12px}.tv-login-brand img{width:165px;height:auto}.tv-form .tv-login-brand h1{font-size:26px;margin:0}
.tv-welcome{position:fixed;top:var(--header-h);bottom:0;left:0;right:0;background:#061128 url('../assets/welcome-space.png') center/cover no-repeat;display:flex;align-items:flex-start;justify-content:center;padding-top:64vh}.tv-welcome[hidden]{display:none}.tv-welcome .tv-primary{font-size:20px}
@media(max-height:760px){.tv-hero h1{font-size:28px}.tv-hero .tv-hero-facts #tvHeroMeta,.tv-hero .tv-hero-facts #tvHeroRating,.tv-hero-facts .tv-rating-score{font-size:15px}.tv-hero-facts .tv-stars{font-size:17px}.tv-hero-facts{gap:12px}.tv-form .tv-login-brand h1{font-size:24px}.tv-hero #tvHeroDescription{-webkit-line-clamp:5}}

.tv-hero #tvHeroDescription{flex-shrink:0}

#tvPlayerAudio:before{-webkit-mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M3%2011C1%206%203.5%202%207.5%202c1.8%200%203%20.8%204.3.5C13.3%202.2%2014%201%2014%201s1.5%204-1.5%205.4c-2.4%201.1-4.2-.3-5.7-.2C5.3%206.3%204.7%208.3%205%2010z%22%2F%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12.5%206.5v2l2.5%203H12.5v1.8H14v2.2h-3V21H4v-5c-1.5-1.2-2-3-1.5-5M18%2010c1.4%201.1%201.4%203%200%204m3-7c2.6%202.8%202.6%207.2%200%2010%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%229.5%22%20cy%3D%229%22%20r%3D%22.8%22%2F%3E%3C%2Fsvg%3E');mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M3%2011C1%206%203.5%202%207.5%202c1.8%200%203%20.8%204.3.5C13.3%202.2%2014%201%2014%201s1.5%204-1.5%205.4c-2.4%201.1-4.2-.3-5.7-.2C5.3%206.3%204.7%208.3%205%2010z%22%2F%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12.5%206.5v2l2.5%203H12.5v1.8H14v2.2h-3V21H4v-5c-1.5-1.2-2-3-1.5-5M18%2010c1.4%201.1%201.4%203%200%204m3-7c2.6%202.8%202.6%207.2%200%2010%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%229.5%22%20cy%3D%229%22%20r%3D%22.8%22%2F%3E%3C%2Fsvg%3E')}
#tvPlayerAudio,#tvPlayerSubtitles{width:180px;min-width:180px;max-width:180px;flex:0 0 180px;box-sizing:border-box;font-size:17px;text-align:center}

/* Shared translucent playback chrome; focus changes only the outline. */
.tv-player{--control-surface:rgba(10,12,16,.78)}
.tv-player-controls,.tv-player-options button,.tv-player-options button:focus{background:var(--control-surface);color:#fff}
.tv-player-options button:focus{outline:3px solid #fff;outline-offset:3px}

/* 236: standalone first-run welcome, without catalog navigation. */
body.is-welcome .tv-header{display:none}body.is-welcome .tv-welcome{top:0;padding-top:68vh}

/* 237: quieter branding and more breathing room in recommendations. */
.tv-hero-content{top:28px}.tv-hero .tv-kicker{font-size:12px;line-height:1.4;margin-bottom:5px}.tv-hero .tv-inline-logo{width:100px}.tv-hero h1{line-height:1.16;margin:8px 0 10px}.tv-hero #tvHeroDescription{line-height:1.45}
@media(max-height:760px){.tv-hero-content{top:22px}.tv-hero #tvHeroDescription{line-height:1.4}}

/* 238: equal emphasis for the recommendation metadata. */
.tv-hero-facts .tv-rating-score{font-weight:700}

/* 240: one entry artwork, no legacy logo splash. */
.tv-boot{background:#061128 url('../assets/welcome-space.png') center/cover no-repeat;justify-content:flex-start;padding-top:68vh}.tv-boot span{padding:12px 20px;border-radius:8px;background:rgba(6,17,40,.78)}

/* 241: welcome frame is independent of navbar and focus layout. */
body.is-welcome #tvWelcome,#tvWelcome{top:0;inset:0;padding:0;background:#061128;display:block}#tvWelcome[hidden]{display:none}

/* 243: stable width across Original, 16:9 and 4:3. */
#tvPlayerAspect{width:150px;min-width:150px;max-width:150px;flex:0 0 150px;box-sizing:border-box;font-size:17px;text-align:center}

/* 245: next episode occupies its own column beside the timeline. */
.tv-player-controls.has-next{grid-template-columns:65px minmax(100px,1fr) 65px 205px;gap:12px}
.tv-player-controls .tv-next-episode{position:static;width:205px;margin:0;padding:0;align-self:center}
#tvNextEpisodePlay{width:205px;box-sizing:border-box;font-size:17px;padding:12px!important;background:rgba(10,12,16,.78)!important;color:white!important}
#tvPlayerNext{width:205px;min-width:205px;flex:0 0 205px;font-size:17px}.tv-player-options{max-width:none}

/* 248: center the visible options as one group below the timeline. */
.tv-player-options{left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:none;justify-content:center}

/* 249: local viewing progress, quiet tracks and consistent focus. */
.tv-episode-card{height:132px;position:relative}.tv-episode-copy{padding:14px 16px 6px}.tv-episode-progress{margin:4px 16px 12px}.tv-progress-track{display:block;height:5px;border-radius:8px;background:rgba(255,255,255,.16);overflow:hidden}.tv-progress-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#66bfff,#d5edff)}.tv-episode-progress small{display:block;margin-top:7px;color:#d7e4ef;font-size:12px;line-height:1.2}.tv-episode-progress.is-complete .tv-progress-track i{background:#93d5f5}.tv-episode-progress.is-complete small{color:#c8ebff}
.tv-detail-actions{display:flex;gap:16px;align-items:center;flex-wrap:wrap}#tvRestart{margin-top:12px;padding:14px 20px;border:1px solid rgba(255,255,255,.35);border-radius:6px;background:rgba(20,25,34,.7);color:#fff;font-size:17px}#tvRestart:focus{outline:3px solid white;outline-offset:3px}
.tv-restart-confirm{position:fixed;inset:0;z-index:120;background:rgba(0,0,0,.8);display:grid;place-items:center}.tv-restart-confirm>div{width:520px;padding:30px;background:#171d28;border:1px solid #485362;border-radius:16px}.tv-restart-confirm h2{font-size:26px;margin:0 0 14px}.tv-restart-confirm p{font-size:18px;color:#c7d2de}.tv-restart-confirm button{background:#303b4a;color:#fff;border:0;border-radius:6px;padding:12px 22px;margin:10px 12px 0 0}.tv-restart-confirm button:focus{outline:3px solid white;outline-offset:3px}

/* Keyboard dismiss action: separate from Listo. */
.tv-keyboard-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.tv-keyboard-heading h2{margin:0;flex:1}.tv-keyboard-close{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:0 0 44px;padding:10px;border:1px solid #566070;border-radius:7px;background:rgba(43,51,65,.65);color:#fff}.tv-keyboard-close svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round}.tv-keyboard-close:focus,#tvKeyboardClose:focus{outline:3px solid #fff;outline-offset:2px;background:rgba(43,51,65,.9);color:#fff;border-radius:7px}
