/* Larger hit targets, visible remote focus and comfortable TV overscan margins. */
.tv-mode body {font-size:18px;}
.tv-mode header {padding:18px max(5vw,36px); min-height:78px; gap:16px;}
.tv-mode header .brand {font-size:30px;}
.tv-mode main {padding:25px max(5vw,36px) 55px; max-width:1800px;}
.tv-mode .tv-help {padding:9px max(5vw,36px);background:#191b2a;color:#e1d2ff;font-size:14px;letter-spacing:.3px;}
.tv-mode button {padding:12px 19px;min-height:54px;font-size:17px;}
.tv-mode .grid {grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:17px;}
.tv-mode .card {padding:14px;}
.tv-mode .card.poster img {height:255px;}
.tv-mode .card h2 {font-size:19px;margin:9px 0;}
.tv-mode .card p {font-size:14px;}
.tv-mode input {min-height:54px;font-size:19px;}
.tv-mode input[type=search] {min-width:360px;}
.tv-mode dialog {width:min(1240px,90vw);max-height:90vh;overflow-y:auto;}
.tv-mode button:focus,.tv-mode input:focus,.tv-mode a:focus,.tv-mode select:focus {outline:4px solid #ffe94f!important;outline-offset:3px;box-shadow:0 0 0 7px #0007;background-color:#473566;}
.tv-mode button.active:focus {color:#171022;background:#e0d3ff;}
.tv-mode #embed {min-height:420px;}
@media(max-width:900px){.tv-mode .tv-help{font-size:12px}.tv-mode input[type=search]{min-width:200px}.tv-mode header{gap:8px}.tv-mode .card.poster img{height:190px}}

/* TV video playback fix */
.tv-mode #embed{background:#000;display:block;width:100%;max-width:100%;height:auto;min-height:420px;}
.tv-mode #test-clip{display:block;background:#000;width:100%;max-width:100%;min-height:300px;max-height:65vh;}
.tv-mode #playback-tools button,.tv-mode #test-actions button{background:#3b295b;border-color:#8067ae;}

/* CSS fullscreen fallback when WebView refuses the browser fullscreen API. */
.tv-mode #player.tv-fullscreen{width:100vw;max-width:100vw;height:100vh;max-height:100vh;min-height:100vh;margin:0;border:0;border-radius:0;padding:10px 24px;overflow:auto;}
.tv-mode #player.tv-fullscreen #embed{height:calc(100vh - 145px);min-height:0;aspect-ratio:auto;}
.tv-mode #player.tv-fullscreen #test-clip{height:calc(100vh - 155px);max-height:none;}

/* R6: clean, remote-friendly header — browse, series and search in one row. */
.tv-mode header nav {display:flex;align-items:center;gap:10px;width:100%;margin-right:0;}
.tv-mode .header-search {display:flex;align-items:center;gap:10px;margin:0 0 0 8px;flex-wrap:wrap;min-width:0;}
.tv-mode .header-search input {min-width:260px;width:clamp(260px,30vw,470px);}
.tv-mode .header-search button {white-space:nowrap;}
@media(max-width:900px) {
  .tv-mode .header-search {margin-left:0;gap:8px;}
  .tv-mode .header-search input {min-width:180px;width:clamp(180px,32vw,340px);}
}

/* R7: six evenly sized movie/series posters, no descriptions below them. */
.tv-mode #content.grid {grid-template-columns:repeat(6,minmax(0,1fr));gap:16px;}
.tv-mode #content .poster-tile {padding:0;min-height:0;border-radius:12px;}
.tv-mode #content .poster-tile:focus {outline:4px solid #ffe94f!important;outline-offset:2px;box-shadow:0 0 0 7px #0007;transform:scale(1.025);z-index:1;}
@media(max-width:900px){.tv-mode #content.grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}}
@media(max-width:540px){.tv-mode #content.grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
