:root {
  --bg: #07070b;
  --bg-2: #101018;
  --card: rgba(255, 255, 255, .06);
  --card-2: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .08);
  --text: #f6f5fa;
  --muted: #a3a1b5;
  --accent: #a78bfa;
  --accent-2: #f472b6;
  --accent-3: #fbbf24;
  /* переливающийся градиент: двигаем background-position по кругу */
  --shimmer: linear-gradient(110deg, #8b5cf6, #ec4899, #f59e0b, #22d3ee, #8b5cf6);
  --mood-1: #6d28d9;
  --mood-2: #db2777;
  --mood-3: #0891b2;
  --radius: 16px;
  --tabs-h: 64px;
  --mini-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.22, .9, .24, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Inter, sans-serif;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:active { transform: scale(.96); }
input { font: inherit; color: inherit; }
img { display: block; }
.hidden { display: none !important; }

@keyframes shimmer-move { to { background-position: 300% 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---------- переливающийся фон ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute; width: 80vmax; height: 80vmax; border-radius: 50%; opacity: .32;
  transition: background 1.2s ease;
}
.aurora i:nth-child(1) { background: radial-gradient(closest-side, var(--mood-1), transparent); top: -40vmax; left: -30vmax; animation: drift-a 22s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: radial-gradient(closest-side, var(--mood-2), transparent); top: -30vmax; right: -40vmax; animation: drift-b 26s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: radial-gradient(closest-side, var(--mood-3), transparent); bottom: -55vmax; left: -10vmax; opacity: .18; animation: drift-c 30s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(18vmax, 14vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-16vmax, 20vmax) scale(.9); } }
@keyframes drift-c { to { transform: translate(14vmax, -12vmax) scale(1.2); } }

#app { position: relative; z-index: 1; height: 100%; }

/* ---------- иконки ---------- */
.ic { display: inline-flex; width: 24px; height: 24px; }
.ic svg { width: 100%; height: 100%; fill: currentColor; }

/* ---------- экраны ---------- */
#view {
  height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(var(--tabs-h) + var(--mini-h) + var(--safe-b) + 28px);
}
.enter > * { animation: fade-up .5s var(--ease) both; }
.enter > *:nth-child(2) { animation-delay: .04s; } .enter > *:nth-child(3) { animation-delay: .08s; }
.enter > *:nth-child(4) { animation-delay: .12s; } .enter > *:nth-child(5) { animation-delay: .16s; }
.enter > *:nth-child(n+6) { animation-delay: .2s; }

.grad-text {
  background: var(--shimmer); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer-move 8s linear infinite;
}
.page-title { font-size: 30px; font-weight: 850; letter-spacing: -.03em; margin: 8px 0 18px; }
.section { margin: 30px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.link { color: var(--muted); font-size: 13px; font-weight: 700; }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 20px; }
.hero h1 { font-size: 30px; font-weight: 850; margin: 0; letter-spacing: -.03em; }
.hero small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 850; background: var(--shimmer); background-size: 300% 100%; animation: shimmer-move 6s linear infinite;
  box-shadow: 0 6px 20px rgba(236, 72, 153, .35);
}

/* плитки быстрого доступа */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick {
  display: flex; align-items: center; gap: 10px; overflow: hidden; height: 58px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background .2s, transform .15s;
}
.quick:active { background: var(--card-2); }
.quick img, .quick .q-ic { width: 58px; height: 58px; object-fit: cover; flex: none; }
.quick .q-ic { display: grid; place-items: center; background: var(--shimmer); background-size: 300% 100%; animation: shimmer-move 7s linear infinite; }
.quick span { font-size: 13px; font-weight: 750; padding-right: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; white-space: nowrap; }

.genres { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.genre {
  position: relative; height: 96px; border-radius: 14px; overflow: hidden; padding: 14px;
  text-align: left; font-weight: 850; font-size: 16px; letter-spacing: -.01em;
  background-size: 200% 200% !important; animation: genre-flow 9s ease-in-out infinite alternate;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.genre::after {
  content: ""; position: absolute; right: -16px; bottom: -16px; width: 70px; height: 70px; border-radius: 14px;
  background: rgba(255, 255, 255, .2); transform: rotate(24deg);
}
@keyframes genre-flow { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

.cards { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 8px; scroll-snap-type: x mandatory; }
.cards::-webkit-scrollbar { display: none; }
.card { flex: none; width: 148px; text-align: left; scroll-snap-align: start; }
.card .cv { position: relative; width: 148px; height: 148px; border-radius: 12px; overflow: hidden; background: var(--card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.card .cv img { width: 100%; height: 100%; object-fit: cover; }
.card .cv .play-on {
  position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--shimmer); background-size: 300% 100%;
  animation: shimmer-move 6s linear infinite; box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
  opacity: 0; transform: translateY(6px); transition: all .25s var(--ease);
}
.card:active .cv .play-on, .card.playing .cv .play-on { opacity: 1; transform: none; }
.card .c-title { margin-top: 9px; font-size: 13px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .c-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* обложки плавно проявляются */
img.fade { opacity: 0; transition: opacity .4s ease; }
img.fade.loaded { opacity: 1; }

/* ---------- список треков ---------- */
.tracks { display: flex; flex-direction: column; }
.track {
  display: flex; align-items: center; gap: 12px; padding: 7px 8px; margin: 0 -8px; text-align: left;
  border-radius: 12px; transition: background .2s;
}
.track:active { background: var(--card); }
.track .tc { position: relative; width: 50px; height: 50px; border-radius: 8px; overflow: hidden; flex: none; background: var(--card); }
.track .tc img { width: 100%; height: 100%; object-fit: cover; }
.track .t-main { flex: 1; min-width: 0; }
.track .t-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .t-sub { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .t-dur { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.track .t-more { width: 34px; height: 42px; display: grid; place-items: center; color: var(--muted); flex: none; }
.track.playing { background: linear-gradient(90deg, rgba(167, 139, 250, .14), transparent 70%); }
.track.playing .t-title {
  background: var(--shimmer); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: shimmer-move 5s linear infinite;
}
.track.unavailable { opacity: .4; }

/* эквалайзер на обложке играющего трека */
.eq { position: absolute; inset: 0; display: flex; gap: 3px; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); }
.eq i { width: 3px; height: 16px; border-radius: 2px; background: #fff; animation: eq 1s infinite ease-in-out; transform-origin: bottom; }
.eq i:nth-child(2) { animation-delay: -.35s; } .eq i:nth-child(3) { animation-delay: -.7s; } .eq i:nth-child(4) { animation-delay: -.2s; }
@keyframes eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.paused .eq i { animation-play-state: paused; }

/* мерцающие заготовки вместо спиннеров */
.skel { position: relative; overflow: hidden; background: rgba(255, 255, 255, .06); border-radius: 8px; }
.skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .09), transparent);
  animation: skel 1.3s infinite;
}
@keyframes skel { to { transform: translateX(100%); } }
.skel-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.skel-row .a { width: 50px; height: 50px; flex: none; }
.skel-row .b { flex: 1; }
.skel-row .b div:first-child { height: 13px; width: 70%; margin-bottom: 8px; }
.skel-row .b div:last-child { height: 11px; width: 40%; }
.more-loading { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--muted); font-size: 13px; padding: 14px 0; }
.dot-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--card-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* ---------- поиск ---------- */
.search-box { position: sticky; top: -16px; z-index: 2; padding: 16px 0 10px; margin-top: -16px;
  background: linear-gradient(var(--bg) 70%, transparent); }
.search-input {
  position: relative; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: border-color .2s, box-shadow .2s;
}
.search-input:focus-within { border-color: transparent; box-shadow: 0 0 0 2px rgba(167, 139, 250, .6), 0 10px 30px rgba(139, 92, 246, .25); }
.search-input input { flex: 1; border: 0; outline: 0; background: none; font-weight: 600; font-size: 16px; }
.search-input input::placeholder { color: var(--muted); }
.search-input .ic { color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 56px 16px; }
.empty b { display: block; color: var(--text); font-size: 19px; margin-bottom: 6px; letter-spacing: -.01em; }
.empty .big-ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center;
  background: var(--shimmer); background-size: 300% 100%; animation: shimmer-move 6s linear infinite; color: #fff; }
.empty .big-ic .ic { width: 32px; height: 32px; }

/* ---------- медиатека и плейлисты ---------- */
.lib-item { display: flex; align-items: center; gap: 14px; padding: 8px; margin: 0 -8px; width: calc(100% + 16px); text-align: left; border-radius: 12px; }
.lib-item:active { background: var(--card); }
.lib-item .cov { width: 64px; height: 64px; border-radius: 10px; flex: none; object-fit: cover; display: grid; place-items: center; background: var(--card); }
.liked-cov { background: linear-gradient(135deg, #4f46e5, #a78bfa, #f0abfc) !important; background-size: 200% 200% !important; animation: genre-flow 6s ease-in-out infinite alternate; }
.lib-item .cov.new { border: 1px dashed rgba(255, 255, 255, .25); background: transparent; }
.lib-item b { display: block; font-weight: 750; }
.lib-item small { color: var(--muted); }

.pl-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 18px; }
.pl-head .cov { width: 200px; height: 200px; border-radius: 14px; object-fit: cover; display: grid; place-items: center;
  background: var(--card); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.pl-head .cov .ic { width: 76px; height: 76px; }
.pl-head h2 { margin: 18px 0 4px; font-size: 26px; font-weight: 850; letter-spacing: -.02em; }
.pl-head p { margin: 0; color: var(--muted); font-size: 13px; }
.pl-actions { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.pl-actions .spacer { flex: 1; }
.round-play {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--shimmer); background-size: 300% 100%; animation: shimmer-move 6s linear infinite;
  box-shadow: 0 10px 30px rgba(236, 72, 153, .4);
}
.round-play .ic { width: 30px; height: 30px; }

/* ---------- мини-плеер ---------- */
.mini {
  position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabs-h) + var(--safe-b) + 6px); z-index: 20;
  height: var(--mini-h); border-radius: 14px; display: flex; align-items: center; gap: 10px; padding: 8px; overflow: hidden;
  background: rgba(20, 18, 30, .55); border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5); animation: fade-up .4s var(--ease);
}
.mini-bg { position: absolute; inset: -30%; width: 160%; height: 160%; object-fit: cover; filter: blur(28px) saturate(1.3) brightness(.6); opacity: .35; z-index: -1; }
.mini-progress { position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: rgba(255, 255, 255, .14); border-radius: 2px; overflow: hidden; }
.mini-progress div { height: 100%; width: 0; background: var(--shimmer); background-size: 300% 100%; animation: shimmer-move 4s linear infinite; }
.mini-cover { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--card); box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.mini-info { flex: 1; min-width: 0; }
.mini-title { font-weight: 750; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-artist { color: rgba(255, 255, 255, .7); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; flex: none; border-radius: 50%; transition: background .2s, color .2s; }
.icon-btn:active { background: rgba(255, 255, 255, .1); }
.icon-btn.big .ic { width: 30px; height: 30px; }
.icon-btn.on { color: var(--accent); }
.liked-ic { color: var(--accent-2); animation: pop .35s var(--ease); }

/* кольцо загрузки вокруг кнопки play, пока сервер готовит трек */
.loading-ring { position: relative; }
.loading-ring::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid transparent;
  border-top-color: var(--accent); border-right-color: var(--accent-2); animation: spin .9s linear infinite;
}

/* ---------- таб-бар ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; display: flex;
  height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(7, 7, 11, .72); border-top: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
}
.tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 700; color: var(--muted); transition: color .25s; }
.tab.active { color: var(--text); }
.tab::before {
  content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--shimmer); background-size: 300% 100%; animation: shimmer-move 5s linear infinite;
  opacity: 0; transform: scaleX(.3); transition: all .3s var(--ease);
}
.tab.active::before { opacity: 1; transform: none; }

/* ---------- экран «Сейчас играет» ---------- */
.now {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; overflow: hidden;
  padding: 10px 24px calc(18px + var(--safe-b)); background: var(--bg);
  transform: translateY(100%); transition: transform .42s var(--ease);
}
.now.open { transform: none; }
.now-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.now-bg img {
  position: absolute; inset: -40%; width: 180%; height: 180%; object-fit: cover;
  filter: blur(70px) saturate(1.4) brightness(.55); opacity: .7; animation: bg-drift 26s ease-in-out infinite alternate;
}
@keyframes bg-drift {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(-6%, 4%) scale(1.12) rotate(8deg); }
  100% { transform: translate(5%, -5%) scale(1.05) rotate(-6deg); }
}
.now-bg-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 7, 11, .35) 0%, rgba(7, 7, 11, .6) 50%, rgba(7, 7, 11, .94) 100%); }
.now-head { display: flex; align-items: center; justify-content: space-between; }
.now-from { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .7); min-width: 0; }
.now-from b { display: block; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.now-art { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; margin: 20px 0; }
.now-cover {
  position: relative; width: 100%; max-width: 420px; max-height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55); transform: scale(.86); transition: transform .6s var(--ease);
}
.now-glow {
  position: absolute; width: 80%; max-width: 360px; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  filter: blur(50px) saturate(2); opacity: .0; transform: scale(.8); transition: opacity .8s, transform .8s var(--ease);
}
.playing-now .now-cover { transform: scale(1); }
.playing-now .now-glow { opacity: .6; transform: scale(1.05); animation: glow-pulse 4s ease-in-out infinite alternate; }
@keyframes glow-pulse { to { opacity: .85; transform: scale(1.15); } }
.now-meta { display: flex; align-items: center; gap: 12px; }
.now-titles { flex: 1; min-width: 0; }
.now-title { font-size: 23px; font-weight: 850; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-artist { color: rgba(255, 255, 255, .72); font-size: 15px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-meta .icon-btn .ic { width: 28px; height: 28px; }

.seek { margin-top: 16px; }
.seek input, .volume input { width: 100%; height: 20px; margin: 0; background: none; -webkit-appearance: none; appearance: none; --p: 0%; }
.seek input::-webkit-slider-runnable-track, .volume input::-webkit-slider-runnable-track {
  height: 5px; border-radius: 3px;
  background: linear-gradient(to right, #fff var(--p), rgba(255, 255, 255, .2) var(--p));
}
.seek input::-moz-range-track, .volume input::-moz-range-track { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); }
.seek input::-moz-range-progress, .volume input::-moz-range-progress { height: 5px; border-radius: 3px; background: #fff; }
.seek input::-webkit-slider-thumb, .volume input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: #fff; margin-top: -5px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .15), 0 2px 8px rgba(0, 0, 0, .4);
}
.seek input::-moz-range-thumb, .volume input::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: #fff; }
.seek-times { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255, 255, 255, .65); margin-top: 4px; font-variant-numeric: tabular-nums; }

.controls { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.controls .icon-btn { position: relative; }
.controls .icon-btn .ic { width: 32px; height: 32px; }
.controls #btn-shuffle .ic, .controls #btn-repeat .ic { width: 22px; height: 22px; }
.controls .icon-btn.on::after { content: ""; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.repeat-one::before { content: "1"; position: absolute; font-size: 9px; font-weight: 900; top: 7px; right: 6px; color: var(--accent); }
.play-btn {
  position: relative; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #111;
  background: #fff; box-shadow: 0 12px 34px rgba(0, 0, 0, .45); transition: transform .15s;
}
.play-btn::before {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; z-index: -1;
  background: var(--shimmer); background-size: 300% 100%; animation: shimmer-move 4s linear infinite; filter: blur(10px); opacity: .7;
}
.play-btn .ic { width: 34px; height: 34px; }
.play-btn.loading-ring::after { inset: -6px; }

.volume { display: flex; align-items: center; gap: 6px; margin: 4px 0 6px; }
.volume .icon-btn { width: 36px; height: 36px; color: rgba(255, 255, 255, .8); }
.volume .icon-btn .ic { width: 22px; height: 22px; }
.volume input { flex: 1; }

.now-actions { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 750;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.pill .ic { width: 18px; height: 18px; }

/* ---------- нижний лист и тосты ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; border-radius: 22px 22px 0 0; max-height: 75vh; overflow-y: auto;
  padding: 8px 16px calc(16px + var(--safe-b));
  background: rgba(24, 22, 34, .92); border-top: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  transform: translateY(105%); transition: transform .32s var(--ease);
}
.sheet.open { transform: none; }
.sheet .grip { width: 38px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); margin: 0 auto 14px; }
.sheet-track { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.sheet-track img, .sheet-track .ph { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; flex: none; background: var(--card); }
.sheet-track b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-track small { color: var(--muted); }
.sheet-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 4px; font-weight: 650; text-align: left; border-radius: 10px; }
.sheet-btn:active { background: var(--card); transform: none; }
.sheet-btn .ic { color: var(--muted); }
.sheet-btn.danger { color: #fb7185; }
.sheet-btn.danger .ic { color: #fb7185; }
.sheet h3 { margin: 4px 0 12px; font-size: 18px; letter-spacing: -.01em; }
.field { width: 100%; height: 50px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06);
  padding: 0 14px; outline: 0; font-size: 16px; transition: box-shadow .2s; }
.field:focus { box-shadow: 0 0 0 2px rgba(167, 139, 250, .6); }
.btn-primary { width: 100%; height: 50px; border-radius: 999px; font-weight: 850; margin-top: 12px;
  background: var(--shimmer); background-size: 300% 100%; animation: shimmer-move 6s linear infinite; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--mini-h) + var(--safe-b) + 22px); z-index: 80;
  transform: translate(-50%, 20px) scale(.96); opacity: 0; pointer-events: none; transition: all .3s var(--ease);
  background: rgba(255, 255, 255, .95); color: #111; font-weight: 750; font-size: 13px; padding: 11px 16px; border-radius: 12px;
  max-width: calc(100% - 32px); text-align: center; box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

@media (min-width: 640px) {
  #view { max-width: 760px; margin: 0 auto; }
  .genres { grid-template-columns: repeat(4, 1fr); }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
