/* ═══════════════════════════════════════════════════════════════
   SONAR · 外壳与通用组件
   ═══════════════════════════════════════════════════════════════ */

/* ── 氛围背景 ── */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.ambient__orb--a {
  width: 46vw; height: 46vw;
  left: -14vw; top: -18vw;
  background: radial-gradient(circle, rgba(226, 69, 45, 0.16), transparent 68%);
}
.ambient__orb--b {
  width: 40vw; height: 40vw;
  right: -12vw; top: 22vh;
  background: radial-gradient(circle, rgba(20, 101, 94, 0.13), transparent 70%);
}
html[data-theme="dark"] .ambient__orb { opacity: 0.36; }
.ambient__noise {
  position: absolute; inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── 布局 ── */
.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px calc(var(--player-h) + 16px);
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(20px) saturate(1.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 10px 6px;
  color: var(--ink);
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text b {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.12em;
}
.brand__text i {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.34em;
  color: var(--ink-3);
  margin-top: 2px;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 11px;
  border-radius: var(--r-s);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 520;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 620;
  box-shadow: var(--shadow-s);
}
.nav a.is-active .nav__icon { color: var(--accent); }
.nav a.is-active::before {
  content: "";
  position: absolute;
  left: -14px; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.nav__icon { display: grid; place-items: center; width: 18px; height: 18px; color: var(--ink-3); }
.nav__icon svg { width: 18px; height: 18px; }

.sidebar__section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 6px 11px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.playlist-nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-right: 2px;
}
.playlist-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border-radius: var(--r-xs);
  font-size: 13px;
  color: var(--ink-2);
  overflow: hidden;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.playlist-nav a:hover { background: var(--surface-2); color: var(--ink); }
.playlist-nav a.is-active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.playlist-nav .pn__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex: none;
  background: var(--accent);
  opacity: 0.55;
}
.playlist-nav .pn__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playlist-nav .pn__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
}
.playlist-nav__empty { padding: 8px 12px; font-size: 12px; color: var(--ink-3); }

.sidebar__foot { display: flex; flex-direction: column; gap: 10px; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  transition: border-color var(--dur) var(--ease), transform 120ms var(--ease);
}
.user-chip:hover { border-color: var(--line-strong); }
.user-chip:active { transform: scale(0.99); }
.user-chip__avatar {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-3);
  overflow: hidden;
}
.user-chip__avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-chip__text { display: flex; flex-direction: column; min-width: 0; }
.user-chip__text b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip__text i { font-style: normal; font-size: 11px; color: var(--ink-3); }
.sidebar__meta {
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0.7;
}

/* ── 主区域 ── */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.topbar__login { height: 34px; padding: 0 15px; }
.topbar__back { display: none; }

.searchbox {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  max-width: 480px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.searchbox:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.searchbox__icon { color: var(--ink-3); display: grid; place-items: center; }
.searchbox__icon svg { width: 16px; height: 16px; }
.searchbox input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  outline: none;
  font-size: 13.5px;
}
.searchbox input::-webkit-search-cancel-button { display: none; }
.searchbox__kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  line-height: 1.4;
}
.searchbox__clear { display: grid; place-items: center; width: 20px; height: 20px; color: var(--ink-3); }
.searchbox__clear svg { width: 13px; height: 13px; }

.avatar-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

.view {
  flex: 1;
  width: 100%;
  max-width: 1500px;
  padding: 6px 28px calc(var(--player-h) + 48px);
  outline: none;
  animation: fadeUp 340ms var(--ease-out);
}
.view--wide { max-width: none; }

/* ── 页头 ── */
.page-head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin: 12px 0 26px;
}
.page-head__text { min-width: 0; flex: 1; }
.page-head h1 {
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.035em;
}
.page-head p { margin-top: 7px; color: var(--ink-2); font-size: 13.5px; max-width: 62ch; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--accent);
}

/* ── 区块 ── */
.section { margin-bottom: 40px; }
.section__head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 16px;
}
.section__head h2 {
  font-size: 19px;
  letter-spacing: -0.025em;
}
.section__head p { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.section__more {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.section__more:hover { color: var(--accent); }

/* ── 卡片网格 ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 18px 16px;
}
.card-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 158px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.card-row > * { scroll-snap-align: start; }

.album-card { min-width: 0; position: relative; }
.album-card__art {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-s);
  transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
}
.album-card:hover .album-card__art { transform: translateY(-4px); box-shadow: var(--shadow-m); }
.album-card__art img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out), opacity 300ms;
}
.album-card:hover .album-card__art img { transform: scale(1.045); }
.album-card__ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-serif);
  font-size: 28px;
}
.album-card__play {
  position: absolute;
  right: 10px; bottom: 10px;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: all 260ms var(--ease-out);
}
.album-card:hover .album-card__play,
.album-card:focus-within .album-card__play { opacity: 1; transform: none; }
.album-card__play svg { width: 17px; height: 17px; margin-left: 1px; }
.album-card__body { padding: 10px 2px 0; }
.album-card__title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.album-card__sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.album-card__badges { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.badge--accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge--teal { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.badge--gold { background: rgba(169, 124, 47, 0.12); color: var(--gold); border-color: transparent; }
.badge--preview { background: transparent; border-style: dashed; color: var(--ink-3); }

/* ── 曲目列表 ── */
.tracklist { display: flex; flex-direction: column; }
.tracklist__head {
  display: grid;
  grid-template-columns: 34px minmax(0, 2.2fr) minmax(0, 1.5fr) 78px 74px;
  gap: 12px;
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.track-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 2.2fr) minmax(0, 1.5fr) 78px 74px;
  gap: 12px;
  align-items: center;
  padding: 7px 12px;
  border-radius: var(--r-s);
  transition: background 140ms var(--ease);
}
.track-row:hover { background: var(--surface-2); }
.track-row.is-playing { background: var(--accent-soft); }
.track-row.is-playing .track-row__title { color: var(--accent); }
.track-row__idx {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  height: 26px;
}
.track-row__idx .idx-play { display: none; }
.track-row:hover .track-row__idx span { display: none; }
.track-row:hover .track-row__idx .idx-play { display: grid; place-items: center; color: var(--ink); }
.track-row.is-playing .track-row__idx span { display: none; }
.track-row.is-playing .track-row__idx .idx-play { display: grid; color: var(--accent); }

.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i {
  width: 2px; height: 12px;
  background: var(--accent);
  transform-origin: bottom;
  animation: bar 900ms var(--ease) infinite;
}
.eq i:nth-child(2) { animation-delay: 140ms; }
.eq i:nth-child(3) { animation-delay: 280ms; }
.eq i:nth-child(4) { animation-delay: 420ms; }

.track-row__main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.track-row__cover {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-3);
  position: relative;
}
.track-row__cover img { width: 100%; height: 100%; object-fit: cover; }
.track-row__cover .ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-3); }
.track-row__text { min-width: 0; }
.track-row__title {
  display: block;
  font-size: 13.5px;
  font-weight: 560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-row__artist {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-row__artist a:hover { color: var(--accent); text-decoration: underline; }
.track-row__album {
  font-size: 12.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-row__album a:hover { color: var(--ink); }
.track-row__dur { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); text-align: right; }
.track-row__act {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  opacity: 0;
  transition: opacity 140ms;
}
.track-row:hover .track-row__act,
.track-row:focus-within .track-row__act { opacity: 1; }
.track-row__act .icon-btn { width: 28px; height: 28px; }
.track-row__act .icon-btn svg { width: 15px; height: 15px; }

/* ── 电台卡 ── */
.station-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color var(--dur), transform 200ms var(--ease-out), box-shadow var(--dur);
}
.station-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-s); }
.station-card__logo {
  width: 46px; height: 46px;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid; place-items: center;
  color: var(--ink-3);
}
.station-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.station-card__text { min-width: 0; flex: 1; }
.station-card__text b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-card__text span { display: block; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 空状态 ── */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 64px 20px;
  text-align: center;
  color: var(--ink-3);
}
.empty__icon {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-3);
  margin-bottom: 4px;
}
.empty__icon svg { width: 24px; height: 24px; }
.empty h3 { font-size: 15px; color: var(--ink); font-weight: 600; }
.empty p { font-size: 13px; max-width: 46ch; }

/* ── 播放器 ── */
.player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  height: var(--player-h);
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--elev) 88%, transparent);
  backdrop-filter: blur(24px) saturate(1.4);
  border-top: 1px solid var(--line);
  transition: transform 320ms var(--ease-out);
}
.player[data-empty="1"] .player__center,
.player[data-empty="1"] .player__like { opacity: 0.55; }

.player__progress {
  position: relative;
  height: 3px;
  cursor: pointer;
  background: var(--surface-3);
  flex: none;
  touch-action: none;
}
.player__progress::before {
  content: "";
  position: absolute;
  inset: -8px 0;
}
.player__progress-fill {
  position: relative;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 120ms linear;
}
.player__progress-knob {
  position: absolute;
  right: -5px; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%) scale(0);
  transition: transform 160ms var(--ease);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.player__progress:hover .player__progress-knob { transform: translateY(-50%) scale(1); }

.player__inner {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 1.4fr) minmax(180px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 22px;
}

.player__now { display: flex; align-items: center; gap: 11px; min-width: 0; }
.player__cover {
  position: relative;
  width: 50px; height: 50px;
  flex: none;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  box-shadow: var(--shadow-s);
}
.player__cover img { width: 100%; height: 100%; object-fit: cover; }
.player__meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.player__title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player__title:hover { color: var(--accent); }
.player__sub { display: flex; align-items: center; gap: 7px; min-width: 0; }
.player__sub > span:first-child {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player__badge {
  flex: none;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  line-height: 1.6;
}
.player__like { flex: none; }
.player__like.is-on { color: var(--accent); }

.player__center { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.player__controls { display: flex; align-items: center; gap: 10px; }
.player__play {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  transition: transform 140ms var(--ease), background var(--dur);
}
.player__play:hover { transform: scale(1.06); }
.player__play:active { transform: scale(0.96); }
.player__play svg { width: 18px; height: 18px; }
.player__play .spinner { animation: spin 900ms linear infinite; }

.player__timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.player__timeline > span:first-child { min-width: 34px; text-align: right; }
.player__timeline > span:last-child { min-width: 34px; }
.player__wave {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 2px, transparent 2px 4px);
  opacity: 0.6;
}

.player__right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.volume { display: flex; align-items: center; gap: 4px; }
.volume input {
  width: 74px;
  height: 3px;
  appearance: none;
  border-radius: 3px;
  background: var(--line-strong);
  outline: none;
  cursor: pointer;
}
.volume input::-webkit-slider-thumb {
  appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.volume input::-moz-range-thumb {
  width: 11px; height: 11px; border: 2px solid var(--bg); border-radius: 50%; background: var(--ink);
}

/* ── 队列抽屉 ── */
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: var(--player-h);
  z-index: 70;
  width: min(380px, 92vw);
  display: flex;
  flex-direction: column;
  background: var(--elev);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-l);
  transform: translateX(104%);
  transition: transform 340ms var(--ease-out);
}
.drawer.is-open { transform: none; }
.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 18px 12px;
}
.drawer__head h3 { font-size: 16px; }
.drawer__head p { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.drawer__tabs { display: flex; gap: 6px; padding: 0 18px 12px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 0 10px 20px; }
.drawer .track-row {
  grid-template-columns: 24px minmax(0, 1fr) 40px;
  gap: 8px;
}
.drawer .track-row__album, .drawer .track-row__dur { display: none; }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(10, 10, 12, 0.32);
  backdrop-filter: blur(2px);
  animation: fadeIn 220ms var(--ease);
}

/* ── 正在播放（沉浸页） ── */
.now {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  overflow: hidden;
}
.now.is-open { display: grid; animation: fadeIn 260ms var(--ease); }
.now__bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  filter: blur(70px) saturate(1.2);
  opacity: 0.35;
  transform: scale(1.1);
}
.now__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 55%, transparent), var(--bg) 78%);
}
.now__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
}
.now__body {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  grid-template-columns: minmax(200px, 340px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  padding: 0 clamp(24px, 5vw, 64px);
  min-height: 0;
}
.now__art {
  position: relative;
  justify-self: center;
  width: min(100%, 360px);
  aspect-ratio: 1;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  background: var(--surface-2);
}
.now__art img { width: 100%; height: 100%; object-fit: cover; }
.now__art::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  border-radius: inherit;
}
.now__side { min-width: 0; max-width: 560px; display: flex; flex-direction: column; gap: 14px; max-height: 100%; }
.now__eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }
.now__title { font-family: var(--font-serif); font-size: clamp(26px, 3.4vw, 44px); line-height: 1.12; letter-spacing: -0.02em; }
.now__artist { font-size: 15px; color: var(--ink-2); }
.now__lyrics {
  position: relative;
  flex: 1;
  min-height: 150px;
  max-height: 40vh;
  overflow-y: auto;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 84%, transparent);
  scrollbar-width: none;
  padding: 22% 0;
}
.now__lyrics::-webkit-scrollbar { display: none; }
.now__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  min-height: 150px;
  color: var(--ink-3);
}
.now__empty p { font-size: 13px; }
.now__bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 30px;
}
.now__bars i {
  width: 3px;
  height: 30px;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0.55;
  transform-origin: bottom;
  animation: bar 1200ms var(--ease) infinite;
}
.now__bars i:nth-child(2) { animation-delay: 120ms; }
.now__bars i:nth-child(3) { animation-delay: 260ms; }
.now__bars i:nth-child(4) { animation-delay: 400ms; }
.now__bars i:nth-child(5) { animation-delay: 520ms; }
.now__bars i:nth-child(6) { animation-delay: 640ms; }
.now__bars i:nth-child(7) { animation-delay: 760ms; }

.lyric-line {
  padding: 7px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-3);
  transition: color 200ms, transform 300ms var(--ease-out), opacity 200ms;
  transform-origin: left center;
  cursor: pointer;
}
.lyric-line.is-active { color: var(--ink); font-weight: 650; transform: scale(1.045); }
.lyric-line.is-near { color: var(--ink-2); }
.now__bottom {
  position: relative;
  z-index: 1;
  padding: 10px clamp(24px, 5vw, 72px) 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.now__seek { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.now__seek input[type="range"] {
  flex: 1;
  height: 3px;
  appearance: none;
  border-radius: 3px;
  background: var(--line-strong);
  outline: none;
}
.now__seek input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--bg);
}
.now__controls { display: flex; align-items: center; justify-content: center; gap: 18px; }
.now__controls .player__play { width: 52px; height: 52px; }
.now__controls .player__play svg { width: 22px; height: 22px; }
.now__controls .icon-btn { width: 42px; height: 42px; }
.now__controls .icon-btn svg { width: 19px; height: 19px; }

/* ── Toast ── */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h) + 18px);
  z-index: 200;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(90vw, 460px);
  padding: 10px 16px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  box-shadow: var(--shadow-m);
  animation: toastIn 260ms var(--ease-out);
}
.toast--error { background: var(--accent); color: #fff; }
.toast--ok { background: var(--teal); color: #fff; }
.toast.is-out { animation: toastOut 200ms var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* ── Modal ── */
.modal-host { position: fixed; inset: 0; z-index: 150; display: none; }
.modal-host .scrim { z-index: 1; backdrop-filter: none; background: rgba(10, 10, 12, 0.38); }
.modal-host .modal { z-index: 2; }
.modal-host.is-open { display: block; }
.modal {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-l);
  animation: modalIn 260ms var(--ease-out);
  overflow: hidden;
}
.modal--wide { width: min(760px, calc(100vw - 32px)); }
.modal--narrow { width: min(400px, calc(100vw - 32px)); }
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -48%) scale(0.97); } }
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 12px;
}
.modal__head h3 { font-size: 17px; }
.modal__head p { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.modal__body { padding: 8px 22px 18px; overflow-y: auto; }
.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.modal__foot .btn--quiet { margin-right: auto; }

/* ── 表单组 ── */
.form-row { margin-bottom: 14px; }
.form-row:last-child { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.switch-row:last-child { border-bottom: 0; }
.switch-row__text b { display: block; font-size: 13.5px; font-weight: 560; }
.switch-row__text span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.switch {
  position: relative;
  width: 40px; height: 23px;
  flex: none;
  border-radius: 999px;
  background: var(--surface-3);
  transition: background var(--dur) var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 220ms var(--ease-out);
}
.switch.is-on { background: var(--accent); }
.switch.is-on::after { transform: translateX(17px); }

/* ── 表格 ── */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  padding: 9px 10px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  white-space: nowrap;
}
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table .num { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); }

/* ── 统计卡 ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat {
  padding: 16px 18px;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: var(--surface);
}
.stat b {
  display: block;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat span { display: block; margin-top: 4px; font-size: 11.5px; letter-spacing: 0.04em; color: var(--ink-3); }

/* ── 页脚 ── */
.site-foot {
  margin-top: 60px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  font-size: 11.5px;
  color: var(--ink-3);
}
.site-foot .mono { font-size: 9.5px; }
.site-foot__right { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; }

/* ── 右键菜单 ── */
.ctx-menu {
  position: fixed;
  z-index: 300;
  min-width: 186px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--elev);
  box-shadow: var(--shadow-l);
  animation: fadeUp 160ms var(--ease-out);
}
.ctx-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink-2);
  text-align: left;
}
.ctx-menu button:hover { background: var(--surface-2); color: var(--ink); }
.ctx-menu button.is-danger { color: var(--accent); }
.ctx-menu button.is-danger:hover { background: var(--accent-soft); }
.ctx-menu button i {
  margin-left: auto;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
}
.ctx-menu svg { flex: none; }

/* ── 歌单选择器 ── */
.pl-pick-list { display: flex; flex-direction: column; gap: 4px; max-height: 46vh; overflow-y: auto; }
.pl-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border-radius: 9px;
  text-align: left;
  transition: background var(--dur);
}
.pl-pick:hover { background: var(--surface-2); }
.pl-pick__art {
  width: 40px; height: 40px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-3);
  display: grid; place-items: center;
  flex: none;
}
.pl-pick__art img { width: 100%; height: 100%; object-fit: cover; }
.pl-pick__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pl-pick__text b { font-size: 13px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-pick__text i { font-style: normal; font-size: 11px; color: var(--ink-3); }

.spinner { display: inline-grid; place-items: center; animation: spin 900ms linear infinite; }
