/* SUA TV — designed at 1920x1080, scaled to the screen.
   TV-safe CSS: no flex `gap`, no backdrop-filter, no aspect-ratio, no `inset`
   (keeps it working on 2019+ Samsung Tizen and LG webOS browsers). */

:root {
  --accent: #ff6a13; --accent-2: #e04e00; --accent-rgb: 255, 106, 19;
  --bg: #0a0a0b; --text: #fff; --text-2: rgba(255, 255, 255, .74); --text-3: rgba(255, 255, 255, .5);
  --panel: rgba(255, 255, 255, .035); --stroke: rgba(255, 255, 255, .08);
  --live: #ff3d5f; --ok: #2fd27a; --gold: #ffc94d;
  /* Stage size: 1920x1080, or 720 x screen height on phones held upright (ui.js). */
  --sw: 1920px; --sh: 1080px;
}
#stage[data-accent="roxo"] { --accent: #9d4dff; --accent-2: #6f2cf5; --accent-rgb: 157, 77, 255; }
#stage[data-accent="azul"] { --accent: #3d8bff; --accent-2: #2457f5; --accent-rgb: 61, 139, 255; }
#stage[data-accent="verde"] { --accent: #1fc77e; --accent-2: #0e9b62; --accent-rgb: 31, 199, 126; }
#stage[data-accent="rosa"] { --accent: #ff4d9d; --accent-2: #d42a7a; --accent-rgb: 255, 77, 157; }

* { box-sizing: border-box; scrollbar-width: none; }
::-webkit-scrollbar { display: none; width: 0; height: 0; }
html, body { margin: 0; height: 100%; background: #060608; overflow: hidden; }
/* Touch screens: the app moves the lists itself (nav.js), so no browser panning or zoom,
   no text selection on long press, no grey tap flash. */
html { touch-action: none; -webkit-tap-highlight-color: transparent; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body { font-family: "Plus Jakarta Sans", Manrope, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; outline: none; text-align: inherit; }
svg { display: block; }
.hidden { display: none !important; }

#stage {
  position: absolute; left: 50%; top: 50%; width: var(--sw); height: var(--sh); margin: calc(var(--sh) / -2) 0 0 calc(var(--sw) / -2);
  transform-origin: 50% 50%; overflow: hidden; color: var(--text); background: var(--bg);
}
#bg {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 62%),
    radial-gradient(1500px 620px at 50% 118%, rgba(var(--accent-rgb), .07), rgba(var(--accent-rgb), 0) 62%),
    linear-gradient(180deg, #121214, #0a0a0b 55%, #0d0d0f);
}
#app, #overlay, #modal, #toast { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); }
#app { z-index: 0; }
#video-layer { z-index: 1; }
#overlay { z-index: 2; }
#modal { z-index: 3; }
#toast { z-index: 4; }
#overlay, #modal, #toast { pointer-events: none; }
#overlay > *, #modal > *, #toast > * { pointer-events: auto; }
.page { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); }

/* ---------- focus ring (one element at a time, so the glow is cheap) ---------- */
.focusable { position: relative; transition: transform .16s ease, background-color .16s ease, color .16s ease; }
.focusable::after {
  content: ""; position: absolute; left: -5px; top: -5px; right: -5px; bottom: -5px; border-radius: inherit;
  border: 3px solid var(--accent);
  opacity: 0; transition: opacity .16s ease; pointer-events: none;
}
.focusable.focused::after { opacity: 1; }

/* ---------- header ---------- */
.topbar { position: absolute; left: 0; right: 0; top: 0; height: 112px; padding: 0 60px; display: flex; align-items: center; justify-content: space-between; z-index: 2; }
.topbar.home { height: 170px; padding: 0 69px 0 95px; }
.tb-left { display: flex; align-items: center; }
.back-btn { width: 56px; height: 56px; flex: none; margin-right: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .08); }
.back-btn::after { content: none; }
.back-btn svg { width: 28px; height: 28px; }
.back-btn.focused { background: var(--accent); }
.logo { font-family: "Plus Jakarta Sans", Manrope, "Segoe UI", Arial, sans-serif; font-style: normal; font-weight: 800; font-size: 38px; letter-spacing: 1px; color: #fff; line-height: 1; white-space: nowrap; }
.topbar.home .logo { font-size: 62px; letter-spacing: 2px; }
.logo .pro { margin-left: 10px; padding-right: 8px; background: linear-gradient(90deg, #ff9a52, var(--accent) 55%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tb-title { margin-left: 30px; padding-left: 30px; border-left: 2px solid rgba(255, 255, 255, .18); font-size: 26px; font-weight: 600; color: rgba(255, 255, 255, .9); }
.tb-right { display: flex; align-items: center; }
.tb-sort { height: 56px; margin-right: 32px; padding: 0 24px; font-size: 24px; font-weight: 600; white-space: nowrap; }
.tb-sort svg { width: 28px; height: 28px; margin-right: 12px; }
.tb-time { font-size: 25px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tb-wifi { margin-left: 26px; }
.tb-wifi svg { width: 30px; height: 30px; stroke-width: 2.6; }
.tb-date { margin-left: 26px; font-size: 22px; font-weight: 500; color: rgba(255, 255, 255, .9); }
.tb-div { width: 2px; height: 36px; background: rgba(255, 255, 255, .22); margin: 0 6px 0 26px; }
.cbtn { width: 66px; height: 66px; border-radius: 18px; margin-left: 24px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .06); border: 1.5px solid rgba(255, 255, 255, .1); }
.cbtn svg { width: 30px; height: 30px; }
.cbtn.focused { transform: scale(1.08); background: rgba(var(--accent-rgb), .25); }

/* ---------- home ---------- */
.home-tiles { position: absolute; left: 192px; top: 122px; z-index: 1; width: 1536px; display: flex; justify-content: space-between; }
.tile {
  width: 288px; height: 280px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)); border: 1.5px solid rgba(255, 255, 255, .08); text-align: center;
}
.tile svg { width: 116px; height: 116px; }
.tile span { display: block; margin-top: 30px; font-size: 26px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.tile::after { left: -3px; top: -3px; right: -3px; bottom: -3px; border-width: 4px; border-radius: 22px; }
.tile.focused { transform: scale(1.04); background: linear-gradient(180deg, rgba(var(--accent-rgb), .16), rgba(var(--accent-rgb), .04)); }
/* Home: the header stays; under it the page scrolls as a stack of blocks: the tiles, then
   one block per row. */
.home-page { position: absolute; left: 0; top: 170px; width: var(--sw); height: calc(var(--sh) - 170px); }
.home-page > .scroll-inner { transition: transform .2s ease-out; }
.tb-refresh.busy svg { -webkit-animation: home-turn 1s linear infinite; animation: home-turn 1s linear infinite; }
@-webkit-keyframes home-turn { to { -webkit-transform: rotate(360deg); } }
@keyframes home-turn { to { transform: rotate(360deg); } }
.home-head { position: relative; height: 448px; }
.hrow { width: 1814px; margin-left: 53px; }
.hrow-title { height: 54px; padding: 14px 0 0 14px; font-size: 25px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow-sc { height: 366px; }
.hrow.wide .hrow-sc { height: 336px; }
.hrow-sc > .row-inner { padding-left: 14px; padding-right: 14px; }
/* Cards sit in 50 px units with a 20 px gap: posters 180 (9 per row), 16:9 cards 430 (4 per
   row). The focus zoom and ring stay inside the gap and the row padding, so nothing is cut. */
.pcard.home-card { width: 180px; margin-right: 20px; }
.pcard.home-card .img { width: 180px; height: 270px; }
.pcard.home-card.focused .img { transform: scale(1.04); }
.pcard.home-card.wide-card { width: 430px; }
.pcard.home-card.wide-card .img { width: 430px; height: 242px; }
.pcard.home-card.wide-card.focused .img { transform: scale(1.02); }
/* 16:9 channel card. */
.ch-card-logo { position: absolute; left: 0; right: 0; top: 0; bottom: 80px; display: flex; align-items: center; justify-content: center; }
.ch-card-logo .logo-badge.has-img { background: rgba(255, 255, 255, .08); }
.ch-card-now { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 20px 16px; }
.ch-card-prog { font-size: 19px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-card-time { margin-top: 3px; font-size: 15px; color: var(--text-2); }
.ch-card-now .bar { height: 5px; margin-top: 10px; border-radius: 5px; background: rgba(255, 255, 255, .2); }
.ch-card-num { margin-right: 10px; color: var(--text-3); }
.off-row { visibility: hidden; }
.row-inner { display: flex; width: -webkit-max-content; width: max-content; padding: 14px 15px; }

/* ---------- poster cards ---------- */
.pcard { flex: none; width: 176px; margin-right: 14px; }
.pcard::after { content: none; }
.pcard .img { position: relative; width: 176px; height: 264px; border-radius: 8px; overflow: hidden; background: #212123; transition: transform .16s ease, box-shadow .16s ease; }
.pcard .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Poster focus: slightly larger, accent ring separated from the image by a dark gap. */
.pcard.focused { z-index: 2; }
.pcard.focused .img { transform: scale(1.05); box-shadow: 0 0 0 3px var(--bg), 0 0 0 7px var(--accent); }
.pcard .cap { margin-top: 22px; padding: 0 6px; font-size: 17px; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard.focused .cap { color: #fff; font-weight: 600; }
.pcard .cap-sub { padding: 0 6px; margin-top: 4px; font-size: 15px; color: var(--text-3); }
.pbar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.pbar i, .bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.grid-card { width: 160px; margin-right: 0; }
.grid-card .img { width: 160px; height: 240px; border-radius: 8px; }
.grid-card .cap { margin-top: 22px; padding: 0 2px; font-size: 18px; font-weight: 500; }
/* Movies and series on TVs: 5 large posters per row */
.grid-card.grid-big { width: 256px; }
.grid-card.grid-big .img { width: 256px; height: 384px; border-radius: 10px; }
.grid-card.grid-big .cap { margin-top: 20px; font-size: 21px; }
.grid-card.grid-big.focused .img { transform: scale(1.04); }

/* ---------- inner pages: flush columns ---------- */
.cols { position: absolute; left: 0; right: 0; top: 112px; bottom: 0; display: flex; border-top: 1px solid var(--stroke); }
.col { position: relative; height: 100%; }
.col.side { width: 380px; flex: none; background: rgba(0, 0, 0, .22); border-right: 1px solid var(--stroke); }
.col.main { flex: 1; min-width: 0; }
.col.pv { width: 660px; flex: none; background: rgba(0, 0, 0, .22); border-left: 1px solid var(--stroke); display: flex; flex-direction: column; }
.scroller { position: relative; overflow: hidden; }
.scroll-inner { position: relative; transition: transform .12s ease-out; will-change: transform; }
.scroll-inner.instant { transition: none; }
/* Fast navigation (keys held or pressed quickly, see nav.js): no animations at all. */
.nav-fast .focusable, .nav-fast .focusable::after, .nav-fast .pcard .img, .nav-fast .scroll-inner, .nav-fast .tile { transition: none !important; }
.col.side > .scroll-inner { padding: 18px 0; }

.cat { height: 66px; padding: 0 34px 0 60px; display: flex; align-items: center; justify-content: space-between; font-size: 22px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.cat span { overflow: hidden; text-overflow: ellipsis; }
.cat svg { width: 20px; height: 20px; flex: none; margin-left: 12px; color: var(--text-3); }
.cat.focused svg { color: #fff; }
.cat::after { content: none; }
.cat.active { color: #fff; font-weight: 600; }
.cat.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.cat.focused { background: var(--accent); color: #fff; }
/* Search, first row of the Live TV / Movies / Series sidebars. */
.cat.cat-search { justify-content: flex-start; }
.cat.cat-search svg { width: 24px; height: 24px; margin: 0 16px 0 0; color: var(--text-2); }
/* With a search text: the row is the text plus a round X that clears it. */
.cat-search-row { display: flex; align-items: center; }
.cat-search-row .cat { flex: 1; min-width: 0; padding-right: 10px; }
.cat-x { flex: none; width: 48px; height: 48px; margin: 0 24px 0 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); color: #fff; }
.cat-x::after { content: none; }
.cat-x svg { width: 22px; height: 22px; stroke-width: 2.6; }
.cat-x.focused, .cat-x:hover { background: var(--accent); }

/* channel rows */
.ch-row { display: flex; align-items: center; width: 100%; height: 96px; padding: 0 44px 0 40px; }
/* Focus moves instantly in lists: no fade on the highlight. */
.ch-row, .cat, .pcard, .pcard .img { transition: none; }
/* Virtual list items: fixed size, isolated layout/paint so moving focus repaints little. */
.vl-item { contain: layout paint; }
.vl-item.grid-card { height: 284px; contain: layout; }
.vl-item.grid-card.grid-big { height: 432px; }
.col.main > .scroll-inner { transition: none; }
.ch-row::after { content: none; }
.ch-row.focused { background: var(--accent); }
.ch-num { width: 68px; flex: none; white-space: nowrap; font-size: 20px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ch-row .logo-badge { margin-right: 22px; }
.ch-main { flex: 1; min-width: 0; }
.ch-name { font-size: 23px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-prog { margin-top: 3px; font-size: 18px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row.focused .ch-num, .ch-row.focused .ch-prog { color: rgba(255, 255, 255, .85); }
.ch-row.is-playing:not(.focused) .ch-name { color: #ffb27d; }
.eq { display: none; flex: none; width: 20px; height: 20px; margin-left: 16px; align-items: flex-end; justify-content: space-between; }
/* Still bars: an endless animation here repainted the page over the playing video several times
   a second, which weak TVs pay for in dropped frames. */
.eq i { display: block; width: 4px; height: 100%; background: currentColor; }
.eq i:nth-child(1) { height: 55%; }
.eq i:nth-child(3) { height: 75%; }
.ch-row.is-playing .eq { display: flex; }
.bar { height: 4px; margin-top: 14px; background: rgba(255, 255, 255, .14); overflow: hidden; }

/* Channel logos are 16:9 everywhere. */
.logo-badge { width: 100px; height: 56px; flex: none; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: #fff; }
.logo-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-badge.lg { width: 176px; height: 99px; border-radius: 12px; font-size: 30px; }
.logo-badge.xl { width: 224px; height: 126px; border-radius: 14px; font-size: 38px; }

/* preview column */
.pv-video { position: relative; width: 660px; height: 371px; flex: none; background: #070709; overflow: hidden; }
.pv-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-body { flex: 1; display: flex; flex-direction: column; padding: 34px 48px 44px; min-height: 0; }
.pv-name { font-size: 34px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-name span { margin-right: 16px; color: var(--text-3); font-weight: 600; }
.pv-title { margin-top: 20px; font-size: 24px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-time { margin-top: 6px; font-size: 19px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pv-next { margin-top: 22px; }
.nx { display: flex; margin-top: 10px; font-size: 19px; color: var(--text-2); }
.nx-t { width: 76px; flex: none; color: var(--text-3); font-variant-numeric: tabular-nums; }
.nx-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-actions { display: flex; margin-top: auto; padding-top: 24px; }
.pv-actions .btn + .btn { margin-left: 14px; }

.v-title { font-size: 34px; font-weight: 700; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin-top: 12px; font-size: 19px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .sep { margin: 0 10px; color: var(--text-3); }
.v-syn { margin-top: 18px; font-size: 20px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 64px; padding: 0 32px; border-radius: 12px; background: rgba(255, 255, 255, .1); font-size: 22px; font-weight: 600; white-space: nowrap; color: #fff; }
.btn::after { content: none; }
.btn svg { width: 24px; height: 24px; margin-right: 12px; }
.btn.primary { background: var(--accent); }
.btn.focused { background: #fff; color: #161618; }
.btn.icon-only { width: 64px; padding: 0; }
.btn.icon-only svg { margin: 0; }
.btn.is-on svg { color: var(--gold); }
.btn.is-dim { opacity: .45; }
.btn.is-on.focused svg { color: #c48a00; }

.empty { padding: 80px 60px; color: var(--text-3); font-size: 22px; }

/* ---------- player layer ---------- */
#video-layer { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); pointer-events: none; }
#video-frame { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); transform-origin: 0 0; overflow: hidden; background: #000; transition: transform .32s cubic-bezier(.2, .8, .2, 1), border-radius .32s; will-change: transform; }
#video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
#video-hud { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: left .32s cubic-bezier(.2, .8, .2, 1), top .32s cubic-bezier(.2, .8, .2, 1), width .32s cubic-bezier(.2, .8, .2, 1), height .32s cubic-bezier(.2, .8, .2, 1); }
#video-frame.no-anim, #video-hud.no-anim { transition: none; }
/* Browser fullscreen video reaches past the stage to the window's edges (player.js). */
html.v-full #stage { overflow: visible; }
html.v-full, html.v-full body { background: #000; }
/* Android: the picture is drawn by the native player behind the transparent page; the
   page backgrounds get a hole where it is (see player.js), fullscreen hides the page. */
html.native-video, html.native-video body, html.native-video #stage { background: transparent; }
html.native-video #video-frame { display: none; }
html.nv-full #bg, html.nv-full #app { visibility: hidden; }
#video-hud .hud-art, #video-hud .spinner, #video-hud .hud-msg { display: none; }
#video-hud.loading .hud-art, #video-hud.loading .spinner { display: block; }
#video-hud.error .hud-msg, #video-hud.error .hud-art { display: block; }
#video-hud.loading .hud-art { position: absolute; opacity: .35; }
.is-preview #video-hud .logo-badge { transform: scale(.7); }
.spinner { width: 64px; height: 64px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .18); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hud-msg { margin-top: 16px; padding: 10px 20px; border-radius: 12px; background: rgba(0, 0, 0, .6); font-size: 20px; font-weight: 600; }

/* live fullscreen info bar */
.losd-wrap { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); transition: opacity .3s; }
.losd-wrap.hide { opacity: 0; }
.losd-clock { position: absolute; top: 52px; right: 80px; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.losd { position: absolute; left: 0; right: 0; bottom: 0; height: 380px; padding: 0 80px 64px; display: flex; align-items: flex-end; background: linear-gradient(0deg, rgba(9, 9, 11, .97) 25%, rgba(9, 9, 11, 0)); }
.losd-main { flex: 1; min-width: 0; margin-left: 34px; }
.losd-head { display: flex; align-items: center; font-size: 40px; font-weight: 800; }
.losd-num { color: var(--text-3); margin-right: 20px; font-variant-numeric: tabular-nums; }
.losd-now { margin-top: 14px; font-size: 28px; font-weight: 600; }
.losd-now span { margin-left: 18px; font-size: 22px; font-weight: 500; color: var(--text-2); }
.losd .bar { max-width: 980px; }
.losd-next { margin-top: 14px; font-size: 21px; color: var(--text-2); }
#numzap { position: absolute; top: 52px; left: 80px; padding: 8px 34px; border-radius: 18px; background: rgba(9, 9, 11, .75); border: 2px solid var(--accent); font-size: 70px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* vod player controls */
.posd { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); transition: opacity .3s; }
.posd.hide { opacity: 0; }
.posd-top { position: absolute; left: 0; right: 0; top: 0; height: 260px; padding: 56px 80px; display: flex; align-items: flex-start; background: linear-gradient(180deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0)); }
.posd-top .back-btn { margin-top: 2px; }
.pt-title { font-size: 42px; font-weight: 800; }
.pt-sub { margin-top: 8px; font-size: 24px; color: var(--text-2); }
.pt-clock { position: absolute; top: 60px; right: 80px; font-size: 30px; font-weight: 700; }
.posd-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 360px; padding: 0 80px 56px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(0deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, 0)); }
.prog { height: 44px; border-radius: 22px; }
.prog::after { content: none; }
.prog .track { position: absolute; left: 0; right: 0; top: 18px; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .22); overflow: hidden; transition: height .15s, top .15s; }
.prog .buf, .prog .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.prog .buf { background: rgba(255, 255, 255, .3); }
.prog .fill { background: var(--accent); }
.prog .knob { position: absolute; top: 10px; left: 0; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: #fff; transition: transform .15s, box-shadow .15s; }
.prog.focused .track { top: 16px; height: 12px; }
.prog.focused .knob { transform: scale(1.35); box-shadow: 0 0 0 7px rgba(var(--accent-rgb), .5); }
.ptimes { display: flex; justify-content: space-between; margin-top: 6px; font-size: 22px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pctrls { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.pc-left, .pc-right { display: flex; align-items: center; }
.pc-left .pbtn:first-child { margin-left: 0; }
.pc-right .pbtn:last-child { margin-right: 0; }
.pbtn { width: 76px; height: 76px; margin: 0 12px; border-radius: 38px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); }
.pbtn svg { width: 34px; height: 34px; }
.pbtn.big { width: 96px; height: 96px; border-radius: 48px; background: #fff; color: #161618; }
.pbtn.big svg { width: 40px; height: 40px; }
.pbtn.wide { width: auto; padding: 0 28px; font-size: 20px; font-weight: 600; }
.pbtn.wide svg { width: 28px; height: 28px; margin-right: 12px; }
.pbtn.focused { transform: scale(1.08); }
.pc-sep { width: 2px; height: 46px; margin: 0 18px; background: rgba(255, 255, 255, .2); }

/* ---------- details pages ---------- */
.page-movie, .page-serie { background: var(--bg); }
.detail-bg { position: absolute; right: 0; top: 0; width: 1340px; height: 760px; }
.detail-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-bg::after { content: ""; position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(14, 14, 16, .85) 30%, rgba(14, 14, 16, .2) 75%), linear-gradient(0deg, var(--bg) 0%, rgba(14, 14, 16, 0) 55%); }
.page-scroll { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); }
.page-scroll > .scroll-inner { padding-bottom: 60px; }
.d-hero { padding: 200px 0 0 60px; width: 1000px; }
.d-title { font-size: 68px; font-weight: 800; line-height: 1.05; letter-spacing: -.5px; }
.d-hero .meta { margin-top: 18px; font-size: 21px; }
.d-syn { margin-top: 22px; max-width: 840px; font-size: 22px; line-height: 1.55; color: var(--text-2); }
.d-actions { display: flex; margin-top: 36px; }
.d-actions .btn + .btn { margin-left: 14px; }
.drow { margin-top: 56px; }
.drow-title { padding-left: 60px; font-size: 24px; font-weight: 600; }
.pad-row { padding: 18px 60px; }
/* Card rows end where the last whole card ends, so the next one never peeks in. */
.drow > .scroller { margin-right: 54px; }
/* Poster row: the focus ring of the last whole poster needs a little more room. */
.drow > .scroller[data-zone="similar"] { margin-right: 40px; }
.srow-block > .scroller { margin-right: 44px; }
.pad-row .grid-card { margin-right: 22px; }
.season-tabs { display: flex; width: -webkit-max-content; width: max-content; padding: 0 60px; }
.phone .season-sc { overflow: visible; }
.season-tab { height: 52px; padding: 0 18px; margin-right: 10px; border-radius: 8px; font-size: 22px; font-weight: 600; color: var(--text-3); }
.season-tab.active { color: #fff; box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.season-tab.focused { background: var(--accent); color: #fff; box-shadow: none; border-radius: 8px; }
.ep { flex: none; width: 340px; margin-right: 22px; }
.ep::after { content: none; }
.ep-img { position: relative; width: 340px; height: 191px; border-radius: 8px; overflow: hidden; background: #212123; }
.ep-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep.focused .ep-img { box-shadow: 0 0 0 4px var(--accent); }
.ep-t { margin-top: 12px; font-size: 19px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-m { margin-top: 4px; font-size: 16px; color: var(--text-3); }

/* ---------- favorites ---------- */
.fav-tabs { position: absolute; left: 60px; top: 128px; display: flex; }
.fav-tab { height: 56px; padding: 0 18px; margin-right: 10px; font-size: 24px; font-weight: 600; color: var(--text-3); border-radius: 8px; }
.fav-tab.active { color: #fff; box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.fav-tab.focused { background: var(--accent); color: #fff; box-shadow: none; border-radius: 8px; }
.fav-tab::after, .season-tab::after { content: none; }
.fav-body { position: absolute; left: 0; right: 0; top: 200px; bottom: 0; }
.fav-body > .scroll-inner { padding: 24px 60px; }
.fgrid { display: grid; grid-template-columns: repeat(10, 160px); grid-gap: 34px 20px; }
.ch-grid { display: grid; grid-template-columns: repeat(7, 216px); grid-gap: 28px 30px; }
.ch-tile { height: 200px; border-radius: 12px; padding: 26px 16px 0; display: flex; flex-direction: column; align-items: center; text-align: center; background: rgba(255, 255, 255, .04); }
.ch-tile::after { content: none; }
.ch-tile.focused { background: var(--accent); }
.cht-n { margin-top: 18px; font-size: 20px; font-weight: 600; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-tile.small { flex: none; width: 190px; height: 180px; margin-right: 20px; padding-top: 22px; }
.ch-tile.small .logo-badge { width: 150px; height: 84px; font-size: 26px; }

/* ---------- search ---------- */
.col.side.osk-col { width: 560px; padding: 40px 60px; }
.qbox { display: flex; align-items: center; height: 70px; border-bottom: 2px solid var(--accent); }
.qbox svg { width: 28px; height: 28px; color: var(--text-3); margin-right: 16px; flex: none; }
.qtext { flex: 1; min-width: 0; font-size: 30px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.qtext .ph { color: var(--text-3); font-weight: 500; margin-left: 6px; }
.caret { display: inline-block; width: 2px; height: 32px; margin-left: 2px; vertical-align: -5px; background: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.osk { display: grid; grid-template-columns: repeat(6, 64px); grid-gap: 10px; margin-top: 34px; justify-content: space-between; }
.key { height: 64px; border-radius: 10px; background: rgba(255, 255, 255, .07); font-size: 24px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.key::after { content: none; }
.key svg { width: 28px; height: 28px; }
.key.wide3 { grid-column: span 3; font-size: 20px; }
.key.wide2 { grid-column: span 2; font-size: 20px; }
.key.focused { background: var(--accent); }
.res-col > .scroll-inner { padding: 30px 0; }
.srow-block + .srow-block { margin-top: 20px; }
.srow-block .drow-title { padding-left: 50px; font-size: 24px; }
.srow-block .row-inner { padding: 18px 50px; }
.srow-block .grid-card { margin-right: 22px; }

/* ---------- settings ---------- */
.set-grid { position: absolute; left: 0; right: 0; top: 126px; bottom: 0; }
.set-inner { display: grid; grid-template-columns: repeat(5, 1fr); grid-gap: 24px; padding: 24px 60px; }
.set-card { height: 170px; padding: 30px 30px 26px; border-radius: 18px; display: flex; flex-direction: column; align-items: flex-start; background: rgba(255, 255, 255, .05); border: 1.5px solid rgba(255, 255, 255, .07); }
.set-card::after { content: none; }
.set-card > svg:first-child { width: 40px; height: 40px; color: var(--accent); filter: brightness(1.3); }
.set-card .sc-l + svg { display: none; }
.sc-l { margin-top: auto; font-size: 23px; font-weight: 700; }
.set-card.focused { background: var(--accent); border-color: var(--accent); }
.set-card.focused > svg:first-child { color: #fff; filter: none; }

/* ---------- parental control ---------- */
.par-body { position: absolute; left: 0; right: 0; top: 200px; bottom: 0; }
.par-body > .scroll-inner { padding: 10px 0 30px; }
.prow { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 84px; padding: 0 60px; border-bottom: 1px solid var(--stroke); }
.prow::after { content: none; }
.prow.focused { background: var(--accent); border-bottom-color: transparent; }
.pl { font-size: 22px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl b { display: inline-block; width: 70px; color: var(--text-3); font-weight: 600; }
.pval { flex: none; margin-left: 30px; font-size: 21px; color: var(--text-2); }
.pval.is-off { color: #fff; font-weight: 700; }
.prow.focused .pval, .prow.focused .pl b { color: #fff; }

/* PIN keypad */
.pin-modal { width: 520px; text-align: center; }
.pin-dots { display: flex; justify-content: center; margin-top: 30px; }
.pin-dots i { width: 22px; height: 22px; margin: 0 12px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 110px); grid-gap: 14px; justify-content: center; margin-top: 34px; }
.pin-pad .key { height: 76px; font-size: 30px; }

/* ---------- account ---------- */
.acc-main { padding: 70px 60px; }
.acc-h { font-size: 44px; font-weight: 800; }
.acc-p { margin: 18px 0 0; max-width: 900px; font-size: 22px; line-height: 1.5; color: var(--text-2); }
.acc-p b { color: #fff; font-weight: 600; }
.acc-dl { margin: 44px 0 0; }
.acc-dl dt { font-size: 19px; color: var(--text-3); margin-top: 26px; }
.acc-dl dd { margin: 6px 0 0; font-size: 26px; font-weight: 600; }
.acc-dl dd.big { font-size: 48px; font-weight: 800; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.acc-main .d-actions { margin-top: 48px; }
.acc-qr { align-items: center; justify-content: center; }
.qr-card { padding: 24px; border-radius: 12px; background: #fff; }
.qr-card img, .qr-card canvas { display: block; }

/* ---------- lock screen (not activated / expired / blocked): only the activation QR code ---------- */
.lock { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); text-align: center; }
.lock .logo { margin-bottom: 32px; font-size: 56px; }
.lock .logo img { height: 96px; width: auto; }
.lock-qr { padding: 22px; background: #fff; border-radius: 12px; }
.lock-qr img, .lock-qr canvas { display: block; }
.lock-t { margin-top: 40px; font-size: 32px; font-weight: 700; max-width: 1200px; }
.lock-s { margin-top: 12px; max-width: 1200px; padding: 0 40px; font-size: 26px; line-height: 1.5; }
.lock-e { margin-top: 12px; font-size: 24px; color: #ff8a80; }
.lock-e:empty { display: none; }
.lock-u { margin-top: 12px; font-size: 24px; color: var(--text-2); }
.lock-id { display: flex; justify-content: center; margin: 28px 0 0; font-variant-numeric: tabular-nums; }
.lock-id div { display: flex; margin-left: 40px; }
.lock-id div:first-child { margin-left: 0; }
.lock-id dt { font-size: 22px; color: var(--text-3); margin: 0 12px 0 0; align-self: center; }
.lock-id dd { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: 2px; }
.lock-code { margin-top: 36px; }
.lock-btns { display: flex; justify-content: center; margin-top: 36px; }
.lock-btns .btn + .btn { margin-left: 20px; }
/* trial: the text on the left, the QR code and the rest on the right */
.lock-two { flex-direction: row; align-items: stretch; justify-content: flex-start; }
.lock-side { display: flex; flex: 1; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 110px 0 130px; text-align: left; }
.lock-side .logo { margin-bottom: 72px; }
.lock-side h1 { margin: 0; font-size: 50px; font-weight: 800; line-height: 1.22; }
.lock-side p { margin: 22px 0 0; font-size: 28px; line-height: 1.5; color: var(--text-2); }
.lock-side h1 + p { margin-top: 40px; }
.lock-side .lock-scan { margin-top: 40px; font-weight: 700; color: var(--text); }
.lock-side .lock-code { margin-top: 48px; }
.lock-main { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: 720px; background: rgba(255, 255, 255, .035); }
.lock-main .lock-t { margin-top: 44px; font-size: 30px; }
.lock-main .lock-u { font-size: 24px; }
.lock-main .lock-id { margin-top: 44px; }
.lock-main .lock-id div { display: block; margin-left: 72px; text-align: left; }
.lock-main .lock-id div:first-child { margin-left: 0; }
.lock-main .lock-id dt { margin: 0 0 6px; font-size: 22px; }
.lock-main .lock-id dd { font-size: 30px; font-weight: 700; letter-spacing: 1px; }

/* ---------- playlists / loading ---------- */
.splash { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); }
.splash .logo { font-size: 80px; }
.splash .spinner { margin-top: 60px; }
.splash-t { margin-top: 28px; font-size: 24px; color: var(--text-2); }
.splash-n { margin-top: 10px; min-height: 30px; font-size: 22px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pl-add .pl { display: flex; align-items: center; font-weight: 700; }
.pl-add svg { width: 28px; height: 28px; margin-right: 16px; color: var(--accent); filter: brightness(1.3); }
.pl-add.focused svg { color: #fff; filter: none; }
.pl-body { top: 112px; border-top: 1px solid var(--stroke); }
.noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 14px; text-align: center; font-size: 18px; font-weight: 700; color: var(--text-2); background: linear-gradient(160deg, #323234, #1a1a1c); }
.logo-badge.has-img { background: rgba(255, 255, 255, .06); }
.d-actions .spinner { width: 48px; height: 48px; }

/* ---------- on-screen keyboard ---------- */
.kb-layer { align-items: flex-end; }
.kb { width: 1400px; margin-bottom: 70px; padding: 40px 48px 44px; border-radius: 26px; background: #1a1a1c; border: 1.5px solid rgba(255, 255, 255, .1); }
.kb.kb-num { width: 560px; }
/* Live search: a lower keyboard on the bottom edge; the top half stays clear for the results. */
/* Docked search keyboard (same design as the Roku app): a solid band across the bottom edge
   with a hairline on top, the list above stays undimmed; the result count sits inside the field. */
.modal-layer.kb-dock { align-items: flex-end; background: none; }
.kb-dock .kb { width: var(--sw); margin: 0; padding: 23px 310px 34px; border: 0; border-top: 1.5px solid rgba(255, 255, 255, .1); border-radius: 0; }
.kb-dock .kb-title { display: none; }
.kb-dock .kb-top { margin-top: 0; }
.kb-dock .kb-field { height: 76px; font-size: 34px; }
.kb-dock .kb-key.kb-paste { height: 76px; }
.kb-dock .kb-field .kb-status { flex: none; height: auto; margin: 0 0 0 auto; padding-left: 24px; font-size: 28px; font-weight: 600; color: var(--accent); }
.kb-dock .kb-keys { margin-top: 14px; }
.kb-dock .kb-key { height: 74px; font-size: 30px; }
.kb-dock .kb-key.fn { font-size: 26px; }
.kb-title { font-size: 26px; font-weight: 700; color: var(--text-2); }
.kb-top { display: flex; margin-top: 16px; }
.kb-top .kb-field { flex: 1; min-width: 0; margin-top: 0; }
.kb-key.kb-paste { flex: none; height: 76px; padding: 0 26px; margin: 0 0 0 12px; font-size: 22px; }
.kb-paste svg { width: 26px; height: 26px; margin-right: 10px; }
.kb-field { display: flex; align-items: center; height: 76px; margin-top: 16px; padding: 0 24px; border-radius: 14px; background: rgba(255, 255, 255, .06); border-bottom: 3px solid var(--accent); font-size: 32px; font-weight: 600; overflow: hidden; white-space: nowrap; }
.kb-field .ph { color: var(--text-3); font-weight: 500; }
.kb-status { height: 30px; margin-top: 12px; font-size: 20px; color: var(--text-3); }
.kb-quick { display: flex; margin-top: 20px; }
.kb-quick .kb-key { flex: 1 1 0; height: 56px; font-size: 20px; margin-right: 10px; }
.kb-quick .kb-key:last-child { margin-right: 0; }
.kb-keys { margin-top: 20px; }
.kb-row { display: flex; margin-top: 10px; }
.kb-key { height: 74px; margin-right: 10px; border-radius: 12px; background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; color: #fff; }
.kb-key:last-child { margin-right: 0; }
.kb-key::after { content: none; }
.kb-key svg { width: 30px; height: 30px; }
.kb-key.fn { background: rgba(255, 255, 255, .14); font-size: 22px; }
.kb-key.ok { background: var(--accent); }
.kb-key.on { background: rgba(var(--accent-rgb), .45); }
.kb-key.focused { background: #fff; color: #161618; }

/* Phones / tablets: the device's keyboard types into a field at the top of the screen. */
input { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
.kb-layer.kb-sys { align-items: flex-start; }
.kb-sys .kb { width: 1100px; margin-top: 60px; }
.kb-input { display: block; width: 100%; height: 84px; margin-top: 18px; padding: 0 26px; border: 0; border-bottom: 3px solid var(--accent); border-radius: 14px; outline: none; background: rgba(255, 255, 255, .08); font-size: 32px; font-weight: 600; }
.kb-input::placeholder, .qinput::placeholder { color: var(--text-3); font-weight: 500; }
.kb-sys .modal-actions { justify-content: flex-end; margin-top: 24px; }
.qinput { flex: 1; min-width: 0; height: 64px; padding: 0; border: 0; outline: none; background: none; font-size: 30px; font-weight: 600; -webkit-appearance: none; }
.qinput::-webkit-search-cancel-button { display: none; }
.osk-col.has-field { padding-top: 40px; }

/* ---------- long-press menu (drawn over the item) ---------- */
.ctx-layer { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); }
.ctx-menu { position: absolute; padding: 8px; border-radius: 16px; background: rgba(25, 25, 27, .98); border: 1.5px solid rgba(255, 255, 255, .14); }
.ctx-item { display: flex; align-items: center; height: 66px; padding: 0 20px; border-radius: 10px; font-size: 22px; font-weight: 600; white-space: nowrap; }
.ctx-item::after { content: none; }
.ctx-item svg { width: 24px; height: 24px; flex: none; margin-right: 16px; color: var(--accent); filter: brightness(1.3); }
.ctx-item span { overflow: hidden; text-overflow: ellipsis; }
.ctx-item.focused { background: var(--accent); }
.ctx-item.focused svg { color: #fff; filter: none; }

/* ---------- side menu panel ---------- */
.panel-layer { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); background: linear-gradient(90deg, rgba(6, 6, 8, 0) 40%, rgba(6, 6, 8, .6)); }
.side-panel { position: absolute; right: 0; top: 0; bottom: 0; width: 640px; background: rgba(23, 23, 25, .97); border-left: 1.5px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; }
.sp-head { flex: none; display: flex; align-items: center; height: 120px; padding: 0 48px; font-size: 30px; font-weight: 700; border-bottom: 1px solid var(--stroke); }
.sp-back { flex: none; width: 64px; height: 64px; margin: 0 12px 0 -16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.sp-back:hover, .sp-back:active { background: rgba(255, 255, 255, .1); color: #fff; }
.sp-back svg { width: 32px; height: 32px; }
.sp-list { flex: 1; min-height: 0; }
.sp-list > .scroll-inner { padding: 12px 0 24px; }
.sp-item { display: flex; align-items: center; height: 76px; padding: 0 44px 0 48px; font-size: 23px; font-weight: 500; }
.sp-item::after { content: none; }
.sp-ic svg { width: 26px; height: 26px; margin-right: 20px; color: var(--accent); filter: brightness(1.3); }
.sp-l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-v { flex: none; margin-left: 20px; font-size: 20px; color: var(--text-2); }
.sp-item > svg { flex: none; width: 24px; height: 24px; margin-left: 14px; color: var(--text-3); }
.sp-item.on { font-weight: 700; }
.sp-item.on > svg { color: var(--accent); filter: brightness(1.3); }
.sp-item.focused { background: var(--accent); }
.sp-item.focused .sp-ic svg, .sp-item.focused > svg, .sp-item.focused .sp-v { color: #fff; filter: none; }
.sp-item.disabled { opacity: .4; }
.sp-div { height: 1px; margin: 10px 48px; background: var(--stroke); }
.sp-empty { padding: 40px 48px; font-size: 21px; color: var(--text-3); }

/* ---------- touch gestures on fullscreen video (gestures.js) ---------- */
.gest-hud { position: absolute; left: 50%; top: 50%; z-index: 3; width: 300px; padding: 28px 30px; margin: -90px 0 0 -150px; border-radius: 20px; background: rgba(11, 11, 13, .82); display: flex; flex-direction: column; align-items: center; pointer-events: none !important; opacity: 0; transition: opacity .25s; }
.gest-hud.on { opacity: 1; }
.gest-hud svg { width: 56px; height: 56px; }
.gest-hud span { margin-top: 12px; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gest-bar { display: block; width: 100%; height: 8px; margin-top: 16px; border-radius: 8px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.gest-bar b { display: block; height: 100%; background: var(--accent); }
.gest-seek { position: absolute; top: 0; bottom: 0; width: 34%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255, 255, 255, .1); pointer-events: none !important; animation: gestSeek .65s ease-out forwards; }
.gest-seek.left { left: 0; border-radius: 0 50% 50% 0 / 0 50% 50% 0; }
.gest-seek.right { right: 0; border-radius: 50% 0 0 50% / 50% 0 0 50%; }
.gest-seek svg { width: 64px; height: 64px; }
.gest-seek span { margin-top: 10px; font-size: 28px; font-weight: 700; }
@keyframes gestSeek { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- subtitles ---------- */
#subs { position: absolute; left: 160px; right: 160px; bottom: 120px; text-align: center; pointer-events: none; display: none; }
#video-layer.is-full #subs { display: block; }
#subs span { display: inline-block; padding: 6px 18px; border-radius: 8px; line-height: 1.3; font-weight: 600; }
.osd-on #subs { bottom: 340px; }
#subs[data-pos="top"] { top: 90px; bottom: auto; }
.osd-on #subs[data-pos="top"] { top: 230px; }
#subs[data-size="small"] span { font-size: 34px; }
#subs[data-size="medium"] span { font-size: 44px; }
#subs[data-size="large"] span { font-size: 56px; }
#subs[data-size="xlarge"] span { font-size: 70px; }
#subs[data-color="white"] span { color: #fff; }
#subs[data-color="yellow"] span { color: #ffe14d; }
#subs[data-color="cyan"] span { color: #6ef0ff; }
#subs[data-color="green"] span { color: #7dff8a; }
#subs[data-bg="none"] span { background: transparent; text-shadow: 0 0 6px #000, 0 2px 3px #000; }
#subs[data-bg="semi"] span { background: rgba(0, 0, 0, .55); }
#subs[data-bg="black"] span { background: #000; }

/* ---------- dialogs & toast ---------- */
.modal-layer { position: absolute; left: 0; top: 0; width: var(--sw); height: var(--sh); background: rgba(6, 6, 8, .74); display: flex; align-items: center; justify-content: center; }
.modal { max-height: 960px; overflow: hidden; width: 820px; padding: 48px 52px; border-radius: 26px; background: #1d1d1f; border: 1.5px solid rgba(255, 255, 255, .1); }
.modal-title { font-size: 34px; font-weight: 700; }
.modal-text { margin-top: 14px; max-height: 540px; overflow: hidden; font-size: 21px; line-height: 1.6; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; }
/* Buttons wrap to a second line when they do not fit (no flex gap on old TVs: margins). */
.modal-actions { display: flex; flex-wrap: wrap; margin: 36px -16px -16px 0; }
.modal-actions .btn { margin: 0 16px 16px 0; }
.chooser { width: 640px; }
.opts-sc { max-height: 620px; margin-top: 22px; }
.opts { padding: 6px 6px 8px; }
.opt { display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 24px; margin-top: 10px; border-radius: 14px; background: rgba(255, 255, 255, .05); font-size: 22px; font-weight: 500; }
.opt svg { width: 26px; height: 26px; color: var(--accent); filter: brightness(1.3); }
.opt.on { font-weight: 700; }
.opt.focused { background: rgba(var(--accent-rgb), .28); }
#toast .t { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); padding: 18px 34px; border-radius: 40px; background: rgba(29, 29, 31, .96); border: 1.5px solid rgba(var(--accent-rgb), .55); font-size: 22px; font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity .25s; }
#toast .t.show { opacity: 1; }


/* =====================================================================================
   Phones held upright (html.phone, see ui.js): 720 px wide, as tall as the screen
   (1 px here is about 0.57 dp, so text is set larger than on TV). Drawn under the
   transparent status / navigation bars: --sat / --sab are their heights. A flat app bar
   on top, a tab bar at the bottom (#tabbar, main sections only), one column in between.
   Fullscreen video turns the phone to landscape, which uses the TV layout above.
   ===================================================================================== */
.phone { --bar: 116px; --top: calc(var(--bar) + var(--sat)); --pb: var(--sab); }
.phone.tabs-on { --pb: calc(124px + var(--sab)); }
.phone .page { height: auto; bottom: var(--pb); }
.phone body, .phone #bg { background: #121214; }

/* app bar */
.phone .topbar { height: var(--top); padding: var(--sat) 10px 0 6px; background: #1b1b1d; border-bottom: 1px solid var(--stroke); }
.phone .topbar .logo, .phone .tb-time, .phone .tb-wifi, .phone .tb-date, .phone .tb-div { display: none; }
.phone .tb-left { min-width: 0; flex: 1; }
.phone .back-btn { width: 88px; height: 88px; margin: 0 4px 0 0; background: none; }
.phone .back-btn svg { width: 38px; height: 38px; }
.phone .tb-title { margin: 0; padding: 0; border: 0; font-size: 36px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone .bar-btn { width: 88px; height: 88px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.phone .bar-btn::after { content: none; }
.phone .bar-btn svg { width: 40px; height: 40px; }
/* Home: logo and the search / settings / account buttons */
.phone .topbar.home { height: var(--top); padding: var(--sat) 10px 0 30px; }
.phone .topbar.home .logo { display: block; font-size: 48px; }
.phone .cbtn { width: 88px; height: 88px; margin-left: 2px; background: none; border: 0; }
.phone .cbtn svg { width: 40px; height: 40px; }
.phone .cbtn.focused { transform: none; background: rgba(var(--accent-rgb), .3); }

/* bottom tab bar */
#tabbar { display: none; }
.phone.tabs-on #tabbar { display: flex; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: var(--pb); padding-bottom: var(--sab); background: #1b1b1d; border-top: 1px solid var(--stroke); }
.tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-size: 20px; font-weight: 600; }
.tab svg { width: 56px; height: 56px; margin-bottom: 6px; }
.tab span { color: var(--text-2); }
.tab.on { background: rgba(var(--accent-rgb), .14); }
.tab.on::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 4px; background: var(--accent); }
.tab.on span { color: #fff; font-weight: 700; }
html.nv-full #tabbar { visibility: hidden; }

/* touch: no focus highlight until a remote / keyboard is used (nav.js) */
.touch-ui .pcard .img, .touch-ui .tile { transition: none; }

/* home: no tiles (the tab bar has the sections), rows of posters */
/* (.scroller makes it position: relative, so it needs a real height to scroll inside) */
.phone .home-page { top: var(--top); height: calc(var(--sh) - var(--pb) - var(--top)); }
.phone .home-tiles { display: none; }
.phone .home-head { height: 8px; }
.phone .hrow { width: 720px; margin-left: 0; }
.phone .hrow-title { height: 74px; padding: 24px 0 0 28px; font-size: 32px; font-weight: 700; }
.phone .hrow-sc { height: 432px; }
.phone .hrow.wide .hrow-sc { height: 300px; }
.phone .pcard.home-card { width: 210px; margin-right: 30px; }
.phone .pcard.home-card .img { width: 210px; height: 315px; border-radius: 12px; }
.phone .pcard.home-card.wide-card { width: 330px; }
.phone .pcard.home-card.wide-card .img { width: 330px; height: 186px; }
.phone .pcard .cap { margin-top: 14px; padding: 0 2px; font-size: 24px; color: var(--text); }
.phone .pcard .cap-sub { margin-top: 4px; padding: 0 2px; font-size: 21px; }
.phone .pcard.focused .img { transform: none; }
.phone .ch-card-logo { bottom: 70px; }
.phone .ch-card .logo-badge.lg { width: 128px; height: 72px; font-size: 26px; }
.phone .ch-card-now { padding: 0 16px 14px; }
.phone .ch-card-prog { font-size: 21px; }
.phone .ch-card-time { font-size: 18px; }
.phone .ch-card-now .bar { margin-top: 8px; }
.phone .ch-card-num { margin-right: 8px; }

/* inner pages: one column under the app bar */
.phone .cols { top: var(--top); flex-direction: column; border-top: 0; }
.phone .col { height: auto; }
.phone .col.main { flex: 1; min-height: 0; }
.phone .col.side { display: none; }
.phone .col.pv { order: -2; flex: none; width: 720px; border-left: 0; background: #0d0d0f; }
.phone .cat-bar { order: -1; flex: none; display: flex; align-items: center; height: 104px; padding: 0 12px 0 0; border-bottom: 1px solid var(--stroke); }
.phone .cat-pick { flex: 1; min-width: 0; height: 104px; padding: 0 28px; display: flex; align-items: center; font-size: 28px; font-weight: 600; color: #fff; }
.phone .cat-pick::after { content: none; }
.phone .cat-pick span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone .cat-pick svg { flex: none; width: 34px; height: 34px; color: var(--text-2); }
.phone .cat-pick svg:first-child { margin-right: 16px; }
.phone .cat-pick.focused { background: rgba(var(--accent-rgb), .3); }
.phone .cat-bar .cat-x { width: 64px; height: 64px; margin: 0 8px 0 4px; }
.phone .cat-bar .cat-x svg { width: 30px; height: 30px; }

/* live TV: picture, what is on and the buttons, the category row, the channels */
.phone .pv-video { width: 720px; height: 405px; }
/* fixed height: the channel list under it keeps the same size whatever the guide shows */
.phone .pv-body { flex: none; height: 282px; padding: 22px 28px 24px; overflow: hidden; }
.phone .pv-name { font-size: 32px; }
.phone .pv-name span { margin-right: 14px; }
.phone .pv-title { margin-top: 10px; font-size: 25px; color: var(--text-2); font-weight: 500; }
.phone .pv-time { margin-top: 4px; font-size: 22px; color: var(--text-3); }
.phone .pv-body .bar { margin-top: 14px; height: 5px; }
.phone .pv-next { display: none; }
.phone .pv-actions { margin-top: auto; padding-top: 18px; }
.phone .pv-actions .btn { height: 76px; padding: 0 32px; border-radius: 14px; font-size: 25px; }
.phone .pv-actions .btn svg { width: 30px; height: 30px; }
.phone .pv-actions .btn + .btn { margin-left: 14px; }
.phone .pv-actions .btn.icon-only { width: 76px; padding: 0; }
.phone .pv-actions .btn.focused { background: var(--accent); color: #fff; }
.phone .ch-row { height: 112px; padding: 0 28px 0 20px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.phone .ch-num { width: 76px; font-size: 22px; }
.ch-num.long { font-size: 15px; }
.phone .ch-num.long { font-size: 17px; }
.phone .ch-row .logo-badge { width: 120px; height: 68px; margin-right: 22px; font-size: 22px; }
.phone .ch-name { font-size: 27px; }
.phone .ch-prog { margin-top: 4px; font-size: 22px; }
.phone .ch-row.is-playing { background: rgba(var(--accent-rgb), .16); }
.phone .ch-row.is-playing .ch-name { color: #fff; }
.phone .eq { width: 26px; height: 26px; }

/* movies / series: 3 posters across (VList in browse.js) */
.phone .grid-card { width: 216px; }
.phone .grid-card .img { width: 216px; height: 324px; border-radius: 12px; }
.phone .grid-card .cap { margin-top: 14px; padding: 0 2px; font-size: 23px; }
.phone .vl-item.grid-card { height: 386px; }
.phone .empty { padding: 60px 32px; font-size: 26px; }

/* details: picture on top, then title, play, text, rows */
.phone .page-scroll { height: 100%; }
.phone .page-movie .topbar, .phone .page-serie .topbar { background: linear-gradient(180deg, rgba(11, 11, 13, .7), rgba(11, 11, 13, 0)); border: 0; }
.phone .page-movie .tb-title, .phone .page-serie .tb-title { display: none; }
.phone .detail-bg { left: 0; width: 720px; height: calc(430px + var(--sat)); }
.phone .detail-bg::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(14, 14, 16, .4) 45%, rgba(14, 14, 16, 0) 100%); }
.phone .d-hero { width: 720px; padding: calc(300px + var(--sat)) 28px 0; }
.phone .d-title { font-size: 50px; line-height: 1.1; }
.phone .d-hero .meta { margin-top: 14px; font-size: 23px; white-space: normal; }
.phone .d-syn { max-width: none; margin-top: 20px; font-size: 25px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.phone .d-actions { flex-wrap: wrap; margin-top: 28px; }
.phone .d-actions .btn { height: 84px; padding: 0 30px; margin: 0 14px 14px 0; border-radius: 14px; font-size: 26px; }
.phone .d-actions .btn + .btn { margin-left: 0; }
.phone .d-actions .btn svg { width: 30px; height: 30px; }
.phone .d-actions .js-play { flex: 1 1 100%; margin-right: 0; }
.phone .d-actions .btn.icon-only { width: 84px; padding: 0; }
.phone .d-actions .btn.focused { background: var(--accent); color: #fff; }
.phone .d-actions .btn.primary.focused { background: #fff; color: #161618; }
.phone .drow { margin-top: 36px; }
.phone .drow-title { padding-left: 28px; font-size: 30px; font-weight: 700; }
.phone .pad-row { padding: 18px 28px; }
.phone .drow > .scroller, .phone .drow > .scroller[data-zone="similar"], .phone .srow-block > .scroller { margin-right: 0; }
.phone .pad-row .grid-card { width: 200px; margin-right: 22px; }
.phone .pad-row .grid-card .img { width: 200px; height: 300px; }
.phone .season-tabs { width: auto; padding: 0 16px; overflow: hidden; flex-wrap: wrap; border-bottom: 1px solid var(--stroke); }
.phone .season-tab { height: 80px; padding: 0 14px; font-size: 26px; }
.phone .ep { width: 300px; }
.phone .ep-img { width: 300px; height: 169px; border-radius: 12px; }
.phone .ep-t { font-size: 23px; }
.phone .ep-m { font-size: 20px; }

/* search: query and keys, results below */
.phone .col.side.osk-col { display: block; order: 0; width: 720px; height: auto; padding: 22px 28px 24px; background: #141416; border-right: 0; border-bottom: 1px solid var(--stroke); }
.phone .qbox { height: 84px; }
.phone .qbox svg { width: 34px; height: 34px; }
.phone .qtext { font-size: 34px; }
.phone .osk { grid-template-columns: repeat(6, 1fr); grid-gap: 10px; margin-top: 22px; }
.phone .key { height: 80px; font-size: 30px; border-radius: 12px; }
.phone .key.wide3, .phone .key.wide2 { font-size: 24px; }
.phone .res-col > .scroll-inner { padding: 22px 0; }
.phone .srow-block .drow-title { padding-left: 28px; }
.phone .srow-block .row-inner { padding: 18px 28px; }
.phone .srow-block .grid-card { width: 200px; }
.phone .srow-block .grid-card .img { width: 200px; height: 300px; }
.phone .cht-n { font-size: 22px; }

/* favorites, parental control: tabs along the top, then the list / grid */
.phone .fav-tabs { left: 0; right: 0; top: var(--top); height: 96px; padding: 0 12px; border-bottom: 1px solid var(--stroke); overflow: hidden; }
.phone .fav-tab { height: 96px; padding: 0 20px; margin-right: 4px; font-size: 27px; }
.phone .fav-tab.active { box-shadow: inset 0 -5px 0 var(--accent); }
.phone .fav-body, .phone .par-body { top: calc(var(--top) + 96px); bottom: 0; }
.phone .fav-body > .scroll-inner { padding: 26px 20px; }
.phone .fgrid { grid-template-columns: repeat(3, 216px); grid-gap: 34px 16px; }
.phone .fgrid .grid-card { width: 216px; }
.phone .ch-grid { grid-template-columns: repeat(3, 1fr); grid-gap: 16px; }
.phone .ch-tile { height: 210px; }

/* lists: sources (playlists), parental rows */
.phone .pl-body { top: var(--top); border-top: 0; }
.phone .prow { height: 112px; padding: 0 28px; }
.phone .pl { font-size: 27px; }
.phone .pl b { width: 76px; }
.phone .pval { font-size: 23px; }
.phone .pl-add svg { width: 34px; height: 34px; }

/* settings: one list */
.phone .set-grid { left: 0; right: 0; top: var(--top); bottom: 0; }
.phone .set-inner { display: block; padding: 6px 0 20px; }
.phone .set-card { flex-direction: row; align-items: center; width: 100%; height: 112px; padding: 0 28px 0 32px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .06); border-radius: 0; background: none; }
.phone .set-card > svg:first-child { width: 38px; height: 38px; margin-right: 30px; }
.phone .sc-l { flex: 1; margin: 0; font-size: 28px; font-weight: 500; }
.phone .set-card .sc-l + svg { display: block; width: 32px; height: 32px; color: var(--text-3); filter: none; }

/* account: text, then the QR code */
.phone .acc-main { flex: none; padding: 40px 32px 10px; }
.phone .acc-h { font-size: 42px; }
.phone .acc-p { font-size: 25px; }
.phone .acc-dl { margin-top: 26px; }
.phone .acc-dl dt { font-size: 22px; }
.phone .acc-dl dd { font-size: 30px; }
.phone .acc-dl dd.big { font-size: 48px; }
.phone .acc-main .d-actions { margin-top: 30px; }
.phone .acc-main .btn { height: 84px; font-size: 26px; }
.phone .col.pv.acc-qr { order: 0; flex: 1; min-height: 0; background: none; }

/* dialogs, option lists and the keyboard come up from the bottom */
.phone .modal-layer { align-items: flex-end; }
.phone .modal { width: 720px; max-height: calc(var(--sh) - var(--top)); padding: 40px 32px calc(36px + var(--sab)); border: 0; border-radius: 30px 30px 0 0; }
.phone .modal-title { font-size: 34px; }
.phone .modal-text { max-height: none; font-size: 25px; }
.phone .modal-actions { margin-top: 32px; }
.phone .modal-actions .btn { flex: 1 1 40%; height: 88px; font-size: 27px; }
.phone .chooser { width: 720px; padding-left: 0; padding-right: 0; }
.phone .chooser .modal-title { padding: 0 32px; }
.phone .opts-sc { max-height: calc(var(--sh) * .62); margin-top: 18px; }
.phone .opts { padding: 0; }
.phone .opt { height: 100px; padding: 0 32px; margin: 0; border-radius: 0; background: none; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 28px; }
.phone .opt svg { width: 34px; height: 34px; }
.phone .opt.on { color: #fff; background: rgba(var(--accent-rgb), .16); }
.phone .pin-modal { width: 720px; }
.phone .pin-pad { grid-template-columns: repeat(3, 1fr); }
.phone .pin-pad .key { height: 96px; font-size: 34px; }
.phone .kb { width: 720px; margin-bottom: 0; padding: 30px 12px calc(28px + var(--sab)); border: 0; border-radius: 30px 30px 0 0; }
.phone .kb.kb-num { width: 720px; }
.phone .kb-title { padding: 0 8px; font-size: 28px; }
.phone .kb-top .kb-field, .phone .kb-field { height: 88px; font-size: 32px; }
.phone .kb-key { height: 92px; margin-right: 6px; font-size: 30px; }
.phone .kb-key.fn { font-size: 22px; }
.phone .kb-key.kb-paste { height: 88px; padding: 0 22px; font-size: 22px; }
.phone .kb-quick .kb-key { height: 72px; font-size: 18px; margin-right: 6px; }
.phone .kb-row { margin-top: 8px; }
.phone .kb-status { font-size: 23px; }
.phone .kb-layer.kb-sys { align-items: flex-start; }
.phone .kb-sys .kb { width: 720px; margin-top: 0; padding: calc(var(--sat) + 28px) 28px 30px; border-radius: 0 0 30px 30px; }
.phone .kb-input { height: 92px; font-size: 32px; }
.phone .kb-sys .modal-actions .btn { flex: none; min-width: 200px; height: 84px; }
.phone .qinput { height: 84px; font-size: 34px; }
.phone .osk-col.has-field { padding: 14px 28px 14px; }
.phone .side-panel { width: 720px; border-left: 0; padding-top: var(--sat); }
.phone .sp-head { padding: 0 32px; }
.phone .sp-item { height: 100px; padding: 0 32px; font-size: 27px; }
/* the long-press menu comes up from the bottom too (its position is set inline for TV) */
.phone .ctx-layer { background: rgba(6, 6, 8, .6); }
.phone .ctx-menu { left: 0 !important; top: auto !important; bottom: 0; width: 720px !important; padding: 16px 0 calc(16px + var(--sab)); border: 0; border-radius: 30px 30px 0 0; }
.phone .ctx-item { height: 100px; padding: 0 36px; border-radius: 0; font-size: 28px; }
.phone .ctx-item svg { width: 32px; height: 32px; margin-right: 24px; }
.phone #toast .t { width: -webkit-max-content; width: max-content; max-width: 660px; bottom: calc(var(--pb) + 40px); white-space: normal; text-align: center; font-size: 25px; }
.phone .splash .logo { font-size: 72px; }
.phone .splash-t { font-size: 26px; }

/* lock screen on phones held upright: ID and key under each other */
.phone .lock-id { flex-direction: column; }
.phone .lock-id div, .phone .lock-id div:first-child { display: block; margin: 18px 0 0; }
.phone .lock-id dt { margin: 0 0 4px; }
.phone .lock-t { max-width: 620px; font-size: 30px; }
.phone .lock-two { display: block; overflow-y: auto; }
.phone .lock-side { padding: 72px 50px 56px; }
.phone .lock-side .logo { margin-bottom: 48px; }
.phone .lock-side h1 { font-size: 40px; }
.phone .lock-side p { font-size: 27px; }
.phone .lock-main { width: auto; padding: 56px 50px 72px; }

/* ---------- TV engines without CSS grid (Samsung Tizen 4.0 = Chrome 56) ----------
   The same layouts with wrapping flex rows: fixed widths, margins instead of the gaps. */
@supports not (display: grid) {
  .fgrid, .ch-grid, .osk, .set-inner, .pin-pad { display: flex; flex-wrap: wrap; }
  .fgrid > * { flex: none; margin: 0 20px 34px 0; }
  .fgrid > :nth-child(10n) { margin-right: 0; }
  .ch-grid > * { flex: none; width: 216px; margin: 0 30px 28px 0; }
  .ch-grid > :nth-child(7n) { margin-right: 0; }
  .set-inner > * { flex: none; width: calc((100% - 96px) / 5); margin: 0 24px 24px 0; }
  .set-inner > :nth-child(5n) { margin-right: 0; }
  /* keyboard: 6 columns of 64 px spread over the row, wide keys span 2 or 3 of them */
  .osk .key { flex: none; width: 64px; margin-bottom: 10px; }
  .osk .key.wide2 { width: calc(128px + (100% - 384px) / 5); }
  .osk .key.wide3 { width: calc(192px + (100% - 384px) / 5 * 2); }
  .pin-pad { width: 358px; margin-left: auto; margin-right: auto; }
  .pin-pad .key { flex: none; width: 110px; margin: 0 14px 14px 0; }
  .pin-pad .key:nth-child(3n) { margin-right: 0; }
}

/* TV web builds (webcat.js): the loading screen is only "Loading…" and the percentage. */
html.webcat .splash .logo, html.webcat .splash .spinner { display: none; }
html.webcat .splash-t { margin-top: 0; }

/* Native video fullscreen (Android ExoPlayer, Samsung AVPlay): the page under the picture is
   hidden; older engines keep running its animations, repainting over the video. Paused. */
html.nv-full #app *, html.nv-full #bg *, html.nv-full #tabbar * { -webkit-animation-play-state: paused !important; animation-play-state: paused !important; }

/* the focused poster's name moving sideways (nav.js marquee) */
.pcard .cap.mq-on { text-overflow: clip; }
.pcard .cap .mq { display: inline-block; white-space: nowrap; }
