/* Ajustes finais para painéis HD, Full HD e UHD do webOS. */
:root{--tv-gap:clamp(6px,.65vw,14px);--tv-text:clamp(14px,.92vw,20px)}
html,body{width:100%;height:100%;min-width:0;min-height:0;overflow:hidden}
body{font-size:var(--tv-text)}
main,section,aside,header,div{min-width:0;box-sizing:border-box}

/* Carregamento sempre inteiro, centralizado e dentro da área visível. */
.catalog-loading{inset:0!important;width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;padding:clamp(18px,4vh,54px) clamp(20px,4vw,76px)!important;overflow:hidden!important;justify-content:center!important;transform:none!important}
.loading-brand{width:clamp(92px,10vw,170px)!important;height:clamp(92px,10vw,170px)!important;margin:0 auto clamp(8px,1.5vh,20px)!important;flex:0 0 auto}
.catalog-loading h1{font-size:clamp(28px,2.4vw,48px)!important;line-height:1.1;margin:clamp(4px,1vh,12px) 0!important}
.catalog-loading>p{font-size:clamp(16px,1.15vw,24px)!important;margin:clamp(5px,1vh,12px) 0!important}
.loading-progress{width:min(720px,72vw)!important;height:clamp(7px,.8vh,12px)!important;margin:clamp(12px,2vh,24px) auto!important}
.loading-steps{width:min(820px,86vw)!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:clamp(8px,1vw,18px)!important}
.loading-steps article{width:auto!important;height:clamp(68px,9vh,105px)!important;padding:clamp(8px,1.1vh,14px) clamp(10px,1vw,18px)!important;gap:clamp(8px,.8vw,16px)!important}
.loading-steps article>b{width:clamp(30px,2.5vw,46px)!important;height:clamp(30px,2.5vw,46px)!important;font-size:clamp(14px,.9vw,19px)!important;flex:0 0 auto}
.loading-steps article strong{font-size:clamp(15px,1vw,21px)!important}.loading-steps article small,.loading-hint{font-size:clamp(12px,.78vw,16px)!important}.loading-hint{margin-top:clamp(12px,2.2vh,26px)!important}

/* Navegador de canais/filmes/séries ocupa exatamente a tela, sem sobras. */
.browser-view{inset:0!important;width:100vw!important;height:100vh!important;padding:0!important;overflow:hidden!important}
.browser-top{height:clamp(68px,9vh,104px)!important;padding:0 clamp(14px,2vw,38px)!important;gap:clamp(8px,1vw,20px)!important;overflow:hidden}
.browser-back,.browser-tab{height:clamp(44px,5.5vh,64px)!important;padding:0 clamp(12px,1.4vw,28px)!important;font-size:clamp(16px,1.2vw,24px)!important;white-space:nowrap}
.browser-search{width:clamp(220px,22vw,420px)!important;height:clamp(40px,4.8vh,58px)!important;padding:clamp(8px,1vh,13px) clamp(12px,1vw,20px)!important;font-size:clamp(14px,.95vw,19px)!important;flex:0 1 auto}
.browser-top .brand{flex:0 0 auto}
.browser-body{height:calc(100vh - clamp(68px,9vh,104px))!important;grid-template-columns:minmax(230px,23vw) minmax(280px,27vw) minmax(0,1fr)!important;overflow:hidden!important}
.group-column,.items-column,.preview-column{height:100%!important;min-height:0!important;overflow:hidden!important}
.group-column,.items-column{padding:clamp(5px,.7vh,10px) clamp(5px,.45vw,9px)!important}
.group-column h2,.items-heading{height:clamp(32px,4vh,48px)!important;margin:clamp(3px,.4vh,6px) clamp(7px,.75vw,14px)!important}
.group-column h2,.items-heading h2{font-size:clamp(16px,1.15vw,23px)!important}
.group-list,.channel-list,.poster-grid{height:calc(100% - clamp(38px,4.8vh,58px));overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:clamp(18px,3vh,36px)!important;scrollbar-width:none}
.group-list::-webkit-scrollbar,.channel-list::-webkit-scrollbar,.poster-grid::-webkit-scrollbar{display:none}
.group-button,.browser-channel{height:clamp(48px,6.1vh,72px)!important;min-height:clamp(48px,6.1vh,72px)!important;font-size:clamp(14px,.92vw,19px)!important}
.browser-channel{grid-template-columns:clamp(28px,2.2vw,42px) clamp(34px,2.5vw,48px) minmax(0,1fr)!important;gap:clamp(6px,.65vw,13px)!important}
.browser-channel img{width:clamp(32px,2.3vw,46px)!important;height:clamp(32px,2.3vw,46px)!important}.browser-channel strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.preview-column{display:grid!important;grid-template-rows:minmax(0,56%) minmax(0,44%)!important;background:#020805!important}
.mini-player{width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden!important;border:0!important}
.mini-player video{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;transform:none!important}
.mini-player #previewPlaceholder{inset:0;display:grid;place-items:center;padding:2vw;font-size:clamp(13px,.9vw,18px)!important}
.channel-info{height:100%!important;min-height:0!important;padding:clamp(10px,1.4vh,18px) clamp(12px,1vw,22px)!important;overflow:hidden!important}
.channel-identity img{width:clamp(48px,4vw,76px)!important;height:clamp(48px,4vw,76px)!important}.channel-identity h2{font-size:clamp(19px,1.35vw,27px)!important}.preview-favorite{margin-left:auto;min-width:clamp(130px,13vw,230px);height:clamp(40px,5vh,58px)}
.epg{margin-top:clamp(8px,1.2vh,15px)!important}.epg p{grid-template-columns:clamp(52px,4vw,78px) minmax(0,1fr) clamp(65px,7vw,130px)!important;padding:clamp(8px,1vh,13px) 0!important}.epg b{font-size:clamp(11px,.68vw,14px)!important}.epg strong{font-size:clamp(13px,.9vw,18px)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.preview-help{font-size:clamp(11px,.75vw,15px)}

/* Catálogos VOD usam o espaço completo e permanecem navegáveis. */
.browser-body.vod{grid-template-columns:minmax(240px,24vw) minmax(0,1fr)!important}.browser-body.vod .preview-column{display:none!important}.browser-body.vod .items-column{height:100%!important}
.poster-grid{grid-template-columns:repeat(auto-fill,minmax(clamp(125px,9vw,175px),1fr))!important;gap:clamp(10px,1.3vh,18px) clamp(10px,1vw,20px)!important;padding:clamp(6px,.6vw,12px) clamp(10px,1.2vw,24px) clamp(20px,3vh,36px)!important;align-content:start!important}
.poster-grid .media-card{width:100%!important;height:clamp(220px,32vh,360px)!important;min-width:0!important;transform-origin:center!important}
.poster-grid .media-card img,.poster-grid .media-card .fallback-art{width:100%!important;height:calc(100% - clamp(42px,5vh,58px))!important}.poster-grid .media-card .card-copy{height:clamp(42px,5vh,58px)!important;font-size:clamp(13px,.86vw,18px)!important;padding:clamp(7px,1vh,12px)!important}
.poster-grid .media-card:focus{transform:scale(1.025)!important}

/* O player cheio nunca herda tamanho/posição do antigo mini-player flutuante. */
.player-modal.open{inset:0!important;top:0!important;right:0!important;width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;transform:none!important;z-index:80!important}
.player-modal.open video{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important}

@media(max-width:1100px),(max-height:650px){
  .browser-body{grid-template-columns:minmax(205px,24vw) minmax(245px,28vw) minmax(0,1fr)!important}
  .loading-steps article{height:64px!important}
  .channel-info{padding:8px 10px!important}.epg{margin-top:5px!important}.epg p{padding:6px 0!important}
  .poster-grid{grid-template-columns:repeat(auto-fill,minmax(125px,1fr))!important}.poster-grid .media-card{height:235px!important}
}
