/* ==========================================================================
   RH—MUSIC · Global Redesign 2026
   Единая премиальная тёмная система. Подключается после styles.css,
   поэтому переопределяет визуальный слой, не меняя логику и разметку.
   ========================================================================== */

:root {
  --bg: #05060a;
  --bg-2: #090c14;
  --bg-3: #0d1220;
  --surface: #0d111b;
  --surface-2: #111726;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.075);
  --panel: rgba(12, 16, 27, 0.82);
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f6ff;
  --muted: #939cb8;
  --muted-2: #6d7694;
  --blue: #7c8cff;
  --violet: #b06cff;
  --cyan: #5fe3c0;
  --danger: #ff6074;
  --ok: #57e6a6;
  --grad: linear-gradient(135deg, #7c8cff 0%, #9c6bff 55%, #c86cff 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 140, 255, .22), rgba(176, 108, 255, .16));
  --grad-line: linear-gradient(90deg, transparent, rgba(124, 140, 255, .55), rgba(176, 108, 255, .55), transparent);
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-md: 0 24px 60px rgba(0, 0, 0, .5);
  --glow: 0 12px 34px rgba(124, 140, 255, .28);
  --ambient-1: rgba(124, 140, 255, .3);
  --ambient-2: rgba(176, 108, 255, .24);
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}

html { background: #05060a; }
body {
  font-family: var(--font-text);
  font-size: 15px;
  letter-spacing: -0.005em;
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(80, 105, 255, .16), transparent 62%),
    radial-gradient(900px 650px at 100% 0%, rgba(168, 76, 255, .12), transparent 58%),
    radial-gradient(900px 900px at 50% 110%, rgba(40, 190, 170, .05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .35;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 70%);
}
.ambient { background: transparent; }
.ambient-glow { filter: blur(110px); opacity: .5; }
.ambient-a { background: rgba(92, 111, 255, .32); }
.ambient-b { background: rgba(176, 92, 255, .26); }

::selection { background: rgba(124, 140, 255, .38); }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* ── Типографика ─────────────────────────────────────────────────── */
.page-title, .hero-title, .section-title, .side-brand-title, .np-song,
.queue-panel-title, .lyrics-pane-title, .sheet-title, .card-title, .np-title {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}
.page-title { font-size: clamp(24px, 2.2vw, 32px); font-weight: 780; }
.page-sub { color: var(--muted); font-size: 13px; letter-spacing: 0; }
.section-title { font-size: 18px; font-weight: 760; }
.section-sub { color: var(--muted-2); font-size: 12px; letter-spacing: 0; }

/* ── Каркас / топбар ─────────────────────────────────────────────── */
.app { position: relative; z-index: 1; }
.topbar {
  background: linear-gradient(180deg, rgba(5,6,10,.92), rgba(5,6,10,.72));
  border-bottom: 1px solid rgba(255,255,255,.055);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
}
.topbar::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--grad-line);
  opacity: .35;
}
.brand-mobile-text { font-family: var(--font-display); font-weight: 820; letter-spacing: .16em; }
.logo {
  border-radius: 13px;
  background: var(--grad);
  box-shadow: 0 8px 26px rgba(124,140,255,.35), inset 0 1px 0 rgba(255,255,255,.4);
}
.icon-btn, .ctrl, .row-btn { transition: color .18s ease, background .18s ease, border-color .18s ease, transform .16s ease, box-shadow .2s ease; }
.icon-btn { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.065); border-radius: 13px; }
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.12); }
.searchbar {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 13px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.searchbar:focus-within { border-color: rgba(124,140,255,.55); background: rgba(124,140,255,.07); box-shadow: 0 0 0 4px rgba(124,140,255,.08); }

/* ── Sidebar ─────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  .sidebar {
    background:
      radial-gradient(120% 50% at 0% 0%, rgba(124,140,255,.1), transparent 60%),
      linear-gradient(180deg, rgba(10,13,22,.94), rgba(7,9,15,.98));
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: 24px 0 70px rgba(0,0,0,.18);
  }
  .side-brand { padding: 6px 8px 10px; }
  .side-brand-title { font-size: 17px; letter-spacing: .16em; }
  .side-brand-sub { color: var(--muted-2); font-size: 10px; }
  .side-item {
    position: relative;
    border-radius: 12px;
    color: #8f98b4;
    font-weight: 600;
    transition: color .18s, background .18s, transform .16s;
  }
  .side-item:hover { color: var(--text); background: rgba(255,255,255,.055); }
  .side-item.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(124,140,255,.2), rgba(176,108,255,.1));
    box-shadow: inset 0 0 0 1px rgba(124,140,255,.18);
  }
  .side-item.is-active::before {
    content: '';
    position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--grad);
    box-shadow: 0 0 14px rgba(124,140,255,.8);
  }
  .side-group-title { color: #59617d; letter-spacing: .18em; }
  .side-account { border-radius: 14px; border: 1px solid transparent; padding: 8px; transition: background .18s, border-color .18s; }
  .side-account:hover { background: rgba(255,255,255,.05); border-color: var(--border); }
  .side-playlists a { border-radius: 10px; color: var(--muted); }
  .side-playlists a:hover { background: rgba(255,255,255,.05); color: var(--text); }
}

/* ── Контент ─────────────────────────────────────────────────────── */
.page { max-width: 1420px; padding-top: 18px; }
.page-head { align-items: center; margin-bottom: 18px; }
.page-head .page-title { margin: 0; }
.page-head .page-sub { margin-top: 4px; }
.section { margin-bottom: 30px; }
.section-head { align-items: center; margin-bottom: 12px; }
.section-title { display: flex; align-items: center; gap: 8px; }
.section-title::before {
  content: '';
  width: 5px; height: 17px; border-radius: 4px;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(124,140,255,.45);
}

/* ── Карточки ────────────────────────────────────────────────────── */
.card {
  position: relative;
  border-radius: 18px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.022));
  border: 1px solid rgba(255,255,255,.065);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 10px 30px rgba(0,0,0,.16);
  transition: transform .24s cubic-bezier(.2,.7,.2,1), border-color .24s, box-shadow .24s, background .24s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(124,140,255,.32);
  background: linear-gradient(180deg, rgba(124,140,255,.1), rgba(255,255,255,.025));
  box-shadow: 0 20px 46px rgba(0,0,0,.38), 0 0 0 1px rgba(124,140,255,.08);
}
.card-art { border-radius: 14px; background: linear-gradient(140deg, #202a46, #111624); }
.card-art img { transition: transform .45s cubic-bezier(.2,.7,.2,1), filter .3s; }
.card:hover .card-art img { transform: scale(1.045); }
.card-title { font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
.card-sub { color: var(--muted); font-size: 11.5px; }
.card-play {
  width: 38px; height: 38px;
  right: 8px; bottom: 8px;
  background: var(--grad);
  box-shadow: 0 8px 22px rgba(124,140,255,.45);
  opacity: 0; transform: translateY(6px);
  transition: opacity .2s, transform .2s;
}
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; transform: none; }
.track-card { border-radius: 17px; }
.track-card .card-art { border-radius: 13px; }
.track-card .card-title { font-size: 13px; }
.track-card .card-sub { font-size: 11px; }

/* ── Карусели/сетки ──────────────────────────────────────────────── */
.carousel { gap: 13px; padding-top: 2px; padding-bottom: 12px; scroll-padding-left: 2px; }
.carousel .card { flex-basis: 160px; width: 160px; }
.grid-cards { gap: 13px; }
@media (min-width: 1024px) {
  .carousel .card { flex-basis: 184px; width: 184px; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }
}

/* ── Трек-строки ─────────────────────────────────────────────────── */
.track-list { gap: 2px; }
.track {
  position: relative;
  border-radius: 13px;
  border: 1px solid transparent;
  transition: background .18s, border-color .18s, transform .16s;
}
.track:hover { background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.06); }
.track.is-current {
  background: linear-gradient(90deg, rgba(124,140,255,.14), rgba(176,108,255,.045));
  border-color: rgba(124,140,255,.16);
}
.track.is-current::before {
  content: '';
  position: absolute; left: 0; top: 10px; bottom: 10px; width: 2.5px; border-radius: 3px;
  background: var(--grad);
}
.track-title { font-weight: 620; letter-spacing: -.01em; }
.track-index { color: #59617b; }
.track.is-current .track-index { color: var(--blue); }
.track-actions .row-btn { border-radius: 10px; }
.track-actions .row-btn:hover { background: rgba(255,255,255,.07); }

/* ── Кнопки / чипы / табы ────────────────────────────────────────── */
.btn { border-radius: 12px; font-weight: 650; letter-spacing: -.01em; }
.btn-primary {
  background: var(--grad);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 22px rgba(124,140,255,.28);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.075); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.chip {
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.07);
  color: var(--muted);
  font-weight: 600;
}
.chip:hover { color: var(--text); border-color: rgba(124,140,255,.28); }
.chip.is-active { color: #fff; background: var(--grad-soft); border-color: rgba(124,140,255,.4); }
.tab { color: var(--muted-2); }
.tab.is-active { color: #fff; }
.tab.is-active::after { background: var(--grad); box-shadow: 0 0 12px rgba(124,140,255,.55); }
.seek { accent-color: var(--blue); }
input[type="range"] { accent-color: var(--blue); }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.075);
  background:
    radial-gradient(90% 130% at 0% 0%, rgba(124,140,255,.24), transparent 60%),
    radial-gradient(80% 120% at 100% 100%, rgba(176,108,255,.2), transparent 58%),
    linear-gradient(145deg, rgba(20,25,42,.92), rgba(9,12,20,.96));
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.hero::after { background: linear-gradient(180deg, transparent 45%, rgba(5,6,10,.72)); }
.home-hero { border-radius: 26px; }
.hero-kicker { color: #9eb0ff; letter-spacing: .16em; }
.hero-title { font-weight: 800; }
.hero-sub { color: var(--muted); }
.hero-art { border-radius: 18px; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.hero-art img { position: relative; z-index: 1; }
.hero-art .cover-fallback { z-index: 0; }
.home-hero .hero-art { border-radius: 18px; }

/* ── Плеер (мобильный) ───────────────────────────────────────────── */
.player {
  left: 8px; right: 8px;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 6px);
  padding: 6px 10px 8px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: rgba(12,16,27,.82);
  box-shadow: 0 18px 46px rgba(0,0,0,.45);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}
.player-progress { margin: 0 0 2px; }
.player-row { gap: 10px; }
.np-cover { border-radius: 12px; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.np-title { font-weight: 650; }
.play-mobile { box-shadow: 0 8px 22px rgba(124,140,255,.36); }

/* ── Tabbar ──────────────────────────────────────────────────────── */
.tabbar {
  background: rgba(6,8,13,.9);
  border-top: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}
.tab { gap: 4px; font-size: 9.5px; letter-spacing: .01em; }
.tab svg { width: 21px; height: 21px; }
.tab.is-active { color: #fff; }
.tab.is-active svg { filter: drop-shadow(0 0 8px rgba(124,140,255,.5)); }

/* ── Now Playing ─────────────────────────────────────────────────── */
.now-playing {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(124,140,255,.22), transparent 60%),
    radial-gradient(100% 80% at 100% 100%, rgba(176,108,255,.16), transparent 60%),
    rgba(4,5,9,.94);
  backdrop-filter: blur(34px) saturate(160%);
  -webkit-backdrop-filter: blur(34px) saturate(160%);
}
.np-bg { opacity: .9; filter: blur(70px); }
.np-inner { width: min(560px, 100%); gap: 14px; }
.np-art {
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.1), 0 0 0 10px rgba(255,255,255,.025);
  isolation: isolate;
}
.np-art-beat {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  transform-origin: center center;
  will-change: transform;
}
.np-art::after {
  content: '';
  position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.08), transparent 30%, transparent 70%, rgba(0,0,0,.3));
}
.np-song { font-size: clamp(22px, 4.5vw, 28px); font-weight: 800; }
.np-singer { color: #aab3cc; font-size: 14px; }
.np-controls { gap: 26px; }
.np-controls .ctrl { color: #aab3cc; }
.np-controls .ctrl:hover { color: #fff; }
.ctrl.play.xl {
  background: var(--grad);
  box-shadow: 0 12px 34px rgba(124,140,255,.45), inset 0 1px 0 rgba(255,255,255,.35);
}
.np-extras { gap: 9px; }
.np-extra { background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.07); }
.np-extra:hover { background: rgba(255,255,255,.09); }
.np-times { color: #7f89a5; }

/* ── Очередь / drawer / sheet ────────────────────────────────────── */
/* Не рисуем второй полупрозрачный слой поверх страницы: панели уже
   имеют собственный фон и тень, а scrim остаётся только кликабельной зоной. */
.scrim {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.queue-panel {
  background:
    radial-gradient(120% 40% at 50% 0%, rgba(124,140,255,.12), transparent 60%),
    rgba(8,11,19,.96);
  border-left: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}
.queue-panel-art { border-radius: 18px; overflow: hidden; box-shadow: 0 18px 42px rgba(0,0,0,.4); }
.queue-panel-title { font-size: 18px; font-weight: 760; }
.qp-tab { border-radius: 9px; color: var(--muted); }
.qp-tab.is-active { color: #fff; background: rgba(255,255,255,.07); }
.drawer, .sheet-panel, .lyrics-sheet-inner {
  background:
    radial-gradient(100% 40% at 50% 0%, rgba(124,140,255,.12), transparent 60%),
    rgba(9,12,20,.97);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 -20px 60px rgba(0,0,0,.45);
  border-radius: 22px 22px 0 0;
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
}
.sheet-item { border-radius: 12px; }
.sheet-item:hover { background: rgba(255,255,255,.06); }
.toast {
  background: rgba(18,23,38,.96);
  border: 1px solid rgba(124,140,255,.22);
  box-shadow: 0 16px 42px rgba(0,0,0,.45);
  border-radius: 14px;
}
.notice {
  border-radius: 16px;
  border: 1px solid rgba(124,140,255,.16);
  background: linear-gradient(135deg, rgba(124,140,255,.12), rgba(176,108,255,.06));
}
.empty { border-radius: 20px; border: 1px dashed rgba(255,255,255,.1); background: rgba(255,255,255,.025); }

/* ── Поиск / библиотека / профили ────────────────────────────────── */
.search-field {
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.075);
  box-shadow: 0 12px 34px rgba(0,0,0,.18);
}
.search-field:focus-within { border-color: rgba(124,140,255,.45); box-shadow: 0 0 0 4px rgba(124,140,255,.07); }
.search-tabs { gap: 4px; background: rgba(255,255,255,.03); border-radius: 12px; padding: 3px; }
.search-tabs .chip { border: 0; background: transparent; }
.search-tabs .chip.is-active { background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(124,140,255,.28); }
.detail, .playlist-head, .artist-head, .album-head { border-radius: 22px; }
.detail-cover, .playlist-cover, .artist-cover, .album-cover { border-radius: 18px; box-shadow: 0 22px 54px rgba(0,0,0,.45); }
.kicker { color: #9eb0ff; letter-spacing: .14em; }
.auth-card, .form-card, .settings-card, .account-card {
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.075);
  box-shadow: var(--shadow-md);
}
.input, input[type="text"], input[type="email"], input[type="password"], textarea, select {
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text);
}
.input:focus, input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(124,140,255,.5); box-shadow: 0 0 0 4px rgba(124,140,255,.07); }

/* ── Профиль, настройки, формы, детали ──────────────────────────── */
.profile-head {
  display: flex; align-items: center; gap: 18px;
  padding: 20px; border-radius: 22px;
  border: 1px solid rgba(255,255,255,.075);
  background: radial-gradient(100% 120% at 0% 0%, rgba(124,140,255,.16), transparent 60%), rgba(255,255,255,.035);
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 20px;
  display: grid; place-items: center; flex: none;
  background: var(--grad); color: #fff;
  font-size: 26px; font-weight: 800;
  box-shadow: 0 12px 30px rgba(124,140,255,.3);
}
.profile-name { font-size: 22px; font-weight: 760; letter-spacing: -.02em; }
.profile-mail { color: var(--muted); font-size: 13px; margin-top: 2px; }
.auth-card { padding: 22px; }
.auth-head h1, .auth-head h2 { letter-spacing: -.03em; }
.auth-switch { color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field label { color: var(--muted); font-size: 12px; font-weight: 600; }
.detail {
  display: flex; gap: 22px; align-items: flex-end;
  padding: 22px; border-radius: 24px;
  border: 1px solid rgba(255,255,255,.07);
  background:
    radial-gradient(90% 120% at 10% 0%, rgba(124,140,255,.2), transparent 60%),
    linear-gradient(145deg, rgba(20,25,42,.9), rgba(9,12,20,.96));
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.detail-art { width: 220px; max-width: 34%; flex: none; border-radius: 18px; overflow: hidden; box-shadow: 0 22px 54px rgba(0,0,0,.45); }
.detail-art.round { border-radius: 50%; }
.detail-title { font-size: clamp(26px, 3vw, 42px); line-height: 1.05; margin: 4px 0 8px; font-weight: 820; letter-spacing: -.04em; }
.detail-kicker { color: #9eb0ff; font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.detail-sub { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.detail-desc { color: var(--muted); font-size: 13px; line-height: 1.5; max-width: 680px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.detail-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.playlist-row { border-radius: 12px; }
.danger-zone { border: 1px solid rgba(255,96,116,.18); border-radius: 18px; background: rgba(255,96,116,.045); }
.danger-list .btn-danger, .btn-danger { background: rgba(255,96,116,.12); border-color: rgba(255,96,116,.25); color: #ff9aa6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.recent-sub { color: var(--muted-2); font-size: 12px; }
.search-intro { color: var(--muted); }
.btn-block { width: 100%; }
.btn-mini { border-radius: 9px; }
@media (max-width: 700px) {
  .detail { flex-direction: column; align-items: flex-start; padding: 16px; gap: 14px; }
  .detail-art { width: 46%; max-width: 190px; }
  .detail-title { font-size: 28px; }
  .profile-head { padding: 16px; gap: 13px; }
  .profile-avatar { width: 54px; height: 54px; border-radius: 17px; font-size: 22px; }
}

/* ── Neural AI / AutoMix ─────────────────────────────────────────── */
.automix-btn {
  border-radius: 12px;
  border: 1px solid rgba(124,140,255,.18);
  background: linear-gradient(135deg, rgba(124,140,255,.12), rgba(176,108,255,.07));
  color: #c8d1ff;
}
.automix-btn.is-on {
  background: var(--grad);
  border-color: rgba(255,255,255,.18);
  color: #fff;
  box-shadow: 0 8px 24px rgba(124,140,255,.35);
}
.automix-btn[data-phase="MIXING"] { box-shadow: 0 0 0 1px rgba(176,108,255,.5), 0 0 28px rgba(124,140,255,.35); }
.ai-mix-status { color: #c8d1ff; border-radius: 999px; background: rgba(124,140,255,.12); border: 1px solid rgba(124,140,255,.2); }

/* ── Скелетоны ───────────────────────────────────────────────────── */
.sk { background: linear-gradient(90deg, rgba(255,255,255,.045), rgba(255,255,255,.085), rgba(255,255,255,.045)); border-radius: 12px; }
.skeleton-row, .sk-card { border-radius: 16px; }

/* ── Мелочи ──────────────────────────────────────────────────────── */
.cover-fallback { background: linear-gradient(140deg, #1d2740, #101522); color: #697694; }
.footer-note, .section-sub { color: var(--muted-2); }
.player-like.is-on, .row-btn.is-on { color: var(--violet); }
.queue-panel-actions .btn { border-radius: 10px; }

/* ── Адаптивность ────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .page { padding-left: 13px; padding-right: 13px; padding-top: 15px; }
  .page-title { font-size: 25px; }
  .section { margin-bottom: 24px; }
  .card { border-radius: 16px; padding: 9px; }
  .carousel .card { flex-basis: 148px; width: 148px; }
  .home-hero { border-radius: 22px; }
  .home-hero .hero-art { border-radius: 16px; }
  .np-inner { padding-left: 18px; padding-right: 18px; }
  .np-art { width: min(78vw, 42dvh); border-radius: 24px; }
  .np-controls { gap: 20px; }
  .player { left: 7px; right: 7px; border-radius: 17px; }
  .tabbar { height: calc(var(--tabbar-h) + var(--safe-bottom)); }
}
@media (min-width: 1024px) {
  .page { padding-top: 24px; }
  .section { margin-bottom: 34px; }
  .topbar { height: calc(var(--topbar-h) + var(--safe-top)); padding-left: 26px; padding-right: 26px; }
  .player { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
  .np-art { width: min(46vw, 38dvh); }
  .queue-panel { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ── Mobile: тактильная читаемость и отказ от тяжёлого стекла ─────── */
@media (max-width: 1023px), (pointer: coarse) {
  html[data-ui="mobile"] body { -webkit-tap-highlight-color: rgba(124, 140, 255, .2); }

  html[data-ui="mobile"] .topbar { background: #080b13; backdrop-filter: none; -webkit-backdrop-filter: none; }
  html[data-ui="mobile"] .player { background: #0b101b; backdrop-filter: none; -webkit-backdrop-filter: none; }
  html[data-ui="mobile"] .tabbar { background: #070a12; backdrop-filter: none; -webkit-backdrop-filter: none; }
  html[data-ui="mobile"] .now-playing { background: radial-gradient(120% 78% at 50% -8%, rgba(124,140,255,.2), transparent 62%), #05060a; backdrop-filter: none; -webkit-backdrop-filter: none; }
  html[data-ui="mobile"] .drawer,
  html[data-ui="mobile"] .sheet-panel,
  html[data-ui="mobile"] .lyrics-sheet-inner,
  html[data-ui="mobile"] .queue-panel { background: #0b101b; backdrop-filter: none; -webkit-backdrop-filter: none; }

  html[data-ui="mobile"] .track:active,
  html[data-ui="mobile"] .card:active,
  html[data-ui="mobile"] .side-item:active,
  html[data-ui="mobile"] .tab:active,
  html[data-ui="mobile"] .chip:active,
  html[data-ui="mobile"] .btn:active,
  html[data-ui="mobile"] .icon-btn:active,
  html[data-ui="mobile"] .ctrl:active,
  html[data-ui="mobile"] .sheet-item:active,
  html[data-ui="mobile"] .search-tabs .chip:active {
    background: rgba(124, 140, 255, .2) !important;
    background-image: none !important;
    transition: none !important;
    border-color: rgba(124, 140, 255, .38) !important;
    box-shadow: inset 0 0 0 1px rgba(124, 140, 255, .35) !important;
  }
  html[data-ui="mobile"] .track:active .track-title,
  html[data-ui="mobile"] .track:active .track-sub,
  html[data-ui="mobile"] .card:active .card-title,
  html[data-ui="mobile"] .card:active .card-sub,
  html[data-ui="mobile"] .side-item:active,
  html[data-ui="mobile"] .tab:active,
  html[data-ui="mobile"] .chip:active,
  html[data-ui="mobile"] .btn:active,
  html[data-ui="mobile"] .sheet-item:active,
  html[data-ui="mobile"] .search-tabs .chip:active { color: #fff !important; }
  html[data-ui="mobile"] .track:active { transform: scale(.995); }
  html[data-ui="mobile"] .card:active { transform: scale(.985); }
}

/* Мобильная подсветка нажатия: текст и контейнеры заметно реагируют. */
@media (max-width: 1023px), (pointer: coarse) {
  html[data-ui="mobile"] body::before { display: none; }
  html[data-ui="mobile"] .np-art::after { display: none; }
  html[data-ui="mobile"] .hero::after { display: none; }
  html[data-ui="mobile"] .ambient { display: none; }
  html[data-ui="mobile"] .np-bg { display: none; }
  html[data-ui="mobile"] .track.is-pressed,
  html[data-ui="mobile"] .card.is-pressed,
  html[data-ui="mobile"] .side-item.is-pressed,
  html[data-ui="mobile"] .tab.is-pressed,
  html[data-ui="mobile"] .chip.is-pressed,
  html[data-ui="mobile"] .sheet-item.is-pressed,
  html[data-ui="mobile"] a.is-pressed,
  html[data-ui="mobile"] button.is-pressed {
    background: rgba(124, 140, 255, .24) !important;
    background-image: none !important;
    transition: none !important;
    border-color: rgba(124, 140, 255, .45) !important;
    box-shadow: inset 0 0 0 1px rgba(124, 140, 255, .45), 0 0 18px rgba(124, 140, 255, .18) !important;
    color: #fff !important;
  }
  html[data-ui="mobile"] .track.is-pressed .track-title,
  html[data-ui="mobile"] .track.is-pressed .track-sub,
  html[data-ui="mobile"] .card.is-pressed .card-title,
  html[data-ui="mobile"] .card.is-pressed .card-sub,
  html[data-ui="mobile"] .side-item.is-pressed span,
  html[data-ui="mobile"] .tab.is-pressed span,
  html[data-ui="mobile"] .chip.is-pressed,
  html[data-ui="mobile"] .sheet-item.is-pressed {
    color: #fff !important;
    text-shadow: 0 0 14px rgba(124, 140, 255, .55);
  }
  html[data-ui="mobile"] .track.is-pressed { transform: scale(.992); }
  html[data-ui="mobile"] .card.is-pressed { transform: scale(.982); }
}

/* Убираем остатки стеклянных полноэкранных слоёв на телефоне: именно они
   давали полупрозрачные прямоугольники/артефакты поверх контента. */
@media (max-width: 1023px), (pointer: coarse) {
  html[data-ui="mobile"] .lyrics-sheet {
    background: #05060a;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  html[data-ui="mobile"] .search-field {
    background: #0b101b;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Телефон: убираем декоративные треугольные/полупрозрачные акценты,
   оставляя только функциональные кнопки плеера. */
@media (max-width: 1023px), (pointer: coarse) {
  html[data-ui="mobile"] .section-title::before { display: none; }
  html[data-ui="mobile"] .card-play { display: none; }
}

/* Короткие страницы (Поиск/Плейлисты) не должны менять высоту вьюпорта:
   иначе iOS сдвигает фиксированную нижнюю панель вкладок. */
@media (max-width: 1023px), (pointer: coarse) {
  html[data-ui="mobile"], html[data-ui="mobile"] body { min-height: 100dvh; }
  html[data-ui="mobile"] .page {
    min-height: calc(100dvh - var(--topbar-h) - var(--player-h) - var(--tabbar-h) - var(--safe-bottom));
  }
  html[data-ui="mobile"] .tabbar,
  html[data-ui="mobile"] .player {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}
