/* Mobile-first dark UI. The shell stays within 480px on larger screens. */
:root {
  color-scheme: dark;
  --bg: #0b0d13;
  --surface: #141720;
  --surface-raised: #1c202c;
  --text: #f5f6fa;
  --muted: #9399aa;
  --faint: #62697a;
  --accent: #e66b79;
  --accent-bright: #ff8792;
  --line: rgba(255, 255, 255, 0.08);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #07090e; }
body { color: var(--text); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: 0.55; }
[hidden] { display: none !important; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { position: relative; width: 100%; max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--bg); overflow: hidden; }
.eyebrow { margin: 0 0 8px; color: var(--accent-bright); font-size: 10px; font-weight: 700; letter-spacing: 0.18em; }

/* Login */
.login-view { min-height: 100vh; min-height: 100dvh; padding: calc(84px + var(--safe-top)) 28px calc(28px + var(--safe-bottom)); background: radial-gradient(circle at 85% 5%, rgba(230,107,121,.16), transparent 34%), var(--bg); }
.login-brand { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 42px; border-radius: 19px; background: linear-gradient(145deg, var(--accent-bright), #a94265); box-shadow: 0 14px 36px rgba(230,107,121,.2); font-size: 23px; font-weight: 800; letter-spacing: -0.06em; }
.login-view h1 { margin: 0; font-size: 36px; letter-spacing: -0.04em; }
.login-intro { margin: 12px 0 38px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.login-form { display: flex; flex-direction: column; }
.login-form label { margin: 0 0 9px; color: #c7cbd5; font-size: 13px; }
.login-form input { width: 100%; height: 52px; margin-bottom: 22px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); font-size: 16px; }
.login-form input:focus { border-color: rgba(255,135,146,.6); }
.primary-button { height: 52px; margin-top: 7px; border: 0; border-radius: 14px; background: var(--accent); color: white; font-weight: 700; }
.primary-button:active { background: #cc5969; }
.form-error { margin: -7px 0 15px; color: #ff9ba5; font-size: 13px; }
.login-note { margin-top: 24px; color: var(--faint); font-size: 11px; line-height: 1.6; text-align: center; }

/* Discover */
.discover-view { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.discover-header { display: flex; align-items: center; justify-content: space-between; padding: calc(20px + var(--safe-top)) 20px 14px; }
.discover-header h1 { margin: 0; font-size: 28px; letter-spacing: -0.035em; }
.header-actions { display: flex; gap: 6px; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:active { background: var(--surface-raised); }
#refresh-button.loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.search-form { display: flex; align-items: center; gap: 10px; height: 44px; margin: 0 20px 14px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--faint); }
.search-form svg { width: 19px; height: 19px; flex: none; }
.search-form input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.search-form input::placeholder { color: var(--faint); }
.chart-tabs { display: flex; flex: none; gap: 4px; padding: 0 15px 12px; overflow-x: auto; scrollbar-width: none; }
.chart-tabs::-webkit-scrollbar { display: none; }
.chart-tab { flex: 1 0 62px; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.chart-tab.active { background: var(--surface-raised); color: var(--text); font-weight: 700; }
.list-scroll { flex: 1; min-height: 0; padding: 0 16px calc(166px + var(--safe-bottom)); overflow-y: auto; overscroll-behavior: contain; }
.list-heading { display: flex; align-items: center; min-height: 38px; margin: 2px 4px 8px; }
.list-heading h2 { margin: 0; font-size: 17px; }
.list-count { margin-left: auto; color: var(--faint); font-size: 12px; }
.text-button { margin-right: 10px; padding: 4px 0; border: 0; background: none; color: var(--accent-bright); font-size: 13px; }
.track-list { display: flex; flex-direction: column; gap: 4px; }
.track-row { display: flex; align-items: center; width: 100%; min-height: 70px; padding: 7px 4px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.track-row:active { background: var(--surface); }
.track-row.playing { background: linear-gradient(90deg, rgba(230,107,121,.11), transparent); }
.track-cover, .track-cover-placeholder { flex: none; width: 52px; height: 52px; border-radius: 10px; background: linear-gradient(145deg, #2a2e3c, #171a23); object-fit: cover; }
.track-cover-placeholder { display: grid; place-items: center; color: var(--faint); font-size: 20px; }
.track-copy { min-width: 0; flex: 1; margin: 0 11px; }
.track-title { display: block; overflow: hidden; color: #eceef4; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.track-artist { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.track-tags { display: flex; gap: 4px; max-width: 80px; flex-wrap: wrap; justify-content: flex-end; }
.quality-tag { padding: 2px 4px; border: 1px solid rgba(255,135,146,.25); border-radius: 4px; color: #d996a0; font-size: 8px; line-height: 1.2; }
.heart-button { display: grid; place-items: center; flex: none; width: 34px; height: 38px; margin-left: 2px; padding: 0; border: 0; background: transparent; color: #646b7a; cursor: pointer; }
.heart-button svg { width: 18px; height: 18px; }
.heart-button.is-favorite { color: var(--accent-bright); }
.heart-button.is-favorite svg { fill: currentColor; }
.download-button { display: grid; place-items: center; flex: none; width: 32px; height: 38px; margin-left: 1px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.download-button:active { background: var(--surface-raised); color: var(--accent-bright); }
.download-button svg { width: 18px; height: 18px; }
.list-status, .list-hint { padding: 32px 10px; color: var(--muted); font-size: 13px; text-align: center; }
.list-hint { padding: 18px 10px 8px; color: var(--faint); }
.load-more { display: block; width: calc(100% - 16px); height: 42px; margin: 16px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); }

/* Library */
.library-view { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-width: 0; }
.library-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(20px + var(--safe-top)) 20px 16px; }
.library-header h1 { margin: 0; font-size: 28px; letter-spacing: -0.035em; }
.library-create-button { display: flex; flex: none; align-items: center; gap: 4px; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--accent-bright); font-size: 13px; white-space: nowrap; }
.library-create-button svg { width: 17px; height: 17px; }
.library-mode-tabs { display: grid; flex: none; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 20px 12px; padding: 4px; border-radius: 13px; background: var(--surface); }
.library-mode-tabs button { min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; }
.library-mode-tabs button.active { background: var(--surface-raised); color: var(--text); font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.library-scroll { flex: 1; min-height: 0; padding: 0 16px calc(166px + var(--safe-bottom)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.playlist-list { display: flex; flex-direction: column; gap: 10px; }
.playlist-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.playlist-card-main { display: flex; align-items: center; width: 100%; min-width: 0; min-height: 82px; padding: 13px 14px; border: 0; background: transparent; text-align: left; }
.playlist-card-main:active { background: var(--surface-raised); }
.playlist-art { display: grid; flex: none; place-items: center; width: 54px; height: 54px; border-radius: 12px; background: linear-gradient(145deg, #323746, #1b1e28); color: var(--muted); font-size: 23px; }
.playlist-art.default { background: linear-gradient(145deg, #e77b87, #9e3f61); color: #fff; }
.playlist-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; margin: 0 12px; }
.playlist-copy strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.playlist-copy span { margin-top: 6px; color: var(--muted); font-size: 12px; }
.playlist-arrow { flex: none; color: var(--faint); font-size: 26px; line-height: 1; }
.playlist-card-actions { display: flex; justify-content: flex-end; gap: 14px; padding: 0 10px; border-top: 1px solid var(--line); }
.playlist-card-actions button { min-width: 52px; min-height: 40px; padding: 0 8px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.playlist-card-actions .playlist-delete { color: #e899a2; }
.playlist-detail { padding: 4px 4px 16px; }
.playlist-detail-top { display: flex; align-items: flex-start; min-width: 0; }
.playlist-detail-top > .text-button { flex: none; min-height: 38px; margin: 0 12px 0 0; }
.playlist-detail-heading { min-width: 0; flex: 1; }
.playlist-detail-heading h2 { margin: 0; overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.playlist-detail-heading .list-count { display: block; margin: 6px 0 0; }
.playlist-playback-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.playlist-playback-actions button { min-height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 13px; }
#playlist-play-all { border-color: transparent; background: var(--accent); }
.playlist-remove { flex: none; min-width: 40px; min-height: 38px; margin-left: 2px; padding: 0 4px; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.playlist-remove:active { color: var(--accent-bright); }

/* Downloads */
.downloads-view { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.downloads-header { padding: calc(20px + var(--safe-top)) 20px 16px; }
.downloads-header h1 { margin: 0; font-size: 28px; letter-spacing: -0.035em; }
.downloads-scroll { flex: 1; min-height: 0; padding: 0 16px calc(166px + var(--safe-bottom)); overflow-y: auto; overscroll-behavior: contain; }
.download-list { display: flex; flex-direction: column; gap: 10px; }
.download-card { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.download-card-header { display: flex; align-items: center; gap: 11px; min-width: 0; }
.download-coat { display: grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: linear-gradient(145deg, #2a2e3c, #171a23); color: var(--faint); font-size: 21px; }
.download-card-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.download-title { overflow: hidden; font-size: 15px; font-weight: 600; color: #eceef4; text-overflow: ellipsis; white-space: nowrap; }
.download-artist { overflow: hidden; font-size: 12px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.download-status { flex: none; padding: 3px 7px; border-radius: 6px; background: var(--surface-raised); color: var(--muted); font-size: 10px; }
.download-status.failed, .download-status.interrupted { color: #ff9ba5; }
.download-status.completed { color: #91d7b0; }
.download-steps { display: flex; margin: 9px 0 0; padding: 0; }
.download-steps li { position: relative; flex: 1; color: var(--faint); font-size: 9px; text-align: center; white-space: nowrap; }
.download-steps li:not(:last-child)::after { position: absolute; right: -3px; content: "→"; color: var(--faint); }
.download-steps li.active { color: var(--accent-bright); }
.download-steps li.done { color: #91d7b0; }
.download-progress { margin: 0; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.download-error { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(230,107,121,.09); color: #ff9ba5; font-size: 12px; overflow-wrap: anywhere; }
.download-password-form { display: flex; gap: 8px; margin-top: 10px; }
.download-password { min-width: 0; width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); color: var(--text); font-size: 16px; }
.download-password-submit, .download-retry, .download-delete { flex: none; min-height: 40px; margin-top: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); color: var(--text); font-size: 12px; }
.download-password-form .download-password-submit { margin-top: 0; }
.download-delete { color: #ff9ba5; }

/* Settings */
.settings-view { display: flex; min-width: 0; flex-direction: column; height: 100vh; height: 100dvh; }
.settings-header { flex: none; padding: calc(20px + var(--safe-top)) 20px 16px; }
.settings-header h1 { margin: 0; font-size: 28px; letter-spacing: -0.035em; }
.settings-scroll { flex: 1; min-width: 0; min-height: 0; padding: 0 16px calc(166px + var(--safe-bottom)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.settings-card { min-width: 0; margin-bottom: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.settings-card h2, .settings-card h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.settings-card-heading, .settings-section-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.settings-section { min-width: 0; margin: 22px 0; }
.settings-section-title { margin: 0 0 12px; font-size: 17px; }
.settings-badge { flex: none; padding: 4px 7px; border-radius: 7px; background: var(--surface-raised); color: var(--muted); font-size: 10px; }
.settings-badge.active { color: #91d7b0; }
.settings-copy, .settings-note, .settings-warning, .settings-error { color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.settings-note { color: var(--faint); }
.settings-warning { color: #e8b58d; }
.settings-error { margin: 9px 0 0; color: #ff9ba5; }
.settings-storage { margin: 12px 0 0; color: var(--text); font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.settings-secondary-button, .settings-inline-button, .settings-danger-button, .credential-row button { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); color: var(--text); font-size: 12px; }
.settings-inline-button { flex: none; color: var(--accent-bright); }
.settings-danger-button { border-color: rgba(255,155,165,.25); color: #ff9ba5; }
.settings-link-button { min-height: 38px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.settings-toggle-row { display: flex; min-width: 0; align-items: flex-start; gap: 14px; }
.settings-toggle-row > div { min-width: 0; }
#auto-delete-cloud-copy { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }
.credential-form { margin-top: 14px; }
.credential-form label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.credential-row { display: flex; min-width: 0; gap: 8px; }
.credential-row input { min-width: 0; width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); color: var(--text); font-size: 16px; }
.credential-row button { flex: none; }
.qr-region { margin-top: 12px; text-align: center; }
.qr-image { display: block; width: min(100%, 220px); height: auto; margin: 0 auto; border-radius: 10px; background: #fff; }
.cloud-transfer-list { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.cloud-transfer-row { display: flex; min-width: 0; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cloud-transfer-row input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.cloud-transfer-copy { min-width: 0; overflow-wrap: anywhere; }
.cloud-transfer-copy strong, .cloud-transfer-copy span { display: block; }
.cloud-transfer-copy strong { font-size: 13px; }
.cloud-transfer-copy span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.cloud-transfer-error { color: #ff9ba5; }
.settings-dialog { position: fixed; z-index: 45; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(0,0,0,.65); }
.settings-dialog-panel { width: 100%; max-width: 448px; max-height: 80vh; padding: 20px; overflow-y: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.settings-dialog-panel h2 { margin: 0; font-size: 19px; }
.settings-dialog-count { color: #ff9ba5; font-weight: 700; }
.cloud-delete-list { max-height: 32vh; padding-left: 22px; overflow-y: auto; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.settings-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }

/* Bottom navigation */
.bottom-nav { position: fixed; z-index: 25; left: 50%; bottom: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; max-width: 480px; min-height: calc(64px + var(--safe-bottom)); padding: 5px 8px var(--safe-bottom); transform: translateX(-50%); border-top: 1px solid var(--line); background: rgba(11,13,19,.97); backdrop-filter: blur(18px); }
.bottom-nav button { display: flex; min-width: 0; min-height: 56px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 12px; background: transparent; color: var(--faint); font-size: 10px; }
.bottom-nav button.active { color: var(--accent-bright); }
.bottom-nav svg { width: 22px; height: 22px; }

/* Mini player */
.mini-player { position: fixed; z-index: 20; left: 50%; bottom: calc(64px + var(--safe-bottom)); display: flex; align-items: center; width: 100%; max-width: 480px; min-height: 72px; padding: 9px 15px; transform: translateX(-50%); border-top: 1px solid var(--line); background: rgba(20,23,32,.96); box-shadow: 0 -12px 30px rgba(0,0,0,.2); backdrop-filter: blur(18px); }
.mini-main { display: flex; align-items: center; min-width: 0; flex: 1; padding: 0; border: 0; background: transparent; text-align: left; }
.mini-cover { width: 48px; height: 48px; border-radius: 9px; background: var(--surface-raised); object-fit: cover; }
.mini-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; margin: 0 12px; }
.mini-copy strong, .mini-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-copy strong { font-size: 14px; }
.mini-copy span { margin-top: 4px; color: var(--muted); font-size: 11px; }

/* Full-screen player */
.player-view { position: fixed; z-index: 30; inset: 0; background: radial-gradient(circle at 50% 18%, #24232f 0, var(--bg) 45%, #080a0f 100%); }
.player-inner { display: flex; flex-direction: column; width: 100%; max-width: 480px; height: 100vh; height: 100dvh; margin: 0 auto; padding: var(--safe-top) 24px calc(12px + var(--safe-bottom)); }
.player-header { display: flex; flex: none; align-items: center; justify-content: space-between; height: 54px; color: #d6d8df; font-size: 13px; }
.header-spacer { width: 42px; }
.player-art-wrap { display: grid; flex: none; place-items: center; padding: 6px 0 16px; }
.player-cover { width: min(64vw, 276px); aspect-ratio: 1; border-radius: 19px; background: var(--surface-raised); box-shadow: 0 22px 55px rgba(0,0,0,.42); object-fit: cover; }
.player-meta { flex: none; text-align: center; }
.player-meta h2 { margin: 0; overflow: hidden; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.player-meta p { margin: 7px 0 9px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.quality-capsule { display: inline-block; padding: 5px 10px; border: 1px solid var(--line); border-radius: 20px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.player-track-actions { display: flex; flex: none; align-items: center; justify-content: center; gap: 24px; min-height: 38px; }
.player-track-action { display: grid; place-items: center; width: 42px; height: 38px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; }
.player-track-action:active { background: rgba(255,255,255,.06); }
.player-track-action svg { width: 21px; height: 21px; }
.lyrics { position: relative; flex: 1; min-height: 74px; margin: 8px -6px 4px; overflow-y: auto; scroll-behavior: smooth; scrollbar-width: none; mask-image: linear-gradient(transparent, black 24%, black 76%, transparent); }
.lyrics::-webkit-scrollbar { display: none; }
.lyrics::before, .lyrics::after { content: ""; display: block; height: 30%; }
.lyric-line { margin: 0; padding: 8px 4px; color: #73798a; font-size: 13px; line-height: 1.5; text-align: center; transition: color .2s, font-size .2s; }
.lyric-line.active { color: #fff; font-size: 15px; font-weight: 600; }
.lyric-empty { margin: 0; padding-top: 30px; color: var(--faint); font-size: 13px; text-align: center; }
.progress-area { flex: none; padding-top: 3px; }
#progress { width: 100%; height: 20px; margin: 0; accent-color: var(--accent-bright); cursor: pointer; }
.time-row { display: flex; justify-content: space-between; margin-top: -2px; color: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.player-controls { display: flex; flex: none; align-items: center; justify-content: center; gap: 40px; height: 70px; }
.round-control { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #e5e7ed; }
.round-control:active { background: rgba(255,255,255,.06); }
.round-control.small { width: 44px; height: 44px; flex: none; }
.round-control svg { width: 23px; height: 23px; }
.round-control .play-icon, .round-control .pause-icon { fill: currentColor; stroke-width: 1.3; }
.round-control .pause-icon { display: none; fill: none; stroke-width: 2.5; }
.round-control.is-playing .play-icon { display: none; }
.round-control.is-playing .pause-icon { display: block; }
.primary-control { width: 58px; height: 58px; background: #f2f3f6; color: #151720; }
.primary-control:active { background: #d9dbe2; }
.primary-control svg { width: 27px; height: 27px; }

/* Add-to-playlist sheet */
.playlist-sheet { position: fixed; z-index: 40; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.58); }
.playlist-sheet-panel { width: 100%; max-width: 480px; max-height: min(70vh, 560px); padding: 8px 20px calc(18px + var(--safe-bottom)); overflow-y: auto; border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; background: var(--surface); box-shadow: 0 -18px 50px rgba(0,0,0,.35); }
.playlist-sheet-header { display: flex; align-items: center; justify-content: space-between; min-height: 54px; }
.playlist-sheet-header h2 { margin: 0; font-size: 18px; }
.playlist-sheet-list { display: flex; flex-direction: column; gap: 5px; }
.playlist-option { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 52px; padding: 10px 12px; border: 0; border-radius: 11px; background: var(--surface-raised); color: var(--text); text-align: left; }
.playlist-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-option small { flex: none; color: var(--muted); font-size: 11px; }
.playlist-option:active { background: #292e3c; }
.quality-option { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid transparent; border-radius: 11px; background: var(--surface-raised); color: var(--text); text-align: left; }
.quality-option.selected { border-color: rgba(255,135,146,.45); color: var(--accent-bright); }
.player-track-actions { gap: 16px; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(152px + var(--safe-bottom)); width: max-content; max-width: calc(100vw - 40px); padding: 11px 16px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 12px; background: #292d39; box-shadow: 0 8px 30px rgba(0,0,0,.35); color: #f1f2f5; font-size: 13px; line-height: 1.5; text-align: center; }

@media (max-height: 720px) {
  .player-art-wrap { padding-bottom: 10px; }
  .player-cover { width: min(51vw, 210px); }
  .player-controls { height: 58px; }
  .lyrics { min-height: 54px; }
}

@media (min-width: 481px) {
  .app-shell { box-shadow: 0 0 60px rgba(0,0,0,.35); }
  .player-view { background: rgba(7,9,14,.96); }
  .player-inner { background: radial-gradient(circle at 50% 18%, #24232f 0, var(--bg) 45%, #080a0f 100%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; }
}
