/* CP9 extends the approved red detail / dark Series and Live compositions. */
:root{--surface:#070c10;--card:#111b23;--ink:#f5f6f8;--muted:#a8b3bf;--line:#28333d;--red:#ff1744;--header:linear-gradient(180deg,#111c29f5,#0a111be8 68%,#070c1000)}
html[data-theme=light]{color-scheme:light;--surface:#f3f5f8;--card:#fff;--ink:#17212c;--muted:#526273;--line:#d3dbe4;--header:linear-gradient(180deg,#e5eaf4fc,#f3f5f8ef 68%,#f3f5f800)}
html,body,#app{background:var(--surface);color:var(--ink)}body{background:radial-gradient(ellipse at top,var(--card),var(--surface) 50%)}
#header,body:has(.tv-view) #header{height:calc(64px + env(safe-area-inset-top));padding:calc(6px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left));display:grid;grid-template-columns:44px minmax(0,1fr) 44px;background:var(--header);z-index:10}
.header-brand{justify-self:center;display:grid;place-items:center}.header-brand .brand-logo{height:46px;max-width:90px;object-fit:contain}.icon-button{color:var(--ink);width:44px;height:44px}.avatar-button{border:1px solid var(--line);border-radius:50%;width:40px;height:40px;background:linear-gradient(145deg,#aa1740,#e92a48);font-weight:700;color:white;font-size:19px}
#nav{background:linear-gradient(var(--card),var(--surface));border-color:var(--line)}#nav a{color:var(--muted)}#nav a.active{color:var(--red)}
.catalog-hero h2,.catalog-hero .hero-copy h2,.home-hero h1{color:#fff;text-transform:none;font-style:normal;font-weight:700;letter-spacing:-.5px;text-shadow:0 2px 18px #0009;text-wrap:balance}
.catalog-hero>img{transform:none}.hero{background:#151d27}.hero-copy{color:#fff}.hero::after{background:linear-gradient(90deg,#050b12da,#050b1240 70%),linear-gradient(0deg,#050b129e,transparent 60%)}
.catalog-hero::after{background:linear-gradient(90deg,#040a1230,#040a12b8 70%)}.hero-copy h2{overflow-wrap:anywhere}
.section-head h2 small,.list-title small{color:var(--muted);font-size:.65em;font-weight:400}.section-head select,select,input{background:var(--card);color:var(--ink);border-color:var(--line)}
.list-title{padding:0 17px;margin:22px 0 16px;font-size:24px}.tabs,.series-tabs,.channel-tabs{background:var(--surface);border-color:var(--line)}.tabs button,.channel-tabs button{color:var(--muted)}.tabs button.active,.channel-tabs button.active{color:var(--ink)}
.page-block{contain:layout style;overflow-anchor:none}.page-sentinel{min-height:60px;display:flex;align-items:center;justify-content:center;gap:12px;padding:16px}.list-end{font-size:13px;color:var(--muted)}.movie-title,.series-card strong{color:var(--ink)}.movie-card .year,.series-card span{color:var(--muted)}.movie-card progress{width:100%;height:4px;accent-color:var(--red)}.history-date{display:block;color:var(--muted);font-size:11px;margin-top:4px}.movie-card .subtle-button{font-size:11px;padding:8px 0;min-height:36px}
.brand-loader{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px;color:var(--muted);font-size:14px}.loader-ring{width:72px;height:72px;position:relative;display:grid;place-items:center}.loader-ring::before{position:absolute;content:'';inset:0;border:3px solid #ff174426;border-top-color:var(--red);border-right-color:var(--red);border-radius:50%;animation:tv-loading .85s linear infinite}.loader-ring img{width:50px;height:50px;object-fit:contain}.brand-loader.small{flex-direction:row;padding:10px;gap:10px}.brand-loader.small .loader-ring{width:36px;height:36px}.brand-loader.small img{width:25px;height:25px}
#loading-screen{background:var(--surface);color:var(--ink)}#loading-screen .loader-ring{width:126px;height:126px}#loading-screen .loader-ring img{width:94px;height:94px}html[data-theme=light] .player-view #playback-status{color:#354558}
@keyframes tv-loading{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.loader-ring::before{animation:none;border-style:dashed}*{scroll-behavior:auto!important}}
.home-hero{height:clamp(290px,44vw,460px)}.home-hero .hero-copy{top:auto;bottom:35px;left:clamp(20px,4vw,48px);max-width:68%}.home-hero h1{font-size:clamp(26px,5vw,50px);line-height:1.08;margin:12px 0 22px;overflow-wrap:anywhere}.eyebrow{letter-spacing:2px;text-transform:uppercase;font-size:12px}.home-shortcuts{display:flex;gap:8px;padding:18px;flex-wrap:wrap}.home-section{padding-bottom:14px}.home-section .section-head{padding:0 18px}.home-section h2{font-size:20px}.text-link{font-size:13px;color:var(--muted);min-height:44px;display:flex;align-items:center}.home-rail{display:flex;gap:14px;overflow-x:auto;overscroll-behavior-x:contain;padding:0 18px 16px;scrollbar-width:thin}.home-rail>.movie-card{flex:0 0 145px}.home-rail>.brand-loader{flex:1}.home-rail .poster{aspect-ratio:2/3}.home-rail .movie-title{font-size:12px}
.account-view{max-width:720px;margin:auto}.profile-heading{display:flex;gap:16px;align-items:center;margin:15px 0 25px;overflow-wrap:anywhere}.profile-heading .avatar-button{width:64px;height:64px;flex:0 0 64px;font-size:28px}.account-menu{display:grid;gap:1px;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--line)}.account-link{background:var(--card);padding:18px 20px;min-height:56px}.account-link::after{content:'›';float:right;color:var(--muted)}.account-data{display:grid;grid-template-columns:1fr 1fr;gap:18px 24px;padding:24px 0}.account-data dt{color:var(--muted)}.account-data dd{margin:0;text-align:right;overflow-wrap:anywhere}.muted{color:var(--muted);font-size:13px;line-height:1.5}.theme-options{display:flex;gap:12px}.theme-options button[aria-pressed=true]{border-color:var(--red);box-shadow:inset 0 0 0 1px var(--red)}.control,.logout-button{background:var(--card);border:1px solid var(--line);color:var(--ink);border-radius:8px;padding:10px 15px;min-height:44px}.logout-button{margin-top:28px;color:var(--red);width:100%}.remember-device{display:flex!important;flex-direction:row!important;align-items:center;gap:10px;font-size:14px}.remember-device input{width:20px;height:20px;accent-color:var(--red)}
#search-dialog{background:var(--surface);color:var(--ink);border-color:var(--line);width:min(850px,94vw);max-height:85dvh;overflow:auto;border-radius:16px;padding:20px}#search-dialog::backdrop{background:#02060bc9}#search-dialog form{position:sticky;top:-20px;background:var(--surface);z-index:2;padding:15px 0;display:flex;gap:12px;align-items:end}#search-dialog label{flex:1;min-width:0}#search-dialog input{width:100%;margin-top:8px}#search-dialog button{min-height:44px}#search-results .search-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.search-result{display:flex;flex-direction:column;gap:6px;min-width:0}.search-result img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:8px}.search-result strong{font-size:14px;overflow-wrap:anywhere}.search-result small{color:var(--muted);font-size:12px}
.tv-view{background:var(--surface)}.channel-list{overflow-y:auto;overscroll-behavior:contain;min-height:120px}.channel-row{width:100%;color:var(--ink);background:transparent;border-color:var(--line)}.channel-name{display:flex;flex-direction:column;gap:5px}.channel-now{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.channel-number{color:var(--muted)}.channel-info h1{color:var(--ink)}.channel-info p{color:var(--muted)}.epg-selected{padding:0 18px 10px}.epg-selected h3{font-size:12px;text-transform:uppercase;letter-spacing:1px;color:var(--red);margin:5px 0}.epg-selected p{font-size:12px;line-height:1.5;margin:3px 0}.epg-selected time{color:var(--muted);margin-right:8px}.epg-selected:empty{display:none}
.player-controls{display:flex;flex-wrap:wrap;gap:8px;background:#0a0f17;color:#fff;padding:12px}.player-controls button{border:1px solid #364150;border-radius:7px;background:#15202c;min-height:44px;padding:8px 12px}.player-view{padding:16px}.player-view h2{font-size:20px}.player-view video{border-radius:12px}.unavailable{opacity:.7}
html[data-theme=light] .detail,html[data-theme=light] .series-detail,html[data-theme=light] .series-detail #series-panel{background:var(--surface)}html[data-theme=light] .detail h2,html[data-theme=light] .synopsis,html[data-theme=light] .episode-text strong{color:var(--ink)}html[data-theme=light] .detail .meta,html[data-theme=light] .episode-text>span{color:var(--muted)}html[data-theme=light] .detail-actions .round-action,html[data-theme=light] .series-main-actions .round-action{color:var(--ink)}html[data-theme=light] .circle{background:var(--card);border-color:var(--line)}html[data-theme=light] .series-art,html[data-theme=light] .hero,html[data-theme=light] .category-card{color:#fff}html[data-theme=light] .tv-controls{color:#fff}
@media(max-width:480px){.home-hero .hero-copy{max-width:88%;bottom:26px}.home-rail>.movie-card{flex-basis:125px}.account-data{grid-template-columns:1fr;gap:8px}.account-data dd{text-align:left;margin-bottom:12px}#search-results .search-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-hero .hero-copy{width:62%!important;max-width:70%}.section-head{padding:12px}.channel-row{gap:12px}.profile-heading h1{font-size:23px}.list-title{font-size:21px}}
@media(min-width:769px){.home-rail>.movie-card{flex-basis:165px}#search-results .search-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.cp9-live{height:calc(100dvh - 148px - env(safe-area-inset-top) - env(safe-area-inset-bottom));display:flex;flex-direction:column;min-height:370px}.cp9-live .tv-frame{flex:0 0 auto;aspect-ratio:auto;height:min(35dvh,400px);min-height:100px;background:#000}.cp9-live .tv-frame>div:first-child{height:100%}.cp9-live .tv-frame video,.cp9-live .tv-frame iframe{height:100%!important;aspect-ratio:auto!important;object-fit:contain}.cp9-live .tv-controls,.cp9-live .channel-info,.cp9-live .epg-selected,.cp9-live .channel-tabs{flex:0 0 auto}.cp9-live .channel-info{min-height:56px;padding:8px 18px;gap:12px}.cp9-live .channel-info img{width:35px;height:35px}.cp9-live .channel-info h1{font-size:16px;margin-bottom:3px}.cp9-live .channel-info p{font-size:11px}.cp9-live .channel-total{font-size:11px;color:var(--muted);margin:4px 14px}.cp9-live .channel-list{flex:1 1 auto;min-height:85px;max-height:none}.cp9-live .page-sentinel{min-height:44px;padding:6px}.cp9-live .channel-page{display:block}.cp9-live .tv-controls #playback-status{overflow:hidden;max-width:40%;text-overflow:ellipsis}.cp9-live .epg-selected{max-height:105px;overflow:auto}.cp9-player-shell{position:relative;background:#000;line-height:0;border-radius:10px;overflow:hidden}.cp9-player-shell video{width:100%;display:block}.cp9-player-shell video[hidden]{display:none}.cinema-controls{position:absolute;bottom:0;left:0;right:0;display:flex;align-items:center;gap:5px;padding:22px 8px 8px;background:linear-gradient(transparent,#050b12e8);z-index:3;line-height:1.3;color:white;transition:opacity .15s}.cinema-controls button,.cinema-controls select{min-width:36px;min-height:40px;padding:7px;background:#111b27d9;border:1px solid #53607277;border-radius:7px;color:white;font-size:12px}.cinema-controls input{accent-color:#ff1744;height:32px;min-width:30px;max-width:none;flex:1;background:transparent;padding:0}.cinema-controls .player-volume{flex:0 1 60px;max-width:60px}.player-time{font-size:11px;white-space:nowrap}.cinema-controls select{max-width:100px}.cinema-controls [hidden]{display:none}.controls-hidden .cinema-controls{opacity:0;pointer-events:none}.controls-hidden:focus-within .cinema-controls{opacity:1;pointer-events:auto}.player-gesture{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);z-index:4;background:#ed123d;color:white;border:1px solid #fff6;border-radius:30px;padding:16px 24px;min-height:54px;font-size:15px;line-height:1.3;box-shadow:0 4px 24px #0008}.player-gesture[hidden]{display:none}.cp9-player-shell:fullscreen{border-radius:0;display:flex;align-items:center;width:100%;height:100%}.cp9-player-shell:fullscreen video,.cp9-player-shell:fullscreen iframe{width:100%;height:100%;object-fit:contain}
@media(max-width:480px){.cinema-controls{flex-wrap:wrap;padding-top:15px}.cinema-controls .player-volume{display:none}.cinema-controls select{max-width:80px}.player-time{font-size:10px}.cp9-live .tv-frame{height:min(25dvh,calc(100vw * .5625))}.cp9-live .epg-selected p{font-size:11px}.cp9-live .tv-controls{height:38px;min-height:38px}.cp9-live .channel-info{padding:5px 14px}.cp9-live .tv-controls input{max-width:60px}}
.cp9-live .cinema-controls{display:none}.cp9-live .tv-frame:fullscreen .cinema-controls{display:flex}.cp9-live .tv-frame:fullscreen{width:100%;height:100%;max-height:none}.cp9-live .tv-frame:fullscreen>div:first-child{width:100%}

/* R20: fixed video overlay; the official logo and surrounding TV layout remain unchanged. */
.player-reconnect{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:clamp(4px,1vw,14px);padding:12px 12px 65px;background:radial-gradient(ellipse at center,rgba(24,0,5,.68),rgba(0,0,0,.89));color:#fff;text-align:center;pointer-events:none;transition:opacity .2s ease}
.player-reconnect[hidden]{display:none}.player-reconnect strong{font-size:clamp(16px,2.6vw,36px);line-height:1.15}.player-reconnect b{color:#ff304b;font-size:clamp(13px,1.8vw,24px)}.player-reconnect p{color:#d2d3da;margin:0;font-size:clamp(11px,1.3vw,18px)}
.reconnect-arrows{width:clamp(42px,9vw,130px);height:auto;flex-shrink:0;fill:none;stroke:#ff183d;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 7px #f0194260);animation:reconnect-turn 2.3s linear infinite}
.player-reconnect button{pointer-events:auto;background:#e61937;color:white;border:1px solid #ff5370;border-radius:10px;padding:10px 22px;min-height:44px}.player-reconnect[data-phase=failed] .reconnect-arrows,.player-reconnect[data-phase=offline] .reconnect-arrows,.player-reconnect[data-phase=gesture] .reconnect-arrows{animation-play-state:paused}
.cp9-player-shell .cinema-controls{z-index:5}.cp9-player-shell .player-gesture{z-index:6}
@keyframes reconnect-turn{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.reconnect-arrows{animation:none}.player-reconnect{transition:none}}
@media(max-width:430px){.player-reconnect{padding-bottom:50px;gap:3px}.player-reconnect p{max-width:95%}.reconnect-arrows{width:48px}}

.player-reconnect{line-height:1.4}.cp9-live .player-reconnect{padding:12px}.player-reconnect[data-phase=failed] .reconnect-arrows{display:none}

.avatar-button svg{width:58%;height:58%;fill:currentColor}html[data-theme=light] .synopsis p,html[data-theme=light] .series-detail #series-panel p{color:var(--muted)}

/* Keep identity/navigation reachable while the document or the Live panel scrolls. */
#header,body:has(.tv-view) #header{position:sticky;top:0}
.movie-card,.series-card,.category-card{scroll-margin-top:calc(76px + env(safe-area-inset-top))}

/* CP9-R1: controls float over artwork; only each control has a local backdrop. */
:root{--bottom-bar:calc(64px + var(--safe-bottom));--top-controls:calc(60px + var(--safe-top))}
#app{position:relative}
#header,body:has(.tv-view) #header{height:var(--top-controls);padding:calc(6px + var(--safe-top)) 12px 10px;background:var(--surface)}
body:has(#view>.hero) #header,body:has(.series-art) #header,body:has(.cp9-live) #header{position:fixed;top:0;left:50%;right:auto;transform:translateX(-50%);width:min(calc(100% - var(--safe-left) - var(--safe-right)),1160px);background:transparent;pointer-events:none}
body:has(#view>.hero) #header>*,body:has(.series-art) #header>*,body:has(.cp9-live) #header>*{pointer-events:auto}
body:has(#view>.hero) #header .icon-button,body:has(.series-art) #header .icon-button,body:has(.cp9-live) #header .icon-button,body:has(#view>.hero) #header .avatar-button{color:#fff;background:#111722cf;border:1px solid #ffffff24;border-radius:50%;box-shadow:0 3px 12px #0004;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
@supports not ((backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px))){body:has(#view>.hero) #header .icon-button,body:has(.series-art) #header .icon-button,body:has(.cp9-live) #header .icon-button,body:has(#view>.hero) #header .avatar-button{background:#18202deb}}
.header-brand .brand-logo{height:42px;filter:drop-shadow(0 2px 5px #0009)}
#nav{height:var(--bottom-bar);padding:6px max(6px,var(--safe-right)) calc(6px + var(--safe-bottom)) max(6px,var(--safe-left));background:var(--surface);border-top:1px solid var(--line)}
#nav a{min-height:50px;justify-content:center;gap:3px}#nav a.active::after{display:none}#nav .icon{width:24px;height:24px}
#view{min-height:calc(100dvh - var(--top-controls));padding-bottom:calc(var(--bottom-bar) + 8px);scroll-margin-bottom:var(--bottom-bar)}
body:has(#view>.hero) #view,body:has(.series-art) #view{min-height:100dvh}
#view>.hero:not(.home-hero){height:calc(230px + var(--safe-top))}
#view>.hero:not(.home-hero) .hero-copy{top:calc(var(--top-controls) + 15px)}
.home-hero{height:clamp(340px,44vw,460px);min-height:calc(var(--top-controls) + 265px)}
.home-hero .hero-copy{top:calc(var(--top-controls) + 12px);bottom:24px;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start}
.home-hero h1{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;font-size:clamp(25px,5vw,48px);margin:10px 0 18px}
.home-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:16px 12px}
.home-shortcuts .control{display:flex;align-items:center;justify-content:center;text-align:center;background:linear-gradient(135deg,#ff493c,#f50845);border:1px solid #ff64704d;border-radius:14px;box-shadow:0 4px 14px #ed17442b;color:#fff;font-weight:700;min-height:48px;padding:10px 6px;font-size:14px;transition:transform .12s,filter .12s}
.home-shortcuts .control:active{transform:scale(.97);filter:brightness(.88)}.home-shortcuts .control:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
.channel-row.playing{color:#fff}.channel-row.playing .channel-now,.channel-row.playing .channel-number{color:#e0d6dd}
.cp9-live{height:calc(100dvh - var(--bottom-bar));min-height:0}.cp9-live .tv-frame{height:clamp(180px,35dvh,400px);min-height:0;border-radius:0}.cp9-live .tv-frame>div:first-child{border-radius:0}
body:has(.cp9-live) #view{min-height:100dvh;padding-bottom:var(--bottom-bar)}
.cp9-live .simulation-badge{top:auto;bottom:8px;right:10px;font-size:10px;pointer-events:none}
.cp9-live .channel-list{min-height:88px;padding-bottom:12px;scroll-padding-bottom:12px}.cp9-live .tv-controls{min-height:44px;height:44px}
.cp9-live .channel-info:empty{display:none}
.cp9-live .channel-tabs{min-height:44px}.cp9-live .channel-tabs button{min-height:44px}
.player-gesture{min-height:44px;font-size:14px;padding:10px 18px;background:#151d29e8;border-color:#ffffff66;box-shadow:0 3px 16px #0006}
.keyboard-open #view{padding-bottom:20px}.keyboard-open .cp9-live{height:auto}
@media(max-width:480px){.cp9-live .tv-frame{height:clamp(165px,25dvh,240px)}.cp9-live .epg-selected{max-height:90px}.home-shortcuts .control{font-size:13px}.home-hero .hero-copy{max-width:88%}}
/* On short landscape screens, let the document scroll instead of clipping EPG.
   Video stays sticky; the list still scrolls independently. */
@media(max-height:540px) and (orientation:landscape){.cp9-live{height:auto}.cp9-live .tv-frame{height:180px;position:sticky;top:0;z-index:4}.cp9-live .channel-list{height:45dvh;min-height:150px;flex:none}.cp9-live .epg-selected{max-height:90px}}
@media(prefers-reduced-motion:reduce){.home-shortcuts .control{transition:none}}
/* CP9-R2: controls share the video's document and reserve usable touch targets. */
.cp9-player-shell .cinema-controls{display:flex;flex-wrap:wrap;align-items:center;gap:3px;padding:5px 8px;z-index:12;background:linear-gradient(transparent,#05080be8 15%);color:#fff;max-height:85%;overflow:auto}
.cp9-player-shell .cinema-controls button,.cp9-player-shell .cinema-controls select{min-width:44px;min-height:44px;color:#fff;background:#151c24e8;border:1px solid #4a535f;border-radius:8px;font-size:14px;padding:4px 7px;touch-action:manipulation}
.cp9-player-shell .cinema-controls .player-seek{order:-1;flex:1 0 95%;height:44px;min-width:0;margin:0;accent-color:#ff1744;touch-action:pan-x}
.cp9-player-shell .cinema-controls .player-time{font-size:11px;flex:1;min-width:80px}
.cp9-player-shell .cinema-controls .player-volume{max-width:90px;min-width:40px;height:44px}
.cp9-player-shell .cinema-controls [hidden],.cp9-player-shell .player-reconnect[hidden],.cp9-player-shell .player-notice[hidden]{display:none!important}
.cp9-player-shell .player-notice{position:absolute;bottom:140px;left:10px;right:10px;z-index:13;margin:0;padding:6px 10px;border-radius:8px;background:#05080bea;color:#fff;font:13px/1.4 Arial;pointer-events:none}
.cp9-player-shell.frame-controls-owned>.cinema-controls,.cp9-player-shell.frame-controls-owned>.player-gesture,.cp9-player-shell.frame-controls-owned>.player-reconnect,.cp9-player-shell.frame-controls-owned>.player-notice{display:none!important}
.cp9-player-shell .player-reconnect{padding-bottom:85px;z-index:10;pointer-events:none}.cp9-player-shell .player-reconnect button{pointer-events:auto;min-height:44px}.cp9-player-shell .player-gesture{z-index:14;min-height:44px}
.cp9-player-shell:fullscreen{height:100%;width:100%;aspect-ratio:auto}.cp9-player-shell:fullscreen video{height:100%;width:100%;object-fit:contain}
body:has(.player-view) #header{position:fixed;top:0;left:50%;transform:translateX(-50%);width:min(100%,960px);background:transparent;border:0;z-index:20;padding-top:env(safe-area-inset-top);pointer-events:none}
body:has(.player-view) #header>*{pointer-events:auto}body:has(.player-view) #header button,body:has(.player-view) #header a{background:#101820c9;color:#fff;border:1px solid #ffffff2b;border-radius:50%;box-shadow:0 3px 12px #0005;backdrop-filter:blur(10px)}
body:has(.player-view) #header .icon{color:#fff}.player-view{padding-top:0}.player-view>h2{position:relative;margin:0;padding:calc(68px + env(safe-area-inset-top)) 0 12px;font-size:clamp(17px,4vw,23px)}
.detail-actions{display:flex;flex-wrap:wrap;align-items:stretch;gap:12px}.detail-actions .round-action{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;min-height:44px;border:1px solid var(--line);padding:8px 14px;border-radius:12px;background:var(--surface);color:var(--ink);text-decoration:none}.detail-actions .round-action .circle{width:24px;height:24px;border:0}.detail-actions .trailer-action{font-weight:600}
.synopsis{white-space:normal;overflow-wrap:anywhere}.synopsis p{white-space:pre-line}.synopsis button{min-height:44px}.series-detail>.synopsis{padding:4px 18px 14px}
@media(max-width:430px){.cp9-player-shell .cinema-controls{padding:3px;gap:2px}.cp9-player-shell .cinema-controls button{padding:3px;min-width:44px}.cp9-player-shell .cinema-controls .player-volume{display:none}.cp9-player-shell .player-reconnect{padding:12px 8px 96px}.cp9-player-shell .reconnect-arrows{width:38px;height:38px}.cp9-player-shell .player-reconnect strong{font-size:16px}.cp9-player-shell .player-reconnect b,.cp9-player-shell .player-reconnect p{font-size:12px;margin:2px}}

.player-view{display:flex;flex-direction:column;padding-top:env(safe-area-inset-top)}.player-view>.cp9-player-shell{order:0}.player-view>h2{order:1;padding:12px 0;margin:0}.player-view>p{order:2}
@media(orientation:landscape) and (max-height:500px){.player-view>.cp9-player-shell{height:calc(100dvh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom));aspect-ratio:auto}.player-view>.cp9-player-shell>.player-resource-frame{height:100%!important;aspect-ratio:auto!important}.player-view>.cp9-player-shell>video{height:100%;max-height:100%;object-fit:contain}}

/* R3: the movie sheet owns its transparent header; Series composition is retained. */
body:has(#view>.detail) #header{position:fixed;top:0;left:50%;width:min(calc(100% - var(--safe-left) - var(--safe-right)),1160px);background:transparent;border:0;pointer-events:none}
body:has(#view>.detail) #header>*{pointer-events:auto;background:#101820c9;color:#fff;border:1px solid #ffffff2b;border-radius:50%;box-shadow:0 3px 12px #0005;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
body:has(#view>.detail) .detail{padding-top:calc(var(--top-controls) + 12px)}
html[data-theme="light"] #view>.detail h2{color:#f8f8fa;text-shadow:0 1px 4px #000}
.cp9-live .quiet-playback-state{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* Combine vertical travel with existing horizontal centering. No layout writes on scroll. */
html body:not(.login-mode) #app>#header{position:fixed;top:0;left:50%;right:auto;width:min(calc(100% - var(--safe-left) - var(--safe-right)),1160px);transform:translate(-50%,calc(-100% * var(--chrome-progress,0)));will-change:transform}
html body:has(.player-view) #app>#header{width:min(100%,960px)}
body:not(.login-mode):not(:has(#view>.hero,.series-art,.cp9-live,.player-view,#view>.detail)) #view{padding-top:var(--top-controls)}
#nav{transform:translate(-50%,calc(100% * var(--chrome-progress,0)));will-change:transform}
.chrome-hidden #header,.chrome-hidden #header>*,.chrome-hidden #nav,.chrome-hidden #nav>*{pointer-events:none!important}

/* R4: one TV fullscreen owner, with its bottom toolbar inside standard fullscreen. */
.tv-stage{flex:0 0 auto;min-width:0;background:#000}
.tv-stage:fullscreen{display:flex;flex-direction:column;width:100%;height:100%;background:#000}
.cp9-live .tv-stage:fullscreen .tv-frame{flex:1 1 auto;height:auto;max-height:none;min-height:0;width:100%}
.tv-stage:fullscreen .tv-controls{flex:0 0 auto;padding-bottom:env(safe-area-inset-bottom);height:calc(48px + env(safe-area-inset-bottom));min-height:48px}
.tv-stage .tv-controls button{min-height:44px}
/* R4 account surfaces only; approved catalog, Series and movie compositions retained. */
.account-premium{max-width:840px;padding:18px max(16px,env(safe-area-inset-right)) 24px max(16px,env(safe-area-inset-left));outline:none}
.account-premium .account-hero{position:relative;margin:0 0 22px;padding:22px 20px;gap:18px;border:1px solid var(--line);border-radius:24px;background:radial-gradient(ellipse at 0 0,#a5153230,transparent 68%),linear-gradient(140deg,var(--card),var(--surface));box-shadow:0 12px 36px #00000016}
.account-premium .account-hero .avatar-button{width:66px;height:66px;flex-basis:66px;border-radius:20px;background:linear-gradient(145deg,#e43353,#811a38);border:1px solid #ff637c55;box-shadow:0 6px 20px #9c14392a;display:grid;place-items:center}
.account-identity{min-width:0}.account-eyebrow{margin:0 0 6px;color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.account-premium .profile-heading h1{margin:0 0 10px;font-size:clamp(22px,5.5vw,30px);line-height:1.16;overflow-wrap:anywhere;letter-spacing:-.5px}
.account-status{display:inline-flex;gap:6px;align-items:center;font-size:11px;font-weight:700;color:var(--muted);padding:5px 9px;border-radius:30px;background:var(--surface);border:1px solid var(--line)}
.account-status[data-state=active]::before{content:'';width:6px;height:6px;border-radius:50%;background:#47b787}
.account-premium .account-menu{display:grid;gap:10px;background:none;border:0;border-radius:0;overflow:visible;margin-bottom:20px}
.account-premium .account-link{display:flex;align-items:center;gap:14px;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--card);box-shadow:0 5px 18px #0000000d;transition:transform .15s,background .15s,border-color .15s}
.account-premium .account-link::after{content:none}.account-link-copy{display:grid;gap:5px;min-width:0;flex:1}.account-link-copy strong{font-size:15px;line-height:1.25}.account-link-copy small{font-size:12px;line-height:1.4;color:var(--muted)}
.account-link-icon{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;background:#ff174410;border:1px solid #ff174426;border-radius:13px;color:#ff6682}
.account-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.account-chevron{color:var(--muted);font-size:24px}
.account-premium .account-link:active{transform:scale(.985);border-color:var(--red)}
.account-card{border:1px solid var(--line);border-radius:20px;background:var(--card);box-shadow:0 8px 24px #00000012;padding:20px;margin:0 0 16px;min-width:0}
.account-card-heading{display:flex;align-items:center;gap:10px;margin-bottom:18px}.account-card-heading .account-icon{color:#ff6682;flex:0 0 22px}.account-card-heading h2{margin:0;font-size:16px;line-height:1.3;letter-spacing:-.2px}
.account-facts,.account-metrics{display:grid;gap:16px;margin:0}.account-fact{display:flex;flex-direction:column;gap:7px;min-width:0}.account-fact dt{font-size:12px;line-height:1.45;color:var(--muted)}.account-fact dd{margin:0;font-size:15px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.account-facts>.account-fact+.account-fact{border-top:1px solid var(--line);padding-top:16px}.account-fact-featured dd{font-size:18px;letter-spacing:-.2px}
.account-metrics{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.account-metrics .account-fact{padding:16px 12px;border-radius:14px;border:1px solid var(--line);background:var(--surface)}.account-metrics dd{order:-1;font-size:30px;line-height:1.1;letter-spacing:-1px}
.account-caption{margin:15px 0 0;color:var(--muted);font-size:11px;line-height:1.6;overflow-wrap:anywhere}.account-help{padding:16px 18px;border:1px solid var(--line);border-radius:16px;margin:0 0 16px;background:var(--card)}.account-help summary{font-size:13px;font-weight:600;cursor:pointer;min-height:22px}.account-help p{color:var(--muted);font-size:12px;line-height:1.6}
.account-premium .logout-button{margin-top:10px;border-radius:16px;min-height:48px;color:#ff6682;background:transparent;font-weight:600}
.account-premium .theme-options{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.account-premium .theme-choice{display:grid;text-align:left;gap:8px;padding:12px;border-radius:15px;min-width:0}.theme-choice small{color:var(--muted);font-size:11px;line-height:1.4}.theme-preview{position:relative;height:72px;display:block;border-radius:8px;background:#0a111a;border:1px solid #55617233;overflow:hidden}.theme-preview::before{content:'';position:absolute;top:12px;left:10px;width:50%;height:7px;border-radius:5px;background:#f0f5f8}.theme-preview span{position:absolute;left:10px;right:10px;top:29px;bottom:10px;background:linear-gradient(120deg,#b62340,#421b37);border-radius:5px}.theme-choice[data-theme=light] .theme-preview{background:#eef1f5}.theme-choice[data-theme=light] .theme-preview::before{background:#253445}
html[data-theme=light] .account-link-icon,html[data-theme=light] .account-card-heading .account-icon,html[data-theme=light] .account-premium .logout-button{color:#b91f40}
.account-premium .account-caption{color:var(--muted);font-size:11px;line-height:1.6}
.account-premium .account-eyebrow{color:var(--muted);font-size:11px;line-height:1.4}
.account-premium .muted{color:var(--muted);font-size:13px;line-height:1.5}
.account-fact[data-field=expires] dd,.account-fact[data-field=remembered_until] dd{text-wrap:balance}
@media(min-width:700px){.account-premium .account-menu{grid-template-columns:1fr 1fr}.account-premium .account-hero{padding:28px}.account-card{padding:24px}}
@media(max-width:350px){.account-premium{padding-left:12px;padding-right:12px}.account-premium .account-hero{padding:18px 14px;gap:12px}.account-card{padding:16px}.account-premium .account-hero .avatar-button{width:54px;height:54px;flex-basis:54px}.account-metrics{gap:8px}.account-metrics .account-fact{padding:12px 9px}}
@media(prefers-reduced-motion:reduce){.account-premium .account-link{transition:none}.account-premium .account-link:active{transform:none}}

/* Update announcement only: account palette, native modal and existing activation. */
#update-notice{display:contents}
#update-notice .update-dialog{position:fixed;inset:0;margin:auto;width:min(420px,calc(100% - 32px));max-height:calc(100% - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;padding:32px 28px 20px;border:1px solid #ff45683d;border-radius:28px;color:var(--ink,#f8f8fa);background:radial-gradient(ellipse at 50% 0,#ba1a3930,transparent 62%),linear-gradient(150deg,var(--card,#141c26),var(--surface,#0b1118));box-shadow:0 24px 80px #0008;text-align:center}
#update-notice .update-dialog::backdrop{background:#03070bc9;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#update-notice .update-dialog[open]{animation:update-reveal .2s ease-out}
#update-notice .update-close{position:absolute;top:10px;right:10px;display:grid;place-items:center;width:44px;height:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted,#a7b2c0);font-size:27px;line-height:1}
.update-brand{display:grid;place-items:center;width:108px;height:108px;margin:0 auto 20px;border:1px solid #ff45682e;border-radius:28px;background:linear-gradient(145deg,#e4335315,#811a3818);box-shadow:0 8px 28px #a31b3020}
.update-brand img{width:84px;height:84px;object-fit:contain}
#update-notice .update-eyebrow{margin:0 0 12px;color:#ff718d;font-size:11px;line-height:1.4;font-weight:700;letter-spacing:.16em}
#update-notice h2{max-width:310px;margin:0 auto 14px;font-size:clamp(24px,6vw,29px);line-height:1.13;font-weight:750;letter-spacing:-.7px;text-wrap:balance}
#update-notice .update-description{max-width:290px;margin:0 auto 24px;font-size:14px;line-height:1.6;color:var(--muted,#a7b2c0)}
#update-notice .update-feedback{margin:0 0 18px;padding:12px;border-radius:12px;background:#ff174412;color:var(--ink,#f8f8fa);font-size:13px;line-height:1.5;border:1px solid #ff174435}
.update-actions{display:grid;gap:8px}
#update-notice .update-primary{width:100%;min-height:50px;margin:0;padding:13px 18px;border:1px solid #ff405e;border-radius:15px;background:linear-gradient(115deg,#ff423e,#f50943);color:#fff;font-size:15px;font-weight:700;box-shadow:0 7px 24px #e3124030}
#update-notice .update-later{width:100%;min-height:44px;margin:0;padding:10px 16px;border:0;border-radius:12px;background:transparent;color:var(--muted,#a7b2c0);font-size:14px}
#update-notice button:focus-visible{outline:2px solid #ffb349;outline-offset:3px}
html[data-theme=light] #update-notice .update-eyebrow{color:#b91f40}
@keyframes update-reveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-height:500px){#update-notice .update-dialog{padding:16px 24px 12px}.update-brand{width:56px;height:56px;margin-bottom:8px;border-radius:16px}.update-brand img{width:44px;height:44px}#update-notice .update-eyebrow{font-size:10px;margin-bottom:8px}#update-notice h2{font-size:24px;line-height:1.1;margin-bottom:8px}#update-notice .update-description{font-size:13px;line-height:1.4;margin-bottom:12px}}
@media(prefers-reduced-motion:reduce){#update-notice .update-dialog[open]{animation:none}#update-notice .update-dialog::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none}}

/* Connection notice: same visual identity; existing network and retry handlers unchanged. */
#connection-notice[data-centered="true"]{display:contents}
#connection-notice[data-centered="true"] .connection-dialog{position:fixed;inset:0;margin:auto;width:min(420px,calc(100% - 32px));max-height:calc(100% - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;padding:32px 28px 20px;border:1px solid #ff45683d;border-radius:28px;color:var(--ink,#f8f8fa);background:radial-gradient(ellipse at 50% 0,#ba1a3930,transparent 62%),linear-gradient(150deg,var(--card,#141c26),var(--surface,#0b1118));box-shadow:0 24px 80px #0008;text-align:center}
#connection-notice[data-centered="true"] .connection-dialog::backdrop{background:#03070bc9;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#connection-notice[data-centered="true"] .connection-dialog[open]{animation:connection-reveal .2s ease-out}
#connection-notice[data-centered="true"] .connection-close{position:absolute;top:10px;right:10px;display:grid;place-items:center;width:44px;height:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted,#a7b2c0);font-size:27px;line-height:1}
#connection-notice[data-centered="true"] .connection-brand{display:grid;place-items:center;width:108px;height:108px;margin:0 auto 20px;border:1px solid #ff45682e;border-radius:28px;background:linear-gradient(145deg,#e4335315,#811a3818);box-shadow:0 8px 28px #a31b3020}
#connection-notice[data-centered="true"] .connection-brand img{width:84px;height:84px;object-fit:contain}
#connection-notice[data-centered="true"] .connection-eyebrow{margin:0 0 12px;color:#ff718d;font-size:11px;line-height:1.4;font-weight:700;letter-spacing:.16em}
#connection-notice[data-centered="true"] h2{max-width:310px;margin:0 auto 14px;font-size:clamp(24px,6vw,29px);line-height:1.13;font-weight:750;letter-spacing:-.7px;text-wrap:balance}
#connection-notice[data-centered="true"] .connection-description{max-width:290px;margin:0 auto 24px;font-size:14px;line-height:1.6;color:var(--muted,#a7b2c0)}
#connection-notice[data-centered="true"] .connection-feedback{margin:0 0 18px;padding:12px;border-radius:12px;background:#ff174412;color:var(--ink,#f8f8fa);font-size:13px;line-height:1.5;border:1px solid #ff174435}
#connection-notice[data-centered="true"] .connection-actions{display:grid;gap:8px}
#connection-notice[data-centered="true"] .connection-primary{width:100%;min-height:50px;margin:0;padding:13px 18px;border:1px solid #ff405e;border-radius:15px;background:linear-gradient(115deg,#ff423e,#f50943);color:#fff;font-size:15px;font-weight:700;box-shadow:0 7px 24px #e3124030}
#connection-notice[data-centered="true"] .connection-later{width:100%;min-height:44px;margin:0;padding:10px 16px;border:0;border-radius:12px;background:transparent;color:var(--muted,#a7b2c0);font-size:14px}
#connection-notice[data-centered="true"] button:focus-visible{outline:2px solid #ffb349;outline-offset:3px}
html[data-theme=light] #connection-notice[data-centered="true"] .connection-eyebrow{color:#b91f40}
@keyframes connection-reveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-height:500px){#connection-notice[data-centered="true"] .connection-dialog{padding:16px 24px 12px}#connection-notice[data-centered="true"] .connection-brand{width:56px;height:56px;margin-bottom:8px;border-radius:16px}#connection-notice[data-centered="true"] .connection-brand img{width:44px;height:44px}#connection-notice[data-centered="true"] .connection-eyebrow{font-size:10px;margin-bottom:8px}#connection-notice[data-centered="true"] h2{font-size:24px;line-height:1.1;margin-bottom:8px}#connection-notice[data-centered="true"] .connection-description{font-size:13px;line-height:1.4;margin-bottom:12px}}
@media(prefers-reduced-motion:reduce){#connection-notice[data-centered="true"] .connection-dialog[open]{animation:none}#connection-notice[data-centered="true"] .connection-dialog::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none}}
