:root {
  --bg: #08080c;
  --bg-soft: #0e0e15;
  --card: #13131c;
  --card-2: #1a1a25;
  --card-3: #22222f;
  --border: #262633;
  --text: #f4f4f7;
  --muted: #8d8da2;
  --accent: #ffcc00;
  --accent-ink: #16160f;
  --green: #1ed760;
  --pink: #ff3b5c;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  --bar-h: 88px;
  --sidebar-w: 252px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: radial-gradient(1200px 700px at 15% -10%, #1c1630 0%, transparent 55%),
              radial-gradient(900px 600px at 100% 0%, #2a1a06 0%, transparent 45%),
              var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; }
.hidden { display: none !important; }

.muted { color: var(--muted); }
.tiny { font-size: 11px; line-height: 1.4; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Login ---------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, rgba(255, 204, 0, 0.06), transparent 40%), var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.login-sub { margin: 10px 0 22px; font-size: 14px; line-height: 1.5; }
.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.brand span { color: var(--accent); }
.brand--xl { font-size: 30px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.input,
.select {
  width: 100%;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus, .select:focus { border-color: var(--accent); }
.input::placeholder { color: #6b6b80; }
.select { cursor: pointer; appearance: none; padding-right: 30px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background: var(--card-3);
  transition: transform 0.1s, background 0.15s, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn--primary:hover { background: #ffdb4d; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--card-2); }
.btn--sm { padding: 8px 14px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: default; }

.alert {
  background: rgba(255, 59, 92, 0.12);
  border: 1px solid rgba(255, 59, 92, 0.35);
  color: #ff8fa3;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.link-btn:hover { color: var(--text); }

/* ---------- Layout ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px 18px calc(16px + env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(20, 20, 30, 0.9), rgba(8, 8, 12, 0.6));
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--card); color: var(--text); }
.nav-link.active { background: var(--card-2); color: var(--text); font-weight: 700; }
.nav-link.active .nav-ico { filter: none; }
.nav-ico { font-size: 15px; width: 20px; text-align: center; }

.sidebar-section { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
  padding-left: 12px;
}
.playlist-links { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.playlist-link {
  display: flex;
  flex-direction: column;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
}
.playlist-link:hover { background: var(--card); color: var(--text); }
.playlist-link.active { color: var(--text); background: var(--card-2); }
.playlist-link .pl-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-link .pl-count { font-size: 11px; opacity: 0.7; }

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.main {
  min-width: 0;
  padding: 28px 30px calc(var(--bar-h) + 32px);
  outline: none;
}


/* ---------- Hero / sections ---------- */
.hero {
  position: relative;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ff7a00 0%, #b3007a 45%, #241436 100%);
  box-shadow: 0 18px 40px rgba(179, 0, 122, 0.25);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 220px at 85% 10%, rgba(255, 255, 255, 0.22), transparent 60%);
  pointer-events: none;
}
.hero-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-title { font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -0.6px; margin: 0 0 4px; }
.hero-sub { margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 13px; max-width: 520px; }
.hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.hero .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero .select {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 12px;
  padding: 8px 30px 8px 12px;
  backdrop-filter: blur(6px);
  width: auto;
}
.hero .select option { color: #111; }

.play-big {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #111;
  font-size: 20px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 10px 24px rgba(255, 204, 0, 0.35);
  transition: transform 0.12s;
}
.play-big:active { transform: scale(0.94); }

.section { margin-bottom: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -0.2px; }
.section-link { font-size: 12px; color: var(--muted); cursor: pointer; }
.section-link:hover { color: var(--text); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

.grid { display: grid; gap: 14px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid--tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  min-width: 0;
}
.card:hover { background: var(--card-2); }
.card:active { transform: scale(0.99); }
.card-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: var(--card-3);
}
.card-cover .cover { width: 100%; height: 100%; border-radius: 12px; }
.card-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card--round .card-cover, .card--round .cover { border-radius: 50%; }

.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.tile:hover { background: var(--card-2); }
.tile-ico { font-size: 22px; }
.tile-title { font-size: 14px; font-weight: 600; }
.tile-sub { font-size: 12px; color: var(--muted); }

/* ---------- Covers ---------- */
.cover {
  position: relative;
  background: var(--card-3);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
  flex: 0 0 auto;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--placeholder {
  background: linear-gradient(135deg, #2a2a3d, #16161f);
  text-transform: uppercase;
}
.cover--xs { width: 38px; height: 38px; border-radius: 8px; font-size: 14px; }
.cover--sm { width: 48px; height: 48px; border-radius: 10px; font-size: 16px; }
.cover--md { width: 64px; height: 64px; border-radius: 12px; font-size: 20px; }
.cover--lg { width: 148px; height: 148px; border-radius: 18px; font-size: 40px; }
.cover--xl { width: min(240px, 55vw); height: min(240px, 55vw); border-radius: 22px; font-size: 64px; }

/* ---------- Кнопки-иконки ---------- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  border-radius: 8px;
  line-height: 1;
  transition: color 0.15s, background 0.15s, transform 0.1s;
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.active { color: var(--accent); }
.icon-btn--play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--text);
  color: #111;
}
.icon-btn--play:hover { background: #fff; color: #111; }
.liked-btn.liked { color: var(--pink); }
.liked-btn:hover { color: var(--pink); }

/* ---------- SVG-иконки ---------- */
[data-icon] { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
[data-icon] svg { display: block; pointer-events: none; }
.nav-ico { font-size: 0; }
.nav-ico svg { width: 18px; height: 18px; }
.tab [data-icon] svg { width: 20px; height: 20px; }
.icon-btn svg { pointer-events: none; }
.btn svg { flex: 0 0 auto; }
.play-big svg { width: 20px; height: 20px; pointer-events: none; }
.tile-ico svg { display: block; }
.sheet-action .ico { display: inline-flex; align-items: center; justify-content: center; width: 22px; }
.sheet-action .ico svg { display: block; }

/* ---------- Tracks ---------- */
.track-list { display: flex; flex-direction: column; }
.track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.track:hover { background: var(--card); }
.track.playing { background: var(--card-2); }
.track.playing .track-title { color: var(--accent); }
.track-index { width: 22px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.track-info { min-width: 0; flex: 1; }
.track-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-artist { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.track-artist a:hover { color: var(--text); text-decoration: underline; }
.track-duration { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.track-actions { display: flex; align-items: center; gap: 2px; }
.track-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 204, 0, 0.12);
  color: var(--accent);
  white-space: nowrap;
}
.track-badge--jf { background: rgba(30, 215, 96, 0.12); color: var(--green); }

/* Живой эквалайзер у играющего трека */
.track .eq {
  display: none;
  width: 16px;
  height: 18px;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  flex: 0 0 auto;
}
.track.playing .eq { display: inline-flex; }
.eq-bar {
  width: 3px;
  height: 30%;
  border-radius: 2px;
  background: var(--accent);
  animation: eq-bounce 1.05s ease-in-out infinite;
}
.eq-bar:nth-child(2) { animation-delay: 0.18s; }
.eq-bar:nth-child(3) { animation-delay: 0.36s; }
.eq-bar:nth-child(4) { animation-delay: 0.54s; }
.track.paused .eq-bar { animation-play-state: paused; opacity: 0.5; }
@keyframes eq-bounce {
  0%, 100% { height: 22%; }
  25% { height: 88%; }
  50% { height: 44%; }
  75% { height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .eq-bar { animation: none; height: 60%; }
}

/* Развёрнутый плеер (шторка «сейчас играет») */
.nowplaying { text-align: center; padding: 2px 0 6px; }
.nowplaying-cover { display: flex; justify-content: center; margin-bottom: 14px; }
.nowplaying-cover .cover--xl {
  width: min(200px, 44vw);
  height: min(200px, 44vw);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.nowplaying-title { font-size: 17px; font-weight: 700; }
.nowplaying-artist { font-size: 12px; color: var(--muted); margin-top: 4px; }
.nowplaying-badge { display: flex; justify-content: center; margin-top: 8px; }
.nowplaying-progress { margin-top: 16px; }
.nowplaying-times { justify-content: space-between; margin-top: 2px; }
.nowplaying-controls { justify-content: center; gap: 14px; margin-top: 12px; align-items: center; }
.nowplaying-extra { justify-content: center; gap: 12px; margin-top: 10px; }

/* ---------- Player bar ---------- */
.playerbar {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--bar-h);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 2fr) minmax(140px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: rgba(12, 12, 18, 0.92);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  z-index: 60;
}
.pb-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pb-cover { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; background: var(--card-3); flex: 0 0 auto; }
.pb-cover .cover, .pb-cover img { width: 100%; height: 100%; border-radius: 10px; }
.pb-meta { min-width: 0; }
.pb-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-artist { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pb-buttons { display: flex; align-items: center; gap: 8px; }
.pb-progress { display: flex; align-items: center; gap: 10px; width: 100%; }
.time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.pb-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.seek, .volume {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: #33333f;
  cursor: pointer;
  outline: none;
}
.seek { flex: 1; }
.volume { width: 92px; }
.seek::-webkit-slider-thumb, .volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text);
  border: none;
  transition: transform 0.12s;
}
.seek:hover::-webkit-slider-thumb, .volume:hover::-webkit-slider-thumb {
  transform: scale(1.15);
  background: var(--accent);
}
.seek::-moz-range-thumb, .volume::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; background: var(--text); border: none;
}
.seek::-moz-range-track, .volume::-moz-range-track { height: 4px; border-radius: 999px; background: #33333f; }

/* ---------- Bottom tabs (mobile) ---------- */
.tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 70;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--muted);
}
button.tab {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
.tab span { font-size: 17px; line-height: 1; }
.tab.active { color: var(--accent); font-weight: 600; }


/* ---------- Sheet / toast ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.2s;
}
.sheet-backdrop.visible { opacity: 1; }
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 110%);
  width: min(520px, 100%);
  max-height: min(78vh, 680px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  z-index: 95;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.6);
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-handle { width: 42px; height: 4px; border-radius: 999px; background: #3a3a4a; margin: 6px auto 14px; }
.sheet-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.sheet-sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.sheet-actions { display: flex; flex-direction: column; }
.sheet-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
}
.sheet-action:last-child { border-bottom: none; }
.sheet-action:hover { color: var(--accent); }
.sheet-action .ico { width: 22px; text-align: center; }
.sheet-input { margin: 10px 0 14px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bar-h) + 24px);
  transform: translate(-50%, 20px);
  background: var(--card-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 13px;
  z-index: 120;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  max-width: min(90vw, 460px);
  text-align: center;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: #3a1220; border-color: #6b2036; color: #ffb3c1; }

/* ---------- States ---------- */
.empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin: 26px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  background: linear-gradient(90deg, #1a1a25, #24242f, #1a1a25);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Источник трека и загрузка ---------- */
.track-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.track-badge svg { display: block; }
.track-badge--server { background: rgba(30, 215, 96, 0.14); color: var(--green); }
.track-badge--web { background: rgba(255, 204, 0, 0.14); color: var(--accent); }
.track-badge--net { background: rgba(126, 166, 255, 0.14); color: #8fb0ff; }

.pb-source { margin-top: 3px; }
.pb-source:empty { display: none; }
.pb-source .track-badge { font-size: 9px; padding: 2px 6px; }

.pb-status {
  font-size: 10px;
  color: var(--accent);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pb-load {
  height: 3px;
  margin-top: 3px;
  border-radius: 999px;
  background: #262633;
  overflow: hidden;
  width: 100%;
  max-width: 180px;
}
.pb-load__bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.import-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-2);
}
.import-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.import-label { color: var(--text); font-weight: 600; }
.import-size { font-variant-numeric: tabular-nums; }
.progress {
  height: 6px;
  border-radius: 999px;
  background: #262633;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 2%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.progress--indeterminate .progress__bar {
  width: 35%;
  animation: importSlide 1.1s ease-in-out infinite;
}
@keyframes importSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}
.import-box--done { border-color: rgba(30, 215, 96, 0.5); }
.import-box--done .import-label { color: var(--green); }
.import-box--error { border-color: rgba(255, 59, 92, 0.5); }
.import-box--error .import-label { color: #ff8fa3; }

/* ---------- Диагностика загрузки ---------- */
.boot-error {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  max-width: min(560px, 92vw);
  padding: 14px 16px;
  border-radius: 14px;
  background: #3a1220;
  border: 1px solid #6b2036;
  color: #ffb3c1;
  font-size: 13px;
  line-height: 1.45;
  z-index: 300;
  text-align: left;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  :root { --sidebar-w: 0px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 18px 16px calc(var(--bar-h) + 80px); }
  .playerbar {
    left: 8px;
    right: 8px;
    bottom: calc(60px + env(safe-area-inset-bottom));
    height: 74px;
    border: 1px solid var(--border);
    border-radius: 18px;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 0 12px;
    box-shadow: var(--shadow);
  }
  .pb-cover { width: 44px; height: 44px; }
  .pb-center { display: none; }
  .pb-right { display: none; }
  .tabbar { display: flex; }
  .toast { bottom: calc(var(--bar-h) + 86px); }
  .track-index { display: none; }
  .track-duration { display: none; }
  .cover--lg { width: 120px; height: 120px; }
}

@media (min-width: 981px) {
  .mini-only { display: none !important; }
}

@media (max-width: 560px) {
  .hero { padding: 18px; border-radius: 20px; }
  .hero-row { gap: 12px; }
  .grid--cards { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .grid--wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .section-title { font-size: 16px; }
}

