:root {
  --bg: #14121f;
  --glass: .45;                                   /* плотность панелей, меняется в настройках */
  --panel: rgba(24, 21, 40, var(--glass));
  --tile: rgba(20, 18, 34, calc(var(--glass) * .85)); /* подложка строк и карточек */
  --panel-solid: #262238;
  --panel-2: rgba(255, 255, 255, .06);
  --hover: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .09);
  --text: #f3f1f9;
  --muted: #aaa6bd;
  --accent: #c4b5fd;
  --accent-ink: #17132a;
  --danger: #f58a9b;
  --radius: 10px;
  --player-h: 84px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
img { display: block; }
a { color: inherit; }

i[data-icon] { display: inline-flex; width: 22px; height: 22px; flex: none; }
i[data-icon] svg { width: 100%; height: 100%; fill: currentColor; }

.card { background: var(--panel); border-radius: var(--radius); }

/* ---------- layout ---------- */
.app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 0;
  gap: 8px;
  padding: 8px;
  height: calc(100% - var(--player-h));
}
.app.panel-open { grid-template-columns: 280px minmax(0, 1fr) 360px; }

.sidebar { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 10px 14px 4px; font-weight: 800; font-size: 20px; letter-spacing: -.3px; }
.brand img { width: 30px; height: 30px; }
.side-nav { padding: 8px; display: flex; flex-direction: column; }
.nav-btn { display: flex; align-items: center; gap: 16px; padding: 10px 12px; border-radius: 8px; color: var(--muted); font-weight: 700; width: 100%; text-align: left; transition: color .15s; }
.nav-btn:hover, .nav-btn.on { color: var(--text); }
.side-lib { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px; }
.side-lib-head { display: flex; align-items: center; }
.side-lib-head .nav-btn { flex: 1; }
.side-list { overflow-y: auto; flex: 1; padding-top: 4px; }
.side-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 6px; width: 100%; text-align: left; }
.side-item:hover { background: var(--hover); }
.side-item.on { background: var(--panel-2); }
.side-item img, .side-item .ph { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; flex: none; }
.side-item .s1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item .s2 { color: var(--muted); font-size: 12px; }
.side-item > div { min-width: 0; }

.main { overflow-y: auto; min-height: 0; position: relative; }
#view { min-height: 100%; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); flex: none; transition: color .15s, transform .1s; }
.icon-btn:hover { color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.on { color: var(--accent); }
.icon-btn.on::after { content: ""; position: absolute; }

/* ---------- views ---------- */
.hero {
  padding: 28px 24px 20px;
  background: linear-gradient(180deg, var(--hero, #3a3a3a) 0%, var(--panel) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.hero h1 { margin: 0; font-size: clamp(26px, 4vw, 40px); letter-spacing: -1px; }
.hero p { margin: 6px 0 0; color: var(--muted); }
.section { padding: 8px 24px 24px; }
.section h2 { font-size: 22px; margin: 16px 0 12px; letter-spacing: -.4px; }
.muted { color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tile { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.08); border-radius: 6px; overflow: hidden; font-weight: 700; text-align: left; height: 60px; transition: background .15s; }
.tile:hover { background: rgba(255,255,255,.16); }
.tile img, .tile .ph { width: 60px; height: 60px; object-fit: cover; flex: none; }

.ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #4b2bd1, #1ed760); color: #fff; }
.ph.liked { background: linear-gradient(135deg, #4a1fd6, #8fc8e8); }
.ph.offline { background: linear-gradient(135deg, #0d6b3a, #1ed760); }
.ph i[data-icon] { width: 45%; height: 45%; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--hover); font-weight: 600; font-size: 13px; }
.chip:hover { background: #3a3a3a; }
.chip.on { background: var(--text); color: #000; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; font-weight: 700; background: var(--text); color: #000; transition: transform .1s; }
.btn:hover { transform: scale(1.03); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid #727272; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn i[data-icon] { width: 18px; height: 18px; }

/* search */
.search-bar { position: sticky; top: 0; z-index: 3; padding: 16px 24px; background: var(--panel); }
.search-source { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:10px; font-size:13px; color:var(--muted); }
.search-source select { max-width:100%; min-width:0; padding:8px 10px; border-radius:10px; color:var(--text); background:var(--panel-2); border:1px solid rgba(255,255,255,.18); }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid transparent; border-radius: 999px; padding: 0 16px; height: 48px; max-width: 520px; transition: border .15s; }
.search-box:focus-within { border-color: #fff; background: #242424; }
.search-box input { flex: 1; background: none; border: 0; outline: none; font-size: 15px; min-width: 0; }
.search-box i { color: var(--muted); }

/* playlist header */
.pl-header { display: flex; align-items: flex-end; gap: 24px; padding: 32px 24px 24px; background: linear-gradient(180deg, var(--hero, #333) 0%, rgba(18,18,18,.4) 100%); }
.pl-header .big-cover { width: 200px; height: 200px; border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,.5); object-fit: cover; flex: none; }
.pl-header .kind { font-size: 13px; font-weight: 600; }
.pl-header h1 { margin: 6px 0 10px; font-size: clamp(28px, 5vw, 64px); letter-spacing: -1.5px; line-height: 1.05; word-break: break-word; }
.pl-actions { display: flex; align-items: center; gap: 16px; padding: 16px 24px; }
.pl-actions .play-btn { width: 56px; height: 56px; }
.pl-actions .play-btn i { width: 26px; height: 26px; }

/* track rows */
.rows { padding: 0 16px 24px; }
.row {
  display: grid;
  grid-template-columns: 32px 44px minmax(0, 1.4fr) minmax(0, 1fr) 36px 48px 36px;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.row:hover { background: var(--hover); }
.row .num { color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.row .cover { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: var(--hover); }
.row .t1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.row .t2, .row .alb { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .dur { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.row.active .t1, .row.active .num { color: var(--accent); }
.row .like { opacity: 0; }
.row:hover .like, .row .like.on { opacity: 1; }
.badge { display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; border-radius: 2px; padding: 0 4px; height: 15px; margin-right: 6px; vertical-align: 1px; }
.badge.e { background: #c4c4c4; color: #000; }
.badge.c { background: transparent; color: #f0a15e; border: 1px solid #f0a15e; }
.badge.off { background: var(--accent); color: #000; }

.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq span { width: 3px; background: var(--accent); animation: eq 1s infinite ease-in-out; }
.eq span:nth-child(2) { animation-delay: -.4s; }
.eq span:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* artist / album cards */
.cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 -8px; scrollbar-width: thin; }
.card-item { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 8px; text-align: left; transition: background .15s; min-width: 0; }
.card-item:hover { background: var(--hover); }
.card-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--panel-2); box-shadow: 0 6px 20px rgba(0,0,0,.4); margin-bottom: 6px; }
.card-item img.round, .side-item img.round { border-radius: 50%; }
.card-item .ci1 { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-item .ci2 { color: var(--muted); font-size: 13px; }

.label-cover { width: 100%; aspect-ratio: 1; border-radius: 6px; margin-bottom: 6px; display: flex; align-items: flex-end; padding: 12px; background: radial-gradient(circle at 80% 15%, rgba(255,255,255,.22), transparent 55%), linear-gradient(140deg, var(--c), #0a0a0a); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.label-cover span { font-weight: 900; font-size: 16px; line-height: 1.1; letter-spacing: -.3px; text-transform: uppercase; }
.pl-header .label-cover { margin: 0; padding: 18px; }
.pl-header .label-cover span { font-size: 22px; }

.artist-link { cursor: pointer; }
.artist-link:hover { text-decoration: underline; color: var(--text); }
.album-link { color: inherit; text-decoration: none; }
.album-link:hover, .album-link:focus-visible { color: var(--text); text-decoration: underline; }
a.artist-link { text-decoration: none; }
.artist-link.strong { color: var(--text); font-weight: 700; }
.link-btn { color: var(--muted); font-weight: 700; font-size: 13px; padding: 4px 8px; }
.link-btn:hover { color: var(--text); }
.btn.ghost.following { border-color: var(--accent); color: var(--accent); }
.btn.ghost { padding: 7px 16px; }

.search-top { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; }
.best-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; padding: 20px; border-radius: 10px; background: var(--panel-2); text-align: left; transition: background .15s; }
.best-card:hover { background: #262626; }
.best-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 8px 24px rgba(0,0,0,.5); margin-bottom: 10px; }
.best-card .bc-name { font-size: 30px; font-weight: 800; letter-spacing: -.8px; }
.best-card .bc-kind { color: var(--muted); font-size: 13px; font-weight: 600; }
.top-tracks .rows { padding: 0; margin: 0 -8px; }
.top-tracks .row { grid-template-columns: 44px minmax(0, 1fr) 48px 36px; }
.top-tracks .row .num, .top-tracks .row .alb, .top-tracks .row .like { display: none; }
@media (max-width: 1100px) { .search-top { grid-template-columns: 1fr; } }

.artist-hero { position: relative; min-height: 300px; display: flex; align-items: flex-end; background: var(--img) center 25% / cover no-repeat, #333; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.ah-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.35) 50%, var(--panel) 100%); backdrop-filter: blur(0px); }
.ah-body { position: relative; display: flex; align-items: flex-end; gap: 20px; padding: 24px; }
.ah-avatar { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; box-shadow: 0 8px 40px rgba(0,0,0,.6); flex: none; }
.ah-body .kind { font-size: 13px; font-weight: 600; }
.ah-body h1 { margin: 4px 0 8px; font-size: clamp(32px, 6vw, 72px); letter-spacing: -2px; line-height: 1; word-break: break-word; }

.js-sleep { position: relative; }
.js-sleep[data-badge]:not([data-badge=""])::after { content: attr(data-badge); position: absolute; top: -2px; right: -6px; background: var(--accent); color: #000; font-size: 9px; font-weight: 800; border-radius: 6px; padding: 1px 4px; line-height: 1.3; }
.np-head-actions { display: flex; gap: 2px; }
.catalog-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.search-box.small { height: 40px; max-width: 320px; flex: 1; min-width: 180px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 0 -8px; }
@media (max-width: 760px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } .grid-cards .ci2 { display: none; } }
.sync-box { background: var(--panel-2); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; }

/* mixes / queue / blocked */
.mix-cover { position: relative; width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; margin-bottom: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.card-item .mix-cover img { margin: 0; border-radius: 0; box-shadow: none; }
.mix-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.75)); }
.mix-cover span { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 1; font-weight: 900; font-size: 15px; line-height: 1.1; text-transform: uppercase; border-left: 4px solid var(--accent); padding-left: 8px; }
.mix-cover.new span { border-left-color: #b98cff; }
.mix-cover em { position: absolute; top: 8px; right: 8px; z-index: 1; font-style: normal; font-size: 10px; font-weight: 900; background: #b98cff; color: #000; padding: 2px 6px; border-radius: 4px; }
.h2-sub { color: var(--muted); font-size: 13px; margin: -8px 0 10px; }
.h2-row { display: flex; align-items: baseline; justify-content: space-between; }
.building { display: flex; align-items: center; gap: 10px; padding: 16px; background: var(--panel-2); border-radius: 8px; animation: pulse 1.6s infinite; }
.row.blocked { opacity: .38; }
.row.blocked .t1::after { content: " · скрыт"; color: var(--muted); font-weight: 400; font-size: 12px; }
.q-head { display: flex; align-items: center; gap: 8px; font-weight: 800; padding: 14px 10px 6px; }
.q-head .link-btn { margin-left: auto; }
.q-item { display: flex; align-items: center; gap: 2px; border-radius: 6px; }
.q-item:hover { background: #3e3e3e; }
.q-item.now .q-t { color: var(--accent); }
.q-item.blocked { opacity: .4; }
.q-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 10px; text-align: left; }
.q-main img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; flex: none; }
.q-text { min-width: 0; }
.q-t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.q-arrow { font-size: 18px; font-weight: 700; }
.q-empty { padding: 6px 10px 10px; font-size: 13px; }
.blocked-list { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; background: var(--panel-2); border-radius: 6px; padding: 6px 10px; }
.bl-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.bl-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* library tabs */
.lib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 8px; flex-wrap: wrap; }
.lib-head h1 { margin: 0; font-size: 26px; }
.lib-tabs { display: flex; gap: 8px; padding: 0 24px 12px; flex-wrap: wrap; }

/* settings */
.form { display: flex; flex-direction: column; gap: 22px; max-width: 640px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.field .hint a { color: var(--accent); }
.input, select.input { width: 100%; background: var(--panel-2); border: 1px solid #3a3a3a; border-radius: 6px; padding: 11px 12px; outline: none; }
.input:focus { border-color: #fff; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch input { appearance: none; width: 44px; height: 24px; border-radius: 999px; background: #535353; position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(20px); }
.note { background: var(--panel-2); border-radius: 8px; padding: 14px 16px; color: var(--muted); font-size: 13px; }
.note b { color: var(--text); }

/* ---------- now playing panel ---------- */
.np-panel { display: none; flex-direction: column; min-height: 0; overflow: hidden; }
.app.panel-open .np-panel { display: flex; }
.np-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px 16px; font-weight: 700; }
.np-close { display: none; }
.np-scroll { overflow-y: auto; flex: 1; padding: 0 16px 16px; }
.np-media { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.np-media img { width: 100%; height: 100%; object-fit: cover; }
.yt-wrap { position: absolute; inset: 0; display: none; background: #000; }
.np-media.video .yt-wrap { display: block; }
.np-media.video img { visibility: hidden; }
.yt-wrap iframe, #ytHost { width: 100%; height: 100%; border: 0; }
.np-meta { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; }
.np-titles { flex: 1; min-width: 0; }
.np-title { font-size: 22px; font-weight: 800; letter-spacing: -.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-mobile-controls { display: none; }
.np-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.np-links .chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.np-links .chip i { width: 16px; height: 16px; }
.chip.warn { background: rgba(240,161,94,.16); color: #f0a15e; }
.chip.warn:hover { background: rgba(240,161,94,.28); }

.lyrics-card { background: linear-gradient(160deg, #3d2a8c, #1d1650); border-radius: 10px; padding: 16px; }
.lyrics-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; margin-bottom: 10px; }
.lyrics-badge { font-size: 11px; color: rgba(255,255,255,.7); font-weight: 600; }
.lyrics { font-size: 20px; font-weight: 700; line-height: 1.45; max-height: 52vh; overflow-y: auto; scroll-behavior: smooth; overscroll-behavior: contain; }
.lyrics .ln { color: rgba(255,255,255,.45); padding: 3px 0; transition: color .2s; }
.lyrics.synced .ln { cursor: pointer; }
.lyrics.synced .ln:hover { color: rgba(255,255,255,.8); }
.lyrics .ln.past { color: rgba(255,255,255,.75); }
.lyrics .ln.on { color: #fff; }
.lyrics.plain .ln { color: rgba(255,255,255,.9); font-size: 17px; font-weight: 600; }
.lyrics .gap { height: 14px; }
.lyrics .msg { color: rgba(255,255,255,.7); font-size: 15px; font-weight: 500; }

/* ---------- player bar ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: var(--player-h);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center; gap: 12px; padding: 0 16px;
  background: var(--bg);
}
.pl-left { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.pl-left img { width: 56px; height: 56px; border-radius: 4px; object-fit: cover; background: var(--panel-2); flex: none; }
.pl-titles { min-width: 0; }
.pl-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-artist { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ctrl-row { display: flex; align-items: center; gap: 14px; }
.ctrl-row.big { justify-content: space-between; margin: 6px 0 4px; }
.ctrl-row.big .play-btn { width: 64px; height: 64px; }
.ctrl-row.big .play-btn i { width: 30px; height: 30px; }
.ctrl-row.big .icon-btn { width: 44px; height: 44px; }
.ctrl-row.big .icon-btn i { width: 28px; height: 28px; }
.play-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--text); color: #000; display: inline-flex; align-items: center; justify-content: center; transition: transform .1s; flex: none; }
.play-btn:hover { transform: scale(1.06); }
.play-btn i { width: 20px; height: 20px; }
.play-btn.accent { background: var(--accent); }
.play-btn.loading { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.seek-row { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 620px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.seek-row span { min-width: 34px; text-align: center; }
.mini-progress { display: none; }
.pl-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; color: var(--muted); }
.vol-ic { margin-left: 4px; }
.vol { width: 100px; }

input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; height: 16px; cursor: pointer; flex: 1; --p: 0%; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #fff var(--p), #4d4d4d var(--p)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #fff var(--p), #4d4d4d var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; margin-top: -4px; opacity: 0; transition: opacity .1s; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:active::-webkit-slider-thumb { opacity: 1; }
input[type=range]:hover::-moz-range-thumb { opacity: 1; }
input[type=range]:hover { --fill: var(--accent); }
input[type=range]:hover::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--accent) var(--p), #4d4d4d var(--p)); }

.tabbar { display: none; }

/* ---------- modal / toast ---------- */
.modal-root { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.6); padding: 16px; }
.modal-root.open { display: flex; }
.modal { background: #282828; border-radius: 12px; width: min(520px, 100%); max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,.6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 20px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { overflow-y: auto; padding: 4px 12px 16px; }
.modal-body.pad { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 10px; border-radius: 6px; font-weight: 600; }
.menu-item:hover { background: #3e3e3e; }
.menu-item i { color: var(--muted); }
.menu-item.danger { color: var(--danger); }
.src-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 8px; width: 100%; text-align: left; }
.src-item:hover { background: #3e3e3e; }
.src-item.on { background: #1d3a28; }
.src-item img { width: 96px; height: 54px; object-fit: cover; border-radius: 4px; background: #111; }
.src-item .s1 { font-weight: 600; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.src-item .s2 { color: var(--muted); font-size: 12px; margin-top: 2px; }
.src-tag { display: inline-block; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 3px; margin-right: 4px; background: var(--accent); color: #000; }
.src-tag.bad { background: #f0a15e; }

.toast { position: fixed; left: 50%; bottom: calc(var(--player-h) + 20px); transform: translate(-50%, 20px); background: #fff; color: #000; padding: 10px 18px; border-radius: 8px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spinner { width: 28px; height: 28px; border: 3px solid #444; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border: 3px solid transparent; background-clip: content-box; border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- medium screens ---------- */
@media (max-width: 900px) {
  .app, .app.panel-open { grid-template-columns: 76px minmax(0, 1fr) 0; }
  .app.panel-open { grid-template-columns: 76px minmax(0, 1fr) 340px; }
  .brand span, .nav-btn span, .side-item > div:not(.ph), .side-lib-head .icon-btn { display: none; }
  .brand { justify-content: center; padding: 10px 0 4px; }
  .nav-btn { justify-content: center; padding: 12px 0; }
  .side-item { justify-content: center; padding: 6px 0; }
  .row { grid-template-columns: 28px 44px minmax(0, 1fr) 36px 44px 36px; }
  .row .alb { display: none; }
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  :root { --player-h: 64px; --tab-h: 58px; }
  .app, .app.panel-open { display: block; padding: 0; height: 100%; }
  .sidebar { display: none; }
  .main { border-radius: 0; height: 100%; padding-bottom: calc(var(--player-h) + var(--tab-h) + var(--safe-b) + 12px); padding-top: env(safe-area-inset-top, 0px); }
  .hero { border-radius: 0; padding: 20px 16px 14px; }
  .section { padding: 4px 16px 16px; }
  .search-bar { padding: 12px 16px; }
  .rows { padding: 0 8px 16px; }
  .row { grid-template-columns: 44px minmax(0, 1fr) 36px 36px; gap: 10px; }
  .row .num, .row .alb, .row .dur { display: none; }
  .row .like { opacity: 1; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { height: 56px; font-size: 13px; }
  .tile img, .tile .ph { width: 56px; height: 56px; }
  .lib-head, .lib-tabs { padding-left: 16px; padding-right: 16px; }
  .pl-header { flex-direction: column; align-items: flex-start; padding: 24px 16px 16px; gap: 16px; }
  .pl-header .big-cover { width: 160px; height: 160px; align-self: center; }
  .pl-actions { padding: 8px 16px; }
  .search-top { grid-template-columns: 1fr; gap: 0; }
  .best-card { padding: 14px; flex-direction: row; align-items: center; gap: 14px; }
  .best-card img { width: 64px; height: 64px; margin: 0; }
  .best-card .bc-name { font-size: 22px; }
  .cards { grid-auto-columns: 140px; margin: 0 -10px; }
  .artist-hero { min-height: 260px; border-radius: 0; }
  .ah-body { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .ah-avatar { width: 96px; height: 96px; }

  .player {
    left: 8px; right: 8px; bottom: calc(var(--tab-h) + var(--safe-b) + 6px);
    height: var(--player-h);
    grid-template-columns: minmax(0, 1fr) auto;
    background: #2a2a2a; border-radius: 8px; padding: 0 8px; gap: 4px;
  }
  .pl-left img { width: 44px; height: 44px; }
  .pl-left .js-like { display: none; }
  .pl-center { flex-direction: row; position: static; }
  .pl-center .ctrl-row { gap: 4px; }
  .pl-center .play-btn { background: transparent; color: #fff; }
  .pl-center .play-btn i { width: 26px; height: 26px; }
  .hide-sm { display: none !important; }
  .pl-right { display: none; }
  .mini-progress { display: block; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: rgba(255,255,255,.2); border-radius: 2px; overflow: hidden; }
  .mini-progress div { height: 100%; width: 0; background: #fff; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: linear-gradient(180deg, rgba(0,0,0,.6), #000 40%);
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
  .tab.on { color: var(--text); }

  .np-panel, .app.panel-open .np-panel { display: flex; position: fixed; inset: 0; z-index: 20; border-radius: 0; transform: translateY(100%); transition: transform .3s ease; background: linear-gradient(180deg, var(--np-bg, #3a3a3a) 0%, #121212 70%); padding-top: env(safe-area-inset-top, 0px); }
  .np-panel.open, .app.panel-open .np-panel.open { transform: none; }
  .np-close { display: inline-flex; }
  .np-scroll { padding: 0 20px calc(24px + var(--safe-b)); }
  .np-media { max-width: 420px; margin: 8px auto 0; }
  .np-mobile-controls { display: block; }
  .np-mobile-controls .seek-row { max-width: none; }
  .lyrics { max-height: none; }
  .toast { bottom: calc(var(--player-h) + var(--tab-h) + 24px); }
}

/* =========================================================
   Оформление: стеклянное окно поверх фона
   ========================================================= */
#bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #1a1729; }
#bg canvas, #bg img, #bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
#bg.is-video::after { content:''; position:absolute; inset:0; pointer-events:none; background:linear-gradient(180deg,rgba(7,11,20,.36),rgba(7,11,20,.54)); }
.bg-grid.bg-videos { grid-template-columns:repeat(2,minmax(0,1fr)); }
.bg-videos .bg-tile { min-height:95px; }

.modal { background: var(--panel-solid); border: 1px solid var(--line); }
.menu-item:hover, .src-item:hover, .q-item:hover { background: rgba(255, 255, 255, .1); }
.chip:hover { background: rgba(255, 255, 255, .16); }
.best-card:hover { background: rgba(255, 255, 255, .1); }
.search-box:focus-within { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); }
.input, select.input { background: rgba(0, 0, 0, .22); border-color: var(--line); }
select.input option { background: var(--panel-solid); }
.search-bar { background: transparent; }
.search-box, .search-box.small { background: rgba(20, 18, 34, .78); }
.search-box:focus-within { background: rgba(20, 18, 34, .9); }

/* пустые места — живой фон: подложка только под содержимым, текст читается за счёт тени */
.main, .sidebar, .np-panel, .player { text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.btn:not(.ghost), .play-btn, .chip.on, .badge, .modal, .bg-tile em, .mix-cover em { text-shadow: none; }
.rows { display: flex; flex-direction: column; gap: 3px; }
.row { background: var(--tile); }
.row:hover { background: rgba(255, 255, 255, .16); }
.card-item { background: var(--tile); }
.card-item:hover { background: rgba(255, 255, 255, .16); }
.tile { background: var(--tile); }
.tile:hover { background: rgba(255, 255, 255, .16); }
.best-card { background: var(--tile); }
.empty { background: var(--tile); border-radius: 12px; margin: 12px 22px; }
.form { background: var(--tile); border-radius: 14px; padding: 18px; }
.sync-box, .note { background: rgba(0, 0, 0, .2); }
.chip { background: rgba(255, 255, 255, .12); }
.lyrics-card { background: rgba(58, 40, 130, calc(var(--glass) + .15)); }
.muted, .pl-header .kind { color: #d2cfdf; }
.hero p { color: #d2cfdf; }
.section:has(> h2:only-child) { padding-bottom: 0; }
.side-list { overflow-x: hidden; }
::-webkit-scrollbar-corner { background: transparent; }
.ph { background: linear-gradient(135deg, #6d5bb8, #c4b5fd); }
.ph.liked { background: linear-gradient(135deg, #5b4bb0, #a99bf0); }
.ph.offline { background: linear-gradient(135deg, #3f6a78, #8fc7c9); }
.badge.off { color: var(--accent-ink); }
.src-item.on { background: rgba(196, 181, 253, .18); }
.ah-shade { background: linear-gradient(180deg, rgba(20, 18, 32, .05) 0%, rgba(20, 18, 32, .3) 55%, rgba(20, 18, 32, .6) 100%); }
.btn { border-radius: 8px; }
.btn.ghost { border-color: rgba(255, 255, 255, .22); }

/* заголовки экранов — спокойнее и компактнее */
.hero { background: none; padding: 22px 22px 8px; }
.hero h1 { font-size: 26px; letter-spacing: -.4px; }
.section h2 { font-size: 17px; letter-spacing: -.2px; margin: 14px 0 10px; }
.pl-header { background: none; padding: 22px 22px 8px; gap: 18px; align-items: center; }
.pl-header .big-cover { width: 132px; height: 132px; border-radius: 8px; box-shadow: 0 6px 22px rgba(0, 0, 0, .35); }
.pl-header .kind { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.pl-header h1 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.5px; margin: 4px 0 6px; }
.pl-header .label-cover span { font-size: 16px; }
.pl-actions { padding: 8px 22px 12px; gap: 8px; }
.pl-actions .btn { height: 34px; padding: 0 14px; font-size: 13px; }
.pl-actions .play-btn.accent { width: auto; height: 34px; padding: 0 16px; gap: 6px; border-radius: 8px; background: #fff; color: #15121f; font-size: 13px; font-weight: 700; }
.pl-actions .play-btn.accent::after { content: "Слушать"; }
.pl-actions .play-btn.accent i { width: 15px; height: 15px; }
.artist-hero { min-height: 220px; }
.ah-avatar { width: 112px; height: 112px; }
.ah-body h1 { font-size: clamp(26px, 4.5vw, 44px); letter-spacing: -1px; }

/* строки треков — плотнее */
.rows { padding: 0 12px 20px; }
.row { gap: 10px; padding: 4px 8px; }
/* столбец с альбомом есть только там, где хватает ширины; без него название занимает всю строку */
@media (min-width: 901px) { .row { grid-template-columns: 26px 36px minmax(0, 1.4fr) minmax(0, 1fr) 32px 44px 32px; } }
@media (min-width: 761px) and (max-width: 900px) { .row { grid-template-columns: 26px 36px minmax(0, 1fr) 32px 44px 32px; } }
@media (min-width: 901px) and (max-width: 1280px) {
  .app.panel-open .row { grid-template-columns: 26px 36px minmax(0, 1fr) 32px 44px 32px; }
  .app.panel-open .row .alb { display: none; }
}
.row .cover { width: 36px; height: 36px; }
.row .t1 { font-size: 13.5px; font-weight: 500; }
.row .t2, .row .alb { font-size: 12px; }
.row .dur { font-size: 12px; }
.row .num { font-size: 12px; }

/* волна на полосе прогресса */
.wave-wrap { position: relative; flex: 1; height: 26px; display: flex; align-items: center; min-width: 0; }
.wave { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity:.55; }
.wave-wrap input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
.wave-wrap input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(to right, #fff var(--p), rgba(255,255,255,.38) var(--p)) !important; height: 4px; box-shadow:0 1px 3px rgba(0,0,0,.7); }
.wave-wrap input[type=range]::-moz-range-track { background: linear-gradient(to right, #fff var(--p), rgba(255,255,255,.38) var(--p)) !important; height:4px; box-shadow:0 1px 3px rgba(0,0,0,.7); }
.wave-wrap input[type=range]::-webkit-slider-thumb { opacity: 1 !important; width:10px; height:10px; margin-top:-3px; box-shadow:0 1px 4px rgba(0,0,0,.7); }
.wave-wrap input[type=range]::-moz-range-thumb { opacity: 1 !important; width:10px; height:10px; box-shadow:0 1px 4px rgba(0,0,0,.7); }
.wave-wrap input[type=range]:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:6px; }

.cards { grid-auto-columns: minmax(118px, 136px); gap: 4px; scrollbar-width: auto; }
.cards::-webkit-scrollbar { height: 8px; }
.card-item { padding: 8px; }
.card-item .ci1 { font-size: 13px; font-weight: 600; }
.card-item .ci2 { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.label-cover span { font-size: 14px; }

/* выбор фона */
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.bg-tile { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; border: 2px solid transparent; display: flex; align-items: flex-end; padding: 6px 8px; font-size: 12px; font-weight: 600; color: #fff; text-align: left; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.bg-tile:hover { border-color: rgba(255, 255, 255, .4); }
.bg-tile.on { border-color: var(--accent); }
.bg-tile em { position: absolute; top: 5px; right: 5px; font-style: normal; font-size: 9px; font-weight: 800; color: var(--accent-ink); background: var(--accent); padding: 1px 5px; border-radius: 4px; text-shadow: none; }
.bg-sub { font-size: 12px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }
.bg-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.glass-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 13px; }
.glass-row input { flex: 1; }

/* компьютер: отдельные полупрозрачные панели, между ними и под ними — живой фон */
@media (min-width: 761px) {
  .shell {
    position: fixed; inset: clamp(8px, 1.6vw, 18px);
    display: flex; flex-direction: column; gap: 8px;
  }
  .app, .app.panel-open { flex: 1; min-height: 0; height: auto; padding: 0; gap: 8px; }
  .app { grid-template-columns: 196px minmax(0, 1fr); }
  .app.panel-open { grid-template-columns: 196px minmax(0, 1fr) 320px; }
  .card { background: transparent; border-radius: 0; }
  .main.card { border-radius: 14px; }
  .sidebar, .np-panel.card, .player {
    background: var(--panel);
    -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px;
  }
  .sidebar { gap: 0; padding: 10px 8px; }
  .brand { font-size: 15px; padding: 4px 10px 10px; gap: 8px; }
  .brand img { width: 22px; height: 22px; }
  .side-nav, .side-lib { padding: 0; }
  .nav-btn { gap: 10px; padding: 7px 10px; font-size: 13px; font-weight: 500; border-radius: 6px; }
  .nav-btn i[data-icon] { width: 17px; height: 17px; }
  .nav-btn:hover { background: var(--hover); }
  .nav-btn.on { background: var(--hover); }
  .side-lib { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
  .side-lib-head .icon-btn { width: 28px; height: 28px; }
  .side-item { gap: 9px; padding: 5px 8px; }
  .side-item img, .side-item .ph { width: 30px; height: 30px; }
  .side-item .s1 { font-size: 12.5px; font-weight: 500; }
  .side-item .s2 { font-size: 11px; }
  .side-foot { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
  .player { position: static; flex: none; height: 72px; padding: 0 14px; }
  .pl-left img { width: 44px; height: 44px; }
  .pl-title { font-size: 13px; }
  .ctrl-row { gap: 10px; }
  .play-btn { width: 32px; height: 32px; }
  .icon-btn i[data-icon] { width: 18px; height: 18px; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .app { grid-template-columns: 60px minmax(0, 1fr); }
  .app.panel-open { grid-template-columns: 60px minmax(0, 1fr) 300px; }
  .sidebar { padding: 10px 6px; }
  .side-lib-head .nav-btn, .side-foot .nav-btn { padding: 8px 0; }
  .side-item img, .side-item .ph { width: 34px; height: 34px; }
}

/* Плеер на всё окно (нажатие на обложку): слева обложка с кольцом, волна и управление, справа текст.
   Обёртки .np-left, .np-right, .np-foot, .np-art в обычных режимах не влияют на вёрстку. */
.np-left, .np-right, .np-foot, .np-art { display: contents; }
.viz, .np-tabs, .np-queue, .np-vol { display: none; }
.pl-left img { transition: transform .15s, filter .15s; }
.pl-left:hover img { transform: scale(1.04); filter: brightness(1.12); }
@media (min-width: 761px) {
  .app.np-full, .app.np-full.panel-open { grid-template-columns: minmax(0, 1fr); }
  .app.np-full .sidebar, .app.np-full .main, .app.np-full ~ .player { display: none; }
  .app.np-full .np-panel.card {
    display: flex;
    background: rgba(9, 9, 16, calc(var(--glass) + .2));
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .app.np-full .np-close { display: inline-flex; }
  .app.np-full .np-head { padding: 8px 12px 2px; }
  .app.np-full .np-scroll {
    display: grid; grid-template-columns: minmax(270px, 40%) minmax(0, 1fr);
    column-gap: 24px; padding: 0 22px 12px; min-height: 0; overflow: hidden;
  }
  .app.np-full .np-left { display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow-y: auto; scrollbar-width: none; }
  .app.np-full .np-left::-webkit-scrollbar { display: none; }
  .app.np-full .np-art { display: block; position: relative; flex: none; width: min(100%, 58vh); margin: 0 auto; padding: 28px; }
  .app.np-full .viz { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
  .app.np-full .np-media { position: relative; margin: 0; border-radius: 6px; box-shadow: 0 10px 34px rgba(0, 0, 0, .5); }
  .app.np-full .np-media.video { aspect-ratio: 16 / 9; }
  .app.np-full .np-meta, .app.np-full .np-mobile-controls { display: flex; flex: none; width: min(100%, calc(58vh - 56px)); margin-left: auto; margin-right: auto; }
  .app.np-full .np-meta { margin-top: 0; margin-bottom: 4px; }
  .app.np-full .np-title { font-size: 19px; }
  .app.np-full .np-artist { font-size: 13px; }
  .app.np-full .np-mobile-controls { flex-direction: column; gap: 2px; }
  .app.np-full .np-mobile-controls .seek-row { max-width: none; }
  .app.np-full .ctrl-row.big { justify-content: center; gap: 14px; margin: 2px 0; }
  .app.np-full .ctrl-row.big .play-btn { width: 44px; height: 44px; }
  .app.np-full .ctrl-row.big .play-btn i { width: 22px; height: 22px; }
  .app.np-full .ctrl-row.big .icon-btn { width: 34px; height: 34px; }
  .app.np-full .ctrl-row.big .icon-btn i { width: 19px; height: 19px; }
  .app.np-full .np-vol { display: flex; align-items: center; gap: 8px; color: var(--muted); }
  .app.np-full .np-vol i { width: 16px; height: 16px; }
  .app.np-full .np-vol input { width: auto; flex: 1; }
  .app.np-full .np-right { display: flex; flex-direction: column; min-height: 0; }
  .app.np-full .np-foot { display: flex; order: 2; flex: none; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
  .app.np-full .np-tabs { display: flex; gap: 2px; }
  .np-tab { padding: 5px 11px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
  .np-tab:hover { color: var(--text); }
  .np-tab.on { color: var(--text); background: rgba(255, 255, 255, .12); }
  .app.np-full .np-links { flex-wrap: wrap; gap: 4px; margin: 0; justify-content: flex-end; }
  .app.np-full .np-links .chip { padding: 4px 9px; font-size: 11.5px; }
  .app.np-full .lyrics-card { flex: 1; min-height: 0; display: flex; flex-direction: column; background: none; padding: 0; border-radius: 0; }
  .app.np-full .lyrics-head { display: none; }
  .app.np-full .lyrics {
    flex: 1; min-height: 0; max-height: none; padding: 24vh 4px; line-height: 1.32;
    font-size: clamp(20px, 2.5vw, 32px); scrollbar-width: none;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
  }
  .app.np-full .lyrics::-webkit-scrollbar { display: none; }
  .app.np-full .lyrics .ln, .app.np-full .lyrics .ln.past { color: rgba(255, 255, 255, .34); padding: 5px 0; }
  .app.np-full .lyrics .ln.on + .ln { color: rgba(255, 255, 255, .58); }
  .app.np-full .lyrics .ln.on { color: #fff; font-weight: 800; }
  .app.np-full .lyrics.plain { padding: 9vh 4px; }
  .app.np-full .lyrics.plain .ln { color: rgba(255, 255, 255, .88); font-size: clamp(16px, 1.8vw, 22px); }
  .app.np-full .lyrics .msg { font-size: 18px; }
  .app.np-full .np-right.show-queue .lyrics-card { display: none; }
  .app.np-full .np-right.show-queue .np-queue { display: block; flex: 1; min-height: 0; overflow-y: auto; }
}

/* телефон: тот же принцип — подложка только под содержимым */
@media (max-width: 760px) {
  .main.card { background: transparent; }
  .player { background: rgba(30, 27, 48, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .tabbar { background: rgba(18, 16, 30, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  /* открытый плеер: фон виден и здесь, поэтому список и нижние панели под ним прячем */
  .np-panel, .app.panel-open .np-panel { background: rgba(20, 18, 34, .28); }
  body:has(.np-panel.open) .main, body:has(.np-panel.open) .player, body:has(.np-panel.open) .tabbar { visibility: hidden; }
  .np-art { display: block; position: relative; max-width: 420px; margin: 0 auto; padding: 20px; }
  .viz { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
  .np-media { position: relative; margin: 0; max-width: none; }
  .rows { padding: 0 6px 16px; }
  .row { grid-template-columns: 40px minmax(0, 1fr) 34px 34px; gap: 10px; }
  .row .cover { width: 40px; height: 40px; }
  .pl-header { flex-direction: row; align-items: center; padding: 18px 16px 6px; }
  .pl-header .big-cover { width: 96px; height: 96px; align-self: auto; }
  .pl-actions { padding: 8px 16px 10px; }
  .hero { padding: 18px 16px 6px; }
}
/* New feature screens: long invite codes and controls stay inside mobile cards. */
#view .section p { overflow-wrap: anywhere; }
#view [data-account] { margin: 4px 4px 4px 0; max-width: 100%; white-space: normal; }
#view #friendCode, #view #roomCode { width: 100%; margin: 8px 0; }
