/* BUILD015: complete runtime screens, centered content and one player tap surface. */
html[data-device-mode] .screen-art,html[data-device-mode] .home-backdrop{inset:0;transform:none}
.profile-manager-screen,.detail-screen{overflow-y:auto}
.flow-topbar{position:relative;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:20px;width:min(92%,1500px);margin:3vh auto 0}
.profile-manager-shell{position:relative;z-index:2;display:grid;grid-template-columns:minmax(200px,1fr) minmax(0,2.5fr);gap:24px;width:min(88%,1300px);margin:3vh auto 5vh;align-items:start}
.profile-manager-card,.detail-panel,.pin-card,.cast-card{background:linear-gradient(145deg,#181e2bec,#0f1520f5);border:1px solid var(--ui-line);border-radius:22px;padding:clamp(20px,2.2vw,40px);color:var(--text);box-shadow:0 16px 45px #0003}
.profile-manager-card h1,.profile-manager-card h2{font-size:clamp(24px,2.4vw,42px);margin:12px 0 18px;line-height:1.15}
.profile-manager-card h3{font-size:var(--ui-body);margin:22px 0 14px}
.profile-manager-card p{color:var(--muted);font-size:var(--ui-small);line-height:1.6}
.profile-manager-card label{display:block;font-size:var(--ui-small);margin:16px 0 10px}
.profile-name-input{display:block;width:100%;height:clamp(48px,5vh,65px);padding:0 16px;font-size:var(--ui-body);border:1px solid var(--ui-line);border-radius:12px;background:#090f1a;color:var(--text);user-select:text}
.profile-edit-list{display:grid;gap:10px;margin:24px 0}
.profile-edit-chip{display:flex;align-items:center;gap:12px;min-width:0;width:100%;padding:12px;border:1px solid var(--ui-line);border-radius:14px;background:#0e1521;color:var(--text);text-align:left;cursor:pointer}
.profile-edit-chip img{width:clamp(44px,3.4vw,64px);height:clamp(44px,3.4vw,64px);border-radius:25%;object-fit:cover;flex-shrink:0}
.profile-edit-chip strong{display:block;font-size:var(--ui-body);overflow-wrap:anywhere}
.profile-edit-chip small{display:block;margin-top:6px;font-size:var(--ui-small);color:var(--muted)}
.profile-edit-chip.selected,.avatar-option.selected{border-color:#f1bd92;background:#342b2b;box-shadow:inset 0 0 0 1px #f1bd92}
.profile-manager-card>button{width:100%;font-size:var(--ui-small)}
.avatar-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-width:660px}
.avatar-option{border:1px solid var(--ui-line);background:#101725;border-radius:16px;padding:10px;cursor:pointer;min-width:0}
.avatar-option img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:24%}
.profile-pin-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:26px 0;padding-top:20px;border-top:1px solid var(--ui-line);font-size:var(--ui-body)}
.profile-pin-row button{font-size:var(--ui-small);flex-shrink:0}
.profile-editor-actions{display:flex;gap:12px;flex-wrap:wrap}.profile-editor-actions button{font-size:var(--ui-small);flex:1}
.profiles-hint{color:var(--muted);font-size:var(--ui-body);line-height:1.6;margin:12px 0 24px}
.profile-avatar-shell{position:relative;display:inline-block}.profile-lock-badge{position:absolute;bottom:6px;right:-4px;border:1px solid var(--ui-line);background:#111a27;border-radius:8px;padding:4px 7px;font-size:10px!important}
.profile-empty{grid-column:1/-1;width:100%;padding:28px 20px;border:1px dashed #e3b18a44;border-radius:18px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:14px;background:#111924}
.profile-empty-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:16px;background:#322b2b;font-size:30px;color:#efb991}.profile-empty strong{font-size:var(--ui-body)}.profile-empty span{font-size:var(--ui-small);color:var(--muted);line-height:1.6}
.detail-backdrop{position:absolute;inset:0;background-size:cover;background-position:center top;opacity:.28;pointer-events:none}
.detail-scrim{position:absolute;inset:0;background:linear-gradient(90deg,#080b12ed,#080b1280),linear-gradient(0deg,#080b12,transparent);pointer-events:none}
.detail-shell{position:relative;z-index:2;display:grid;grid-template-columns:minmax(160px,21%) minmax(0,1fr);gap:28px;width:min(88%,1500px);margin:3vh auto 5vh;align-items:start}
.detail-poster{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:18px;border:1px solid var(--ui-line);box-shadow:0 16px 45px #0005}
.detail-panel{min-width:0}.detail-panel h1{font-size:clamp(26px,3vw,56px);margin:12px 0 16px;line-height:1.1;overflow-wrap:anywhere}
.detail-meta{display:flex;flex-wrap:wrap;gap:8px}.detail-meta span{padding:7px 10px;background:#252a34;border:1px solid var(--ui-line);border-radius:8px;font-size:var(--ui-small)}
.detail-description{font-size:var(--ui-body);color:#b4b6c2;line-height:1.65;margin:18px 0 22px}
.detail-actions{display:flex;gap:12px;flex-wrap:wrap}.detail-actions button{font-size:var(--ui-small)}
.detail-series-area{margin-top:28px}.detail-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.detail-section-title h2{font-size:clamp(18px,1.7vw,32px);margin:0}.detail-section-title span{font-size:var(--ui-small);color:var(--muted);white-space:nowrap}
.season-tabs{display:flex;gap:10px;overflow-x:auto;padding:14px 4px;margin:0 -4px;scrollbar-width:thin}
.season-chip{flex-shrink:0;min-height:46px;padding:10px 16px;border-radius:12px;border:1px solid var(--ui-line);background:#18202c;color:var(--text);font-size:var(--ui-small);font-weight:700;cursor:pointer}.season-chip.active{background:#eab68e;color:#251b18}
.episode-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:4px}
.episode-card{position:relative;min-width:0;min-height:124px;padding:16px 32px 16px 132px;border:1px solid var(--ui-line);background:#111b28;border-radius:16px;text-align:left;color:var(--text);cursor:pointer}
.episode-thumb{position:absolute;left:10px;top:10px;width:110px;height:calc(100% - 20px);object-fit:cover;border-radius:10px;background:#080e17}
.episode-card strong{display:block;font-size:var(--ui-body);line-height:1.4;overflow-wrap:anywhere}
.episode-meta{font-size:var(--ui-small);color:#f0bf98;margin:7px 0}.episode-card p{font-size:var(--ui-small);color:var(--muted);line-height:1.5;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.episode-play-icon{position:absolute;right:12px;bottom:12px;font-size:14px;color:#eeb88f}
.modal-layer.pin-modal,.modal-layer.cast-modal{padding:20px;overflow-y:auto;z-index:220}
.pin-card,.cast-card{width:min(460px,90vw);max-height:calc(100dvh - 40px);overflow:auto;text-align:center;padding:24px}
.pin-card h2,.cast-card h2{font-size:clamp(24px,2vw,36px);margin:12px 0}.pin-card p,.cast-card p{font-size:var(--ui-small);color:var(--muted);line-height:1.6}.pin-dots{display:flex;justify-content:center;gap:14px;margin:22px auto 12px}.pin-dots span{width:14px;height:14px;border:1px solid #f0bf98;border-radius:50%}.pin-dots span.filled{background:#f0bf98;box-shadow:0 0 14px #f0bf9825}#pin-error{min-height:20px;font-size:var(--ui-small);color:#ffb09d}.pin-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;max-width:310px;margin:14px auto 18px}.pin-key{min-height:clamp(44px,6vh,64px);border:1px solid var(--ui-line);border-radius:12px;background:#202735;color:var(--text);font-size:24px;cursor:pointer}.cast-card button{display:block;width:100%;margin-top:12px;font-size:var(--ui-small)}
/* Hidden controls must not catch taps or remote focus. All taps on video show them. */
#screen-player .player-video{pointer-events:auto}
html[data-device-mode="mobile"] #player-video{inset:0;width:100%;height:100%;max-height:none;border-radius:0;box-shadow:none;object-fit:contain}
html[data-device-mode="mobile"] .player-toolbar span{flex:1;min-width:0}
html[data-device-mode="mobile"] .player-toolbar .player-spacer{display:none}
.player-top-gradient,.player-bottom-gradient{pointer-events:none}
#screen-player:not(.controls-visible) #player-controls{opacity:0;visibility:hidden;pointer-events:none;transform:translateY(24px)}
#screen-player.controls-visible #player-controls{opacity:1;visibility:visible;pointer-events:auto;transform:none}
#player-controls{transition:opacity .18s ease,transform .18s ease;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow-y:auto}
.player-toolbar{display:flex;gap:10px;align-items:center;margin-bottom:12px}.player-toolbar span{font-size:var(--ui-small);letter-spacing:.08em;color:#bdbac5}.player-toolbar .player-control{font-size:var(--ui-small)}
.player-controls .player-control{cursor:pointer}.player-controls .player-bottomline{flex-wrap:wrap;row-gap:10px}.player-controls .player-title{overflow-wrap:anywhere}.player-controls .player-spacer{flex:1}
html[data-device-mode="tv"] .mobile-player-action{display:none}
html[data-device-mode="mobile"][data-input-mode="remote"] .focusable.is-focused{outline:2px solid #f6d4b4;outline-offset:3px}
/* Headers share a row with Back; no right-floating button above a left header. */
html[data-device-mode="mobile"] .ui-back{position:relative;float:none;display:block;width:max-content;margin:20px 22px 0;inset:auto}
html[data-device-mode="mobile"] .brand-header,html[data-device-mode="mobile"] .home-header{max-width:716px;margin-left:auto;margin-right:auto;padding:0 22px}
html[data-device-mode="mobile"] .profile-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:16px}
html[data-device-mode="mobile"] .profile-grid .profile-card{width:calc(50% - 8px);max-width:190px}.profile-grid .profile-card h3{overflow-wrap:anywhere}
html[data-device-mode="mobile"] .profile-manager-shell{grid-template-columns:1fr;width:100%;max-width:760px;padding:0 22px;gap:18px;margin:24px auto 32px}
html[data-device-mode="mobile"] .profile-manager-card{padding:22px 18px}.profile-manager-card h1{margin-top:0}
html[data-device-mode="mobile"] .profile-edit-list{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-device-mode="mobile"] .profile-edit-chip{flex-direction:column;align-items:flex-start;gap:10px;padding:12px}
html[data-device-mode="mobile"] .profile-edit-chip strong{font-size:14px}
html[data-device-mode="mobile"] .profile-edit-chip small{font-size:10px}
html[data-device-mode="mobile"] .flow-topbar{width:100%;max-width:760px;padding:0 22px;margin-top:20px}
html[data-device-mode="mobile"] .flow-topbar .eyebrow{font-size:10px;line-height:1.5}
html[data-device-mode="mobile"] .detail-shell{grid-template-columns:1fr;width:100%;max-width:900px;padding:0 22px;margin:24px auto 32px;gap:18px}
html[data-device-mode="mobile"] .detail-poster{width:112px;justify-self:center;border-radius:14px}
html[data-device-mode="mobile"] .detail-panel{padding:22px 16px;border-radius:20px}
html[data-device-mode="mobile"] .detail-panel h1{font-size:28px;text-align:center}.detail-panel>.eyebrow{text-align:center}
html[data-device-mode="mobile"] .detail-meta{justify-content:center}
html[data-device-mode="mobile"] .detail-description{font-size:14px;line-height:1.6}
html[data-device-mode="mobile"] .detail-actions{display:grid;grid-template-columns:1fr;gap:10px}
html[data-device-mode="mobile"] .detail-section-title{align-items:flex-start;flex-direction:column;gap:6px}
html[data-device-mode="mobile"] .episode-list{grid-template-columns:1fr}
html[data-device-mode="mobile"] .episode-card{min-height:112px;padding:12px 26px 12px 104px}
html[data-device-mode="mobile"] .episode-thumb{width:82px;left:10px;top:10px}
html[data-device-mode="mobile"] .episode-card strong{font-size:14px}html[data-device-mode="mobile"] .episode-card p{font-size:12px}
html[data-device-mode="mobile"] .season-chip{font-size:12px;min-height:44px}
html[data-device-mode="mobile"] .profile-pin-row{align-items:stretch;flex-direction:column}
html[data-device-mode="mobile"] #player-controls{left:12px;right:12px;bottom:12px;padding:14px;max-width:100%;border-radius:16px}
html[data-device-mode="mobile"] .player-toolbar{gap:8px}html[data-device-mode="mobile"] .player-toolbar span{font-size:10px;letter-spacing:.02em}
html[data-device-mode="mobile"] .player-toolbar .player-control{font-size:11px;padding:0 8px;width:auto;min-width:44px;flex-shrink:0}
html[data-device-mode="mobile"] .player-head{gap:12px;align-items:flex-start}.player-head>div:first-child{min-width:0}
html[data-device-mode="mobile"] .player-title{font-size:18px;line-height:1.3}
html[data-device-mode="mobile"] .player-bottomline .player-spacer{display:none}html[data-device-mode="mobile"] #player-time{font-size:11px;white-space:nowrap}
@media(min-width:650px){html[data-device-mode="mobile"] .profile-grid .profile-card{width:calc(33.333% - 12px)}html[data-device-mode="mobile"] .profile-edit-list{grid-template-columns:repeat(3,minmax(0,1fr))}html[data-device-mode="mobile"] .detail-shell{grid-template-columns:150px minmax(0,1fr);align-items:start}html[data-device-mode="mobile"] .detail-poster{width:150px}html[data-device-mode="mobile"] .detail-panel h1{text-align:left}html[data-device-mode="mobile"] .detail-panel>.eyebrow{text-align:left}html[data-device-mode="mobile"] .detail-meta{justify-content:flex-start}}
@media(max-height:500px) and (orientation:landscape){html[data-device-mode="mobile"] #player-controls{padding:10px 14px;bottom:8px}html[data-device-mode="mobile"] .player-toolbar{margin-bottom:6px}html[data-device-mode="mobile"] .player-control{height:38px;min-width:38px}html[data-device-mode="mobile"] .player-head{margin-bottom:6px}html[data-device-mode="mobile"] .player-subtitle{font-size:10px}html[data-device-mode="mobile"] .player-title{font-size:16px}.pin-card{padding:16px;max-height:calc(100dvh - 24px)}.pin-keypad{gap:6px;margin:10px auto}.pin-dots{margin:12px auto}.pin-card p{margin:8px 0}}
@media(prefers-reduced-motion:reduce){#player-controls{transition:none}}
/* Keep the season selector close to the title, including narrow phones. */
.detail-shell{display:block;max-width:1200px}.detail-summary{display:grid;grid-template-columns:clamp(90px,9vw,160px) minmax(0,1fr);gap:24px;align-items:center}.detail-summary-copy{min-width:0}.detail-summary .detail-poster{width:100%}.detail-summary .eyebrow{text-align:left}
html[data-device-mode="mobile"] .detail-shell{display:block;max-width:900px}
html[data-device-mode="mobile"] .detail-summary{grid-template-columns:76px minmax(0,1fr);gap:14px;align-items:start}
html[data-device-mode="mobile"] .detail-summary .detail-poster{width:76px;margin:0;justify-self:start}
html[data-device-mode="mobile"] .detail-summary h1{text-align:left;font-size:23px;line-height:1.15;margin:8px 0 12px}
html[data-device-mode="mobile"] .detail-summary .eyebrow{font-size:9px;letter-spacing:.1em}
html[data-device-mode="mobile"] .detail-meta{justify-content:flex-start;gap:6px}
html[data-device-mode="mobile"] .detail-meta span{font-size:10px;padding:5px 8px}
html[data-device-mode="mobile"] .detail-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:16px 0;font-size:13px}
html[data-device-mode="mobile"] .detail-actions{grid-template-columns:1fr 1fr;gap:8px}
html[data-device-mode="mobile"] .detail-actions button{font-size:11px;padding:10px 8px;min-height:46px}
html[data-device-mode="mobile"] .detail-series-area{margin-top:22px}
html[data-device-mode="mobile"] .detail-section-title{gap:6px}.detail-section-title h2{line-height:1.3}
@media(min-width:650px){html[data-device-mode="mobile"] .detail-summary{grid-template-columns:110px minmax(0,1fr);align-items:center}html[data-device-mode="mobile"] .detail-summary .detail-poster{width:110px}html[data-device-mode="mobile"] .detail-summary h1{font-size:30px}}
@media(max-height:650px){html[data-device-mode="tv"] .detail-summary{grid-template-columns:70px minmax(0,1fr);gap:18px}html[data-device-mode="tv"] .detail-panel{padding:18px 22px}html[data-device-mode="tv"] .detail-description{margin:12px 0}html[data-device-mode="tv"] .detail-series-area{margin-top:18px}html[data-device-mode="tv"] .detail-shell{margin-top:2vh}html[data-device-mode="tv"] .episode-card{min-height:104px;padding-left:112px}html[data-device-mode="tv"] .episode-thumb{width:90px}html[data-device-mode="tv"] .detail-panel h1{font-size:28px;margin:8px 0 12px}}
