/* HB MSX 0.1.9 RC1: explicit geometry for older TV web engines. */
.player-screen { position:relative; background:#000 !important; }
.player-screen > video {
  position:absolute; left:0; top:0; right:0; bottom:0;
  display:block; width:100%; height:100%; object-fit:contain;
  opacity:1; background:#000; transition:none; transform:none;
}
.player-screen > video.hidden { display:none !important; }
.player-screen #player-overlay {
  position:absolute; left:0; top:0; right:0; bottom:0;
  width:100%; height:100%; max-width:100%; z-index:20;
  display:flex; flex-direction:column; justify-content:space-between;
}
.player-topbar { flex:0 0 auto; padding:3vh 3vw; background:linear-gradient(rgba(0,0,0,.85),transparent); }
.player-topbar #player-title { font-size:1.8vw; line-height:1.25; margin:0 1.3vw; }
.player-bottom { flex:0 0 auto; width:100%; padding:5vh 3vw 3vh; background:linear-gradient(transparent,rgba(0,0,0,.92) 38%); }
.player-screen #player-overlay button { font-size:1.3vw; min-height:6vh; padding:1.2vh 1.2vw; margin-right:.7vw; margin-bottom:.7vh; }
#player-status { font-size:1.35vw; }
#player-position { font-size:1.3vw; margin-left:1.4vw; }
#player-seek { height:4vh; }
#player-pause { min-width:10em; }
#player-live-label { font-size:1.3vw; margin-right:1vw; }
.player-screen #player-overlay.overlay-hidden,
.player-screen #player-overlay.overlay-hidden:focus-within {
  opacity:0 !important; visibility:hidden !important; pointer-events:none !important;
}
.player-screen #player-overlay.overlay-hidden * { visibility:hidden !important; pointer-events:none !important; }
.live-video-frame, .live-video-frame:focus { transform:none !important; }
.live-video-frame video, .live-video-frame video.preview-visible {
  display:block; width:100%; height:100%; opacity:1; transition:none; transform:none; object-fit:contain;
}
.live-preview-page .detail-header { height:12vh; }
.live-preview-page .live-video-frame { height:46vh; border-radius:0; }
.live-preview-page .detail-header h2 { font-size:2vw; max-width:47vw; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.epg-panel { height:33vh; padding-top:1.5vh; }
.epg-panel h3 { font-size:2vw; line-height:1.2; margin-bottom:1vh; }
#live-epg-list { padding:4px 4px 1vh; }
.epg-row { flex:0 0 32%; min-width:32%; height:23vh; padding:1.5vh 1.1vw; background:#102e40; }
.epg-row:focus { transform:none; box-shadow:inset 0 0 0 3px #fff; }
.epg-time { font-size:1.5vw; }
.epg-copy h4 { font-size:1.65vw; line-height:1.25; margin:1vh 0; max-height:3.75em; overflow:hidden; }
.epg-copy p { font-size:1.2vw; line-height:1.35; max-height:2.7em; overflow:hidden; }
.fullscreen-hint { font-size:1vw; background:rgba(6,19,29,.85); }
.lg-tv .screen { background:#071b48; background:radial-gradient(circle at 80% 5%,#123c83 0,#061a55 52%,#040f30 100%); }
.lg-tv .sidebar .nav-item { font-size:1.15vw; min-height:0; height:6vh; }

.lg-tv .catalog-grid .card span { font-size:1.15vw; }
.lg-tv .category-list button.category { font-size:1.2vw; }
.lg-tv .settings-grid { display:flex; }
.lg-tv .settings-grid .settings-card { width:48%; margin-right:2%; margin-bottom:2vh; }
.lg-tv .settings-grid .action-card,.lg-tv .settings-grid .speed-card { width:100%; margin-right:0; }
.lg-tv .settings-actions button.focusable { font-size:1.15vw; margin:.5vh .5vw; }
.lg-tv .settings-card h3 { font-size:1.5vw; }
.lg-tv .info-row span,.lg-tv .info-row strong,.lg-tv .speed-card p { font-size:1.2vw; }
.lg-tv .login-panel h1 { font-size:2vw; }
.lg-tv .login-brand h2 { font-size:1.65vw; }
.lg-tv .login-brand p,.lg-tv .login-panel .auth-card label { font-size:1.3vw; }
.lg-tv .login-panel .auth-card button { font-size:1.2vw; }
.lg-tv .login-panel .auth-card small,.lg-tv .login-panel #server-status { font-size:1.1vw; }
.lg-tv .login-panel .auth-card { width:100%; }
.lg-tv .card span { background-color:transparent; }
.lg-tv .card-live span { background:#06131d; }
.lg-tv .player-screen { background:#000 !important; }
.lg-tv .player-screen .focusable:focus { transform:none; }
.lg-tv #hb-transport-status { font-size:1vw; }
.lg-tv #hb-transport-status.hb-transport-ok { background:#102b36; }
body.player-active #hb-transport-status { display:none; }
@media(max-width:800px) {
  .player-screen #player-overlay button,#player-position,#player-status { font-size:14px; }
  .player-topbar #player-title { font-size:18px; }
  .epg-time { font-size:16px; } .epg-copy h4 { font-size:18px; }
}

/* 0.1.9 RC3: stable live video layer, always mounted outside screen swaps. */
#live-preview-video{position:fixed;z-index:10;pointer-events:none;object-fit:contain;background:#000;opacity:1;transition:none;transform:none;display:none;}
#live-video-action{z-index:auto!important;transform:none!important;}
#live-video-action .fullscreen-hint{z-index:11;}

/* 0.1.9 RC4: the lists screen contains only assigned account lists. */
.catalog-grid.playlist-grid{display:flex;flex-direction:column;flex-wrap:nowrap;align-content:stretch;align-items:stretch;width:100%;padding:1vh .5vw;}
.playlist-grid .list-row{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;width:96%;min-height:12vh;margin:1vh 1%;padding:2vh 2vw;font-size:1.5vw;background:#12364e;border:2px solid #37647b;text-align:left;}
.playlist-grid .list-row span{font-size:1.2vw;margin-left:2vw;}
.playlist-grid .list-active{background:#135579;border-color:#55c9f4;}
.playlist-grid .notice{font-size:1.5vw;}

.detail-buttons{flex-wrap:wrap;}#detail-episodes{margin-left:1vw;font-size:1.15vw;}

/* 1.0.2: independent account rows, remote-focusable deletion, home expiration. */
.playlist-grid .list-entry{display:flex;align-items:stretch;flex:0 0 auto;width:98%;margin:1vh 1%;}
.playlist-grid .list-entry .list-row{flex:1 1 auto;width:auto;min-width:0;margin:0;}
.playlist-grid .list-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:74%;}
.playlist-grid .list-row span{flex:0 0 auto;white-space:nowrap;}
.playlist-grid .list-delete{flex:0 0 72px;min-width:72px;margin-left:12px;border:2px solid #b65b65;border-radius:12px;background:#362034;color:#fff;}
.playlist-grid .add-server{align-self:flex-start;min-height:56px;margin:0 1% 1vh;padding:14px 22px;font-size:20px;background:#12516b;}
.list-dialog{position:fixed;left:0;top:0;right:0;bottom:0;z-index:2000;background:rgba(0,0,0,.85);display:flex;align-items:center;justify-content:center;}
.list-dialog-card{width:76%;max-width:900px;padding:30px;background:#102951;border:2px solid #60ccff;border-radius:18px;}
.list-dialog-card h2{font-size:28px;}.list-dialog-card p{font-size:22px;line-height:1.5;}.list-dialog-card button{font-size:20px;padding:16px;margin:12px;}.list-delete-confirm{background:#782a40;}

/* 1.0.3: discreet expiry beside the clock in every sidebar. */
.side-footer .side-meta{display:flex;align-items:baseline;gap:.6vw;flex-wrap:wrap;}
.side-footer .footer-expiry{font-size:12px;font-size:clamp(12px,.85vw,17px);color:#9bb2cc;white-space:nowrap;}

/* 1.0.11: consistent vector icons across all sidebar actions. */
.sidebar .nav-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 1.4vw;width:1.4vw;height:1.4vw;margin-right:.9vw;line-height:1;}
.sidebar .nav-icon svg{display:block;width:100%;height:100%;overflow:visible;}

/* 1.0.11: readable expiry and search instructions at TV viewing distance. */
.side-footer .footer-expiry{font-size:18px;font-size:clamp(18px,1.15vw,23px);font-weight:600;color:#e5f4ff;line-height:1.4;}
.side-footer .clock{font-size:18px;font-size:clamp(18px,1.1vw,22px);line-height:1.4;}
.side-footer .side-meta{gap:4px 10px;}
.catalog-grid .search-welcome{grid-column:1/-1;align-self:start;padding:5vh 2vw;max-width:1000px;}
.search-welcome h2{font-size:30px;font-size:clamp(28px,2.25vw,44px);line-height:1.25;margin:0 0 2vh;color:#fff;}
.search-welcome p{font-size:24px;font-size:clamp(22px,1.6vw,32px);line-height:1.5;margin:0 0 2vh;color:#e5f4ff;}
.search-welcome .search-tip{font-size:20px;font-size:clamp(18px,1.2vw,24px);color:#aecdff;max-width:42em;}

/* 1.0.11: an accessible remote control target for clearing search. */
#catalog-search-clear{min-height:44px;min-width:88px;font-size:18px;font-size:clamp(16px,1.05vw,21px);}

.search-next-page{grid-column:1/-1;font-size:20px;padding:18px;margin:12px 0;background:#145976;color:white;border:1px solid #83d7f4;border-radius:12px;min-height:48px;}

/* 1.0.15: matching prominence, independent rows, no squeezed expiry. */
.side-footer .side-meta{flex-direction:column;align-items:flex-start;gap:2px;}
.side-footer .clock,.side-footer .footer-expiry{font-size:20px;font-size:clamp(20px,1.25vw,26px);font-weight:700;color:#e5f4ff;line-height:1.35;}
.side-footer .footer-expiry{white-space:normal;overflow-wrap:break-word;max-width:100%;}
