#desktopApp {
  --shell-bg: #f6f6f8;
  --shell-surface: #ffffff;
  --shell-surface-soft: #f1f1f5;
  --shell-text: #202124;
  --shell-muted: #686d76;
  --shell-border: #e2e3e8;
  --shell-active: #eceafa;
  --shell-accent: #6657d9;
  --shell-accent-strong: #5142c7;
  --shell-player: #28183b;
  --shell-player-soft: #39234f;
  --shell-shadow: 0 16px 40px rgba(39, 32, 58, 0.08);
  display: none;
  position: relative;
  color-scheme: light;
}

#desktopApp,
#desktopApp * {
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  #desktopApp {
    display: grid;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  #desktopShell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-rows: 70px minmax(0, 1fr) 108px;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    color: var(--shell-text);
    background: var(--shell-bg);
  }

  #mobileLayout {
    display: none !important;
  }
}

@media (max-width: 1023.98px) {
  #desktopApp {
    display: none !important;
  }

  #mobileLayout {
    display: flex !important;
  }
}

#desktopShell {
  grid-template-areas:
    "sidebar topbar"
    "sidebar main"
    "player player";
}

#desktopShell .app-sidebar {
  grid-area: sidebar;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 16px 18px;
  border-right: 1px solid var(--shell-border);
  background: var(--shell-surface);
}

#desktopShell .app-topbar {
  grid-area: topbar;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid var(--shell-border);
  background: var(--shell-surface);
}

#desktopLibraryView {
  grid-area: main;
  min-width: 0;
  overflow-y: auto;
  padding: 24px;
  background: var(--shell-bg);
  scrollbar-color: #c7c5d4 transparent;
  scrollbar-width: thin;
}

#desktopPlayerBar {
  --primary-color: #ffffff;
  --on-primary-color: #28183b;
  --progress-bar-bg: rgba(255, 255, 255, 0.2);
  --surface-container-color: rgba(255, 255, 255, 0.09);
  --surface-container-high-color: rgba(255, 255, 255, 0.16);
  grid-area: player;
  display: grid;
  grid-template-columns: minmax(240px, 300px) 220px minmax(260px, 1fr) minmax(190px, 260px);
  min-width: 0;
  min-height: 108px;
  align-items: center;
  gap: 24px;
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  color: #fff;
  background: rgba(40, 24, 59, 0.97);
  box-shadow: 0 -12px 30px rgba(31, 18, 46, 0.14);
  z-index: 90;
}

#desktopLayout {
  position: fixed;
  inset: 0 0 108px;
  display: grid;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 22% 45%, rgba(126, 92, 166, 0.24), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(102, 87, 217, 0.2), transparent 32%),
    #28183b;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 200ms ease, transform 220ms ease, visibility 200ms ease;
  z-index: 80;
}

#desktopLayout.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

#floatingPlaylistPanel {
  position: fixed;
  top: 70px;
  right: 0;
  bottom: 108px;
  left: auto;
  display: flex;
  width: min(400px, 92vw);
  height: auto;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  background: rgba(40, 24, 59, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -20px 0 50px rgba(30, 18, 45, 0.22);
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 220ms ease, visibility 0s linear 0s;
  z-index: 70;
}

#floatingPlaylistPanel.translate-x-full {
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 220ms ease, visibility 0s linear 220ms;
}

#desktopShell button,
#desktopShell a {
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
}

#desktopShell button {
  font: inherit;
}

#desktopShell button:not(:disabled),
#desktopShell a,
#desktopLayout button,
#floatingPlaylistPanel button {
  cursor: pointer;
}

#desktopShell :focus-visible,
#desktopLayout :focus-visible {
  outline: 3px solid var(--shell-accent);
  outline-offset: 2px;
}

#floatingPlaylistPanel :focus-visible {
  outline: 3px solid #a89cff;
  outline-offset: 2px;
}

#desktopApp .app-skip-link {
  position: fixed;
  top: 10px;
  left: 260px;
  min-height: 40px;
  padding: 9px 14px;
  color: #fff !important;
  background: var(--shell-accent-strong);
  border-radius: 10px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
  z-index: 120;
}

#desktopApp .app-skip-link:focus {
  transform: translateY(0);
}

#desktopShell .app-brand {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  color: var(--shell-text);
}

#desktopShell .app-brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  color: var(--shell-accent);
  background: var(--shell-active);
  border-radius: 13px;
  font-size: 18px;
}

#desktopShell .app-brand-copy {
  display: block;
  min-width: 0;
}

#desktopShell .app-brand-copy strong {
  font-size: 17px;
  line-height: 1.2;
}

#desktopShell .app-navigation {
  display: grid;
  gap: 6px;
  margin-top: 30px;
}

#desktopShell .app-nav-label {
  margin: 0 12px 7px;
  color: var(--shell-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

#desktopShell .app-nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 14px;
  color: var(--shell-muted) !important;
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: color 180ms ease, background-color 180ms ease;
}

#desktopShell .app-nav-item i {
  width: 18px;
  color: #868b94;
  font-size: 15px;
  text-align: center;
}

#desktopShell .app-nav-item:hover {
  color: var(--shell-text) !important;
  background: var(--shell-surface-soft);
}

#desktopShell .app-nav-item[aria-current="page"] {
  color: var(--shell-accent-strong) !important;
  background: var(--shell-active);
}

#desktopShell .app-nav-item[aria-current="page"] i {
  color: var(--shell-accent);
}

#desktopShell .app-nav-count {
  min-width: 34px;
  margin-left: auto;
  padding: 3px 8px;
  overflow: hidden;
  color: var(--shell-accent-strong);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#desktopShell .app-import-proxy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

#desktopShell .app-sidebar-tools {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--shell-border);
}

#desktopShell .app-history {
  display: flex;
  align-items: center;
  gap: 8px;
}

#desktopShell .app-icon-button {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--shell-text);
  background: transparent;
  border: 1px solid var(--shell-border);
  border-radius: 12px;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

#desktopShell .app-icon-button:hover:not(:disabled) {
  color: var(--shell-accent-strong);
  background: var(--shell-active);
  border-color: #d9d4f4;
}

#desktopShell .app-icon-button:disabled {
  color: #b8bbc1;
  background: #f7f7f9;
  cursor: default;
}

#desktopShell .app-topbar-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

#desktopShell .app-topbar-copy strong {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#desktopShell .app-topbar-copy span {
  overflow: hidden;
  color: var(--shell-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#desktopShell .app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#desktopShell .app-topbar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  color: var(--shell-text);
  background: #fff;
  border: 1px solid var(--shell-border);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

#desktopShell .app-topbar-action:hover {
  color: var(--shell-accent-strong);
  background: var(--shell-active);
  border-color: #d9d4f4;
}

#desktopShell #desktopSearchShortcut {
  color: var(--shell-accent-strong) !important;
  background: var(--shell-active);
  border-color: #d9d4f4;
}

#desktopShell #desktopSearchShortcut:hover {
  color: #fff !important;
  background: var(--shell-accent-strong);
  border-color: var(--shell-accent-strong);
}

#desktopLibraryView .library-content {
  width: min(100%, 1120px);
  margin: 0 auto;
}

#desktopLibraryView .desktop-main-view[hidden] {
  display: none !important;
}

#desktopSearchView {
  min-height: 100%;
}

#desktopSearchView #desktopContentSearch {
  min-height: 280px;
}

#desktopLibraryView .library-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

#desktopLibraryView .library-heading-copy {
  min-width: 0;
}

#desktopLibraryView .discovery-source-switcher {
  display: grid;
  width: min(100%, 280px);
  flex: 0 0 auto;
  gap: 7px;
  padding: 14px;
  color: var(--shell-text);
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 16px;
  box-shadow: var(--shell-shadow);
}

#desktopLibraryView .discovery-source-switcher label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--shell-text);
  font-size: 12px;
  font-weight: 750;
}

#desktopLibraryView .discovery-source-switcher label i {
  color: var(--shell-accent-strong);
}

#desktopLibraryView .discovery-source-select-wrap {
  position: relative;
}

#desktopLibraryView #discoveryMusicSourceSelect {
  width: 100%;
  min-height: 44px;
  padding: 0 42px 0 13px;
  color: var(--shell-text);
  appearance: none;
  background: var(--shell-surface-soft);
  border: 1px solid var(--shell-border);
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

#desktopLibraryView #discoveryMusicSourceSelect:hover {
  border-color: var(--shell-accent-strong);
}

#desktopLibraryView #discoveryMusicSourceSelect:focus-visible {
  outline: none;
  border-color: var(--shell-accent-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--shell-accent-strong) 24%, transparent);
}

#desktopLibraryView #discoveryMusicSourceSelect option {
  color: var(--shell-text);
  background: var(--shell-surface);
}

#desktopLibraryView .discovery-source-select-wrap > i {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--shell-muted);
  font-size: 11px;
  pointer-events: none;
  transform: translateY(-50%);
}

#desktopLibraryView #discoveryMusicSourceHint {
  margin: 0;
  color: var(--shell-muted);
  font-size: 11px;
  line-height: 1.45;
}

#desktopLibraryView .library-kicker {
  margin: 0 0 6px;
  color: var(--shell-accent-strong);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

#desktopLibraryView h1,
#desktopLibraryView h2,
#desktopLibraryView p {
  margin-top: 0;
}

#desktopLibraryView h1 {
  margin-bottom: 8px;
  color: var(--shell-text);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.035em;
}

#desktopLibraryView .library-description {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--shell-muted);
  font-size: 14px;
  line-height: 1.7;
}

#desktopLibraryView .discovery-panel {
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 20px;
  box-shadow: var(--shell-shadow);
}

#desktopLibraryView .discovery-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
}

#desktopLibraryView .discovery-heading-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#desktopLibraryView .discovery-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#desktopLibraryView .discovery-title-row h2 {
  margin-bottom: 0;
  color: var(--shell-text);
  font-size: 19px;
  line-height: 1.3;
}

#desktopLibraryView .discovery-source {
  padding: 4px 8px;
  color: var(--shell-accent-strong);
  background: var(--shell-active);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

#desktopLibraryView .discovery-heading p {
  margin-bottom: 0;
  color: var(--shell-muted);
  font-size: 12px;
}

#desktopLibraryView .discovery-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--shell-accent-strong);
  background: var(--shell-active);
  border: 1px solid #d9d4f4;
  border-radius: 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

#desktopLibraryView .discovery-refresh:hover:not(:disabled) {
  color: #fff;
  background: var(--shell-accent-strong);
  border-color: var(--shell-accent-strong);
}

#desktopLibraryView .discovery-refresh:disabled {
  opacity: 0.55;
  cursor: wait;
}

#desktopLibraryView .discovery-list-header {
  display: grid;
  grid-template-columns: 48px minmax(240px, 1.5fr) minmax(160px, 0.8fr) 112px;
  align-items: center;
  gap: 16px;
}

#desktopLibraryView .discovery-song-row {
  display: grid;
  min-height: 72px;
  grid-template-columns: 48px minmax(240px, 1.5fr) minmax(160px, 0.8fr) 112px;
  align-items: center;
  gap: 16px;
}

#desktopLibraryView .discovery-list-header {
  min-height: 34px;
  padding: 0 28px;
  color: var(--shell-muted);
  font-size: 11px;
  font-weight: 700;
}

#desktopLibraryView .discovery-list-header span:last-child {
  text-align: right;
}

#desktopLibraryView .discovery-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 14px;
}

#desktopLibraryView .discovery-song-row {
  width: 100%;
  padding: 10px 16px;
  color: var(--shell-text);
  background: #fff;
  border: 1px solid var(--shell-border);
  border-radius: 14px;
  font: inherit;
  text-align: left;
  box-shadow: 0 4px 14px rgba(39, 32, 58, 0.035);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

#desktopLibraryView .discovery-song-row:hover {
  background: #faf9ff;
  border-color: #cfc8f2;
  box-shadow: 0 9px 22px rgba(61, 49, 130, 0.08);
}

#desktopLibraryView .discovery-song-play {
  display: grid;
  min-width: 0;
  min-height: 50px;
  grid-column: 1 / 4;
  grid-template-columns: 48px minmax(240px, 1.5fr) minmax(160px, 0.8fr);
  align-items: center;
  gap: 16px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
}

#desktopLibraryView .discovery-song-index {
  color: #8a8f98;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#desktopLibraryView .discovery-song-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

#desktopLibraryView .discovery-song-cover {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--shell-accent);
  background: var(--shell-active);
  border-radius: 10px;
}

#desktopLibraryView .discovery-song-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#desktopLibraryView .discovery-song-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#desktopLibraryView .discovery-song-copy strong,
#desktopLibraryView .discovery-song-copy span,
#desktopLibraryView .discovery-song-album {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#desktopLibraryView .discovery-song-copy strong {
  font-size: 14px;
  font-weight: 700;
}

#desktopLibraryView .discovery-song-copy span,
#desktopLibraryView .discovery-song-album {
  color: var(--shell-muted);
  font-size: 12px;
}

#desktopLibraryView .discovery-song-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 7px;
  padding: 0 12px;
  color: var(--shell-accent-strong);
  background: var(--shell-active);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

#desktopLibraryView .discovery-song-row:hover .discovery-song-action {
  color: #fff;
  background: var(--shell-accent-strong);
}

#desktopLibraryView .discovery-song-actions {
  display: inline-flex;
  justify-self: end;
  gap: 8px;
}

#desktopLibraryView .discovery-download {
  min-width: 36px;
  min-height: 36px;
  color: var(--shell-accent-strong);
  background: var(--shell-active);
  border: 0;
  border-radius: 10px;
}

#desktopLibraryView .discovery-status {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--shell-muted);
  font-size: 13px;
}

#desktopLibraryView .discovery-status.is-error {
  color: #a13a46;
}

#desktopContentSearch {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 22px;
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 20px;
  box-shadow: var(--shell-shadow);
}

#desktopLibraryView #desktopContentSearch.hidden {
  display: flex !important;
}

#desktopContentSearch .search-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

#desktopContentSearch .search-heading-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  color: var(--shell-accent);
  background: var(--shell-active);
  border-radius: 13px;
}

#desktopContentSearch .search-heading h2 {
  margin-bottom: 2px;
  color: var(--shell-text);
  font-size: 17px;
  line-height: 1.3;
}

#desktopContentSearch .search-heading p {
  margin-bottom: 0;
  color: var(--shell-muted);
  font-size: 12px;
}

#desktopContentSearch .search-box {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

#desktopContentSearch .search-input-wrap {
  position: relative;
  min-width: 0;
  flex: 1;
}

#desktopContentSearch .search-input-wrap > i {
  position: absolute;
  top: 50%;
  left: 17px;
  color: #8c9098;
  transform: translateY(-50%);
  pointer-events: none;
}

#desktopContentSearch #searchInput {
  width: 100%;
  min-height: 48px;
  padding: 0 18px 0 46px;
  color: var(--shell-text);
  background: #fafafd;
  border: 1px solid #d9dae1;
  border-radius: 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

#desktopContentSearch #searchInput::placeholder {
  color: var(--shell-muted);
}

#desktopContentSearch #searchInput:focus {
  background: #fff;
  border-color: var(--shell-accent);
  box-shadow: 0 0 0 3px rgba(102, 87, 217, 0.13);
}

#desktopContentSearch #searchButton {
  display: inline-flex;
  min-width: 88px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--shell-accent);
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 180ms ease;
}

#desktopContentSearch #searchButton:hover {
  background: var(--shell-accent-strong);
}

#desktopContentSearch .search-help {
  margin: 10px 2px 0;
  color: var(--shell-muted);
  font-size: 12px;
  line-height: 1.55;
}

#desktopContentSearch #searchResults {
  margin-top: 16px;
  color: var(--shell-text);
}

#desktopContentSearch #searchResults.theme-text-on-surface,
#desktopContentSearch #searchResults .theme-text-on-surface {
  color: var(--shell-text) !important;
}

#desktopContentSearch #searchResults .playlist-item {
  border: 1px solid transparent;
}

#desktopContentSearch #searchResults .playlist-item:hover {
  background: var(--shell-active) !important;
  border-color: #ded9f5;
}

#desktopContentSearch .bg-white\/10 {
  background-color: rgba(102, 87, 217, 0.14) !important;
}

#desktopContentSearch .bg-gradient-to-r {
  background-image: linear-gradient(
    to right,
    transparent,
    rgba(102, 87, 217, 0.16),
    transparent
  ) !important;
}

#desktopLibraryView .music-shelf {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 20px;
  color: var(--shell-text);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(247, 248, 255, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 26px;
  box-shadow: 0 12px 32px rgba(55, 65, 128, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

#desktopLibraryView .music-shelf::before {
  position: absolute;
  top: 0;
  right: 28px;
  left: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.96), transparent);
  content: "";
  pointer-events: none;
}

#desktopLibraryView .music-shelf-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

#desktopLibraryView .music-shelf-heading > div {
  min-width: 0;
}

#desktopLibraryView .music-shelf-kicker {
  margin: 0 0 4px;
  color: var(--shell-accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

#desktopLibraryView .music-shelf-heading h2 {
  margin: 0;
  color: var(--shell-text);
  font-size: 20px;
  line-height: 1.25;
}

#desktopLibraryView .music-shelf-heading p:not(.music-shelf-kicker) {
  margin: 5px 0 0;
  color: var(--shell-muted);
  font-size: 12px;
  line-height: 1.55;
}

#desktopLibraryView .music-shelf-note {
  flex: 0 0 auto;
  padding: 7px 11px;
  color: var(--shell-accent-strong);
  background: rgba(114, 96, 224, 0.09);
  border: 1px solid rgba(114, 96, 224, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

#desktopLibraryView .collection-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px 14px;
}

#desktopLibraryView .collection-card {
  --collection-accent: #7464df;
  --collection-glow: rgba(116, 100, 223, 0.24);
  display: flex;
  min-width: 0;
  flex-direction: column;
}

#desktopLibraryView [data-tone="sky"] {
  --collection-accent: #438fdf;
  --collection-glow: rgba(67, 143, 223, 0.28);
}

#desktopLibraryView [data-tone="cyan"] {
  --collection-accent: #2a9fb1;
  --collection-glow: rgba(42, 159, 177, 0.26);
}

#desktopLibraryView [data-tone="rose"] {
  --collection-accent: #c65c8a;
  --collection-glow: rgba(198, 92, 138, 0.25);
}

#desktopLibraryView [data-tone="amber"] {
  --collection-accent: #b77b2c;
  --collection-glow: rgba(183, 123, 44, 0.24);
}

#desktopLibraryView [data-tone="indigo"] {
  --collection-accent: #5967c9;
  --collection-glow: rgba(89, 103, 201, 0.27);
}

#desktopLibraryView .collection-cover-button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--collection-accent) 78%, #fff), var(--collection-accent));
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(38, 45, 83, 0.12), 0 5px 18px var(--collection-glow);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

#desktopLibraryView .collection-artwork,
#desktopLibraryView .scene-artwork {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 30px;
}

#desktopLibraryView .collection-artwork img,
#desktopLibraryView .scene-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms cubic-bezier(0.23, 1, 0.32, 1), filter 260ms ease;
}

#desktopLibraryView .collection-play-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding-left: 2px;
  color: #fff;
  background: rgba(24, 27, 49, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(15, 20, 48, 0.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 180ms ease, background-color 180ms ease;
}

#desktopLibraryView .collection-cover-button:hover,
#desktopLibraryView .collection-cover-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(38, 45, 83, 0.16), 0 8px 22px var(--collection-glow);
}

#desktopLibraryView .collection-cover-button:hover .collection-artwork img,
#desktopLibraryView .collection-cover-button:focus-visible .collection-artwork img {
  transform: scale(1.025);
  filter: saturate(1.06);
}

#desktopLibraryView .collection-cover-button:hover .collection-play-badge,
#desktopLibraryView .collection-cover-button:focus-visible .collection-play-badge {
  background: var(--collection-accent);
  transform: scale(1.04);
}

#desktopLibraryView .collection-cover-button:disabled,
#desktopLibraryView .collection-add-button:disabled,
#desktopLibraryView .scene-card button:disabled {
  cursor: wait;
  opacity: 0.72;
}

#desktopLibraryView .collection-card-copy {
  min-width: 0;
  padding: 12px 2px 0;
}

#desktopLibraryView .collection-card-copy h3 {
  margin: 0;
  overflow: hidden;
  color: var(--shell-text);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#desktopLibraryView .collection-card-copy p {
  display: -webkit-box;
  min-height: 36px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--shell-muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#desktopLibraryView .collection-card-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-left: 2px;
}

#desktopLibraryView .collection-card-footer > span {
  min-width: 0;
  overflow: hidden;
  color: #656b7a;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#desktopLibraryView .collection-add-button,
#desktopLibraryView .scene-add-button {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--collection-accent);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 13px;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

#desktopLibraryView .collection-add-button:hover,
#desktopLibraryView .collection-add-button:focus-visible {
  color: #fff;
  background: var(--collection-accent);
  transform: translateY(-1px);
}

#desktopLibraryView .scene-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

#desktopLibraryView .scene-card {
  --collection-accent: #7464df;
  --collection-glow: rgba(116, 100, 223, 0.24);
  position: relative;
  min-width: 0;
  min-height: 164px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--collection-accent) 78%, #fff), var(--collection-accent));
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 20px;
  box-shadow: 0 12px 28px var(--collection-glow);
}

#desktopLibraryView .scene-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(19, 24, 53, 0.88) 4%, rgba(28, 32, 66, 0.62) 58%, rgba(31, 34, 67, 0.2));
  content: "";
}

#desktopLibraryView .scene-card .scene-artwork img {
  filter: saturate(0.86) contrast(1.04);
}

#desktopLibraryView .scene-card:hover .scene-artwork img,
#desktopLibraryView .scene-card:focus-within .scene-artwork img {
  transform: scale(1.025);
  filter: saturate(1) contrast(1.04);
}

#desktopLibraryView .scene-card-content {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 164px;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 12px;
  padding: 18px;
}

#desktopLibraryView .scene-card-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#desktopLibraryView .scene-card-copy {
  min-width: 0;
}

#desktopLibraryView .scene-card-copy h3 {
  margin: 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.3;
}

#desktopLibraryView .scene-card-copy p {
  margin: 4px 0 6px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  line-height: 1.45;
}

#desktopLibraryView .scene-card-copy span {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#desktopLibraryView .scene-card-actions {
  display: flex;
  grid-column: 2;
  align-items: center;
  gap: 8px;
}

#desktopLibraryView .scene-play-button {
  display: inline-flex;
  min-width: 86px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  color: #222541;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 13px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 180ms ease, transform 180ms ease;
}

#desktopLibraryView .scene-play-button:hover,
#desktopLibraryView .scene-play-button:focus-visible {
  background: #fff;
  transform: translateY(-1px);
}

#desktopLibraryView .scene-add-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
}

#desktopLibraryView .scene-add-button:hover,
#desktopLibraryView .scene-add-button:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

#desktopLibraryView .collection-skeleton {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 9px;
}

#desktopLibraryView .collection-skeleton-art,
#desktopLibraryView .collection-skeleton-line {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(116, 100, 223, 0.1);
}

#desktopLibraryView .collection-skeleton-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
}

#desktopLibraryView .collection-skeleton-line {
  width: 82%;
  height: 12px;
  border-radius: 999px;
}

#desktopLibraryView .collection-skeleton-line.is-short {
  width: 55%;
  height: 9px;
}

#desktopLibraryView .collection-skeleton-art::after,
#desktopLibraryView .collection-skeleton-line::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  content: "";
  transform: translateX(-100%);
  animation: collection-shimmer 1.35s ease-in-out infinite;
}

#desktopLibraryView .scene-skeleton {
  display: grid;
  min-height: 164px;
  grid-template-columns: 44px 1fr;
  align-content: center;
  padding: 18px;
  background: rgba(116, 100, 223, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 20px;
}

#desktopLibraryView .scene-skeleton .collection-skeleton-art {
  width: 44px;
  height: 44px;
  aspect-ratio: auto;
  grid-row: 1 / 3;
  border-radius: 14px;
}

#desktopLibraryView .collection-status {
  display: flex;
  min-height: 132px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--shell-muted);
  background: rgba(255, 255, 255, 0.28);
  border: 1px dashed rgba(114, 96, 224, 0.2);
  border-radius: 18px;
  font-size: 12px;
  text-align: center;
}

#desktopLibraryView .collection-status.is-error i {
  color: #b44b62;
}

#desktopLibraryView .collection-status button {
  min-height: 44px;
  padding: 0 14px;
  color: var(--shell-accent-strong);
  background: var(--shell-active);
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

#desktopLibraryView .collection-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@keyframes collection-shimmer {
  to { transform: translateX(100%); }
}

#desktopPlayerBar .player-meta {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#desktopMiniPlayer {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 12px;
  text-align: left;
}

#desktopMiniPlayer:disabled {
  cursor: default;
}

#desktopMiniPlayer:hover .player-song-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

#desktopMiniCover {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

#desktopMiniPlayer .player-meta-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

#desktopMiniPlayer #songTitle,
#desktopMiniPlayer #artistName {
  display: block;
  overflow: hidden;
  padding: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#desktopMiniPlayer #songTitle {
  color: #fff;
  font-size: 16px;
  font-weight: 650;
}

#desktopMiniPlayer #artistName {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

#desktopPlayerBar .player-tags {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding-left: 68px;
}

#desktopPlayerBar .player-tags > * {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#desktopPlayerBar .player-technical-id,
#desktopPlayerBar .player-tags .quality-badge {
  display: none;
}

#desktopPlayerBar .player-controls {
  display: contents;
}

#desktopPlayerBar .transport-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#desktopPlayerBar .player-control-button,
#desktopPlayerBar .player-action-button {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  background-clip: content-box;
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  transition: color 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

#desktopPlayerBar .player-control-button:hover,
#desktopPlayerBar .player-action-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

#desktopPlayerBar .player-control-button:disabled,
#desktopPlayerBar .player-action-button:disabled {
  color: rgba(255, 255, 255, 0.3);
  opacity: 0.3;
  cursor: not-allowed;
}

#desktopPlayerBar .player-control-button:disabled:hover,
#desktopPlayerBar .player-action-button:disabled:hover {
  background: transparent;
}

#desktopPlayerBar #playPauseBtn {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  padding: 0;
  color: var(--shell-player) !important;
  background: #fff !important;
  border: 0 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22) !important;
  font-size: 19px;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease !important;
}

#desktopPlayerBar #playPauseBtn:hover {
  color: var(--shell-player);
  background: #f7f6fa !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24) !important;
  transform: scale(1.04);
}

#desktopPlayerBar .player-timeline {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(90px, 1fr) 38px;
  align-items: center;
  gap: 8px;
}

#desktopPlayerBar .player-timeline > span {
  color: rgba(255, 255, 255, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#desktopPlayerBar .player-timeline > span:last-child {
  text-align: right;
}

#desktopPlayerBar .progress-bar-container {
  display: flex;
  min-width: 0;
  height: 44px;
  align-items: center;
  padding: 0;
}

#desktopPlayerBar .progress-track {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
}

#desktopPlayerBar .progress-bar-container:hover .progress-track {
  height: 4px;
}

#desktopPlayerBar #progressBar {
  height: 100%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
}

#desktopPlayerBar .desktop-progress-thumb {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  transition: left 80ms linear, transform 180ms ease, box-shadow 180ms ease;
  pointer-events: none;
  z-index: 2;
}

#desktopPlayerBar .progress-bar-container:hover .desktop-progress-thumb,
#desktopPlayerBar .progress-scrubber.is-dragging .desktop-progress-thumb,
#desktopPlayerBar .progress-bar-container:focus-visible .desktop-progress-thumb {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.34);
  transform: translate(-50%, -50%) scale(1.333);
}

#desktopPlayerBar .progress-bar-container[aria-disabled="true"] {
  opacity: 0.46;
  cursor: not-allowed;
  pointer-events: none;
}

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

#desktopPlayerBar .player-actions .player-action-button {
  opacity: 0.7;
}

#desktopPlayerBar .player-actions .player-action-button:hover,
#desktopPlayerBar .player-actions .player-action-button:focus-visible {
  opacity: 1;
}

#desktopPlayerBar.is-empty #desktopMiniCover {
  padding: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0.82;
}

#desktopPlayerBar.is-empty #sourceTag {
  color: rgba(255, 255, 255, 0.55);
}

.playback-quality-trigger,
.mobile-playback-quality {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.13), rgba(135, 231, 255, 0.07)),
    rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.playback-quality-trigger:hover,
.mobile-playback-quality:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

.playback-quality-trigger:active,
.mobile-playback-quality:active {
  transform: scale(0.97);
}

.playback-quality-trigger:focus-visible,
.mobile-playback-quality:focus-visible {
  outline: 3px solid rgba(185, 182, 255, 0.34);
  outline-offset: 2px;
}

.playback-quality-trigger > i,
.mobile-playback-quality > i {
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
}

.playback-quality-dot {
  width: 7px;
  height: 7px;
  flex: none;
  background: #a9edff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(134, 232, 255, 0.8);
}

#desktopPlayerBar .playback-quality-trigger {
  min-height: 34px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  font-size: 12px;
}

#desktopPlayerBar .playback-quality-trigger:hover,
#desktopPlayerBar .playback-quality-trigger:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.2);
}

#desktopPlayerBar .playback-quality-dot {
  box-shadow: 0 0 8px rgba(134, 232, 255, 0.52);
}

.mobile-playback-quality {
  min-height: 44px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.mobile-playback-quality .quality-badge {
  padding: 0;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 0;
  box-shadow: none;
}

#desktopPlayerBar .volume-popup {
  color: #fff;
  background: var(--shell-player-soft);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#downloadDialog,
.liquid-choice-dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: visible;
  color: #f7f8ff;
  background: transparent;
  border: 0;
}

.collection-library-dialog {
  width: min(820px, calc(100vw - 32px));
}

#downloadDialog::backdrop,
.liquid-choice-dialog::backdrop {
  background:
    radial-gradient(circle at 22% 16%, rgba(103, 67, 196, 0.25), transparent 38%),
    rgba(4, 5, 12, 0.72);
  backdrop-filter: blur(20px) saturate(125%);
  -webkit-backdrop-filter: blur(20px) saturate(125%);
}

#downloadDialog[open],
.liquid-choice-dialog[open] {
  animation: liquid-dialog-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

#downloadDialog .download-dialog-card,
.liquid-choice-card {
  position: relative;
  display: block;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  color: #f7f8ff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045) 38%, rgba(110, 116, 186, 0.08)),
    rgba(14, 16, 29, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 32px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 15px 14px 30px rgba(255, 255, 255, 0.025),
    0 42px 110px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(120, 150, 255, 0.05);
  backdrop-filter: blur(42px) saturate(170%);
  -webkit-backdrop-filter: blur(42px) saturate(170%);
}

.collection-library-card {
  min-height: min(660px, calc(100dvh - 32px));
}

#downloadDialog .download-dialog-card::after,
.liquid-choice-card::after {
  position: absolute;
  inset: 1px;
  padding: 1px;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.44), transparent 18%, transparent 78%, rgba(164, 203, 255, 0.16)),
    radial-gradient(circle at 90% 10%, rgba(255, 164, 242, 0.2), transparent 23%);
  border-radius: 31px;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

.download-backdrop-art {
  position: absolute;
  inset: -14%;
  width: 128%;
  height: 128%;
  object-fit: cover;
  opacity: 0.42;
  filter: blur(34px) brightness(0.34) saturate(1.35);
  transform: scale(1.08);
}

.liquid-glass-glow {
  position: absolute;
  top: -45%;
  right: -20%;
  left: -20%;
  height: 78%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 80%, rgba(255, 255, 255, 0.24), transparent 42%),
    radial-gradient(ellipse at 70% 78%, rgba(119, 222, 255, 0.2), transparent 38%),
    linear-gradient(105deg, transparent 10%, rgba(219, 169, 255, 0.16), transparent 67%);
  filter: blur(18px);
  mix-blend-mode: screen;
  animation: liquid-refract 7s ease-in-out infinite alternate;
}

.download-dialog-content,
.liquid-choice-content {
  position: relative;
  z-index: 2;
  max-height: calc(100dvh - 34px);
  padding: 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.collection-library-content {
  position: relative;
  z-index: 2;
  display: grid;
  max-height: calc(100dvh - 32px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 24px;
  padding: 28px;
  overflow: hidden;
}

.collection-library-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: start;
  gap: 20px;
}

.collection-library-heading {
  display: grid;
  min-width: 0;
  grid-template-columns: 144px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

#collectionDialogCover {
  display: block;
  width: 144px;
  height: 144px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.collection-library-copy {
  min-width: 0;
}

.collection-library-copy h2 {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: clamp(25px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#collectionDialogMeta {
  margin: 8px 0 18px;
  overflow: hidden;
  color: rgba(247, 248, 255, 0.68);
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.collection-library-primary,
.collection-library-secondary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  color: #17182b;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  transition: transform 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

.collection-library-secondary {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.collection-library-primary:hover,
.collection-library-secondary:hover {
  transform: translateY(-1px);
}

.collection-library-primary:focus-visible,
.collection-library-secondary:focus-visible,
.collection-track-play:focus-visible,
.collection-track-add:focus-visible {
  outline: 3px solid rgba(185, 182, 255, 0.42);
  outline-offset: 2px;
}

.collection-library-primary:disabled,
.collection-library-secondary:disabled {
  opacity: 0.42;
  cursor: wait;
  transform: none;
}

.collection-library-tracks {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.collection-library-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
}

.collection-library-list-heading h3 {
  margin: 0;
  color: #fff;
  font-size: 15px;
}

.collection-library-list-heading span {
  color: rgba(247, 248, 255, 0.55);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#collectionTrackList {
  min-height: 180px;
  overflow-y: auto;
  padding: 4px 6px 4px 0;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
  scrollbar-width: thin;
}

.collection-track-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.collection-track-play {
  display: grid;
  width: 100%;
  min-height: 64px;
  grid-template-columns: 28px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  color: rgba(247, 248, 255, 0.76);
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.collection-track-play:hover,
.collection-track-play:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.collection-track-number {
  color: rgba(247, 248, 255, 0.4);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.collection-track-cover {
  display: grid;
  width: 48px;
  height: 48px;
  overflow: hidden;
  place-items: center;
  color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}

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

.collection-track-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.collection-track-copy strong,
.collection-track-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-track-copy strong {
  color: inherit;
  font-size: 13px;
  font-weight: 660;
}

.collection-track-copy span {
  color: rgba(247, 248, 255, 0.5);
  font-size: 11px;
}

.collection-track-album {
  max-width: 150px;
  overflow: hidden;
  color: rgba(247, 248, 255, 0.42);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-track-add {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: rgba(247, 248, 255, 0.68);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  transition: background-color 180ms ease, color 180ms ease;
}

.collection-track-add:hover,
.collection-track-add:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.collection-library-status {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: rgba(247, 248, 255, 0.62);
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  font-size: 13px;
  text-align: center;
}

.collection-library-status button {
  min-height: 44px;
  padding: 0 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}

.download-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.download-dialog-kicker {
  margin: 0 0 8px;
  color: rgba(235, 238, 255, 0.62);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.22em;
}

.download-dialog-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(27px, 4vw, 35px);
  font-weight: 690;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

#downloadCancel,
#playbackQualityCancel,
#collectionDialogClose {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16);
}

#downloadCancel:hover,
#playbackQualityCancel:hover,
#collectionDialogClose:hover {
  background: rgba(255, 255, 255, 0.14);
}

#downloadCancel:focus-visible,
#playbackQualityCancel:focus-visible,
#collectionDialogClose:focus-visible {
  outline: 3px solid rgba(185, 182, 255, 0.34);
  outline-offset: 2px;
}

@media (max-width: 680px) {
  .collection-library-content {
    gap: 18px;
    padding: 20px;
  }

  .collection-library-header {
    gap: 12px;
  }

  .collection-library-heading {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
  }

  #collectionDialogCover {
    width: 88px;
    height: 88px;
    border-radius: 18px;
  }

  .collection-library-copy h2 {
    font-size: 22px;
  }

  #collectionDialogMeta {
    margin-bottom: 12px;
  }

  .collection-track-play {
    grid-template-columns: 24px 44px minmax(0, 1fr);
    gap: 9px;
    padding-right: 9px;
  }

  .collection-track-cover {
    width: 44px;
    height: 44px;
  }

  .collection-track-album {
    display: none;
  }
}

.download-song-name {
  margin: 13px 0 26px;
  color: rgba(247, 248, 255, 0.74);
  font-size: 14px;
  line-height: 1.55;
}

.liquid-choice-description {
  margin: 13px 0 20px;
  color: rgba(247, 248, 255, 0.64);
  font-size: 13px;
  line-height: 1.55;
}

.liquid-quality-picker {
  position: relative;
}

.liquid-quality-trigger {
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  color: #f7f8ff;
  text-align: left;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), inset 0 -12px 24px rgba(0, 0, 0, 0.08);
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.liquid-quality-trigger:hover,
.liquid-quality-trigger[aria-expanded="true"] {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.12), rgba(174, 184, 255, 0.07) 55%, rgba(125, 225, 255, 0.1)),
    rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.25);
}

.liquid-quality-trigger:focus-visible {
  outline: 0;
  border-color: rgba(192, 201, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(155, 148, 255, 0.16), inset 0 1px rgba(255, 255, 255, 0.12);
}

.liquid-quality-trigger > i {
  flex: none;
  color: rgba(255, 255, 255, 0.72);
  transition: transform 250ms ease;
}

.liquid-quality-trigger[aria-expanded="true"] > i {
  transform: rotate(180deg);
}

.liquid-quality-trigger-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.liquid-quality-trigger-label {
  color: rgba(238, 241, 255, 0.64);
  font-size: 11px;
}

.liquid-quality-trigger-value {
  overflow: hidden;
  color: #f7f8ff;
  font-size: 16px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.liquid-quality-menu-wrap {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-7px) scale(0.985);
  transform-origin: top center;
  transition: grid-template-rows 300ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms ease, transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-quality-picker.is-open .liquid-quality-menu-wrap {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.liquid-quality-menu-clip {
  min-height: 0;
  overflow: hidden;
}

.liquid-quality-menu {
  position: relative;
  display: grid;
  gap: 4px;
  margin-top: 9px;
  padding: 7px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(125, 141, 211, 0.055) 45%, rgba(99, 205, 229, 0.08)),
    rgba(12, 14, 27, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 22px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.22), inset 0 -16px 30px rgba(0, 0, 0, 0.12), 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}

.liquid-quality-menu-static {
  margin-top: 0;
}

.liquid-quality-option {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 11px 8px 13px;
  color: rgba(247, 248, 255, 0.72);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 160ms ease;
}

.liquid-quality-option:hover,
.liquid-quality-option:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.13);
  outline: 0;
}

.liquid-quality-option:active {
  transform: scale(0.99);
}

.liquid-quality-option[aria-selected="true"] {
  color: #fff;
  background:
    radial-gradient(circle at 85% 0%, rgba(135, 226, 255, 0.16), transparent 42%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.17), rgba(157, 156, 231, 0.09));
  border-color: rgba(207, 217, 255, 0.34);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.26), 0 8px 24px rgba(15, 18, 45, 0.2);
}

.liquid-quality-option-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 9px;
}

.liquid-quality-option-name {
  font-size: 14px;
  font-weight: 660;
}

.liquid-quality-option-meta {
  color: rgba(236, 239, 255, 0.48);
  font-size: 11px;
}

.liquid-quality-check {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: transparent;
  background: transparent;
  border-radius: 50%;
}

.liquid-quality-option[aria-selected="true"] .liquid-quality-check {
  color: #fff;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(139, 218, 255, 0.16));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.35), 0 0 18px rgba(128, 221, 255, 0.18);
}

.liquid-quality-check i {
  font-size: 11px;
}

.download-status {
  min-height: 20px;
  margin: 10px 4px 16px;
  color: rgba(230, 234, 255, 0.6);
  font-size: 12px;
  line-height: 1.5;
}

.liquid-primary-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.24), rgba(180, 188, 255, 0.12) 46%, rgba(135, 231, 255, 0.18)),
    rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.38), inset 0 -14px 26px rgba(0, 0, 0, 0.08), 0 14px 34px rgba(26, 29, 66, 0.28);
  font-weight: 680;
  transition: transform 180ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.liquid-primary-button::before {
  position: absolute;
  top: -40%;
  left: -70%;
  width: 60%;
  height: 180%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: rotate(18deg);
  transition: left 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-primary-button:hover::before {
  left: 125%;
}

.liquid-primary-button:hover {
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.48), 0 18px 42px rgba(27, 31, 83, 0.42);
}

.liquid-primary-button:active {
  transform: scale(0.985);
}

.liquid-primary-button:focus-visible {
  outline: 3px solid rgba(179, 184, 255, 0.5);
  outline-offset: 3px;
}

.liquid-primary-button:disabled,
#downloadCancel:disabled {
  cursor: wait;
  opacity: 0.58;
}

@keyframes liquid-dialog-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes liquid-refract {
  from { transform: translate3d(-2%, -1%, 0) rotate(-2deg); }
  to { transform: translate3d(3%, 2%, 0) rotate(2deg); }
}

@media (max-width: 767px) {
  #downloadDialog,
  .liquid-choice-dialog {
    width: calc(100vw - 16px);
    max-width: none;
    max-height: calc(100dvh - 16px);
    margin: auto 8px max(8px, env(safe-area-inset-bottom));
  }

  #downloadDialog .download-dialog-card,
  .liquid-choice-card {
    max-height: calc(100dvh - 16px - env(safe-area-inset-bottom));
    border-radius: 32px;
  }

  .download-dialog-content,
  .liquid-choice-content {
    max-height: calc(100dvh - 18px - env(safe-area-inset-bottom));
    padding: 26px 22px max(24px, env(safe-area-inset-bottom));
  }

  .liquid-quality-option {
    min-height: 54px;
  }

  .liquid-quality-option-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }
}

#desktopLayout .immersive-header {
  position: absolute;
  top: 20px;
  right: 28px;
  left: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 4;
}

#desktopLayout .immersive-heading {
  display: grid;
  gap: 2px;
}

#desktopLayout .immersive-heading strong {
  font-size: 14px;
}

#desktopLayout .immersive-heading span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  letter-spacing: 0.08em;
}

#desktopImmersiveClose {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  transition: background-color 160ms ease;
}

#desktopImmersiveClose:hover {
  background: rgba(255, 255, 255, 0.18);
}

#desktopLayout .immersive-stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: clamp(30px, 5vw, 80px);
  align-items: stretch;
  padding: 72px clamp(36px, 6vw, 92px) 32px;
}

#desktopLayout .immersive-cover-pane,
#desktopLayout .immersive-lyrics-pane {
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
}

#desktopLayout .visualizer-container {
  margin: 0;
}

#desktopLayout .immersive-lyrics-pane {
  overflow: hidden;
}

#desktopLayout .lyrics-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: transparent;
}

#desktopLayout .lyrics-scroller {
  min-height: 0;
}

#floatingPlaylistPanel .queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#floatingPlaylistPanel .queue-heading {
  display: grid;
  min-width: 0;
  gap: 2px;
}

#floatingPlaylistPanel .queue-heading strong {
  font-size: 15px;
}

#floatingPlaylistPanel .queue-heading span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

#floatingPlaylistPanel .queue-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

#floatingPlaylistPanel #desktopTabPlaylist,
#floatingPlaylistPanel #desktopTabSearch {
  min-height: 44px;
  padding: 0 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.queue-clear-button,
.queue-remove-button {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  color: #ffd1d6;
  background: rgba(255, 83, 104, 0.1);
  border: 1px solid rgba(255, 116, 132, 0.22);
  border-radius: 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  touch-action: manipulation;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.queue-clear-button:hover:not(:disabled),
.queue-remove-button:hover:not(:disabled),
.queue-clear-button:focus-visible,
.queue-remove-button:focus-visible {
  color: #fff;
  background: rgba(230, 62, 82, 0.78);
  border-color: rgba(255, 174, 184, 0.62);
}

.queue-clear-button:disabled {
  cursor: default;
  opacity: 0.36;
}

.queue-remove-button {
  flex: 0 0 44px;
  padding: 0;
  opacity: 0.62;
}

.playlist-item:hover .queue-remove-button,
.playlist-item:focus-within .queue-remove-button,
.mobile-queue-item:focus-within .queue-remove-button {
  opacity: 1;
}

#mobileThemeBtn {
  position: absolute;
  right: 60px;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 14px;
  opacity: 0.72;
  touch-action: manipulation;
}

.mobile-queue-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px;
  background: rgba(8, 8, 13, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mobile-queue-toolbar > span {
  font-size: 12px;
  opacity: 0.66;
}

.mobile-queue-item {
  color: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-queue-item.is-playing {
  background: rgba(255, 255, 255, 0.1);
}

.toast-action {
  min-width: 52px;
  min-height: 36px;
  margin-left: 4px;
  padding: 0 12px;
  color: #07070b;
  background: #b8ff4f;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  pointer-events: auto;
}

#copyToast.has-action {
  pointer-events: auto;
}

#floatingPlaylistPanel #desktopContentPlaylist {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

#floatingPlaylistPanel #desktopContentPlaylist.hidden {
  display: flex !important;
}

#floatingPlaylistPanel #playlistContainer {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 18px;
}

#floatingPlaylistPanel .playlist-item:hover {
  background: rgba(255, 255, 255, 0.09) !important;
}

@media (min-width: 1024px) and (max-width: 1199px) {
  #desktopLibraryView .discovery-list-header,
  #desktopLibraryView .discovery-song-row {
    grid-template-columns: 40px minmax(220px, 1fr) 100px;
  }

  #desktopLibraryView .discovery-song-play {
    grid-column: 1 / 3;
    grid-template-columns: 40px minmax(220px, 1fr);
  }

  #desktopLibraryView .discovery-column-album,
  #desktopLibraryView .discovery-song-album {
    display: none;
  }

  #desktopLibraryView .collection-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #desktopLibraryView .scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #desktopPlayerBar {
    grid-template-columns: minmax(190px, 240px) 196px minmax(180px, 1fr) auto;
    gap: 16px;
    padding-right: 14px;
    padding-left: 14px;
  }

  #desktopPlayerBar .player-tags {
    display: none;
  }

  #desktopShell .app-topbar-copy span,
  #desktopShell .app-topbar-action span {
    display: none;
  }

  #desktopLayout .immersive-stage {
    grid-template-columns: minmax(280px, 0.8fr) minmax(380px, 1.2fr);
    gap: 28px;
    padding-right: 34px;
    padding-left: 34px;
  }
}

@media (min-width: 1024px) and (max-width: 1099px) {
  #desktopPlayerBar {
    grid-template-columns: minmax(170px, 220px) 184px minmax(150px, 1fr) auto;
    gap: 10px;
  }

  #desktopPlayerBar .player-actions > [data-shell-destination="queue"],
  #desktopPlayerBar #desktopDownloadBtn {
    display: none;
  }

  #desktopPlayerBar .transport-controls {
    gap: 4px;
  }
}

@media (max-height: 650px) and (min-width: 1024px) {
  #desktopLayout > .immersive-header {
    display: flex !important;
  }

  #desktopPlayerBar {
    min-height: 108px;
    padding-top: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  #desktopLibraryView {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  #desktopLibraryView .library-heading {
    margin-bottom: 14px;
  }

  #desktopLibraryView .library-description {
    display: none;
  }

  #desktopLibraryView .music-shelf {
    padding: 18px;
  }
}

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

/* Liquid-glass integration: keeps the application shell introduced on main. */
@media (min-width: 1024px) {
  #desktopApp {
    --shell-bg: transparent;
    --shell-surface: rgba(255, 255, 255, 0.58);
    --shell-surface-soft: rgba(255, 255, 255, 0.38);
    --shell-border: rgba(255, 255, 255, 0.7);
    --shell-active: rgba(238, 233, 255, 0.7);
    --shell-shadow: 0 22px 54px rgba(55, 65, 128, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    background:
      radial-gradient(circle at 12% 16%, rgba(113, 204, 255, 0.72), transparent 36%),
      radial-gradient(circle at 88% 12%, rgba(184, 165, 255, 0.66), transparent 38%),
      radial-gradient(circle at 70% 88%, rgba(116, 220, 244, 0.46), transparent 34%),
      linear-gradient(135deg, #cfeaff 0%, #e9e4ff 52%, #d7f3ff 100%);
  }

  #desktopShell {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr) 108px;
    gap: 14px;
    padding: 14px;
    background: transparent;
  }

  #desktopShell .app-sidebar,
  #desktopShell .app-topbar,
  #desktopLibraryView {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.36));
    border: 1px solid var(--shell-border);
    box-shadow: var(--shell-shadow);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
  }

  #desktopShell .app-sidebar {
    border-radius: 28px;
  }

  #desktopShell .app-topbar {
    border-radius: 22px;
  }

  #desktopLibraryView {
    border-radius: 28px;
  }

  #desktopShell .app-topbar-action,
  #desktopLibraryView .discovery-panel,
  #desktopLibraryView .music-shelf,
  #desktopLibraryView .discovery-song-row {
    background: rgba(255, 255, 255, 0.46);
    border-color: rgba(255, 255, 255, 0.68);
    box-shadow: 0 10px 26px rgba(55, 65, 128, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
  }

  #desktopLibraryView .discovery-panel {
    border-radius: 26px;
  }

  #desktopLibraryView .music-shelf {
    border-radius: 26px;
  }

  #desktopLibraryView .discovery-song-row {
    border-radius: 18px;
    transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1),
      background-color 220ms cubic-bezier(0.23, 1, 0.32, 1),
      box-shadow 220ms cubic-bezier(0.23, 1, 0.32, 1);
  }

  #desktopLibraryView .discovery-song-row:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 30px rgba(55, 65, 128, 0.14), inset 0 1px 0 #fff;
  }

  #desktopPlayerBar {
    overflow: visible;
    color: #fff;
    background: linear-gradient(110deg, rgba(55, 51, 88, 0.96), rgba(39, 73, 99, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(22px) saturate(135%);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
  }

  #desktopPlayerBar .player-timeline,
  #desktopPlayerBar .progress-track {
    position: relative;
    overflow: visible;
  }

  #desktopPlayerBar .progress-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border: 0;
    box-shadow: none;
  }

  #desktopPlayerBar #progressBar {
    background: rgba(255, 255, 255, 0.82);
    box-shadow: none;
  }

  #floatingPlaylistPanel {
    top: 84px;
    right: 14px;
    bottom: 136px;
    color: #172033;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 28px 0 0 28px;
    box-shadow: -18px 18px 46px rgba(55, 65, 128, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
  }

  #floatingPlaylistPanel .queue-heading span {
    color: rgba(23, 32, 51, 0.58);
  }

  #floatingPlaylistPanel #desktopTabPlaylist,
  #floatingPlaylistPanel #desktopTabSearch {
    color: #5142c7;
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.78);
  }

  #floatingPlaylistPanel .playlist-item {
    color: #172033 !important;
    background: rgba(255, 255, 255, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.7);
  }

  #floatingPlaylistPanel .playlist-item:hover {
    background: rgba(255, 255, 255, 0.84) !important;
    box-shadow: 0 10px 26px rgba(55, 65, 128, 0.12);
  }
}
