:root {
  --bg: #0e0e10;
  --bg-2: #141417;
  --surface: #1b1b1f;
  --surface-2: #26262b;
  --surface-3: #313137;
  --text: #f5f5f7;
  --muted: #8f8f99;
  --accent: #ff6a3d;
  --accent-2: #ffb03d;
  --accent-text: #fff;
  --like: #ff4f6d;
  --danger: #ff4f5e;
  --line: rgba(255, 255, 255, .08);
  --radius: 12px;
  --side-w: 248px;
  --tab-h: 58px;
  --mini-h: 64px;
  --bar-h: 88px;
  --safe-b: env(safe-area-inset-bottom);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.4em; margin: 0; }

/* --- Кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px; font-weight: 600;
  background: var(--surface-2); transition: transform .12s, background .15s, filter .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.block { width: 100%; }
.btn .i { width: 20px; height: 20px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--text); transition: background .15s, color .15s, transform .12s; flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm .i { width: 19px; height: 19px; }
.icon-btn.lg .i { width: 28px; height: 28px; }
.icon-btn.outline { border: 1.5px solid var(--surface-3); width: 44px; height: 44px; }
.icon-btn.on, .icon-btn[aria-pressed="true"] { color: var(--accent); }
.like { color: var(--muted); }
.like.on { color: var(--like); }
.like.on .i { fill: currentColor; }
.like.pop .i { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.35); } }
.play-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--text); color: var(--bg); transition: transform .12s; flex: none;
}
.play-btn:hover { transform: scale(1.05); }
.play-btn:active { transform: scale(.94); }
.play-btn .i { width: 22px; height: 22px; }
.play-btn.accent { background: var(--accent); color: var(--accent-text); }
.play-btn.xl { width: 72px; height: 72px; }
.play-btn.xl .i { width: 32px; height: 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 14px; font-weight: 500;
}
.chip .i { width: 18px; height: 18px; }
.chip.on { background: var(--accent); color: var(--accent-text); }

/* --- Обложки --- */
.cover { position: relative; overflow: hidden; border-radius: 8px; background: var(--surface-2); aspect-ratio: 1; flex: none; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--h) 55% 38%), hsl(calc(var(--h) + 40) 60% 22%));
  color: rgba(255, 255, 255, .85); font-weight: 700;
}
.ph .i { width: 42%; height: 42%; stroke-width: 1.6; }
.ph .letter { font-size: 2.6em; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.round, .round .ph, .cover.round { border-radius: 50%; }

/* --- Вход --- */
.login {
  display: grid; place-items: center; min-height: 100dvh; padding: 16px;
  background: radial-gradient(60% 50% at 50% 0%, rgba(255, 106, 61, .25), transparent), var(--bg);
}
.login-card { width: 100%; max-width: 340px; display: grid; gap: 12px; text-align: center; justify-items: center; }
.login-card h1 { margin: 8px 0 0; font-size: 28px; letter-spacing: -.02em; }
.login-card p { margin: 0 0 12px; }
.login-card input {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); outline: none;
}
.login-card input:focus { border-color: var(--accent); }
.login-card .btn { height: 48px; }

/* --- Каркас --- */
.sidebar { display: none; }
.main {
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 24px);
  min-height: 100dvh; max-width: 1400px;
}
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: rgba(14, 14, 16, .94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; color: var(--muted); font-weight: 500;
}
.tabbar a.active { color: var(--text); }
.tabbar a.active .i { stroke-width: 2.3; }

@media (min-width: 900px) {
  .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: var(--bar-h);
    width: var(--side-w); padding: 20px 12px 16px; background: var(--bg-2); border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  body:not(.has-player) .sidebar { bottom: 0; }
  .main { margin-left: var(--side-w); padding: 28px 36px calc(var(--bar-h) + 32px); }
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; padding: 0 10px 20px; letter-spacing: -.01em; }
.brand img { border-radius: 9px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-link, .side-playlists a {
  display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--muted); font-weight: 600; transition: background .15s, color .15s;
}
.side-nav a:hover, .side-link:hover, .side-playlists a:hover { color: var(--text); background: var(--surface); }
.side-nav a.active { color: var(--text); background: var(--surface-2); }
.side-head {
  display: flex; align-items: center; justify-content: space-between; margin: 22px 0 6px; padding: 0 4px 0 12px;
  font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}
.side-playlists { display: grid; gap: 2px; }
.side-playlists a { height: 48px; gap: 12px; font-weight: 500; padding: 0 8px; }
.side-playlists a.active { color: var(--text); background: var(--surface); }
.side-playlists .cover { width: 36px; border-radius: 6px; font-size: 7px; }
.side-playlists span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot { margin-top: auto; padding-top: 16px; display: grid; gap: 8px; }
.side-disk { font-size: 12px; color: var(--muted); padding: 2px 12px; }
.side-disk .bar { height: 4px; border-radius: 2px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.side-disk .bar i { display: block; height: 100%; background: var(--muted); }
.side-link { width: 100%; font-size: 14px; height: 38px; }
.side-link .i { width: 19px; height: 19px; }

/* --- Страницы --- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; min-height: 44px; }
.page-head h1 { margin: 0; font-size: 30px; letter-spacing: -.025em; line-height: 1.1; }
.page-head .actions { display: flex; gap: 4px; }
@media (min-width: 900px) { .page-head .mob { display: none; } .page-head h1 { font-size: 36px; } }
.back { position: relative; z-index: 2; margin: -4px 0 8px -10px; }

.section { margin: 34px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.section-head a { color: var(--muted); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; }
.section-head a:hover { color: var(--text); }
.section-head a .i { width: 16px; height: 16px; }

.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: 148px; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 6px; scroll-padding-inline: 16px; scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }
@media (min-width: 900px) { .scroller { grid-auto-columns: 176px; margin: 0 -36px; padding: 0 36px 6px; scroll-padding-inline: 36px; gap: 20px; } }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 18px 16px; }
@media (min-width: 900px) { .grid-cards { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 24px 20px; } }

.card { display: block; min-width: 0; cursor: pointer; }
.card .cover { width: 100%; border-radius: 10px; margin-bottom: 9px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); font-size: 14px; }
.card .cover.round { border-radius: 50%; }
.card-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.artist { text-align: center; }
.card-play {
  position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); display: grid; place-items: center;
  opacity: 0; transform: translateY(6px); transition: .18s; box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
.card .round .card-play { right: 50%; bottom: 50%; transform: translate(50%, 50%) scale(.9); }
.card:hover .card-play, .card.current .card-play { opacity: 1; transform: none; }
.card:hover .round .card-play, .card.current .round .card-play { transform: translate(50%, 50%); }
.card-new .cover { display: grid; place-items: center; background: var(--surface); border: 1.5px dashed var(--surface-3); box-shadow: none; color: var(--muted); }
.card-new .cover .i { width: 36px; height: 36px; }

/* «Мой поток» */
.wave {
  position: relative; overflow: hidden; border-radius: 22px; min-height: 230px; padding: 26px 24px;
  display: flex; align-items: flex-end; background: #17111f; isolation: isolate;
}
@media (min-width: 900px) { .wave { min-height: 300px; padding: 40px; } }
.wave-blobs { position: absolute; inset: -20%; z-index: -1; filter: blur(42px); opacity: .9; }
.wave-blobs i { position: absolute; border-radius: 50%; animation: drift 14s ease-in-out infinite alternate; }
.wave-blobs i:nth-child(1) { width: 55%; height: 70%; left: 5%; top: 10%; background: #ff6a3d; }
.wave-blobs i:nth-child(2) { width: 50%; height: 65%; right: 0; top: 0; background: #8a3dff; animation-duration: 18s; animation-delay: -6s; }
.wave-blobs i:nth-child(3) { width: 45%; height: 55%; left: 35%; bottom: 0; background: #ff3d8a; animation-duration: 16s; animation-delay: -3s; }
.wave-blobs i:nth-child(4) { width: 30%; height: 40%; left: 60%; top: 40%; background: #ffb03d; animation-duration: 20s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8%, -6%) scale(1.15); }
  100% { transform: translate(-6%, 8%) scale(.9); }
}
.wave:not(.on) .wave-blobs i { animation-play-state: paused; }
.wave::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, .45), transparent 70%); }
.wave-content { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; width: 100%; }
.wave h2 { margin: 0 0 6px; font-size: 34px; letter-spacing: -.03em; line-height: 1; }
@media (min-width: 900px) { .wave h2 { font-size: 48px; } }
.wave p { margin: 0; max-width: 420px; color: rgba(255, 255, 255, .85); font-size: 14px; }
.wave .now { margin-top: 10px; font-size: 13px; color: rgba(255, 255, 255, .9); display: flex; align-items: center; gap: 6px; }
.wave .play-btn { width: 64px; height: 64px; background: #fff; color: #111; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.wave .play-btn .i { width: 28px; height: 28px; }

/* Плитки коллекции */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .tiles { grid-template-columns: repeat(5, 1fr); } }
.tile {
  display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 16px; background: var(--surface);
  min-height: 112px; transition: background .15s;
}
.tile:hover { background: var(--surface-2); }
.tile .i { width: 26px; height: 26px; margin-bottom: auto; color: var(--muted); }
.tile b { font-size: 16px; margin-top: 14px; }
.tile span { color: var(--muted); font-size: 13px; }
.tile.liked { grid-column: span 2; background: linear-gradient(135deg, #ff4f6d, #8a3dff); }
.tile.liked .i { color: #fff; fill: #fff; }
.tile.liked span { color: rgba(255, 255, 255, .85); }
@media (min-width: 700px) { .tile.liked { grid-column: span 1; grid-row: span 2; } }
@media (min-width: 1200px) { .tile.liked { grid-row: span 1; } }

/* Шапка альбома/плейлиста/исполнителя */
.hero {
  position: relative; display: flex; gap: 20px; align-items: flex-end; margin: -12px -16px 8px; padding: 24px 16px 20px;
  background: linear-gradient(180deg, hsl(var(--h, 20) 45% 26% / .9), transparent);
}
@media (min-width: 900px) { .hero { margin: -28px -36px 12px; padding: 48px 36px 28px; gap: 28px; } }
.hero .cover { width: 140px; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); font-size: 16px; }
@media (min-width: 900px) { .hero .cover { width: 220px; font-size: 22px; } }
.hero-info { min-width: 0; flex: 1; }
.hero .kind { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: rgba(255, 255, 255, .75); }
.hero h1 { margin: 6px 0 6px; font-size: 26px; letter-spacing: -.03em; line-height: 1.08; overflow-wrap: anywhere; }
@media (min-width: 900px) { .hero h1 { font-size: 52px; } }
.hero .meta { color: rgba(255, 255, 255, .75); font-size: 14px; }
.hero .meta a:hover { text-decoration: underline; }
.hero-actions { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
@media (max-width: 600px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .hero .cover { width: 180px; align-self: center; }
}

/* --- Список треков --- */
.tracks { display: grid; }
.tracks.cols { grid-template-columns: 1fr; column-gap: 24px; }
@media (min-width: 1100px) { .tracks.cols { grid-template-columns: 1fr 1fr; } }
.row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px;
  padding: 7px 8px; margin: 0 -8px; border-radius: 10px; cursor: pointer; user-select: none;
}
.row:hover { background: var(--surface); }
.row-cover { position: relative; width: 44px; height: 44px; }
.row-cover .cover { width: 44px; border-radius: 6px; font-size: 9px; }
.row-num { width: 44px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-overlay {
  position: absolute; inset: 0; border-radius: 6px; display: grid; place-items: center;
  background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .12s; color: #fff;
}
.row-overlay .i { width: 20px; height: 20px; }
.row:hover .row-overlay { opacity: 1; }
.row-overlay .eq { display: none; }
.row.current .row-overlay { opacity: 1; }
body.playing .row.current .row-overlay .i { display: none; }
body.playing .row.current .row-overlay .eq { display: flex; }
.row.current .row-title { color: var(--accent); }
.eq { align-items: flex-end; gap: 2px; height: 16px; }
.eq i { width: 3px; background: currentColor; border-radius: 1px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
.row-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub a:hover, .pb-artist a:hover, .full-artist a:hover { color: var(--text); text-decoration: underline; }
.row-dur { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.row .like { opacity: 0; }
.row .like.on, .row:hover .like { opacity: 1; }
@media (hover: none) { .row .like { opacity: 1; } .row .like:not(.on) { display: none; } .row-dur { display: none; } }
.row .icon-btn { width: 36px; height: 36px; }
.row .icon-btn .i { width: 20px; height: 20px; }

.empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty .i { width: 48px; height: 48px; margin-bottom: 12px; stroke-width: 1.4; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 20px; }
.empty p { margin: 0 0 20px; }

/* Поиск */
.search-box { position: relative; margin-bottom: 20px; }
.search-box .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input {
  width: 100%; height: 48px; padding: 0 16px 0 46px; border-radius: 12px; border: 0; outline: none;
  background: var(--surface-2); font-size: 16px;
}
.search-box input:focus { box-shadow: 0 0 0 2px var(--accent); }

/* --- Плеер снизу --- */
.player {
  position: fixed; z-index: 31; left: 8px; right: 8px; bottom: calc(var(--tab-h) + var(--safe-b) + 6px);
  height: var(--mini-h); display: flex; align-items: center; gap: 8px; padding: 0 8px;
  border-radius: 14px; background: rgba(40, 40, 46, .92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45); overflow: hidden;
}
.pb-line { position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: rgba(255, 255, 255, .12); }
.pb-line i { display: block; height: 100%; width: 0; background: var(--text); }
.pb-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.pb-cover { width: 46px; border-radius: 7px; font-size: 9px; }
.pb-text { min-width: 0; flex: 1; }
.pb-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-artist { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-center, .pb-controls { display: flex; align-items: center; gap: 2px; }
.player .desk { display: none !important; }
.player .play-btn { width: 40px; height: 40px; background: none; color: var(--text); }
.player .play-btn .i { width: 26px; height: 26px; }

@media (min-width: 900px) {
  .player {
    left: 0; right: 0; bottom: 0; height: var(--bar-h); border-radius: 0; padding: 0 20px; gap: 24px;
    background: rgba(22, 22, 25, .97); border-top: 1px solid var(--line); box-shadow: none;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  }
  .player .desk { display: flex !important; }
  .pb-line { display: none; }
  .pb-cover { width: 56px; }
  .pb-center { flex-direction: column; gap: 4px; }
  .pb-controls { gap: 10px; }
  .player .play-btn { background: var(--text); color: var(--bg); }
  .player .play-btn .i { width: 22px; height: 22px; }
  .pb-seek { width: 100%; max-width: 600px; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .pb-seek span { width: 38px; }
  .pb-seek span:first-child { text-align: right; }
  .pb-right { justify-content: flex-end; align-items: center; gap: 4px; }
  .volume { width: 110px; }
}

/* Ползунки */
input[type="range"] {
  -webkit-appearance: none; appearance: none; flex: 1; height: 18px; background: transparent; cursor: pointer; margin: 0;
  --p: 0%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--text) var(--p), rgba(255, 255, 255, .18) var(--p));
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--text); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff;
  opacity: 0; transition: opacity .15s;
}
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
input[type="range"]:hover::-webkit-slider-thumb, .full input[type="range"]::-webkit-slider-thumb { opacity: 1; }

/* --- Полноэкранный плеер --- */
.full {
  position: fixed; inset: 0; z-index: 50; background: #111; overflow: hidden;
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.full.open { transform: none; }
.full-bg { position: absolute; inset: 0; transition: background .6s; }
.full-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .55)); }
.full-inner {
  position: relative; height: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 10px) 24px calc(var(--safe-b) + 20px);
}
.full-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.full-top .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.full-src { text-align: center; min-width: 0; }
.full-src small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .7); }
.full-src a { font-weight: 600; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.full-cover {
  width: 100%; max-width: min(100%, 52vh); margin: auto; border-radius: 14px; font-size: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5); transition: transform .35s ease;
}
body:not(.playing) .full-cover { transform: scale(.9); }
.full-meta { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.full-text { flex: 1; min-width: 0; }
.full-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.full-artist { color: rgba(255, 255, 255, .75); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.full .like { color: rgba(255, 255, 255, .8); }
.full .like.on { color: var(--like); }
.full-seek { margin-top: 14px; }
.full-seek input { width: 100%; }
.full-times { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.full-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.full-controls .icon-btn { width: 52px; height: 52px; }
.full-controls .icon-btn:not(.on) { color: rgba(255, 255, 255, .9); }
.full-controls .mode-shuffle:not(.on), .full-controls .mode-repeat:not(.on) { color: rgba(255, 255, 255, .6); }
.full-controls .play-btn { background: #fff; color: #111; }
.full-bottom { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }

/* --- Нижняя шторка и диалоги --- */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .2s; }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet-panel {
  position: relative; width: 100%; max-width: 480px; max-height: 85dvh; overflow-y: auto;
  background: var(--surface); border-radius: 20px 20px 0 0; padding: 8px 8px calc(var(--safe-b) + 12px);
  transform: translateY(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.sheet-panel::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--surface-3); margin: 2px auto 8px; }
.sheet.open .sheet-panel { transform: none; }
@media (min-width: 700px) {
  .sheet { align-items: center; }
  .sheet-panel { border-radius: 18px; padding-bottom: 8px; transform: scale(.95); opacity: 0; transition: .18s; }
  .sheet-panel::before { display: none; }
  .sheet.open .sheet-panel { transform: none; opacity: 1; }
}
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 8px 12px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.sheet-head .cover { width: 52px; border-radius: 8px; font-size: 10px; }
.sheet-head .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head .s { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head > div:last-child { min-width: 0; }
.sheet-title { font-size: 18px; font-weight: 700; padding: 8px 12px 10px; }
.sheet-item {
  display: flex; align-items: center; gap: 14px; width: 100%; height: 50px; padding: 0 12px; border-radius: 10px;
  text-align: left; font-size: 15px;
}
.sheet-item:hover { background: var(--surface-2); }
.sheet-item .i { color: var(--muted); }
.sheet-item.danger, .sheet-item.danger .i { color: var(--danger); }
.sheet-item.on, .sheet-item.on .i { color: var(--accent); }
.sheet-item span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog { padding: 20px; display: grid; gap: 12px; }
.dialog::before { display: none; }
.dialog h3 { margin: 0 0 4px; font-size: 20px; }
.dialog p { margin: 0; color: var(--muted); }
.dialog label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.dialog input {
  height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2);
  outline: none; font-size: 16px; color: var(--text);
}
.dialog input:focus { border-color: var(--accent); }
.dialog-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.btn.danger { background: var(--danger); color: #fff; }

/* Очередь */
.q-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 12px 6px; }
.q-row { display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 12px; border-radius: 10px; cursor: pointer; }
.q-row:hover { background: var(--surface-2); }
.q-row .cover { width: 40px; border-radius: 6px; font-size: 8px; }
.q-row > div:nth-child(2) { flex: 1; min-width: 0; }
.q-row.current .row-title { color: var(--accent); }

/* Загрузки */
.uploads {
  position: fixed; z-index: 40; right: 12px; left: 12px; bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 18px);
  max-width: 380px; margin-left: auto; background: var(--surface-2); border-radius: 14px; padding: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5); max-height: 40vh; overflow-y: auto;
}
@media (min-width: 900px) { .uploads { bottom: calc(var(--bar-h) + 16px); right: 20px; } }
.up { padding: 8px 10px; font-size: 13px; }
.up-name { display: flex; justify-content: space-between; gap: 8px; }
.up-name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-name span:last-child { color: var(--muted); flex: none; }
.up .bar { height: 3px; border-radius: 2px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.up .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.up.failed { color: var(--danger); }

.drop {
  position: fixed; inset: 12px; z-index: 70; border: 3px dashed var(--accent); border-radius: 24px;
  background: rgba(14, 14, 16, .88); display: grid; place-items: center; font-size: 22px; font-weight: 700;
}
.drop div { display: grid; justify-items: center; gap: 12px; }
.drop .i { width: 48px; height: 48px; color: var(--accent); }

.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 20px);
  transform: translate(-50%, 16px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 32px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: calc(var(--bar-h) + 20px); margin-left: calc(var(--side-w) / 2); } }
body.full-open .toast { bottom: auto; top: calc(env(safe-area-inset-top) + 64px); margin-left: 0; }

/* --- Голосовое управление --- */
body.no-voice .voice-btn { display: none !important; }
.voice-btn.on { color: var(--accent); }
.voice { position: fixed; inset: 0; z-index: 65; display: flex; align-items: flex-end; justify-content: center; }
.voice-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.voice.open .voice-backdrop { opacity: 1; }
.voice-panel {
  position: relative; width: 100%; max-width: 480px; padding: 28px 20px calc(var(--safe-b) + 22px);
  border-radius: 24px 24px 0 0; background: var(--surface); text-align: center;
  transform: translateY(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.voice.open .voice-panel { transform: none; }
@media (min-width: 700px) {
  .voice { align-items: center; }
  .voice-panel { border-radius: 24px; transform: scale(.94); opacity: 0; transition: .2s; }
  .voice.open .voice-panel { transform: none; opacity: 1; }
}
.voice-x { position: absolute; top: 10px; right: 10px; color: var(--muted); }
.voice-orb {
  position: relative; width: 96px; height: 96px; border-radius: 50%; margin: 6px auto 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, #ff6a3d, #ff3d8a 55%, #8a3dff); color: #fff;
  box-shadow: 0 10px 40px rgba(255, 61, 138, .35);
}
.voice-orb .i { width: 40px; height: 40px; position: relative; z-index: 1; }
.voice-orb span { position: absolute; inset: 0; border-radius: 50%; background: inherit; opacity: 0; }
.voice[data-state="listening"] .voice-orb span { animation: ripple 1.6s ease-out infinite; }
.voice[data-state="listening"] .voice-orb span + span { animation-delay: .8s; }
.voice[data-state="listening"] .voice-orb .i { animation: breathe 1.2s ease-in-out infinite; }
@keyframes ripple { from { transform: scale(1); opacity: .45; } to { transform: scale(1.9); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.12); } }
.voice[data-state="error"] .voice-orb { background: var(--surface-3); box-shadow: none; }
.voice[data-state="done"] .voice-orb { background: linear-gradient(135deg, #2fbf71, #1f9e8f); box-shadow: 0 10px 40px rgba(47, 191, 113, .3); }
.voice-text { font-size: 22px; font-weight: 700; letter-spacing: -.02em; min-height: 1.4em; overflow-wrap: anywhere; }
.voice-hint { color: var(--muted); font-size: 14px; margin-top: 6px; min-height: 1.4em; }
.voice-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.voice-opts .chip { background: var(--surface-2); }
.voice-opts .chip.on { background: var(--accent); color: var(--accent-text); }
.vh-item { padding: 7px 12px; font-size: 15px; }
.hf-pill {
  position: fixed; z-index: 45; top: calc(env(safe-area-inset-top) + 10px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border-radius: 999px;
  background: rgba(40, 40, 46, .95); box-shadow: 0 6px 24px rgba(0, 0, 0, .4); font-size: 13px; white-space: nowrap;
}
.hf-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.hf-pill.live .dot { background: #ff4f5e; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
