:root {
  --bg: #0b0c10;
  --bg-elevated: #12141a;
  --surface: rgba(22, 24, 31, 0.86);
  --surface-card: #161820;
  --surface-card-hover: #1d202a;
  --surface-strong: rgba(16, 18, 24, 0.96);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f6f8;
  --text-muted: #949ba8;
  --text-dim: #626977;
  --accent: #22c55e;
  --accent-strong: #10b981;
  --accent-soft: rgba(34, 197, 94, 0.15);
  --violet: #a78bfa;
  --amber: #fbbf24;
  --danger: #ef4444;
  --radius: 18px;
  --radius-sm: 12px;
  --player-h: 84px;
  --sidebar-w: 236px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 18% 8%, rgba(34, 197, 94, 0.08), transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(139, 92, 246, 0.07), transparent 60%),
    #0b0c10;
  pointer-events: none;
}

/* Desktop Studio App Layout */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  height: calc(100vh - var(--player-h));
  overflow: hidden;
}

/* Left Sidebar (Desktop) */
.sidebar {
  background: rgba(14, 16, 22, 0.92);
  border-right: 1px solid var(--border);
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 6px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(34, 197, 94, 0.32);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-group-title {
  padding: 0 10px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 4px 10px;
}

.sidebar-group-header .sidebar-group-title {
  padding: 0;
}

.sidebar-add-btn {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-add-btn:hover {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--accent-soft);
}

.sidebar-playlists {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-playlist-item .sidebar-playlist-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-empty-hint {
  margin: 2px 10px 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.09);
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.sidebar-empty-hint:hover {
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--text-muted);
}

.side-nav-btn {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  border-radius: 11px;
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.side-nav-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.side-nav-btn span:first-of-type {
  flex: 1;
}

.side-nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.side-nav-btn.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.05));
  border-color: rgba(34, 197, 94, 0.28);
}

.side-nav-btn.active svg {
  color: var(--accent);
}

.side-badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.side-badge.accent {
  background: var(--accent-soft);
  color: #86efac;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cloud-storage-card {
  padding: 12px;
  border-radius: 13px;
  background: var(--surface-card);
  border: 1px solid var(--border);
}

.cloud-storage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text);
}

.cloud-storage-head strong {
  color: #86efac;
  font-variant-numeric: tabular-nums;
}

.cloud-storage-sub {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.45;
}

.sidebar-legal {
  padding: 0 4px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

.sidebar-legal a {
  color: var(--text-muted);
  text-decoration: none;
}

.sidebar-legal a:hover {
  color: var(--accent);
}

/* Main Column */
.main-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.topbar {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(14, 16, 22, 0.78);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mobile-header-row {
  display: none;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 880px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

#search-input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-card);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.search-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-control {
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-card);
  color: var(--text);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.select-control:focus {
  border-color: var(--accent);
}

.btn-primary {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: #06140c;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, filter 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-strong);
}

.btn-ghost.active {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--accent-soft);
}

/* Workspace & Split Stage */
.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

body.stage-open .workspace {
  grid-template-columns: minmax(0, 1fr) 390px;
}

.content-pane {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.status-banner {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #86efac;
}

.status-banner.error {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.32);
  color: #fca5a5;
}

/* DISCOVER VIEW (Screenshot 2 exact card language) */
.discover-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.featured-card {
  border: 1px solid var(--border);
  background: var(--surface-card);
  border-radius: 20px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.featured-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--surface-card-hover);
}

.featured-covers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.art-cover {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

.art-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.18), transparent 45%),
    repeating-radial-gradient(circle at 85% 85%, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 2px, transparent 2px, transparent 9px);
  pointer-events: none;
}

.art-cover::after {
  content: "♪";
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.art-cover-1 { background: linear-gradient(145deg, #1e3a5f, #0f172a 65%, #064e3b); }
.art-cover-2 { background: linear-gradient(145deg, #134e4a, #0f172a 70%, #1e293b); }
.art-cover-3 { background: linear-gradient(145deg, #3b1d5e, #1e1b4b 65%, #31102f); }
.art-cover-4 { background: linear-gradient(145deg, #1e293b, #312e81 70%, #0f172a); }
.art-cover-5 { background: linear-gradient(145deg, #78350f, #1c1917 68%, #3f2305); }
.art-cover-6 { background: linear-gradient(145deg, #065f46, #111827 70%, #1f2937); }

.art-tag {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
}

.art-calligraphy {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  padding-right: 28px;
}

.featured-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.featured-cn {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.featured-count {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
}

.featured-play {
  width: 40px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.featured-play svg {
  width: 17px;
  height: 17px;
}

.featured-play.green { background: #22c55e; color: #052e16; }
.featured-play.violet { background: #8b5cf6; color: #fff; }
.featured-play.amber { background: #f59e0b; color: #1c1917; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title-btn {
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0;
  font-size: 17px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.title-play-tri {
  font-size: 12px;
  color: var(--text-muted);
}

.quick-picks-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pick-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pick-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.pick-art {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.pick-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pick-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick-artist {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* MINE & TRACK LIST VIEW (Screenshot 1 inspired) */
.list-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mine-quick-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mine-profile-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface-card);
  border: 1px solid var(--border);
}

.mine-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #0f766e);
  color: #042f1e;
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mine-profile-info {
  flex: 1;
  min-width: 0;
}

.mine-profile-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.vip-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.mine-profile-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
}

.mine-profile-stat {
  text-align: right;
}

.mine-profile-stat strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.mine-profile-stat span {
  font-size: 11px;
  color: var(--text-muted);
}

.mine-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mine-stat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-card);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mine-stat-card:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-strong);
}

.mine-stat-card.active {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.13), var(--surface-card));
}

.mine-card-stack {
  position: relative;
  width: 78%;
}

.mine-card-stack::before {
  content: "";
  position: absolute;
  top: 6px;
  right: -10px;
  bottom: 6px;
  width: 18px;
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, 0.07);
}

.mine-card-art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.mine-card-art svg {
  width: 28px;
  height: 28px;
}

.mine-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mine-art-fav { background: linear-gradient(135deg, #be123c, #1e293b); }
.mine-art-history { background: linear-gradient(135deg, #1d4ed8, #1e293b); }
.mine-art-all { background: linear-gradient(135deg, #6d28d9, #1e293b); }
.mine-art-saved { background: linear-gradient(135deg, #15803d, #1e293b); }

.mine-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.mine-card-foot strong {
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 2px;
  font-variant-numeric: tabular-nums;
}

.mine-play-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 9px;
  color: var(--text-muted);
}

@media (min-width: 901px) {
  .mine-stat-card {
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
    gap: 14px;
  }

  .mine-card-stack {
    width: 64px;
    flex-shrink: 0;
  }

  .mine-card-foot {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
  }

  .panel-header .tabs {
    display: none;
  }
}

.list-view-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.tab.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
}

.badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.tab.active .badge {
  background: var(--accent-soft);
  color: #86efac;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

.saved-summary-bar {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(34, 197, 94, 0.09);
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.saved-summary-bar strong {
  color: #86efac;
}

.track-list-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.empty-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.empty-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.empty-desc {
  margin: 0;
  font-size: 13px;
  max-width: 400px;
  line-height: 1.6;
}

.track-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1.5fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.track-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.track-row.playing {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.14), rgba(34, 197, 94, 0.03));
  border-color: rgba(34, 197, 94, 0.24);
}

.track-index {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.row-thumb {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq-bars span {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: eqPulse 0.9s ease-in-out infinite alternate;
}

.eq-bars span:nth-child(1) { height: 6px; animation-delay: 0s; }
.eq-bars span:nth-child(2) { height: 13px; animation-delay: 0.2s; }
.eq-bars span:nth-child(3) { height: 9px; animation-delay: 0.4s; }

body:not(.is-playing) .eq-bars span {
  animation: none;
  height: 4px;
}

@keyframes eqPulse {
  0% { height: 4px; }
  100% { height: 14px; }
}

.track-main {
  min-width: 0;
}

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

.track-row.playing .track-name {
  color: #86efac;
}

.track-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-album {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.source-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.size-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.saved-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  white-space: nowrap;
}

.row-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.12s ease;
}

.row-btn svg {
  width: 15px;
  height: 15px;
}

.row-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.row-btn.fav-active {
  color: #fb7185;
}

.row-btn.danger:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 0 4px;
}

.page-indicator {
  font-size: 13px;
  color: var(--text-muted);
}

/* Right / Immersive Stage Panel (Screenshot 4 style) */
.stage-panel {
  position: relative;
  border-left: 1px solid var(--border);
  background: #141720;
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  isolation: isolate;
  overflow: hidden;
}

.stage-backdrop {
  position: absolute;
  inset: -40px;
  z-index: -1;
  background: linear-gradient(165deg, #2b3c54 0%, #182232 55%, #10141d 100%);
  background-size: cover;
  background-position: center;
  filter: blur(50px) saturate(1.35) brightness(0.42);
  opacity: 0.95;
  transition: background-image 0.4s ease;
  pointer-events: none;
}

.stage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.icon-btn-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn-sm:hover {
  background: rgba(255, 255, 255, 0.14);
}

.icon-btn-sm svg {
  width: 16px;
  height: 16px;
}

.now-playing-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cover-wrap {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(10, 12, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.52);
}

.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.vinyl-disc {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #1e2430 0%, #0d1017 65%, #232a38 100%);
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
}

.vinyl-center {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.cover-wrap.spinning .vinyl-disc {
  animation: spin 10s linear infinite;
}

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

.track-meta {
  min-width: 0;
}

.meta-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.meta-artist-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-artist {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

.pill-accent {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
}

.pill-size {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  font-variant-numeric: tabular-nums;
}

.meta-album {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
}

.lyrics-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.lyrics-container {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 4px;
  scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.lyrics-empty {
  height: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

.lyric-line {
  padding: 7px 6px;
  border-radius: 8px;
  text-align: left;
  color: rgba(255, 255, 255, 0.52);
  font-size: 14px;
  line-height: 1.55;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.lyric-line:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.lyric-line.active {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.lyric-trans {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 400;
}

.lyric-line.active .lyric-trans {
  color: #86efac;
}

/* Stage Action Icons Row (Screenshot 4) */
.stage-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stage-action-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stage-action-btn svg {
  width: 19px;
  height: 19px;
}

.stage-action-btn:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.stage-action-btn.active {
  color: #fb7185;
}

.stage-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.trans-glyph {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 5px;
  border: 1.5px solid currentColor;
  font-size: 11px;
  font-weight: 700;
}

.stage-mobile-controls {
  display: none;
}

/* Desktop Bottom Persistent Player Bar */
.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--player-h);
  background: var(--surface-strong);
  border-top: 1px solid var(--border-strong);
  backdrop-filter: blur(24px);
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  z-index: 40;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: 12px;
}

.player-left:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mini-cover {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mini-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-cover-fallback {
  color: var(--accent);
  font-size: 20px;
}

.mini-info {
  min-width: 0;
}

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

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

.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease;
}

.icon-btn:hover:not(:disabled) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.icon-btn.active {
  color: #fb7185;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #052e16;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.play-btn:hover {
  filter: brightness(1.08);
  transform: scale(1.04);
}

.play-btn svg {
  width: 20px;
  height: 20px;
}

body.is-playing .play-btn {
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.22), 0 6px 18px rgba(34, 197, 94, 0.28);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(5, 46, 22, 0.25);
  border-top-color: #052e16;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.progress-row,
.stage-progress-row {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-label {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: center;
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--progress, 0%),
    rgba(255, 255, 255, 0.2) var(--progress, 0%),
    rgba(255, 255, 255, 0.2) 100%
  );
  outline: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.volume-slider {
  width: 92px;
}

.btn-icon {
  width: 14px;
  height: 14px;
}

/* Mobile Floating Dock (Hidden on Desktop) */
.mobile-dock {
  display: none;
}

/* Queue Bottom Sheet (Screenshot 3 exact style) */
.queue-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.queue-sheet {
  width: 100%;
  max-width: 600px;
  max-height: 68vh;
  background: #17181f;
  border-top: 1px solid var(--border-strong);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.65);
}

.queue-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.queue-sheet-title {
  font-size: 16px;
  font-weight: 700;
}

.queue-sheet-title small {
  margin-left: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.queue-sheet-list {
  overflow-y: auto;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* =========================================================
   MOBILE NATIVE EXPERIENCE (<= 900px) — Screenshots 1, 2, 3, 4
   ========================================================= */
@media (max-width: 900px) {
  html,
  body {
    height: auto;
    min-height: 100%;
  }

  .app-layout {
    display: block;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    display: none;
  }

  .main-column {
    height: auto;
    overflow: visible;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    background: rgba(11, 12, 16, 0.9);
    border-bottom: none;
  }

  .mobile-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-top-nav {
    display: flex;
    align-items: baseline;
    gap: 20px;
  }

  .top-nav-link {
    position: relative;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 600;
    padding: 2px 0 8px;
    cursor: pointer;
  }

  .top-nav-link.active {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
  }

  .top-nav-link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 14px;
    height: 3px;
    border-radius: 999px;
    background: #fff;
    transform: translateX(-50%);
  }

  .mobile-version-pill {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
  }

  .search-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .search-input-wrap {
    flex: 1 1 100%;
  }

  .search-controls {
    width: 100%;
  }

  .select-control {
    flex: 1;
    min-width: 0;
  }

  #toggle-stage-btn {
    display: none;
  }

  .workspace {
    display: block;
    overflow: visible;
  }

  .content-pane {
    padding: 6px 14px calc(98px + env(safe-area-inset-bottom));
    overflow: visible;
    gap: 18px;
  }

  /* Horizontal Swipe Carousel for Featured Cards (Screenshot 2) */
  .featured-grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 0 14px;
  }

  .featured-grid::-webkit-scrollbar {
    display: none;
  }

  .featured-card {
    scroll-snap-align: start;
  }

  .mine-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .mine-stat-card {
    padding: 10px;
    border-radius: 14px;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
  }

  .list-view-title {
    display: none;
  }

  body.mobile-mine-mode .search-bar {
    display: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex-shrink: 0;
  }

  .track-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 6px;
  }

  .track-album,
  .source-tag,
  .size-tag,
  .saved-tag {
    display: none;
  }

  .track-actions {
    gap: 2px;
  }

  .track-actions .row-btn {
    width: 27px;
    height: 27px;
  }

  .player-bar {
    display: none !important;
  }

  /* Floating Bottom 3-Part Dock (Screenshots 1 & 2) */
  .mobile-dock {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .dock-circle-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(24, 26, 33, 0.92);
    backdrop-filter: blur(20px);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  }

  .dock-circle-btn.active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
  }

  .dock-circle-btn svg {
    width: 21px;
    height: 21px;
  }

  .dock-mini-pill {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 5px 10px 5px 6px;
    border-radius: 999px;
    background: rgba(24, 26, 33, 0.94);
    backdrop-filter: blur(22px);
    border: 1.5px solid rgba(34, 197, 94, 0.55);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
  }

  .dock-mini-cover {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #13161f;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--accent);
  }

  .dock-mini-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .dock-mini-text {
    min-width: 0;
    flex: 1;
  }

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

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

  .dock-pill-play {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  }

  .dock-pill-play svg {
    width: 16px;
    height: 16px;
  }

  body.is-playing .dock-pill-play {
    background: rgba(34, 197, 94, 0.24);
    color: #86efac;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
  }

  /* Full-Screen Immersive Player on Mobile (Screenshot 4 exact layout) */
  body.stage-open #stage-panel {
    position: fixed;
    inset: 0;
    z-index: 65;
    border: none;
    border-radius: 0;
    padding: calc(14px + env(safe-area-inset-top)) 22px calc(18px + env(safe-area-inset-bottom));
    gap: 12px;
  }

  body.stage-open #stage-panel .cover-wrap {
    width: min(78vw, 310px);
    height: min(78vw, 310px);
    border-radius: 16px;
  }

  .stage-mobile-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 4px;
  }

  .stage-dock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }

  .stage-dock-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    color: rgba(255, 255, 255, 0.88);
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
  }

  .stage-dock-circle svg {
    width: 20px;
    height: 20px;
  }

  .stage-center-pill {
    flex: 1;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 12px;
  }

  .stage-pill-skip {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
  }

  .stage-pill-skip svg {
    width: 18px;
    height: 18px;
  }

  .stage-play-main {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
  }

  body.is-playing .stage-play-main {
    background: var(--accent);
    color: #052e16;
  }

  .stage-play-main svg {
    width: 24px;
    height: 24px;
  }
}

/* Custom Playlists Mobile Bar & Modals */
.mobile-playlists-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-card);
  border: 1px solid var(--border);
}

.mobile-playlists-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
}

.mobile-playlists-head strong {
  margin-left: 4px;
  color: var(--text-muted);
  font-weight: 500;
}

.mobile-playlists-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-playlist-pill {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-playlist-pill.active {
  border-color: rgba(34, 197, 94, 0.55);
  background: var(--accent-soft);
  color: #86efac;
}

.mobile-playlist-pill small {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-danger-ghost:hover:not(:disabled) {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.14);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: #171922;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-card-lg {
  max-width: 560px;
  max-height: 80vh;
}

dialog.modal-card:not([open]) {
  display: none;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.modal-input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.modal-input:focus {
  border-color: var(--accent);
}

.modal-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-dim);
}

.modal-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 48vh;
}

.import-row {
  display: grid;
  grid-template-columns: 20px 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.import-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.import-row.selected {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.pick-playlist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}

.pick-playlist-row:hover {
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--accent-soft);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

@media (min-width: 901px) {
  .mobile-playlists-bar {
    display: none;
  }
}
