/* ============================================================
   Vaanoli — unofficial, ad-free Tamil radio PWA
   ============================================================ */

:root {
  --bg: #07090e;
  --bg-2: #0b0e15;
  --surface: #11151f;
  --surface-2: #161b27;
  --surface-3: #1d2331;
  --text: #f4f6fb;
  --muted: #97a1b5;
  --faint: #6c7789;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);
  --amber: #ffc247;
  --coral: #ff5d73;
  --accent: #ffb31f;
  --accent-ink: #201604;
  --glass: rgba(10, 13, 20, 0.78);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.6);
  --card-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  --ring: rgba(255, 194, 71, 0.45);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 0.9, 0.3, 1);
  --player-h: 82px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f0e7;
  --bg-2: #faf7f0;
  --surface: #fffdf8;
  --surface-2: #f6f1e6;
  --surface-3: #ede5d5;
  --text: #191c23;
  --muted: #5f6778;
  --faint: #878f9f;
  --line: rgba(25, 28, 35, 0.1);
  --line-strong: rgba(25, 28, 35, 0.18);
  --accent: #f0a500;
  --accent-ink: #251a04;
  --glass: rgba(255, 252, 246, 0.82);
  --shadow: 0 28px 80px rgba(54, 43, 15, 0.2);
  --card-shadow: 0 12px 32px rgba(54, 43, 15, 0.1);
  --ring: rgba(240, 165, 0, 0.38);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter,
    Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding-bottom: calc(var(--player-h) + 28px + env(safe-area-inset-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58% 46% at 12% -4%, rgba(255, 194, 71, 0.13), transparent 62%),
    radial-gradient(46% 38% at 95% 4%, rgba(255, 93, 115, 0.12), transparent 64%),
    radial-gradient(60% 50% at 52% 108%, rgba(89, 120, 255, 0.08), transparent 68%);
}

:root[data-theme="light"] body::before {
  background:
    radial-gradient(58% 46% at 12% -4%, rgba(255, 176, 0, 0.16), transparent 62%),
    radial-gradient(46% 38% at 95% 4%, rgba(255, 93, 115, 0.12), transparent 64%),
    radial-gradient(60% 50% at 52% 108%, rgba(120, 110, 200, 0.09), transparent 68%);
}

body.sheet-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--amber);
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--amber);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--amber);
  color: var(--accent-ink);
  font-weight: 700;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  display: block;
}

.icon-play,
.icon-pause {
  fill: currentColor;
  stroke: none;
}

/* ---------- Header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  color: inherit;
}

.brand-mark {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 16px rgba(255, 128, 64, 0.28));
}

.brand-mark svg {
  display: block;
  border-radius: 12px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.brand-text strong {
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-text small {
  margin-top: 2px;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--muted);
  transition: background 0.18s, color 0.18s, transform 0.18s;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn.is-active {
  color: var(--amber);
}

.icon-btn-lg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.icon-btn-lg .icon {
  width: 22px;
  height: 22px;
}

.icon-btn-lg:hover {
  background: var(--surface-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.18s, background 0.18s,
    border-color 0.18s;
}

.btn:active {
  transform: scale(0.97);
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), var(--coral));
  color: var(--accent-ink);
  box-shadow: 0 10px 28px rgba(255, 126, 64, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(255, 126, 64, 0.36);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.btn-sm .icon {
  width: 15px;
  height: 15px;
}

/* theme icon swap */
.icon-sun {
  display: none;
}

:root[data-theme="light"] .icon-moon {
  display: none;
}

:root[data-theme="light"] .icon-sun {
  display: block;
}

/* ---------- Hero ---------- */

.hero {
  width: min(100% - 32px, 1200px);
  margin: 0 auto;
  padding: clamp(26px, 3.6vw, 46px) 0 clamp(14px, 2.4vw, 24px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(18px, 4vw, 52px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 12px 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.pulse-dot,
.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  flex: none;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--coral);
  animation: ping 2s ease-out infinite;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5.2vw, 4.35rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--amber) 8%, var(--coral) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  max-width: 54ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.25vw, 1.06rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-note {
  margin: 12px 0 0;
  font-size: 0.74rem;
  color: var(--faint);
}

.hero-note a {
  color: var(--muted);
}

/* orb */

.hero-visual {
  display: grid;
  place-items: center;
  min-height: 300px;
}

.orb {
  position: relative;
  width: clamp(250px, 27vw, 350px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.orb-halo {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 160, 60, 0.3), transparent 64%);
  filter: blur(14px);
  animation: breathe 6s ease-in-out infinite;
}

.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  pointer-events: none;
}

.orb-ring-a {
  inset: -9%;
  border-style: dashed;
  opacity: 0.6;
  animation: spin 46s linear infinite;
}

.orb-ring-b {
  inset: 3%;
  opacity: 0.5;
  animation: spin 32s linear infinite reverse;
}

.orb-ring-a::before,
.orb-ring-b::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 18%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 18px rgba(255, 194, 71, 0.8);
}

.orb-ring-b::before {
  top: auto;
  bottom: 12%;
  left: auto;
  right: 14%;
  width: 5px;
  height: 5px;
  background: var(--coral);
}

.orb-disc {
  position: relative;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background:
    radial-gradient(90% 80% at 28% 18%, rgba(255, 255, 255, 0.4), transparent 42%),
    conic-gradient(from 210deg, #ff5d73, #ffc247 32%, #ff8b45 58%, #ff5d73 78%, #ffb04a);
  box-shadow:
    0 30px 70px rgba(255, 93, 115, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.orb-disc::before {
  content: "";
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 60%),
    var(--bg-2);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 12px 40px rgba(0, 0, 0, 0.35) inset;
}

.orb-disc::after {
  content: "";
  position: absolute;
  inset: 17%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.orb-live,
.orb-mono,
.orb-sub {
  position: relative;
  z-index: 1;
}

.orb-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--amber);
}

.orb-mono {
  font-size: clamp(3rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  background: linear-gradient(180deg, #fff, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.orb-sub {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

:root[data-theme="light"] .orb-mono {
  background: linear-gradient(180deg, #2a1c05, #c47b00);
  -webkit-background-clip: text;
  background-clip: text;
}

:root[data-theme="light"] .orb-live {
  color: #a35f00;
}

.orb-eq {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 18px;
  z-index: 2;
}

.orb-eq i,
.np-eq i,
.card-eq i {
  display: block;
  width: 3px;
  border-radius: 3px;
  background: var(--amber);
  animation: eq 1.1s ease-in-out infinite;
}

.orb-eq i:nth-child(1) { height: 30%; animation-delay: -0.2s; }
.orb-eq i:nth-child(2) { height: 62%; animation-delay: -0.5s; }
.orb-eq i:nth-child(3) { height: 44%; animation-delay: -0.8s; }
.orb-eq i:nth-child(4) { height: 92%; animation-delay: -0.1s; }
.orb-eq i:nth-child(5) { height: 54%; animation-delay: -0.6s; }
.orb-eq i:nth-child(6) { height: 76%; animation-delay: -0.35s; }
.orb-eq i:nth-child(7) { height: 38%; animation-delay: -0.7s; }

/* ---------- Search ---------- */

.search-wrap {
  position: relative;
  width: min(100% - 32px, 1200px);
  margin: 10px auto 0;
  display: flex;
  align-items: center;
}

.search-wrap > .icon {
  position: absolute;
  left: 17px;
  color: var(--faint);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  height: 54px;
  padding: 0 88px 0 48px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  -webkit-appearance: none;
  appearance: none;
}

.search-wrap input::placeholder {
  color: var(--faint);
}

.search-wrap input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--amber) 60%, transparent);
  box-shadow: 0 0 0 4px var(--ring);
  background: var(--surface-2);
}

.search-wrap input::-webkit-search-cancel-button {
  display: none;
}

.search-kbd {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 7px;
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-2);
}

.search-clear:hover {
  color: var(--text);
}

.search-clear .icon {
  width: 16px;
  height: 16px;
}

/* ---------- Chips ---------- */

.chips {
  width: min(100% - 32px, 1200px);
  margin: 18px auto 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: color 0.16s, background 0.16s, border-color 0.16s, transform 0.16s;
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.chip:active {
  transform: scale(0.96);
}

.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--amber), #ff9649);
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: 0 8px 22px rgba(255, 160, 64, 0.24);
}

.chip .chip-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 0.66rem;
  font-weight: 800;
  vertical-align: 1px;
}

/* ---------- Section head ---------- */

.section-head {
  width: min(100% - 32px, 1200px);
  margin: clamp(24px, 4vw, 38px) auto 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.count {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Station grid ---------- */

.grid {
  width: min(100% - 32px, 1200px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.station-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  transition: transform 0.22s var(--ease), border-color 0.22s, box-shadow 0.22s;
  contain: content;
}

.station-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--card-shadow);
}

.station-card:active {
  transform: translateY(-1px) scale(0.99);
}

.station-card.is-active {
  border-color: hsl(var(--h, 40) 82% 62% / 0.75);
  box-shadow:
    0 0 0 1px hsl(var(--h, 40) 82% 62% / 0.35),
    0 18px 40px hsl(var(--h, 40) 70% 40% / 0.18);
}

.card-art {
  position: relative;
  aspect-ratio: 1.34;
  display: flex;
  align-items: flex-end;
  padding: 13px 14px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 16% 0%, rgba(255, 255, 255, 0.3), transparent 46%),
    radial-gradient(100% 80% at 92% 100%, rgba(0, 0, 0, 0.24), transparent 56%),
    linear-gradient(
      135deg,
      hsl(var(--h, 40) 84% 58%),
      hsl(calc(var(--h, 40) + 38) 82% 38%)
    );
}

.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.14) 0 1px,
    transparent 1px 11px
  );
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 58%);
  mask-image: linear-gradient(to top, #000 0%, transparent 58%);
  opacity: 0.5;
}

.card-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 40%, transparent, rgba(0, 0, 0, 0.16));
  pointer-events: none;
}

.card-mono {
  position: relative;
  z-index: 1;
  font-size: clamp(1.9rem, 3.4vw, 2.65rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
  color: #fff;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.3);
}

.card-live {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 10, 15, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.card-live .live-dot {
  width: 5px;
  height: 5px;
  background: #ff5d73;
}

.fav-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 10, 15, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.18s, transform 0.18s, color 0.18s;
}

.fav-btn .icon {
  width: 15px;
  height: 15px;
}

.fav-btn:hover {
  background: rgba(8, 10, 15, 0.66);
}

.station-card:hover .fav-btn,
.station-card.is-fav .fav-btn,
.fav-btn:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.is-fav .fav-btn,
.fav-toggle.is-fav {
  color: var(--amber);
}

.is-fav .fav-btn .icon,
.fav-toggle.is-fav .icon {
  fill: currentColor;
}

.play-fab {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 10, 15, 0.52);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  transition: transform 0.18s var(--ease), background 0.18s;
}

.play-fab:hover {
  transform: scale(1.08);
  background: rgba(8, 10, 15, 0.7);
}

.play-fab .icon {
  width: 16px;
  height: 16px;
  margin-left: 1px;
}

.play-fab .icon-pause {
  margin-left: 0;
}

.station-card .icon-pause,
.station-card.is-playing .icon-play {
  display: none;
}

.station-card.is-playing .icon-pause {
  display: block;
}

.spinner {
  display: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 0.75s linear infinite;
}

.is-loading .spinner {
  display: block;
}

.is-loading .icon-play,
.is-loading .icon-pause {
  display: none;
}

.card-eq {
  position: absolute;
  right: 53px;
  bottom: 20px;
  z-index: 2;
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 15px;
}

.is-playing .card-eq {
  display: flex;
}

.card-eq i {
  width: 3px;
  background: #fff;
  opacity: 0.9;
}

.card-eq i:nth-child(1) { height: 42%; animation-delay: -0.2s; }
.card-eq i:nth-child(2) { height: 90%; animation-delay: -0.55s; }
.card-eq i:nth-child(3) { height: 58%; animation-delay: -0.35s; }
.card-eq i:nth-child(4) { height: 78%; animation-delay: -0.7s; }

.card-body {
  padding: 11px 12px 13px;
  min-width: 0;
}

.card-body h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Empty ---------- */

.empty {
  width: min(100% - 32px, 520px);
  margin: 30px auto;
  padding: 44px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.empty-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
}

.empty h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.empty p {
  margin: 7px auto 18px;
  max-width: 36ch;
  color: var(--muted);
  font-size: 0.86rem;
}

/* ---------- Footer ---------- */

.footer {
  width: min(100% - 32px, 1200px);
  margin: 46px auto calc(30px + env(safe-area-inset-bottom));
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.74rem;
  line-height: 1.65;
}

.footer p {
  margin: 0;
  max-width: 72ch;
}

.footer strong {
  color: var(--muted);
}

.footer a {
  color: var(--muted);
}

.footer-meta {
  margin-top: 10px !important;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  opacity: 0.8;
}

/* ---------- Mini player ---------- */

.player {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 50;
  width: min(calc(100% - 24px), 1100px);
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  box-shadow: var(--shadow);
  animation: rise 0.3s var(--ease);
  overflow: hidden;
}

.player-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}

.player-art {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(100% 80% at 20% 0%, rgba(255, 255, 255, 0.3), transparent 50%),
    linear-gradient(
      135deg,
      hsl(var(--h, 40) 84% 58%),
      hsl(calc(var(--h, 40) + 38) 82% 38%)
    );
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  flex: none;
}

.player-info {
  min-width: 0;
}

.player-live {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}

.player-live .live-dot {
  width: 5px;
  height: 5px;
}

.sleep-badge {
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--amber);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.player-info h3 {
  margin: 3px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-info p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls,
.player-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.play-btn {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--coral));
  color: var(--accent-ink);
  box-shadow: 0 8px 22px rgba(255, 126, 64, 0.3);
  transition: transform 0.18s var(--ease), box-shadow 0.18s;
}

.play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(255, 126, 64, 0.4);
}

.play-btn:active {
  transform: scale(0.96);
}

.play-btn .icon {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.play-btn .icon-pause {
  margin-left: 0;
}

.play-btn .spinner {
  border-color: rgba(32, 22, 4, 0.25);
  border-top-color: var(--accent-ink);
}

.play-btn .icon-pause,
.play-btn.is-playing .icon-play {
  display: none;
}

.play-btn.is-playing .icon-pause {
  display: block;
}

.play-btn.is-loading .icon-play,
.play-btn.is-loading .icon-pause {
  display: none;
}

.play-btn.is-loading .spinner {
  display: block;
}

.player-actions .icon-btn {
  width: 38px;
  height: 38px;
}

.player-actions .icon {
  width: 18px;
  height: 18px;
}

.player-actions .fav-toggle.is-fav {
  color: var(--amber);
}

.player-progress {
  height: 2px;
  background: var(--line);
  overflow: hidden;
}

.player-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--amber), var(--coral), transparent);
  transform: translateX(-100%);
  opacity: 0;
}

.player.is-playing .player-progress span {
  opacity: 1;
  animation: scan 3.2s linear infinite;
}

/* ---------- Now playing sheet ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 9, 0.66);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: fade 0.24s ease-out;
}

.sheet-panel {
  position: relative;
  width: min(440px, 100%);
  max-height: min(860px, calc(100dvh - 32px));
  overflow-y: auto;
  padding: 16px 22px 24px;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(90% 50% at 50% 0%, color-mix(in srgb, var(--amber) 8%, transparent), transparent 62%),
    var(--bg-2);
  box-shadow: var(--shadow);
  animation: sheetIn 0.32s var(--ease);
  scrollbar-width: thin;
}

.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet-top .icon-btn {
  background: var(--surface);
  border: 1px solid var(--line);
}

.sheet-title {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

.np-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 330px;
  margin: 18px auto 0;
  border-radius: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, 0.34), transparent 46%),
    radial-gradient(100% 90% at 90% 100%, rgba(0, 0, 0, 0.26), transparent 58%),
    linear-gradient(
      135deg,
      hsl(var(--h, 40) 84% 58%),
      hsl(calc(var(--h, 40) + 38) 82% 38%)
    );
  box-shadow:
    0 26px 60px hsl(var(--h, 40) 70% 30% / 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.np-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.12) 0 1px,
      transparent 1px 14px
    );
  -webkit-mask-image: linear-gradient(to top, #000, transparent 62%);
  mask-image: linear-gradient(to top, #000, transparent 62%);
  opacity: 0.55;
}

.np-art::after {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  opacity: 0.7;
  pointer-events: none;
}

.np-mono {
  position: relative;
  z-index: 1;
  font-size: clamp(4rem, 15vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: #fff;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.28);
}

.np-live {
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 10, 15, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.np-live .live-dot {
  width: 5px;
  height: 5px;
}

.np-eq {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 20px;
  opacity: 0.35;
}

.np-eq i {
  width: 4px;
  background: #fff;
  animation-play-state: paused;
}

.np-eq i:nth-child(1) { height: 44%; }
.np-eq i:nth-child(2) { height: 82%; }
.np-eq i:nth-child(3) { height: 58%; }
.np-eq i:nth-child(4) { height: 96%; }
.np-eq i:nth-child(5) { height: 66%; }

.sheet.is-playing .np-eq {
  opacity: 0.9;
}

.sheet.is-playing .np-eq i {
  animation-play-state: running;
}

.np-info {
  margin-top: 20px;
  text-align: center;
}

.np-info h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4.5vw, 1.9rem);
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.np-info p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.np-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 6vw, 26px);
  margin-top: 18px;
}

.play-btn-xl {
  width: 74px;
  height: 74px;
}

.play-btn-xl .icon {
  width: 30px;
  height: 30px;
}

.np-extra {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.pill-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line-strong);
}

.pill-btn .icon {
  width: 15px;
  height: 15px;
}

.pill-btn.is-fav {
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 40%, transparent);
}

.volume {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--faint);
}

.volume input {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--amber), var(--coral));
  cursor: pointer;
}

.volume input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  border: 0;
}

.volume input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}

.volume span {
  min-width: 34px;
  text-align: right;
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.np-note {
  margin: 20px 0 0;
  color: var(--faint);
  font-size: 0.68rem;
  line-height: 1.55;
  text-align: center;
}

.np-note a {
  color: var(--muted);
}

/* ---------- Sleep timer popover ---------- */

.popover {
  position: fixed;
  z-index: 85;
  right: max(12px, calc((100vw - 1100px) / 2 + 12px));
  bottom: calc(var(--player-h) + 30px + env(safe-area-inset-bottom));
  width: 270px;
  padding: 15px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow);
  animation: rise 0.22s var(--ease);
}

.popover-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.popover-sub {
  margin: 3px 0 12px;
  color: var(--muted);
  font-size: 0.72rem;
}

.timer-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.timer-options button {
  padding: 10px 8px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 650;
  transition: background 0.16s, border-color 0.16s;
}

.timer-options button:hover {
  background: var(--surface-3);
  border-color: var(--line-strong);
}

.timer-options button.is-selected {
  border-color: color-mix(in srgb, var(--amber) 55%, transparent);
  color: var(--amber);
}

.timer-off {
  grid-column: 1 / -1;
  color: var(--muted) !important;
}

/* ---------- Toast + offline ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h) + 34px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  max-width: min(90vw, 460px);
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.25s var(--ease);
}

.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: #3a2505;
  color: #ffdba0;
  font-size: 0.76rem;
  font-weight: 600;
  text-align: center;
}

.offline-banner .icon {
  width: 15px;
  height: 15px;
}

/* ---------- Animations ---------- */

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes ping {
  0% { transform: scale(0.7); opacity: 0.8; }
  80%, 100% { transform: scale(2.2); opacity: 0; }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes eq {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

@keyframes scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes rise {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheetIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Discovery ---------- */

.search-wrap {
  z-index: 30;
}

.search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  padding: 7px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
  max-height: min(430px, 62vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.suggest-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 9px;
  border-radius: 11px;
  text-align: left;
  color: var(--text);
}

.suggest-row:hover,
.suggest-row[aria-selected="true"] {
  background: var(--surface-2);
}

.suggest-mono {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background:
    radial-gradient(100% 80% at 20% 0%, rgba(255, 255, 255, 0.28), transparent 52%),
    linear-gradient(135deg, hsl(var(--h, 40) 84% 58%), hsl(calc(var(--h, 40) + 38) 82% 38%));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.suggest-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.suggest-name {
  font-size: 0.87rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggest-name mark {
  background: none;
  color: var(--amber);
  font-weight: 800;
  padding: 0;
}

.suggest-kind {
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggest-play {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--faint);
}

.suggest-row:hover .suggest-play,
.suggest-row[aria-selected="true"] .suggest-play {
  color: var(--amber);
}

.suggest-see {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding: 11px 12px 9px;
  border-top: 1px solid var(--line);
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: left;
}

.suggest-see:hover,
.suggest-see[aria-selected="true"] {
  background: var(--surface-2);
  border-radius: 10px;
}

.suggest-empty {
  padding: 15px 13px;
  color: var(--muted);
  font-size: 0.82rem;
}

.quick-searches {
  width: min(100% - 32px, 1200px);
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 2px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.quick-searches::-webkit-scrollbar {
  display: none;
}

.quick-label {
  flex: none;
  color: var(--faint);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.quick-tag {
  flex: none;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 650;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}

.quick-tag:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line-strong);
}

.quick-tag:active {
  transform: scale(0.96);
}

.discover {
  width: min(100% - 32px, 1200px);
  margin: 0 auto;
}

.moods {
  margin-top: clamp(24px, 3.2vw, 36px);
}

.discover-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.discover-kicker {
  margin: 0 0 5px;
  color: var(--faint);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.discover-head h2,
.browse-cta h2 {
  margin: 0;
  font-size: clamp(1.22rem, 2.6vw, 1.6rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.discover-note {
  max-width: 36ch;
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mood-tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 142px;
  padding: 15px 16px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, hsl(var(--h) 50% 20%), var(--surface) 70%);
  color: var(--text);
  text-align: left;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}

.mood-tile::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -38px;
  top: -44px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--h) 85% 60% / 0.3), transparent 66%);
}

.mood-tile:hover {
  transform: translateY(-3px);
  border-color: hsl(var(--h) 70% 60% / 0.45);
  box-shadow: var(--card-shadow);
}

.mood-tile:active {
  transform: translateY(-1px) scale(0.995);
}

.mood-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mood-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: hsl(var(--h) 72% 58% / 0.16);
  color: hsl(var(--h) 90% 72%);
}

.mood-icon .icon {
  width: 20px;
  height: 20px;
}

.mood-count {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 30%, transparent);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.mood-copy {
  display: block;
}

.mood-title {
  display: block;
  margin: 14px 0 2px;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.mood-blurb {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.35;
}

.mood-samples {
  display: block;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}

:root[data-theme="light"] .mood-tile {
  background: linear-gradient(145deg, hsl(var(--h) 72% 90%), var(--surface) 72%);
}

:root[data-theme="light"] .mood-icon {
  background: hsl(var(--h) 62% 52% / 0.14);
  color: hsl(var(--h) 58% 33%);
}

:root[data-theme="light"] .mood-count {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.rails {
  margin-top: 2px;
}

.rail {
  margin-top: clamp(24px, 3.6vw, 36px);
}

.rail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.rail-head h2 {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.rail-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
}

.rail-see {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 750;
  white-space: nowrap;
}

.rail-see:hover {
  background: color-mix(in srgb, var(--amber) 12%, transparent);
}

.rail-see .icon {
  width: 14px;
  height: 14px;
}

.rail-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 3px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.rail-track::-webkit-scrollbar {
  height: 6px;
}

.rail-track::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 99px;
}

.rail-track::-webkit-scrollbar-track {
  background: transparent;
}

.rail-card {
  flex: 0 0 clamp(150px, 16vw, 184px);
  scroll-snap-align: start;
}

.browse-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: clamp(32px, 5vw, 54px) 0 6px;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 140% at 0% 0%, rgba(255, 194, 71, 0.1), transparent 60%),
    linear-gradient(120deg, var(--surface-2), var(--surface));
}

.browse-cta h2 {
  margin-bottom: 6px;
}

.browse-cta p {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.55;
}

.browse-cta .btn {
  flex: none;
}

.browse {
  padding-top: 1px;
  scroll-margin-top: 74px;
}

.browse-head {
  align-items: flex-start;
  margin-top: clamp(22px, 3vw, 30px);
}

.browse-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  margin-left: -2px;
  padding: 3px 8px 3px 2px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.back-btn:hover {
  color: var(--text);
}

.back-btn .icon {
  width: 15px;
  height: 15px;
}

.browse-title h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.7rem);
}

.section-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.45;
}

.browse-head .count {
  flex: none;
  margin-top: 24px;
}

.load-more {
  width: min(100% - 32px, 1200px);
  margin: 22px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.load-more-hint {
  margin: 0;
  color: var(--faint);
  font-size: 0.71rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .mood-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  .discover-note {
    display: none;
  }
}

@media (max-width: 700px) {
  .search-kbd {
    display: none;
  }

  .search-wrap input {
    padding-right: 52px;
  }

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

  .station-card .fav-btn {
    opacity: 1;
    transform: scale(1);
  }

  .mood-grid {
    gap: 10px;
  }

  .mood-tile {
    min-height: 132px;
    padding: 14px;
  }

  .rail-card {
    flex-basis: 154px;
  }

  .browse-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .browse-cta .btn {
    width: 100%;
  }
}

@media (max-width: 600px) {
  body {
    --player-h: 78px;
  }

  .player {
    left: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    border-radius: 22px 22px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    animation: riseMobile 0.3s var(--ease);
  }

  .player-inner {
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    gap: 8px;
  }

  .player-art {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .player-info h3 {
    font-size: 0.86rem;
  }

  .player-info p {
    font-size: 0.68rem;
  }

  .player-actions #timerBtn {
    display: none;
  }

  .player-actions .icon-btn,
  .player-controls .icon-btn {
    width: 34px;
    height: 34px;
  }

  .play-btn {
    width: 42px;
    height: 42px;
  }

  .sheet {
    padding: 0;
    align-items: end;
  }

  .sheet-panel {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    border: 0;
    padding: calc(12px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
    animation: sheetUp 0.32s var(--ease);
    display: flex;
    flex-direction: column;
  }

  .sheet-panel > * {
    flex: none;
  }

  .np-art {
    max-width: min(330px, 64vw);
    margin-top: auto;
  }

  .np-note {
    margin-top: auto;
  }

  .popover {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(var(--player-h) + 16px + env(safe-area-inset-bottom));
  }

  .toast {
    bottom: calc(var(--player-h) + 20px + env(safe-area-inset-bottom));
  }

  .footer {
    margin-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  #installBtn span {
    display: none;
  }

  #installBtn {
    width: 40px;
    height: 40px;
    padding: 0;
  }
}

@media (max-width: 430px) {
  .brand-text small {
    display: none;
  }

  .topbar {
    padding: 10px 14px;
  }

  .hero {
    width: calc(100% - 28px);
  }

  .search-wrap,
  .quick-searches,
  .discover,
  .chips,
  .section-head,
  .grid,
  .load-more,
  .footer {
    width: calc(100% - 28px);
  }

  .browse-head .count {
    margin-top: 22px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .card-mono {
    font-size: 1.85rem;
  }

  .card-body h3 {
    font-size: 0.84rem;
  }

  .card-body p {
    font-size: 0.68rem;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .player-actions #playerFav {
    display: none;
  }

  .np-extra {
    gap: 6px;
  }

  .pill-btn {
    padding: 9px 12px;
    font-size: 0.74rem;
  }
}

@keyframes riseMobile {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sheetUp {
  from { opacity: 0.6; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@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;
  }
}

/* Thin scrollbar for desktop */
@media (min-width: 601px) {
  .sheet-panel::-webkit-scrollbar {
    width: 8px;
  }

  .sheet-panel::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 99px;
  }
}
