:root {
  --accent: #fa2d48;
  --accent-hover: #e0233d;
  --bg: #ffffff;
  --sidebar: rgba(246, 246, 248, .82);
  --surface: #f5f5f7;
  --surface-2: #ebebef;
  --hover: rgba(0, 0, 0, .045);
  --text: #1d1d1f;
  --text-2: rgba(29, 29, 31, .62);
  --text-3: rgba(29, 29, 31, .38);
  --line: rgba(0, 0, 0, .08);
  --glass: rgba(250, 250, 252, .78);
  --shadow: 0 10px 40px rgba(0, 0, 0, .12);
  --art-shadow: 0 4px 14px rgba(0, 0, 0, .14);
  --sidebar-w: 248px;
  --player-h: 76px;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --sidebar: rgba(36, 36, 38, .78);
    --surface: #2c2c2e;
    --surface-2: #3a3a3c;
    --hover: rgba(255, 255, 255, .06);
    --text: #f5f5f7;
    --text-2: rgba(245, 245, 247, .62);
    --text-3: rgba(245, 245, 247, .36);
    --line: rgba(255, 255, 255, .09);
    --glass: rgba(40, 40, 42, .76);
    --shadow: 0 10px 40px rgba(0, 0, 0, .5);
    --art-shadow: 0 4px 14px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.4;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { width: 1em; height: 1em; display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Sidebar */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  padding: 22px 12px calc(var(--player-h) + 16px);
  background: var(--sidebar);
  backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 0 10px 22px; color: var(--text); text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.brand-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #fd5c74, #fa2d48 55%, #d81b3c); box-shadow: 0 2px 8px rgba(250, 45, 72, .35); }
.brand-icon svg { width: 18px; height: 18px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 18px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 14px; text-align: left; transition: background .15s;
}
.nav-item svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: var(--hover); }
.nav-item.selected { background: var(--surface-2); font-weight: 600; }
.sidebar-bottom { margin-top: auto; padding: 0 10px; font-size: 11px; color: var(--text-3); }

/* Main */
main { margin-left: var(--sidebar-w); padding: 0 40px calc(var(--player-h) + 40px); max-width: calc(var(--sidebar-w) + 1240px); }
.page-head { padding-top: 40px; position: sticky; top: 0; z-index: 10; background: linear-gradient(var(--bg) 82%, transparent); padding-bottom: 18px; }
.large-title { font-size: 34px; font-weight: 700; letter-spacing: -.025em; margin: 0 0 16px; }
#search-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-input { flex: 1 1 340px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; background: var(--surface); border-radius: 10px; border: 1px solid transparent; transition: border-color .15s, background .15s; }
.search-input:focus-within { border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 3px rgba(250, 45, 72, .14); }
.search-input svg { width: 17px; height: 17px; fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linecap: round; flex: none; }
.search-input input { flex: 1; border: 0; background: none; outline: none; font-size: 15px; min-width: 0; }
.search-input input::placeholder { color: var(--text-3); }
.search-input input::-webkit-search-cancel-button { filter: grayscale(1); }
.filters { display: flex; gap: 8px; align-items: center; }
.select-pill { position: relative; }
.select-pill::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border-right: 1.6px solid var(--text-2); border-bottom: 1.6px solid var(--text-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select-pill select { appearance: none; -webkit-appearance: none; height: 40px; padding: 0 32px 0 14px; border-radius: 10px; border: 0; background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; }
.select-pill.wide, .select-pill.wide select { width: 100%; }
.search-button { height: 40px; padding: 0 20px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; transition: background .15s, transform .1s; }
.search-button:hover { background: var(--accent-hover); }
.search-button:active { transform: scale(.97); }
.search-button:disabled { opacity: .55; cursor: default; }
.wide { width: 100%; }
.outline-button { height: 40px; padding: 0 20px; border-radius: 10px; background: var(--surface); color: var(--accent); font-weight: 600; }
.outline-button:hover { background: var(--surface-2); }

.section-title { font-size: 22px; font-weight: 700; letter-spacing: -.015em; margin: 18px 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.tile {
  position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; text-align: left;
  background: linear-gradient(140deg, var(--a), var(--b)); color: #fff; padding: 14px 16px; display: flex; align-items: flex-end;
  box-shadow: var(--art-shadow); transition: transform .2s ease, box-shadow .2s;
}
.tile::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; right: -18%; top: -30%; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.tile::after { content: ""; position: absolute; width: 40%; aspect-ratio: 1; right: 8%; top: 22%; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.tile span { position: relative; z-index: 1; font-size: 19px; font-weight: 700; letter-spacing: -.01em; text-shadow: 0 1px 8px rgba(0, 0, 0, .18); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* Collection header */
.collection-head { display: flex; gap: 28px; align-items: flex-end; padding: 18px 0 26px; }
.collection-art { width: 200px; aspect-ratio: 1; flex: none; border-radius: 10px; overflow: hidden; background: linear-gradient(140deg, #fd5c74, #a8193a); box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; }
.collection-art.single { grid-template-columns: 1fr; }
.collection-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collection-art .glyph { grid-column: 1 / -1; display: grid; place-items: center; color: rgba(255, 255, 255, .9); }
.collection-art .glyph svg { width: 40%; height: 40%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.collection-meta { min-width: 0; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
#results-title { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#result-count { color: var(--text-2); font-size: 14px; }
.collection-actions { display: flex; gap: 10px; margin-top: 18px; }
.pill-button { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 20px; border-radius: 8px; background: var(--surface); color: var(--accent); font-weight: 600; font-size: 14px; transition: background .15s, transform .1s; }
.pill-button svg { width: 15px; height: 15px; fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill-button.primary { background: var(--accent); color: #fff; }
.pill-button:hover { filter: brightness(.96); }
.pill-button:active { transform: scale(.97); }
.pill-button:disabled { opacity: .45; cursor: default; }

#status { color: var(--text-2); padding: 30px 0; text-align: center; font-size: 15px; margin: 0; }

/* Song list */
#tracks { display: flex; flex-direction: column; }
.track {
  display: grid; grid-template-columns: 28px 40px minmax(0, 1fr) minmax(0, .8fr) 32px; align-items: center; gap: 14px;
  width: 100%; padding: 6px 12px; min-height: 54px; border-radius: 8px; text-align: left; position: relative; transition: background .12s;
}
.track:nth-child(odd) { background: var(--surface); }
.track:hover { background: var(--surface-2); }
.track-number { color: var(--text-3); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.track img, .track .thumb { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; background: var(--surface-2); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.track .thumb { display: grid; place-items: center; color: var(--text-3); }
.track .thumb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.track-info { display: flex; flex-direction: column; min-width: 0; }
.track-info strong, .track-info span, .track-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-info strong { font-weight: 500; font-size: 14px; }
.track-info span { display: none; color: var(--text-2); font-size: 12.5px; }
.track-artist { color: var(--text-2); font-size: 13.5px; }
.track-play { color: var(--accent); opacity: 0; justify-self: end; }
.track-play svg { width: 14px; height: 14px; fill: currentColor; }
.track:hover .track-play { opacity: 1; }
.track:hover .track-number { color: transparent; }
.track:hover .track-number::after { content: ""; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); border-left: 9px solid var(--text); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.track.playing .track-info strong { color: var(--accent); }
.track.playing .track-number { color: transparent; }
.track.playing .track-number::after { content: none; }
.eq { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); display: none; gap: 2px; align-items: flex-end; height: 12px; }
.track.playing .eq { display: flex; }
.eq i { width: 3px; background: var(--accent); border-radius: 1px; height: 30%; }
body.is-playing .track.playing .eq i { animation: eq .9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s !important; height: 70%; }
.eq i:nth-child(3) { animation-delay: -.6s !important; height: 45%; }
@keyframes eq { 0% { height: 20%; } 100% { height: 100%; } }

/* Playlist grid (Kugou) */
#tracks.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 24px 20px; }
.playlist-card { text-align: left; display: flex; flex-direction: column; gap: 8px; }
.playlist-card .cover { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: linear-gradient(140deg, var(--a, #fd5c74), var(--b, #a8193a)); box-shadow: var(--art-shadow); display: grid; place-items: center; transition: transform .2s, box-shadow .2s; }
.playlist-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.playlist-card .cover svg { width: 36%; height: 36%; fill: none; stroke: rgba(255, 255, 255, .9); stroke-width: 1.6; stroke-linecap: round; }
.playlist-card:hover .cover { transform: translateY(-3px); box-shadow: var(--shadow); }
.playlist-card strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-card span { color: var(--text-2); font-size: 12.5px; margin-top: -6px; }
#kugou-pagination { display: block; margin: 26px auto 0; }

footer { color: var(--text-3); font-size: 12px; padding: 48px 0 0; text-align: center; }

/* Player bar */
.player-bar {
  position: fixed; left: calc(var(--sidebar-w) + 20px); right: 20px; bottom: 14px; height: var(--player-h); z-index: 30;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 1.3fr) minmax(0, 1fr); align-items: center; gap: 16px; padding: 0 16px 0 10px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.now-playing { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; padding: 6px; border-radius: 10px; }
.now-playing:hover { background: var(--hover); }
.art-wrap { position: relative; width: 52px; height: 52px; flex: none; border-radius: 7px; overflow: hidden; background: var(--surface-2); box-shadow: var(--art-shadow); }
.art-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.art-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); }
.art-placeholder svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.np-text { display: flex; flex-direction: column; min-width: 0; }
.np-text strong, .np-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-text strong { font-weight: 600; font-size: 14px; }
.np-text span { color: var(--text-2); font-size: 13px; }
.transport { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.buttons { display: flex; align-items: center; justify-content: center; gap: 14px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--text); transition: background .15s, transform .1s, color .15s; }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.small svg { width: 18px; height: 18px; }
.icon-btn.play { width: 38px; height: 38px; }
.icon-btn.play svg { width: 26px; height: 26px; stroke: none; }
.icon-btn .i-pause { display: none; }
body.is-playing .icon-btn.play .i-play { display: none; }
body.is-playing .icon-btn.play .i-pause { display: block; }
.toggle { color: var(--text-3); }
.toggle[aria-pressed="true"] { color: var(--accent); }
.repeat-one { display: none; font-size: 7px; font-weight: 800; stroke: none; fill: currentColor; font-family: var(--font); }
.toggle[data-mode="one"] .repeat-one { display: inline; }
#favorite svg, #np-favorite svg { fill: none; }
#favorite[aria-pressed="true"], #np-favorite[aria-pressed="true"] { color: var(--accent); }
#favorite[aria-pressed="true"] svg, #np-favorite[aria-pressed="true"] svg { fill: currentColor; }
#lyrics-toggle svg { fill: none; }
.progress { display: flex; align-items: center; gap: 8px; }
.time { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 34px; }
.time:first-child { text-align: right; }
.extras { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.volume { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.volume svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.volume input { width: 96px; }

/* Range sliders */
input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; height: 16px; background: transparent; cursor: pointer; --p: 0%; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--text-2) var(--p), var(--surface-2) var(--p)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--text-2) var(--p), var(--surface-2) var(--p)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .15s; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); opacity: 0; }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb { opacity: 1; }
input[type="range"]:hover::-moz-range-thumb { opacity: 1; }

/* Now Playing full screen */
body.np-open { overflow: hidden; }
.now-playing-view { position: fixed; inset: 0; z-index: 50; color: #fff; overflow: hidden; background: #111; animation: rise .38s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
.np-bg { position: absolute; inset: -20%; }
.np-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(80px) saturate(1.7) brightness(.62); transform: scale(1.1); animation: drift 30s ease-in-out infinite alternate; }
.np-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 40%, transparent, rgba(0, 0, 0, .35)); }
.np-bg.empty { background: linear-gradient(140deg, #5a1c2b, #1d1d2f); }
@keyframes drift { from { transform: scale(1.1) rotate(0deg); } to { transform: scale(1.3) rotate(8deg); } }
.np-close { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 2; width: 52px; height: 30px; border-radius: 15px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; }
.np-close svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.np-close:hover { background: rgba(255, 255, 255, .24); }
.np-layout { position: relative; z-index: 1; height: 100%; display: grid; grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); gap: 8vw; align-items: center; padding: 70px 8vw 40px; max-width: 1400px; margin: 0 auto; }
.np-left { display: flex; flex-direction: column; gap: 22px; }
.np-art { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .1); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
body:not(.is-playing) .np-art { transform: scale(.88); }
.np-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.np-info > div:first-child { min-width: 0; display: flex; flex-direction: column; }
.np-info-actions { display: flex; gap: 4px; flex: none; }
#np-lyrics-btn { display: none; }
#np-lyrics-btn svg { fill: none; }
.now-playing-view:not(.lyrics-hidden) #np-lyrics-btn { background: rgba(255, 255, 255, .2); }
.np-info strong, .np-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-info strong { font-size: 20px; font-weight: 700; }
.np-info span { font-size: 17px; color: rgba(255, 255, 255, .62); }
.now-playing-view .icon-btn { color: #fff; }
.now-playing-view .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.np-progress input[type="range"] { width: 100%; }
.np-progress input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, rgba(255, 255, 255, .85) var(--p), rgba(255, 255, 255, .22) var(--p)); }
.np-progress input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, rgba(255, 255, 255, .85) var(--p), rgba(255, 255, 255, .22) var(--p)); }
.np-progress input[type="range"]::-webkit-slider-thumb { margin-top: -3px; }
.np-times { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; margin-top: 4px; }
.np-controls { display: flex; justify-content: center; align-items: center; gap: 34px; }
.np-controls .icon-btn { width: 54px; height: 54px; }
.np-controls .icon-btn svg { width: 32px; height: 32px; stroke: none; }
.np-controls .icon-btn.play { width: 64px; height: 64px; }
.np-controls .icon-btn.play svg { width: 42px; height: 42px; }

.np-lyrics {
  position: relative; height: 100%; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: none; padding: 38vh 0;
  mask-image: linear-gradient(transparent, #000 18%, #000 78%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 78%, transparent);
}
.np-lyrics::-webkit-scrollbar { display: none; }
.lyric-line { display: block; width: 100%; text-align: left; font-size: clamp(22px, 2.6vw, 34px); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: rgba(255, 255, 255, .3); padding: 12px 16px; margin: 2px 0; border-radius: 12px; transition: color .4s, transform .4s cubic-bezier(.2, .8, .2, 1), filter .4s; transform-origin: left center; filter: blur(.6px); }
.lyric-line small { display: block; font-size: .58em; font-weight: 600; margin-top: 4px; opacity: .85; }
.lyric-line:hover { background: rgba(255, 255, 255, .08); filter: none; }
.lyric-line.active { color: #fff; transform: scale(1.03); filter: none; }
.lyrics-empty { font-size: 26px; font-weight: 700; color: rgba(255, 255, 255, .45); margin: 0; padding: 0 16px; }
.lyrics-plain .lyric-line { color: rgba(255, 255, 255, .8); filter: none; cursor: default; }

/* Toast */
.toast { position: fixed; left: calc(50% + var(--sidebar-w) / 2); bottom: calc(var(--player-h) + 32px); transform: translateX(-50%); z-index: 60; background: rgba(30, 30, 32, .92); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow); max-width: min(90vw, 520px); text-align: center; animation: fade .25s; }
@keyframes fade { from { opacity: 0; transform: translate(-50%, 8px); } }

/* Dialog */
dialog { border: 0; padding: 26px 28px 28px; border-radius: 18px; width: min(400px, calc(100vw - 32px)); background: var(--bg); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog[open] { animation: pop .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.dialog-top { display: flex; justify-content: space-between; align-items: center; }
.dialog-close { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); color: var(--text-2); font-size: 18px; line-height: 1; }
.dialog-close:hover { background: var(--surface-2); }
dialog h2 { font-size: 22px; letter-spacing: -.015em; margin: 10px 0 6px; }
.account-hint { color: var(--text-2); margin: 0 0 18px; font-size: 13.5px; }
#account-login { display: flex; flex-direction: column; gap: 10px; }
#account-login > label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.qr-frame { margin: 6px auto; width: 220px; height: 220px; border-radius: 14px; background: #fff; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.qr-frame img { width: 100%; height: 100%; }
#qr-placeholder { color: #86868b; font-size: 13px; padding: 20px; text-align: center; }
#account-status { min-height: 1.4em; text-align: center; color: var(--text-2); font-size: 13px; margin: 0; }
#account-profile { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#account-profile p { margin: -6px 0 6px; color: var(--text-2); font-size: 13px; }
#account-nickname { font-size: 18px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, #fd5c74, #a8193a); color: #fff; }
.avatar svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* Responsive */
@media (max-width: 1080px) {
  .volume input { width: 70px; }
  .player-bar { grid-template-columns: minmax(0, 1fr) minmax(260px, 1.4fr) auto; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 0px; --player-h: 64px; --tabbar-h: 58px; }
  .sidebar {
    inset: auto 0 0 0; width: auto; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom);
    flex-direction: row; border-right: 0; border-top: 1px solid var(--line);
  }
  .brand, .nav-label, .sidebar-bottom { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav-item { flex: 1; flex-direction: column; gap: 2px; font-size: 10.5px; padding: 8px 2px; justify-content: center; align-items: center; background: none !important; color: var(--text-3); }
  .nav-item.selected { color: var(--accent); font-weight: 500; }
  .nav-item svg { width: 24px; height: 24px; stroke: currentColor; }
  .nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main { margin-left: 0; padding: 0 16px calc(var(--player-h) + var(--tabbar-h) + 40px); }
  .page-head { position: static; padding-top: calc(20px + env(safe-area-inset-top)); padding-bottom: 6px; }
  .large-title { font-size: 30px; margin-bottom: 12px; }
  .search-input { flex-basis: 100%; }
  .filters { width: 100%; }
  .filters .select-pill { flex: 1; }
  .filters .select-pill select { width: 100%; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tile span { font-size: 16px; }
  .collection-head { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .collection-art { width: 180px; }
  #results-title { white-space: normal; font-size: 24px; }
  .collection-actions { justify-content: center; }
  .pill-button { flex: 1; justify-content: center; max-width: 170px; }
  .track { grid-template-columns: 44px minmax(0, 1fr) 24px; gap: 12px; padding: 6px 8px; }
  .track:nth-child(odd) { background: none; }
  .track { border-radius: 0; border-bottom: 1px solid var(--line); }
  .track-number, .track-artist { display: none; }
  .track img, .track .thumb { width: 44px; height: 44px; }
  .track-info span { display: block; }
  .track-play { opacity: 1; }
  .eq { left: auto; right: 14px; }
  .track.playing .track-play { opacity: 0; }
  #tracks.grid { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
  .player-bar {
    left: 8px; right: 8px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 6px); height: var(--player-h);
    grid-template-columns: minmax(0, 1fr) auto; gap: 4px; padding: 0 8px 0 4px; border-radius: 14px;
  }
  .art-wrap { width: 46px; height: 46px; }
  .transport { flex-direction: row; }
  .buttons { gap: 2px; }
  #shuffle, #repeat, #previous, .progress { display: none; }
  .extras { display: none; }
  .toast { left: 50%; bottom: calc(var(--player-h) + var(--tabbar-h) + 24px); }
  .np-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; padding: 64px 24px calc(24px + env(safe-area-inset-bottom)); gap: 18px; align-items: start; height: 100%; }
  .np-left { gap: 14px; }
  .np-art { width: min(100%, 42vh); margin: 0 auto; }
  .np-lyrics { max-height: none; height: 100%; min-height: 0; padding: 18vh 0; }
  .lyric-line { font-size: 22px; padding: 8px 4px; }
  #np-lyrics-btn { display: grid; }
  .now-playing-view.lyrics-hidden .np-lyrics { display: none; }
  .now-playing-view:not(.lyrics-hidden) .np-art { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
