/* Dedicated remote-first TV workspace. Fire TV's 1080p output is 960x540 logical pixels. */
@media (min-width:600px) {
 body.tv { --tv-nav:116px; --tv-text:12px; --tv-safe-x:clamp(24px,5vw,64px); --tv-safe-y:clamp(12px,4vh,24px); --tv-header:36px; overflow:hidden }
 body.tv.sidebar-collapsed { --tv-nav:56px }
 body.tv .sidebar { inset:var(--tv-safe-y) auto var(--tv-safe-y) var(--tv-safe-x); height:auto; width:var(--tv-nav); padding:8px 6px; overflow-y:auto; scrollbar-width:none; border:1px solid #293848; border-radius:10px; background:#0d1824 }
 body.tv .sidebar-header { display:flex; min-height:30px; margin-bottom:10px; gap:4px }
 body.tv .sidebar nav .mobile-secondary { display:flex }
 body.tv .sidebar #open-more { display:none }
 body.tv .sidebar-header .brand-wordmark { width:68px }
 body.tv .sidebar-header .sidebar-toggle { display:flex; width:22px; height:24px; flex-basis:22px; padding:2px }
 body.tv.sidebar-collapsed .sidebar-header { flex-direction:column; min-height:56px; gap:6px; margin-bottom:6px }
 body.tv .nav-label,body.tv .nav-label-inner { font-size:8px; margin:0 8px 8px }
 body.tv .sidebar nav { gap:3px }
 body.tv .nav-item { min-height:32px; gap:7px; font-size:var(--tv-text); padding:6px; border-radius:6px }
 body.tv .nav-item .nav-icon { width:17px; height:17px }
 body.tv .nav-separator { margin:7px 6px }
 body.tv .sidebar-bottom { padding-top:6px }
 body.tv .platform { padding:10px 8px 0; font-size:8px }
 body.tv main { margin:var(--tv-safe-y) var(--tv-safe-x) 0 calc(var(--tv-safe-x) + var(--tv-nav) + 10px); height:calc(100dvh - 2 * var(--tv-safe-y)); min-width:0; display:flex; flex-direction:column; overflow:hidden }
 body.tv .topbar { height:var(--tv-header); min-height:var(--tv-header); flex:none; padding:0 10px; gap:10px; border-radius:8px 8px 0 0 }
 body.tv .topbar-right { gap:12px }
 body.tv .breadcrumb { gap:8px }
 body.tv .breadcrumb>span:first-child { max-width:190px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:9px }
 body.tv .source-button { padding:4px 8px; min-height:26px; font-size:11px; max-width:150px }
 body.tv .quick-settings { min-height:26px; padding:4px 7px; font-size:11px }
 body.tv .profile-button { font-size:12px }
 body.tv #player-app .button { min-height:30px; padding:6px 10px; font-size:12px }
 body.tv dialog { max-height:calc(100dvh - 2 * var(--tv-safe-y)); padding:18px; border-radius:12px }
 body.tv .dialog-header h2 { font-size:20px }
 body.tv dialog input,body.tv dialog select { min-height:32px; padding:6px 8px; font-size:12px }
 body.tv .avatar { width:24px; height:24px; border-radius:6px }
 body.tv .main-content { flex:1; min-height:0; width:100%; max-width:none; margin:0; padding:8px 10px; overflow:auto; overscroll-behavior:contain; scroll-behavior:auto; scrollbar-width:thin }
 body.tv .page-intro { margin-bottom:8px; gap:10px }
 body.tv .page-intro h1 { font-size:20px; line-height:1.15; margin-bottom:3px; letter-spacing:-.4px }
 body.tv.home-view .page-intro { display:none }
 body.tv .page-intro .eyebrow,body.tv .page-footer,body.tv .catalog-saved { display:none }
 body.tv .page-intro p:last-child { font-size:10px }
 body.tv .toolbar { gap:6px; margin-bottom:6px; flex-wrap:wrap }
 body.tv .toolbar .search { flex-basis:100%; min-height:28px }
 body.tv .toolbar .search input { min-height:28px; padding:5px 7px; font-size:12px }
 body.tv .toolbar>select { min-height:26px; font-size:11px; padding:4px 6px }
 body.tv:not(.live-regia) .toolbar { flex-wrap:nowrap }
 body.tv:not(.live-regia) .toolbar .search { flex:1; min-width:100px; flex-basis:auto }
 body.tv:not(.live-regia) .toolbar>select { flex:0 1 130px; min-width:80px }
 body.tv .results-line { font-size:10px; margin:0 0 8px; gap:6px }
 body.tv.live-view { overflow:hidden }
 body.tv.live-view main { height:calc(100dvh - 2 * var(--tv-safe-y)); display:flex; flex-direction:column }
 body.tv.live-view .topbar { flex:none }
 body.tv.live-view .main-content { height:auto; min-height:0; display:flex; flex-direction:column; padding-bottom:8px; overflow:hidden }
 body.tv.live-view #browse-content { flex:1; min-height:0; display:flex; flex-direction:column }
 body.tv.live-view .page-intro { flex-shrink:0 }
 body.tv.live-view #library { flex:1; min-height:0; display:flex; flex-direction:column }
 body.tv.live-view .catalog-workspace.with-live-preview {
   flex:1; min-height:0; height:100%; gap:10px; align-items:stretch;
   grid-template-columns:clamp(154px,18vw,240px) minmax(220px,1.2fr) minmax(180px,.8fr);
   grid-template-areas:"categories results preview"; grid-template-rows:minmax(0,1fr)
 }
 body.tv.live-view.live-regia .catalog-workspace.with-live-preview {
   grid-template-columns:clamp(154px,18vw,240px) minmax(180px,.8fr) minmax(240px,1.2fr);
   grid-template-areas:"categories preview results"
 }
 body.tv.live-view .with-live-preview .category-browser { grid-area:categories; position:relative; top:0; height:100%; min-height:0; display:flex; flex-direction:column; border-radius:10px }
 body.tv .category-browser h2 { font-size:12px; padding:11px 10px }
 body.tv.live-view .category-browser-body { display:flex; flex-direction:column; flex:1; min-height:0; padding:0 8px 8px }
 body.tv .category-search-label { font-size:10px; gap:5px; margin-bottom:6px }
 body.tv .category-search-label input { min-height:28px; font-size:11px; padding:5px 7px; border-radius:6px }
 body.tv .category-browser-body>#all-categories { font-size:11px; min-height:28px; width:100%; padding:6px; margin-bottom:4px }
 body.tv.live-view .category-options { flex:1; height:auto; min-height:0; max-height:none; overflow:auto; overscroll-behavior:contain }
 body.tv .category-track>.category-choice { min-height:34px; height:auto; padding:6px; font-size:12px; border-radius:6px }
 body.tv .category-choice>span:first-child { line-height:1.35 }
 body.tv .category-choice small { font-size:10px }
 body.tv.live-view .with-live-preview .catalog-results { grid-area:results; position:relative; top:0; height:100%; min-height:0; display:flex; flex-direction:column; padding:8px; border-radius:10px; overflow:hidden }
 body.tv.live-view .live-channel-scroll { display:block; flex:1; height:auto; min-height:0; max-height:none; overflow:auto; overscroll-behavior:contain; overflow-anchor:none; scrollbar-width:thin }
 /* Stable width prevents measured short lists from cycling through scrollbar estimates. */
 body.tv.tv-app.live-view .live-channel-scroll { scrollbar-gutter:stable }
 body.tv.live-view .channel-grid.compact-channels { grid-template-columns:1fr; gap:6px }
 body.tv.live-view .compact-channels .channel-row { height:auto; min-height:44px; padding:2px; border-radius:6px }
 body.tv.live-view .catalog-viewport .compact-channels .channel-row { min-height:44px }
 body.tv.live-view .channel-row-play { min-height:38px; gap:6px; padding:4px }
 body.tv.live-view .channel-position { min-width:18px; font-size:10px }
 body.tv.live-view .channel-row-art { width:24px; height:24px; border-radius:4px }
 body.tv.live-view .channel-row-copy { gap:3px }
 body.tv.live-view .channel-row-copy strong { font-size:12px; line-height:1.3; white-space:normal; overflow-wrap:anywhere }
 body.tv.live-view .channel-row-copy small { font-size:10px; line-height:1.3; white-space:normal }
 body.tv.live-view .channel-row-favorite { min-width:24px; min-height:32px; font-size:18px }
 body.tv.live-view .with-live-preview .live-preview { grid-area:preview; position:relative; top:0; margin:0; width:100%; max-width:none; height:100%; min-height:0; overflow:auto; border-radius:10px }
 body.tv.live-view .live-preview:not(.is-expanded) .live-preview-heading { padding:8px 10px; font-size:8px }
 body.tv.live-view .live-preview:not(.is-expanded) .live-preview-screen { aspect-ratio:16/9; min-height:90px; max-height:160px; height:auto }
 body.tv #live-preview-placeholder { padding:10px; font-size:12px }
 body.tv #live-preview-placeholder .nav-icon { width:26px; height:26px }
 body.tv .live-preview-copy { padding:10px 11px 7px }
 body.tv .live-preview-copy h2 { font-size:15px; line-height:1.25; margin-bottom:5px; overflow-wrap:anywhere }
 body.tv .live-preview-copy p { font-size:10px; line-height:1.4 }
 body.tv .live-preview-actions { padding:0 10px 8px; gap:6px; flex-wrap:nowrap }
 body.tv .live-preview-actions .primary { min-width:0; flex:1 }
 body.tv .live-preview-actions .button { min-height:28px; font-size:11px; padding:5px 8px }
 body.tv .live-channel-navigation { padding:0 10px 9px; gap:6px }
 body.tv .live-channel-navigation .button { min-height:30px; padding:6px; font-size:10px }
 body.tv .preview-epg { margin:0 10px 10px; gap:0; grid-template-columns:1fr }
 body.tv .preview-epg-programme { padding:9px 0 }
 body.tv .preview-epg-programme h3 { font-size:12px; line-height:1.35 }
 body.tv .preview-epg-programme p { font-size:10px; line-height:1.4 }
 body.tv .home-stage { grid-template-columns:minmax(0,1.7fr) minmax(190px,1fr); gap:10px; margin-bottom:8px; height:clamp(136px,25dvh,180px) }
 body.tv .home-theatre { min-height:0; border-radius:12px }
 body.tv .home-spotlight { min-height:0 }
 body.tv .home-spotlight-copy { padding:8px 12px }
 body.tv .home-spotlight h2 { font-size:20px; line-height:1.1; margin-bottom:4px; max-width:94%; -webkit-line-clamp:2 }
 body.tv .home-spotlight-overline,body.tv .home-spotlight-description { display:none }
 body.tv .home-spotlight-meta { margin-bottom:4px; font-size:10px; line-height:1.3; -webkit-line-clamp:1 }
 body.tv .home-spotlight-actions { margin-top:2px; gap:6px }
 body.tv .home-spotlight-progress { margin-bottom:4px }
 body.tv .home-watch { min-height:28px; padding:5px 10px; font-size:12px }
 body.tv .home-save { min-height:28px; width:28px; font-size:18px }
 body.tv .home-spotlight-tabs { min-height:22px; padding:0 8px 3px }
 body.tv .home-spotlight-tab { min-height:20px; padding:2px 7px; font-size:10px }
 body.tv .home-live-desk { padding:6px 10px; border-radius:10px }
 body.tv .home-live-heading h2 { font-size:14px; line-height:1.2; margin-bottom:3px }
 body.tv .home-live-heading { flex:none }
 body.tv .home-live-eyebrow { display:none }
 body.tv .home-live-item { min-height:28px; padding:3px 0; gap:7px }
 body.tv .home-live-logo { width:22px; height:22px; border-radius:4px }
 body.tv .home-live-copy { gap:2px }
 body.tv .home-live-copy strong { font-size:12px; line-height:1.15 }
 body.tv .home-live-programme { font-size:10px; line-height:1.1 }
 body.tv .home-live-timing { display:none }
 body.tv .home-live-play { width:20px; height:20px; font-size:10px }
 body.tv .home-guide-link { flex:none; min-height:20px; padding:2px 0 0; font-size:11px }
 body.tv .home-destinations { gap:8px; margin-bottom:6px }
 body.tv .home-destination { min-height:34px; padding:6px 10px; border-radius:7px; background:#132231 }
 body.tv .home-destination-art,body.tv .home-destination-copy small { display:none }
 body.tv .home-destination-copy strong { font-size:15px }
 body.tv .home-destination-arrow { width:20px; height:20px; font-size:12px }
 body.tv .home-player-tools { gap:8px; margin:0 0 10px }
 body.tv .home-player-tool { min-height:26px; padding:4px 8px; border-radius:6px }
 body.tv .home-tool-icon { width:20px; height:20px; font-size:14px; border-radius:5px }
 body.tv .home-tool-copy strong { font-size:11px }
 body.tv .home-tool-copy small { display:none }
 body.tv .home-row { gap:12px; scroll-behavior:auto }
 body.tv.home-view .home-row>.channel-card { flex:0 0 clamp(100px,11vw,160px); min-width:100px }
 body.tv .home-row { padding:3px 3px 8px; scroll-snap-type:none }
 body.tv .home-section { margin-bottom:16px }
 body.tv .home-section .section-heading { margin-bottom:6px }
 body.tv .home-section .section-heading h2 { font-size:16px }
 body.tv .home-row-kicker { display:none }
 body.tv .channel-art { border-radius:7px; aspect-ratio:3/4 }
 body.tv .channel-art::before { display:none }
 body.tv .channel-name { font-size:12px }
 body.tv .channel-group { font-size:10px }
 body.tv .channel-info { padding-top:5px }
 body.tv .favorite-button { width:24px; height:24px; right:5px; top:5px; font-size:15px }
 body.tv .home-row-arrow { width:24px; height:24px; min-height:24px; font-size:17px }
 body.tv .catalog-workspace:not(.with-live-preview) { grid-template-columns:clamp(154px,18vw,240px) minmax(0,1fr); gap:12px }
 body.tv .catalog-workspace:not(.with-live-preview) .category-browser { position:sticky; top:0; display:flex; flex-direction:column; height:calc(100dvh - 180px); min-height:180px }
 body.tv .catalog-workspace:not(.with-live-preview) .category-browser-body { display:flex; flex-direction:column; flex:1; min-height:0 }
 body.tv .catalog-workspace:not(.with-live-preview) .category-options { flex:1; min-height:0; max-height:none; overflow:auto }
 body.tv .catalog-results .channel-grid:not(.compact-channels):not(.guide-mode) { grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:10px }
 body.tv .detail-page .detail-title { font-size:26px }
 body.tv .detail-page .button { min-height:30px; padding:6px 10px; font-size:12px }
 body.tv .playback-failure { width:330px; max-height:210px; right:14px; bottom:14px; padding:14px 16px; gap:10px; border-radius:10px; animation:none; box-shadow:none }
 body.tv .playback-failure-copy h2 { font-size:15px; margin-bottom:7px }
 body.tv .playback-failure-copy>p:last-child { font-size:11px; line-height:1.4 }
 body.tv .playback-failure-actions .button,body.tv .playback-failure-actions .text-button { min-height:32px; font-size:11px; padding:7px 9px }
 body.tv .sidebar,body.tv .category-browser,body.tv .home-live-desk,body.tv .home-theatre,body.tv .home-destination,body.tv .channel-card,body.tv .channel-row { box-shadow:none; backdrop-filter:none }
 body.tv .favorite-button { backdrop-filter:none; background:#101a26 }
 body.tv .nav-item,body.tv .channel-row,body.tv .channel-card,body.tv .home-watch,body.tv .home-save,body.tv .home-player-tool,body.tv .home-destination { transition:none }
 body.tv .channel-card:hover,body.tv .channel-card:focus-within { transform:none }
 body.tv .play-card { overflow:visible; border-radius:0; box-shadow:none }
 body.tv :focus-visible { outline:2px solid var(--accent); outline-offset:2px; box-shadow:none }
 body.tv .category-choice:focus-visible,body.tv .channel-row-play:focus-visible { outline-offset:-2px; background:#263c30 }
 body.tv .channel-row-art img:not([src]),body.tv .home-live-logo img:not([src]) { opacity:0 }
 body.tv dialog::backdrop { backdrop-filter:none }
 body.tv .home-accent-line { box-shadow:none }
 body.tv .home-spotlight h2 { text-wrap:wrap }
}

/* Smaller logical TV viewports retain the same remote-friendly three panes. */
@media (min-width:600px) and (max-width:899px) {
 body.tv { --tv-nav:52px }
 body.tv .sidebar { width:var(--tv-nav); padding:8px 4px }
 body.tv .sidebar nav { flex-direction:column; overflow:visible }
 body.tv .nav-item { min-width:0; min-height:30px; width:100%; flex-direction:row; justify-content:center }
 body.tv .nav-item>span:not(.nav-icon),body.tv .sidebar-header .brand,body.tv .nav-label,body.tv .nav-label-inner,body.tv .nav-separator,body.tv .platform { display:none }
 body.tv .sidebar-header { flex-direction:column; gap:4px }
 body.tv .sidebar-header .brand { display:inline-flex; flex:none }
 body.tv .sidebar-header .brand .brand-lockup { display:none }
 body.tv .sidebar-header .brand .brand-symbol { display:inline-grid; width:22px; height:22px }
 body.tv .sidebar-header .brand .brand-symbol img { width:22px; height:22px }
 body.tv .sidebar-header .sidebar-toggle { width:20px; height:20px; flex-basis:20px }
 body.tv .sidebar-bottom { display:block }
 body.tv main { margin-left:calc(var(--tv-safe-x) + var(--tv-nav) + 10px); padding-bottom:0 }
 body.tv.live-view .catalog-workspace.with-live-preview,body.tv.live-view.live-regia .catalog-workspace.with-live-preview { grid-template-columns:minmax(108px,.8fr) minmax(135px,1fr) minmax(155px,1.15fr); gap:8px }
 body.tv.live-view .category-browser-body { display:flex }
 body.tv.live-view .category-options { grid-column:auto; overflow-x:hidden; overflow-y:auto }
 body.tv.live-view .category-track>.category-choice { width:100%; top:0; border:0; background:none }
 body.tv .home-stage { grid-template-columns:minmax(0,1.5fr) minmax(160px,1fr) }
 body.tv .home-live-heading { display:block; margin-bottom:0 }
 body.tv .home-live-list { display:flex; flex-direction:column; gap:0 }
 body.tv .home-live-item { align-items:center; padding:3px 0; min-height:28px }
 body.tv .home-spotlight h2 { font-size:20px }
 body.tv .home-spotlight-copy { padding:8px 10px }
}

@media (min-width:600px) and (max-height:450px) {
 body.tv .home-stage { height:112px }
 body.tv .home-spotlight h2 { font-size:18px }
 body.tv .home-live-item:nth-child(n+3) { display:none }
 body.tv .home-spotlight-tabs { min-height:20px }
}

/* TV editorial layout. One scale for navigation, controls, artwork and content. */
@media (min-width:600px) {
 body.tv { --tv-nav:116px; --tv-safe-x:clamp(20px,3.3vw,48px); --tv-safe-y:clamp(14px,3vh,24px); --tv-header:34px; --tv-text:12px; --tv-poster-min:104px; --tv-poster-gap:14px; --tv-poster-title:12px; --tv-home-poster:108px; --tv-category-min:34px; --tv-category-font:12px; --tv-channel-min:42px; --tv-row-min:46px; --tv-channel-title:13px; --tv-channel-caption:11px; --tv-episode-min:96px; --tv-episode-title:13px; --tv-caption:11px; background:#080e18; color:#edf4ff }
 body.tv.sidebar-collapsed { --tv-nav:54px }
 :root[data-content-density=compact] body.tv { --tv-poster-min:92px; --tv-home-poster:96px; --tv-category-min:32px; --tv-category-font:11px; --tv-channel-min:38px; --tv-row-min:42px; --tv-channel-title:12px; --tv-channel-caption:10px; --tv-episode-min:88px; --tv-episode-title:12px; --tv-caption:10px }
 :root[data-content-density=spacious] body.tv { --tv-poster-min:144px; --tv-home-poster:124px; --tv-category-min:38px; --tv-category-font:13px; --tv-channel-min:48px; --tv-row-min:54px; --tv-channel-title:14px; --tv-channel-caption:12px; --tv-episode-min:112px; --tv-episode-title:14px; --tv-caption:12px }
 body.tv .sidebar { padding:12px 6px; border:1px solid #21354b; border-radius:16px; background:#0e1a29; box-shadow:none }
 body.tv .sidebar-header { margin-bottom:14px }
 body.tv .sidebar-header .brand-wordmark { width:68px }
 body.tv .nav-item { position:relative; min-height:35px; border-radius:9px; padding:7px 8px; color:#afc0d3; font-weight:550; font-size:11.5px }
 body.tv.sidebar-collapsed .sidebar .nav-item { width:100%; min-height:35px; padding:7px 6px }
 body.tv.sidebar-collapsed .sidebar .nav-icon { width:17px; height:17px }
 body.tv.sidebar-collapsed .sidebar .nav-separator { margin:8px 6px }
 body.tv .nav-item.selected { background:#1c3036; color:#dbffa9 }
 body.tv .nav-item.selected::before { content:""; position:absolute; left:0; top:10px; bottom:10px; width:2px; background:var(--accent) }
 body.tv .nav-label,body.tv .nav-label-inner { color:#7790a9; font-size:8px; letter-spacing:.16em }
 body.tv .nav-separator { border-color:#25384a; margin:8px 6px }
 body.tv main { margin-left:calc(var(--tv-safe-x) + var(--tv-nav) + 14px) }
 body.tv .topbar { background:transparent; border:0; padding:0 3px; border-radius:0 }
 body.tv .breadcrumb { font-size:13px; color:#edf4ff }
 body.tv .breadcrumb>span:first-child { color:#91a7bd; letter-spacing:.12em; font-size:9px }
 body.tv .topbar-right { gap:10px }
 body.tv #clock { display:none }
 body.tv .source-button,body.tv .quick-settings { min-height:27px; border:1px solid #294056; border-radius:8px; background:#102033; padding:5px 8px; font-size:11px }
 body.tv .avatar { width:26px; height:26px; border-radius:9px }
 body.tv .main-content { padding:8px 3px; scrollbar-color:#355069 transparent }
 body.tv .page-intro { min-height:27px; margin:0 0 8px; gap:12px; align-items:center }
 body.tv .page-intro>div { display:flex; align-items:baseline; gap:12px; min-width:0 }
 body.tv .page-intro h1 { flex:none; font-size:23px; font-weight:650; letter-spacing:-.7px; line-height:1.15; margin:0 }
 body.tv .page-intro #source-label { font-size:10px; line-height:1.4; color:#91a8bf; margin:0; min-width:0; max-width:42ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
 body.tv #refresh-catalog { display:none }
 body.tv .platform { gap:5px; padding:8px 4px 0; white-space:nowrap; overflow:hidden }
 body.tv #platform-label { display:none }
 body.tv .platform .version { font-size:8px; margin:0 }
 body.tv #player-app .button { min-height:32px; padding:7px 12px; font-size:12px; border-radius:8px }
 body.tv :is(.sidebar,.category-browser,.catalog-results,.live-preview,.home-theatre,.home-live-desk,.channel-card,.channel-row) { box-shadow:none; backdrop-filter:none }
 body.tv :is(.nav-item,.channel-row,.channel-card,.home-watch,.home-save,.home-player-tool,.home-destination) { transition:none }
 body.tv .channel-card:hover,body.tv .channel-card:focus-within { transform:none }
 body.tv :focus-visible { outline:2px solid var(--accent); outline-offset:3px; box-shadow:none }
 body.tv .nav-item:focus-visible { background:#263c4a; color:#fff }
 body.tv .category-choice:focus-visible,body.tv .channel-row-play:focus-visible { outline-offset:-2px; background:#213d3b }
 body.tv .catalog-workspace:not(.with-live-preview) { grid-template-columns:164px minmax(0,1fr); gap:16px }
 body.tv .catalog-workspace:not(.with-live-preview) .category-browser { position:sticky; top:0; display:flex; flex-direction:column; height:calc(100dvh - 166px); min-height:160px }
 body.tv .category-browser { border:1px solid #23394f; border-radius:13px; background:#0e1c2b }
 body.tv .category-browser h2 { padding:12px 10px; font-size:13px; color:#d8e7f5 }
 body.tv .category-browser-body { display:flex; flex-direction:column; flex:1; min-height:0; padding:0 8px 8px }
 body.tv .category-options { flex:1; min-height:0; max-height:none; overflow:auto }
 body.tv .category-search-label { color:#8ea6bd; font-size:10px }
 body.tv .category-search-label input { min-height:29px; border-radius:7px; background:#0b1521; border-color:#30465b }
 body.tv .category-choice[aria-pressed=true] { background:#203b39; color:#d9ffad; box-shadow:inset 2px 0 var(--accent) }
 body.tv .catalog-results { background:transparent; border:0; padding:0 }
 body.tv .toolbar { gap:7px; margin:0 0 6px; flex-wrap:nowrap }
 body.tv .toolbar .search { flex:1; flex-basis:auto; min-width:0 }
 body.tv .toolbar .search { min-height:31px; background:#102033; border:1px solid #2a4158; border-radius:8px }
 body.tv .toolbar .search input { min-height:29px; padding:6px 8px; font-size:12px }
 body.tv .toolbar>select { min-height:31px; border-radius:8px; border-color:#2a4158; background:#102033; font-size:11px }
 body.tv .results-line { font-size:10px; line-height:1.3; margin:0 0 8px; color:#8ea6bc }
 :root[data-content-density] body.tv #player-app .catalog-results .catalog-viewport>.channel-grid:not(.compact-channels):not(.guide-mode) { grid-template-columns:repeat(auto-fill,minmax(var(--tv-poster-min),1fr)); gap:var(--tv-poster-gap) }
 :root[data-content-density] body.tv #player-app .catalog-results .channel-grid:not(.compact-channels):not(.guide-mode)>.channel-card { width:100%; max-width:150px; justify-self:center }
 :root[data-content-density] body.tv #player-app .catalog-results .channel-grid:not(.compact-channels):not(.guide-mode) .channel-name { white-space:normal; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere }
 body.tv .channel-art { aspect-ratio:2/3; border:0; border-radius:0; overflow:visible; background:#142b40; transition:none }
 body.tv .channel-art::before { display:none }
 body.tv .channel-art::after { content:""; display:block; position:absolute; inset:0; pointer-events:none; background:url('assets/tv-theatre-corners.png') center/100% 100% no-repeat }
 body.tv .channel-art img { object-fit:cover }
 body.tv .channel-info { padding:8px 1px 0 }
 :root[data-content-density] body.tv #player-app .channel-info { height:auto; min-height:0 }
 :root[data-content-density] body.tv #player-app .channel-name { font-size:var(--tv-poster-title); line-height:1.35; font-weight:600 }
 body.tv .channel-group { font-size:10px; line-height:1.5; color:#91a9bf; margin-top:3px }
 body.tv .favorite-button { width:25px; height:25px; top:6px; right:6px; border:0; border-radius:0; backdrop-filter:none; background:transparent url('assets/tv-favorite.png') center/100% 100% no-repeat; font-size:16px }
 body.tv .channel-card .play-card:focus-visible { border-radius:8px; outline-offset:4px }
 :root[data-content-density] body.tv #player-app .category-track>.category-choice { min-height:var(--tv-category-min); height:auto; padding:7px 8px; font-size:var(--tv-category-font); border-radius:7px }
 :root[data-content-density] body.tv #player-app .category-choice>span:first-child { font-size:inherit; line-height:1.4 }
 /* Home: a generous hero, a live desk and two full-width action rows. */
 /* Do not inherit desktop gradients/masks on repeated TV surfaces. Only the
    small action panels, functional icons and the focused control draw curves. */
 body.tv.home-view #home-content :where(:not(.favorite-button,.home-save,.home-tool-icon,.max-icon-art)),body.tv.home-view #home-content :where(:not(.favorite-button,.home-save,.home-tool-icon,.max-icon-art))::before,body.tv.home-view #home-content :where(:not(.favorite-button,.home-save,.home-tool-icon,.max-icon-art))::after { background-image:none; border-radius:0; box-shadow:none; filter:none; backdrop-filter:none; mask-image:none; -webkit-mask-image:none }
 body.tv.home-view #home-content :where(:not(.favorite-button,.home-save))::before,body.tv.home-view #home-content :where(:not(.favorite-button,.home-save))::after { display:none }
 body.tv.home-view #home-content .channel-art { background:#142b40 }
 body.tv.home-view #home-content .channel-card:not(.live-card) .channel-art { border-radius:0; overflow:visible; background:#142b40 }
 body.tv.home-view #home-content .channel-card:not(.live-card) .channel-art img { inset:0; width:100%; height:100% }
 body.tv.home-view #home-content .channel-art::after { display:none }
 body.tv.home-view #home-content .tv-home-stage { grid-template-columns:minmax(0,1.65fr) minmax(210px,1fr); height:clamp(186px,36vh,232px); gap:14px; margin:0 0 14px }
 body.tv.home-view #home-content .home-theatre { display:grid; grid-template-rows:minmax(0,1fr) 28px; min-height:0; height:100%; border:1px solid #253f57; border-radius:12px; background:#102236; overflow:hidden; box-shadow:none; contain:layout paint; will-change:transform }
 body.tv.home-view #home-content .home-spotlight { min-height:0 }
 body.tv.home-view #home-content .home-spotlight-art { background:#142e49; filter:none }
 body.tv.home-view #home-content .home-spotlight-art::after { display:block; right:35%; background:#0a1522 }
 body.tv.home-view #home-content .home-spotlight-art img { opacity:1; width:100%; object-position:75% 35% }
 body.tv.home-view #home-content .home-spotlight-art.portrait-source img { width:38%; right:0; object-fit:cover; object-position:center 30%; opacity:1 }
 body.tv.home-view #home-content .home-spotlight-copy { padding:14px 18px; justify-content:center }
 body.tv.home-view #home-content .home-spotlight-overline { display:flex; flex-shrink:0; font-size:8px; letter-spacing:.15em; margin:0 0 6px; gap:7px; color:#b6d3ec }
 body.tv.home-view #home-content .home-accent-line { width:16px; box-shadow:none }
 body.tv.home-view #home-content .home-spotlight h2 { flex-shrink:0; font-size:24px; line-height:1.15; font-weight:650; letter-spacing:-.6px; max-width:62%; margin:0 0 9px; text-wrap:wrap; -webkit-line-clamp:2 }
 body.tv.home-view #home-content .home-spotlight-meta { flex-shrink:0; font-size:10px; line-height:1.4; max-width:80%; margin:0 0 8px; -webkit-line-clamp:1 }
 body.tv.home-view #home-content .home-spotlight-description { display:none }
 body.tv.home-view #home-content .home-spotlight-actions { flex-shrink:0; margin:0; gap:8px }
 body.tv.home-view #home-content .home-watch { min-height:32px; padding:7px 12px; font-size:12px; border:0; border-radius:6px; color:#17250f; background:var(--accent) }
 body.tv.home-view #home-content .home-save { min-height:32px; height:32px; width:32px; font-size:18px; border:1px solid #36516a; border-radius:9px; background:#102235 }
 body.tv.home-view #home-content .home-spotlight-progress { flex-shrink:0; margin:0 0 8px; width:65% }
 body.tv.home-view #home-content .home-spotlight-tabs { min-height:28px; padding:0 14px; gap:14px; background:#0d1928 }
 body.tv.home-view #home-content .home-spotlight-tab { min-height:25px; font-size:10px; padding:3px 0; border:0; border-radius:0; border-bottom:2px solid transparent; background:none }
 body.tv.home-view #home-content .home-spotlight-tab[aria-pressed=true] { color:var(--accent); border-bottom-color:var(--accent) }
 body.tv.home-view #home-content .home-spotlight-tab::before { display:none }
 body.tv.home-view #home-content .home-live-desk { padding:12px; border:1px solid #253f57; border-radius:12px; overflow:visible; background:#0e1c2b; box-shadow:none }
 body.tv.home-view #home-content .home-live-heading { display:flex; align-items:center; justify-content:space-between; margin:0 0 7px; gap:6px }
 body.tv.home-view #home-content .home-live-heading h2 { flex:1; font-size:17px; margin:0; color:#f1f6fc; white-space:nowrap }
 body.tv.home-view #home-content .home-live-eyebrow { display:none }
 body.tv.home-view #home-content .home-live-desk>h2 { font-size:17px; line-height:1.25; margin:0 0 8px }
 body.tv.home-view #home-content .home-live-empty { font-size:11px; line-height:1.5; margin:0 0 8px }
 body.tv.home-view #home-content .home-guide-link { flex:0 0 auto; width:auto; min-height:24px; padding:4px 0; font-size:10px; color:#80c1ff }
 body.tv.home-view #home-content .home-live-list { flex:1; min-height:0; gap:0 }
 body.tv.home-view #home-content .home-live-item { min-height:42px; flex:1; gap:8px; padding:6px 2px; border-top:1px solid #263a4e; border-radius:0 }
 body.tv.home-view #home-content .home-live-logo { width:29px; height:29px; border:0; border-radius:5px; overflow:visible; background:#183149; font-size:11px }
 body.tv.home-view #home-content .home-live-logo img { inset:3px; width:calc(100% - 6px); height:calc(100% - 6px) }
 body.tv.home-view #home-content .home-live-copy { gap:3px }
 body.tv.home-view #home-content .home-live-copy strong { font-size:12px; line-height:1.3 }
 body.tv.home-view #home-content .home-live-programme { font-size:11px; line-height:1.3 }
 body.tv.home-view #home-content .home-live-timing { display:none }
 body.tv.home-view #home-content .home-live-play { border:0; width:16px; height:20px; color:var(--accent) }
 body.tv.home-view #home-content .home-destinations { height:auto; margin:0 0 9px; padding:0; gap:10px; background:none }
 body.tv.home-view #home-content .home-destination { min-height:49px; padding:10px 13px; border:1px solid #2b4962; border-radius:10px; background:#13283d; overflow:visible }
 body.tv.home-view #home-content .home-destination::after { display:none }
 body.tv.home-view #home-content .home-destination-art { display:none }
 body.tv.home-view #home-content .home-destination-icon { display:block; width:29px; height:29px; flex:none; margin-right:10px }
 body.tv.home-view #home-content .home-destination-copy { flex:1 }
 body.tv.home-view #home-content .home-destination-copy strong { font-size:15px; line-height:1.25; font-weight:600 }
 body.tv.home-view #home-content .home-destination-copy small { display:none }
 body.tv.home-view #home-content .home-destination-arrow { width:24px; height:24px; border:0; font-size:17px; color:#8bc7ff; background:none }
 body.tv.home-view #home-content .home-player-tools { display:flex; justify-content:flex-start; gap:10px; margin:0 0 18px }
 body.tv.home-view #home-content .home-player-tool { flex:0 1 200px; min-height:31px; padding:6px 10px; gap:8px; border:1px solid #293e54; border-radius:7px; background:#0c1928 }
 body.tv.home-view #home-content .home-tool-icon { width:18px; height:18px; font-size:15px; border-radius:0; background:none; color:#a7c9e6 }
 body.tv.home-view #home-content .home-tool-copy strong { font-size:11px; white-space:nowrap }
 body.tv.home-view #home-content .home-tool-copy small,body.tv.home-view #home-content .home-tool-arrow { display:none }
 body.tv.home-view #home-content .home-section { margin-bottom:20px; contain:layout style }
 body.tv.home-view #home-content .section-heading { margin-bottom:9px; min-height:23px }
 body.tv.home-view #home-content .section-heading h2 { font-size:17px; font-weight:600; color:#edf5ff }
 body.tv.home-view #home-content .home-row-arrow,body.tv.home-view #home-content .home-row-kicker { display:none }
 body.tv.home-view #home-content .home-row { gap:14px; padding:4px 4px 9px; scroll-snap-type:none; scroll-behavior:auto }
 body.tv.home-view #home-content .favorite-button { border-radius:8px; background:#101a26 }
 body.tv.home-view #home-content :is(.favorite-button,.home-save)[aria-pressed=true] { background:#1e3828; border-color:#b9f76c88; color:#b9f76c }
 body.tv .resume-card .channel-art,body.tv .live-card .channel-art { aspect-ratio:16/9 }
 :root[data-content-density] body.tv #home-content .home-row>.channel-card { flex:0 0 var(--tv-home-poster); min-width:var(--tv-home-poster) }
 body.tv.home-view #home-content :is(.home-watch,.home-save,.home-player-tool,.home-destination,.favorite-button,.play-card):focus-visible { border-radius:8px }
 /* One frame around the complete card, rather than two nested focus rings
    over the arriving poster texture. Small action buttons keep their curves. */
 body.tv.home-view #home-content .channel-card:focus-within .channel-art { outline:none }
 body.tv.home-view #home-content .play-card:focus-visible { border-radius:0 }
 /* Live keeps its native video surface inside the preview, with readable lists. */
 body.tv.live-view .page-intro { margin-bottom:8px }
 body.tv.live-view .page-intro h1 { font-size:23px; margin:0 }
 body.tv.live-view .catalog-workspace.with-live-preview { gap:12px; grid-template-columns:clamp(148px,17vw,180px) minmax(252px,1.15fr) minmax(252px,1.1fr) }
 body.tv.live-view.live-regia .catalog-workspace.with-live-preview { grid-template-columns:clamp(148px,17vw,180px) minmax(252px,1.1fr) minmax(252px,1.15fr) }
 body.tv.live-view .with-live-preview :is(.category-browser,.catalog-results,.live-preview) { border:1px solid #263f56; border-radius:13px; background:#0e1c2b }
 body.tv.live-view .with-live-preview .catalog-results { padding:10px }
 body.tv.live-view .channel-grid.compact-channels { gap:6px }
 :root[data-content-density] body.tv #player-app .compact-channels .channel-row { min-height:var(--tv-row-min); height:auto; padding:2px; background:#102235; border:0; border-radius:8px }
 :root[data-content-density] body.tv #player-app .channel-row-play { min-height:var(--tv-channel-min); padding:5px 6px; gap:8px; border-radius:7px }
 :root[data-content-density] body.tv #player-app .channel-row-copy strong { font-size:var(--tv-channel-title); line-height:1.35; font-weight:550 }
 :root[data-content-density] body.tv #player-app .channel-row-copy small { font-size:var(--tv-channel-caption); line-height:1.35; color:#99b2c9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
 body.tv.live-view .channel-row.is-current { background:#203c37; box-shadow:inset 2px 0 var(--accent) }
 body.tv.live-view .channel-row-art { width:28px; height:28px; border-radius:6px; background:#18344b }
 body.tv.live-view .channel-position { min-width:16px; font-size:10px; color:#7e9ab3 }
 body.tv.live-view .channel-row-favorite { width:27px; min-width:27px; border-radius:6px; color:#9cb5cc }
 body.tv.live-view .live-preview:not(.is-expanded) .live-preview-heading { min-height:29px; padding:7px 10px; gap:7px; font-size:8px; line-height:1.25; letter-spacing:.1em; color:#9ab7d0 }
 body.tv .live-preview-badge { padding:3px 5px; font-size:8px; border-radius:4px }
 body.tv.live-view .live-preview:not(.is-expanded) .live-preview-screen { aspect-ratio:16/9; min-height:90px; max-height:none; background:#060a10 }
 body.tv #live-preview-placeholder { background:#0b1720; gap:6px }
 body.tv #live-preview-placeholder .nav-icon { width:28px; height:28px; margin:0 }
 body.tv #live-preview-placeholder p { font-size:14px; margin:0; line-height:1.3 }
 body.tv #live-preview-placeholder small { max-width:26ch; font-size:10px; line-height:1.4 }
 body.tv .live-preview-copy { padding:10px 11px 7px }
 body.tv .live-preview-copy h2 { font-size:14px; margin:0 0 5px }
 body.tv #live-preview-hint { font-size:10px; line-height:1.4 }
 body.tv #player-app .live-preview-actions .button,body.tv #player-app .live-channel-navigation .button { min-height:28px; padding:5px 8px; font-size:10px }
 body.tv .preview-epg { padding:11px 12px }
 body.tv .preview-epg-programme h3 { font-size:12px; line-height:1.4 }
 body.tv .preview-epg-programme p { font-size:11px; color:#94adc3 }
 /* Detail pages use a poster/copy grid and measured, naturally wrapping episodes. */
 body.tv .detail-page { padding:0 0 18px }
 body.tv .detail-back { min-height:26px; padding:4px 0; margin:0 0 8px; font-size:12px; color:#b4cce2 }
 body.tv .detail-layout { grid-template-columns:108px minmax(0,1fr); gap:22px; align-items:start; padding-bottom:14px }
 body.tv .detail-poster { position:relative; border:0; border-radius:0; overflow:visible; background:transparent url('assets/tv-poster-frame.png') center/100% 100% no-repeat; box-shadow:none }
 body.tv .detail-poster img { position:absolute; inset:4px; width:calc(100% - 8px); height:calc(100% - 8px) }
 body.tv .detail-page .detail-backdrop { inset:0 0 auto; height:230px; max-height:230px; opacity:.4; filter:none; mask-image:none; -webkit-mask-image:none; border-radius:0 }
 body.tv .detail-page::before { inset:0 0 auto; height:230px; background:url('assets/tv-detail-shade.svg') center/100% 100% no-repeat }
 body.tv .detail-page #detail-title { font-size:27px; line-height:1.1; letter-spacing:-.6px; margin:3px 0 8px }
 body.tv .detail-page #detail-kind { font-size:9px; line-height:1.25; margin:0 0 6px }
 body.tv .detail-meta { font-size:11px; line-height:1.5; margin:0 }
 body.tv .detail-primary-actions .detail-actions { gap:8px; margin:9px 0 }
 body.tv .detail-synopsis { font-size:11.5px; line-height:1.5; max-width:80ch; margin:8px 0 }
 body.tv .detail-people { display:flex; flex-wrap:wrap; align-items:baseline; font-size:10px; line-height:1.5; gap:4px 10px; margin:8px 0 0 }
 body.tv .detail-people dd { margin:0 12px 0 0 }
 body.tv .detail-content { padding-top:10px }
 body.tv .detail-content .series-tabs { gap:8px; margin:0; padding:3px 2px 9px }
 body.tv .detail-content .form-hint { font-size:10px; line-height:1.4; margin:4px 0 10px }
 body.tv #detail-dialog .button { border:0; border-radius:0; background:transparent url('assets/tv-tool.png') center/100% 100% no-repeat; box-shadow:none; transition:none }
 body.tv #detail-dialog .button.primary { background-image:url('assets/tv-primary.png'); color:#17220f }
 body.tv .detail-content .season-tab { min-height:28px; padding:5px 12px; font-size:11px; line-height:1.4; border:0; border-radius:0; background:transparent url('assets/tv-tool.png') center/100% 100% no-repeat }
 body.tv .detail-content .season-tab.selected { background-image:url('assets/tv-primary.png'); color:#17220f }
 body.tv .episode-grid { gap:10px; contain:layout style; will-change:transform }
 :root[data-content-density] body.tv #player-app .detail-page .episode-row { grid-template-columns:var(--tv-episode-art,96px) minmax(0,1fr) var(--tv-episode-actions,104px); height:auto; min-height:var(--tv-episode-min); padding:0; gap:14px; margin:0; border:10px solid transparent; border-image:url('assets/tv-live-desk.png') 12 fill stretch; border-radius:0; overflow:visible; background:none; box-shadow:none }
 body.tv .episode-image { width:96px; min-width:96px; height:58px; flex:none; border-radius:0; overflow:visible; background:transparent url('assets/tv-landscape-frame.png') center/100% 100% no-repeat; box-shadow:none }
 body.tv .episode-image img { inset:3px; width:calc(100% - 6px); height:calc(100% - 6px) }
 :root[data-content-density] body.tv #player-app .episode-info h3 { font-size:var(--tv-episode-title); line-height:1.35 }
 :root[data-content-density] body.tv #player-app .episode-info small,:root[data-content-density] body.tv #player-app .episode-description { font-size:var(--tv-caption); line-height:1.45 }
 body.tv .episode-actions { display:flex; grid-column:auto; flex-direction:column; gap:6px; flex:none; min-width:0 }
 body.tv .episode-actions>button { min-height:28px; padding:5px 8px; font-size:11px }
 body.tv .episode-actions .watched-toggle { min-height:24px; padding:4px 6px; font-size:10px; border:0; border-radius:0; background:none; color:#a2bdd4 }
 body.tv #detail-dialog :is(.button,.watched-toggle,.season-tab):focus-visible { border-radius:8px }
 body.tv .episode-progress { height:3px; margin-top:6px }
 body.tv .guide-mode { grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:14px }
 body.tv .guide-mode .channel-card { height:198px; min-height:0; padding:11px; border:1px solid #263f56; border-radius:12px; background:#0e1c2b }
 body.tv .guide-mode .play-card { display:flex; flex-direction:row; align-items:center; gap:9px; min-height:54px; padding:4px 25px 4px 0 }
 body.tv .guide-mode .channel-art { flex:none; width:38px; height:38px; min-height:38px; max-height:38px; aspect-ratio:auto; border-radius:7px; background:#19344a }
 body.tv .guide-mode .channel-art img { object-fit:contain }
 body.tv .guide-mode .channel-info { min-width:0; max-width:none; padding:0; flex:1 }
 body.tv .guide-mode .channel-name { font-size:12px }
 body.tv .guide-mode .channel-initials { font-size:14px }
 body.tv .guide-mode .card-tag { font-size:8px; padding:1px 3px; left:2px; bottom:2px }
 body.tv .guide-programme { font-size:11px; line-height:1.4; padding:7px 0 }
 body.tv .guide-programme span { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; white-space:normal }
 body.tv .guide-open { min-height:27px; padding:5px 0; font-size:10px }
 /* Settings retain normal control sizes and a deliberate three-choice preview. */
 body.tv dialog { width:min(680px,calc(100vw - 2 * var(--tv-safe-x))); max-width:calc(100vw - 2 * var(--tv-safe-x)); padding:20px 22px; background:#0e1c2b; border:1px solid #35516a; border-radius:16px; font-size:12px; box-shadow:none }
 body.tv dialog::backdrop { backdrop-filter:none }
 body.tv dialog .dialog-header { margin-bottom:16px; gap:12px }
 body.tv dialog .dialog-header h2 { font-size:23px; line-height:1.2 }
 body.tv dialog h3 { font-size:15px; line-height:1.35 }
 body.tv dialog label { font-size:12px; line-height:1.5 }
 body.tv dialog .form-hint,body.tv dialog .muted { font-size:11px; line-height:1.5 }
 body.tv dialog .icon-button { width:30px; height:30px; min-width:30px; min-height:30px; font-size:20px; border-radius:9px }
 body.tv dialog input:not([type=checkbox]),body.tv dialog select { min-height:32px; padding:7px 9px; font-size:12px; border-radius:8px }
 body.tv dialog input[type=checkbox] { width:17px; height:17px; min-height:17px; min-width:17px; padding:0; flex:none }
 body.tv dialog .stack { gap:12px }
 body.tv .account-summary { padding:14px; gap:14px; margin-bottom:16px; border-radius:12px }
 body.tv .account-orbit { width:42px; height:42px; border-radius:12px }
 body.tv .account-orbit img { width:32px; height:32px }
 body.tv .account-actions { gap:8px }
 body.tv dialog .account-actions .button { min-height:34px; padding:7px 10px; font-size:12px; border-radius:9px }
 body.tv .profile-list { grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:12px }
 body.tv .profile-choice,body.tv .profile-option,body.tv .list-choice { padding:12px; border-radius:11px; min-height:0 }
 body.tv .profile-option .avatar { width:36px; height:36px; font-size:18px }
 body.tv .appearance-options { gap:10px }
 body.tv .appearance-choice { min-height:0; padding:9px; gap:7px; border-radius:10px }
 body.tv .appearance-sample { height:36px; border-radius:6px }
 body.tv .appearance-choice strong { font-size:12px }
 body.tv .appearance-description { font-size:10px; line-height:1.45 }
 body.tv .appearance-label { font-size:11px; margin:16px 0 9px }
 body.tv .discovery-choice { min-height:40px; padding:11px; border-radius:10px; font-size:12px }
 body.tv .discovery-heading h2 { font-size:24px }
 body.tv .discovery-result-art { width:72px; border-radius:8px }
 body.tv #catalog-download-dialog { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; border:0; border-radius:0 }
 body.tv .playback-failure { width:330px; max-height:220px; right:24px; bottom:24px; padding:16px; gap:10px; border-radius:13px; animation:none; box-shadow:none }
 body.tv .playback-failure-copy h2 { font-size:16px }
 body.tv .playback-failure-copy>p:last-child { font-size:12px; line-height:1.45 }
}
@media (min-width:600px) and (max-width:899px) {
 body.tv,body.tv.sidebar-collapsed { --tv-nav:48px; --tv-safe-x:clamp(20px,3.3vw,48px); --tv-episode-art:76px; --tv-episode-actions:96px }
 body.tv main { margin-left:calc(var(--tv-safe-x) + var(--tv-nav) + 14px) }
 body.tv.home-view #home-content .tv-home-stage { grid-template-columns:minmax(0,1.55fr) minmax(185px,1fr); gap:10px }
 body.tv.home-view #home-content .home-spotlight-copy { padding:12px }
 body.tv.home-view #home-content .home-spotlight h2 { font-size:22px; max-width:62% }
 body.tv.home-view #home-content .home-live-desk { padding:10px }
 body.tv.home-view #home-content .home-destination { min-height:46px; padding:9px 11px }
 body.tv .catalog-workspace:not(.with-live-preview) { grid-template-columns:126px minmax(0,1fr); gap:12px }
 body.tv.live-view .catalog-workspace.with-live-preview { grid-template-columns:minmax(108px,.8fr) minmax(180px,1.2fr) minmax(170px,1.1fr); gap:8px }
 body.tv.live-view.live-regia .catalog-workspace.with-live-preview { grid-template-columns:minmax(108px,.8fr) minmax(170px,1.1fr) minmax(180px,1.2fr); gap:8px }
 body.tv .detail-layout { grid-template-columns:96px minmax(0,1fr); gap:16px }
 body.tv .detail-page #detail-title { font-size:24px }
 body.tv .episode-image { width:76px; min-width:76px; height:46px }
}
@media (min-width:600px) and (max-height:450px) {
 body.tv { --tv-header:28px }
 body.tv .sidebar .nav-item,body.tv.sidebar-collapsed .sidebar .nav-item { min-height:28px; padding:5px 6px; font-size:11px }
 body.tv .sidebar .nav-label,body.tv .sidebar .nav-label-inner { display:none }
 body.tv .sidebar-header { min-height:26px; margin-bottom:6px }
 body.tv.sidebar-collapsed .sidebar-header { min-height:44px; gap:4px; margin-bottom:6px }
 body.tv.sidebar-collapsed .sidebar-header .brand-symbol,body.tv.sidebar-collapsed .sidebar-header .brand-symbol img { width:20px; height:20px }
 body.tv.sidebar-collapsed .sidebar-header .sidebar-toggle { width:20px; height:20px; flex-basis:20px; padding:2px }
 body.tv .main-content { padding:6px 3px }
 body.tv #player-app .page-intro { min-height:24px; margin-bottom:6px }
 body.tv #player-app .page-intro h1 { font-size:20px; line-height:24px }
 body.tv #player-app .page-intro #source-label { font-size:9px }
 body.tv .toolbar .search,body.tv .toolbar>select { min-height:28px }
 body.tv .toolbar .search input { min-height:26px; padding:4px 8px }
 body.tv .results-line { font-size:9px; margin-bottom:6px }
 body.tv.home-view #home-content .tv-home-stage { height:156px }
 body.tv.home-view #home-content .home-spotlight-overline { display:none }
 body.tv.home-view #home-content .home-spotlight h2 { font-size:21px; margin-bottom:6px }
 body.tv.home-view #home-content .home-live-item { min-height:34px; padding:4px 2px }
 body.tv.home-view #home-content .home-live-item:nth-child(n+3) { display:none }
}

@media (min-width:600px) {
 /* Remote controls stay compact; touch targets on phones keep their own sizes. */
 body.tv #player-app :is(.favorite-button,.channel-row-favorite,.home-save,.detail-favorite) { box-sizing:border-box; width:32px; height:32px; min-width:32px; min-height:32px; line-height:0; gap:0; box-shadow:none; transition:none }
 body.tv #player-app :is(.favorite-button,.channel-row-favorite) { width:28px; height:28px; min-width:28px; min-height:28px }
 body.tv #player-app :is(.channel-row-favorite,.home-save,.detail-favorite) { position:relative }
 body.tv #player-app :is(.favorite-button,.channel-row-favorite,.home-save,.detail-favorite)::before { position:absolute; left:50%; top:50%; right:auto; bottom:auto; transform:translate(-50%,-50%); width:18px; height:18px; margin:0; padding:0; line-height:0 }
 body.tv.home-view #home-content .home-tool-icon .max-icon-art { display:block; width:18px; height:18px }
}
