/* House TV responsive playback, loaded after the existing themes. */
html{width:100%;min-width:0}
body{min-width:0}
main,main header,.watch,.videoarea,.playerbottom,.now,.now>div,.transport,.transport>div{min-width:0}
main header{height:auto;min-height:65px;flex-wrap:wrap}
#pageHeading{overflow-wrap:anywhere}
.reference-tools{flex-wrap:wrap}
body.playing .watch{width:100%;max-width:1600px;margin-inline:auto}
body.playing .videoarea{width:100%;aspect-ratio:16/9;max-height:75vh;max-height:75svh;min-height:0;background:#000}
body.playing video{width:100%;height:100%;object-fit:contain}
.now>div{overflow-wrap:anywhere}
#title{display:block;line-height:1.4}
#status{white-space:normal;overflow-wrap:anywhere;line-height:1.5}
.transport{flex-wrap:wrap;gap:12px}
.transport>div{flex-wrap:wrap;gap:6px;max-width:100%}
.transport button{min-width:44px;min-height:44px;touch-action:manipulation}
.transport select{min-height:44px;max-width:100%}
#houseSubtitles{width:clamp(130px,22vw,190px);max-width:100%!important;min-height:44px!important}
.transport .round{flex:0 0 45px;margin:0 4px}
.playerbottom{padding:clamp(12px,2vw,23px)}
.watch:fullscreen{display:flex!important;flex-direction:column;width:100vw!important;height:100vh;height:100dvh;max-width:none!important;margin:0!important;border:0;border-radius:0;background:#000;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);overflow:auto}
body.playing .watch:fullscreen .videoarea{flex:1 1 0;aspect-ratio:auto;max-height:none;min-height:100px}
.watch:fullscreen .playerbottom{flex:0 0 auto}
body.playing .watch:fullscreen:after{display:none}
@media(max-width:1000px){
 .reference-tools time{margin-right:0}
 .transport{justify-content:center}
 .transport>div{justify-content:center}
}
@media(max-width:700px){
 body.playing #referenceRail{position:relative;inset:auto;width:100%;padding:8px max(6px,env(safe-area-inset-right)) 8px max(6px,env(safe-area-inset-left));overflow:visible;border-bottom:1px solid #293f34}
 body.playing #referenceRail>img,body.playing #referenceRail>.rail-exit{display:none}
 body.playing #referenceRail nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;overflow:visible}
 body.playing #referenceRail nav button{min-width:0;min-height:58px;gap:4px;padding:6px 2px;font-size:11px;border-radius:10px;overflow-wrap:anywhere}
 body.playing #referenceRail nav button svg{width:23px;height:23px}
 body.playing main{margin-left:0;padding:12px max(10px,env(safe-area-inset-right)) 60px max(10px,env(safe-area-inset-left));width:100%;min-height:0}
 body.playing main header{height:auto;min-height:44px;margin-bottom:12px;gap:8px}
 body.playing #pageHeading{font-size:24px}
 body.playing .reference-tools time{font-size:13px}
 body.playing .reference-tools button{width:40px;height:40px;min-width:40px}
 body.playing .videoarea{aspect-ratio:16/9;max-height:65svh}
 body.playing .watch{border-radius:12px}
 body.playing #referenceExpiry{left:0;font-size:11px;padding:9px}
 .transport{gap:10px}
 .transport>div{width:100%}
 .transport select{font-size:13px}
 #houseSubtitles{width:min(190px,55vw)}
 .now strong{font-size:14px}
 .now button{flex:0 0 44px;min-height:44px}
 .badge{top:10px;right:10px;padding:5px;font-size:7px}
}
@media(max-width:380px){
 .transport>div{gap:3px}
 .transport button{padding:5px;min-width:40px}
 .transport .round{margin:0}
 body.playing .reference-tools{gap:4px}
 body.playing .reference-tools time{display:none}
}
@media(max-height:500px) and (orientation:landscape){
 body.playing .videoarea{max-height:65svh}
 .watch:fullscreen .playerbottom{padding:6px 10px}
 .watch:fullscreen .transport{margin-top:4px;padding-top:4px;gap:4px}
 .watch:fullscreen .transport>div{width:auto}
 .watch:fullscreen .now small{margin-top:2px}
}


/* HOUSE-TV-MENU-AJUSTAVEL */
body #referenceRail {
    height:100vh;
    height:100dvh;
    box-sizing:border-box;
    padding:clamp(6px,1.5vh,18px) clamp(5px,1vw,12px);
    gap:clamp(4px,1vh,12px);
    overflow-y:auto;
}
body #referenceRail>img {
    flex:0 0 auto;
    width:100%;
    max-width:165px;
    height:clamp(40px,12vh,95px);
    margin:0 auto;
}
body #referenceRail nav {
    display:grid;
    grid-template-rows:repeat(5,minmax(0,1fr));
    flex:1 1 0;
    min-height:0;
    gap:clamp(4px,1.2vh,12px);
    overflow:visible;
}
body #referenceRail nav button {
    width:100%;
    min-width:0;
    min-height:0;
    height:100%;
    margin:0;
    padding:clamp(3px,1vh,10px) 3px;
    gap:clamp(2px,1vh,10px);
    border-radius:clamp(9px,2vh,20px);
    font-size:clamp(11px,2.3vh,20px);
    line-height:1.15;
    overflow-wrap:anywhere;
    justify-content:center;
}
body #referenceRail nav button svg {
    flex-shrink:0;
    width:clamp(17px,4vh,36px);
    height:clamp(17px,4vh,36px);
}
body #referenceRail>.rail-exit {
    flex:0 0 auto;
    margin:0;
    min-height:36px;
    padding:7px;
}
@media(max-width:600px) {
    body #referenceRail nav button {
        font-size:clamp(10px,1.8vh,13px);
    }
}
@media(max-width:700px) {
    body.playing #referenceRail {
        height:auto;
        gap:0;
    }
    body.playing #referenceRail nav {
        grid-template-rows:auto;
        flex:none;
    }
    body.playing #referenceRail nav button {
        height:auto;
        min-height:58px;
        font-size:11px;
    }
}
