:root {
  --bg0: #0a0b0d;
  --bg1: #12141a;
  --bg2: #1a1d26;
  --line: rgba(244, 241, 234, 0.12);
  --text: #f4f1ea;
  --muted: #9aa3b2;
  --accent: #f0a202;
  --accent-2: #ff6b35;
  --ok: #3dd68c;
  --danger: #ff5c5c;
  --radius: 16px;
  --radius-lg: 20px;
  --glass: rgba(10, 11, 13, 0.48);
  --glass-strong: rgba(10, 11, 13, 0.78);
  --glass-border: rgba(244, 241, 234, 0.12);
  --sidebar-w: 232px;
  --player-h: 76px;
  --tabs-h: 62px;
  --top-h: 64px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --font-display: "Plus Jakarta Sans", "Vazirmatn", sans-serif;
  --font-body: "Inter", "Vazirmatn", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 200ms;
  --focus: 0 0 0 3px rgba(240, 162, 2, .35);
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/app/static/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/app/static/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/app/static/fonts/inter-700.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/app/static/fonts/jakarta-600.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/app/static/fonts/jakarta-700.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/app/static/fonts/jakarta-800.woff2") format("woff2");
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/app/static/fonts/vazir-ar-400.woff2") format("woff2"),
       url("/app/static/fonts/vazir-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/app/static/fonts/vazir-400.woff2") format("woff2");
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/app/static/fonts/vazir-ar-700.woff2") format("woff2"),
       url("/app/static/fonts/vazir-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/app/static/fonts/vazir-700.woff2") format("woff2");
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-tap-highlight-color: transparent;
}

.feral-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg0);
}
.feral-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  will-change: transform;
  opacity: 0.42;
  transform: translateZ(0);
}
.feral-blob-a {
  width: 68vw;
  height: 68vw;
  top: -16%;
  left: -22%;
  background: radial-gradient(circle, #f0a202 0%, transparent 68%);
  animation: feral-drift-a 24s ease-in-out infinite alternate;
}
.feral-blob-b {
  width: 80vw;
  height: 80vw;
  top: 22%;
  right: -38%;
  background: radial-gradient(circle, #ff6b35 0%, transparent 70%);
  animation: feral-drift-b 30s ease-in-out infinite alternate;
}
.feral-blob-c {
  width: 55vw;
  height: 55vw;
  bottom: -18%;
  left: 12%;
  background: radial-gradient(circle, #f4f1ea 0%, transparent 65%);
  opacity: 0.16;
  animation: feral-drift-c 26s ease-in-out infinite alternate;
}
.feral-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 11, 13, 0.28) 0%, rgba(10, 11, 13, 0.52) 42%, rgba(10, 11, 13, 0.9) 100%),
    linear-gradient(90deg, rgba(10, 11, 13, 0.42), transparent 42%, rgba(10, 11, 13, 0.32));
}
.feral-noise {
  position: absolute;
  inset: 0;
  opacity: 0.11;
  mix-blend-mode: overlay;
  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='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes feral-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(10%, 8%, 0) scale(1.06); }
}
@keyframes feral-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.04); }
  to { transform: translate3d(-8%, 6%, 0) scale(1); }
}
@keyframes feral-drift-c {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(6%, -10%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .feral-blob { animation: none; }
}

html[dir="rtl"] body {
  font-family: "Vazirmatn", "Inter", system-ui, sans-serif;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #ffc14d; }

button, .btn, .nav-link {
  font: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 14px;
  background: var(--bg2);
  color: var(--text);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

button:hover, .btn:hover, .nav-link:hover { background: #222733; }
.btn-primary, button.primary {
  background: var(--accent);
  color: #1a1000;
  font-weight: 700;
  border-color: transparent;
}
.btn-primary:hover, button.primary:hover { background: #ffb020; color: #1a1000; }
.btn-danger, button.danger { background: #2a1414; color: #ffb4b4; border-color: #4a2222; }
.btn-ghost, button.secondary { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover, button.secondary:hover { color: var(--text); border-color: #3d4452; }
.btn-icon {
  width: 40px; height: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
}
.btn-play {
  width: 44px; height: 44px; padding: 0; border-radius: 999px;
  background: var(--accent); color: #1a1000; font-weight: 700; border: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.btn-play.is-playing { background: var(--accent-2); }
.btn-play-lg {
  width: auto;
  min-height: 48px;
  padding: 0 22px;
  gap: 8px;
  font-size: .95rem;
  border-radius: 999px;
}

/* —— App shell —— */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  padding-bottom: 0;
  transition: padding-bottom .22s ease;
}
.app-shell.has-player {
  padding-bottom: var(--player-h);
}
.app-shell.has-player.player-sheet-open {
  padding-bottom: calc(var(--player-h) + 88px);
}

.app-shell.auth-mode {
  grid-template-columns: 1fr;
  padding-bottom: 0;
}
.app-shell.auth-mode .sidebar,
.app-shell.auth-mode .mobile-top,
.app-shell.auth-mode .mobile-tabs,
.app-shell.auth-mode .now-playing {
  display: none !important;
}
.app-shell.auth-mode .main {
  padding: 0;
  max-width: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 14px;
  background: var(--bg1);
  border-inline-end: 1px solid var(--line);
  z-index: 20;
}

.brand {
  font-family: "Plus Jakarta Sans", "Vazirmatn", sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -.03em;
  color: var(--text);
  padding: 8px 10px 18px;
  display: block;
}
.brand span { color: var(--accent); }
.brand:hover { color: var(--text); }

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

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  border: none;
  text-align: start;
  width: 100%;
  font-weight: 500;
}
.side-link:hover { background: var(--bg2); color: var(--text); }
.side-link.active {
  background: var(--bg2);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--accent);
}
[dir="rtl"] .side-link.active {
  box-shadow: inset -3px 0 0 var(--accent);
}

.side-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.main {
  min-width: 0;
  padding: 28px 32px 40px;
  max-width: 1120px;
}

#view {
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#view.is-loading,
#view.is-nav-out {
  opacity: 0.35;
  pointer-events: none;
  transform: translateY(4px);
}
#view.is-nav-in {
  animation: viewIn 0.28s ease;
}
@keyframes viewIn {
  from { opacity: 0.35; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  #view,
  #view.is-loading,
  #view.is-nav-out,
  #view.is-nav-in {
    transition: none;
    animation: none;
    transform: none;
  }
}

.nav-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  height: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease, transform .35s ease;
}
[dir="rtl"] .nav-progress { transform-origin: right center; }
.nav-progress.is-active {
  opacity: 1;
  transition: opacity .1s ease, transform .55s cubic-bezier(.2,.8,.2,1);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-head h1 {
  font-family: "Plus Jakarta Sans", "Vazirmatn", sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0;
}
.page-head .sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.mobile-top {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  box-sizing: border-box;
  height: calc(var(--top-h) + env(safe-area-inset-top, 0px));
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 0px) 16px 0;
  background: rgba(10, 11, 13, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mobile-brand {
  padding: 0 !important;
  font-size: 1.12rem !important;
}
.btn-lang {
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  min-height: 36px;
  cursor: pointer;
}
.btn-lang:hover { color: var(--text); border-color: #3d4452; }

.mobile-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 40;
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(18, 20, 26, .97);
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(3, 1fr);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mobile-tabs a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 650;
  min-height: var(--tabs-h);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.mobile-tabs .tab-ico {
  font-size: .95rem;
  line-height: 1;
  opacity: .85;
}
.mobile-tabs a.active {
  color: var(--accent);
  background: linear-gradient(180deg, rgba(240,162,2,.1), transparent 70%);
}
.mobile-tabs a.active .tab-ico { opacity: 1; }

/* —— Sticky player —— */
.now-playing {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 50;
  min-height: var(--player-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 0;
  background: rgba(18, 20, 26, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform .22s ease, opacity .22s ease, min-height .22s ease;
}
.now-playing.is-empty .np-meta { opacity: .7; }
.now-playing.is-collapsed {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  min-height: 0;
  border-top-color: transparent;
}
.np-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: var(--player-h);
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}
.np-status {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
}
.btn-play.is-connecting,
.art-play.is-connecting,
.now-playing.is-connecting .btn-play {
  animation: connectPulse 1s ease-in-out infinite;
}
@keyframes connectPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
.np-expand {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.np-sheet {
  display: none;
  width: 100%;
  padding: 4px 16px 14px;
  border-top: 1px solid var(--line);
  background: rgba(12, 13, 16, .98);
}
.np-sheet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.np-sheet-lbl {
  font-size: .78rem;
  font-weight: 650;
  color: var(--muted);
  min-width: 64px;
}
.np-sheet-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}
.np-fav-sheet {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
}
.np-fav-sheet.is-faved { color: var(--accent); }

.np-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.np-art {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--bg2);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.np-art.placeholder {
  display: grid;
  place-items: center;
  color: rgba(240,162,2,.55);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .85rem;
  background: linear-gradient(145deg, #1a1d26, #2a220f);
}
.np-meta { min-width: 0; flex: 1; }
.np-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  min-height: 16px;
}
.np-title {
  font-weight: 650;
  font-size: .95rem;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-sub {
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.np-center { display: flex; justify-content: center; align-items: center; gap: 10px; }
.np-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.np-right input[type="range"] { width: 110px; accent-color: var(--accent); }
.np-fav {
  display: none;
  min-width: 40px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
}
.np-fav.is-on { display: inline-flex; align-items: center; justify-content: center; }
.np-fav.is-faved { color: var(--accent); border-color: rgba(240,162,2,.4); }
#player { display: none; }

/* —— Redesign primitives —— */
.type-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  margin: 0;
}
.type-h1 {
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -.03em;
  font-size: 1.65rem;
  margin: 0;
}
.type-h2 {
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -.02em;
  font-size: 1.2rem;
  margin: 0;
}
.type-caption {
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffb4b4;
  background: rgba(251, 44, 54, .12);
  border: 1px solid rgba(251, 44, 54, .28);
  border-radius: 999px;
  padding: 4px 9px;
  line-height: 1;
}
.live-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fb2c36;
  box-shadow: 0 0 0 0 rgba(251, 44, 54, .55);
  animation: live-pulse 2.2s var(--ease) infinite;
}
.live-badge.is-off {
  color: var(--muted);
  background: var(--bg2);
  border-color: var(--line);
}
.live-badge.is-off::before {
  background: var(--muted);
  animation: none;
  box-shadow: none;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 44, 54, .45); }
  70% { box-shadow: 0 0 0 8px rgba(251, 44, 54, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 44, 54, 0); }
}
.peak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #ffd79a;
  background: rgba(240,162,2,.1);
  border: 1px solid rgba(240,162,2,.25);
  border-radius: 999px;
  padding: 4px 9px;
  line-height: 1;
}
.peak-badge.is-muted {
  color: var(--muted);
  background: var(--bg2);
  border-color: var(--line);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 28px;
}
.kpi-strip--compact {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg1);
  border: 1px solid var(--line);
}
.kpi-strip--compact .kpi-cell {
  padding: 0;
  border: 0;
  background: transparent;
  min-height: 0;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
}
.kpi-strip--compact .kpi-val {
  font-size: 1.35rem;
  color: var(--accent);
}
.kpi-strip--compact .kpi-lbl {
  text-transform: none;
  letter-spacing: 0;
  font-size: .85rem;
}
.kpi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  font-size: .82rem;
}
.kpi-cell {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--bg1);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 84px;
}
.kpi-val {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
}
.kpi-lbl {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 650;
}

.discover-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
  align-items: stretch;
}
.discover-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(18,20,26,.95), rgba(12,13,16,.9));
  border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease);
  min-height: 0;
}
.discover-card:hover { border-color: #3d4452; }
.discover-art {
  position: relative;
  margin: 0;
  width: 96px;
  flex-shrink: 0;
}
.discover-art .art {
  width: 96px;
  height: 96px;
  aspect-ratio: 1;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(145deg, #1a1d26 0%, #2a220f 55%, #1a1000 100%);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: rgba(240, 162, 2, .55);
  overflow: hidden;
}
.discover-art .art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.discover-art .art-play {
  position: absolute;
  inset-inline-end: 6px;
  bottom: 6px;
  opacity: 1;
  transform: none;
  width: 36px;
  height: 36px;
}
.discover-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.discover-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.discover-badges {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.discover-count {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}
.discover-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.discover-title-row h3,
.discover-body > h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin: 0;
  font-weight: 750;
  letter-spacing: -.02em;
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discover-title-row h3 a,
.discover-body > h3 a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discover-owner {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discover-desc {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.discover-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 4px 0 0;
  overflow: hidden;
  max-height: 26px;
}
.discover-tags .tag-chip {
  flex: 0 0 auto;
  padding: 3px 8px;
  font-size: .68rem;
}
.discover-card .tile-now {
  margin: 2px 0 0;
  font-size: .78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discover-card .tile-actions {
  margin-top: 6px;
  gap: 12px;
}
.discover-card .tile-actions .icon-action {
  font-size: .78rem;
}

/* Desktop: keep dense info from bloating one card taller than neighbors */
@media (min-width: 901px) {
  .discover-card .discover-tags {
    display: none;
  }
  .discover-card .tile-actions {
    margin-top: auto;
    padding-top: 4px;
  }
}
@media (max-width: 720px) {
  .discover-list {
    grid-template-columns: 1fr;
  }
  .discover-card {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }
  .discover-art,
  .discover-art .art {
    width: 80px;
    height: 80px;
  }
  .discover-desc {
    -webkit-line-clamp: 2;
  }
}

.studio-cta {
  margin: 36px 0 12px;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(240,162,2,.28);
  background:
    radial-gradient(500px 200px at 0% 0%, rgba(240,162,2,.16), transparent 55%),
    linear-gradient(160deg, #16120a 0%, #0c0d10 100%);
}
.studio-cta-inner { max-width: 520px; }
.studio-cta .type-caption { margin-bottom: 8px; color: #ffd79a; }
.studio-cta .type-h2 { margin: 0 0 8px; }
.studio-cta-sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
}
.signal-hero {
  background:
    radial-gradient(560px 280px at 8% 0%, rgba(240,162,2,.22), transparent 55%),
    radial-gradient(400px 200px at 90% 80%, rgba(255,107,53,.08), transparent 50%),
    linear-gradient(160deg, #161821 0%, #0c0d10 100%);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 16px;
  flex-wrap: wrap;
}
.section-head .type-h2 { margin: 0; }
.section-head .sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .88rem;
}

.listen-jump {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.listen-jump a {
  font-size: .78rem;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
}
.listen-jump a:hover { color: var(--text); border-color: #3d4452; }

.empty-state {
  padding: 28px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: rgba(18,20,26,.4);
}
.empty-state h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.station-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 24px;
  align-items: end;
  padding: 28px 24px;
  margin: 0 0 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(500px 240px at 10% 0%, rgba(240,162,2,.18), transparent 55%),
    linear-gradient(160deg, #161821 0%, #0c0d10 100%);
  border: 1px solid var(--line);
  scroll-margin-top: 72px;
}
.station-hero-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3rem;
  color: rgba(240,162,2,.55);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.station-hero-art.theme-rap {
  background: linear-gradient(145deg, #1a1020 0%, #3a1a2a 50%, #1a1000 100%);
}
.station-hero-art.theme-khareji {
  background: linear-gradient(145deg, #0f1a22 0%, #1a3a40 50%, #0a1218 100%);
  color: rgba(120, 210, 220, .55);
}
.station-hero-art.theme-pop {
  background: linear-gradient(145deg, #1a1420 0%, #402060 45%, #1a1008 100%);
  color: rgba(255, 160, 200, .5);
}
.station-hero-meta { min-width: 0; }
.station-hero-meta .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.station-hero-meta .blurb {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: .95rem;
  max-width: 40ch;
}
.station-hero-now {
  margin: 14px 0 0;
  font-size: .92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.station-hero-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: .85rem;
}
.station-hero-stats strong { color: var(--text); font-weight: 700; }
.channel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.channel-title {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  margin: 0;
  min-width: 0;
  flex: 1;
}
.channel-icon-actions,
.discover-icon-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.share-icon {
  color: var(--muted);
}
.share-icon:hover,
.share-icon.is-shared {
  color: var(--accent);
}
.share-icon svg {
  display: block;
}
.station-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  align-items: center;
}
.station-hero-actions .btn-play-lg {
  width: auto;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  gap: 8px;
  font-size: .95rem;
}

.station-rail-wrap {
  position: relative;
  margin-bottom: 32px;
}
.station-rail-wrap::before,
.station-rail-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 16px;
  width: 28px;
  z-index: 2;
  pointer-events: none;
}
.station-rail-wrap::before {
  inset-inline-start: 0;
  background: linear-gradient(90deg, var(--bg0), transparent);
}
.station-rail-wrap::after {
  inset-inline-end: 0;
  background: linear-gradient(270deg, var(--bg0), transparent);
}
[dir="rtl"] .station-rail-wrap::before {
  background: linear-gradient(270deg, var(--bg0), transparent);
}
[dir="rtl"] .station-rail-wrap::after {
  background: linear-gradient(90deg, var(--bg0), transparent);
}
.station-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 240px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.station-rail::-webkit-scrollbar { display: none; }
.station-card-v2 {
  scroll-snap-align: start;
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
  text-align: start;
}
.station-card-v2 .art-wrap {
  margin: 0 0 12px;
  border-radius: 14px;
  overflow: hidden;
}
.station-card-v2 .art {
  aspect-ratio: 1;
  border-radius: 14px;
  font-size: 2.2rem;
  margin: 0;
  overflow: hidden;
  position: relative;
}
.station-card-v2 .art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.station-card-v2 .art.theme-rap {
  background: linear-gradient(145deg, #1a1020 0%, #3a1a2a 55%, #1a1000 100%);
}
.station-card-v2 .art.theme-khareji {
  background: linear-gradient(145deg, #0f1a22 0%, #1a3a40 55%, #0a1218 100%);
  color: rgba(120, 210, 220, .55);
}
.station-card-v2 .art.theme-pop {
  background: linear-gradient(145deg, #1a1420 0%, #402060 50%, #1a1008 100%);
  color: rgba(255, 160, 200, .5);
}
.station-card-v2 .art-play {
  opacity: 1;
  transform: none;
  width: 48px;
  height: 48px;
}
.station-card-v2 h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 4px;
}
.station-card-v2 .tile-meta { margin: 0 0 8px; min-height: 0; }
.station-card-v2 .live-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.station-card-v2 .now-pill {
  top: 12px;
  inset-inline-end: 12px;
  position: absolute;
  z-index: 2;
}
.station-card-v2 .art-wrap { position: relative; }

/* Favorites — dedicated section between Live and Discover */
.favorites-block {
  margin: 8px 0 28px;
  padding: 18px 18px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(240, 162, 2, .22);
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(240,162,2,.12), transparent 60%),
    linear-gradient(165deg, rgba(22,20,16,.95), rgba(12,13,16,.92));
  scroll-margin-top: 72px;
}
.favorites-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.favorites-eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 700;
}
.favorites-count {
  flex-shrink: 0;
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
  background: rgba(240, 162, 2, .12);
  border: 1px solid rgba(240, 162, 2, .28);
}
.favorites-list {
  margin-bottom: 0;
}
.favorites-card {
  background: rgba(10, 11, 13, .55);
  border-color: rgba(240, 162, 2, .16);
}
.favorites-card:hover {
  border-color: rgba(240, 162, 2, .4);
}
@media (min-width: 901px) {
  .favorites-card .discover-tags {
    display: flex;
  }
}


.now-playing-panel {
  padding: 18px 20px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg1);
  border: 1px solid var(--line);
}
.now-playing-panel .np-label {
  margin-bottom: 8px;
}
.now-playing-panel .np-track {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0;
}
.now-playing-panel .np-listeners {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .85rem;
}

.airplay-block {
  margin: 0 0 28px;
  padding: 16px 16px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(18, 20, 26, .55);
}
.airplay-head {
  margin-bottom: 10px;
}
.airplay-head h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 4px;
  font-weight: 750;
}
.airplay-head .sub {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}
.airplay-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(260px, 38vh);
}
.airplay-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg0);
  border: 1px solid var(--line);
}
.airplay-title {
  min-width: 0;
  font-size: .9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.airplay-time {
  flex-shrink: 0;
  font-size: .72rem;
}
.airplay-empty {
  padding: 12px 4px;
  font-size: .88rem;
}

.listen-channel-hero {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.listen-channel-hero .cover,
.listen-channel-hero .cover-fallback {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  max-width: 240px;
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0,0,0,.4);
}
.media-grid.premium .channel-card {
  padding: 0;
  background: transparent;
  border: 0;
  transform: none;
}
.media-grid.premium .channel-card:hover { transform: none; border-color: transparent; }
.media-grid.premium .art-wrap { margin-bottom: 12px; }
.media-grid.premium .art {
  border-radius: 12px;
  aspect-ratio: 1;
}
.media-grid.premium .art-play { opacity: 1; transform: none; }
.media-grid.premium .tile-body { padding: 0 2px; }


/* —— Surfaces —— */
.panel {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.panel h2, .panel h3 {
  font-family: "Plus Jakarta Sans", "Vazirmatn", sans-serif;
  margin: 0 0 10px;
  letter-spacing: -.02em;
  font-weight: 700;
}

/* Dashboard channel cards */
.dash-section {
  margin: 20px 0 28px;
}
.dash-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dash-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--bg1);
  border: 1px solid var(--line);
}
.dash-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.dash-card-main:hover h3 { color: var(--accent); }
.dash-card-art {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(145deg, #1a1d26 0%, #2a220f 55%, #1a1000 100%);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: rgba(240, 162, 2, .55);
}
.dash-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dash-card-art--sm {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 1rem;
}
.dash-card-body {
  min-width: 0;
}
.dash-card-body h3 {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-card-body .mono {
  font-size: .75rem;
  margin: 0 0 6px;
}
.dash-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.dash-more {
  position: relative;
}
.dash-more > summary {
  list-style: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
}
.dash-more > summary::-webkit-details-marker { display: none; }
.dash-more-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 140px;
  padding: 8px;
  border-radius: 12px;
  background: var(--bg1);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-more-menu a,
.dash-more-menu button {
  display: block;
  width: 100%;
  text-align: start;
  padding: 8px 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.dash-more-menu a:hover,
.dash-more-menu button:hover {
  background: var(--bg2);
}
.dash-request-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dash-request-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.dash-request-row:last-child { border-bottom: 0; padding-bottom: 0; }
.dash-request-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dash-request-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.muted { color: var(--muted); }

.flash {
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: .92rem;
  border: 1px solid var(--line);
}
.flash.success { background: #0f241c; color: #b6f5d0; border-color: #1a3d2e; }
.flash.error { background: #2a1414; color: #ffb4b4; border-color: #4a2222; }
.flash.info { background: #241c10; color: #ffd79a; border-color: #3d2a12; }

label { display: block; margin: 10px 0 6px; color: var(--muted); font-size: .82rem; }
input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg0);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
}
textarea { min-height: 80px; resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 160px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 650;
  background: var(--bg2);
  color: #c9d1df;
}
.badge.public, .badge.ok { background: #143024; color: #9ef0c2; }
.badge.private, .badge.wait { background: #2e220f; color: #ffd18a; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; }
.nav-badge {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1000;
  font-size: .68rem;
  font-weight: 700;
  margin-inline-start: 6px;
}

form.inline { display: inline; }

/* —— Media tiles —— */
.media-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 200px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 28px;
  scrollbar-width: thin;
}

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

.media-tile {
  position: relative;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  text-align: start;
  transition: border-color .15s ease, transform .15s ease;
}
.media-tile:hover {
  border-color: #3d4452;
  transform: translateY(-2px);
}
.art-wrap {
  position: relative;
  margin-bottom: 10px;
}
.media-tile .art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(145deg, #1a1d26 0%, #2a220f 55%, #1a1000 100%);
  display: grid;
  place-items: center;
  font-family: "Plus Jakarta Sans", "Vazirmatn", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: rgba(240, 162, 2, .55);
}
.media-tile .art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.art-play {
  position: absolute;
  inset-inline-end: 10px;
  bottom: 10px;
  width: 40px;
  height: 40px;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}
.media-tile:hover .art-play,
.media-tile:focus-within .art-play {
  opacity: 1;
  transform: translateY(0);
}
.media-tile h3 {
  font-family: "Plus Jakarta Sans", "Vazirmatn", sans-serif;
  font-size: 1rem;
  margin: 0 0 4px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.tile-title {
  color: inherit;
  text-decoration: none;
}
.tile-title:hover { color: var(--accent); }
.media-tile .tile-meta {
  color: var(--muted);
  font-size: .8rem;
  margin: 0 0 8px;
  min-height: 0;
}
.tile-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: space-between;
}
.tile-top h3 { flex: 1; min-width: 0; }
.tile-now {
  margin: 6px 0 0;
  font-size: .75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.2em;
}
.listen-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.listen-chips .chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: .72rem;
  font-weight: 650;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  line-height: 1.3;
}
.listen-chips .chip-lbl {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .62rem;
}
.media-tile .tile-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.icon-action {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  line-height: inherit;
}
.icon-action:hover { color: var(--accent); }
button.icon-action.share-btn.is-shared,
button.btn-ghost.share-btn.is-shared {
  color: var(--accent);
}
.icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 4px 6px;
  min-height: 36px;
  min-width: 36px;
  cursor: pointer;
  border-radius: 8px;
}
.icon-btn:hover { color: var(--accent); background: rgba(240,162,2,.08); }
.fav-btn { color: var(--accent); }
.fav-form { margin: 0; flex-shrink: 0; }
.tile-link {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
}
.tile-link:hover { color: var(--accent); }
.btn-logout {
  width: 100%;
  color: var(--danger, #f07178) !important;
  border-color: rgba(240,113,120,.35) !important;
}
.now-pill {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  display: none;
  background: var(--accent);
  color: #1a1000;
  font-size: .65rem;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: .04em;
  z-index: 2;
}
.now-pill.on { display: block; }

.section-title {
  font-family: "Plus Jakarta Sans", "Vazirmatn", sans-serif;
  font-size: 1.2rem;
  margin: 8px 0 14px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: center;
}
.toolbar input[type="search"] { flex: 1; min-width: 180px; }
.toolbar select { max-width: 150px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.tag-chip {
  font-size: .72rem;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg2);
  color: var(--muted);
  border: 1px solid var(--line);
}
.tag-chip:hover { color: var(--text); }
.tag-chip.active {
  background: #2e220f;
  color: #ffd79a;
  border-color: #5a3d18;
}

.resume-chip {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.studio-hero {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 20px;
}
.studio-hero .cover {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg2);
  flex-shrink: 0;
}
.studio-hero .cover-fallback {
  display: grid;
  place-items: center;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: rgba(240,162,2,.45);
}
.studio-hero-meta {
  flex: 1;
  min-width: 200px;
}
.studio-hero-meta h1 { margin: 0; }
.studio-hero-meta .sub { margin-top: 8px; }
.studio-desc { margin: 10px 0 0; }
.studio-url { margin: 8px 0 0; }
.studio-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.studio-sections { display: flex; flex-direction: column; gap: 4px; }
.level-meter {
  width: 100%;
  height: 6px;
  background: var(--bg0);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.level-meter > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .08s linear;
}

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { margin: 6px 0; color: var(--muted); }
.checklist li.done { color: var(--ok); }

/* —— Studio / admin sections —— */
.studio-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 16px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(18, 20, 26, .72);
  border: 1px solid var(--line);
  position: sticky;
  top: calc(var(--top-h, 52px) + env(safe-area-inset-top, 0px) + 8px);
  z-index: 15;
}
.studio-nav a {
  font-size: .78rem;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg1);
}
.studio-nav a:hover {
  color: var(--text);
  border-color: #3d4452;
}
.studio-nav a.is-active {
  color: #1a1000;
  background: var(--accent);
  border-color: var(--accent);
}
.studio-panels {
  margin-bottom: 12px;
  min-height: 120px;
}
.studio-panel {
  scroll-margin-top: 0;
  margin-bottom: 0;
  animation: studioIn .18s ease;
}
.studio-panel[hidden] {
  display: none !important;
}
@keyframes studioIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.studio-block {
  margin-bottom: 28px;
  scroll-margin-top: 80px;
}

/* Studio channel: desktop keeps history always visible */
.channel-listen-more > summary {
  display: none;
}
.channel-listen-more-body {
  display: block;
}
.block-head { margin-bottom: 12px; }
.block-head .section-title { margin: 0 0 4px; }
.block-sub {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-head h3 { margin: 0; }
.panel-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .82rem;
}
.panel-accent {
  border-color: #5a3d18;
  background: linear-gradient(160deg, #1a140a 0%, var(--bg1) 60%);
}
.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stack-form > .btn-primary,
.stack-form > .btn-ghost {
  margin-top: 10px;
  align-self: flex-start;
}
.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.kv-item {
  background: var(--bg0);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.kv-wide { grid-column: 1 / -1; }
.kv-lbl {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 650;
}
.kv-val { font-size: .92rem; word-break: break-all; }
.add-track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.add-track-wide { grid-column: 1 / -1; }
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}
.field-span-2 { grid-column: 1 / -1; }
.settings-layout { display: flex; flex-direction: column; gap: 0; }
.track-list, .people-list, .card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* —— Internal scroll panes (long lists / tables; not Listen playlists) —— */
.scroll-pane,
.panel > .people-list,
.panel .people-list,
.table-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 163, 178, .35) transparent;
}
.table-scroll {
  overflow-x: auto;
}
.scroll-pane,
.table-scroll {
  max-height: min(420px, 52vh);
}
.scroll-pane--sm,
.panel > .people-list,
.panel .people-list {
  max-height: min(260px, 38vh);
}
.scroll-pane--md { max-height: min(360px, 48vh); }
.scroll-pane--lg {
  max-height: min(520px, 60vh);
}
.scroll-pane--xl { max-height: min(640px, 70vh); }

.scroll-pane.card-list,
.scroll-pane.track-list {
  padding-inline-end: 4px;
}

.scroll-pane::-webkit-scrollbar,
.panel .people-list::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scroll-pane::-webkit-scrollbar-track,
.panel .people-list::-webkit-scrollbar-track,
.table-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.scroll-pane::-webkit-scrollbar-thumb,
.panel .people-list::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(154, 163, 178, .35);
  border-radius: 999px;
}
.scroll-pane::-webkit-scrollbar-thumb:hover,
.panel .people-list::-webkit-scrollbar-thumb:hover,
.table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(154, 163, 178, .55);
}

.panel .track-list,
.panel .people-list {
  margin-top: 12px;
}
.table-scroll {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg0);
}
.table-scroll table {
  margin: 0;
}
.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg1);
  box-shadow: 0 1px 0 var(--line);
}
/* Keep horizontal station rail as x-only (already defined); do not nest y-scroll */
.station-rail {
  overflow-y: hidden;
}
.track-row, .people-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg0);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.track-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.track-title, .people-name {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-src { font-size: .75rem; }
.people-row > div { min-width: 0; }
.empty-hint { margin: 8px 0 0; }
.small { font-size: .78rem; }
.cover-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 10px;
  background: var(--bg0);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  min-height: 88px;
}
.tool-card:hover { border-color: #5a3d18; color: var(--text); }
.tool-ico { color: var(--accent); font-size: 1rem; margin-bottom: 4px; }
.tool-lbl { font-weight: 700; font-size: .88rem; }
.tool-desc { color: var(--muted); font-size: .72rem; }
.embed-snip { min-height: 72px; font-size: .72rem; }
.back-links { margin-top: 8px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.stat-card {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 92px;
}
.stat-lbl {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 650;
}
.stat-val {
  font-family: "Plus Jakarta Sans", "Vazirmatn", sans-serif;
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -.03em;
}
.stat-den { color: var(--muted); font-size: 1rem; font-weight: 600; }
.stat-hint { font-size: .75rem; }
.badge-inline { font-size: 1rem; }

.entity-card {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.entity-card--compact .entity-top {
  margin-bottom: 8px;
}
.entity-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.entity-details {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}
.entity-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 0;
  font-size: .86rem;
  font-weight: 650;
  color: var(--muted);
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.entity-details > summary::-webkit-details-marker { display: none; }
.entity-details > summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-inline-end: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .15s ease;
  opacity: .7;
}
.entity-details[open] > summary {
  color: var(--accent);
}
.entity-details[open] > summary::before {
  transform: rotate(45deg);
  margin-top: -2px;
}
.entity-details .entity-body {
  padding-bottom: 4px;
}
.entity-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.entity-title {
  font-family: "Plus Jakarta Sans", "Vazirmatn", sans-serif;
  font-size: 1.05rem;
  margin: 0 0 4px;
  font-weight: 700;
}
.entity-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.entity-body { min-width: 0; }
.entity-danger {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.compact-row { margin-bottom: 8px; }
.compact-row input { max-width: 120px; }

@media (max-width: 900px) {
  .studio-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 4px;
    top: calc(var(--top-h) + env(safe-area-inset-top, 0px));
    margin: 0 0 14px;
    margin-inline: -14px;
    padding: 6px 8px;
    border-radius: 0;
    border-inline: 0;
    flex-wrap: unset;
    overflow: visible;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(10, 11, 13, .92);
  }
  .studio-nav a {
    flex: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    padding: 10px 4px;
    border-radius: 10px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .01em;
    border-color: transparent;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
  }
  .studio-nav a:hover {
    border-color: transparent;
    color: var(--text);
    background: rgba(255,255,255,.04);
  }
  .studio-nav a.is-active {
    color: #1a1000;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(240, 162, 2, .28);
  }
  .studio-tab-lbl {
    display: block;
    line-height: 1.15;
  }

  /* Compact hero so studio tabs sit near the top */
  .channel-listen-chrome--studio .listen-channel-hero {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 12px;
  }
  .channel-listen-chrome--studio .listen-channel-hero .cover,
  .channel-listen-chrome--studio .listen-channel-hero .cover-fallback {
    max-width: 72px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,.35);
  }
  .channel-listen-chrome--studio .channel-title {
    font-size: 1.2rem;
    line-height: 1.2;
  }
  .channel-listen-chrome--studio .channel-hero-desc,
  .channel-listen-chrome--studio .station-hero-stats,
  .channel-listen-chrome--studio .channel-hero-extra,
  .channel-listen-chrome--studio .eyebrow .tag-chip {
    display: none;
  }
  .channel-listen-chrome--studio .eyebrow {
    margin-bottom: 6px !important;
  }
  .channel-listen-chrome--studio .station-hero-actions {
    margin-top: 8px;
  }
  .channel-listen-chrome--studio .btn-play-lg {
    min-height: 40px;
    padding: 8px 14px;
    font-size: .85rem;
  }

  /* History tucked under a tap target on mobile studio */
  .channel-listen-chrome--studio .channel-listen-more {
    display: block;
    margin: 0 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg1);
    overflow: hidden;
  }
  .channel-listen-chrome--studio .channel-listen-more > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    font-size: .8rem;
    font-weight: 650;
    color: var(--muted);
    -webkit-tap-highlight-color: transparent;
  }
  .channel-listen-chrome--studio .channel-listen-more > summary::-webkit-details-marker {
    display: none;
  }
  .channel-listen-chrome--studio .channel-listen-more > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-inline-end: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    margin-top: -4px;
    transition: transform .15s ease;
  }
  .channel-listen-chrome--studio .channel-listen-more[open] > summary {
    color: var(--accent);
    border-bottom: 1px solid var(--line);
  }
  .channel-listen-chrome--studio .channel-listen-more[open] > summary::after {
    transform: rotate(225deg);
    margin-top: 2px;
  }
  .channel-listen-chrome--studio .channel-listen-more-body {
    padding: 12px 14px 14px;
  }
  .channel-listen-chrome--studio .channel-listen-more .now-playing-panel {
    margin-bottom: 12px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .channel-listen-chrome--studio .channel-listen-more .airplay-block {
    margin: 0;
  }

  .studio-panels {
    min-height: 0;
  }
  .studio-block {
    margin-bottom: 16px;
    scroll-margin-top: calc(var(--top-h) + 64px);
  }
  .studio-panel .block-head {
    margin-bottom: 10px;
  }
  .studio-panel .section-title {
    font-size: 1.05rem;
  }

  .add-track-grid,
  .two-col,
  .field-grid,
  .kv-grid,
  .stat-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .add-track-wide,
  .field-span-2,
  .kv-wide { grid-column: auto; }
  .stack-form > .btn-primary,
  .stack-form > .btn-ghost {
    width: 100%;
    align-self: stretch;
  }
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(600px 320px at 20% 0%, rgba(240,162,2,.12), transparent 60%),
    var(--bg0);
}
.auth-card {
  width: min(400px, 100%);
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 24px;
}
.auth-card .brand { padding: 0 0 8px; font-size: 1.5rem; }

.stats { margin-top: 8px; font-size: .82rem; color: var(--muted); }
.stats div { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.stats div span:last-child {
  color: var(--text);
  font-weight: 500;
  text-align: end;
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats div span:last-child[title] { cursor: default; }

/* —— Upload progress —— */
.upload-progress {
  margin-top: 14px;
}
.upload-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg0);
  border: 1px solid var(--line);
  overflow: hidden;
}
.upload-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width .15s ease;
}
.upload-progress.is-indeterminate .upload-progress-fill {
  width: 35% !important;
  animation: upload-indeterminate 1.1s ease-in-out infinite;
}
@keyframes upload-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.upload-progress-status {
  margin: 8px 0 0;
  font-size: .85rem;
  color: var(--muted);
}
.upload-progress-status.is-ok { color: var(--ok); }
.upload-progress-status.is-error { color: var(--danger); }

@media (max-width: 900px) {
  :root {
    --player-h: 64px;
    --tabs-h: 58px;
    --top-h: 52px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px));
  }
  .app-shell.has-player {
    padding-bottom: calc(var(--player-h) + var(--tabs-h) + env(safe-area-inset-bottom, 0px));
  }
  .app-shell.has-player.player-sheet-open {
    padding-bottom: calc(var(--player-h) + 96px + var(--tabs-h) + env(safe-area-inset-bottom, 0px));
  }
  .sidebar { display: none; }
  .mobile-top { display: flex; }
  .mobile-tabs { display: grid; }

  .main {
    padding: 16px 14px 24px;
    max-width: none;
  }

  .page-head {
    margin-bottom: 16px;
    align-items: flex-start;
  }
  .page-head h1 {
    font-size: 1.4rem;
  }
  .page-head .sub {
    font-size: .88rem;
  }
  .section-title {
    font-size: 1.05rem;
    margin: 4px 0 12px;
  }

  /* Player above tabs */
  .now-playing {
    bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px));
    min-height: var(--player-h);
  }
  .np-main {
    grid-template-columns: 1fr auto;
    gap: 10px;
    height: var(--player-h);
    padding: 0 12px;
    padding-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px));
  }
  .np-right { display: none; }
  .np-center {
    justify-content: flex-end;
    gap: 6px;
  }
  .np-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .now-playing.is-sheet-open .np-sheet {
    display: block;
  }
  .np-art { width: 44px; height: 44px; border-radius: 8px; }
  .np-fav.is-on { display: none; }

  .station-hero {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    gap: 16px;
    text-align: start;
  }
  .station-hero-art {
    max-width: 180px;
    margin-inline: auto;
    font-size: 2.4rem;
  }
  .station-hero-actions .btn-play-lg { width: 100%; }
  .kpi-strip--compact {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 12px;
    padding: 10px 12px;
  }
  .kpi-meta {
    justify-content: flex-start;
    font-size: .75rem;
  }
  .listen-jump {
    position: sticky;
    top: calc(var(--top-h) + env(safe-area-inset-top, 0px));
    z-index: 12;
    margin: 0 -14px 12px;
    padding: 8px 14px;
    background: rgba(10, 11, 13, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .listen-jump::-webkit-scrollbar { display: none; }
  .resume-chip {
    margin-bottom: 12px;
  }
  .app-shell.has-player .resume-chip {
    display: none;
  }
  .discover-card {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    max-height: none;
  }
  .discover-art,
  .discover-art .art {
    width: 80px;
    height: 80px;
  }
  .discover-count { font-size: 1.05rem; }
  .discover-list {
    grid-template-columns: 1fr;
  }
  .studio-cta { padding: 22px 16px; }
  .station-rail-wrap {
    margin-inline: -14px;
    margin-bottom: 24px;
  }
  .station-rail-wrap::before,
  .station-rail-wrap::after {
    width: 20px;
    bottom: 8px;
  }
  .station-rail {
    grid-auto-columns: minmax(150px, 62vw);
    padding-inline: 14px;
    scroll-padding-inline: 14px;
  }
  .listen-channel-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .listen-channel-hero .cover,
  .listen-channel-hero .cover-fallback {
    max-width: 200px;
    margin-inline: auto;
  }
  .media-grid.premium {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .media-grid.premium .channel-card {
    display: block;
    padding: 0;
  }
  .np-title { font-size: .9rem; }
  .np-sub { font-size: .72rem; }
  .now-playing .btn-play {
    width: 48px;
    height: 48px;
    font-size: 15px;
  }

  .dash-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .dash-card-actions {
    justify-content: flex-start;
  }

  /* Touch targets — not icon-only controls inside tiles */
  .btn-primary, .btn-ghost, button.primary, button.secondary {
    min-height: 44px;
  }
  .media-tile .icon-btn,
  .media-tile .art-play {
    min-height: 0;
  }
  .media-tile:hover { transform: none; }

  /* Pinned horizontal snap row */
  .media-row {
    grid-auto-columns: minmax(148px, 68vw);
    gap: 12px;
    margin-inline: -14px;
    padding-inline: 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .media-row::-webkit-scrollbar { display: none; }
  .media-row .media-tile {
    scroll-snap-align: start;
    padding: 10px;
  }
  .media-row .art-play {
    opacity: 1;
    transform: none;
    width: 44px;
    height: 44px;
  }
  .media-row .tile-meta { min-height: 0; margin-bottom: 6px; }
  .media-row .stats { font-size: .75rem; }
  .media-row .tile-actions { margin-top: 4px; }

  /* Discover grid: 2 cols on tablet, row tiles on phone via 480px */
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .media-grid .art-play {
    opacity: 1;
    transform: none;
  }
  .media-grid .tile-meta { min-height: 0; }

  /* Toolbar / tags */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .toolbar input[type="search"],
  .toolbar select,
  .toolbar .btn-primary,
  .toolbar .btn-ghost {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .tag-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin-inline: -14px;
    padding-inline: 14px 14px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tag-row::-webkit-scrollbar { display: none; }
  .tag-chip {
    flex: 0 0 auto;
    padding: 7px 12px;
    font-size: .74rem;
  }

  .resume-chip {
    padding: 10px 12px;
    gap: 8px;
  }
  .resume-chip .btn-primary {
    flex: 1;
    min-width: 0;
  }

  /* Studio / channel */
  .studio-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .studio-hero .cover {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1;
    margin-inline: auto;
  }
  .studio-hero-meta {
    min-width: 0;
    text-align: center;
  }
  .studio-hero-meta .sub {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .studio-url {
    word-break: break-all;
    font-size: .72rem;
  }
  .studio-hero-actions {
    justify-content: center;
  }
  .studio-play {
    width: 100%;
    order: -1;
  }

  .panel {
    padding: 14px;
    border-radius: 12px;
  }
  .row {
    flex-direction: column;
    align-items: stretch;
  }
  .row > * {
    min-width: 0;
    width: 100%;
  }
  .panel .btn-primary,
  .upload-block .btn-primary {
    width: 100%;
  }

  .table-wrap,
  .panel > table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-scroll table {
    display: table;
    width: 100%;
    min-width: 480px;
  }

  .auth-wrap {
    padding: 20px 16px;
    min-height: 100dvh;
  }
  .auth-card {
    padding: 22px 18px;
  }

  .table-scroll,
  .scroll-pane {
    max-height: min(400px, 50vh);
  }
  .scroll-pane--lg {
    max-height: min(460px, 56vh);
  }
  .panel .people-list,
  .scroll-pane--sm {
    max-height: min(240px, 36vh);
  }
}

@media (max-width: 480px) {
  .media-row {
    grid-auto-columns: minmax(140px, 72vw);
  }
  .table-scroll,
  .scroll-pane,
  .scroll-pane--lg {
    max-height: min(360px, 48vh);
  }
  .panel .people-list,
  .scroll-pane--sm {
    max-height: min(200px, 34vh);
  }
  .media-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .media-grid.premium {
    grid-template-columns: 1fr;
  }
  .media-grid.premium .channel-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }
  .media-grid.premium .art-wrap { margin: 0; }
  .media-grid .channel-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px;
  }
  .media-grid .art-wrap {
    margin: 0;
  }
  .media-grid .art {
    aspect-ratio: 1;
    border-radius: 10px;
    font-size: 1.25rem;
  }
  .media-grid .art-play {
    width: 40px;
    height: 40px;
    font-size: 13px;
    inset-inline-end: 6px;
    bottom: 6px;
  }
  .media-grid .tile-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .media-grid .tile-meta {
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .media-grid .tile-actions {
    margin-top: 6px;
    gap: 14px;
  }
  .media-grid .tile-actions .btn-ghost,
  .media-grid .tile-actions .btn-primary {
    display: none;
  }
  .media-grid .now-pill {
    top: 8px;
    inset-inline-end: 8px;
  }
  .page-head h1 { font-size: 1.28rem; }
}

/* —— VPN-bot chrome on Radio palette —— */
.app-shell,
.main {
  position: relative;
  z-index: 1;
}
.nav-progress { z-index: 100; }
.sidebar { z-index: 20; }
.mobile-top { z-index: 30; }
.mobile-tabs {
  z-index: 40;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
}
.now-playing { z-index: 50; }
.mobile-top,
.mobile-tabs {
  grid-column: 1 / -1;
}

button, .btn, .nav-link {
  border-radius: 12px;
  min-height: 44px;
  background: rgba(244, 241, 234, 0.07);
  border: 1px solid transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
button:hover, .btn:hover, .nav-link:hover {
  background: rgba(244, 241, 234, 0.12);
}
.btn-primary, button.primary {
  background: var(--accent);
  color: #1a1000;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(240, 162, 2, 0.22);
  backdrop-filter: none;
}
.btn-primary:hover, button.primary:hover {
  background: #ffb020;
  color: #1a1000;
}
.btn-ghost, button.secondary {
  background: transparent;
  border-color: var(--glass-border);
  color: var(--muted);
}
.btn-ghost:hover, button.secondary:hover {
  color: var(--text);
  background: rgba(244, 241, 234, 0.08);
}
.btn-icon, .icon-chip, .btn-lang, .np-expand, .np-fav, .icon-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(10, 11, 13, 0.6);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-play {
  background: var(--accent);
  color: #1a1000;
  border: none;
  box-shadow: 0 8px 20px rgba(240, 162, 2, 0.32);
}
.btn-play.is-playing {
  background: var(--accent-2);
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.32);
}

.sidebar {
  background: rgba(10, 11, 13, 0.55);
  border-inline-end: 1px solid var(--glass-border);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.brand {
  padding: 4px 10px 4px;
}
.side-kicker {
  margin: 0 10px 14px;
  font-size: 11px;
  color: var(--muted);
}
.side-link {
  border-radius: 12px;
  min-height: 44px;
  background: transparent;
  backdrop-filter: none;
}
.side-link:hover {
  background: rgba(244, 241, 234, 0.08);
  color: var(--text);
}
.side-link.active {
  background: rgba(244, 241, 234, 0.12);
  color: var(--text);
  box-shadow: none;
}
[dir="rtl"] .side-link.active { box-shadow: none; }
.side-footer {
  border-top-color: var(--glass-border);
}

.main {
  max-width: none;
  width: 100%;
  padding: 24px 22px 40px;
}
#view {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 901px) {
  :root {
    --frame-w: 960px;
    --sidebar-w: 208px;
  }
  .app-shell {
    width: min(var(--frame-w), calc(100% - 48px));
    max-width: var(--frame-w);
    margin-inline: auto;
    min-height: 100vh;
    background: rgba(10, 11, 13, 0.28);
    border-inline: 1px solid var(--glass-border);
    box-shadow: 0 0 0 1px rgba(10, 11, 13, 0.4);
  }
  .main {
    padding: 28px 28px 48px;
  }
  .station-rail-wrap {
    margin-inline: 0;
  }
  .station-rail-wrap::before,
  .station-rail-wrap::after {
    display: none;
  }
  .station-rail {
    display: grid;
    grid-auto-flow: unset;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-columns: unset;
    overflow: visible;
    scroll-snap-type: none;
    gap: 12px;
  }
  .discover-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .studio-cta-inner {
    max-width: 36rem;
  }
  .now-playing {
    left: 0;
    right: 0;
    width: min(var(--frame-w), calc(100% - 48px));
    max-width: var(--frame-w);
    margin-inline: auto;
    border-inline: 1px solid var(--glass-border);
    border-radius: 16px 16px 0 0;
  }
  button, .btn, .nav-link, .side-link {
    min-height: 40px;
  }
}

@media (min-width: 1280px) {
  :root { --frame-w: 1000px; }
}

.mobile-top {
  height: calc(var(--top-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0;
  background: rgba(10, 11, 13, 0.5);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  gap: 10px;
}
.mobile-head-text {
  min-width: 0;
  flex: 1;
}
.mobile-brand {
  display: block;
  font-size: 1.12rem !important;
  line-height: 1.15;
}
.mobile-kicker {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-lang {
  width: auto;
  min-width: 36px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mobile-tabs {
  background: rgba(10, 11, 13, 0.75);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 6px 8px max(6px, env(safe-area-inset-bottom, 0px));
  height: auto;
  min-height: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px));
  display: none;
}
.tabs-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.tabs-pill {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 0;
  border-radius: 12px;
  background: rgba(244, 241, 234, 0.12);
  pointer-events: none;
  opacity: 0;
  transition: transform 260ms cubic-bezier(0.23, 1, 0.32, 1), width 260ms cubic-bezier(0.23, 1, 0.32, 1), opacity 120ms ease;
}
.mobile-tabs a {
  position: relative;
  z-index: 1;
  gap: 2px;
  min-height: 48px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  background: transparent;
}
.mobile-tabs a.active {
  color: var(--text);
  background: transparent;
}
.mobile-tabs .tab-ico {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  opacity: 1;
}
.mobile-tabs .tab-ico svg {
  width: 18px;
  height: 18px;
  display: block;
}

.now-playing {
  background: rgba(10, 11, 13, 0.78);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.np-art {
  border-radius: 12px;
}
.np-sheet {
  background: rgba(10, 11, 13, 0.92);
  border-top-color: var(--glass-border);
}

.panel,
.dash-card,
.discover-card,
.kpi-strip--compact,
.kpi-cell,
.resume-chip,
.empty-state,
.auth-card,
.studio-cta,
.favorites-block,
.flash {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.panel,
.dash-card,
.discover-card {
  border-radius: var(--radius);
}
.discover-card:hover {
  border-color: rgba(244, 241, 234, 0.22);
  background: rgba(10, 11, 13, 0.58);
}
.kpi-strip--compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 0 0 16px;
}
.kpi-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(244, 241, 234, 0.1);
  color: var(--accent);
  flex-shrink: 0;
}
.kpi-ico svg { width: 16px; height: 16px; display: block; }
.kpi-strip--compact .kpi-cell--inline {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.kpi-strip--compact .kpi-lbl {
  font-size: 10px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.kpi-strip--compact .kpi-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.kpi-meta { font-size: 12px; color: var(--muted); }

.page-head h1,
.type-h2,
.panel h2, .panel h3,
.auth-card h2 {
  font-weight: 800;
  letter-spacing: -0.03em;
}
.page-head .sub { font-size: 11px; }

.listen-jump {
  gap: 6px;
  margin: 0 0 14px;
}
.listen-jump a {
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(10, 11, 13, 0.35);
  font-size: 11px;
  font-weight: 600;
}
.listen-jump a:hover {
  color: var(--text);
  background: rgba(244, 241, 234, 0.1);
  border-color: rgba(244, 241, 234, 0.22);
}

.tag-chip {
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  background: rgba(244, 241, 234, 0.05);
  border: 1px solid var(--glass-border);
  font-size: 11px;
  color: rgba(244, 241, 234, 0.78);
}
.tag-chip.active {
  background: rgba(240, 162, 2, 0.16);
  color: #ffd79a;
  border-color: rgba(240, 162, 2, 0.35);
}

input, select, textarea {
  background: rgba(10, 11, 13, 0.55);
  border: 1px solid rgba(244, 241, 234, 0.14);
  border-radius: 12px;
  min-height: 44px;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(244, 241, 234, 0.28);
  outline: none;
  box-shadow: 0 0 0 3px rgba(240, 162, 2, 0.22);
}

.badge {
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(244, 241, 234, 0.06);
}

.flash {
  border-radius: 12px;
}
.flash.success { background: rgba(15, 36, 28, 0.72); }
.flash.error { background: rgba(42, 20, 20, 0.72); }
.flash.info { background: rgba(36, 28, 16, 0.72); }

.auth-wrap {
  position: relative;
  z-index: 1;
  background: transparent;
}
.auth-card {
  padding: 28px 22px;
  border-radius: 20px;
}

.studio-cta,
.favorites-block,
.signal-hero {
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(240, 162, 2, 0.18), transparent 60%),
    var(--glass);
  border-color: rgba(240, 162, 2, 0.22);
}

.station-card-v2 .tile-body {
  padding: 10px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.station-rail-wrap::before {
  background: linear-gradient(90deg, var(--bg0), transparent);
  opacity: 0.55;
}
.station-rail-wrap::after {
  background: linear-gradient(270deg, var(--bg0), transparent);
  opacity: 0.55;
}

.dash-more-menu {
  background: rgba(10, 11, 13, 0.92);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 14px;
}

.empty-state {
  border-style: solid;
}

.toolbar {
  padding: 10px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (max-width: 900px) {
  .mobile-tabs { display: block; }
  .tabs-track { display: grid; }
  .listen-jump {
    background: rgba(10, 11, 13, 0.45);
    border-bottom-color: var(--glass-border);
  }
  .studio-nav {
    background: rgba(10, 11, 13, 0.5);
    border-color: var(--glass-border);
  }
  .studio-nav a.is-active {
    color: #1a1000;
    background: var(--accent);
  }
}
