/* TV-only presentation. Values are CSS pixels: Chromecast renders 960 × 540 at 1080p. */
html.tv-mode{--top-nav-height:56px;--poster-width:clamp(106px,11.8vw,210px)!important;font-size:16px;overflow-x:hidden;scroll-padding-top:72px}
html.tv-mode body{margin:0;padding-bottom:0;overflow-x:hidden}
html.tv-mode[data-theme] body :is(h1,h2,h3,p,button,label,input,select,textarea,summary,small,strong,span,li,td,th,dt,dd,a,.media-title,.preference-row strong){font-family:Arial,"Segoe UI",sans-serif!important;font-style:normal!important;letter-spacing:normal!important}
html.tv-mode body :is(h1,h2,h3,strong){font-weight:600!important}
html.tv-mode body :is(p,small,label){font-weight:400!important}
html.tv-mode :is(button,a,summary,input,select,textarea):focus-visible{outline:2px solid var(--accent);outline-offset:3px;box-shadow:0 0 0 4px #0009;position:relative;z-index:25}
html.tv-mode :is(.media-open,.plex-collection-cover,.need-show-card):focus-visible{outline:2px solid var(--accent)!important;outline-offset:3px;filter:none}
html.tv-mode .media-open:focus-visible .poster-hover{opacity:0}
html.tv-mode .tv-remote-focus:focus{outline:2px solid var(--accent)!important;outline-offset:3px;box-shadow:0 0 0 4px #0009!important;z-index:25}
html.tv-mode .plex-filter-menu button.tv-remote-focus:focus{outline-offset:-3px!important;box-shadow:none!important}
/* Persistent header and expanding navigation rail. No filter/containment may clip the rail. */
html.tv-mode .workspace>header,html.tv-mode .overview-mode .workspace>header{position:fixed;inset:0 0 auto;box-sizing:border-box;z-index:70;height:56px!important;min-height:56px!important;max-height:56px!important;padding:6px 28px!important;gap:16px;flex-wrap:nowrap;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;filter:none!important;transform:none!important;contain:none!important;overflow:visible!important}
html.tv-mode .workspace>header .stream-brand{flex:0 1 220px;width:220px;min-width:0;max-width:220px}
html.tv-mode .workspace>header .stream-brand-copy{min-width:0}
html.tv-mode .workspace>header :is(.theme-wordmark,.stream-brand-name){width:100%;height:28px;max-width:180px}
html.tv-mode .workspace>header .stream-brand-icon{width:30px!important;height:30px!important;flex-basis:30px!important;flex-shrink:0}
html.tv-mode .workspace>header :is(.brand-quote,.header-search),html.tv-mode #sidebar-collapse-toggle,html.tv-mode #library-menu-toggle{display:none!important}
html.tv-mode .workspace>header .stream-tools{margin-left:auto;gap:14px;flex-wrap:nowrap}
html.tv-mode .workspace>header .stream-tools>[data-home=Search]{display:inline-flex!important}
html.tv-mode .workspace>header .stream-tools button{width:34px;min-width:34px;height:34px;min-height:34px;padding:6px}
html.tv-mode .workspace>header .stream-tools .profile-avatar{width:34px;height:34px}
html.tv-mode[data-interface=plex] .workspace>header .stream-nav{position:fixed;inset:56px auto 0 0;display:flex!important;flex-direction:column;flex-wrap:nowrap;width:64px!important;height:calc(100dvh - 56px)!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;clip-path:none!important;mask-image:none!important;box-sizing:border-box;padding:12px 6px;gap:3px;background:var(--panel);z-index:72;scrollbar-width:none}
html.tv-mode .stream-nav::-webkit-scrollbar{display:none}
html.tv-mode[data-interface=plex] .workspace>header .stream-nav button{width:100%;height:40px;min-height:40px;flex-shrink:0;font-size:0!important;justify-content:center!important;padding:8px!important;gap:0!important;border-radius:4px;font-weight:500!important}
html.tv-mode[data-interface=plex] .plex-library-icon{margin:0;flex-shrink:0;width:24px;height:24px}
html.tv-mode[data-interface=plex] .plex-navigation-label{font-size:0!important;height:1px;min-height:1px;background:var(--line);margin:12px 6px}
html.tv-mode[data-interface=plex] .workspace>header .stream-nav:focus-within{width:210px!important;box-shadow:16px 0 35px #0008}
html.tv-mode[data-interface=plex] .workspace>header .stream-nav:focus-within button{font-size:16px!important;justify-content:flex-start!important;gap:14px!important}
html.tv-mode[data-interface=plex] .workspace>main{margin:56px 0 0 64px!important;width:calc(100% - 64px)!important;max-width:none;padding:18px 24px 36px;box-sizing:border-box;min-width:0}
html.tv-mode .workspace>main{scroll-margin-top:72px}
html.tv-mode .workspace>main .page-heading{min-height:0!important;padding:4px 0 12px!important;margin-bottom:12px}
html.tv-mode .workspace>main .page-heading h1{font-size:26px!important;line-height:1.2;margin:0 0 8px}
/* One scale for page menus, controls and disclosure panels in every theme. */
html.tv-mode #content :is(.text-choices,.page-subnav)>button,html.tv-mode .page-subnav.text-choices>button{font-size:16px!important;font-weight:500!important;line-height:1.3;min-height:34px;padding:7px 0}
html.tv-mode .page-subnav.text-choices{gap:20px;margin:0 0 16px}
html.tv-mode #content .section-heading{margin:0 0 12px}
html.tv-mode #content :is(.section-heading h2,.collection-column h2){font-size:19px!important;line-height:1.3}
html.tv-mode main :is(.primary,.secondary,.text-button,.light-button,.collection-actions button,.filter-dropdown>summary,.poster-view-options>summary,select){font-size:14px!important;line-height:1.35;min-height:34px;padding:7px 12px}
html.tv-mode main :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea){font-size:14px!important;padding:8px 10px;min-height:34px}
html.tv-mode main :is(.muted,.collection-meta,.collection-watched-progress){font-size:13px;line-height:1.45}
html.tv-mode main summary{font-size:15px!important;line-height:1.4}
html.tv-mode .panel{padding:18px;min-width:0}
html.tv-mode :is(.filter-dropdown>div,.poster-view-options>div){min-width:240px;max-width:calc(100vw - 110px)}
html.tv-mode .filter-dropdown button{font-size:14px!important;min-height:34px}
/* Consistent covers, text and action focus; long Select opens actions on TV. */
html.tv-mode #content :is(.media-grid,.horizontal-shelf,.continue-grid,.plex-collection-grid,.collection-column-grid){gap:22px 18px}
html.tv-mode #content :is(.media h3,.plex-collection-card h3){margin-top:8px;font-size:14px!important;line-height:1.35}
html.tv-mode :is(.media-title,.collection-title-button){font-size:inherit;line-height:1.35}
html.tv-mode #content :is(.media-meta,.media-year,.collection-meta){font-size:11px!important;min-height:18px;margin-top:3px}
html.tv-mode #content .media .poster-actions-toggle,html.tv-mode #content .media:focus-within .poster-actions-toggle{visibility:hidden!important;pointer-events:none}
html.tv-mode :is(.need-show-grid,.library-grid,.plex-collection-grid,.collection-column-grid){grid-template-columns:repeat(auto-fill,minmax(min(var(--poster-width),100%),var(--poster-width)));justify-content:start}
html.tv-mode .need-show-grid{gap:22px 18px!important;margin-top:18px}
html.tv-mode .need-show-info strong{font-size:14px!important;line-height:1.35}
html.tv-mode .need-show-info small{font-size:11px!important;line-height:1.4}
html.tv-mode .need-heading-actions{gap:12px}
html.tv-mode .need-show-art{aspect-ratio:2/3}
html.tv-mode .collection-detail-hero{gap:24px;padding:20px 0}
html.tv-mode .collection-hero-cover{width:var(--poster-width)}
html.tv-mode .collection-hero-info h2{font-size:30px!important;line-height:1.2}
html.tv-mode .collection-description{font-size:14px;max-width:65ch;line-height:1.5}
html.tv-mode .collection-actions{gap:12px;margin-top:18px}
html.tv-mode .collection-members-toolbar{padding:14px 0}
/* Featured title: no oversized typography or idle controls crowd the posters. */
html.tv-mode #feature-hero{scroll-margin-top:74px}
html.tv-mode .feature-stage,html.tv-mode .feature-loading{height:clamp(270px,54vh,440px)!important;min-height:0!important}
html.tv-mode .feature-stage .feature-copy{position:absolute;inset:0 auto 0 0;transform:none!important;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:8px;height:100%!important;min-height:0!important;width:58%;max-width:58%;padding:28px 36px;box-sizing:border-box}
html.tv-mode .feature-copy-text{width:100%}
html.tv-mode .feature-art,html.tv-mode .feature-video{object-position:72% center}
html.tv-mode .feature-art{opacity:1}
html.tv-mode .feature-shade{background:linear-gradient(90deg,#07090cf5 0%,#07090cd9 32%,#07090c59 64%,#07090c0a 100%),linear-gradient(0deg,#07090ca6,transparent 35%)}
html.tv-mode .feature-stage iframe{inset:0;width:100%;height:100%;min-height:0;aspect-ratio:auto;transform:none;pointer-events:none}
html.tv-mode .feature-copy .eyebrow{display:none}
html.tv-mode .feature-copy h2{font-size:clamp(28px,3vw,46px)!important;font-weight:600!important;line-height:1.15;margin:0 0 10px;letter-spacing:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html.tv-mode .feature-copy .feature-facts{font-size:11px!important;line-height:1.4;margin:0 0 7px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.tv-mode .feature-copy .feature-description{font-size:13px!important;line-height:1.5;margin:10px 0 16px;max-width:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html.tv-mode .feature-services .home-service-icons{margin:0}
html.tv-mode .feature-services .home-service-icon{width:18px;height:18px}
html.tv-mode .feature-actions{margin:0;gap:10px;flex-wrap:nowrap}
html.tv-mode .feature-actions button{font-size:14px!important;min-height:34px;padding:7px 12px;font-weight:500!important}
html.tv-mode #home-shortcuts{display:none}
html.tv-mode .feature-bottom-controls{display:flex;position:absolute;inset:auto 110px 16px auto;gap:8px;align-items:center;opacity:1}
html.tv-mode .feature-bottom-controls :is(#feature-position,#feature-preview-status){display:none}
html.tv-mode .feature-bottom-controls button{min-height:30px;padding:5px 10px;font-size:12px!important;line-height:1.3;border:1px solid #ffffff45;background:#07090cbf;color:#fff;border-radius:3px}
html.tv-mode .feature-bottom-controls button:disabled{display:none}
html.tv-mode .feature-arrow{top:auto;bottom:16px;transform:none;width:28px!important;min-width:28px!important;height:30px!important;min-height:30px!important;padding:4px;box-sizing:border-box;background:transparent;opacity:.7}
html.tv-mode .feature-arrow.previous{left:auto!important;right:62px!important}
html.tv-mode .feature-arrow.next{right:24px!important}
html.tv-mode .feature-arrow:focus-visible{opacity:1}
html.tv-mode .feature-stage:focus-within .feature-copy{opacity:1;pointer-events:auto}
html.tv-mode .feature-stage:focus-within .feature-shade{opacity:1}
html.tv-mode #content #popular-library{padding:0;margin:14px 0 26px}
html.tv-mode #popular-library .trending-posters{display:flex!important;overflow-x:auto!important;gap:18px;scrollbar-width:none}
html.tv-mode #popular-library .trending-posters>.media{flex:0 0 var(--poster-width);max-width:none;min-width:0}
html.tv-mode #content .trending-choices>button{font-size:18px!important}
html.tv-mode #content :is(#newly-added,#home-new-tv,#home-new-movies,#home-up-next,#home-watchlist,#home-just-released){padding-inline:0}
/* Filters and alphabet navigation fit the short TV viewport. */
html.tv-mode :is(.plex-library-bar,.plex-collection-toolbar,.collection-toolbar-controls,.compact-filters,.music-toolbar,.youtube-toolbar,.twitch-toolbar){gap:8px 12px;align-items:center;flex-wrap:wrap}
html.tv-mode .plex-library-bar{display:flex;margin:8px 0 18px;padding-bottom:12px}
html.tv-mode :is(.plex-library-bar,.plex-collection-toolbar,.collection-members-toolbar) :is(select,summary,input,button){font-size:14px!important;line-height:1.3;min-height:34px;padding:7px 10px}
html.tv-mode .plex-library-bar .plex-bar-select{flex:0 1 auto;width:auto;max-width:200px;margin:0}
html.tv-mode .plex-library-bar .plex-bar-select select{width:auto;min-width:110px;max-width:200px}
html.tv-mode .plex-library-bar #browse-library{min-width:142px}
html.tv-mode .plex-library-bar #search{flex:1 1 120px;min-width:100px;width:140px;max-width:200px}
html.tv-mode :is(#library-count,#collection-count){font-size:12px!important;margin:0;white-space:nowrap}
html.tv-mode :is(.saved-views-menu,.filter-dropdown)>summary{margin:0}
html.tv-mode .poster-view-options{display:none}
html.tv-mode .library-alphabet{top:72px;bottom:16px;right:5px;width:30px;padding:0;max-height:none}
html.tv-mode .alphabet-rail-buttons{min-height:0;height:100%;width:100%}
html.tv-mode .library-alphabet button{width:26px;height:auto;flex:1 1 0;min-height:0;max-height:18px;font-size:12px;line-height:1;padding:0}
html.tv-mode :is(.library-grid,.plex-collection-grid.has-alphabet){padding-right:34px}
/* Settings: readable labels and compact, consistent rows rather than desktop-sized panels. */
html.tv-mode .settings-pages{grid-template-columns:170px minmax(0,1fr);gap:24px}
html.tv-mode .settings-navigation{min-width:0}
html.tv-mode .settings-nav-group>p{font-size:10px!important;line-height:1.4;padding:0 10px;margin:10px 0 5px}
html.tv-mode .settings-nav-group>button,html.tv-mode .settings-navigation button{font-size:14px!important;line-height:1.3;min-height:34px;padding:8px 10px}
html.tv-mode .settings-nav-group{margin-bottom:12px;gap:2px}
html.tv-mode .settings-page-title{font-size:22px!important;margin-top:0}
html.tv-mode .settings-disclosure>summary{padding:14px 10px!important;min-height:44px;margin:0}
html.tv-mode .settings-disclosure>summary>span{font-size:16px!important;line-height:1.3}
html.tv-mode .settings-disclosure>summary small{font-size:12px!important;line-height:1.4}
html.tv-mode .settings-pages :is(.preference-row strong,label,strong){font-size:14px;line-height:1.4}
html.tv-mode .settings-pages :is(.preference-row small,.settings-context,p){font-size:12px!important;line-height:1.5}
html.tv-mode .settings-pages h2{font-size:20px!important}
html.tv-mode .settings-pages h3{font-size:16px!important}
html.tv-mode input:is([type=checkbox],[type=radio]){width:20px;height:20px;flex-shrink:0}
html.tv-mode .preference-row{gap:16px;padding-block:12px}
html.tv-mode .settings-pages .panel{padding:16px}
html.tv-mode .theme-options{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
html.tv-mode .theme-choice{font-size:14px!important}
/* Detail, calendar and player surfaces use the same scale. */
html.tv-mode dialog{width:min(860px,90vw);max-width:90vw;max-height:85vh;padding:22px;box-sizing:border-box}
html.tv-mode .avatar-picker h2{font-size:22px!important;line-height:1.3;margin-bottom:6px}
html.tv-mode .avatar-picker p,html.tv-mode .avatar-picker summary,html.tv-mode .avatar-picker label{font-size:14px!important;line-height:1.4}
html.tv-mode .avatar-picker .avatar-picker-current{width:56px;height:56px}
html.tv-mode .avatar-picker select{min-height:34px;padding:6px 10px;font-size:14px!important}
html.tv-mode .avatar-picker .selected-avatar-portrait{margin:10px 0;gap:14px}
html.tv-mode .avatar-picker .theme-avatar-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
html.tv-mode .avatar-picker .theme-avatar-grid img{max-width:88px}
html.tv-mode .avatar-picker .theme-avatar-grid span{font-size:12px!important}
html.tv-mode .avatar-picker button{min-height:34px;font-size:14px!important}
html.tv-mode .avatar-picker-actions{bottom:-22px;padding-top:10px;margin-top:10px}
html.tv-mode .detail-title,html.tv-mode .detail-heading h2{font-size:30px!important;line-height:1.2}
html.tv-mode .detail-summary{font-size:15px!important;line-height:1.55}
html.tv-mode .detail-heading>p,html.tv-mode .collection-watched-progress,html.tv-mode #collection-member-count{font-size:14px!important;line-height:1.5}
html.tv-mode .detail-links{gap:10px;flex-wrap:wrap}
html.tv-mode .detail-section h3{font-size:18px!important}
html.tv-mode .episode-title{font-size:15px!important}
html.tv-mode .episode-summary{font-size:13px!important}
html.tv-mode .calendar-period-controls{gap:6px;flex-wrap:wrap}
html.tv-mode .calendar-period-controls>button{font-size:14px!important;min-height:34px;padding:6px 10px}
html.tv-mode .calendar-day-heading :is(strong,time){font-size:13px!important}
html.tv-mode .calendar-show-title{font-size:12px!important;line-height:1.4}
html.tv-mode .classic-calendar-grid.week{grid-template-columns:repeat(7,minmax(105px,1fr));overflow-x:auto}
html.tv-mode :is(.youtube-card,.twitch-card) h3{font-size:14px!important}
html.tv-mode :is(.youtube-card,.twitch-card) .muted{font-size:12px!important}
html.tv-mode .music-toolbar :is(select,input){font-size:14px!important;min-height:34px}
html.tv-mode .auth-card{max-width:660px}
.tv-signin-code{display:block;font:700 46px/1.4 monospace;letter-spacing:.22em!important;color:var(--accent);margin:12px 0}
html.tv-mode #plex-login-status p{font-size:18px!important;line-height:1.5}
@media(min-width:1600px){html.tv-mode{font-size:18px}html.tv-mode .feature-copy .feature-description{font-size:18px!important}.tv-mode .feature-copy .feature-facts{font-size:15px!important}}

/* TV uses remote Back and complete scrolling rows. */
html.tv-mode .detail-close,html.tv-mode [data-tv-view-all]{display:none!important}

/* D-pad movement scrolls shelves directly; arrows are pointer affordances. */
html.tv-mode .shelf-arrow{display:none!important}

html.tv-mode .feature-video{object-position:center}
