@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Overpass:ital,wght@0,400;0,500;0,600;0,700;1,500&display=swap');

/* Strawberry Milk theme — глубокая сливовая основа и мягкие клубничные акценты. */

:root, [data-theme="dark"] {
  --bg: #0E090D;
  --surface: #171016;
  --surface2: #211720;
  --surface-interactive: #2a1c26;
  --line: rgba(244,114,182,.11);
  --line-strong: rgba(244,114,182,.2);
  --text: #fff7fb;
  --muted: #b6a2ad;
  --accent: #F472B6;
  --accent-bright: #FDA4AF;
  --accent-light: #f9a8d4;
  --accent-soft: #fecdd3;
  --accent-grad: linear-gradient(135deg, #F472B6 0%, #FB7185 52%, #FDA4AF 100%);
  --like-red: #FB7185;
  --error: #EF4444;
  --warning: #F59E0B;
  --success: #10B981;
  --import-action: #f2a0be;
  --glass-surface: rgba(23, 16, 22, 0.84);
  --glass-border: rgba(244, 114, 182, 0.14);
  --glass-blur: blur(20px);
  --glass-shadow: 0 12px 40px rgba(7, 3, 7, 0.42);
  --sidebar-bg: rgba(14, 9, 13, 0.94);
  --player-bg: rgba(23, 16, 22, 0.94);
  --hero-grad: linear-gradient(145deg, #3b1b30 0%, #21141e 55%, #120d12 100%);
  --hero-orb-1: rgba(244, 114, 182, 0.16);
  --hero-orb-2: rgba(251, 113, 133, 0.11);
  --btn-primary-bg: #F472B6;
  --btn-primary-text: #32101f;
  --btn-glow: 0 4px 20px rgba(244, 114, 182, 0.24);
  --progress-track: rgba(255, 255, 255, 0.16);
  --progress-fill: linear-gradient(90deg, #F472B6, #FB7185, #FDA4AF);
  --np-bg: #0E090D;
  --np-blob-1: #F472B6;
  --np-blob-2: #FB7185;
  --np-blob-3: #FDA4AF;
  --np-text: #ffffff;
  --np-text-2: rgba(255, 255, 255, 0.7);
  --np-text-3: rgba(255, 255, 255, 0.4);
  --np-surface: rgba(244, 114, 182, 0.06);
  --np-border: rgba(244, 114, 182, 0.14);
  --np-accent: #F472B6;
  --np-accent-2: #FB7185;
  --np-like: #FB7185;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #fff7fa;
  --surface: #fffdfd;
  --surface2: #fff0f5;
  --surface-interactive: #ffe3ed;
  --line: rgba(190, 24, 93, 0.09);
  --line-strong: rgba(190, 24, 93, 0.17);
  --text: #321824;
  --muted: #806978;
  --accent: #C02673;
  --accent-bright: #DB2777;
  --accent-light: #BE185D;
  --accent-soft: #9D174D;
  --accent-grad: linear-gradient(135deg, #DB2777 0%, #E85D9E 52%, #FDA4AF 100%);
  --like-red: #C02673;
  --error: #DC2626;
  --warning: #D97706;
  --success: #059669;
  --import-action: #ad315e;
  --glass-surface: rgba(255, 253, 253, 0.88);
  --glass-border: rgba(190, 24, 93, 0.1);
  --glass-blur: blur(24px);
  --glass-shadow: 0 10px 32px rgba(95, 35, 63, 0.08);
  --sidebar-bg: rgba(255, 250, 252, 0.94);
  --player-bg: rgba(255, 253, 253, 0.94);
  --hero-grad: linear-gradient(145deg, #ffe4ef 0%, #fff1f5 55%, #fff9fb 100%);
  --hero-orb-1: rgba(244, 114, 182, 0.16);
  --hero-orb-2: rgba(251, 113, 133, 0.11);
  --btn-primary-bg: #C02673;
  --btn-primary-text: #ffffff;
  --btn-glow: 0 4px 18px rgba(192, 38, 115, 0.18);
  --progress-track: #f4d8e3;
  --progress-fill: linear-gradient(90deg, #DB2777, #F472B6, #FDA4AF);
  --np-bg: #fff7fa;
  --np-blob-1: #F472B6;
  --np-blob-2: #DB2777;
  --np-blob-3: #FDA4AF;
  --np-text: #321824;
  --np-text-2: rgba(50, 24, 36, 0.72);
  --np-text-3: rgba(50, 24, 36, 0.48);
  --np-surface: rgba(190, 24, 93, 0.055);
  --np-border: rgba(190, 24, 93, 0.14);
  --np-accent: #C02673;
  --np-accent-2: #DB2777;
  --np-like: #C02673;
  --shadow-sm: 0 1px 2px rgba(31, 20, 56, 0.06);
  --shadow-md: 0 4px 16px rgba(31, 20, 56, 0.08);
  --shadow-lg: 0 25px 50px -12px rgba(31, 20, 56, 0.12);
  color-scheme: light;
}

:root {
  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 12px; --sp-lg: 16px;
  --sp-xl: 24px; --sp-2xl: 32px; --sp-3xl: 48px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-full: 9999px;

  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 14px;
  --fs-lg: 16px;
  --fs-xl: 24px;
  --fs-2xl: 32px;
  --fs-display: clamp(32px, 5vw, 48px);

  --dur-fast: 180ms;
  --dur-normal: 400ms;
  --dur-slow: 650ms;
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --font-display: 'Overpass', 'Manrope', sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --mini-player-h: 64px;
  --bottom-nav-h: 62px;

  --wave-primary: var(--accent);
  --wave-secondary: var(--accent-bright);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', 'Noto Sans', system-ui, -apple-system, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur-normal) ease, color var(--dur-normal) ease;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 0%, var(--hero-orb-1), transparent 60%),
    radial-gradient(50% 40% at 100% 20%, var(--hero-orb-2), transparent 60%);
  opacity: 1;
  transition: opacity var(--dur-normal) ease;
}

/* Utility visibility */
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ */
/* Layout: fixed sidebar + main column                                 */
/* ------------------------------------------------------------------ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 27px 12px 20px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 60;
  transition: background var(--dur-normal) ease, width var(--dur-normal) ease;
  overflow: hidden;
}
.sidebar .brand { padding: 0 8px; cursor: pointer; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 32px; height: 32px; border-radius: var(--r-sm); object-fit: cover; }
.brand-name { display: block; font-weight: 800; font-size: var(--fs-lg); color: var(--text); }
.side-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}
.side-search i { color: var(--muted); font-size: 16px; }
.side-search input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px 12px;
  color: var(--text);
  font-size: var(--fs-sm);
  outline: none;
  transition: border-color var(--dur-fast);
}
.side-search input:focus { border-color: var(--accent); }
.side-search input::placeholder { color: var(--muted); }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; height: 40px;
  padding: 0 12px;
  border: none;
  background: transparent;
  border-radius: var(--r-md);
  color: var(--muted);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-in-out), color var(--dur-fast) var(--ease-in-out);
}
.side-item i { font-size: 18px; width: 24px; text-align: center; }
.side-item span { display: block; }
.side-item:hover { background: var(--surface); color: var(--text); }
.side-item.active { color: var(--text); font-weight: 700; background: var(--surface); }
.side-item.active i { color: var(--accent); }
.side-bottom { padding: 0 8px; }
.auth-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%; height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.auth-entry:hover { background: var(--surface); color: var(--text); }
.auth-entry-avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; overflow: hidden; background: var(--surface2); border: 1px solid var(--line); color: var(--accent); display: grid; place-items: center; }
.auth-entry-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-entry-avatar .auth-entry-initials { display: grid; place-items: center; width: 100%; height: 100%; font-size: var(--fs-xs); color: var(--accent); font-weight: 700; }
.auth-entry.is-authed .auth-entry-avatar { border-color: var(--accent); }
.auth-entry-copy { display: flex; flex-direction: column; gap: 1px; }
.auth-entry-copy strong { font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.auth-entry-copy small { font-size: var(--fs-xs); color: var(--muted); }

.shell {
  margin-left: 0;
  max-width: none;
  padding: 4px 48px calc(var(--mini-player-h) + var(--sp-3xl) + var(--safe-bottom));
}

/* ---------- NOCTURNE top navigation ---------- */
.topnav {
  display: flex; align-items: center; gap: 40px;
  padding: 18px 48px 12px;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transform: translateY(0);
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
  will-change: transform;
}
.topnav.scroll-hidden { transform: translateY(-110%); }
.topnav.is-scrolling { box-shadow: 0 10px 26px color-mix(in srgb, #000 22%, transparent); background: color-mix(in srgb, var(--bg) 94%, transparent); }
.topnav .brand { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 0; }
.topnav .brand-logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 22px rgba(244,114,182,.28); }
.topnav .brand-name { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: .04em; color: var(--text); }
.topnav-links { display: flex; gap: 6px; }
.tn-item {
  padding: 8px 16px; border-radius: 99px;
  color: var(--muted); font-weight: 500; font-size: 13.5px; letter-spacing: .02em;
  transition: color var(--dur-normal) ease, background var(--dur-normal) ease;
  position: relative; background: none; border: none; cursor: pointer;
}
.tn-item:hover { color: var(--text); }
.tn-item.active { color: var(--text); }
.tn-item.active::after {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 18px; height: 2px; border-radius: 99px; background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topnav-right .search-center { flex: 0 1 320px; margin: 0; }
.topnav-right .search-center input {
  width: 100%; padding: 9px 16px; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: var(--fs-sm); outline: none;
  transition: border-color var(--dur-normal), background var(--dur-normal);
}
.topnav-right .search-center input:focus { border-color: var(--accent); background: var(--surface2); }
.topnav-right .search-center input::placeholder { color: var(--muted); }
.topnav-right .profile {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); color: var(--muted);
  display: grid; place-items: center; border: 1px solid var(--line);
  font-size: 17px; cursor: pointer; flex-shrink: 0;
  transition: background var(--dur-normal), color var(--dur-normal);
}
.topnav-right .profile:hover { background: var(--surface2); color: var(--text); }
.topnav-right .profile-avatar {
  width: 100%; height: 100%; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
}
.topnav-right .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.topnav-right #settingsBtn .settings-icon { width: 19px; height: 19px; display: block; fill: currentColor; }
.topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  margin-bottom: 20px;
  padding: 0 20px;
  height: 72px;
  overflow: hidden;
}
.topbar .greeting { display: none; } /* Figma Make has no greeting */
.topbar .history { display: flex; gap: 8px; }
.topbar .history button {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  display: grid; place-items: center;
  border: 1px solid var(--line);
  font-size: 16px;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.topbar .history button:hover:not(.disabled) { background: var(--surface2); color: var(--text); }
.topbar .history button.disabled { opacity: 0.5; cursor: default; }
.topbar .search-center {
  flex: 1;
  max-width: 541px;
  margin: 0 auto;
}
.topbar .search-center input {
  width: 100%;
  padding: 8px 16px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  outline: none;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.topbar .search-center input:focus {
  border-color: var(--accent);
  background: var(--surface2);
}
.topbar .search-center input::placeholder { color: var(--muted); }
.topbar .profile-actions { display: flex; flex-direction: row; gap: 8px; align-items: center; }
.topbar .profile-actions button {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  display: grid; place-items: center;
  border: 1px solid var(--line);
  font-size: 16px;
  position: relative;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.topbar .profile-actions button:hover {
  background: var(--surface2);
  color: var(--text);
}
.topbar .profile-actions .theme-toggle {
  position: relative;
  overflow: hidden;
}
.topbar .profile-actions .theme-toggle i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}
.topbar .profile-actions .theme-toggle #themeIconLight { opacity: 0; transform: translate(-50%, -50%) rotate(90deg); }
.topbar .profile-actions .theme-toggle #themeIconDark { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }
[data-theme="light"] .topbar .profile-actions .theme-toggle #themeIconLight { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }
[data-theme="light"] .topbar .profile-actions .theme-toggle #themeIconDark { opacity: 0; transform: translate(-50%, -50%) rotate(-90deg); }
.topbar .profile-actions .notification {
  position: relative;
}
.topbar .profile-actions .notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: none;
}
.topbar .profile-actions .notification-badge:not([hidden]) {
  display: block;
}
.topbar .profile-actions .profile {
  width: 30px;
  height: 30px;
  background: transparent;
}
.topbar .profile-actions .profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
}
.topbar .profile-actions .profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.menu-btn {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  align-items: center; justify-content: center;
}
.topbar .hero-btn { flex-shrink: 0; }

button, input { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; background: transparent; }
a { color: inherit; text-decoration: none; }

/* Material Symbols render through aliases so dynamically generated icons use the same set. */
.ph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1em; height: 1em; flex: 0 0 auto;
  font-family: 'Material Symbols Outlined'; font-style: normal; font-weight: 400;
  font-size: 1em; line-height: 1; letter-spacing: normal; text-transform: none;
  white-space: nowrap; word-wrap: normal; direction: ltr; font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased; font-variation-settings: 'FILL' 0;
}
.ph::before { display: block; }
.ph-fill::before { font-feature-settings: 'liga' 1; font-variation-settings: 'FILL' 0; }
.ph-arrow-square-in::before { content: 'playlist_add'; }
.ph-arrow-square-out::before { content: 'open_in_new'; }
.ph-bookmark-simple::before { content: 'bookmark'; }
.ph-broadcast::before, .ph-waveform::before, .ph-soundcloud-logo::before { content: 'graphic_eq'; }
.ph-broom::before { content: 'cleaning_services'; }
.ph-camera::before { content: 'camera_alt'; }
.ph-caret-down::before { content: 'keyboard_arrow_down'; }
.ph-check::before { content: 'check'; }
.ph-check-circle::before { content: 'check_circle'; }
.ph-clock::before { content: 'schedule'; }
.ph-clock-counter-clockwise::before { content: 'history'; }
.ph-cloud-sun::before { content: 'partly_cloudy_day'; }
.ph-disc::before { content: 'album'; }
.ph-dots-six-vertical::before { content: 'drag_indicator'; }
.ph-dots-three-vertical::before { content: 'more_vert'; }
.ph-download-simple::before { content: 'download'; }
.ph-globe-simple::before { content: 'public'; }
.ph-heart::before {
  content: ''; width: 1em; height: 1em; display: block;
  background: currentColor; -webkit-mask: url('/static/icons/favorite-outline.svg') center / contain no-repeat;
  mask: url('/static/icons/favorite-outline.svg') center / contain no-repeat;
}
.ph-fill.ph-heart::before {
  -webkit-mask-image: url('/static/icons/favorite.svg'); mask-image: url('/static/icons/favorite.svg');
}
.ph-image::before { content: 'image'; }
.ph-info::before { content: 'info'; }
.ph-lightbulb::before { content: 'lightbulb'; }
.ph-lightning::before { content: 'bolt'; }
.ph-list::before { content: 'list'; }
.ph-list-dashes::before { content: 'format_list_bulleted'; }
.ph-magnifying-glass::before { content: 'search'; }
.ph-microphone-stage::before { content: 'mic'; }
.ph-monitor::before { content: 'desktop_windows'; }
.ph-moon::before { content: 'dark_mode'; }
.ph-music-note::before, .ph-y-logo::before { content: 'music_note'; }
.ph-music-notes::before { content: 'library_music'; }
.ph-pause::before { content: 'pause'; }
.ph-pencil::before { content: 'edit'; }
.ph-play::before { content: 'play_arrow'; }
.ph-playlist::before { content: 'queue_music'; }
.ph-plus::before { content: 'add'; }
.ph-plus-circle::before { content: 'add_circle'; }
.ph-prohibit::before { content: 'block'; }
.ph-repeat::before { content: 'repeat'; }
.ph-repeat-once::before { content: 'repeat_one'; }
.ph-share-network::before { content: 'share'; }
.ph-shuffle::before { content: 'shuffle'; }
.ph-sign-out::before { content: 'logout'; }
.ph-skip-back::before { content: 'skip_previous'; }
.ph-skip-forward::before { content: 'skip_next'; }
.ph-speaker-high::before { content: 'volume_up'; }
.ph-speaker-low::before { content: 'volume_down'; }
.ph-speaker-slash::before { content: 'volume_off'; }
.ph-squares-four::before { content: 'grid_view'; }
.ph-sun::before { content: 'light_mode'; }
.ph-thumbs-down::before {
  content: ''; width: 1em; height: 1em; display: block;
  background: currentColor; -webkit-mask: url('/static/icons/heart-off.svg') center / contain no-repeat;
  mask: url('/static/icons/heart-off.svg') center / contain no-repeat;
}
.ph-trash::before { content: 'delete'; }
.ph-user::before { content: 'person'; }
.ph-x::before { content: 'close'; }
.ph-youtube-logo::before { content: 'smart_display'; }
/* Spotify has no glyph in the loaded Material subset; share the note icon. */
.ph-spotify-logo::before { content: 'music_note'; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--r-sm);
}

::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--line) var(--bg); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: var(--r-full); border: 2px solid var(--bg); }
*::-webkit-scrollbar-track { background: transparent; }

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

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-xl);
  padding-top: var(--safe-top);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  color: inherit;
  text-decoration: none;
}

/* Hero — Figma Make style with orbs */
.hero-compact {
  display: grid;
  grid-template-columns: 1fr 358px;
  gap: 0;
  padding: 0;
  border-radius: var(--r-2xl);
  background: var(--hero-grad);
  border: 1px solid var(--line);
  margin-bottom: var(--sp-xl);
  position: relative;
  overflow: hidden;
  min-height: 332px;
  max-height: 332px;
  transition: background var(--dur-normal) ease;
}
.hero-compact::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  right: 15%;
  top: -40px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.08;
  filter: blur(100px);
  pointer-events: none;
}
.hero-compact::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  right: 5%;
  bottom: -60px;
  border-radius: 50%;
  background: var(--accent-bright);
  opacity: 0.06;
  filter: blur(80px);
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.orb.one {
  width: 280px;
  height: 280px;
  right: 15%;
  top: -40px;
  background: var(--accent);
  opacity: 0.08;
  filter: blur(80px);
}
.orb.two {
  width: 200px;
  height: 200px;
  right: 5%;
  bottom: -60px;
  background: var(--accent-bright);
  opacity: 0.06;
  filter: blur(60px);
}
.hero-content { position: relative; z-index: 1; padding: 38px 30px; display: flex; flex-direction: column; justify-content: center; }
.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art .vinyl {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  border: 1px solid var(--line);
  position: relative;
  display: grid;
  place-items: center;
}
.hero-art .vinyl::after {
  content: '';
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  border: 8px solid color-mix(in srgb, var(--accent) 38%, var(--surface));
}
.hero-caption {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 10px 15px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hero-wave-mini {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 48px;
  flex-shrink: 0;
}
.hero-wave-mini .bar {
  width: 4px;
  border-radius: var(--r-sm);
  background: var(--text);
  opacity: 0.55;
  animation: breathe 1.2s ease-in-out infinite alternate;
}
.hero-wave-mini .bar:nth-child(2n) { animation-delay: 0.2s; }
.hero-wave-mini .bar:nth-child(3n) { animation-delay: 0.5s; }

/* Bento grid on home */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 148px;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}
.bento-hero {
  grid-column: span 2;
  grid-row: span 2;
  margin-bottom: 0;
}
.bento-cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: var(--sp-lg);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-in-out), border-color var(--dur-fast), box-shadow var(--dur-fast);
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface2) 100%);
}
.bento-cell:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.bento-stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.bento-stat i {
  font-size: 22px;
  color: var(--accent);
  align-self: flex-start;
  opacity: 0.9;
}
.bento-num {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bento-lbl {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 2px;
}
.bento-genre {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--text);
}
.bento-g-ico {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  font-size: 20px;
  margin-bottom: auto;
  box-shadow: var(--shadow-sm);
}
.bento-g-ico.g1 { background: color-mix(in srgb, var(--accent) 15%, var(--surface)); color: var(--accent-light); }
.bento-g-ico.g2 { background: color-mix(in srgb, #FB7185 16%, var(--surface)); color: #FB7185; }
[data-theme="light"] .bento-g-ico.g1 { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
[data-theme="light"] .bento-g-ico.g2 { background: color-mix(in srgb, #DB2777 12%, var(--surface)); color: var(--accent-bright); }

.eyebrow {
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 9px;
  font-weight: 800;
  margin-bottom: 14px;
}
h1 {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: var(--sp-sm) 0;
}
.hero-copy {
  color: var(--muted);
  max-width: 390px;
  line-height: 1.5;
  font-size: var(--fs-sm);
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: var(--sp-lg);
}
.hero-btn {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-radius: var(--r-full);
  padding: 11px 19px;
  font-weight: 800;
  font-size: var(--fs-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  transition: transform var(--dur-fast) var(--ease-in-out), filter var(--dur-fast), box-shadow var(--dur-fast);
  box-shadow: var(--shadow-sm);
  border: 0;
}
.hero-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: var(--btn-glow);
}
.hero-btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.round-btn {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: background var(--dur-fast);
}
.round-btn:hover { background: var(--surface-interactive); }
.hero-btn:active { transform: scale(0.96); }
.hero-btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

/* Wave preview strip in hero */
.wave-preview-strip { display: flex; gap: 6px; align-items: flex-end; height: 60px; }
.wave-preview-item {
  width: 44px; height: 44px; border-radius: var(--r-md); overflow: hidden; flex-shrink: 0;
  background: var(--surface2); cursor: pointer; display: grid; place-items: center;
  color: var(--muted); font-size: 18px;
}
.wave-preview-cover { width: 100%; height: 100%; object-fit: cover; }

/* Section headers — beautiful standalone pages */
.section-gap {
  margin-top: var(--sp-2xl);
  animation: fade-in-slide-up var(--dur-normal) var(--ease-in-out);
}
/* First section right under the topnav — no extra top gap */
.shell > .section-gap:first-of-type { margin-top: 0; }
#sectionFeed { margin-top: 0; }
.section-gap .section-head {
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--line);
}
.section-gap .section-head h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 var(--sp-xs);
}
.section-gap .section-head .sub {
  color: var(--muted);
  font-size: var(--fs-base);
  margin-top: 0;
}

/* Empty states — beautiful */
.empty {
  padding: var(--sp-3xl) var(--sp-2xl);
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-base);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r-xl);
  margin-top: var(--sp-md);
}
.empty p { margin: 0 0 var(--sp-sm); font-weight: 700; color: var(--text); font-size: var(--fs-lg); }
.empty .empty-sub { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--sp-lg); font-weight: 400; }
.empty .btn-accent { margin-top: var(--sp-md); }

/* Playlist cards */
.playlist-card {
  background: transparent;
  border: none;
  border-radius: var(--r-xl);
  padding: var(--sp-md);
  cursor: pointer;
  transition: transform var(--dur-normal) ease, box-shadow var(--dur-normal) ease;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.playlist-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.playlist-cover {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  background: var(--surface2);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.playlist-cover img { width: 100%; height: 100%; object-fit: cover; }
.playlist-cover i { font-size: 32px; color: var(--muted); }
.playlist-name { font-weight: 700; font-size: var(--fs-base); color: var(--text); }
.playlist-count { font-size: var(--fs-sm); color: var(--muted); }

/* Empty state */
.empty {
  padding: var(--sp-3xl);
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-base);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r-xl);
  margin-top: var(--sp-md);
}
.empty p { margin: 0 0 var(--sp-sm); font-weight: 600; color: var(--text); }
.empty .empty-sub { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--sp-lg); }
.empty .btn-accent { margin-top: var(--sp-md); }

/* Filters */
.filters {
  display: flex;
  gap: var(--sp-sm);
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: var(--sp-lg);
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.chip:hover { color: var(--accent-bright); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line-strong)); transform: translateY(-1px); }
.playlist-toolbar #newPlaylist, .playlist-toolbar #newPlaylist2 {
  color: var(--accent-bright); background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line-strong));
}
.playlist-toolbar #importPlaylist, .playlist-toolbar #importPlaylist2 {
  color: var(--import-action); background: color-mix(in srgb, var(--import-action) 11%, var(--surface));
  border-color: color-mix(in srgb, var(--import-action) 30%, var(--line-strong));
}
.playlist-toolbar #newPlaylist:hover, .playlist-toolbar #newPlaylist2:hover { background: color-mix(in srgb, var(--accent) 19%, var(--surface)); }
.playlist-toolbar #importPlaylist:hover, .playlist-toolbar #importPlaylist2:hover { background: color-mix(in srgb, var(--import-action) 18%, var(--surface)); }
.chip.active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

/* Track grid — bento-style cards */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--sp-xl);
  min-width: 0;
}

/* Desktop: compact track list instead of cards */
@media (min-width: 768px) {
  .track-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .track:not(.ym-playlist-card):not(.playlist-card) {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 180px 90px 132px;
    align-items: center;
    gap: var(--sp-md);
    padding: 8px 12px;
    border-radius: var(--r-md);
    background: transparent;
    border: 1px solid transparent;
    transition: background var(--dur-fast), border-color var(--dur-fast);
    position: relative;
  }
  .track:not(.ym-playlist-card):not(.playlist-card).playlist-row {
    grid-template-columns: 24px 44px minmax(0, 1fr) 180px 90px 132px;
  }
  .track:not(.ym-playlist-card):not(.playlist-card) > .cover { grid-column: 1; }
  .track:not(.ym-playlist-card):not(.playlist-card) > .track-title { grid-column: 2; }
  .track:not(.ym-playlist-card):not(.playlist-card) > .track-artist { grid-column: 3; }
  .track:not(.ym-playlist-card):not(.playlist-card) > .track-meta:not(.accent) { grid-column: 4; }
  .track:not(.ym-playlist-card):not(.playlist-card) > .track-actions { grid-column: 5; }
  .track:not(.ym-playlist-card):not(.playlist-card).playlist-row > .playlist-drag { grid-column: 1; }
  .track:not(.ym-playlist-card):not(.playlist-card).playlist-row > .cover { grid-column: 2; }
  .track:not(.ym-playlist-card):not(.playlist-card).playlist-row > .track-title { grid-column: 3; }
  .track:not(.ym-playlist-card):not(.playlist-card).playlist-row > .track-artist { grid-column: 4; }
  .track:not(.ym-playlist-card):not(.playlist-card).playlist-row > .track-meta:not(.accent) { grid-column: 5; }
  .track:not(.ym-playlist-card):not(.playlist-card).playlist-row > .track-actions { grid-column: 6; }
  .track:not(.ym-playlist-card):not(.playlist-card):hover {
    transform: none;
    background: var(--surface);
    border-color: var(--line);
    box-shadow: none;
  }
  .track:not(.ym-playlist-card):not(.playlist-card).playing {
    background: var(--surface2);
    border-color: var(--line-strong);
    box-shadow: none;
  }
  .track:not(.ym-playlist-card):not(.playlist-card).playing::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 2px;
    background: var(--accent-grad);
  }
  .track:not(.ym-playlist-card):not(.playlist-card) .cover {
    width: 44px;
    height: 44px;
    aspect-ratio: 1;
    margin-bottom: 0;
    border-radius: var(--r-sm);
    flex-shrink: 0;
    order: 1;
  }
  .track:not(.ym-playlist-card):not(.playlist-card):hover .cover { transform: none; }
  .track:not(.ym-playlist-card):not(.playlist-card) .card-play {
    width: 28px;
    height: 28px;
    bottom: 4px;
    right: 4px;
    opacity: 0;
    transform: none;
  }
  .track:not(.ym-playlist-card):not(.playlist-card):hover .card-play { opacity: 1; }
  .track:not(.ym-playlist-card):not(.playlist-card) .track-title {
    order: 2;
    font-size: var(--fs-base);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: none;
    min-width: 0;
    max-width: none;
  }
  .track:not(.ym-playlist-card):not(.playlist-card) .track-artist {
    order: 3;
    font-size: var(--fs-sm);
    color: var(--muted);
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: none;
    width: 100%;
    text-align: left;
  }
  .track:not(.ym-playlist-card):not(.playlist-card) .track-meta {
    order: 4;
    font-size: var(--fs-xs);
    color: var(--muted);
    margin-top: 0;
    white-space: nowrap;
    width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  }
  .track:not(.ym-playlist-card):not(.playlist-card) .track-source { display: none; }
  .track:not(.ym-playlist-card):not(.playlist-card) .track-actions {
    order: 5;
    display: flex;
    gap: 2px;
    margin-top: 0;
    opacity: 0;
    transition: opacity var(--dur-fast);
    flex-shrink: 0;
    width: 132px;
  }
  .track:not(.ym-playlist-card):not(.playlist-card):hover .track-actions { opacity: 1; }
  .track:not(.ym-playlist-card):not(.playlist-card) .icon-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--r-sm);
  }
  /* Hide recommendation reason and availability in list mode */
  .track:not(.ym-playlist-card):not(.playlist-card) .track-meta.accent,
  .track:not(.ym-playlist-card):not(.playlist-card) .availability { display: none; }
}

/* Playlist grid (albums, YM playlists) */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: var(--sp-md);
}

/* Track card — bento style */
.track {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
  border: 1px solid var(--line);
  transition: transform var(--dur-normal) var(--ease-in-out), box-shadow var(--dur-normal) ease, border-color var(--dur-fast);
  min-width: 0;
  cursor: pointer;
}
.track:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.track:active { transform: translateY(-2px) scale(0.99); }
.track.playing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-md); }
.track.playing .track-title { color: var(--accent); }
.track.pending { opacity: 0.6; }

.cover-wrap { position: relative; }
.cover {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  object-fit: cover;
  width: 100%;
  display: block;
  margin-bottom: 12px;
  background: var(--surface2);
  box-shadow: none;
  transition: transform var(--dur-slow) var(--ease-in-out);
}
.track:hover .cover { transform: scale(1.02); }
.cover.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 30px;
  box-shadow: none;
}
.card-play {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--btn-primary-text);
  display: grid;
  place-items: center;
  border: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
  box-shadow: var(--shadow-md);
}
.track:hover .card-play { opacity: 1; transform: translateY(0); }

.track-title {
  font-weight: 600;
  font-size: var(--fs-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-artist {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin-top: var(--sp-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-artist[data-artist-id] { cursor: pointer; }
.track-artist[data-artist-id]:hover { color: var(--text); text-decoration: underline; }
.track-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-md);
  gap: var(--sp-sm);
}
.track-meta { color: var(--muted); font-size: var(--fs-xs); margin-top: 6px; }
.track-meta.accent { color: var(--accent); }
.track-source { color: var(--muted); font-size: var(--fs-xs); margin-top: 6px; }

/* Track list row — Figma Make style */
.track-row {
  display: grid;
  grid-template-columns: 34px 1fr 227px 36px 28px;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  color: var(--muted);
  transition: background var(--dur-fast);
  cursor: pointer;
}
.track-row:hover { background: var(--surface); }
.track-row.selected {
  background: var(--surface2);
  color: var(--text);
}
.track-row .track-index {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: center;
}
.track-row .track-name {
  display: grid;
  gap: 2px;
}
.track-row .track-name .title {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
}
.track-row .track-name .artist {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.track-row .album-name {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.track-row .liked {
  color: var(--accent-light);
  font-size: var(--fs-base);
}
.track-row .duration {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: right;
}

/* License badges */
.lic {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.lic.cc, .lic.reserved, .lic.unknown { background: var(--surface-interactive); color: var(--muted); }

/* Icon buttons */
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: all var(--dur-fast) var(--ease-in-out);
}
.icon-btn:hover { color: var(--text); background: var(--surface-interactive); transform: scale(1.1); }
.icon-btn:active { transform: scale(0.9); }
.play {
  background: var(--accent);
  color: var(--btn-primary-text);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-sm);
}
.play:hover { transform: scale(1.1); filter: brightness(1.1); background: var(--accent); color: var(--btn-primary-text); }
.like { color: var(--muted); font-size: 17px; }
.like:hover { color: var(--like-red); }
.like.active { color: var(--like-red); }
.like.active i { animation: heart-beat 0.45s var(--ease-elastic); }
.like[disabled] { opacity: 0.45; cursor: wait; }
.add { color: var(--muted); font-size: 19px; }
.add:hover { color: var(--import-action); background: color-mix(in srgb, var(--import-action) 12%, var(--surface)); }
.playlist-del:hover { color: var(--error); background: color-mix(in srgb, var(--error) 12%, var(--surface)); }
@keyframes heart-beat {
  0% { transform: scale(1); }
  30% { transform: scale(1.25); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Search */
.search {
  display: flex;
  gap: 10px;
  margin-bottom: var(--sp-xl);
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}
.search input {
  flex: 1 1 240px;
  width: 100%;
  min-width: 0;
  background: var(--surface-interactive);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 16px;
  color: var(--text);
  outline: none;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.search button {
  background: var(--accent);
  color: var(--btn-primary-text);
  border-radius: var(--r-full);
  padding: 0 24px;
  font-weight: 600;
  min-height: 46px;
  transition: transform var(--dur-fast), filter var(--dur-fast);
}
.search button:hover { transform: translateY(-1px); filter: brightness(1.1); }
.search button:active { transform: scale(0.97); }
.search .source-btn {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  white-space: nowrap;
}
.search .source-btn:hover { color: var(--text); background: var(--surface-interactive); transform: none; }

.source-picker {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  margin-bottom: var(--sp-lg);
  padding: var(--sp-md) var(--sp-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.source-picker .chip { cursor: pointer; }

.source-notice {
  margin-bottom: var(--sp-lg);
  padding: var(--sp-md) var(--sp-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warning);
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.more {
  display: block;
  margin: var(--sp-xl) auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 26px;
  font-weight: 600;
  color: var(--text);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.more:hover { background: var(--surface-interactive); border-color: var(--line-strong); }
.more[disabled] { opacity: 0.5; cursor: wait; }

/* ------------------------------------------------------------------ */
/* Mini player — Figma Make style: dark, blur, centered                */
/* ------------------------------------------------------------------ */
.player {
  position: fixed;
  left: calc(72px + (100vw - 72px) / 2);
  bottom: calc(8px + var(--safe-bottom));
  transform: translateX(-50%);
  width: min(900px, calc(100vw - 72px - 48px));
  padding: 10px 16px;
  border: 1px solid var(--glass-border);
  background: var(--player-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--r-md);
  display: none;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: slide-up var(--dur-slow) var(--ease-out-back);
  transition: background var(--dur-normal) ease;
}
.player.show { display: block; }
@keyframes slide-up {
  from { transform: translateX(-50%) translateY(30px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.player-main {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  min-height: 52px;
}
.player-left {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  min-width: 0;
  flex: 1 1 0;
}
.player-cover {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-interactive);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-in-out);
}
.player-cover:hover { transform: scale(1.04); }
.player-info { flex: 1 1 0; width: 0; min-width: 0; overflow: hidden; }
.player-info strong, .player-info span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-info strong { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; letter-spacing: 0; }
.player-info span { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.player-info .lic { margin-top: 4px; }

.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1.4 1 0;
  min-width: 0;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.player-controls button {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  color: var(--muted);
  font-size: 18px;
  border-radius: 50%;
  transition: color var(--dur-fast), transform var(--dur-fast), background var(--dur-fast);
}
.player-controls button:hover { color: var(--text); background: var(--surface-interactive); }
.player-controls .main-play {
  width: 38px; height: 38px;
  background: var(--accent);
  color: var(--btn-primary-text);
  font-size: var(--fs-base);
}
.player-controls .main-play:hover { transform: scale(1.1); filter: brightness(1.1); color: var(--btn-primary-text); }
/* Prevent the darkened :active state on Android/touch — keep the accent color */
.player-controls .main-play:active,
.player-controls .main-play:focus-visible {
  background: var(--accent);
  color: var(--btn-primary-text);
  filter: none;
  transform: scale(0.96);
  -webkit-tap-highlight-color: transparent;
}

.player .seek {
  width: 100%;
  height: 28px;
  border-radius: var(--r-full);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: filter var(--dur-fast);
}
.player .seek::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 12px;
  border-radius: var(--r-full);
  background: var(--progress-track);
  z-index: 0;
}
.player .seek-fill {
  position: absolute;
  top: 8px;
  left: 0;
  height: 12px;
  border-radius: var(--r-full);
  background: var(--progress-fill);
  width: 0;
  z-index: 1;
  transition: filter var(--dur-fast);
}
.player .seek:hover { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 30%, transparent)); }
.player .seek::after {
  content: '';
  position: absolute;
  top: 50%;
  left: var(--seek-progress, 0%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text);
  transform: translate(-50%, -50%) scale(0);
  transition: transform var(--dur-fast);
  pointer-events: none;
  z-index: 2;
}
.player .seek:hover::after { transform: translate(-50%, -50%) scale(1); }
.player.is-playing .seek::before,
.player.is-playing .seek-fill,
.now-playing.is-playing .np-seek-bar::before,
.now-playing.is-playing .np-seek-fill { animation: expressive-seek-wave 1.35s linear infinite; }
@keyframes expressive-seek-wave {
  to { mask-position: -32px 0; -webkit-mask-position: -32px 0; }
}
@supports (mask-image: url("data:image/svg+xml,%3Csvg/%3E")) {
  .player .seek::before,
  .player .seek-fill,
  .np-seek-bar::before,
  .np-seek-fill {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 12'%3E%3Cpath d='M0 6 C4 0 12 0 16 6 C20 12 28 12 32 6' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 12'%3E%3Cpath d='M0 6 C4 0 12 0 16 6 C20 12 28 12 32 6' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    -webkit-mask-size: 32px 12px;
    mask-size: 32px 12px;
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
  }
}
.player.is-playing .seek-fill,
.now-playing.is-playing .np-seek-fill { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 52%, transparent)); }
.player .seek-times {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}

.player-right {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex: 1 1 0;
  justify-content: flex-end;
  min-width: 0;
}
.player #close {
  position: absolute; top: 4px; right: 6px; z-index: 2;
  flex: 0 0 28px; width: 28px; height: 28px;
  display: grid; place-items: center; margin: 0;
  border: 1px solid color-mix(in srgb, var(--error) 34%, var(--line-strong));
  border-radius: 50%; background: color-mix(in srgb, var(--error) 10%, var(--surface));
  color: color-mix(in srgb, var(--error) 82%, var(--text)); font-size: 15px;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.player #close:hover {
  background: color-mix(in srgb, var(--error) 17%, var(--surface));
  border-color: color-mix(in srgb, var(--error) 52%, var(--line-strong)); color: var(--error);
  transform: translateY(-2px);
}
.player #close:active { transform: translateY(0) scale(.94); }
.player .fb-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 18px;
  flex-shrink: 0;
  transition: color var(--dur-fast), transform var(--dur-fast), background var(--dur-fast);
}
.player .fb-btn:hover { color: var(--text); background: var(--surface-interactive); transform: scale(1.1); }
.player .fb-btn:active { transform: scale(0.9); }
.player .fb-btn.liked { color: var(--like-red); }
.player .fb-btn.liked i { animation: heart-beat 0.45s var(--ease-elastic); }
.player .fb-btn[disabled] { opacity: 0.45; cursor: wait; }

.player-volume {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  color: var(--muted);
  min-width: 0;
}
.player-volume input[type="range"] {
  width: 90px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Wave replenish status */
.wave-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: var(--muted);
  min-height: 14px;
}
.wave-status.error { color: var(--error); }
.wave-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: wave-dot-pulse 1.1s ease-in-out infinite;
}
.wave-status.error .dot { background: var(--error); animation: none; }
@keyframes wave-dot-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ------------------------------------------------------------------ */
/* Full-screen Now Playing — Figma Make style                          */
/* ------------------------------------------------------------------ */
.now-playing {
  position: fixed;
  inset: 0;
  background: var(--np-bg);
  z-index: 120;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transform: translateY(18px) scale(.985);
  pointer-events: none;
  transition: opacity 280ms var(--ease-in-out), transform 380ms var(--ease-out-back),
    visibility 0s linear 380ms, background var(--dur-normal) ease;
}
.now-playing.show {
  transition-delay: 0s, 0s, 0s, 0s;
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Ambient blobs */
.np-ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.np-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
  animation: np-float 14s infinite alternate ease-in-out;
  animation-play-state: paused;
}
.now-playing.is-playing .np-blob { animation-play-state: running; }
.np-blob-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--np-blob-1) 0%, transparent 70%);
  top: -120px; left: -80px;
}
.np-blob-2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--np-blob-2) 0%, transparent 70%);
  bottom: -140px; right: 10%;
  animation-delay: -5s;
}
.np-blob-3 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, var(--np-blob-3) 0%, transparent 70%);
  top: 30%; left: 35%;
  opacity: 0.22;
  animation-delay: -9s;
}
.np-blob-4 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #f97316 0%, transparent 70%);
  top: 48%; right: -100px;
  opacity: 0.2;
  animation-duration: 18s;
  animation-delay: -6s;
}
.np-blob-5 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #22c55e 0%, transparent 70%);
  bottom: 8%; left: 12%;
  opacity: 0.18;
  animation-duration: 16s;
  animation-delay: -11s;
}
.np-blob-6 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, #F472B6 0%, transparent 70%);
  top: 12%; right: 22%;
  opacity: 0.16;
  animation-duration: 20s;
  animation-delay: -3s;
}
@keyframes np-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -25px) scale(1.08); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Header */
.np-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px clamp(16px, 3vw, 32px);
  gap: 12px;
  position: relative;
  z-index: 140;
}
.np-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  min-width: 0;
  gap: 4px;
}
.np-status {
  display: flex;
  align-items: center;
  gap: 8px;
}
.np-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--np-accent);
  animation: np-pulse 2s infinite;
}
@keyframes np-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.np-header-title {
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--np-text-2);
}
.np-playlist-name {
  font-size: 11px;
  color: var(--np-text-3);
}
.np-header-actions {
  display: flex;
  justify-self: end;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: center;
}
.np-close {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--np-surface);
  border: 1px solid var(--np-border);
  display: grid; place-items: center;
  font-size: 20px;
  color: var(--np-text-2);
  transition: all 0.2s;
  justify-self: start;
}
.np-close:hover { background: var(--np-border); color: var(--np-text); }
.np-lyrics-btn {
  padding: 0 14px;
  height: 40px;
  border-radius: 999px;
  background: var(--np-surface);
  border: 1px solid var(--np-border);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--np-text);
  transition: all 0.2s;
}
.np-lyrics-btn:hover { background: var(--np-border); }
.np-lyrics-btn i { color: var(--np-accent); }

/* Stage layout */
.np-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  height: calc(100vh - 80px);
  padding: 0 40px;
  position: relative;
  z-index: 1;
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  gap: 0;
}
.np-stage.lyrics-open {
  justify-content: space-between;
  gap: 64px;
}

/* Player column */
.np-player-col {
  width: 100%;
  max-width: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}

/* Cover */
/* The wrapper's absolutely positioned glow (inset: -30px) makes it wider than
   the artwork, so `.np-cover` must be centred INSIDE it rather than relying on
   the wrapper's own box being centred. Block layout + auto margins does the job
   without depending on flex resolution inside the player column. */
.np-cover-wrap {
  position: relative;
  /* Centring is done on the flex item itself. `margin: 0 auto` alone did nothing
     here: the player column is a flex container with `align-items: center`, but
     the absolutely-positioned glow (inset: -30px) widened the wrapper box, so the
     artwork sat 30px left of the title below it. A fixed width plus
     `align-self: center` keeps the art on the column's centre line. */
  width: min(100%, 340px);
  max-width: 340px;
  margin: 0 auto 24px;
  isolation: isolate;
}
.np-cover-wrap::before {
  content: '';
  position: absolute;
  inset: -13px;
  z-index: 0;
  border-radius: 47% 53% 57% 43% / 42% 46% 54% 58%;
  background: conic-gradient(from 20deg,
    color-mix(in srgb, var(--np-accent) 48%, transparent),
    color-mix(in srgb, var(--np-blob-2) 34%, transparent),
    color-mix(in srgb, var(--np-blob-3) 42%, transparent),
    color-mix(in srgb, var(--np-accent) 48%, transparent));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--np-accent) 20%, transparent));
  opacity: .14;
  transform: rotate(-8deg) scale(.98, 1.01);
  pointer-events: none;
}
.np-cover {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  height: auto;
  aspect-ratio: 1;
  margin-left: auto;
  margin-right: auto;
  border-radius: 20px;
  object-fit: cover;
  background: var(--surface2);
  display: block;
  box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 80px color-mix(in srgb, var(--np-accent) 12%, transparent);
  border: none;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.np-stage.lyrics-open .np-cover {
  width: 265px;
  height: 265px;
}
.np-cover-glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--np-accent-2) 30%, transparent), color-mix(in srgb, var(--np-accent) 10%, transparent));
  filter: blur(60px);
  z-index: -1;
  animation: np-glow-pulse 4s infinite alternate;
}
@keyframes np-glow-pulse {
  0% { opacity: 0.3; }
  100% { opacity: 0.6; }
}
.now-playing.is-playing .np-cover-wrap::before { animation: np-jelly-ring 5.6s ease-in-out infinite; }
@keyframes np-jelly-ring {
  0%, 100% { opacity: .14; transform: rotate(-8deg) scale(.98, 1.01); border-radius: 47% 53% 57% 43% / 42% 46% 54% 58%; }
  50% { opacity: .27; transform: rotate(8deg) scale(1.035, .97); border-radius: 54% 46% 45% 55% / 51% 43% 57% 49%; }
}

/* Info */
.np-info { text-align: center; margin-bottom: 20px; }
.np-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: .005em;
  margin-bottom: 4px;
  color: var(--np-text);
}
.np-artist {
  color: var(--np-text-2);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .03em;
}
.np-artist-link {
  color: color-mix(in srgb, var(--np-accent) 80%, transparent);
  font-size: 12px;
  margin-top: 4px;
  display: inline-block;
  text-decoration: none;
}
.np-artist-link:hover { color: var(--np-accent); }

/* Actions */
.np-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}
.np-actions .np-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--np-surface);
  border: 1px solid var(--np-border);
  display: grid; place-items: center;
  font-size: 18px;
  color: var(--np-text-2);
  transition: all 0.2s;
}
.np-actions .np-btn:hover {
  background: var(--np-border);
  color: var(--np-text);
  transform: scale(1.05);
}
.np-actions .np-btn.active {
  color: var(--np-like);
  border-color: color-mix(in srgb, var(--np-like) 30%, transparent);
}

/* Waveform */
.np-waveform-wrap {
  width: 100%;
  max-width: 390px;
  margin-bottom: 20px;
}
.np-waveform {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.2s;
}
.np-waveform:hover { background: var(--np-surface); }
.np-waveform-bar {
  width: 3px;
  border-radius: 999px;
  background: var(--np-text-3);
  transition: height 0.2s, background 0.15s, transform 0.15s;
}
.np-waveform:hover .np-waveform-bar { transform: scaleY(1.08); }
.np-waveform-bar.played {
  background: linear-gradient(180deg, var(--np-accent) 0%, var(--np-accent-2) 100%);
  box-shadow: 0 0 8px color-mix(in srgb, var(--np-accent-2) 45%, transparent);
}
.np-waveform-bar.current {
  background: var(--np-text);
  box-shadow: 0 0 10px var(--np-accent);
  transform: scaleY(1.25);
}
.np-waveform-times {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  color: var(--np-text-3);
  padding: 4px 8px 0;
}

/* Expressive seek bar: animated wave track and a bright progress head. */
.np-seek-wrap { width: 100%; max-width: 460px; margin-bottom: 20px; }
.np-seek-bar {
  height: 36px; background: transparent; border-radius: 99px;
  cursor: pointer; position: relative; overflow: visible;
}
.np-seek-bar::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 12px; height: 12px;
  border-radius: 99px;
  background: rgba(255,255,255,.18);
}
.np-seek-fill {
  position: absolute; left: 0; top: 12px; height: 12px; width: 0%;
  background: linear-gradient(90deg, var(--np-accent-2), var(--np-accent)); border-radius: 99px;
  box-shadow: 0 0 10px color-mix(in srgb, var(--np-accent) 60%, transparent);
  transition: filter 0.2s ease;
}
.np-seek-bar::after {
  content: '';
  position: absolute; top: 50%; left: var(--seek-progress, 0%);
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--np-text); box-shadow: 0 0 12px color-mix(in srgb, var(--np-accent) 70%, transparent);
  transform: translate(-50%, -50%) scale(.8);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}
.np-seek-bar:hover::after { transform: translate(-50%, -50%) scale(1.08); }
.np-seek-bar:hover .np-seek-fill { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--np-accent) 65%, transparent)); }
.now-playing.is-playing .np-seek-fill { animation: expressive-seek-wave 1.35s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .player .seek::before, .player .seek-fill, .np-seek-bar::before, .np-seek-fill,
  .np-cover-wrap::before { animation: none !important; }
}
.np-seek-times {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--np-text-3); margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

/* Controls */
.np-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.np-controls .np-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px;
  color: var(--np-text-2);
  transition: all 0.2s;
  background: transparent;
  border: 0;
}
.np-controls .np-btn:hover { color: var(--np-text); transform: scale(1.1); }
.np-controls .np-btn.main {
  width: 56px; height: 56px;
  background: var(--np-text);
  color: var(--np-bg);
  box-shadow: 0 0 25px color-mix(in srgb, var(--np-text) 35%, transparent);
}
.np-controls .np-btn.main:hover { transform: scale(1.05); }
.np-controls .np-btn.active { color: var(--np-accent-2); }
.np-track-settings-wrap { position: relative; }
.np-track-settings-wrap[hidden] { display: none; }
.np-track-settings-wrap > .np-btn svg { width: 19px; height: 19px; fill: currentColor; }
.np-track-menu {
  position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 30;
  width: max-content; max-width: min(300px, calc(100vw - 32px));
  padding: 6px; border: 1px solid var(--np-border); border-radius: 16px;
  background: var(--np-surface); box-shadow: 0 12px 34px rgba(0,0,0,.35);
}
.np-track-menu[hidden] { display: none; }
.np-header-actions .np-track-menu { top: calc(100% + 10px); bottom: auto; }
.np-track-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px;
  padding: 8px 12px; border: 0; border-radius: 11px; color: var(--np-text);
  background: transparent; text-align: left; font: inherit; cursor: pointer;
}
.np-track-menu button:hover { background: var(--np-border); }

/* Volume */
.np-volume-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 260px;
  margin-bottom: 16px;
}
.np-volume-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--np-text-3);
  font-size: 16px;
  display: grid; place-items: center;
  transition: color 0.2s;
}
.np-volume-btn:hover { color: var(--np-text); }
.np-volume-slider-wrap {
  flex: 1;
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}
.np-volume-slider-wrap input {
  width: 100%;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--progress-track);
  border-radius: 999px;
  outline: none;
  position: relative;
  z-index: 2;
}
.np-volume-slider-wrap input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--np-text);
  box-shadow: 0 0 10px color-mix(in srgb, var(--np-accent-2) 80%, transparent);
  cursor: pointer;
  transition: transform 0.15s;
}
.np-volume-slider-wrap input::-webkit-slider-thumb:hover { transform: scale(1.2); }
.np-volume-slider-wrap input::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--np-text);
  box-shadow: 0 0 10px color-mix(in srgb, var(--np-accent-2) 80%, transparent);
  cursor: pointer;
  border: 0;
}
.np-volume-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--np-accent-2), var(--np-accent));
  pointer-events: none;
  z-index: 1;
}
.np-volume-value {
  font-size: 11px;
  font-weight: 500;
  color: var(--np-text-3);
  width: 32px;
  text-align: right;
}

/* Normalize */
.np-normalize {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--np-text-3);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s;
}
.np-normalize:hover { color: var(--np-text-2); }
.np-normalize input { display: none; }
.np-normalize-check {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1px solid var(--np-border);
  background: var(--np-surface);
  display: grid; place-items: center;
  font-size: 10px;
  color: transparent;
  transition: all 0.2s;
}
.np-normalize input:checked + .np-normalize-check {
  background: var(--np-accent-2);
  border-color: var(--np-accent-2);
  color: var(--np-text);
}

/* Lyrics panel */
.np-lyrics-col {
  flex: 1;
  max-width: 0;
  opacity: 0;
  height: 76vh;
  max-height: 680px;
  overflow: hidden;
  transform: translateX(50px) scale(0.96);
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  display: flex;
  flex-direction: column;
}
.np-stage.lyrics-open .np-lyrics-col {
  max-width: 680px;
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}
.np-lyrics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--np-border);
  padding-left: 16px;
  padding-right: 16px;
}
.np-lyrics-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--np-accent) 15%, transparent);
  color: var(--np-accent);
  border: 1px solid color-mix(in srgb, var(--np-accent) 20%, transparent);
}
.np-lyrics-hint {
  font-size: 12px;
  color: var(--np-text-3);
}
.np-lyrics-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--np-surface);
  border: 0;
  display: grid; place-items: center;
  font-size: 16px;
  color: var(--np-text-2);
  transition: all 0.2s;
}
.np-lyrics-close:hover { background: var(--np-border); color: var(--np-text); }
.np-lyrics-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 64px 12px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  scrollbar-width: none;
}
.np-lyrics-scroll::-webkit-scrollbar { display: none; }
.np-lyrics-status {
  color: var(--np-text-3);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}
.np-lyrics-text {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 26px;
  font-weight: 700;
  color: var(--np-text-3);
}
.np-lyrics-text .line {
  padding: 12px 16px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: left center;
  filter: blur(0.6px);
}
.np-lyrics-text .line:hover {
  color: var(--np-text-2);
  background: var(--np-surface);
  filter: blur(0);
}
.np-lyrics-text .line.passed {
  color: var(--np-text-3);
  filter: blur(0.3px);
}
.np-lyrics-text .line.active {
  color: var(--np-text);
  transform: scale(1.04);
  filter: blur(0);
  text-shadow: 0 0 28px color-mix(in srgb, var(--np-accent) 45%, transparent), 0 0 12px color-mix(in srgb, var(--np-accent-2) 40%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--np-accent-2) 12%, transparent) 0%, color-mix(in srgb, var(--np-accent) 5%, transparent) 60%, transparent 100%);
  border-left: 3px solid var(--np-accent);
  padding-left: 20px;
}

/* Mobile */
@media (max-width: 960px) {
  .np-stage {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 80px);
    padding: 16px 20px 48px;
  }
  .np-stage.lyrics-open { gap: 0; }
  .np-lyrics-col {
    width: 100%;
    max-width: 100% !important;
    height: 0;
    transform: translateY(20px);
  }
  .np-stage.lyrics-open .np-lyrics-col {
    height: auto;
    flex: 1;
    min-height: 0;
    transform: translateY(0);
  }
  .np-lyrics-text { font-size: 20px; }
  .np-cover { width: 240px; height: 240px; margin: 0 auto; }
  .np-header { padding: 12px 16px; gap: 8px; }
  /* Lyrics button: icon only on mobile (text overflows). */
  .np-lyrics-btn { padding: 0; width: 44px; justify-content: center; }
  .np-lyrics-btn span { display: none; }
  .np-header-actions { gap: 8px; }
  .np-stage.lyrics-open .np-cover-wrap { display: none; }
  /* Lyrics overlay only the cover area on mobile — compact, 3-4 lines, centered */
  .np-stage { position: relative; }
  .np-stage.lyrics-open .np-lyrics-col {
    position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: calc(100% - 32px); max-width: 320px !important; height: 200px;
    display: flex; flex-direction: column;
    background: transparent; z-index: 5;
  }
  .np-stage.lyrics-open .np-lyrics-header { display: none; }
  .np-stage.lyrics-open .np-lyrics-scroll {
    flex: 1; display: flex; flex-direction: column; justify-content: flex-start;
    overflow-y: auto; /* auto-scroll to the active line */
    scroll-behavior: smooth;
  }
  .np-stage.lyrics-open .np-lyrics-text { font-size: 17px; text-align: center; }
  .np-stage.lyrics-open .np-lyrics-text .lyric-line { padding: 4px 6px; }
}
.np-lyrics-text .lyric-line {
  padding: 3px 8px;
  border-radius: var(--r-md);
  color: var(--muted);
  transform: scale(1);
  transform-origin: center;
  transition: color 420ms cubic-bezier(.22, 1, .36, 1),
    background-color 420ms cubic-bezier(.22, 1, .36, 1),
    transform 420ms cubic-bezier(.22, 1, .36, 1),
    opacity 420ms cubic-bezier(.22, 1, .36, 1);
}
.np-lyrics-text .lyric-line.active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  font-weight: 600;
  transform: scale(1.015);
}
@media (prefers-reduced-motion: reduce) {
  .np-lyrics-text .lyric-line { transition: none; }
}

/* ------------------------------------------------------------------ */
/* Queue panel                                                         */
/* ------------------------------------------------------------------ */
.queue-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: auto;
  width: min(420px, 92vw);
  max-height: none;
  background: var(--glass-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid var(--glass-border);
  z-index: 130;
  display: flex;
  visibility: hidden;
  opacity: 0;
  transform: translateX(32px);
  pointer-events: none;
  flex-direction: column;
  padding: var(--sp-lg);
  overflow-y: auto;
  transition: opacity 220ms var(--ease-in-out), transform 300ms var(--ease-out-back),
    visibility 0s linear 300ms;
}
.queue-panel.show {
  transition-delay: 0s, 0s, 0s;
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-md);
}
.queue-title { margin: 0; }
.queue-close { width: 32px; height: 32px; font-size: var(--fs-base); }
.queue-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.queue-item:hover { background: var(--surface-interactive); }
.queue-item.current {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-left: 3px solid var(--accent);
}
.queue-item.current .queue-title { color: var(--accent); }
.queue-item.current .queue-cover { box-shadow: 0 0 0 2px var(--accent); }
.queue-item .playing-indicator {
  width: 16px; height: 16px;
  display: grid; place-items: center;
  color: var(--accent);
  font-size: 10px;
  flex-shrink: 0;
}
.queue-cover {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-interactive);
  flex-shrink: 0;
}
.queue-info { min-width: 0; flex: 1; }
.queue-title { font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-artist { color: var(--muted); font-size: var(--fs-xs); }
.queue-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: var(--fs-sm);
  transition: all var(--dur-fast);
}
.queue-remove:hover { background: var(--surface-interactive); color: var(--error); }
.queue-source { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }

/* ------------------------------------------------------------------ */
/* Profile modal / shared components                                   */
/* ------------------------------------------------------------------ */
.profile-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 140;
  padding: 20px;
  overflow-y: auto;
}
.profile-modal.show { display: grid; }
.profile-card {
  width: min(420px, 100%);
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  animation: pop-in var(--dur-normal) var(--ease-out-back);
}
.profile-card-wide { max-width: 520px; max-height: 90vh; overflow-y: auto; }
@keyframes pop-in {
  0% { transform: scale(0.92); opacity: 0; }
  70% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}
.profile-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin: 0 0 10px; }
.profile-card p { color: var(--muted); line-height: 1.5; font-size: var(--fs-sm); }
.profile-card a, .profile-card button {
  display: block;
  width: 100%;
  margin-top: var(--sp-md);
  padding: 12px 16px;
  border-radius: var(--r-md);
  text-align: center;
  font-weight: 600;
}
.profile-card a { background: var(--accent); color: var(--btn-primary-text); text-decoration: none; }
.profile-card button { border: 1px solid var(--line); background: var(--surface-interactive); color: var(--text); }

.muted-text { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--sp-lg); }
.profile-section { margin-bottom: var(--sp-lg); }
.section-label { font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--sp-sm); }
.section-content { font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }
.profile-actions { display: flex; flex-direction: column; gap: var(--sp-sm); }
.profile-actions .btn-ghost { margin-top: 0; }

.avatar-section { margin-bottom: var(--sp-lg); text-align: center; }
.avatar-wrap { position: relative; display: inline-block; }
.avatar-preview {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent);
}
.avatar-placeholder {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--surface2); display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: var(--accent); border: 3px solid var(--line);
}
.avatar-upload-btn {
  position: absolute; bottom: 0; right: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--btn-primary-text);
  font-size: var(--fs-sm);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.avatar-status { margin-top: var(--sp-sm); font-size: var(--fs-xs); color: var(--muted); }

.stats-row { display: flex; gap: 0; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 80px;
  background: transparent; border-radius: 0;
  border-top: 1px solid var(--line);
  padding: var(--sp-lg) var(--sp-sm); text-align: center;
}
.stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 600; }
.stat-value.accent { color: var(--accent); }
.stat-value.accent-light { color: var(--accent-light); }
.stat-value.accent-soft { color: var(--accent-soft); }
.stat-label { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }

.tg-widget { margin-top: var(--sp-md); }

/* Buttons */
.btn-accent {
  background: var(--accent); color: var(--btn-primary-text);
  border-radius: var(--r-md); padding: 10px 24px;
  font-weight: 700; font-size: var(--fs-sm);
  cursor: pointer; display: inline-flex; align-items: center; gap: var(--sp-sm);
  border: 1px solid color-mix(in srgb, var(--accent) 80%, var(--line-strong));
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 16%, transparent);
  transition: transform var(--dur-fast) ease, background var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.btn-accent:hover { background: var(--accent-bright); transform: translateY(-1px); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn-accent:active { transform: translateY(0); }
.btn-import {
  background: color-mix(in srgb, var(--import-action) 15%, var(--surface)); color: var(--import-action);
  border: 1px solid color-mix(in srgb, var(--import-action) 40%, var(--line-strong));
  border-radius: var(--r-md); padding: 10px 20px; font-weight: 700; font-size: var(--fs-sm);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-sm);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--import-action) 9%, transparent);
  transition: transform var(--dur-fast) ease, background var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.btn-import:hover { background: color-mix(in srgb, var(--import-action) 23%, var(--surface)); transform: translateY(-1px); box-shadow: 0 4px 12px color-mix(in srgb, var(--import-action) 15%, transparent); }
.btn-import:active { transform: translateY(0); }
.btn-ghost {
  background: var(--surface-interactive); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 10px 24px; font-weight: 600; font-size: var(--fs-sm);
  cursor: pointer; display: inline-flex; align-items: center; gap: var(--sp-sm);
  text-decoration: none;
  transition: transform var(--dur-fast) ease, background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.btn-ghost:hover { background: color-mix(in srgb, var(--accent) 8%, var(--surface-interactive)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line-strong)); transform: translateY(-1px); }
.btn-ghost-sm {
  margin-top: var(--sp-sm); padding: 6px 12px;
  border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface2); font-size: var(--fs-xs); color: var(--muted);
  cursor: pointer;
}
.modal-row { display: flex; gap: var(--sp-sm); margin-top: var(--sp-lg); }
.modal-row .btn-accent, .modal-row .btn-ghost { flex: 1; justify-content: center; }
.input-field {
  width: 100%; margin-top: var(--sp-md);
  background: var(--surface2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 10px 12px; color: var(--text);
}
.playlist-list { margin-top: var(--sp-md); max-height: 200px; overflow-y: auto; }
.playlist-pick { display: block; width: 100%; text-align: left; margin-bottom: 6px; padding: 10px 14px; }

/* Context menu */
.ctx-menu {
  position: fixed; z-index: 110;
  background: var(--glass-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); padding: 6px 0; min-width: 180px;
  box-shadow: var(--shadow-lg);
}
.ctx-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 16px; font-size: var(--fs-sm); color: var(--text);
}
.ctx-item:hover { background: var(--surface-interactive); }
.ctx-danger { color: var(--like-red); }
.ctx-accent { color: var(--accent); }
.ctx-muted { color: var(--muted); }

/* Onboarding */
.onboarding-modal { overflow-y: auto; }
.onboarding-card { max-width: 480px; max-height: 90vh; overflow-y: auto; margin: auto; }
.field-label { display: block; margin-bottom: var(--sp-md); }
.field-label-text { font-weight: 600; font-size: var(--fs-sm); display: block; margin-bottom: var(--sp-xs); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* Artist pick (onboarding) */
.artist-pick-list, .artist-selected-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
  margin-top: var(--sp-sm);
}
.artist-selected-list:empty { display: none; }
.artist-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--surface2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.artist-pick-row:hover, .artist-pick-row.selected { border-color: var(--accent); }
.artist-pick-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface); flex: 0 0 40px; }
.artist-pick-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artist-pick-row > i { color: var(--accent); font-size: 18px; }
.artist-pick-row > button { border: 0; background: transparent; color: var(--muted); padding: 6px; cursor: pointer; }
.artist-search-empty { color: var(--muted); font-size: var(--fs-sm); padding: 10px 4px; }

/* Compact, focused wave preferences */
.onboarding-modal { padding: 12px; overflow: hidden; }
.onboarding-card {
  width: min(520px, 100%);
  max-width: 520px;
  max-height: min(700px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.onboarding-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px 14px; }
.onboarding-mark {
  display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px;
  border-radius: 15px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface2));
  font-size: 23px;
}
.onboarding-title-wrap { min-width: 0; }
.onboarding-eyebrow { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.onboarding-card .onboarding-title-wrap h3 { margin: 3px 0 3px; font-size: 21px; line-height: 1.2; }
.onboarding-card .onboarding-title-wrap p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.onboarding-body { min-height: 0; overflow-y: auto; padding: 0 22px 12px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.wave-pref-block { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface2); }
.wave-pref-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.wave-pref-heading > span:first-child { display: flex; align-items: center; gap: 7px; }
.wave-pref-heading i { color: var(--accent); font-size: 16px; }
.wave-pref-count { color: var(--muted); font-size: 10px; font-weight: 500; white-space: nowrap; }
.onboarding-search { display: flex; align-items: center; gap: 8px; min-height: 38px; margin: 0 0 9px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); }
.onboarding-search > i { flex: 0 0 auto; }
.onboarding-search input { width: 100%; min-width: 0; margin: 0; padding: 8px 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 12px; }
.onboarding-search input:focus { outline: 0; }
.onboarding-genre-list { max-height: 112px; overflow-y: auto; align-content: flex-start; }
.onboarding-card .chip {
  display: inline-flex; align-items: center; justify-content: center; width: auto; max-width: 100%; min-height: 31px;
  margin: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 11px; line-height: 1.2; font-weight: 600;
}
.onboarding-card .chip.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
.onboarding-card .chip:hover { border-color: var(--accent); }
.onboarding-card .onboarding-more { display: block; width: auto; margin: 7px auto 0; padding: 4px 10px; border: 0; background: transparent; color: var(--accent); font-size: 11px; }
.onboarding-card .onboarding-more[hidden], .onboarding-artist-block[hidden] { display: none !important; }
.wave-pref-pair { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; }
.wave-pref-pair .chip-row { gap: 5px; }
.onboarding-card .artist-pick-list, .onboarding-card .artist-selected-list { max-height: 100px; margin-top: 7px; }
.onboarding-card .artist-pick-row { min-height: 38px; margin: 0; padding: 5px 8px; border-color: transparent; background: var(--surface); font-size: 12px; }
.onboarding-card .artist-pick-row img { width: 28px; height: 28px; flex-basis: 28px; }
.onboarding-card .artist-pick-row > button { display: grid; place-items: center; width: auto; margin: 0; padding: 5px; border: 0; background: transparent; }
.onboarding-actions { display: flex; gap: 9px; padding: 11px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.onboarding-card .onboarding-actions button { min-height: 42px; margin: 0; padding: 9px 14px; border-radius: 12px; font-size: 13px; }
.onboarding-card #onboardingSkip { flex: 0 0 100px; width: auto; background: transparent; }
.onboarding-card #onboardingSave { display: flex; flex: 1; align-items: center; justify-content: center; gap: 7px; border-color: var(--accent); background: var(--accent); color: var(--btn-primary-text); }
.onboarding-card #onboardingSave i { font-size: 16px; }
@media (max-width: 600px) {
  .onboarding-modal { place-items: end center; padding: 8px; }
  .onboarding-card { width: 100%; max-height: min(82dvh, 690px); border-radius: 22px; }
  .onboarding-head { padding: 16px 16px 12px; }
  .onboarding-body { padding: 0 16px 10px; }
  .onboarding-actions { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
}

/* YM playlist / album / artist header */
.ym-playlist-header {
  display: flex; gap: 20px; margin-bottom: var(--sp-xl);
  padding: 20px; background: var(--surface);
  border-radius: var(--r-xl); border: 1px solid var(--line);
}
.ym-playlist-cover {
  width: 180px; height: 180px; border-radius: var(--r-lg);
  object-fit: cover; flex-shrink: 0;
}
.ym-playlist-cover.round { border-radius: 50%; }
.ym-playlist-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
}
.ym-playlist-eyebrow {
  color: var(--muted); font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.ym-playlist-info h2 { margin: 6px 0 8px; font-size: 28px; line-height: 1.2; }
.ym-playlist-info p { margin: 0 0 12px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.ym-playlist-meta { color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--sp-lg); }
.ym-playlist-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ym-artist-similar { margin: 26px 0 12px; }
.ym-artist-similar h3 { margin: 0 0 12px; font-size: 18px; }
.ym-artist-similar-list { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 10px; }
.ym-artist-similar-item { display: grid; justify-items: center; gap: 7px; flex: 0 0 94px; padding: 8px; color: var(--text); border: 1px solid transparent; border-radius: var(--r-lg); background: transparent; cursor: pointer; }
.ym-artist-similar-item:hover { border-color: var(--line-strong); background: var(--surface); }
.ym-artist-similar-item img, .ym-artist-similar-placeholder { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; object-fit: cover; background: var(--surface-interactive); color: var(--muted); }
.ym-artist-similar-item span:last-child { max-width: 100%; overflow: hidden; color: var(--muted); font-size: var(--fs-xs); text-align: center; text-overflow: ellipsis; white-space: nowrap; }

/* Artist profile: release, popular tracks, and album catalog */
.ym-artist-header { align-items: center; min-height: 220px; overflow: hidden; position: relative; }
.ym-artist-header::after { content: ""; position: absolute; inset: 0 0 0 32%; z-index: 0; pointer-events: none; background: radial-gradient(ellipse at 85% 50%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 64%); }
.ym-artist-header > * { position: relative; z-index: 1; }
.ym-artist-header .ym-playlist-cover { width: 190px; height: 190px; box-shadow: 0 12px 38px color-mix(in srgb, #000 30%, transparent); }
.ym-artist-header .ym-playlist-info h2 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.035em; }
.ym-artist-section { margin: 24px 0 30px; }
.ym-artist-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0 0 12px; }
.ym-artist-section-heading h3 { margin: 3px 0 0; font-size: clamp(19px, 2.4vw, 24px); letter-spacing: -.02em; }
.ym-artist-kicker { color: var(--muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ym-artist-release-card { display: flex; align-items: center; gap: 14px; min-height: 92px; padding: 12px; overflow: hidden; color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface) 60%); cursor: pointer; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.ym-artist-release-card:hover, .ym-artist-release-card:focus-visible { border-color: var(--line-strong); transform: translateY(-1px); outline: none; }
.ym-artist-release-card > img, .ym-artist-release-placeholder { display: grid; place-items: center; width: 66px; height: 66px; flex: 0 0 66px; border-radius: 14px; object-fit: cover; background: var(--surface-interactive); color: var(--muted); }
.ym-artist-release-copy, .ym-artist-latest-copy { display: grid; gap: 5px; min-width: 0; }
.ym-artist-release-copy strong, .ym-artist-latest-copy strong { overflow: hidden; color: var(--text); font-size: var(--fs-base); text-overflow: ellipsis; white-space: nowrap; }
.ym-artist-release-copy > span, .ym-artist-latest-copy > span { overflow: hidden; color: var(--muted); font-size: var(--fs-sm); text-overflow: ellipsis; white-space: nowrap; }
.ym-artist-release-open { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 8px 11px; flex: 0 0 auto; color: var(--accent-bright); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 999px; font-size: var(--fs-xs); }
.ym-artist-latest-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 8px; margin-top: 9px; }
.ym-artist-latest-track { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; color: var(--text); text-align: left; border: 1px solid transparent; border-radius: var(--r-md); background: transparent; cursor: pointer; transition: background .16s ease, border-color .16s ease; }
.ym-artist-latest-track:hover, .ym-artist-latest-track:focus-visible { background: var(--surface); border-color: var(--line); outline: none; }
.ym-artist-latest-track .cover { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; object-fit: cover; }
.ym-artist-latest-track .placeholder { display: grid; place-items: center; background: var(--surface-interactive); color: var(--muted); }
.ym-artist-latest-copy { flex: 1; }
.ym-artist-latest-copy strong { font-size: var(--fs-sm); }
.ym-artist-latest-copy > span, .ym-artist-latest-duration { font-size: var(--fs-xs); }
.ym-artist-latest-duration { color: var(--muted); flex: 0 0 auto; }
.ym-artist-latest-track > i { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; color: var(--accent-bright); border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.ym-artist-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 14px; }
.ym-artist-album-card { display: grid; align-content: start; gap: 7px; min-width: 0; padding: 9px; color: var(--text); text-align: left; border: 1px solid transparent; border-radius: var(--r-lg); background: transparent; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.ym-artist-album-card:hover, .ym-artist-album-card:focus-visible { background: var(--surface); border-color: var(--line); transform: translateY(-2px); outline: none; }
.ym-artist-album-card > img, .ym-artist-album-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 13px; object-fit: cover; background: var(--surface-interactive); color: var(--muted); }
.ym-artist-album-card strong, .ym-artist-album-card > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ym-artist-album-card strong { font-size: var(--fs-sm); }
.ym-artist-album-card > span:last-child { color: var(--muted); font-size: var(--fs-xs); }
@media (max-width: 600px) {
  .ym-artist-header { gap: 14px; min-height: 0; padding: 15px; }
  .ym-artist-header .ym-playlist-cover { width: 112px; height: 112px; }
  .ym-artist-header .ym-playlist-info h2 { font-size: 25px; }
  .ym-artist-header .ym-playlist-meta { margin-bottom: 10px; }
  .ym-artist-release-open { width: 34px; height: 34px; justify-content: center; padding: 0; font-size: 0; }
  .ym-artist-release-open i { font-size: 15px; }
  .ym-artist-albums { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
}

/* Playlist editing */
.playlist-toolbar { display: flex; align-items: center; gap: var(--sp-sm); flex-wrap: wrap; }
.import-field { display: grid; gap: 6px; margin-top: 14px; color: var(--muted); font-size: var(--fs-sm); }
.import-field input, .import-field select {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface2); color: var(--text);
}
.import-status { min-height: 20px; color: var(--muted); font-size: var(--fs-sm); }
.import-attribution { color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; }
.import-actions { display: flex; gap: var(--sp-sm); margin-top: var(--sp-md); }
.import-actions button { flex: 1; min-height: 40px; }
.import-actions button[type="submit"] { background: var(--accent); color: var(--btn-primary-text); border: 1px solid color-mix(in srgb, var(--accent) 80%, var(--line-strong)); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 16%, transparent); font-weight: 700; }
.import-actions button[type="submit"]:hover { background: var(--accent-bright); }
.import-actions button:not([type="submit"]) { background: var(--surface-interactive); border: 1px solid var(--line-strong); color: var(--text); }
.import-actions button:not([type="submit"]):hover { border-color: color-mix(in srgb, var(--accent) 32%, var(--line-strong)); color: var(--accent-bright); }
.import-preview { margin-top: var(--sp-sm); }
.import-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: var(--fs-xs); }
.import-preview-head label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.import-preview-list { max-height: min(42vh, 360px); overflow-y: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--r-md); }
.import-preview-track { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.import-preview-track:last-child { border-bottom: 0; }
.import-preview-track input { width: 18px; height: 18px; accent-color: var(--accent); }
.import-preview-track-copy { display: flex; align-items: baseline; gap: 7px; min-width: 0; overflow: hidden; white-space: nowrap; }
.import-preview-track-artist { flex: 0 1 auto; max-width: 42%; color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-preview-track-separator { flex: 0 0 auto; color: var(--muted); font-size: var(--fs-xs); }
.import-preview-track-title { flex: 1 1 auto; min-width: 0; color: var(--text); font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-preview-track-unmatched { grid-column: 2; color: var(--warning); font-size: var(--fs-xs); }
.playlist-edit-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-md); margin-bottom: var(--sp-lg);
  padding: var(--sp-md); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.playlist-edit-bar .btn-accent { margin-left: auto; white-space: nowrap; }
.playlist-empty .btn-accent, .playlist-empty .btn-import { margin-top: var(--sp-md); }
.playlist-cover-preview { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-md); }
.playlist-drag { color: var(--muted); cursor: grab; margin-right: 6px; }
.track.dragging { opacity: 0.45; }
.track.drag-over { outline: 2px solid var(--accent); outline-offset: 2px; }
.playlist-card { display: flex; flex-direction: column; justify-content: space-between; }
.track.playlist-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-md);
  grid-column: 1 / -1;
  width: 100%;
  padding: 10px 12px;
}
.playlist-row-cover {
  width: 56px;
  height: 56px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--surface2);
  color: var(--muted);
}
.playlist-row-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.playlist-row-info { min-width: 0; }
.track.playlist-card .track-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track.playlist-card .track-meta { margin-top: 4px; }
.track.playlist-card .track-actions { margin: 0; justify-content: flex-end; }

/* States */
.empty { color: var(--muted); padding: var(--sp-3xl) var(--sp-2xl); text-align: center; grid-column: 1 / -1; }
.err { color: var(--error); padding: 14px 0; font-size: var(--fs-sm); }
.availability { color: var(--muted); font-size: var(--fs-xs); line-height: 1.35; margin-top: 7px; }

/* Skeleton — shimmer */
.skel {
  background: linear-gradient(90deg, var(--surface-interactive) 0%, var(--line-strong) 50%, var(--surface-interactive) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite ease-in-out;
  border-radius: var(--r-md);
  height: 250px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 60px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  top: calc(18px + var(--safe-top));
  transform: translate(-50%, -140%);
  background: var(--glass-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 11px 18px;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  z-index: 150;
  transition: transform var(--dur-normal) var(--ease-in-out);
  max-width: calc(100% - 32px);
  box-shadow: var(--shadow-lg);
}
.toast.show { transform: translate(-50%, 0); }

/* Accessibility */
.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;
}

/* Desktop tabs — underline style */
.desktop-tabs {
  display: flex;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-xl);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.desktop-tabs .chip {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 2px;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--muted);
  margin-bottom: -1px;
}
.desktop-tabs .chip:hover { color: var(--text); background: transparent; }
.desktop-tabs .chip.active {
  background: transparent;
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* Skip link */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--btn-primary-text);
  font-weight: 700;
  font-size: var(--fs-sm);
  transform: translateY(-64px);
  transition: transform var(--dur-fast) var(--ease-in-out);
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--text);
}

/* ---------- NOCTURNE settings / profile components ---------- */
.settings-group { border-top: 1px solid var(--line); margin-bottom: 8px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.settings-row-opus { align-items: flex-start; }
.settings-select {
  flex: 0 0 auto;
  width: min(100%, 250px);
  min-width: 190px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.settings-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-select option { background: var(--surface2); color: var(--text); }
.settings-label { font-weight: 500; font-size: 14.5px; letter-spacing: .01em; color: var(--text); }
.settings-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.toggle { width: 46px; height: 26px; border-radius: 99px; background: var(--surface-interactive); border: 1px solid var(--line); position: relative; cursor: pointer; transition: background var(--dur-normal); flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: all var(--dur-normal) var(--ease-out); }
.toggle.on { background: var(--accent); }
.toggle.on::after { left: 23px; background: #fff; }
.seg { display: flex; background: var(--surface2); border: 1px solid var(--line); border-radius: 99px; padding: 3px; flex-shrink: 0; }
.seg button { padding: 7px 16px; border-radius: 99px; font-size: 12.5px; font-weight: 500; color: var(--muted); transition: all var(--dur-normal); background: none; border: none; cursor: pointer; }
.seg button.active { background: var(--surface-interactive); color: var(--text); }
[data-theme="light"] .seg button.active { background: #fff; box-shadow: 0 1px 4px rgba(26,18,46,.12); }
.link-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 4px; border-bottom: 1px solid var(--line); cursor: pointer; transition: padding-left var(--dur-normal) var(--ease-out); }
.link-row:hover { padding-left: 12px; }
.link-row:hover .settings-label { color: var(--accent); }
.link-row svg, .link-row i { color: var(--muted); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-dim); }

/* ---------- NOCTURNE auth banner (guest) ---------- */
.auth-banner {
  position: fixed; inset: 0; z-index: 130;
  display: grid; place-items: center;
  background: rgba(7,6,11,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 20px;
}
.auth-banner-card {
  width: 100%; max-width: 400px; padding: 40px 36px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  text-align: center; box-shadow: 0 24px 64px rgba(0,0,0,.5);
  animation: pop-in var(--dur-normal) var(--ease-out-back);
}
.auth-banner-logo {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 24px;
  object-fit: cover; display: block;
  box-shadow: 0 0 44px var(--accent-glow);
}
.auth-banner-title { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.auth-banner-sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; line-height: 1.5; }
.auth-banner-close { margin-top: 18px; background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; transition: color var(--dur-normal); }
.auth-banner-close:hover { color: var(--text); }

/* Guests: hide like buttons (likes require auth) */
body.is-guest .like,
body.is-guest #npLike,
body.is-guest #mpLike,
body.is-guest [data-like] { display: none !important; }

/* ---------- NOCTURNE big search ---------- */
.search-hero { padding: 16px 0 20px; }
.daily-mix {
  position: relative; display: flex; align-items: center; gap: 22px;
  margin: 6px 0 30px; padding: 22px 26px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 24px;
  background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 15%, var(--surface)), var(--surface) 65%);
}
.daily-mix-art { position: relative; flex: 0 0 116px; width: 116px; height: 116px; }
.daily-mix-art img { position: absolute; width: 72px; height: 72px; object-fit: cover; border-radius: 15px; border: 2px solid var(--surface); box-shadow: 0 8px 22px rgba(0,0,0,.22); }
.daily-mix-art img:nth-child(1) { left: 0; top: 0; z-index: 1; }
.daily-mix-art img:nth-child(2) { right: 0; top: 0; }
.daily-mix-art img:nth-child(3) { left: 0; bottom: 0; }
.daily-mix-art img:nth-child(4) { right: 0; bottom: 0; z-index: 1; }
.daily-mix-placeholder { position: absolute; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 15px; background: var(--surface2); color: var(--accent); }
.daily-mix-copy { position: relative; z-index: 2; min-width: 0; }
.daily-mix-copy h2 { margin: 5px 0 2px; font-size: clamp(22px, 3vw, 30px); }
.daily-mix-copy p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.daily-mix-play { display: inline-flex; align-items: center; gap: 8px; padding: 11px 17px; }
.daily-mix-count { margin-left: auto; position: relative; color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 560px) {
  .daily-mix { gap: 14px; padding: 16px; margin-bottom: 22px; }
  .daily-mix-art { flex-basis: 84px; width: 84px; height: 84px; }
  .daily-mix-art img { width: 54px; height: 54px; border-radius: 12px; }
  .daily-mix-count { display: none; }
  .daily-mix-copy p { max-width: 210px; }
}
.big-search { position: relative; max-width: 620px; display: flex; align-items: center; gap: 10px; }
.big-search .search-ico { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; font-size: 20px; }
.big-search input {
  flex: 1; width: 100%; padding: 18px 24px 18px 58px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 99px; color: var(--text); font-size: 15.5px;
  outline: none; transition: all var(--dur-normal) var(--ease-out);
}
.big-search input:focus { border-color: var(--accent-dim); background: var(--surface2); }
.big-search input::placeholder { color: var(--muted); }
.big-search-btn {
  flex-shrink: 0; padding: 18px 28px; border-radius: 99px;
  background: var(--accent); color: #fff; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform var(--dur-normal) var(--ease-out), box-shadow var(--dur-normal);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.big-search-btn:hover { transform: scale(1.04); }
/* service picker inside big-search */
.search-service { position: relative; flex-shrink: 0; }
.search-service-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 20px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: all var(--dur-normal) var(--ease-out); white-space: nowrap;
}
.search-service-btn:hover { border-color: var(--accent-dim); background: var(--surface2); }
.search-service-btn i { font-size: 16px; color: var(--accent); }
.search-service-btn .caret { font-size: 12px; color: var(--muted); }
.search-service-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  background: var(--surface2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 6px; min-width: 180px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5); display: none;
}
.search-service-menu.show { display: block; }
.search-service-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: var(--r-md); background: none; border: none;
  color: var(--text); font-size: 13.5px; cursor: pointer; text-align: left;
  transition: background var(--dur-fast);
}
.search-service-menu button:hover { background: var(--surface-interactive); }
.search-service-menu button.active { color: var(--accent); }
.search-service-menu button i { font-size: 16px; }

/* ---------- NOCTURNE page headers / profile ---------- */
.page-head { padding: 32px 0 36px; }
.page-title { font-family: var(--font-display); font-size: clamp(32px, 4vw, 46px); font-weight: 600; letter-spacing: .005em; color: var(--text); margin: 0; }
.page-sub { color: var(--muted); margin-top: 10px; font-size: 14.5px; }
.profile-head { display: flex; align-items: center; gap: 26px; padding: 32px 0 36px; }
.profile-ava-lg {
  width: 92px; height: 92px; border-radius: 50%;
  background: linear-gradient(135deg, #3a2a5e, #1c1530);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 32px; font-weight: 600; color: var(--accent);
  overflow: hidden; flex-shrink: 0;
}
.profile-ava-lg img { width: 100%; height: 100%; object-fit: cover; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2px; margin-bottom: 36px; border-top: 1px solid var(--line); }
.stat-grid .stat-card { padding: 22px 20px; border-top: none; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; text-align: left; }
.stat-grid .stat-num, .stat-grid .stat-value { font-family: var(--font-display); font-size: 32px; font-weight: 600; color: var(--text); }
.stat-grid .stat-lbl, .stat-grid .stat-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* ---------- NOCTURNE bottom navigation (mobile only) ---------- */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 101;
  background: rgba(7,6,11,.92);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + var(--safe-bottom));
  justify-content: space-around;
}
.bn-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 12px; color: var(--muted);
  font-size: 10.5px; font-weight: 600; border-radius: 10px;
  background: none; border: none; cursor: pointer;
  transition: color var(--dur-normal) ease;
}
.bn-item i { font-size: 22px; }
.bn-item.active { color: var(--accent); }
@media (max-width: 767px) {
  .bottom-nav { display: flex; }
}

/* Hero wave gradient transition */
.hero-compact { transition: background 0.5s ease; }

/* Content entrance */
.track-grid, .playlist-grid {
  animation: fade-in-slide-up var(--dur-normal) var(--ease-in-out);
}
@keyframes fade-in-slide-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ */
/* Responsive — two breakpoints: 768 (mobile) and 1100 (wide desktop)  */
/* ------------------------------------------------------------------ */

/* Tablet and below: sidebar becomes a drawer */
@media (max-width: 1099px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--dur-normal) var(--ease-in-out);
    box-shadow: none;
    width: 260px;
    z-index: 130;
  }
  .sidebar .brand-name { display: block; }
  .sidebar .side-item span { display: inline; }
  .sidebar .side-item { width: auto; padding: 9px 12px; justify-content: flex-start; gap: var(--sp-md); }
  .sidebar .auth-entry { width: auto; padding: 10px 9px; justify-content: flex-start; gap: 10px; }
  .sidebar .auth-entry-copy { display: flex; }
  body.side-open .sidebar { transform: translateX(0); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }
  .shell { margin-left: 0; padding: 14px 16px calc(var(--mini-player-h) + var(--sp-3xl) + var(--safe-bottom)); }
  .topbar { margin-bottom: var(--sp-md); }
  .menu-btn { display: flex; }
  .player {
    left: 50%;
    width: min(740px, calc(100% - 24px));
  }
  .queue-panel { width: min(360px, 94vw); }
}

/* Mobile */
@media (max-width: 767px) {
  .shell {
    padding: var(--sp-lg) var(--sp-sm) calc(80px + var(--sp-2xl) + var(--safe-bottom));
  }
  /* NOCTURNE mobile topnav: brand + icons only, links go to bottom-nav */
  .topnav { padding: 16px 16px 0; gap: 16px; }
  .topnav-links { display: none; }
  .topnav-right { gap: 10px; }
  .topnav-right .search-center { flex: 1 1 auto; }
  .topnav-right .search-center input { padding: 10px 16px; }
  .topnav .brand-name { font-size: 19px; }
  header { margin-bottom: var(--sp-lg); }
  /* Text fits on mobile — truncate long words, allow wrapping */
  .track-title, .track-artist, .card-title, .card-sub {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
  }
  h1, .page-title { font-size: clamp(24px, 7vw, 32px); overflow-wrap: break-word; }
  h2 { font-size: 20px; overflow-wrap: break-word; }
  .section-head h2 { font-size: 20px; }
  .track .track-title { font-size: var(--fs-sm); }
  .track .track-artist { font-size: var(--fs-xs); }
  .big-search { flex-wrap: wrap; }
  .big-search input { min-width: 0; flex: 1 1 100%; padding-left: 58px; }
  .big-search .search-ico { top: 32px; }
  .big-search-btn, .search-service-btn { padding: 14px 18px; font-size: 13px; }
  .settings-label { font-size: 13.5px; }
  .settings-sub { font-size: 12px; }
  .profile-head { gap: 18px; }
  .profile-ava-lg { width: 72px; height: 72px; font-size: 26px; }
  .profile-head .page-title { font-size: 28px; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; gap: var(--sp-md); }
  .bento-hero { grid-column: span 2; grid-row: span 2; }
  .hero-compact { padding: var(--sp-xl); flex-direction: column; align-items: flex-start; }
  h1 { font-size: clamp(26px, 8vw, 36px); }
  h2 { font-size: 20px; }
  .track-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-md); }
  .track { padding: 9px; }
  .track:hover { transform: none; }
  .search button { padding: 0 15px; }
  .topbar .hero-btn { display: none; }
  .desktop-tabs { display: none; }

  /* Touch targets — WCAG 2.5.8 / Apple HIG 44px minimum */
  .icon-btn, .fb-btn, .queue-remove, .menu-btn, .ctx-item,
  .player-controls button, .np-btn, .np-close, .np-lyrics-btn,
  .side-item, .auth-entry, .chip, .round-btn {
    min-width: 44px;
    min-height: 44px;
  }
  .queue-remove { align-items: center; justify-content: center; }
  .side-item { min-height: 44px; }
  .chip { min-height: 36px; padding: 10px 16px; }

  /* Mini player: thin bar above the bottom-nav */
  .player {
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 8px);
    width: calc(100% - 16px);
    height: 80px;
    padding: 10px 14px;
    border-radius: var(--r-xl);
    z-index: 102;
  }
  .player-main { min-height: 60px; gap: var(--sp-md); }
  .player .player-cover { width: 52px; height: 52px; }
  .player .player-info strong {
    display: -webkit-box; max-width: 100%; white-space: normal;
    overflow: hidden; text-overflow: ellipsis; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; line-height: 1.15; max-height: 2.3em;
  }
  .player .player-info strong { font-size: var(--fs-base); }
  .player .player-info span { font-size: var(--fs-sm); margin-top: 2px; }
  .player-center { flex: 0 0 auto; }
  .player-center .seek, .player-center .seek-times { display: none; }
  .player-controls button { width: 44px; height: 44px; font-size: var(--fs-lg); }
  .player-controls .main-play { width: 48px; height: 48px; }
  .player .fb-btn:not(#mpLike), .player #prev, .player #close { display: none; }
  .player #mpLike { display: grid; width: 44px; height: 44px; }
  .player-right { flex: 0 0 auto; }
  .player-volume { display: none; }
  /* Compact expressive progress wave at the bottom edge of the bar */
  .player .seek {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 28px;
    padding: 0;
    margin: 0;
    border-radius: 0 0 var(--r-md) var(--r-md);
    background: var(--progress-track);
    display: block;
  }
  .player .seek::before { top: 8px; bottom: 8px; height: 12px; }
  .player .seek-fill { top: 8px; height: 12px; border-radius: 0; }
  .player .seek::after { display: none; }

  /* Now Playing mobile */
  .np-cover { width: min(280px, 80vw); height: auto; aspect-ratio: 1; margin: 0 auto; }
  .np-controls { gap: var(--sp-lg); }
  .np-btn { width: 44px; height: 44px; font-size: 18px; }
  .np-btn.main { width: 54px; height: 54px; font-size: 22px; }

  /* YM header stacks */
  .ym-playlist-header { flex-direction: column; align-items: center; text-align: center; }
  .ym-playlist-cover { width: 140px; height: 140px; }
  .ym-playlist-info h2 { font-size: 22px; }
  .ym-playlist-actions { justify-content: center; }
}

@media (max-width: 360px) {
  .np-controls { gap: 4px; }
}

@media (max-width: 420px) {
  .np-header { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px; padding-inline: 8px; }
  .np-header-actions { gap: 4px; }
  .np-header-actions > .np-btn,
  .np-track-settings-wrap > .np-btn { width: 38px; height: 38px; }
  .np-lyrics-btn { width: 38px; }
  .np-header-title { font-size: 9px; letter-spacing: .08em; }
  .np-playlist-name { display: none; }
}

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

/* Wide desktop */
@media (min-width: 1100px) {
  .hero-compact { padding: 22px 26px; }
}

/* ------------------------------------------------------------------ */
/* NOCTURNE: hide the "wave" UI — the wave engine/API stays for the    */
/* future Android app, but the web UI no longer surfaces it.           */
/* ------------------------------------------------------------------ */
#waveStatus,
.wave-status,
.wave-preview-strip,
.wave-mini-strip,
.hero-wave-mini,
#shuffleBtnHero,
#shuffleBtn,
#ymCatalogSection,
#albumsSection,
.side-search,
.shell > .search,
.source-picker,
.source-notice,
.desktop-tabs { display: none !important; }

/* Currently playing track: the whole block gets a soft green tint + outline
   (overrides the accent styling above in both the grid and the list layouts). */
:root { --playing-green: #FDA4AF; }
.track.playing,
.track:not(.ym-playlist-card):not(.playlist-card).playing {
  background: color-mix(in srgb, var(--playing-green) 12%, var(--surface, transparent));
  border-color: color-mix(in srgb, var(--playing-green) 45%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--playing-green) 30%, transparent);
}
.track.playing .track-title { color: var(--playing-green); }
.track:not(.ym-playlist-card):not(.playlist-card).playing::before { background: var(--playing-green); }
[data-theme="light"] { --playing-green: #C02673; }
/* «Скачать» while the signed link is being prepared. */
.np-btn.busy { opacity: .5; pointer-events: none; }

/* Playback source next to «Сейчас играет» (YouTube / Яндекс / …). */
.np-source {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px 2px 6px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  color: var(--np-text-2);
  background: color-mix(in srgb, var(--np-text-2) 12%, transparent);
}
.np-source[hidden] { display: none; }
.np-source i { font-size: 13px; }
.np-source[data-source="youtube"] i { color: #ff4e45; }
.np-source[data-source="yandex"] i { color: #ffcc00; }
.np-source[data-source="soundcloud"] i { color: #ff7a1a; }
[data-theme="light"] .np-source[data-source="yandex"] i { color: #c99a00; }
.chip.busy { opacity: .5; pointer-events: none; }

/* Listening tools: sleep timer, recap and playlist curation. */
.sleep-timer-panel {
  position: fixed; z-index: 150; right: max(20px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom)); width: min(340px, calc(100vw - 32px));
  display: none; flex-direction: column; gap: 14px; padding: 18px;
  color: var(--text); background: var(--glass-surface); border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); box-shadow: 0 18px 60px rgba(0,0,0,.4);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.sleep-timer-panel.show { display: flex; }
#sleepTimerPanel[hidden] { display: none; }
.sleep-timer-heading, .profile-recap-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sleep-timer-heading .np-close { color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.sleep-timer-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sleep-timer-options .chip { min-height: 40px; }
.sleep-timer-options .sleep-timer-cancel { grid-column: 1 / -1; color: var(--error); }
.sleep-timer-status { min-height: 18px; color: var(--muted); font-size: var(--fs-sm); }
#npSleepTimer.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.profile-recap { display: grid; gap: 14px; margin: 22px 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
#profileRecap[hidden] { display: none; }
.profile-recap-head h2 { margin: 4px 0 0; font: 600 22px var(--font-display); }
.profile-recap-head select, .playlist-track-tools select, .playlist-track-tools input {
  min-height: 40px; padding: 8px 12px; color: var(--text); background: var(--surface-raised, var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-md); font: inherit;
}
.profile-recap-summary { font-size: 18px; font-weight: 600; }
.profile-recap-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); }
.profile-recap-label { margin-right: 4px; }
.recap-artist { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; color: var(--text); background: var(--surface-interactive); }
.recap-artist b { color: var(--accent); }
.playlist-track-tools { display: flex; gap: 10px; margin: 12px 0 18px; }
.playlist-track-tools input { flex: 1; min-width: 0; }
.playlist-track-tools select { flex: 0 0 auto; }
@media (max-width: 560px) {
  .sleep-timer-panel { right: 16px; bottom: max(90px, env(safe-area-inset-bottom)); }
  .profile-recap { padding: 16px; }
  .profile-recap-head h2 { font-size: 19px; }
  .playlist-track-tools { flex-direction: column; }
}

/* Strawberry Milk interaction details shared by every site section. */
:where(input, textarea, select, button, a):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-bright) 78%, white);
  outline-offset: 3px;
}
.btn-accent,
.play,
.np-btn.main {
  background: var(--accent-grad);
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line-strong));
  box-shadow: var(--btn-glow);
}
.btn-accent:hover,
.play:hover,
.np-btn.main:hover {
  background: linear-gradient(135deg, #f98fc4 0%, #f43f5e 54%, #fecdd3 100%);
  box-shadow: 0 6px 26px color-mix(in srgb, var(--accent) 28%, transparent);
}
.topnav .brand-name:hover { color: var(--accent-bright); }
.track, .playlist-card, .ym-playlist-card, .profile-card, .modal-card {
  border-color: color-mix(in srgb, var(--accent) 12%, var(--line));
}
.track:hover, .playlist-card:hover, .ym-playlist-card:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
  box-shadow: 0 12px 34px color-mix(in srgb, var(--accent) 8%, transparent);
}
.topnav-right .search-center input:focus,
.search-field:focus,
.playlist-track-tools input:focus,
.playlist-track-tools select:focus {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 17%, transparent), 0 0 22px color-mix(in srgb, var(--accent) 12%, transparent);
}

.monthly-hits { width: 100%; max-width: 920px; margin: 26px auto 0; min-width: 0; }
.monthly-hits-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.monthly-hits-head > div { min-width: 0; }
.monthly-hits-head p { margin-bottom: 0; }
.monthly-hits-more { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; min-height: 40px; }
.monthly-hits-more[hidden] { display: none; }
.monthly-hits-head h2 { margin: 0; font-size: 19px; }
.monthly-hits-head p, .monthly-hits-state { margin: 5px 0 12px; color: var(--muted); font-size: 13px; }
.monthly-hits-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.monthly-hit { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 8px; color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.monthly-hit:hover { border-color: var(--line-strong); background: var(--surface-interactive); }
.monthly-hit-cover { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 9px; object-fit: cover; background: var(--surface-interactive); }
.monthly-hit-placeholder { display: grid; place-items: center; color: var(--muted); }
.monthly-hit-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.monthly-hit-copy strong, .monthly-hit-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monthly-hit-copy strong { font-size: 13px; font-weight: 600; }
.monthly-hit-copy span { color: var(--muted); font-size: 12px; }
.monthly-hit-play { flex: 0 0 auto; color: var(--accent-bright); }
.monthly-hits-search { padding: 0; color: var(--accent-bright); border: 0; background: transparent; font: inherit; cursor: pointer; text-decoration: underline; }
.password-login { display: grid; gap: 10px; margin-top: 12px; }
.password-login[hidden] { display: none; }
.password-login label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.password-login input {
  width: 100%; min-height: 42px; padding: 10px 12px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font: inherit;
}
.password-login .btn-accent { min-height: 42px; }
.password-login-message { min-height: 0; color: var(--muted); font-size: 12px; }
.password-login-message:not(:empty) { min-height: 18px; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.track[draggable="true"] { cursor: grab; }
.track[draggable="true"]:active { cursor: grabbing; }
.track.queue-dragging { opacity: .48; transform: scale(.985); }
.queue-panel.drag-over { border-color: var(--accent-bright); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 34px color-mix(in srgb, var(--accent) 20%, transparent); }
.queue-panel.drag-over::after {
  content: 'Отпусти, чтобы добавить в очередь';
  position: sticky; bottom: 14px; display: block; margin: 12px;
  padding: 10px 12px; color: var(--text); text-align: center; font-size: 13px;
  border-radius: 12px; background: color-mix(in srgb, var(--accent) 22%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line)); pointer-events: none;
}
@media (max-width: 560px) {
  .monthly-hits { margin-top: 18px; }
  .monthly-hits-list { grid-template-columns: minmax(0, 1fr); }
  .monthly-hit { padding: 7px; }
}

/* Mobile layout polish: predictable navigation, touch sized controls and compact track rows. */
@media (max-width: 767px) {
  html { scroll-padding-top: 104px; }
  body { overflow-x: hidden; }
  .topnav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    grid-template-areas: "brand settings profile" "search search search";
    gap: 10px 8px;
    padding: calc(10px + var(--safe-top)) 14px 11px;
  }
  .topnav .brand { grid-area: brand; min-width: 0; gap: 9px; }
  .topnav .brand-logo { width: 32px; height: 32px; }
  .topnav .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
  .topnav-right { display: contents; }
  .topnav-right .search-center { grid-area: search; width: 100%; max-width: none; min-width: 0; }
  .topnav-right .search-center input { min-height: 42px; padding: 10px 14px; font-size: 14px; }
  .topnav-right #settingsBtn { grid-area: settings; width: 42px; height: 42px; }
  .topnav-right #profileBtn { grid-area: profile; width: 42px; height: 42px; }
  .shell { width: 100%; min-width: 0; padding: 14px 14px calc(126px + var(--safe-bottom)); }
  .section-head { align-items: flex-start; flex-wrap: wrap; gap: 9px; }
  .section-head > div:first-child { min-width: 0; }
  .playlist-toolbar { width: 100%; gap: 7px; }
  .playlist-toolbar .chip { flex: 1 1 auto; justify-content: center; }
  .search-hero { padding: 12px 0 16px; }
  .big-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; }
  .big-search input { grid-column: 1 / -1; min-height: 50px; padding: 14px 16px 14px 48px; }
  .big-search .search-ico { left: 17px; top: 25px; }
  .big-search-btn { grid-column: 1; width: 100%; min-height: 48px; padding: 12px 16px; }
  .search-service { grid-column: 2; }
  .search-service-btn { min-height: 48px; padding: 10px 13px; }
  .genre-chips, .filter-chips { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
  .genre-chips::-webkit-scrollbar, .filter-chips::-webkit-scrollbar { display: none; }
  .monthly-hits { max-width: none; }
  .monthly-hits-head { align-items: flex-start; }
  .monthly-hits-more { min-height: 40px; padding-inline: 13px; }
  .monthly-hits-list { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .monthly-hit { min-height: 60px; padding: 8px 10px; }
  .monthly-hit-cover { width: 44px; height: 44px; flex-basis: 44px; }
  .daily-mix { align-items: center; }
  .daily-mix-copy { flex: 1; }
  .ym-playlist-header { gap: 14px; padding: 16px; border-radius: 22px; }
  .ym-playlist-actions { width: 100%; }
  .ym-playlist-actions > button { min-height: 44px; }
  .ym-artist-header { flex-direction: row; align-items: center; text-align: left; }
  .ym-artist-header .ym-playlist-cover { width: clamp(88px, 27vw, 112px); height: clamp(88px, 27vw, 112px); }
  .ym-artist-header .ym-playlist-info { align-items: flex-start; }
  .ym-artist-header .ym-playlist-info h2 { font-size: clamp(21px, 6vw, 26px); }
  .ym-artist-header .ym-playlist-meta { margin-bottom: 8px; }
  .ym-artist-section { margin-top: 20px; }
  .ym-artist-latest-list { grid-template-columns: minmax(0, 1fr); }
  .ym-artist-albums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-head { align-items: flex-start; flex-wrap: wrap; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-panel { left: 8px; right: 8px; bottom: calc(82px + var(--safe-bottom)); width: auto; max-height: min(72dvh, 620px); transform: translateY(24px); }
  .queue-panel.show { transform: translateY(0); }
  .modal, .dialog { width: min(100% - 20px, 520px); max-height: calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom)); overflow-y: auto; }
}

@media (max-width: 560px) {
  .track-grid { display: flex; flex-direction: column; gap: 8px; }
  .track:not(.ym-playlist-card):not(.playlist-card) {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: center;
    gap: 2px 10px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
  }
  .track:not(.ym-playlist-card):not(.playlist-card) > .cover { grid-column: 1; grid-row: 1 / 3; width: 54px; height: 54px; border-radius: 11px; }
  .track:not(.ym-playlist-card):not(.playlist-card) > .track-title { grid-column: 2; grid-row: 1; align-self: end; min-width: 0; }
  .track:not(.ym-playlist-card):not(.playlist-card) > .track-artist { grid-column: 2; grid-row: 2; align-self: start; min-width: 0; }
  .track:not(.ym-playlist-card):not(.playlist-card) > .track-meta:not(.accent) { grid-column: 1 / -1; grid-row: 3; }
  .track:not(.ym-playlist-card):not(.playlist-card) > .track-meta.accent,
  .track:not(.ym-playlist-card):not(.playlist-card) > .availability { grid-column: 1 / -1; }
  .track:not(.ym-playlist-card):not(.playlist-card) > .track-actions { grid-column: 1 / -1; grid-row: 4; justify-content: flex-end; gap: 2px; margin-top: 2px; }
  .track .track-actions .icon-btn { min-width: 42px; min-height: 42px; }
  .track:not(.ym-playlist-card):not(.playlist-card) > .playlist-drag { grid-column: 1 / -1; grid-row: 5; }
  .monthly-hits-head { gap: 8px; }
  .monthly-hits-head h2 { font-size: 18px; }
  .monthly-hits-head p { font-size: 12px; }
  .monthly-hits-more { min-width: 72px; }
  .ym-artist-header { flex-direction: column; align-items: center; text-align: center; }
  .ym-artist-header .ym-playlist-info { align-items: center; }
  .ym-artist-header .ym-playlist-actions { justify-content: center; }
}

@media (max-width: 360px) {
  .shell { padding-inline: 10px; }
  .topnav { padding-inline: 10px; }
  .topnav .brand-name { font-size: 16px; }
  .monthly-hit { gap: 8px; }
  .monthly-hit-copy strong { font-size: 12px; }
  .search-service-btn { gap: 5px; padding-inline: 10px; font-size: 12px; }
}

@media (max-width: 700px) {
  .settings-row-opus { flex-direction: column; align-items: stretch; gap: 10px; }
  .settings-row-opus .settings-select { width: 100%; max-width: none; min-width: 0; }
}
