/* ============================================================
   CabinDeck — personal in-car media deck
   Original design system. No third-party UI assets.
   ============================================================ */

@font-face {
  font-family: "Inter var";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk var";
  src: url("../fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #080a0b;
  --bg-2: #0c0f11;
  --panel: #121619;
  --panel-2: #171c20;
  --panel-3: #1d2428;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f3f6f4;
  --text-2: #a4aeab;
  --text-3: #6c7774;
  --accent: #ffb648;
  --accent-2: #ffd07a;
  --accent-rgb: 255, 182, 72;
  --teal: #5eead4;
  --danger: #ff6f61;
  --ok: #7ee2a8;
  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --rail: 96px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
  --font-ui: "Inter var", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk var", "Space Grotesk", var(--font-ui);
  --ease: cubic-bezier(0.22, 0.9, 0.24, 1);
  --dim: 0;
}

html[data-accent="solar"] { --accent: #ffb648; --accent-2: #ffd07a; --accent-rgb: 255, 182, 72; }
html[data-accent="tide"]  { --accent: #5eead4; --accent-2: #a7f3e8; --accent-rgb: 94, 234, 212; }
html[data-accent="ember"] { --accent: #ff8266; --accent-2: #ffb09c; --accent-rgb: 255, 130, 102; }
html[data-accent="iris"]  { --accent: #b6a1ff; --accent-2: #d6c9ff; --accent-rgb: 182, 161, 255; }
html[data-accent="ice"]   { --accent: #9ecbff; --accent-2: #cbe4ff; --accent-rgb: 158, 203, 255; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(1100px 720px at 8% -12%, rgba(var(--accent-rgb), 0.10), transparent 62%),
    radial-gradient(900px 640px at 102% -4%, rgba(94, 234, 212, 0.055), transparent 60%),
    radial-gradient(1000px 800px at 50% 120%, rgba(var(--accent-rgb), 0.035), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  touch-action: manipulation;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: rgba(var(--accent-rgb), 0.28); color: #fff; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip {
  position: fixed; left: 16px; top: 14px; z-index: 999;
  padding: 10px 16px; border-radius: 10px; background: var(--accent); color: #0a0c0d;
  font-weight: 650; transform: translateY(-160%); transition: transform 0.2s;
}
.skip:focus { transform: none; }

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

/* ---------- ambient texture ---------- */
.app-noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.dim-layer {
  position: fixed; inset: 0; z-index: 400; pointer-events: none;
  background: #000; opacity: var(--dim);
  transition: opacity 0.4s var(--ease);
}

/* ---------- shell ---------- */
.app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  height: 100dvh; height: 100vh;
}

.rail {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  padding: 22px 10px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 22, 25, 0.72), rgba(8, 10, 11, 0.5));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  min-height: 0;
}

.brand {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-bottom: 22px; border-radius: 16px; flex: none;
}
.brand-mark { width: 44px; height: 44px; display: block; filter: drop-shadow(0 8px 20px rgba(var(--accent-rgb), 0.22)); }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-name {
  display: none;
  font-family: var(--font-display); font-size: 13px; letter-spacing: -0.02em; color: var(--text-2);
}
.brand-name span { color: var(--accent); }

.rail-nav { display: flex; flex-direction: column; gap: 6px; width: 100%; flex: 1; min-height: 0; }
.nav-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 11px 4px 9px;
  border-radius: 16px;
  color: var(--text-3);
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
  transition: color 0.2s, background 0.2s, transform 0.2s;
  min-height: 62px;
}
.nav-btn .nav-ic { display: grid; place-items: center; width: 36px; height: 30px; border-radius: 10px; transition: background 0.2s, color 0.2s; }
.nav-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.035); }
.nav-btn:active { transform: scale(0.96); }
.nav-btn.is-active { color: var(--text); background: rgba(var(--accent-rgb), 0.09); }
.nav-btn.is-active .nav-ic { color: var(--accent); }
.nav-btn.is-active::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 3px; background: var(--accent);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.55);
}

.rail-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; flex: none; }
.rail-mini {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--text-3);
  transition: 0.2s;
}
.rail-mini:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.4); background: rgba(var(--accent-rgb), 0.08); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.topbar {
  height: 84px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 44px;
  gap: 20px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 4px rgba(126, 226, 168, 0.09), 0 0 14px rgba(126, 226, 168, 0.45);
  flex: none;
}
.status-dot.is-off { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 111, 97, 0.09); }
.topbar-page {
  font-size: 12px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-right { display: flex; align-items: center; gap: 18px; }

.parked-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.035);
  color: var(--text-2); font-size: 12px; font-weight: 600;
}
.parked-chip .ic { width: 16px; height: 16px; color: var(--ok); }

.tb-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
#tbTime { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#tbDate { font-size: 10.5px; color: var(--text-3); letter-spacing: 0.07em; text-transform: uppercase; margin-top: 2px; }

.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.26), rgba(var(--accent-rgb), 0.06));
  color: var(--accent-2); font-weight: 700; font-size: 14px;
  transition: 0.2s;
}
.avatar:hover { box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1); }

.content {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.content::-webkit-scrollbar { width: 9px; }
.content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }

.view { max-width: 1580px; margin: 0 auto; padding: 8px 44px 150px; animation: view-in 0.35s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.foot {
  max-width: 1580px; margin: 0 auto; padding: 0 44px 28px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  color: var(--text-3); font-size: 11px; letter-spacing: 0.02em;
}
.foot-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }

/* ---------- shared type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow.is-muted { color: var(--text-3); }
h1, h2, h3, h4, p { margin: 0; }
.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin: 10px 0 28px; flex-wrap: wrap;
}
.page-head h1 { font-size: clamp(38px, 4.2vw, 58px); margin: 8px 0 10px; }
.page-head .sub { color: var(--text-2); max-width: 620px; font-size: 15px; line-height: 1.55; }
.page-head-side { display: flex; align-items: center; gap: 10px; }

.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 42px 0 16px;
}
.section-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
.section-head .link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-3); font-size: 12.5px; font-weight: 600; transition: color 0.2s;
}
.section-head .link:hover { color: var(--accent); }
.section-head .link .ic { width: 15px; height: 15px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent; color: var(--text);
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  transition: transform 0.18s var(--ease), background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap; user-select: none;
}
.btn .ic { width: 19px; height: 19px; }
.btn:active { transform: scale(0.975); }
.btn--primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #161006;
  box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn--primary:hover { box-shadow: 0 14px 36px -10px rgba(var(--accent-rgb), 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn--ghost { border-color: var(--line-2); background: rgba(255, 255, 255, 0.025); color: var(--text-2); }
.btn--ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.055); border-color: rgba(255, 255, 255, 0.2); }
.btn--soft { background: rgba(var(--accent-rgb), 0.1); color: var(--accent-2); border-color: rgba(var(--accent-rgb), 0.18); }
.btn--soft:hover { background: rgba(var(--accent-rgb), 0.16); }
.btn--danger { background: rgba(255, 111, 97, 0.1); color: #ffb3ab; border-color: rgba(255, 111, 97, 0.24); }
.btn--danger:hover { background: rgba(255, 111, 97, 0.18); }
.btn--sm { height: 40px; padding: 0 15px; border-radius: 11px; font-size: 12.5px; }
.btn--icon { width: 48px; padding: 0; flex: none; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; border: 1px solid transparent; background: transparent;
  color: var(--text-3); transition: 0.18s;
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.icon-btn.is-fav { color: var(--accent); }
.icon-btn .ic { width: 19px; height: 19px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025);
  color: var(--text-2); font-size: 12.5px; font-weight: 550;
  transition: 0.18s; white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.05); }
.chip.is-on { color: #141006; background: var(--accent); border-color: var(--accent); font-weight: 650; }
.chip .ic { width: 15px; height: 15px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.22); background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent-2); font-size: 10.5px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }

.live-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 6px;
  background: rgba(5, 8, 8, 0.72); backdrop-filter: blur(8px);
  color: #fff; font-size: 9px; font-weight: 750; letter-spacing: 0.12em;
}
.live-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #ff5a4e; box-shadow: 0 0 8px #ff5a4e; }

/* ---------- inputs ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; color: var(--text-3); text-transform: uppercase; }
.input, .select {
  height: 50px; width: 100%;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-2);
  border-radius: 13px;
  padding: 0 16px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--text-3); }
.input:focus, .select:focus {
  outline: none; border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.05);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b9694' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 40px;
}
.search-wrap { position: relative; flex: 1; min-width: 240px; max-width: 460px; }
.search-wrap .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.search-wrap .input { padding-left: 46px; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  position: relative; width: 46px; height: 27px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line-2);
  transition: 0.22s var(--ease); flex: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 19px; height: 19px; border-radius: 50%; background: #cfd6d3;
  transition: 0.22s var(--ease);
}
.switch input:checked + .track { background: rgba(var(--accent-rgb), 0.85); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(19px); background: #14100a; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 3px; }
.switch .sw-label { font-size: 13.5px; color: var(--text-2); }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); border: 4px solid #1a1308; box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.4);
  cursor: pointer;
}

/* ---------- home ---------- */
.hero {
  position: relative;
  min-height: 436px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: #0b1112;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  isolation: isolate;
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 10, 11, 0.92) 0%, rgba(8, 10, 11, 0.55) 46%, rgba(8, 10, 11, 0.08) 78%);
  z-index: 2;
}
.hero-scene {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero-copy {
  position: relative; z-index: 3;
  padding: 42px 12px 40px 44px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.hero-copy h1 {
  font-size: clamp(44px, 5.1vw, 76px);
  margin: 18px 0 16px;
  color: #f6f8f6;
}
.hero-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy p.lede { color: #b7c2be; font-size: 15.5px; line-height: 1.55; max-width: 460px; }
.hero-actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.hero-side {
  position: relative; z-index: 3;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  padding: 38px 40px 34px 0; text-align: right;
}
.hero-time { display: flex; flex-direction: column; align-items: flex-end; }
.hero-time b {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(58px, 6vw, 92px);
  letter-spacing: -0.055em; line-height: 0.92; font-variant-numeric: tabular-nums;
  color: #fff; text-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}
.hero-time span { margin-top: 10px; color: #a8b4b0; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.hero-mini {
  width: min(340px, 100%);
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 13, 14, 0.55);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  text-align: left;
}
.hero-mini .art {
  width: 46px; height: 46px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--c1, #26322f), var(--c2, #101716));
  font-family: var(--font-display); font-weight: 600; font-size: 14px; color: rgba(255, 255, 255, 0.9);
}
.hero-mini .meta { flex: 1; min-width: 0; }
.hero-mini .meta b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.hero-mini .meta span { font-size: 10.5px; color: #9caaa5; letter-spacing: 0.04em; text-transform: uppercase; }
.hero-mini .btn { width: 38px; height: 38px; border-radius: 11px; }
.hero-hint { font-size: 11px; color: #8b9894; letter-spacing: 0.03em; }

.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.quick {
  position: relative; overflow: hidden;
  min-height: 142px;
  padding: 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--q1, #18201f), var(--q2, #0d1212));
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
  text-align: left;
}
.quick::before {
  content: ""; position: absolute; right: -28px; top: -36px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 68%);
  opacity: 0.7;
}
.quick:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.16); box-shadow: 0 20px 40px -24px #000; }
.quick .q-ic {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}
.quick .q-ic .ic { width: 21px; height: 21px; }
.quick h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-top: 18px; }
.quick p { font-size: 11.5px; color: rgba(255, 255, 255, 0.55); margin-top: 3px; }
.quick .q-arrow {
  position: absolute; right: 18px; bottom: 18px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.7); transition: 0.2s;
}
.quick:hover .q-arrow { background: var(--accent); border-color: var(--accent); color: #171006; transform: rotate(-45deg); }
.quick .q-arrow .ic { width: 15px; height: 15px; }

.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr); gap: 18px; }
.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, rgba(23, 28, 32, 0.72), rgba(13, 17, 19, 0.7));
  padding: 22px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.panel-head .mini-link { font-size: 11.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; }
.panel-head .mini-link:hover { color: var(--accent); }

.recent-list { display: flex; flex-direction: column; gap: 2px; }
.recent-row {
  display: flex; align-items: center; gap: 13px;
  padding: 10px; margin: 0; border-radius: 13px;
  border: 0; background: transparent; color: inherit; cursor: pointer;
  transition: background 0.18s; text-align: left; width: 100%;
}
.recent-row:hover { background: rgba(255, 255, 255, 0.045); }
.recent-row .art {
  width: 52px; height: 52px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 14px;
  background: linear-gradient(145deg, var(--c1, #26322f), var(--c2, #101716)); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.recent-row .meta { flex: 1; min-width: 0; }
.recent-row .meta b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-row .meta span { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.recent-row .ago { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.recent-row .play-mini {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); color: var(--text-2); flex: none;
}
.recent-row:hover .play-mini { background: var(--accent); color: #171006; }

.empty-mini { color: var(--text-3); font-size: 12.5px; line-height: 1.6; padding: 8px 0 4px; }
.empty-mini b { color: var(--text-2); font-weight: 600; }

.fav-list { display: flex; flex-direction: column; gap: 4px; }
.fav-row {
  display: flex; align-items: center; gap: 11px; padding: 8px; margin: 0;
  border-radius: 12px; width: 100%; text-align: left; transition: background 0.18s;
}
.fav-row:hover { background: rgba(255, 255, 255, 0.045); }
.fav-row .art {
  border: 0; cursor: pointer;
  width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  background: linear-gradient(145deg, var(--c1, #26322f), var(--c2, #101716)); color: #fff;
}
.fav-row .meta { flex: 1; min-width: 0; }
.fav-row .meta b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-row .meta span { font-size: 10.5px; color: var(--text-3); }
.fav-row .icon-btn { width: 32px; height: 32px; }

/* ---------- channel cards ---------- */
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.filters .spacer { flex: 1; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

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

.media-card {
  position: relative; text-align: left;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.media-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.16); box-shadow: 0 26px 44px -28px #000; }
.media-card .poster {
  position: relative; aspect-ratio: 16 / 9.4;
  background:
    radial-gradient(120% 130% at 18% 0%, var(--c1, #26322f), transparent 62%),
    linear-gradient(145deg, var(--c1, #26322f), var(--c2, #0b1110));
  display: grid; place-items: center;
  overflow: hidden;
}
.media-card .poster::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 0.7px, transparent 0.7px);
  background-size: 9px 9px; opacity: 0.22;
  mask-image: linear-gradient(160deg, #000, transparent 70%);
  -webkit-mask-image: linear-gradient(160deg, #000, transparent 70%);
}
.media-card .poster::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06) 40%, rgba(0, 0, 0, 0.55));
}
.media-card .monogram {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s var(--ease);
}
.media-card:hover .monogram { transform: scale(1.06); }
.media-card .badge-live { position: absolute; top: 12px; left: 12px; z-index: 2; }
.media-card .card-fav { position: absolute; top: 9px; right: 9px; z-index: 3; width: 36px; height: 36px; border-radius: 10px; background: rgba(6, 9, 9, 0.5); backdrop-filter: blur(10px); }
.media-card .card-fav:hover { background: rgba(6, 9, 9, 0.75); }
.media-card .card-fav.is-fav { color: var(--accent); }
.media-card .card-body { padding: 14px 16px 16px; }
.media-card .card-body b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-card .card-body .row { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--text-3); font-size: 11.5px; }
.media-card .card-body .row .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.media-card .card-hover {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
  background: rgba(5, 7, 8, 0.35); opacity: 0; transition: opacity 0.22s;
}
.media-card:hover .card-hover { opacity: 1; }
.media-card .card-hover span {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #171006; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(6px); transition: transform 0.22s;
}
.media-card:hover .card-hover span { transform: none; }
.media-card .card-hover .ic { width: 24px; height: 24px; margin-left: 2px; }

.media-card--wide .poster { aspect-ratio: 16 / 8.2; }

.empty-state {
  border: 1px dashed var(--line-2); border-radius: var(--r-lg);
  padding: 46px 30px; text-align: center; background: rgba(255, 255, 255, 0.015);
}
.empty-state .orb {
  width: 62px; height: 62px; border-radius: 20px; margin: 0 auto 16px;
  display: grid; place-items: center; background: rgba(var(--accent-rgb), 0.1); color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}
.empty-state .orb .ic { width: 27px; height: 27px; }
.empty-state h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.empty-state p { color: var(--text-3); font-size: 13px; max-width: 420px; margin: 7px auto 18px; line-height: 1.6; }

/* ---------- youtube ---------- */
.yt-search {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 14px; border: 1px solid var(--line); border-radius: 18px;
  background: rgba(255, 255, 255, 0.02); margin-bottom: 24px;
}
.yt-search .search-wrap { max-width: none; flex: 1; }
.yt-search .input { height: 52px; border-color: transparent; background: rgba(255, 255, 255, 0.045); }
.note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  background: rgba(var(--accent-rgb), 0.05);
  color: var(--text-2); font-size: 12.5px; line-height: 1.55;
}
.note .ic { width: 18px; height: 18px; color: var(--accent); margin-top: 1px; }
.note b { color: var(--text); font-weight: 600; }
.note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.thumb-card .poster { aspect-ratio: 16 / 9; }
.thumb-card .poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0.9; }
.thumb-card .poster .monogram { z-index: 1; display: none; }
.thumb-card .poster.thumb-failed .monogram { display: block; }
.thumb-card .poster::after { z-index: 1; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55)); }
.thumb-card .card-hover { z-index: 2; }

/* ---------- radio ---------- */
.radio-layout { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 18px; align-items: start; }
.radio-feature {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl); border: 1px solid var(--line);
  padding: 30px;
  min-height: 420px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(120% 120% at 15% 0%, var(--c1, #3a2a5e), transparent 60%),
    linear-gradient(155deg, var(--c1, #3a2a5e), var(--c2, #0c0f18));
  isolation: isolate;
}
.radio-feature::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 0.7px, transparent 0.7px);
  background-size: 10px 10px; opacity: 0.18;
  mask-image: radial-gradient(circle at 70% 20%, #000, transparent 65%);
  -webkit-mask-image: radial-gradient(circle at 70% 20%, #000, transparent 65%);
}
.radio-feature .rf-top { display: flex; justify-content: space-between; align-items: flex-start; }
.rf-art {
  width: 150px; height: 150px; border-radius: 30px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 44px; font-weight: 600; letter-spacing: -0.04em;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  position: relative; overflow: hidden;
}
.rf-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, rgba(255, 255, 255, 0.18), transparent 55%); }
.rf-bars { position: absolute; bottom: 22px; display: flex; gap: 5px; align-items: flex-end; height: 40px; }
.rf-bars i { width: 4px; border-radius: 4px; background: #fff; opacity: 0.7; animation: bar 1.1s ease-in-out infinite; }
.rf-bars i:nth-child(2) { animation-delay: 0.15s; } .rf-bars i:nth-child(3) { animation-delay: 0.3s; } .rf-bars i:nth-child(4) { animation-delay: 0.45s; } .rf-bars i:nth-child(5) { animation-delay: 0.6s; }
@keyframes bar { 0%, 100% { height: 8px; } 50% { height: 32px; } }
.radio-feature h2 { font-family: var(--font-display); font-size: clamp(30px, 3.2vw, 44px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.03; margin: 6px 0 10px; }
.radio-feature p { color: rgba(255, 255, 255, 0.62); font-size: 13.5px; max-width: 360px; line-height: 1.55; }
.rf-controls { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.rf-play {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #0b0f12; border: none; flex: none;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.7); transition: transform 0.2s;
}
.rf-play:hover { transform: scale(1.04); }
.rf-play .ic { width: 26px; height: 26px; margin-left: 2px; }
.rf-note { font-size: 11px; color: rgba(255, 255, 255, 0.45); }

.station-list { display: flex; flex-direction: column; gap: 6px; }
.station-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 14px; border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.022);
  transition: 0.2s; text-align: left; width: 100%;
}
.station-row:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.station-row .art {
  width: 48px; height: 48px; border-radius: 13px; flex: none; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 13px; color: #fff;
  background: linear-gradient(145deg, var(--c1, #26322f), var(--c2, #101716));
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.station-row .meta { flex: 1; min-width: 0; }
.station-row .meta b { display: block; font-size: 13.5px; font-weight: 600; }
.station-row .meta span { font-size: 11px; color: var(--text-3); display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-row .genre { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--line); padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.station-row .play-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, 0.06); color: var(--text-2);
}
.station-row:hover .play-btn { background: var(--accent); color: #171006; }

/* ---------- library ---------- */
.source-form {
  display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 10px;
  padding: 16px; border: 1px solid var(--line); border-radius: 18px;
  background: rgba(255, 255, 255, 0.02); margin-bottom: 16px;
}
.source-form .btn { height: 50px; }
.source-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.source-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255, 255, 255, 0.022); margin-bottom: 8px;
}
.source-card .meta { flex: 1; min-width: 0; }
.source-card .meta b { display: block; font-size: 13.5px; font-weight: 600; }
.source-card .meta span { font-size: 11px; color: var(--text-3); }
.source-card .tag { font-size: 10px; color: var(--accent); background: rgba(var(--accent-rgb), 0.1); border: 1px solid rgba(var(--accent-rgb), 0.16); border-radius: 6px; padding: 3px 7px; }

.group-title {
  display: flex; align-items: center; gap: 10px;
  margin: 28px 0 12px; font-family: var(--font-display);
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
}
.group-title .count { font-family: var(--font-ui); font-size: 10.5px; color: var(--text-3); border: 1px solid var(--line); padding: 2px 7px; border-radius: 99px; }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.lib-row {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid transparent; background: rgba(255, 255, 255, 0.022);
  text-align: left; width: 100%; transition: 0.18s;
}
.lib-row:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.lib-row .avatar-lib {
  width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: linear-gradient(145deg, #1f2a28, #0e1514); font-size: 10px; font-weight: 700; color: #b9c6c2;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.lib-row .meta { flex: 1; min-width: 0; }
.lib-row .meta b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.lib-row .meta span { font-size: 10.5px; color: var(--text-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-row .icon-btn, .lib-row .lib-fav { width: 30px; height: 30px; }

/* ---------- games ---------- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.game-card {
  position: relative; overflow: hidden; text-align: left;
  border-radius: var(--r-xl); border: 1px solid var(--line);
  min-height: 330px; padding: 28px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background:
    radial-gradient(120% 110% at 85% 0%, var(--g1, #20303a), transparent 58%),
    linear-gradient(155deg, var(--g1, #20303a), var(--g2, #0b1012));
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.game-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.18); }
.game-card .gc-icon { position: absolute; top: 26px; left: 28px; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14); }
.game-card h3 { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.game-card p { color: rgba(255, 255, 255, 0.55); font-size: 12.5px; margin-top: 6px; max-width: 320px; line-height: 1.5; }
.game-card .gc-meta { display: flex; gap: 8px; margin-top: 18px; }
.game-card .gc-meta span { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.14); padding: 4px 8px; border-radius: 6px; }
.game-preview { position: absolute; right: 24px; top: 26px; display: grid; grid-template-columns: repeat(4, 26px); gap: 4px; opacity: 0.8; transform: rotate(-6deg); }
.game-preview i { height: 26px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); }
.game-preview i[data-v="2"] { background: rgba(255, 255, 255, 0.18); }
.game-preview i[data-v="4"] { background: rgba(var(--accent-rgb), 0.4); }
.game-preview.memory { grid-template-columns: repeat(4, 34px); gap: 6px; }
.game-preview.memory i { height: 42px; display: grid; place-items: center; font-size: 15px; color: rgba(255, 255, 255, 0.75); }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.panel h4 { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.panel .panel-sub { color: var(--text-3); font-size: 12px; margin-top: 4px; line-height: 1.55; }
.panel .panel-body { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.row-between .lbl { font-size: 13.5px; color: var(--text-2); }
.row-between .lbl small { display: block; color: var(--text-3); font-size: 11px; margin-top: 2px; }
.accents { display: flex; gap: 8px; }
.accents button {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent;
  background: var(--sw); position: relative; transition: 0.18s;
}
.accents button.is-on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1); }
.accents button:hover { transform: scale(1.08); }
.kbd-row { display: flex; gap: 6px; }
.kbd-row kbd {
  font-family: var(--font-ui); font-size: 10.5px; color: var(--text-2);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 3px 7px; background: rgba(255, 255, 255, 0.04);
}
.legal { color: var(--text-3); font-size: 11.5px; line-height: 1.65; }
.legal b { color: var(--text-2); }
.data-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.about-mark { display: flex; align-items: center; gap: 14px; }
.about-mark .brand-mark { width: 52px; height: 52px; margin: 0; }
.about-mark b { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; display: block; }
.about-mark span { font-size: 11.5px; color: var(--text-3); }

/* ---------- mini player ---------- */
.mini {
  position: fixed; z-index: 150;
  left: calc(var(--rail) + 24px); right: 24px; bottom: 20px;
  height: 76px; border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 20, 22, 0.82);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 22px 50px -20px rgba(0, 0, 0, 0.8);
  display: flex; align-items: center; gap: 14px; padding: 10px 14px;
  transform: translateY(110%); opacity: 0; pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
.mini.is-on { transform: none; opacity: 1; pointer-events: auto; }
.mini .art {
  width: 54px; height: 54px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--c1, #26322f), var(--c2, #101716));
  font-family: var(--font-display); font-weight: 600; font-size: 15px; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.mini .meta { flex: 1; min-width: 0; cursor: pointer; }
.mini .meta b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .meta span { font-size: 10.5px; color: var(--text-3); letter-spacing: 0.03em; display: flex; align-items: center; gap: 6px; }
.mini .bars-mini { display: flex; gap: 2px; align-items: flex-end; height: 12px; }
.mini .bars-mini i { width: 2px; background: var(--accent); border-radius: 2px; animation: bar 1.1s ease-in-out infinite; }
.mini .bars-mini i:nth-child(2) { animation-delay: 0.2s; } .mini .bars-mini i:nth-child(3) { animation-delay: 0.4s; }
.mini .controls { display: flex; gap: 4px; align-items: center; }
.mini .controls .icon-btn { width: 42px; height: 42px; border-radius: 12px; }
.mini .controls .icon-btn.primary { background: var(--accent); color: #171006; }
.mini .controls .icon-btn.primary:hover { background: var(--accent-2); }
.mini .close-mini { color: var(--text-3); }

/* ---------- overlay / player ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #000;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}
.overlay.is-on { opacity: 1; visibility: visible; pointer-events: auto; }
.overlay-top {
  flex: none; height: 76px; display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
  position: relative; z-index: 3;
}
.overlay-top .o-title { flex: 1; min-width: 0; }
.overlay-top .o-title b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overlay-top .o-title span { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.overlay-top .o-actions { display: flex; gap: 4px; align-items: center; }
.overlay-top .icon-btn { color: rgba(255, 255, 255, 0.7); width: 46px; height: 46px; }
.overlay-top .icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.overlay-body { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 22px 22px; position: relative; }
.stage-video {
  width: 100%; max-width: 1560px; aspect-ratio: 16 / 9; max-height: calc(100vh - 112px);
  background: #000; border-radius: 14px; overflow: hidden;
  box-shadow: 0 40px 100px -30px #000;
}
.stage-video video, .stage-video iframe { width: 100%; height: 100%; display: block; border: 0; background: #000; }
.stage-video.is-portrait { aspect-ratio: 9 / 16; max-width: min(70vh, 520px); }

/* WebCodecs / canvas renderer */
.canvas-stage { position: relative; background: #000; }
.canvas-stage canvas { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.canvas-loading {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.8); font-size: 12px; letter-spacing: 0.04em;
}
.cv-spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent);
  animation: cv-spin 0.9s linear infinite;
}
@keyframes cv-spin { to { transform: rotate(360deg); } }
.canvas-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  transition: opacity 0.25s var(--ease);
  display: flex; align-items: center; gap: 11px;
  padding: 22px 16px 13px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.86));
}
.cv-btn {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1); color: #fff;
  transition: background 0.18s, transform 0.18s;
}
.cv-btn:hover { background: rgba(255, 255, 255, 0.18); }
.cv-btn:active { transform: scale(0.95); }
.cv-btn .ic { width: 20px; height: 20px; }
.cv-time { font-size: 12px; color: #dfe7e4; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 86px; }
.cv-time b { font-weight: 600; }
.cv-range { flex: 1; min-width: 60px; height: 4px; accent-color: var(--accent); background: transparent; }
.cv-vol { width: 84px; height: 4px; accent-color: var(--accent); }
.canvas-controls [data-cv="mute"] { margin-left: auto; }
.canvas-stage.is-idle .canvas-controls { opacity: 0; pointer-events: none; }
.canvas-stage.is-idle { cursor: none; }
@media (max-width: 700px) {
  .cv-vol { display: none; }
  .cv-time { min-width: 72px; font-size: 11px; }
  .canvas-controls { gap: 8px; padding: 18px 12px 10px; }
  .cv-btn { width: 40px; height: 40px; }
}
.stage-error {
  max-width: 480px; text-align: center; padding: 30px; border: 1px solid var(--line-2);
  border-radius: 20px; background: var(--panel);
}
.stage-error h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.stage-error p { color: var(--text-3); font-size: 12.5px; line-height: 1.6; margin-bottom: 18px; }

.stage-radio { width: min(760px, 100%); text-align: center; padding: 20px; }
.stage-radio .big-art {
  width: clamp(180px, 26vh, 270px); height: clamp(180px, 26vh, 270px);
  border-radius: 36px; margin: 0 auto 30px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: clamp(48px, 7vh, 72px); font-weight: 600; letter-spacing: -0.05em;
  background:
    radial-gradient(120% 120% at 20% 0%, var(--c1, #3a2a5e), transparent 60%),
    linear-gradient(150deg, var(--c1, #3a2a5e), var(--c2, #0c0f18));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative; overflow: hidden;
}
.stage-radio .big-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), transparent 50%); }
.stage-radio .kicker { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 650; }
.stage-radio h2 { font-family: var(--font-display); font-size: clamp(30px, 4.2vh, 46px); font-weight: 600; letter-spacing: -0.04em; margin: 8px 0 6px; }
.stage-radio p { color: var(--text-3); font-size: 13px; }
.stage-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 28px; }
.stage-controls .big-btn {
  width: 66px; height: 66px; border-radius: 50%; border: none; display: grid; place-items: center;
  background: #fff; color: #0b0f12; transition: transform 0.2s;
}
.stage-controls .big-btn:hover { transform: scale(1.05); }
.stage-controls .big-btn .ic { width: 27px; height: 27px; }
.stage-controls .round-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.06); color: var(--text-2); display: grid; place-items: center;
}
.stage-controls .round-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.vol-row { display: flex; align-items: center; gap: 10px; max-width: 300px; margin: 24px auto 0; color: var(--text-3); }
.vol-row .range { flex: 1; }
.vol-row .ic { width: 17px; height: 17px; }

.player-livebar {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  padding-top: 12px; color: rgba(255, 255, 255, 0.45); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
}

.overlay--game { background: radial-gradient(1000px 700px at 50% 0%, #101a1b, #050707 70%); }
.game-shell { width: min(620px, 100%); margin: 0 auto; padding: 8px 0 20px; }
.game-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.game-scores { display: flex; gap: 8px; }
.score-box {
  min-width: 104px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05); text-align: center;
}
.score-box span { display: block; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.score-box b { font-family: var(--font-display); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.board-2048 {
  touch-action: none;
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px;
  padding: 9px; border-radius: 16px; background: rgba(255, 255, 255, 0.05);
  aspect-ratio: 1; user-select: none;
}
.cell-2048 {
  position: relative; border-radius: 10px; background: rgba(255, 255, 255, 0.045);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 4.2vh, 34px);
  letter-spacing: -0.03em; color: #fff;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.cell-2048[data-v="2"] { background: #26302e; }
.cell-2048[data-v="4"] { background: #33403c; }
.cell-2048[data-v="8"] { background: #4a5a4f; }
.cell-2048[data-v="16"] { background: #6b6a4a; }
.cell-2048[data-v="32"] { background: #8e7040; }
.cell-2048[data-v="64"] { background: #b97a32; }
.cell-2048[data-v="128"] { background: #d99a32; color: #191204; }
.cell-2048[data-v="256"] { background: #efb23c; color: #191204; }
.cell-2048[data-v="512"] { background: #ffc857; color: #191204; }
.cell-2048[data-v="1024"] { background: #ffd884; color: #191204; }
.cell-2048[data-v="2048"] { background: #fff0c2; color: #191204; box-shadow: 0 0 30px rgba(255, 214, 130, 0.35); }
.cell-2048.pop { animation: pop 0.18s var(--ease); }
@keyframes pop { 0% { transform: scale(0.72); } 100% { transform: scale(1); } }
.game-over {
  position: absolute; inset: 0; border-radius: 16px; display: grid; place-items: center;
  background: rgba(5, 8, 8, 0.82); backdrop-filter: blur(6px); text-align: center;
}
.game-over h3 { font-family: var(--font-display); font-size: 30px; font-weight: 600; margin-bottom: 4px; }
.game-over p { color: var(--text-3); font-size: 12.5px; margin-bottom: 16px; }
.game-hint { text-align: center; color: var(--text-3); font-size: 11px; margin-top: 14px; }
.game-hint kbd { border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; font-size: 10px; }

.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mem-card {
  position: relative; aspect-ratio: 0.86; border-radius: 14px; border: 1px solid var(--line-2);
  background: linear-gradient(150deg, #1a2224, #0d1213); color: transparent;
  display: grid; place-items: center; transform-style: preserve-3d; transition: 0.2s var(--ease);
  font-size: 30px;
}
.mem-card::before { content: "CD"; font-family: var(--font-display); font-size: 13px; color: rgba(255, 255, 255, 0.2); letter-spacing: 0.1em; }
.mem-card.is-up, .mem-card.is-done { background: linear-gradient(150deg, rgba(var(--accent-rgb), 0.16), #12181a); color: var(--accent); border-color: rgba(var(--accent-rgb), 0.3); }
.mem-card.is-up::before, .mem-card.is-done::before { content: ""; }
.mem-card.is-done { opacity: 0.55; }
.mem-card .ic { width: 34px; height: 34px; }
.mem-card.is-up .ic, .mem-card.is-done .ic { display: block; }
.mem-card .ic { display: none; }

/* ---------- toast ---------- */
.toast-root { position: fixed; z-index: 500; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 13px;
  background: rgba(22, 27, 29, 0.94); border: 1px solid var(--line-2);
  color: var(--text); font-size: 12.5px; font-weight: 500;
  box-shadow: 0 20px 40px -16px #000;
  animation: toast-in 0.25s var(--ease);
  max-width: min(560px, 90vw);
}
.toast.is-out { animation: toast-out 0.22s forwards; }
.toast .ic { width: 17px; height: 17px; color: var(--accent); }
.toast.is-error .ic { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- dialog ---------- */
.dialog-backdrop {
  position: fixed; inset: 0; z-index: 450; background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px); display: grid; place-items: center; padding: 24px;
  animation: fade 0.2s;
}
.dialog {
  width: min(440px, 100%); border-radius: 22px; border: 1px solid var(--line-2);
  background: var(--panel); padding: 24px; box-shadow: var(--shadow);
  animation: dlg-in 0.25s var(--ease);
}
.dialog h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.dialog p { color: var(--text-3); font-size: 13px; line-height: 1.6; margin: 8px 0 22px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- ambient ---------- */
.ambient {
  position: fixed; inset: 0; z-index: 300;
  background:
    radial-gradient(900px 700px at 22% 16%, rgba(var(--accent-rgb), 0.12), transparent 62%),
    radial-gradient(800px 700px at 82% 88%, rgba(94, 234, 212, 0.07), transparent 62%),
    #050708;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.6s var(--ease);
}
.ambient.is-on { opacity: 1; }
.ambient-glow { position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), 0.1), transparent 65%); filter: blur(40px); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(60px, 30px) scale(1.12); } }
.ambient-top { position: absolute; top: 30px; left: 36px; right: 36px; display: flex; justify-content: space-between; color: var(--text-3); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; }
.ambient-brand { color: var(--text-2); font-family: var(--font-display); font-weight: 600; letter-spacing: 0.02em; text-transform: none; font-size: 14px; }
.ambient-clock { font-family: var(--font-display); font-size: clamp(120px, 21vw, 300px); font-weight: 400; letter-spacing: -0.07em; line-height: 0.85; font-variant-numeric: tabular-nums; color: #f4f7f5; text-shadow: 0 30px 120px rgba(0, 0, 0, 0.6); }
.ambient-date { margin-top: 20px; color: var(--text-3); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }
.ambient-foot { position: absolute; bottom: 30px; left: 36px; right: 36px; display: flex; justify-content: space-between; color: var(--text-3); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.ambient-foot span { display: flex; align-items: center; gap: 7px; }
.ambient-foot .ic { width: 14px; height: 14px; }

/* ---------- helpers ---------- */
.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skeleton {
  border-radius: 8px; background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .hero { grid-template-columns: 1fr; min-height: 400px; }
  .hero::after { background: linear-gradient(90deg, rgba(8,10,11,.94), rgba(8,10,11,.62) 62%, rgba(8,10,11,.2)); }
  .hero-side { display: none; }
  .hero-copy { padding: 40px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split { grid-template-columns: 1fr; }
  .radio-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --rail: 0px; }
  .app { display: flex; flex-direction: column; height: 100dvh; }
  .main { flex: 1; min-height: 0; }
  .rail {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 160;
    flex-direction: row; align-items: center; justify-content: space-around;
    height: 78px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: none; border-top: 1px solid var(--line);
    background: rgba(10, 13, 14, 0.92);
  }
  .brand, .rail-foot .rail-mini, .brand-name { display: none; }
  .rail-nav { flex-direction: row; gap: 0; justify-content: space-around; flex: 1; }
  .rail-foot { display: contents; }
  .nav-btn { min-height: 56px; padding: 6px 2px; flex: 1; font-size: 9px; gap: 2px; }
  .nav-btn .nav-ic { width: 30px; height: 26px; }
  .nav-btn.is-active::before { left: 50%; top: 0; transform: translateX(-50%); width: 18px; height: 2px; }
  .nav-btn--settings { display: none; }
  .topbar { height: 70px; padding: 0 20px; }
  .parked-chip { display: none; }
  .tb-clock { gap: 0; }
  #tbDate { display: none; }
  #tbTime { font-size: 18px; }
  .view { padding: 4px 20px 150px; }
  .foot { padding: 0 20px 100px; }
  .hero { min-height: 380px; border-radius: 24px; }
  .hero-copy { padding: 28px; }
  .hero-copy h1 { font-size: 42px; }
  .hero-copy p.lede { font-size: 13px; }
  .quick-grid { gap: 10px; }
  .quick { min-height: 124px; padding: 16px; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  .mini { left: 12px; right: 12px; bottom: 88px; height: 68px; }
  .overlay-top { height: 66px; padding: 0 14px; }
  .overlay-body { padding: 0 12px 16px; }
  .stage-video { border-radius: 10px; }
  .source-form { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 38px; }
  .stage-radio .big-art { width: 160px; height: 160px; font-size: 44px; margin-bottom: 20px; }
}
@media (max-width: 560px) {
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { flex: 1; }
  .settings-grid { gap: 12px; }
  .panel { padding: 18px; }
  .game-card { min-height: 280px; }
}

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