:root{
  --bg:#0B0D12; --accent:#F2B544; --on-accent:#141007;
  --surface:color-mix(in srgb,var(--bg) 88%,#fff 12%);
  --surface-2:color-mix(in srgb,var(--bg) 80%,#fff 20%);
  --line:color-mix(in srgb,var(--bg) 84%,#fff 16%);
  --ink:#F2F3F6; --muted:rgba(236,239,246,.62); --faint:rgba(236,239,246,.38);
  --danger:#FF6B6B; --ok:#5ED39A;
  --safe-t:env(safe-area-inset-top,0px); --safe-b:env(safe-area-inset-bottom,0px);
  --tabbar:58px; --radius:12px;
  color-scheme:dark;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink)}
body{font:15px/1.4 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,system-ui,sans-serif;-webkit-font-smoothing:antialiased;overscroll-behavior-y:none}
button,input{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
a{color:inherit}
img{max-width:100%}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.hidden{display:none!important}
#app{min-height:100%}
.boot{position:fixed;top:0;right:0;bottom:0;left:0;display:grid;place-items:center}
.boot img{border-radius:18px;animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{50%{opacity:.55}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ---------- welcome + login ---------- */
.gate{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;justify-content:center;gap:28px;padding:calc(var(--safe-t) + 32px) 24px calc(var(--safe-b) + 32px);max-width:440px;margin:0 auto;background:radial-gradient(120% 55% at 50% 0%,color-mix(in srgb,var(--accent) 16%,transparent),transparent 70%)}
.gate-brand{display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px}
.gate-logo{width:148px;height:148px;border-radius:32px;object-fit:contain;background:transparent;box-shadow:0 18px 50px -18px color-mix(in srgb,var(--accent) 55%,transparent)}
.gate h1{margin:0;font-size:28px;font-weight:700;letter-spacing:-.02em}
.gate .tagline{margin:0;color:var(--muted);font-size:16px;max-width:30ch}
.gate-actions{display:flex;flex-direction:column;gap:12px}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;height:50px;border-radius:14px;font-weight:600;font-size:16px;padding:0 18px}
.btn svg{width:20px;height:20px;flex:none}
.btn-primary{background:var(--accent);color:var(--on-accent)}
.btn-primary:disabled{opacity:.6}
.btn-quiet{background:var(--surface);color:var(--ink)}
.btn-text{height:auto;color:var(--muted);font-weight:500;font-size:14px;padding:8px}
.install{background:var(--surface);border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:10px}
.install h2{margin:0;font-size:15px}
.install ol{margin:0;padding-left:20px;color:var(--muted);display:flex;flex-direction:column;gap:6px}
.install b{color:var(--ink)}
.share-ico{display:inline-block;width:16px;height:16px;vertical-align:-2px;margin:0 2px}
.form{display:flex;flex-direction:column;gap:12px}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:13px;color:var(--muted)}
.field input{height:50px;border-radius:12px;border:1px solid var(--line);background:var(--surface);padding:0 14px;font-size:16px;outline:none}
.field input:focus{border-color:var(--accent)}
.pw{position:relative}
.pw input{width:100%;padding-right:64px}
.pw button{position:absolute;right:6px;top:7px;height:36px;padding:0 10px;color:var(--muted);font-size:13px}
.error{color:var(--danger);font-size:14px;min-height:20px;margin:0}
.notfound{text-align:center;color:var(--muted)}

/* ---------- shell ---------- */
.shell{min-height:100vh;min-height:100dvh;padding-bottom:calc(var(--tabbar) + var(--safe-b))}
.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:8px;min-height:52px;padding:calc(var(--safe-t) + 6px) 12px 8px;background:color-mix(in srgb,var(--bg) 86%,transparent);backdrop-filter:saturate(1.4) blur(18px);-webkit-backdrop-filter:saturate(1.4) blur(18px)}
.topbar h1{margin:0;font-size:20px;font-weight:700;letter-spacing:-.01em;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar .brandmark{width:48px;height:48px;border-radius:12px;flex:none;box-shadow:0 0 18px -4px color-mix(in srgb,var(--accent2,var(--accent)) 55%,transparent),0 0 10px -4px color-mix(in srgb,var(--accent) 60%,transparent)}
.topbar:has(.brand-title) .brandmark{width:60px;height:60px;border-radius:15px}
.topbar.hero{position:relative;display:block;padding:calc(var(--safe-t) + 8px) 12px 4px;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
.topbar.hero h1.hero-banner{margin:0;line-height:0}
.topbar.hero h1.hero-banner img{width:100%;height:auto;max-height:210px;object-fit:cover;border-radius:16px;display:block;box-shadow:0 10px 34px -14px color-mix(in srgb,var(--accent) 55%,transparent),0 6px 26px -16px color-mix(in srgb,var(--accent2,var(--accent)) 60%,transparent)}
.topbar.hero > .icon-btn{position:absolute;right:20px;top:calc(var(--safe-t) + 16px);background:rgba(0,0,0,.45);border-radius:999px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.topbar.hero .svc-switch{margin-top:8px}
.topbar h1.brand-banner{margin:0;line-height:0;align-self:flex-start;max-width:100%}
.topbar h1.brand-banner img{height:58px;max-width:100%;object-fit:contain;object-position:left center;display:block}
.topbar h1.brand-title{align-self:flex-start;max-width:100%;font-size:26px;font-weight:900;letter-spacing:-.01em;padding-right:2px;background:linear-gradient(90deg,var(--accent2,var(--accent)),var(--accent));-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 0 12px color-mix(in srgb,var(--accent) 38%,transparent))}
.icon-btn{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:var(--ink);flex:none}
.icon-btn:active{background:var(--surface)}
.icon-btn svg{width:22px;height:22px}
.content{padding:4px 16px 24px;display:flex;flex-direction:column;gap:22px}
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:30;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);height:calc(var(--tabbar) + var(--safe-b));padding-bottom:var(--safe-b);background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-top:1px solid var(--line)}
.tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:10.5px;color:var(--faint);font-weight:500}
.tab svg{width:24px;height:24px}
.tab span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 2px}
.tab[aria-current="page"]{color:var(--accent)}

/* ---------- sections, rails ---------- */
.section{display:flex;flex-direction:column;gap:10px}
.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.section-head h2{margin:0;font-size:18px;font-weight:700}
.section-head button{color:var(--accent);font-size:14px;font-weight:500}
.rail{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x proximity;margin:0 -16px;padding:0 16px 4px;scrollbar-width:none}
.rail::-webkit-scrollbar{display:none}
.rail > *{scroll-snap-align:start;flex:none}
.hint{color:var(--muted);font-size:14px;margin:0}
.empty{color:var(--muted);text-align:center;padding:40px 16px;display:flex;flex-direction:column;gap:12px;align-items:center}

/* ---------- lists ---------- */
.search{position:relative}
.search input{width:100%;height:42px;border-radius:12px;border:0;background:var(--surface);padding:0 14px 0 38px;font-size:16px;outline:none}
.search svg{position:absolute;left:11px;top:11px;width:20px;height:20px;color:var(--faint)}
.cats{display:flex;flex-direction:column;border-radius:var(--radius);overflow:hidden;background:var(--surface)}
.cat{display:flex;align-items:center;gap:12px;padding:14px;text-align:left;width:100%}
.cat + .cat{border-top:1px solid var(--line)}
.cat span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cat svg{width:16px;height:16px;color:var(--faint);flex:none}
.cat:active{background:var(--surface-2)}
.chips{display:flex;gap:8px;overflow-x:auto;margin:0 -16px;padding:0 16px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;height:34px;padding:0 14px;border-radius:999px;background:var(--surface);font-size:14px;font-weight:500;color:var(--muted);white-space:nowrap}
.chip[aria-pressed="true"]{background:var(--accent);color:var(--on-accent)}

.channels{display:flex;flex-direction:column}
.channel{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;padding:8px 0}
.channel + .channel{border-top:1px solid var(--line)}
.ch-main{display:grid;grid-template-columns:56px 1fr;align-items:center;gap:12px;text-align:left;min-width:0;width:100%}
.ch-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.rail .poster.sq{width:92px}
.sq .poster-img{aspect-ratio:1}
.sq .poster-img img{object-fit:contain;padding:10px}
.ch-logo{width:56px;height:40px;border-radius:8px;background:var(--surface);display:grid;place-items:center;overflow:hidden;font-size:12px;font-weight:700;color:var(--faint)}
.ch-logo img{width:100%;height:100%;object-fit:contain;padding:4px}
.ch-name{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ch-now{font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fav-btn{width:36px;height:36px;display:grid;place-items:center;color:var(--faint)}
.fav-btn svg{width:20px;height:20px}
.fav-btn[aria-pressed="true"]{color:var(--accent)}

.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:12px 10px}
@media (min-width:700px){.grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}}
.poster{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:6px;text-align:left;min-width:0}
.rail .poster{width:112px}
.poster-img{position:relative;aspect-ratio:2/3;border-radius:10px;overflow:hidden;background:var(--surface);display:grid;place-items:center}
.poster-img img{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:cover}
.poster-img .initials{font-size:22px;font-weight:700;color:var(--faint);padding:8px;text-align:center}
.poster-title{font-size:13px;line-height:1.25;color:var(--ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.poster-sub{font-size:12px;color:var(--faint)}
.progress{position:absolute;left:6px;right:6px;bottom:6px;height:3px;border-radius:2px;background:rgba(255,255,255,.25);overflow:hidden}
.progress i{display:block;height:100%;background:var(--accent)}
.wide{width:220px!important}
.wide .poster-img{aspect-ratio:16/9}
.sentinel{height:1px}
.skeleton{background:linear-gradient(90deg,var(--surface) 0%,var(--surface-2) 50%,var(--surface) 100%);background-size:200% 100%;animation:sk 1.2s linear infinite;border-radius:10px}
@keyframes sk{to{background-position:-200% 0}}

/* ---------- detail ---------- */
.detail{display:flex;flex-direction:column;gap:16px}
.backdrop{position:relative;margin:calc(-1 * (var(--safe-t) + 58px)) -16px 0;aspect-ratio:16/10;background:var(--surface) center/cover no-repeat}
.backdrop::after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to bottom,transparent 35%,var(--bg) 100%)}
.detail-head{display:grid;grid-template-columns:104px 1fr;gap:14px;margin-top:-72px;position:relative;z-index:1;align-items:end}
.detail-head .poster-img{box-shadow:0 12px 30px -10px #000}
.detail h2{margin:0;font-size:22px;line-height:1.2;letter-spacing:-.01em}
.meta{display:flex;flex-wrap:wrap;gap:6px 10px;color:var(--muted);font-size:13px}
.plot{color:var(--muted);margin:0;line-height:1.5}
.row-actions{display:grid;grid-template-columns:1fr auto;gap:10px}
.episodes{display:flex;flex-direction:column}
.episode{display:grid;grid-template-columns:128px 1fr;gap:12px;padding:10px 0;text-align:left;width:100%}
.episode + .episode{border-top:1px solid var(--line)}
.episode .poster-img{aspect-ratio:16/9}
.ep-title{font-weight:500;font-size:14px}
.ep-meta{font-size:12px;color:var(--faint)}
.ep-plot{font-size:13px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ---------- player ---------- */
.player{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:#000;display:flex;flex-direction:column;overflow-y:auto}
.player-bar{display:flex;align-items:center;gap:6px;padding:calc(var(--safe-t) + 4px) 8px 6px}
.player-bar h2{margin:0;font-size:16px;font-weight:600;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.video-wrap{position:relative;width:100%;aspect-ratio:16/9;background:#000;max-height:70vh;max-height:70dvh}
.video-wrap video{width:100%;height:100%;display:block;background:#000}
.player-msg{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;text-align:center;padding:20px;color:#fff;background:rgba(0,0,0,.7);font-size:15px}
.player-msg > div{display:flex;flex-direction:column;gap:12px;align-items:center;max-width:34ch}
.spinner{width:34px;height:34px;border-radius:50%;border:3px solid rgba(255,255,255,.25);border-top-color:var(--accent);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.live-controls{position:absolute;left:0;right:0;bottom:0;z-index:4;display:flex;align-items:center;gap:4px;padding:14px 10px 8px;background:linear-gradient(to top,rgba(0,0,0,.7),rgba(0,0,0,0));transition:opacity .25s}
.live-controls .icon-btn{color:#fff}
.live-controls .icon-btn svg{width:24px;height:24px}
.player:not(.chrome) .live-controls{opacity:0;pointer-events:none}
.live-pill{background:#E5484D;color:#fff;font-size:11px;font-weight:800;letter-spacing:.06em;border-radius:6px;padding:2px 7px;margin-left:4px}
.player .land-only{display:none}
.player .video-wrap{overflow:hidden;flex:none}
/* Phone sideways: picture edge to edge, title bar floats over it and fades out while playing. */
@media (orientation:landscape) and (max-height:600px){
  .player{overflow:hidden}
  .player .video-wrap{position:fixed;top:0;right:0;bottom:0;left:0;width:100vw;height:100vh;height:100dvh;max-height:none;aspect-ratio:auto;z-index:1}
  .player .video-wrap video{object-fit:contain;transform-origin:center center;will-change:transform}
  .player .player-bar{position:fixed;left:0;right:0;top:0;z-index:3;padding:calc(var(--safe-t) + 8px) calc(env(safe-area-inset-right,0px) + 12px) 22px calc(env(safe-area-inset-left,0px) + 12px);background:linear-gradient(to bottom,rgba(0,0,0,.7),rgba(0,0,0,0));transition:opacity .25s}
  .player:not(.chrome) .player-bar{opacity:0;pointer-events:none}
  .player .land-only{display:grid}
  .player .player-info{display:none}
  .live-controls{padding:18px calc(env(safe-area-inset-right,0px) + 14px) calc(env(safe-area-inset-bottom,0px) + 10px) calc(env(safe-area-inset-left,0px) + 14px)}
}
.player-info{padding:14px 16px calc(var(--safe-b) + 20px);display:flex;flex-direction:column;gap:12px;background:var(--bg);flex:1}
.epg{display:flex;flex-direction:column;border-radius:var(--radius);background:var(--surface);overflow:hidden}
.epg-item{padding:12px 14px;display:flex;flex-direction:column;gap:3px}
.epg-item + .epg-item{border-top:1px solid var(--line)}
.epg-time{font-size:12px;color:var(--accent);font-variant-numeric:tabular-nums;font-weight:600}
.epg-title{font-weight:500}
.epg-desc{font-size:13px;color:var(--muted)}
.epg-bar{height:3px;border-radius:2px;background:var(--line);overflow:hidden}
.epg-bar i{display:block;height:100%;background:var(--accent)}
.zap{display:grid;grid-template-columns:1fr 1fr;gap:10px}

/* ---------- account ---------- */
.card{background:var(--surface);border-radius:var(--radius);overflow:hidden}
.kv{display:flex;justify-content:space-between;gap:12px;padding:13px 14px}
.kv + .kv{border-top:1px solid var(--line)}
.kv span:first-child{color:var(--muted)}
.kv span:last-child{font-variant-numeric:tabular-nums;text-align:right}
.status-ok{color:var(--ok)}
.status-bad{color:var(--danger)}
.support{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.small{font-size:12px;color:var(--faint);text-align:center}

.toast{position:fixed;left:50%;bottom:calc(var(--tabbar) + var(--safe-b) + 14px);transform:translateX(-50%);z-index:60;background:var(--surface-2);color:var(--ink);padding:10px 16px;border-radius:12px;font-size:14px;box-shadow:0 10px 30px -10px #000;max-width:calc(100% - 32px)}

/* ---------- multi-service ---------- */
.titlewrap{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.titlewrap h1{flex:none}
.svc-switch{align-self:flex-start;background:var(--surface);color:var(--muted);font-size:12px;font-weight:600;border-radius:999px;padding:2px 10px;letter-spacing:.02em}
.svc-switch:active{background:var(--surface-2)}
.svc-tiles{display:flex;flex-direction:column;gap:10px}
.svc-tile{display:flex;align-items:center;gap:14px;padding:16px;border-radius:14px;background:var(--surface);text-align:left;width:100%}
.svc-tile:active{background:var(--surface-2)}
.svc-tile .svc-badge{width:44px;height:44px;border-radius:11px;flex:none;display:grid;place-items:center;font-weight:800;font-size:18px;background:var(--accent);color:var(--on-accent)}
.svc-tile .svc-name{flex:1;min-width:0;font-weight:600;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.svc-tile svg{width:18px;height:18px;color:var(--faint);flex:none}
.svc-login{background:var(--surface);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:2px}
.svc-login + .svc-login{margin-top:2px}
.svc-login-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.svc-login-head b{font-size:15px;letter-spacing:.02em}
.svc-err{color:var(--danger);font-size:13px;min-height:0;margin:2px 0 0}
.svc-err:empty{display:none}
.pill-on{font-size:12px;font-weight:600;color:var(--ok);background:color-mix(in srgb,var(--ok) 18%,transparent);border-radius:999px;padding:2px 9px}

/* ---------- search results ---------- */
.sresults{display:flex;flex-direction:column;gap:12px}
.sresult{display:grid;grid-template-columns:64px 1fr;gap:12px;align-items:start}
.sposter{width:64px;aspect-ratio:2/3;border-radius:8px;overflow:hidden;background:var(--surface);display:grid;place-items:center}
.sposter img{width:100%;height:100%;object-fit:cover}
.sposter .initials{font-size:18px;font-weight:700;color:var(--faint)}
.sinfo{display:flex;flex-direction:column;gap:4px;min-width:0}
.stitle{font-weight:600;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.smeta{font-size:12.5px;color:var(--faint)}
.schips{display:flex;flex-wrap:wrap;gap:6px;margin-top:3px}
.svc-chip{height:30px;padding:0 12px;border-radius:999px;background:var(--accent);color:var(--on-accent);font-size:12.5px;font-weight:700;letter-spacing:.02em}
.svc-chip:active{opacity:.85}
.svc-warn{font-size:12.5px;color:var(--warn,#E6A15C);background:color-mix(in srgb,#E6A15C 14%,transparent);border-radius:8px;padding:8px 10px;margin:0 0 8px}

/* v62: favourites + continue watching editing */
.head-btns{display:flex;gap:14px;align-items:baseline}
.poster-img .rm{display:none}
.only-edit{display:none}.editing .only-edit{display:inline-flex;color:#ff8a8a}
.editing .poster-img .rm{display:grid;place-items:center;position:absolute;top:5px;right:5px;z-index:2;width:28px;height:28px;border-radius:50%;background:rgba(0,0,0,.78);color:#fff;font-size:20px;line-height:1;font-weight:600;box-shadow:0 0 0 1.5px rgba(255,255,255,.35)}
.editing .poster-img img{opacity:.6}
.cat.cat-mine span{color:var(--accent);font-weight:600}

/* v79 refresh button */
.icon-btn.spinning svg{animation:spin .9s linear infinite}
.btn[data-refresh]{display:flex;align-items:center;justify-content:center;gap:8px}
.btn[data-refresh] svg{width:18px;height:18px}

/* v80 Android TV / Fire TV remote: a clear highlight on whatever is selected */
.tv :focus{outline:3px solid var(--accent);outline-offset:2px;border-radius:12px}
.tv .poster:focus{outline-offset:4px;transform:scale(1.04);transition:transform .12s}
.tv .cat:focus,.tv .channel:focus,.tv .ch-main:focus{background:color-mix(in srgb,var(--accent) 22%,var(--surface))}

/* Android app settings */
.set-row{width:100%;text-align:left;font:inherit;color:inherit;background:none}
.set-opt{display:flex;align-items:center;gap:14px;width:100%;padding:14px;text-align:left;font:inherit;color:var(--ink);background:none}
.set-opt + .set-opt{border-top:1px solid var(--line)}
.set-radio{flex:none;width:20px;height:20px;border-radius:50%;border:2px solid var(--faint)}
.set-opt.on .set-radio{border-color:var(--accent);box-shadow:inset 0 0 0 4px var(--surface),inset 0 0 0 10px var(--accent)}
.set-text{display:flex;flex-direction:column;gap:2px}
.set-desc{font-size:13px;color:var(--muted)}
.tv .set-row:focus,.tv .set-opt:focus{outline:none;background:color-mix(in srgb,var(--accent) 22%,var(--surface));border-radius:0}

/* TV (Android app on a Fire TV / TV box): sign-in screens use the whole screen, not a phone column.
   Brand on the left, the form on the right; several services sit side by side so nothing needs scrolling. */
.tv .gate:not(.welcome){max-width:1040px;min-height:100vh;display:grid;grid-template-columns:5fr 7fr;grid-auto-flow:row dense;align-content:center;align-items:center;column-gap:56px;row-gap:10px;padding:24px 48px;background:radial-gradient(55% 80% at 22% 50%,color-mix(in srgb,var(--accent) 16%,transparent),transparent 70%)}
.tv .gate:not(.welcome) > *{grid-column:2}
.tv .gate > .gate-brand,.tv .gate > .gate-side{grid-column:1}
.tv .gate:not(.welcome) .gate-brand{align-items:flex-start;text-align:left}
.tv .gate.welcome{max-width:none;padding-left:calc(50% - 280px);padding-right:calc(50% - 280px)}
.tv .gate.welcome .gate-actions{align-items:center}
.tv .gate.welcome .gate-actions .btn{width:360px}
.tv .gate-side .hint{text-align:left!important}
.tv .gate .tagline{max-width:34ch}
.tv .gate > .form{grid-row:1 / span 3}
.tv .gate > .gate-side{justify-self:start}
.tv .gate > .gate-actions.gate-side{justify-self:stretch}
.tv .form.multi{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tv .form.multi > :not(.svc-login){grid-column:1 / -1}
.tv .form.multi .svc-login{margin-top:0;padding:10px 12px}
.tv .form.multi .svc-login-head{margin-bottom:2px}
.tv .form.multi .field{gap:3px}
.tv .form.multi .field label{font-size:12px}
.tv .form.multi .field input{height:40px}
.tv .form.multi .pw button{top:2px}
.tv .form .error{min-height:0}

/* Home: Recent channels (short row) with the seller's picture box beside it; stacked on a phone */
.home-duo{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.home-duo > .section{min-width:0}
.home-duo .promo-pic{width:100%;max-width:240px;justify-self:center}
/* It is a <button> now so a remote can reach it and OK opens it - strip the button chrome but keep
   a focus ring, and make the whole picture the target. */
.home-duo .promo-pic{display:block;padding:0;border:0;background:none;cursor:zoom-in;appearance:none;-webkit-appearance:none}
.home-duo .promo-pic img{display:block;width:100%;border-radius:14px}
.home-duo .promo-pic:focus-visible,.tv .home-duo .promo-pic:focus{outline:3px solid var(--accent);outline-offset:4px;border-radius:14px}

/* The picture, full size. Sits above everything including the player bar; the close button is real
   and focusable so a remote is never stranded on it. */
.picview{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;display:flex;align-items:center;
  justify-content:center;padding:24px;background:rgba(0,0,0,.92);cursor:zoom-out}
.picview img{max-width:100%;max-height:100%;width:auto;height:auto;border-radius:12px;
  box-shadow:0 24px 70px -20px #000}
.picview-x{position:absolute;top:14px;right:16px;width:46px;height:46px;border-radius:50%;
  border:1px solid var(--line);background:rgba(0,0,0,.55);color:#fff;font-size:26px;line-height:1;
  cursor:pointer}
.picview-x:focus-visible,.picview-x:focus{outline:3px solid var(--accent);outline-offset:3px}
.tv .picview{padding:48px}
.tv .picview-x{width:60px;height:60px;font-size:32px;top:22px;right:26px}
@media (min-width:700px){
  .home-duo.has-pic{grid-template-columns:minmax(0,1fr) 180px;align-items:start}
  .home-duo.has-pic .rail{margin-right:0;padding-right:0}
  .home-duo .promo-pic{max-width:none}
}

/* One tidy line for a service name under a tile, never running into the next tile */
.poster-sub{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ================= v85: TV layout (Fire TV / Android TV box) =================
   A TV is watched from the sofa, not held in the hand: the phone screens were readable but tiny and
   the bottom tab bar is not how a remote works. On TV the app gets a top menu bar, room for overscan,
   and a three-column browse screen (services + folders | channels | guide) in the style of the boxes
   customers already know. Everything here is under .tv, so phones and the web app are unchanged. */
.tv{--tv-pad:40px;--tv-nav:60px}
.tv body,.tv{font-size:17px}
.tv .shell{padding-bottom:0;height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column}
.tv .tabbar{display:none}
/* The scroller is the <main> only. Home also builds `<div id="home-rails" class="content">`
   to reuse the phone's column stacking; if that div matched this rule too it became a SECOND
   flex:1/min-height:0 scroller nested in an already-overflowing one, collapsed to height 0,
   and took the Movies/Series rails out of <main>'s scrollHeight - the remote could highlight
   them but the page would not scroll down to them. Keep this selector on main. */
.tv main.content{padding:10px var(--tv-pad) 18px;gap:18px;flex:1;min-height:0;overflow-y:auto}

/* ---- top menu bar: Home | Live | Movies | Series, search, and the seller's logo ---- */
.tv .tvnav{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:18px;height:var(--tv-nav);
  padding:0 var(--tv-pad);background:linear-gradient(to bottom,color-mix(in srgb,var(--bg) 96%,#fff 4%),color-mix(in srgb,var(--bg) 88%,transparent));
  border-bottom:1px solid var(--line);flex:none}
.tv .tvnav-tabs{display:flex;align-items:center;gap:2px}
.tv .tvtab{padding:7px 16px;border-radius:10px;font-size:19px;font-weight:600;color:var(--muted);white-space:nowrap}
.tv .tvtab[aria-current="page"]{color:var(--accent)}
.tv .tvtab:focus{outline:none;background:color-mix(in srgb,var(--accent) 26%,var(--surface));color:var(--ink)}
.tv .tvnav-sep{width:1px;height:22px;background:var(--line);flex:none}
.tv .tvnav-search{flex:1;max-width:420px;display:flex;align-items:center;gap:10px;height:40px;padding:0 16px;
  border-radius:999px;background:var(--surface);border:1px solid var(--line);color:var(--muted);font-size:16px}
.tv .tvnav-search svg{width:20px;height:20px;flex:none}
.tv .tvnav-search:focus{outline:none;border-color:var(--accent);background:color-mix(in srgb,var(--accent) 18%,var(--surface));color:var(--ink)}
.tv .tvnav-right{margin-left:auto;display:flex;align-items:center;gap:12px}
.tv .tvclock{font-size:16px;font-weight:600;color:var(--muted);font-variant-numeric:tabular-nums}
.tv .tvnav-logo{height:38px;width:auto;max-width:150px;object-fit:contain;border-radius:8px}

/* ---- three-column browse ---- */
.tv .tvb{display:grid;grid-template-columns:minmax(230px,20%) minmax(0,1fr) minmax(290px,26%);
  gap:12px;height:100%;min-height:0}
.tv .tvb-movie,.tv .tvb-series{grid-template-columns:minmax(230px,21%) minmax(0,1fr)}
.tv .tvcol,.tv .tvside{min-height:0;overflow-y:auto;scrollbar-width:none}
.tv .tvcol::-webkit-scrollbar,.tv .tvside::-webkit-scrollbar{display:none}
.tv .tvcats,.tv .tvmid{background:color-mix(in srgb,var(--bg) 92%,#fff 8%);border-radius:14px;padding:6px}
.tv .tvloading{display:grid;place-items:center;padding:40px}

/* services down the left, each one opening to show its folders */
/* Only one playlist is open at a time and a sticky header can never leave its own .svcgrp, so the
   open playlist's header pins to the TOP of the column (top:0) - an i*40px stack parked it below a gap
   the closed headers had already scrolled out of. scroll-padding-top keeps the d-pad from scrolling a
   folder flush to the top, i.e. behind that pinned header. Header sits 50px below the column top; 56 leaves a 6px gap above the highlight. */
.tv .svcgrp + .svcgrp{margin-top:4px}
.tv .tvcats.has-heads{scroll-padding-top:56px}
.tv .svcgrp-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border-radius:10px;
  text-align:left;font-size:16px;font-weight:700;letter-spacing:.02em;color:var(--ink);
  background:color-mix(in srgb,var(--accent) 22%,var(--bg))}
.tv .svcgrp-head:focus{outline:none;background:var(--accent);color:var(--on-accent)}
.tv .svcgrp-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv .svcgrp-caret{flex:none;opacity:.8}
.tv .svcgrp-body{display:flex;flex-direction:column}
.tv .svcgrp:not(.open) .svcgrp-body{display:none}
.tv .tvcat{display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border-radius:8px;text-align:left;
  font-size:15px;color:var(--ink);line-height:1.25}
.tv .tvcat-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv .tvcat-n{flex:none;font-size:14px;font-weight:700;color:var(--faint);font-variant-numeric:tabular-nums}
.tv .tvcat.mine .tvcat-name{color:var(--accent);font-weight:600}
.tv .tvcat[aria-current="true"]{background:color-mix(in srgb,var(--accent) 16%,transparent)}
.tv .tvcat:focus{outline:none;background:var(--accent);color:var(--on-accent)}
.tv .tvcat:focus .tvcat-n,.tv .tvcat:focus .tvcat-name{color:inherit}

/* the channel list in the middle */
.tv .tvchans{display:flex;flex-direction:column}
.tv .tvch{display:grid;grid-template-columns:46px 40px minmax(0,1fr);align-items:center;gap:10px;width:100%;
  padding:5px 10px;border-radius:8px;text-align:left}
.tv .tvch + .tvch{border-top:1px solid var(--line)}
.tv .tvch-num{font-size:14px;font-weight:700;color:var(--faint);font-variant-numeric:tabular-nums}
.tv .tvch-logo{width:40px;height:28px;border-radius:6px;background:var(--surface);display:grid;place-items:center;overflow:hidden}
.tv .tvch-logo img{width:100%;height:100%;object-fit:contain;padding:3px}
.tv .tvch-logo .initials{font-size:11px;font-weight:700;color:var(--faint)}
.tv .tvch-name{font-size:15.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv .tvch:focus{outline:none;background:var(--accent);color:var(--on-accent)}
.tv .tvch:focus .tvch-num{color:var(--on-accent);opacity:.8}

/* the guide on the right, with the picture window above it */
.tv .tvside{display:flex;flex-direction:column;gap:12px;overflow:hidden}
.tv .tvprev{position:relative;aspect-ratio:16/9;border-radius:14px;overflow:hidden;background:#000;
  border:1px solid var(--line);display:grid;place-items:center;flex:none}
.tv .tvprev-fill{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;padding:14%}
.tv .tvprev-fill img{width:100%;height:100%;object-fit:contain;opacity:.85}
.tv .tvprev-fill .initials{font-size:34px;font-weight:800;color:var(--faint)}
.tv .tvnow h3{margin:0 0 8px;font-size:19px;font-weight:700;line-height:1.25}
.tv .tvepg{display:flex;flex-direction:column;gap:9px}
.tv .tvepg-row{display:flex;flex-direction:column;gap:3px;color:var(--muted);font-size:15px}
.tv .tvepg-row.on{color:var(--ink)}
.tv .tvepg-time{font-size:13px;font-weight:600;color:var(--faint);font-variant-numeric:tabular-nums}
.tv .tvepg-row.on .tvepg-time{color:var(--accent)}
.tv .tvepg-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv .tvacts{margin-top:auto;display:grid;grid-template-columns:1fr 1fr;gap:10px;padding-top:6px}
.tv .tvacts .btn{height:44px;font-size:15px}
.tv .tvacts .btn:focus{outline:none;background:var(--accent);color:var(--on-accent)}

/* ---- Home on a TV: the banner is a header, not half the screen, and the tiles are sofa-sized ---- */
.tv .topbar.hero{padding:8px 0 0}
.tv .topbar.hero h1.hero-banner img{max-height:118px;width:auto;max-width:52%;object-fit:contain;border-radius:12px}
.tv .topbar.hero > .icon-btn{display:none}
.tv .section-head h2{font-size:21px}
.tv .section-head button{font-size:16px}
.tv .rail{gap:14px;margin:0;padding:2px 0 6px}
.tv .rail .poster{width:104px}
.tv .rail .poster.sq{width:92px}
.tv .poster-title{font-size:13px}
.tv .poster-sub{font-size:12px}

/* The tile you are on shows its whole name. Titles clamp to two lines - about 26 characters at 93px -
   and 49% of the catalogue is longer than that, but a third line would cost a whole row of posters
   (only 18px of slack below the third row). So the full name appears on the highlighted tile only,
   over the bottom of its own artwork. Anchored to the tile's BOTTOM so it grows upward: it can never
   be clipped by the column edge or run off the screen on the last row. No modern CSS - Chrome 83 has
   attr(), absolute positioning and box-shadow. [data-full] guard so a card without one shows nothing. */
.tv .poster{position:relative}
.tv .poster[data-full]:focus{z-index:5}
.tv .poster[data-full]:focus::after{content:attr(data-full);position:absolute;left:-6px;right:-6px;bottom:-6px;
  padding:6px 8px;border-radius:8px;background:var(--surface);border:1px solid var(--line);color:var(--ink);
  font-size:13px;line-height:1.3;text-align:left;box-shadow:0 10px 24px rgba(0,0,0,.55);pointer-events:none;z-index:6}
/* The caption IS the name while the tile is highlighted: leaving the tile's own title showing above it
   read as the name twice ("Toxic (2025)" / "Toxic (2025)", seller 09-19). Hidden, not removed, so the
   tile keeps its height and nothing around it moves. */
.tv .poster[data-full]:focus .poster-title,.tv .poster[data-full]:focus .poster-sub{visibility:hidden}
/* ...and it starts where the title did, straight under the picture, instead of hanging off the tile's
   bottom with an empty band above it. A % margin on an absolute box is a share of the tile's WIDTH, so
   150% is exactly the height of a 2:3 poster (100% square, 56.25% 16:9) + the 6px gap under it. */
.tv .poster[data-full]:focus::after{top:0;bottom:auto;margin-top:calc(150% + 6px)}
.tv .poster.sq[data-full]:focus::after{margin-top:calc(100% + 6px)}
.tv .poster.wide[data-full]:focus::after{margin-top:calc(56.25% + 6px)}
.tv .grid{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:12px 10px}
.tv .home-duo .promo-pic{max-width:300px}
.tv .empty{font-size:17px}
/* A blurred blow-up behind the banner was tried on 09-20 to keep the strip edge-to-edge; the owner
   killed it on sight ("a massive blurred bit"). The banner is simply shown whole and centred. */
.tv .tvhero{flex-shrink:0;line-height:0;text-align:center}
.tv .tvhero img{margin:0 auto;width:100%;max-width:100%;height:auto;max-height:210px;object-fit:cover;object-position:center;border-radius:14px;display:block}

/* Room for the focus ring: without it the first tile of a row is clipped by the column edge.
   The ring reaches 7px past the tile (3px + 4px offset) and the tile grows 4% on top of that - ~10px -
   while the row clips at its own edge (overflow:hidden, v92). 6px sliced the TOP of the glow off every
   Home tile (seller photo, 09-19). 12px of padding pulled back by an equal negative margin: the ring
   has room and the tiles sit exactly where they did. */
.tv .rail{padding:12px 12px 10px;margin:-6px -12px 0}
.tv .tvcats,.tv .tvmid{padding:8px}
.tv .tvmid .grid{grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px 10px}
.tv .tvmid .poster:focus{transform:scale(1.03)}
.tv .tvprev-cap{margin:-4px 0 0;font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---- v92: Home rows don't scroll sideways on a TV ----
   A rail with `overflow-x:auto` is a focusable scroll box to Chrome, so the d-pad would land on the whole
   row as one big highlight instead of a tile (owner 09-16: "selects a big square in the back"). Each row
   now shows only what fits; the rest is behind See more. */
.tv .rail{overflow:hidden;scroll-snap-type:none}
.tv .home-duo{gap:26px}
.tv .home-duo.has-pic{grid-template-columns:minmax(0,1fr) 260px;align-items:start}
.tv .home-duo .promo-pic{max-width:260px}
/* the seller's banner was cut down too far when the hero went */
/* Full width across the top USED to mean object-fit:cover, on the assumption that a wide banner
   "crops harmlessly". It does not: the strip is 880x158 (ratio 5.6) but a seller's banner is 1.5 to
   2.5, so cover showed 44% of lonewolf's 1280x520 and sliced the glowing frame off its top and
   bottom edges (owner, 09-20 - "shows full border fine on phone but tv always cuts out the border").
   A phone never hit it: there height:auto keeps the box at the picture's own ratio, so cover has
   nothing to crop. So the banner is sized by ITS OWN shape and capped by height - never cropped.
   .tall (ratio under 2) keeps its tighter cap so a near-square one stays modest. */
/* The strip is 1200x210 on a 1080p TV page and 880x158 on a Fire TV Stick - ratios 5.71 and 5.58. What
   a banner should do about that depends on its own shape, so app.js measures it and labels it:
     .tvhero-wide  (5.4+) a banner made for this strip (1920x336): CONTAIN, so it fills the width with nothing
                   cropped. Cover would shave ~10px off each end on a Stick, where the strip is 5.58.
     (neither)     an ordinary 2-2.7 banner: COVER, filling the width as it always has. It loses the top
                   and bottom, which is why lonewolf's framed artwork needed a 1920x336 instead - but
                   shrinking every seller's banner to 44% to avoid that was worse (owner, 09-20).
     .tall (<2)    near-square: neither - capped at 42% and shown whole, or it would be butchered. */
.tv .tvhero img{width:100%;max-width:100%;max-height:210px;object-fit:cover;object-position:center}
/* NOT `.wide` - that is already a global poster class carrying width:220px!important, which
   shrank the whole banner to 220px. Scope new class names to the thing they belong to. */
.tv .tvhero.tvhero-wide img{object-fit:contain}
.tv .tvhero.tall img{width:auto;max-width:42%;object-fit:contain}

/* ...but a Fire TV Stick gives the page 960x540, not 1280x720, and there a 210px banner pushed the
   bottom third of the promo picture off the screen (DustyTV, 09-19). Scale it with the screen height
   instead: 29.2vh is 210px on a 720-high screen (unchanged) and 158px on 540, where the promo box
   then fits. */
.tv .tvhero img{max-height:210px;max-height:min(210px,29.2vh)}
/* v168: ...but a fixed 210px cap made the strip a DIFFERENT SHAPE per TV - 1840x210 (8.76:1) on a box
   whose page is 1920 wide, against 1200x210 on 1280 and 880x158 on a Stick - so a 1920x336 banner sat
   at 64% width with gaps each side there (lucky, 09-29). The strip is now ONE shape, 5.714:1, scaled
   to the page: 1840x322 / 1200x210 / 880x154, ~29% of the screen height on every TV. Chrome 83 has
   no aspect-ratio, so the height comes from vw (the strip is the page less 40px each side). */
.tv .tvhero img{height:calc((100vw - 80px) / 5.714);max-height:none}
/* v169: owner wants the TV strip the SAME box as the Android app (Tv.kt TvHomeHeader: screen width less 32dp x 35%
   of the screen height = 928x189 on a Stick, 4.91:1) so one banner fits both. Seller spec is now 1920x391. */
.tv .tvhero img{height:calc((100vw - 80px) / 4.91)}
.tv main.content{scroll-padding:70px 0 40px}

/* ---- v93: a movie/series page on a TV ----
   The phone page opens with a backdrop the width of the screen (16/10 => 1280x800 on a TV: bigger than the
   whole screen, owner 09-16 "mivies images loads way too big"). On TV the backdrop becomes the page's own
   background and the page reads like a TV app: poster on the left, everything else beside it. */
.tv .detail{display:grid;grid-template-columns:230px minmax(0,1fr);column-gap:30px;row-gap:12px;align-content:start;padding-top:6px}
.tv .detail > *{grid-column:2;position:relative;z-index:1}
.tv .detail > .backdrop{position:fixed;top:0;right:0;bottom:0;left:0;margin:0;z-index:0;aspect-ratio:auto;opacity:.14;
  background-position:center 22%;background-size:cover}
.tv .detail > .backdrop::after{background:linear-gradient(to right,var(--bg) 20%,transparent 85%),
  linear-gradient(to top,var(--bg) 25%,transparent 85%)}
/* the poster becomes one tall cell on the left and everything else stacks beside it, so there's no
   dead space under the title */
.tv .detail-head{display:contents}
.tv .detail-head > .poster-img{grid-column:1;grid-row:1 / span 8;width:230px;align-self:start;position:relative;z-index:1}
.tv .detail-head > div{grid-column:2;position:relative;z-index:1;gap:2px!important}

.tv .detail h2{font-size:30px;margin-top:2px}
.tv .detail .meta{font-size:15px;gap:6px 14px}
.tv .detail .plot{font-size:16px;line-height:1.5;max-width:70ch}
.tv .detail .hint{font-size:14px;max-width:80ch}
.tv .row-actions{grid-template-columns:auto auto;justify-content:start;gap:12px}
.tv .row-actions .btn{min-width:210px;height:48px}
.tv .detail .btn:focus,.tv .episode:focus{outline:none;background:var(--accent);color:var(--on-accent)}
/* The plot and running time carry their own grey, which vanished on a light accent (DustyTV's
   turquoise, 09-19): on the highlighted episode they take the accent's text colour like the title. */
.tv .episode:focus .ep-title,.tv .episode:focus .ep-plot,.tv .episode:focus .ep-meta{color:var(--on-accent)}
.tv .episode:focus .ep-meta{opacity:.8}
.tv .episodes{grid-column:1 / -1}
.tv .episode{grid-template-columns:190px minmax(0,1fr);gap:16px;padding:10px;border-radius:10px}
.tv .ep-title{font-size:16px}
.tv .ep-plot{font-size:14px}

/* the seller's banner, very faint, as the wallpaper behind every TV screen */
.tv .tvbg{position:fixed;top:0;right:0;bottom:0;left:0;z-index:-1;background-position:center;background-size:cover;opacity:.18;pointer-events:none}
.tv .tvbg::after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:
  radial-gradient(120% 90% at 50% 0%,transparent,var(--bg) 78%),linear-gradient(to bottom,transparent,var(--bg))}
.tv .detail > .btn{max-width:430px}

/* ---- Search on TV: field, tabs, results across every service ---- */
.tv .tvsearch{padding-top:2px}
.tv .tvsfield{display:flex;align-items:center;gap:12px;background:var(--surface);border-radius:12px;
  padding:10px 16px;margin-bottom:14px}
.tv .tvsfield svg{width:22px;height:22px;flex:none;color:var(--faint)}
.tv .tvsfield input{flex:1;min-width:0;background:none;border:0;outline:none;color:var(--ink);font-size:20px}
.tv .tvsfield:focus-within{box-shadow:0 0 0 2px var(--accent)}
.tv .tvstabs{display:flex;gap:10px;margin-bottom:10px}
.tv .tvstab{height:40px;padding:0 18px;border-radius:999px;background:var(--surface);color:var(--ink);font-size:16px;font-weight:600}
.tv .tvstab .n{margin-left:8px;font-size:14px;opacity:.65}
.tv .tvstab[aria-current="page"]{background:var(--accent);color:var(--on-accent)}
.tv .tvstab[aria-current="page"] .n{opacity:.85}
.tv .tvstab:focus{outline:2px solid var(--accent);outline-offset:3px}
.tv .tvscover{font-size:14px;color:var(--faint);margin:0 0 12px}
.tv .tvscover:empty{display:none}
.tv .tvsres .sresults{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr));gap:12px 22px}
.tv .tvsres .sresult{align-items:center;grid-template-columns:76px minmax(0,1fr);gap:16px}
.tv .tvsres .sposter{width:76px}
.tv .tvsres .stitle{font-size:17px}
.tv .tvsres .smeta{font-size:14px}
.tv .tvsres .svc-chip{height:34px;font-size:13.5px}
.tv .tvsres .svc-chip:focus{outline:2px solid var(--ink);outline-offset:2px}

/* Chrome <88: no aspect-ratio. Reproduce the box with padding and pin the contents. */
@supports not (aspect-ratio: 2/3){
.poster-img{height:0;padding-top:150%}
.sq .poster-img{height:0;padding-top:100%}
.wide .poster-img{height:0;padding-top:56.25%}
.episode .poster-img{height:0;padding-top:56.25%}
.tv .tvprev{height:0;padding-top:56.25%}
.poster-img > *,.tv .tvprev > *{position:absolute;top:0;right:0;bottom:0;left:0}
.poster-img .initials{display:grid;place-items:center}
}

/* Chrome <111: no color-mix(). app.js fills in the --cm-* values at boot. */
@supports not (color: color-mix(in srgb, red 50%, blue)){
:root{
  --surface:var(--cm-1);
  --surface-2:var(--cm-2);
  --line:var(--cm-3)}
.gate{background:radial-gradient(120% 55% at 50% 0%,var(--cm-4),transparent 70%)}
.gate-logo{box-shadow:0 18px 50px -18px var(--cm-5)}
.topbar{background:var(--cm-6)}
.topbar .brandmark{box-shadow:0 0 18px -4px var(--cm-7),0 0 10px -4px var(--cm-8)}
.topbar.hero h1.hero-banner img{box-shadow:0 10px 34px -14px var(--cm-5),0 6px 26px -16px var(--cm-9)}
.topbar h1.brand-title{filter:drop-shadow(0 0 12px var(--cm-10))}
.tabbar{background:var(--cm-11)}
.pill-on{background:var(--cm-12)}
.svc-warn{background:var(--cm-13)}
.tv .cat:focus,.tv .channel:focus,.tv .ch-main:focus{background:var(--cm-14)}
.tv .set-row:focus,.tv .set-opt:focus{background:var(--cm-14)}
.tv .gate:not(.welcome){background:radial-gradient(55% 80% at 22% 50%,var(--cm-4),transparent 70%)}
.tv .tvnav{background:linear-gradient(to bottom,var(--cm-15),var(--cm-16))}
.tv .tvtab:focus{background:var(--cm-17)}
.tv .tvnav-search:focus{background:var(--cm-18)}
.tv .tvcats,.tv .tvmid{background:var(--cm-19)}
.tv .svcgrp-head{
  background:var(--cm-20)}
.tv .tvcat[aria-current="true"]{background:var(--cm-4)}
}

/* Chrome <86: no :focus-visible, so the highlight would be invisible. */
html.nofv :focus{outline:2px solid var(--accent);outline-offset:2px}

/* Chrome <84: no flexbox gap. app.js sets html.nogap when the probe fails. */
html.nogap .gate > * + *{margin-top:28px}
html.nogap .gate-brand > * + *{margin-top:14px}
html.nogap .gate-actions > * + *{margin-top:12px}
html.nogap .btn > * + *{margin-left:8px}
html.nogap .install > * + *{margin-top:10px}
html.nogap .install ol > * + *{margin-top:6px}
html.nogap .form > * + *{margin-top:12px}
html.nogap .field > * + *{margin-top:6px}
html.nogap .topbar > * + *{margin-left:8px}
html.nogap .content > * + *{margin-top:22px}
html.nogap .tab > * + *{margin-top:3px}
html.nogap .section > * + *{margin-top:10px}
html.nogap .section-head > * + *{margin-left:12px}
html.nogap .rail > * + *{margin-left:10px}
html.nogap .empty > * + *{margin-top:12px}
html.nogap .cat > * + *{margin-left:12px}
html.nogap .chips > * + *{margin-left:8px}
html.nogap .ch-text > * + *{margin-top:2px}
html.nogap .detail > * + *{margin-top:16px}
html.nogap .meta{margin-top:calc(-1 * 6px);margin-left:calc(-1 * 10px)}
html.nogap .meta > *{margin-top:6px;margin-left:10px}
html.nogap .player-bar > * + *{margin-left:6px}
html.nogap .player-msg > div > * + *{margin-top:12px}
html.nogap .live-controls > * + *{margin-left:4px}
html.nogap .player-info > * + *{margin-top:12px}
html.nogap .epg-item > * + *{margin-top:3px}
html.nogap .kv > * + *{margin-left:12px}
html.nogap .titlewrap > * + *{margin-top:1px}
html.nogap .svc-tiles > * + *{margin-top:10px}
html.nogap .svc-tile > * + *{margin-left:14px}
html.nogap .svc-login > * + *{margin-top:2px}
html.nogap .svc-login-head > * + *{margin-left:10px}
html.nogap .sresults > * + *{margin-top:12px}
html.nogap .sinfo > * + *{margin-top:4px}
html.nogap .schips{margin-top:calc(-1 * 6px);margin-left:calc(-1 * 6px)}
html.nogap .schips > *{margin-top:6px;margin-left:6px}
html.nogap .head-btns > * + *{margin-left:14px}
html.nogap .btn[data-refresh] > * + *{margin-left:8px}
html.nogap .set-opt > * + *{margin-left:14px}
html.nogap .set-text > * + *{margin-top:2px}
html.nogap.tv .tvnav > * + *{margin-left:18px}
html.nogap.tv .tvnav-tabs > * + *{margin-left:2px}
html.nogap.tv .tvnav-search > * + *{margin-left:10px}
html.nogap.tv .tvnav-right > * + *{margin-left:12px}
html.nogap.tv .svcgrp-head > * + *{margin-left:10px}
html.nogap.tv .tvcat > * + *{margin-left:10px}
html.nogap.tv .tvside > * + *{margin-top:12px}
html.nogap.tv .tvepg > * + *{margin-top:9px}
html.nogap.tv .tvepg-row > * + *{margin-top:3px}
html.nogap.tv .tvsfield > * + *{margin-left:12px}
html.nogap.tv .tvstabs > * + *{margin-left:10px}

/* v100 VPN button: a circle in the top bar next to the other buttons. */
.vpn-btn{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-size:10.5px;
  font-weight:800;letter-spacing:.03em;color:var(--faint);border:2px solid var(--line);flex:none;background:none}
.vpn-btn.busy{color:var(--accent);border-color:var(--accent);animation:vpnpulse 1s ease-in-out infinite}
@keyframes vpnpulse{50%{opacity:.4}}
.vpn-btn.on{color:#0B0D12;background:var(--ok);border-color:var(--ok)}
.vpn-state.up{color:var(--ok);font-weight:600}
/* Fixed width so the connected row's tick sits exactly where every other row's chevron does. */
.vpn-tick{display:inline-block;width:1.1em;text-align:right;color:var(--faint)}
.vpn-tick.on{color:var(--ok)}

/* ---------- Sports Listing ---------- */
.fxfilter{display:flex;flex-direction:column;gap:8px}
.fxfilter .chips:empty{display:none}
.fxlist{display:flex;flex-direction:column;gap:2px}
.fxlist.quiet{opacity:.66}
/* Time down the left spanning both lines, so a long fixture name gets the whole width and the
   Watch button sits under it. The first cut put all three side by side and ran off a phone. */
.fx{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;gap:2px 10px;
    padding:10px 12px;background:var(--surface);border-radius:12px;align-items:center}
.fx.on{box-shadow:inset 3px 0 0 var(--accent)}
.fx-time{grid-row:1/3;font-variant-numeric:tabular-nums;font-size:13px;font-weight:700;color:var(--muted);
         min-width:46px}
.fx.on .fx-time{color:var(--accent)}
.fx-name{grid-column:2;font-size:15px;font-weight:600;line-height:1.25;
         display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.fx-sub{grid-column:2;font-size:12px;color:var(--faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fx-go{grid-column:2;display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.fx-go:empty{display:none}
.fx-btn{padding:6px 12px;font-size:13px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fx-else{font-size:12px;color:var(--faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sportpage{display:flex;flex-direction:column;gap:12px}
.fxbody{display:flex;flex-direction:column;gap:18px}
/* A TV has the width for one line, and its chip rows must WRAP - a side-scrolling row becomes one
   giant focus target and the remote lands on the whole strip. */
/* Density matters on a listings page: 12px padding gave 7 rows on a 720p screen, this gives 11. */
.tv .fx{grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto auto;padding:7px 14px;gap:0 12px}
.tv .fx-name{font-size:16px;-webkit-line-clamp:1}
.tv .fx-sub{font-size:12px}
.tv .fxbody{gap:12px}
.tv .section{gap:6px}
.tv .section-head h2{font-size:16px}
.tv .fx-go{grid-column:3;grid-row:1/3;margin-top:0;flex-wrap:nowrap}
.tv .chips{flex-wrap:wrap;overflow:visible;margin:0;padding:0}
.tv .chip:focus{outline:3px solid var(--accent);outline-offset:2px}
.tv .fx-btn:focus{outline:3px solid var(--accent);outline-offset:2px}

/* TV: filters down the left, fixtures on the right - the same shape as the Live screen. */
.tv .sportpage{display:grid;grid-template-columns:24% minmax(0,1fr);gap:18px;align-items:start}
.tv .fxfilter{gap:10px}
.tv .fxfilter .chips{flex-direction:column;align-items:stretch;gap:6px}
.tv .fxfilter .chip{width:100%;text-align:left;height:auto;padding:9px 12px;font-size:14px;
  overflow:hidden;text-overflow:ellipsis}

/* TV: three columns, the same shape as the Live screen - filters, fixtures, and the channels for
   whichever fixture the remote is on. Channels used to sit inside the rows, which made every row a
   different height and made the remote walk channel-by-channel through 171 of them. */
.tv .sportpage.tv3{display:grid;grid-template-columns:minmax(210px,19%) minmax(0,1fr) minmax(250px,23%);
  gap:14px;height:100%;min-height:0;align-items:stretch}
.tv .tv3 .fxbody{background:color-mix(in srgb,var(--bg) 92%,#fff 8%);border-radius:14px;padding:8px;gap:10px}
.tv .tv3 .fxside{background:color-mix(in srgb,var(--bg) 92%,#fff 8%);border-radius:14px;padding:14px;
  display:flex;flex-direction:column;gap:10px;overflow-y:auto}
/* One fixture = one row = one press. Fixed height so a long list reads as a list. */
.tv .fxtv{display:grid;grid-template-columns:86px minmax(0,1fr) auto;grid-template-rows:auto auto;
  gap:0 12px;width:100%;text-align:left;padding:8px 12px;background:var(--surface);border-radius:10px;
  align-items:center}
.tv .fxtv + .fxtv{margin-top:6px}
.tv .fxtv .fx-time{grid-row:1/3;font-size:14px;font-weight:700;color:var(--muted);
  font-variant-numeric:tabular-nums;white-space:nowrap}
.tv .fxtv.on .fx-time{color:var(--accent)}
.tv .fxtv .fx-name{grid-column:2;font-size:16px;font-weight:600;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.tv .fxtv .fx-sub{grid-column:2;font-size:12.5px;color:var(--muted);overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.tv .fxtv .fx-n{grid-column:3;grid-row:1/3;font-size:12px;font-weight:700;color:var(--accent)}
.tv .fxtv:focus{outline:none;background:var(--accent);color:var(--on-accent)}
.tv .fxtv:focus .fx-name,.tv .fxtv:focus .fx-sub,.tv .fxtv:focus .fx-time,.tv .fxtv:focus .fx-n{
  color:var(--on-accent)}
.tv .fxtv.fx-none{opacity:.55}
.tv .fxs-head h3{margin:0;font-size:17px;line-height:1.25}
.tv .fxs-head p{margin:4px 0 0;font-size:13px;color:var(--muted)}
.tv .fxs-list{display:flex;flex-direction:column;gap:8px}
.tv .fxs-btn{width:100%;height:auto;min-height:44px;padding:8px 12px;font-size:14px;justify-content:flex-start;
  flex-direction:column;align-items:flex-start;gap:1px;background:var(--surface-2);
  border:1px solid var(--line);text-align:left;overflow:hidden}
.tv .fxs-btn small{font-size:11px;color:var(--muted);font-weight:500}
.tv .fxs-btn:focus{background:var(--accent);color:var(--on-accent);border-color:var(--accent);outline:none}
.tv .fxs-btn:focus small{color:var(--on-accent)}
.tv .fxs-none,.tv .fxs-else{margin:0;font-size:12.5px;color:var(--muted);line-height:1.35}

/* TV: a channel has to LOOK like something you can press. btn-quiet is var(--surface), which is also
   the row's own background, so on a telly the channels read as plain right-aligned text and there was
   no way to tell a fixture could be opened at all (owner, 09-17). */
.tv .fx-btn{background:var(--surface-2);border:1px solid var(--line);font-size:13px;padding:7px 12px;
  max-width:190px;flex-shrink:0}
.tv .fx-btn:focus{background:var(--accent);color:var(--on-accent);border-color:var(--accent);outline:none}
/* Wrap onto a second line instead of running past the edge of the row. */
.tv .fx-go{grid-column:3;grid-row:1/3;margin-top:0;flex-wrap:wrap;justify-content:flex-end;
  max-width:44%;min-width:0;row-gap:5px}
/* The whole ROW lights up, not just one button: down a list this long the remote has to say which
   FIXTURE it is on, or picking one is guesswork. */
.tv .fx:focus-within{background:var(--surface-2);box-shadow:inset 0 0 0 2px var(--accent)}
.tv .fx:focus-within .fx-name{color:var(--accent)}
.tv .fx:focus-within .fx-sub{color:var(--ink)}
/* Nothing to watch = nothing to aim at, so fade it and let the eye go to the ones you can open. */
.tv .fx.fx-none{opacity:.5}
/* Bigger where it was too quiet to read across a room. */
.tv .section-head h2{font-size:19px}
.tv .fx-name{font-size:17px}
.tv .fx-sub{font-size:13px;color:var(--muted)}
.tv .fx-time{font-size:14px;min-width:62px}

/* ---------- downloads (kept on the device, play with no internet) ---------- */
.dl-list{display:flex;flex-direction:column;margin-top:14px}
.dl-row{display:grid;grid-template-columns:104px minmax(0,1fr);gap:12px;padding:13px 0;align-items:center}
.dl-row + .dl-row{border-top:1px solid var(--line)}
.dl-thumb{aspect-ratio:16/9;width:104px}
.dl-main{display:flex;flex-direction:column;gap:5px;min-width:0}
.dl-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dl-sub{color:var(--muted);font-size:13px}
.dl-bad{color:var(--danger)}
.dlbar{display:block;height:4px;border-radius:2px;background:rgba(255,255,255,.18);overflow:hidden}
.dlbar i{display:block;height:100%;background:var(--accent);transition:width .35s linear}
.dl-acts{grid-column:1 / -1;display:flex;gap:8px;flex-wrap:wrap}
.dl-acts .btn{height:40px;font-size:14px;padding:0 14px;flex-shrink:0}
.dl-acts .dl-play{flex:1;min-width:120px}
.dl-del{width:46px;padding:0}
.dl-del svg{width:18px;height:18px}
.dl-btn{width:auto;min-width:132px;flex-shrink:0}
.dl-btn.dl-on{color:var(--ok)}
.episode-row{position:relative;display:flex;align-items:flex-start}
.episode-row + .episode-row{border-top:1px solid var(--line)}
.episode-row .episode{flex:1;min-width:0}
.dl-mini{position:absolute;top:14px;right:0;width:42px;height:42px;min-width:0;padding:0;border-radius:12px;flex-shrink:0}
.dl-mini svg{width:19px;height:19px}
.tv .dl-mini,.tv .dl-btn{display:none}

/* Fixtures: the highlighted row fills with the accent, the same as every other TV list in the app.
   Placed last on purpose - the generic .tv .fx:focus-within rule above would otherwise win and leave
   the row with a thin outline you cannot see from a sofa. */
.tv .fxtv:focus{outline:none;background:var(--accent)}
.tv .fxtv:focus .fx-name,.tv .fxtv:focus .fx-sub,
.tv .fxtv:focus .fx-time,.tv .fxtv:focus .fx-n{color:var(--on-accent)}
.tv .fxtv:focus-within{box-shadow:none}

/* Fixtures on TV: a competition row is a step INTO something, so it gets the chevron and a little more
   room than a fixture row; the back row sits at the top of the list where the remote finds it. */
.tv .fxgrp .fx-n svg,.tv .fxback .fx-time svg{width:18px;height:18px;vertical-align:-3px}
.tv .fxgrp .fx-name{font-size:16.5px}
.tv .fxback{background:color-mix(in srgb,var(--bg) 84%,#fff 16%);margin-bottom:8px}
.tv .fxback .fx-name{font-size:15px}
/* Fixtures on TV: what is inside a competition, shown beside it before you step in. */
.tv .fxs-peek{display:flex;flex-direction:column;gap:7px}
.tv .fxs-pk{display:grid;grid-template-columns:62px minmax(0,1fr);gap:8px;align-items:baseline;font-size:13px}
.tv .fxs-pk b{color:var(--accent);font-size:12px;font-variant-numeric:tabular-nums}
.tv .fxs-pk span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv .fxs-pk.off{opacity:.5}
.tv .fxs-pk.off b{color:var(--muted)}
/* Full screen in a desktop browser. The phone's edge-to-edge rules are gated on max-height:600px, so a
   laptop matched NONE of them and kept a 70vh-capped 16:9 picture with the programme panel filling the
   bottom of the screen - which is exactly what "doesn't fill the whole screen" looked like.
   Written as two separate rules on purpose: one unknown pseudo-class anywhere in a selector list makes
   a browser throw the whole block away. */
.player:fullscreen{
  overflow:hidden;width:100vw;height:100vh;max-width:none;max-height:none}
.player:fullscreen .video-wrap{position:fixed;top:0;right:0;bottom:0;left:0;width:100vw;height:100vh;
  max-height:none;aspect-ratio:auto;z-index:1}
.player:fullscreen .video-wrap video{object-fit:contain;transform-origin:center center;will-change:transform}
.player:fullscreen .player-bar{position:fixed;left:0;right:0;top:0;z-index:3;padding:14px 16px 24px;
  background:linear-gradient(to bottom,rgba(0,0,0,.7),rgba(0,0,0,0));transition:opacity .25s}
.player:fullscreen:not(.chrome) .player-bar{opacity:0;pointer-events:none}
.player:fullscreen .land-only{display:grid}
.player:fullscreen .player-info{display:none}
.player:fullscreen .live-controls{padding:18px 16px 14px}
.player:-webkit-full-screen{
  overflow:hidden;width:100vw;height:100vh;max-width:none;max-height:none}
.player:-webkit-full-screen .video-wrap{position:fixed;top:0;right:0;bottom:0;left:0;width:100vw;height:100vh;
  max-height:none;aspect-ratio:auto;z-index:1}
.player:-webkit-full-screen .video-wrap video{object-fit:contain;transform-origin:center center;will-change:transform}
.player:-webkit-full-screen .player-bar{position:fixed;left:0;right:0;top:0;z-index:3;padding:14px 16px 24px;
  background:linear-gradient(to bottom,rgba(0,0,0,.7),rgba(0,0,0,0));transition:opacity .25s}
.player:-webkit-full-screen:not(.chrome) .player-bar{opacity:0;pointer-events:none}
.player:-webkit-full-screen .land-only{display:grid}
.player:-webkit-full-screen .player-info{display:none}
.player:-webkit-full-screen .live-controls{padding:18px 16px 14px}

/* Days left on the line, in the header. Plain rgba and no flex gap: the Droidlogic boxes are on a
   Chrome 83 webview where color-mix() yields nothing at all and flex gap is ignored. */
.expchip {
  display: inline-block;
  padding: 4px 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--text, #fff);
}
.expchip.low { background: rgba(255, 92, 92, .18); border-color: rgba(255, 92, 92, .42); color: #ffd9d9; }
.tv .expchip { font-size: 18px; padding: 6px 14px; margin-right: 12px; }
@media (max-width: 480px) { .expchip { font-size: 11px; padding: 3px 8px; margin-right: 6px; } }

/* ---------- v157: profiles, messages bell, recently added (margins, not flex gap: Chrome 83 TV boxes) ---------- */
.bell-btn{position:relative}
.bell-ico{font-size:19px;line-height:1}
.bell-n{position:absolute;top:-3px;right:-4px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#FF3B30;color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center}
.pav{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;flex:none;line-height:1;color:#fff}
.pav.xs{width:24px;height:24px;font-size:14px;vertical-align:middle;margin-right:8px}
.pav.sm{width:30px;height:30px;font-size:17px}
.pav.lg{width:96px;height:96px;font-size:48px;border:3px solid transparent}
.pav.add{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.3);font-size:44px}
.acct-btn{width:40px}
.prof-wrap{text-align:center;padding:18px 0 30px}
.prof-h{font-size:28px;margin:6px 0 10px}
.prof-grid{display:flex;flex-wrap:wrap;justify-content:center;margin:14px -8px 18px}
.prof{display:flex;flex-direction:column;align-items:center;width:124px;margin:8px;padding:8px;border-radius:16px;color:inherit;background:none}
.prof:focus{outline:none}
.prof:focus .pav,.prof:hover .pav{border-color:#fff}
.prof.cur .pav{border-color:var(--accent)}
.prof-name{margin-top:8px;font-size:16px;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.prof-edit{font-size:12px;color:var(--muted)}
.prof-done{display:inline-flex;min-width:200px}
.prof-form{max-width:560px;margin:0 auto;padding:10px 0 30px}
.prof-edit-top{display:flex;align-items:center;margin-bottom:6px}
.prof-edit-top .field{flex:1;margin-left:16px}
.prof-sub{font-size:16px;margin:18px 0 8px}
.emoji-grid{display:flex;flex-wrap:wrap;margin:0 -3px}
.emo{width:48px;height:48px;margin:3px;border-radius:10px;border:2px solid transparent;background:var(--surface);font-size:24px;line-height:1;color:inherit;display:flex;align-items:center;justify-content:center}
.emo.on{background:var(--accent)}
.emo:focus{border-color:#fff;outline:none}
.col-row{display:flex;flex-wrap:wrap;margin:0 -4px 10px}
.col{width:40px;height:40px;margin:4px;border-radius:50%;border:3px solid transparent}
.col.on{border-color:rgba(255,255,255,.85)}
.col:focus{border-color:#fff;outline:none;box-shadow:0 0 0 2px var(--accent)}
.prof-btns{margin-top:18px}
.prof-btns .btn,.acct-row .btn{width:100%;margin-bottom:10px}
.acct-row{margin-top:12px}
.msg-tabs{display:flex;margin:6px 0 14px}
.msg-tab{flex:1;height:42px;margin-right:8px;border-radius:21px;background:var(--surface);color:var(--ink);font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 10px}
.msg-tab:last-child{margin-right:0}
.msg-tab[aria-current]{background:var(--accent);color:var(--on-accent)}
.msg-item{padding:12px 14px;margin-bottom:10px;border-radius:12px;background:var(--surface);border:2px solid transparent;outline:none}
.msg-item:focus{border-color:var(--accent)}
.msg-item h3{margin:0 0 2px;font-size:16px}
.msg-when{font-size:12px;color:var(--muted)}
.msg-body{white-space:pre-wrap;margin-top:6px;line-height:1.45}
.msgpop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:75;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.62);padding:20px}
.msgpop-card{background:#1d1a26;border-radius:18px;padding:20px 22px;max-width:520px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.msgpop-kind{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--accent);font-weight:700}
.msgpop-card h2{margin:4px 0 2px;font-size:20px}
.msgpop-when{font-size:12px;color:var(--muted)}
.msgpop-body{white-space:pre-wrap;margin:10px 0 16px;max-height:50vh;overflow:auto;line-height:1.45}
.msgpop-btns{display:flex;justify-content:flex-end}
.msgpop-btns .btn{margin-left:10px;height:44px}
.msgpop .btn:focus{outline:3px solid #fff;outline-offset:2px}
.tv .msgpop-card{max-width:640px}
.tv .prof-wrap{padding-top:30px}
.tv .msg-wrap,.tv .msg-tabs{max-width:900px}
@media (min-width:700px){.prof-btns .btn,.acct-row .btn{width:auto;display:inline-flex;margin-right:10px}}
/* the full-width banner header pins its buttons to the top right: the bell sits left of Account */
.topbar.hero > .bell-btn{right:68px}
@media (max-width:420px){.msg-tab{font-size:13.5px;padding:0 6px}}
/* a 960-wide TV (Fire TV Stick) could not fit the right-hand buttons once the days-left chip showed (Account
   sat off-screen even before the bell): drop the small logo and the word "Search" there - the magnifier stays */
@media (max-width:1100px){
  .tv .tvnav-logo{display:none}
  .tv .tvnav-search span{display:none}
  .tv .tvtab{padding:7px 9px;font-size:18px}
  .tv .expchip{font-size:15px;padding:5px 10px;margin-right:4px}
}

/* v158: PIN pad, locked folder, hide-folders list */
.pinpad{max-width:340px;text-align:center}
.pinpad h2{margin:0 0 2px}
.pin-sub{font-size:13px;color:var(--muted)}
.pin-dots{display:flex;justify-content:center;margin:16px 0 6px}
.pin-dots i{width:16px;height:16px;border-radius:50%;border:2px solid var(--muted);margin:0 8px}
.pin-dots i.on{background:var(--accent);border-color:var(--accent)}
.pin-msg{min-height:20px;font-size:13px;color:var(--danger,#ff6b6b)}
.pin-keys{display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:8px}
.pin-key{width:31%;height:56px;margin-bottom:8px;border-radius:14px;background:var(--surface);color:var(--ink);font-size:22px;font-weight:600}
.pin-key.pin-cancel{font-size:14px}
.pin-key:focus{outline:3px solid #fff;outline-offset:2px;background:var(--accent);color:var(--on-accent)}
.pin-bad{animation:pinshake .35s}
@keyframes pinshake{0%,100%{transform:translateX(0)}25%{transform:translateX(-8px)}75%{transform:translateX(8px)}}
.lockbox p{font-size:17px}
.lockbox .btn{margin-top:10px}
.hide-row b{font-size:12px;font-weight:700;color:var(--accent);margin-left:10px;white-space:nowrap}
.hide-row.is-hidden span{opacity:.5;text-decoration:line-through}
.hide-row.is-hidden b{color:var(--muted)}
.tv .msgpop-card.pinpad{max-width:420px}

/* v163 Home clock + weather box (under the welcome message). No flex gap / color-mix: old TV WebViews (Chrome 83). */
.home-clock{display:flex;align-items:center;justify-content:space-between;width:100%;margin:12px 0 4px;padding:12px 20px;border-radius:18px;
  border:1px solid var(--accent);color:#fff;text-align:left;cursor:pointer;appearance:none;-webkit-appearance:none;font:inherit;
  background:linear-gradient(120deg,var(--accent),var(--accent2));box-shadow:inset 0 0 0 999px rgba(0,0,0,.58)}
.home-clock:focus-visible,.tv .home-clock:focus{outline:3px solid var(--accent);outline-offset:3px}
.hc-left,.hc-right{display:flex;flex-direction:column;min-width:0}
.hc-time{font-size:34px;font-weight:800;line-height:1.05}
.hc-time small{font-size:15px;font-weight:700;margin-left:4px}
.hc-date,.hc-place{font-size:13px;color:rgba(255,255,255,.8);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hc-wx{display:flex;align-items:center;min-width:0;margin-left:12px}
.hc-icon{font-size:34px;margin-right:10px}
.hc-right{align-items:flex-end}
.hc-temp{font-size:26px;font-weight:700}
.tv .hc-time{font-size:48px}.tv .hc-time small{font-size:20px}.tv .hc-date,.tv .hc-place{font-size:17px}
.tv .hc-icon{font-size:44px}.tv .hc-temp{font-size:34px}
#wx-town{flex:1 1 200px;min-width:0;margin-right:8px}
.topbar.hero > [data-refresh]{right:116px}   /* v163: Refresh on Home sits left of the bell */

/* Play with Stremio */
.st-btn{width:100%;margin-top:10px;border:1px solid var(--accent)}
.st-mini{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:52px;color:var(--accent)}
.st-mini svg{width:18px;height:18px}.st-mini small{font-size:10px;font-weight:600;color:var(--muted)}
.st-sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:55;background:rgba(0,0,0,.6);display:flex;align-items:flex-end;justify-content:center}
.st-panel{width:100%;max-width:720px;max-height:88vh;max-height:88dvh;display:flex;flex-direction:column;background:var(--bg);border-radius:18px 18px 0 0;padding-bottom:var(--safe-b)}
@media (min-width:760px){.st-sheet{align-items:center}.st-panel{border-radius:18px}}
.st-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 16px 10px;border-bottom:1px solid var(--surface)}
.st-head div{display:flex;flex-direction:column;gap:2px;min-width:0}.st-head span{color:var(--muted);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-body{overflow-y:auto;padding:6px 16px 18px;-webkit-overflow-scrolling:touch}
.st-body h3{display:flex;align-items:center;gap:8px;font-size:15px;margin:16px 0 8px}
.st-body h3 img{width:22px;height:22px;border-radius:6px;object-fit:cover}
.st-list{display:flex;flex-direction:column;gap:8px}
.st-wait{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:14px;padding:8px 0}.st-wait .spinner{width:20px;height:20px}
.st-link{display:flex;align-items:flex-start;gap:12px;text-align:left;background:var(--surface);border-radius:12px;padding:10px 12px;color:var(--ink)}
.st-link:focus,.st-link:focus-visible{outline:3px solid var(--accent);outline-offset:1px}
.st-q{flex:none;min-width:64px;max-width:96px;font-size:12px;font-weight:700;color:var(--accent);white-space:pre-line}
.st-t{display:flex;flex-direction:column;gap:3px;min-width:0}
.st-main{font-size:14px;font-weight:600;word-break:break-word}
.st-sub{font-size:12px;color:var(--muted);word-break:break-word}
.st-btn[hidden],.st-mini[hidden]{display:none}

/* v180 subtitles: CC button + readable cues */
.cc-btn b{font:800 11px/1 system-ui,sans-serif;border:2px solid currentColor;border-radius:5px;padding:3px 4px;opacity:.55}
.cc-btn.on b{opacity:1;background:var(--ink);color:var(--bg,#000);border-color:var(--ink)}
video::cue{background:rgba(0,0,0,.62);color:#fff;font-size:clamp(15px,3.6vh,30px);line-height:1.3}
.player-bar{position:relative}
.cc-menu{position:absolute;right:8px;top:calc(100% + 4px);z-index:30;max-height:60vh;overflow:auto;min-width:170px;padding:6px;border-radius:14px;
  background:rgba(20,16,26,.94);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 10px 30px rgba(0,0,0,.5);display:flex;flex-direction:column}
.cc-menu button{text-align:left;padding:10px 14px;border-radius:9px;color:#fff;font-size:15px}
.cc-menu button.on{background:var(--accent,#F547DF);color:#fff;font-weight:700}
.cc-menu button:focus-visible{outline:2px solid #fff}

/* v183 voice search button */
.search .micbtn,.tvsfield .micbtn{border:0;background:none;color:var(--faint);display:flex;align-items:center;justify-content:center;padding:0;border-radius:50%;cursor:pointer}
.search .micbtn{position:absolute;right:6px;top:5px;width:32px;height:32px}
.search .micbtn svg,.tvsfield .micbtn svg{position:static;width:20px;height:20px}
.search.hasmic input{padding-right:44px}
.tvsfield .micbtn{flex:none;width:40px;height:40px}
.micbtn:focus-visible{box-shadow:0 0 0 2px var(--accent)}
.micbtn.on{background:#c62828;color:#fff;animation:micpulse 1.2s ease-in-out infinite}
@keyframes micpulse{50%{box-shadow:0 0 0 6px rgba(198,40,40,.35)}}

/* v184 Catch Up */
.cu-none{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:40px 16px}
.cu-none b{font-size:17px;color:var(--ink)}
.cu-none-ico{width:40px;height:40px;color:var(--accent)}
.cu-tile .svc-badge svg{width:24px;height:24px;color:var(--on-accent)}
.cu-tile-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.cu-tile-sub{font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv .cu-tile:focus,.tv .cu-prog:focus{outline:3px solid var(--accent);outline-offset:2px;background:color-mix(in srgb,var(--accent) 22%,var(--surface))}
.cu-ico{width:13px;height:13px;vertical-align:-2px}
.cu-hint{margin:4px 0 10px}
.cu-svcs,.cu-cats,.cu-days{margin-bottom:12px}
.cu-head{display:flex;align-items:center;gap:12px;margin:4px 0 12px}
.cu-head h2{margin:0;font-size:20px}
.cu-progs{display:flex;flex-direction:column;gap:8px;padding-bottom:24px}
.cu-prog{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;padding:12px 14px;border-radius:12px;background:var(--surface);text-align:left;width:100%}
.cu-prog:active{background:var(--surface-2)}
.cu-time{font-size:13px;font-weight:600;color:var(--accent);font-variant-numeric:tabular-nums;white-space:nowrap}
.cu-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.cu-title{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cu-desc{font-size:13px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cu-badge{margin-left:8px;padding:2px 7px;border-radius:999px;background:var(--accent);color:var(--on-accent);font-size:11px;font-weight:700;vertical-align:1px}
.cu-play svg{width:22px;height:22px;color:var(--faint)}
.live-controls .cu-skip{width:auto;padding:0 8px;font-size:14px;font-weight:700}
.cu-pos{color:#fff;font-size:13px;font-variant-numeric:tabular-nums;padding:0 6px}
html.nogap .cu-progs > * + *{margin-top:8px}
html.nogap .cu-prog > * + *{margin-left:14px}
/* v188 sort box on Movies / Series folders */
.sortpick{display:flex;align-items:center;gap:10px;margin:0 0 12px;font-size:14px;color:var(--muted)}
.sortpick select{height:38px;border-radius:12px;background:var(--surface);color:var(--ink);border:0;padding:0 12px;font:inherit;font-weight:600;max-width:100%}
.sortpick select option{background:#1d1a26;color:#fff}
.tvsort{margin:0 0 12px}
.tvsort-btn{height:42px;font-size:15px}
.tvsort-btn:focus{outline:3px solid #fff;outline-offset:2px}
.sortpop{max-width:420px;display:flex;flex-direction:column;gap:6px}
.sortpop .btn{justify-content:flex-start;height:46px}
.sortpop .btn.on{color:var(--accent)}

/* v189 */
.ep-watched{color:var(--accent);font-weight:600}
