@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/onest-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #000000;
  --bg2: #121214;
  --card: #17171a;
  --border: #26262b;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --muted2: #63636b;
  --accent: #ffffff;
  --accent2: #d4d4d8;
  --danger: #e5484d;
  --ok: #d4d4d8;
  --nav-h: 62px;
  --nav-safe: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  --player-h: 118px;
}

@keyframes spin {
  to { transform: rotate(1turn); }
}

::selection { background: #ffffff; color: #000000; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

#app {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

/* When the app is visible, keep content clear of the floating
   player + dock stack (single --nav-safe token, spec 03 Н-1/Н-3) */
#main-view:not(.hidden) {
  padding-bottom: calc(var(--player-h) + var(--nav-safe) + 48px);
}

.hidden { display: none !important; }

/* Global touch polish (spec 07 С3) */
* { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: none; }

/* Page scrollbar (spec 07 С2) */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: #2c2c31; border-radius: 99px; border: 2px solid #000; }
::-webkit-scrollbar-track { background: transparent; }
html { scrollbar-width: thin; scrollbar-color: #2c2c31 transparent; }

/* Boot splash (spec 07 С1): shown until /api/me resolves */
#boot-view {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
}
.boot-inner { text-align: center; padding: 24px; }
.boot-logo { margin-bottom: 26px; }
.boot-spinner {
  width: 34px; height: 34px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #fff;
  animation: spin360 0.8s linear infinite;
}
.boot-text { color: var(--muted); font-size: 14px; }
.boot-slow { color: var(--muted2); font-size: 13px; margin-top: 8px; }

button { font-family: inherit; }

/* ---------- auth ---------- */
.auth-card {
  max-width: 380px;
  margin: 8vh auto 0;
  padding: 28px 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.logo { font-size: 30px; font-weight: 700; text-align: center; }
.logo .logo-accent {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-mark {
  display: inline-flex;
  vertical-align: -5px;
  margin-right: 8px;
  color: var(--accent2);
}
.logo-mark svg { display: block; }

.tagline { text-align: center; color: var(--muted); margin: 6px 0 4px; }
.auth-mode {
  text-align: center;
  color: var(--text);
  font-size: 15px; font-weight: 600;
  margin-bottom: 20px;
}
/* Auth fields (spec 07 А1/А2) */
.field { margin-bottom: 14px; text-align: left; }
.field label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.field-wrap { position: relative; }
.field-wrap input { margin-bottom: 0; padding-left: 40px; padding-right: 44px; font-size: 16px; }
.field-ic {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted2);
  pointer-events: none;
}
.field-wrap:focus-within .field-ic { color: var(--text); }
.field-wrap:focus-within input {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}
.field-eye {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: 50%;
  color: var(--muted);
  cursor: pointer; padding: 0;
}
.field-eye:active { background: rgba(255, 255, 255, 0.08); }
.field-error {
  display: none;
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 5px;
}
.field.has-error .field-error { display: block; }
.field.has-error input { border-color: var(--danger); }
.field-hint { font-size: 12.5px; color: var(--ok); margin-top: 5px; }
@keyframes shake-x {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.field.shake, .auth-form.shake { animation: shake-x 0.45s ease; }
.auth-form.auth-anim { animation: auth-fade 0.18s ease; }
@keyframes auth-fade { from { opacity: 0; transform: translateY(4px); } }
/* Auth background canvas (DarkVeil, spec 07 А7) */
#auth-view { position: relative; }
#auth-bg {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
#auth-view .auth-card { position: relative; z-index: 1; }
/* Submit loading state (А3) */
.btn.is-loading { pointer-events: none; opacity: 0.85; }
.btn.is-loading .lg-content { display: inline-flex; align-items: center; gap: 8px; }
.btn.is-loading .lg-content::before {
  content: '';
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000;
  animation: spin360 0.7s linear infinite;
}
.auth-form .switch { margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-form a { color: var(--accent2); text-decoration: none; }

/* ---------- forms & buttons ---------- */
input[type="text"], input[type="password"], input[type="search"] {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  outline: none;
}
input:focus { border-color: var(--accent); }

.btn {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg2);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
}
.btn.primary {
  width: 100%;
  background: #ffffff;
  color: #000000;
  border: none;
  font-weight: 600;
}
.btn.primary:disabled { opacity: 0.55; cursor: wait; }
.btn.heart {
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  font-size: 18px; color: var(--muted); flex: 0 0 auto; line-height: 1;
}
.btn.heart.liked { color: #ffffff; border-color: #ffffff; }
.btn.danger {
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  flex: 0 0 auto; font-size: 13px; color: var(--muted);
}

.error { color: var(--danger); font-size: 14px; min-height: 18px; margin-bottom: 10px; }
.ok { color: var(--ok); font-size: 14px; min-height: 18px; margin-bottom: 10px; }

/* ---------- pages ---------- */
.page { padding: 14px 16px 8px; }
.page-title { font-size: 22px; font-weight: 700; margin: 2px 0 16px; }
/* View transitions (spec 03 П-1) */
.page-enter { animation: page-in 0.22s cubic-bezier(0.22, 0.68, 0, 1); }
.page-enter-detail { animation: page-in-detail 0.26s cubic-bezier(0.22, 0.68, 0, 1); }
.page-enter-back { animation: page-in-back 0.16s ease; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
}
@keyframes page-in-detail {
  from { opacity: 0; transform: translateX(24px); }
}
@keyframes page-in-back {
  from { opacity: 0.4; }
}
.section-title { font-size: 19px; font-weight: 700; margin: 22px 0 12px; }
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 36px 16px;
  color: var(--muted); font-size: 14px; text-align: center;
}
.empty .empty-ic {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted2);
}
.empty .empty-ic svg { display: block; }
.empty .btn { margin-top: 2px; }
.sheet .empty { padding: 18px 10px; }
.sheet .empty .empty-ic { width: 44px; height: 44px; }

/* ---------- home header ---------- */
.home-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  position: sticky; top: 0; z-index: 30;
  margin: 0 -16px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid transparent;
}
.home-header.scrolled { border-bottom-color: var(--border); }
.avatar {
  width: 42px; height: 42px; flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #404047, #17171a);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 600; color: #fff;
  text-transform: uppercase;
}
.username {
  flex: 1; min-width: 0;
  font-size: 19px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.icon-btn {
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ---------- hero (Мой эфир) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  /* Gradient stays as a fallback under the WebGL canvas (dark-veil.js) */
  background: linear-gradient(165deg, #050506 0%, #17171c 55%, #26262e 100%);
  border-radius: 26px;
  padding: 30px 20px 26px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
#ether-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}
.hero > *:not(#ether-bg) {
  position: relative;
  z-index: 1;
}
.hero-play {
  width: 92px; height: 92px;
  border-radius: 50%;
  padding: 0;
  color: #fff;
}
.hero-play .lg-content { padding-left: 6px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); }
/* Soft veil at the hero's bottom edge, easing it into the page background */
.hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 56px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.45));
  pointer-events: none;
  z-index: 0;
}
.hero-over {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 16px;
  text-transform: uppercase;
}
.hero-title { font-size: clamp(27px, 6.8vw, 34px); font-weight: 700; letter-spacing: -0.01em; margin-top: 20px; color: #fff; }
.hero-sub { color: rgba(255, 255, 255, 0.85); font-size: 14px; margin-top: 6px; }
.hero-mode { opacity: 0.72; font-weight: 500; }
.hero-mode::before { content: '·'; margin: 0 2px; opacity: 0.6; }
.hero-settings {
  margin-top: 16px;
  padding: 10px 20px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px; font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* ---------- shortcut cards ---------- */
.cards {
  display: flex; gap: 10px;
  overflow-x: auto;
  padding: 18px 16px 6px 2px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-tap-highlight-color: transparent;
}
.cards::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 auto;
  width: 138px; height: 96px;
  border: none;
  border-radius: 18px;
  padding: 12px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  text-align: left;
  color: #fff;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.15s ease;
}
.card:active { transform: scale(0.97); }
.card-title { font-size: 15px; font-weight: 600; }
.card-sub { font-size: 12px; color: rgba(255, 255, 255, 0.85); margin-top: 3px; }
/* Rich empty state for an empty library (spec 01 №4) */
.home-empty { text-align: center; padding: 34px 18px 10px; }
.home-empty .he-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.home-empty .he-icon svg { display: block; }
.home-empty-title { font-size: 17px; font-weight: 600; }
.home-empty-text { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.home-empty .btn.primary { max-width: 260px; margin: 16px auto 0; }

#home-recent-block { scroll-margin-top: 76px; }
/* Home section titles live in .section-head rows (spec 04 Ч-5). */

/* First-load entrance for home lists (spec 01 №13) */
#view-home .enter .track { animation: home-in 0.38s ease both; }
#view-home .enter .track:nth-child(2) { animation-delay: 35ms; }
#view-home .enter .track:nth-child(3) { animation-delay: 70ms; }
#view-home .enter .track:nth-child(4) { animation-delay: 105ms; }
#view-home .enter .track:nth-child(5) { animation-delay: 140ms; }
#view-home .enter .track:nth-child(6) { animation-delay: 175ms; }
#view-home .enter .track:nth-child(7) { animation-delay: 210ms; }
#view-home .enter .track:nth-child(8) { animation-delay: 245ms; }
@keyframes home-in {
  from { opacity: 0; transform: translateY(8px); }
}

.card-likes { background: linear-gradient(150deg, #3f3f46, #17171a); }
.card-all { background: linear-gradient(150deg, #26262c, #101013); }
.card-recent { background: linear-gradient(150deg, #52525b, #1c1c21); }

/* ---------- track list ---------- */
.track-list { display: flex; flex-direction: column; gap: 8px; }
.track {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 10px 8px 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.track:active, .collection-row:active { background: #1d1d21; }
.track.current { border-color: var(--accent2); }
.track.playing { background: #1b1b1f; border-color: var(--accent2); }
.track.playing .t-title { color: var(--accent2); }
/* Ghost icon buttons inside rows (spec 04 Ч-1) */
.track .btn { border-color: transparent; background: transparent; }
.track .btn:active { background: rgba(255, 255, 255, 0.07); }
@media (hover: hover) {
  .track .btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
}
.cover {
  width: 52px; height: 52px; flex: 0 0 auto;
  border-radius: 12px; object-fit: cover;
  background: linear-gradient(135deg, #26262c, #101013);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: rgba(255, 255, 255, 0.9);
}
/* Playing-track overlay EQ + hover play circle on the cover (Ч-2) */
.cover-wrap { position: relative; flex: 0 0 auto; border-radius: 12px; }
.cover-eq {
  position: absolute; inset: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  display: none; align-items: flex-end; justify-content: center;
  padding-bottom: 10px;
  pointer-events: none;
}
.track.current .cover-eq { display: flex; }
.cover-eq .eq { display: flex; height: 12px; margin-left: 0; }
.cover-eq .eq span:nth-child(1) { transform: scaleY(1.6); }
.cover-eq .eq span:nth-child(2) { transform: scaleY(2.8); }
.cover-eq .eq span:nth-child(3) { transform: scaleY(1.2); }
.cover-eq .eq span:nth-child(4) { transform: scaleY(2.3); }
.cover-eq .eq.on span { animation: eq-dance 0.8s ease-in-out infinite alternate; }
.cover-hover {
  position: absolute; inset: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  display: none; align-items: center; justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .track:hover .cover-hover { display: flex; opacity: 1; }
  .track.current:hover .cover-hover { display: flex; }
}
.track .meta { flex: 1; min-width: 0; }
.t-title-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.t-title {
  font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t-lyrics-ic { color: var(--muted2); display: flex; flex: 0 0 auto; line-height: 0; }
.t-lyrics-ic svg { display: block; }
.t-sub {
  font-size: 13px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t-rank {
  width: 16px; flex: 0 0 auto;
  font-size: 13px; font-weight: 600;
  color: var(--muted2);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
/* Right-side meta column: duration over plays (Ч-1) */
.t-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  flex: 0 0 auto; min-width: 34px;
}
.t-dur { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- upload (dropzone + queue, ported from Kokonut UI file-upload) ---------- */
.upload-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  background: var(--bg2);
  padding: 28px 16px 24px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 14px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  outline: none;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); }
.dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}
.dropzone.window-drag {
  border-color: var(--accent2);
  animation: dz-pulse 1s ease-in-out infinite;
}
@keyframes dz-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.18); }
}
.dz-icon {
  width: 52px; height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent2);
  display: flex; align-items: center; justify-content: center;
}
.dz-title { font-size: 16px; font-weight: 600; }
.dz-pick {
  display: inline-block;
  background: #ffffff;
  color: #000000;
  border: none; border-radius: 999px;
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 18px;
  margin: 4px 0 2px;
  cursor: pointer;
}
.dz-pick:active { background: #d9d9de; transform: scale(0.97); }
@media (pointer: coarse) {
  .dz-title { font-size: 15px; }
}
/* Manual artist/title box (spec 05 U2) */
.manual-box {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px 4px;
  margin-bottom: 12px;
  background: var(--bg2);
}
.manual-title { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.manual-opt { color: var(--muted2); font-weight: 400; }
.manual-box.is-off { opacity: 0.55; }
.manual-box.is-off input { pointer-events: none; }
.manual-box .dz-note { margin: 0 0 10px; }
.manual-box #manual-state.is-ignored { color: var(--danger); }
.dz-hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.dz-note { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin: 2px 0 12px; }

.upload-queue { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.upload-queue:empty { margin-bottom: 0; }
.uq-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
}
.uq-badge {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, #26262c, #101013);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: #fff;
}
.uq-badge span { font-size: 9px; font-weight: 700; letter-spacing: 0.6px; line-height: 1; }
.uq-main { flex: 1; min-width: 0; }
.uq-name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uq-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.uq-status.st-queued { color: var(--muted); }
.uq-status.st-uploading { color: var(--accent2); }
.uq-status.st-done { color: var(--ok); }
.uq-status.st-error { color: var(--danger); }
.uq-status.st-rejected { color: var(--danger); }
.uq-status svg { vertical-align: -2px; }
.uq-progress {
  height: 6px; background: #26262b; border-radius: 3px; overflow: hidden; margin-top: 7px;
}
.uq-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #ffffff, #a1a1aa);
  border-radius: 3px;
  transition: width 0.15s;
}
.uq-icon-btn {
  width: 32px; height: 32px; flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.uq-retry { color: var(--accent2); }
/* Filename meta preview + retry/failed states (spec 05 U3/U4/U5) */
.up-preview { font-size: 12px; color: var(--muted2); margin-top: 1px; }
.uq-bar.is-retrying {
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.55) 0 8px, rgba(255, 255, 255, 0.15) 8px 16px);
  animation: barber 0.8s linear infinite;
}
@keyframes barber { to { background-position: 22px 0; } }
.uq-bar.is-failed { background: var(--danger); }
.uq-retry-labeled {
  display: inline-flex; align-items: center; gap: 6px;
  flex: 0 0 auto;
  background: #ffffff; color: #000;
  border: none; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
}
.uq-retry-labeled:active { background: #d9d9de; }
/* Run summary card + overall progress (spec 05 U6/U7) */
.upload-overall { margin-bottom: 12px; }
.upload-overall .uo-text {
  font-size: 13px; color: var(--muted); margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.upload-overall .progress {
  height: 6px; background: #26262b; border-radius: 3px; overflow: hidden;
}
.upload-overall .bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #ffffff, #a1a1aa);
  transition: width 0.2s ease;
}
.upload-summary {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.upload-summary .us-text { font-size: 14.5px; font-weight: 600; margin-bottom: 10px; }
.us-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.us-actions .btn { flex: 0 1 auto; }
.uq-icon-btn:hover { color: var(--text); border-color: var(--accent); }
.uq-remove:hover { color: var(--danger); border-color: var(--danger); }
.upload-wrap .ok { margin-bottom: 12px; }
.upload-wrap .ok:empty { margin-bottom: 0; }

/* ---------- ether bottom sheet ---------- */
.modal {
  position: fixed; inset: 0; z-index: 40;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.modal:not(.hidden) .modal-backdrop { animation: backdrop-in 0.25s ease; }
.modal:not(.hidden) .sheet { animation: sheet-up 0.32s cubic-bezier(0.32, 0.72, 0, 1); }
@keyframes backdrop-in {
  from { opacity: 0; }
}
@keyframes sheet-up {
  from { transform: translateY(42px); opacity: 0.4; }
}
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: 860px; margin: 0 auto;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg2);
  border: 1px solid var(--border); border-bottom: none;
  border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
}
/* Grabber handle on every sheet (spec 03 М-1) */
.sheet::before {
  content: '';
  display: block;
  width: 38px; height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 auto 14px;
}
.sheet-title { font-size: 19px; font-weight: 700; }
.sheet-sub { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }
.radio-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 12px;
  margin-bottom: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  font-size: 15px; font-weight: 600;
}
.radio-row input[type="radio"] { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: 0 0 auto; }
.radio-text small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.sheet .btn.primary { margin-top: 6px; }
.sheet-close { width: 100%; margin-top: 8px; }

/* ---------- player ---------- */
.player {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-safe) + 20px);
  width: calc(100% - 24px); max-width: 836px;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  z-index: 20;
}
@supports not (backdrop-filter: blur(1px)) {
  .player { background: rgba(10, 10, 11, 0.98); }
}
/* Seek: 22px hit zone, 4px line, buffered layer, thumb on interact,
   pointer-drag scrubbing (spec 02 ИЗМ-1/2). */
.seek {
  height: 22px;
  cursor: pointer;
  background: transparent;
  position: relative;
  touch-action: none;
}
.seek::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: #26262b;
}
.seek-buffered {
  position: absolute; top: 0; left: 0; height: 4px; width: 0%;
  background: #3f3f46;
  z-index: 1;
}
.seek-fill {
  position: absolute; top: 0; left: 0;
  height: 4px; width: 100%;
  background: linear-gradient(90deg, #ffffff, #a1a1aa);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 2;
}
.seek-thumb {
  position: absolute; top: 2px; left: 0%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, 0) scale(0);
  transition: transform 0.15s ease;
  z-index: 3;
  pointer-events: none;
}
.seek.dragging .seek-thumb, .seek:active .seek-thumb { transform: translate(-50%, 0) scale(1); }
.seek-times {
  position: absolute; left: 10px; right: 10px; top: 8px;
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--muted2);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.seek.dragging .seek-times { font-size: 12px; color: #fff; font-weight: 600; }
.player-row {
  display: flex; align-items: center; gap: 7px;
  height: calc(var(--player-h) - 22px - 38px);
  padding: 5px 10px;
}
.player-cover {
  position: relative;
  width: 48px; height: 48px; flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #26262c, #101013);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}
.pc-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.pc-layer.active { opacity: 1; }
.player.playing .player-cover { animation: cover-breathe 3.2s ease-in-out infinite alternate; }
@keyframes cover-breathe {
  from { transform: scale(1); }
  to { transform: scale(1.02); }
}
/* Buffering: spinner ring replaces the toggle glyph (spec 02 ИЗМ-2) */
.player.buffering #player-toggle svg,
.player-full.buffering #pf-toggle svg { visibility: hidden; }
.player.buffering #player-toggle::before,
.player-full.buffering #pf-toggle::before {
  content: '';
  position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
/* Collapsed mini-player (spec 02 ИЗМ-13): long-press on the cover */
body.pl-collapsed { --player-h: 56px; }
.player.collapsed .player-sub { display: none; }
.player.collapsed .player-row { height: 34px; padding: 0 10px; }
.player.collapsed .player-cover { width: 30px; height: 30px; border-radius: 8px; animation: none; }
.player.collapsed #player-like,
.player.collapsed #player-prev,
.player.collapsed #player-next,
.player.collapsed .player-artist { display: none; }
.player.collapsed .seek-times { display: none; }

/* ---------- fullscreen player (spec 02 ИЗМ-12) ---------- */
.player-full {
  position: fixed; inset: 0; z-index: 35;
  background: linear-gradient(180deg, #101013 0%, #000000 70%);
  display: flex; flex-direction: column;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 22px calc(20px + env(safe-area-inset-bottom, 0px));
  max-width: 860px; margin: 0 auto;
  animation: pf-in 0.28s cubic-bezier(0.22, 0.68, 0, 1);
}
@keyframes pf-in {
  from { opacity: 0; transform: translateY(24px); }
}
body.pf-open { overflow: hidden; }
.pf-top { display: flex; align-items: center; gap: 10px; }
.pf-context {
  flex: 1; min-width: 0; text-align: center;
  font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-top-spacer { width: 40px; flex: 0 0 auto; }
.pf-cover {
  width: min(72vw, 330px); aspect-ratio: 1 / 1;
  margin: 26px auto 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, #26262c, #101013);
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 44px rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  touch-action: none;
}
.pf-meta { text-align: center; min-width: 0; }
.pf-title {
  font-size: 21px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-artist {
  font-size: 15px; color: var(--muted); margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-seek-wrap { margin-top: 22px; }
.pf-seek-wrap .seek { height: 26px; }
.pf-times {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted2);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.pf-controls {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  margin-top: 18px;
}
.pf-controls .pbtn { width: 56px; height: 56px; }
.pf-controls .pbtn.main { width: 72px; height: 72px; }
.pf-controls .pbtn::after { content: none; }
.pf-actions {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 22px; flex-wrap: wrap;
}
.pf-act {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 64px; padding: 8px 0 6px;
  background: none; border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  border-radius: 14px;
}
.pf-act svg { display: block; }
.pf-act:active { background: rgba(255, 255, 255, 0.07); color: #fff; }
.pf-act.heart.liked { color: #ffffff; }
.pf-act.heart.liked svg { fill: currentColor; }
.player-meta { flex: 1; min-width: 0; }
.player-title {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-artist {
  font-size: 12px; color: var(--muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pbtn {
  position: relative;
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text); font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* 44px touch target around the 36px visual (spec 02 ИЗМ-3) */
.pbtn::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; }
.pbtn:active { transform: scale(0.88); }
.pbtn.main {
  width: 44px; height: 44px; font-size: 16px;
  background: #ffffff; color: #000000; border: none;
}
.pbtn.main::after { content: none; }
.pbtn.main svg { animation: pbtn-pop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes pbtn-pop {
  from { transform: scale(0.6); opacity: 0.4; }
}
.pbtn.heart { font-size: 17px; color: var(--muted2); }
.pbtn.heart.liked { color: #ffffff; border-color: #ffffff; }
.pbtn:disabled { opacity: 0.4; cursor: default; }

/* ---------- bottom navigation ---------- */
/* Floating glass dock (spec 03 Н-1/Н-3) */
.bottomnav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: calc(100% - 24px); max-width: 836px;
  height: var(--nav-h);
  padding-bottom: 0;
  display: flex;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 26px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  z-index: 20;
}
@supports not (backdrop-filter: blur(1px)) {
  .bottomnav { background: rgba(5, 5, 6, 0.98); }
}
.nav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding-top: 6px;
}
.nav-btn.active { color: var(--accent); }

/* ---------- small screens ---------- */
@media (max-width: 480px) {
  .auth-card { margin: 4vh 12px 0; }
  .page { padding: 12px 12px 8px; }
  .hero { padding: 24px 14px 20px; border-radius: 22px; }
  .home-header { margin: 0 -12px; padding: 10px 12px; }
  .hero .marquee { margin: 20px -14px -20px; }
  .hero-play { width: 76px; height: 76px; }
  .hero-play .lg-content svg { width: 32px; height: 32px; }
  .card { width: 124px; height: 88px; }
  .t-title { font-size: 14px; }
  .player-row { gap: 5px; padding: 5px 8px; }
}

/* ---------- liquid glass (ported from React LiquidButton) ---------- */
.liquid-glass {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.liquid-glass:hover { transform: scale(1.05); }
.liquid-glass:active { transform: scale(0.97); }
.liquid-glass:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 2px; }
.liquid-glass .lg-shadow {
  position: absolute; inset: 0; z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.03), 0 2px 6px rgba(0, 0, 0, 0.08), inset 3px 3px 0.5px -3.5px rgba(255, 255, 255, 0.09), inset -3px -3px 0.5px -3.5px rgba(255, 255, 255, 0.85), inset 1px 1px 1px -0.5px rgba(255, 255, 255, 0.6), inset -1px -1px 1px -0.5px rgba(255, 255, 255, 0.6), inset 0 0 6px 6px rgba(255, 255, 255, 0.12), inset 0 0 2px 2px rgba(255, 255, 255, 0.06), 0 0 12px rgba(0, 0, 0, 0.15);
}
.liquid-glass .lg-distort {
  position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  /* Fallback glass for browsers without SVG backdrop-filter support */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(2px) saturate(140%);
  -webkit-backdrop-filter: blur(2px) saturate(140%);
}
@supports (backdrop-filter: url("#container-glass")) {
  .liquid-glass .lg-distort {
    backdrop-filter: url("#container-glass");
    -webkit-backdrop-filter: url("#container-glass");
  }
}
.liquid-glass .lg-content {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  pointer-events: none;
}
/* Auth submit buttons as liquid-glass pills */
.auth-form .btn.primary.liquid-glass {
  border-radius: 999px;
  height: 48px;
  background: transparent;
  font-size: 16px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
/* The glass layers need a visible tint on the dark auth card */
.auth-form .liquid-glass .lg-distort {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.07));
}

/* ---------- desktop ---------- */
@media (min-width: 861px) {
  .player, .bottomnav { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ---------- fx pack (ported components, all monochrome) ---------- */

/* Shimmer sweep on #ether-play — Magic UI Shimmer Button technique:
   a conic-gradient "spark" (--spread 90deg) rotating inside a clipped layer
   over the liquid glass, below the icon. */
.lg-shimmer {
  position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.lg-shimmer-spark {
  position: absolute; inset: -100%;
  background: conic-gradient(from 225deg, transparent 0deg, rgba(255, 255, 255, 0.28) 90deg, transparent 90deg);
  animation: shimmer-spin 6s linear infinite;
}
@keyframes shimmer-spin {
  to { transform: rotate(1turn); }
}

/* Artist marquee — Magic UI Marquee port: repeated chunks, each animating
   translateX(0 -> calc(-100% - var(--gap))); pauses on hover. */
.marquee {
  --gap: 2.5rem;
  --duration: 40s;
  display: flex;
  gap: var(--gap);
  overflow: hidden;
  margin-top: 14px;
  padding: 2px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: contents; }
.marquee-chunk {
  display: flex; flex-shrink: 0; align-items: center; justify-content: space-around;
  gap: var(--gap);
  animation: marquee-scroll var(--duration) linear infinite;
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px; font-weight: 600; letter-spacing: 0.4px;
}
.marquee:hover .marquee-chunk { animation-play-state: paused; }
.marquee.paused .marquee-chunk { animation-play-state: paused; }
/* Marquee lives inside the hero (spec 01 №9): full-bleed strip with a
   hairline on top, items are buttons opening the artist profile. */
.hero .marquee {
  margin: 20px -20px -26px;
  padding: 10px 0 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  --gap: 2rem;
}
.marquee-item {
  background: none; border: none;
  color: rgba(255, 255, 255, 0.62);
  font: inherit;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 2px 0;
}
.marquee-item:active { color: #fff; }
.marquee-sep {
  width: 5px; height: 5px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted2);
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - var(--gap))); }
}

/* Track row / card spotlight — Aceternity Card Spotlight technique:
   pointer-tracked radial glow via --mouse-x / --mouse-y (set in app.js). */
.track, .card, .collection-row { position: relative; }
.track::before, .card::before, .collection-row::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.09), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}
.track::after, .card::after, .collection-row::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(240px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.4), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 2;
}
/* Spotlight glow only where a precise pointer exists (spec 04 Ч-9) */
@media (hover: hover) and (pointer: fine) {
  .track:hover::before, .card:hover::before, .collection-row:hover::before,
  .track:hover::after, .card:hover::after, .collection-row:hover::after { opacity: 1; }
}
.track > *, .card > *, .collection-row > * { position: relative; z-index: 1; }

/* Animated section titles — BlurText-style reveal (blur + rise + fade,
   staggered per character, triggered once via IntersectionObserver). */
.section-title .rv-char, .hero-title .rv-char {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(10px) scale(1.06);
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.5s ease;
  transition-delay: var(--rv-delay, 0ms);
  will-change: transform, filter, opacity;
}
.section-title.revealed .rv-char, .hero-title.revealed .rv-char {
  opacity: 1;
  filter: blur(0);
  transform: none;
}
.section-title .rv-space, .hero-title .rv-space { display: inline-block; width: 0.28em; }

/* Player equalizer — bars dance only while playing (.playing on #player). */
.player-title-row { display: flex; align-items: center; min-width: 0; }
.player-title-row .player-title { flex: 0 1 auto; min-width: 0; }
.eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  margin-left: 8px;
  flex: 0 0 auto;
  padding-bottom: 1px;
}
.player.has-track .eq { display: flex; }
.eq span {
  width: 3px; height: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #fff, #a1a1aa);
  transform-origin: bottom;
  transition: transform 0.35s ease;
}
/* Frozen spectrum silhouette while paused (spec 02 ИЗМ-6) */
.player:not(.playing) .eq span:nth-child(1) { transform: scaleY(1.6); }
.player:not(.playing) .eq span:nth-child(2) { transform: scaleY(2.8); }
.player:not(.playing) .eq span:nth-child(3) { transform: scaleY(1.2); }
.player:not(.playing) .eq span:nth-child(4) { transform: scaleY(2.3); }
.player:not(.playing) .eq span:nth-child(5) { transform: scaleY(1.9); }
.player.playing .eq span, .eq.on span { animation: eq-dance 0.8s ease-in-out infinite alternate; }
.player.playing .eq span:nth-child(1), .eq.on span:nth-child(1) { animation-duration: 0.72s; }
.player.playing .eq span:nth-child(2), .eq.on span:nth-child(2) { animation-duration: 0.95s; animation-delay: 0.12s; }
.player.playing .eq span:nth-child(3), .eq.on span:nth-child(3) { animation-duration: 0.64s; animation-delay: 0.24s; }
.player.playing .eq span:nth-child(4), .eq.on span:nth-child(4) { animation-duration: 0.88s; animation-delay: 0.06s; }
.player.playing .eq span:nth-child(5), .eq.on span:nth-child(5) { animation-duration: 0.78s; animation-delay: 0.18s; }
@keyframes eq-dance {
  from { transform: scaleY(1); }
  to { transform: scaleY(3.4); }
}
/* Long titles slide back and forth instead of a dead ellipsis */
.player-title.marquee, .player-artist.marquee { text-overflow: clip; }
.mq-inner {
  display: inline-block;
  white-space: nowrap;
  animation: title-mq 7s ease-in-out infinite alternate;
}
@keyframes title-mq {
  0%, 20% { transform: translateX(0); }
  80%, 100% { transform: translateX(calc(-1 * var(--mq-shift, 0px))); }
}

/* Search input beam — rotating conic-gradient border while focused
   (AI-input technique from Kokonut/Cult UI). Degrades to a static beam
   where @property is unsupported, and to the plain focus border where
   mask-composite is unsupported. */
@property --beam-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.search-wrap { position: relative; margin-bottom: 12px; }
/* Sticky search field on the Search tab (spec 03 Ш-1) */
#view-search .search-wrap {
  position: sticky;
  top: 8px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 16px;
}
.search-wrap input[type="search"] {
  margin-bottom: 0;
  font-size: 16px; /* >=16px: no input-zoom on iOS */
  padding-left: 40px;
  padding-right: 64px;
}
.search-wrap input[type="search"]::-webkit-search-cancel-button { display: none; }
.search-ic {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted2);
  pointer-events: none;
}
.search-clear {
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none; border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.search-clear:active { background: rgba(255, 255, 255, 0.16); }
.search-spin {
  position: absolute; right: 42px; top: 50%;
  width: 16px; height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  animation: spin360 0.7s linear infinite;
}
@keyframes spin360 { to { transform: rotate(360deg); } }
/* Recent searches (spec 05 S3) */
.recent-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 2px 0 8px;
}
.recent-title { font-size: 13px; color: var(--muted); font-weight: 600; }
.recent-clear {
  background: none; border: none;
  color: var(--muted2); font: inherit; font-size: 12.5px;
  cursor: pointer; padding: 4px 6px;
}
.recent-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.recent-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card);
  border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); font: inherit; font-size: 13.5px;
  padding: 7px 12px;
  cursor: pointer;
}
.recent-chip svg { display: block; color: var(--muted2); }
.recent-chip:active { background: var(--card2); }
/* Search loading: gentle fade instead of hiding sections (S6) */
#view-search.is-loading #search-list,
#view-search.is-loading #search-artists-block,
#view-search.is-loading #search-albums-block,
#view-search.is-loading #search-playlists-block {
  opacity: 0.45;
  pointer-events: none;
}
#search-list, #search-artists-block, #search-albums-block, #search-playlists-block {
  transition: opacity 0.15s ease;
}
.empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.search-wrap::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 13px;
  padding: 1px;
  background: conic-gradient(from var(--beam-angle), transparent 0deg, rgba(255, 255, 255, 0.85) 40deg, rgba(255, 255, 255, 0.25) 95deg, transparent 150deg, transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.search-wrap:focus-within::before {
  opacity: 1;
  animation: beam-rotate 2.8s linear infinite;
}
@keyframes beam-rotate {
  to { --beam-angle: 360deg; }
}

/* Skeletons — shadcn-style pulsing placeholder rows while lists load. */
.skel-list { display: flex; flex-direction: column; gap: 8px; }
.skel-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 10px;
  min-height: 68px;
}
.skel-row.coll { min-height: 76px; }
.skel-row.coll .skel-cover { width: 56px; height: 56px; border-radius: 14px; }
.skel-row:nth-child(2) .skel-line { width: 62%; }
.skel-row:nth-child(3) .skel-line { width: 74%; }
.skel-row:nth-child(4) .skel-line { width: 58%; }
.skel-block {
  border-radius: 8px;
  background: linear-gradient(100deg, #1b1b1f 40%, #2a2a30 50%, #1b1b1f 60%);
  background-size: 200% 100%;
  animation: skel-pulse 1.3s ease-in-out infinite;
}
.skel-cover { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 12px; }
.skel-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.skel-line { height: 11px; width: 82%; }
.skel-line.short { width: 52%; }
.skel-dur { width: 30px; height: 11px; flex: 0 0 auto; }
.skel-btn { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; opacity: 0.6; }
@keyframes skel-pulse {
  from { background-position: 120% 0; }
  to { background-position: -80% 0; }
}

/* Bottom nav — Dock-style feedback: icon springs up on the active tab,
   press feedback on tap, subtle white glow dot under the active tab. */
.nav-btn { position: relative; transition: color 0.2s ease; }
.nav-btn svg, .nav-btn span { position: relative; z-index: 1; }
.nav-btn svg { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease; }
.nav-btn.active svg {
  transform: scale(1.14) translateY(-1px);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.45));
}
.nav-btn:active svg { transform: scale(1.22) translateY(-2px); }
.nav-btn.active span { font-weight: 600; }
/* Soft pill behind the active tab (spec 03 Н-2) */
.nav-btn::before {
  content: '';
  position: absolute;
  inset: 6px 10px auto;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  transform: scale(0.6);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  pointer-events: none;
}
.nav-btn.active::before { transform: scale(1); opacity: 1; }
.nav-btn::after {
  content: '';
  position: absolute;
  bottom: 7px; left: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
  transform: translateX(-50%) scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.nav-btn.active::after { transform: translateX(-50%) scale(1); }

/* Global focus ring (spec 03 Ф-1) */
button:focus-visible, .menu-item:focus-visible, .icon-btn:focus-visible,
.glass-btn:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}
.nav-btn:focus-visible { outline-offset: -2px; }

/* ---------- lucide icons ---------- */
/* Inline Lucide SVGs: block-level inside buttons/tiles so they align
   cleanly; the liked heart fills with currentColor (solid white heart)
   while the inactive heart stays stroke-only. */
.icon-btn svg, .nav-btn svg, .pbtn svg,
.btn.heart svg, .btn.danger svg, .uq-icon-btn svg,
.dz-icon svg, .cover svg, .player-cover svg, .uq-badge svg { display: block; }
.btn.heart.liked svg, .pbtn.heart.liked svg { fill: currentColor; }
.uq-status svg { display: inline-block; }

/* ---------- icon alignment pass ---------- */
/* One geometry for every icon: block-level, never shrunk by flex, no
   baseline/line-height influence — in every context, incl. the ones the
   per-component rules above miss (hero buttons, queue status line). */
.icon-btn svg, .nav-btn svg, .pbtn svg, .btn svg, .uq-icon-btn svg,
.dz-icon svg, .cover svg, .player-cover svg, .uq-badge svg,
.lg-content svg, .uq-status svg {
  display: block;
  flex: none;
}

/* Icon-only buttons: fixed square box, glyph dead-center.
   .btn.heart/.btn.danger had the 38px box but NO flex centering, so
   their block SVGs parked at the top of the content box. */
.btn.heart, .btn.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.icon-btn, .pbtn, .uq-icon-btn { line-height: 0; }

/* Optical centering for filled media triangles (left-heavy glyphs).
   Replaces the padding-left hack on the hero play button. */
.hero-play .lg-content { padding-left: 0; }
.ic-play { transform: translateX(1px); }
.ic-play-lg { transform: translateX(2px); }
.ic-next { transform: translateX(0.5px); }
.ic-prev { transform: translateX(-0.5px); }

/* Text+icon button («Настроить»): label shares the icon's line box. */
.hero-settings .lg-content { line-height: 1; }

/* Queue status: icon + text as one centered inline-flex line instead
   of an inline SVG riding the text baseline (was vertical-align: -2px
   in the rule above; this later rule wins). */
.uq-status { display: inline-flex; align-items: center; gap: 5px; }
.uq-status svg { vertical-align: 0; }

/* ---------- phase 1: playlists / artists / albums / queue / modes ---------- */

/* Shortcut cards with icons (icon pinned to the top of the card). */
.card-icon { margin-bottom: auto; opacity: 0.92; display: block; }
.card-icon svg { display: block; }
.card-playlists { background: linear-gradient(150deg, #3a3a41, #141416); }
.card-artists { background: linear-gradient(150deg, #26262c, #101013); }
.card-albums { background: linear-gradient(150deg, #46464e, #1a1a1e); }

/* Sub-page headers with a back button. */
.view-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.view-head .page-title { margin: 0; }

/* Track row extras: plays counter + context-menu button. */
.t-plays {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--muted); flex: 0 0 auto;
}
.t-plays svg { display: block; }
.btn.menu-btn {
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  color: var(--muted); flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; line-height: 0;
}
.btn.menu-btn:active { background: rgba(255, 255, 255, 0.07); color: var(--text); }

/* ---------- section head: title + count + play-all (spec 04 Ч-5) ---- */
.section-head {
  display: flex; align-items: baseline; gap: 8px;
  margin: 26px 0 12px;
}
.section-head .section-title { margin: 0; }
.section-count {
  font-size: 13px; color: var(--muted2);
  font-variant-numeric: tabular-nums;
}
.section-play {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid var(--border); border-radius: 999px;
  color: var(--text);
  font: inherit; font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.section-play svg { display: block; }
.section-play:active { background: rgba(255, 255, 255, 0.08); }
@media (hover: hover) {
  .section-play:hover { background: var(--card2); border-color: var(--accent2); }
}
#view-home .section-head { margin: 26px 0 12px; }

/* Collection rows (playlists / artists / albums lists). */
.collection-list { display: flex; flex-direction: column; gap: 8px; }
.collection-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.15s ease;
}
.coll-chevron {
  color: var(--muted2); flex: 0 0 auto;
  display: flex; align-items: center;
}
.coll-chevron svg { display: block; }
.collection-tile {
  width: 56px; height: 56px; flex: 0 0 auto;
  border-radius: 14px; object-fit: cover;
  background: linear-gradient(135deg, #26262c, #101013);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.9);
}
.collection-tile svg { display: block; }
.collection-row .meta { flex: 1; min-width: 0; }
/* Round tile for artists (spec 06 2.4) */
.collection-tile.round { border-radius: 50%; }
/* 2x2 cover mosaic for playlists (spec 06 2.1) */
.tile-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  padding: 0;
  overflow: hidden;
  background: #101013;
}
.tile-mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Monogram fallback tile (artist initials / coverless collections) */
.tile-mono {
  font-size: 22px; font-weight: 700; color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
}
@media (min-width: 861px) {
  .collection-row { transition: border-color 0.2s ease, background 0.2s ease; }
  .collection-row:hover { border-color: rgba(255, 255, 255, 0.22); }
}

/* Playlist create / rename rows. */
.pl-create { display: flex; gap: 8px; margin-bottom: 14px; }
.pl-create input { flex: 1; margin-bottom: 0; min-width: 0; }
.pl-create .btn { flex: 0 0 auto; white-space: nowrap; }
/* Create-playlist entry row (spec 06 2.1) */
.pl-create-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 14px;
  color: var(--text);
  font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; text-align: left;
}
.pl-create-row:active { background: #1d1d21; }
.pl-create-ic {
  width: 56px; height: 56px; flex: 0 0 auto;
  border-radius: 14px;
  border: 1.5px dashed rgba(255, 255, 255, 0.35);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent2);
}
.pl-create-row.open .pl-create-ic svg { transform: rotate(45deg); }
.pl-create-ic svg { transition: transform 0.25s ease; display: block; }
.pl-rename { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.pl-rename input { flex: 1; margin-bottom: 0; min-width: 150px; }

/* Detail headers (playlist / album). */
.detail-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.detail-cover {
  width: 112px; height: 112px; flex: 0 0 auto;
  border-radius: 18px;
  background: linear-gradient(135deg, #26262c, #101013);
  background-size: cover; background-position: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
}
.detail-cover svg { display: block; width: 40px; height: 40px; }
.detail-cover.tile-mosaic { padding: 0; }
.detail-meta { flex: 1; min-width: 0; }
.detail-title { font-size: 24px; font-weight: 700; word-break: break-word; line-height: 1.15; }
.detail-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.detail-sub.standalone { margin: -4px 0 14px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.btn.primary.detail-play {
  width: auto; padding: 10px 24px;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn.primary.detail-play svg { display: block; }
.btn.shuffle-btn {
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn.shuffle-btn.active { background: #ffffff; color: #000000; border-color: #ffffff; }
.btn.icon-tool {
  width: 40px; height: 40px; padding: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn.icon-tool.danger-tool { color: var(--danger); border-color: rgba(229, 72, 77, 0.45); }
.owner-tools { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.btn.danger-outline { color: var(--danger); border-color: var(--danger); }

/* Likes hero (spec 06 2.5) — the .card-likes gradient, white heart disc */
.likes-hero {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border); border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
  background: linear-gradient(150deg, #3f3f46, #17171a);
}
.likes-hero-ic {
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
}
.likes-hero-meta { flex: 1; min-width: 0; }
.likes-hero-title { font-size: 22px; font-weight: 700; }
.likes-hero-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* Unified empty state for collections (spec 06 2.6) */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 40px 16px;
  color: var(--muted); font-size: 14px; text-align: center;
}
.empty-state .empty-state-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted2);
}
.empty-state .empty-state-icon svg { width: 26px; height: 26px; display: block; }
.empty-state .btn { margin-top: 4px; }

/* Albums as a card grid (spec 06 2.3) */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.album-grid .album-card { cursor: pointer; }
.album-grid[aria-busy="true"] { display: block; }

/* Bottom-sheet menu items (track menu / picker / queue). */
.menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 13px 12px;
  margin-bottom: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.menu-item svg { display: block; flex: none; }
.menu-item.danger { color: var(--danger); }
.picker-list { display: flex; flex-direction: column; max-height: 42vh; overflow-y: auto; }
.picker-meta { display: flex; flex-direction: column; min-width: 0; }
.picker-name {
  font-size: 15px; font-weight: 600; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.picker-sub { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.picker-create { margin: 4px 0 6px; }
.queue-row .q-num {
  width: 22px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.queue-row .q-num svg { display: block; }
.queue-row .q-label {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-row .q-dur { color: var(--muted); font-size: 12px; flex: 0 0 auto; }
.queue-row.current { border-color: var(--accent); }
.queue-row.current .q-label { font-weight: 600; color: #fff; }
/* Queue rows (spec 02 ИЗМ-8/9 + spec 04 Ч-11): denser, with covers,
   grip-drag reorder and per-row removal. */
.picker-list.queue-list { max-height: 56vh; }
.queue-list .queue-row {
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 12px;
  gap: 10px;
  transition: transform 0.18s ease;
}
.queue-row.dragging { transition: none; position: relative; z-index: 3; background: #1d1d21; }
.q-cover {
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 8px; object-fit: cover;
  background: linear-gradient(135deg, #26262c, #101013);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.9);
}
.q-cover svg { display: block; }
.q-eq { display: flex; height: 10px; margin-left: 0; flex: 0 0 auto; }
.q-grip, .q-del {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted2);
  cursor: pointer;
  border-radius: 50%;
}
.q-grip { touch-action: none; cursor: grab; }
.q-grip svg, .q-del svg { display: block; }
.q-del:active { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* Player sub-row: shuffle / repeat / queue. */
.player-sub {
  display: flex; align-items: center; gap: 6px;
  height: 38px;
  padding: 2px 10px 6px;
}
.player-sub-spacer { flex: 1; }
.player-context {
  flex: 1; min-width: 0;
  text-align: center;
  font-size: 12px; color: var(--muted2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sbtn {
  position: relative;
  width: 32px; height: 32px; flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; line-height: 0;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Hit zone 44px on ::before; the active-mode dot lives on ::after */
.sbtn::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.sbtn:active { transform: scale(0.88); }
.sbtn svg { display: block; }
.sbtn.active { color: #ffffff; border-color: transparent; }
.sbtn.active::after {
  content: '';
  position: absolute; bottom: 1px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}
.sbtn.timer-btn.active::after { display: none; }
.sbtn.timer-btn.active .timer-label { color: #fff; }
.sbtn:disabled { opacity: 0.4; cursor: default; }

/* Toast notifications: queued, animated (spec 03 Т-1). */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-safe) + var(--player-h) + 34px);
  z-index: 60;
  max-width: 90vw;
  background: #1c1c1f;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  padding: 10px 18px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 0.68, 0, 1);
}
.toast-off {
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
}
.toast-long { border-radius: 18px; }

@media (max-width: 480px) {

  .detail-cover { width: 64px; height: 64px; border-radius: 14px; }
  .detail-title { font-size: 18px; }
}

/* Phase 2: sectioned search, lyrics sheet, sleep timer. */
#view-search .section-title { font-size: 17px; margin: 20px 0 10px; }
#view-search .collection-list { margin-bottom: 4px; }
.menu-item.active { border-color: var(--accent); }
.lyrics-text {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 46vh;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
#lyrics-edit textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 180px;
  resize: vertical;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  padding: 12px;
  margin-bottom: 10px;
}
#lyrics-edit textarea:focus { border-color: var(--accent); outline: none; }
#lyrics-change { width: 100%; margin-bottom: 2px; }
.sbtn.timer-btn { width: auto; min-width: 32px; padding: 0 8px; border-radius: 999px; gap: 5px; }
.timer-label { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- edit metadata sheet + upload detection line ---------- */
.edit-label { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.edit-form input { margin-bottom: 14px; }
.uq-meta {
  font-size: 12px; color: var(--muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uq-src { color: var(--muted2); }

/* ---------- admin panel ---------- */
.card-admin { background: linear-gradient(150deg, #3f3f46, #101013); }
.head-spacer { flex: 1; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 6px;
}
.stat-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.stat-tile.accent { background: linear-gradient(150deg, #333338, #141416); }
.stat-ic { color: var(--muted2); margin-bottom: 6px; line-height: 0; }
.stat-ic svg { display: block; }
.stat-value { font-size: 24px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
@media (min-width: 861px) {
  .stat-grid { grid-template-columns: repeat(6, 1fr); }
}
.admin-error {
  background: rgba(229, 72, 77, 0.12);
  border: 1px solid rgba(229, 72, 77, 0.45);
  color: #e5484d;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin-bottom: 10px;
}
.admin-updated { font-size: 12px; color: var(--muted2); margin-bottom: 10px; min-height: 15px; }
.btn.is-loading { pointer-events: none; opacity: 0.7; }
.spark-wrap { margin: 2px 0 8px; }
.spark-wrap svg { width: 100%; height: 36px; display: block; }
.user-ava {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--card2);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 600;
  margin-right: 8px;
  vertical-align: -7px;
}
.users-table td { font-variant-numeric: tabular-nums; }
.users-table td[data-label="Загрузок"], .users-table td[data-label="Лайков"] { text-align: right; }
@media (max-width: 560px) {
  .users-table thead { display: none; }
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; width: 100%; }
  .users-table tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: var(--bg2);
  }
  .users-table td { border-bottom: none; padding: 3px 6px; text-align: left !important; }
  .users-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px; color: var(--muted2);
    margin-bottom: 1px;
  }
  .users-table td[data-label="Имя"]::before { display: none; }
}
.admin-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.kv-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 5px 0; font-size: 14px;
}
.kv-key { color: var(--muted); flex: 0 0 auto; }
.kv-val { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.bar {
  height: 8px; border-radius: 99px;
  background: var(--bg2);
  overflow: hidden;
  margin: 6px 0 8px;
}
.bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 0.6s ease;
}
.bar > div.lvl-warn { background: #d4d4d8; }
.bar > div.lvl-danger { background: var(--danger); }
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.users-table th, .users-table td {
  text-align: left;
  padding: 7px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.users-table th { color: var(--muted); font-weight: 600; }
.users-table tr:last-child td { border-bottom: none; }
.badge-admin {
  display: inline-block;
  background: var(--accent);
  color: #000;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: 1px;
}

/* Reduced motion: freeze the decorative animation, keep content visible. */
@media (prefers-reduced-motion: reduce) {
  .nav-btn svg, .nav-btn::after, .nav-btn::before { transition: none; }
  .page-enter, .page-enter-detail, .page-enter-back,
  .modal:not(.hidden) .sheet, .modal:not(.hidden) .modal-backdrop { animation: none; }
  .toast { transition: none; }
  .liquid-glass, .liquid-glass .lg-shadow, .liquid-glass .lg-distort,
  .liquid-glass .lg-shimmer { transition: none; }
  .boot-spinner, .search-spin { animation: none; }
  .lg-shimmer-spark,
  .marquee-chunk,
  .skel-block,
  .player.playing .eq span,
  .eq.on span,
  .eq span,
  .mq-inner,
  .player.playing .player-cover,
  .player-full,
  .search-wrap:focus-within::before { animation: none; }
  .eq span { transition: none; }
  .section-title .rv-char, .hero-title .rv-char {
    transition: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
}

/* ================= artist profile (VK Music-style) ================= */
.page.page-flush { padding: 0 0 8px; }

.artist-hero {
  position: relative;
  height: clamp(216px, 56vw, 300px);
  border-radius: 0 0 26px 26px;
}
.artist-hero-clip {
  position: absolute; inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: #0a0a0b;
}
.artist-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #2b2b31, #0a0a0b 72%);
  background-size: cover;
  background-position: center 28%;
  filter: brightness(0.78);
}
.artist-hero-mono {
  position: absolute;
  right: -8px; bottom: -58px;
  font-size: 230px; font-weight: 700; line-height: 1;
  color: rgba(255, 255, 255, 0.07);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}
.artist-hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 34%),
    linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.55) 26%, rgba(0, 0, 0, 0) 58%);
}
.artist-hero-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
}
.glass-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; line-height: 0; padding: 0;
}
.glass-btn svg { display: block; }
.glass-btn:active { background: rgba(255, 255, 255, 0.22); }
.artist-hero-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 0 104px 20px 18px;
}
.artist-hero-name {
  font-size: clamp(30px, 8.6vw, 44px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  overflow-wrap: anywhere;
}
.artist-hero-stats {
  margin-top: 7px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
}
.artist-follow {
  margin-top: 14px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  color: #ffffff;
  font-size: 14px; font-weight: 600; line-height: 1;
  cursor: pointer;
}
.artist-follow-icon { display: flex; line-height: 0; }
.artist-follow-icon svg { display: block; }
.artist-follow.followed { background: #ffffff; border-color: #ffffff; color: #000000; }
.artist-play {
  position: absolute; right: 18px; bottom: -32px; z-index: 4;
  width: 64px; height: 64px; border-radius: 50%;
  border: none;
  background: #ffffff; color: #000000;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  cursor: pointer; line-height: 0; padding: 0;
  transition: transform 0.18s ease;
}
.artist-play svg { display: block; }
.artist-play:active { transform: scale(0.93); }
.artist-body { padding: 16px 16px 0; }
@media (max-width: 480px) {
  .artist-body { padding: 16px 12px 0; }
  .artist-hero-info { padding-left: 14px; }
}

.mi-icon { display: flex; line-height: 0; flex: none; }
.mi-icon svg { display: block; }

/* Album cards: Magic Card spotlight comes from the shared .card treatment. */
.album-cards {
  display: flex; gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.album-cards::-webkit-scrollbar { display: none; }
.album-card {
  width: 150px; height: auto;
  padding: 10px;
  justify-content: flex-start; align-items: stretch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  gap: 8px;
}
.album-card-cover {
  width: 100%; aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: linear-gradient(135deg, #26262c, #101013);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
}
.album-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-card-name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.album-card-sub { font-size: 12px; color: var(--muted); margin-top: -4px; }
.album-card-artist { color: var(--text); cursor: pointer; }
.album-card-artist:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Similar artists: horizontal round-avatar chips. */
.artist-chips {
  display: flex; gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.artist-chips::-webkit-scrollbar { display: none; }
.artist-chip {
  flex: 0 0 auto; width: 78px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; padding: 0;
  color: var(--text); cursor: pointer; text-align: center;
}
.artist-chip-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #26262c, #101013);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  text-transform: uppercase;
  overflow: hidden;
}
.artist-chip-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artist-chip-name {
  font-size: 12.5px; font-weight: 600;
  max-width: 78px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.artist-chip-sub { font-size: 12px; color: var(--muted); margin-top: -3px; }

/* Followed marker in the artists list. */
.follow-badge {
  width: 22px; height: 22px; flex: 0 0 auto;
  border-radius: 50%;
  background: #ffffff; color: #000000;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto;
  line-height: 0;
}
.follow-badge svg { display: block; }

h1, h2, h3 { text-wrap: balance; }

/* Auth fields: the generic input[type] rule (same specificity, later in the
   file) was overriding the icon padding and margin, so icons sat on top of the
   placeholder and off-center. */
.field-wrap input[type="text"], .field-wrap input[type="password"] {
  margin-bottom: 0; padding-left: 40px; padding-right: 44px;
}
.field { margin-bottom: 26px; }

/* Mini-player only exists while a track is loaded; the page reserves its
   height only then (body.player-on is toggled by enhance.js). */
.player:not(.has-track) { display: none !important; }
body:not(.player-on) { --player-h: 0px !important; }

/* ---- Minimal mini-player: one flat row (cover, title/artist, like, play)
   with a thin progress line on the bottom edge. Prev/next, shuffle, repeat,
   timer and queue live in the fullscreen player (tap the cover or title). */
body.player-on { --player-h: 64px; }
.player {
  background: #171719;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 0; border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
.player .player-row { height: 60px; padding: 8px 6px 8px 8px; gap: 4px; }
.player .player-cover { width: 44px; height: 44px; border-radius: 8px; box-shadow: none; margin-right: 6px; }
.player.playing .player-cover { animation: none; }
.player .player-title { font-size: 15px; font-weight: 600; }
.player .player-artist { font-size: 13px; }
.player #player-prev, .player #player-next, .player .eq { display: none; }
.player .pbtn { background: transparent; border: 0; width: 44px; height: 44px; }
.player .pbtn.main { background: transparent; color: #fff; }
.player .pbtn.main svg { width: 28px; height: 28px; }
.player.buffering #player-toggle::before { border-color: rgba(255, 255, 255, 0.25); border-top-color: #fff; }
.player .seek { position: absolute; left: 0; right: 0; bottom: 0; top: auto; height: 12px; }
.player .seek::before { top: auto; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.12); }
.player .seek-buffered { top: auto; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.18); }
.player .seek-fill { top: auto; bottom: 0; height: 2px; background: #fff; }
.player .seek-thumb, .player .seek-times { display: none; }
/* shuffle/repeat/timer/queue row, relocated into the fullscreen player */
#player-full .player-sub { width: 100%; max-width: 420px; margin: 0 auto; padding: 0 20px 8px; height: auto; }
.player.has-track .eq { display: none; }
#player-full #player-queue { display: none; } /* duplicate of the «Очередь» action */

/* Bug: the artist-strip ".marquee" rules (flex, margin-top, padding, edge
   fade) also hit the long-title sliding text in the player, pushing the title
   down and clipping its start. Reset them for player text. */
.player-title.marquee, .player-artist.marquee {
  display: block; gap: 0; margin-top: 0; padding: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent);
  mask-image: linear-gradient(90deg, #000 90%, transparent);
}
.player-artist.marquee { margin-top: 1px; }

/* ================= Desktop (>=1024px): sidebar + wide content + docked player ================= */
@media (min-width: 1024px) {
  :root { --side-w: 232px; }
  body { padding-left: var(--side-w); }
  body.no-side { padding-left: 0; }   /* login / boot screens have no sidebar to make room for */
  #app { max-width: 1120px; }
  #main-view:not(.hidden) { padding-bottom: calc(var(--player-h) + 40px); }

  /* bottom dock -> left sidebar */
  .bottomnav {
    left: 0; top: 0; bottom: 0; transform: none;
    width: var(--side-w); max-width: none; height: auto;
    flex-direction: column; justify-content: flex-start; gap: 4px;
    padding: 28px 14px;
    background: #0b0b0c; backdrop-filter: none; -webkit-backdrop-filter: none;
    border: 0; border-right: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0; box-shadow: none;
  }
  .bottomnav .nav-btn {
    flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 14px;
    height: 46px; padding: 0 16px; border-radius: 12px; font-size: 15px;
  }
  .bottomnav .nav-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
  .bottomnav .nav-btn::before { inset: 0; height: auto; border-radius: 12px; }
  .bottomnav .nav-btn::after { display: none; }
  .bottomnav .nav-btn.active { color: #fff; }

  /* player docked to the bottom of the content area */
  .player {
    left: var(--side-w); right: 0; bottom: 0; transform: none;
    width: auto; max-width: none; border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07); box-shadow: none;
  }
  body.player-on { --player-h: 76px; }
  .player .player-row { height: 72px; padding: 10px 24px; gap: 10px; max-width: 1120px; margin: 0 auto; }
  .player .player-cover { width: 52px; height: 52px; }
  .player #player-prev, .player #player-next { display: flex; }
  .player .seek { top: 0; bottom: auto; height: 12px; }
  .player .seek::before, .player .seek-buffered, .player .seek-fill { top: 0; bottom: auto; height: 3px; }
  .player .seek:hover .seek-thumb { display: block; transform: translate(-50%, 0) scale(1); top: -1px; }

  /* wider lists, hover feedback */
  .track-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
  .track:hover { background: rgba(255, 255, 255, 0.05); }
  .icon-btn:hover, .btn:hover { filter: brightness(1.15); }
}

/* Home tiles: with a 2-line subtitle the fixed 96px card overflowed and shoved
   the icon up/out of its slot. Stack icon, title, subtitle from the top in a
   taller card so icons and titles line up across all tiles. */
.card { height: 112px; justify-content: flex-start; }
.card-icon { margin-bottom: 10px; }
.card-sub { line-height: 1.25; }

/* ---- Fullscreen player: sliding long title/artist, tappable artist, one-row actions ---- */
.pf-title.marquee, .pf-artist.marquee {
  display: block; gap: 0; padding: 0; text-align: left; text-overflow: clip;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.pf-title.marquee { margin-top: 0; }
.pf-artist.marquee { margin-top: 4px; }
.pf-title .mq-inner, .pf-artist .mq-inner { animation-duration: var(--mq-dur, 8s); }
#pf-artist, #player-artist { cursor: pointer; }
@media (hover: hover) { #pf-artist:hover, #player-artist:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; } }
.player-full { overflow-y: auto; }
.pf-cover { width: min(72vw, 330px, 36vh); }
.pf-actions { flex-wrap: nowrap; gap: 4px; }
.pf-act { flex: 1 1 0; width: auto; min-width: 0; font-size: 11.5px; text-align: center; line-height: 1.15; }

/* Fullscreen player: no shuffle/repeat/timer row; gestures handled in enhance.js */
#player-full .player-sub { display: none; }
#player-full { touch-action: pan-y; }

/* Fullscreen player: spread the content over the free height (no empty strip at the bottom) */
#player-full .pf-cover { margin: auto; width: min(78vw, 360px, 42vh); }
#player-full .pf-meta { margin-top: 18px; }
#player-full .pf-actions { margin-bottom: 8px; }

/* ===== Cover-colour accent + glowing border around the mini-player ===== */
@property --acc { syntax: '<color>'; inherits: true; initial-value: hsl(0 0% 100%); }
@property --beam { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
:root {
  --acc: hsl(0 0% 100%);               /* white until a cover colour is known */
  transition: --acc 1.1s ease;
  --acc-s: color-mix(in srgb, var(--acc) 16%, transparent);
  --acc-m: color-mix(in srgb, var(--acc) 38%, transparent);
  --acc-g: color-mix(in srgb, var(--acc) 62%, transparent);
}
/* mini-player: light runs around the whole border while playing */
.player { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 30px -12px var(--acc-g); }
.player::after {
  opacity: 0; transition: opacity 0.9s ease;
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none; z-index: 3;
  background: conic-gradient(from var(--beam), transparent 0 58%, color-mix(in srgb, var(--acc) 40%, transparent) 76%, var(--acc) 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: beam-spin 3.4s linear infinite;
}
@keyframes beam-spin { to { --beam: 360deg; } }
.player.playing::after { opacity: 1; transition-duration: 0.5s; }
.player .seek-fill { background: var(--btn); box-shadow: 0 0 10px var(--btn); }
.player .player-cover { box-shadow: 0 6px 20px -6px var(--acc-g); }
/* current track in lists */
.track.current { border-color: var(--acc-m); }
.track.playing { border-color: var(--acc-g); box-shadow: 0 0 28px -10px var(--acc-g); }
.track.playing .t-title { color: var(--btn); }
.cover-eq .eq span { background: var(--btn); }
.track .heart.liked, .pf-act.heart.liked, .pbtn.heart.liked { color: var(--btn); }
/* full player: tinted background and glow from the cover colour */
.player-full { background: radial-gradient(95% 55% at 50% -5%, var(--acc-m), transparent 72%), radial-gradient(80% 45% at 50% 108%, var(--acc-s), transparent 72%), linear-gradient(180deg, #101013 0%, #000000 70%); }
.pf-cover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 80px -14px var(--acc-g), 0 18px 44px rgba(0, 0, 0, 0.6); }
.seek-lg .seek-fill, .pf-seek-wrap .seek-fill { background: var(--btn); box-shadow: 0 0 12px var(--btn); }
.pf-controls .pbtn.main { box-shadow: 0 0 40px -6px var(--acc-g); }
.nav-btn.active svg { filter: drop-shadow(0 0 6px var(--btn)); }
.nav-btn::after { background: var(--btn); box-shadow: 0 0 8px var(--btn); }
@media (prefers-reduced-motion: reduce) { :root { transition: none; } .player.playing::after { animation: none; } }

/* ===== Full player: animated, flowing background in the cover colour ===== */
#player-full > * { position: relative; z-index: 1; }
.player-full::before, .player-full::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.player-full::before {
  background:
    radial-gradient(38% 30% at 22% 22%, color-mix(in srgb, var(--acc) 70%, transparent), transparent 72%),
    radial-gradient(34% 28% at 78% 48%, color-mix(in srgb, var(--acc) 45%, hsl(205 100% 68%)), transparent 72%),
    radial-gradient(40% 30% at 35% 85%, color-mix(in srgb, var(--acc) 50%, transparent), transparent 72%);
  background-size: 220% 220%;
  opacity: 0.7;
  animation: pf-flow-a 16s ease-in-out infinite alternate;
}
.player-full::after {
  background:
    radial-gradient(30% 26% at 75% 18%, color-mix(in srgb, var(--acc) 55%, hsl(320 100% 70%)), transparent 70%),
    radial-gradient(36% 30% at 18% 62%, color-mix(in srgb, var(--acc) 40%, transparent), transparent 72%);
  background-size: 240% 240%;
  opacity: 0.5;
  animation: pf-flow-b 23s ease-in-out infinite alternate, pf-breathe 7s ease-in-out infinite;
}
@keyframes pf-flow-a { 0% { background-position: 0% 10%; } 50% { background-position: 80% 60%; } 100% { background-position: 100% 100%; } }
@keyframes pf-flow-b { 0% { background-position: 100% 0%; } 50% { background-position: 20% 70%; } 100% { background-position: 0% 100%; } }
@keyframes pf-breathe { 0%, 100% { filter: brightness(0.85) saturate(1); } 50% { filter: brightness(1.25) saturate(1.3); } }
/* flows only while a track is playing; calm still image on pause */
#player-full:not(.is-playing)::before, #player-full:not(.is-playing)::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .player-full::before, .player-full::after { animation: none; } }

/* ===== repeat / shuffle in the full player, sound sheet, cover picker, playlists nav ===== */
.pf-controls { gap: 14px; }
.pf-controls .sbtn { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.pf-controls .sbtn svg { width: 22px; height: 22px; }
.pf-controls .sbtn.active { color: var(--btn); }
.pf-controls .sbtn.active::after { background: var(--btn); }
@media (max-width: 380px) { .pf-controls { gap: 8px; } .pf-controls .sbtn { width: 38px; height: 38px; } }

.snd-block { margin-bottom: 18px; }
.snd-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.snd-label { font-weight: 600; }
.snd-val { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.snd-range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); outline: none; padding: 0; margin: 6px 0; border: 0; }
.snd-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px var(--btn); border: 0; }
.snd-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; }
.snd-check { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 14px; }
.snd-check input { width: 18px; height: 18px; accent-color: #fff; }
.snd-hint { margin: 6px 0 0; font-size: 12px; color: var(--muted2); line-height: 1.4; }
.snd-switch { position: relative; width: 46px; height: 28px; flex: 0 0 auto; }
.snd-switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.snd-switch span { position: absolute; inset: 0; border-radius: 99px; background: rgba(255, 255, 255, 0.16); transition: background 0.2s; pointer-events: none; }
.snd-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.5, 1); }
.snd-switch input:checked + span { background: var(--btn); }
.snd-switch input:checked + span::after { transform: translateX(18px); }
.snd-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.snd-presets button { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.snd-presets button.active { background: var(--btn); color: #0b0b10; border-color: transparent; font-weight: 600; }
.eq-bands { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; transition: opacity 0.2s; }
.eq-bands.off { opacity: 0.55; }
.eq-band { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.eq-band input[type="range"] { -webkit-appearance: slider-vertical; appearance: slider-vertical; writing-mode: vertical-lr; direction: rtl; width: 28px; height: 120px; accent-color: #fff; padding: 0; margin: 0; background: none; border: 0; }
.eq-db { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.eq-f { font-size: 11px; color: var(--muted2); text-align: center; }
.snd-timer { margin-bottom: 8px; }
.sheet #snd-reset { margin-bottom: 8px; }
#player-full .pf-actions .pf-act { font-size: 11px; }

.uq-cover-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px dashed rgba(255, 255, 255, 0.28); background-color: rgba(255, 255, 255, 0.05); background-size: cover; background-position: center; color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.uq-cover-btn.has-cover { border-style: solid; text-shadow: 0 1px 4px #000; }
.uq-cover-btn.has-cover svg { display: none; }

.nav-playlists { display: none; }
.mini-vol { display: none; }
@media (min-width: 1024px) {
  .bottomnav .nav-playlists { display: flex; }
  .player .mini-vol { display: block; -webkit-appearance: none; appearance: none; width: 110px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); outline: none; margin: 0 8px; padding: 0; border: 0; flex: 0 0 auto; }
  .player .mini-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
}

/* ===== Full player: action labels on one baseline ===== */
#player-full .pf-actions { align-items: flex-start; }
#player-full .pf-act { justify-content: flex-start; padding: 8px 0 6px; }
#player-full .pf-act svg { flex: 0 0 22px; height: 22px; }
#player-full .pf-act span { display: block; height: 14px; line-height: 14px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ===== Full player on desktop: edge-to-edge, cover on the left, controls on the right ===== */
@media (min-width: 1024px) {
  .player-full {
    max-width: none; margin: 0; left: 0; right: 0;
    padding: 28px clamp(40px, 6vw, 110px) 36px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 560px);
    grid-template-rows: auto 1fr auto auto auto auto 1fr;
    column-gap: clamp(40px, 7vw, 130px);
    align-items: center;
  }
  #player-full .pf-top { grid-column: 1 / -1; grid-row: 1; }
  #player-full .pf-cover { grid-column: 1; grid-row: 2 / 8; margin: 0; justify-self: center; align-self: center; width: min(44vw, calc(100vh - 220px), 640px); border-radius: 28px; }
  #player-full .pf-meta { grid-column: 2; grid-row: 3; text-align: left; align-self: end; }
  #player-full .pf-title { font-size: clamp(28px, 3vw, 44px); line-height: 1.12; text-align: left; }
  #player-full .pf-artist { font-size: clamp(16px, 1.4vw, 20px); text-align: left; margin-top: 8px; }
  #player-full .pf-seek-wrap { grid-column: 2; grid-row: 4; margin-top: 32px; align-self: start; }
  #player-full .pf-controls { grid-column: 2; grid-row: 5; justify-content: center; margin-top: 18px; gap: 20px; }
  #player-full .pf-actions { grid-column: 2; grid-row: 6; justify-content: center; margin-top: 26px; gap: 8px; align-self: start; }
  #player-full .pf-act { flex: 0 0 84px; font-size: 12px; }
  #player-full .pf-act:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
  #player-full .pf-controls .pbtn:hover, #player-full .pf-controls .sbtn:hover { filter: brightness(1.2); }
  #player-full .pf-top { max-width: none; }
  .pf-context { text-align: center; }
}

/* Play counts are not shown under tracks */
.t-plays { display: none !important; }

/* ---------- Мой эфир: lighter ---------- */
.hero { padding: 26px 20px 22px; }
.hero-over, .hero .marquee { display: none !important; }
.hero-play { width: 76px; height: 76px; }
.hero-play .lg-content svg { width: 30px; height: 30px; }
.hero-title { margin-top: 16px; font-size: clamp(24px, 6vw, 30px); font-weight: 650; }
.hero-sub { margin-top: 4px; font-size: 13px; color: rgba(255, 255, 255, 0.55); }
.hero-settings {
  margin-top: 12px; padding: 7px 14px;
  font-size: 13px; font-weight: 500;
  opacity: 0.8;
}
@media (max-width: 480px) {
  .hero { padding: 22px 14px 18px; }
  .hero-play { width: 68px; height: 68px; }
}

/* ---------- Мой эфир: play button (Aceternity "Moving Border" + Magic UI "Pulsating Button") ---------- */
@property --pb-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
#ether-play {
  background: radial-gradient(circle at 50% 35%, #2a2a31 0%, #0c0c0e 75%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: visible;
}
#ether-play .lg-shadow, #ether-play .lg-distort, #ether-play .lg-shimmer { display: none; }
#ether-play::before {
  content: '';
  position: absolute; inset: -2px; border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from var(--pb-angle), transparent 0 55%, rgba(255, 255, 255, 0.95) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: pb-spin 3.2s linear infinite;
  pointer-events: none;
}
#ether-play::after {
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: pb-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
#ether-play .lg-content svg { width: 26px; height: 26px; margin-left: 3px; }
@keyframes pb-spin { to { --pb-angle: 360deg; } }
@keyframes pb-pulse { from { transform: scale(1); opacity: 0.7; } to { transform: scale(1.55); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #ether-play::before, #ether-play::after { animation: none; } }
#ether-play .lg-content { position: absolute; inset: 0; padding: 0; gap: 0; }
#ether-play .lg-content svg { margin: 0; transform: translateX(1px); }

/* ---------- Мой эфир: play button v8 (thin rotating glint) ---------- */
#ether-play {
  background: #0b0b0d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 8px 24px rgba(0, 0, 0, 0.4);
}
#ether-play::before {
  inset: 0; padding: 0;
  background: conic-gradient(from var(--pb-angle), transparent 0 70%, rgba(255, 255, 255, 0.35) 85%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%);
  mask: radial-gradient(circle, transparent 60%, #000 61%);
  -webkit-mask-composite: source-over; mask-composite: add;
  animation: pb-spin 4s linear infinite;
}
#ether-play::after { display: none; }

/* ---------- Мой эфир: poster ---------- */
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/unbounded-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/unbounded-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

.hero { --lime: #ffffff; --lime-ink: #000000; --disp: 'Unbounded', 'Onest', system-ui, sans-serif; }
/* ---------- Мой эфир: poster ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 14px;
  align-items: end;
  position: relative;
  margin: 6px -16px 0;
  padding: 28px 20px 24px;
  min-height: 0;
  text-align: left;
  border-radius: 0;
  border: 0;
  background: #0a0a0c;
  box-shadow: none;
  overflow: hidden;
}
.hero::after {
  display: block; content: ''; position: absolute; inset: auto 0 0 0; height: 70%;
  background: linear-gradient(180deg, transparent, var(--bg) 96%);
  z-index: 0; pointer-events: none;
}
.hero-over {
  display: block !important;
  font-family: var(--disp); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--lime); margin: 0 0 12px;
}
.hero-title {
  font-family: var(--disp);
  font-size: clamp(36px, 14vw, 72px);
  font-weight: 800; letter-spacing: -0.045em; line-height: 0.92;
  margin: 0; max-width: 8em; grid-column: 1;
}
.hero-sub {
  margin: 12px 0 0; font-size: 13px; grid-column: 1;
  color: rgba(241, 241, 236, 0.62);
}
.hero-settings {
  display: inline-flex; width: auto; grid-column: 1; justify-self: start;
  margin: 14px 0 0; padding: 0;
  background: none !important; box-shadow: none; border: 0;
  font-size: 13px; font-weight: 500;
  color: var(--text); text-shadow: none;
}
.hero-settings .lg-shadow, .hero-settings .lg-distort { display: none; }
.hero-settings svg { display: none; }
.hero-settings .lg-content { gap: 0; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.3); }
.hero-mode { opacity: 0.6; }
.hero-mode::before { content: '·'; margin: 0 6px; }
#ether-play {
  grid-column: 2; grid-row: 1 / span 4; align-self: end; justify-self: end;
  position: relative; z-index: 2;
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--lime); color: var(--lime-ink);
  border: 0; box-shadow: 0 10px 34px rgba(255, 255, 255, 0.18);
  overflow: visible;
}
#ether-play::before, #ether-play::after { display: none; }
#ether-play .lg-shadow, #ether-play .lg-distort, #ether-play .lg-shimmer { display: none; }
#ether-play .lg-content { position: absolute; inset: 0; padding: 0; filter: none; }
#ether-play .lg-content svg { width: 28px; height: 28px; margin: 0; transform: translateX(1.5px); filter: none; }
#ether-play:active { transform: scale(0.94); }
.hero .marquee { display: none !important; }

#ether-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero > *:not(#ether-bg) { position: relative; z-index: 1; }
#ether-play { position: relative; }

/* ---------- Easter egg: dancing cat ---------- */
.cat-egg {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
  animation: cat-bg 0.3s ease both;
}
.cat-egg.out { animation: cat-bg-out 0.38s ease both; }
.cat-egg-pop { width: var(--w); height: var(--h); animation: cat-pop 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.cat-egg.out .cat-egg-pop { animation: cat-away 0.38s ease-in both; }
.cat-egg-inner { width: 100%; height: 100%; will-change: transform; }
.cat-egg-sprite {
  width: var(--w); height: var(--h);
  background: url(/fx/cat-spin2.png) 0 0 / 1000% 600% no-repeat;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
}
.cat-egg-reveal { background: url(/fx/cat-reveal2.png) center / contain no-repeat; animation: cat-hop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.cat-egg-hint {
  position: absolute; left: 0; right: 0; bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  text-align: center; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
@keyframes cat-pop {
  from { transform: translate(var(--fx), var(--fy)) scale(0.05) rotate(-200deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes cat-away { to { transform: scale(0.1) translateY(60px); opacity: 0; } }
@keyframes cat-hop { from { transform: scale(0.6) translateY(30px); } to { transform: none; } }
@keyframes cat-bg { from { opacity: 0; } }
@keyframes cat-bg-out { to { opacity: 0; } }
#pf-context, #player-context { padding: 12px 0; margin: -12px 0; touch-action: manipulation; -webkit-user-select: none; user-select: none; }

/* ---------- track rows: flat list (from the test redesign) ---------- */
.track-list { gap: 0; }
.track {
  position: relative;
  background: none; border: 0; border-radius: 0;
  border-bottom: 1px solid var(--border);
  padding: 11px 0;
  gap: 12px;
}
.track:active, .collection-row:active { background: rgba(255, 255, 255, 0.04); }
.track.current, .track.playing { background: none; border-color: var(--border); }
.track.current::before {
  content: ''; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: #fff;
}
.cover { width: 50px; height: 50px; border-radius: 8px; background: #17171a; box-shadow: none; }
.cover-wrap, .cover-eq, .cover-hover { border-radius: 8px; }
.t-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.t-sub { font-size: 13px; color: var(--muted); }
.t-rank { color: var(--muted2); font-size: 11px; width: 20px; }

/* ---------- home shortcut cards: colourful bento ---------- */
.cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  overflow: visible; scroll-snap-type: none;
  padding: 18px 0 6px;
}
.card {
  width: auto; height: auto; min-height: 104px;
  border-radius: 20px; padding: 15px;
  justify-content: space-between; align-items: flex-start;
  color: #fff;
}
.card-icon { display: block; line-height: 0; }
.card-icon svg { width: 24px; height: 24px; }
.card-title { font-size: 16px; font-weight: 700; }
.card-sub { color: inherit; opacity: 0.75; font-size: 12px; }
.card-likes { grid-column: span 2; min-height: 84px; background: linear-gradient(120deg, #ff5e7e, #ff9a5a); }
.card-all { background: linear-gradient(140deg, #5b6cff, #8f5bff); }
.card-recent { background: linear-gradient(140deg, #13b88f, #5be0a8); color: #04241b; }
.card-playlists { background: linear-gradient(140deg, #e0a82e, #f5d36a); color: #1a1300; }
.card-artists { background: linear-gradient(140deg, #2aa9e0, #6cd0ff); color: #00212e; }
.card-albums { grid-column: span 2; background: linear-gradient(140deg, #8a8a93, #c8c8d0); color: #111; }
.card-admin { grid-column: span 2; background: #2a2a30; }

/* ---------- home cards: smaller, muted ---------- */
.cards { gap: 8px; padding-top: 14px; }
.card { min-height: 78px; border-radius: 16px; padding: 12px; color: #f1f1f3; }
.card-icon svg { width: 20px; height: 20px; }
.card-title { font-size: 14px; font-weight: 600; }
.card-sub { font-size: 11.5px; opacity: 0.62; }
.card-likes { min-height: 62px; background: linear-gradient(120deg, #6b3446, #6b4a38); }
.card-all { background: linear-gradient(140deg, #31377a, #4a3a7a); }
.card-recent { background: linear-gradient(140deg, #1d5446, #2c6b57); color: #e6f3ee; }
.card-playlists { background: linear-gradient(140deg, #6a5424, #7a6730); color: #f5ecd2; }
.card-artists { background: linear-gradient(140deg, #1f4a63, #2c6483); color: #e4f1f8; }
.card-albums { min-height: 62px; background: linear-gradient(140deg, #3b3b42, #4b4b54); color: #eee; }
.card-admin { min-height: 62px; background: #1e1e22; }

/* ---------- artist studio ---------- */
.card-studio { grid-column: span 2; min-height: 62px; background: linear-gradient(140deg, #4d3a63, #62487a); color: #f0e9f7; }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.st-tile { background: #111114; border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.st-val { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.st-label { font-size: 13px; color: var(--muted); margin-top: 2px; }
.st-sub { font-size: 12px; color: var(--muted2); margin-top: 6px; }
.st-card { background: #111114; border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin-bottom: 8px; }
.st-card-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.st-card-head span:last-child { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.st-chart svg { display: block; width: 100%; height: 90px; }
.st-chart rect.on { fill: #f1f1f3; }
.st-chart rect.off { fill: rgba(255, 255, 255, 0.14); }
.st-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted2); margin-top: 6px; }
.st-form label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.st-form textarea {
  width: 100%; resize: vertical; margin-bottom: 14px; padding: 12px 14px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); font: inherit; font-size: 15px; outline: none;
}
.st-form textarea:focus { border-color: #fff; }
.artist-about { padding: 4px 0 10px; }
.artist-about p { font-size: 14px; line-height: 1.5; color: var(--text); opacity: 0.85; white-space: pre-wrap; }
.artist-link {
  display: inline-block; margin-top: 10px; padding: 9px 16px; border-radius: 99px;
  background: #fff; color: #000; font-size: 14px; font-weight: 600; text-decoration: none;
}

/* ---------- account profile (social style) ---------- */
#view-profile { padding: 0; }
.pr-cover { height: 120px; position: relative; background: linear-gradient(120deg, #13324a, #3b1f5a); }
.pr-cover .glass-btn { position: absolute; left: 14px; top: calc(12px + env(safe-area-inset-top, 0px)); }
.pr-body { padding: 0 16px 16px; }
.pr-hd { display: flex; align-items: flex-end; gap: 12px; margin-top: -44px; position: relative; z-index: 2; }
.pr-avatar {
  width: 88px; height: 88px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; border: 4px solid var(--bg);
  font-size: 36px; font-weight: 700; color: #fff; text-transform: uppercase;
}
.pr-edit {
  margin: 0 0 4px auto; padding: 8px 15px; border-radius: 99px;
  border: 1px solid var(--border); background: none; color: var(--text); font-size: 13px; cursor: pointer;
}
.pr-edit:active { background: rgba(255, 255, 255, 0.07); }
.pr-name { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.pr-name #pr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-since { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pr-cnt { display: flex; gap: 22px; margin: 14px 0 6px; }
.pr-cnt b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.pr-cnt span { font-size: 12px; color: var(--muted); }
.pr-settings { margin: 14px 0 4px; }
.pr-settings .st-card { margin-top: 8px; }
.pr-list { background: #111114; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.pr-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border: 0; border-bottom: 1px solid var(--border);
  background: none; color: var(--text); font-size: 15px; text-align: left; text-decoration: none; cursor: pointer;
}
.pr-row:last-child { border-bottom: 0; }
.pr-row:active { background: rgba(255, 255, 255, 0.05); }
.pr-arrow { margin-left: auto; color: var(--muted2); font-size: 20px; }
.pr-logout { width: 100%; margin-top: 10px; color: #ff7a80; }
.pr-tabs { display: flex; margin: 14px -16px 8px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; background: var(--bg); }
.pr-tabs button {
  flex: 1; padding: 12px 0; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  background: none; color: var(--muted); font-size: 14px; cursor: pointer;
}
.pr-tabs button.active { color: #fff; border-bottom-color: #fff; }

/* ---------- artist applications + pictures ---------- */
.badge-artist { background: #3a3a44; color: #fff; }
.pr-status { margin-left: auto; font-size: 12px; color: var(--muted); }
.pr-status + .pr-arrow { margin-left: 8px; }
#avatar.has-img { color: transparent; }
.ap-lead { font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
.ap-sub { font-size: 14px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.ap-check { display: flex !important; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text) !important; margin: 4px 0 14px !important; line-height: 1.4; }
.ap-check input { margin-top: 2px; flex: none; }
#apply-status .btn { margin-top: 12px; }
.ap-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.ap-item:last-child { border-bottom: 0; }
.ap-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.ap-head span { font-size: 12px; color: var(--muted); }
.ap-link { display: block; font-size: 13px; color: #8ab4ff; word-break: break-all; margin-bottom: 6px; }
.ap-msg { font-size: 13px; color: var(--muted); margin: 0 0 8px; line-height: 1.45; }
.ap-note { margin: 4px 0 8px !important; }
.ap-btns { display: flex; gap: 8px; }
.ap-btns .btn { flex: 1; width: auto; }
.ap-empty { padding: 14px 0; color: var(--muted); font-size: 14px; }
.ap-res { font-size: 13px; }
.ap-res.approved { color: #7ddba0; }
.ap-res.rejected { color: #ff8a8f; }

/* ---------- profile: tap-to-change pictures + settings panel ---------- */
.pr-cover { cursor: pointer; }
.pr-cam {
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, 0.62); border: 1px solid rgba(255, 255, 255, 0.32); color: #fff; cursor: pointer; padding: 0;
}
.pr-cam-banner { position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; }
.pr-avatar-wrap { position: relative; flex: 0 0 auto; }
.pr-cam-avatar { position: absolute; right: -2px; bottom: 2px; width: 30px; height: 30px; }
.pr-x {
  position: absolute; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.62); border: 1px solid rgba(255, 255, 255, 0.32); color: #fff; font-size: 16px; line-height: 1; padding: 0 0 2px; cursor: pointer;
}
.pr-x-banner { right: 56px; bottom: 18px; }
.pr-x-avatar { left: -2px; bottom: 6px; }
.pr-panel { background: #111114; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.pr-set { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.pr-set-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pr-set-t { font-size: 15px; }
.pr-set-t small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pr-set .snd-range { margin: 12px 0 2px; }
.sw { width: 46px; height: 28px; border-radius: 99px; border: 0; background: #34343b; position: relative; flex: none; cursor: pointer; padding: 0; transition: background 0.2s; }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left 0.2s; }
.sw.on { background: #31c46b; }
.sw.on::after { left: 21px; }

/* ---------- profile: less template, more type (no boxes, no green) ---------- */
.pr-panel { background: none; border: 0; border-radius: 0; overflow: visible; }
.pr-settings { margin: 18px 0 6px; }
.pr-set { padding: 18px 0; border-bottom: 1px solid var(--border); }
.pr-set-t { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.pr-set-t small { font-size: 13px; margin-top: 3px; }
.pr-row { padding: 17px 0; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; border-bottom: 1px solid var(--border); }
.pr-row:active { background: none; opacity: 0.55; }
.pr-arrow { font-size: 0; }
.pr-arrow::before { content: '→'; font-size: 15px; color: var(--muted2); }
.pr-status { font-size: 12px; }
.sw { width: 40px; height: 22px; background: transparent; border: 1.5px solid #fff; }
.sw::after { width: 14px; height: 14px; left: 3px; top: 2.5px; background: #fff; }
.sw.on { background: #fff; border-color: #fff; }
.sw.on::after { left: 21px; background: #000; }
.pr-set .snd-range { height: 2px; background: rgba(255, 255, 255, 0.25); }
.pr-set .snd-range::-webkit-slider-thumb { width: 14px; height: 14px; box-shadow: none; }
.pr-logout { background: none; border: 0; padding: 18px 0; text-align: left; font-size: 17px; font-weight: 500; border-radius: 0; }
/* picture controls: tidy camera chips */
.pr-cam { display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.28); color: #fff; border-radius: 99px; padding: 0; cursor: pointer; }
.pr-cam svg { display: block; }
.pr-cam::before { content: none; }
.pr-cam-banner { position: absolute; right: 12px; bottom: 12px; height: 34px; padding: 0 14px 0 11px; font-size: 13px; width: auto; }
.pr-cam-avatar { position: absolute; right: -2px; bottom: 2px; width: 30px; height: 30px; left: auto; transform: none; }
.pr-avatar { overflow: hidden; }
.pr-since { letter-spacing: 0.02em; }
.pr-cnt b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.pr-edit { border: 0; padding: 8px 0; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(255,255,255,.35); border-radius: 0; font-size: 14px; }

button.btn.pr-logout { background: none !important; border: 0; border-radius: 0; padding: 18px 0; margin: 0; width: 100%; text-align: left; font-size: 17px; font-weight: 500; color: #ff7a80; }
button.btn.pr-logout:active { opacity: 0.55; }

/* ---------- picture menu (port of 21st.dev "Smooth Dropdown") ---------- */
.sd { position: absolute; right: 12px; top: calc(12px + env(safe-area-inset-top, 0px)); width: 40px; height: 40px; z-index: 7; }
.sd-box {
  position: absolute; top: 0; right: 0; width: 40px; height: 40px;
  border-radius: 12px; background: #1c1c21; border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); overflow: hidden; cursor: pointer; transform-origin: top right;
  transition: width 0.46s cubic-bezier(0.2, 1.2, 0.35, 1), height 0.46s cubic-bezier(0.2, 1.2, 0.35, 1), border-radius 0.3s ease;
  outline: none;
}
.sd.open .sd-box { width: 224px; border-radius: 14px; cursor: default; }
.sd-dots { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); transition: opacity 0.15s, transform 0.15s; }
.sd.open .sd-dots { opacity: 0; transform: scale(0.8); pointer-events: none; }
.sd-list { list-style: none; margin: 0; padding: 8px; position: relative; opacity: 0; transition: opacity 0.2s ease 0.08s; pointer-events: none; }
.sd.open .sd-list { opacity: 1; pointer-events: auto; }
.sd-it { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; z-index: 1;
  opacity: 0; transform: translateX(8px); transition: opacity 0.15s cubic-bezier(0.23, 1, 0.32, 1), transform 0.15s cubic-bezier(0.23, 1, 0.32, 1), color 0.2s; }
.sd.open .sd-it { opacity: 1; transform: none; }
.sd-it:hover, .sd-it:active { color: var(--text); }
.sd-it.danger:hover, .sd-it.danger:active { color: #ff6b70; }
.sd-it[hidden], .sd-hr[hidden] { display: none; }
.sd-hr { height: 1px; background: var(--border); margin: 6px 4px; opacity: 0; transition: opacity 0.15s; }
.sd.open .sd-hr { opacity: 1; }
.sd-ind { position: absolute; left: 8px; right: 8px; top: 8px; height: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.08);
  opacity: 0; transition: transform 0.28s cubic-bezier(0.25, 1.1, 0.4, 1), height 0.28s cubic-bezier(0.25, 1.1, 0.4, 1), opacity 0.15s; pointer-events: none; z-index: 0; }
.sd-ind.danger { background: rgba(255, 90, 95, 0.12); }
.sd-bar { position: absolute; left: 8px; top: 8px; width: 3px; height: 20px; border-radius: 2px; background: #fff;
  opacity: 0; transition: transform 0.28s cubic-bezier(0.25, 1.1, 0.4, 1), opacity 0.15s; pointer-events: none; z-index: 1; }
.sd-bar.danger { background: #ff5a5f; }
.sd-ind.on, .sd-bar.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .sd-box, .sd-ind, .sd-bar, .sd-it { transition: none; } }

.sd-box { background: #000; border-color: rgba(255, 255, 255, 0.16); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9); }
.sd-ind { background: rgba(255, 255, 255, 0.1); }
.sd.open .sd-box { width: 216px; }
.sd-it span { white-space: nowrap; }

/* ---------- home header (from the test redesign) ---------- */
.home-header { --disp: 'Unbounded', 'Onest', system-ui, sans-serif; background: rgba(7, 7, 8, 0.82); padding: 12px 16px; gap: 12px; }
.home-header .avatar {
  order: 3; width: 34px; height: 34px; border-radius: 10px;
  background: #fff; color: #000;
  font-family: var(--disp); font-size: 14px; font-weight: 700;
  background-size: cover; background-position: center;
}
.home-header .avatar.has-img { color: transparent; }
.home-header .username {
  order: 1; font-family: var(--disp); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text);
}
.home-header .username::before {
  content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 9px;
  border-radius: 50%; background: #fff; vertical-align: 1px;
}
.home-header .username .badge-admin { display: none; }
.home-header #goto-search { order: 2; }
.home-header #logout-btn { order: 4; }
.home-header .icon-btn { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.home-header .icon-btn:active { background: rgba(255, 255, 255, 0.08); }

.sd.open .sd-box { width: 252px; }
.sd-list { max-height: calc(100vh - 150px); overflow-y: auto; }
.pr-body #pr-pw-form { margin: 14px 0 4px; }

/* ---------- Мои лайки: big type, no card ---------- */
.likes-hero.card-likes {
  display: block; grid-column: auto; min-height: 0; width: auto; height: auto;
  background: none !important; border: 0; border-radius: 0; box-shadow: none; padding: 8px 0 0; color: var(--text);
}
.likes-hero-ic { display: none !important; }
.likes-hero-meta { padding: 0; }
.likes-hero-title { font-size: clamp(36px, 12vw, 48px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 0; }
.likes-hero-sub { font-size: 14px; color: var(--muted); margin-top: 8px; opacity: 1; }
#view-likes .detail-actions { margin: 16px 0 6px; }

.likes-hero.card-likes { position: relative; overflow: visible; }
.likes-hero.card-likes::before {
  content: ''; position: absolute; left: -16px; right: -16px; top: -16px; height: 200px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 15% 0%, rgba(255, 94, 126, 0.34), transparent 62%), radial-gradient(ellipse at 95% 30%, rgba(106, 92, 255, 0.22), transparent 60%);
}
.likes-hero.card-likes::after {
  content: ''; position: absolute; right: -6px; top: -4px; width: 120px; height: 110px; pointer-events: none; opacity: 0.16;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9.5a5.5 5.5 0 0 1 9.6-3.7.56.56 0 0 0 .8 0A5.5 5.5 0 0 1 22 9.5c0 2.3-1.5 4-3 5.5l-5.5 5.3a2 2 0 0 1-3 0L5 15c-1.5-1.5-3-3.2-3-5.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.likes-extra { display: flex; align-items: center; gap: 12px; margin-top: 14px; min-height: 28px; }
.likes-stack { display: flex; flex: none; }
.likes-stack i { width: 30px; height: 30px; border-radius: 8px; background: #222 center / cover; border: 2px solid var(--bg); margin-left: -10px; position: relative; }
.likes-stack i:first-child { margin-left: 0; }
.likes-artists { font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Моя музыка (library screen) ---------- */
#view-likes:not(.lib-full) > :not(#lib) { display: none; }
#view-likes.lib-full > #lib { display: none; }
.lib-back { display: none; background: none; border: 0; color: var(--text); font-size: 15px; padding: 6px 0 12px; cursor: pointer; }
#view-likes.lib-full > .lib-back { display: block; }
.lib-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.lib-ava { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; background: #26262b center / cover; font-weight: 700; color: #fff; cursor: pointer; }
.lib-ava.has-img { color: transparent; }
.lib-title { flex: 1; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.lib-sec { display: flex; align-items: baseline; gap: 10px; width: 100%; background: none; border: 0; color: var(--text); text-align: left; padding: 6px 0 10px; cursor: pointer; }
.lib-sec-t { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.lib-sec-n { font-size: 15px; color: var(--muted); }
.lib-sec-go { margin-left: auto; align-self: center; width: 38px; height: 38px; border-radius: 50%; background: #1d1d21; display: grid; place-items: center; font-size: 22px; color: var(--muted); }
.lib-cols { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.lib-cols::-webkit-scrollbar { display: none; }
.lib-col { flex: 0 0 calc(100% - 34px); scroll-snap-align: start; }
.lib-col .track { border-bottom: 0; padding: 7px 0; }
.lib-mix { display: block; width: 100%; background: none; border: 0; color: var(--text); text-align: center; padding: 26px 0 6px; cursor: pointer; }
.lib-mix-t { display: inline-flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.lib-mix-s { display: block; margin-top: 8px; font-size: 16px; color: var(--muted); }
.lib-bars { display: flex; align-items: flex-end; gap: 3px; height: 74px; margin: 6px -16px -1px; padding: 0 3px; -webkit-mask-image: linear-gradient(transparent, #000 70%); mask-image: linear-gradient(transparent, #000 70%); }
.lib-bars i { flex: 1; height: 100%; border-radius: 3px 3px 0 0; background: linear-gradient(to top, #e040fb, rgba(224, 64, 251, 0.15)); transform-origin: bottom; animation: lib-eq 1.4s ease-in-out infinite alternate; }
@keyframes lib-eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
.lib-sheet { background: #151518; border-radius: 28px 28px 0 0; margin: 0 -16px; padding: 22px 16px 24px; }
.lib-sheet-t { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }
.lib-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lib-tile { position: relative; overflow: hidden; min-height: 104px; border: 0; border-radius: 18px; background: #232328; color: var(--text); text-align: left; padding: 18px 14px 18px 18px; cursor: pointer; display: flex; align-items: center; }
.lib-tile:active { background: #2b2b31; }
.lib-tile-t { font-size: 17px; font-weight: 500; line-height: 1.25; max-width: 60%; position: relative; z-index: 1; }
.lib-tile-t small { display: block; font-size: 15px; color: var(--muted); margin-top: 4px; }
.lib-stack { position: absolute; right: -8px; top: 8px; width: 90px; height: 90px; }
.lib-stack i { position: absolute; width: 66px; height: 66px; border-radius: 10px; background: #333 center / cover; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); }
.lib-stack i:nth-child(1) { right: 22px; top: 10px; transform: rotate(-8deg); }
.lib-stack i:nth-child(2) { right: -6px; top: 22px; transform: rotate(7deg); z-index: 1; }
@media (prefers-reduced-motion: reduce) { .lib-bars i { animation: none; transform: scaleY(0.6); } }

/* ---------- collections (artists, playlists, albums): same flat rows as tracks ---------- */
.collection-list { display: flex; flex-direction: column; gap: 0; }
.collection-row {
  background: none; border: 0; border-radius: 0; border-bottom: 1px solid var(--border);
  padding: 11px 0; gap: 12px; overflow: visible;
}
.collection-row:active { background: rgba(255, 255, 255, 0.04); }
.collection-tile { width: 50px; height: 50px; border-radius: 8px; box-shadow: none; background: #17171a; }
.collection-tile.round { border-radius: 8px; }
.collection-tile.tile-mosaic { border-radius: 8px; }
.tile-mono { font-size: 20px; }
.collection-row .t-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.collection-row .t-sub { font-size: 13px; color: var(--muted); }
.coll-chevron { color: var(--muted2); }
.pl-create-row { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 11px 0; margin-bottom: 0; }
.pl-create-ic { width: 50px; height: 50px; border-radius: 8px; }
@media (min-width: 861px) { .collection-row:hover { border-color: var(--border); background: rgba(255, 255, 255, 0.03); } }

/* ---------- arrow buttons: plain grey chevron, no circle ---------- */
.lib-sec-go { width: auto; height: auto; background: none; border-radius: 0; font-size: 30px; line-height: 1; color: var(--muted); padding: 0 2px; }
.lib-sec:active .lib-sec-go { color: var(--text); }
.coll-chevron { color: var(--muted2); }
.pr-arrow { font-size: 20px; color: var(--muted2); }
.pr-arrow::before { content: none; }

/* ---------- full player: neighbouring covers peek in from the sides ---------- */
.pf-peek {
  position: absolute; z-index: 1; border-radius: 20px;
  background: #26262c center / cover no-repeat;
  opacity: 0.55; filter: brightness(0.62) saturate(0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.pf-peek.nocover { background: linear-gradient(135deg, #2b2b32, #131316); }
#player-full { overflow-x: hidden; }
#player-full .pf-cover { position: relative; z-index: 2; }
@media (min-width: 1024px) { .pf-peek { display: none !important; } }

/* the "#player-full > *" rule above would make the peeks static: beat it */
#player-full > .pf-peek { position: absolute; z-index: 1; }

/* smoother swipes: no filters on the neighbours, and the animated glow stops while a finger is down */
.pf-peek { filter: none; opacity: 0.6; will-change: transform, opacity; backface-visibility: hidden; }
#player-full.pf-drag::before, #player-full.pf-drag::after { animation-play-state: paused !important; }
#player-full .pf-cover { will-change: transform, opacity; backface-visibility: hidden; }

/* ---------- studio tabs ---------- */
.st-tabs { display: flex; margin: 0 -16px 14px; padding: 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tabs button { flex: none; padding: 12px 0; margin-right: 22px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font-size: 15px; cursor: pointer; }
.st-tabs button.active { color: #fff; border-bottom-color: #fff; }
.st-empty-note { padding: 18px 0; color: var(--muted); font-size: 14px; }

/* ---------- like animation ---------- */
@keyframes like-pop { 0% { transform: scale(1); } 30% { transform: scale(1.45); } 55% { transform: scale(0.88); } 100% { transform: scale(1); } }
@keyframes like-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc, #fff) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.like-pop svg { animation: like-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.btn.heart.like-pop, .pbtn.heart.like-pop { animation: like-ring 0.55s ease-out; }
@media (prefers-reduced-motion: reduce) { .like-pop svg, .btn.heart.like-pop, .pbtn.heart.like-pop { animation: none; } }

/* ===== full player background: compositor-only animation (transform/opacity), no per-frame repaint ===== */
.player-full::before, .player-full::after {
  background-size: 100% 100%; background-position: 0 0;
  will-change: transform, opacity; backface-visibility: hidden; transform: translateZ(0);
}
.player-full::before { opacity: 0.7; animation: pf-drift-a 16s ease-in-out infinite alternate; }
.player-full::after { opacity: 0.45; animation: pf-drift-b 23s ease-in-out infinite alternate, pf-glow 7s ease-in-out infinite; }
@keyframes pf-drift-a { from { transform: translate3d(-6%, -4%, 0) scale(1.05) rotate(0deg); } to { transform: translate3d(8%, 6%, 0) scale(1.25) rotate(6deg); } }
@keyframes pf-drift-b { from { transform: translate3d(7%, 5%, 0) scale(1.2) rotate(4deg); } to { transform: translate3d(-8%, -6%, 0) scale(1.05) rotate(-5deg); } }
@keyframes pf-glow { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.65; } }
@media (prefers-reduced-motion: reduce) { .player-full::before, .player-full::after { animation: none; } }

/* the 1.1s accent crossfade repaints the whole document every frame: skip it while the full player is open */
html:has(body.pf-open) { transition: none !important; }
@keyframes pf-drift-a { from { transform: translate3d(-5%, -3%, 0) scale(1); } to { transform: translate3d(6%, 4%, 0) scale(1.1); } }
@keyframes pf-drift-b { from { transform: translate3d(5%, 4%, 0) scale(1.08); } to { transform: translate3d(-6%, -4%, 0) scale(1); } }

/* ===== full player: handle pill instead of the round close button ===== */
.pf-top { position: relative; padding-top: 16px; }
.pf-top-spacer { display: none; }
.pf-context { flex: 1 1 auto; text-align: center; }
#pf-close.glass-btn {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 132px; height: 34px; border-radius: 0; border: 0; background: none;
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; z-index: 3;
}
#pf-close.glass-btn svg { display: none; }
#pf-close.glass-btn::after {
  content: ''; position: absolute; left: 50%; top: 14px; width: 44px; height: 5px; margin-left: -22px;
  border-radius: 3px; background: rgba(255, 255, 255, 0.38); transition: width 0.25s cubic-bezier(0.34, 1.56, 0.5, 1), background 0.2s;
}
#pf-close.glass-btn:active { background: none; }
#pf-close.glass-btn:active::after { width: 64px; background: rgba(255, 255, 255, 0.75); }

/* ===== full player: three main actions + "more" sheet ===== */
.pf-sheet-scrim { position: fixed; inset: 0; z-index: 5; opacity: 0; pointer-events: none; background: rgba(0, 0, 0, 0.35); transition: opacity 0.3s; }
#player-full > .pf-sheet-scrim { position: fixed; z-index: 5; }
.pf-sheet-scrim.open { opacity: 1; pointer-events: auto; }
#player-full > .pf-sheet {
  position: fixed; z-index: 6; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100vw - 28px), 440px); margin: 0 auto; padding: 14px 8px 8px;
  display: flex; justify-content: space-around; gap: 4px; border-radius: 22px;
  background: rgba(22, 26, 24, 0.94); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 18px 48px rgba(0, 0, 0, 0.6);
  transform: translateY(130%); visibility: hidden;
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.38s;
}
#player-full > .pf-sheet.open { transform: none; visibility: visible; transition-delay: 0s; }
.pf-sheet .pf-act { flex: 1 1 0; }
#pf-more[aria-expanded="true"] { color: #fff; }

/* ===== full player main button: cover colour + live equaliser bars while playing, pulse ring ===== */
#player-full .pf-controls .pbtn.main {
  background: var(--btn); color: #03150a; border: 0;
  box-shadow: 0 0 44px -4px var(--acc-g), inset 0 -3px 8px rgba(0, 0, 0, 0.14);
}
#player-full.is-playing:not(.buffering) #pf-toggle svg { visibility: hidden; }
#player-full.is-playing:not(.buffering) #pf-toggle::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 6px 40% no-repeat,
    linear-gradient(currentColor, currentColor) 50% 100% / 6px 80% no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 6px 55% no-repeat;
  border-radius: 2px; animation: pf-bars 1s ease-in-out infinite;
}
@keyframes pf-bars {
  0%, 100% { background-size: 6px 30%, 6px 85%, 6px 50%; }
  35% { background-size: 6px 90%, 6px 40%, 6px 80%; }
  70% { background-size: 6px 55%, 6px 100%, 6px 35%; }
}
#player-full.is-playing:not(.buffering) #pf-toggle::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--btn);
  pointer-events: none; animation: pf-pulse 1.9s ease-out infinite;
}
@keyframes pf-pulse { 0% { transform: scale(1); opacity: 0.75; } 100% { transform: scale(1.5); opacity: 0; } }
#player-full.pf-drag #pf-toggle::after, #player-full.pf-drag #pf-toggle::before { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { #player-full #pf-toggle::before, #player-full #pf-toggle::after { animation: none !important; } }

/* smaller transport buttons */
#player-full .pf-controls { gap: 12px; }
#player-full .pf-controls .pbtn { width: 46px; height: 46px; }
#player-full .pf-controls .pbtn.main { width: 60px; height: 60px; }
#player-full .pf-controls .pbtn svg { width: 22px; height: 22px; }
#player-full .pf-controls .pbtn.main svg { width: 26px; height: 26px; }
#player-full .pf-controls .sbtn { width: 38px; height: 38px; }
#player-full .pf-controls .sbtn svg { width: 19px; height: 19px; }
#player-full.is-playing:not(.buffering) #pf-toggle::before { width: 22px; height: 22px; margin: -11px 0 0 -11px; }

/* livelier full-player glow: wide drift + out-of-phase breathing, still transform/opacity only; fixed so it never adds scroll height */
.player-full::before, .player-full::after { position: fixed; inset: 0; }
.player-full::before { opacity: 0.8; animation: pf-drift-a 11s ease-in-out infinite alternate, pf-glow-a 5.5s ease-in-out infinite; }
.player-full::after { opacity: 0.5; animation: pf-drift-b 15s ease-in-out infinite alternate, pf-glow 7s ease-in-out infinite; }
@keyframes pf-drift-a { from { transform: translate3d(-24%, -14%, 0) scale(1.05) rotate(-18deg); } to { transform: translate3d(22%, 16%, 0) scale(1.6) rotate(22deg); } }
@keyframes pf-drift-b { from { transform: translate3d(26%, 15%, 0) scale(1.5) rotate(20deg); } to { transform: translate3d(-22%, -18%, 0) scale(1.05) rotate(-24deg); } }
@keyframes pf-glow-a { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.95; } }
@keyframes pf-glow { 0%, 100% { opacity: 0.8; } 50% { opacity: 0.25; } }

/* full-player glow v3: three small soft blobs (no big rotated layers, so no visible layer edges) */
.player-full::before, .player-full::after { content: none !important; animation: none !important; }
#player-full > .pf-blobs { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.pf-blobs i { position: absolute; left: 50%; top: 50%; width: 90vmin; height: 90vmin; margin: -45vmin 0 0 -45vmin; display: block;
  border-radius: 50%; will-change: transform, opacity; backface-visibility: hidden; }
.pf-blobs .b1 { background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 80%, transparent), transparent); animation: pfb1 11s ease-in-out infinite alternate; }
.pf-blobs .b2 { background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 50%, hsl(205 100% 68%)), transparent); animation: pfb2 14s ease-in-out infinite alternate; }
.pf-blobs .b3 { background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 45%, hsl(320 100% 70%)), transparent); animation: pfb3 17s ease-in-out infinite alternate; }
@keyframes pfb1 { from { transform: translate3d(-45vw, -32vh, 0) scale(0.8); opacity: 0.35; } to { transform: translate3d(30vw, 14vh, 0) scale(1.35); opacity: 0.85; } }
@keyframes pfb2 { from { transform: translate3d(40vw, -10vh, 0) scale(1.2); opacity: 0.8; } to { transform: translate3d(-35vw, 30vh, 0) scale(0.8); opacity: 0.3; } }
@keyframes pfb3 { from { transform: translate3d(-30vw, 38vh, 0) scale(0.9); opacity: 0.25; } to { transform: translate3d(32vw, -34vh, 0) scale(1.3); opacity: 0.6; } }
#player-full:not(.is-playing) .pf-blobs i, #player-full.pf-drag .pf-blobs i { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .pf-blobs i { animation: none; } }

/* full player (A): big title on the left, heart on the right, soft glow behind the block, no scrollbar */
#player-full { scrollbar-width: none; }
#player-full::-webkit-scrollbar { display: none; }
.pf-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.pf-meta-text { flex: 1 1 auto; min-width: 0; }
@media (max-width: 1023px) {
  #player-full .pf-title { font-size: 25px; line-height: 1.12; letter-spacing: -0.01em; text-align: left; }
  #player-full .pf-artist { font-size: 15px; text-align: left; margin-top: 4px; }
}
#player-full .pf-meta #pf-like { flex: 0 0 auto; width: 46px; height: 46px; padding: 0; border-radius: 50%; display: grid; place-items: center; }
#player-full .pf-meta #pf-like span { display: none; }
#player-full .pf-meta #pf-like svg { width: 26px; height: 26px; }
#player-full .pf-meta #pf-like.liked { color: var(--btn); }
.pf-blobs .b4 { top: 64%; width: 120vmin; height: 70vmin; margin: -35vmin 0 0 -60vmin;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 55%, transparent), transparent); opacity: 0.5; animation: pfb4 6s ease-in-out infinite alternate; }
@keyframes pfb4 { from { transform: scale(0.92); opacity: 0.35; } to { transform: scale(1.1); opacity: 0.65; } }

/* playing row: soft rounded highlight instead of a hard black box with glow */
.track.playing, .track.current {
  margin-inline: -10px; padding-inline: 10px; border-radius: 14px;
  background: color-mix(in srgb, var(--acc) 13%, transparent);
  border-color: transparent; box-shadow: none;
}
.track.playing + .track, .track.current + .track { border-top-color: transparent; }
/* full-player heart: flush with the right edge, centred on the title block */
#player-full .pf-meta #pf-like { margin-right: -11px; align-self: center; padding: 0; justify-content: center; }
#player-full .pf-meta #pf-like svg { flex: 0 0 auto; width: 26px; height: 26px; }
/* albums grid: never collapse to block while loading, keep covers square */
.album-grid[aria-busy="true"] { display: grid; }
.album-grid .album-card { width: auto; min-width: 0; }
.album-grid .album-card-cover { aspect-ratio: 1 / 1; max-height: none; }
.album-grid .album-card-cover img { height: 100%; max-width: 100%; }

/* search results grouped by artist */
.sg-head{display:flex;align-items:center;gap:10px;width:100%;padding:12px 4px 4px;background:none;border:0;color:inherit;font:inherit;text-align:left;cursor:pointer}
.sg-av{width:28px;height:28px;border-radius:50%;overflow:hidden;flex:none;display:block}
.sg-av .cover,.sg-av img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.sg-name{font-weight:700;font-size:14px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sg-all{font-size:12px;color:var(--accent,#ff4d6d);flex:none}

/* auth: flat sign-in screen, same look as the test build (skin v2), only on #auth-view.
   The Вход / Регистрация tab pair stays in the markup (app.js drives it) but is hidden;
   the text link under the form switches the mode. :where() keeps the original specificity,
   so focus / error borders still win exactly as before. */
.auth-seg { display: none; }
#auth-view {
  --bg: #070708;
  --card: #0f0f11;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f1f1ec;
  --muted: #9a9aa2;
  --muted2: #5d5d65;
  --lime: #ffffff;
  --lime-ink: #000000;
  --disp: 'Unbounded', 'Onest', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
body:has(#auth-view:not(.hidden)) { background: #070708; }
:where(#auth-view) .btn { border-radius: 10px; background: rgba(255, 255, 255, 0.06); border: 0; font-weight: 500; }
:where(#auth-view) .btn.primary { background: var(--lime); color: var(--lime-ink); font-weight: 700; }
:where(#auth-view) input[type="text"], :where(#auth-view) input[type="password"] {
  background: #101012; border: 1px solid var(--border); border-radius: 10px;
}
:where(#auth-view) input:focus { border-color: var(--lime); }
:where(#auth-view) .auth-card {
  background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  text-align: left;
}
:where(#auth-view) .auth-card .logo {
  font-family: var(--disp); font-size: 38px; font-weight: 700; letter-spacing: -0.04em; line-height: 1;
  display: block; text-align: left;
}
:where(#auth-view) .auth-card .logo-mark { display: none; }
:where(#auth-view) .tagline { text-align: left; color: var(--muted); }
:where(#auth-view) .auth-mode {
  text-align: left; font-family: var(--disp); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--lime);
}
:where(#auth-view) .auth-form .btn.primary, :where(#auth-view) .auth-form .btn.primary.liquid-glass {
  background: var(--lime); color: var(--lime-ink); border-radius: 12px; box-shadow: none;
}
:where(#auth-view) .auth-form .liquid-glass .lg-shadow, :where(#auth-view) .auth-form .liquid-glass .lg-distort { display: none; }
:where(#auth-view) .auth-form .switch a { color: var(--lime); }
.boot-logo { font-family: 'Unbounded', 'Onest', system-ui, sans-serif; }

.addlink-row { display: flex; gap: 8px; }
.addlink-row input, .addlink-artist { flex: 1; min-width: 0; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: inherit; padding: 0 12px; font: inherit; }
.addlink-artist { width: 100%; margin-top: 8px; }
.addlink-jobs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.addlink-job { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.addlink-job span.n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addlink-job .st { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); flex: none; }
.addlink-job .st.done { color: #4cc38a; border-color: #4cc38a; }
.addlink-job .st.working, .addlink-job .st.queued { color: #e8b04b; border-color: #e8b04b; }
.addlink-job .st.error { color: #ff6b6b; border-color: #ff6b6b; }

/* ===== waveform seek bar ===== */
.seek.wavy::before, .seek.wavy .seek-buffered, .seek.wavy .seek-fill, .seek.wavy .seek-thumb { display: none !important; }
.seek.wavy .wave { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; padding: 0; pointer-events: none; }
.seek.wavy .wave i { flex: 1 1 0; min-width: 1px; height: calc(var(--h, 0.5) * 100%); border-radius: 2px; background: rgba(255, 255, 255, 0.2); transform-origin: center; transition: background 0.25s; }
.seek.wavy .wave i.on { background: var(--btn, #fff); }
.seek.wavy:hover .wave i:not(.on) { background: rgba(255, 255, 255, 0.32); }
.seek.wavy.dragging .wave i.on { filter: brightness(1.25); }
@keyframes wv-on { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.5); } }
@keyframes wv-off { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.82); } }
.player.playing .seek.wavy .wave i.on, #player-full.is-playing .seek.wavy .wave i.on { animation: wv-on 1.15s ease-in-out infinite; animation-delay: var(--d, 0ms); }
.player.playing .seek.wavy .wave i:not(.on), #player-full.is-playing .seek.wavy .wave i:not(.on) { animation: wv-off 1.8s ease-in-out infinite; animation-delay: var(--d, 0ms); }
.seek-lg.wavy, .pf-seek-wrap .seek.wavy { height: 22px; }
.seek-lg.wavy .seek-times, .pf-seek-wrap .seek.wavy .seek-times { top: 28px; left: 0; right: 0; }
.pf-seek-wrap { padding-bottom: 14px; }
@media (min-width: 1024px) {
  .player { overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { .seek.wavy .wave i { animation: none !important; } }

/* ===== volume button with popup ===== */
.vol-wrap { display: none; position: relative; flex: 0 0 auto; }
@media (min-width: 1024px) { .vol-wrap { display: block; } }
.player .vol-wrap .vol-btn { background: transparent; border: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: inherit; cursor: pointer; }
.vol-pop { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 6px); padding-bottom: 8px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.15s, transform 0.15s, visibility 0.15s; z-index: 40; }
.vol-pop > .vol-track, .vol-pop > .vol-pct { background: #1c1c20; }
.vol-wrap:hover .vol-pop, .vol-wrap:focus-within .vol-pop { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.vol-pct { display: block; text-align: center; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 8px 0 2px; border-radius: 12px 12px 0 0; border: 1px solid rgba(255, 255, 255, 0.1); border-bottom: 0; min-width: 44px; }
.vol-track { position: relative; width: 44px; height: 130px; border-radius: 0 0 12px 12px; border: 1px solid rgba(255, 255, 255, 0.1); border-top: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); }
.player .vol-wrap .mini-vol { position: absolute; left: 50%; top: 50%; display: block; width: 100px; height: 5px; margin: 0; transform: translate(-50%, -50%) rotate(-90deg); border-radius: 99px; background: linear-gradient(90deg, var(--btn, #fff) var(--v, 100%), rgba(255, 255, 255, 0.18) var(--v, 100%)); -webkit-appearance: none; appearance: none; outline: none; }
.player .vol-wrap .mini-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 8px var(--btn, #fff); }

/* app mode (APK): no pinch-zoom, no sideways panning */
html.app, html.app body { touch-action: pan-y; overflow-x: hidden; overscroll-behavior-x: none; max-width: 100vw; }
html.app { -webkit-text-size-adjust: 100%; }

/* Мои лайки: collage 2x2 on the left, title and meta on the right */
.likes-hero.card-likes { display: flex; gap: 14px; align-items: flex-start; }
.likes-hero.card-likes::after { display: none; }
.likes-hero.card-likes .likes-hero-meta { flex: 1; min-width: 0; padding-top: 2px; }
.likes-hero-title { font-size: clamp(26px, 8vw, 34px); }
.likes-mosaic { width: 100px; height: 100px; flex: none; border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: #222; box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.7); }
.likes-mosaic.one { grid-template-columns: 1fr; }
.likes-mosaic i { display: block; background: #26262b center / cover; }
.likes-mosaic.hidden { display: none; }
.likes-stack { display: none; }
.likes-extra { margin-top: 8px; min-height: 0; }
.likes-artists { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Мои лайки: wash reaches the top edge, no black strip above the back link */
.likes-hero.card-likes::before { top: -110px; height: 310px; background: radial-gradient(ellipse at 15% 36%, rgba(255, 94, 126, 0.34), transparent 62%), radial-gradient(ellipse at 95% 50%, rgba(106, 92, 255, 0.22), transparent 60%); }

/* controls keep a fixed colour; only glows and tints follow the cover */
:root { --btn: #fff; }

/* Home previews: first rows only, rest behind a toggle */
.list-more { display: block; margin: 6px auto 0; padding: 8px 18px; border: 1px solid var(--line, rgba(255,255,255,.14)); border-radius: 999px; background: transparent; color: inherit; font: 500 13px/1 inherit; opacity: .8; cursor: pointer; }
.list-more:hover { opacity: 1; }
.list-more[hidden] { display: none; }

/* ---------- Section buttons: outlined square caps ---------- */
.rv-word { display: inline-block; white-space: nowrap; }
.section-head { align-items: center; }
.section-head .section-title { min-width: 0; flex: 1 1 auto; }
.section-head .section-count { flex: none; }
.section-play, .list-more {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap; flex: none;
  background: none; color: #fff; opacity: 1;
  border: 1.25px solid #fff; border-radius: 7px;
  padding: 6px 11px;
  font-family: 'Unbounded', 'Onest', system-ui, sans-serif;
  font-size: 10.5px; font-weight: 600; line-height: 1;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.list-more { display: flex; margin: 10px auto 0; padding: 8px 16px; }
.section-play svg { width: 10px; height: 10px; }
.section-play:active, .list-more:active { background: #fff; color: #000; }
@media (hover: hover) {
  .section-play:hover, .list-more:hover { background: #fff; color: #000; border-color: #fff; }
}
