:root{--bg:#0b0f17;--panel:#131a26;--panel2:#1a2233;--line:#243049;--text:#e6e9ef;--muted:#8a94a8;--accent:#4cc3ff;--gold:#f0a940;--red:#e5534b}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
button,input,select{font:inherit;color:inherit}
input,select{background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:10px 12px;width:100%}
button{border:0;border-radius:10px;padding:10px 16px;font-weight:600;cursor:pointer;background:none}
.btn-blue{background:var(--accent);color:#04121c}.btn-grey{background:#3a4458;color:#fff}
.hidden{display:none!important}
#login{min-height:100%;display:flex;align-items:center;justify-content:center;padding:20px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:28px;width:100%;max-width:380px}
.card>*{margin-bottom:12px;width:100%}
.card img{width:84px;height:84px;border-radius:18px;display:block;margin:0 auto 12px}
.card h1{text-align:center;margin:0 0 20px;font-size:24px;color:var(--gold)}
.err{color:var(--red);min-height:20px;font-size:14px;text-align:center}
#shell{display:flex;height:100%}
#side{width:210px;flex-shrink:0;background:var(--panel);border-right:1px solid var(--line);padding:18px 12px;display:flex;flex-direction:column;gap:4px}
.brand{display:flex;align-items:center;gap:10px;margin:0 6px 18px}
.brand img{width:38px;height:38px;border-radius:10px}.brand b{color:var(--gold)}
.nav{display:flex;align-items:center;gap:12px;text-align:left;padding:12px 14px;color:var(--muted)}
.nav span{font-size:18px}
.nav.active,.nav:hover{background:var(--panel2);color:var(--text)}
main{flex:1;min-width:0;height:100%;overflow:hidden}
.view{display:flex;height:100%}
.cats{width:230px;flex-shrink:0;overflow-y:auto;border-right:1px solid var(--line);padding:10px}
.cat{display:block;width:100%;text-align:left;padding:10px 12px;color:var(--muted);font-weight:500;border-radius:8px}
.cat.active,.cat:hover{background:var(--panel2);color:var(--text)}
.livecol,.gridcol{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}
.gridcol{padding:12px;gap:12px}
.player{position:relative;background:#000;aspect-ratio:16/9;max-height:50vh;flex-shrink:0}
.player video{width:100%;height:100%;background:#000;display:block}
.pmsg{position:absolute;left:0;right:0;top:45%;text-align:center;color:var(--muted);pointer-events:none;padding:0 16px}
.bar{display:flex;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--line)}
.engine{font-size:12px;color:var(--accent);border:1px solid var(--line);border-radius:20px;padding:5px 10px;white-space:nowrap}
.chlist{flex:1;overflow-y:auto}
.ch{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);border-radius:0}
.ch:hover{background:var(--panel)}
.ch.active{background:var(--panel2);box-shadow:inset 3px 0 var(--accent)}
.ch img,.ch .ph{width:56px;height:36px;object-fit:contain;flex-shrink:0;background:var(--panel);border-radius:6px}
.ch .t{min-width:0}
.ch .n{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ch .e{font-size:13px;font-weight:400;color:var(--accent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:17px}
.grid{flex:1;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:14px;align-content:start}
.poster{padding:0;text-align:left;font-weight:500}
.poster img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:10px;background:var(--panel);display:block}
.poster div{font-size:13px;margin-top:6px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.settings{padding:24px;max-width:520px;width:100%;overflow-y:auto}
.settings h2{color:var(--accent);margin:0 0 14px}
.settings label{display:block;color:var(--muted);margin-bottom:6px}
.settings select{margin-bottom:28px}
.acct{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:18px;line-height:1.9}
#modal{position:fixed;inset:0;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;padding:16px;z-index:50}
.mbox{background:var(--panel);border:1px solid var(--line);border-radius:14px;width:100%;max-width:900px;max-height:100%;overflow-y:auto;padding:16px;position:relative}
.mbox h3{margin:0 40px 12px 0}
.mclose{position:absolute;top:8px;right:8px;font-size:18px;color:var(--muted)}
.mbox .player{max-height:60vh;border-radius:10px;overflow:hidden}
#episodes select{margin:12px 0}
.ep{display:block;width:100%;text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);border-radius:0;font-weight:500}
.ep.active{color:var(--accent)}
.loading{padding:20px;color:var(--muted)}
@media(max-width:760px){
  #shell{flex-direction:column-reverse}
  #side{width:auto;flex-direction:row;justify-content:space-around;border-right:0;border-top:1px solid var(--line);padding:6px 6px calc(6px + env(safe-area-inset-bottom))}
  .brand{display:none}
  .nav{flex-direction:column;gap:2px;font-size:11px;padding:6px 10px}
  .nav span{font-size:20px}
  main{padding-top:env(safe-area-inset-top)}
  .view{flex-direction:column}
  .cats{width:auto;display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid var(--line);padding:8px;flex-shrink:0}
  .cat{width:auto;white-space:nowrap;flex-shrink:0;background:var(--panel)}
  .player{max-height:none}
  .grid{grid-template-columns:repeat(auto-fill,minmax(105px,1fr))}
}

/* ================= LOGIXS MEDIA RED THEME ================= */
:root{--bg:#000;--panel:rgba(8,8,10,.78);--panel2:rgba(42,8,10,.85);--line:rgba(var(--grgb),.24);--text:#f2f2f5;--muted:#a9a9b4;--accent:#f25a50;--gold:#dc262d;--grgb:220,38,45;--gold3:#8e0e16;--gold4:#ff7a6e;--gold2:#ff6a5c;--hl:#f5b800}
html{background:#000}
body{background:transparent}
body::before{content:"";position:fixed;inset:0;z-index:-2;background:#000 url("../img/bg.jpg?v=2") center/cover no-repeat}
body::after{content:"";position:fixed;inset:0;z-index:-1;background:radial-gradient(ellipse at center,rgba(0,0,0,.25),rgba(0,0,0,.82))}
h1,h2,h3,.brand b,.nav,.engine,.btn-blue{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif}
.brand b{font-size:18px;letter-spacing:.08em;background:linear-gradient(180deg,var(--gold2),var(--gold) 60%,var(--gold3));-webkit-background-clip:text;background-clip:text;color:transparent}

/* sidebar: black blocks, gold writing */
#side{background:rgba(0,0,0,.55);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-right:1px solid var(--line);gap:10px}
.nav{background:#000;color:var(--gold);border:1px solid rgba(var(--grgb),.35);border-radius:12px;padding:16px 14px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;transition:box-shadow .2s,border-color .2s,color .2s}
.nav span{filter:grayscale(1) sepia(1) saturate(3) brightness(1.05)}
.nav:hover{background:#000;color:var(--gold2);border-color:var(--gold);box-shadow:0 0 14px rgba(var(--grgb),.3)}
.nav.active{background:linear-gradient(180deg,#1e0507,#000 70%);color:var(--gold2);border-color:var(--gold2);box-shadow:0 0 20px rgba(var(--grgb),.45),inset 0 0 12px rgba(var(--grgb),.12)}

/* content panels */
.cats{background:rgba(0,0,0,.55);border-right-color:var(--line)}
.cat:hover{background:rgba(var(--grgb),.08);color:var(--text)}
.cat.active{background:#000;color:var(--gold2);box-shadow:inset 3px 0 var(--gold)}
.livecol{background:rgba(0,0,0,.45)}
.gridcol{background:rgba(0,0,0,.35)}
.player{border-bottom:1px solid var(--gold);box-shadow:0 6px 24px rgba(0,0,0,.6)}
.bar{background:rgba(0,0,0,.6);border-bottom-color:var(--line)}
.engine{color:var(--gold2);border-color:var(--gold);background:#000;letter-spacing:.05em}
.ch{border-bottom-color:var(--line)}
.ch:hover{background:rgba(var(--grgb),.06)}
.ch.active{background:linear-gradient(90deg,rgba(var(--grgb),.18),transparent);box-shadow:inset 3px 0 var(--gold)}
.ch .e{color:var(--gold)}
input,select{background:rgba(0,0,0,.7);border-color:var(--line)}
input:focus,select:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 2px rgba(var(--grgb),.2)}
.btn-blue{background:linear-gradient(180deg,var(--gold2),var(--gold) 55%,var(--gold3));color:#fff;letter-spacing:.08em;text-transform:uppercase}
.btn-grey{background:#000;color:var(--gold);border:1px solid var(--gold)}
.poster img{border:1px solid var(--line);transition:transform .2s,box-shadow .2s}
.poster:hover img{transform:translateY(-3px);box-shadow:0 0 18px rgba(var(--grgb),.4);border-color:var(--gold)}
.settings{background:rgba(0,0,0,.55)}
.settings h2{color:var(--gold2);letter-spacing:.08em}
.acct{background:rgba(0,0,0,.7);border-color:var(--line)}
.mbox{background:rgba(5,5,5,.94);border-color:rgba(var(--grgb),.45)}
.ep.active{color:var(--gold2)}

/* login */
.card{background:rgba(0,0,0,.72);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(var(--grgb),.45);box-shadow:0 0 40px rgba(var(--grgb),.15)}
.card h1{color:var(--gold2);letter-spacing:.12em;text-transform:uppercase}

/* phones: gold-trimmed bottom bar of black blocks */
@media(max-width:760px){
  #side{background:rgba(0,0,0,.88);border-top:1px solid var(--gold);gap:6px;padding-left:8px;padding-right:8px}
  .nav{flex:1;align-items:center;padding:8px 4px;font-size:10px;letter-spacing:.06em;border-radius:10px}
  .cat{background:#000;border:1px solid var(--line)}
  .cat.active{box-shadow:none;border-color:var(--gold)}
}

/* ===== TV guide + preview ===== */
#guide{position:fixed;inset:0;background:rgba(0,0,0,.82);display:flex;align-items:center;justify-content:center;padding:16px;z-index:60}
#glist{max-height:70vh;overflow-y:auto}
.tbtn{background:#000;border:1px solid var(--gold);color:var(--gold2);padding:7px 12px;border-radius:20px;font-size:13px;white-space:nowrap;font-family:"Exo 2",system-ui,"Segoe UI",sans-serif}
.dayhdr{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;color:var(--gold2);padding:14px 6px 6px;letter-spacing:.08em}
.prog{display:flex;gap:12px;padding:10px 6px;border-bottom:1px solid var(--line)}
.prog .tm{flex:0 0 100px;color:var(--gold);font-variant-numeric:tabular-nums;font-size:14px}
.prog .pi{min-width:0}
.prog .pt{font-weight:600}
.prog .pd{font-size:13px;color:var(--muted);margin-top:3px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.prog.now{background:linear-gradient(90deg,rgba(var(--grgb),.2),transparent);box-shadow:inset 3px 0 var(--gold)}
.prog.past{opacity:.45}
#liveVideo{cursor:pointer}
@media(max-width:760px){.engine{display:none}}

/* ===== login tabs, disclaimer, legal pages ===== */
.tabs{display:flex;gap:8px}
.tab{flex:1;background:#000;border:1px solid var(--line);color:var(--muted);font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;letter-spacing:.06em;padding:9px 6px;font-size:13px}
.tab.active{border-color:var(--gold);color:var(--gold2);box-shadow:0 0 12px rgba(var(--grgb),.3)}
.disclaimer{font-size:12px;line-height:1.5;color:var(--muted);text-align:center;margin:16px 0 6px}
.legal{font-size:12px;text-align:center;margin:0}
.legal a{color:var(--gold);text-decoration:none}
.settings .disclaimer,.settings .legal{text-align:left}
.doc{max-width:760px;margin:0 auto;padding:28px 20px 60px;background:rgba(0,0,0,.8);min-height:100%;line-height:1.65}
.doc h1{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;color:var(--gold2);letter-spacing:.08em}
.doc h2{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;color:var(--gold);font-size:18px;margin-top:28px}
.doc a{color:var(--gold2)}
.doc .back{display:inline-block;margin-bottom:16px;text-decoration:none}

/* ===== refresh button + toast ===== */
.refresh{width:46px;height:46px;border-radius:50%;background:#000;border:1px solid var(--gold);color:var(--gold2);font-size:22px;line-height:1;padding:0;display:flex;align-items:center;justify-content:center;align-self:center;margin-top:8px;box-shadow:0 0 12px rgba(var(--grgb),.25);transition:box-shadow .2s}
.refresh:hover{box-shadow:0 0 18px rgba(var(--grgb),.5)}
.refresh.spin{animation:jaspin .9s linear infinite}
@keyframes jaspin{to{transform:rotate(360deg)}}
#toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%) translateY(20px);background:#000;border:1px solid var(--gold);color:var(--gold2);padding:10px 18px;border-radius:24px;font-size:14px;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;z-index:80}
#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:760px){.refresh{flex:0 0 46px;margin:auto 0}}

/* ===== unsupported audio notice ===== */
.warn{margin-top:10px;padding:10px 12px;border:1px solid var(--gold);border-radius:10px;background:rgba(40,31,8,.85);color:var(--gold2);font-size:14px;line-height:1.45}

/* ===== saved logins ===== */
.saved{display:flex;flex-direction:column;gap:8px}
.savedhdr{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;color:var(--gold);font-size:13px;letter-spacing:.08em}
.prof{display:flex;gap:8px}
.pgo{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;background:#000;border:1px solid var(--line);padding:10px 12px;text-align:left}
.pgo:hover{border-color:var(--gold);box-shadow:0 0 12px rgba(var(--grgb),.25)}
.pgo b{color:var(--gold2);font-weight:600;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pgo span{font-size:13px;color:var(--muted);font-weight:400}
.pdel{flex:0 0 44px;background:#000;border:1px solid var(--line);color:var(--muted);padding:0}
.pdel:hover{border-color:var(--red);color:var(--red)}
.remember{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);cursor:pointer}
.remember input{width:auto;accent-color:var(--gold)}

/* ===== favourites + continue watching ===== */
.star{color:rgba(var(--grgb),.35);font-size:20px;padding:4px 6px;cursor:pointer;flex-shrink:0;line-height:1}
.star.on{color:var(--gold2);text-shadow:0 0 8px rgba(var(--grgb),.6)}
.ch .star{margin-left:auto}
.poster{position:relative}
.poster .star{position:absolute;top:6px;right:6px;background:rgba(0,0,0,.65);border-radius:50%;width:30px;height:30px;display:flex;align-items:center;justify-content:center;font-size:17px;padding:0}
.pbar{display:block;height:4px;background:var(--gold);border-radius:2px;margin-top:4px}
.settings .btn-grey{margin:0 0 28px}

/* ===== details, search, parental ===== */
.det{display:flex;gap:16px;margin-bottom:14px}
.det>img{width:140px;aspect-ratio:2/3;object-fit:cover;border-radius:10px;border:1px solid var(--line);flex-shrink:0;background:var(--panel)}
.dinfo{min-width:0}
.dmeta{color:var(--gold);font-size:13px;margin-bottom:8px}
.dplot{margin:0 0 10px;line-height:1.5}
.dsmall{margin:0 0 6px;font-size:13px;color:var(--muted)}
.dbtns{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.dbtns a{display:inline-flex;align-items:center;text-decoration:none;padding:10px 16px;border-radius:10px;font-weight:600}
.searchcol{flex:1;min-width:0;display:flex;flex-direction:column;gap:12px;padding:12px;background:rgba(0,0,0,.4)}
.gresults{flex:1;overflow-y:auto}
.ghdr{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;color:var(--gold2);margin:16px 0 8px}
.ggrid{flex:none;overflow:visible}
#cmgr{position:fixed;inset:0;background:rgba(0,0,0,.82);display:flex;align-items:center;justify-content:center;padding:16px;z-index:60}
#cmlist{max-height:60vh;overflow-y:auto;margin-top:12px}
.cmrow{display:flex;align-items:center;gap:8px;padding:8px 4px;border-bottom:1px solid var(--line)}
.cmrow span{flex:1;min-width:0}
.cmbtn{background:#000;border:1px solid var(--line);color:var(--muted);font-size:12px;padding:6px 10px;white-space:nowrap}
.cmbtn.on{border-color:var(--gold);color:var(--gold2);box-shadow:0 0 10px rgba(var(--grgb),.3)}
@media(max-width:760px){.det{flex-direction:column}.det>img{width:120px}}

/* ===== TV remote focus highlight ===== */
:focus{outline:none}
:focus-visible{outline:2px solid var(--gold2);outline-offset:2px;box-shadow:0 0 16px rgba(var(--grgb),.55)}
.ch:focus-visible,.cat:focus-visible,.ep:focus-visible,.cmrow button:focus-visible{outline-offset:-2px;background:rgba(var(--grgb),.16)}
.poster:focus-visible{outline:none;box-shadow:none}
.poster:focus-visible img{transform:scale(1.05);box-shadow:0 0 22px rgba(var(--grgb),.65);border-color:var(--gold2)}
.nav:focus-visible{border-color:var(--gold2);box-shadow:0 0 20px rgba(var(--grgb),.55)}

/* ===== home screen ===== */
#shell.at-home #side{display:none}
#v-home{background:transparent}
.home{flex:1;height:100%;overflow-y:auto;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:28px;padding:24px}
.hhead{display:flex;align-items:center;gap:14px;width:100%;max-width:980px}
.hhead img{width:64px;height:64px;border-radius:14px;box-shadow:0 0 18px rgba(var(--grgb),.35)}
.htitle{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;font-size:28px;font-weight:700;letter-spacing:.1em;background:linear-gradient(180deg,var(--gold2),var(--gold) 60%,var(--gold3));-webkit-background-clip:text;background-clip:text;color:transparent}
.hsub{color:var(--muted);font-size:14px;margin-top:4px}
.hclock{margin-left:auto;font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;color:var(--gold2);font-size:30px;letter-spacing:.06em}
.htiles{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;width:100%;max-width:980px}
.htile{background:rgba(0,0,0,.82);border:1px solid rgba(var(--grgb),.45);border-radius:18px;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:var(--gold2);font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;font-size:24px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;transition:transform .2s,box-shadow .2s,border-color .2s}
.htile span{font-size:48px;filter:grayscale(1) sepia(1) saturate(3) brightness(1.05)}
.htile:hover,.htile:focus-visible{transform:translateY(-4px) scale(1.02);border-color:var(--gold2);box-shadow:0 0 28px rgba(var(--grgb),.5);outline:none}
.hsmall{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}
.hbtn{background:rgba(0,0,0,.82);border:1px solid var(--line);color:var(--gold);font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;letter-spacing:.06em;padding:12px 18px;border-radius:30px}
.hbtn:hover,.hbtn:focus-visible{border-color:var(--gold);box-shadow:0 0 14px rgba(var(--grgb),.4);outline:none}
@media(max-width:760px){
  .home{justify-content:flex-start;padding-top:calc(24px + env(safe-area-inset-top))}
  .htiles{grid-template-columns:1fr;gap:12px}
  .htile{min-height:96px;flex-direction:row;font-size:20px}
  .htile span{font-size:34px}
  .htitle{font-size:20px}
  .hclock{font-size:22px}
  .nav[data-view="search"],.refresh{display:none}
}

/* ===== update window ===== */
#upd{position:fixed;inset:0;background:rgba(0,0,0,.82);display:flex;align-items:center;justify-content:center;padding:16px;z-index:70}
#upd .mbox{max-width:520px}

/* ===== keep everything inside the visible screen (status bar, nav bar, notches) ===== */
:root{
  --sat:var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --sab:var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --sal:var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
  --sar:var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
}
body{box-sizing:border-box;padding:var(--sat) var(--sar) var(--sab) var(--sal)}
#modal,#guide,#cmgr,#upd{padding:calc(16px + var(--sat)) calc(16px + var(--sar)) calc(16px + var(--sab)) calc(16px + var(--sal))}
#toast{bottom:calc(90px + var(--sab))}
@media(max-width:760px){
  main{padding-top:0}
  #side{padding-bottom:6px}
  .home{padding-top:24px}
}

/* ===== home screen: never clip, compact when the screen is short (phone landscape) ===== */
.home{justify-content:flex-start}
.home > :first-child{margin-top:auto}
.home > :last-child{margin-bottom:auto}
@media (max-height:520px){
  .home{gap:14px;padding:12px 20px}
  .hhead img{width:44px;height:44px;border-radius:10px}
  .htitle{font-size:20px}
  .hsub{font-size:12px}
  .hclock{font-size:22px}
  .htiles{gap:12px}
  .htile{min-height:84px;flex-direction:row;gap:12px;font-size:18px;border-radius:14px}
  .htile span{font-size:30px}
  .hsmall{gap:8px}
  .hbtn{padding:8px 14px;font-size:13px}
}

/* ===== never let the whole page scroll on the player page; lists scroll on their own ===== */
html:has(#shell), html:has(#shell) body{overflow:hidden}
#side{overflow-y:auto}

/* ===== phone landscape (short screens): compact menu, player beside the channel list ===== */
@media (max-height:520px) and (min-width:761px){
  #side{width:150px;padding:10px 8px;gap:6px}
  .brand{display:none}
  .nav{padding:8px 10px;font-size:12px;gap:8px;border-radius:10px}
  .nav span{font-size:16px}
  .refresh{width:38px;height:38px;font-size:18px;margin-top:4px}
  .cats{width:180px;padding:6px}
  .cat{padding:7px 10px;font-size:13px}
  .livecol{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
  .livecol .player{grid-column:1;grid-row:1 / span 2;max-height:none;align-self:start}
  .livecol .bar{grid-column:2;grid-row:1;padding:6px 8px}
  .livecol .chlist{grid-column:2;grid-row:2;min-height:0}
  .engine{display:none}
  .tbtn{padding:5px 10px;font-size:12px}
  .ch{padding:6px 10px;gap:10px}
  .ch img,.ch .ph{width:44px;height:28px}
  .ch .n{font-size:14px}
  .ch .e{font-size:12px;min-height:15px}
  .gridcol{padding:8px;gap:8px}
  .grid{grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px}
}

/* ===== phone landscape: channel list in the middle, player top-right ===== */
@media (max-height:520px) and (min-width:761px){
  .livecol{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr)}
  .livecol .chlist{grid-column:1;grid-row:1 / span 3;min-height:0;border-right:1px solid var(--line)}
  .livecol .player{grid-column:2;grid-row:1;align-self:start;max-height:none}
  .livecol .bar{grid-column:2;grid-row:2;border-bottom:none}
}

/* ===== now / next panel (phone landscape) ===== */
.nownext{display:none}
@media (max-height:520px) and (min-width:761px){
  .nownext{display:block;grid-column:2;grid-row:3;min-height:0;overflow-y:auto;padding:10px 12px;background:rgba(0,0,0,.55);border-top:1px solid var(--line);cursor:pointer}
}
.nnch{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;color:var(--gold2);font-size:15px;margin-bottom:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nnlbl{font-size:11px;letter-spacing:.14em;color:var(--gold);margin-top:6px}
.nnt{font-weight:600;font-size:15px}
.nntm{font-size:12px;color:var(--muted);margin:2px 0 6px}
.nnbar{height:4px;background:rgba(var(--grgb),.2);border-radius:2px;overflow:hidden;margin-bottom:8px}
.nnbar i{display:block;height:100%;background:var(--gold)}
.nnds{font-size:12px;color:var(--muted);line-height:1.45;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.nnnext{font-weight:500;font-size:13px}

/* ===== inside a section: side menu becomes a slim top bar (tablets, TVs, desktop, phone landscape) ===== */
@media (min-width:761px){
  #shell:not(.at-home){flex-direction:column}
  #shell:not(.at-home) #side{width:auto;flex-direction:row;align-items:center;gap:8px;padding:8px 14px;border-right:0;border-bottom:1px solid var(--line);overflow-x:auto;overflow-y:hidden;flex-shrink:0}
  #shell:not(.at-home) .brand{margin:0 10px 0 0;flex-shrink:0}
  #shell:not(.at-home) .brand img{width:30px;height:30px}
  #shell:not(.at-home) .brand b{font-size:15px;white-space:nowrap}
  #shell:not(.at-home) .nav{padding:8px 16px;font-size:13px;border-radius:24px;gap:8px;white-space:nowrap;flex-shrink:0}
  #shell:not(.at-home) .nav span{font-size:15px}
  #shell:not(.at-home) .refresh{margin:0 0 0 auto;width:36px;height:36px;font-size:18px;flex-shrink:0}
  #shell:not(.at-home) main{height:auto;flex:1;min-height:0}
}
@media (max-height:520px) and (min-width:761px){
  #shell:not(.at-home) #side{padding:5px 10px;gap:6px}
  #shell:not(.at-home) .nav{padding:6px 12px;font-size:12px}
  .cats{width:215px}
}

/* ===== catch-up ===== */
.arch{color:var(--gold);font-size:12px}
.prog.catchup{cursor:pointer;border-radius:8px}
.prog.past.catchup{opacity:.95}
.prog.catchup .pt{color:var(--gold2)}
.prog.catchup:hover,.prog.catchup:focus-visible{background:rgba(var(--grgb),.12);outline:none}

/* ===== channel numbers + category counts ===== */
.chnum{flex:0 0 36px;text-align:right;color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
.cat{display:flex;align-items:center;gap:8px}
.cat .cnt{margin-left:auto;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;font-weight:400}
.cat.active .cnt{color:var(--gold)}
@media (max-height:520px) and (min-width:761px){.chnum{flex-basis:30px;font-size:12px}}

/* ===== full TV guide grid ===== */
#v-tvguide{background:rgba(0,0,0,.6)}
.tvg{display:flex;flex-direction:column;height:100%;width:100%;min-width:0}
.tvgbar{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--line);flex-shrink:0}
#tvgCat{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;color:var(--gold2);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tvgscroll{flex:1;min-height:0;overflow:auto;position:relative}
.tvginner{position:relative;width:max-content}
.tvghead{display:flex;position:sticky;top:0;z-index:5;background:#000;height:34px;border-bottom:1px solid var(--line)}
.tvgcorner{position:sticky;left:0;z-index:6;flex:0 0 190px;background:#000;color:var(--muted);font-size:12px;display:flex;align-items:center;padding-left:12px;border-right:1px solid var(--line)}
.tvgticks{position:relative;height:34px;flex-shrink:0}
.tvgtick{position:absolute;top:0;height:34px;line-height:34px;padding-left:6px;border-left:1px solid var(--line);font-size:12px;color:var(--gold);white-space:nowrap}
.tvgrow{display:flex;height:58px;border-bottom:1px solid var(--line)}
.tvgch{position:sticky;left:0;z-index:4;flex:0 0 190px;display:flex;align-items:center;gap:8px;padding:0 10px;background:#050505;border-right:1px solid var(--line);border-radius:0;text-align:left;min-width:0}
.tvgch img,.tvgch .ph{width:40px;height:26px;object-fit:contain;flex-shrink:0}
.tvgch .chnum{flex:0 0 28px;font-size:12px}
.tvgname{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.tvgprogs{position:relative;flex-shrink:0}
.tvgprogs .loading{padding:18px 10px;font-size:12px}
.tvgp{position:absolute;top:4px;bottom:4px;background:rgba(18,18,18,.92);border:1px solid var(--line);border-radius:8px;padding:4px 8px;text-align:left;overflow:hidden;display:flex;flex-direction:column;justify-content:center;font-weight:400}
.tvgp b{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.tvgp small{font-size:11px;color:var(--muted);white-space:nowrap}
.tvgp.past{opacity:.5}
.tvgp.catchup{opacity:.9}
.tvgp.catchup b{color:var(--gold2)}
.tvgp.now{border-color:var(--gold);background:rgba(40,31,8,.95)}
.tvgp:hover,.tvgp:focus-visible{border-color:var(--gold2);box-shadow:0 0 12px rgba(var(--grgb),.4);opacity:1;outline:none;z-index:2}
.tvgempty{color:var(--muted);font-size:12px;display:flex;align-items:center}
.tvgnow{position:absolute;top:0;bottom:0;width:2px;background:var(--gold2);box-shadow:0 0 8px rgba(var(--grgb),.8);z-index:3;pointer-events:none}
@media(max-width:760px){
  .tvgch,.tvgcorner{flex-basis:120px}
  .tvgch img,.tvgch .ph{display:none}
}

/* ===== web audio picker + jump buttons ===== */
.vaudio{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px}
.vaudio .albl{color:var(--gold);font-size:13px}
.vaudio .asel{width:auto;flex:1;min-width:180px;padding:6px 10px}
.vaudio .ajump{display:none;gap:6px;align-items:center;flex-wrap:wrap;width:100%}
.vaudio.relay .ajump{display:flex}
.ajpos{margin-left:auto;color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}

/* ===== gold scrollbars + list loading marker ===== */
*{scrollbar-width:thin;scrollbar-color:rgba(var(--grgb),.45) transparent}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:rgba(var(--grgb),.35);border-radius:8px}
::-webkit-scrollbar-thumb:hover{background:rgba(var(--grgb),.6)}
.sentinel{height:1px;grid-column:1 / -1}

/* ===== home screen: fit on one phone screen in portrait ===== */
@media (max-width:760px){
  .home{gap:16px;padding:16px 16px 20px}
  .hhead{gap:10px}
  .hhead img{width:50px;height:50px;border-radius:12px}
  .htitle{font-size:18px;white-space:nowrap}
  .hsub{font-size:12px}
  .hclock{font-size:20px}
  .htiles{gap:10px}
  .htile{min-height:74px;font-size:18px;gap:12px;border-radius:14px}
  .htile span{font-size:28px}
  .hsmall{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}
  .hbtn{padding:11px 8px;font-size:12px;white-space:nowrap;text-align:center}
  .hsmall .hbtn:last-child:nth-child(odd){grid-column:1 / -1}
}

/* ===== home screen: tidier phone landscape ===== */
@media (max-height:520px) and (min-width:761px){
  .home{gap:18px}
  .htile{flex-direction:column;min-height:128px;gap:8px;font-size:18px}
  .htile span{font-size:34px}
  .hsmall{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:10px;width:100%;max-width:980px}
  .hbtn{padding:9px 6px;font-size:12px;white-space:nowrap;text-align:center;overflow:hidden;text-overflow:ellipsis}
}

/* ===== Phase A: up-next card, sleep button, expiry warning ===== */
.upnext{position:absolute;right:14px;bottom:56px;max-width:320px;background:rgba(0,0,0,.88);border:1px solid var(--gold);border-radius:12px;padding:12px 14px;box-shadow:0 0 22px rgba(var(--grgb),.35);z-index:5}
.upnext .unt{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;color:var(--gold);font-size:12px;letter-spacing:.12em}
.upnext .unn{font-weight:600;margin:4px 0 2px}
.upnext .unc{font-size:12px;color:var(--muted)}
.upnext .dbtns{margin-top:8px}
#sleepBtn.on{background:linear-gradient(180deg,#1e0507,#000);color:var(--gold2);box-shadow:0 0 16px rgba(var(--grgb),.6)}
.hwarn{width:100%;max-width:980px;background:rgba(40,31,8,.9);border:1px solid var(--gold);color:var(--gold2);border-radius:12px;padding:10px 14px;font-size:14px;text-align:center}
@media (max-width:760px){.upnext{left:10px;right:10px;bottom:10px;max-width:none}}

/* ===== white-label branding + announcements ===== */
body::before{background-image:var(--bgimg, url("../img/bg.jpg?v=2"))}
.hnews{width:100%;max-width:980px;display:flex;align-items:center;gap:10px;background:rgba(0,0,0,.85);border:1px solid var(--gold);color:var(--text);border-radius:12px;padding:10px 14px;font-size:14px;line-height:1.45}
.hnews .nclose{background:none;color:var(--muted);margin-left:auto;padding:0 6px;font-size:16px;flex-shrink:0}

/* ===== profiles ===== */
#who{position:fixed;inset:0;background:rgba(0,0,0,.92);display:flex;align-items:center;justify-content:center;padding:20px;z-index:75}
.whobox{text-align:center;max-width:760px;width:100%}
.whobox h2{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;color:var(--gold2);letter-spacing:.08em;margin:0 0 22px}
.whogrid{display:flex;flex-wrap:wrap;gap:18px;justify-content:center;margin-bottom:22px}
.whop{width:120px;display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 8px;background:#000;border:1px solid var(--line);border-radius:16px}
.whop .wav{font-size:46px;line-height:1}
.whop b{font-weight:600}
.whop small{color:var(--gold);font-size:12px}
.whop:hover,.whop:focus-visible,.whop.on{border-color:var(--gold);box-shadow:0 0 18px rgba(var(--grgb),.45);outline:none}
.proflist{display:flex;flex-direction:column;gap:8px}
.profrow{display:flex;align-items:center;gap:10px;background:rgba(0,0,0,.6);border:1px solid var(--line);border-radius:10px;padding:8px 10px}
.profrow.on{border-color:var(--gold)}
.profrow .wav{font-size:24px}
.profrow b{flex:1;font-weight:500}
@media (max-width:760px){.whop{width:100px}.whop .wav{font-size:38px}}

/* ===== reminders ===== */
.tvgp.rem{border-color:var(--gold)}
.tvgp.rem::after{content:'🔔';position:absolute;top:3px;right:5px;font-size:11px}

/* sleep timer button: emoji moon, sized to match the refresh button */
#sleepBtn{font-size:18px}
#sleepBtn:not(.on){filter:saturate(.6)}

/* ===== multi-view ===== */
#v-multi{background:#000}
.mvwrap{display:flex;flex-direction:column;width:100%;height:100%;min-width:0}
.mvbar{display:flex;align-items:center;gap:12px;padding:8px 12px;border-bottom:1px solid var(--line);flex-shrink:0}
.mvhint{color:var(--muted);font-size:13px}
.mvgrid{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:4px;padding:4px}
.mvtile{position:relative;background:#050505;border:2px solid transparent;border-radius:8px;overflow:hidden;display:flex;align-items:center;justify-content:center;cursor:pointer;min-height:0}
.mvtile.on{border-color:var(--gold);box-shadow:0 0 14px rgba(var(--grgb),.4)}
.mvtile video{width:100%;height:100%;object-fit:contain;background:#000}
.mvname{position:absolute;left:8px;bottom:6px;font-size:12px;background:rgba(0,0,0,.7);padding:2px 8px;border-radius:6px;max-width:80%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mvx{position:absolute;top:6px;right:6px;background:rgba(0,0,0,.7);color:var(--muted);border-radius:50%;width:28px;height:28px;padding:0}
.mvadd{background:#000;border:1px dashed var(--gold);color:var(--gold2);padding:10px 16px}
#mvpick{position:fixed;inset:0;background:rgba(0,0,0,.85);display:flex;align-items:center;justify-content:center;padding:16px;z-index:70}
.mvplist{max-height:60vh;overflow-y:auto;margin-top:10px}
@media (max-width:760px){.mvgrid{grid-template-columns:1fr;grid-template-rows:none;grid-auto-rows:minmax(180px,1fr);overflow-y:auto}}

/* ===== phones: more compact menus so everything fits (incl. Multi, refresh, sleep) ===== */
@media (max-height:520px) and (min-width:761px){
  #shell:not(.at-home) #side{padding:4px 8px;gap:5px}
  #shell:not(.at-home) .nav{padding:5px 10px;font-size:10.5px;letter-spacing:.05em;gap:6px}
  #shell:not(.at-home) .nav span{font-size:13px}
  #shell:not(.at-home) .refresh{width:30px;height:30px;font-size:15px}
  .cats{width:190px}
  .cat{font-size:12px;padding:6px 8px}
  .ch .n{font-size:13px}
  .ch .e{font-size:11px}
  .livecol .bar{flex-wrap:wrap;row-gap:6px;padding:6px 8px}
  .livecol .bar .tbtn{padding:4px 9px;font-size:11px}
  .livecol .bar input{flex:1 1 100%;padding:6px 10px;font-size:13px}
}
@media (max-width:760px){
  .bar{flex-wrap:wrap;row-gap:6px}
  .bar .tbtn{padding:5px 10px;font-size:12px}
  .bar input{flex:1 1 100%}
}

/* ===== sort menu ===== */
.sortSel{background:rgba(0,0,0,.6);color:var(--gold2);border:1px solid var(--gold);border-radius:10px;padding:8px 10px;font:inherit;margin:8px 0 0;max-width:100%}

/* ===== clear remote highlight on rebranded services ===== */
html[style*="--gold"] :focus-visible{outline:3px solid #fff!important;outline-offset:1px!important;box-shadow:0 0 0 5px var(--gold2),0 0 20px var(--gold2)!important}
html[style*="--gold"] .ch:focus-visible,html[style*="--gold"] .cat:focus-visible,html[style*="--gold"] .ep:focus-visible{outline:none!important;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 6px var(--gold2)!important}

/* ===== Continue Watching row on Home ===== */
.hcw{margin:18px 0 8px}
.hcwt{font-family:"Exo 2",system-ui,"Segoe UI",sans-serif;color:var(--gold2);font-size:1.05rem;margin:0 0 10px;letter-spacing:.5px}
.hcwrow{display:flex;gap:12px;overflow-x:auto;padding:4px 4px 12px;scroll-snap-type:x proximity}
.hcwrow .poster{flex:0 0 130px;scroll-snap-align:start}
@media (min-width:900px){.hcwrow .poster{flex-basis:150px}}

/* ===== sync status ===== */
.syncstat{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:12px 0;color:var(--gold2)}

/* ===== compact home: phones in landscape (short screens) ===== */
@media (max-height: 520px) {
  .home{padding-top:4px!important;padding-bottom:4px!important}
  .hhead{margin-bottom:8px!important;gap:12px!important}
  .hhead img{width:42px!important;height:42px!important}
  .htitle{font-size:1.25rem!important;line-height:1.2!important}
  .hsub{font-size:.8rem!important}
  .hclock{font-size:1.5rem!important}
  .htiles{gap:10px!important;margin-bottom:6px!important}
  .htile{min-height:0!important;height:auto!important;padding:10px 8px!important;font-size:1rem!important}
  .htile span{font-size:1.7rem!important;margin-bottom:2px!important;display:block}
  .hcw{margin:6px 0 4px!important}
  .hcwt{font-size:.85rem!important;margin-bottom:6px!important}
  .hcwrow{gap:8px!important;padding-bottom:6px!important}
  .hcwrow .poster{flex:0 0 76px!important}
  .hcwrow .poster div{font-size:.7rem!important;line-height:1.2!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .hsmall{gap:6px!important;margin-top:4px!important}
  .hbtn{padding:6px 10px!important;font-size:.8rem!important}
}

/* ===== compact home: phones in portrait (narrow screens) ===== */
@media (max-width: 600px) {
  .hhead{gap:10px!important;margin-bottom:10px!important}
  .hhead img{width:46px!important;height:46px!important}
  .htitle{font-size:1.3rem!important;line-height:1.2!important}
  .hsub{font-size:.78rem!important}
  .hclock{font-size:1.3rem!important}
  .htiles{gap:8px!important;margin-bottom:6px!important}
  .htile{min-height:0!important;height:auto!important;padding:12px 6px!important;font-size:.9rem!important}
  .htile span{font-size:1.8rem!important;margin-bottom:2px!important;display:block}
  .hcw{margin:8px 0 4px!important}
  .hcwt{font-size:.9rem!important;margin-bottom:6px!important}
  .hcwrow{gap:8px!important}
  .hcwrow .poster{flex:0 0 92px!important}
  .hcwrow .poster div{font-size:.72rem!important;line-height:1.2!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .hsmall{gap:6px!important;flex-wrap:wrap!important}
  .hbtn{padding:7px 10px!important;font-size:.8rem!important}
}

/* ===== strict CW row sizing (same size cards on every device) ===== */
.hcwrow{align-items:flex-start!important;max-width:100%!important}
.hcwrow .poster{width:130px!important;min-width:0!important;max-width:130px!important;overflow:hidden}
.hcwrow .poster img{width:100%!important;height:auto!important;aspect-ratio:2/3!important}
.home{max-width:100%;overflow-x:hidden}
@media (min-width:900px){.hcwrow .poster{width:150px!important;max-width:150px!important}}
@media (max-width:600px){.hcwrow .poster{width:92px!important;max-width:92px!important}}
@media (max-height:520px){.hcwrow .poster{width:76px!important;max-width:76px!important}}

/* ===== landscape home v2: everything on one screen ===== */
@media (max-height: 520px) {
  .home{gap:6px!important;justify-content:flex-start!important;min-height:0!important;height:auto!important;padding-top:2px!important}
  .hhead{margin-bottom:2px!important}
  .htiles{gap:8px!important;margin:0!important}
  .htile{height:58px!important;min-height:0!important;padding:0 10px!important;display:flex!important;flex-direction:row!important;
         align-items:center!important;justify-content:center!important;gap:12px!important;font-size:1rem!important}
  .htile span{font-size:1.5rem!important;margin:0!important;display:inline-block!important}
  .hcw{margin:2px 0 0!important}
  .hcwt{font-size:.8rem!important;margin:0 0 4px!important}
  .hcwrow{padding:2px 4px 2px!important}
  .hcwrow .poster{flex:0 0 64px!important;width:64px!important;max-width:64px!important}
  .hsmall{margin-top:4px!important;gap:6px!important}
  .hbtn{padding:5px 10px!important;font-size:.78rem!important}
}

/* ===== landscape home v3: tighter ===== */
@media (max-height: 520px) {
  .home{gap:4px!important}
  .hhead{gap:10px!important}
  .hhead img{width:34px!important;height:34px!important}
  .htitle{font-size:1.05rem!important}
  .hsub{font-size:.7rem!important}
  .hclock{font-size:1.15rem!important}
  .htile{height:46px!important;font-size:.9rem!important}
  .htile span{font-size:1.25rem!important}
  .hcwt{font-size:.75rem!important;margin:0 0 3px!important}
  .hcwrow .poster{flex:0 0 56px!important;width:56px!important;max-width:56px!important}
  .hcwrow .poster div{display:none!important}
  .hbtn{padding:4px 9px!important;font-size:.72rem!important}
}

/* ===== home v4: CW row starts at the left, no scroll bar on Home ===== */
.hcw{align-self:stretch!important;width:100%!important;max-width:100%!important;min-width:0!important;text-align:left!important}
.hcwrow{min-width:0!important;width:100%!important;justify-content:flex-start!important}
#shell.at-home main,#v-home,.home{scrollbar-width:none}
#shell.at-home main::-webkit-scrollbar,#v-home::-webkit-scrollbar,.home::-webkit-scrollbar{display:none;width:0;height:0}
.hcwrow{scrollbar-width:none}
.hcwrow::-webkit-scrollbar{display:none}
@media (max-height: 520px) {
  .home{gap:3px!important;padding-bottom:0!important}
  .hhead img{width:30px!important;height:30px!important}
  .htitle{font-size:.95rem!important}
  .hclock{font-size:1.05rem!important}
  .htile{height:40px!important}
  .hcwrow .poster{flex:0 0 50px!important;width:50px!important;max-width:50px!important}
  .hsmall{margin-top:2px!important}
  .hbtn{padding:3px 8px!important}
}

/* ===== TV three-column Live TV (Firestick and other wide screens) ===== */
@media (min-width: 761px) and (orientation: landscape) {
  .livecol{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)!important;grid-template-rows:auto auto minmax(0,1fr)!important}
  .livecol .chlist{grid-column:1!important;grid-row:1 / span 3!important;min-height:0!important;border-right:1px solid var(--line)}
  .livecol .player{grid-column:2!important;grid-row:1!important;align-self:start!important;max-height:none!important}
  .livecol .bar{grid-column:2!important;grid-row:2!important;border-bottom:none}
  .livecol > *:not(.player):not(.bar):not(.chlist){grid-column:2!important}
}

/* ===== Firestick home (TVs showing about 960x540) ===== */
@media (min-height: 521px) and (max-height: 620px) and (orientation: landscape) {
  .home{gap:8px!important;justify-content:flex-start!important;min-height:0!important;height:auto!important;padding-top:6px!important}
  .hhead{margin-bottom:4px!important;gap:12px!important}
  .hhead img{width:48px!important;height:48px!important}
  .htitle{font-size:1.4rem!important}
  .hsub{font-size:.8rem!important}
  .hclock{font-size:1.6rem!important}
  .htiles{gap:12px!important;margin:0!important}
  .htile{height:100px!important;min-height:0!important;padding:8px!important;display:flex!important;flex-direction:column!important;
         align-items:center!important;justify-content:center!important;gap:6px!important;font-size:1.1rem!important}
  .htile span{font-size:2rem!important;margin:0!important}
  .hcw{margin:4px 0 0!important}
  .hcwt{font-size:.85rem!important;margin:0 0 6px!important}
  .hcwrow .poster{flex:0 0 96px!important;width:96px!important;max-width:96px!important}
  .hcwrow .poster div{font-size:.72rem!important;line-height:1.2!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .hsmall{margin-top:6px!important;gap:8px!important;flex-wrap:nowrap!important}
  .hbtn{padding:6px 12px!important;font-size:.85rem!important}
}

/* ===== compact live player: phones upright ===== */
@media (orientation: portrait) and (max-width: 760px) {
  .livecol .player{flex:0 0 auto!important;width:100%!important;height:auto!important;aspect-ratio:16/9;max-height:30vh!important}
  .livecol .player video{width:100%!important;height:100%!important;max-height:30vh!important;object-fit:contain}
  .livecol .bar{row-gap:6px!important;padding-top:6px!important;padding-bottom:6px!important}
}

/* ===== own full-screen for web players ===== */
.player:not(.vfs){position:relative}
.vfsbtn{position:absolute;top:8px;right:8px;z-index:6;background:rgba(0,0,0,.6);color:#fff;border:1px solid var(--gold);
        border-radius:8px;padding:4px 10px;font-size:18px;line-height:1.2;cursor:pointer}
.player.vfs{position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important;width:100vw!important;
            height:100vh!important;max-height:none!important;aspect-ratio:auto!important;z-index:9999!important;background:#000!important;margin:0!important}
.player.vfs video{width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important}
body.vfs-on{overflow:hidden}

/* ===== old-engine compatibility (auto-generated) ===== */
#modal{top:0;right:0;bottom:0;left:0}
body::before{top:0;right:0;bottom:0;left:0}
body::after{top:0;right:0;bottom:0;left:0}
#guide{top:0;right:0;bottom:0;left:0}
#cmgr{top:0;right:0;bottom:0;left:0}
#upd{top:0;right:0;bottom:0;left:0}
#who{top:0;right:0;bottom:0;left:0}
#mvpick{top:0;right:0;bottom:0;left:0}
html.old-engine :focus{outline:3px solid #fff!important;outline-offset:1px!important;box-shadow:0 0 0 5px var(--gold2,#f6d77b),0 0 20px var(--gold2,#f6d77b)!important}
html.old-engine .ch:focus,html.old-engine .cat:focus,html.old-engine .ep:focus{outline:none!important;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 6px var(--gold2,#f6d77b)!important}
html.old-engine input:focus,html.old-engine select:focus{outline:2px solid var(--gold2,#f6d77b)!important;box-shadow:none!important}

/* ===== LOGIXS EXTRAS ===== */
@media (orientation:portrait){body::before{background-image:var(--bgimg, url("../img/bg-portrait.jpg?v=2"))}}
.card img.wide{width:min(320px,86%);height:auto;border-radius:0;margin:0 auto 14px;filter:drop-shadow(0 4px 18px rgba(0,0,0,.6))}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.brand img,.hhead img{border-radius:50%;background:transparent}
.brand b,.htitle{background:linear-gradient(180deg,var(--gold4),var(--gold) 55%,var(--gold3));-webkit-background-clip:text;background-clip:text;color:transparent;font-weight:800}
.hclock{color:var(--hl)}

/* ===== provider extras: tagline, messages, contact links ===== */
.htag{color:var(--muted);font-size:14px;margin-top:2px;letter-spacing:.02em}
.hmsgs{width:100%;max-width:980px;display:flex;flex-direction:column;gap:10px;margin:4px 0 10px}
.hmsg{position:relative;display:flex;gap:14px;align-items:center;background:rgba(0,0,0,.82);border:1px solid var(--line);border-left:3px solid var(--gold);border-radius:14px;padding:12px 40px 12px 12px}
.hmsg img{width:120px;height:72px;object-fit:cover;border-radius:10px;flex-shrink:0}
.hmtxt{min-width:0;display:flex;flex-direction:column;gap:4px}
.hmtxt b{color:var(--gold2);font-size:16px}
.hmtxt p{margin:0;color:var(--text);font-size:14px;line-height:1.4;white-space:pre-line}
.hmlink{align-self:flex-start;margin-top:4px;padding:6px 14px;border-radius:20px;font-size:13px;text-decoration:none}
.hmsg .nclose{position:absolute;top:8px;right:8px;background:none;color:var(--muted);font-size:16px;padding:2px 6px}
.clinks{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:8px}
.clink{display:inline-flex;align-items:center;gap:6px;padding:9px 16px;border-radius:24px;text-decoration:none;font-size:14px}
#setContact h3{margin:0 0 6px;color:var(--gold2)}
#setContact .clinks{justify-content:flex-start}
.lwelcome{text-align:center;color:var(--text);font-size:14px;line-height:1.45;margin:0 0 14px;white-space:pre-line}
@media(max-width:760px){.hmsg img{width:84px;height:56px}.hmtxt b{font-size:15px}.htag{font-size:12px}}
/* provider logo on the sign-in card (shared links) */
.card img.rlogo{width:96px;height:96px;object-fit:contain;border-radius:18px;margin:0 auto 10px}

/* iPhone: install the web app */
.ioshint{position:relative;background:rgba(0,0,0,.6);border:1px solid var(--line);border-left:3px solid var(--gold);border-radius:12px;padding:10px 34px 10px 12px;margin:0 0 14px;text-align:left}
.ioshint b{color:var(--gold2);font-size:14px}.ioshint p{margin:4px 0 0;font-size:13px;line-height:1.45;color:var(--text)}
.ioshint .ishare{display:inline-block;border:1px solid var(--muted);border-radius:6px;padding:0 5px;font-size:12px}
.ioshint .nclose{position:absolute;top:6px;right:6px;background:none;color:var(--muted);padding:2px 6px;width:auto}

/* ===== Radio ===== */
.htiles.four{grid-template-columns:repeat(4,1fr)}
@media(max-width:760px){.htiles.four{grid-template-columns:1fr 1fr}.htiles.four .htile{min-height:84px;font-size:17px}}
/* fewer home tiles when the provider switches sections off */
.htiles.two{grid-template-columns:repeat(2,1fr);max-width:660px}
.htiles.one{grid-template-columns:1fr;max-width:340px}
.rtop{display:flex;gap:10px;flex-wrap:wrap}.rtop select{flex:0 0 auto;width:auto;min-width:170px}.rtop input{flex:1;min-width:180px}
.rlist{border:1px solid var(--line);border-radius:12px;background:rgba(0,0,0,.35)}
.rst img,.rst .ph{width:48px;height:48px;object-fit:contain;border-radius:10px;background:#0c0c10;display:flex;align-items:center;justify-content:center;font-size:22px}
.rinfo{display:flex;flex-direction:column;min-width:0;gap:3px}
.rinfo b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rinfo small{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rst.active{background:linear-gradient(90deg,rgba(var(--grgb),.18),transparent);box-shadow:inset 3px 0 var(--gold)}
.rbar{position:fixed;left:50%;transform:translateX(-50%);bottom:16px;z-index:55;width:min(560px,calc(100% - 24px));display:flex;align-items:center;gap:12px;
  background:rgba(8,8,10,.94);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid var(--gold);border-radius:16px;padding:8px 10px;box-shadow:0 8px 30px rgba(0,0,0,.6)}
.rbar img{width:42px;height:42px;border-radius:10px;object-fit:contain;background:#0c0c10;flex-shrink:0}
.rbinfo{flex:1;min-width:0;display:flex;flex-direction:column}
.rbinfo b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}
.rbinfo small{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rbbtn{width:40px;height:40px;border-radius:50%;padding:0;flex-shrink:0;background:#000;border:1px solid var(--gold);color:var(--gold2);font-size:16px}
#rbVol{width:90px;flex-shrink:0;accent-color:var(--gold)}
@media(max-width:760px){.rbar{bottom:calc(74px + env(safe-area-inset-bottom))}#rbVol{display:none}}
#shell.at-home .rbar{bottom:16px}
/* ===== Look: Guide (TV-box style: channel list with now / progress / next, preview + programme info beside it) ===== */
.ch .ebar,.ch .en{display:none}
html.look-guide .ch .t{flex:1}
html.look-guide .ch .ebar{display:block;height:3px;border-radius:2px;background:rgba(255,255,255,.12);margin-top:6px;overflow:hidden;max-width:420px}
html.look-guide .ch .ebar i{display:block;height:100%;width:0;background:var(--gold);transition:width .6s}
html.look-guide .ch .en{display:block;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}
html.look-guide .ch.active .en{color:var(--text)}
@media (min-width:761px){
  html.look-guide #v-live .cats{width:200px}
  html.look-guide .livecol{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.95fr);grid-template-rows:auto auto minmax(0,1fr)}
  html.look-guide .livecol .chlist{grid-column:1;grid-row:1 / span 3;min-height:0;border-right:1px solid var(--line)}
  html.look-guide .livecol .player{grid-column:2;grid-row:1;align-self:start;max-height:none}
  html.look-guide .livecol .bar{grid-column:2;grid-row:2;border-bottom:none}
  html.look-guide .nownext{display:block;grid-column:2;grid-row:3;min-height:0;overflow-y:auto;padding:14px 18px;background:rgba(0,0,0,.6);border-top:1px solid var(--line);cursor:pointer}
  html.look-guide .ch{padding:11px 14px}
  html.look-guide .ch img,html.look-guide .ch .ph{width:62px;height:40px}
  html.look-guide .nnt{font-size:18px}
  html.look-guide .nnds{-webkit-line-clamp:6;font-size:13px}
}
@media (max-height:520px) and (min-width:761px){
  html.look-guide .ch{padding:7px 10px}
  html.look-guide .ch img,html.look-guide .ch .ph{width:46px;height:30px}
  html.look-guide .nnt{font-size:15px}
}@media (min-width:761px){html.look-guide .livecol .bar{flex-wrap:wrap;row-gap:6px}html.look-guide .livecol .bar input{flex:1 1 160px;min-width:140px}}

/* ===== Look: Showcase (streaming-service style: featured banner, rows of posters, big artwork) ===== */
#shHero,#shRows{display:none}
html.look-showcase #shHero,html.look-showcase #shRows{display:block}
html.look-showcase .home{max-width:none}
html.look-showcase .hhead,html.look-showcase .htiles,html.look-showcase .hcw,html.look-showcase .hsmall,html.look-showcase .hmsgs,html.look-showcase .hnews{max-width:1400px}
.shero{position:relative;width:100%;max-width:1400px;min-height:min(46vh,460px);border-radius:22px;overflow:hidden;border:1px solid var(--line);display:flex;align-items:flex-end;margin:6px 0 16px;box-shadow:0 18px 50px rgba(0,0,0,.55)}
.shero.hidden{display:none!important}
.shbg{position:absolute;inset:0;background:#000 center/cover no-repeat;filter:saturate(1.1)}
.shbg::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.92) 0%,rgba(0,0,0,.7) 40%,rgba(0,0,0,.15) 75%),linear-gradient(0deg,rgba(0,0,0,.85),transparent 55%)}
.shtxt{position:relative;padding:34px 36px;max-width:620px;display:flex;flex-direction:column;gap:10px}
.shtag{align-self:flex-start;background:var(--gold);color:#fff;font-weight:800;font-size:12px;letter-spacing:.14em;padding:4px 10px;border-radius:6px}
.shtxt h2{margin:0;font-size:clamp(26px,3.4vw,46px);line-height:1.05;font-weight:800;color:#fff;text-shadow:0 4px 20px rgba(0,0,0,.6)}
.shmeta{color:var(--gold2);font-size:14px;font-weight:600}
.shtxt p{margin:0;color:#e6e6ea;font-size:15px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.shbtns{display:flex;gap:10px;margin-top:6px;flex-wrap:wrap}
.shbtns button{padding:12px 22px;border-radius:12px;font-size:15px}
.shposter{position:absolute;right:34px;bottom:30px;width:clamp(120px,13vw,190px);aspect-ratio:2/3;object-fit:cover;border-radius:14px;border:1px solid rgba(255,255,255,.18);box-shadow:0 14px 40px rgba(0,0,0,.7)}
html.look-showcase .htiles{display:flex!important;flex-wrap:wrap;gap:10px;margin-bottom:6px}
html.look-showcase .htile{min-height:0!important;flex:0 0 auto;flex-direction:row;gap:10px;padding:11px 20px;border-radius:999px;font-size:14px}
html.look-showcase .htile span{font-size:20px}
.srow{width:100%;max-width:1400px;margin-top:14px}
.srowlist{display:flex;gap:14px;overflow-x:auto;padding:4px 2px 12px;scroll-snap-type:x proximity}
.srowlist .poster{flex:0 0 160px;scroll-snap-align:start}
.shch{flex:0 0 150px;display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 8px;border-radius:14px;background:rgba(0,0,0,.7);border:1px solid var(--line);font-size:13px;text-align:center}
.shch img,.shch .ph{width:100px;height:60px;object-fit:contain;display:flex;align-items:center;justify-content:center;font-size:28px}
.shch div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
html.look-showcase #homeCWRow .poster{flex-basis:160px}
@media (min-width:761px){html.look-showcase .grid{grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:20px}}
@media (max-width:760px){
  .shero{min-height:auto;flex-direction:column;align-items:stretch;border-radius:18px}
  .shtxt{padding:150px 18px 18px;max-width:none}
  .shtxt p{-webkit-line-clamp:2;font-size:13px}
  .shposter{display:none}
  .shbg::after{background:linear-gradient(0deg,rgba(0,0,0,.95) 35%,rgba(0,0,0,.25))}
  html.look-showcase .htiles{display:grid!important;grid-template-columns:1fr 1fr}
  html.look-showcase .htile{justify-content:center}
  .srowlist .poster,html.look-showcase #homeCWRow .poster{flex-basis:112px}
  .shch{flex-basis:118px}
}html.look-showcase #shRows{width:100%;max-width:1400px;min-width:0}
.srowlist{max-width:100%}
.shero,#shRows,.srow{flex-shrink:0}

/* ===== Look: Glass (frosted see-through panels over the provider's background) ===== */
html.look-glass{--line:rgba(255,255,255,.14)}
html.look-glass body::after{background:radial-gradient(ellipse at center,rgba(0,0,0,.02),rgba(0,0,0,.42))}
html.look-glass #side,html.look-glass .cats,html.look-glass .livecol,html.look-glass .gridcol,html.look-glass .settings,html.look-glass .searchcol,html.look-glass .nownext{
  background:rgba(22,22,30,.36)!important;-webkit-backdrop-filter:blur(18px) saturate(1.35);backdrop-filter:blur(18px) saturate(1.35)}
html.look-glass .bar{background:rgba(255,255,255,.04)!important}
html.look-glass .htile,html.look-glass .hbtn,html.look-glass .acct,html.look-glass .card,html.look-glass .hmsg,html.look-glass .hnews,html.look-glass .shero,html.look-glass .rbar,html.look-glass .shch{
  background:rgba(255,255,255,.08)!important;-webkit-backdrop-filter:blur(16px) saturate(1.3);backdrop-filter:blur(16px) saturate(1.3);border-color:rgba(255,255,255,.18)!important;border-radius:22px}
html.look-glass .mbox{background:rgba(18,18,26,.72)!important;-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px);border-color:rgba(255,255,255,.18)!important;border-radius:22px}
html.look-glass .nav,html.look-glass .tbtn,html.look-glass .chip,html.look-glass .cat{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.14)}
html.look-glass .nav.active,html.look-glass .cat.active{background:rgba(255,255,255,.16)!important;box-shadow:0 4px 20px rgba(0,0,0,.25)}
html.look-glass .ch{border-bottom-color:rgba(255,255,255,.08)}
html.look-glass .ch:hover{background:rgba(255,255,255,.06)}
html.look-glass .ch.active{background:linear-gradient(90deg,rgba(255,255,255,.16),rgba(255,255,255,.02))!important;box-shadow:inset 3px 0 var(--gold)}
html.look-glass .poster img{border-radius:16px;border-color:rgba(255,255,255,.14)}
html.look-glass .player{border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.16)}
html.look-glass input,html.look-glass select{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.16)}
@media (min-width:761px){
  html.look-glass .view{padding:12px;gap:12px}
  html.look-glass .cats,html.look-glass .livecol,html.look-glass .gridcol,html.look-glass .settings,html.look-glass .searchcol{border:1px solid rgba(255,255,255,.14);border-radius:20px;overflow:hidden}
  /* rounded corners must not stop these panels scrolling (overflow:hidden switched scrolling off) */
  html.look-glass .cats,html.look-glass .settings{overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html.look-glass .searchcol{overflow-y:auto}
}
/* old Android TV web engines: blur is too slow there, so use slightly more solid panels instead */
html.old-engine.look-glass *{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html.old-engine.look-glass #side,html.old-engine.look-glass .cats,html.old-engine.look-glass .livecol,html.old-engine.look-glass .gridcol,html.old-engine.look-glass .settings{background:rgba(22,22,30,.8)!important}

/* ===== Look: Compact (small text, tight rows: many more channels and posters on screen) ===== */
html.look-compact .ch{padding:5px 10px;gap:8px}
html.look-compact .ch img,html.look-compact .ch .ph{width:40px;height:26px}
html.look-compact .ch .n{font-size:13px}
html.look-compact .ch .e{font-size:11px;min-height:13px}
html.look-compact .chnum{flex-basis:28px;font-size:11px}
html.look-compact .ch .star{font-size:16px}
html.look-compact .cat{padding:6px 10px;font-size:13px}
html.look-compact .grid{grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px}
html.look-compact .poster div{font-size:11px;margin-top:4px}
html.look-compact .bar{padding:6px 8px;gap:6px}
html.look-compact .tbtn{padding:4px 9px;font-size:11px}
html.look-compact .htile{min-height:110px;font-size:15px}
html.look-compact .htile span{font-size:30px}
html.look-compact .nnt{font-size:14px}
html.look-compact .nnds{font-size:11px}
html.look-compact .rst img,html.look-compact .rst .ph{width:36px;height:36px}
html.look-compact .rinfo b{font-size:13px}
html.look-compact .settings{font-size:14px}
@media (min-width:761px){
  html.look-compact .cats{width:190px;padding:6px}
  html.look-compact .nav{padding:7px 10px;font-size:12px}
}
@media (max-width:760px){
  html.look-compact .htile{min-height:64px;font-size:14px}
  html.look-compact .grid{grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px}
  html.look-compact .ch{padding:5px 8px}
}@media (min-width:761px){.livecol .bar{flex-wrap:wrap;row-gap:6px}.livecol .bar input{flex:1 1 160px;min-width:140px}}

/* ===== provider banner logo: replaces the small logo + name at the top of Home ===== */
.hhead img.hbanner{display:none}
html.has-banner .hhead img.hbanner{display:block;width:auto!important;height:auto!important;max-width:min(520px,62vw)!important;max-height:76px!important;border-radius:0!important;box-shadow:none!important;background:none!important;object-fit:contain}
html.has-banner .hhead>img:not(.hbanner),html.has-banner .hhead .htitle{display:none}
@media (max-width:760px){html.has-banner .hhead img.hbanner{max-height:52px!important;max-width:60vw!important}}

/* ===== provider videos ===== */
.vlogo-host{position:relative}
.vlogo-under{visibility:hidden}
video.vlogo{position:absolute;object-fit:cover;pointer-events:none;background:#000}
.hvban{width:100%;max-width:980px;aspect-ratio:21/6;max-height:32vh;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:#000;flex-shrink:0}
.hvban video{width:100%;height:100%;object-fit:cover;display:block}
html.look-showcase .hvban{max-width:1400px}
@media (max-width:760px){.hvban{aspect-ratio:16/8;border-radius:12px}}
@media (max-height:500px){.hvban{max-height:26vh}}
#introVid{position:fixed;inset:0;z-index:200;background:#000;display:flex;align-items:center;justify-content:center;transition:opacity .35s}
#introVid.out{opacity:0;pointer-events:none}
#introVid video{width:100%;height:100%;object-fit:contain}
#introVid .introskip{position:absolute;top:calc(14px + var(--sat,0px));right:calc(14px + var(--sar,0px));background:rgba(0,0,0,.6);color:#fff;border:1px solid rgba(255,255,255,.35);border-radius:999px;padding:9px 18px;font-size:15px;font-weight:600}
#introVid .introskip:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* ===== picture shape (player button) ===== */
.fitbtn{position:absolute;top:8px;right:58px;z-index:6;background:rgba(0,0,0,.6);color:#fff;border:1px solid var(--gold);border-radius:8px;padding:5px 10px;font-size:14px;line-height:1.3;cursor:pointer;white-space:nowrap}
.player video.fit-fill{object-fit:cover!important}
.player video.fit-stretch{object-fit:fill!important}
.player video.fit-zoom{object-fit:cover!important;object-view-box:inset(0 12.5% 0 12.5%)}

/* ===== screen size for TVs that cut off the edges (overscan): added to the safe-area space everything already keeps ===== */
:root{
  --osc:0;
  --sat:calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--osc) * 1vh);
  --sab:calc(var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) + var(--osc) * 1vh);
  --sal:calc(var(--safe-area-inset-left, env(safe-area-inset-left, 0px)) + var(--osc) * 1vw);
  --sar:calc(var(--safe-area-inset-right, env(safe-area-inset-right, 0px)) + var(--osc) * 1vw);
}
#who,#mvpick{padding:calc(16px + var(--sat)) calc(16px + var(--sar)) calc(16px + var(--sab)) calc(16px + var(--sal))}
.rbar{margin-bottom:calc(var(--osc) * 1vh)}
.player.vfs{top:calc(var(--osc) * 1vh)!important;bottom:calc(var(--osc) * 1vh)!important;left:calc(var(--osc) * 1vw)!important;right:calc(var(--osc) * 1vw)!important;width:auto!important;height:auto!important}
#oscAdj{position:fixed;inset:0;z-index:250;background:rgba(0,0,0,.6)}
.oscframe{position:absolute;top:calc(var(--osc) * 1vh);bottom:calc(var(--osc) * 1vh);left:calc(var(--osc) * 1vw);right:calc(var(--osc) * 1vw);border:4px solid var(--gold);box-shadow:inset 0 0 0 2px rgba(255,255,255,.35);pointer-events:none}
.oc{position:absolute;font-style:normal;color:var(--gold2);font-size:36px;line-height:1}
.oc.tl{top:6px;left:8px}.oc.tr{top:6px;right:8px}.oc.bl{bottom:6px;left:8px}.oc.br{bottom:6px;right:8px}
.oscbox{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(10,10,12,.95);border:1px solid var(--line);border-radius:16px;padding:20px 24px;width:min(440px,84vw);text-align:center}
.oscbox h3{margin:0 0 8px;color:var(--gold2)}.oscbox p{margin:0 0 6px;color:var(--muted);font-size:14px;line-height:1.5}
.oscval{font-size:28px;font-weight:700;color:var(--text);margin:8px 0 6px}
.oscbtns{display:flex;gap:10px;margin-top:10px}.oscbtns button{flex:1;margin:0}
@media (max-height:560px){.oscbox{padding:10px 16px;width:min(380px,70vw)}.oscbox h3{font-size:16px;margin-bottom:2px}.oscbox p{font-size:12px;line-height:1.35}.oscval{font-size:20px;margin:2px 0}.oscbtns{margin-top:6px}.oscbtns button{padding:6px 10px;font-size:14px}}

/* ===== coming up (live TV info panel) ===== */
.nnup{display:flex;flex-direction:column;gap:2px;margin-top:4px}
.nnrow{display:flex;gap:12px;align-items:baseline;padding:3px 0;border-bottom:1px solid rgba(255,255,255,.06);font-size:14px}
.nnrow.first .nnrn{font-weight:700;color:var(--text)}
.nnrt{flex:0 0 auto;min-width:52px;color:var(--gold);font-weight:600;font-variant-numeric:tabular-nums}
.nnrn{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
.nnmore{margin-top:10px;font-size:13px;color:var(--gold);font-weight:600}
.nncols{display:block}
.nncol .nnlbl:first-child{margin-top:0}.nncol+.nncol{margin-top:8px}
/* wide screens (TVs): NOW on the left, COMING UP on the right */
@media (min-width:761px){
  .nncols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
  .nncol+.nncol{margin-top:0;border-left:1px solid var(--line);padding-left:16px}
  html.look-guide .nnds{-webkit-line-clamp:5}
  html.look-guide .nnrow{font-size:15px}
}

/* ===== remote-friendly dropdown list ===== */
#selpick{position:fixed;inset:0;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.85);display:flex;align-items:center;justify-content:center;padding:16px;z-index:80}
#selpick .mbox{width:min(520px,92vw);max-height:86vh;display:flex;flex-direction:column}
#selpick h3{margin:0 0 10px}
.splist{overflow-y:auto;min-height:0;display:flex;flex-direction:column;gap:6px;padding:4px}
.spopt{display:block;width:100%;text-align:left;padding:13px 16px;border-radius:10px;border:1px solid var(--line);background:rgba(0,0,0,.5);color:var(--text);font-size:17px;font-weight:600;cursor:pointer}
.spopt.on{color:var(--gold);border-color:var(--gold)}
.spopt:focus,.spopt:hover{outline:none;background:var(--gold);color:#000;border-color:#fff;box-shadow:0 0 0 3px #fff}
.mvphint{color:var(--muted);font-size:13px;padding:2px 4px 8px}.mvphint:empty{display:none}

/* ===== exit question (Back twice on the start screen) ===== */
#exitask{position:fixed;inset:0;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.85);display:flex;align-items:center;justify-content:center;padding:16px;z-index:90}
#exitask .mbox{width:min(420px,92vw);text-align:center}
#exitask h3{margin:4px 0 18px;font-size:22px}
.exrow{display:flex;gap:12px;justify-content:center}
.exrow button{flex:1;max-width:160px;padding:13px 18px;font-size:17px;font-weight:700}
.exrow button:focus{outline:none;box-shadow:0 0 0 3px #fff;transform:scale(1.06)}
/* VPN (Android / Fire TV app): seller's locations on the sign-in screen and in Settings */
.vpnbox{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:4px 0 12px;background:rgba(0,0,0,.25);text-align:left}
.vpnhead{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px;font-size:14px}
.vpnst{font-size:13px;color:var(--muted)}.vpnst.connected{color:#3fb97d;font-weight:700}.vpnst.connecting{color:var(--gold)}.vpnst.error,.vpnst.auth,.vpnst.noperm{color:var(--red)}
.vpnrow{display:flex;gap:8px}.vpnrow select{flex:1;min-width:0;margin:0}.vpnrow button{flex:0 0 auto;margin:0;padding:10px 14px;width:auto}
.vpnnote{color:var(--muted);font-size:12px;margin:8px 0 0}
/* Website in a normal browser: "get the app" page (the player runs only inside the apps) */
html.getapp,html.getapp body{overflow:auto!important;height:auto!important}
#getapp{min-height:100vh;display:flex;justify-content:center;padding:32px 16px;background:var(--bg)}
.gawrap{width:100%;max-width:640px;text-align:center}
.galogo{max-width:260px;max-height:90px;object-fit:contain}.galogo.own{max-width:120px;max-height:120px;border-radius:20px}
#getapp h1{color:var(--gold);font-size:26px;margin:18px 0 8px}
.galead{color:var(--muted);margin:0 0 16px;line-height:1.5}
.gacode{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:0 0 18px}.gacode b{color:var(--gold);letter-spacing:.06em}
.gacards{display:grid;gap:12px;text-align:left}
.gacard{display:flex;gap:14px;align-items:flex-start;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:14px 16px}
.gacard.mine{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.gaicon{font-size:28px;line-height:1}.gabody{flex:1;min-width:0}.gabody b{font-size:16px}.gabody p{color:var(--muted);margin:4px 0 10px;font-size:14px;word-break:break-word}
.gabtn{display:inline-block;text-decoration:none;padding:9px 16px;border-radius:10px;font-weight:700}
#getapp .legal{margin-top:22px;font-size:13px}#getapp .legal a{color:var(--muted)}
/* Sign in with a code (code + QR on the sign-in screen) */
.lcode{width:100%;margin-top:10px}
#loginForm.actmode>*:not(.lact):not(.wide):not(.err):not(.acwait){display:none!important}
.lact{text-align:left;margin-top:6px}.lact h3{margin:0 0 10px;color:var(--gold)}
.actrow{display:flex;gap:16px;align-items:center}.actrow>div{flex:1;min-width:0}
.actcode{font-family:ui-monospace,monospace;font-size:40px;font-weight:800;letter-spacing:.12em;color:#fff;margin:2px 0 10px}
.lact p{color:var(--muted);font-size:13px;line-height:1.45;margin:0 0 8px}.lact p b{color:var(--text);white-space:nowrap}
.actqr{width:150px;height:150px;border-radius:12px;background:#fff;padding:6px;flex:0 0 auto}.actqr:not([src]){visibility:hidden}
.acttime{color:var(--muted);font-size:12px}
.lact #actCancel{width:100%;margin-top:14px}
.acwait{text-align:center;color:var(--gold);margin-top:12px}
@media(max-width:480px){.actrow{flex-direction:column-reverse;align-items:flex-start}.actcode{font-size:32px}.actqr{width:130px;height:130px}}
/* Arrange categories: drag handle, move buttons, drag state */
.cmhint{color:var(--muted);font-size:13px;margin:10px 0 0;line-height:1.4}
.cmrow .cmh{flex:0 0 auto;width:28px;text-align:center;font-size:20px;color:var(--muted);cursor:grab;user-select:none;touch-action:none}
.cmrow .cmname{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.cmmv{background:#000;border:1px solid var(--line);color:var(--muted);font-size:11px;padding:6px 8px;line-height:1}
.cmrow.dragging{background:rgba(var(--grgb),.18);box-shadow:0 6px 20px rgba(0,0,0,.6);border-radius:10px;position:relative;z-index:2}
#cmlist.sorting{cursor:grabbing;user-select:none}
#cmlist.sorting .cmrow:not(.dragging){transition:transform .12s}
.cmfoot{display:flex;gap:10px;justify-content:flex-end;margin-top:12px}
.cmfoot button{padding:8px 14px;font-size:13px}
@media (max-width:600px){.cmmv{padding:6px 6px}.cmbtn{padding:6px 7px;font-size:11px}}

/* Home on portrait phones: fit on one screen (no little scroll), bottom row clear of the gesture bar */
@media (max-width:600px) and (orientation:portrait){
  .home{gap:10px!important;padding-top:calc(10px + var(--sat, 0px))!important;padding-bottom:calc(10px + var(--sab, 0px))!important;overscroll-behavior-y:none}
  .hsmall{margin-top:0!important}
  .htile{min-height:0!important;height:64px!important}
  .hvban{max-height:150px}
  .hcwrow .poster{width:80px!important;max-width:80px!important;flex:0 0 80px!important}
}@media (max-width:600px) and (pointer:coarse){.cmmv{display:none}.cmrow{gap:6px}}

/* Home auto-fit steps on portrait phones (app.js fitHome adds them one at a time until Home fits) */
@media (max-width:600px) and (orientation:portrait){
  .home.hfit{overflow-y:hidden!important}
  .home.hf1{gap:7px!important}.home.hf1 .htile{height:56px!important}.home.hf1 .hvban{max-height:126px}
  .home.hf2 .hcwrow .poster{width:70px!important;max-width:70px!important;flex:0 0 70px!important}.home.hf2 .hbtn{padding:6px 10px!important}.home.hf2 .hhead img{width:36px!important;height:36px!important}
  .home.hf3{gap:5px!important}.home.hf3 .htile{height:50px!important}.home.hf3 .hvban{max-height:100px}.home.hf3 .hcwrow .poster{width:62px!important;max-width:62px!important;flex:0 0 62px!important}
  .home.hf4 .hvban{max-height:80px}.home.hf4 .hcwt{margin-bottom:2px!important}.home.hf4 .hbtn{padding:4px 8px!important}
}
/* Arrange categories: a big, easy ≡ handle to grab on touch screens */
@media (pointer:coarse){.cmrow .cmh{width:44px;align-self:stretch;display:flex;align-items:center;justify-content:center;font-size:26px;color:var(--gold2, var(--gold));margin:-8px 0 -8px -4px}}
/* Home auto-fit steps on phones held sideways */
@media (max-height:520px) and (orientation:landscape){
  .home.hfit{overflow-y:hidden!important}
  .home{overscroll-behavior-y:none}
  .home.hf1{gap:2px!important}.home.hf1 .htile{height:36px!important}
  .home.hf2 .hcwrow .poster{flex:0 0 44px!important;width:44px!important;max-width:44px!important}.home.hf2 .hvban{max-height:70px}
  .home.hf3 .hbtn{padding:2px 7px!important;font-size:.68rem!important}.home.hf3 .hcwt{margin-bottom:1px!important}
  .home.hf4 .hvban{max-height:50px}.home.hf4 .htile{height:32px!important}.home.hf4 .hhead img{width:26px!important;height:26px!important}
}@media (max-height:520px) and (orientation:landscape){.home.hf5 .hcwt{display:none!important}.home.hf5 .hcwrow .poster{flex:0 0 38px!important;width:38px!important;max-width:38px!important}.home.hf5 .hvban{max-height:40px}}
@media (max-width:600px) and (orientation:portrait){.home.hf5 .hvban{max-height:64px}.home.hf5 .hcwrow .poster{width:54px!important;max-width:54px!important;flex:0 0 54px!important}}
.player .vosd{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,.7);color:#fff;font-size:28px;font-weight:700;padding:14px 26px;border-radius:14px;opacity:0;transition:opacity .2s;pointer-events:none;z-index:5}.player .vosd.on{opacity:1}
/* Vega app: no blur effects (its player can't draw video under blurred layers, and it's faster) */
html.vega-app *{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
/* Vega: video inside rounded, clipped boxes is decoded but never shown - so no rounded clipping around video there */
html.vega-app .player,html.vega-app .mbox{border-radius:0!important}
html.vega-app .player{overflow:visible!important}
html.vega-app .mbox:has(.player.vfs){overflow:visible!important}
html.vega-app .player video{border-radius:0!important}
/* iPhone / iPad app: text boxes at 16px so iOS doesn't zoom the page when one is tapped */
html.ios-app input,html.ios-app select,html.ios-app textarea{font-size:16px!important}

/* Vega: on-screen bar for films / episodes */
.player .vbar{position:absolute;left:0;right:0;bottom:0;z-index:7;display:flex;align-items:center;gap:10px;padding:18px 16px 14px;background:linear-gradient(transparent,rgba(0,0,0,.85) 45%);opacity:0;transition:opacity .25s;pointer-events:none}
.player .vbar.on{opacity:1;pointer-events:auto}
.player .vbar .vbtn{background:rgba(0,0,0,.65);color:#fff;border:1px solid var(--gold);border-radius:10px;padding:9px 16px;font-size:18px;font-weight:700;line-height:1.2;cursor:pointer;white-space:nowrap}
.player .vbar .vbtn:focus{outline:3px solid var(--gold);outline-offset:2px;background:rgba(220,38,45,.55)}
.player .vbar .vtime{flex:1;text-align:center;color:#fff;font-size:18px;font-weight:600;text-shadow:0 1px 4px #000;white-space:nowrap}
.player video::cue{font-size:120%;background:rgba(0,0,0,.65);color:#fff}
#selpick{z-index:10000}
/* iPad Safari: a full-screen player must not keep its landscape grid cell (that cell is empty, so it was 0 px tall) */
.livecol .player.vfs,.player.vfs{grid-column:auto!important;grid-row:auto!important;grid-area:auto!important;align-self:auto!important}
/* Home auto-fit steps on tablets / iPads (app.js fitHome adds them one at a time, after shortening the video banner) */
.home.tf1{gap:16px!important}.home.tf1 .htile{min-height:130px!important}
.home.tf2 .htile{min-height:100px!important}.home.tf2 .hcwrow .poster{flex:0 0 110px!important;width:110px!important;max-width:110px!important}
.home.tf3{gap:10px!important}.home.tf3 .htile{min-height:80px!important;gap:6px!important}.home.tf3 .hcwrow .poster{flex:0 0 90px!important;width:90px!important;max-width:90px!important}
