:root {
  --bg: #0a0b0c;
  --surface: #161719;
  --surface-2: #1e2023;
  --surface-3: #2a2d31;
  --border: #26292d;
  --accent: #1fd463;
  --accent-dim: #17a84e;
  --accent-2: #7fb8a3;
  --text: #f4f6f5;
  --text-dim: #9aa3a2;
  --text-faint: #63696a;
  --danger: #d9694f;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --nav-h: 60px;
  --mini-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
svg[hidden] { display: none; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; color: var(--text); }
button, input, select { font-family: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
#app { height: 100%; min-height: 0; }
.view-root {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px calc(var(--mini-h) + var(--nav-h) + var(--safe-b) + 32px);
}
body:not(.with-chrome) .view-root { padding-bottom: 24px; }
.view-header { margin-bottom: 20px; }
.view-header h1 { font-size: 28px; letter-spacing: -0.01em; }

.auth-screen { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 24px 14vh; }
.auth-panel { display: none; }
@media (min-width: 900px) {
  .auth-screen { padding: 0; align-items: stretch; justify-content: stretch; gap: 0; }
  .auth-panel {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 28px;
    flex: 1; padding: 56px; position: relative; overflow: hidden;
    background: radial-gradient(120% 90% at 20% 15%, #1c2629 0%, var(--bg) 60%);
    border-right: 1px solid var(--border);
  }
  .auth-panel-art { width: min(34vw, 380px); border-radius: var(--radius-lg); box-shadow: 0 30px 80px rgba(0,0,0,0.55); align-self: center; margin: auto 0; }
  .auth-panel-copy { max-width: 420px; }
  .auth-panel-line { font-family: var(--font-display); font-size: 21px; line-height: 1.4; }
  .auth-panel-line.dim { color: var(--text-dim); font-family: var(--font-body); font-size: 14px; margin-top: 10px; }
  .auth-card { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; max-width: none; padding: 0 48px; }
  .auth-card .auth-form, .auth-card .auth-tabs, .auth-card .auth-brand { max-width: 380px; width: 100%; }
  .auth-card .auth-brand { text-align: left; }
}
.auth-card { width: 100%; max-width: 380px; }
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-bottom: 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.05em; color: var(--accent);
}
.auth-brand h1 { font-size: 26px; }
.auth-tag { color: var(--text-dim); font-size: 14px; margin-top: 6px; }
.auth-tabs { display: flex; gap: 4px; background: var(--surface); border-radius: var(--radius-md); padding: 4px; margin-bottom: 20px; }
.auth-tab { flex: 1; padding: 10px; border: none; background: transparent; border-radius: var(--radius-sm); color: var(--text-dim); font-weight: 600; font-size: 14px; }
.auth-tab.active { background: var(--surface-3); color: var(--text); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #a9b8b5; font-weight: 600; }
.field input {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--text); font-size: 15px;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.auth-submit { margin-top: 6px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--text-dim); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-sso { width: 100%; }

.btn { border: none; border-radius: var(--radius-sm); padding: 11px 18px; font-weight: 600; font-size: 14px; }
.btn-primary { background: var(--accent); color: #05210f; }
.btn-primary:active { background: var(--accent-dim); }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn.danger, .btn-ghost.danger { color: var(--danger); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.search-tabs { display: flex; gap: 4px; background: var(--surface); border-radius: var(--radius-md); padding: 4px; margin-bottom: 16px; }
.search-tab { flex: 1; border: none; background: transparent; padding: 9px; border-radius: var(--radius-sm); color: var(--text-dim); font-weight: 600; font-size: 13px; }
.search-tab.active { background: var(--surface-3); color: var(--accent); }
.search-url-box { display: flex; gap: 8px; margin-bottom: 12px; }
.search-url-box input {
  flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; color: var(--text); font-size: 14px;
}
.search-input-wrap { margin-bottom: 16px; }
.search-input-wrap input, .sort-row select {
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--text); font-size: 15px;
}
.sort-row { margin-bottom: 12px; }
.sort-row select { width: auto; }

.track-list { display: flex; flex-direction: column; }
.track-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 4px;
  border-bottom: 1px solid var(--border);
}
.track-row:last-child { border-bottom: none; }
.track-row { border-radius: var(--radius-sm); transition: background 0.12s ease; }
.track-row:hover { background: var(--surface-2); }
.track-row:hover .track-thumb-fallback { color: var(--text-dim); }
.track-row:hover .track-menu-btn { color: var(--text); }
.track-thumb {
  width: 46px; height: 46px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
}
.track-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.track-thumb-fallback { color: var(--text-faint); font-size: 18px; }
.track-meta { flex: 1; min-width: 0; }
.track-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-artist { font-size: 13px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.track-duration { font-family: var(--font-mono); font-size: 12px; color: var(--accent); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.track-menu-btn { background: none; border: none; color: var(--text-faint); font-size: 18px; padding: 4px 8px; flex-shrink: 0; }

.tag { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: var(--radius-sm); background: var(--surface-3); color: var(--text-dim); flex-shrink: 0; }
.tag-done { color: var(--accent-2); background: rgba(127,184,163,0.14); }

.download-ring {
  --pct: 0; width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; border: none; position: relative;
  background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--surface-3) 0);
  display: flex; align-items: center; justify-content: center;
}
.download-ring::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--bg); }
.download-ring span { position: relative; font-family: var(--font-mono); font-size: 9px; color: var(--accent); }

.skeleton-list { display: flex; flex-direction: column; gap: 14px; }
.skeleton-row { display: flex; gap: 12px; align-items: center; }
.sk { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%); background-size: 400% 100%; animation: shimmer 1.6s ease infinite; border-radius: var(--radius-sm); }
.sk-thumb { width: 46px; height: 46px; flex-shrink: 0; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 12px; }
.sk-line.short { width: 40%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-dim); }
.empty-icon { font-size: 30px; color: var(--accent); margin-bottom: 12px; font-family: var(--font-display); }
.empty-title { font-family: var(--font-display); font-size: 18px; color: var(--text); margin-bottom: 6px; }
.empty-subtitle { font-size: 14px; margin-bottom: 18px; max-width: 320px; margin-left: auto; margin-right: auto; }

.toast-root { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 12px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 500; pointer-events: none; }
.toast {
  background: var(--surface-3); border: 1px solid var(--border); color: var(--text); padding: 11px 18px;
  border-radius: var(--radius-md); font-size: 13px; opacity: 0; transform: translateY(-8px); transition: opacity 0.2s, transform 0.2s;
  max-width: 90vw; box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { border-color: var(--danger); }
.toast-success { border-color: var(--accent-2); }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0); z-index: 400; opacity: 0; transition: opacity 0.2s, background 0.2s; display: flex; align-items: flex-end; }
.sheet-backdrop.show { opacity: 1; background: rgba(0,0,0,0.5); }
.sheet {
  width: 100%; background: var(--surface-2); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 8px 8px calc(env(safe-area-inset-bottom, 0px) + 8px); transform: translateY(100%); transition: transform 0.22s ease;
}
.sheet-backdrop.show .sheet { transform: translateY(0); }
.sheet-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 12px; background: none; border: none; color: var(--text); font-size: 15px; border-radius: var(--radius-sm); text-align: left; }
.sheet-item:active { background: var(--surface-3); }
.sheet-item.danger { color: var(--danger); }
.sheet-item-icon { width: 20px; text-align: center; color: var(--text-dim); }

.playlist-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 4px; }
.playlist-grid > .empty-state, .playlist-grid > .skeleton-list { grid-column: 1 / -1; }
.create-playlist-btn { display: block; width: 100%; margin-bottom: 20px; }
.playlist-card { display: block; }
.playlist-cover { aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); display: grid; }
.playlist-cover.mosaic-1 { grid-template-columns: 1fr; }
.playlist-cover.mosaic-2 { grid-template-columns: 1fr 1fr; }
.playlist-cover.mosaic-3, .playlist-cover.mosaic-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.playlist-cover img { width: 100%; height: 100%; object-fit: cover; }
.playlist-cover-fallback { display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 24px; }
.playlist-card-name { font-weight: 600; font-size: 14px; margin-top: 8px; }
.playlist-card-count { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.playlist-header { margin-bottom: 16px; }
.playlist-desc { color: var(--text-dim); font-size: 14px; margin-bottom: 12px; }
.playlist-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.home-section { margin-bottom: 28px; }
.home-section h2 { font-size: 18px; margin-bottom: 12px; }
.home-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.home-row::-webkit-scrollbar { display: none; }
.search-tabs { scrollbar-width: none; }
.search-tabs::-webkit-scrollbar { display: none; }
.home-card { flex-shrink: 0; width: 130px; }
.home-card-thumb { width: 130px; height: 130px; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); }
.home-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.home-card-title { font-size: 13px; font-weight: 600; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.video-stage { position: fixed; inset: 0; background: #000; z-index: 300; display: flex; align-items: center; justify-content: center; }
.video-stage[hidden] { display: none; }
.video-stage video { width: 100%; height: 100%; object-fit: contain; }

.mini-player {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); height: var(--mini-h);
  background: var(--surface-2); border-top: 1px solid var(--border); z-index: 200;
}
.mini-progress { height: 2px; background: var(--surface-3); }
.mini-progress-fill { height: 100%; width: 0%; background: var(--accent); }
.mini-player-inner { display: flex; align-items: center; gap: 12px; height: calc(var(--mini-h) - 2px); padding: 0 12px; }
.mini-thumb { width: 42px; height: 42px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-faint); }
.mini-meta { flex: 1; min-width: 0; }
.mini-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-artist { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-btn { background: none; border: none; color: var(--text); width: 34px; height: 34px; flex-shrink: 0; position: relative; }
.mini-btn.active, .mini-btn.liked { color: var(--accent); }
.mini-btn:not(.active):not(.liked):hover { color: var(--text); }
.mini-like svg { width: 20px; height: 20px; }
.mini-btn svg { width: 24px; height: 24px; fill: currentColor; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b); background: var(--surface); border-top: 1px solid var(--border);
  display: flex; z-index: 200;
}
.bottom-nav[hidden], .mini-player[hidden] { display: none; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-faint); font-size: 10px; font-weight: 600; }
.nav-item svg { width: 22px; height: 22px; fill: currentColor; }
.nav-item.active { color: var(--accent); }
.nav-desktop-only { display: none; }

.np-screen {
  position: fixed; inset: 0; z-index: 320; background: var(--bg);
  display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 8px) 22px calc(env(safe-area-inset-bottom, 0px) + 26px);
  overflow: hidden; will-change: transform;
}
.np-bg { position: absolute; inset: -20%; background-size: cover; background-position: center; filter: blur(46px) saturate(1.2); opacity: 0.28; transform: scale(1.1); z-index: -2; }
.np-screen::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18,24,26,0.55) 0%, rgba(18,24,26,0.82) 55%, var(--bg) 100%); }
.np-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; margin: 0 -22px; padding: 0 10px; }
.np-icon-btn { background: none; border: none; color: var(--text); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.np-icon-btn svg { width: 26px; height: 26px; fill: currentColor; }
.np-icon-btn:active { background: var(--surface-2); }
.np-context { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 22px 0; }
.np-art { width: min(72vw, 340px); aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(31,212,99,0.14); display: flex; align-items: center; justify-content: center; }
.np-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-art-fallback { font-size: 60px; color: var(--text-faint); font-family: var(--font-display); }
.np-body { flex-shrink: 0; }
.np-info { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.np-info-text { flex: 1; min-width: 0; }
.np-title { font-family: var(--font-display); font-size: 25px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 15px; color: var(--text-dim); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-like { background: none; border: none; width: 40px; height: 40px; flex-shrink: 0; color: var(--text-dim); display: flex; align-items: center; justify-content: center; }
.np-like svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.np-like.liked { color: var(--accent); }
.np-like.liked svg { fill: var(--accent); stroke: var(--accent); }
.np-seek { margin-bottom: 20px; }
.np-bar { position: relative; height: 5px; background: var(--surface-3); border-radius: 3px; cursor: pointer; touch-action: none; }
.np-bar-buffered { position: absolute; left: 0; top: 0; height: 100%; background: var(--surface-3); filter: brightness(1.5); border-radius: 3px; }
.np-bar-fill { position: absolute; left: 0; top: 0; height: 100%; background: var(--accent); border-radius: 3px; }
.np-bar-handle { position: absolute; top: 50%; width: 13px; height: 13px; background: var(--accent); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.np-times { display: flex; justify-content: space-between; margin-top: 9px; font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.np-controls { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 22px; }
.np-controls-side { display: flex; align-items: center; gap: 8px; }
.np-ctl-spacer { width: 48px; height: 48px; flex-shrink: 0; }
.np-volume-row { display: flex; align-items: center; gap: 10px; color: var(--text-dim); margin-bottom: 18px; }
.np-volume-row .volume-slider { flex: 1; accent-color: var(--accent); }
.np-ctl { background: none; border: none; color: var(--text); width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.np-ctl svg { width: 26px; height: 26px; fill: currentColor; }
.np-ctl.active { color: var(--accent); }
.np-ctl:active { background: var(--surface-2); }
.np-play { width: 68px; height: 68px; border-radius: 50%; border: none; background: var(--accent); color: #05210f; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 8px 24px rgba(31,212,99,0.32); transition: transform 0.12s ease, background 0.12s ease; }
.np-play:hover { transform: scale(1.06); background: #33e074; }
.np-play:active { background: var(--accent-dim); }
.np-play svg { width: 32px; height: 32px; fill: currentColor; }
.np-secondary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.np-mode { display: flex; gap: 4px; background: var(--surface); border-radius: var(--radius-md); padding: 4px; }
.np-mode-btn { display: flex; align-items: center; gap: 6px; border: none; background: transparent; color: var(--text-dim); font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: var(--radius-sm); }
.np-mode-btn svg { width: 17px; height: 17px; fill: currentColor; }
.np-mode-btn.active { background: var(--surface-3); color: var(--accent); }
.np-quality { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); padding: 9px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; }
.np-quality-icon { width: 16px; height: 16px; fill: currentColor; }
.np-screen.np-video { background: transparent; }
.np-screen.np-video .np-bg, .np-screen.np-video::after { display: none; }
.np-screen.np-video .np-stage { visibility: hidden; }
.np-ctl { position: relative; }
.np-repeat-one { position: absolute; top: 0; right: 0; font-family: var(--font-mono); font-size: 9px; font-weight: 700; color: var(--accent); }
@media (min-width: 900px) {
  .np-screen { padding: 20px 48px 44px; }
  .np-art { width: min(48vh, 520px); }
  .np-body { width: min(720px, 100%); margin: 0 auto; }
  .np-title { font-size: 30px; white-space: normal; }
  .np-topbar { margin: 0 -48px; padding: 0 16px; }
}
.np-screen.np-video .np-topbar, .np-screen.np-video .np-body { position: relative; z-index: 1; }
.np-screen.np-video .np-topbar { text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.np-screen.np-video .np-body { background: linear-gradient(180deg, transparent, rgba(10,13,14,0.85) 30%); padding: 40px 22px 0; margin: 0 -22px -26px; }

.q-section-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin: 20px 0 10px; display: flex; align-items: center; gap: 10px; }
.q-section-label:first-child { margin-top: 0; }
.q-radio-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); background: rgba(31,212,99,0.14); padding: 3px 8px; border-radius: var(--radius-sm); text-transform: none; }
.q-list { display: flex; flex-direction: column; }
.q-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.q-row:last-child { border-bottom: none; }
.q-row:not(.now) { border-radius: var(--radius-sm); transition: background 0.12s ease; }
.q-row:not(.now):hover { background: var(--surface-2); }
.q-row:hover .q-remove { color: var(--text); }
.q-row.now { background: var(--surface); border-radius: var(--radius-sm); border-bottom: none; padding: 10px 10px; }
.q-thumb { width: 46px; height: 46px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.q-thumb img { width: 100%; height: 100%; object-fit: cover; }
.q-meta { flex: 1; min-width: 0; }
.q-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row.now .q-title { color: var(--accent); }
.q-artist { font-size: 13px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.q-remove { background: none; border: none; color: var(--text-faint); font-size: 15px; padding: 6px 8px; flex-shrink: 0; }
.q-badge { font-size: 11px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.q-row.pending { opacity: 0.75; }
.q-eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; flex-shrink: 0; padding-right: 4px; }
.q-eq span { width: 3px; background: var(--accent); border-radius: 1px; transform-origin: bottom; animation: eq 0.9s ease-in-out infinite; }
.q-eq span:nth-child(1) { height: 40%; animation-delay: -0.2s; }
.q-eq span:nth-child(2) { height: 100%; animation-delay: -0.5s; }
.q-eq span:nth-child(3) { height: 65%; }
@keyframes eq { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }
.q-spinner { width: 20px; height: 20px; border: 2px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.mini-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.mini-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.mini-right { display: none; }
.mini-desktop { display: none; }
@media (min-width: 900px) {
  :root { --nav-h: 0px; --mini-h: 76px; }
  body.with-chrome { display: grid; grid-template-columns: 240px 1fr; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "sidebar main" "mini mini"; height: 100%; }
  .bottom-nav {
    position: static; grid-area: sidebar; flex-direction: column; align-items: stretch; width: 240px; height: auto; min-height: 0;
    padding: 24px 12px; border-top: none; border-right: 1px solid var(--border); gap: 4px;
  }
  .nav-item { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; }
  .nav-item.active { background: var(--surface-2); }
  .nav-item svg { width: 20px; height: 20px; }
  .nav-desktop-only { display: flex; }
  .nav-pinned-bottom { margin-top: auto; }
  body.with-chrome #app { grid-area: main; min-height: 0; overflow: hidden; }
  body.with-chrome .view-root { height: 100%; min-height: 0; padding: 32px 40px 48px; }
  body.with-chrome .view-root > :not(.np-screen) { max-width: 1100px; }
  .mini-player { position: static; grid-area: mini; height: var(--mini-h); }
  .mini-player-inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; padding: 0 20px; }
  .mini-left { flex: initial; }
  .mini-controls { justify-content: center; gap: 10px; }
  .mini-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--text-dim); }
  .mini-desktop { display: inline-flex; }
  .mini-progress { cursor: pointer; height: 3px; }
  .volume-slider { width: 110px; accent-color: var(--accent); }
  .playlist-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .sk, .toast, .sheet { animation: none !important; transition: none !important; }
}

.home-card-sub { font-size: 11px; color: var(--text-dim); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-card-action { margin-top: 8px; }
.home-card-action .btn { width: 100%; }
.home-card-thumb.mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.home-card-thumb.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dl-origin { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.dl-state { font-size: 12px; color: var(--text-dim); margin-top: 4px; display: inline-block; }
.dl-error { font-size: 12px; color: var(--danger); margin-top: 4px; display: inline-block; max-width: 100%; }
.dl-progress { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; margin-top: 6px; width: 100%; }
.dl-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.dl-progress-indeterminate { background: linear-gradient(90deg, var(--surface-3) 25%, var(--accent-dim) 50%, var(--surface-3) 75%); background-size: 400% 100%; animation: shimmer 1.6s ease infinite; }
.dl-row { align-items: flex-start; padding: 12px 4px; }
.dl-row .track-thumb { margin-top: 1px; }
.dl-row .btn { flex-shrink: 0; }

.settings-section { margin-bottom: 30px; }
.settings-section h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; font-family: var(--font-body); }
.settings-row { padding: 8px 0 14px; }
.settings-row-label { font-size: 14px; font-weight: 600; }
.settings-row-sub { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.settings-section .search-tabs { margin-bottom: 18px; }
.settings-section .auth-form { margin: 14px 0 18px; }
.follow-row { flex-wrap: wrap; }
.follow-row .track-meta { flex: 1 1 200px; }
.follow-actions { display: flex; gap: 8px; flex-shrink: 0; }

@media (min-width: 900px) {
  .np-screen.np-video { padding-bottom: 0; }
  .np-screen.np-video .np-body { width: auto; max-width: none; margin: 0 -48px; padding: 56px 48px 28px; }
}
.np-screen.np-video .np-topbar, .np-screen.np-video .np-body { transition: opacity 0.35s; }
.np-screen.np-video.np-hide-controls { cursor: none; }
.np-screen.np-video.np-hide-controls .np-topbar, .np-screen.np-video.np-hide-controls .np-body { opacity: 0; pointer-events: none; }
.admin-row { flex-wrap: wrap; align-items: flex-start; }
.admin-row .track-meta { flex: 1 1 260px; }
.admin-detail { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
