:root {
  --bg: #000;
  --bg-sidebar: #1A1A1A;
  --bg-content: #1A1A1A;
  --bg-card: #2A2A2A;
  --bg-elevated: #333335;
  --text: #F5F5F7;
  --text-secondary: #98989D;
  --accent: #FA233B;
  --accent-bg: rgba(250,35,59,0.12);
  --line: rgba(255,255,255,0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  --sidebar-width: 220px;
  --dock-height: 64px;
  --panel-width: 380px;
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-soft: 0 16px 40px rgba(0,0,0,0.28);
  --shadow-modal: 0 28px 70px rgba(0,0,0,0.46);
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
}

a,
button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

input,
select {
  outline: none;
}

img {
  display: block;
  max-width: 100%;
}

.hidden,
.urlbox,
#go,
#urlMode,
#appVersion,
.mobile-topbar .iconBtn.hidden {
  display: none !important;
}

#appVersionMobile,
#backTop,
#mobileSettingsBtn,
#mobileSettingsBackdrop,
#mobileSidebarToggle,
#mobileSidebarClose,
#mobileSidebarOverlay,
#mobileTabQueue,
#mobileTabPlaylists,
#mute,
#playerQueueInfo,
#playerStatus,
#qualitySwitchBadge,
#nowSourcePill,
.ghost-compat {
  display: none !important;
}

#toastContainer {
  position: fixed;
  right: 24px;
  bottom: calc(var(--dock-height) + 20px);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

#app {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) var(--dock-height);
  grid-template-areas:
    "nav main"
    "dock dock";
  background: var(--bg);
}

.sidebar-nav {
  grid-area: nav;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line);
  padding: 20px 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.desktopBackWrap {
  margin-bottom: 4px;
}

.desktopBackBtn {
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 12px;
  min-height: 34px;
  border-radius: 10px;
  text-decoration: none;
  gap: 6px;
  transition: background 160ms ease, color 160ms ease;
}

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

.desktopBackBtn.hidden {
  display: none;
}

.search-wrap {
  padding: 6px 0 20px;
  position: relative;
}

.search-shell {
  height: 36px;
  border-radius: 999px;
  background: #2A2A2A;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--text-secondary);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.searchHistoryPanel {
  position: absolute;
  top: calc(100% - 12px);
  left: 0;
  right: 0;
  z-index: 20;
  background: rgba(24,24,24,0.98);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.42);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-search-type-tabs {
  display: none;
}

.mobile-search-area {
  display: none;
}

.searchHistoryPanel.hidden {
  display: none;
}

.searchHistoryHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.searchHistoryClearBtn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
}

.searchHistoryItem {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  border-radius: 10px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
  cursor: pointer;
}

.searchHistoryItem:hover {
  background: rgba(255,255,255,0.05);
}

.search-glyph {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.searchClearBtn {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin: 0 -2px 0 0;
  transition: color 120ms, background 120ms;
}

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

.searchClearBtn svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

#q {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

#q::-webkit-search-cancel-button,
#q::-webkit-search-decoration,
#q::-webkit-search-results-button,
#q::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

#q::placeholder {
  color: var(--text-secondary);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.navItem {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease;
}

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

.navItem.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-footer {
  padding-top: 16px;
}

.avatar-wrap {
  position: relative;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4b5f 0%, #d9152d 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(250,35,59,0.18);
}

#me {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.avatar-dropdown {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: 230px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(42,42,44,0.98);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-soft);
  z-index: 40;
}

.dropdown-section + .dropdown-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.dropdown-label {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dropdownSelect,
#downloadModalPathText,
#downloadModalWorkers {
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 0 12px;
}

.dropdownSelect {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%), linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 17px) 15px, calc(100% - 12px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.cacheStatsText {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.cache-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.main-content {
  grid-area: main;
  min-width: 0;
  min-height: 0;
  background: var(--bg-content);
  padding: 24px;
  overflow: auto;
}

/* Album/playlist detail tracklist layout */
#tracklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#tracklist .trackrow {
  grid-template-columns: 28px 32px minmax(0, 1fr) auto;
}
/* Hide redundant cover thumbnail inside album detail tracklist */
#tracklist .trackrow .trackRowThumb {
  display: none;
}

.content-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

#contentTitle {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.search-type-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.tab {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

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

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

.results,
#results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px 16px;
  align-content: start;
}

/* When results contain a detail view or loading skeleton, switch to single column */
#results:has(.detail),
#results:has(.skeleton-detail) {
  grid-template-columns: 1fr;
}

.loadMoreWrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.card,
.playlistItem,
.discoverSection,
.sidePanel,
.bulkBar,
.modalCard,
.downloadMenuCard,
.browseDirCard,
.sidePanelShell {
  min-width: 0;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  background: transparent;
  border-radius: 14px;
}

.cardCover,
.card img.cardCover,
.playlistThumb,
.queueThumb,
.detailCover,
.collage {
  background: linear-gradient(180deg, #363638 0%, #242426 100%);
}

.cardCover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
  object-fit: cover;
}

.cardCover img,
.card > img,
.playlistThumb img,
.queueThumb img,
.detailCover img,
.collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cardBody,
.cardMain,
.titleStack {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cardBody {
  gap: 10px;
}

.cardMain {
  gap: 8px;
}

.cardRight {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.metaBadges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.cardActions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.card .t,
.card .title,
.qt,
.detailTitle,
.trackTitleWrap,
#title {
  color: var(--text);
}

.card .t,
.cardTitle,
.qt {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.card .s,
.cardSub,
.qa,
.detailSub,
.detailArtist,
#subtitle,
.trackDur,
.trackrow .aa,
.empty,
.emptyMini,
.detailNote,
.discoverSub,
.sideSub {
  color: var(--text-secondary);
}

.card .s,
.cardSub,
.qa,
.trackrow .aa,
.detailSub,
.detailArtist {
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
}

.trackListHead {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 70px;
  gap: 12px;
  padding: 0 0 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trackrow {
  display: grid;
  grid-template-columns: 28px 40px 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 10px;
  transition: background 140ms ease;
}

.trackrow:hover {
  background: rgba(255,255,255,0.04);
}

/* Checkbox column */
.trackSelect {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cover thumbnail column */
.trackRowThumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 auto;
}

/* Track number column */
.trackrow .n {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Actions column */
.rowActions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.rowBtnRow {
  display: flex;
  align-items: center;
  gap: 4px;
}

.trackSpec {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

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

.trackDur {
  text-align: right;
  font-size: 12px;
}

.detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detailHead,
.detailMainRow {
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.detailCover {
  width: 240px;
  height: 240px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  flex: 0 0 auto;
}

.detailMeta,
.detailInfo,
.detailRight {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.detailMeta,
.detailInfo {
  gap: 8px;
}

.detailRight {
  align-items: flex-start;
  gap: 10px;
}

.detailEyebrow {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detailTitle {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.detailActions,
.detailMetaBadges,
.bulkActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detailNote {
  font-size: 12px;
}

.discoverSection {
  display: flex;
  flex-direction: column;
  gap: 14px;
  grid-column: 1 / -1;
}

.discoverHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.discoverTitle,
.sideTitle {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.discoverGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px 16px;
}

.artistAlbumsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px 14px;
}

.artistAlbumsCounter {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  margin: 6px 0 4px;
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bg-main, #0d0d0d);
  padding: 10px 4px;
  flex-wrap: wrap;
}

.artistAlbumsCounter .pagerBtn {
  min-width: 88px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  margin-left: auto;
  transition: background 140ms ease, border-color 140ms ease;
}

.artistAlbumsCounter .pagerBtn + .pagerBtn {
  margin-left: 0;
}

.artistAlbumsCounter .pagerBtnWrap {
  display: flex;
  gap: 8px;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
}

.artistAlbumsCounter .pagerBtn:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--text-secondary);
}

.artistAlbumsCounter .pagerBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: background 160ms ease, transform 160ms ease, color 160ms ease;
}

.btn:hover {
  background: rgba(255,255,255,0.12);
}

.btn:active,
.iconBtn:active,
.tab:active {
  transform: scale(0.98);
}

.btn.primary,
.iconBtn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.primary:hover,
.iconBtn.primary:hover {
  background: #ff3147;
}

.btn.small {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.iconBtn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: transparent;
  transition: background 160ms ease, transform 160ms ease, color 160ms ease;
}

.iconBtn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.iconOnlyBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.iconOnlyBtn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.iconOnlyBtn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--accent, #e74c3c);
}

.iconOnlyBtn .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.iconBtn:hover {
  background: rgba(255,255,255,0.08);
}

.play-btn {
  width: 36px;
  height: 36px;
}

.sourceBadge,
.sourcePill,
.hiresBadge,
.qualityBadge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sourceBadge,
.sourcePill {
  background: var(--accent-bg);
  color: #ff7080;
}

.hiresBadge,
.qualityBadge {
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
}

.empty,
.emptyMini {
  display: grid;
  place-items: center;
  min-height: 160px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  font-size: 14px;
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.emptyMini::before {
  content: "⌀";
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.3;
}

.bulkBar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.08);
  flex-wrap: nowrap;
  min-height: 44px;
}

.bulkSelectAll {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  flex: 0 0 auto;
}

.bulkSummary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1 1 auto;
  min-width: 0;
}

.bulkSummary strong {
  color: var(--text);
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

.bulkActions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.bulkActions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  background: rgba(255,255,255,0.10);
  color: var(--text);
  transition: background 120ms, transform 80ms;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.bulkActions .btn:hover { background: rgba(255,255,255,0.18); }
.bulkActions .btn:active { transform: scale(0.97); }

.bulkActions .btn:disabled,
.bulkActions .btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bulkActions .btn.primary {
  background: var(--accent, #fc3c44);
  color: #fff;
}

.bulkActions .btn.primary:hover { background: #ff5147; }
.bulkActions .btn.primary:disabled,
.bulkActions .btn.primary.disabled {
  background: rgba(252, 60, 68, 0.35);
  color: rgba(255,255,255,0.7);
}

.bulkActions .btn.ghost {
  background: transparent;
  color: var(--text-secondary);
}

.bulkActions .btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.bulkClearBtn {
  font-size: 12px;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 6px;
  margin-left: 2px;
  border-radius: 6px;
  transition: color 120ms, background 120ms;
}

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

.sectionToggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
}

.sectionChevron {
  color: var(--text-secondary);
  font-size: 15px;
  transform: translateY(1px);
}

.sectionBody.collapsed,
.collapsed {
  display: none !important;
}

.queue-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panel-width);
  height: calc(100% - var(--dock-height));
  transform: translateX(100%);
  transition: transform 220ms ease;
  background: rgba(20,20,22,0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(255,255,255,0.08);
  z-index: 35;
}

.queue-panel.open {
  transform: translateX(0);
}

.sidePanelShell {
  height: 100%;
  padding: 24px 20px 28px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sideCard,
.sidePanel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sideHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sideTitleWrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.sideActions,
.playlist-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 220px;
}

#queue,
#myPlaylists {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.queueItem,
.playlistItem {
  min-height: 58px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  transition: background 160ms ease;
}

.queueItem:hover,
.playlistItem:hover {
  background: rgba(255,255,255,0.06);
}

.queueItem {
  display: grid;
  grid-template-columns: 16px 40px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.queueThumb,
.playlistThumb,
.collage {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
}

.queueMeta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.queueActions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.queueDragHandle {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  cursor: grab;
}

.queueDragHandle:active {
  cursor: grabbing;
}

.queueGrip {
  display: block;
  width: 8px;
  height: 12px;
  background: currentColor;
  -webkit-mask: linear-gradient(90deg, transparent 0, transparent 2px, currentColor 2px, currentColor 3px, transparent 3px, transparent 5px, currentColor 5px, currentColor 6px, transparent 6px);
  mask: linear-gradient(90deg, transparent 0, transparent 2px, currentColor 2px, currentColor 3px, transparent 3px, transparent 5px, currentColor 5px, currentColor 6px, transparent 6px);
}

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

.queueItem .queueSub {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queueRemoveBtn {
  opacity: 0.5;
  transition: opacity 120ms;
}

.queueItem:hover .queueRemoveBtn {
  opacity: 1;
}

.playlistItem {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.player-dock {
  grid-area: dock;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  height: var(--dock-height);
  padding: 0 20px;
  background: rgba(30,30,32,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--line);
}

.dock-left,
.dock-center,
.dock-right,
.dock-controls,
.dock-progress,
.player-meta-stack,
.volume-wrap {
  display: flex;
  align-items: center;
}

.dock-left {
  gap: 12px;
  min-width: 0;
}

.cover {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #2A2A2A;
  flex: 0 0 auto;
}

.player-meta-stack {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  max-width: 240px;
}

#title,
#subtitle {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#title {
  font-size: 13px;
  font-weight: 600;
}

#subtitle {
  font-size: 12px;
}

.dock-center {
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.dock-controls {
  gap: 8px;
}

.dock-progress {
  width: min(100%, 640px);
  gap: 12px;
}

#tcur,
#tdur {
  width: 36px;
  color: var(--text-secondary);
  font-size: 11px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.seek-wrap {
  position: relative;
  flex: 1;
  height: 16px;
  display: flex;
  align-items: center;
}

.seek-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
}

.progressFill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FA233B 0%, #ff5a6e 100%);
  box-shadow: 0 0 8px rgba(250, 35, 59, 0.55);
}

#seek {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.dock-right {
  gap: 8px;
  justify-content: flex-end;
}

.volume-wrap {
  position: relative;
}

.volumePopover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 52px;
  padding: 12px 10px;
  border-radius: 16px;
  background: rgba(42,42,44,0.98);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-soft);
  display: none;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}

.volumePopover.open {
  display: flex;
}

#volume {
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  width: 24px;
  height: 96px;
  writing-mode: bt-lr;
}

#volumeValue {
  color: var(--text-secondary);
  font-size: 11px;
}

#dockMenuBtn {
  margin-left: 2px;
}

#playlistImportInput {
  display: none;
}

.modal,
.downloadMenu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
}

.modal.hidden,
.downloadMenu.hidden {
  display: none !important;
}

.modalScrim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modalCard,
.downloadMenuCard,
.browseDirCard,
.downloadModalCard {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  border-radius: 22px;
  background: #232325;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-modal);
}

.modalCard,
.downloadModalCard,
.browseDirCard {
  padding: 22px;
}

.downloadMenuCard {
  width: min(320px, calc(100vw - 32px));
  padding: 12px;
}

.modalHead {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.modalTitle {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modalSubTitle {
  color: var(--text-secondary);
  font-size: 13px;
}

.modalSection + .modalSection,
.modalGrid + .modalSection {
  margin-top: 16px;
}

.modalLabel {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quality-btn-row,
.modalGrid,
.modalActions,
.path-row,
.browseDirList {
  display: flex;
  gap: 10px;
}

.quality-btn-row,
.modalActions {
  flex-wrap: wrap;
}

.path-row {
  align-items: center;
}

.path-row input {
  flex: 1;
}

.modalGrid {
  flex-direction: column;
  margin-top: 16px;
}

.checkRow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.checkRow input {
  accent-color: var(--accent);
}

.modalActions {
  justify-content: flex-end;
  margin-top: 20px;
}

.browseDirCard {
  max-height: min(72vh, 680px);
}

.browseDirList {
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  flex-direction: column;
  margin-top: 8px;
  padding-right: 4px;
}

.toast {
  min-width: 220px;
  max-width: 340px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(42,42,44,0.96);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-soft);
  pointer-events: auto;
}

.toast-error {
  border-color: rgba(250,35,59,0.38);
}

.toast-success {
  border-color: rgba(90,220,135,0.36);
}

.sideHeader .btn,
.sideActions .btn,
.modalActions .btn,
.cache-actions .btn,
.path-row .btn {
  flex: 0 0 auto;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.10);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.16);
  background-clip: padding-box;
}

/* ═══ Mobile Drawer (≤ 980px) ═══ */
.mobile-topbar {
  display: none;
}

.drawer-backdrop {
  display: none;
}

@media (max-width: 980px) {
  /* Switch to single-column layout: topbar + main + dock */
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "topbar"
      "main"
      "dock";
  }

  .content-header {
    display: none;
  }

  .main-content {
    padding: 14px 16px calc(var(--dock-height) + env(safe-area-inset-bottom, 0px) + 16px);
    grid-area: main;
    min-width: 0;
  }
  .sidebar-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(86vw, 320px);
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 240ms cubic-bezier(0.32, 0.72, 0, 1);
    border-right: 0.5px solid rgba(255, 255, 255, 0.08);
    border-left: none;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.32);
    padding-top: max(env(safe-area-inset-top, 0px), 18px);
    will-change: transform;
  }

  .sidebar-nav.is-open {
    transform: translateX(0);
  }

  .queue-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: min(86vw, 360px);
    z-index: 60;
    transform: translateX(100%);
    transition: transform 240ms cubic-bezier(0.32, 0.72, 0, 1);
    border-radius: 0;
    border-left: 0.5px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-sidebar);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.32);
    will-change: transform;
  }

  .queue-panel.is-open {
    transform: translateX(0);
  }

  /* Mobile topbar (visible only ≤ 980px) */
  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: max(env(safe-area-inset-top, 0px), 10px) 12px 10px;
    background: var(--bg-sidebar);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 30;
    grid-area: topbar;
  }

  .mobile-topbar .iconBtn {
    width: 40px;
    height: 40px;
    color: var(--text);
  }

  .mobile-topbar-title {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    letter-spacing: -0.01em;
  }

  .mobileQueueBtn {
    position: relative;
  }

  .queueCountBadge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--accent, #fc3c44);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-sizing: border-box;
  }

  /* Drawer backdrops */
  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
    -webkit-backdrop-filter: saturate(180%) blur(4px);
    backdrop-filter: saturate(180%) blur(4px);
  }

  .drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  /* Mobile drawers: left = primary nav, right = queue panel */
  .mobile-drawer {
    display: none;
  }

  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
  }

  .mobile-drawer-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
  }

  .mobile-drawer-close {
    width: 36px;
    height: 36px;
  }

  .mobile-drawer-close svg {
    width: 16px;
    height: 16px;
  }

  .mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px 24px;
  }

  .mobile-drawer .search-wrap {
    padding: 0 0 16px;
  }

  .mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-nav-list .navItem {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background 120ms;
  }

  .mobile-nav-list .navItem:active {
    background: rgba(255, 255, 255, 0.06);
  }

  .mobile-nav-list .navItem.active {
    color: var(--accent, #fc3c44);
    background: rgba(252, 60, 68, 0.08);
  }

  .main-content {
    padding: 14px 16px calc(var(--dock-height) + env(safe-area-inset-bottom, 0px) + 16px);
    grid-area: main;
    min-width: 0;
  }

  .content-header {
    display: none;
  }

  /* Hide desktop sidebar — it becomes a left drawer on mobile */
  .discoverSection {
    grid-column: 1 / -1;
  }

  /* Results grid: 2-column on mobile */
  .results,
  #results,
  .discoverGrid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  /* Artist albums: 3 columns on tablet (≤980px but >720px) */
  .artistAlbumsGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px 12px;
  }

  /* Track rows: more compact */
  .trackrow {
    padding: 10px 12px;
    gap: 10px;
  }

  .trackRowThumb {
    width: 40px;
    height: 40px;
  }

  /* Player dock: keep horizontal but tighter */
  .player-dock {
    grid-area: dock;
    grid-template-columns: minmax(100px, 1fr) minmax(0, 1.2fr) auto;
    padding: 10px 14px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }

  .dock-left {
    gap: 10px;
  }

  .cover {
    width: 38px;
    height: 38px;
  }

  .player-meta-stack {
    max-width: 140px;
  }

  #title {
    font-size: 13px;
  }

  #subtitle {
    font-size: 11px;
  }

  .dock-controls {
    gap: 2px;
  }

  .dock-controls .iconBtn {
    width: 36px;
    height: 36px;
  }

  .dock-controls .play-btn {
    width: 42px;
    height: 42px;
  }

  .dock-progress {
    gap: 8px;
  }

  #tcur,
  #tdur {
    font-size: 10px;
    width: 32px;
  }

  .dock-right {
    gap: 6px;
  }

  .volume-wrap {
    display: none;
  }

  #dockMenuBtn {
    margin-left: 0;
  }

  .detail {
    gap: 18px;
  }

  .detailHead {
    align-items: flex-start;
    gap: 16px;
  }

  .detailMeta {
    width: 100%;
    min-width: 0;
  }

  .detailMainRow {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .detailInfo,
  .detailActions {
    width: 100%;
  }

  .detailActions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .detailHeadArtist {
    align-items: flex-start;
    gap: 18px;
  }

  .detailCoverArtist {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
  }

  .detailEyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 6px;
  }

  .detailMainRowArtist {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .detailActionsPrimary {
    justify-content: flex-start;
  }

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

  .artistAlbumCard .cardCover {
    aspect-ratio: 1 / 1;
  }

  /* Avatar dropdown: adjust position for mobile */
  .avatar-dropdown {
    width: 260px;
  }

  /* Hide some secondary desktop UI on mobile */
  #qualitySwitchBadge,
  #playerStatus,
  #nowSourcePill {
    display: none !important;
  }
}

/* ═══ Small phone (≤ 720px) — compact dock + single-column results ═══ */
@media (max-width: 720px) {
  .mobile-topbar {
    padding: 8px 10px 8px;
  }

  .mobile-topbar .iconBtn {
    width: 38px;
    height: 38px;
  }

  .mobile-topbar .iconBtn.hidden {
    display: none !important;
  }

  .main-content {
    padding: 12px 12px calc(var(--dock-height) + env(safe-area-inset-bottom, 0px) + 14px);
  }

  .search-type-tabs {
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .mobile-search-area {
    display: block;
    margin-bottom: 10px;
  }

  .mobile-search-shell {
    height: 36px;
    border-radius: 999px;
    background: #2A2A2A;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    color: var(--text-secondary);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  }

  .mobile-search-shell #mobileQ {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    background: transparent;
    border: 0;
    color: var(--text);
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
  }

  .mobile-search-shell #mobileQ::placeholder {
    color: var(--text-secondary);
  }

  .content-header .search-type-tabs {
    display: none;
  }

  .search-wrap {
    padding: 0;
  }

  .search-shell {
    height: 34px;
  }

  .mobile-search-type-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 2px 0;
    scrollbar-width: none;
  }

  .mobile-search-type-tabs.hidden {
    display: none;
  }

  .mobile-search-type-tabs::-webkit-scrollbar {
    display: none;
  }

  .mobile-tab {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0 12px;
    font-size: 12px;
  }

  .player-dock {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    height: auto;
    min-height: 0;
    padding: 4px 10px 6px;
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
    gap: 2px;
    background: linear-gradient(180deg, rgba(20,20,20,0.95), rgba(13,13,13,0.98));
    backdrop-filter: saturate(160%) blur(14px);
  }

  .player-dock::before {
    content: "";
    display: none;
  }

  /* Row 1: progress + times */
  .dock-center {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    order: 1;
    min-height: 0;
  }

  .dock-progress {
    order: 1;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .dock-progress {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .dock-progress #tcur,
  .dock-progress #tdur {
    font-size: 9px;
    color: var(--text-secondary);
    min-width: 24px;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }

  .seek-track {
    height: 2px;
    flex: 1;
  }

  .seek-wrap input[type="range"] {
    height: 12px;
  }

  .dock-controls {
    order: 2;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  /* Row 2: cover | meta | controls */
  .dock-left {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    order: 2;
    min-height: 0;
  }

  .dock-left .cover {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 5px;
  }

  .player-meta-stack {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
  }

  .player-meta-stack #title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .player-meta-stack #subtitle {
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
  }

  /* Row 3: status + shuffle + repeat + volume + queue + menu */
  .dock-right {
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    order: 3;
    min-height: 0;
    padding: 0;
    height: 20px;
  }

  .dock-right #qualitySwitchBadge {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(252, 60, 68, 0.16);
    color: var(--accent, #fc3c44);
    line-height: 1.2;
  }

  .dock-right #playerStatus {
    font-size: 9px;
    color: var(--text-secondary);
    line-height: 1.2;
  }

  .dock-right .volume-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
  }

  .dock-right .volume-wrap .iconBtn,
  .dock-right .iconBtn {
    width: 22px;
    height: 22px;
  }

  .dock-right .volume-wrap .iconBtn svg,
  .dock-right .iconBtn svg {
    width: 11px;
    height: 11px;
  }

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

  .dock-controls .iconBtn {
    width: 28px;
    height: 28px;
  }

  .dock-controls .iconBtn svg {
    width: 13px;
    height: 13px;
  }

  .dock-controls .play-btn {
    width: 32px;
    height: 32px;
  }

  .dock-controls .play-btn svg {
    width: 13px;
    height: 13px;
  }

  .dock-controls #shuffle,
  .dock-controls #repeat {
    display: none;
  }

  .detailHead,
  .detailMainRow {
    flex-direction: column;
    align-items: flex-start;
  }

  .detailCover {
    width: 148px;
    height: 148px;
  }

.artistAlbumsGrid,
  .results,
  #results,
  .discoverGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }

  .artistAlbumCard .cardCover {
    aspect-ratio: 1 / 1;
  }

  .artistAlbumsCounter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 4px 8px;
    color: var(--text-secondary);
    font-size: 13px;
  }

  .pagerBtn {
    background: var(--bg-card);
    color: var(--text);
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
  }

  .pagerBtn[disabled] {
    opacity: 0.4;
    pointer-events: none;
  }

  .cardRight {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .sideActions,
  .playlist-actions {
    max-width: none;
    justify-content: flex-start;
  }

  .bulkBar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .bulkActions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

/* ═══ Tiny phone (≤ 420px) — really tight ═══ */
@media (max-width: 420px) {
  .artistAlbumsGrid,
  .results,
  #results,
  .discoverGrid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .detailCover {
    width: 132px;
    height: 132px;
  }

  .sidebar-nav {
    width: min(92vw, 320px);
  }

  .queue-panel {
    width: min(92vw, 360px);
  }

  .dock-controls .iconBtn {
    width: 34px;
    height: 34px;
  }

  .dock-controls .play-btn {
    width: 40px;
    height: 40px;
  }

  .player-meta-stack {
    max-width: 120px;
  }
}
