:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --surface-3: #e9e9ef;
  --text: #1c1c1e;
  --text-2: #6e6e73;
  --text-3: #8e8e93;
  --accent: #fa2d48;
  --accent-soft: rgba(250, 45, 72, 0.12);
  --separator: rgba(60, 60, 67, 0.12);
  --nav-bg: rgba(251, 251, 253, 0.78);
  --card-shadow: 0 8px 24px rgba(20, 20, 30, 0.07);
  --mini-bg: rgba(255, 255, 255, 0.93);
  --np-veil: rgba(255, 255, 255, 0.55);
  --np-text: #101014;
  --np-text-2: rgba(16, 16, 20, 0.62);
  --np-track: rgba(16, 16, 20, 0.16);
  --radius: 14px;
  --tab-h: 52px;
  --mini-h: 58px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #242426;
  --surface-3: #2c2c2e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #8e8e93;
  --separator: rgba(255, 255, 255, 0.14);
  --nav-bg: rgba(10, 10, 12, 0.8);
  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --mini-bg: rgba(28, 28, 30, 0.93);
  --np-veil: rgba(10, 10, 12, 0.62);
  --np-text: #ffffff;
  --np-text-2: rgba(255, 255, 255, 0.66);
  --np-track: rgba(255, 255, 255, 0.22);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  overscroll-behavior-y: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue",
    "Segoe UI", Roboto, system-ui, sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.38;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-touch-callout: none;
  user-select: none;
}

button:disabled {
  opacity: 0.35;
  cursor: default;
}

a {
  color: var(--accent);
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

input,
textarea {
  font: inherit;
  color: inherit;
}

.app {
  position: relative;
  min-height: 100dvh;
}

.app-main {
  padding-bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-bottom) + 16px);
}

.screen {
  padding-top: calc(var(--safe-top) + 8px);
  animation: screen-in 0.32s var(--ease);
  will-change: opacity, transform;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

[data-reduce-motion="true"] .screen,
[data-reduce-motion="true"] .now-playing,
[data-reduce-motion="true"] .tabbar,
[data-reduce-motion="true"] .mini-player {
  animation: none !important;
  transition: none !important;
}

/* ---------- headers ---------- */
.screen-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px 18px;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
  text-transform: none;
  margin-bottom: 2px;
}

.hero-title {
  font-size: 33px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.1;
}

.hero-sub {
  color: var(--text-2);
  font-size: 14px;
  margin-top: 4px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff5a6e, #d81b3c);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(216, 27, 60, 0.32);
}

.library-hero {
  align-items: center;
}

.hero-action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--accent);
}

/* ---------- quick picks ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 24px;
}

.quick-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 2px 10px rgba(20, 20, 30, 0.06);
  overflow: hidden;
  text-align: left;
  transition: transform 0.18s var(--ease), background-color 0.2s;
}

.quick-pick:active {
  transform: scale(0.97);
}

.quick-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.quick-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-artist {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text-2);
  margin-right: 2px;
  flex: 0 0 auto;
}

/* ---------- sections ---------- */
.section {
  margin-bottom: 26px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 0 20px 12px;
}

.section-header h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.35px;
}

.section-header p {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 1px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.screen-footer {
  padding: 6px 20px 28px;
  color: var(--text-3);
  font-size: 12px;
}

.screen-footer .text-btn {
  margin-top: 6px;
}

/* ---------- horizontal rails ---------- */
.h-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 20px 8px;
  scroll-snap-type: x proximity;
  scroll-padding-left: 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.h-scroll::-webkit-scrollbar {
  display: none;
}

.card {
  flex: 0 0 auto;
  width: 148px;
  text-align: left;
  scroll-snap-align: start;
  transition: transform 0.2s var(--ease);
}

.card:active {
  transform: scale(0.96);
}

.card-art {
  width: 148px;
  height: 148px;
  border-radius: 10px;
  display: flex;
  box-shadow: var(--card-shadow);
}

.artist-art {
  border-radius: 50% !important;
}

.card-title {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sub {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-card {
  width: 118px;
}

.artist-card .card-art {
  width: 118px;
  height: 118px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 14px;
  padding: 4px 20px 20px;
}

.grid-2 .card,
.grid-2 .card-art {
  width: 100%;
}

.grid-2 .card-art {
  height: auto;
  aspect-ratio: 1;
}

/* ---------- collection cards ---------- */
.collection-row .collection-card {
  flex: 0 0 auto;
}

.collection-card {
  position: relative;
  width: 232px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  padding: 14px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--card-shadow);
  isolation: isolate;
}

.collection-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  mix-blend-mode: luminosity;
  filter: blur(1px) saturate(0.8);
  z-index: -1;
}

.collection-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #fff;
}

.collection-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.collection-sub {
  font-size: 12px;
  opacity: 0.78;
}

/* ---------- browse ---------- */
.genre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}

.genre-tile {
  position: relative;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  padding: 12px;
  color: #fff;
  box-shadow: var(--card-shadow);
  isolation: isolate;
}

.genre-tile-art {
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 74px;
  height: 74px;
  border-radius: 8px;
  transform: rotate(22deg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  object-fit: cover;
  z-index: -1;
}

.genre-tile-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: block;
}

.genre-tile-count {
  font-size: 11px;
  opacity: 0.75;
}

.stack {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.collection-row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  box-shadow: 0 2px 10px rgba(20, 20, 30, 0.05);
}

.collection-dot {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  flex: 0 0 auto;
}

.collection-row-text {
  flex: 1;
  min-width: 0;
}

.collection-row-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.collection-row-sub {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
}

/* ---------- artwork ---------- */
.artwork {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  flex: 0 0 auto;
  background-size: cover;
  background-position: center;
}

.artwork img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.artwork img.is-loaded {
  opacity: 1;
}

.artwork-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- track rows ---------- */
.list {
  padding: 0 8px;
}

.track-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 12px;
  transition: background-color 0.15s;
  position: relative;
}

.track-row:active {
  background: var(--surface-2);
}

.track-row.is-current .track-title {
  color: var(--accent);
}

.track-index {
  width: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.track-main {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 2px 0;
}

.track-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.track-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-wave {
  color: var(--accent);
  flex: 0 0 auto;
}

.track-artist {
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-dot {
  opacity: 0.6;
}

.track-duration {
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-2);
  flex: 0 0 auto;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.icon-btn:active {
  background: var(--surface-2);
  transform: scale(0.92);
}

.track-fav {
  color: var(--text-3);
}

.track-fav.is-fav {
  color: var(--accent);
}

.track-more {
  margin-right: -4px;
}

.track-play-inline {
  color: var(--accent);
}

/* ---------- mini player ---------- */
.mini-player {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 6px);
  height: var(--mini-h);
  border-radius: 14px;
  background: var(--mini-bg);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 6px 24px rgba(20, 20, 30, 0.16), 0 0 0 0.5px var(--separator);
  display: flex;
  align-items: center;
  padding: 0 8px 0 6px;
  gap: 4px;
  z-index: 40;
  animation: mini-in 0.4s var(--ease);
  overflow: hidden;
}

@keyframes mini-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.mini-player-body {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.mini-art {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.mini-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mini-title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-artist {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.mini-play {
  color: var(--text);
}

.mini-progress {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 1.5px;
  background: var(--separator);
  border-radius: 2px;
  overflow: hidden;
}

.mini-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s linear;
}

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  align-items: stretch;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-top: 0.5px solid var(--separator);
  z-index: 50;
}

.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-3);
  transition: color 0.18s, transform 0.18s var(--ease);
  padding-top: 4px;
}

.tabbar-item span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.tabbar-item.is-active {
  color: var(--accent);
}

.tabbar-item:active {
  transform: scale(0.94);
}

/* ---------- now playing ---------- */
.now-playing {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  animation: np-in 0.42s var(--ease);
  background: var(--bg);
}

@keyframes np-in {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.np-backdrop {
  position: absolute;
  inset: -18%;
  background-size: cover;
  background-position: center;
  filter: blur(46px) saturate(1.5);
  transform: scale(1.15);
  opacity: 0.85;
}

.np-blur {
  position: absolute;
  inset: 0;
  background: var(--np-veil);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.np-surface {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 4px) 22px calc(var(--safe-bottom) + 10px);
  color: var(--np-text);
  transition: transform 0.18s var(--ease), border-radius 0.18s;
  touch-action: pan-x;
}

.np-grabber {
  display: grid;
  place-items: center;
  height: 14px;
  flex: 0 0 auto;
}

.np-grabber span {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--np-track);
}

.np-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0 2px;
  flex: 0 0 auto;
}

.np-round-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(127, 127, 127, 0.14);
  display: grid;
  place-items: center;
  color: var(--np-text);
  transition: transform 0.15s var(--ease), background-color 0.15s;
}

.np-round-btn:active {
  transform: scale(0.9);
  background: rgba(127, 127, 127, 0.26);
}

.np-source {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.np-source-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--np-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.np-source-sub {
  font-size: 12px;
  color: var(--np-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.np-art-wrap {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 14px 0 6px;
}

.np-art {
  width: min(78vw, 78vh, 360px);
  aspect-ratio: 1;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.5s var(--ease);
}

.np-art-wrap.is-playing .np-art {
  transform: scale(1);
}

.np-details {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 6px;
}

.np-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.np-titles {
  min-width: 0;
}

.np-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-artist {
  font-size: 15px;
  color: var(--np-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.np-dot {
  margin: 0 6px;
}

.np-heart {
  color: var(--np-text-2);
  flex: 0 0 auto;
  transition: transform 0.18s var(--ease), color 0.18s;
}

.np-heart.is-fav {
  color: var(--accent);
}

.np-heart:active {
  transform: scale(0.86);
}

.seek-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.seek {
  padding: 8px 0;
  touch-action: none;
  cursor: pointer;
}

.seek-track {
  position: relative;
  height: 4px;
  border-radius: 3px;
  background: var(--np-track);
}

.seek-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 3px;
  background: var(--np-text);
  opacity: 0.8;
}

.seek-thumb {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-left: -6.5px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: var(--np-text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s var(--ease);
}

.seek.is-dragging .seek-thumb {
  transform: scale(1.35);
}

.seek-times {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--np-text-2);
  font-variant-numeric: tabular-nums;
}

.np-error {
  font-size: 12.5px;
  color: #ff6b6b;
  text-align: center;
}

.np-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 2px 0;
}

.transport-btn {
  color: var(--np-text);
  display: grid;
  place-items: center;
  transition: transform 0.16s var(--ease), opacity 0.16s;
}

.transport-btn:active {
  transform: scale(0.88);
  opacity: 0.7;
}

.transport-play {
  width: 62px;
  height: 62px;
}

.np-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 0;
  min-height: 34px;
}

.np-secondary-btn {
  width: 38px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--np-text-2);
  border-radius: 9px;
  transition: color 0.15s, background-color 0.15s;
}

.np-secondary-btn.is-on {
  color: var(--accent);
}

.np-secondary-btn:active {
  background: rgba(127, 127, 127, 0.16);
}

.np-volume {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--np-text-2);
  flex: 1;
  max-width: 130px;
}

.np-volume input[type="range"] {
  flex: 1;
  accent-color: var(--np-text);
  height: 22px;
}

/* ---------- sheets ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: flex-end;
  animation: fade-in 0.24s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet {
  width: 100%;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: 6px 0 calc(var(--safe-bottom) + 14px);
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
  animation: sheet-up 0.36s var(--ease);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-grabber {
  width: 38px;
  height: 5px;
  border-radius: 3px;
  background: var(--separator);
  margin: 4px auto 10px;
  flex: 0 0 auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px 10px;
}

.sheet-header h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sheet-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.text-btn {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}

.text-btn.danger {
  color: #ff3b30;
}

.sheet-track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px 12px;
  border-bottom: 0.5px solid var(--separator);
  margin-bottom: 4px;
}

.sheet-track-text {
  flex: 1;
  min-width: 0;
}

.sheet-track-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-track-sub {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-list {
  overflow-y: auto;
  padding: 4px 8px;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 12px;
  text-align: left;
  font-size: 15.5px;
  border-radius: 10px;
  color: var(--text);
}

.action-row:active {
  background: var(--surface-2);
}

.action-row svg {
  color: var(--text-2);
  flex: 0 0 auto;
}

.action-check {
  margin-left: auto;
  color: var(--accent) !important;
}

.action-meta {
  margin-left: auto;
  color: var(--text-3);
  font-size: 13px;
}

.sheet-note {
  padding: 14px 12px;
  color: var(--text-2);
  font-size: 13.5px;
}

.sheet-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 18px 10px;
}

.text-input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 0;
  font-size: 16px;
  outline: none;
}

.text-input:focus {
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.primary-btn {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  border-radius: 12px;
  padding: 13px 18px;
  transition: transform 0.15s var(--ease), opacity 0.15s;
}

.primary-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.primary-btn.small {
  padding: 9px 16px;
  font-size: 14px;
  border-radius: 10px;
  flex: 0 0 auto;
}

/* ---------- queue ---------- */
.queue-sheet {
  max-height: 76dvh;
}

.queue-list {
  overflow-y: auto;
  padding: 2px 10px 6px;
  -webkit-overflow-scrolling: touch;
}

.queue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px;
  border-radius: 11px;
  background: var(--surface);
  position: relative;
}

.queue-row.is-current {
  background: var(--accent-soft);
}

.queue-row.is-dragging {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  opacity: 0.96;
  z-index: 5;
}

.queue-handle {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 4px;
  flex: 0 0 auto;
  touch-action: none;
  cursor: grab;
}

.queue-handle span {
  width: 14px;
  height: 1.5px;
  background: var(--text-3);
  border-radius: 1px;
}

.queue-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.queue-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.queue-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-artist {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-remove {
  color: var(--text-3);
}

.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  margin-right: 2px;
}

.equalizer i {
  width: 2.5px;
  background: var(--accent);
  border-radius: 1px;
  animation: eq 0.9s ease-in-out infinite;
}

.equalizer i:nth-child(1) {
  height: 40%;
  animation-delay: -0.2s;
}

.equalizer i:nth-child(2) {
  height: 100%;
  animation-delay: -0.45s;
}

.equalizer i:nth-child(3) {
  height: 65%;
  animation-delay: -0.1s;
}

@keyframes eq {
  0%,
  100% {
    transform: scaleY(0.45);
  }
  50% {
    transform: scaleY(1);
  }
}

/* ---------- empty states / toasts ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 48px 32px;
  color: var(--text-3);
}

.empty-state svg {
  color: var(--text-3);
  opacity: 0.7;
}

.empty-state p {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.empty-state span {
  font-size: 13.5px;
  color: var(--text-2);
  max-width: 280px;
}

.empty-state.compact {
  padding: 34px 24px;
}

.toast-host {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-bottom) + 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  background: rgba(28, 28, 30, 0.92);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  animation: toast-in 0.28s var(--ease);
  pointer-events: auto;
  max-width: 86vw;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.spinner-lg {
  width: 26px;
  height: 26px;
  border-width: 2.5px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- chips / search ---------- */
.search-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-top) + 8px) 16px 10px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border-radius: 11px;
  padding: 0 10px;
  height: 38px;
  color: var(--text-3);
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 16px;
  color: var(--text);
}

.search-field input::-webkit-search-cancel-button {
  display: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 18px;
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.chip.is-active {
  background: var(--accent);
  color: #fff;
}

.chip:active {
  transform: scale(0.96);
}

.search-results .section:first-child {
  margin-top: 6px;
}

/* ---------- library ---------- */
.sticky-chips {
  position: sticky;
  top: 0;
  z-index: 15;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 6px 16px 10px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  scrollbar-width: none;
  gap: 7px;
}

.sticky-chips::-webkit-scrollbar {
  display: none;
}

.sticky-chips .chip {
  flex: 0 0 auto;
}

.sort-row {
  position: relative;
  padding: 4px 20px 10px;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
}

.sort-menu {
  position: absolute;
  top: 30px;
  left: 20px;
  z-index: 30;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
  padding: 6px;
  min-width: 190px;
  animation: fade-in 0.16s ease;
}

.sort-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.sort-menu button.is-active {
  color: var(--accent);
  font-weight: 600;
}

.section-head-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px 8px;
}

.section-head-inline h2 {
  font-size: 17px;
  font-weight: 700;
}

.new-playlist-row {
  color: var(--accent);
  font-weight: 600;
}

.new-playlist-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  color: var(--accent);
}

.list-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 12px;
  border-radius: 11px;
  text-align: left;
}

.list-link:active {
  background: var(--surface-2);
}

.list-link-text {
  flex: 1;
  min-width: 0;
}

.list-link-title {
  display: block;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-link-sub {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
}

.list-link-chevron {
  color: var(--text-3);
  flex: 0 0 auto;
}

/* ---------- profile ---------- */
.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 16px 14px;
  padding: 16px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(20, 20, 30, 0.06);
}

.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff5a6e, #d81b3c);
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.profile-info h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.profile-info p {
  font-size: 13px;
  color: var(--text-2);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 16px 8px;
}

.stat {
  background: var(--surface);
  border-radius: 13px;
  padding: 12px 6px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(20, 20, 30, 0.05);
}

.stat-value {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.stat-label {
  display: block;
  font-size: 10.5px;
  color: var(--text-2);
  line-height: 1.2;
  margin-top: 2px;
}

.group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 24px 8px;
}

.settings-card {
  margin: 0 16px;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(20, 20, 30, 0.05);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--separator);
  width: 100%;
  text-align: left;
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-button:active {
  background: var(--surface-2);
}

.setting-title {
  display: block;
  font-size: 15px;
}

.setting-sub {
  display: block;
  font-size: 12px;
  color: var(--text-2);
}

.setting-value {
  font-size: 13px;
  color: var(--text-2);
  max-width: 52%;
  text-align: right;
}

.setting-button.is-danger .setting-title {
  color: #ff3b30;
  font-weight: 600;
}

.setting-button.is-danger-soft .setting-title {
  color: #ff3b30;
}

.segmented {
  display: flex;
  background: var(--surface-2);
  border-radius: 9px;
  padding: 2px;
  flex: 0 0 auto;
}

.segmented button {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition: background-color 0.18s, color 0.18s;
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 50px;
  height: 30px;
  border-radius: 16px;
  background: var(--surface-3);
  position: relative;
  transition: background-color 0.22s;
  flex: 0 0 auto;
  cursor: pointer;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s var(--ease);
}

.switch:checked {
  background: #34c759;
}

.switch:checked::after {
  transform: translateX(20px);
}

.legal-note {
  padding: 10px 24px 0;
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.45;
}

/* ---------- detail screens ---------- */
.detail-screen {
  padding-bottom: 20px;
}

.detail-bar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(var(--safe-top) + 4px) 12px 6px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.detail-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  transform: rotate(0deg);
}

.detail-back svg {
  transform: rotate(90deg);
}

.detail-bar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  max-width: 62%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-bar-spacer {
  width: 36px;
}

.detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 24px 18px;
  text-align: center;
}

.detail-art {
  width: min(64vw, 280px);
  height: min(64vw, 280px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
  margin-bottom: 18px;
}

.artist-art-lg {
  border-radius: 50% !important;
}

.detail-title {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.15;
}

.detail-artist {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 3px;
}

.detail-meta {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 5px;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.play-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 22px;
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(250, 45, 72, 0.3);
  transition: transform 0.16s var(--ease), opacity 0.16s;
}

.play-pill:active {
  transform: scale(0.96);
  opacity: 0.92;
}

.round-action {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text);
  transition: transform 0.16s var(--ease);
}

.round-action:active {
  transform: scale(0.92);
}

.detail-foot {
  padding: 16px 24px 0;
  font-size: 11.5px;
  color: var(--text-3);
  text-align: center;
}

.playlist-hero {
  padding-top: 2px;
}

.playlist-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: min(52vw, 208px);
  height: min(52vw, 208px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  margin-bottom: 16px;
  background: var(--surface-2);
}

.playlist-mosaic .artwork {
  width: 100%;
  height: 100%;
}

.playlist-mosaic .artwork img {
  border-radius: 0;
}

.mosaic-empty {
  background: var(--surface-3);
}

.edit-actions {
  display: flex;
  gap: 22px;
  margin-top: 14px;
}

.rename-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(84vw, 320px);
  margin-top: 4px;
}

.playlist-track {
  position: relative;
}

.reorder-controls {
  display: flex;
  align-items: center;
  gap: 0;
  padding-right: 4px;
}

.reorder-controls .danger {
  color: #ff3b30;
}

.flip {
  transform: rotate(180deg);
}

.collection-hero {
  position: relative;
  margin: 4px 16px 16px;
  border-radius: 18px;
  padding: 22px 20px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.collection-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  z-index: -1;
  mix-blend-mode: luminosity;
  filter: blur(2px);
}

.collection-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.collection-hero h1 {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 2px 0 2px;
}

.collection-hero p {
  font-size: 12.5px;
  opacity: 0.8;
}

.collection-hero + .detail-actions {
  margin: 0 0 14px;
  justify-content: center;
}

/* ---------- responsive ---------- */
@media (min-width: 520px) {
  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-2 {
    grid-template-columns: repeat(3, 1fr);
  }

  .app-main,
  .tabbar {
    max-width: 560px;
    margin: 0 auto;
  }

  .mini-player {
    max-width: 544px;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* ---------- auth ---------- */
.auth-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 24px) 20px calc(var(--safe-bottom) + 24px);
  background:
    radial-gradient(120% 80% at 15% 0%, rgba(250, 45, 72, 0.18), transparent 60%),
    radial-gradient(120% 80% at 90% 10%, rgba(91, 110, 225, 0.18), transparent 55%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: 22px;
  padding: 26px 22px 22px;
  box-shadow: 0 24px 60px rgba(20, 20, 30, 0.14);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ff5a6e, #d81b3c);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto;
  box-shadow: 0 10px 26px rgba(216, 27, 60, 0.35);
}

.auth-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  text-align: center;
}

.auth-sub {
  font-size: 13.5px;
  color: var(--text-2);
  text-align: center;
  margin-top: -8px;
}

.auth-segments {
  display: flex;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 3px;
  margin-top: 4px;
}

.auth-segments button {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  transition: background-color 0.18s, color 0.18s;
}

.auth-segments button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.auth-field input {
  padding: 13px 14px;
  border-radius: 11px;
  border: 1px solid var(--separator);
  background: var(--surface-2);
  font-size: 16px;
  outline: none;
  color: var(--text);
}

.auth-field input:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.auth-error {
  font-size: 13px;
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
  border-radius: 9px;
  padding: 9px 12px;
}

.auth-submit {
  margin-top: 4px;
}

.auth-note {
  font-size: 11.5px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.4;
}

.auth-loading {
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
}

.inline-note {
  color: var(--text-2);
  font-size: 13.5px;
  padding: 12px 20px;
}

.inline-error {
  color: #ff3b30;
  font-size: 13px;
  padding: 10px 20px;
}

.preview-banner {
  margin: 0 16px 14px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(250, 45, 72, 0.09);
  color: #b3122b;
  font-size: 12.5px;
  line-height: 1.35;
}

[data-theme="dark"] .preview-banner {
  background: rgba(250, 45, 72, 0.16);
  color: #ff8a9a;
}



.load-more-row {
  display: flex;
  justify-content: center;
  padding: 6px 20px 28px;
}

.load-more-row .primary-btn {
  min-width: 200px;
}

/* ---------- popular hero ---------- */
.hero-card {
  position: relative;
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 20px;
  height: 168px;
  border-radius: 16px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  text-align: left;
  box-shadow: 0 14px 34px rgba(20, 20, 30, 0.22);
  isolation: isolate;
}

.hero-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.72) 100%);
}

.hero-card-text {
  position: absolute;
  left: 16px;
  right: 64px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #fff;
}

.hero-card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.hero-card-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.15;
}

.hero-card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

/* ---------- lyrics ---------- */
.lyrics-screen {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  color: #fff;
  overflow: hidden;
  animation: np-in 0.36s var(--ease);
}

.lyrics-backdrop {
  position: absolute;
  inset: -18%;
  background-size: cover;
  background-position: center;
  filter: blur(60px) saturate(1.3) brightness(0.55);
  transform: scale(1.2);
}

.lyrics-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 14, 0.55);
}

.lyrics-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-top) + 8px) 16px 10px;
  flex: 0 0 auto;
}

.lyrics-head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lyrics-track {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.lyrics-artist {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.lyrics-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  min-width: 38px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lyrics-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 26px;
}

.lyrics-body::-webkit-scrollbar {
  display: none;
}

.lyrics-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28vh 0;
}

.lyrics-line {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 25px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: rgba(255, 255, 255, 0.32);
  padding: 7px 0;
  transition: color 0.25s ease, transform 0.25s var(--ease), opacity 0.25s ease;
  transform-origin: left center;
}

.lyrics-line.is-past {
  color: rgba(255, 255, 255, 0.45);
}

.lyrics-line.is-active {
  color: #fff;
  transform: scale(1.03);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.lyrics-line.is-plain {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.lyrics-tail {
  height: 30vh;
}

.lyrics-note {
  text-align: center;
  padding-top: 40vh;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.lyrics-empty {
  padding-top: 36vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lyrics-empty p {
  font-size: 19px;
  font-weight: 700;
}

.lyrics-empty span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.lyrics-footer {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px calc(var(--safe-bottom) + 12px);
}

.lyrics-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.lyrics-hint {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
}
