/* LX Web 鈥?Spotify-inspired UI */

:root {
  --bg: #000;
  --bg-elev: #121212;
  --bg-highlight: #1a1a1a;
  --bg-press: #282828;
  --bg-tinted: #181818;
  --text: #fff;
  --text-sub: #c8c8c8;
  --text-dim: #9a9a9a;
  --green: #1db954;
  --green-hover: #1ed760;
  --green-press: #169c46;
  --border: rgba(255,255,255,0.08);
  --sidebar-w: 280px;
  --player-h: 90px;
  --topbar-h: 64px;
  --radius: 8px;
  --radius-lg: 12px;
  --font-ui: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-song: "NSimSun", "新宋体", "SimSun", "宋体", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --font-display: var(--font-song);
  --font: var(--font-song);
  --ease: cubic-bezier(.3,0,.4,1);
  --shadow: 0 8px 24px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: var(--font-song);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--text-sub); text-decoration: none; }
a:hover { color: var(--text); text-decoration: underline; }
img { display: block; max-width: 100%; }

/* ========== Font policy ==========
 * 正文/标题/歌词中文：新宋体
 * 小号 UI 文字：清晰无衬线（避免新宋体小字发虚、对比不足）
 */
button,
input,
select {
  font-family: var(--font-ui);
}

/* Content / titles stay Song */
.sidebar-brand,
.sidebar-card-title,
.nav-item,
.hero-meta h1,
.section-head h2,
.song-item .title,
.queue-item .q-title,
.player-title,
.np-title,
.np-lyrics-inner .line,
.lyrics-inner .line,
.empty-state h3 {
  font-family: var(--font-song);
}

/* UI chrome + small labels: clear UI font */
.chip,
.chip-tab,
.chip-rm,
.chip.primary,
.muted,
.small,
.source-hint,
.sidebar-footer,
.sidebar-footer a,
.sidebar-brand .brand-text,
.sidebar-card-desc,
.queue-item .q-sub,
.song-item .sub,
.song-item .artist,
.song-item .actions,
.song-item .idx,
.list-head,
.player-artist,
.player-timeline,
.player-right,
.player-right select,
.current-source-badge,
.count-badge,
.hero-badge,
.quality-badge,
.section-sub,
.toast,
.np-lyrics-hint,
.np-artist,
.np-time,
.np-time-cur,
.np-time-dur,
.np-sheet-title,
.np-ctrl,
.np-icon-btn,
.empty-state p,
.lyrics-section .hint,
.btn-green,
.btn-ghost {
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: auto;
}

/* Small-text readability: min size ~13px, stronger contrast */
.muted {
  color: #c4c4c4;
}
.small {
  font-size: 0.8125rem; /* 13px */
  line-height: 1.45;
  color: #c4c4c4;
  font-weight: 500;
}
.source-hint {
  font-size: 0.8125rem !important;
  color: #a8a8a8 !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.sidebar-footer,
.sidebar-footer a {
  font-size: 0.8125rem !important;
  color: #a8a8a8 !important;
  font-weight: 500;
  line-height: 1.45;
}
.sidebar-brand .brand-text {
  font-size: 0.8125rem !important;
  font-weight: 700;
  line-height: 1.35;
  color: #f0f0f0;
}
.sidebar-card-desc {
  font-size: 0.8125rem !important;
  color: #c4c4c4 !important;
  line-height: 1.45;
}
.queue-item .q-sub {
  font-size: 0.8125rem !important;
  color: #c4c4c4 !important;
  font-weight: 500;
}
.song-item .sub,
.song-item .artist {
  font-size: 0.8125rem !important;
  color: #c4c4c4 !important;
  font-weight: 500;
  line-height: 1.4;
}
.player-artist {
  font-size: 0.8125rem !important;
  color: #c8c8c8 !important;
  font-weight: 500;
}
.player-timeline {
  font-size: 0.75rem !important; /* 12px tabular times */
  color: #bdbdbd !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.player-right select,
.player-right {
  font-size: 0.8125rem !important;
  color: #d0d0d0;
  font-weight: 600;
}
.chip,
.chip-tab,
.chip.primary {
  font-size: 0.8125rem !important;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.chip-rm {
  font-family: var(--font-ui) !important;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  color: #e8e8e8 !important;
  -webkit-font-smoothing: antialiased !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
.count-badge,
.hero-badge {
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}
.section-sub {
  font-size: 0.875rem !important;
  color: #c4c4c4 !important;
  font-weight: 500;
  line-height: 1.45;
}
.list-head {
  font-size: 0.8125rem !important;
  color: #b0b0b0 !important;
  font-weight: 600;
}
.np-lyrics-hint {
  font-size: 0.8125rem !important;
  color: rgba(255, 255, 255, 0.72) !important;
  font-weight: 600;
}
.np-artist {
  font-size: 1rem !important;
  color: rgba(255, 255, 255, 0.82) !important;
  font-weight: 500;
}
.np-time,
.np-time-cur,
.np-time-dur {
  font-size: 0.75rem !important;
  color: rgba(255, 255, 255, 0.72) !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.empty-state p {
  font-size: 0.875rem !important;
  color: #c4c4c4 !important;
  line-height: 1.5;
  font-weight: 500;
}
.toast {
  font-size: 0.875rem !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.current-source-badge {
  font-size: 0.8125rem !important;
  font-weight: 750;
}

/* 新宋体正文：标题与歌词保持衬线气质 */
.hero-meta h1,
.np-title,
.song-item .title,
.queue-item .q-title,
.player-title,
.section-head h2,
.np-lyrics-inner .line {
  font-family: var(--font-song);
  text-rendering: optimizeLegibility;
}



.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: calc(100vh - var(--player-h));
  gap: 8px;
  padding: 8px 8px 0;
  background: #000;
}

/* Sidebar */
.sidebar {
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 16px 12px 12px;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 12px 18px; font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em;
}
.logo { color: var(--text); display: grid; place-items: center; }
.sidebar-brand .brand-text {
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;
  max-width: 168px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.sidebar-footer a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: .72rem;
}
.sidebar-footer a:hover { color: var(--text); text-decoration: underline; }

.side-nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.nav-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%; border: 0; background: transparent; color: var(--text-sub);
  padding: 10px 14px; border-radius: var(--radius); cursor: pointer;
  font-weight: 650; font-size: .95rem; text-align: left;
  transition: color .15s, background .15s;
}
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--text); background: var(--bg-press); }

.sidebar-card {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  background: var(--bg-tinted); border-radius: var(--radius-lg);
  padding: 14px 12px; overflow: hidden;
}
.sidebar-card-title { font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.sidebar-card-desc { margin: 0 0 12px; color: var(--text-sub); font-size: .8rem; line-height: 1.4; }
.queue-mini {
  flex: 1; overflow: auto; min-height: 80px;
  scrollbar-width: thin; scrollbar-color: #3e3e3e transparent;
}
.queue-mini::-webkit-scrollbar { width: 8px; }
.queue-mini::-webkit-scrollbar-thumb { background: #3e3e3e; border-radius: 4px; }
.queue-item {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  padding: 8px; border-radius: 6px; cursor: pointer;
}
.queue-item:hover { background: rgba(255,255,255,.06); }
.queue-item.active { background: rgba(255,255,255,.1); }
.queue-item .q-title {
  font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-item .q-sub {
  font-size: .78rem; color: #b3b3b3; margin-top: 3px; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 400; letter-spacing: 0;
}
.chip {
  border: 0; background: transparent; color: #b3b3b3; cursor: pointer;
  font-size: .8rem; font-weight: 600;
  line-height: 1.2; letter-spacing: 0; padding: 5px 10px; border-radius: 999px;
  white-space: nowrap;
}
.chip:hover { color: var(--text); background: rgba(255,255,255,.1); }
.chip-rm {
  font-family: var(--font-ui) !important;
  color: #f2f2f2 !important;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  font-size: .8rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.25 !important;
  padding: 5px 12px !important;
  min-width: 3.4em;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.chip-rm:hover {
  color: #fff !important;
  background: rgba(255,80,80,.24);
  border-color: rgba(255,120,120,.4);
}
.btn-ghost {
  margin-top: 10px; border: 1px solid #727272; background: transparent; color: var(--text);
  border-radius: 999px; padding: 7px 14px; font-size: .78rem; font-weight: 700;
  cursor: pointer; align-self: flex-start;
}
.btn-ghost:hover { border-color: #fff; transform: scale(1.02); }
.sidebar-footer {
  padding: 12px 8px 4px; font-size: .72rem; color: var(--text-dim);
}

/* Main */
.main-wrap {
  min-width: 0; min-height: 0; display: flex; flex-direction: column;
  background: var(--bg-elev); border-radius: var(--radius-lg); overflow: hidden;
  position: relative;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto minmax(220px, 520px) auto;
  gap: 12px; align-items: center;
  min-height: var(--topbar-h); padding: 12px 20px 8px;
  background: #121212;
}
.topbar-right { display: flex; justify-content: flex-end; align-items: center; }
.current-source-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-size: .82rem; font-weight: 800;
  letter-spacing: .02em;
  background: rgba(29,185,84,.18); color: #1ed760;
  border: 1px solid rgba(29,185,84,.5);
  white-space: nowrap;
  box-shadow: 0 0 0 3px rgba(29,185,84,.12), 0 6px 18px rgba(29,185,84,.18);
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .15s;
}
.current-source-badge:hover { transform: translateY(-1px); }
.current-source-badge::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent);
}
/* platform-tinted selected badge */
.current-source-badge.src-tx {
  color: #1ed760;
  background: rgba(30, 215, 96, .16);
  border-color: rgba(30, 215, 96, .55);
  box-shadow: 0 0 0 3px rgba(30, 215, 96, .14), 0 8px 22px rgba(30, 215, 96, .22);
}
.current-source-badge.src-kw {
  color: #111;
  background: #ffe211;
  border-color: #f0d000;
  box-shadow: 0 0 0 3px rgba(255, 226, 17, .22), 0 8px 22px rgba(255, 226, 17, .28);
}
.current-source-badge.src-kg {
  color: #fff;
  background: linear-gradient(135deg, #2ca6e0, #1a8bc4);
  border-color: #4db7ef;
  box-shadow: 0 0 0 3px rgba(44, 166, 224, .2), 0 8px 22px rgba(44, 166, 224, .28);
}
.current-source-badge.src-mg {
  color: #fff;
  background: linear-gradient(135deg, #ed3a5c, #d4244a);
  border-color: #ff6b88;
  box-shadow: 0 0 0 3px rgba(237, 58, 92, .2), 0 8px 22px rgba(237, 58, 92, .28);
}
.current-source-badge.src-wy {
  color: #fff;
  background: linear-gradient(135deg, #e60026, #c4001d);
  border-color: #ff4d6a;
  box-shadow: 0 0 0 3px rgba(230, 0, 38, .18), 0 8px 22px rgba(230, 0, 38, .26);
}
.top-controls { display: flex; gap: 8px; }
.circle-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.55); color: var(--text); display: grid; place-items: center;
  cursor: pointer;
}
.circle-btn:disabled { opacity: .35; cursor: not-allowed; }
.circle-btn:not(:disabled):hover { background: rgba(0,0,0,.75); }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #242424; border-radius: 999px; padding: 8px 14px;
  border: 1px solid transparent; transition: border-color .15s, background .15s;
}
.search-box:focus-within { border-color: #fff; background: #2a2a2a; }
.search-ico { color: var(--text-sub); flex-shrink: 0; }
.search-box input {
  flex: 1; border: 0; outline: 0; background: transparent; color: var(--text);
  min-width: 0; font-size: .92rem;
}
.search-box input::placeholder { color: var(--text-dim); }

.source-bar {
  position: sticky; top: var(--topbar-h); z-index: 19;
  padding: 0 20px 12px;
  background: linear-gradient(180deg, rgba(18,18,18,.96) 0%, rgba(18,18,18,.88) 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.source-bar-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 10px 12px;
}
.source-bar-label {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-sub); font-size: .8rem; font-weight: 700;
  letter-spacing: .02em; flex-shrink: 0;
}
.source-bar-label svg { opacity: .85; }
.source-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0;
}
.chip-tab {
  border: 0; border-radius: 999px; padding: 8px 14px; font-size: .82rem; font-weight: 700;
  background: rgba(255,255,255,.08); color: var(--text); cursor: pointer;
  transition: background .15s, transform .1s, color .15s, box-shadow .15s;
  display: inline-flex; align-items: center; gap: 7px;
}
.chip-tab:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.chip-tab.active {
  color: #000;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.15), 0 6px 18px rgba(0,0,0,.35);
  transform: translateY(-1px) scale(1.04);
}
.chip-tab.active[data-source="tx"] {
  color: #063;
  background: linear-gradient(180deg, #7dffb2 0%, #1ed760 100%);
  box-shadow: 0 0 0 2px rgba(30,215,96,.35), 0 8px 20px rgba(30,215,96,.35);
}
.chip-tab.active[data-source="kw"] {
  color: #1a1a1a;
  background: linear-gradient(180deg, #fff36a 0%, #ffe211 100%);
  box-shadow: 0 0 0 2px rgba(255,226,17,.4), 0 8px 20px rgba(255,226,17,.35);
}
.chip-tab.active[data-source="kg"] {
  color: #fff;
  background: linear-gradient(180deg, #5ec4f0 0%, #2ca6e0 100%);
  box-shadow: 0 0 0 2px rgba(44,166,224,.4), 0 8px 20px rgba(44,166,224,.35);
}
.chip-tab.active[data-source="mg"] {
  color: #fff;
  background: linear-gradient(180deg, #ff6b88 0%, #ed3a5c 100%);
  box-shadow: 0 0 0 2px rgba(237,58,92,.4), 0 8px 20px rgba(237,58,92,.35);
}
.chip-tab.active[data-source="wy"] {
  color: #fff;
  background: linear-gradient(180deg, #ff4d6a 0%, #e60026 100%);
  box-shadow: 0 0 0 2px rgba(230,0,38,.35), 0 8px 20px rgba(230,0,38,.3);
}
.chip-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0,0,0,.15);
}
.chip-tab.active .chip-dot {
  box-shadow: 0 0 0 2px rgba(0,0,0,.2);
  transform: scale(1.15);
}
.chip-dot.wy { background: #e60026; }
.chip-dot.tx { background: #31c27c; }
.chip-dot.kw { background: #ffe211; }
.chip-dot.kg { background: #2ca6e0; }
.chip-dot.mg { background: #ed3a5c; }
.source-hint {
  margin: 0 0 0 auto; color: var(--text-dim); font-size: .75rem; font-weight: 500;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .source-hint { display: none; }
  .topbar { grid-template-columns: auto 1fr; }
  .topbar-right { display: none; }
}
@media (max-width: 640px) {
  .source-bar { padding: 0 12px 10px; }
  .source-bar-inner { padding: 8px; }
  .chip-tab { padding: 7px 11px; font-size: .78rem; }
}

.content {
  flex: 1; overflow: auto; min-height: 0;
  scrollbar-width: thin; scrollbar-color: #3e3e3e transparent;
}
.content::-webkit-scrollbar { width: 12px; }
.content::-webkit-scrollbar-thumb { background: #3e3e3e; }

/* Hero */
.hero {
  position: relative; padding: 20px 24px 28px; overflow: hidden;
  background: linear-gradient(180deg, #3a3a3a 0%, var(--bg-elev) 100%);
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: blur(50px) saturate(1.2); opacity: 0; transform: scale(1.2);
  transition: opacity .5s ease; pointer-events: none;
}
.hero-bg.on { opacity: .45; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, var(--bg-elev) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; gap: 24px; align-items: flex-end;
}
.hero-cover-wrap {
  width: 192px; height: 192px; flex-shrink: 0;
  border-radius: 4px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
  background: #282828;
}
.hero-cover { width: 100%; height: 100%; object-fit: cover; }
.hero-meta { min-width: 0; padding-bottom: 4px; }
.hero-type {
  display: inline-block; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
  color: var(--text);
  background: rgba(0,0,0,.25); padding: 3px 8px; border-radius: 4px;
}
.hero-meta h1 {
  margin: 0 0 10px; font-size: clamp(1.8rem, 4vw, 3.4rem); line-height: 1.1;
  font-weight: 800; letter-spacing: -.03em;
  font-family: var(--font-display);
  word-break: break-word;
}
.hero-sub {
  margin: 0 0 18px; color: var(--text-sub); font-size: .95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-green {
  border: 0; border-radius: 999px; padding: 12px 28px; font-weight: 700;
  font-size: .95rem; background: var(--green); color: #000; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-green:hover { background: var(--green-hover); transform: scale(1.03); }
.btn-green:active { background: var(--green-press); transform: scale(1); }
.pill {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; background: rgba(0,0,0,.35); color: #fff;
  border: 1px solid rgba(255,255,255,.12);
}
/* hero selected source pill */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.pill.src-tx {
  color: #0b3; background: rgba(30,215,96,.16); border: 1px solid rgba(30,215,96,.45);
  box-shadow: 0 0 0 2px rgba(30,215,96,.12);
}
.pill.src-kw {
  color: #111; background: #ffe211; border: 1px solid #e6cb00;
  box-shadow: 0 0 0 2px rgba(255,226,17,.18);
}
.pill.src-kg {
  color: #fff; background: #2ca6e0; border: 1px solid #4db7ef;
  box-shadow: 0 0 0 2px rgba(44,166,224,.16);
}
.pill.src-mg {
  color: #fff; background: #ed3a5c; border: 1px solid #ff6b88;
  box-shadow: 0 0 0 2px rgba(237,58,92,.16);
}
.pill.src-wy {
  color: #fff; background: #e60026; border: 1px solid #ff4d6a;
}
.count-badge {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px;
  padding: 0 7px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  background: rgba(255,255,255,.12); color: #fff;
}

/* Sections */
.section { padding: 8px 24px 28px; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 1.35rem; font-weight: 750; letter-spacing: -.02em; }
.section-sub { margin: 6px 0 0; color: var(--text-sub); font-size: .85rem; }

.table-head {
  display: grid;
  grid-template-columns: 40px minmax(180px, 2.2fr) minmax(100px, 1.2fr) 70px 90px;
  gap: 12px; padding: 0 12px 8px; color: #a7a7a7; font-size: .8rem;
  font-weight: 600; line-height: 1.4; letter-spacing: 0;
  border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 8px;
  text-transform: none;
}
.song-list { display: flex; flex-direction: column; }
.song-item {
  display: grid;
  grid-template-columns: 40px minmax(180px, 2.2fr) minmax(100px, 1.2fr) 70px 90px;
  gap: 12px; align-items: center; padding: 8px 12px; border-radius: 6px;
  cursor: pointer; transition: background .12s;
}
.song-item:hover { background: rgba(255,255,255,.06); }
.song-item.active { background: rgba(255,255,255,.1); }
.song-item .idx { color: var(--text-sub); text-align: center; font-variant-numeric: tabular-nums; font-size: .9rem; }
.song-item.active .idx, .song-item:hover .idx { color: var(--text); }
.song-item .title-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.song-item img {
  width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: #282828; flex-shrink: 0;
}
.song-item .title { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-item.active .title { color: var(--green); }
.song-item .sub {
  font-size: .82rem; color: #b3b3b3; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px;
  font-weight: 400; letter-spacing: 0;
}
.song-item .album, .song-item .dur {
  color: #b3b3b3; font-size: .84rem; line-height: 1.35; font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.song-item .actions { display: flex; justify-content: flex-end; gap: 4px; opacity: 0; transition: opacity .12s; }
.song-item:hover .actions, .song-item.active .actions { opacity: 1; }
.chip.primary {
  background: transparent; color: var(--text-sub); border: 0; font-weight: 700; font-size: .75rem;
}
.chip.primary:hover { color: var(--green); }

.empty-state {
  display: grid; place-items: center; text-align: center; gap: 6px; padding: 60px 20px; color: var(--text-sub);
}
.empty-icon {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: #282828; color: var(--text); font-size: 1.6rem; margin-bottom: 8px;
}
.empty-state h3 { margin: 0; color: var(--text); font-size: 1.2rem; }
.empty-state p { margin: 0; font-size: .9rem; }

.loading {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center;
  gap: 12px; background: rgba(18,18,18,.55); z-index: 5;
}
.loading[hidden] { display: none !important; }
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12); border-top-color: var(--green);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lyrics-section h2 { margin: 0 0 10px; font-size: 1.2rem; }
.lyrics {
  max-height: 220px; overflow: auto; background: #181818; border-radius: var(--radius-lg);
  padding: 16px; scrollbar-width: thin; scrollbar-color: #3e3e3e transparent;
}
.lyrics-inner { text-align: center; line-height: 2; color: var(--text-sub); font-size: .95rem; }
.lyrics-inner .line { padding: 2px 8px; border-radius: 4px; transition: color .2s, background .2s; }
.lyrics-inner .line.active {
  color: var(--text); font-weight: 700; background: rgba(29,185,84,.12);
}

/* Player */
.player {
  height: var(--player-h); background: #000; border-top: 1px solid #181818;
  display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 12px; align-items: center;
  padding: 0 16px; position: relative; z-index: 30;
}
.player-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-open-detail {
  border: 0; background: transparent; color: inherit; padding: 0; text-align: left;
  cursor: pointer; border-radius: 6px; max-width: 100%;
}
.player-open-detail:hover .player-title { text-decoration: underline; }
.player-open-detail:hover .player-cover { transform: scale(1.04); }
.player-open-detail .player-cover { transition: transform .15s ease; }
.player-open-detail .open-chevron {
  color: var(--text-sub); display: grid; place-items: center; flex-shrink: 0;
  opacity: 0; transition: opacity .15s;
}
.player-open-detail:hover .open-chevron { opacity: 1; color: var(--text); }
.player-cover {
  width: 56px; height: 56px; border-radius: 4px; object-fit: cover; background: #282828;
}
.player-meta { min-width: 0; }
.player-title {
  font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-artist {
  font-size: .75rem; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}

.player-center { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.player-controls { display: flex; align-items: center; gap: 10px; }
.pbtn {
  border: 0; background: transparent; color: var(--text-sub); width: 32px; height: 32px;
  border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: color .12s, transform .1s;
}
.pbtn:hover { color: var(--text); }
.pbtn.play {
  width: 36px; height: 36px; background: #fff; color: #000;
  position: relative;
  display: grid;
  place-items: center;
}
.pbtn.play:hover { transform: scale(1.06); color: #000; background: #fff; }
.pbtn.play .icon-play,
.pbtn.play .icon-pause {
  grid-area: 1 / 1;
  place-self: center;
  pointer-events: none;
  margin: 0;
}
/* 鏈挱鏀撅細鍙樉绀轰笁瑙掑舰锛涙挱鏀句腑锛氬彧鏄剧ず鏆傚仠 */
.pbtn.play .icon-play { display: block !important; visibility: visible !important; opacity: 1; }
.pbtn.play .icon-pause { display: none !important; visibility: hidden !important; opacity: 0; }
.pbtn.play.is-playing .icon-play,
.pbtn.play[data-playing="true"] .icon-play {
  display: none !important; visibility: hidden !important; opacity: 0;
}
.pbtn.play.is-playing .icon-pause,
.pbtn.play[data-playing="true"] .icon-pause {
  display: block !important; visibility: visible !important; opacity: 1;
}
.pbtn.play .icon-play[hidden],
.pbtn.play .icon-pause[hidden] { display: none !important; visibility: hidden !important; opacity: 0 !important; }

.btn-green {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-green .hero-ico { flex-shrink: 0; }
.btn-green .hero-play { display: inline-block; }
.btn-green .hero-pause { display: none; }
.btn-green.is-playing .hero-play,
.btn-green[data-playing="true"] .hero-play { display: none !important; }
.btn-green.is-playing .hero-pause,
.btn-green[data-playing="true"] .hero-pause { display: inline-block !important; }

.mini-eq {
  display: none; align-items: flex-end; gap: 2px; height: 12px; width: 14px;
}
.mini-eq.on { display: flex; }
.mini-eq i {
  width: 2px; height: 100%; background: var(--green); border-radius: 1px;
  animation: eq .75s ease-in-out infinite;
}
.mini-eq i:nth-child(2) { animation-delay: .12s; }
.mini-eq i:nth-child(3) { animation-delay: .24s; }
@keyframes eq {
  0%,100% { transform: scaleY(.35); }
  50% { transform: scaleY(1); }
}

.player-timeline {
  display: grid; grid-template-columns: 40px 1fr 40px; gap: 8px; align-items: center;
  width: min(100%, 560px); color: var(--text-sub); font-size: .7rem;
  font-variant-numeric: tabular-nums;
}
#durTime { text-align: right; }

.player-right {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
}
.quality select {
  background: #242424; border: 1px solid #333; color: var(--text);
  border-radius: 4px; padding: 5px 8px; font-size: .75rem; outline: none;
}
.quality select:hover, .quality select:focus { border-color: #555; }
.player-right input[type="range"] { width: 100px; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px;
  background: linear-gradient(var(--green), var(--green)) 0/var(--progress,0%) 100% no-repeat, #4d4d4d;
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; opacity: 0; transition: opacity .12s;
}
.player-timeline:hover input[type="range"]::-webkit-slider-thumb,
.player-right:hover input[type="range"]::-webkit-slider-thumb,
input[type="range"]:active::-webkit-slider-thumb { opacity: 1; }
input[type="range"]:hover { background:
  linear-gradient(var(--green-hover), var(--green-hover)) 0/var(--progress,0%) 100% no-repeat, #5a5a5a;
}
#volBar { --progress: 80%; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--player-h) + 16px);
  transform: translateX(-50%); z-index: 80;
  background: #2e77d0; color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: .88rem; font-weight: 600; box-shadow: var(--shadow);
  max-width: min(90vw, 420px); text-align: center;
}
.muted { color: var(--text-sub); }
.center { text-align: center; }
.small { font-size: .82rem; }

/* Responsive */
@media (max-width: 980px) {
  .app { grid-template-columns: 72px 1fr; }
  .sidebar-brand span,
  .nav-item span,
  .sidebar-card-desc,
  .sidebar-footer,
  .btn-ghost { display: none; }
  .sidebar-brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .nav-item { justify-content: center; padding: 12px; }
  .sidebar-card-title { font-size: .7rem; text-align: center; }
  .queue-item .q-sub { display: none; }
  .table-head, .song-item {
    grid-template-columns: 36px 1fr 56px;
  }
  .c-album, .song-item .album, .c-act, .song-item .actions { display: none; }
  .topbar { grid-template-columns: auto 1fr; }
  .source-tabs { display: none; }
  .player { grid-template-columns: 1fr 1.2fr auto; }
  .player-right input[type="range"] { display: none; }
}
@media (max-width: 640px) {
  body { overflow: auto; }
  .app {
    grid-template-columns: 1fr;
    height: auto; min-height: calc(100vh - var(--player-h));
    padding: 0;
  }
  .sidebar {
    border-radius: 0; flex-direction: row; align-items: center;
    padding: 8px; gap: 4px; overflow-x: auto;
  }
  .sidebar-brand { padding: 0 8px 0 4px; }
  .side-nav { flex-direction: row; margin: 0; }
  .sidebar-card, .sidebar-footer { display: none; }
  .main-wrap { border-radius: 0; min-height: 70vh; }
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .hero-cover-wrap { width: 140px; height: 140px; }
  .hero-meta h1 { white-space: normal; font-size: 1.8rem; }
  .player {
    grid-template-columns: 1fr; height: auto; gap: 6px; padding: 10px 12px 12px;
  }
  .player-center { order: 2; }
  .player-left { order: 1; }
  .player-right { order: 3; justify-content: space-between; }
  :root { --player-h: 150px; }
}

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

/* ========== Now Playing Detail (Apple Music style) ========== */
.np-sheet {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  color: #fff;
  opacity: 0; pointer-events: none;
  transform: translateY(18px);
  transition: opacity .32s var(--ease), transform .38s var(--ease);
}
.np-sheet.is-open {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.np-sheet[hidden] { display: none !important; }
.np-sheet.is-open[hidden] { display: flex !important; }

.np-sheet-bg {
  position: absolute; inset: 0;
  overflow: hidden;
  background: #050508;
  pointer-events: none;
}
.np-fluid-base {
  position: absolute; inset: -8%;
  background: radial-gradient(120% 90% at 50% 0%, #1a2740 0%, #0b0d14 55%, #050508 100%);
  transition: background 1.1s ease;
  transform: scale(1.05);
}
.np-fluid-layer {
  position: absolute; inset: -25%;
  filter: blur(72px) saturate(1.55) brightness(1.05);
  opacity: .95;
  will-change: filter, transform;
  transform: scale(1.05);
  animation: np-fluid-breathe 12s ease-in-out infinite alternate;
}
.np-sheet.is-playing .np-fluid-layer {
  animation-duration: 7s;
  filter: blur(64px) saturate(1.7) brightness(1.1);
}
.np-blob {
  position: absolute;
  width: var(--size, 55vmax);
  height: var(--size, 55vmax);
  left: 50%;
  top: 50%;
  margin: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%,
      color-mix(in srgb, var(--c, #5b8cff) 88%, #fff) 0%,
      var(--c, #5b8cff) 38%,
      color-mix(in srgb, var(--c2, var(--c, #5b8cff)) 55%, transparent) 62%,
      transparent 74%);
  /* default: gentle wash */
  opacity: calc(0.5 + var(--pulse, 0) * 0.16 + var(--jump, 0) * 0.1);
  mix-blend-mode: screen;
  transform:
    translate3d(calc(-50% + var(--fx, 0%)), calc(-50% + var(--fy, 0%)), 0)
    rotate(var(--spin, 0deg))
    scale(calc(0.97 + var(--pulse, 0) * 0.12 + var(--jump, 0) * 0.26));
  transform-origin: center center;
  will-change: transform, opacity;
  transition: background .9s ease;
  pointer-events: none;
}
/* soft playing: dreamy continuous motion, almost no kick pop */
.np-sheet.is-playing:not(.is-rhythmic) .np-blob {
  opacity: calc(0.52 + var(--pulse, 0) * 0.18 + var(--jump, 0) * 0.08);
  transform:
    translate3d(calc(-50% + var(--fx, 0%)), calc(-50% + var(--fy, 0%)), 0)
    rotate(var(--spin, 0deg))
    scale(calc(0.975 + var(--pulse, 0) * 0.11 + var(--jump, 0) * 0.2));
}
/* strong rhythm: snappy Apple Music-like kicks + brighter pop */
.np-sheet.is-rhythmic .np-blob {
  opacity: calc(0.5 + var(--pulse, 0) * 0.32 + var(--jump, 0) * 0.36);
  transform:
    translate3d(calc(-50% + var(--fx, 0%)), calc(-50% + var(--fy, 0%)), 0)
    rotate(var(--spin, 0deg))
    scale(calc(0.86 + var(--pulse, 0) * 0.32 + var(--jump, 0) * 1.12));
  filter: saturate(calc(1 + var(--jump, 0) * 0.25));
}
.np-sheet.is-playing:not(.is-rhythmic) .np-fluid-layer {
  animation-duration: 18s;
  filter: blur(80px) saturate(1.35) brightness(1.02);
}
.np-sheet.is-rhythmic .np-fluid-layer {
  animation-duration: 4.6s;
  filter: blur(54px) saturate(1.95) brightness(1.16);
}
/* slightly more lively layer when beat peaks */
.np-sheet.is-rhythmic.is-playing .np-fluid-layer {
  opacity: calc(0.92 + var(--np-beat, 0) * 0.08);
}
.np-blob:nth-child(1) { --size: 72vmax; }
.np-blob:nth-child(2) { --size: 62vmax; }
.np-blob:nth-child(3) { --size: 78vmax; }
.np-blob:nth-child(4) { --size: 54vmax; }
.np-blob:nth-child(5) { --size: 58vmax; }

.np-fluid-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(90% 70% at 50% 40%, transparent 20%, rgba(0,0,0,.28) 75%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}

@keyframes np-fluid-breathe {
  0% { transform: scale(1.02) rotate(0deg); }
  100% { transform: scale(1.08) rotate(4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .np-fluid-layer { animation: none !important; }
  .np-blob { transition: none; }
  .np-lyrics-inner .line {
    transition: opacity .2s ease, color .2s ease !important;
    filter: none !important;
    transform: none !important;
  }
}

.np-sheet-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,.38) 42%, rgba(0,0,0,.72) 100%),
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.06), transparent 55%);
  pointer-events: none;
}

.np-sheet-top {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 44px 1fr 44px;
  align-items: center; gap: 8px;
  padding: 14px 18px 8px;
  padding-top: max(14px, env(safe-area-inset-top));
}
.np-icon-btn {
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff;
  display: grid; place-items: center; cursor: pointer;
  transition: background .15s, transform .12s;
}
.np-icon-btn:hover { background: rgba(255,255,255,.2); }
.np-icon-btn:active { transform: scale(.96); }
.np-sheet-top-meta {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
}
.np-top-label {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.65); font-weight: 600;
}
.np-top-source {
  font-size: .78rem; color: rgba(255,255,255,.88);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw;
}

.np-sheet-body {
  position: relative; z-index: 2;
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
  gap: 28px 40px;
  padding: 8px 40px 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  max-width: 1280px; width: 100%; margin: 0 auto;
}

.np-stage {
  display: flex; flex-direction: column; justify-content: center;
  gap: 18px; min-width: 0;
}
.np-cover-wrap {
  width: min(100%, 380px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0,0,0,.45),
    0 2px 8px rgba(0,0,0,.25);
  background: rgba(0,0,0,.25);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.np-sheet.is-open .np-cover-wrap { transform: scale(1); }
.np-cover {
  width: 100%; height: 100%; object-fit: cover; display: block;
  background: #222;
}
.np-info { text-align: left; max-width: min(100%, 380px); margin: 0 auto; width: 100%; }
.np-title {
  margin: 0; font-size: clamp(1.35rem, 2.2vw, 1.85rem); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.2;
  font-family: var(--font-display);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.np-artist {
  margin: 6px 0 0; font-size: 1.05rem; color: rgba(255,255,255,.72);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.np-timeline { max-width: min(100%, 380px); margin: 0 auto; width: 100%; }
.np-timeline input[type="range"] {
  height: 5px;
  background: linear-gradient(#fff, #fff) 0/var(--progress,0%) 100% no-repeat, rgba(255,255,255,.28);
}
.np-timeline input[type="range"]::-webkit-slider-thumb {
  opacity: 1; width: 14px; height: 14px; background: #fff;
}
.np-timeline:hover input[type="range"] {
  background: linear-gradient(#fff, #fff) 0/var(--progress,0%) 100% no-repeat, rgba(255,255,255,.38);
}
.np-times {
  display: flex; justify-content: space-between;
  margin-top: 6px; font-size: .72rem; color: rgba(255,255,255,.6);
  font-variant-numeric: tabular-nums;
}

.np-controls {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  max-width: min(100%, 380px); margin: 0 auto; width: 100%;
}
.np-ctrl {
  border: 0; background: transparent; color: #fff;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  transition: transform .12s, color .12s, opacity .12s;
}
.np-ctrl:hover { transform: scale(1.06); }
.np-ctrl:active { transform: scale(.96); }
.np-ctrl:disabled { opacity: .35; cursor: default; transform: none; }
.np-ctrl.play {
  width: 68px; height: 68px; background: #fff; color: #000;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  display: grid; place-items: center;
}
.np-ctrl.play:hover { transform: scale(1.05); background: #fff; color: #000; }
.np-ctrl.play .icon-play,
.np-ctrl.play .icon-pause {
  grid-area: 1 / 1; pointer-events: none;
}
.np-ctrl.play .icon-play { display: block !important; }
.np-ctrl.play .icon-pause { display: none !important; }
.np-ctrl.play.is-playing .icon-play,
.np-ctrl.play[data-playing="true"] .icon-play {
  display: none !important;
}
.np-ctrl.play.is-playing .icon-pause,
.np-ctrl.play[data-playing="true"] .icon-pause {
  display: block !important;
}

/* Lyrics pane — focus cascade (Apple-like depth) */
.np-lyrics-pane {
  min-height: 0; display: flex; flex-direction: column;
  padding-top: 8px;
}
.np-lyrics-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 8px; padding: 0 8px;
}
.np-lyrics-head h3 {
  margin: 0; font-size: .95rem; font-weight: 700; letter-spacing: .02em;
}
.np-lyrics-hint { font-size: .75rem; color: rgba(255,255,255,.5); }
.np-lyrics {
  flex: 1; min-height: 0;
  overflow: auto;
  padding: 28px 12px 42vh;
  /* custom JS scroll handles easing/overshoot */
  scroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.22) transparent;
  mask-image: linear-gradient(180deg, transparent 0, #000 36px, #000 calc(100% - 56px), transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 36px, #000 calc(100% - 56px), transparent);
}
.np-lyrics-inner {
  text-align: left;
  line-height: 1.35;
  padding: 4px 0;
}
.np-lyrics-inner .line {
  --lo: 0.4;
  --lb: 0.8px;
  --ls: 0.98;
  --ly: 0px;
  --ld: 0ms;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 650;
  letter-spacing: -.01em;
  padding: 11px 12px;
  margin: 0;
  border-radius: 12px;
  color: rgba(255,255,255,0.92);
  opacity: var(--lo);
  filter: blur(var(--lb));
  transform: translate3d(0, var(--ly), 0) scale(var(--ls));
  transform-origin: left center;
  /* very mild ease, almost no overshoot */
  transition:
    opacity 0.5s cubic-bezier(0.22, 0.82, 0.28, 1) var(--ld),
    filter 0.54s cubic-bezier(0.22, 0.82, 0.28, 1) var(--ld),
    transform 0.64s cubic-bezier(0.22, 1.08, 0.32, 1) var(--ld),
    color 0.4s ease var(--ld),
    font-weight 0.3s ease var(--ld),
    text-shadow 0.4s ease var(--ld);
  cursor: pointer;
  user-select: none;
  will-change: transform, opacity, filter;
  -webkit-font-smoothing: antialiased;
}
.np-lyrics-inner .line:hover {
  /* slight lift without breaking focus hierarchy */
  opacity: max(var(--lo), 0.55);
  filter: blur(calc(var(--lb) * 0.35));
}
.np-lyrics-inner .line.past {
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}
.np-lyrics-inner .line.active {
  color: #fff;
  font-weight: 800;
  opacity: 1 !important;
  filter: blur(0) !important;
  text-shadow:
    0 0 24px rgba(255,255,255,0.18),
    0 1px 0 rgba(0,0,0,0.12);
  background: transparent;
}
.np-lyrics-inner .line.future {
  font-weight: 600;
  color: rgba(255,255,255,0.86);
}
.np-lyrics-inner .muted,
.np-lyrics-inner pre {
  color: rgba(255,255,255,.55);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  padding: 12px;
  opacity: 1;
  filter: none;
  transform: none;
}

body.np-open { overflow: hidden; }
body.np-open .player { z-index: 40; }
body.np-open .toast { z-index: 120; }

@media (max-width: 900px) {
  .np-sheet-body {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 4px 20px 20px;
    overflow: auto;
  }
  .np-stage { gap: 14px; }
  .np-cover-wrap {
    width: min(62vw, 280px);
  }
  .np-info, .np-timeline, .np-controls { max-width: min(100%, 420px); }
  .np-info { text-align: center; }
  .np-title, .np-artist { white-space: normal; }
  .np-lyrics-pane {
    min-height: 38vh;
  }
  .np-lyrics {
    padding-bottom: 28vh;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .np-lyrics-inner .line {
    text-align: center;
    font-size: clamp(1.2rem, 5vw, 1.6rem);
    transform-origin: center center;
  }
  .np-lyrics-inner .line.active {
    transform-origin: center center;
  }
  .player-open-detail .open-chevron { opacity: .7; }
}

@media (max-width: 640px) {
  .np-controls { gap: 12px; }
  .np-ctrl.play { width: 60px; height: 60px; }
  .np-cover-wrap { width: min(70vw, 240px); border-radius: 12px; }
}


/* Detail page volume: entire panel is the drag track */
.np-vol-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}
.np-vol-wrap .np-ctrl {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}
.np-vol-wrap .np-ctrl .vol-on,
.np-vol-wrap .np-ctrl .vol-off {
  display: block;
  pointer-events: none;
}
.np-vol-wrap .np-ctrl.is-open {
  color: #fff;
  opacity: 1;
}
.np-vol-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: 48px;
  height: 168px;
  padding: 0;
  margin: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  display: block;
  overflow: hidden;
  z-index: 5;
  touch-action: none;
  user-select: none;
  cursor: ns-resize;
  animation: npVolIn .16s ease-out;
}
.np-vol-popover[hidden] {
  display: none !important;
}
@keyframes npVolIn {
  from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
/* Hit layer covers 100% of panel */
.np-vol-hit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  cursor: ns-resize;
  touch-action: none;
  background: transparent;
  z-index: 2;
}
.np-vol-hit:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.4);
}
/* Fill grows bottom→top across the full panel height */
.np-vol-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: var(--vol, 80%);
  min-height: 0;
  max-height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #ececec 100%);
  border-radius: 0;
  pointer-events: none;
  z-index: 1;
  transition: height .04s linear;
}
.np-vol-fill.is-full {
  border-radius: 24px;
  height: 100% !important;
}
.np-vol-fill.is-empty {
  height: 0 !important;
}
.np-vol-wrap.is-dragging .np-vol-fill {
  transition: none;
}
.np-vol-knob {
  position: absolute;
  left: 50%;
  bottom: var(--vol, 80%);
  width: 22px;
  height: 3px;
  margin-left: -11px;
  margin-bottom: -1.5px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
  z-index: 3;
  transition: bottom .04s linear;
}
.np-vol-wrap.is-dragging .np-vol-knob {
  transition: none;
}
.np-vol-bar-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.np-ctrl.is-muted {
  opacity: 0.75;
}
@media (max-width: 640px) {
  .np-vol-popover { width: 46px; height: 156px; }
}



/* Play mode button active highlight */
#btnMode.is-active-mode,
#npBtnMode.is-active-mode {
  color: var(--green);
}
#npBtnMode.is-active-mode {
  color: #1ed760;
}

/* =========================================================
   FINAL FONT POLICY (must stay last — wins over component CSS)
   正文/标题/歌词中文 → 新宋体
   小号 UI 文字 → 清晰无衬线 + 更大字号 + 更高对比
   ========================================================= */
:root {
  --font-ui: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-song: "NSimSun", "新宋体", "SimSun", "宋体", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --font-display: var(--font-song);
  --font: var(--font-song);
  --text-sub: #c8c8c8;
  --text-dim: #a0a0a0;
}

html, body {
  font-family: var(--font-song) !important;
  color: var(--text);
}

/* 新宋体：正文、导航、标题、歌词、歌名 */
.sidebar-card-title,
.nav-item,
.hero-meta h1,
.section-head h2,
.song-item .title,
.queue-item .q-title,
.player-title,
.np-title,
.np-lyrics-inner .line,
.lyrics-inner .line,
.lyrics-section h2,
.np-lyrics-head h3,
.empty-state h3 {
  font-family: var(--font-song) !important;
  text-rendering: optimizeLegibility;
}

/* 小号 UI：清晰无衬线（避免新宋体小字发虚） */
button,
input,
select,
.chip,
.chip-tab,
.chip-rm,
.chip.primary,
.muted,
.small,
.source-hint,
.sidebar-footer,
.sidebar-footer a,
.sidebar-brand .brand-text,
.sidebar-card-desc,
.queue-item .q-sub,
.song-item .sub,
.song-item .artist,
.song-item .actions,
.song-item .idx,
.list-head,
.player-artist,
.player-timeline,
.player-right,
.player-right select,
.current-source-badge,
.count-badge,
.hero-badge,
.quality-badge,
.section-sub,
.toast,
.np-lyrics-hint,
.np-artist,
.np-time,
.np-time-cur,
.np-time-dur,
.np-times,
.np-sheet-title,
.np-top-source,
.np-ctrl,
.np-icon-btn,
.empty-state p,
.lyrics-section .hint,
.btn-green,
.btn-ghost,
.hero-sub {
  font-family: var(--font-ui) !important;
  /* Windows 小字用亚像素渲染更清晰，避免 antialiased 发虚 */
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;
}

/* 小号字号下限 ~13px，对比加强 */
.muted,
.small,
.source-hint,
.sidebar-footer,
.sidebar-footer a,
.sidebar-card-desc,
.queue-item .q-sub,
.song-item .sub,
.song-item .artist,
.player-artist,
.section-sub,
.list-head,
.np-lyrics-hint,
.empty-state p,
.hero-sub {
  font-size: 0.8125rem !important; /* 13px */
  line-height: 1.45 !important;
  font-weight: 500 !important;
  color: #c8c8c8 !important;
}

.source-hint,
.sidebar-footer,
.sidebar-footer a {
  color: #b0b0b0 !important;
  font-weight: 600 !important;
}

.sidebar-brand .brand-text {
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  color: #f2f2f2 !important;
  line-height: 1.35 !important;
}

.chip,
.chip-tab,
.chip.primary,
.current-source-badge,
.btn-ghost {
  font-size: 0.8125rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.01em;
}

.chip-rm {
  font-family: var(--font-ui) !important;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  color: #f0f0f0 !important;
  letter-spacing: 0.02em !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.player-timeline,
.np-times,
.np-time,
.np-time-cur,
.np-time-dur,
.count-badge,
.hero-badge,
.quality-badge {
  font-size: 0.75rem !important; /* 12px 时间数字 */
  font-weight: 600 !important;
  color: #c0c0c0 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.np-artist {
  font-size: 1rem !important;
  color: rgba(255, 255, 255, 0.86) !important;
  font-weight: 500 !important;
}

.np-top-source,
.np-sheet-title {
  font-size: 0.8125rem !important;
  font-weight: 650 !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.np-lyrics-hint {
  color: rgba(255, 255, 255, 0.72) !important;
}

.song-item .idx {
  font-size: 0.8125rem !important;
  color: #b8b8b8 !important;
  font-weight: 600 !important;
}

.player-right select,
.quality select {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #e0e0e0 !important;
}

.toast {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
}

/* 标题/歌词保持新宋体气质与可读字号 */
.song-item .title,
.queue-item .q-title,
.player-title {
  font-family: var(--font-song) !important;
  font-weight: 600 !important;
  color: #fff !important;
}

.np-lyrics-inner .line {
  font-family: var(--font-song) !important;
}
