/* =========================================================
   Sona — native JS music streaming UI
   ========================================================= */

:root {
  --bg: #08080a;
  --bg-soft: #0d0d10;
  --panel: #111114;
  --panel-2: #17171b;
  --panel-3: #202026;
  --text: #f5f5f2;
  --text-2: #b7b7bf;
  --muted: #8a8a94;
  --subtle: #5e5e68;
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #b8f45c;
  --accent-strong: #c9ff78;
  --accent-ink: #0a0c07;
  --danger: #ff6880;
  --pink: #ff6b8b;
  --blue: #78a8ff;
  --purple: #b18cff;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --sidebar-w: 262px;
  --player-h: 90px;
  --topbar-h: 72px;
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { color-scheme: dark; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow: hidden;
  background:
    radial-gradient(1000px 600px at 20% -10%, rgba(184, 244, 92, 0.055), transparent 60%),
    var(--bg);
}

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

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
.hidden { display: none !important; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.26); background-clip: content-box; }

.icon { display: block; flex: 0 0 auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(184, 244, 92, 0.4);
  animation: pulse-dot 2.2s infinite;
}

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn--primary:disabled { opacity: 0.38; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
}
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.06); }
.btn--danger { background: rgba(255, 104, 128, 0.12); color: var(--danger); border: 1px solid rgba(255, 104, 128, 0.25); }
.btn--danger:hover { background: rgba(255, 104, 128, 0.2); }
.btn--wide { width: 100%; height: 46px; }
.btn--sm { height: 32px; padding: 0 13px; font-size: 12px; }
.btn--topbar {
  height: 38px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-2);
  font-size: 12.5px;
}
.btn--topbar:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); border-color: var(--border-strong); }
.btn__label { display: inline; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-2);
  transition: color 0.18s, background 0.18s, transform 0.18s;
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn--sm { width: 28px; height: 28px; color: var(--muted); }
.icon-btn[disabled] { opacity: 0.35; pointer-events: none; }

/* ============ Brand ============ */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  user-select: none;
  width: fit-content;
}
.brand__badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 24px rgba(184, 244, 92, 0.17);
  flex: 0 0 auto;
}
.brand__badge--lg { width: 44px; height: 44px; border-radius: 13px; }
.brand__bars { display: flex; align-items: center; justify-content: center; gap: 2.5px; height: 17px; }
.brand__bars i {
  display: block;
  width: 2.5px;
  border-radius: 4px;
  background: currentColor;
  animation: brand-wave 2.1s ease-in-out infinite;
}
.brand__bars i:nth-child(1) { height: 8px; animation-delay: -0.2s; }
.brand__bars i:nth-child(2) { height: 15px; animation-delay: -0.7s; }
.brand__bars i:nth-child(3) { height: 11px; animation-delay: -1.1s; }
.brand__bars i:nth-child(4) { height: 17px; animation-delay: -0.4s; }
.brand__badge--lg .brand__bars { gap: 3.5px; height: 22px; }
.brand__badge--lg .brand__bars i { width: 3px; }
.brand__word {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}
.avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-color, #b8f45c);
  color: #10100c;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
  overflow: hidden;
}
.avatar--sm { width: 28px; height: 28px; font-size: 10px; }
.avatar--md { width: 34px; height: 34px; }
.avatar--lg { width: 42px; height: 42px; font-size: 14px; }

/* ============ Boot screen ============ */

.boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__logo { display: flex; align-items: center; gap: 13px; animation: fade-up 0.6s var(--ease); }
.boot__name { font-size: 30px; font-weight: 800; letter-spacing: -0.06em; }
.boot__loader { width: 116px; height: 2px; background: rgba(255, 255, 255, 0.1); border-radius: 2px; overflow: hidden; }
.boot__loader span { display: block; width: 45%; height: 100%; background: var(--accent); border-radius: 2px; animation: loader 1.1s infinite var(--ease); }

/* ============ Auth ============ */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(430px, 0.85fr);
  height: 100dvh;
  min-height: 0;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.auth__art {
  position: relative;
  min-height: 100dvh;
  padding: 38px clamp(34px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(900px 650px at 10% 10%, rgba(184, 244, 92, 0.1), transparent 55%),
    radial-gradient(800px 600px at 68% 55%, rgba(98, 60, 160, 0.22), transparent 60%),
    linear-gradient(145deg, #0a0b09 0%, #0c0c11 55%, #09090c 100%);
  isolation: isolate;
}
.auth__noise {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.auth__art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 9, 8, 0.7) 0%, rgba(8, 9, 8, 0.34) 38%, transparent 63%);
}
.auth__brand { position: relative; z-index: 3; display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 800; letter-spacing: -0.055em; }
.auth__copy { position: relative; z-index: 2; max-width: 660px; margin-top: clamp(70px, 12vh, 160px); }
.auth__copy .eyebrow { margin-bottom: 22px; }
.auth__copy h1 {
  font-size: clamp(48px, 6.4vw, 102px);
  line-height: 0.91;
  letter-spacing: -0.065em;
  font-weight: 800;
  max-width: 780px;
}
.auth__copy h1 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.05em;
}
.auth__copy p {
  max-width: 470px;
  margin-top: 28px;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.65;
  text-shadow: 0 2px 18px rgba(5, 6, 5, 0.95), 0 0 5px rgba(5, 6, 5, 0.85);
}
.auth__cover { filter: brightness(0.82) saturate(0.95); }
.auth__cover--3 { filter: brightness(0.68) saturate(0.9); }
.auth__stats { display: flex; gap: 42px; margin-top: 44px; }
.auth__stats div { display: flex; flex-direction: column; gap: 5px; }
.auth__stats strong { font-size: 24px; letter-spacing: -0.04em; }
.auth__stats span { color: var(--muted); font-size: 11.5px; letter-spacing: 0.02em; }
.auth__footer { margin-top: auto; padding-top: 40px; color: var(--subtle); font-size: 11.5px; letter-spacing: 0.04em; position: relative; z-index: 2; }
.auth__stack {
  position: absolute;
  right: clamp(20px, 4vw, 70px);
  bottom: clamp(90px, 13vh, 150px);
  width: min(41vw, 480px);
  height: 360px;
  z-index: 1;
  pointer-events: none;
}
.auth__cover {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.13);
  animation: float 9s ease-in-out infinite;
}
.auth__cover--1 { right: 46%; top: 8px; transform: rotate(-10deg); z-index: 3; }
.auth__cover--2 { right: 4%; top: 64px; transform: rotate(7deg); z-index: 2; animation-delay: -2.5s; }
.auth__cover--3 { right: 26%; top: 165px; transform: rotate(-2deg); z-index: 1; animation-delay: -4.5s; filter: brightness(0.8); }
.auth__waveform {
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 6%;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0.5;
  mask-image: linear-gradient(90deg, transparent, black 15%, black 80%, transparent);
}
.auth__waveform i { display: block; flex: 1; height: 10%; background: var(--accent); border-radius: 4px; animation: waveform 2.4s ease-in-out infinite; }
.auth__waveform i:nth-child(3n) { animation-duration: 3.1s; animation-delay: -0.7s; }
.auth__waveform i:nth-child(4n) { animation-duration: 1.8s; animation-delay: -1.2s; }
.auth__waveform i:nth-child(5n) { animation-duration: 2.7s; animation-delay: -0.2s; }

.auth__panel {
  display: flex;
  align-items: center;
  align-items: safe center;
  justify-content: center;
  min-height: 100dvh;
  padding: 36px clamp(24px, 4.4vw, 64px);
  background:
    radial-gradient(600px 400px at 100% 100%, rgba(184, 244, 92, 0.04), transparent 60%),
    #0b0b0e;
  border-left: 1px solid var(--border);
}
.auth__card { width: 100%; max-width: 408px; animation: fade-up 0.7s var(--ease) both; }
.auth__mobile-brand { display: none; align-items: center; gap: 11px; font-size: 22px; font-weight: 800; letter-spacing: -0.05em; margin-bottom: 34px; }
.auth__card > .eyebrow { color: var(--accent); font-size: 10px; }
.auth__card h2 { font-size: 31px; line-height: 1.1; letter-spacing: -0.045em; margin-top: 12px; }
.auth__subtitle { color: var(--muted); font-size: 13.5px; margin-top: 9px; line-height: 1.5; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-top: 26px;
  background: #111115;
  border: 1px solid var(--border);
  border-radius: 11px;
}
.auth-tab {
  height: 36px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
}
.auth-tab:hover { color: var(--text-2); }
.auth-tab.is-active { color: var(--text); background: #202026; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.auth-form { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 11px; font-weight: 650; letter-spacing: 0.02em; color: var(--text-2); }
.field input,
.field textarea,
.field select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  background: #111115;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 13.5px;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  outline: none;
}
.field textarea { height: auto; min-height: 88px; resize: vertical; padding: 12px 14px; line-height: 1.5; }
.field--short { max-width: 150px; }
.field input::placeholder, .field textarea::placeholder { color: var(--subtle); }
.field input:hover, .field textarea:hover { border-color: var(--border-strong); }
.field input:focus, .field textarea:focus { border-color: rgba(184, 244, 92, 0.55); background: #131317; box-shadow: 0 0 0 3px rgba(184, 244, 92, 0.08); }
.form-error {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 104, 128, 0.22);
  background: rgba(255, 104, 128, 0.08);
  color: #ff9cad;
  font-size: 12px;
  line-height: 1.4;
}
.auth__divider { display: flex; align-items: center; gap: 13px; margin: 23px 0 15px; color: var(--subtle); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.auth__divider::before, .auth__divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(184, 244, 92, 0.14); }
.auth__hint { text-align: center; margin-top: 13px; font-size: 10.5px; color: var(--subtle); }
.auth__hint code { color: var(--text-2); background: #17171b; border: 1px solid var(--border); padding: 1px 4px; border-radius: 4px; font-size: 10px; }
.auth__terms { text-align: center; margin-top: 38px; color: #4d4d55; font-size: 10px; line-height: 1.5; }
.auth-submit.is-loading span:first-child { opacity: 0.45; }
.auth-submit.is-loading::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(10, 12, 7, 0.3);
  border-top-color: var(--accent-ink);
  animation: spin 0.7s linear infinite;
}

/* ============ App shell ============ */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 8px;
  height: 100dvh;
  padding: 8px 8px 0;
}
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100dvh - var(--player-h) - 8px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(400px 300px at -20% 0%, rgba(184, 244, 92, 0.045), transparent 70%),
    linear-gradient(180deg, #101013, #0b0b0e);
  border: 1px solid var(--border);
  padding: 22px 14px 14px;
  position: relative;
  z-index: 40;
}
.brand { padding: 0 8px; margin-bottom: 28px; }
.main-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 43px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.18s, background 0.18s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-link.is-active { color: var(--text); background: #1b1b20; }
.nav-link.is-active .nav-link__icon { color: var(--accent); }
.nav-link__icon { display: inline-flex; color: var(--muted); transition: color 0.18s; }
.nav-link:hover .nav-link__icon { color: var(--text); }
.nav-link.is-active:hover .nav-link__icon { color: var(--accent); }

.library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 8px 10px 12px;
}
.library-head__title { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.library-head__icon { display: inline-flex; color: var(--subtle); }
.sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 10px; }
.sidebar-scroll::-webkit-scrollbar { width: 6px; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 54px;
  padding: 7px 9px;
  border-radius: 9px;
  text-align: left;
  color: var(--text-2);
  transition: background 0.18s;
}
.sidebar-item:hover { background: rgba(255, 255, 255, 0.045); }
.sidebar-item.is-active { background: rgba(255, 255, 255, 0.065); }
.sidebar-item__cover {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 7px;
  overflow: hidden;
  flex: 0 0 auto;
}
.sidebar-item__cover img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-item__cover--liked { background: linear-gradient(135deg, #c4a4ff, #7055d8 55%, #35308a); color: #fff; }
.sidebar-item__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sidebar-item__text strong { color: var(--text); font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-item__text small { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-playlists { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; }
.sidebar-empty { color: var(--subtle); font-size: 11.5px; line-height: 1.45; padding: 12px 10px; }
.sidebar-skeleton { height: 48px; margin: 3px 2px; border-radius: 8px; background: linear-gradient(90deg, #141418, #1b1b20, #141418); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.sidebar-upload {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin-top: 14px;
  padding: 10px 9px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  text-align: left;
  transition: color 0.18s;
}
.sidebar-upload:hover { color: var(--text); }
.sidebar-upload__plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 7px; border: 1px dashed rgba(184, 244, 92, 0.3); color: var(--accent); background: rgba(184, 244, 92, 0.04); flex: 0 0 auto; }
.sidebar-upload span:last-child { display: flex; flex-direction: column; gap: 2px; }
.sidebar-upload strong { font-size: 12.5px; font-weight: 600; }
.sidebar-upload small { color: var(--muted); font-size: 10px; }
.sidebar-import {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 4px 9px 10px;
  color: var(--text-2);
  text-align: left;
  transition: color 0.18s;
}
.sidebar-import:hover { color: var(--text); }
.sidebar-import__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 7px;
  border: 1px solid var(--border);
  color: var(--blue);
  background: rgba(120, 168, 255, 0.04);
  flex: 0 0 auto;
}
.sidebar-import span:last-child { display: flex; flex-direction: column; gap: 2px; }
.sidebar-import strong { font-size: 12.5px; font-weight: 600; }
.sidebar-import small { color: var(--muted); font-size: 10px; }
.sidebar__bottom { border-top: 1px solid var(--border); padding: 13px 10px 2px; display: flex; flex-direction: column; gap: 9px; }
.sidebar__catalog { display: flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 10px; letter-spacing: 0.025em; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(184, 244, 92, 0.65); }
.sidebar__source { display: inline-flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 10.5px; transition: color 0.18s; width: fit-content; }
.sidebar__source:hover { color: var(--text-2); }
.sidebar-backdrop { display: none; }

.main-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: calc(100dvh - var(--player-h) - 8px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(900px 500px at 70% -20%, rgba(184, 244, 92, 0.032), transparent 65%),
    var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
}
.topbar {
  flex: 0 0 var(--topbar-h);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(18px, 2.4vw, 30px);
  position: relative;
  z-index: 30;
  background: linear-gradient(180deg, rgba(13, 13, 16, 0.95), rgba(13, 13, 16, 0.7));
  backdrop-filter: blur(18px);
}
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.history-buttons { display: flex; gap: 2px; }
.topbar__menu { display: none; }
.global-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: clamp(220px, 27vw, 380px);
  height: 40px;
  margin-left: 4px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.2s, background 0.2s, width 0.25s var(--ease);
}
.global-search:focus-within { border-color: rgba(184, 244, 92, 0.4); background: rgba(255, 255, 255, 0.06); }
.global-search__icon { color: var(--muted); display: inline-flex; }
.global-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 12.5px;
  color: var(--text);
}
.global-search input::placeholder { color: var(--subtle); }
.global-search input::-webkit-search-cancel-button { display: none; }
.global-search__kbd {
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--subtle);
  font-size: 9px;
  font-family: var(--font);
  white-space: nowrap;
}
.global-search__clear { display: inline-flex; color: var(--muted); }
.global-search__clear:hover { color: var(--text); }
.profile-btn { display: inline-flex; border-radius: 50%; padding: 2px; border: 1px solid transparent; transition: border-color 0.2s, transform 0.2s; }
.profile-btn:hover { border-color: var(--border-strong); transform: scale(1.03); }

.view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 clamp(18px, 2.7vw, 38px) 54px;
  scroll-behavior: smooth;
  outline: none;
  position: relative;
}
.view-loading { padding-top: 34px; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, #151519, #1d1d22, #151519); background-size: 200% 100%; animation: shimmer 1.5s infinite linear; }
.skeleton--title { width: 36%; height: 48px; margin-bottom: 32px; }
.skeleton--grid { width: 100%; height: 240px; }

/* ============ Generic typography / sections ============ */

.page { animation: view-in 0.45s var(--ease) both; padding-top: 20px; }
.section { margin-top: clamp(26px, 4vw, 40px); }
.section:first-of-type { margin-top: 26px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head__copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.section-head h2 { font-size: clamp(19px, 2.1vw, 24px); letter-spacing: -0.035em; line-height: 1.1; }
.section-head p { font-size: 11.5px; color: var(--muted); }
.section-link { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; padding: 6px 0; transition: color 0.18s; }
.section-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 64px 24px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.012);
}
.empty > .icon { width: 38px; height: 38px; color: var(--subtle); margin-bottom: 4px; }
.empty h3 { color: var(--text); font-size: 17px; letter-spacing: -0.02em; }
.empty p { font-size: 12.5px; max-width: 380px; line-height: 1.55; }
.empty small { color: var(--subtle); font-size: 11px; }
.empty .btn { margin-top: 12px; }
.empty--small { border: 0; background: none; padding: 42px 18px; gap: 7px; }
.empty--small p { color: var(--text-2); font-size: 12.5px; }

/* ============ Home ============ */

.home-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(10px, 2vw, 24px) 0 26px;
}
.home-hero h1 {
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 800;
  margin-top: 10px;
}
.home-hero p { color: var(--muted); font-size: 13px; margin-top: 12px; max-width: 440px; line-height: 1.55; }
.home-hero__aside { display: flex; align-items: center; gap: 18px; padding-bottom: 5px; }
.hero-stat { display: flex; flex-direction: column; gap: 3px; padding-left: 18px; border-left: 1px solid var(--border); }
.hero-stat strong { font-size: 17px; letter-spacing: -0.03em; }
.hero-stat span { color: var(--subtle); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.home-hero__visual {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  opacity: 0.65;
}
.home-hero__visual i { display: block; width: 3px; border-radius: 4px; background: var(--accent); animation: waveform 2.2s ease-in-out infinite; }
.home-hero__visual i:nth-child(1) { height: 20%; animation-delay: -0.2s; }
.home-hero__visual i:nth-child(2) { height: 55%; animation-delay: -0.9s; }
.home-hero__visual i:nth-child(3) { height: 100%; animation-delay: -0.5s; }
.home-hero__visual i:nth-child(4) { height: 42%; animation-delay: -1.3s; }
.home-hero__visual i:nth-child(5) { height: 74%; animation-delay: -0.7s; }
.home-hero__visual i:nth-child(6) { height: 30%; animation-delay: -1.6s; }
.home-hero__visual i:nth-child(7) { height: 60%; animation-delay: -0.3s; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.quick-tile {
  display: flex;
  align-items: center;
  gap: 13px;
  height: 66px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  overflow: hidden;
  text-align: left;
  color: var(--text);
  transition: background 0.2s, transform 0.2s var(--ease);
  position: relative;
  padding-right: 54px;
  min-width: 0;
}
.quick-tile:hover { background: rgba(255, 255, 255, 0.13); }
.quick-tile:active { transform: scale(0.995); }
.quick-tile .cover { width: 66px; height: 66px; border-radius: 0; flex: 0 0 auto; }
.quick-tile__name { flex: 1 1 auto; min-width: 0; font-size: 12.5px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.quick-tile__play {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%) scale(0.88);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s var(--ease);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.quick-tile:hover .quick-tile__play, .quick-tile:focus-visible .quick-tile__play { opacity: 1; transform: translateY(-50%) scale(1); }
.quick-tile__play:hover { background: var(--accent-strong); transform: translateY(-50%) scale(1.05) !important; }

.card-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(152px, 17vw, 188px);
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 -8px;
  padding: 2px 8px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.card-row > * { scroll-snap-align: start; }
.media-card {
  position: relative;
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  transition: background 0.22s;
  cursor: pointer;
}
.media-card:hover { background: rgba(255, 255, 255, 0.055); }
.media-card__art { position: relative; margin-bottom: 11px; }
.media-card__art .cover { width: 100%; aspect-ratio: 1; height: auto; }
.media-card--round .cover { border-radius: 50%; }
.media-card__title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-card__sub {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-play {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), background 0.18s;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.media-card:hover .card-play, .media-card:focus-within .card-play { opacity: 1; transform: translateY(0); }
.card-play:hover { background: var(--accent-strong); transform: scale(1.06) !important; }
.card-play.is-current { opacity: 1; transform: translateY(0); }
.card-like {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: var(--text);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.2s, transform 0.2s var(--ease), background 0.18s, color 0.18s;
}
.media-card:hover .card-like, .media-card:focus-within .card-like { opacity: 1; transform: none; }
.card-like.is-liked { opacity: 1; transform: none; color: var(--accent); }
.card-like:hover { background: rgba(0, 0, 0, 0.75); color: var(--accent); }
.entity-like.is-liked { color: var(--accent); }
.media-card__badge {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(8, 8, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  color: var(--text-2);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============ Cover ============ */

.cover {
  --cover-color: #26262d;
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  background:
    radial-gradient(circle at 26% 20%, rgba(255, 255, 255, 0.22), transparent 48%),
    linear-gradient(145deg, var(--cover-color), #121216 92%);
  isolation: isolate;
  flex: 0 0 auto;
}
.cover img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.cover img.is-broken { display: none; }
.quick-liked-cover {
  width: 66px;
  height: 66px;
  border-radius: 0;
  background: linear-gradient(145deg, #d7c4ff, #8264e8 55%, #3c3296);
  display: grid;
  place-items: center;
  color: #fff;
}
.quick-liked-cover__icon { display: grid; place-items: center; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25)); }
.cover__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(20px, 30%, 64px);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.48);
  text-transform: uppercase;
}
.cover--sm { width: 38px; height: 38px; border-radius: 5px; }
.cover--md { width: 48px; height: 48px; }
.cover--lg { width: 64px; height: 64px; }
.cover--round { border-radius: 50%; }

/* ============ Track list ============ */

.track-list { width: 100%; }
.track-head {
  display: grid;
  grid-template-columns: 34px minmax(190px, 2.5fr) minmax(90px, 1.6fr) minmax(90px, 1.2fr) 34px 50px 34px;
  align-items: center;
  gap: 12px;
  padding: 0 12px 10px;
  color: var(--subtle);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
  margin-bottom: 7px;
}
.track-head__duration { display: flex; justify-content: flex-end; }
.track-head__index { padding-left: 8px; }
.track-rows { display: flex; flex-direction: column; gap: 1px; }
.track-row {
  display: grid;
  grid-template-columns: 34px minmax(190px, 2.5fr) minmax(90px, 1.6fr) minmax(90px, 1.2fr) 34px 50px 34px;
  align-items: center;
  gap: 12px;
  min-height: 57px;
  padding: 6px 12px;
  border-radius: 7px;
  transition: background 0.16s;
  position: relative;
}
.track-row:hover { background: rgba(255, 255, 255, 0.06); }
.track-row.is-current { background: rgba(184, 244, 92, 0.045); }
.track-row.is-current:hover { background: rgba(184, 244, 92, 0.075); }
.track-index {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  height: 34px;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.track-play {
  position: absolute;
  inset: 0;
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.track-row:hover .track-play { display: flex; }
.track-row:hover .track-index__num { visibility: hidden; }
.equalizer { display: none; align-items: flex-end; gap: 2px; height: 14px; width: 17px; margin-left: auto; }
.track-row.is-current .equalizer { display: flex; }
.track-row.is-current .track-index__num { display: none; }
.track-row.is-current:hover .equalizer { display: none; }
.equalizer i { display: block; width: 2.5px; border-radius: 3px; background: var(--accent); animation: equalize 0.9s ease-in-out infinite alternate; }
.equalizer i:nth-child(1) { height: 45%; animation-delay: -0.35s; }
.equalizer i:nth-child(2) { height: 100%; animation-delay: -0.7s; }
.equalizer i:nth-child(3) { height: 65%; animation-delay: -0.1s; }
body.audio-paused .equalizer i { animation-play-state: paused; opacity: 0.5; }
.track-main { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.track-main .cover { width: 40px; height: 40px; border-radius: 5px; }
.track-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.track-name {
  color: var(--text);
  font-size: 12.8px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-row.is-current .track-name { color: var(--accent); }
.track-artist-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.track-artist { color: var(--muted); font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: fit-content; max-width: 100%; }
a.track-artist:hover, a.track-album:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.track-index__num { display: flex; align-items: center; justify-content: flex-end; }
.track-row.is-placeholder .track-index__num { color: var(--muted); }
.source-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.5;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}
.source-chip--youtube { color: #ff8b93; border-color: rgba(255, 80, 90, 0.24); background: rgba(255, 80, 90, 0.07); }
.source-chip--spotify { color: #79e6a5; border-color: rgba(30, 215, 96, 0.24); background: rgba(30, 215, 96, 0.07); }
.source-chip--yandex { color: #ffd86f; border-color: rgba(255, 204, 0, 0.22); background: rgba(255, 204, 0, 0.06); }
.source-chip--jamendo { color: #8be0ff; border-color: rgba(90, 190, 230, 0.22); background: rgba(90, 190, 230, 0.06); }
.source-chip--archive { color: #c7bfff; border-color: rgba(170, 160, 255, 0.22); background: rgba(170, 160, 255, 0.06); }
.source-chip--fma { color: #ffb69a; border-color: rgba(255, 160, 120, 0.22); background: rgba(255, 160, 120, 0.06); }
.source-chip--local { color: #b8f45c; border-color: rgba(184, 244, 92, 0.2); background: rgba(184, 244, 92, 0.06); }
.source-chip--manual { color: var(--text-2); }
.track-row.is-placeholder .track-play { color: var(--text-2); }
.track-play--fetch:hover { color: #ffb3b8; }
.track-album { color: var(--muted); font-size: 11.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-date { color: var(--subtle); font-size: 10.5px; white-space: nowrap; }
.track-like, .track-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--subtle);
  transition: color 0.16s, background 0.16s, opacity 0.16s;
}
.track-like:hover, .track-more:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.track-like.is-liked { color: var(--accent); }
.track-like.is-liked:hover { color: var(--accent-strong); }
.track-more { opacity: 0; }
.track-row:hover .track-more, .track-more:focus-visible { opacity: 1; }
.track-like { opacity: 0; }
.track-row:hover .track-like, .track-like.is-liked, .track-like:focus-visible { opacity: 1; }
.track-duration { display: flex; justify-content: flex-end; align-items: center; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.track-duration--download { justify-content: flex-end; justify-self: end; width: max-content; max-width: 100%; min-width: 0; }
.track-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 80, 90, 0.28);
  background: rgba(255, 80, 90, 0.1);
  color: #ff9aa1;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.track-download:hover { background: rgba(255, 80, 90, 0.18); border-color: rgba(255, 80, 90, 0.42); color: #ffb3b8; }
.track-download:disabled { opacity: 0.55; cursor: wait; }
.track-download .icon { flex: 0 0 auto; }
.track-table--compact .track-duration--download { justify-content: flex-end; }
.track-row.is-downloading { background: rgba(255, 80, 90, 0.04); }
.track-row.is-download-failed { background: rgba(255, 60, 60, 0.07); }
.track-row.is-downloading .track-download,
.track-row.is-downloading .track-more { pointer-events: none; opacity: 0.35; }
.track-download-progress {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  min-width: 96px;
  max-width: min(240px, 28vw);
}
.track-download-progress__track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 120, 130, 0.12);
}
.track-download-progress__bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b78, #ff9aa1);
  transition: width 0.35s ease;
}
.track-download-progress.is-indeterminate .track-download-progress__bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 38%;
  animation: track-download-slide 1.15s ease-in-out infinite;
}
@keyframes track-download-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}
.track-download-progress.is-running .track-download-progress__bar,
.track-download-progress.is-uploading .track-download-progress__bar {
  background: linear-gradient(90deg, #ff5060, #ffb0b8);
}
.track-download-progress__label {
  color: #ff9aa1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.track-download-progress.is-failed .track-download-progress__bar {
  width: 100% !important;
  animation: none;
  background: #e04855;
}
.track-download-progress.is-failed .track-download-progress__label { color: #ff8a92; }
.track-download-progress.is-running .track-download-progress__label,
.track-download-progress.is-queued .track-download-progress__label { color: #ffb3b8; }
@media (max-width: 1180px) {
  .track-download__label { display: none; }
  .track-download { padding: 5px 8px; }
  .track-download-progress { min-width: 80px; max-width: min(180px, 34vw); }
}
.track-table--compact .track-head,
.track-table--compact .track-row {
  grid-template-columns: 34px minmax(190px, 3fr) 34px max-content 34px;
}
.track-table--compact .track-duration { justify-self: end; width: max-content; max-width: 100%; }
.track-table--compact .track-album,
.track-table--compact .track-head__album { display: none; }
.track-table--compact .track-date { display: none; }
.track-table--narrow .track-head,
.track-table--narrow .track-row {
  grid-template-columns: 34px minmax(180px, 1fr) 34px 48px 34px;
}
.track-table--compact .track-head__album,
.track-table--compact .track-head__date,
.track-table--narrow .track-head__album,
.track-table--narrow .track-head__date { display: none; }

.track-list.track-table--reorder .track-head,
.track-list.track-table--reorder .track-row {
  grid-template-columns: 18px 34px minmax(190px, 3fr) 34px 50px 34px;
}
.track-grip {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  color: transparent;
  cursor: grab;
  transition: color 0.16s;
}
.track-row:hover .track-grip { color: var(--subtle); }
.track-grip:active { cursor: grabbing; }
.track-row.is-reorderable { transition: background 0.16s, opacity 0.16s, box-shadow 0.16s; }
.track-row.is-dragging { opacity: 0.35; }
.track-row.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.track-row.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.track-row.drop-before.is-current, .track-row.drop-after.is-current { background: rgba(184, 244, 92, 0.075); }
.track-table--narrow .track-album,
.track-table--narrow .track-date,
.track-table--narrow .track-head__album,
.track-table--narrow .track-head__date { display: none; }

/* ============ Entity headers (album / playlist / artist / liked) ============ */

.entity-wrap {
  margin: 0 calc(clamp(18px, 2.7vw, 38px) * -1);
  padding: 0 clamp(18px, 2.7vw, 38px);
  position: relative;
}
.entity-wrap::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 440px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--hero-color, #63636c) 34%, transparent) 0%, rgba(13, 13, 16, 0) 100%),
    radial-gradient(70% 90% at 15% 0%, color-mix(in srgb, var(--hero-color, #63636c) 24%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.entity-head, .entity-actions, .entity-body { position: relative; z-index: 1; }
.entity-head {
  display: flex;
  align-items: flex-end;
  gap: clamp(20px, 3vw, 34px);
  padding: clamp(34px, 5vw, 58px) 0 24px;
}
.entity-art { width: clamp(168px, 21vw, 228px); flex: 0 0 auto; }
.entity-art .cover { width: 100%; aspect-ratio: 1; height: auto; border-radius: 8px; box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.1); }
.entity-art--round .cover { border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16); }
.entity-art--liked .cover { background: linear-gradient(145deg, #d7c4ff 0%, #8264e8 45%, #3c3296 100%); }
.entity-art--liked .cover__fallback { color: rgba(255, 255, 255, 0.9); }
.entity-info { min-width: 0; padding-bottom: 2px; }
.entity-type { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); margin-bottom: 10px; }
.entity-title {
  font-size: clamp(32px, 5.2vw, 70px);
  line-height: 0.93;
  letter-spacing: -0.065em;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.entity-title--sm { font-size: clamp(28px, 4vw, 52px); }
.entity-description { color: var(--text-2); font-size: 12.5px; line-height: 1.55; margin-top: 14px; max-width: 660px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 15px; color: var(--text-2); font-size: 11.5px; }
.entity-meta a { font-weight: 650; color: var(--text); }
.entity-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.entity-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--subtle); }
.entity-meta .muted { color: var(--muted); }
.entity-owner { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.entity-actions { display: flex; align-items: center; gap: 14px; padding: 8px 0 12px; }
.play-cta {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.play-cta:hover { transform: scale(1.06); background: var(--accent-strong); }
.play-cta:active { transform: scale(0.98); }
.entity-actions .icon-btn { color: var(--text-2); }
.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.action-pill:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.04); }
.entity-body { padding-top: 8px; }
.entity-footnote { margin-top: 32px; color: var(--subtle); font-size: 10.5px; line-height: 1.6; display: flex; align-items: center; gap: 7px; }
.entity-footnote .icon { color: var(--subtle); }

/* ============ Search ============ */

.search-page .page-head { padding: 20px 0 24px; }
.search-page .page-head h1 { font-size: clamp(31px, 4vw, 48px); letter-spacing: -0.055em; line-height: 1; }
.search-page .page-head p { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.genre-card {
  position: relative;
  height: clamp(105px, 12vw, 150px);
  padding: 16px;
  border-radius: 11px;
  text-align: left;
  overflow: hidden;
  color: #fff;
  background: var(--genre-color, #42424c);
  transition: transform 0.22s var(--ease), filter 0.2s;
  isolation: isolate;
}
.genre-card::before {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -28px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.24);
  filter: blur(1px);
  z-index: -1;
}
.genre-card::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 58px;
  height: 58px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.22);
  transform: rotate(24deg);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  z-index: -1;
}
.genre-card:hover { transform: translateY(-3px); filter: brightness(1.08); }
.genre-card span { font-size: 17px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.15; display: block; max-width: 80%; }
.genre-card small { position: absolute; left: 16px; bottom: 14px; color: rgba(255, 255, 255, 0.64); font-size: 9.5px; font-weight: 650; letter-spacing: 0.04em; }
.search-layout { display: grid; grid-template-columns: minmax(250px, 0.85fr) minmax(0, 1.6fr); gap: 28px; align-items: start; margin-top: 6px; }
.result-card {
  position: relative;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
  overflow: hidden;
  min-height: 100%;
  cursor: pointer;
}
.result-card:hover { background: rgba(255, 255, 255, 0.075); }
.result-card .cover { width: min(100%, 172px); aspect-ratio: 1; height: auto; margin-bottom: 20px; box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35); }
.result-card__type { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 7px; }
.result-card__title { font-size: clamp(20px, 2.5vw, 30px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; }
.result-card__sub { color: var(--muted); font-size: 11px; margin-top: 8px; }
.result-card .card-play { right: 18px; bottom: 18px; opacity: 1; transform: none; width: 46px; height: 46px; }
.search-songs { min-width: 0; }
.search-songs .section-head { margin-bottom: 8px; }
.result-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 8px; border-radius: 8px; transition: background 0.16s; }
.result-row:hover { background: rgba(255, 255, 255, 0.055); }
.search-artists { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 10px; }
.artist-tile { padding: 10px; border-radius: 10px; text-align: center; transition: background 0.2s; cursor: pointer; }
.artist-tile:hover { background: rgba(255, 255, 255, 0.055); }
.artist-tile .cover { width: 100%; aspect-ratio: 1; height: auto; border-radius: 50%; margin-bottom: 10px; }
.artist-tile strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artist-tile small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.artist-bio-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  transition: background 0.2s;
  cursor: pointer;
}
.artist-bio-card:hover { background: rgba(255, 255, 255, 0.06); }
.artist-bio-card__art .cover { width: 64px; height: 64px; }
.artist-bio-card h3 { font-size: 15px; letter-spacing: -0.02em; }
.artist-bio-card p { color: var(--muted); font-size: 11.5px; margin-top: 5px; line-height: 1.45; }
.artist-bio-card .action-pill { margin-left: auto; }
.playlist-empty-cover { display: grid; place-items: center; width: 100%; aspect-ratio: 1; color: rgba(255, 255, 255, 0.55); }
.search-empty { padding: 46px 0; }
.search-empty h2 { font-size: 21px; letter-spacing: -0.035em; }
.search-empty p { color: var(--muted); margin-top: 8px; font-size: 12.5px; }

/* ============ Library ============ */

.library-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 20px 0 20px; }
.library-head-row h1 { font-size: clamp(31px, 4vw, 48px); letter-spacing: -0.055em; line-height: 1; }
.library-head-row p { color: var(--muted); font-size: 12px; margin-top: 9px; }
.library-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  transition: color 0.18s, background 0.18s;
}
.chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.chip.is-active { color: var(--accent-ink); background: var(--accent); }
.chip.is-active:hover { background: var(--accent-strong); color: var(--accent-ink); }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.library-grid--playlists { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
.library-card {
  padding: 11px;
  border-radius: 11px;
  transition: background 0.2s;
  cursor: pointer;
  min-width: 0;
}
.library-card:hover { background: rgba(255, 255, 255, 0.055); }
.library-card .cover { width: 100%; aspect-ratio: 1; height: auto; margin-bottom: 12px; }
.library-card strong { display: block; font-size: 13px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-card p { color: var(--muted); font-size: 10.5px; margin-top: 4px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 29px; }
.library-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; color: var(--subtle); font-size: 9.5px; }
.library-card__badge { padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--muted); font-size: 8.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.create-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: auto;
  min-height: 255px;
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--muted);
  text-align: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.create-card:hover { border-color: rgba(184, 244, 92, 0.4); color: var(--accent); background: rgba(184, 244, 92, 0.025); }
.create-card__plus { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); color: var(--text); }
.library-stats { display: flex; gap: 9px; flex-wrap: wrap; }
.stat-pill { display: flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); font-size: 10.5px; }
.stat-pill strong { color: var(--text); font-size: 12px; }

/* ============ Player ============ */

.player {
  position: fixed;
  z-index: 100;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--player-h);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(340px, 2fr) minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: rgba(8, 8, 10, 0.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(22px);
}
.player__progress-mobile { display: none; }
.player__track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player__cover { display: flex; flex: 0 0 auto; border-radius: 6px; overflow: hidden; }
.player__cover .cover { width: 54px; height: 54px; border-radius: 6px; }
.player__meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.player__title { font-size: 12.5px; font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: fit-content; max-width: 100%; cursor: pointer; }
.player__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.player__artist { color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__like { color: var(--muted); margin-left: 2px; opacity: 0; }
.player:not(.is-empty):hover .player__like, .player__like.is-liked { opacity: 1; }
.player__like.is-liked { color: var(--accent); }
.player__center { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; max-width: 700px; margin: 0 auto; min-width: 0; }
.player__controls { display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; }
.player-control { color: var(--text-2); }
.player-control:hover { color: var(--text); }
.player-control--aux { color: var(--muted); width: 32px; height: 32px; }
.player-control--aux:hover { color: var(--text-2); }
.player-control--aux.is-active { color: var(--accent); }
.player-control--aux.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
}
.player-control { position: relative; }
.player-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--text);
  color: #0b0b0d;
  margin: 0 5px;
  transition: transform 0.18s var(--ease), background 0.18s;
  position: relative;
}
.player-play:hover { transform: scale(1.07); background: #fff; }
.player-play:active { transform: scale(0.97); }
.player-play__icon { display: grid; place-items: center; }
.player-play__spin {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #111;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.player.is-buffering .player-play__icon { display: none; }
.player.is-buffering .player-play__spin { display: block; }
.player__timeline { display: flex; align-items: center; gap: 9px; width: 100%; }
.player__time { min-width: 33px; color: var(--subtle); font-size: 9.5px; font-variant-numeric: tabular-nums; text-align: center; }
.player__right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.volume-control { display: flex; align-items: center; gap: 5px; }
.repeat-one-dot { display: none; }
.player-control.is-active .repeat-one-dot { display: block; position: absolute; bottom: 3px; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); }
.player.is-empty .player-play { background: #2a2a30; color: #5d5d68; }
.player.is-empty .player__cover .cover { opacity: 0.35; }
.player.is-empty .player__like { display: none; }
.player.is-empty .player__title { color: var(--muted); }
.player.is-empty .player__artist { color: var(--subtle); }
.player.is-empty .player__right { opacity: 0.55; }

/* Range slider */
.range-wrap { position: relative; flex: 1; height: 16px; display: flex; align-items: center; min-width: 0; }
.range-wrap--progress { flex: 1; }
.range-wrap--volume { width: 90px; flex: 0 1 90px; }
.range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 16px;
  margin: 0;
  opacity: 0;
  z-index: 3;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.range:disabled { cursor: default; }
.range__track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  overflow: visible;
  display: block;
}
.range__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--text-2);
  transition: background 0.18s;
}
.range__thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.range-wrap:hover .range__thumb, .range:focus-visible + .range__track .range__thumb { opacity: 1; }
.range-wrap:hover .range__fill { background: var(--accent); }
.range:disabled + .range__track { opacity: 0.45; }
.range:disabled + .range__track .range__fill { background: var(--subtle); }

/* ============ Queue panel ============ */

.queue-panel {
  position: fixed;
  z-index: 160;
  top: 8px;
  right: 8px;
  bottom: calc(var(--player-h) + 8px);
  width: min(370px, calc(100vw - 16px));
  display: flex;
  flex-direction: column;
  background: #111114;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 24px));
  visibility: hidden;
  transition: transform 0.38s var(--ease), visibility 0.38s;
}
.queue-panel.is-open { transform: translateX(0); visibility: visible; }
.queue-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 20px 16px; border-bottom: 1px solid var(--border); }
.queue-panel__head h2 { font-size: 22px; letter-spacing: -0.04em; margin-top: 5px; }
.queue-panel__body { flex: 1; overflow-y: auto; padding: 16px 14px; }
.queue-panel__foot { padding: 13px 16px 16px; border-top: 1px solid var(--border); }
.queue-overlay {
  position: fixed;
  inset: 0 0 var(--player-h) 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.queue-overlay.is-open { opacity: 1; visibility: visible; }
.queue-now { display: flex; gap: 14px; padding: 0 4px 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.queue-now .cover { width: 64px; height: 64px; border-radius: 7px; }
.queue-now__text { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.queue-now__label { font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.queue-now strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-now__artist { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-context { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; padding: 0 4px; }
.queue-context span { color: var(--muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.queue-context small { color: var(--subtle); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-list { display: flex; flex-direction: column; gap: 1px; }
.queue-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 5px; border-radius: 7px; text-align: left; transition: background 0.16s, opacity 0.16s, box-shadow 0.16s; cursor: grab; }
.queue-item:hover { background: rgba(255, 255, 255, 0.055); }
.queue-item.is-current { background: rgba(184, 244, 92, 0.055); }
.queue-grip { display: flex; align-items: center; color: transparent; flex: 0 0 auto; width: 10px; transition: color 0.16s; }
.queue-item:hover .queue-grip { color: var(--subtle); }
.queue-item.is-dragging { opacity: 0.35; }
.queue-item.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.queue-item.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.queue-item .cover { width: 38px; height: 38px; border-radius: 5px; }
.queue-item__text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.queue-item__text strong { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item.is-current .queue-item__text strong { color: var(--accent); }
.queue-item__text span { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item__time { color: var(--subtle); font-size: 9.5px; }
.queue-remove { color: var(--subtle); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; opacity: 0; }
.queue-item:hover .queue-remove { opacity: 1; }
.queue-remove:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }

/* ============ Profile menu / context menu ============ */

.profile-menu {
  position: fixed;
  z-index: 250;
  top: 68px;
  right: 24px;
  width: 278px;
  padding: 7px;
  border-radius: 12px;
  background: #18181d;
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  animation: menu-in 0.16s var(--ease);
  transform-origin: top right;
}
.profile-menu__head { display: flex; align-items: center; gap: 10px; padding: 10px; }
.profile-menu__head > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile-menu__head strong { font-size: 12.5px; }
.profile-menu__head small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
.profile-menu__divider { height: 1px; background: var(--border); margin: 5px 4px; }
.profile-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 7px; color: var(--text-2); font-size: 11.5px; text-align: left; transition: background 0.15s, color 0.15s; }
.profile-menu__item:hover { background: rgba(255, 255, 255, 0.065); color: var(--text); }
.profile-menu__item--danger { color: #ff8d9d; }
.profile-menu__item--danger:hover { color: #ffb0bb; background: rgba(255, 104, 128, 0.09); }
.context-menu {
  position: fixed;
  z-index: 400;
  min-width: 238px;
  max-width: 292px;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 6px;
  border-radius: 10px;
  background: #1b1b21;
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  animation: menu-in 0.14s var(--ease);
}
.context-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px; color: var(--text-2); font-size: 11.5px; text-align: left; transition: background 0.14s, color 0.14s; }
.context-menu__item:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.context-menu__item .icon { color: var(--muted); }
.context-menu__item:hover .icon { color: var(--text); }
.context-menu__item--danger { color: #ff8d9d; }
.context-menu__item--danger .icon { color: #ff8d9d; }
.context-menu__item--danger:hover { background: rgba(255, 104, 128, 0.1); color: #ffb0bb; }
.context-menu__divider { height: 1px; background: var(--border); margin: 5px 4px; }
.context-menu__label { padding: 7px 10px 4px; color: var(--subtle); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.context-menu__note { padding: 2px 10px 7px; color: var(--subtle); font-size: 9.5px; line-height: 1.4; }

/* ============ Modal ============ */

.modal-root { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.modal-root.is-open { pointer-events: auto; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 3, 4, 0.72);
  backdrop-filter: blur(8px);
  animation: fade-in 0.2s ease;
  overflow-y: auto;
}
.modal {
  width: min(480px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: #151519;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
  animation: modal-in 0.3s var(--ease);
  position: relative;
}
.modal--wide { width: min(650px, 100%); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 26px 16px; }
.modal__head h2 { font-size: 22px; letter-spacing: -0.04em; line-height: 1.1; margin-top: 6px; }
.modal__head p { color: var(--muted); font-size: 11.5px; line-height: 1.45; margin-top: 8px; max-width: 420px; }
.modal__body { padding: 8px 26px 26px; }
.modal__foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 15px 26px 24px; border-top: 1px solid var(--border); }
.modal .form-error { margin-top: 2px; }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-actions-row { display: flex; gap: 10px; }
.modal-actions-row .btn { flex: 1; }
.check-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 12px; color: var(--text-2); line-height: 1.4; position: relative; }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-row .check-box {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: #111115;
  color: var(--accent-ink);
  flex: 0 0 auto;
  transition: background 0.16s, border-color 0.16s;
}
.check-row .check-box .icon { opacity: 0; transform: scale(0.8); transition: opacity 0.16s, transform 0.16s; }
.check-row input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check-row input:checked + .check-box .icon { opacity: 1; transform: scale(1); }
.check-row small { display: block; color: var(--subtle); font-size: 10px; margin-top: 2px; }
.form-hint { color: var(--subtle); font-size: 10.5px; line-height: 1.45; }
.confirm-copy { color: var(--text-2); font-size: 12.5px; line-height: 1.6; }
.confirm-copy strong { color: var(--text); }

/* Upload */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.is-dragging { border-color: rgba(184, 244, 92, 0.55); background: rgba(184, 244, 92, 0.035); }
.dropzone__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--accent); background: rgba(184, 244, 92, 0.08); margin-bottom: 3px; }
.dropzone strong { font-size: 13px; }
.dropzone span { color: var(--muted); font-size: 11px; }
.dropzone small { color: var(--subtle); font-size: 9.5px; margin-top: 4px; }
.upload-file { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255, 255, 255, 0.025); }
.upload-file__art { width: 44px; height: 44px; border-radius: 6px; display: grid; place-items: center; background: rgba(184, 244, 92, 0.08); color: var(--accent); flex: 0 0 auto; }
.upload-file__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.upload-file__text strong { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-file__text span { color: var(--muted); font-size: 10px; }
.upload-progress { margin-top: 12px; }
.upload-progress__head { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.upload-progress__bar { height: 5px; background: rgba(255, 255, 255, 0.09); border-radius: 4px; overflow: hidden; }
.upload-progress__bar span { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--accent); transition: width 0.2s; }
.upload-queue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 10px; color: var(--muted); font-size: 11px; }
.upload-queue-head strong { color: var(--text); }
.upload-queue-head .btn { height: 30px; }
.upload-queue { display: flex; flex-direction: column; gap: 9px; max-height: 330px; overflow-y: auto; padding-right: 3px; }
.upload-queue__item {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.024);
  transition: border-color 0.2s, background 0.2s;
}
.upload-queue__item.is-uploading { border-color: rgba(184, 244, 92, 0.30); background: rgba(184, 244, 92, 0.025); }
.upload-queue__item.is-done { border-color: rgba(184, 244, 92, 0.22); }
.upload-queue__item.is-error { border-color: rgba(255, 104, 128, 0.3); background: rgba(255, 104, 128, 0.035); }
.upload-queue__row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.upload-queue__art {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  flex: 0 0 auto;
}
.is-done .upload-queue__art { color: var(--accent); background: rgba(184, 244, 92, 0.1); }
.is-error .upload-queue__art { color: var(--danger); background: rgba(255, 104, 128, 0.1); }
.upload-queue__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upload-queue__info strong { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-queue__info span { color: var(--muted); font-size: 9.5px; }
.upload-queue__status { color: var(--muted); font-size: 9px; white-space: nowrap; }
.is-uploading .upload-queue__status { color: var(--accent); }
.is-done .upload-queue__status { color: var(--accent); }
.is-error .upload-queue__status { color: var(--danger); }
.upload-queue__fields { gap: 8px; }
.upload-queue__fields .field { gap: 4px; }
.upload-queue__fields .field > span { font-size: 9.5px; }
.upload-queue__fields .field input { height: 36px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.upload-queue__error { margin-top: 8px; color: #ff9cad; font-size: 10px; line-height: 1.4; }
.upload-queue__progress { height: 3px; margin-top: 9px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.upload-queue__progress span { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.18s; }
.upload-shared { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* Import metadata */
.import-providers { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.import-provider {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.025);
}
.import-provider small { color: var(--subtle); font-size: 8.5px; font-weight: 500; }
.import-provider.is-enabled { border-color: rgba(184, 244, 92, 0.2); }
.import-provider.is-enabled .icon { color: var(--accent); }
.import-provider.is-disabled { opacity: 0.55; }
.import-provider--youtube .icon { color: #ff8b93; }
.import-provider--spotify .icon { color: #79e6a5; }
.import-provider--yandex .icon { color: #ffd86f; }
.import-hint { margin-top: 12px; }
.import-preview-head { display: flex; align-items: center; gap: 16px; padding: 4px 0 16px; }
.import-preview-cover {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--border);
  flex: 0 0 auto;
  color: var(--muted);
}
.import-preview-cover img { width: 100%; height: 100%; object-fit: cover; }
.import-preview-text { min-width: 0; }
.import-preview-text h3 { margin-top: 8px; font-size: 20px; line-height: 1.15; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.import-preview-text p { margin-top: 5px; color: var(--muted); font-size: 11.5px; }
.import-source-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--text-2); font-size: 10px; }
.import-source-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.import-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(120, 168, 255, 0.18);
  background: rgba(120, 168, 255, 0.055);
  color: var(--text-2);
  font-size: 10.5px;
  line-height: 1.5;
  margin-bottom: 15px;
}
.import-note .icon { color: var(--blue); margin-top: 1px; }
.import-list { display: flex; flex-direction: column; gap: 2px; max-height: 330px; overflow-y: auto; padding-right: 3px; }
.import-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.16s;
  position: relative;
}
.import-row:hover { background: rgba(255, 255, 255, 0.045); }
.import-row input { position: absolute; opacity: 0; pointer-events: none; }
.import-row__check {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--accent-ink);
  background: #111115;
}
.import-row__check .icon { opacity: 0; transform: scale(0.8); transition: opacity 0.15s, transform 0.15s; }
.import-row input:checked + .import-row__check { background: var(--accent); border-color: var(--accent); }
.import-row input:checked + .import-row__check .icon { opacity: 1; transform: scale(1); }
.import-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.import-row__text strong { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-row__text span { color: var(--muted); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-row__time { color: var(--subtle); font-size: 9.5px; white-space: nowrap; }
.import-source-box {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  padding: 9px 11px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
}
.import-source-box span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-info { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.source-info__cover { width: 96px; flex: 0 0 auto; }
.source-info__cover .cover { width: 96px; height: 96px; border-radius: 8px; }
.source-info__head { min-width: 0; }
.source-info__head h3 { margin-top: 7px; font-size: 20px; letter-spacing: -0.035em; line-height: 1.15; }
.source-info__head p { color: var(--muted); font-size: 11.5px; margin-top: 5px; }
.source-info__description {
  max-height: 280px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.source-extras { margin-bottom: 14px; }
.source-extras__colors { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.source-swatch {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--swatch);
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.source-swatch--small { width: 16px; height: 16px; border-width: 1px; }
.source-extras__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.source-tag {
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 9.5px;
}
.source-extras__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
}
.source-extras__meta > div { min-width: 0; }
.source-extras__meta dt { color: var(--subtle); font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.source-extras__meta dd { margin: 0; color: var(--text-2); font-size: 10.5px; line-height: 1.45; overflow-wrap: anywhere; }
.source-license-link { color: var(--accent); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.split-track-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 10px; border-radius: 9px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.025); }
.split-track-summary .cover { width: 48px; height: 48px; border-radius: 6px; }
.split-track-summary > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.split-track-summary strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-track-summary span { color: var(--muted); font-size: 10.5px; }
.split-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.split-toolbar > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.split-toolbar strong { font-size: 12.5px; }
.split-toolbar span { color: var(--muted); font-size: 10px; line-height: 1.4; }
.split-toolbar__actions { display: flex; gap: 6px; flex-shrink: 0; }
.split-toolbar__actions .btn { height: 29px; padding: 0 9px; font-size: 10px; }
.split-segments-head { display: grid; grid-template-columns: 86px minmax(0, 1fr) 64px; gap: 8px; padding: 0 6px 5px; color: var(--subtle); font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.split-segments { display: flex; flex-direction: column; gap: 5px; max-height: 260px; overflow-y: auto; padding-right: 3px; }
.split-segment { display: grid; grid-template-columns: 86px minmax(0, 1fr) 64px; gap: 8px; align-items: center; position: relative; }
.split-segment__time,
.split-segment__title {
  height: 35px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #111115;
  color: var(--text);
  font-size: 11.5px;
  padding: 0 9px;
  outline: none;
  min-width: 0;
}
.split-segment__time:focus,
.split-segment__title:focus { border-color: rgba(184, 244, 92, 0.5); }
.split-segment__time { color: var(--text-2); font-variant-numeric: tabular-nums; }
.split-segment__time[readonly] { color: var(--muted); background: rgba(255, 255, 255, 0.025); }
.split-segment__remove { color: var(--muted); }
.split-segment__lock { display: flex; align-items: center; justify-content: center; color: var(--subtle); font-size: 9px; }
.split-segment__actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.split-segment__actions .icon-btn { width: 30px; height: 30px; }
.split-segment__preview { color: var(--muted); }
.split-segment.is-previewing .split-segment__preview { color: var(--accent); background: rgba(184, 244, 92, 0.12); }
.split-segment::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(var(--preview-progress, 0));
  transform-origin: left center;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.08s linear;
  pointer-events: none;
}
.split-segment.is-previewing::after { opacity: 0.85; }
.split-total { margin: 9px 0 14px; color: var(--muted); font-size: 10.5px; }
.split-total strong { color: var(--text); }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cover-picker { display: flex; align-items: center; gap: 11px; margin-top: 4px; }
.cover-picker__preview { width: 48px; height: 48px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--muted); overflow: hidden; flex: 0 0 auto; }
.cover-picker__preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-picker__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cover-picker__text strong { font-size: 11px; }
.cover-picker__text small { color: var(--subtle); font-size: 9.5px; }
.cover-picker .btn { margin-left: auto; }
.hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Playlist add list */
.playlist-pick { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; margin: 4px 0 2px; }
.playlist-pick__item { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 8px; text-align: left; transition: background 0.15s; }
.playlist-pick__item:hover { background: rgba(255, 255, 255, 0.06); }
.playlist-pick__item .cover { width: 40px; height: 40px; }
.playlist-pick__item div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.playlist-pick__item strong { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-pick__item small { color: var(--muted); font-size: 9.5px; }
.playlist-pick__item .icon { margin-left: auto; color: var(--accent); opacity: 0; }
.playlist-pick__item.is-added .icon { opacity: 1; }
.playlist-pick__empty { color: var(--muted); font-size: 11.5px; padding: 18px 4px; text-align: center; }

/* ============ Toasts ============ */

.toast-stack {
  position: fixed;
  z-index: 500;
  right: 22px;
  bottom: calc(var(--player-h) + 18px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #202027;
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.35;
  pointer-events: auto;
  cursor: pointer;
  animation: toast-in 0.3s var(--ease);
}
.toast--success .toast__dot { background: var(--accent); }
.toast--error .toast__dot { background: var(--danger); }
.toast__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); flex: 0 0 auto; box-shadow: 0 0 10px currentColor; }
.toast.is-leaving { animation: toast-out 0.22s ease forwards; }

/* ============ Mobile nav ============ */

.mobile-nav { display: none; }

/* ============ Animations ============ */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes loader { 0% { transform: translateX(-110%); } 100% { transform: translateX(280%); } }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(184, 244, 92, 0.3); } 50% { box-shadow: 0 0 0 6px rgba(184, 244, 92, 0); } }
@keyframes brand-wave { 0%, 100% { transform: scaleY(0.8); } 50% { transform: scaleY(1.15); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes waveform { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
@keyframes equalize { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes view-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-5px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(18px); } }

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

/* ============ Responsive ============ */

@media (max-width: 1180px) {
  :root { --sidebar-w: 236px; }
  .global-search { width: clamp(200px, 24vw, 320px); }
  .track-head, .track-row { grid-template-columns: 32px minmax(170px, 2.4fr) minmax(80px, 1.4fr) 34px 48px 34px; }
  .track-date, .track-head__date { display: none; }
  .search-layout { grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.5fr); gap: 22px; }
}

@media (max-width: 1000px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr); }
  .auth__stack { opacity: 0.55; width: 300px; height: 270px; }
  .auth__cover { width: 140px; height: 140px; }
  .auth__cover--2 { top: 45px; }
  .auth__cover--3 { top: 125px; }
  .auth__copy h1 { font-size: clamp(45px, 6.6vw, 72px); }
  .player { grid-template-columns: minmax(190px, 1fr) minmax(300px, 1.8fr) minmax(170px, 0.8fr); gap: 10px; padding: 0 14px; }
  .volume-control .range-wrap--volume { width: 68px; flex-basis: 68px; }
  .topbar .history-buttons { display: none; }
}

@media (max-width: 960px) {
  .auth {
    display: block;
    height: 100dvh;
    min-height: 0;
    overflow-y: auto;
  }
  .auth__art { display: none; }
  .auth__panel {
    min-height: 100dvh;
    align-items: safe center;
    padding: max(34px, 7vh) clamp(24px, 6vw, 64px) max(38px, env(safe-area-inset-bottom));
    border-left: 0;
    background:
      radial-gradient(720px 480px at 85% -10%, rgba(184, 244, 92, 0.075), transparent 62%),
      radial-gradient(700px 520px at 10% 100%, rgba(101, 72, 170, 0.16), transparent 65%),
      #0b0b0e;
  }
  .auth__mobile-brand { display: flex; }
  .auth__card { max-width: 430px; margin: 0 auto; padding-top: 16px; }
}

@media (max-width: 860px) {
  :root { --sidebar-w: 262px; --player-h: 76px; }
  .app { display: block; padding: 0; height: 100dvh; }
  .sidebar {
    position: fixed;
    z-index: 210;
    top: 8px;
    left: 8px;
    bottom: calc(var(--player-h) + 16px);
    height: auto;
    width: min(var(--sidebar-w), calc(100vw - 52px));
    transform: translateX(calc(-100% - 24px));
    visibility: hidden;
    transition: transform 0.32s var(--ease), visibility 0.32s;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  }
  .sidebar.is-open { transform: translateX(0); visibility: visible; }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  .sidebar-backdrop.is-open { opacity: 1; visibility: visible; }
  .main-shell { height: calc(100dvh - var(--player-h)); border-radius: 0; border: 0; }
  .topbar { padding: 0 15px; }
  .topbar__menu { display: inline-flex; }
  .global-search__kbd { display: none; }
  .global-search { width: min(390px, 48vw); margin-left: 0; }
  .entity-wrap { margin: 0 -15px; padding: 0 15px; }
  .view { padding: 0 15px 46px; }
  .player { height: var(--player-h); grid-template-columns: minmax(0, 1fr) auto; padding: 0 12px; gap: 8px; }
  .player__center { width: auto; max-width: none; flex-direction: row; }
  .player__timeline { display: none; }
  .player__controls { gap: 2px; height: auto; }
  .player-control--aux { display: none; }
  .player__right { display: none; }
  .player__like { display: none !important; }
  .player-play { width: 36px; height: 36px; margin: 0 4px; }
  .player__track { min-width: 0; }
  .player__cover .cover { width: 46px; height: 46px; }
  .player__artist { font-size: 10px; }
  .player__progress-mobile { display: block; position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
  #player-mobile-progress { display: block; width: 0; height: 100%; background: var(--accent); transition: width 0.2s linear; }
  .queue-panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: min(78dvh, 640px); border-radius: 20px 20px 0 0; transform: translateY(105%); z-index: 180; }
  .queue-panel.is-open { transform: translateY(0); }
  .queue-overlay { z-index: 170; bottom: calc(var(--player-h) + 58px); }
  .toast-stack { bottom: calc(var(--player-h) + 14px); right: 12px; left: 12px; align-items: stretch; }
  .toast { max-width: none; }
  .modal-backdrop { padding: 14px; align-items: flex-end; }
  .modal { width: 100%; max-height: calc(100dvh - 28px); border-radius: 18px; }
  .modal__head, .modal__body, .modal__foot { padding-left: 20px; padding-right: 20px; }
  .profile-menu { top: 64px; right: 12px; }
}

@media (max-width: 760px) {
  :root { --player-h: 64px; }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    z-index: 110;
    left: 0; right: 0; bottom: 0;
    height: 58px;
    padding: 4px 8px max(4px, env(safe-area-inset-bottom));
    background: #08080a;
    border-top: 1px solid var(--border);
  }
  .mobile-nav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--subtle); font-size: 8.5px; font-weight: 600; border-radius: 8px; }
  .mobile-nav__item .icon { width: 19px; height: 19px; }
  .mobile-nav__item.is-active { color: var(--accent); }
  .main-shell { height: calc(100dvh - var(--player-h) - 58px); }
  .player { bottom: 58px; }
  .sidebar { bottom: calc(var(--player-h) + 58px + 8px); }
  .topbar { flex-basis: 64px; height: 64px; }
  .topbar__right .btn--topbar { width: 36px; padding: 0; }
  .topbar__right .btn--topbar .btn__label { display: none; }
  .global-search { flex: 1; width: auto; min-width: 0; }
  .topbar__left { flex: 1; min-width: 0; }
  .topbar__right { gap: 6px; }
  .page { padding-top: 10px; }
  .home-hero { padding: 14px 0 20px; }
  .home-hero h1 { font-size: 34px; }
  .home-hero p { font-size: 12px; }
  .home-hero__aside { display: none; }
  .quick-grid { grid-template-columns: 1fr; gap: 5px; }
  .quick-tile { height: 58px; padding-right: 46px; }
  .quick-tile .cover { width: 58px; height: 58px; }
  .quick-tile__play { opacity: 1; width: 32px; height: 32px; background: rgba(184, 244, 92, 0.92); }
  .card-row { grid-auto-columns: 138px; gap: 4px; margin: 0 -4px; padding: 0 4px 8px; }
  .media-card { padding: 7px; }
  .media-card__art { margin-bottom: 8px; }
  .card-play { opacity: 1; transform: translateY(0); width: 36px; height: 36px; }
  .card-like { opacity: 1; transform: none; }
  .track-head { display: none; }
  .track-row,
  .track-table--compact .track-row,
  .track-table--narrow .track-row { grid-template-columns: 28px minmax(0, 1fr) 32px 32px; gap: 8px; padding: 6px 7px; min-height: 54px; }
  .track-album, .track-date, .track-duration { display: none; }
  .track-head__album, .track-head__date { display: none; }
  .track-main .cover { width: 38px; height: 38px; }
  .track-name { font-size: 12.5px; }
  .track-artist { font-size: 10.5px; }
  .track-more { opacity: 1; width: 28px; height: 28px; }
  .track-index { width: 28px; justify-content: center; }
  .track-index__num { display: none; }
  .track-play { display: flex; width: 28px; height: 28px; }
  .track-row:hover .track-play[data-track-id]:not(.current) { display: flex; }
  .track-row:hover .track-index__num { display: none; }
  .track-row.is-current .track-play { display: none; }
  .track-row.is-current .equalizer { display: flex; margin: 0 auto; }
  .track-row.is-current:hover .equalizer { display: flex; }
  .track-row .track-like { display: inline-flex; opacity: 1; width: 30px; height: 30px; }
  .track-table--compact .track-head, .track-table--narrow .track-head { display: none; }
  .track-list.track-table--reorder .track-head,
  .track-list.track-table--reorder .track-row { grid-template-columns: 14px 28px minmax(0, 1fr) 32px 32px; }
  .track-row:hover .track-grip { color: var(--subtle); }
  .entity-head { flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 26px; padding-bottom: 14px; }
  .entity-art { width: 138px; }
  .entity-title { font-size: clamp(32px, 10vw, 48px); }
  .entity-info { width: 100%; }
  .entity-description { font-size: 11.5px; }
  .entity-actions { padding-top: 4px; }
  .play-cta { width: 48px; height: 48px; }
  .entity-wrap::before { height: 330px; }
  .search-layout { grid-template-columns: 1fr; gap: 14px; }
  .result-card { display: flex; align-items: center; gap: 14px; padding: 14px; min-height: 0; }
  .result-card .cover { width: 76px; height: 76px; margin: 0; flex: 0 0 auto; }
  .result-card__type { margin-bottom: 4px; }
  .result-card__title { font-size: 21px; }
  .result-card .card-play { width: 38px; height: 38px; right: 12px; }
  .result-card__text { min-width: 0; padding-right: 40px; }
  .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .genre-card { height: 100px; padding: 12px; }
  .genre-card span { font-size: 14px; }
  .genre-card small { left: 12px; bottom: 10px; font-size: 8.5px; }
  .search-artists { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 3px; }
  .library-head-row { padding: 14px 0 16px; }
  .library-head-row h1 { font-size: 32px; }
  .library-grid, .library-grid--playlists { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
  .library-card { padding: 8px; }
  .create-card { min-height: 200px; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { max-height: 92dvh; border-radius: 20px 20px 0 0; }
  .modal__head { padding-top: 20px; }
  .upload-grid { grid-template-columns: 1fr; }
  .source-extras__meta { grid-template-columns: 1fr; }
  .split-toolbar { align-items: flex-start; flex-direction: column; }
  .split-toolbar__actions { width: 100%; }
  .split-toolbar__actions .btn { flex: 1; }
  .split-segments-head, .split-segment { grid-template-columns: 70px minmax(0, 1fr) 60px; }
  .split-segment__actions .icon-btn { width: 28px; height: 28px; }
  .dropzone { min-height: 160px; }
  .auth { display: block; height: 100dvh; min-height: 0; overflow-y: auto; }
  .auth__art { display: none; }
  .auth__panel { min-height: 100dvh; padding: 28px 22px max(32px, env(safe-area-inset-bottom)); border-left: 0; align-items: flex-start; }
  .auth__mobile-brand { display: flex; }
  .auth__card { max-width: 430px; margin: 0 auto; padding-top: 18px; }
  .auth__card h2 { font-size: 29px; }
  .history-buttons { display: none; }
}

@media (max-width: 420px) {
  .home-hero h1 { font-size: 30px; }
  .track-row,
  .track-table--compact .track-row,
  .track-table--narrow .track-row { grid-template-columns: 26px minmax(0, 1fr) 30px 30px; gap: 6px; }
  .track-list.track-table--reorder .track-row { grid-template-columns: 12px 24px minmax(0, 1fr) 30px 30px; }
  .quick-tile__name { font-size: 12px; }
  .entity-title { font-size: 34px; }
  .modal__head, .modal__body, .modal__foot { padding-left: 16px; padding-right: 16px; }
  .player { padding: 0 8px; }
  .player__cover .cover { width: 42px; height: 42px; }
  .player__artist { max-width: 130px; }
}

/* =========================================================
   Публичный плейлист без авторизации (гостевой режим)
   ========================================================= */

.guest-brand {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 0 4px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.guest-brand .brand__badge { width: 30px; height: 30px; border-radius: 9px; }
.guest-brand__name { line-height: 1; }
.guest-login { display: none; background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.guest-login:hover { background: var(--accent-strong); color: var(--accent-ink); }

body.is-guest .app { grid-template-columns: minmax(0, 1fr); }
body.is-guest .sidebar,
body.is-guest .sidebar-backdrop,
body.is-guest .mobile-nav,
body.is-guest .history-buttons,
body.is-guest .global-search,
body.is-guest .topbar__menu,
body.is-guest .topbar__right > .btn--topbar:not(.guest-login),
body.is-guest .topbar__right > .profile-btn,
body.is-guest .player__like { display: none; }
body.is-guest .guest-brand { display: inline-flex; }
body.is-guest .guest-login { display: inline-flex; }

@media (max-width: 760px) {
  body.is-guest .main-shell { height: calc(100dvh - var(--player-h)); }
  body.is-guest .player { bottom: 0; }
}

