/* tvmool TV app. Fixed 1920x1080 canvas (Tizen); scaled to fit in desktop browsers.
   Chrome 76 rules: no flex `gap`, no `inset`, no `aspect-ratio`. */
:root {
  --bg: #0e0f13;
  --bg-2: #171920;
  --panel: rgba(23, 25, 32, 0.92);
  --text: #f2f3f5;
  --muted: #9aa0ad;
  --accent: #22b5c8;      /* tvmool teal (the logo's colour, brightened for focus) */
  --accent-2: #8ee3ec;
  --accent-rgb: 34, 181, 200;
  --focus: #ffffff;
  --danger: #e5484d;
  --card-w: 360px;
  --card-h: 203px;
  --rail-w: 104px;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; background: var(--bg); overflow: hidden; }
body { font: 26px/1.35 "Samsung One", "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); }
#root { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden; z-index: 2; }
/* AVPlay draws the picture on a hardware plane BELOW the browser layer: during playback every
   layer above it must be transparent, or the screen stays black while audio plays.
   The <object> must never be opaque or hidden (some firmware fails to initialise AVPlay then);
   setDisplayRect decides where the video appears, so it stays 1x1 and invisible.
   (Learned from Sky IPTV, MIT, sanwhere.) */
html.playing, html.playing body, html.playing #root { background: transparent !important; }
#av-player { position: absolute; left: 0; top: 0; width: 1px; height: 1px; background: transparent; opacity: 0; z-index: 0; }
/* Desktop browsers only: <video> fallback. */
#av-fallback { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; background: #000; display: none; z-index: 0; }
html.fallback.playing #av-fallback { display: block; }
/* Desktop/web: the UI canvas is scaled to the window, the video is not part of it. It fills the real
   window and keeps its aspect ratio (letterbox), so nothing is cropped at any window size. */
html.fallback #av-fallback { width: 100vw; height: 100vh; object-fit: contain; }
html.playing .app-shell { display: none; }

/* ---------- shell + left rail ---------- */
.app-shell { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.rail { position: absolute; left: 0; top: 0; bottom: 0; width: var(--rail-w); z-index: 5; padding-top: 40px;
  background: linear-gradient(90deg, rgba(14,15,19,0.96) 0%, rgba(14,15,19,0.8) 70%, rgba(14,15,19,0) 100%);
  transition: width .18s ease-out; }
.rail.open { width: 340px; background: linear-gradient(90deg, rgba(14,15,19,0.99) 0%, rgba(14,15,19,0.95) 70%, rgba(14,15,19,0) 100%); }
.rail .item { display: flex; align-items: center; height: 72px; padding-left: 25px; color: var(--muted); white-space: nowrap; overflow: hidden; border-left: 5px solid transparent; }
.rail .item .ico { width: 44px; height: 44px; flex: 0 0 44px; margin-right: 26px; }
.rail .item .lbl { opacity: 0; transition: opacity .15s; font-size: 30px; }
.rail.open .item .lbl { opacity: 1; }
.rail .item.current { color: var(--text); }
.rail .item.current .ico { color: var(--accent); }
.rail .item.profile { margin-bottom: 14px; }
.rail .item .face { width: 44px; height: 44px; flex: 0 0 44px; margin-right: 26px; border-radius: 8px; background: center/cover no-repeat; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 26px; color: #111; }
.rail .item.profile .lbl { display: flex; flex-direction: column; line-height: 1.15; }
.rail .item.profile .lbl small { font-size: 20px; font-weight: 400; color: var(--muted); }
.rail .item.profile.focused .face { box-shadow: 0 0 0 3px var(--focus); }
.rail.open .item.focused { color: var(--focus); border-left-color: var(--accent); font-weight: 700; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.content { position: absolute; left: var(--rail-w); top: 0; right: 0; bottom: 0; overflow: hidden; }
.content.dim { opacity: .45; }

/* ---------- billboard ---------- */
.billboard { position: absolute; left: calc(-1 * var(--rail-w)); right: 0; top: 0; height: 760px; background: #000 center/cover no-repeat; transition: height .25s, opacity .25s; }
.billboard::after { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(14,15,19,0.95) 0%, rgba(14,15,19,0.6) 38%, rgba(14,15,19,0) 70%),
              linear-gradient(0deg, var(--bg) 0%, rgba(14,15,19,0) 40%); }
.billboard.small { height: 430px; opacity: .55; }
.billboard .info { position: absolute; left: 190px; top: 210px; width: 820px; z-index: 1; }
.billboard h1 { font-size: 78px; line-height: 1.05; margin: 0 0 18px; letter-spacing: -1px; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.billboard .meta { color: var(--accent-2); font-weight: 600; margin-bottom: 18px; }
.billboard p { margin: 0 0 34px; color: #d7d9de; max-height: 140px; overflow: hidden; }
.billboard.small .info p, .billboard.small .info .buttons { display: none; }

.buttons { display: flex; }
.btn { display: inline-flex; align-items: center; height: 72px; padding: 0 40px; margin-right: 22px; border-radius: 8px; font-weight: 700; font-size: 30px;
  background: rgba(109, 109, 110, 0.55); color: var(--text); border: 3px solid transparent; white-space: nowrap; }
.btn .ico { width: 36px; height: 36px; margin-right: 16px; }
.btn.primary { background: var(--text); color: #111; }
.btn.compact { padding: 0 18px; }
.btn.compact .ico { margin-right: 0; }
.btn.compact .lbl { display: none; }
.btn.compact.focused .lbl, html.pointer .btn.compact:hover .lbl { display: inline; margin-left: 14px; }
.btn.focused { background: var(--accent); color: #111; border-color: var(--focus); transform: scale(1.05); }

/* ---------- rows of cards ---------- */
.rows { position: absolute; left: 0; right: 0; top: 0; transition: transform .25s ease-out; }
.row { height: 330px; position: relative; }
.row h2 { margin: 0 0 14px 70px; font-size: 32px; font-weight: 700; }
.row .track { position: absolute; left: 70px; top: 60px; white-space: nowrap; transition: transform .2s ease-out; }
.card { display: inline-block; vertical-align: top; position: relative; width: var(--card-w); height: var(--card-h); margin-right: 18px; border-radius: 8px; overflow: hidden;
  background: var(--bg-2) center/cover no-repeat; transition: transform .15s ease-out, box-shadow .15s; }
.card .ttl { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 18px 14px; font-size: 26px; font-weight: 700; white-space: normal;
  background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 100%); line-height: 1.15; }
.card.poster-only { background: linear-gradient(135deg, #232733 0%, #171920 100%); }
.card.poster-only .pimg { position: absolute; left: 0; top: 0; bottom: 0; width: 135px; background: #111 center/cover no-repeat; box-shadow: 6px 0 18px rgba(0,0,0,.45); }
.card.poster-only .ttl { left: 135px; top: 0; padding: 18px 18px 14px 22px; background: none; display: flex; flex-direction: column; justify-content: flex-end; }
.card.poster-only .yr { font-size: 22px; font-weight: 500; color: var(--muted); margin-top: 4px; }
.card.poster-only .badge { right: 12px; }
.pcard { display: inline-block; vertical-align: top; width: 220px; margin: 0 22px 30px 0; transition: transform .15s ease-out; }
.pcard .art { position: relative; width: 220px; height: 330px; border-radius: 8px; background: var(--bg-2) center/cover no-repeat; overflow: hidden; border: 4px solid transparent; }
.pcard .art.none { display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; font-weight: 700; font-size: 26px; color: var(--muted);
  background: linear-gradient(160deg, #262a36 0%, #171920 100%); }
.pcard .art .badge { position: absolute; top: 8px; right: 8px; padding: 1px 8px; border-radius: 6px; background: rgba(0,0,0,.72); font-size: 19px; font-weight: 700; color: var(--accent-2); }
.pcard .cap { height: 40px; margin-top: 8px; font-size: 22px; font-weight: 600; color: #c9ccd3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .cap small { color: var(--muted); font-weight: 400; font-size: 20px; }
.pcard.focused { transform: scale(1.07); position: relative; z-index: 2; }
.pcard.focused .art { border-color: var(--focus); box-shadow: 0 14px 40px rgba(0,0,0,.7); }
.pcard.focused .cap { color: var(--text); }
.card .badge { position: absolute; top: 12px; right: 12px; padding: 2px 10px; border-radius: 6px; background: rgba(0,0,0,.7); font-size: 20px; font-weight: 700; color: var(--accent-2); }
.card.focused { transform: scale(1.12); box-shadow: 0 0 0 4px var(--focus), 0 14px 40px rgba(0,0,0,.7); z-index: 2; }
.row .track .card:first-child.focused { transform-origin: left center; }

/* grid (Movies / Series / Search results) */
.page-head { position: absolute; left: 54px; top: 46px; right: 50px; height: 80px; display: flex; align-items: center; z-index: 2; }
.page-head h1 { font-size: 52px; margin: 0 40px 0 0; }
.chip { display: inline-flex; align-items: center; height: 58px; padding: 0 26px; margin-right: 16px; border-radius: 29px; background: rgba(255,255,255,.08); color: var(--muted); font-weight: 600; white-space: nowrap; border: 3px solid transparent; }
.page-head .chip.push-right { margin-left: auto; }
/* Pages whose rows scroll up under the head (Library): the head gets the page background. */
.page-head.solid::before { content: ''; position: absolute; left: -60px; right: -60px; top: -46px; height: 160px; background: linear-gradient(var(--bg) 78%, rgba(14,15,19,0)); z-index: -1; }
/* Search within a section: a chip on the TV, a text field on desktop/web. */
.chip svg { width: 30px; height: 30px; }
.chip.search-chip { padding: 0 20px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.chip.search-chip > * + * { margin-left: 8px; }
.chip.search-field { padding: 0 18px; cursor: text; }
.chip.search-field > * + * { margin-left: 10px; }
.chip.search-field input { width: 230px; background: transparent; border: 0; outline: none; color: var(--text); font: inherit; }
.chip.search-field input::placeholder { color: var(--muted); }
.chip.search-field .clear { cursor: pointer; color: var(--muted); font-size: 24px; }
.chip.search-field:focus-within { border-color: var(--focus); background: rgba(255,255,255,.14); }
.menu.search-panel { width: 760px; padding: 60px 40px; }
.menu.search-panel .keyboard { position: static; width: 680px; }
.page-head .chip:last-child { margin-right: 0; }
.chip.on { background: rgba(var(--accent-rgb), .2); color: var(--accent-2); }
.chip.focused { border-color: var(--focus); color: var(--text); background: rgba(255,255,255,.18); }
.grid { position: absolute; left: 34px; right: 20px; top: 150px; bottom: 0; overflow: hidden; }
/* Room for the focused card's zoom, so it is not cut at the grid's edge. */
.grid .inner { padding: 22px 0 0 20px; transition: transform .2s ease-out; }
.grid .card { margin: 0 22px 30px 0; }
.empty { position: absolute; left: 70px; top: 230px; color: var(--muted); font-size: 32px; }

/* ---------- live TV ---------- */
.live { position: absolute; left: 0; top: 0; right: 0; bottom: 0; }
.live .cats { position: absolute; left: 50px; top: 150px; width: 330px; bottom: 40px; overflow: hidden; }
.live .cats .inner, .live .chans .inner { transition: transform .18s ease-out; }
.live .cat { height: 64px; padding: 0 22px; display: flex; align-items: center; border-radius: 8px; color: var(--muted); font-size: 28px; white-space: nowrap; overflow: hidden; border: 3px solid transparent; }
.live .cat.on { color: var(--accent-2); background: rgba(var(--accent-rgb), .14); }
.live .cat.focused { border-color: var(--focus); color: var(--text); }
.live .chans { position: absolute; left: 410px; top: 150px; right: 60px; bottom: 40px; overflow: hidden; }
.live .chan { height: 116px; margin-bottom: 12px; display: flex; align-items: center; border-radius: 10px; background: rgba(255,255,255,.04); border: 3px solid transparent; padding-right: 24px; }
.live .chan.focused { border-color: var(--focus); background: rgba(255,255,255,.12); }
.live .chan .logo { width: 176px; height: 100px; flex: 0 0 176px; margin: 0 26px 0 6px; background: center/contain no-repeat; }
.live .chan .logo.none { display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); font-size: 24px; text-align: center; }
.live .chan .name { width: 380px; flex: 0 0 380px; font-weight: 700; font-size: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live .chan .name small { display: block; color: var(--muted); font-weight: 500; font-size: 22px; }
.live .chan .epg { flex: 1 1 auto; overflow: hidden; }
.live .chan .fav { display: inline-block; width: 40px; color: var(--accent); cursor: pointer; font-size: 30px; }
.live .chan .fav:hover { transform: scale(1.25); }
.page-head .head-hint { color: var(--muted); font-size: 24px; position: absolute; right: 0; top: -40px; }
.live .chan .epg .now { font-size: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live .chan .epg .next { font-size: 22px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); margin: 8px 0; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }

/* ---------- details ---------- */
.detail { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #000 center/cover no-repeat; }
.detail::after { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(14,15,19,.98) 0%, rgba(14,15,19,.85) 45%, rgba(14,15,19,.2) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(14,15,19,0) 50%); }
/* One column: the text block and the facts box side by side, the episode list below whichever is
   taller, so long titles, plots or fact lists push the list down instead of being covered by it. */
.detail .col { position: absolute; left: 150px; right: 70px; top: 120px; bottom: 30px; z-index: 1; display: flex; flex-direction: column; pointer-events: none; }
.detail .col .top { display: flex; justify-content: space-between; align-items: flex-start; flex: 0 0 auto; }
.detail .col .top > *, .detail .episodes { pointer-events: auto; }
.detail .body { position: relative; flex: 0 1 1100px; min-width: 0; }
.detail h1 { font-size: 72px; margin: 0 0 14px; line-height: 1.05; }
.detail .meta span { margin-right: 26px; color: #c9ccd3; }
.detail .meta .score { color: var(--accent-2); font-weight: 700; }
.detail p.plot { margin: 26px 0 38px; color: #dfe1e5; max-height: 210px; overflow: hidden; }
.detail .facts { flex: 0 0 520px; margin-left: 40px; padding: 26px 30px; border-radius: 14px;
  background: rgba(14,15,19,.62); font-size: 23px; line-height: 1.4; color: #dfe1e5; }
.detail .facts > div { margin-bottom: 12px; }
.detail .facts > div:last-child { margin-bottom: 0; }
.detail .facts .k { display: block; color: var(--muted); font-size: 19px; text-transform: uppercase; letter-spacing: .5px; }
.preview .genres b { color: #c9ccd3; font-weight: 600; }
.detail .langs { color: var(--muted); font-size: 24px; margin-top: 26px; }
.detail .seasons { position: relative; margin-top: 26px; white-space: nowrap; flex: 0 0 auto; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; pointer-events: auto; }
.detail .seasons::-webkit-scrollbar { display: none; }
.detail .episodes { position: relative; flex: 1 1 auto; min-height: 0; margin: 30px 10px 0 0; overflow: hidden; }
.detail .episodes .inner { transition: transform .2s ease-out; }
.ep { display: flex; align-items: center; height: 120px; margin-bottom: 10px; border-radius: 10px; border: 3px solid transparent; background: rgba(0,0,0,.35); padding-right: 24px; }
.ep.focused { border-color: var(--focus); background: rgba(255,255,255,.12); }
.ep .num { width: 90px; flex: 0 0 90px; text-align: center; font-size: 36px; color: var(--muted); }
.ep .thumb { width: 190px; height: 107px; flex: 0 0 190px; margin-right: 26px; border-radius: 6px; background: #222 center/cover no-repeat; }
.ep .t { font-weight: 700; }
.ep .p { color: var(--muted); font-size: 22px; max-height: 58px; overflow: hidden; }
.ep .prog { width: 190px; }

/* ---------- overlays: menus, keyboard, toast ---------- */
.menu-backdrop { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 19; background: rgba(0,0,0,.35); }
.menu { position: absolute; right: 0; top: 0; bottom: 0; width: 640px; background: var(--panel); padding: 80px 50px; z-index: 20; }
.menu h2 { margin: 0 0 30px; font-size: 38px; }
.menu .opt { height: 78px; display: flex; align-items: center; padding: 0 26px; border-radius: 10px; border: 3px solid transparent; font-size: 30px; }
.menu .opt.sel::before { content: "●"; color: var(--accent); margin-right: 18px; font-size: 22px; }
.menu .opt.focused { border-color: var(--focus); background: rgba(255,255,255,.1); }
.keyboard { position: absolute; left: 70px; top: 160px; width: 700px; }
.keyboard .query { height: 80px; font-size: 40px; padding: 0 24px; display: flex; align-items: center; border-bottom: 3px solid var(--accent); margin-bottom: 26px; }
.keyboard .query .caret { width: 3px; height: 46px; background: var(--accent); margin-left: 4px; }
.keyboard .key { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 76px; margin: 0 8px 8px 0; border-radius: 8px; background: rgba(255,255,255,.08); font-size: 30px; font-weight: 700; border: 3px solid transparent; }
.keyboard .key.wide { width: 200px; }
.keyboard .key.focused { border-color: var(--focus); background: var(--accent); color: #111; }
.search-results { position: absolute; left: 820px; right: 30px; top: 160px; bottom: 0; overflow: hidden; }
.search-results .inner { padding: 22px 0 0 20px; transition: transform .2s ease-out; }
html.pointer .keyboard { left: 54px; right: 60px; top: 46px; width: auto; }
html.pointer .search-results { left: 34px; right: 20px; top: 150px; }
.toast { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); background: rgba(0,0,0,.85); padding: 18px 34px; border-radius: 12px; z-index: 50; font-size: 28px; }
.spinner { position: absolute; left: 50%; top: 50%; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; border: 8px solid rgba(255,255,255,.15); border-top-color: var(--accent); animation: spin 0.9s linear infinite; z-index: 30; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-msg { position: absolute; left: 0; right: 0; top: 420px; text-align: center; color: var(--muted); font-size: 34px; }
.mpv-screen { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.mpv-screen .mpv-time { margin-top: 24px; font-size: 30px; color: var(--text); font-variant-numeric: tabular-nums; }
.mpv-screen .center-msg .btn { margin: 44px 0 0; }
.center-msg h1 { color: var(--text); font-size: 56px; margin: 0 0 20px; }

/* ---------- profiles / provider picker ---------- */
.picker { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); }
.picker h1 { font-size: 64px; margin: 0 0 70px; font-weight: 600; }
.picker .picker-logo { position: absolute; left: 50%; top: 60px; width: 120px; height: 120px; margin-left: -60px; border-radius: 26px; }
.picker .tiles { display: flex; }
.picker .tile { width: 240px; margin: 0 26px; text-align: center; color: var(--muted); font-size: 30px; }
.picker .tile .face { width: 240px; height: 240px; border-radius: 14px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; font-size: 96px; font-weight: 800; color: #111; border: 5px solid transparent; }
.picker .tile.focused { color: var(--text); }
.face.pic { background-size: cover; background-position: center; background-repeat: no-repeat; }
.picker .tile .face .edit-mark { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 10px; background: rgba(0,0,0,.45); color: #fff; font-size: 80px; }
/* Profile editor: picture choice */
.pe-face { position: relative; width: 150px; height: 150px; flex: 0 0 150px; border-radius: 12px; margin-right: 40px; display: flex; align-items: center; justify-content: center;
  font-size: 72px; font-weight: 800; color: #111; border: 5px solid transparent; }
.pe-face.focused { border-color: var(--focus); }
.pe-face .pe-hint { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 0; font-size: 18px; font-weight: 600; color: #fff; background: rgba(0,0,0,.6); border-radius: 0 0 8px 8px; text-align: center; }
.avatar-panel { position: absolute; left: 50%; top: 50%; width: 1240px; margin-left: -620px; transform: translateY(-50%); background: var(--panel); border-radius: 18px; padding: 40px 50px; z-index: 20;
  box-shadow: 0 30px 80px rgba(0,0,0,.8); }
.avatar-panel h2 { margin: 0 0 24px; font-size: 40px; }
.avatar-panel .grid8 { line-height: 0; }
.avatar-panel .av { display: inline-flex; align-items: center; justify-content: center; width: 120px; height: 120px; margin: 0 14px 14px 0; border-radius: 12px; vertical-align: top;
  background: center/cover no-repeat; border: 5px solid transparent; font-size: 54px; font-weight: 800; color: #111; line-height: 1; }
.avatar-panel .av.sel { border-color: rgba(255,255,255,.45); }
.avatar-panel .av.focused { border-color: var(--focus); transform: scale(1.06); }
.avatar-panel .row-btns { margin-top: 18px; display: flex; }
html.pointer .avatar-panel .av, html.pointer .pe-face { cursor: pointer; }
.picker .tile.focused .face { border-color: var(--focus); transform: scale(1.06); }

/* ---------- player OSD ---------- */
.osd { position: absolute; left: 0; right: 0; bottom: 0; height: 340px; padding: 0 100px 60px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(0deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,0) 100%); z-index: 10; }
.osd.top { top: 0; bottom: auto; height: 220px; justify-content: flex-start; padding-top: 50px; background: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 100%); }
.osd h1 { margin: 0 0 6px; font-size: 46px; }
.osd .sub { color: #cfd2d8; }
.osd .time { display: flex; justify-content: space-between; color: #cfd2d8; font-size: 24px; }
.osd .bar { height: 8px; margin: 14px 0 22px; }
.osd .bar span { position: relative; }
.osd .hints { color: var(--muted); font-size: 22px; }
.osd .hints b { color: var(--text); margin-right: 8px; }
.osd .bar.seekable { height: 14px; cursor: pointer; }
.osd .bar.seekable:hover { height: 18px; }
.osd .controls { display: flex; align-items: center; margin-top: 10px; }
.osd .ctl.focused { background: var(--accent); color: #111; }
/* TV player controls (Netflix-like): thin bar with a knob, round icon buttons, title in the middle. */
.osd.tv { height: 380px; padding: 0 90px 70px; background: linear-gradient(0deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,0) 100%); }
.tv-bar { display: flex; align-items: center; height: 40px; }
.tv-bar > * + * { margin-left: 30px; }
.tv-bar .track { position: relative; flex: 1 1 auto; height: 6px; border-radius: 3px; background: rgba(255,255,255,.3); transition: height .12s; }
.tv-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); }
.tv-bar .knob { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--accent); transition: transform .12s; }
.tv-bar.focused .track { height: 10px; }
.tv-bar.focused .knob { transform: scale(1.5); background: #fff; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .7); }
.tv-bar .left { min-width: 120px; text-align: right; font-size: 28px; color: #e8e9ec; font-variant-numeric: tabular-nums; }
.tv-row { display: flex; align-items: center; margin-top: 34px; }
.tv-row .grp { flex: 1 1 0; display: flex; }
.tv-row .grp > * + * { margin-left: 26px; }
.tv-row .grp.right { justify-content: flex-end; }
.tv-row .ttl { flex: 2 1 0; text-align: center; font-size: 32px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 20px; }
.tv-row .ttl small { margin-left: 16px; font-size: 28px; font-weight: 400; color: #cfd2d8; }
.tv-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 50%; color: #fff; transition: transform .12s, background .12s; }
.tv-btn .ico { width: 54px; height: 54px; }
.tv-btn .lbl { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 12px; font-size: 22px; white-space: nowrap; color: #fff; }
.tv-btn.focused { background: #fff; color: #111; transform: scale(1.1); }
.tv-btn.focused .lbl { display: block; }
.osd .ctl { display: inline-flex; align-items: center; justify-content: center; min-width: 78px; height: 64px; padding: 0 22px; margin-right: 14px;
  border-radius: 10px; background: rgba(255,255,255,.12); font-size: 28px; font-weight: 700; cursor: pointer; user-select: none; }
.osd .ctl:hover { background: var(--accent); color: #111; }
.osd.top .ctl.back { position: absolute; left: 30px; top: 46px; min-width: 64px; }
html.pointer .osd.top h1, html.pointer .osd.top .sub { margin-left: 70px; }
.chan-overlay { position: absolute; left: 0; top: 0; bottom: 0; width: 760px; background: var(--panel); z-index: 15; padding: 50px 30px; overflow: hidden; }
.chan-overlay .chan { height: 100px; }
.chan-overlay .chan .logo { width: 140px; flex: 0 0 140px; height: 80px; }
.chan-overlay .chan .name { width: 520px; flex: 0 0 520px; }
.subtitle-line { position: absolute; left: 0; right: 0; bottom: 120px; text-align: center; z-index: 9; font-size: 44px; text-shadow: 0 0 6px #000, 0 0 6px #000; }

.debug { position: absolute; right: 10px; top: 10px; width: 760px; max-height: 98%; overflow: hidden; background: rgba(0,0,0,.85); font: 16px/1.3 monospace; color: #9fe; padding: 10px; z-index: 99; white-space: pre-wrap; }

/* ---------- desktop / web (mouse) ---------- */
html.pointer .card, html.pointer .pcard, html.pointer .chip, html.pointer .btn, html.pointer .rail .item, html.pointer .live .chan,
html.pointer .live .cat, html.pointer .ep, html.pointer .menu .opt, html.pointer .picker .tile { cursor: pointer; }
html.pointer:not(.keys) .card:hover { box-shadow: 0 0 0 3px rgba(255,255,255,.55); }
html.pointer:not(.keys) .pcard:hover .art { border-color: rgba(255,255,255,.55); }
/* Driven by keys / a phone remote: no cursor, only the highlight counts. */
html.keys, html.keys * { cursor: none !important; }
html.pointer .rail .item:hover { color: var(--text); }
html.pointer .chip:hover, html.pointer .btn:hover { filter: brightness(1.25); }
/* Back button (screens that are not in the menu: title page, profiles, provider choice). */
.nav-back { position: absolute; left: 34px; top: 34px; z-index: 12; width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.25); cursor: pointer; }
.nav-back .ico { width: 40px; height: 40px; }
.nav-back:hover { background: var(--accent); color: #111; border-color: var(--accent); }
/* Row arrows (Home, Library). */
.row .arrow { position: absolute; top: 60px; width: 64px; height: 203px; z-index: 3; display: none; align-items: center; justify-content: center;
  background: rgba(14,15,19,.72); cursor: pointer; }
.row .arrow .ico { width: 44px; height: 44px; }
.row .arrow.l { left: 0; }
.row .arrow.r { right: 0; }
html.pointer .row:hover .arrow { display: flex; }
.row .arrow:hover { background: rgba(14,15,19,.92); color: var(--accent); }
/* Hover preview (Netflix-style). */
.preview { position: absolute; z-index: 40; border-radius: 12px; overflow: hidden; background: #1b1d24; box-shadow: 0 20px 60px rgba(0,0,0,.8);
  animation: preview-in .16s ease-out; }
@keyframes preview-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
.preview .art { position: relative; height: 0; padding-top: 56.25%; background: #000 center/cover no-repeat; cursor: pointer; }
.preview .art.poster { background-size: contain; }
.preview .art .ttl { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 22px 14px; font-size: 32px; font-weight: 800; line-height: 1.1;
  background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 100%); }
.preview .body { padding: 18px 22px 22px; }
.preview .actions { display: flex; align-items: center; margin-bottom: 14px; }
.preview .round { width: 58px; height: 58px; border-radius: 50%; margin-right: 12px; display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.5); background: rgba(40,42,50,.9); cursor: pointer; }
.preview .round .ico { width: 30px; height: 30px; }
.preview .round.primary { background: var(--text); color: #111; border-color: var(--text); }
.preview .round.primary .ico svg { fill: currentColor; }
.preview .round.right { margin: 0 0 0 auto; }
.preview .round:hover { border-color: var(--text); background: rgba(255,255,255,.18); }
.preview .round.primary:hover { background: var(--accent); border-color: var(--accent); }
.preview .meta { font-size: 22px; color: #c9ccd3; margin-bottom: 6px; }
.preview .meta span { margin-right: 16px; }
.preview .meta .score { color: var(--accent-2); font-weight: 700; }
.preview .genres { font-size: 21px; color: var(--muted); margin-bottom: 10px; }
.preview p { margin: 0; font-size: 21px; line-height: 1.4; color: #dfe1e5; max-height: 148px; overflow: hidden; }
.preview p.muted { color: var(--muted); }
.preview .hint { margin-top: 14px; font-size: 21px; color: var(--muted); white-space: pre; }
.preview .hint b { color: var(--text); }
/* Settings: the list scrolls (more rows than fit); remote/keyboard focus keeps the chosen row in view. */
.settings-page { position: absolute; left: 70px; top: 0; bottom: 0; width: 1300px; padding: 60px 0 60px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.settings-page::-webkit-scrollbar { display: none; }

/* ---------- touch screens (web build on phones and tablets) ----------
   Lists scroll natively under the finger: the key-driven slides (inline transforms set by the screens)
   are switched off, and the highlight is not drawn (there is no remote to move it). */
html.touch { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
html.touch * { -webkit-tap-highlight-color: transparent; }
html.touch .rows, html.touch .track, html.touch .grid .inner, html.touch .search-results .inner,
html.touch .live .cats .inner, html.touch .live .chans .inner, html.touch .detail .episodes .inner { transform: none !important; transition: none; }
html.touch .home-page, html.touch .grid, html.touch .search-results, html.touch .live .chans, html.touch .live .cats, html.touch .detail .episodes,
html.touch .screen > .rows, html.touch .menu, html.touch .settings-page, html.touch .picker, html.touch .avatar-panel {
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
html.touch .track { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; left: 0; right: 0; padding-left: 70px; }
html.touch ::-webkit-scrollbar { display: none; }
/* Home: billboard and rows scroll together. */
html.touch .home-page { position: absolute; left: 0; top: 0; right: 0; bottom: 0; }
html.touch .home-page .billboard { position: relative; left: 0; right: auto; width: 100%; }
html.touch .home-page .rows { position: relative; padding-bottom: 40px; }
html.touch .screen > .rows { top: 150px; bottom: 0; padding-bottom: 40px; }
html.touch .page-head.solid::before { display: none; }
html.touch .row .arrow { display: none !important; }
/* Overlays are pinned to the screen (the canvas), not to the page scrolled under them. */
html.touch .menu, html.touch .menu-backdrop, html.touch .avatar-panel { position: fixed; }
/* No highlight, no sticky hover after a tap; a pressed item lights up briefly instead. */
html.touch .card.focused { transform: none; box-shadow: none; }
html.touch .pcard.focused { transform: none; }
html.touch .pcard.focused .art, html.touch .pcard:hover .art { border-color: transparent; box-shadow: none; }
html.touch .card:hover { box-shadow: none; }
html.touch .btn.focused { transform: none; border-color: transparent; background: rgba(109, 109, 110, 0.55); color: var(--text); }
html.touch .btn.primary.focused { background: var(--text); color: #111; }
html.touch .btn.compact { padding: 0 30px; }
html.touch .btn.compact .lbl { display: inline; margin-left: 14px; }
html.touch .chip.focused { border-color: transparent; color: var(--muted); background: rgba(255,255,255,.08); }
html.touch .chip.on.focused { background: rgba(var(--accent-rgb), .2); color: var(--accent-2); }
html.touch .chip:hover, html.touch .btn:hover { filter: none; }
html.touch .live .cat.focused, html.touch .live .chan.focused, html.touch .ep.focused, html.touch .menu .opt.focused { border-color: transparent; }
html.touch .live .chan.focused { background: rgba(255,255,255,.04); }
html.touch .ep.focused { background: rgba(0,0,0,.35); }
html.touch .menu .opt.focused { background: none; }
html.touch .picker .tile, html.touch .picker .tile.focused { color: var(--text); }
html.touch .picker .tile.focused .face, html.touch .avatar-panel .av.focused { border-color: transparent; transform: none; }
html.touch .avatar-panel .av.sel { border-color: rgba(255,255,255,.45); }
html.touch .pe-face.focused { border-color: transparent; }
html.touch .nav-back:hover, html.touch .osd .ctl:hover { background: rgba(0,0,0,.55); color: var(--text); border-color: rgba(255,255,255,.25); }
html.touch .osd .ctl:hover { background: rgba(255,255,255,.12); }
html.touch .card:active, html.touch .pcard:active .art, html.touch .live .chan:active, html.touch .ep:active, html.touch .btn:active,
html.touch .chip:active, html.touch .menu .opt:active, html.touch .rail .item:active, html.touch .osd .ctl:active, html.touch .nav-back:active { filter: brightness(1.35); }

/* ---------- phones: compact layout ----------
   The canvas is about 640 layout px across the short side (see fit() in main.tsx); the side menu
   becomes a tab bar at the bottom, page heads scroll sideways, panels stack. */
html.mobile { --rail-w: 0px; --tab-h: 108px; --card-w: 300px; --card-h: 169px; }
html.mobile .content { left: 0; bottom: var(--tab-h); }
html.mobile .content.dim { opacity: 1; }
html.mobile .rail, html.mobile .rail.open { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: var(--tab-h); padding: 0; display: flex; transition: none;
  background: rgba(14,15,19,.98); border-top: 2px solid rgba(255,255,255,.07); }
html.mobile .rail .item { flex: 1 1 0; height: 100%; padding: 0; margin: 0; justify-content: center; border-left: 0; border-top: 4px solid transparent; }
html.mobile .rail .item.profile { margin: 0; }
html.mobile .rail .item .ico, html.mobile .rail .item .face { width: 46px; height: 46px; flex: 0 0 46px; margin: 0; }
html.mobile .rail .item .lbl { display: none; }
html.mobile .rail .item.current { border-top-color: var(--accent); }
html.mobile .toast { bottom: calc(var(--tab-h) + 30px); max-width: 90%; text-align: center; }
html.mobile .center-msg { left: 30px; right: 30px; top: 300px; font-size: 28px; }
html.mobile .center-msg h1 { font-size: 44px; }

/* Page heads: the title and its chips in one line that scrolls sideways; the list below takes the rest. */
html.mobile .screen, html.mobile .live { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; }
html.mobile .page-head { position: relative; left: 0; top: 0; right: 0; height: auto; flex: 0 0 auto; padding: 24px 24px 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
html.mobile .page-head h1 { font-size: 42px; margin-right: 24px; white-space: nowrap; }
html.mobile .page-head .chip { flex: 0 0 auto; height: 60px; padding: 0 22px; margin-right: 12px; }
html.mobile .page-head .chip:last-child { margin-right: 24px; }
html.mobile .chip.search-field input { width: 190px; }
html.mobile .screen > .grid, html.mobile .screen > .rows, html.mobile .live .chans { position: relative; left: 0; right: 0; top: 0; bottom: auto; flex: 1 1 auto; min-height: 0; }
html.mobile .screen > .grid { margin: 0 16px; }
html.mobile .grid .inner { padding: 8px 0 30px; }

/* Rows of landscape cards (Home, Library). */
html.mobile .row { height: 262px; }
html.mobile .row h2 { margin: 0 0 10px 24px; font-size: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.mobile .row .track { top: 52px; padding-left: 24px; }
html.mobile .card { margin-right: 12px; }
html.mobile .card .ttl { padding: 24px 14px 10px; font-size: 23px; }
html.mobile .card.poster-only .pimg { width: 113px; }
html.mobile .card.poster-only .ttl { left: 113px; padding: 14px 14px 10px 16px; }
html.mobile .card .badge { top: 8px; right: 8px; font-size: 18px; }
/* Poster grid (Movies, Series, Search): 186x279 posters, see POSTER_STEP_X/Y in cards.tsx. */
html.mobile .pcard { width: 186px; margin: 0 12px 24px 0; }
html.mobile .pcard .art { width: 186px; height: 279px; }
html.mobile .pcard .cap { font-size: 22px; }

/* Home billboard: the picture on top, title and buttons at its foot. */
html.mobile .billboard { height: 640px; }
html.mobile .billboard::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(14,15,19,.75) 38%, rgba(14,15,19,0) 70%); }
html.mobile .billboard .info { left: 24px; right: 24px; top: auto; bottom: 30px; width: auto; }
html.mobile .billboard h1 { font-size: 54px; margin-bottom: 12px; }
html.mobile .billboard .meta { margin-bottom: 10px; }
html.mobile .billboard p { font-size: 23px; max-height: 94px; margin-bottom: 24px; }

/* Search: the field on top, results below. */
html.mobile .search-page .keyboard { left: 24px; right: 24px; top: 24px; }
html.mobile .search-page .search-results { position: relative; left: 0; right: 0; top: 0; flex: 1 1 auto; min-height: 0; margin: 130px 16px 0; }
html.mobile .search-results .inner { padding: 8px 0 30px; }

/* Live / Sports: categories as a sideways row of chips, channels full width (logo, name, programme). */
html.mobile .live .cats { position: relative; left: 0; top: 0; width: auto; bottom: auto; flex: 0 0 auto; overflow-x: auto; overflow-y: hidden; padding: 0 24px 14px; }
html.mobile .live .cats .inner { white-space: nowrap; }
html.mobile .live .cat { display: inline-flex; height: 58px; margin-right: 10px; padding: 0 20px; border-radius: 29px; background: rgba(255,255,255,.06); font-size: 25px; }
html.mobile .live .chans { padding: 0 16px; }
html.mobile .live .chan { display: grid; grid-template-columns: 176px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; padding: 0 18px 0 0; }
html.mobile .live .chan .logo { grid-row: 1 / 3; width: 150px; height: 84px; margin: 0 18px 0 8px; }
html.mobile .live .chan .logo.none { font-size: 20px; }
html.mobile .live .chan .name { width: auto; flex: none; font-size: 27px; }
html.mobile .live .chan .name small { display: inline; margin-left: 10px; font-size: 20px; }
html.mobile .live .chan .name ~ .epg .now { font-size: 22px; color: var(--muted); }
html.mobile .live .chan .epg .bar, html.mobile .live .chan .name ~ .epg .next { display: none; }
html.mobile .live .chan .fav { width: 36px; }

/* Title page: the picture across the top, everything below it in one scrolling column. */
html.mobile .detail { background-size: 100% auto; background-position: center top; background-color: var(--bg); }
html.mobile .detail::after { background: linear-gradient(180deg, rgba(14,15,19,.1) 0, rgba(14,15,19,.55) 220px, var(--bg) 360px); }
html.mobile .detail .col { left: 0; right: 0; top: 0; bottom: 0; display: block; padding: 250px 24px 50px; overflow-y: auto; pointer-events: auto; scrollbar-width: none; overscroll-behavior: contain; }
html.mobile .detail .col .top { display: block; }
html.mobile .detail h1 { font-size: 52px; }
html.mobile .detail .meta span { margin-right: 18px; display: inline-block; }
html.mobile .detail p.plot { max-height: none; margin: 20px 0 30px; font-size: 25px; }
html.mobile .detail .buttons { flex-wrap: wrap; }
html.mobile .detail .btn { height: 70px; margin: 0 14px 14px 0; font-size: 27px; }
html.mobile .detail .btn.primary { flex: 1 0 100%; justify-content: center; margin-right: 0; }
html.mobile .detail .facts { margin: 26px 0 0; padding: 22px 24px; font-size: 22px; }
html.mobile .detail .seasons { overflow-x: auto; scrollbar-width: none; margin: 18px -24px 0; padding: 0 24px; }
html.mobile .detail .episodes { margin: 26px 0 0; overflow: visible; }
html.mobile .ep { height: auto; min-height: 120px; padding: 12px 16px 12px 0; }
html.mobile .ep .num { width: 54px; flex: 0 0 54px; font-size: 28px; }
html.mobile .ep .thumb { width: 160px; height: 90px; flex: 0 0 160px; margin-right: 18px; }
html.mobile .ep .t { font-size: 24px; }
html.mobile .ep .p { font-size: 20px; max-height: 54px; }
html.mobile .ep .prog { width: 90px; flex: 0 0 90px; margin-left: 10px; font-size: 20px; text-align: right; }
html.mobile .nav-back { left: 20px; top: 20px; }

/* Menus slide up from the bottom. */
html.mobile .menu { background: var(--bg-2); box-shadow: 0 -20px 60px rgba(0,0,0,.6); left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 85%; padding: 40px 24px 40px; border-radius: 26px 26px 0 0; }
html.mobile .menu h2 { font-size: 34px; margin-bottom: 20px; }
html.mobile .menu .opt { height: 80px; font-size: 28px; }

/* Settings */
html.mobile .settings-page { left: 0; top: 0; right: 0; bottom: 0; width: auto; padding: 30px 24px 50px; }
html.mobile .settings-page h1 { font-size: 44px !important; margin-bottom: 26px !important; }
html.mobile .settings-page .ep { padding: 0 22px !important; }
html.mobile .settings-page .ep > span:last-child { min-width: 0; margin-left: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 24px; }
html.mobile .settings-page .ep .t { flex: 0 0 auto; font-size: 26px; }
html.mobile .settings-page .hub-field { width: 60% !important; font-size: 24px !important; }

/* Profiles, provider choice, profile editor */
html.mobile .picker { justify-content: flex-start; padding: 220px 24px 50px; }
html.mobile .picker .picker-logo { top: 50px; width: 110px; height: 110px; margin-left: -55px; }
html.mobile .picker h1 { font-size: 46px; margin: 0 0 50px; text-align: center; }
html.mobile .picker .tiles { flex-wrap: wrap; justify-content: center; }
html.mobile .picker .tile { width: 190px; margin: 0 16px 34px; font-size: 26px; }
html.mobile .picker .tile .face { width: 190px; height: 190px; font-size: 76px; }
html.mobile .profile-edit { padding-top: 120px !important; }
html.mobile .pe-row { flex-direction: column; width: 100%; }
html.mobile .pe-face { margin: 0 0 30px; }
html.mobile .pe-name { width: 100% !important; }
html.mobile .pe-colors { text-align: center; }
html.mobile .avatar-panel { left: 16px; right: 16px; width: auto; margin-left: 0; max-height: 90%; padding: 30px 24px; }
html.mobile .avatar-panel .av { width: 116px; height: 116px; margin: 0 12px 12px 0; }
html.mobile .avatar-panel .row-btns { flex-wrap: wrap; }

/* Player */
html.mobile .osd { height: auto; padding: 120px 24px 30px; }
html.mobile .osd.top { height: auto; padding: 26px 24px 80px; }
html.mobile .osd h1 { font-size: 36px; }
html.mobile .osd .sub { font-size: 24px; }
html.mobile .osd.top .ctl.back { left: 20px; top: 22px; }
html.mobile .osd .controls { flex-wrap: wrap; }
html.mobile .osd .ctl { min-width: 72px; height: 66px; padding: 0 18px; margin: 0 12px 12px 0; font-size: 25px; }
html.mobile .osd .hints { display: none; }
html.mobile .subtitle-line { bottom: 90px; font-size: 36px; padding: 0 20px; }
html.mobile .chan-overlay { width: 100%; padding: 30px 16px; }
html.mobile .chan-overlay .chan .name { width: auto; flex: 1 1 auto; }

/* ---------- phone remote (touch screens) and the screens it controls ---------- */
.remote-screen { position: absolute; left: 0; right: 0; top: 0; bottom: 0; overflow-y: auto; padding: 40px 32px 40px; display: flex; flex-direction: column; align-items: center; }
.remote-screen > * { width: 100%; max-width: 600px; flex-shrink: 0; }
/* The remote has the whole screen: no rail / tab bar. */
.app-shell.solo .content, html.mobile .app-shell.solo .content { left: 0; bottom: 0; }
.remote-head .close { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; cursor: pointer; }
.remote-head .close .ico { width: 34px; height: 34px; }
.remote-head .close:active { background: rgba(255,255,255,.15); }
.remote-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.remote-head .target { flex: 1 1 auto; display: flex; align-items: center; gap: 14px; min-width: 0; font-size: 32px; font-weight: 700; cursor: pointer; }
.remote-head .target .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-head .target .muted { font-size: 24px; font-weight: 400; }
.remote-head .target .ico { width: 30px; height: 30px; flex: 0 0 30px; }
.remote-head .dot { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; background: #555; }
.remote-head .dot.on { background: #3ccf6e; box-shadow: 0 0 10px rgba(60,207,110,.7); }
.remote-screen .type-field { height: 84px; padding: 0 26px; border-radius: 16px; border: 2px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06);
  color: var(--text); font: inherit; font-size: 30px; outline: none; }
.remote-screen .type-field:focus { border-color: var(--accent); }
.remote-screen .dpad { position: relative; width: 480px; height: 480px; max-width: 480px; margin: 40px auto 30px; border-radius: 50%; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.08); }
.remote-screen .dpad .k { position: absolute; display: flex; align-items: center; justify-content: center; width: 150px; height: 150px; border-radius: 50%; cursor: pointer; user-select: none; }
.remote-screen .dpad .k .ico { width: 56px; height: 56px; }
.remote-screen .dpad .up { left: 165px; top: 6px; }
.remote-screen .dpad .down { left: 165px; bottom: 6px; }
.remote-screen .dpad .left { left: 6px; top: 165px; }
.remote-screen .dpad .right { right: 6px; top: 165px; }
.remote-screen .dpad .ok { left: 140px; top: 140px; width: 200px; height: 200px; background: rgba(var(--accent-rgb), .25); border: 3px solid rgba(var(--accent-rgb), .6); font-size: 40px; font-weight: 800; }
.remote-screen .dpad .k:active, .remote-screen .keys .k:active { background: rgba(255,255,255,.18); }
.remote-screen .keys { display: flex; justify-content: space-between; gap: 18px; }
.remote-screen .keys .k { flex: 1 1 0; height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 18px;
  background: rgba(255,255,255,.07); cursor: pointer; user-select: none; }
.remote-screen .keys .k .ico { width: 46px; height: 46px; }
.remote-screen .keys .k small { font-size: 20px; color: var(--muted); }
.remote-screen .keys.vol { margin-top: 18px; }
.remote-screen .pair-box h1 { font-size: 46px; margin: 20px 0 16px; }
.remote-screen .pair-box p { color: var(--muted); font-size: 28px; line-height: 1.45; margin: 0 0 34px; }
.remote-screen .code-field { width: 100%; height: 130px; text-align: center; letter-spacing: 30px; font: inherit; font-size: 72px; font-weight: 800; color: var(--text);
  background: rgba(255,255,255,.06); border: 3px solid rgba(255,255,255,.15); border-radius: 18px; outline: none; }
.remote-screen .code-field:focus { border-color: var(--accent); }
.remote-screen .pair-box .row { display: flex; gap: 20px; margin-top: 34px; }
.remote-screen .btn.disabled { opacity: .45; pointer-events: none; }
.menu.pair-code { text-align: center; }
.menu.pair-code p { color: var(--muted); font-size: 28px; line-height: 1.45; }
.menu.pair-code .code { margin: 50px 0; font-size: 150px; font-weight: 800; letter-spacing: 24px; color: var(--accent-2); }
.identify { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 50; padding: 60px 90px; border-radius: 30px; text-align: center;
  background: rgba(14,15,19,.95); border: 4px solid var(--accent); font-size: 84px; font-weight: 800; box-shadow: 0 30px 90px rgba(0,0,0,.7); }
.identify small { display: block; font-size: 32px; font-weight: 500; color: var(--muted); margin-bottom: 18px; }
.remote-screen .now-playing { margin: 6px 0 0; padding: 26px 28px; border-radius: 20px; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.07); }
.remote-screen .np-title { font-size: 32px; font-weight: 700; line-height: 1.25; }
.remote-screen .np-title small { display: block; margin-top: 4px; font-size: 24px; font-weight: 500; color: var(--muted); }
.remote-screen .np-seek { width: 100%; height: 44px; margin: 22px 0 4px; accent-color: var(--accent); }
.remote-screen .np-times { display: flex; justify-content: space-between; color: var(--muted); font-size: 22px; font-variant-numeric: tabular-nums; }
.remote-screen .np-live { display: inline-block; margin-top: 18px; padding: 4px 14px; border-radius: 8px; background: #c22; font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.remote-screen .np-buttons { display: flex; justify-content: center; align-items: center; gap: 44px; margin: 22px 0 18px; }
.remote-screen .np-buttons .k { display: flex; align-items: center; justify-content: center; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,.08); cursor: pointer; user-select: none; }
.remote-screen .np-buttons .k.big { width: 128px; height: 128px; background: rgba(var(--accent-rgb), .3); border: 3px solid rgba(var(--accent-rgb), .7); }
.remote-screen .np-buttons .k .ico { width: 48px; height: 48px; }
.remote-screen .np-buttons .k:active { filter: brightness(1.4); }
.remote-screen .np-tracks { display: flex; flex-wrap: wrap; gap: 12px; }
.remote-screen .np-tracks .chip { height: 54px; font-size: 22px; margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.remote-screen .np-close { display: inline-flex; align-items: center; gap: 6px; margin: -6px 0 18px -6px; color: var(--muted); font-size: 24px; cursor: pointer; }
.remote-screen .np-close .ico { width: 30px; height: 30px; }
.remote-screen .np-mpv { display: flex; justify-content: center; margin-top: 26px; }
.remote-screen .np-note { margin-top: 18px; color: var(--muted); font-size: 22px; text-align: center; }
.remote-screen .np-bar { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 10px 12px 10px 22px; border-radius: 16px;
  background: rgba(var(--accent-rgb), .12); border: 2px solid rgba(var(--accent-rgb), .3); }
.remote-screen .np-bar-text { flex: 1 1 auto; min-width: 0; cursor: pointer; }
.remote-screen .np-bar-text b, .remote-screen .np-bar-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-screen .np-bar-text b { font-size: 26px; }
.remote-screen .np-bar-text small { font-size: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.remote-screen .np-bar .k { flex: 0 0 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; }
.remote-screen .np-bar .k .ico { width: 36px; height: 36px; }
.remote-screen .np-bar .k:active { background: rgba(255,255,255,.15); }
