/* tv.s-ai.live — web player. Same look as the Android app (VIP gold / black). No inline styles (CSP). */
@font-face { font-family: "Outfit"; src: url("/assets/fonts/outfit-latin.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --bg: #07070b; --surface: #101018; --surface2: #16161f; --variant: #1d1d28; --container: #2a2214;
  --line: rgba(255, 255, 255, .08); --gline: rgba(226, 182, 90, .35);
  --text: #f4f1ea; --muted: #a39f95; --dim: #6f6b63;
  --gold: #e2b65a; --gold-light: #f8e3a3; --gold-dark: #a8732a; --on-gold: #1b1305; --red: #e5484d; --ok: #5fd39a;
  --gold-brush: linear-gradient(135deg, #f8e3a3 0%, #e2b65a 45%, #a8732a 100%);
  --live-brush: linear-gradient(140deg, #f6d98a, #e2b65a 50%, #9c7026);
  --movies-brush: linear-gradient(140deg, #8a1a36, #40101f 55%, #16070c);
  --series-brush: linear-gradient(140deg, #2a4590, #16245a 55%, #0a1028);
  --header-h: 72px; --tabs-h: 0px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; }
svg.i { width: 22px; height: 22px; flex: none; fill: currentColor; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 2px; }
::selection { background: rgba(226, 182, 90, .35); }
.gold-text { background: var(--gold-brush); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.scroll-y { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2b2b36 transparent; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; cursor: pointer; font-weight: 600; font-size: 15.5px; border-radius: 999px; padding: 12px 22px; white-space: nowrap; transition: transform .12s, filter .15s, background .15s; }
.btn svg.i { width: 20px; height: 20px; }
.btn-gold { background: var(--gold-brush); color: var(--on-gold); }
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--variant); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: #262632; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--text); transition: background .15s, color .15s; }
.icon-btn:hover { background: rgba(255, 255, 255, .07); }
.icon-btn.on { color: var(--red); }
.icon-btn.fill { background: var(--variant); }

/* ---------------------------------------------------------------- header (VipHeader) */
.header { position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center; gap: 12px; padding: 0 20px; background: rgba(7, 7, 11, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.crown { position: relative; width: 46px; height: 50px; flex: none; }
.crown .box { width: 42px; height: 42px; border-radius: 12px; background: var(--gold-brush); display: grid; place-items: center; margin: 0 auto; }
.crown .box svg { width: 24px; height: 24px; fill: var(--on-gold); }
.vip { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); font-size: 10px; font-weight: 800; letter-spacing: .04em; color: var(--on-gold); background: var(--gold-brush); padding: 0 6px; border-radius: 6px; border: 1.5px solid var(--bg); line-height: 15px; }
.h-title { min-width: 0; }
.h-title b { display: block; font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-title small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 4px; margin-left: 28px; }
.nav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; color: var(--muted); font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a.active { color: var(--gold-light); background: var(--container); }
.nav a svg.i { width: 19px; height: 19px; }
.h-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.tabs { display: none; }
@media (max-width: 860px) {
  :root { --header-h: 64px; --tabs-h: 64px; }
  .header { padding: 0 10px 0 14px; }
  .nav { display: none; }
  .tabs { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(10, 10, 15, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; color: var(--muted); }
  .tabs a svg.i { width: 23px; height: 23px; }
  .tabs a.active { color: var(--gold-light); }
  .page { padding-bottom: calc(var(--tabs-h) + 24px + env(safe-area-inset-bottom)); }
}

.page { max-width: 1600px; margin: 0 auto; }

/* ---------------------------------------------------------------- home */
.tiles { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px; padding: 22px 20px 6px; }
.tile { position: relative; overflow: hidden; height: 190px; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; border: 1px solid var(--gline); cursor: pointer; transition: transform .15s, box-shadow .2s; }
.tile:hover, .tile:focus-visible { transform: translateY(-3px) scale(1.01); box-shadow: 0 24px 60px -24px rgba(226, 182, 90, .5); outline: none; border: 3px solid #fff; }
.tile .ib { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; }
.tile .ib svg { width: 26px; height: 26px; }
.tile .wm { position: absolute; right: -14px; bottom: -14px; width: 180px; height: 180px; opacity: .13; }
.tile b { margin-top: auto; font-size: 27px; font-weight: 800; line-height: 1.1; }
.tile small { font-size: 14px; opacity: .82; }
.tile.live { background: var(--live-brush); color: var(--on-gold); }
.tile.live .ib { background: rgba(27, 19, 5, .14); fill: var(--on-gold); }
.tile.live .wm { fill: var(--on-gold); }
.tile.movies { background: var(--movies-brush); color: #fff; }
.tile.series { background: var(--series-brush); color: #fff; }
.tile.movies .ib, .tile.series .ib { background: rgba(255, 255, 255, .14); fill: var(--gold-light); }
.tile.movies .wm, .tile.series .wm { fill: #fff; }
@media (max-width: 860px) {
  .tiles { grid-template-columns: 1fr 1fr; padding: 14px 14px 4px; gap: 12px; }
  .tile { height: 136px; padding: 14px; border-radius: 18px; }
  .tile.live { grid-column: 1 / -1; }
  .tile b { font-size: 21px; } .tile small { font-size: 12.5px; } .tile .wm { width: 130px; height: 130px; }
}

.row { padding: 18px 0 4px; }
.row-head { display: flex; align-items: center; gap: 10px; padding: 0 20px 10px; }
.row-head::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--gold-brush); flex: none; }
.row-head h2 { font-size: 18px; margin: 0; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.see-all { display: inline-flex; align-items: center; gap: 2px; color: var(--gold); font-weight: 600; font-size: 14.5px; padding: 6px 10px; border-radius: 999px; }
.see-all:hover { background: var(--container); }
.see-all svg.i { width: 18px; height: 18px; }
.strip { display: flex; gap: 14px; overflow-x: auto; padding: 6px 20px 14px; scroll-snap-type: x proximity; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip > * { scroll-snap-align: start; flex: none; }
@media (max-width: 860px) { .row-head { padding: 0 14px 8px; } .strip { padding: 6px 14px 12px; gap: 11px; } }

/* poster card */
.poster { width: 150px; cursor: pointer; border: 0; background: none; padding: 0; text-align: left; transition: transform .15s; }
.grid .poster { width: auto; }
.poster .art { position: relative; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--variant); display: grid; place-items: center; border: 2.5px solid transparent; transition: border-color .15s; }
.poster .art .ph { font-size: 34px; font-weight: 700; color: rgba(255, 255, 255, .25); }
.poster .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster:hover, .poster:focus-visible { transform: scale(1.04); outline: none; }
.poster:hover .art, .poster:focus-visible .art { border-color: var(--gold); }
.poster:hover .t, .poster:focus-visible .t { color: var(--gold-light); }
.badge-rate { position: absolute; top: 6px; left: 6px; z-index: 1; display: flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; background: rgba(0, 0, 0, .68); padding: 1px 6px; border-radius: 6px; }
.badge-rate svg.i { width: 11px; height: 11px; fill: var(--gold); }
.badge-fav { position: absolute; top: 6px; right: 6px; z-index: 1; width: 18px; height: 18px; fill: var(--red); }
.pbar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .5); z-index: 1; }
.pbar i { display: block; height: 100%; background: var(--gold); }
.poster .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; font-weight: 600; margin-top: 7px; line-height: 1.3; padding: 0 2px; }
.poster .s { font-size: 12px; color: var(--muted); padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) { .strip .poster { width: 112px; } }

/* continue card */
.cont { position: relative; width: 280px; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--variant); cursor: pointer; border: 2.5px solid transparent; padding: 0; text-align: left; transition: transform .15s, border-color .15s; }
.cont:hover, .cont:focus-visible { transform: scale(1.03); border-color: var(--gold); outline: none; }
.cont img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cont::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, .9)); }
.cont .play { position: absolute; z-index: 1; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, .55); display: grid; place-items: center; }
.cont .play svg { width: 26px; height: 26px; fill: var(--gold); }
.cont .info { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 12px; }
.cont .info b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cont .info small { font-size: 12px; color: rgba(255, 255, 255, .75); }
.cont .pbar { height: 4px; background: rgba(255, 255, 255, .2); }
@media (max-width: 860px) { .cont { width: 220px; } }

/* channel card (favourite channels row) */
.chcard { width: 170px; cursor: pointer; border: 0; background: none; padding: 0; text-align: left; transition: transform .15s; }
.chcard .art { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; background: var(--surface); border: 1px solid var(--variant); display: grid; place-items: center; overflow: hidden; }
.chcard .art img { max-width: 72%; max-height: 72%; object-fit: contain; }
.chcard .art .ph { font-size: 22px; font-weight: 700; color: rgba(255, 255, 255, .3); }
.chcard .t { font-size: 13.5px; font-weight: 600; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chcard:hover, .chcard:focus-visible { transform: scale(1.04); outline: none; }
.chcard:hover .art, .chcard:focus-visible .art { border: 2.5px solid var(--gold); }
@media (max-width: 860px) { .chcard { width: 132px; } }

/* ---------------------------------------------------------------- browse layout (sidebar + content) */
.browse { display: grid; grid-template-columns: 300px 1fr; gap: 16px; padding: 16px 20px 0; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); }
.side { background: var(--surface); border-radius: 18px; padding: 10px 8px; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: #2b2b36 transparent; }
.side .lbl { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 10px 12px 6px; }
.side-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; text-align: left; color: var(--text); font-size: 15px; }
.side-item:hover { background: rgba(255, 255, 255, .04); }
.side-item.sel { background: var(--container); color: var(--gold-light); font-weight: 600; }
.side-item .bar { width: 3px; height: 20px; border-radius: 2px; background: transparent; flex: none; }
.side-item.sel .bar { background: var(--gold); }
.side-item svg.i { width: 18px; height: 18px; fill: var(--gold); }
.side-item .n { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; }
.side-item span.name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-filter { margin: 4px 6px 8px; }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.main-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 12px; flex-wrap: wrap; }
.main-head h2 { margin: 0; font-size: 20px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-head .count { color: var(--muted); font-size: 14px; }
.main-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 4px 30px; scrollbar-width: thin; scrollbar-color: #2b2b36 transparent; }
.picker-btn { display: none; }
@media (max-width: 860px) {
  .browse { grid-template-columns: 1fr; padding: 10px 14px 0; height: auto; }
  .side { display: none; }
  .main-body { overflow: visible; padding-bottom: 20px; }
  .picker-btn { display: flex; width: 100%; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; }
  .picker-btn svg.i { fill: var(--gold); }
  .picker-btn b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
  .picker-btn .chg { color: var(--gold); font-weight: 600; font-size: 14px; }
}

.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search input, .input { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px 11px 42px; outline: none; transition: border-color .15s; }
.input { padding-left: 14px; }
.search input:focus, .input:focus { border-color: var(--gold); }
.search svg.i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: var(--gold); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 16px; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 12px; } }

/* channel list rows */
.ch-list { display: flex; flex-direction: column; gap: 4px; }
.ch-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; transition: background .12s, border-color .12s; }
.ch-row:hover, .ch-row:focus-visible { background: var(--surface); border-color: var(--gline); outline: none; }
.ch-row.playing { background: var(--container); border-color: rgba(226, 182, 90, .6); }
.ch-logo { width: 52px; height: 52px; border-radius: 12px; background: var(--surface2); display: grid; place-items: center; flex: none; overflow: hidden; }
.ch-logo img { max-width: 80%; max-height: 80%; object-fit: contain; }
.ch-logo .ph { font-size: 15px; font-weight: 700; color: rgba(255, 255, 255, .35); }
.ch-row .meta { flex: 1; min-width: 0; }
.ch-row .meta b { display: block; font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row .meta small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row .num { width: 44px; text-align: right; color: var(--dim); font-size: 13px; flex: none; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 16px; }
.more-sentinel { height: 40px; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(226, 182, 90, .2); border-top-color: var(--gold); animation: spin .8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sheet (category picker / dialogs) */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(3, 3, 6, .7); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 86vh; max-height: 86dvh; background: var(--bg); border: 1px solid var(--gline); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; overflow: hidden; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 14px 10px 8px 18px; }
.sheet-head b { flex: 1; font-size: 18px; }
.sheet-body { overflow-y: auto; padding: 4px 10px 20px; }
@media (min-width: 861px) { .sheet-bg { align-items: center; } .sheet { border-radius: 22px; } }
.dialog { padding: 6px 20px 22px; }
.dialog p { color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 10px 0 18px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-all; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------- detail pages */
.detail { position: relative; min-height: calc(100vh - var(--header-h)); }
.backdrop { position: absolute; left: 0; right: 0; top: 0; height: 520px; background-size: cover; background-position: center top; opacity: .45; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 7, 11, .15), var(--bg)); }
.detail-in { position: relative; padding: 34px 48px 50px; max-width: 1300px; }
.d-top { display: flex; gap: 30px; }
.d-poster { width: 220px; flex: none; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; background: var(--variant); border: 1px solid var(--gline); position: relative; display: grid; place-items: center; }
.d-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d-poster .ph { font-size: 50px; color: rgba(255, 255, 255, .25); font-weight: 700; }
.d-info { min-width: 0; flex: 1; }
.d-info h1 { font-size: clamp(26px, 3.4vw, 40px); margin: 4px 0 12px; line-height: 1.12; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-size: 13.5px; padding: 3px 9px; border-radius: 8px; background: var(--variant); white-space: nowrap; }
.chip.rate { background: rgba(226, 182, 90, .18); color: var(--gold-light); font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.chip.rate svg.i { width: 14px; height: 14px; fill: var(--gold); }
.d-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; align-items: center; }
.plot { font-size: 17px; line-height: 1.6; margin: 22px 0 10px; max-width: 900px; }
.cast { color: var(--muted); font-size: 14px; max-width: 900px; margin: 4px 0; }
.seasons { display: flex; gap: 8px; overflow-x: auto; padding: 22px 0 12px; scrollbar-width: none; }
.season { border: 1px solid var(--line); background: var(--surface); padding: 9px 17px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.season.sel { background: var(--container); color: var(--gold-light); border-color: var(--gline); }
.ep { display: flex; gap: 14px; align-items: center; padding: 8px; border-radius: 14px; background: var(--surface); margin-bottom: 8px; cursor: pointer; border: 1.5px solid transparent; width: 100%; text-align: left; transition: border-color .12s; }
.ep:hover, .ep:focus-visible { border-color: var(--gold); outline: none; }
.ep .thumb { width: 150px; aspect-ratio: 16 / 9; border-radius: 10px; background: var(--variant); position: relative; overflow: hidden; display: grid; place-items: center; flex: none; }
.ep .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ep .thumb svg.i { width: 30px; height: 30px; fill: rgba(226, 182, 90, .75); }
.ep .txt { min-width: 0; flex: 1; }
.ep .txt b { display: block; font-size: 15px; }
.ep .txt .m { color: var(--gold); font-size: 12.5px; }
.ep .txt p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) {
  .backdrop { height: 300px; }
  .detail-in { padding: 18px 14px 30px; }
  .d-top { gap: 16px; }
  .d-poster { width: 118px; }
  .plot { font-size: 15.5px; }
  .ep .thumb { width: 118px; }
}

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 30px 16px; background: radial-gradient(700px 420px at 75% 15%, rgba(226, 182, 90, .2), transparent 70%), radial-gradient(520px 360px at 10% 90%, rgba(110, 80, 255, .1), transparent 70%), var(--bg); }
.login-card { width: 100%; max-width: 440px; background: rgba(16, 16, 24, .92); border: 1px solid var(--gline); border-radius: 26px; padding: 30px 26px 26px; box-shadow: 0 40px 120px -40px rgba(226, 182, 90, .4); }
.login-card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-card h1 { font-size: 26px; margin: 0 0 4px; }
.login-card p.sub { color: var(--muted); margin: 0 0 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.pass-wrap { position: relative; }
.pass-wrap .icon-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; }
.err { color: #ff8a8a; font-size: 14.5px; min-height: 22px; margin: 4px 0 10px; }
.login-card .btn { width: 100%; }
.login-foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.login-foot a { color: var(--gold); font-weight: 600; }
.notice { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(226, 182, 90, .08); border: 1px solid var(--gline); color: #d6d1c6; font-size: 14px; }

/* ---------------------------------------------------------------- player */
.player { position: fixed; inset: 0; z-index: 80; background: #000; display: flex; }
.player video { width: 100%; height: 100%; background: #000; object-fit: contain; }
.player.zoom video { object-fit: cover; }
.player.stretch video { object-fit: fill; }
.p-stage { position: relative; flex: 1; min-width: 0; }
.p-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; transition: opacity .25s; }
.player.idle .p-ui { opacity: 0; cursor: none; }
.p-top { display: flex; align-items: center; gap: 14px; padding: 22px 28px 50px; background: linear-gradient(180deg, rgba(0, 0, 0, .85), transparent); }
.p-top .logo { width: 52px; height: 52px; border-radius: 12px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; overflow: hidden; flex: none; }
.p-top .logo img { max-width: 82%; max-height: 82%; object-fit: contain; }
.p-top .logo.poster img { max-width: none; max-height: none; width: 100%; height: 100%; object-fit: cover; }
.p-top .tt { flex: 1; min-width: 0; }
.p-top .tt b { display: block; font-size: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-top .tt small { display: block; color: rgba(255, 255, 255, .75); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-badge { font-size: 12px; font-weight: 700; letter-spacing: .06em; background: var(--red); color: #fff; padding: 3px 8px; border-radius: 4px; }
.p-bottom { padding: 50px 28px 26px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .88)); display: flex; flex-direction: column; gap: 14px; }
.seek { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #fff; }
.seek input[type=range] { flex: 1; accent-color: var(--gold); height: 6px; cursor: pointer; }
.ctrls { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.cbtn { width: 54px; height: 54px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .12s; }
.cbtn svg.i { width: 26px; height: 26px; }
.cbtn:hover { background: rgba(255, 255, 255, .24); }
.cbtn.main { width: 64px; height: 64px; background: var(--gold); color: var(--on-gold); }
.cbtn.main:hover { filter: brightness(1.08); }
.cbtn.on { color: var(--red); }
.cbtn:active { transform: scale(.94); }
.ctrls .vol { display: flex; align-items: center; gap: 8px; }
.ctrls .vol input { width: 100px; accent-color: var(--gold); }
.p-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.p-center .spinner { margin: 0; width: 56px; height: 56px; border-color: rgba(255, 255, 255, .2); border-top-color: #fff; }
.p-err { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 32px)); background: rgba(21, 27, 35, .92); border-radius: 18px; padding: 24px; text-align: center; z-index: 2; }
.p-err b { display: block; font-size: 18px; margin-bottom: 8px; }
.p-err p { color: rgba(255, 255, 255, .8); margin: 0 0 18px; }
.p-err .actions { justify-content: center; }
.p-toast { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); background: rgba(0, 0, 0, .75); padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 3; pointer-events: none; }
.p-side { width: 360px; background: rgba(10, 10, 15, .97); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.p-side-head { display: flex; align-items: center; gap: 8px; padding: 14px 10px 8px 16px; }
.p-side-head b { flex: 1; font-size: 16px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-side .search { margin: 0 10px 8px; max-width: none; flex: none; }
.p-side-list { flex: 1; overflow-y: auto; padding: 0 8px 12px; scrollbar-width: thin; scrollbar-color: #2b2b36 transparent; }
.upnext { position: absolute; right: 28px; bottom: 150px; display: flex; gap: 12px; align-items: center; background: rgba(14, 14, 22, .94); border: 1px solid var(--gline); border-radius: 14px; padding: 12px 14px; z-index: 2; }
.upnext small { display: block; color: var(--gold-light); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
@media (max-width: 860px) {
  .p-top { padding: 14px 14px 40px; gap: 10px; }
  .p-top .logo { width: 42px; height: 42px; }
  .p-top .tt b { font-size: 17px; }
  .p-bottom { padding: 40px 14px 16px; gap: 10px; }
  .cbtn { width: 46px; height: 46px; } .cbtn.main { width: 56px; height: 56px; }
  .ctrls { gap: 10px; } .ctrls .vol { display: none; }
  .p-side { position: absolute; right: 0; top: 0; bottom: 0; width: min(340px, 88vw); z-index: 4; }
  .upnext { right: 14px; bottom: 130px; }
}

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; background: #1f1f2a; border: 1px solid var(--gline); padding: 11px 18px; border-radius: 999px; font-weight: 500; box-shadow: 0 20px 40px -20px #000; max-width: calc(100vw - 32px); }
@media (max-width: 860px) { .toast { bottom: calc(var(--tabs-h) + 18px); } }
.banner { margin: 14px 20px 0; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--gline); background: rgba(226, 182, 90, .07); color: #d6d1c6; font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; }
.banner svg.i { fill: var(--gold); margin-top: 1px; }

/* logos: the picture covers the initials; initials stay only if the logo fails */
.ch-logo, .chcard .art, .p-top .logo { position: relative; }
.ch-logo img, .chcard .art img, .p-top .logo img { position: absolute; inset: 0; margin: auto; }
.has-img > .ph { visibility: hidden; }
.p-top .logo .ph { font-weight: 700; color: rgba(255, 255, 255, .4); }
/* keep the side padding when a row snaps */
.strip { scroll-padding-inline: 20px; }
@media (max-width: 860px) {
  .strip { scroll-padding-inline: 14px; }
  .main-head h2 { display: none; }
  .main-head .count { order: 3; width: 100%; }
}
