/* ─────────────────────────────────────────────────────────────────────────────
   TV2 — «Nocturne» design system
   Σκούρο, κινηματογραφικό περιβάλλον · ζεστό φως · ελληνική τυπογραφία
   ───────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/inter-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/ebgaramond-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/ebgaramond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/ebgaramond-italic-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/ebgaramond-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --ink: #08070b;
  --ink-2: #0c0a10;
  --ink-3: #120f17;
  --text: #f7f2ea;
  --text-soft: #d9d1da;
  --muted: #b3a8b6;
  --muted-2: #918697;

  --accent: #ff3b52;
  --accent-deep: #c41235;
  --accent-soft: rgba(255, 59, 82, .14);
  --gold: #f2c078;
  --mint: #63e3c8;

  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --line-3: rgba(255, 255, 255, .2);
  --glass: rgba(19, 15, 24, .58);
  --glass-2: rgba(24, 19, 30, .84);
  --plate: rgba(255, 255, 255, .045);
  --plate-2: rgba(255, 255, 255, .075);

  --bg-top: rgba(8, 7, 11, .94);
  --card-shadow: 0 30px 60px -40px rgba(0, 0, 0, .95);
  --glow: 351 100% 62%;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

[data-theme="light"] {
  --ink: #f4efe6;
  --ink-2: #efe8dc;
  --ink-3: #e8dfd1;
  --text: #19131b;
  --text-soft: #362d3a;
  --muted: #5f5365;
  --muted-2: #736777;

  --accent: #d81f3f;
  --accent-deep: #a80f2b;
  --accent-soft: rgba(216, 31, 63, .10);
  --gold: #a96d18;
  --mint: #127e6a;

  --line: rgba(25, 19, 27, .10);
  --line-2: rgba(25, 19, 27, .16);
  --line-3: rgba(25, 19, 27, .24);
  --glass: rgba(255, 253, 249, .66);
  --glass-2: rgba(255, 253, 249, .92);
  --plate: rgba(25, 19, 27, .035);
  --plate-2: rgba(25, 19, 27, .06);

  --bg-top: rgba(244, 239, 230, .95);
  --card-shadow: 0 30px 50px -38px rgba(42, 28, 20, .45);
  --glow: 351 70% 52%;
}

* { box-sizing: border-box; }

html { height: 100%; scroll-behavior: smooth; color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sprite symbol { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.ic {
  width: 19px; height: 19px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

.skip-link {
  position: fixed; left: 16px; top: -100px; z-index: 200;
  padding: 12px 18px; border-radius: 12px;
  background: var(--accent); color: #fff; font-weight: 650; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ─────────────────────────────────────────────────────────── atmosphere ── */
.atmosphere {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1200px 820px at 82% -14%, rgba(255, 59, 82, .13), transparent 62%),
    radial-gradient(900px 700px at 4% 4%, rgba(99, 227, 200, .055), transparent 60%),
    radial-gradient(820px 640px at 58% 106%, rgba(242, 192, 120, .055), transparent 62%),
    var(--ink);
}
[data-theme="light"] .atmosphere {
  background:
    radial-gradient(1200px 820px at 82% -14%, rgba(216, 31, 63, .09), transparent 62%),
    radial-gradient(900px 700px at 4% 4%, rgba(18, 126, 106, .05), transparent 60%),
    radial-gradient(820px 640px at 58% 106%, rgba(169, 109, 24, .06), transparent 62%),
    var(--ink);
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .38; mix-blend-mode: screen;
  animation: drift 26s var(--ease) infinite alternate;
}
[data-theme="light"] .orb { mix-blend-mode: multiply; opacity: .16; }
.orb-a { width: 560px; height: 560px; right: 4%; top: -190px; background: #ff2a4a; opacity: .32; }
.orb-b { width: 480px; height: 480px; left: -170px; top: 26%; background: #1c8e7c; animation-delay: -9s; opacity: .19; }
.orb-c { width: 520px; height: 520px; right: 18%; bottom: -280px; background: #c2792f; animation-delay: -17s; opacity: .16; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(28px, 22px, 0) scale(1.06); }
  100% { transform: translate3d(-24px, 34px, 0) scale(.97); }
}
.grain {
  position: absolute; inset: 0; opacity: .045; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
[data-theme="light"] .grain { opacity: .028; }

/* ───────────────────────────────────────────────────────────────── layout ── */
.app {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  max-width: 1840px;
  margin: 0 auto;
  min-height: 100vh;
}

.main {
  min-width: 0;
  padding: 0 clamp(20px, 3vw, 46px) 44px;
}

/* ─────────────────────────────────────────────────────────────────── rail ── */
.rail {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  padding: 26px 18px 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 34%);
  z-index: 45;
}
[data-theme="light"] .rail { background: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 34%); }

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 2px 8px 2px 4px;
  text-decoration: none; color: inherit;
  flex: none;
}
.brand-mark {
  position: relative; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 49px; height: 49px;
  border-radius: 15px;
  background:
    radial-gradient(120% 120% at 28% 18%, #ff6a75 0%, transparent 48%),
    linear-gradient(145deg, #ff3550 4%, #b20d2f 92%);
  color: #fff;
  font-size: 14.5px; font-weight: 780; letter-spacing: -.035em;
  box-shadow:
    0 14px 30px -12px rgba(255, 45, 74, .75),
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 -1px 0 rgba(0, 0, 0, .28);
  text-shadow: 0 1px 2px rgba(80, 0, 12, .45);
}
.brand-mark span { color: #ffe0a8; margin-left: 1px; }
.brand-mark::after {
  content: ""; position: absolute; inset: 1px;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16);
  pointer-events: none;
}
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 10.5px; }
.brand-mark.small::after { border-radius: 9px; }

.brand-copy { display: flex; flex-direction: column; line-height: 1.18; min-width: 0; }
.brand-copy strong { font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
.brand-copy small { color: var(--muted-2); font-size: 10.5px; letter-spacing: .04em; }

.rail-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  margin: 26px -6px 14px;
  padding: 0 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.rail-scroll::-webkit-scrollbar { width: 4px; }
.rail-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

.rail-nav { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: none;
  color: var(--muted);
  font-size: 12.8px; font-weight: 560; letter-spacing: -.005em;
  text-align: left; cursor: pointer;
  transition: color .18s, background .18s, border-color .18s;
}
.nav-item .ic { width: 16px; height: 16px; opacity: .85; }
.nav-item > span:not(.nav-count) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .nav-count {
  margin-left: auto; flex: none;
  color: var(--muted-2); font-size: 10.5px; font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.nav-item:hover { color: var(--text); background: var(--plate); }
.nav-item.on {
  color: var(--text);
  background: linear-gradient(90deg, rgba(255, 59, 82, .15), rgba(255, 59, 82, .025) 78%);
  border-color: rgba(255, 59, 82, .19);
}
[data-theme="light"] .nav-item.on {
  background: linear-gradient(90deg, rgba(216, 31, 63, .11), rgba(216, 31, 63, .015) 78%);
  border-color: rgba(216, 31, 63, .16);
}
.nav-item.on::before {
  content: ""; position: absolute; left: -7px; top: 50%;
  width: 3px; height: 18px; border-radius: 3px;
  background: var(--accent);
  transform: translateY(-50%);
  box-shadow: 0 0 14px var(--accent);
}
.nav-item.on .nav-count { color: var(--text-soft); }
.nav-item.on .ic { color: var(--accent); opacity: 1; }

.rail-label {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 10px 9px;
  color: var(--muted-2);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
}
.rail-label i { flex: 1; height: 1px; background: var(--line); }

.rail-foot { flex: none; display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.foot-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 9px; border-radius: 11px;
  text-decoration: none; color: var(--muted);
  transition: background .18s, color .18s;
}
.foot-link:hover { background: var(--plate); color: var(--text); }
.foot-ic {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--plate);
  color: var(--muted);
}
.foot-ic .ic { width: 15px; height: 15px; }
.foot-link span:last-child { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.foot-link b { font-size: 11.5px; font-weight: 600; }
.foot-link small { font-size: 9.8px; color: var(--muted-2); }

.status-card {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px; padding: 9px 11px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  color: var(--muted-2); font-size: 10.5px;
}
.status-dot {
  width: 6px; height: 6px; flex: none; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(99, 227, 200, .55);
  animation: statusPulse 2.6s infinite;
}
@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 227, 200, .45); }
  70% { box-shadow: 0 0 0 7px rgba(99, 227, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 227, 200, 0); }
}

/* ───────────────────────────────────────────────────────────────── topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 15px 0;
  background: var(--bg-top);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border-bottom: 1px solid transparent;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.topbar-brand { display: none; text-decoration: none; }

.search-trigger {
  display: flex; align-items: center; gap: 10px;
  width: min(510px, 100%);
  height: 43px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--plate);
  color: var(--muted);
  text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
}
.search-trigger:hover {
  border-color: var(--line-2); background: var(--plate-2); color: var(--text-soft);
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .9);
}
.search-trigger span { flex: 1; min-width: 0; font-size: 12.8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-trigger kbd {
  flex: none;
  padding: 3px 6px; border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--plate);
  color: var(--muted-2);
  font-family: var(--font-sans); font-size: 10px; font-weight: 600;
}

.top-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--plate);
  color: var(--text-soft);
  font-size: 12.3px; font-weight: 600; letter-spacing: -.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s, opacity .18s;
}
.btn .ic { width: 17px; height: 17px; }
.btn:hover { background: var(--plate-2); border-color: var(--line-2); color: var(--text); }
.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled { opacity: .34; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--plate); }
.btn.icon { width: 42px; padding: 0; }
.btn.small { height: 34px; padding: 0 11px; font-size: 11.5px; border-radius: 10px; }
.btn.icon.small { width: 34px; }
.btn.primary {
  background: linear-gradient(145deg, #ff455b, #c21538);
  border-color: rgba(255, 255, 255, .12);
  color: #fff;
  box-shadow: 0 14px 34px -16px rgba(255, 45, 74, .85), inset 0 1px 0 rgba(255, 255, 255, .24);
}
.btn.primary:hover { background: linear-gradient(145deg, #ff5a6c, #cd1a3e); border-color: rgba(255, 255, 255, .2); }
.btn.glass {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .16);
  color: #fff;
  backdrop-filter: blur(10px);
}
[data-theme="light"] .btn.glass { background: rgba(255, 255, 255, .55); color: var(--text); border-color: rgba(25, 19, 27, .12); }
.btn.glass:hover { background: rgba(255, 255, 255, .12); }
[data-theme="light"] .btn.glass:hover { background: #fff; }

#themeBtn { position: relative; }
#themeBtn .ic { position: absolute; transition: opacity .25s, transform .3s var(--ease); }
#themeBtn .ic-sun { opacity: 0; transform: rotate(-45deg) scale(.7); }
#themeBtn .ic-moon { opacity: 1; transform: none; }
[data-theme="light"] #themeBtn .ic-sun { opacity: 1; transform: none; }
[data-theme="light"] #themeBtn .ic-moon { opacity: 0; transform: rotate(45deg) scale(.7); }

.mobile-filters { display: none; }

/* ────────────────────────────────────────────────────────────────── stage ── */
.stage { position: relative; margin-top: 6px; }

.player {
  position: relative;
  color: var(--text);
  --text: #f7f2ea;
  --text-soft: #e8e0e8;
  --muted: #b4a8b6;
  --muted-2: #948897;
  --gold: #ffd18a;
  --line: rgba(255, 255, 255, .14);
  --line-2: rgba(255, 255, 255, .2);
  aspect-ratio: 16 / 9;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background: #000;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 70px 120px -70px hsl(var(--glow) / .55),
    0 40px 80px -50px rgba(0, 0, 0, .95);
  transition: box-shadow .6s var(--ease);
}
.player video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block; object-fit: contain;
  background: #000;
}
.player[data-state="idle"] video { opacity: 0; pointer-events: none; }
.player[data-state="error"] video { opacity: 0; }

.player::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .055), inset 0 -90px 120px -80px rgba(0, 0, 0, .8);
  border-radius: inherit;
}

/* idle */
.idle {
  position: absolute; inset: 0; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
  align-items: center;
  gap: clamp(18px, 4vw, 56px);
  padding: clamp(22px, 3.8vw, 52px);
  overflow: hidden;
}
.idle[hidden] { display: none; }
.idle::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 120% at 20% 110%, rgba(255, 59, 82, .16), transparent 55%),
    linear-gradient(180deg, rgba(6, 5, 9, .1) 0%, rgba(6, 5, 9, .3) 48%, rgba(6, 5, 9, .84) 100%);
  z-index: -1;
}
.idle-art {
  position: absolute; inset: -22%;
  background-position: center; background-repeat: no-repeat; background-size: contain;
  filter: blur(58px) saturate(1.5) brightness(.72);
  opacity: .24;
  transform: scale(1.15);
  mix-blend-mode: screen;
  pointer-events: none;
}
.idle-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(90% 100% at 50% 100%, #000 5%, transparent 72%);
  -webkit-mask-image: radial-gradient(90% 100% at 50% 100%, #000 5%, transparent 72%);
  opacity: .55;
  pointer-events: none;
}
.idle-copy { position: relative; z-index: 2; min-width: 0; align-self: center; animation: fadeUp .8s var(--ease-out) both; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0;
  color: var(--text-soft);
  font-size: 10px; font-weight: 650;
  letter-spacing: .19em; text-transform: uppercase;
}
.live-dot {
  width: 6px; height: 6px; flex: none; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 59, 82, .55);
  animation: livePulse 1.9s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 82, .5); }
  65% { box-shadow: 0 0 0 7px rgba(255, 59, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 82, 0); }
}

.idle h1 {
  margin: 14px 0 12px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 4.55vw, 68px);
  line-height: .96;
  letter-spacing: -.028em;
  text-wrap: balance;
  text-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.idle h1 em { font-style: italic; color: var(--gold); }
.idle-lede {
  max-width: 52ch; margin: 0;
  color: var(--text-soft); font-size: 13px; line-height: 1.6;
  text-shadow: 0 1px 20px rgba(0, 0, 0, .4);
}
.idle-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: clamp(16px, 2.2vw, 26px); }
.idle-actions .btn { height: 44px; padding: 0 18px; font-size: 12.6px; }
.player .btn.glass { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .2); color: #fff; }
.player .btn.glass:hover { background: rgba(255, 255, 255, .15); }

.idle-feature {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 8px;
  border: 0; background: none; color: inherit;
  cursor: pointer;
  animation: fadeUp .9s .1s var(--ease-out) both;
}
.disc {
  position: relative;
  width: clamp(150px, 17vw, 216px);
  aspect-ratio: 1;
  display: grid; place-items: center;
}
.disc-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .13);
  animation: discSpin 26s linear infinite;
}
.disc-ring.r1 { inset: 0; border-style: dashed; border-color: rgba(255, 255, 255, .16); }
.disc-ring.r2 { inset: 11%; border-color: rgba(255, 255, 255, .1); animation-direction: reverse; animation-duration: 34s; }
.disc-ring.r3 { inset: 22%; border-color: rgba(255, 255, 255, .08); animation-duration: 18s; }
.disc-ring.r1::after {
  content: ""; position: absolute; top: -3px; left: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  transform: translateX(-50%);
}
@keyframes discSpin { to { transform: rotate(360deg); } }

.disc-core {
  position: relative;
  width: 66%; height: 66%;
  display: grid; place-items: center;
  padding: 17%;
  border-radius: 50%;
  background:
    radial-gradient(120% 120% at 30% 15%, rgba(255, 255, 255, .13), transparent 55%),
    rgba(13, 10, 17, .74);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(20px) saturate(1.3);
  box-shadow:
    0 0 80px hsl(var(--glow) / .38),
    inset 0 1px 0 rgba(255, 255, 255, .16);
  overflow: hidden;
}
.disc-core img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .4)); }
.disc-core .initial { font-family: var(--font-serif); font-size: clamp(24px, 3vw, 38px); font-weight: 600; color: var(--text-soft); }

.disc-play {
  position: absolute; right: 5%; bottom: 5%;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(255, 45, 74, .8), inset 0 1px 0 rgba(255, 255, 255, .3);
  transform: scale(.92);
  transition: transform .25s var(--ease-out), background .2s;
}
.idle-feature:hover .disc-play { transform: scale(1.06); background: #ff4a60; }
.disc-play .ic { width: 17px; height: 17px; margin-left: 2px; }

.feature-meta { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; min-width: 0; width: 100%; }
.feature-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 9px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
}
.feature-kicker .live-dot { width: 5px; height: 5px; }
.feature-meta strong { font-family: var(--font-serif); font-size: clamp(20px, 2vw, 27px); font-weight: 600; letter-spacing: -.01em; }
.feature-program {
  max-width: 100%;
  color: var(--text-soft); font-size: 11.5px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feature-time { color: var(--muted-2); font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* error */
.player-error {
  color: var(--text);
  --text: #f7f2ea;
  --text-soft: #e8e0e8;
  --muted: #b4a8b6;
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 24px; text-align: center;
  background:
    radial-gradient(70% 80% at 50% 10%, rgba(255, 59, 82, .12), transparent 65%),
    linear-gradient(180deg, rgba(10, 8, 13, .94), rgba(6, 5, 9, .98));
}
.player-error[hidden] { display: none; }
.error-ic { width: 38px; height: 38px; color: var(--accent); stroke-width: 1.4; margin-bottom: 4px; }
.player-error strong { font-family: var(--font-serif); font-size: 22px; font-weight: 600; }
.player-error > span { max-width: 440px; color: var(--muted); font-size: 12.5px; }
.perr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }

/* embed */
.embed { position: absolute; inset: 0; z-index: 2; background: #000; }
.embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* loading */
.player-loading {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(5, 4, 8, .48);
  backdrop-filter: blur(3px);
  color: var(--text);
  font-size: 10px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase;
  pointer-events: none;
}
.player-loading[hidden] { display: none; }
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .14);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
  box-shadow: 0 0 24px rgba(255, 59, 82, .25);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* chrome */
.player-chrome {
  position: absolute; inset: 0; z-index: 5;
  padding: 15px;
  display: flex; align-items: flex-start; justify-content: space-between;
  pointer-events: none;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: 999px;
  background: rgba(8, 6, 10, .62);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: .14em;
}
.live-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: blink 1.8s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.quality-chip {
  height: 26px; padding: 0 9px;
  display: inline-flex; align-items: center;
  border-radius: 8px;
  background: rgba(8, 6, 10, .62);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, .9);
  font-size: 9.5px; font-weight: 750; letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}

.player:fullscreen { border: 0; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.player:fullscreen video { object-fit: contain; }
.player:fullscreen .player-chrome { padding: 26px; }
.player:fullscreen .live-pill, .player:fullscreen .quality-chip { height: 34px; font-size: 11px; padding: 0 14px; }

/* deck */
.deck {
  position: relative; z-index: 6;
  display: flex; align-items: center; gap: 14px;
  margin: 14px clamp(12px, 2.4vw, 30px) 0;
  padding: 13px 16px;
  border-radius: 19px;
  border: 1px solid var(--line-2);
  background: var(--glass-2);
  backdrop-filter: blur(26px) saturate(1.45);
  -webkit-backdrop-filter: blur(26px) saturate(1.45);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.deck-logo {
  position: relative;
  flex: none;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  padding: 9px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, .12);
  background:
    radial-gradient(100% 100% at 30% 10%, rgba(255, 255, 255, .1), transparent 55%),
    linear-gradient(170deg, #121017, #09070c);
  overflow: hidden;
}
.deck-logo img { position: absolute; inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35)); }
.deck-logo .initial { font-family: var(--font-serif); font-size: 19px; font-weight: 600; color: rgba(255, 255, 255, .55); }
.deck-meta { flex: 1; min-width: 0; }
.deck-kicker {
  display: flex; align-items: center; gap: 9px;
  color: var(--muted); font-size: 9px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
}
.deck-kicker #nowKicker { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-clock { margin-left: auto; flex: none; color: var(--muted-2); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.deck-meta h2 {
  margin: 3px 0 0;
  font-family: var(--font-serif);
  font-size: 23px; font-weight: 600; letter-spacing: -.012em; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.deck-meta > p {
  margin: 2px 0 0;
  color: var(--muted); font-size: 11.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.deck-progress { margin-top: 7px; max-width: 640px; }
.progress-track { height: 3px; border-radius: 3px; background: var(--plate-2); overflow: hidden; }
.progress-track i {
  display: block; height: 100%; width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  box-shadow: 0 0 12px hsl(var(--glow) / .5);
  transition: width 1s linear;
}
.progress-meta {
  display: flex; gap: 12px; margin-top: 4px;
  color: var(--muted-2); font-size: 9.5px; font-variant-numeric: tabular-nums;
}
#deckNext { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.deck-actions { display: flex; align-items: center; gap: 5px; flex: none; }
.deck-actions .btn.icon { width: 38px; height: 38px; }
.deck-actions .btn.icon .ic { width: 16px; height: 16px; }
.deck-sep { width: 1px; height: 22px; background: var(--line); margin: 0 3px; }
#favBtn.on { color: var(--gold); border-color: rgba(242, 192, 120, .34); background: rgba(242, 192, 120, .1); }
#favBtn.on .ic { fill: currentColor; }
#siteBtn[hidden], #pipBtn[hidden] { display: none; }

/* ──────────────────────────────────────────────────────────────── sections ── */
.section { margin-top: clamp(34px, 4vw, 56px); scroll-margin-top: 86px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  margin-bottom: 16px;
}
.section-head > div { min-width: 0; }
.section-eyebrow {
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 9.5px; font-weight: 750;
  letter-spacing: .2em; text-transform: uppercase;
}
.section-eyebrow .live-dot { width: 5px; height: 5px; }
.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(27px, 2.5vw, 38px);
  font-weight: 500; line-height: 1.05; letter-spacing: -.018em;
}
.section-sub { margin: 6px 0 0; color: var(--muted); font-size: 11.5px; }

.text-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 2px;
  border: 0; background: none;
  color: var(--text-soft);
  font-size: 11.5px; font-weight: 620;
  cursor: pointer;
  transition: color .18s, gap .18s;
}
.text-btn span { color: var(--accent); font-size: 14px; line-height: 1; }
.text-btn:hover { color: var(--text); gap: 11px; }

.hscroll {
  display: flex; gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 3px 2px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hscroll::-webkit-scrollbar { display: none; }

.now-card {
  position: relative;
  flex: 0 0 292px;
  scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 164px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background:
    radial-gradient(120% 120% at 100% 0%, hsl(var(--glow) / .12), transparent 55%),
    linear-gradient(160deg, var(--plate-2), rgba(255, 255, 255, .008));
  color: inherit; text-align: left; cursor: pointer;
  overflow: hidden;
  transition: transform .25s var(--ease-out), border-color .25s, background .25s, box-shadow .25s;
  animation: cardIn .5s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}
.now-card::before {
  content: ""; position: absolute; inset: -60% 40% auto -30%;
  height: 120%; border-radius: 50%;
  background: hsl(var(--glow) / .22);
  filter: blur(50px);
  opacity: .55;
  pointer-events: none;
}
.now-card:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--glow) / .38);
  box-shadow: 0 26px 50px -32px rgba(0, 0, 0, .9);
}
.now-card:focus-visible { outline-offset: 2px; }
.now-card.playing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 24px 46px -30px rgba(255, 59, 82, .5); }
.now-card.playing .now-live { background: var(--accent); border-color: transparent; color: #fff; }
.now-card.playing .now-live .dot { display: none; }
.now-top { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; }
.now-logo {
  position: relative;
  width: 31px; height: 31px; flex: none;
  display: grid; place-items: center; padding: 5px;
  border-radius: 9px;
  background: linear-gradient(170deg, #121017, #09070c);
  border: 1px solid rgba(255, 255, 255, .1);
  overflow: hidden;
}
.now-logo img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; }
.now-logo .initial { font-family: var(--font-serif); font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .5); }
.now-channel { font-size: 11.5px; font-weight: 650; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-live {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 59, 82, .13);
  border: 1px solid rgba(255, 59, 82, .24);
  color: #ff8b96;
  font-size: 8px; font-weight: 800; letter-spacing: .12em;
}
[data-theme="light"] .now-live { color: var(--accent); }
.now-live .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.now-title {
  position: relative;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 600; line-height: 1.12; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.24em;
}
.now-time {
  position: relative;
  margin-top: auto;
  display: flex; align-items: center; gap: 9px;
  color: var(--muted-2); font-size: 9.5px; font-variant-numeric: tabular-nums;
}
.now-bar { flex: 1; height: 2px; border-radius: 2px; background: var(--plate-2); overflow: hidden; }
.now-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width 1s linear; }
.now-pct { flex: none; color: var(--text-soft); font-size: 9px; font-weight: 650; }

/* channels */
.channels-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.toggle {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--plate);
  color: var(--muted);
  font-size: 11px; font-weight: 620;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.toggle:hover { color: var(--text); border-color: var(--line-2); }
.toggle-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); transition: background .18s, box-shadow .18s; }
.toggle[aria-pressed="true"] { color: var(--text); border-color: rgba(255, 59, 82, .3); background: var(--accent-soft); }
.toggle[aria-pressed="true"] .toggle-dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(255, 59, 82, .13); }

.sort { position: relative; display: inline-flex; align-items: center; gap: 7px; }
.sort > span { color: var(--muted-2); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; }
.sort select {
  appearance: none; -webkit-appearance: none;
  height: 36px; padding: 0 30px 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted-2) 50%) calc(100% - 15px) 15px / 5px 5px no-repeat,
    linear-gradient(135deg, var(--muted-2) 50%, transparent 50%) calc(100% - 10px) 15px / 5px 5px no-repeat,
    var(--plate);
  color: var(--text-soft);
  font-size: 11px; font-weight: 600;
  cursor: pointer;
}
.sort select option { background: var(--ink-3); color: var(--text); }

.chips {
  display: none;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 12px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--plate);
  color: var(--muted);
  font-size: 11.3px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.chip .ic { width: 14px; height: 14px; }
.chip.on { color: var(--text); border-color: rgba(255, 59, 82, .35); background: var(--accent-soft); }
.chip.on .ic { color: var(--accent); }
.chip .chip-count { color: var(--muted-2); font-size: 9.5px; font-variant-numeric: tabular-nums; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 13px;
}

.ch-card {
  position: relative;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 17px;
  background:
    radial-gradient(120% 110% at 78% 0%, hsl(var(--glow) / .13), transparent 56%),
    linear-gradient(168deg, var(--plate-2), rgba(255, 255, 255, .012));
  color: inherit; text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform .28s var(--ease-out), border-color .24s, box-shadow .28s, background .24s;
  animation: cardIn .48s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 17ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.grid.steady .ch-card { animation: none; }
.ch-card::before {
  content: ""; position: absolute; inset: -70% 25% auto -25%;
  height: 130%;
  border-radius: 50%;
  background: hsl(var(--glow) / .26);
  filter: blur(48px);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.ch-card:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--glow) / .34);
  box-shadow: 0 30px 54px -34px rgba(0, 0, 0, .95);
}
.ch-card:hover::before { opacity: .8; }
.ch-card:focus-visible { outline-offset: 2px; }
.ch-card.playing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 28px 54px -34px rgba(255, 59, 82, .6); }
.ch-card.playing::before { opacity: 1; background: rgba(255, 59, 82, .28); }
.ch-card.offline { opacity: .58; }
.ch-card.offline:hover { opacity: .78; }

.ch-frame {
  position: relative;
  height: 120px;
  display: grid; place-items: center;
  padding: 15px 18px;
  isolation: isolate;
  background:
    radial-gradient(110% 120% at 50% 0%, hsl(var(--glow) / .2), transparent 66%),
    linear-gradient(180deg, #0d0a11, #08070b);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.ch-logo { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.ch-logo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .42));
  transition: transform .4s var(--ease-out);
  z-index: 1;
}
.ch-card:hover .ch-logo img { transform: scale(1.055); }
.ch-logo .initial {
  font-family: var(--font-serif);
  font-size: 29px; font-weight: 600;
  color: rgba(255, 255, 255, .55); letter-spacing: .02em;
}

.badge {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 6px;
  border-radius: 6px;
  background: rgba(8, 6, 10, .62);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 8px; font-weight: 800; letter-spacing: .1em;
}
.badge .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.badge.live { left: 9px; top: 9px; }
.badge.hd { right: 9px; top: 9px; color: rgba(255, 255, 255, .82); letter-spacing: .06em; }
.badge.web { left: 9px; top: 9px; color: #bfe9ff; }
.badge.off { left: 9px; top: 9px; color: #ffb3b3; border-color: rgba(255, 100, 100, .24); background: rgba(70, 8, 14, .55); }
.badge.playing { right: 9px; top: 9px; color: #fff; background: rgba(255, 59, 82, .9); border-color: transparent; }
.badge.playing .eq { display: flex; align-items: flex-end; gap: 1.5px; height: 8px; }
.badge.playing .eq i { width: 2px; background: #fff; border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.badge.playing .eq i:nth-child(1) { height: 40%; animation-delay: -.2s; }
.badge.playing .eq i:nth-child(2) { height: 100%; animation-delay: -.5s; }
.badge.playing .eq i:nth-child(3) { height: 65%; animation-delay: -.8s; }
@keyframes eq { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }

.star {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(8, 6, 10, .5);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, .75);
  cursor: pointer;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .2s, transform .2s, color .2s, background .2s;
}
.star .ic { width: 15px; height: 15px; }
.ch-card:hover .star, .star.on, .star:focus-visible { opacity: 1; transform: none; }
.star:hover { background: rgba(8, 6, 10, .82); color: #fff; }
.star.on { color: var(--gold); }
.star.on .ic { fill: currentColor; }

.ch-body { padding: 0 13px 13px; }
.ch-name {
  font-size: 13px; font-weight: 650; letter-spacing: -.008em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ch-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 2px;
  color: var(--muted-2); font-size: 9.8px;
  white-space: nowrap; overflow: hidden;
}
.ch-meta .sep { width: 2px; height: 2px; border-radius: 50%; background: currentColor; opacity: .7; }
.ch-now {
  display: flex; align-items: center; gap: 5px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ch-now b {
  flex: none;
  color: var(--accent); font-size: 7.5px; font-weight: 800;
  letter-spacing: .12em;
}
.ch-now span { overflow: hidden; text-overflow: ellipsis; }

.grid-skel { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 13px; }
.skel {
  height: 178px;
  border-radius: 17px;
  border: 1px solid var(--line);
  background: linear-gradient(100deg, var(--plate) 20%, var(--plate-2) 40%, var(--plate) 62%);
  background-size: 300% 100%;
  animation: shimmer 1.5s infinite linear;
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: clamp(38px, 6vw, 70px) 16px;
  text-align: center;
}
.empty-ic {
  display: grid; place-items: center;
  width: 48px; height: 48px; margin-bottom: 4px;
  border-radius: 14px;
  border: 1px solid var(--line); background: var(--plate);
  color: var(--muted);
}
.empty strong { font-family: var(--font-serif); font-size: 22px; font-weight: 600; }
.empty > span:not(.empty-ic) { color: var(--muted); font-size: 12px; max-width: 360px; }
.empty .btn { margin-top: 10px; }

/* ───────────────────────────────────────────────────────────────── footer ── */
.footer {
  padding-bottom: env(safe-area-inset-bottom);
  margin-top: clamp(42px, 6vw, 76px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px;
  color: var(--muted-2); font-size: 10.5px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text-soft); font-weight: 600; font-size: 11.5px; }
.footer p { margin: 0; flex: 1; min-width: 240px; }
.footer-links { display: flex; gap: 14px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ──────────────────────────────────────────────────────────────── dialogs ── */
.modal {
  width: min(560px, calc(100vw - 26px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 23px;
  background: var(--glass-2);
  color: var(--text);
  box-shadow: 0 60px 130px -40px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(34px) saturate(1.4);
  -webkit-backdrop-filter: blur(34px) saturate(1.4);
  overflow: hidden;
}
.modal::backdrop {
  background: rgba(3, 2, 5, .68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal[open] { animation: modalIn .3s var(--ease-out) both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.modal-body { display: flex; flex-direction: column; gap: 14px; padding: 22px; margin: 0; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.modal-head h3 {
  margin: 1px 0 0;
  font-family: var(--font-serif);
  font-size: 27px; font-weight: 600; letter-spacing: -.018em; line-height: 1;
}
.modal-lead { margin: 0; color: var(--muted); font-size: 12.3px; line-height: 1.55; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted-2); font-size: 10.5px; }

.code-box {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 15px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  background: var(--plate);
}
.code-label { flex: none; color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.code-box code {
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 17px; font-weight: 750; letter-spacing: .18em;
  color: var(--text);
}
.code-box .btn { flex: none; }

.link-row { display: flex; gap: 8px; }
.link-row input {
  flex: 1; min-width: 0;
  height: 42px; padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--plate);
  color: var(--text);
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
}
.link-row input::placeholder { letter-spacing: 0; text-transform: none; color: var(--muted-2); }
.link-row input:focus { outline: none; border-color: rgba(255, 59, 82, .5); box-shadow: 0 0 0 3px var(--accent-soft); }

/* search */
.search-modal { width: min(660px, calc(100vw - 26px)); margin: 9vh auto auto; }
.search-head {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.search-head > .ic { color: var(--muted); }
.search-head input {
  flex: 1; min-width: 0; height: 38px;
  border: 0; background: none; outline: none;
  color: var(--text);
  font-size: 16px; font-weight: 500;
}
.search-head input::placeholder { color: var(--muted-2); font-weight: 400; }
.search-head input::-webkit-search-cancel-button, .search-head input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.search-results { max-height: 54vh; overflow-y: auto; padding: 7px; }
.result-group-label {
  padding: 9px 10px 5px;
  color: var(--muted-2);
  font-size: 8.5px; font-weight: 750;
  letter-spacing: .18em; text-transform: uppercase;
}
.result {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: none;
  color: inherit; text-align: left;
  cursor: pointer;
}
.result:hover, .result.sel { background: var(--plate-2); border-color: var(--line); }
.result-logo {
  position: relative;
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center; padding: 5px;
  border-radius: 9px;
  background: linear-gradient(170deg, #121017, #09070c);
  border: 1px solid rgba(255, 255, 255, .1);
  overflow: hidden;
}
.result-logo img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; }
.result-logo .initial { font-family: var(--font-serif); font-size: 12px; color: rgba(255, 255, 255, .55); }
.result-meta { flex: 1; min-width: 0; }
.result-name { display: block; font-size: 12.5px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-sub { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-tag {
  flex: none;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.result-tag.live { color: #ff8b96; border-color: rgba(255, 59, 82, .26); background: rgba(255, 59, 82, .1); }
.search-foot {
  display: flex; gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted-2); font-size: 9.5px;
}
.search-foot span { display: inline-flex; align-items: center; gap: 4px; }
kbd {
  display: inline-block;
  min-width: 17px; padding: 2px 4px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: var(--plate);
  color: var(--muted);
  font-family: var(--font-sans); font-size: 9px; font-weight: 600; text-align: center;
}

/* EPG */
.epg-modal { width: min(760px, calc(100vw - 26px)); }
.epg-controls { display: flex; gap: 8px; }
.epg-controls select {
  flex: 1; min-width: 0;
  height: 40px; padding: 0 36px 0 12px;
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 11px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted-2) 50%) calc(100% - 18px) 17px / 5px 5px no-repeat,
    linear-gradient(135deg, var(--muted-2) 50%, transparent 50%) calc(100% - 13px) 17px / 5px 5px no-repeat,
    var(--plate);
  color: var(--text);
  font-size: 12.5px;
  cursor: pointer;
}
.epg-controls select option { background: var(--ink-3); color: var(--text); }
.date-nav { display: flex; align-items: center; gap: 5px; flex: none; }
.date-label { position: relative; }
.date-label > span {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; min-width: 108px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--plate); color: var(--text-soft);
  font-size: 11px; font-weight: 620;
  cursor: pointer;
}
.date-label input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.date-label:focus-within > span { border-color: rgba(255, 59, 82, .55); box-shadow: 0 0 0 3px var(--accent-soft); }
.epg-list {
  max-height: 56vh; overflow-y: auto;
  border-top: 1px solid var(--line);
  margin: 0 -22px -22px; padding: 4px 22px 18px;
  scroll-padding-top: 8px;
  mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 16px), transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 16px), transparent 100%);
}
.epg-row {
  display: grid; grid-template-columns: 54px minmax(0, 1fr);
  gap: 13px;
  width: 100%;
  padding: 11px 4px;
  border: 0; border-bottom: 1px solid var(--line);
  background: none; color: inherit; text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.epg-row:hover { background: var(--plate); }
.epg-row:last-child { border-bottom: 0; }
.epg-row time { color: var(--muted-2); font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; padding-top: 1px; }
.epg-row-body b { display: block; font-size: 12.8px; font-weight: 620; line-height: 1.3; }
.epg-row-body > span {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 2px; color: var(--muted); font-size: 10.8px; line-height: 1.45;
}
.epg-row.now time, .epg-row.now b { color: var(--accent); }
.epg-row.now { background: var(--accent-soft); border-radius: 9px; border-bottom-color: transparent; }
.epg-now-tag {
  display: inline-block; margin-left: 6px;
  padding: 1px 4px; border-radius: 4px;
  background: var(--accent); color: #fff;
  font-size: 7px; font-weight: 800; letter-spacing: .1em;
  vertical-align: 1px;
}
.epg-src {
  display: inline-block; margin-left: 6px;
  padding: 1px 4px; border-radius: 4px;
  border: 1px solid rgba(242, 192, 120, .25);
  color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: .06em;
  vertical-align: 1px;
}
.epg-empty { padding: 38px 8px; text-align: center; color: var(--muted); font-size: 12px; }

/* ────────────────────────────────────────────────────────────────── toast ── */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100;
  max-width: min(92vw, 440px);
  padding: 11px 17px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--glass-2);
  backdrop-filter: blur(20px);
  color: var(--text);
  font-size: 12px;
  box-shadow: 0 26px 50px -20px rgba(0, 0, 0, .9);
  opacity: 0; pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity .22s, transform .22s var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ────────────────────────────────────────────────────────────── responsive ── */
@media (max-width: 1500px) {
  .app { grid-template-columns: 232px minmax(0, 1fr); }
  .rail { padding: 22px 14px 18px; }
  .grid, .grid-skel { grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); }
}

@media (max-width: 1320px) {
  .top-actions .btn span { display: none; }
  .top-actions .btn { width: 42px; padding: 0; }
  .radio-link { display: none; }
  .idle { grid-template-columns: minmax(0, 1fr) minmax(190px, 270px); }
}

@media (max-width: 1120px) {
  .app { grid-template-columns: 212px minmax(0, 1fr); }
  .brand-copy strong { font-size: 12.5px; }
  .brand-copy small { font-size: 9.6px; }
  .nav-item { font-size: 12px; }
  .deck-actions #prevBtn, .deck-actions #nextBtn { display: none; }
}

@media (max-width: 1024px) {
  .app { display: block; max-width: none; }
  .rail { display: none; }
  .main { padding: 0 clamp(15px, 3.4vw, 30px) 40px; }
  .topbar { gap: 10px; padding: 12px 0; }
  .topbar-brand { display: inline-flex; flex: none; }
  .topbar-brand .brand-mark { width: 42px; height: 42px; border-radius: 13px; font-size: 12.5px; }
  .search-trigger { width: min(430px, 100%); }
  .top-actions .btn span { display: inline; }
  .top-actions .btn { width: auto; padding: 0 12px; }
  .radio-link { display: none; }
  .mobile-filters { display: block; position: sticky; top: 67px; z-index: 30; margin: 0 -2px; }
  .mobile-filters .chips { display: flex; background: var(--bg-top); backdrop-filter: blur(18px); padding: 6px 2px 9px; }
  .chips::after { content: ""; flex: none; width: 8px; }
  .stage { margin-top: 2px; }
  .idle { grid-template-columns: minmax(0, 1fr) minmax(180px, 240px); }
}

@media (max-width: 920px) {
  .top-actions .btn span { display: none; }
  .top-actions .btn { width: 42px; padding: 0; }
  .radio-link { display: none; }
  .search-trigger { width: auto; flex: 1; min-width: 0; }
}

@media (max-width: 860px) {
  .idle { grid-template-columns: minmax(0, 1fr); align-items: center; }
  .idle-feature { display: none; }
  .idle h1 { font-size: clamp(32px, 6.4vw, 50px); }
  .idle-lede { max-width: 44ch; }
  .deck { margin: 10px 10px 0; padding: 11px 12px; gap: 10px; }
  .deck-logo { width: 48px; height: 48px; border-radius: 12px; padding: 7px; }
  .deck-meta h2 { font-size: 19px; }
  .deck-actions .btn.icon { width: 35px; height: 35px; }
  .deck-actions #siteBtn { display: none; }
  .section-head { align-items: flex-start; }
  .channels-tools { align-items: flex-end; }
  .sort > span { display: none; }
  .grid, .grid-skel { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
  .ch-frame { height: 96px; padding: 15px 17px; }
  .now-card { flex-basis: 268px; }
}

@media (max-width: 640px) {
  .main { padding-left: 13px; padding-right: 13px; }
  .topbar { padding: 10px 0; gap: 8px; }
  .topbar-brand .brand-mark { width: 38px; height: 38px; font-size: 11.5px; border-radius: 12px; }
  .search-trigger { flex: none; width: 42px; height: 40px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .top-actions { gap: 5px; }
  .top-actions .btn { width: 40px; height: 40px; padding: 0; }
  .top-actions .btn span { display: none; }
  .mobile-filters { top: 60px; }
  .player { border-radius: 19px; }
  .idle { padding: 20px 18px; }
  .idle h1 { font-size: clamp(28px, 8vw, 38px); margin: 10px 0 0; }
  .idle-lede { display: none; }
  .idle-actions { margin-top: 15px; }
  .idle-actions .btn { height: 39px; padding: 0 13px; font-size: 11.5px; }
  .deck { margin: 8px 7px 0; padding: 10px; border-radius: 15px; gap: 9px; flex-wrap: wrap; }
  .deck-logo { width: 42px; height: 42px; border-radius: 11px; padding: 6px; }
  .deck-kicker { font-size: 8px; letter-spacing: .12em; }
  .deck-meta h2 { font-size: 17px; }
  .deck-meta > p { font-size: 10.5px; }
  .deck-actions { width: 100%; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 8px; }
  .deck-actions .btn.icon { width: 38px; height: 36px; }
  .deck-sep { display: none; }
  .deck-actions #prevBtn, .deck-actions #nextBtn { display: inline-flex; }
  .deck-progress { margin-top: 6px; }
  .progress-meta { font-size: 8.8px; }
  #deckNext { display: none; }
  .section { margin-top: 32px; }
  .section-title { font-size: 27px; }
  .section-sub { font-size: 10.5px; }
  .channels-tools { flex-direction: column; align-items: flex-end; gap: 5px; }
  .toggle { height: 32px; padding: 0 9px; font-size: 10px; }
  .sort select { height: 32px; font-size: 10px; }
  .now-card { flex-basis: 248px; min-height: 152px; }
  .now-title { font-size: 18px; }
  .grid, .grid-skel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .ch-frame { height: 88px; padding: 13px 14px; }
  .ch-body { padding: 0 10px 11px; }
  .ch-name { font-size: 12px; }
  .ch-meta { font-size: 9px; }
  .ch-now { margin-top: 6px; padding-top: 6px; font-size: 9px; }
  .ch-now b { font-size: 7px; }
  .star { opacity: .82; transform: none; width: 27px; height: 27px; }
  .badge { height: 18px; font-size: 7px; padding: 0 5px; }
  .badge.live { left: 7px; top: 7px; }
  .badge.hd { right: 7px; top: 7px; }
  .badge.playing { display: none; }
  .footer { gap: 12px; }
  .footer p { order: 3; flex-basis: 100%; }
  .modal { border-radius: 20px; }
  .modal-body { padding: 18px; }
  .epg-list { margin: 0 -18px -18px; padding: 4px 18px 16px; max-height: 58vh; }
  .epg-controls { flex-direction: column; }
  .date-nav { justify-content: space-between; }
  .date-label { flex: 1; }
  .date-label > span { width: 100%; }
  .code-box { flex-wrap: wrap; }
  .code-box code { margin-left: 0; font-size: 15px; }
  .code-box .btn { margin-left: auto; }
  .search-modal { margin-top: 6vh; }
  .search-foot { gap: 10px; flex-wrap: wrap; }
}

@media (max-width: 400px) {
  .idle-actions .btn span { font-size: 10.5px; }
  .deck-actions .btn.icon { width: 35px; }
  .grid, .grid-skel { gap: 8px; }
  .ch-frame { height: 80px; }
}

@media (min-width: 1760px) {
  .grid, .grid-skel { grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 15px; }
  .ch-frame { height: 122px; }
  .now-card { flex-basis: 320px; }
  .section-title { font-size: 40px; }
}


@media (min-width: 1700px) {
  body { font-size: 16px; }
  .app { grid-template-columns: 272px minmax(0, 1fr); }
  .rail { padding: 30px 20px 22px; }
  .brand-mark { width: 54px; height: 54px; border-radius: 16px; font-size: 16px; }
  .brand-copy strong { font-size: 14.5px; }
  .brand-copy small { font-size: 11px; }
  .nav-item { min-height: 44px; padding: 9px 11px; font-size: 14px; gap: 12px; }
  .nav-item .ic { width: 18px; height: 18px; }
  .rail-label { font-size: 10.5px; margin: 24px 10px 10px; }
  .foot-link b { font-size: 12.5px; }
  .foot-link small { font-size: 10.5px; }
  .status-card { font-size: 11.5px; }
  .search-trigger { height: 46px; width: min(560px, 100%); }
  .search-trigger span { font-size: 14px; }
  .search-trigger kbd { font-size: 11px; }
  .btn { height: 46px; padding: 0 16px; font-size: 13.5px; }
  .btn.icon { width: 46px; }
  .btn .ic { width: 18px; height: 18px; }
  .deck { padding: 14px 18px; gap: 16px; }
  .deck-logo { width: 66px; height: 66px; padding: 10px; border-radius: 17px; }
  .deck-meta h2 { font-size: 27px; }
  .deck-meta > p { font-size: 12.5px; }
  .deck-kicker { font-size: 10px; }
  .deck-actions .btn.icon { width: 43px; height: 43px; }
  .section-title { font-size: 44px; }
  .section-sub { font-size: 13px; }
  .now-card { flex-basis: 344px; min-height: 184px; padding: 17px; }
  .now-title { font-size: 23px; }
  .now-channel { font-size: 13px; }
  .now-time { font-size: 10.5px; }
  .ch-name { font-size: 15px; }
  .ch-meta { font-size: 11px; }
  .ch-now { font-size: 11px; }
  .ch-frame { height: 132px; padding: 16px 20px; }
  .toggle, .sort select { height: 40px; font-size: 12px; }
  .modal { width: min(640px, calc(100vw - 32px)); }
  .epg-modal { width: min(880px, calc(100vw - 32px)); }
  .modal-head h3 { font-size: 31px; }
  .modal-lead, .link-row input { font-size: 13.5px; }
  .epg-row { grid-template-columns: 62px minmax(0, 1fr); padding: 13px 4px; }
  .epg-row time { font-size: 13px; }
  .epg-row-body b { font-size: 14px; }
  .epg-row-body > span { font-size: 12px; }
  .search-head input { font-size: 18px; }
  .result { padding: 10px; }
  .result-name { font-size: 14px; }
  .result-sub { font-size: 11px; }
  .result-logo { width: 42px; height: 42px; }
  .idle h1 { font-size: clamp(50px, 4.6vw, 88px); }
  .idle-lede { font-size: 14.5px; }
  .idle-actions .btn { height: 48px; padding: 0 20px; font-size: 13.5px; }
  .disc { width: clamp(180px, 18vw, 252px); }
  .feature-meta strong { font-size: 31px; }
  .feature-program { font-size: 13px; }
  .feature-time { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
