/* Apex Player - Apex Hub's navy/blue look, built for TV-style browsing on any screen. */
:root {
  --bg: #07111e;
  --bar: #081628;
  --surface: #0c1c34;
  --surface2: #0b1e3a;
  --raise: #10264a;
  --line: #1c355c;
  --line2: #1e3d6e;
  --text: #e8eef8;
  --muted: #a9bad2;
  --faint: #8ea2be;
  --accent: #375dff;
  --accent2: #5d82ff;
  --accent-ink: #f5f7ff;
  --focus: #9db7ef;
  --ok: #3ecf8e;
  --warn: #f5c542;
  --bad: #ff7a85;
  --rail: 0px;
  --gut: 28px;
  --radius: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 420px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #12315c 0, rgba(7, 17, 30, 0) 100%);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
[hidden] { display: none !important; }
img { color: transparent; }
svg.i { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- app frame ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.main { min-width: 0; }
body.authed .main { margin-left: var(--rail); padding-bottom: calc(72px + var(--safe-b)); }

/* side rail (tablet / desktop / landscape) */
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 30;
  background: var(--bar); border-right: 1px solid var(--line);
  display: none; flex-direction: column; padding: 14px 10px; gap: 4px; overflow-y: auto; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; text-decoration: none; color: #d7e1f2; font-size: 18px; letter-spacing: -.02em; }
.rail .brand img { height: 40px; width: auto; }
.rail .brand b { color: #fff; }
.rail a.nav {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 10px; text-decoration: none;
  color: #c9d6ec; border: 1px solid transparent; font-size: 15px;
}
.rail a.nav:hover { background: var(--surface2); color: #fff; }
.rail a.nav.is-active { background: var(--accent); border-color: var(--accent2); color: #fff; box-shadow: 0 6px 18px rgba(55, 93, 255, .3); }
.rail .spacer { flex: 1; }
.rail .navsep { border: 0; border-top: 1px solid var(--line); margin: 8px 6px; }
.rail .me {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; text-decoration: none;
  background: var(--surface2); border: 1px solid var(--line2); min-width: 0;
}
.rail .me:hover { border-color: var(--accent2); }
.rail .me .t { min-width: 0; font-size: 13px; line-height: 1.3; }
.rail .me .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rail .me .t span { color: var(--faint); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px; display: grid; place-items: center; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #6a3dff); color: #fff;
}

/* compact rail: icons with small labels */
.rail.compact { padding: 10px 6px; align-items: stretch; }
.rail.compact .brand { justify-content: center; padding: 4px 0 12px; }
.rail.compact .brand span { display: none; }
.rail.compact a.nav { flex-direction: column; gap: 3px; padding: 8px 2px; font-size: 11px; text-align: center; }
.rail.compact .me { justify-content: center; padding: 6px; }
.rail.compact .me .t { display: none; }

/* phone portrait: slim top bar + bottom tabs */
.mtop {
  position: sticky; top: 0; z-index: 25; display: none; align-items: center; gap: 10px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(8, 22, 40, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.mtop .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #d7e1f2; font-size: 17px; }
.mtop .brand img { height: 30px; width: auto; }
.mtop .brand b { color: #fff; }
.mtop .grow { flex: 1; }
.iconbtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line2);
  background: var(--surface2); color: #d5e2f6; text-decoration: none; flex: 0 0 auto;
}
.iconbtn:hover { background: #14325c; color: #fff; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none; grid-template-columns: repeat(5, 1fr);
  background: rgba(8, 22, 40, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 11px; text-decoration: none; color: var(--faint); }
.tabbar a.is-active { color: #fff; }
.tabbar a.is-active svg { color: var(--accent2); }

/* which frame shows */
@media (min-width: 760px), (orientation: landscape) and (min-width: 560px) {
  body.authed { --rail: 84px; }
  body.authed .rail { display: flex; }
  body.authed .main { padding-bottom: 0; }
  .mtop, .tabbar { display: none !important; }
}
@media (min-width: 1280px) and (min-height: 600px) {
  body.authed { --rail: 236px; }
}
@media (max-width: 759px) and (orientation: portrait), (max-width: 559px) {
  .rail { display: none !important; }
  body.authed .mtop { display: flex; }
  body.authed .tabbar { display: grid; }
  :root { --gut: 16px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  :root { --gut: 18px; }
  .rail.compact { gap: 0; }
  .rail.compact a.nav { padding: 5px 2px; }
  .rail.compact a.nav svg.i { width: 20px; height: 20px; }
  .rail.compact .brand { padding-bottom: 4px; }
  .rail.compact .brand img { width: 50px; height: auto; }
}

/* ---------- page bits ---------- */
.page { padding: 22px var(--gut) 48px; max-width: 1800px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.01em; }
.sec { display: flex; align-items: center; gap: 10px; margin: 30px 0 12px; }
.sec h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.sec h2::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--ok); flex: 0 0 10px; }
.sec .more { margin-left: auto; font-size: 14px; color: var(--muted); text-decoration: none; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface2); }
.sec .more:hover { color: #fff; border-color: var(--accent2); }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 14px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); padding: 11px 20px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #4a6dff; }
.btn svg.i { width: 20px; height: 20px; }
.btn.ghost { background: rgba(11, 30, 58, .85); border: 1px solid var(--line2); color: #d5e2f6; font-weight: 500; }
.btn.ghost:hover { background: #14325c; color: #fff; }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.danger { background: transparent; border: 1px solid #5c2a35; color: var(--bad); font-weight: 500; }
.btn.danger:hover { background: #2a1219; }
.btn:disabled { opacity: .55; cursor: default; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; background: var(--surface2); border: 1px solid var(--line2); color: var(--muted); }
.pill.ok { color: var(--ok); border-color: #1d5a45; background: #0b2a24; }
.pill.warn { color: var(--warn); border-color: #5c4b1d; background: #2a230b; }
.pill.bad { color: var(--bad); border-color: #5c2a35; background: #2a1219; }

.input {
  width: 100%; background: #081628; border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; color: var(--text);
}
.input:focus { border-color: var(--accent2); outline: none; box-shadow: 0 0 0 3px rgba(93, 130, 255, .25); }
select.input {
  appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, #a9bad2 50%), linear-gradient(135deg, #a9bad2 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.searchbox { position: relative; }
.searchbox svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 18px; height: 18px; pointer-events: none; }
.searchbox .input { padding-left: 36px; }

.spin { width: 30px; height: 30px; border: 3px solid var(--line2); border-top-color: var(--accent2); border-radius: 50%; animation: spin .8s linear infinite; margin: 50px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--surface) 0, #10264a 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.4s ease infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 410px; background: rgba(12, 28, 52, .92); border: 1px solid var(--line); border-radius: 18px;
  padding: 32px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.login-card .logo { display: block; width: 116px; height: auto; margin: 2px auto 10px; }
.login-card h1 { text-align: center; font-size: 24px; margin: 0; }
.login-card .sub { text-align: center; color: var(--muted); margin: 0 0 22px; font-size: 14.5px; letter-spacing: .01em; }
/* footer, same as Apex Hub */
.foot { text-align: center; color: var(--faint); font-size: 13px; border-top: 1px solid var(--line); padding: 16px 0 0; margin: 8px var(--gut) 24px; }
body:not(.authed) .main > .foot { display: none; }
.foot { user-select: none; -webkit-user-select: none; }
.ver { display: block; margin: 18px auto 0; background: none; border: 0; color: #5f7596; font-size: 12.5px; padding: 6px 10px; user-select: none; -webkit-user-select: none; }

/* easter egg: full throttle */
.throttle { position: fixed; inset: 0; z-index: 300; pointer-events: none; overflow: hidden; background: radial-gradient(circle at 50% 50%, rgba(55, 93, 255, .25), rgba(7, 17, 30, .85) 70%); animation: thIn .25s ease; }
.throttle.out { opacity: 0; transition: opacity .55s ease; }
.throttle i { position: absolute; left: -400px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #9db7ef 40%, #fff); animation: streak linear infinite; }
.throttle-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 14px; animation: punch 2.4s cubic-bezier(.2, .9, .2, 1) forwards; }
.throttle-msg img { width: 150px; filter: drop-shadow(0 0 24px rgba(93, 130, 255, .8)); }
.throttle-msg b { white-space: nowrap; font-size: clamp(22px, 6.5vw, 64px); letter-spacing: .14em; font-style: italic; color: #fff; text-shadow: 0 0 30px rgba(93, 130, 255, .9); }
@keyframes streak { to { transform: translateX(calc(100vw + 800px)); } }
@keyframes thIn { from { opacity: 0; } }
@keyframes punch { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } 18% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; } 30% { transform: translate(-50%, -50%) scale(1); } 100% { transform: translate(-50%, -50%) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .throttle i { display: none; } .throttle-msg { animation: none; } }

/* easter egg: Summit theme (gold) */
body.summit { --accent: #c9901a; --accent2: #f5c542; --accent-ink: #1b1303; --focus: #f5d77a; }
body.summit::before { background: linear-gradient(180deg, #3a2a0c 0, rgba(7, 17, 30, 0) 100%); }
body.summit .btn:hover { background: #dba43a; }
body.summit .rail a.nav.is-active, body.summit nav a.is-active { color: #1b1303; box-shadow: 0 6px 18px rgba(245, 197, 66, .25); }
body.summit .rail a.nav.is-active svg { color: #1b1303; }
body.summit .avatar { background: linear-gradient(135deg, #f5c542, #c9901a); color: #1b1303; }
body.summit .sec h2::before { background: #f5c542; }
.login-card .foot.in-card { margin: 18px 0 0; padding-top: 14px; }
.login-card label { display: block; font-size: 13.5px; color: var(--muted); margin: 14px 0 6px; }
.login-card .pw { position: relative; }
.login-card .pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--faint); padding: 6px; }
.login-card .btn { width: 100%; margin-top: 22px; padding: 13px; }
.login-card .err { color: var(--bad); font-size: 14px; margin-top: 12px; min-height: 1.2em; text-align: center; }
.login-card .help { display: flex; justify-content: center; gap: 16px; margin-top: 18px; font-size: 13.5px; }
.login-card .help a { color: var(--muted); text-decoration: none; }
.login-card .help a:hover { color: #fff; }
@media (orientation: landscape) and (max-height: 520px) { .login-card { padding: 18px 22px; } .login-card .logo { width: 96px; margin-bottom: 8px; } .login-card .sub { margin-bottom: 8px; } }

/* ---------- home hero ---------- */
.feature {
  position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface);
  min-height: clamp(260px, 42vh, 440px); display: flex; align-items: flex-end;
}
.feature .bd { position: absolute; inset: 0; background-size: cover; background-position: center 25%; opacity: 0; transition: opacity .9s ease; }
.feature .bd.on { opacity: 1; }
.feature .bd.soft { filter: blur(18px) brightness(.7); transform: scale(1.15); }
.feature .in { opacity: 0; transform: translateY(8px); }
.feature .in.show { opacity: 1; transform: none; transition: opacity .5s ease .15s, transform .5s ease .15s; }
.fnav { position: absolute; right: 18px; bottom: 18px; z-index: 2; display: flex; align-items: center; gap: 8px; }
@media (max-width: 1279px) { #feature .in { padding-bottom: 78px; } .fnav { left: 30px; right: auto; } }
.fnav .dots { display: flex; gap: 6px; }
.fnav .dots button { width: 8px; height: 8px; padding: 0; border-radius: 4px; border: 0; background: rgba(255, 255, 255, .35); transition: width .25s, background .25s; }
.fnav .dots button.on { width: 22px; background: #fff; }
.fbtn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: rgba(7, 17, 30, .55); color: #fff; display: grid; place-items: center; padding: 0; }
.fbtn:hover { background: var(--accent); border-color: var(--accent2); }
.fbtn svg.i { width: 18px; height: 18px; }
@media (hover: none) { .fbtn { display: none; } }
@media (max-width: 759px) { .fnav { left: 0; right: 0; bottom: 14px; justify-content: center; } #feature .in { padding-bottom: 66px; } }
.feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 17, 30, .96) 0, rgba(7, 17, 30, .75) 45%, rgba(7, 17, 30, .1) 100%), linear-gradient(0deg, rgba(7, 17, 30, .9) 0, transparent 55%); }
.feature .in { position: relative; z-index: 1; padding: 30px; max-width: 640px; }
.feature .kicker { color: var(--accent2); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.feature h1 { margin: 6px 0 8px; font-size: clamp(24px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.feature .plot { color: #cfdaeb; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 10px 0 0; }
.feature .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.facts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 14px; }
.facts .dot::before { content: "•"; margin-right: 8px; color: var(--faint); }
.star-r { color: var(--warn); }

.notice { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; border: 1px solid #5c4b1d; background: #1f1a0b; color: #f3e2b1; }
.notice.bad { border-color: #5c2a35; background: #2a1219; color: #ffd0d5; }
.notice .grow { flex: 1; min-width: 200px; }

/* ---------- shelves & grids ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-template-rows: auto; grid-auto-rows: 0; column-gap: 16px; row-gap: 0; overflow: hidden; }
.shelf.wide, .grid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (min-width: 1600px) { .grid, .shelf { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
@media (max-width: 759px) and (orientation: portrait) {
  .shelf { display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 4px; scrollbar-width: none; }
  .shelf::-webkit-scrollbar { display: none; }
  .shelf > * { flex: 0 0 34%; scroll-snap-align: start; }
  .shelf.wide > * { flex-basis: 78%; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px 10px; }
  .grid.wide { grid-template-columns: 1fr; }
}
@media (orientation: landscape) and (max-height: 520px) { .grid, .shelf { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); } }

.tile { position: relative; display: block; text-decoration: none; color: inherit; min-width: 0; }
.poster {
  position: relative; aspect-ratio: 2 / 3; width: 100%; border-radius: 10px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--faint); font-weight: 700; font-size: 24px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.poster.land { aspect-ratio: 16 / 9; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile:hover .poster, .tile:focus-visible .poster { border-color: var(--accent2); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, .45); }
.tile:focus-visible { outline: none; }
.tile .name { font-size: 14px; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .meta { font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .meta .sep::before { content: "·"; margin: 0 6px; }
.tile .badge { position: absolute; top: 7px; left: 7px; z-index: 1; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(7, 17, 30, .85); color: #fff; }
.prog { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 3px; background: rgba(0, 0, 0, .45); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--accent2); }
/* placeholder initials sit under the artwork and go once it has loaded */
.has-img > .ini { visibility: hidden; }

/* ---------- browse layout (movies/series) ---------- */
.browse { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.cats { position: sticky; top: 16px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cats .cf { padding: 10px; border-bottom: 1px solid var(--line); }
.cats .cf .input { padding: 8px 10px 8px 34px; font-size: 14px; }
.cats ul { list-style: none; margin: 0; padding: 6px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.cats li button { width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; color: #c9d6ec; font-size: 14px; display: flex; gap: 8px; }
.cats li button span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cats li button:hover { background: var(--surface2); color: #fff; }
.cats li button.is-active { background: var(--accent); color: #fff; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .searchbox { flex: 1 1 220px; max-width: 380px; }
.toolbar select { width: auto; flex: 0 0 auto; }
.toolbar .count { color: var(--faint); font-size: 13.5px; margin-left: auto; }
.catsel { display: none; }
@media (max-width: 1023px) {
  .browse { grid-template-columns: minmax(0, 1fr); }
  .cats { display: none; }
  .catsel { display: block; flex: 1 1 100%; }
}
@media (orientation: landscape) and (max-height: 520px) { .browse { grid-template-columns: minmax(0, 1fr); } .cats { display: none; } .catsel { display: block; flex: 1 1 200px; } }

/* ---------- live tv ---------- */
.live { display: grid; grid-template-columns: 230px minmax(0, 1fr) minmax(360px, 40%); gap: 18px; align-items: start; }
.live .cats { top: 16px; }
.live .chcol { min-width: 0; }
.live .pv { position: sticky; top: 16px; min-width: 0; }
@media (max-width: 1279px) { .live { grid-template-columns: minmax(0, 1fr) minmax(320px, 44%); } .live .cats { display: none; } .live .catsel { display: block; } }
@media (max-width: 899px), (orientation: landscape) and (max-height: 520px) { .live { grid-template-columns: minmax(0, 1fr); } .live .pv { display: none; } }
/* Channel rows: a quiet list, not a stack of boxes. Separators, hover tint, accent edge for the one playing. */
.chlist { display: flex; flex-direction: column; background: rgba(12, 28, 52, .55); border-radius: 12px; overflow: hidden; }
.chlist.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); column-gap: 1px; background: var(--line); border: 1px solid var(--line); }
.chlist.chgrid .ch { background: #0a1a31; }
@media (max-width: 559px) { .chlist.chgrid { grid-template-columns: 1fr; } }
.ch {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; cursor: pointer; min-width: 0; text-align: left; width: 100%; color: inherit;
}
.chlist > .ch:last-child { border-bottom: 0; }
.ch:hover, .chlist.chgrid .ch:hover { background: #10264a; }
.ch.is-active, .chlist.chgrid .ch.is-active { background: #132c56; }
.ch.is-active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent2); }
.ch .num { width: 28px; flex: 0 0 28px; color: #5f7596; font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.ch .logo { width: 64px; height: 40px; flex: 0 0 64px; border-radius: 6px; background: #0e2240; display: grid; place-items: center; overflow: hidden; color: #5f7596; font-weight: 700; font-size: 12px; position: relative; }
.ch .logo img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; }
.ch .t { min-width: 0; flex: 1; }
.ch .t > span { display: block; }
.ch .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; }
.ch .n .cu svg { width: 13px; height: 13px; margin-left: 6px; vertical-align: -1px; color: #6f8bb8; }
.ch .now { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--faint); min-height: 1.3em; margin-top: 1px; }
.ch .now b { color: #c3d0e4; font-weight: 500; }
.ch .now:empty { display: none; }
.ch .bar { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .08); margin-top: 6px; overflow: hidden; max-width: 260px; }
.ch .bar i { display: block; height: 100%; background: var(--accent2); }
.favbtn { background: none; border: 0; color: #5f7596; padding: 6px; border-radius: 50%; display: grid; place-items: center; }
.favbtn:hover { color: #fff; }
.favbtn.on { color: var(--warn); }
.favbtn.on svg { fill: currentColor; }
@media (hover: hover) { .ch .favbtn:not(.on) { opacity: 0; } .ch:hover .favbtn, .ch:focus-within .favbtn { opacity: 1; } }
@media (max-width: 559px) { .ch .num { display: none; } .ch .logo { width: 52px; flex-basis: 52px; height: 38px; } }

.pv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pv-stage { position: relative; aspect-ratio: 16 / 9; background: #000; }
.pv-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--faint); padding: 20px; }
.pv-info { padding: 14px 16px 16px; }
.pv-info h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.pv-info h3 img { width: 40px; height: 28px; object-fit: contain; }
.pv-info .acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.epglist { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.epglist li { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.epglist li.now { background: var(--surface2); border: 1px solid var(--line2); }
.epglist li time { color: var(--faint); font-variant-numeric: tabular-nums; }
.epglist li .tt { font-weight: 600; }
.epglist li .dd { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- details ---------- */
.detail { position: relative; margin: -22px calc(-1 * var(--gut)) 0; padding: 40px var(--gut) 30px; min-height: 420px; overflow: hidden; }
.detail .bd { position: absolute; inset: 0; background-size: cover; background-position: center 20%; opacity: .35; mask-image: linear-gradient(180deg, #000 30%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); }
.detail::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 17, 30, .95) 0, rgba(7, 17, 30, .6) 60%, rgba(7, 17, 30, .3) 100%); }
.detail .in { position: relative; display: flex; gap: 32px; align-items: flex-start; }
.detail .poster { width: 230px; flex: 0 0 230px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.detail h1 { margin: 0 0 8px; font-size: clamp(26px, 3.2vw, 42px); line-height: 1.1; letter-spacing: -.02em; }
.detail .plot { max-width: 72ch; color: #cfdaeb; margin: 14px 0 0; }
.detail .cast { color: var(--faint); font-size: 14px; margin-top: 10px; max-width: 72ch; }
.detail .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 16px; position: relative; background: none; border: 0; padding: 0; }
.back:hover { color: #fff; }
@media (max-width: 759px) {
  .detail { padding-top: 22px; }
  .detail .in { flex-direction: column; gap: 18px; }
  .detail .poster { width: 150px; flex-basis: auto; }
}
@media (orientation: landscape) and (max-height: 520px) { .detail .poster { width: 150px; flex-basis: 150px; } .detail { min-height: 0; } }

.seasons { display: flex; gap: 6px; overflow-x: auto; margin: 6px 0 14px; scrollbar-width: none; }
.seasons::-webkit-scrollbar { display: none; }
.seasons button { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface2); color: #d5e2f6; }
.seasons button.is-active { background: var(--accent); border-color: var(--accent2); color: #fff; }
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 10px; }
@media (max-width: 559px) { .eps { grid-template-columns: 1fr; } }
.ep { display: flex; gap: 14px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; width: 100%; color: inherit; min-width: 0; }
.ep:hover { border-color: var(--accent2); background: #0f2342; }
.ep .thumb { position: relative; width: 168px; flex: 0 0 168px; aspect-ratio: 16 / 9; border-radius: 8px; background: #081628 center / cover; display: grid; place-items: center; color: var(--faint); }
.ep .t { min-width: 0; flex: 1; }
.ep .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep .d { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.ep.watched .n::after { content: " ✓"; color: var(--ok); }
@media (max-width: 559px) { .ep .thumb { width: 128px; flex-basis: 128px; } }

/* ---------- account ---------- */
/* two columns that stack on their own, so no card is stretched to match its neighbour */
/* both columns end on the same line: the last card in each column takes up whatever height is left */
.acct2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 16px; align-items: stretch; }
.acol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* any height left over goes to the list-like cards, whose rows simply spread out - never to an empty block */
.acol > [data-k="player"], .acol > [data-k="help"] { flex: 1 1 auto; display: flex; flex-direction: column; }
.acol > [data-k="player"] .setting { flex: 1 1 auto; }
.acol > [data-k="help"] .links { flex: 1 1 auto; grid-auto-rows: 1fr; }
.acct2.measure { align-items: start; }
.acct2.measure .acol > .card { flex: none; }
.card.device .ver { margin-top: 6px; }
@media (max-width: 1023px) { .acct2 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; min-width: 0; }
.card h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card h3 svg { color: var(--accent2); width: 20px; height: 20px; }
.profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile .avatar { width: 64px; height: 64px; flex-basis: 64px; font-size: 26px; }
.profile h2 { margin: 0; font-size: 24px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 18px; }
.stat { background: var(--surface2); border: 1px solid var(--line2); border-radius: 12px; padding: 14px; }
.stat .k { color: var(--faint); font-size: 13px; }
.stat .v { font-size: 20px; font-weight: 700; margin-top: 2px; }
.stat .s { color: var(--muted); font-size: 13px; }
.meter { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--ok); }
.meter i.warn { background: var(--warn); } .meter i.bad { background: var(--bad); }
.kv { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px 12px; align-items: center; font-size: 14.5px; }
.kv .k { color: var(--faint); }
.kv code { font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; background: #081628; border: 1px solid var(--line2); border-radius: 8px; padding: 6px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.links { display: grid; gap: 8px; }
.links a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--line2); text-decoration: none; }
.links a:hover { border-color: var(--accent2); }
.links a .dotc { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.links a b { display: block; font-weight: 600; }
.links a span { color: var(--faint); font-size: 13px; }
.setting { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.setting:first-of-type { border-top: 0; padding-top: 0; }
.setting .l { flex: 1; min-width: 200px; }
.setting .l b { display: block; font-weight: 600; font-size: 15px; }
.setting .l span { color: var(--faint); font-size: 13px; }
.seg { display: inline-flex; background: #081628; border: 1px solid var(--line2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { background: none; border: 0; border-radius: 7px; padding: 6px 12px; font-size: 14px; color: var(--muted); }
.seg button.is-active { background: var(--accent); color: #fff; }
.switch { width: 46px; height: 26px; border-radius: 26px; background: var(--line2); border: 0; position: relative; flex: 0 0 46px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* ---------- search ---------- */
.bigsearch { max-width: 720px; }
.bigsearch .input { font-size: 18px; padding: 14px 14px 14px 44px; border-radius: 14px; }
.bigsearch svg { left: 14px; width: 22px; height: 22px; }

/* ---------- tabs (favourites) ---------- */
.tabs { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface2); color: #d5e2f6; }
.tabs button.is-active { background: var(--accent); border-color: var(--accent2); color: #fff; }

/* ---------- live / guide / catch-up switcher ---------- */
.tabs a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface2); color: #d5e2f6; text-decoration: none; font-size: 15px; }
.tabs a:hover { color: #fff; border-color: var(--accent2); }
.tabs a.is-active { background: var(--accent); border-color: var(--accent2); color: #fff; }
.livetabs { margin-bottom: 14px; }
@media (min-width: 760px), (orientation: landscape) and (min-width: 560px) { .livetabs { display: none; } }

/* ---------- tv guide ---------- */
.guide { --rowh: 66px; }
.g-scroll { position: relative; overflow: auto; height: calc(100vh - 150px); height: calc(100dvh - 150px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
@media (max-width: 759px) and (orientation: portrait) { .g-scroll { height: calc(100dvh - 250px - var(--safe-b)); } .guide { --rowh: 58px; } }
@media (orientation: landscape) and (max-height: 520px) { .g-scroll { height: calc(100dvh - 110px); } .guide { --rowh: 52px; } }
.g-inner { position: relative; }
.g-head { position: sticky; top: 0; z-index: 4; display: flex; height: 38px; background: var(--bar); border-bottom: 1px solid var(--line); }
.g-corner { position: sticky; left: 0; z-index: 5; width: var(--chw); flex: 0 0 var(--chw); background: var(--bar); border-right: 1px solid var(--line); }
.g-times { position: relative; }
.g-tick { position: absolute; top: 0; height: 38px; padding: 9px 8px; font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.g-tick b { color: #fff; }
.g-row { display: flex; height: var(--rowh); border-bottom: 1px solid var(--line); }
.g-ch {
  position: sticky; left: 0; z-index: 3; width: var(--chw); flex: 0 0 var(--chw); display: flex; align-items: center; gap: 10px; padding: 6px 10px;
  background: var(--surface); border: 0; border-right: 1px solid var(--line); color: inherit; text-align: left; min-width: 0;
}
.g-ch:hover { background: #10264a; }
.g-ch .logo { width: 54px; height: 38px; flex: 0 0 54px; border-radius: 6px; background: #081628; display: grid; place-items: center; position: relative; overflow: hidden; color: var(--faint); font-weight: 700; font-size: 12px; }
.g-ch .logo img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; }
.g-ch .nm { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-width: 0; }
.g-ch .nm i svg { width: 13px; height: 13px; vertical-align: -2px; margin-left: 4px; color: var(--accent2); }
@media (max-width: 559px) { .g-ch .nm { display: none; } .g-ch { justify-content: center; padding: 6px; } .g-ch .logo { width: 70px; flex-basis: 70px; } }
.g-line { position: relative; }
.g-load { position: absolute; inset: 8px 4px; border-radius: 8px; background: linear-gradient(90deg, var(--surface) 0, #10264a 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.4s ease infinite; }
.g-none { position: absolute; inset: 0; display: flex; align-items: center; padding-left: 14px; color: var(--faint); font-size: 13px; }
.g-p {
  position: absolute; top: 5px; bottom: 5px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line2); background: var(--surface2);
  color: inherit; text-align: left; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0;
}
.g-p b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-p span { font-size: 12px; color: var(--faint); white-space: nowrap; }
.g-p:hover { border-color: var(--accent2); background: #14325c; z-index: 1; }
.g-p.past { background: #0a1729; color: #9fb0c8; }
.g-p.past.rep { background: #0d1f3a; color: #c9d6ec; }
.g-p.on { background: #16306a; border-color: var(--accent2); color: #fff; }
.g-p.on span { color: #c9d6ec; }
.g-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 2; pointer-events: none; box-shadow: 0 0 8px rgba(255, 122, 133, .6); }

.sheet { position: fixed; inset: 0; z-index: 90; background: rgba(3, 8, 16, .6); display: flex; align-items: flex-end; justify-content: center; padding: 16px; padding-bottom: calc(16px + var(--safe-b)); }
@media (min-width: 760px) { .sheet { align-items: center; } }
.sheet-card { position: relative; width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line2); border-radius: 18px; padding: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.sheet-card h3 { margin: 6px 40px 8px 0; font-size: 21px; }
.sheet-card .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.sheet-x { position: absolute; top: 14px; right: 14px; }

/* ---------- catch-up ---------- */
.cu-head { margin-bottom: 14px; }
.cu-ch { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cu-ch h1 { margin: 0; font-size: 24px; }
.cu-ch .logo { width: 76px; height: 52px; border-radius: 10px; background: #081628; display: grid; place-items: center; position: relative; overflow: hidden; color: var(--faint); font-weight: 700; }
.cu-ch .logo img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; }
.cu-ch .btn { margin-left: auto; }
.cu-list { display: flex; flex-direction: column; gap: 6px; max-width: 980px; }
.cu-p { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: inherit; text-align: left; width: 100%; }
.cu-p:hover { border-color: var(--accent2); background: #0f2342; }
.cu-p time { width: 52px; flex: 0 0 52px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cu-p .t { flex: 1; min-width: 0; }
.cu-p .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-p .t span { display: block; color: var(--faint); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-p svg { color: var(--accent2); }
.cu-p.dim { opacity: .6; }

/* ---------- parental lock ---------- */
.cats li button svg.lk { width: 15px; height: 15px; color: var(--warn); flex: 0 0 15px; align-self: center; }
.pin-card { text-align: center; max-width: 380px; }
.pin-card h3 { margin: 6px 0 4px; }
.pin-card .pin-ico { width: 54px; height: 54px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); border: 1px solid var(--line2); color: var(--warn); }
.pin-card .pin-in { font-size: 30px; letter-spacing: .6em; text-align: center; padding: 10px 0 10px .6em; max-width: 220px; margin: 14px auto 0; display: block; font-family: Consolas, ui-monospace, monospace; }
.pin-card .err { color: var(--bad); min-height: 1.3em; margin-top: 8px; font-size: 14px; }
.pin-card .acts { justify-content: center; margin-top: 8px; }
.pin-card .acts .btn { min-width: 160px; }
.pc-list { padding: 6px 20px; }
.pc-list .setting { border-top: 1px solid var(--line); padding: 12px 0; }
.pc-list .setting:first-child { border-top: 0; }
ol.steps { margin: 0; padding-left: 20px; color: #cfdaeb; display: grid; gap: 6px; }
.plats { display: grid; gap: 10px; }
.plat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; background: rgba(8, 22, 40, .45); }
.plat.mine { border-color: #2d568f; background: var(--surface2); }
.plat-h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.plat-h .pill { font-size: 11.5px; padding: 1px 8px; color: var(--accent2); border-color: #2d568f; }
.plat ol.steps { font-size: 13.5px; gap: 3px; }
.plat:not(.mine) ol.steps { color: var(--muted); }

/* ---------- sport ---------- */
.fxlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 10px; }
@media (max-width: 559px) { .fxlist { grid-template-columns: 1fr; } }
.fx { position: relative; display: flex; gap: 14px; padding: 14px 16px; border-radius: 10px; background: rgba(12, 28, 52, .7); min-width: 0; overflow: hidden; }
.fx.live::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #e0253f; }
.fx.done { opacity: .6; }
.fx-time { width: 58px; flex: 0 0 58px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.fx-time .livebadge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; border-radius: 5px; background: #c8102e; color: #fff; }
.fx-time .livebadge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.fx-main { min-width: 0; flex: 1; }
.fx-t { font-weight: 600; }
.fx-sport { color: var(--faint); font-size: 13px; margin: 2px 0 8px; }
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; vertical-align: 1px; }
.tabs a .n { color: var(--faint); font-size: 12px; margin-left: 2px; }
.tabs a.is-active .n { color: rgba(255, 255, 255, .7); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line2); background: #081628; color: var(--faint); }
.chip.ok { color: #fff; background: var(--surface2); border-color: #2d568f; }
.chip.ok:hover { background: var(--accent); border-color: var(--accent2); }
.chip svg.i { width: 13px; height: 13px; color: var(--accent2); }
.chip.ok:hover svg.i { color: #fff; }
#sports { margin-top: 4px; }

/* ---------- player ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: #000; }
.pl { position: absolute; inset: 0; background: #000; overflow: hidden; user-select: none; -webkit-user-select: none; color: #fff; }
.pl:focus { outline: none; }
.pl video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.pl.fit-cover video { object-fit: cover; }
.pl.fit-fill video { object-fit: fill; }
.pl .tap { position: absolute; inset: 0; z-index: 1; }
.pl .ui { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 1; transition: opacity .25s; }
.pl.idle .ui { opacity: 0; }
.pl.idle { cursor: none; }
.pl .ui > * { pointer-events: auto; }
.pl .top, .pl .bot { position: absolute; left: 0; right: 0; padding: 14px 18px; }
.pl .top { top: 0; display: flex; align-items: center; gap: 12px; background: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent); padding-top: max(14px, env(safe-area-inset-top)); }
.pl .bot { bottom: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.pl .titles { min-width: 0; flex: 1; }
.pl .titles b { display: block; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .titles span { display: block; font-size: 13.5px; color: #c9d6ec; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .pb { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: #fff; flex: 0 0 auto; }
.pl .pb:hover { background: rgba(255, 255, 255, .14); }
.pl .pb svg.i { width: 24px; height: 24px; }
.pl .pb.glass { background: rgba(8, 22, 40, .6); border: 1px solid rgba(255, 255, 255, .12); }
.pl .mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 36px; }
.pl.loading .mid { visibility: hidden; }
@media (hover: hover) { .pl:not(.paused) .mid { visibility: hidden; } }
.pl .mid .pb { width: 56px; height: 56px; background: rgba(8, 22, 40, .55); }
.pl .mid .big { width: 76px; height: 76px; background: rgba(55, 93, 255, .9); }
.pl .mid .big svg.i { width: 34px; height: 34px; }
.pl .row { display: flex; align-items: center; gap: 4px; }
.pl .row .grow { flex: 1; }
.pl .time { font-size: 13.5px; font-variant-numeric: tabular-nums; color: #dfe7f5; padding: 0 6px; white-space: nowrap; }
.pl .seek { position: relative; height: 22px; margin: 0 4px 4px; cursor: pointer; touch-action: none; }
.pl .seek .track { position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; transition: height .1s, top .1s; }
.pl .seek:hover .track { top: 8px; height: 6px; }
.pl .seek .buf { position: absolute; inset: 0 auto 0 0; background: rgba(255, 255, 255, .35); }
.pl .seek .done { position: absolute; inset: 0 auto 0 0; background: var(--accent2); }
.pl .seek .knob { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(93, 130, 255, .35); }
.pl .seek .hint { position: absolute; bottom: 24px; transform: translateX(-50%); background: rgba(8, 22, 40, .92); border: 1px solid var(--line2); padding: 2px 8px; border-radius: 6px; font-size: 12.5px; display: none; }
.pl .seek:hover .hint { display: block; }
.pl .livebadge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 3px 9px; border-radius: 6px; background: #c8102e; }
.pl .livebadge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.pl .prog-live { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #dfe7f5; min-width: 0; padding: 0 6px; }
.pl .prog-live .track { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; min-width: 60px; }
.pl .prog-live .track i { display: block; height: 100%; background: var(--accent2); }
.pl .vol { display: flex; align-items: center; }
.pl .vol input { width: 0; opacity: 0; transition: width .15s, opacity .15s; accent-color: var(--accent2); }
.pl .vol:hover input, .pl .vol input:focus { width: 90px; opacity: 1; }
.pl .spin { position: absolute; left: 50%; top: 50%; margin: -22px 0 0 -22px; width: 44px; height: 44px; z-index: 3; border-color: rgba(255, 255, 255, .2); border-top-color: #fff; pointer-events: none; }
.pl .msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; background: rgba(8, 22, 40, .95); border: 1px solid var(--line2); border-radius: 14px; padding: 18px 22px; max-width: min(440px, 90%); text-align: center; }
.pl .msg p { margin: 0 0 12px; }
.pl .msg .acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pl .menu {
  position: absolute; right: 14px; bottom: 76px; z-index: 5; width: 290px; max-height: calc(100% - 100px); overflow-y: auto;
  background: rgba(8, 22, 40, .97); border: 1px solid var(--line2); border-radius: 14px; padding: 6px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}
.pl .menu .mh { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-weight: 600; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pl .menu .mh button { background: none; border: 0; color: var(--muted); padding: 2px; display: grid; }
.pl .menu .mi { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 10px; border: 0; border-radius: 9px; background: none; color: #e8eef8; text-align: left; font-size: 14.5px; }
.pl .menu .mi:hover { background: var(--surface2); }
.pl .menu .mi .v { margin-left: auto; color: var(--faint); font-size: 13.5px; }
.pl .menu .mi.info { cursor: default; color: var(--faint); font-size: 13.5px; border-top: 1px solid var(--line); border-radius: 0; margin-top: 4px; }
.pl .menu .mi.info:hover { background: none; }
.pl .menu .mi.sel::after { content: "✓"; margin-left: auto; color: var(--accent2); font-weight: 700; }
.pl .upnext { position: absolute; right: 18px; bottom: 96px; z-index: 4; width: 300px; background: rgba(8, 22, 40, .96); border: 1px solid var(--line2); border-radius: 14px; padding: 14px; }
.pl .upnext .k { color: var(--accent2); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pl .upnext .tt { font-weight: 600; margin: 4px 0 10px; }
.pl .upnext .acts { display: flex; gap: 8px; }
.pl .ripple { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(255, 255, 255, .15); border-radius: 50%; width: 110px; height: 110px; display: grid; place-items: center; font-weight: 700; pointer-events: none; animation: rip .6s ease forwards; }
@keyframes rip { from { opacity: 1; } to { opacity: 0; } }
.pl .chosd { position: absolute; top: 70px; right: 18px; z-index: 3; background: rgba(8, 22, 40, .9); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 14px; font-size: 18px; font-weight: 700; }
/* inline (preview) version */
.pl.inline .top { padding: 8px 10px; }
.pl.inline .titles b { font-size: 14px; }
.pl.inline .titles span, .pl.inline .mid .pb:not(.big), .pl.inline .hide-inline { display: none; }
.pl.inline .mid .big { width: 58px; height: 58px; }
.pl.inline .bot { padding: 6px 8px; }
.pl.inline .menu { bottom: 52px; right: 8px; width: 240px; }
.pl:not(.inline) .show-inline { display: none; }
@media (max-width: 559px), (max-height: 520px) {
  .pl .mid { gap: 22px; }
  .pl .vol input { display: none; }
  .pl .hide-sm { display: none; }
  .pl .upnext { left: 12px; right: 12px; width: auto; bottom: 86px; }
}

.toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translateX(-50%) translateY(20px); z-index: 200; background: rgba(12, 28, 52, .97); border: 1px solid var(--line2); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.toast.on { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.toast button { background: none; border: 0; color: var(--accent2); font-weight: 600; padding: 0; }
@media (min-width: 760px) { .toast { bottom: 24px; } }
