.web-tv-hub-hud{position:fixed!important;left:var(--mutmain-focus-left,10vw)!important;top:var(--mutmain-focus-top,10vh)!important;width:var(--mutmain-focus-width,min(1080px,80vw))!important;height:var(--mutmain-focus-height,min(720px,78vh))!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 84px)!important;z-index:260!important;overflow:hidden!important;resize:both;background:linear-gradient(145deg,rgba(3,17,38,.98),rgba(5,35,61,.97))!important;border:1px solid rgba(255,215,62,.8)!important;box-shadow:0 0 28px rgba(41,190,255,.25),inset 0 0 42px rgba(16,88,139,.25)!important}
.web-tv-shell{height:calc(100% - 56px);display:grid;grid-template-rows:auto 1fr;min-height:0}
.web-tv-tabs,.web-tv-directory{display:flex;gap:8px;flex-wrap:wrap;padding:8px;border-bottom:1px solid rgba(70,190,255,.3)}
.web-tv-tabs button,.web-tv-directory button,.web-site-card button,.web-tv-official,.web-health-refresh{border:1px solid #18b9ed;background:#071d36;color:#d9f6ff;border-radius:8px;padding:9px 14px;font-weight:800;text-decoration:none;cursor:pointer}
.web-tv-tabs button.active{color:#061426;background:#ffd83d;border-color:#ffe778;box-shadow:0 0 14px rgba(255,215,61,.65)}
.web-tv-body{min-height:0;overflow:auto;padding:14px}
.web-tv-summary{display:flex;justify-content:space-between;gap:12px;align-items:end;margin-bottom:12px;color:#f5d84d}
.web-sites-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.web-site-card,.web-health-grid article,.web-health-list article,.web-site-view{display:grid;gap:7px;padding:13px;border:1px solid rgba(53,183,236,.42);border-radius:12px;background:rgba(3,18,37,.82)}
.web-site-card strong,.web-site-view h3{color:#fff}.web-site-card small,.web-tv-kicker{color:#f7d84d}.web-site-card span,.web-health-list small{color:#8fc9e9}.web-site-card nav{display:flex;gap:6px;margin-top:auto}
.web-favorite-form{display:grid;grid-template-columns:1fr 1.6fr 1fr auto;gap:8px;margin-top:14px}.web-favorite-form input,.mtv22-search input{min-width:0;border:1px solid #1d7da6;background:#04172b;color:#fff;border-radius:8px;padding:10px}.web-favorite-form small{grid-column:1/-1;color:#ffb29c}
.web-site-view{max-width:900px;margin:auto}.web-site-view p{max-width:70ch}.web-site-frame{width:100%;height:58vh;border:0;background:#fff;border-radius:10px}
.web-health-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.web-health-grid article strong{color:#ffe04d}.web-health-list{display:grid;gap:6px;margin-top:12px}.web-health-list article{grid-template-columns:1.2fr 1fr 1.5fr;align-items:center}.web-health-list span{color:#6ee7a7}.web-health-refresh{margin-top:12px}.web-tv-error{color:#ffb29c}
.mtv22-search{padding:6px 10px}.mtv22-search input{width:100%}
@media(max-width:800px){.web-tv-hub-hud{left:2vw!important;top:7vh!important;width:96vw!important;height:88vh!important}.web-favorite-form{grid-template-columns:1fr}.web-health-grid{grid-template-columns:1fr 1fr}.web-health-list article{grid-template-columns:1fr}.web-tv-summary{display:block}.web-tv-tabs{overflow-x:auto;flex-wrap:nowrap}}


body.web-portal-active .web-tv-hub-hud{left:50%!important;top:50%!important;width:75vw!important;height:75vh!important;max-width:1400px!important;max-height:900px!important;transform:translate(-50%,-50%)!important;background:#031426!important;opacity:1!important;z-index:9600!important}
@media(max-width:800px){body.web-portal-active .web-tv-hub-hud{left:2vw!important;top:7vh!important;width:96vw!important;height:88dvh!important;transform:none!important}}

/* Keep the existing TV player owner, but give its 1/2/3/4-screen layouts the full HUD stage. */
body.web-portal-active .web-tv-hub-hud{width:min(1500px,78vw)!important;height:min(920px,82vh)!important}
.web-tv-body.is-tv{display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden!important;padding:10px!important}
.web-tv-body.is-tv>.web-tv-directory{flex:0 0 auto}
.web-tv-body.is-tv>.mtv22-hub{height:100%!important;min-height:0;display:grid!important;grid-template-rows:auto auto auto minmax(170px,1fr)!important;overflow:hidden}
.web-tv-body.is-tv>.mtv22-hub>.mtv22-body{height:100%!important;min-height:170px;grid-template-columns:minmax(210px,24%) minmax(0,1fr);border:1px solid #176abc;border-radius:12px;overflow:hidden;background:#010917}
.web-tv-body.is-tv .mtv22-body{grid-template-rows:minmax(0,1fr)!important}
.web-tv-body.is-tv .mtv22-body>aside{height:100%!important;max-height:100%!important;min-height:0!important;overflow:auto!important}
.web-tv-body.is-tv .mtv22-body>main{height:100%!important;max-height:100%!important;min-height:0!important;overflow:hidden!important}
.web-tv-body.is-tv .mtv22-screens{height:100%;min-height:0}.web-tv-body.is-tv .mtv22-slot iframe,.web-tv-body.is-tv .mtv22-empty,.web-tv-body.is-tv .mtv22-external{min-height:0;height:100%}
@media(max-width:900px){body.web-portal-active .web-tv-hub-hud{left:2vw!important;top:7vh!important;width:96vw!important;height:88dvh!important;transform:none!important}.web-tv-body.is-tv{overflow:auto!important}.web-tv-body.is-tv>.mtv22-hub{height:auto!important;overflow:visible}.web-tv-body.is-tv>.mtv22-hub>.mtv22-body{grid-template-columns:1fr;height:auto!important}.web-tv-body.is-tv .mtv22-screens{min-height:340px}}


/* TV-first geometry: player is the primary working area. */
@media(min-width:901px){
 body.web-portal-active #panels .panel.premium-large.mutmain-focus.web-tv-hub-hud,body.web-portal-active .web-tv-hub-hud{width:78vw!important;height:78vh!important;max-width:calc(100vw - 32px)!important;max-height:calc(100dvh - 48px)!important;overflow:hidden!important;resize:none!important}
 .web-tv-hub-hud .web-tv-shell{height:calc(100% - 56px)!important;min-height:0;overflow:hidden}
 .web-tv-hub-hud .web-tv-body.is-tv{height:100%;min-height:0;grid-template-rows:auto minmax(0,1fr)!important}
 .web-tv-body.is-tv>.mtv22-hub{grid-template-rows:auto auto auto minmax(0,1fr)!important;height:100%!important}
 .web-tv-body.is-tv>.mtv22-hub>header{display:flex!important;align-items:center;justify-content:space-between;gap:12px;min-height:58px;padding:8px 12px;background:#03182c;border-bottom:1px solid #286c92}
 .web-tv-body.is-tv>.mtv22-hub>header nav{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;overflow:visible!important}
 .web-tv-body.is-tv>.mtv22-hub>header nav button{min-width:58px!important;white-space:nowrap!important}
 .web-tv-body.is-tv>.mtv22-hub>.mtv22-body{grid-template-columns:minmax(185px,22%) minmax(0,78%)!important;min-height:0!important;height:100%!important}
 .web-tv-body.is-tv .mtv22-body>main{display:grid!important;grid-template-rows:minmax(0,1fr) auto!important;min-width:0!important}
 .web-tv-body.is-tv .mtv22-screens{display:grid!important;gap:8px!important;min-height:0!important;padding:8px!important;background:#000b}
 .web-tv-body.is-tv .mtv22-screens[data-count="1"]{grid-template-columns:1fr!important;grid-template-rows:1fr!important}
 .web-tv-body.is-tv .mtv22-screens[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:1fr!important}
 .web-tv-body.is-tv .mtv22-screens[data-count="3"]{grid-template-columns:2fr 1fr!important;grid-template-rows:repeat(2,minmax(0,1fr))!important}
 .web-tv-body.is-tv .mtv22-screens[data-count="3"]>.mtv22-slot:first-child{grid-row:1/3!important}
 .web-tv-body.is-tv .mtv22-screens[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important}
 .web-tv-body.is-tv .mtv22-slot{min-width:0!important;min-height:0!important;background:#000!important;border:1px solid #236d9b!important}
 .web-tv-body.is-tv .mtv22-empty{display:grid!important;place-content:center!important;color:#8db8ce!important;background:radial-gradient(circle,#0b3555,#000 72%)!important}
}

/* Real TV stage: embedded owner fills the HUD without former fixed viewport geometry. */
@media(min-width:901px){
 body.web-portal-active .web-tv-hub-hud{width:78vw!important;height:78vh!important}
 .web-tv-body.is-tv>.mtv22-hub{position:relative!important;inset:auto!important;width:100%!important;max-width:none!important;height:100%!important;grid-template-rows:64px 46px minmax(0,1fr)!important;border-radius:12px!important}
 .web-tv-body.is-tv>.mtv22-hub>header{height:64px!important;min-height:64px!important;padding:6px 10px!important;overflow:hidden!important}
 .web-tv-body.is-tv>.mtv22-hub>header>div{min-width:190px}.web-tv-body.is-tv>.mtv22-hub>header h2{font-size:19px!important;white-space:nowrap}
 .web-tv-body.is-tv>.mtv22-hub>header nav{margin-left:auto!important;align-items:center!important}
 .web-tv-body.is-tv>.mtv22-hub>header [data-mtv-layout="half"],.web-tv-body.is-tv>.mtv22-hub>header [data-mtv-layout="third"],.web-tv-body.is-tv>.mtv22-hub>header [data-mtv-desktop]{display:none!important}
 .web-tv-body.is-tv>.web-tv-directory{height:38px!important;min-height:38px!important;padding:3px 8px!important;flex-wrap:nowrap!important;overflow:hidden!important}
 .web-tv-body.is-tv>.web-tv-directory button{padding:5px 10px!important}.web-tv-body.is-tv>.web-tv-directory button:disabled{display:none!important}
 .web-tv-body.is-tv>.mtv22-hub>.mtv22-search{height:46px!important;padding:5px 10px!important}
 .web-tv-body.is-tv>.mtv22-hub>.media-categories{display:none!important}
 .web-tv-body.is-tv>.mtv22-hub>.mtv22-body{height:100%!important;min-height:0!important;grid-template-columns:minmax(180px,20%) minmax(0,80%)!important}
 .web-tv-body.is-tv .mtv22-screens,.web-tv-body.is-tv .mtv22-slot,.web-tv-body.is-tv .mtv22-slot iframe,.web-tv-body.is-tv .mtv22-slot video{height:100%!important;min-height:0!important}
 .web-tv-body.is-tv .mtv22-slot video{width:100%;object-fit:contain;background:#000}
}

/* FINAL TV HUD: reference-aligned 82% command surface. */
body.web-portal-active #panels .web-tv-hub-hud,body.web-portal-active .web-tv-hub-hud{width:82vw!important;height:82vh!important;max-width:calc(100vw - 30px)!important;max-height:calc(100dvh - 30px)!important;border:1px solid #e3c449!important;border-radius:18px!important;background:linear-gradient(150deg,#051b33fa,#010812fc)!important;box-shadow:0 0 0 1px #26cfff88,0 0 45px #1baee966,inset 0 0 58px #0b5e8b55,0 26px 80px #000d!important}
.web-tv-tabs{padding:9px 14px;background:linear-gradient(90deg,#082d4e,#020c18);box-shadow:inset 0 -1px #d0b44455}.web-tv-tabs button{min-width:110px}.web-tv-body{background:radial-gradient(circle at 50% 0,#0d4e7938,transparent 54%)}
.web-sites-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.web-site-card,.web-health-grid article,.web-health-list article,.web-site-view{border-color:#2bbfe566;box-shadow:inset 0 0 18px #1597cc20,0 8px 20px #0006}.web-site-card:hover{border-color:#e1c348;box-shadow:0 0 18px #36d9ff55,inset 0 0 22px #16618a44}
.web-tv-body.is-tv .mtv22-slot{border-color:#2b8fc1!important;box-shadow:inset 0 0 26px #09436955!important}.web-tv-body.is-tv .mtv22-slot.selected{border-color:#f4d341!important;box-shadow:0 0 18px #f4d34177,inset 0 0 28px #0a568066!important}.web-health-list article[data-health="ONLINE"] span{color:#63f1a9}.web-health-list article[data-health="SOURCE_REACHABLE"] span,.web-health-list article[data-health="OFFICIAL_PAGE_REACHABLE"] span{color:#69d9ff}.web-health-list article[data-health="TEMP_UNAVAILABLE"] span{color:#ff7585}
@media(max-width:1100px){.web-sites-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){
 body.web-portal-active #panels .panel.premium-large.mutmain-focus.web-tv-hub-hud,body.web-portal-active #panels .web-tv-hub-hud,body.web-portal-active .web-tv-hub-hud{inset:6dvh 8px 8px 8px!important;left:8px!important;right:8px!important;top:6dvh!important;width:auto!important;height:auto!important;min-width:0!important;max-width:none!important;max-height:none!important;transform:none!important;box-sizing:border-box!important;overflow:hidden!important;resize:none!important}
 .web-tv-hub-hud .web-tv-shell{width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important}
 .web-tv-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;max-width:100%!important;gap:5px!important;padding:7px!important;overflow:hidden!important}
 .web-tv-tabs button{width:100%!important;min-width:0!important;padding:8px 3px!important;font-size:11px!important;white-space:normal!important}
 .web-tv-body{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important;padding:9px!important;box-sizing:border-box!important}
 .web-tv-summary{display:grid!important;grid-template-columns:1fr!important;align-items:start!important}
 .web-sites-grid,.web-health-grid{grid-template-columns:1fr!important;min-width:0!important}
 .web-site-card,.web-health-list article,.web-health-grid article{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
 .web-favorite-form{grid-template-columns:1fr!important;min-width:0!important}
 .web-tv-body.is-tv>.mtv22-hub{width:100%!important;max-width:100%!important;min-width:0!important}
 .web-tv-body.is-tv>.mtv22-hub>header{display:grid!important;grid-template-columns:1fr!important;height:auto!important;min-height:0!important;gap:6px!important;padding:7px!important}
 .web-tv-body.is-tv>.mtv22-hub>header>div{min-width:0!important}.web-tv-body.is-tv>.mtv22-hub>header h2{margin:1px 0!important;font-size:20px!important;line-height:1.1!important;white-space:nowrap!important}.web-tv-body.is-tv>.mtv22-hub>header small{font-size:8px!important;line-height:1.1!important}
 .web-tv-body.is-tv>.mtv22-hub>header nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;width:100%!important;gap:4px!important;overflow:hidden!important}
 .web-tv-body.is-tv>.mtv22-hub>header nav button{min-width:0!important;padding:7px 2px!important;font-size:10px!important}
 .web-tv-body.is-tv>.mtv22-hub>header [data-mtv-layout="half"],.web-tv-body.is-tv>.mtv22-hub>header [data-mtv-layout="third"],.web-tv-body.is-tv>.mtv22-hub>header [data-mtv-desktop],.web-tv-body.is-tv>.mtv22-hub>header [data-mtv-close]{display:none!important}
 body.web-portal-active .web-tv-body.is-tv>#mutmain-multitv>header{display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:start!important;justify-content:stretch!important;height:auto!important;min-height:0!important;overflow:visible!important}
 body.web-portal-active .web-tv-body.is-tv>#mutmain-multitv>header>div{width:100%!important;height:auto!important;min-height:0!important;padding:0!important}
 body.web-portal-active .web-tv-body.is-tv>#mutmain-multitv>header>nav{width:100%!important;margin:0!important;grid-template-columns:repeat(5,minmax(0,1fr))!important}
 body.web-portal-active .web-tv-body.is-tv>#mutmain-multitv>header>nav button{min-height:38px!important;height:auto!important;line-height:1.05!important}
 .web-tv-body.is-tv>.web-tv-directory{flex-wrap:wrap!important;height:auto!important;overflow:visible!important}
 .web-tv-body.is-tv>.mtv22-hub>.mtv22-body{grid-template-columns:1fr!important;height:auto!important;min-width:0!important}
 .web-tv-body.is-tv .mtv22-body>aside{max-height:150px!important;min-height:100px!important}
 .web-tv-body.is-tv .mtv22-screens{min-height:270px!important}
}

/* Physical readability: keep the player surface opaque in every floor and mode. */
body #panels .panel.web-tv-hub-hud{background:#031426!important;background-image:none!important;opacity:1!important;isolation:isolate}
.web-tv-hub-hud .web-tv-shell,.web-tv-hub-hud .web-tv-body,.web-tv-hub-hud .mtv22-hub{background:#031426!important;opacity:1!important}
.web-tv-hub-hud .web-tv-shell{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;min-height:0!important}
.web-tv-hub-hud .web-tv-body.is-tv{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;gap:10px!important;overflow:hidden!important}
.web-tv-hub-hud .web-tv-directory{position:relative!important;height:auto!important;min-height:42px!important;overflow:visible!important}
.web-tv-hub-hud .web-tv-body.is-tv>.mtv22-hub{position:relative!important;inset:auto!important;min-height:0!important;height:100%!important}

/* Seven-channel schedule: compact columns for the user's simultaneous guide view. */
.web-tv-body.is-epg{overflow:auto!important}
.web-epg-head{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px;margin-bottom:12px;border:1px solid #2bbfe566;border-radius:12px;background:#041a30}
.web-epg-head strong{color:#ffe04d;margin-right:auto}.web-epg-head span{color:#b6eaff;text-transform:capitalize}
.web-epg-head button{border:1px solid #18b9ed;background:#071d36;color:#d9f6ff;border-radius:8px;padding:7px 10px;font-weight:800;cursor:pointer}
.web-epg-grid{display:grid;grid-template-columns:repeat(7,minmax(160px,1fr));gap:9px;align-items:start;overflow-x:auto;padding-bottom:8px}
.web-epg-channel{min-width:160px;max-height:calc(100dvh - 280px);overflow:auto;border:1px solid #2bbfe566;border-radius:12px;background:#031426;box-shadow:inset 0 0 18px #1597cc20}
.web-epg-channel h3{position:sticky;top:0;margin:0;padding:12px 10px 8px;background:#082d4e;color:#ffe04d;z-index:1}
.web-epg-channel>small{display:block;padding:0 10px 8px;color:#8fc9e9}
.web-epg-channel>a{display:inline-block;margin:0 10px 10px;color:#7edfff}
.web-epg-row{display:grid;grid-template-columns:48px minmax(0,1fr);gap:7px;padding:8px 9px;border-top:1px solid #2bbfe522;color:#e4f6ff;font-size:12px;line-height:1.35}
.web-epg-row b{color:#74dcff}.web-epg-row.is-now{background:#c6a72a25;box-shadow:inset 3px 0 #f4d341}.web-epg-row.is-now b{color:#ffe04d}
@media(max-width:900px){.web-epg-head{align-items:stretch}.web-epg-head strong{flex-basis:100%}.web-epg-grid{grid-template-columns:repeat(7,minmax(150px,1fr));max-height:none}.web-epg-channel{max-height:65dvh}}
