/* JetztStream Player – TV first (1rem = 16px at 1920 wide), phone layout under .phone */

:root {
  --green: #18d819;
  --green-2: #2cb314;
  --green-hi: #3cf03d;
  --green-lo: #0c9a10;
  --ink: #04140a;             /* text on green */
  --bg: #050806;
  --bg-2: #082804;
  --card: #0b110d;
  --card-2: #111a14;
  --glass: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  --line: rgba(255,255,255,.12);
  --line-2: rgba(255,255,255,.06);
  --text: #ffffff;
  --muted: #b9c4bc;
  --dim: #7d8a80;
  --red: #ff4d4d;
  --gold: #ffc531;
  --grad: linear-gradient(135deg, var(--green), var(--green-2));
  --glow: 0 0 1.9rem rgba(24,216,25,.45);
  --r: .9rem;
  --r-sm: .6rem;
  --head: 'Outfit', 'Manrope', system-ui, sans-serif;
  --body: 'Manrope', system-ui, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; background: var(--bg); }
html.tv { font-size: calc(100vw / 120); }
/* a phone held sideways: the TV layout, sized by the smaller of width and height so it always fits */
html.tv.land { font-size: min(calc(100vw / 90), calc(100vh / 38)); }
body {
  font-family: var(--body); color: var(--text); background: transparent;
  width: 100vw; height: 100vh; overflow: hidden; user-select: none;
  -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased;
}
html.phone body { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; text-align: inherit; }
input { user-select: text; }
svg { display: block; flex-shrink: 0; width: 1.25rem; height: 1.25rem; }   /* safety net: an icon without its own size can never fill the screen */
img { display: block; }
[hidden] { display: none !important; }

/* app background sits behind everything; .video-on makes it transparent so native or web video shows through */
#bg { position: fixed; inset: 0; z-index: 0; background: radial-gradient(ellipse at 30% 35%, var(--bg-2) 0%, var(--bg) 62%); }
#bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 110%, rgba(24,216,25,.10), transparent 45%); }
html.video-full #bg, html.video-full .screen:not(.player-screen) { visibility: hidden; }
#video-layer { position: fixed; z-index: 1; background: #000; overflow: hidden; display: none; }
#video-layer.on { display: block; }
#video-layer video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
html.native #video-layer { background: transparent; }           /* the native surface is behind the WebView */
html.native.video-on, html.native.video-on body { background: transparent; }
html.native.video-on #bg { display: none; }                      /* the window behind is the same dark green */
#app { position: fixed; inset: 0; z-index: 2; }
#modal-root { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
#toast-root { position: fixed; z-index: 30; left: 50%; bottom: 3rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: .6rem; align-items: center; pointer-events: none; }

.screen { position: absolute; inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); display: flex; flex-direction: column; }
.screen.player-screen { inset: 0; }
.screen.hidden-under { visibility: hidden; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: .7rem; direction: ltr; }   /* the brand never mirrors */
.logo svg { width: 3.4rem; height: 3.15rem; filter: drop-shadow(0 0 .7rem rgba(32,204,23,.5)); }
.logo .w { display: flex; align-items: baseline; font-family: var(--head); font-size: 2.1rem; line-height: 1; letter-spacing: -.04rem; white-space: nowrap; }
.logo .w1 { font-weight: 700; color: #fff; }
.logo .w2 { font-weight: 800; background: linear-gradient(90deg, #80f180, #20cc17 55%, #4be61f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo .tag { margin-left: .55rem; align-self: center; font: 800 .7rem/1 var(--head); letter-spacing: .18rem; color: var(--ink); background: var(--grad); border-radius: .35rem; padding: .3rem .45rem .26rem; }
.logo.sm svg { width: 2.4rem; height: 2.2rem; }
.logo.sm .w { font-size: 1.5rem; }
.logo.sm .tag { font-size: .55rem; padding: .25rem .35rem .2rem; }
.logo.lg svg { width: 5.6rem; height: 5.2rem; }
.logo.lg .w { font-size: 3.6rem; }
.logo.lg .tag { font-size: 1rem; padding: .4rem .6rem .35rem; }

/* ---------- focus: one look everywhere ----------
   Lists and grids (.vlist) never light up themselves; their current item does (.vitem.cur.list-focused). */
.f { outline: none; transition: transform .16s ease, background .16s, box-shadow .16s, border-color .16s, color .16s; }
.focused:not(.vlist):not(.seek) {
  background: var(--grad) !important; color: var(--ink) !important; border-color: transparent !important;
  box-shadow: var(--glow), 0 .5rem 1.6rem rgba(0,0,0,.45);
}
.focused:not(.vlist):not(.seek) svg { color: var(--ink); }
.focused:not(.vlist):not(.seek) .muted, .focused:not(.vlist):not(.seek) small { color: rgba(4,20,10,.75) !important; }
.focused:not(.vlist):not(.seek) .chip { color: var(--ink); border-color: rgba(4,20,10,.35); background: rgba(4,20,10,.12); }
.vitem.cur.list-focused { z-index: 3; }
.vitem.cur.list-focused .cat-row { background: var(--grad); color: var(--ink); box-shadow: var(--glow); }
.vitem.cur.list-focused .cat-row svg, .vitem.cur.list-focused .cat-row .c { color: var(--ink); }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  height: 3.3rem; padding: 0 1.6rem; border-radius: var(--r-sm);
  background: var(--glass); border: 1px solid var(--line);
  font: 700 1.1rem/1 var(--head); letter-spacing: .02rem; white-space: nowrap;
}
.btn svg { width: 1.35rem; height: 1.35rem; }
.btn.primary { background: rgba(24,216,25,.14); border-color: rgba(24,216,25,.45); }
.btn.danger { border-color: rgba(255,77,77,.45); }
.btn.sm { height: 2.6rem; padding: 0 1.1rem; font-size: .95rem; }
.btn.icon { width: 3.3rem; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: .4rem; height: 1.9rem; padding: 0 .8rem; border-radius: 99rem; font: 700 .85rem/1 var(--head); letter-spacing: .03rem; background: rgba(255,255,255,.08); border: 1px solid var(--line); white-space: nowrap; }
.chip svg { width: 1rem; height: 1rem; }
.chip.ok { color: var(--green); border-color: rgba(24,216,25,.4); background: rgba(24,216,25,.1); }
.chip.warn { color: var(--gold); border-color: rgba(255,197,49,.4); background: rgba(255,197,49,.08); }
.chip.bad { color: var(--red); border-color: rgba(255,77,77,.45); background: rgba(255,77,77,.08); }
.chip .dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 .4rem currentColor; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
h1, h2, h3 { font-family: var(--head); font-weight: 800; letter-spacing: -.02rem; }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .4rem; border-radius: .35rem; border: 1px solid var(--line); background: rgba(255,255,255,.06); font: 800 .75rem/1 var(--head); }
.kbd.red { background: #d93030; border-color: #d93030; color: #fff; }
.kbd.green { background: var(--green); border-color: var(--green); color: var(--ink); }
.kbd.yellow { background: #e8c21c; border-color: #e8c21c; color: #1a1400; }
.kbd.blue { background: #2a6fe0; border-color: #2a6fe0; color: #fff; }

/* ---------- spinner / progress ---------- */
.spinner { width: 3.2rem; height: 3.2rem; border-radius: 50%; border: .3rem solid rgba(24,216,25,.18); border-top-color: var(--green); animation: spin .8s linear infinite; }
.spinner.sm { width: 1.6rem; height: 1.6rem; border-width: .2rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: .4rem; border-radius: 99rem; background: rgba(255,255,255,.12); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .25s; }

/* ---------- S01 splash ---------- */
.splash { align-items: center; justify-content: center; gap: 2.6rem; }
.splash .status { font: 600 1.15rem/1.4 var(--body); color: var(--muted); text-align: center; min-height: 3.2rem; }
.splash .bar { width: 26rem; }

/* ---------- top bar used on several screens ---------- */
.topline { display: flex; align-items: center; justify-content: space-between; padding: 2.2rem 3.4rem 0; font: 600 1.15rem/1 var(--body); color: var(--muted); }
.topline .clock { font: 700 1.6rem/1 var(--head); color: #fff; }
.topline b { color: #fff; font-weight: 700; }

/* ---------- S02 activation ---------- */
.activate { padding: 3rem 4rem; display: grid; grid-template-columns: 1.05fr 1fr; gap: 4rem; align-items: center; height: 100%; }
.activate h1 { font-size: 3rem; line-height: 1.1; margin: 2.4rem 0 1rem; }
.activate .lead { font-size: 1.25rem; line-height: 1.55; color: var(--muted); max-width: 36rem; }
.steps { list-style: none; margin: 2.2rem 0 2.4rem; display: grid; gap: 1.1rem; counter-reset: s; }
.steps li { display: flex; gap: 1rem; align-items: center; font-size: 1.2rem; line-height: 1.4; counter-increment: s; }
.steps li::before { content: counter(s); flex-shrink: 0; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font: 800 1.1rem/1 var(--head); color: var(--ink); background: var(--grad); }
.steps b { color: var(--green); }
.idcard { border-radius: 1.4rem; padding: 2.6rem; background: var(--glass); border: 1px solid var(--line); box-shadow: 0 2rem 4rem rgba(0,0,0,.45); }
.idcard .row { display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line-2); }
.idcard .row:first-of-type { padding-top: 0; }
.idcard label { font: 800 .85rem/1 var(--head); letter-spacing: .16rem; text-transform: uppercase; color: var(--dim); }
.idcard .val { font: 800 2.6rem/1.1 var(--head); letter-spacing: .08rem; color: #fff; font-variant-numeric: tabular-nums; }
.idcard .val.key { color: var(--green); letter-spacing: .4rem; }
.idcard .url { font: 700 1.5rem/1.2 var(--head); color: #fff; word-break: break-all; }
.idcard .stat { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.4rem; }
.activate .actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.activate .poll { margin-top: 1.4rem; display: flex; align-items: center; gap: .8rem; color: var(--dim); font-size: 1rem; }

/* ---------- S03 home ---------- */
.home { justify-content: space-between; }
.home .center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; margin-top: -1rem; }
.home-grid { display: grid; grid-template-columns: 19rem 10.5rem 10.5rem 15rem; grid-template-rows: 8rem 8rem; gap: 1.1rem; }
.tile {
  position: relative; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem;
  font: 700 1.2rem/1.1 var(--head); text-align: center; overflow: hidden;
}
.tile svg { width: 2.8rem; height: 2.8rem; color: var(--green); transition: color .16s; }
.tile.big { grid-row: span 2; font-size: 2rem; gap: 1.2rem; background: linear-gradient(150deg, rgba(24,216,25,.22), rgba(24,216,25,.05) 60%), var(--card); border-color: rgba(24,216,25,.35); }
.tile.big svg { width: 6rem; height: 6rem; }
.tile.big .live-dot { position: absolute; top: 1.1rem; left: 1.1rem; display: inline-flex; align-items: center; gap: .45rem; font: 800 .8rem/1 var(--head); letter-spacing: .14rem; color: #fff; }
.tile.big .live-dot::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 .5rem #ff3b3b; }
.tile.focused .live-dot { color: var(--ink); }
.tile.focused { transform: scale(1.05); z-index: 1; }
.side-col { grid-column: 4; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 1.1rem; }
.side-btn { flex: 1; display: flex; align-items: center; gap: .9rem; padding: 0 1.3rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255,255,255,.03); font: 700 1.1rem/1 var(--head); }
.side-btn svg { width: 1.5rem; height: 1.5rem; color: var(--green); }
.side-btn.focused { transform: scale(1.04); }
.home .foot { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 3.4rem 2rem; color: var(--dim); font-size: .95rem; }
.home .foot .pl-name { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-weight: 600; }
.home .foot .pl-name svg { width: 1.2rem; height: 1.2rem; color: var(--green); }
.home .warn-strip { position: absolute; top: 5.4rem; left: 50%; transform: translateX(-50%); }

/* ---------- top tabs (S05, S06, S04) ---------- */
.tabs { display: flex; align-items: center; gap: .4rem; height: 5.4rem; padding: 0 2.4rem; border-bottom: 1px solid var(--line-2); flex-shrink: 0; }
.tab { height: 3rem; padding: 0 1.3rem; border-radius: var(--r-sm); display: inline-flex; align-items: center; font: 700 1.2rem/1 var(--head); color: var(--muted); }
.tab.active { color: var(--green); }
.tab.active.focused { color: var(--ink); }
.tabs .sep { width: 1px; height: 1.4rem; background: var(--line); margin: 0 .3rem; }
.search-pill { margin-left: 1rem; display: flex; align-items: center; gap: .7rem; width: 26rem; height: 3rem; padding: 0 1.2rem; border-radius: 99rem; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); font-size: 1.05rem; }
.search-pill svg { width: 1.3rem; height: 1.3rem; }
.search-pill input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 1.1rem; color: #fff; }
.search-pill input::placeholder { color: var(--dim); }
.tabs .logo { margin-left: auto; }

/* ---------- S05 browser ---------- */
.browser { flex: 1; display: grid; grid-template-columns: 24rem minmax(0, 1fr); min-height: 0; }
.pane-left { border-right: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; padding: 1.6rem 1.2rem 1rem 1.6rem; }
.pane-left .sec-head { display: flex; align-items: center; gap: 1rem; padding: 0 .4rem 1.2rem; }
.pane-left .sec-head .sec-ico { width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center; background: rgba(24,216,25,.12); border: 1px solid rgba(24,216,25,.35); }
.pane-left .sec-head .sec-ico svg { width: 1.9rem; height: 1.9rem; color: var(--green); }
.pane-left .sec-head h2 { font-size: 1.6rem; }
.pane-left .mini-actions { display: flex; gap: .6rem; padding: 0 0 1rem; }
.pane-left .mini-actions .btn { flex: 1; }
.cat-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; height: 100%; padding: 0 1.1rem; border-radius: var(--r-sm); font: 600 1.1rem/1.2 var(--body); color: #e8efe9; }
.cat-row .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: .5rem; }
.cat-row .n svg { width: 1.1rem; height: 1.1rem; color: var(--dim); }
.cat-row .c { font: 700 .95rem/1 var(--head); color: var(--dim); flex-shrink: 0; }
.vitem.sel .cat-row { background: rgba(24,216,25,.1); color: var(--green); }
.vitem.sel .cat-row .c { color: var(--green); }
.pane-right { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 1.4rem 1.6rem 0 1.8rem; }
.pane-right .bar-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.2rem; }
.pane-right .bar-row h3 { font-size: 1.4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-right .bar-row .cnt { font: 700 1rem/1 var(--head); color: var(--muted); margin-left: .6rem; }
.pane-right .bar-row .left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.dropdown { display: inline-flex; align-items: center; gap: .8rem; height: 2.8rem; padding: 0 1.1rem; border-radius: var(--r-sm); background: var(--glass); border: 1px solid var(--line); font: 700 1rem/1 var(--head); white-space: nowrap; }
.dropdown svg { width: 1.1rem; height: 1.1rem; }

/* virtual list */
.vlist { position: relative; overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; scrollbar-width: none; outline: none; }
.vlist::-webkit-scrollbar { display: none; }
.vlist .vinner { position: relative; width: 100%; }
.vitem { position: absolute; left: 0; top: 0; }
.vlist .vempty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: var(--dim); font-size: 1.15rem; text-align: center; padding: 2rem; }
.vlist .vempty svg { width: 3rem; height: 3rem; color: rgba(24,216,25,.5); }

/* poster card */
.poster { position: absolute; inset: .55rem .5rem .9rem; border-radius: var(--r-sm); overflow: hidden; background: var(--card-2); border: 2px solid transparent; transition: transform .16s, box-shadow .16s, border-color .16s; }
.poster .img { position: absolute; inset: 0 0 3rem; background: linear-gradient(160deg, #15241a, #0a120d); display: grid; place-items: center; overflow: hidden; }
.poster .img img { width: 100%; height: 100%; object-fit: cover; }
.poster .img .ph { font: 800 2.6rem/1 var(--head); color: rgba(24,216,25,.35); text-transform: uppercase; }
.poster .ttl { position: absolute; left: 0; right: 0; bottom: 0; height: 3rem; padding: 0 .8rem; display: flex; align-items: center; gap: .5rem; font: 700 .98rem/1.15 var(--head); background: rgba(5,8,6,.92); }
.poster .ttl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster .rate { position: absolute; top: .55rem; left: .55rem; display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .45rem; border-radius: .35rem; background: rgba(5,8,6,.82); font: 800 .8rem/1 var(--head); color: var(--gold); }
.poster .rate svg { width: .8rem; height: .8rem; }
.poster .fav { position: absolute; top: .55rem; right: .55rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: rgba(5,8,6,.82); color: var(--green); }
.poster .fav svg { width: 1rem; height: 1rem; }
.poster .prog { position: absolute; left: 0; right: 0; bottom: 3rem; height: .3rem; background: rgba(0,0,0,.5); }
.poster .prog i { display: block; height: 100%; background: var(--green); }
.poster .lock { position: absolute; inset: 0 0 3rem; display: grid; place-items: center; background: rgba(5,8,6,.7); }
.poster .lock svg { width: 2.4rem; height: 2.4rem; color: var(--gold); }
.vitem.cur.list-focused .poster { transform: scale(1.06); border-color: var(--green); box-shadow: var(--glow), 0 1rem 2rem rgba(0,0,0,.5); z-index: 2; }
.vitem.cur.list-focused .poster .ttl { background: var(--grad); color: var(--ink); }

/* list layout row (S15 list) */
.lrow { position: absolute; inset: 0 0 .5rem; display: flex; align-items: center; gap: 1.1rem; padding: 0 1rem 0 .5rem; border-radius: var(--r-sm); background: rgba(255,255,255,.03); border: 1px solid var(--line-2); }
.lrow .thumb { width: 3.6rem; height: 5rem; border-radius: .4rem; overflow: hidden; background: var(--card-2); flex-shrink: 0; display: grid; place-items: center; }
.lrow .thumb img { width: 100%; height: 100%; object-fit: cover; }
.lrow .thumb .ph { font: 800 1.3rem/1 var(--head); color: rgba(24,216,25,.35); }
.lrow .t { flex: 1; min-width: 0; }
.lrow .t b { display: block; font: 700 1.15rem/1.25 var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .t small { display: block; color: var(--muted); font-size: .92rem; margin-top: .2rem; }
.lrow .r { font: 800 .95rem/1 var(--head); color: var(--gold); display: flex; align-items: center; gap: .3rem; }
.lrow .r svg { width: .9rem; height: .9rem; }
.vitem.cur.list-focused .lrow { background: var(--grad); color: var(--ink); border-color: transparent; box-shadow: var(--glow); }
.vitem.cur.list-focused .lrow small, .vitem.cur.list-focused .lrow .r { color: var(--ink); }

/* ---------- S06 live ---------- */
.live { flex: 1; display: grid; grid-template-columns: 22rem 34rem minmax(0, 1fr); min-height: 0; }
.live .pane-left { padding: 1.4rem 1rem 1rem 1.4rem; }
.live .chan-pane { border-right: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; padding: 1.4rem 1rem 1rem; }
.live .chan-pane .bar-row { display: flex; align-items: center; justify-content: space-between; padding: 0 .4rem 1rem; }
.live .chan-pane h3 { font-size: 1.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-row { position: absolute; inset: 0 0 .35rem; display: flex; align-items: center; gap: .9rem; padding: 0 1rem 0 .8rem; border-radius: var(--r-sm); background: rgba(255,255,255,.025); }
.chan-row .num { width: 2.6rem; text-align: right; font: 700 .95rem/1 var(--head); color: var(--dim); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.chan-row .lg { width: 3.4rem; height: 2.3rem; border-radius: .35rem; background: rgba(0,0,0,.35); flex-shrink: 0; display: grid; place-items: center; overflow: hidden; }
.chan-row .lg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.chan-row .lg .ph { font: 800 .8rem/1 var(--head); color: rgba(24,216,25,.6); }
.chan-row .nm { flex: 1; min-width: 0; font: 600 1.05rem/1.2 var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-row .ic { display: flex; gap: .35rem; color: var(--green); }
.chan-row .ic svg { width: 1rem; height: 1rem; }
.vitem.playing .chan-row { background: rgba(24,216,25,.1); }
.vitem.playing .chan-row .nm { color: var(--green); }
.vitem.cur.list-focused .chan-row { background: var(--grad); color: var(--ink); box-shadow: var(--glow); }
.vitem.cur.list-focused .chan-row .nm, .vitem.cur.list-focused .chan-row .num, .vitem.cur.list-focused .chan-row .ic { color: var(--ink); }
.live .preview-pane { display: flex; flex-direction: column; min-height: 0; padding: 1.4rem 1.8rem 1rem; gap: 1.2rem; }
.preview-box { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #000; flex-shrink: 0; }
.preview-box.has-video { background: transparent; }
.preview-box .pv-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: var(--muted); font-size: 1.05rem; text-align: center; padding: 1.5rem; }
.preview-box .pv-msg svg { width: 2.6rem; height: 2.6rem; color: rgba(24,216,25,.6); }
.ch-info { display: flex; align-items: center; gap: 1rem; }
.ch-info .lg { width: 5rem; height: 3.3rem; border-radius: .5rem; background: rgba(255,255,255,.06); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.ch-info .lg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ch-info h2 { font-size: 1.6rem; line-height: 1.2; }
.ch-info small { color: var(--muted); font-size: .95rem; }
.epg { display: grid; gap: .8rem; }
.epg .prog-row { display: grid; grid-template-columns: 5.6rem 1fr; gap: 1rem; align-items: start; padding: .9rem 1rem; border-radius: var(--r-sm); background: rgba(255,255,255,.03); border: 1px solid var(--line-2); }
.epg .prog-row.now { border-color: rgba(24,216,25,.35); background: rgba(24,216,25,.06); }
.epg .tm { font: 800 1rem/1.2 var(--head); color: var(--green); font-variant-numeric: tabular-nums; }
.epg .prog-row:not(.now) .tm { color: var(--muted); }
.epg b { display: block; font: 700 1.1rem/1.25 var(--head); }
.epg p { margin-top: .3rem; color: var(--muted); font-size: .92rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.epg .bar { margin-top: .6rem; }
.epg .none { color: var(--dim); font-size: 1rem; padding: .5rem 0; }
.hints { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: auto; padding-top: .8rem; color: var(--dim); font-size: .9rem; }
.hints span { display: inline-flex; align-items: center; gap: .45rem; }

/* ---------- S07 / S08 details ---------- */
.details { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.details .backdrop { position: absolute; inset: 0; background-size: cover; background-position: center top; opacity: .28; filter: blur(.25rem); transform: scale(1.06); }
.details .backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 22%, rgba(5,8,6,.55) 70%, rgba(5,8,6,.3)), linear-gradient(0deg, var(--bg), transparent 50%); }
.details .wrap { position: relative; height: 100%; display: grid; grid-template-columns: 20rem 1fr; gap: 3rem; padding: 3rem 4rem 2rem; }
.details .cover { width: 20rem; height: 30rem; border-radius: var(--r); overflow: hidden; background: var(--card-2); box-shadow: 0 1.6rem 3rem rgba(0,0,0,.6); border: 1px solid var(--line); display: grid; place-items: center; }
.details .cover img { width: 100%; height: 100%; object-fit: cover; }
.details .cover .ph { font: 800 5rem/1 var(--head); color: rgba(24,216,25,.35); }
.details .info { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.details h1 { font-size: 3rem; line-height: 1.08; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.details .meta { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.1rem 0 1.4rem; }
.details .plot { font-size: 1.15rem; line-height: 1.6; color: #dfe7e1; max-width: 62rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.details .people { margin-top: 1rem; display: grid; gap: .45rem; font-size: 1rem; color: var(--muted); max-width: 62rem; }
.details .people b { color: #fff; font-weight: 700; margin-right: .5rem; }
.details .people span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.details .actions { display: flex; gap: 1rem; margin-top: 1.8rem; flex-wrap: wrap; }
.details .resume-note { margin-top: .9rem; color: var(--muted); font-size: .95rem; }
.seasons { display: flex; gap: .6rem; margin-top: 1.8rem; overflow: hidden; flex-shrink: 0; padding: .4rem .2rem; }
.season { height: 2.6rem; padding: 0 1.1rem; border-radius: 99rem; border: 1px solid var(--line); display: inline-flex; align-items: center; font: 700 1rem/1 var(--head); white-space: nowrap; flex-shrink: 0; }
.season.sel { border-color: rgba(24,216,25,.5); color: var(--green); }
.season.sel.focused { color: var(--ink); }
.episodes { margin-top: 1rem; flex: 1; min-height: 8rem; }
.ep-row { position: absolute; inset: 0 0 .5rem; display: flex; align-items: center; gap: 1rem; padding: 0 1.2rem; border-radius: var(--r-sm); background: rgba(255,255,255,.035); border: 1px solid var(--line-2); }
.ep-row .no { width: 3.2rem; font: 800 1.15rem/1 var(--head); color: var(--green); flex-shrink: 0; }
.ep-row .t { flex: 1; min-width: 0; }
.ep-row .t b { display: block; font: 700 1.1rem/1.25 var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-row .t small { display: block; color: var(--muted); font-size: .9rem; margin-top: .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-row .st { display: flex; align-items: center; gap: .5rem; color: var(--green); }
.ep-row .st svg { width: 1.1rem; height: 1.1rem; }
.ep-row .pg { width: 6rem; }
.vitem.cur.list-focused .ep-row { background: var(--grad); color: var(--ink); border-color: transparent; box-shadow: var(--glow); }
.vitem.cur.list-focused .ep-row .no, .vitem.cur.list-focused .ep-row small, .vitem.cur.list-focused .ep-row .st { color: var(--ink); }

/* ---------- S09 / S10 player ---------- */
.player-screen { background: transparent; }
.player-screen .catch { position: absolute; inset: 0; }
.osd { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; opacity: 1; transition: opacity .3s; pointer-events: none; }
.osd.hide { opacity: 0; }
.osd > * { pointer-events: auto; }
.osd.hide > * { pointer-events: none; }
.player-screen .catch { cursor: pointer; }
.osd .top { padding: 2.4rem 3.4rem 5rem; background: linear-gradient(180deg, rgba(0,0,0,.82), transparent); display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; }
.osd .top h2 { font-size: 2rem; line-height: 1.2; }
.osd .top small { display: block; color: var(--muted); font-size: 1.05rem; margin-top: .4rem; }
.osd .top .clock { font: 700 1.5rem/1 var(--head); }
.osd .bottom { padding: 5rem 3.4rem 2.4rem; background: linear-gradient(0deg, rgba(0,0,0,.88), transparent); }
.seek { display: flex; align-items: center; gap: 1.2rem; font: 700 1.05rem/1 var(--head); font-variant-numeric: tabular-nums; }
.seek .track { position: relative; flex: 1; height: .55rem; border-radius: 99rem; background: rgba(255,255,255,.2); }
.seek .track .buf { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: rgba(255,255,255,.25); }
.seek .track .pos { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--grad); }
.seek .track .knob { position: absolute; top: 50%; width: 1.3rem; height: 1.3rem; margin: -.65rem 0 0 -.65rem; border-radius: 50%; background: #fff; box-shadow: 0 0 .8rem rgba(24,216,25,.8); }
.seek.focused { background: none !important; box-shadow: none !important; color: #fff !important; }
.seek.focused .track { height: .8rem; }
.seek.focused .knob { width: 1.7rem; height: 1.7rem; margin: -.85rem 0 0 -.85rem; background: var(--green); }
.ctrls { display: flex; align-items: center; gap: .8rem; margin-top: 1.6rem; }
.ctrls .grow { flex: 1; }
.ctrl { height: 3.3rem; min-width: 3.3rem; padding: 0 1rem; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; gap: .55rem; background: rgba(255,255,255,.1); border: 1px solid var(--line); font: 700 1rem/1 var(--head); white-space: nowrap; }
.ctrl svg { width: 1.5rem; height: 1.5rem; }
.ctrl.play { min-width: 4.4rem; height: 4.4rem; border-radius: 50%; padding: 0; }
.ctrl.play svg { width: 2rem; height: 2rem; }
.player-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 1.2rem; text-align: center; max-width: 46rem; }
.player-msg .box { padding: 2rem 2.4rem; border-radius: var(--r); background: rgba(5,8,6,.88); border: 1px solid var(--line); }
.player-msg h3 { font-size: 1.5rem; margin-bottom: .6rem; }
.player-msg p { color: var(--muted); font-size: 1.05rem; line-height: 1.5; }
.player-msg .actions { display: flex; gap: .8rem; justify-content: center; margin-top: 1.4rem; }
.next-up { position: absolute; right: 3.4rem; bottom: 12rem; width: 26rem; padding: 1.2rem 1.4rem; border-radius: var(--r); background: rgba(5,8,6,.9); border: 1px solid rgba(24,216,25,.4); }
.next-up small { color: var(--green); font: 800 .8rem/1 var(--head); letter-spacing: .14rem; text-transform: uppercase; }
.next-up b { display: block; font: 700 1.2rem/1.3 var(--head); margin: .5rem 0 1rem; }
.live-osd .bottom { display: flex; align-items: center; gap: 1.6rem; }
.live-osd .lg { width: 7rem; height: 4.6rem; border-radius: .6rem; background: rgba(255,255,255,.08); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.live-osd .lg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.live-osd .num { font: 800 2.6rem/1 var(--head); color: var(--green); min-width: 4.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.live-osd .meta { flex: 1; min-width: 0; }
.live-osd .meta h2 { font-size: 1.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-osd .meta .now { margin-top: .5rem; font-size: 1.1rem; color: #e6efe8; display: flex; align-items: center; gap: .8rem; }
.live-osd .meta .now .bar { width: 12rem; }
.live-osd .meta .next { margin-top: .35rem; color: var(--muted); font-size: 1rem; }
.chnum-entry { position: absolute; top: 2.4rem; right: 3.4rem; font: 800 3.4rem/1 var(--head); color: var(--green); background: rgba(5,8,6,.85); padding: .8rem 1.4rem; border-radius: var(--r); border: 1px solid rgba(24,216,25,.4); }
.zap-list { position: absolute; left: 0; top: 0; bottom: 0; width: 34rem; background: linear-gradient(90deg, rgba(5,8,6,.96) 70%, rgba(5,8,6,.0)); padding: 2rem 3rem 2rem 2rem; display: flex; flex-direction: column; }
.zap-list h3 { font-size: 1.3rem; margin: 0 0 1rem .4rem; }

/* ---------- S11 settings ---------- */
.settings { flex: 1; display: flex; flex-direction: column; padding: 2.4rem 4rem 2rem; min-height: 0; }
.settings .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.settings h1 { font-size: 2.4rem; }
.set-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.set-btn { height: 4.6rem; display: flex; align-items: center; gap: 1rem; padding: 0 1.4rem; border-radius: var(--r-sm); background: var(--glass); border: 1px solid var(--line); font: 700 1.12rem/1.15 var(--head); text-align: left; }
.set-btn svg { width: 1.7rem; height: 1.7rem; color: var(--green); }
.set-btn .v { margin-left: auto; font: 600 .92rem/1 var(--body); color: var(--muted); white-space: nowrap; }
.set-btn.focused { transform: scale(1.03); }
.settings .foot { margin-top: auto; display: flex; gap: 3rem; justify-content: center; color: var(--muted); font-size: 1.05rem; padding-top: 1.6rem; }
.settings .foot b { color: #fff; font: 800 1.15rem/1 var(--head); letter-spacing: .06rem; margin-left: .4rem; }

/* ---------- modal ---------- */
.modal-wrap { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.6); pointer-events: auto; animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; } }
.modal { width: 42rem; max-width: calc(100vw - 2rem); max-height: 86vh; display: flex; flex-direction: column; border-radius: 1.2rem; background: #0a100c; border: 1px solid var(--line); box-shadow: 0 2rem 5rem rgba(0,0,0,.7), 0 0 0 1px rgba(24,216,25,.08); overflow: hidden; }
.modal.wide { width: 58rem; }
.modal .m-head { display: flex; align-items: center; gap: 1rem; padding: 1.6rem 2rem 1.2rem; }
.modal .m-head svg { width: 1.8rem; height: 1.8rem; color: var(--green); }
.modal .m-head h2 { font-size: 1.6rem; }
.modal .m-body { padding: 0 2rem 1.4rem; overflow: hidden; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal .m-body p { color: var(--muted); font-size: 1.08rem; line-height: 1.55; }
.modal .m-foot { display: flex; gap: .8rem; justify-content: flex-end; padding: 1.2rem 2rem 1.6rem; border-top: 1px solid var(--line-2); }
.opt-list { display: grid; gap: .5rem; overflow-y: auto; max-height: 56vh; padding: .3rem; scrollbar-width: none; }
.opt-list::-webkit-scrollbar { display: none; }
.opt { display: flex; align-items: center; gap: 1rem; min-height: 3.3rem; padding: .5rem 1.2rem; border-radius: var(--r-sm); background: rgba(255,255,255,.035); border: 1px solid var(--line-2); font: 600 1.08rem/1.25 var(--body); }
.opt .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.opt small { color: var(--muted); font-size: .9rem; }
.opt .box { width: 1.5rem; height: 1.5rem; border-radius: .35rem; border: 2px solid var(--dim); display: grid; place-items: center; flex-shrink: 0; }
.opt .box svg { width: 1rem; height: 1rem; opacity: 0; }
.opt.on .box { background: var(--green); border-color: var(--green); }
.opt.on .box svg { opacity: 1; color: var(--ink); }
.opt .radio { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--dim); flex-shrink: 0; display: grid; place-items: center; }
.opt.on .radio { border-color: var(--green); }
.opt.on .radio::after { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--green); }
.opt.focused .box, .opt.focused .radio { border-color: var(--ink); }
.opt.focused.on .box { background: var(--ink); }
.opt.focused.on .box svg { color: var(--green); }
.opt.focused.on .radio::after { background: var(--ink); }
.opt .tag { margin-left: auto; }
.seg-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }

/* toggle + stepper + swatches (S12) */
.toggle { width: 3.4rem; height: 1.9rem; border-radius: 99rem; background: rgba(255,255,255,.18); position: relative; flex-shrink: 0; margin-left: auto; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle.on { background: var(--green-2); }
.toggle.on::after { transform: translateX(1.5rem); }
.focused .toggle { background: rgba(4,20,10,.35); }
.focused .toggle.on { background: var(--ink); }
.stepper { margin-left: auto; display: flex; align-items: center; gap: 1rem; font: 800 1.05rem/1 var(--head); }
.stepper .sb { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; font-size: 1.3rem; }
.swatches { margin-left: auto; display: flex; gap: .55rem; }
.sw { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); }
.sw.on { border: 3px solid #fff; box-shadow: 0 0 0 2px var(--green); }
.focused .sw.on { border-color: var(--ink); box-shadow: 0 0 0 2px #fff; }
.sub-preview { margin-top: 1rem; height: 7rem; border-radius: var(--r-sm); background: linear-gradient(135deg, #24402c, #0d1a11); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 1rem; }
.sub-preview span { padding: .15rem .5rem; border-radius: .2rem; font-weight: 700; }

/* PIN pad (S13) */
.pin-dots { display: flex; justify-content: center; gap: 1.2rem; margin: .6rem 0 1.6rem; }
.pin-dots i { width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 2px solid var(--muted); }
.pin-dots i.on { background: var(--green); border-color: var(--green); box-shadow: 0 0 .6rem rgba(24,216,25,.6); }
.pin-dots.err i { border-color: var(--red); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-.4rem); } 75% { transform: translateX(.4rem); } }
.pinpad { display: grid; grid-template-columns: repeat(3, 5.6rem); gap: .7rem; justify-content: center; }
.pinpad .k { height: 4rem; border-radius: var(--r-sm); background: rgba(255,255,255,.06); border: 1px solid var(--line); display: grid; place-items: center; font: 800 1.6rem/1 var(--head); }
.pinpad .k svg { width: 1.5rem; height: 1.5rem; }
.pin-msg { text-align: center; min-height: 1.6rem; margin-top: 1rem; color: var(--red); font-weight: 600; }
.pin-hint { text-align: center; color: var(--muted); font-size: 1rem; margin-bottom: .4rem; }

/* form fields in modals */
.field { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.field label { font: 800 .8rem/1 var(--head); letter-spacing: .14rem; text-transform: uppercase; color: var(--dim); }
.field .inp { height: 3.3rem; padding: 0 1.1rem; border-radius: var(--r-sm); background: rgba(255,255,255,.05); border: 1px solid var(--line); display: flex; align-items: center; }
.field .inp input { flex: 1; background: none; border: 0; outline: 0; font-size: 1.1rem; color: #fff; }
.field .inp.focused input { color: var(--ink); }

/* ---------- S04 search ---------- */
.search-screen .results { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 1.6rem 2.4rem 1rem; display: flex; flex-direction: column; gap: 1.4rem; }
.search-screen .results::-webkit-scrollbar { display: none; }
.search-screen .res-row { flex-shrink: 0; }
.res-row h3 { font-size: 1.3rem; margin: 0 0 .8rem .3rem; display: flex; align-items: center; gap: .6rem; }
.res-row h3 svg { width: 1.5rem; height: 1.5rem; color: var(--green); }
.res-row h3 small { font: 700 .95rem/1 var(--head); color: var(--dim); }
.res-row .hlist { display: flex; gap: .2rem; overflow: hidden; height: 100%; }
.res-row.posters .rail { height: 17rem; }
.res-row.chans .rail { height: 4.6rem; }
.rail { position: relative; overflow: hidden; }
.rail .vinner { height: 100%; }
.search-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: var(--dim); font-size: 1.2rem; text-align: center; }
.search-empty svg { width: 3.4rem; height: 3.4rem; color: rgba(24,216,25,.5); }
.chan-card { position: absolute; inset: 0 .5rem 0 0; display: flex; align-items: center; gap: .8rem; padding: 0 1rem; border-radius: var(--r-sm); background: rgba(255,255,255,.04); border: 1px solid var(--line-2); }
.chan-card .lg { width: 3.2rem; height: 2.2rem; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.chan-card .lg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.chan-card .lg .ph { font: 800 .8rem/1 var(--head); color: rgba(24,216,25,.6); }
.chan-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 1rem/1.2 var(--body); }
.vitem.cur.list-focused .chan-card { background: var(--grad); color: var(--ink); box-shadow: var(--glow); }

/* ---------- S16 playlists / S17 account ---------- */
.page { flex: 1; display: flex; flex-direction: column; padding: 2.4rem 4rem 2rem; min-height: 0; }
.page .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; gap: 2rem; }
.page h1 { font-size: 2.4rem; }
.pl-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; max-width: 64rem; }
.pl-item { display: flex; align-items: center; gap: 1.2rem; min-height: 5rem; padding: .8rem 1.4rem; border-radius: var(--r-sm); background: var(--glass); border: 1px solid var(--line); }
.pl-item .ic { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: rgba(24,216,25,.12); flex-shrink: 0; }
.pl-item .ic svg { width: 1.5rem; height: 1.5rem; color: var(--green); }
.pl-item .t { flex: 1; min-width: 0; }
.pl-item .t b { display: block; font: 700 1.25rem/1.25 var(--head); }
.pl-item .t small { display: block; color: var(--muted); font-size: .95rem; margin-top: .25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-item.focused .ic { background: rgba(4,20,10,.15); }
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; max-width: 72rem; }
.acc-card { padding: 1.6rem 1.8rem; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); }
.acc-card label { display: block; font: 800 .8rem/1 var(--head); letter-spacing: .14rem; text-transform: uppercase; color: var(--dim); margin-bottom: .7rem; }
.acc-card .v { font: 800 1.6rem/1.2 var(--head); word-break: break-all; }
.acc-card .v.g { color: var(--green); }
.acc-card p { color: var(--muted); margin-top: .5rem; font-size: .98rem; line-height: 1.45; }
.page .actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

/* ---------- add playlist on the TV ---------- */
.row-gap { display: flex; align-items: center; gap: 1.6rem; }
.pl-row { display: flex; gap: .8rem; align-items: stretch; max-width: 70rem; min-width: 0; }
.pl-row .pl-item { flex: 1; min-width: 0; }
.pl-row .btn.icon { height: auto; width: 5rem; }
.form-wrap { display: grid; grid-template-columns: minmax(0, 48rem) 26rem; gap: 3rem; align-items: start; }
.form .field { margin-bottom: .4rem; }
.form .field .inp { height: 3.6rem; }
.form .field .inp input { width: 100%; font-size: 1.15rem; }
.ferr { min-height: 1.4rem; color: var(--red); font-size: .95rem; font-weight: 600; }
.seg { display: flex; gap: .6rem; margin: .2rem 0 1.2rem; }
.seg-btn { height: 3rem; padding: 0 1.4rem; border-radius: 99rem; border: 1px solid var(--line); font: 700 1.05rem/1 var(--head); color: var(--muted); }
.seg-btn.on { color: var(--green); border-color: rgba(24,216,25,.5); background: rgba(24,216,25,.08); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 1rem; margin-top: .4rem; }
.form .rights { margin-top: 1.4rem; font-size: .95rem; line-height: 1.5; }
.tip { display: flex; gap: 1rem; padding: 1.6rem; border-radius: var(--r); background: rgba(24,216,25,.06); border: 1px solid rgba(24,216,25,.3); }
.tip svg { width: 1.8rem; height: 1.8rem; color: var(--green); }
.tip p { color: #dfe7e1; font-size: 1.1rem; line-height: 1.55; }
html.phone .form-wrap { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
html.phone .two { grid-template-columns: minmax(0, 1fr); gap: 0; }
html.phone .page .head .row-gap .logo { display: none; }
html.phone .settings .head .logo, html.phone .page .head > .logo { display: none; }
html.phone .pl-row .btn.icon { width: 3.4rem; flex-shrink: 0; }
html.phone .pl-item { padding: .6rem .9rem; gap: .8rem; }
html.phone .pl-item .chip { display: none; }
html.phone .page .head { flex-wrap: wrap; }

/* ---------- S20 error / blocking ---------- */
.err-screen { align-items: center; justify-content: center; text-align: center; gap: 1.4rem; padding: 3rem; }
.err-screen .ico { width: 6rem; height: 6rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255,77,77,.1); border: 1px solid rgba(255,77,77,.4); }
.err-screen .ico svg { width: 3rem; height: 3rem; color: var(--red); }
.err-screen h1 { font-size: 2.4rem; }
.err-screen p { color: var(--muted); font-size: 1.2rem; line-height: 1.55; max-width: 48rem; }
.err-screen .tech { font-family: ui-monospace, Menlo, monospace; font-size: .9rem; color: var(--dim); max-width: 60rem; word-break: break-all; }
.err-screen .actions { display: flex; gap: 1rem; margin-top: 1rem; }

/* ---------- toast ---------- */
.toast { padding: .9rem 1.4rem; border-radius: var(--r-sm); background: rgba(10,16,12,.95); border: 1px solid rgba(24,216,25,.4); box-shadow: 0 1rem 2rem rgba(0,0,0,.5); font: 600 1.05rem/1.3 var(--body); display: flex; align-items: center; gap: .7rem; animation: toastin .2s ease; }
.toast svg { width: 1.3rem; height: 1.3rem; color: var(--green); }
.toast.bad { border-color: rgba(255,77,77,.5); }
.toast.bad svg { color: var(--red); }
@keyframes toastin { from { opacity: 0; transform: translateY(.6rem); } }

/* ---------- RTL ---------- */
[dir="rtl"] .opt, [dir="rtl"] .set-btn { text-align: right; }
[dir="rtl"] .set-btn .v { margin-left: 0; margin-right: auto; }
[dir="rtl"] .toggle, [dir="rtl"] .stepper, [dir="rtl"] .swatches { margin-left: 0; margin-right: auto; }

/* =================== PHONE / TOUCH LAYOUT =================== */
html.phone .f { transition: none; }
html.phone .focused:not(.vlist) { box-shadow: none; }
html.phone .topline { padding: 1rem 1rem 0; font-size: .85rem; }
html.phone .topline .clock { font-size: 1.15rem; }
html.phone .logo.lg svg { width: 3.6rem; height: 3.3rem; }
html.phone .logo.lg .w { font-size: 2.2rem; }
html.phone .logo.lg .tag { font-size: .65rem; }

html.phone .activate { display: flex; flex-direction: column; align-items: stretch; gap: 1.4rem; padding: 1.4rem 1rem 2rem; overflow-y: auto; }
html.phone .activate h1 { font-size: 1.7rem; margin: 1rem 0 .5rem; }
html.phone .activate .lead { font-size: 1rem; }
html.phone .steps { margin: 1rem 0; gap: .7rem; }
html.phone .steps li { font-size: .98rem; }
html.phone .steps li::before { width: 1.8rem; height: 1.8rem; font-size: .9rem; }
html.phone .idcard { padding: 1.3rem; }
html.phone .idcard .val { font-size: 1.6rem; }
html.phone .idcard .url { font-size: 1.05rem; }

html.phone .home { overflow-y: auto; justify-content: flex-start; }
html.phone .home .center { gap: 1.4rem; margin: 1.4rem 0; padding: 0 1rem; }
html.phone .home-grid { width: 100%; grid-template-columns: 1fr 1fr; grid-template-rows: auto; gap: .7rem; }
html.phone .tile { height: 7rem; font-size: 1rem; }
html.phone .tile svg { width: 2rem; height: 2rem; }
html.phone .tile.big { grid-column: 1 / -1; grid-row: auto; height: 9rem; font-size: 1.4rem; }
html.phone .tile.big svg { width: 3.2rem; height: 3.2rem; }
html.phone .side-col { grid-column: 1 / -1; grid-row: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
html.phone .side-btn { height: 3.2rem; justify-content: center; padding: 0 .5rem; font-size: .9rem; gap: .5rem; }
html.phone .side-btn svg { width: 1.1rem; height: 1.1rem; }
html.phone .home .foot { padding: 0 1rem 1.2rem; font-size: .8rem; flex-wrap: wrap; gap: .5rem; }
html.phone .home .warn-strip { position: static; transform: none; align-self: center; margin-top: .8rem; }

html.phone .tabs { height: auto; min-height: 3.6rem; padding: .5rem .6rem; gap: .1rem; flex-wrap: wrap; }
html.phone .tab { height: 2.4rem; padding: 0 .7rem; font-size: .95rem; }
html.phone .tabs .sep, html.phone .tabs .logo { display: none; }
html.phone .search-pill { order: 9; width: 100%; margin: .3rem 0 0; height: 2.6rem; }

html.phone .browser { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
html.phone .pane-left { border-right: 0; border-bottom: 1px solid var(--line-2); padding: .5rem .6rem; height: 3.5rem; flex: none; }
html.phone .pane-left .vlist { overflow-x: auto; overflow-y: hidden; }
html.phone .pane-left .cat-row { margin-right: .5rem; border-radius: 99rem; background: rgba(255,255,255,.05); border: 1px solid var(--line-2); font-size: .9rem; padding: 0 .9rem; }
html.phone .pane-left .vitem.sel .cat-row { border-color: rgba(24,216,25,.5); }
html.phone .pane-left .sec-head, html.phone .pane-left .mini-actions { display: none; }
html.phone .pane-right { padding: .6rem .6rem 0; }
html.phone .pane-right .bar-row h3 { font-size: 1.05rem; }
html.phone .cat-row { font-size: .95rem; }
html.phone .poster .ttl { font-size: .8rem; height: 2.4rem; padding: 0 .5rem; }
html.phone .poster .img { bottom: 2.4rem; }

html.phone .live { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
html.phone .live .preview-pane { order: -1; padding: 0; gap: .5rem; }
html.phone .live .preview-box { border-radius: 0; border: 0; }
html.phone .live .preview-pane .epg, html.phone .live .preview-pane .hints { display: none; }
html.phone .live .preview-pane .ch-info { padding: 0 .8rem; }
html.phone .live .preview-pane .ch-info h2 { font-size: 1.1rem; }

html.phone .live .chan-pane { border-right: 0; padding: .5rem .6rem; min-height: 0; }
html.phone .chan-row .nm { font-size: .95rem; }

html.phone .details { overflow-y: auto; }
html.phone .details .wrap { display: block; padding: 1rem; height: auto; }
html.phone .details .cover { width: 9rem; height: 13.5rem; float: left; margin: 0 1rem .6rem 0; }
html.phone .details h1 { font-size: 1.5rem; }
html.phone .details .meta .chip { max-width: 100%; }
html.phone .details .meta .chip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; line-height: 1.9rem; }
html.phone .details .meta .chip svg { display: inline-block; vertical-align: -.15rem; margin-right: .3rem; }
html.phone .details .info { min-width: 0; }
html.phone .details .plot { font-size: .95rem; clear: both; padding-top: .6rem; }
html.phone .details .people { font-size: .85rem; }
html.phone .details .actions { gap: .5rem; }
html.phone .details .actions .btn { height: 2.8rem; padding: 0 1rem; font-size: .95rem; }
html.phone .episodes { height: 24rem; flex: none; }
html.phone .ep-row .pg { display: none; }

html.phone .osd .top { padding: 1rem 1rem 3rem; }
html.phone .osd .top h2 { font-size: 1.1rem; }
html.phone .osd .bottom { padding: 3rem 1rem 1rem; }
html.phone .ctrls { gap: .4rem; overflow-x: auto; }
html.phone .ctrl { height: 2.6rem; min-width: 2.6rem; padding: 0 .6rem; font-size: .8rem; }
html.phone .ctrl span { display: none; }
html.phone .ctrl.play { width: 3.2rem; height: 3.2rem; min-width: 3.2rem; }
html.phone .live-osd .lg { width: 4rem; height: 2.7rem; }
html.phone .live-osd .num { font-size: 1.5rem; min-width: 2.5rem; }
html.phone .live-osd .meta h2 { font-size: 1.1rem; }
html.phone .live-osd .meta .now { font-size: .85rem; }
html.phone .live-osd .meta .now .bar { display: none; }
html.phone .zap-list { width: 85vw; padding: 1rem; }
html.phone .next-up { right: 1rem; left: 1rem; width: auto; bottom: 8rem; }

html.phone .settings, html.phone .page { padding: 1rem; overflow-y: auto; }
html.phone .settings h1, html.phone .page h1 { font-size: 1.5rem; }
html.phone .settings .head, html.phone .page .head { margin-bottom: 1rem; }
html.phone .set-grid { grid-template-columns: 1fr; gap: .5rem; }
html.phone .set-btn { height: 3.4rem; font-size: .98rem; }
html.phone .settings .foot { flex-direction: column; gap: .4rem; align-items: center; font-size: .9rem; }
html.phone .acc-grid { grid-template-columns: 1fr; }
html.phone .acc-card .v { font-size: 1.2rem; }

html.phone .modal { width: calc(100vw - 1.4rem); }
html.phone .modal .m-head { padding: 1.1rem 1.1rem .8rem; }
html.phone .modal .m-body { padding: 0 1.1rem 1rem; }
html.phone .modal .m-foot { padding: .9rem 1.1rem 1.1rem; flex-wrap: wrap; }
html.phone .pinpad { grid-template-columns: repeat(3, 4.6rem); }
html.phone .err-screen h1 { font-size: 1.5rem; }
html.phone .err-screen { padding: 1.4rem; }
html.phone .err-screen .actions, html.phone .activate .actions, html.phone .player-msg .actions { flex-wrap: wrap; justify-content: center; }
html.phone .err-screen .actions .btn { flex: 1 1 40%; }
html.phone .err-screen p { font-size: 1rem; }
html.phone .search-screen .results { padding: .8rem .6rem; }
html.phone .res-row.posters .rail { height: 13rem; }


/* ---------- full-screen button on the live preview ---------- */
.pv-full { position: absolute; right: .8rem; bottom: .8rem; width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; background: rgba(5,8,6,.72); border: 1px solid var(--line); z-index: 2; }
.pv-full svg { width: 1.5rem; height: 1.5rem; }
html.phone .pv-full { width: 2.8rem; height: 2.8rem; }

/* ---------- QR code on the first screen ---------- */
.qrrow { display: flex; align-items: center; gap: 1.6rem; padding: 0 0 1.6rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line-2); }
.qrbox { width: 11rem; height: 11rem; flex-shrink: 0; padding: .5rem; border-radius: .8rem; background: #fff; }
.qrbox svg { width: 100%; height: 100%; display: block; }
.qrtext { display: flex; flex-direction: column; gap: .5rem; }
.qrtext b { font: 800 1.35rem/1.25 var(--head); }
.qrtext span { color: var(--muted); font-size: 1rem; line-height: 1.45; }

/* ---------- phone held sideways (TV layout, smaller) ---------- */
html.land .activate { overflow-y: auto; align-items: start; padding: 2rem 3rem; gap: 2.4rem; }
html.land .activate h1 { font-size: 2.4rem; margin: 1.4rem 0 .6rem; }
html.land .idcard { padding: 1.8rem; }
html.land .idcard .val { font-size: 2.2rem; }
html.land .topline { padding-top: 1.2rem; }
html.land .tabs { height: 4.6rem; }
html.land .settings, html.land .page { padding-top: 1.6rem; overflow-y: auto; }
html.land .settings .head, html.land .page .head { margin-bottom: 1.2rem; }
html.land .details .wrap { padding-top: 1.6rem; }
html.land .details .cover { width: 15rem; height: 22.5rem; }
html.land .details h1 { font-size: 2.4rem; }
html.land .details .wrap { grid-template-columns: 15rem 1fr; gap: 2.4rem; }


/* ---------- TV search with our own keyboard ---------- */
.search-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 34rem minmax(0, 1fr); }
.search-body .results { min-width: 0; }
.kb { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; align-content: start; padding: 1.8rem 1.6rem 1rem 2.2rem; border-right: 1px solid var(--line-2); }
.kb .key { height: 4.2rem; border-radius: .6rem; background: var(--glass); border: 1px solid var(--line); display: grid; place-items: center; font: 800 1.55rem/1 var(--head); text-transform: uppercase; }
.kb .key.w2 { grid-column: span 2; }
.kb .key.w3 { grid-column: span 3; font-size: 1.1rem; letter-spacing: .08rem; }
.kb .key svg { width: 1.7rem; height: 1.7rem; }
.search-pill .pill-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.1rem; color: #fff; }
.search-pill .pill-text.ph { color: var(--dim); }
.search-screen.tvkb .search-pill { border-color: rgba(24,216,25,.45); }
html.land .kb { padding: 1rem .8rem .6rem 1.4rem; gap: .35rem; }
html.land .kb .key { height: 3.4rem; font-size: 1.3rem; }
html.land .search-body { grid-template-columns: 30rem minmax(0, 1fr); }
