/* Semantic colors for this installation. theme.js supplies contrast-tested RGB values. */
:root {
  --brand-color: #ff1744;
  --brand-on-color: #000;
  --brand-on-dark: #ff5878;
  --brand-on-light: #a9002b;
  --brand-ink: var(--brand-on-dark);
  --brand-soft: var(--brand-soft-dark, #39262e);
  --brand-line: var(--brand-line-dark, #995367);
  --brand-wash: rgba(255,23,68,.14);
  --brand-glow: rgba(255,23,68,.28);
  accent-color: var(--brand-ink);
}
html[data-theme=light] {
  --brand-ink: var(--brand-on-light);
  --brand-soft: var(--brand-soft-light, #f3dce4);
  --brand-line: var(--brand-line-light, #b26b7f);
}
:root{--surface:#070c10;--card:#111b23;--ink:#f5f6f8;--muted:#a8b3bf;--line:#28333d;--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(--brand-ink);width:44px;height:44px}.avatar-button{border:1px solid var(--line);border-radius:50%;width:40px;height:40px;background:var(--brand-color);font-weight:700;color:var(--brand-on-color);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(--brand-ink)}
.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(--brand-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(--brand-ink)}.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 var(--brand-wash);border-top-color:var(--brand-ink);border-right-color:var(--brand-ink);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(--brand-ink);box-shadow:inset 0 0 0 1px var(--brand-ink)}.control,.logout-button{background:var(--card);border:1px solid var(--brand-line);color:var(--brand-ink);border-radius:8px;padding:10px 15px;min-height:44px}.logout-button{margin-top:28px;color:var(--brand-ink);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(--brand-ink)}
#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(--brand-ink);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:var(--brand-on-dark);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:var(--brand-color);color:var(--brand-on-color);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:var(--brand-on-dark);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:var(--brand-on-dark);stroke-width:5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 7px var(--brand-glow));animation:reconnect-turn 2.3s linear infinite}
.player-reconnect button{pointer-events:auto;background:var(--brand-color);color:var(--brand-on-color);border:1px solid var(--brand-line);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:var(--brand-on-dark);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:var(--brand-color);border:1px solid var(--brand-line);border-radius:14px;box-shadow:0 4px 14px var(--brand-wash);color:var(--brand-on-color);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(--brand-ink);outline-offset:3px}
.channel-row.playing{color:var(--ink)}.channel-row.playing .channel-now,.channel-row.playing .channel-number{color:var(--muted)}
/* Live fills the viewport; navigation overlays the scrolling list. */
.cp9-live{height:100dvh;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:0}
.cp9-live .simulation-badge{top:auto;bottom:8px;right:10px;font-size:10px;pointer-events:none}
/* Clearance belongs to the scroll content, only for the visible bar and safe area. */
.cp9-live .channel-list{min-height:88px;--live-clearance:calc(12px + var(--safe-bottom) + 64px * (1 - var(--chrome-progress,0)));padding-bottom:var(--live-clearance);scroll-padding-bottom:var(--live-clearance);overflow-anchor:none}.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:var(--brand-color);border-color:var(--brand-on-dark);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:var(--brand-on-dark);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:#101820ec;color:var(--brand-on-dark);border:1px solid #ffffff2b;border-radius:50%;box-shadow:0 3px 12px #0005;backdrop-filter:blur(10px)}
body:has(.player-view) #header .icon{color:var(--brand-on-dark)}.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:#101820ec;color:var(--brand-on-dark);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>.smartflix-picker)) #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,var(--brand-wash),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:var(--brand-color);border:1px solid var(--brand-line);box-shadow:0 6px 20px var(--brand-wash);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:var(--brand-wash);border:1px solid var(--brand-wash);border-radius:13px;color:var(--brand-ink)}
.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(--brand-ink)}
.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:var(--brand-ink);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:var(--brand-ink);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,var(--brand-color),var(--brand-soft));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:var(--brand-ink)}
.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 var(--brand-glow);border-radius:28px;color:var(--ink,#f8f8fa);background:radial-gradient(ellipse at 50% 0,var(--brand-wash),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(--brand-ink);font-size:27px;line-height:1}
.update-brand{display:grid;place-items:center;width:108px;height:108px;margin:0 auto 20px;border:1px solid var(--brand-glow);border-radius:28px;background:linear-gradient(145deg,var(--brand-wash),var(--brand-wash));box-shadow:0 8px 28px var(--brand-wash)}
.update-brand img{width:84px;height:84px;object-fit:contain}
#update-notice .update-eyebrow{margin:0 0 12px;color:var(--brand-ink);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:var(--brand-wash);color:var(--ink,#f8f8fa);font-size:13px;line-height:1.5;border:1px solid var(--brand-glow)}
.update-actions{display:grid;gap:8px}
#update-notice .update-primary{width:100%;min-height:50px;margin:0;padding:13px 18px;border:1px solid var(--brand-line);border-radius:15px;background:var(--brand-color);color:var(--brand-on-color);font-size:15px;font-weight:700;box-shadow:0 7px 24px var(--brand-glow)}
#update-notice .update-later{width:100%;min-height:44px;margin:0;padding:10px 16px;border:0;border-radius:12px;background:transparent;color:var(--brand-ink);font-size:14px}
#update-notice button:focus-visible{outline:2px solid var(--brand-ink);outline-offset:3px}
html[data-theme=light] #update-notice .update-eyebrow{color:var(--brand-ink)}
@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 var(--brand-glow);border-radius:28px;color:var(--ink,#f8f8fa);background:radial-gradient(ellipse at 50% 0,var(--brand-wash),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(--brand-ink);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 var(--brand-glow);border-radius:28px;background:linear-gradient(145deg,var(--brand-wash),var(--brand-wash));box-shadow:0 8px 28px var(--brand-wash)}
#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:var(--brand-ink);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:var(--brand-wash);color:var(--ink,#f8f8fa);font-size:13px;line-height:1.5;border:1px solid var(--brand-glow)}
#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 var(--brand-line);border-radius:15px;background:var(--brand-color);color:var(--brand-on-color);font-size:15px;font-weight:700;box-shadow:0 7px 24px var(--brand-glow)}
#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(--brand-ink);font-size:14px}
#connection-notice[data-centered="true"] button:focus-visible{outline:2px solid var(--brand-ink);outline-offset:3px}
html[data-theme=light] #connection-notice[data-centered="true"] .connection-eyebrow{color:var(--brand-ink)}
@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}}

/* Provider validity: independent card, private profile, no player styling. */
#validity-notice{display:contents}
#validity-notice .validity-dialog{--vigency:#55d89c;--vigency-soft:#55d89c26;position:fixed;inset:0;margin:auto;width:min(440px,calc(100% - 32px));max-height:calc(100% - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:26px 24px 18px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--vigency-soft);border-radius:26px;background:radial-gradient(ellipse at top,var(--vigency-soft),transparent 62%),linear-gradient(145deg,var(--card),var(--surface));color:var(--ink);box-shadow:0 24px 80px #0008;text-align:center}
#validity-notice .validity-dialog[data-urgency=amber]{--vigency:#efbc55;--vigency-soft:#efbc5530}
#validity-notice .validity-dialog[data-urgency=red]{--vigency:#ff5676;--vigency-soft:#ff567630}
#validity-notice .validity-dialog::backdrop{background:#03070bc9;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#validity-notice .validity-dialog[open]{animation:update-reveal .2s ease-out}
#validity-notice .validity-close{position:absolute;top:8px;right:8px;width:44px;height:44px;min-height:44px;display:grid;place-items:center;padding:0;margin:0;border:0;background:transparent;color:var(--muted);font-size:27px;border-radius:50%}
.validity-brand{display:grid;place-items:center;width:80px;height:80px;margin:0 auto 12px;border-radius:22px;border:1px solid var(--vigency-soft);background:var(--vigency-soft)}
.validity-brand img{width:64px;height:64px;object-fit:contain}
.validity-badge{display:inline-block;margin:0 0 12px;padding:5px 12px;border:1px solid var(--line);border-radius:20px;background:var(--card);color:var(--ink);font-size:12px;font-weight:700}
#validity-notice h2{font-size:clamp(22px,6vw,27px);line-height:1.15;letter-spacing:-.5px;margin:0 auto 12px;max-width:350px;text-wrap:balance}
.validity-clock{display:block;font-size:30px;line-height:1;color:var(--vigency);margin:0 0 8px}
.validity-summary{display:block;color:var(--vigency);font-size:clamp(24px,7vw,31px);line-height:1.25;margin:0 0 6px;font-weight:750;text-wrap:balance}
#validity-notice .validity-remaining{color:var(--ink);font-size:13px;line-height:1.6;margin:0 0 12px;min-height:0}
#validity-notice .validity-remaining:empty{display:none}
#validity-notice .validity-date{font-size:13px;line-height:1.6;padding:12px;margin:0 0 12px;border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow-wrap:anywhere;text-wrap:balance}
#validity-notice .validity-description{color:var(--muted);font-size:13px;line-height:1.5;margin:0 0 16px}
#validity-notice .validity-verification{color:var(--muted);font-size:12px;line-height:1.5;border:1px solid var(--line);border-radius:12px;padding:10px;margin:0 0 12px}
.validity-actions{display:grid;gap:6px}
#validity-notice .validity-primary{width:100%;min-height:50px;padding:12px 16px;border:1px solid var(--brand-line);border-radius:15px;background:var(--brand-color);color:var(--brand-on-color);font-size:15px;font-weight:700;box-shadow:0 7px 24px var(--brand-glow);margin:0}
#validity-notice .validity-later{width:100%;min-height:44px;padding:10px 16px;border:0;border-radius:12px;background:transparent;color:var(--muted);font-size:14px;margin:0}
#validity-notice button:focus-visible{outline:2px solid var(--brand-ink);outline-offset:3px}
.account-fact [data-urgency=green]{color:#238f66}.account-fact [data-urgency=amber]{color:#b77a13}.account-fact [data-urgency=red]{color:#ed3155}
html[data-theme=light] #validity-notice .validity-dialog{--vigency:#19734f;--vigency-soft:#238f6618}html[data-theme=light] #validity-notice .validity-dialog[data-urgency=amber]{--vigency:#885809;--vigency-soft:#d6a14220}html[data-theme=light] #validity-notice .validity-dialog[data-urgency=red]{--vigency:#b92344;--vigency-soft:#ff567618}
@media(max-height:520px){#validity-notice .validity-dialog{padding:12px 20px 10px}.validity-brand{width:48px;height:48px;margin-bottom:6px;border-radius:14px}.validity-brand img{width:40px;height:40px}#validity-notice h2{font-size:20px;margin-bottom:6px}.validity-clock{display:none}.validity-summary{font-size:23px;margin-bottom:4px}#validity-notice .validity-date{padding:6px;font-size:12px;margin-bottom:6px}#validity-notice .validity-description{font-size:12px;margin-bottom:8px}.validity-badge{margin-bottom:6px;padding:3px 10px}#validity-notice .validity-remaining{margin-bottom:6px}}
@media(prefers-reduced-motion:reduce){#validity-notice .validity-dialog[open]{animation:none}#validity-notice .validity-dialog::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none}}

/* Live category cards: fixed geometry across states; existing selection/scroll logic. */
.cp9-live .channel-tabs{height:68px;min-height:68px;gap:8px;padding:6px 12px;align-items:stretch;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scroll-behavior:auto;scroll-snap-type:none;overflow-anchor:none;border:0;background:var(--surface);scrollbar-width:thin}
.cp9-live .channel-tabs button{flex:0 0 auto;width:max-content;max-width:none;min-width:72px;min-height:44px;padding:10px 16px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;overflow:visible;text-overflow:clip;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);font-size:13px;font-weight:600;line-height:1.2;letter-spacing:normal;box-shadow:inset 0 1px 0 #ffffff04}
.cp9-live .channel-tabs button.active,.cp9-live .channel-tabs button[aria-selected=true]{border-color:var(--brand-line);background:var(--brand-soft);color:var(--brand-ink);font-weight:600;box-shadow:inset 0 0 16px var(--brand-wash)}
.cp9-live .channel-tabs button.active::after{content:none}
.cp9-live .channel-tabs button:focus-visible{outline:2px solid var(--brand-ink);outline-offset:-4px}
html[data-theme=light] .cp9-live .channel-tabs button{border-color:#c7d0da;background:#fff;color:#24313e;box-shadow:inset 0 1px 0 #ffffff80}
html[data-theme=light] .cp9-live .channel-tabs button.active,html[data-theme=light] .cp9-live .channel-tabs button[aria-selected=true]{border-color:var(--brand-line);background:var(--brand-soft);color:var(--brand-ink);box-shadow:inset 0 0 16px var(--brand-wash)}
@media(min-width:700px){.cp9-live .channel-tabs button{font-size:14px}}

/* Administrative stop notice: same visual language as the existing update notice. */
#admin-playback-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 var(--brand-glow);border-radius:28px;color:var(--ink,#f8f8fa);background:radial-gradient(ellipse at 50% 0,var(--brand-wash),transparent 62%),linear-gradient(150deg,var(--card,#141c26),var(--surface,#0b1118));box-shadow:0 24px 80px #0008;text-align:center}
#admin-playback-notice .update-dialog::backdrop{background:#03070bc9;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#admin-playback-notice .update-dialog[open]{animation:update-reveal .2s ease-out}
#admin-playback-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(--brand-ink);font-size:27px;line-height:1}
#admin-playback-notice .update-brand{display:grid;place-items:center;width:108px;height:108px;margin:0 auto 20px;border:1px solid var(--brand-glow);border-radius:28px;background:linear-gradient(145deg,var(--brand-wash),var(--brand-wash));box-shadow:0 8px 28px var(--brand-wash)}
#admin-playback-notice .update-brand img{width:84px;height:84px;object-fit:contain}
#admin-playback-notice .update-eyebrow{margin:0 0 12px;color:var(--brand-ink);font-size:11px;line-height:1.4;font-weight:700;letter-spacing:.16em}
#admin-playback-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}
#admin-playback-notice .update-description{max-width:290px;margin:0 auto 24px;font-size:14px;line-height:1.6;color:var(--muted,#a7b2c0)}
#admin-playback-notice .update-feedback{margin:0 0 18px;padding:12px;border-radius:12px;background:var(--brand-wash);color:var(--ink,#f8f8fa);font-size:13px;line-height:1.5;border:1px solid var(--brand-glow)}
#admin-playback-notice .update-actions{display:grid;gap:8px}
#admin-playback-notice .update-primary{width:100%;min-height:50px;margin:0;padding:13px 18px;border:1px solid var(--brand-line);border-radius:15px;background:var(--brand-color);color:var(--brand-on-color);font-size:15px;font-weight:700;box-shadow:0 7px 24px var(--brand-glow)}
#admin-playback-notice .update-later{width:100%;min-height:44px;margin:0;padding:10px 16px;border:0;border-radius:12px;background:transparent;color:var(--brand-ink);font-size:14px}
#admin-playback-notice button:focus-visible{outline:2px solid var(--brand-ink);outline-offset:3px}
html[data-theme=light] #admin-playback-notice .update-eyebrow{color:var(--brand-ink)}
@media(max-height:500px){#admin-playback-notice .update-dialog{padding:16px 24px 12px}#admin-playback-notice .update-brand{width:56px;height:56px;margin-bottom:8px;border-radius:16px}#admin-playback-notice .update-brand img{width:44px;height:44px}#admin-playback-notice .update-eyebrow{font-size:10px;margin-bottom:8px}#admin-playback-notice h2{font-size:24px;line-height:1.1;margin-bottom:8px}#admin-playback-notice .update-description{font-size:13px;line-height:1.4;margin-bottom:12px}}
@media(prefers-reduced-motion:reduce){#admin-playback-notice .update-dialog[open]{animation:none}#admin-playback-notice .update-dialog::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none}}
#admin-playback-notice .update-description{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}

/* Movie resume choice: same visual language, scoped to this dialog only. */
#movie-resume-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 var(--brand-glow);border-radius:28px;color:var(--ink,#f8f8fa);background:radial-gradient(ellipse at 50% 0,var(--brand-wash),transparent 62%),linear-gradient(150deg,var(--card,#141c26),var(--surface,#0b1118));box-shadow:0 24px 80px #0008;text-align:center}
#movie-resume-notice .update-dialog::backdrop{background:#03070bc9;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#movie-resume-notice .update-dialog[open]{animation:update-reveal .2s ease-out}
#movie-resume-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(--brand-ink);font-size:27px;line-height:1}
#movie-resume-notice .update-brand{display:grid;place-items:center;width:108px;height:108px;margin:0 auto 20px;border:1px solid var(--brand-glow);border-radius:28px;background:linear-gradient(145deg,var(--brand-wash),var(--brand-wash));box-shadow:0 8px 28px var(--brand-wash)}
#movie-resume-notice .update-brand img{width:84px;height:84px;object-fit:contain}
#movie-resume-notice .update-eyebrow{margin:0 0 12px;color:var(--brand-ink);font-size:11px;line-height:1.4;font-weight:700;letter-spacing:.16em}
#movie-resume-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}
#movie-resume-notice .update-description{max-width:290px;margin:0 auto 24px;font-size:14px;line-height:1.6;color:var(--muted,#a7b2c0)}
#movie-resume-notice .update-feedback{margin:0 0 18px;padding:12px;border-radius:12px;background:var(--brand-wash);color:var(--ink,#f8f8fa);font-size:13px;line-height:1.5;border:1px solid var(--brand-glow)}
#movie-resume-notice .update-actions{display:grid;gap:8px}
#movie-resume-notice .update-primary{width:100%;min-height:50px;margin:0;padding:13px 18px;border:1px solid var(--brand-line);border-radius:15px;background:var(--brand-color);color:var(--brand-on-color);font-size:15px;font-weight:700;box-shadow:0 7px 24px var(--brand-glow)}
#movie-resume-notice .update-later{width:100%;min-height:44px;margin:0;padding:10px 16px;border:0;border-radius:12px;background:transparent;color:var(--brand-ink);font-size:14px}
#movie-resume-notice button:focus-visible{outline:2px solid var(--brand-ink);outline-offset:3px}
html[data-theme=light] #movie-resume-notice .update-eyebrow{color:var(--brand-ink)}
@media(max-height:500px){#movie-resume-notice .update-dialog{padding:16px 24px 12px}#movie-resume-notice .update-brand{width:56px;height:56px;margin-bottom:8px;border-radius:16px}#movie-resume-notice .update-brand img{width:44px;height:44px}#movie-resume-notice .update-eyebrow{font-size:10px;margin-bottom:8px}#movie-resume-notice h2{font-size:24px;line-height:1.1;margin-bottom:8px}#movie-resume-notice .update-description{font-size:13px;line-height:1.4;margin-bottom:12px}}
@media(prefers-reduced-motion:reduce){#movie-resume-notice .update-dialog[open]{animation:none}#movie-resume-notice .update-dialog::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none}}
#movie-resume-notice .update-description{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}

#movie-resume-notice .resume-start{width:100%;min-height:48px;padding:12px 14px;border:1px solid var(--brand-line);border-radius:15px;background:var(--surface,#0b1118);color:var(--ink,#f8f8fa);font-size:14px;font-weight:650}

/* Preserved live-player reconnect layout from the approved web UI. */
.cp9-live-player .player-reconnect{padding:48px 8px 8px;box-sizing:border-box;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}





/* Episode checkpoints: scoped to thumbnails; do not change player geometry. */
.episode-thumb{position:relative;overflow:hidden}
.episode-progress{position:absolute;left:0;right:0;bottom:0;height:5px;background:rgba(100,110,120,.65);overflow:hidden;z-index:2}
.episode-progress>span{display:block;height:100%;background:var(--brand-on-dark)}
.episode-progress-caption,.series-resume-caption{display:block;color:var(--muted);font-size:12px;line-height:1.5}
.series-resume-caption{flex-basis:100%}

.episode-row.episode-current{outline:2px solid var(--brand-ink);outline-offset:-2px;border-radius:.65rem}
.episode-current-label{font-size:.85em;color:var(--brand-ink)}

/* The profile reel owns this screen, including its brand mark and touch controls. */
html body:has(.smartflix-picker) #app>#header,
body:has(.smartflix-picker) #nav{display:none}
html body:has(.smartflix-picker) #view{padding:0;min-height:100dvh}
.smartflix-picker{
  position:relative;isolation:isolate;overflow:hidden;min-height:100dvh;color:var(--ink);
  background:var(--surface);
  background-image:radial-gradient(ellipse at 89% 21%,color-mix(in srgb,var(--brand-ink) 30%,transparent),transparent 59%),
    linear-gradient(155deg,var(--surface) 27%,var(--card) 86%);
}
.smartflix-backdrop{position:absolute;inset:0 0 0 auto;width:100%;height:100%;object-fit:cover;object-position:66% 35%;z-index:-2;opacity:0}
.smartflix-backdrop[data-art-state=loaded]{opacity:1}
.smartflix-picker::before{content:"";position:absolute;inset:0;pointer-events:none;z-index:-1;
  background:linear-gradient(90deg,var(--surface),color-mix(in srgb,var(--surface) 91%,transparent) 21%,color-mix(in srgb,var(--surface) 56%,transparent) 48%,transparent 92%),
    linear-gradient(0deg,var(--surface),transparent 35%)}
.smartflix-pane{position:relative;width:min(100%,36rem);box-sizing:border-box;padding:clamp(16px,3.4vh,32px) clamp(20px,4.7vw,60px) max(56px,env(safe-area-inset-bottom))}
.smartflix-pane>.brand-logo{display:block;object-fit:contain;object-position:left center;width:auto;max-width:120px;height:clamp(40px,9vh,70px);margin:0 0 .6rem}
.smartflix-pane h1{margin:0 0 .8rem;color:var(--ink);font-size:clamp(27px,3.7vw,36px);line-height:1.12;letter-spacing:-.028em;outline:none}
.smartflix-profiles{display:grid;gap:3px;align-content:start;max-height:clamp(9rem,51dvh,38rem);overflow-y:auto;overscroll-behavior:contain;padding:4px;margin-inline:-4px;scrollbar-width:thin}
.smartflix-profiles[hidden],.smartflix-actions[hidden],.smartflix-status:empty{display:none}
.smartflix-profile{display:flex;align-items:center;gap:12px;width:100%;padding:3px 5px;border:0;border-radius:10px;
  min-height:52px;min-width:0;background:transparent;color:var(--muted);text-align:start;font:inherit;cursor:pointer}
.smartflix-profile-name{font-size:1.19rem;line-height:1.23;font-weight:500;overflow-wrap:anywhere;min-width:0}
.smartflix-portrait{display:grid;place-items:center;overflow:hidden;flex:none;box-sizing:border-box;
  width:clamp(48px,9.2dvh,72px);aspect-ratio:1;border:2px solid transparent;border-radius:9px;
  background:var(--card);color:var(--muted);transform:scale(.94);transition:transform .13s ease,border-color .13s ease}
.smartflix-avatar-img{width:100%;height:100%;display:block;object-fit:cover}
.smartflix-glyph{display:block;width:1rem;height:1rem;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}
.smartflix-portrait>.smartflix-glyph{width:54%;height:54%}
.smartflix-profile:focus-visible{outline:2px solid var(--brand-ink);outline-offset:1px}
.smartflix-profile:is([aria-current=true],:focus-visible,:hover),
.smartflix-profiles:not(:focus-within):not(:has([aria-current=true]))>.smartflix-profile:first-child{color:var(--ink)}
.smartflix-profile:is([aria-current=true],:focus-visible,:hover) .smartflix-portrait,
.smartflix-profiles:not(:focus-within):not(:has([aria-current=true]))>.smartflix-profile:first-child .smartflix-portrait{border-color:var(--brand-ink);transform:scale(1.03)}
.smartflix-profile:is([aria-current=true],:focus-visible,:hover) .smartflix-profile-name,
.smartflix-profiles:not(:focus-within):not(:has([aria-current=true]))>.smartflix-profile:first-child .smartflix-profile-name{font-weight:700}
.smartflix-actions{display:flex;flex-direction:column;align-items:flex-start;gap:.6rem;margin-top:1.4rem}
.smartflix-guest{display:inline-flex;align-items:center;gap:.5rem}
.smartflix-guest[aria-current=true]{outline:2px solid var(--brand-ink);outline-offset:1px}
.smartflix-guest .smartflix-glyph{width:19px;height:19px}
.smartflix-picker .control{min-height:44px;border:1px solid var(--brand-line);border-radius:999px;padding:.5rem 1rem;background:var(--card);color:var(--brand-ink);font-size:.95rem}
.smartflix-profiles>.control{justify-self:start;margin:7px 0 0}
.smartflix-status{margin:.85rem 0 0;color:var(--ink);font-size:.95rem}
.smartflix-pin{display:grid;grid-template-columns:minmax(0,18rem);gap:.8rem;justify-items:start}
.smartflix-pin-portrait{transform:none}
.smartflix-pin label{display:grid;gap:.5rem;font-size:1.1rem;font-weight:600;color:var(--ink);width:100%}
.smartflix-pin input{box-sizing:border-box;max-width:100%;width:10rem;min-height:48px;padding:.32rem .7rem;
  border:1px solid var(--muted);border-radius:10px;background:var(--card);color:var(--ink);font-size:1.5rem;text-align:center;letter-spacing:.17em}
.smartflix-pin input:focus-visible{outline:2px solid var(--brand-ink);outline-offset:2px}
.avatar-button.smartflix-active-avatar,.account-link-icon.smartflix-active-avatar{overflow:hidden;padding:0;display:grid;place-items:center}
.smartflix-active-avatar>.smartflix-glyph{width:58%;height:58%}
.account-premium .account-hero .avatar-button.smartflix-active-avatar{border-radius:50%}
.account-link-icon.smartflix-active-avatar{border-radius:50%}
@media(orientation:portrait){
  .smartflix-pane{width:100%;padding:max(14px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(68px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
  .smartflix-pane>.brand-logo{max-width:96px}
  .smartflix-pane h1{font-size:27px}
}
@media (prefers-reduced-motion:reduce){.smartflix-portrait{transition:none}}

/* Secondary actions keep a lighter visual weight than the main brand-filled action. */
.panel-content .control, .player-controls button, .tv-retry, .season-label select,
.section-head select, .detail-actions .round-action:not(:disabled) {
  border-color: var(--brand-line);
  color: var(--brand-ink);
  background: var(--card);
}
.panel-content .primary {background:var(--brand-color);color:var(--brand-on-color);border-color:var(--brand-line)}
.series-main-actions .round-action:not(:disabled) .circle,
.detail-actions .round-action:not(:disabled) .circle {color:var(--brand-ink);background:var(--brand-soft)}
.channel-play {color:var(--brand-ink);border-color:var(--brand-line)}
.channel-play .icon {fill:currentColor}
.channel-row.playing .channel-play {color:var(--brand-on-color);background:var(--brand-color);border-color:var(--brand-line)}
.channel-row.playing .channel-play .icon {stroke:currentColor}
.episode-play {background:#0d151ce6;border-color:var(--brand-on-dark)}
.episode-play .icon {fill:var(--brand-on-dark);stroke:var(--brand-on-dark)}
#validity-notice :is(.validity-later,.validity-close),
body .account-view button.list-guide-help {color:var(--brand-ink)}
.home-shortcuts .control {color:var(--brand-on-color);background:var(--brand-color)}
.favorite-star:not(.saved) .icon, .channel-favorite:not(.saved) .icon {stroke:var(--brand-ink)}
.cinema-controls button:not(:disabled), .cinema-controls select {color:var(--brand-on-dark)}
.tv-controls, .cinema-controls, .player-reconnect {--brand-ink:var(--brand-on-dark)}
