:root {
  --editorial-surface: var(--editorial-surface-solid, var(--app-theme-panel, var(--mc-panel)));
  --editorial-raised: var(--editorial-raised-solid, var(--app-theme-card, var(--mc-panel-raised)));
  --editorial-line: var(--mc-line);
  --editorial-radius: var(--surface-radius, 16px);
  --editorial-text: var(--mc-text);
  --editorial-muted: var(--mc-muted);
}

html { scroll-behavior: smooth; }
body {
  --text: var(--editorial-text);
  --subtle: var(--editorial-muted);
  --muted: var(--editorial-muted);
  background: var(--app-theme-bg, var(--mc-bg));
  color: var(--editorial-text);
}
.app-root, .workspace { background: var(--app-theme-bg, var(--mc-bg)); }
body[data-theme-wallpaper="true"] .app-root {
  background-color: var(--app-theme-bg, #0b0d12) !important;
  background-image:
    linear-gradient(var(--app-custom-overlay, transparent), var(--app-custom-overlay, transparent)),
    var(--app-custom-image, none) !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: var(--app-custom-photo-size, cover) !important;
  background-attachment: fixed !important;
}
body[data-theme-wallpaper="true"] .app-root > .workspace {
  background: color-mix(in srgb, var(--app-theme-bg, #0b0d12) 82%, transparent) !important;
}
.ambient { opacity: .055; filter: blur(130px); }
.ambient-b { opacity: .035; }
body[data-custom-animation="video"] .app-root > .workspace,
body[data-custom-theme="true"] .app-root > .workspace {
  background: color-mix(in srgb, var(--app-theme-bg, #0b0d12) 82%, transparent) !important;
}
body[data-theme="light"][data-custom-theme="true"] .app-root > .workspace {
  background: color-mix(in srgb, var(--app-theme-bg, #f3f6fa) 82%, transparent) !important;
}
body[data-theme="custom"] .app-root > .workspace {
  background: color-mix(in srgb, var(--app-theme-bg, #0b0d12) 82%, transparent) !important;
}
body[data-theme="light"][data-custom-animation="video"] .app-root > .workspace {
  background: color-mix(in srgb, var(--app-theme-bg, #f3f6fa) 82%, transparent) !important;
}

.sidebar {
  background: var(--editorial-surface);
  border-color: var(--editorial-line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.brand-mark {
  background: transparent;
  box-shadow: none;
}
.brand-logo { filter: none; }
.topbar {
  border-color: var(--editorial-line);
  background: color-mix(in srgb, var(--editorial-surface) 94%, transparent);
  backdrop-filter: blur(var(--glass-blur, 18px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 18px));
}
.top-search-field {
  border-color: transparent;
  border-radius: var(--editorial-radius);
  background: color-mix(in srgb, var(--editorial-raised) 64%, transparent);
}
.top-search-field:focus-within { border-color: color-mix(in srgb, var(--mc-accent) 48%, transparent); }
.icon-btn { border-radius: var(--editorial-radius); }
.content { max-width: 1740px; }
.topbar > .brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.topbar > .brand-mark .brand-logo { width: 40px; height: 24px; object-fit: contain; }
.ionicons-svg .ionicon-fill-none { fill: none; }
.ionicons-svg .ionicon-stroke-width { stroke: currentColor; stroke-width: 32px; }
#topSettings span { display: none; }

.eyebrow { letter-spacing: .14em; }
.page-heading {
  align-items: end;
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--editorial-line);
}
.page-heading h1 {
  margin: 10px 0 8px;
  font-size: calc(clamp(36px, 5vw, 58px) * var(--site-heading-scale, 1));
  letter-spacing: -.06em;
}
.page-heading p { max-width: 540px; }
.section-head { margin: 44px 0 17px; }
.section-head .eyebrow { color: var(--mc-muted); }
.section-head h2 { font-size: calc(clamp(20px, 2.2vw, 27px) * var(--site-heading-scale, 1)); letter-spacing: -.04em; }
.section-head .text-link { color: var(--mc-muted); }
.section-head .text-link:hover { color: var(--mc-accent); }
.library-heading-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.local-music-status { color: var(--mc-muted); }
.local-track-label { color: var(--mc-muted); }

.primary-btn, .secondary-btn {
  min-height: 42px;
  border-radius: var(--editorial-radius);
  box-shadow: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.primary-btn { background: var(--mc-accent); }
.primary-btn:hover { box-shadow: none; transform: translateY(-1px); }
.secondary-btn {
  border-color: var(--editorial-line);
  background: transparent;
}
.secondary-btn:hover { background: color-mix(in srgb, var(--editorial-raised) 60%, transparent); }

.home-intro.home-dashboard {
  grid-template-columns: minmax(0, .76fr) minmax(360px, 1fr);
  gap: clamp(34px, 7vw, 96px);
  padding: clamp(14px, 2vw, 26px) 0 34px;
  border: 0;
  border-bottom: 1px solid var(--editorial-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.home-dashboard::after { display: none; }
.home-dashboard-welcome { align-self: center; }
.home-dashboard-welcome .eyebrow { color: var(--mc-muted); }
.home-dashboard-welcome h1 {
  max-width: 740px;
  margin: 17px 0 15px;
  font-size: calc(clamp(38px, 3.2vw, 46px) * var(--site-heading-scale, 1));
  letter-spacing: -.07em;
  line-height: .99;
}
.home-dashboard-welcome p { max-width: 400px; color: var(--mc-muted); font-size: 14px; }
.home-dj-card {
  padding: clamp(18px, 2.4vw, 30px);
  border: 0;
  border-left: 2px solid var(--mc-accent);
  border-radius: 0 var(--editorial-radius) var(--editorial-radius) 0;
  background: var(--editorial-surface);
  box-shadow: none;
}
.home-dj-card-head h2 { font-size: calc(clamp(20px, 2.5vw, 27px) * var(--site-heading-scale, 1)); letter-spacing: -.045em; }
.home-dj-meta { color: var(--mc-muted); }
.home-dj-refresh {
  border-color: transparent;
  border-radius: 50%;
  background: transparent;
}
.home-dj-refresh:hover { background: color-mix(in srgb, var(--mc-accent) 10%, transparent); }
.home-dj-track {
  padding: 8px 0;
  border-bottom: 1px solid var(--editorial-line);
  border-radius: 0;
  background: transparent;
}
.home-dj-track:first-child { border-top: 1px solid var(--editorial-line); }
.home-dj-track:hover { background: color-mix(in srgb, var(--editorial-raised) 42%, transparent); }
.home-dj-track img { border-radius: var(--artwork-radius, 8px); }
.home-dj-track-index { color: var(--mc-muted); }
.home-dj-play { width: auto; min-width: 190px; }

.mix-card, .album-card, .artist-card {
  border-radius: var(--editorial-radius);
  background: transparent;
}
.mix-card { padding: 8px 0; }
.mix-card:hover, .album-card:hover, .artist-card:hover {
  background: color-mix(in srgb, var(--editorial-raised) 42%, transparent);
  transform: translateY(-2px);
}
.mix-art, .album-art, .mix-card img, .album-card img, .artist-card img {
  border-radius: var(--artwork-radius, 9px);
}
.catalog-stack-card {
  border-color: transparent;
  border-radius: var(--editorial-radius);
  background: var(--editorial-surface);
  box-shadow: none;
}
.catalog-stack-card:hover {
  border-color: color-mix(in srgb, var(--mc-accent) 38%, transparent);
  background: var(--editorial-surface);
  transform: translateY(-2px);
}
.track-list { gap: 0; }
.track-list .track-row, #catalogTracks .track-row, #freshUploads .track-row {
  margin: 0;
  padding: 12px 8px;
  border: 0;
  border-bottom: 1px solid var(--editorial-line);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.track-list .track-row:first-child { border-top: 1px solid var(--editorial-line); }
.track-list .track-row:hover {
  background: color-mix(in srgb, var(--editorial-raised) 45%, transparent);
  box-shadow: none;
}
.track-thumb { border-radius: var(--artwork-radius, 8px); }

.library-top { gap: clamp(12px, 2vw, 24px); }
.library-tile {
  min-height: 120px;
  border-color: var(--editorial-line);
  border-radius: var(--editorial-radius);
  background: var(--editorial-surface);
  box-shadow: none;
}
.library-tile:hover, .playlist-card:hover { border-color: color-mix(in srgb, var(--mc-accent) 40%, var(--editorial-line)); }
.library-tile-icon { border-radius: 50%; }
.playlist-card {
  border-color: transparent;
  border-bottom-color: var(--editorial-line);
  border-radius: var(--editorial-radius);
  background: transparent;
  box-shadow: none;
}
.playlist-card img { border-radius: var(--artwork-radius, 8px); }

.ai-mode-switch {
  width: fit-content;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--editorial-line);
  border-radius: 0;
  background: transparent;
}
.ai-mode-switch button {
  min-height: 42px;
  border-radius: 0;
  background: transparent;
}
.ai-mode-switch button.active {
  border-bottom: 2px solid var(--mc-accent);
  background: transparent;
  box-shadow: none;
}
.ai-chat, .ai-side, .ai-auto-panel, .ai-auto-results {
  border-color: var(--editorial-line);
  border-radius: var(--editorial-radius);
  background: var(--editorial-surface);
  box-shadow: none;
}
.ai-chat { overflow: hidden; }
.ai-chat-head { border-color: var(--editorial-line); }
.ai-orb { box-shadow: none; }
.ai-feature {
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--editorial-line);
  border-radius: 0;
  background: transparent;
}
.ai-note { border-color: var(--editorial-line); }
.chat-compose {
  border-color: var(--editorial-line);
  border-radius: var(--editorial-radius);
  background: color-mix(in srgb, var(--editorial-raised) 58%, transparent);
}
.chat-send { box-shadow: none; }
.ai-auto-controls select, .settings-select {
  border-radius: var(--editorial-radius);
}

body[data-view="player"] .player-main,
body[data-view="player"] .player-aside {
  border-color: var(--editorial-line);
  border-radius: var(--editorial-radius);
  background: var(--editorial-surface);
  box-shadow: none;
}
body[data-view="player"] .player-artwork {
  border-radius: var(--artwork-radius, 16px);
  box-shadow: 0 22px 58px rgba(0,0,0,.24);
}
body[data-view="player"] .player-art-glow { opacity: .1; filter: blur(82px); }
body[data-view="player"] .stage-icon-btn.main-play {
  box-shadow: none;
}
body[data-view="player"] .player-aside { padding: 22px; }
body[data-view="player"] .player-tabs {
  border-color: var(--editorial-line);
  border-radius: var(--editorial-radius);
  background: var(--editorial-surface);
}
body[data-view="player"] .player-tabs button { border-radius: 0; }
body[data-view="player"] .player-tabs button.active {
  border-bottom: 2px solid var(--mc-accent);
  background: transparent;
  color: var(--mc-accent);
}
.player-bar {
  border-color: var(--editorial-line);
  border-radius: var(--editorial-radius);
  background: color-mix(in srgb, var(--editorial-surface) 50%, var(--app-theme-bg, var(--mc-bg)));
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
  backdrop-filter: blur(var(--glass-blur, 18px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 18px));
}
.player-bar:hover {
  border-color: color-mix(in srgb, var(--mc-accent) 22%, var(--editorial-line));
  background: color-mix(in srgb, var(--editorial-surface) 50%, var(--app-theme-bg, var(--mc-bg)));
}
.settings-window, .theme-store-window {
  border-color: var(--editorial-line);
  border-radius: var(--editorial-radius);
  background: var(--editorial-surface);
  box-shadow: 0 22px 65px rgba(0,0,0,.28);
}
.settings-header { border-color: var(--editorial-line); }
.settings-section { border-color: var(--editorial-line); }
.settings-row, .settings-inline-control { border-color: var(--editorial-line); }

@media (min-width: 1200px) {
  .sidebar { width: 204px; flex-basis: 204px; }
  .brand-mark { margin-bottom: 34px; }
  .top-nav .nav-btn { border-radius: var(--editorial-radius); }
  .top-nav .nav-btn.active {
    color: var(--mc-text);
    background: transparent;
  }
  .top-nav .nav-btn.active .nav-label { color: var(--mc-accent); }
  .top-nav .nav-btn.active::before {
    left: 12px;
    bottom: 3px;
    width: 17px;
    height: 2px;
    border-radius: 2px;
    box-shadow: none;
  }
}

@media (max-width: 720px) {
  .content { padding: 21px 17px 166px; }
  .page-heading {
    align-items: stretch;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 17px;
  }
  .page-heading > div:first-child { width: 100%; min-width: 0; }
  .page-heading h1 { font-size: calc(clamp(34px, 9vw, 45px) * var(--site-heading-scale, 1)); }
  .library-heading-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .library-heading-actions > button {
    min-width: 0;
    justify-content: center;
    gap: 7px;
    padding-inline: 8px;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
  }
  .library-heading-actions > button svg { flex: 0 0 18px; }
  .section-head { margin: 34px 0 13px; }
  .home-intro.home-dashboard {
    grid-template-columns: 1fr;
    gap: 19px;
    padding: 8px 0 24px;
  }
  .home-dashboard-welcome h1 {
    max-width: 430px;
    margin: 14px 0 11px;
    font-size: calc(clamp(40px, 11vw, 54px) * var(--site-heading-scale, 1));
  }
  .home-dashboard-welcome p { font-size: 13px; }
  .home-dj-card { padding: 16px; }
  .home-dj-play { width: 100%; }
  .mix-card { padding: 6px 0; }
  .library-top { grid-template-columns: 1fr; }
  .library-tile { min-height: 94px; padding: 16px; }
  .ai-mode-switch { width: 100%; }
  .ai-mode-switch button { flex: 1; }
  .player-bar {
    border-radius: var(--editorial-radius);
    background: color-mix(in srgb, var(--editorial-surface) 50%, var(--app-theme-bg, var(--mc-bg)));
    box-shadow: 0 7px 24px rgba(0,0,0,.2);
  }
  .mobile-nav {
    border-color: var(--editorial-line);
    background: var(--app-theme-bg, var(--mc-bg));
    backdrop-filter: blur(var(--glass-blur,18px));
    -webkit-backdrop-filter: blur(var(--glass-blur,18px));
  }
  .mobile-nav button { border-radius: 0; background: transparent; }
  .mobile-nav button.active,
  body[data-view="player"] .mobile-nav button[data-view="player"] {
    color: var(--mc-accent);
    background: transparent;
  }
}

.page-heading > div > .eyebrow,
.section-head > div > .eyebrow,
.modal > .eyebrow,
#sleepTimerEyebrow { display: none; }

body[data-theme="light"] .home-intro.home-dashboard {
  border-bottom-color: var(--editorial-line);
  background: transparent;
  box-shadow: none;
}
body[data-theme="light"] .home-dj-card,
body[data-theme="light"] .catalog-stack-card,
body[data-theme="light"] .ai-chat,
body[data-theme="light"] .ai-side,
body[data-theme="light"] .ai-auto-panel,
body[data-theme="light"] .ai-auto-results,
body[data-theme="light"] .library-tile,
body[data-theme="light"][data-view="player"] .player-main,
body[data-theme="light"][data-view="player"] .player-aside {
  color: var(--mc-text);
}
body[data-theme="light"] .home-dj-card,
body[data-theme="light"] .catalog-stack-card,
body[data-theme="light"] .ai-chat,
body[data-theme="light"] .ai-side,
body[data-theme="light"] .ai-auto-panel,
body[data-theme="light"] .ai-auto-results,
body[data-theme="light"] .library-tile,
body[data-theme="light"][data-view="player"] .player-main,
body[data-theme="light"][data-view="player"] .player-aside {
  background: var(--editorial-surface);
}
body:not([data-theme="light"]) .player-bar,
body:not([data-theme="light"]) .mobile-nav {
  background: color-mix(in srgb, var(--app-theme-bg, var(--mc-bg)) calc(var(--surface-opacity, .72) * 100%), transparent) !important;
  backdrop-filter: blur(var(--glass-blur, 18px)) saturate(80%) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur, 18px)) saturate(80%) !important;
}

body[data-theme="light"] {
  --mc-text: #182332;
  --mc-muted: #526274;
  --text: #182332;
  --subtle: #526274;
  --muted: #526274;
  --editorial-muted: #526274;
  --editorial-line: rgba(24, 35, 50, .16);
  --mc-line: rgba(24, 35, 50, .16);
  color: #182332;
}
body[data-theme="light"] .workspace,
body[data-theme="light"] .content,
body[data-theme="light"] .player-screen,
body[data-theme="light"] .player-screen.active {
  color: #182332;
}
body[data-theme="light"] .sidebar,
body[data-theme="light"] .topbar:not([hidden]),
body[data-theme="light"] .player-bar,
body[data-theme="light"] .mobile-nav,
body[data-theme="light"] .player-tabs,
body[data-theme="light"] .player-tab-mini,
body[data-theme="light"] .settings-window,
body[data-theme="light"] .settings-header,
body[data-theme="light"] .settings-rail,
body[data-theme="light"] .settings-content,
body[data-theme="light"] .settings-live-preview,
body[data-theme="light"] .settings-preview-track,
body[data-theme="light"] .settings-preview-stage,
body[data-theme="light"] .global-search-pop,
body[data-theme="light"] .profile-pop,
body[data-theme="light"] .drawer,
body[data-theme="light"] .player-aside,
body[data-theme="light"] .theme-store-window,
body[data-theme="light"] .theme-store-card,
body[data-theme="light"] .sleep-timer-dialog,
body[data-theme="light"] .modal {
  border-color: rgba(24, 35, 50, .16);
  background-color: var(--editorial-surface-solid, #fff) !important;
  color: #182332;
  box-shadow: 0 12px 32px rgba(27, 44, 64, .1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body[data-theme="light"] .settings-content,
body[data-theme="light"] .settings-live-preview,
body[data-theme="light"] .settings-preview-track,
body[data-theme="light"] .settings-preview-stage,
body[data-theme="light"] .theme-store-card {
  background-color: var(--editorial-raised-solid, #f7f9fc) !important;
}
body[data-theme="light"] .settings-header h2,
body[data-theme="light"] .settings-section h3,
body[data-theme="light"] .settings-row-copy strong,
body[data-theme="light"] .settings-inline-control strong,
body[data-theme="light"] .settings-live-preview-head strong,
body[data-theme="light"] .settings-preview-meta strong,
body[data-theme="light"] .theme-option,
body[data-theme="light"] .theme-market-note button {
  color: #182332;
}
body[data-theme="light"] .theme-option {
  border-color: rgba(24, 35, 50, .12);
  background-color: var(--editorial-raised-solid, #fff);
}
body[data-theme="light"] .theme-option:hover { background-color: #f1f5f9; }
body[data-theme="light"] .theme-option.active {
  border-color: var(--mc-accent);
  background-color: var(--editorial-raised-solid, #f7f9fc);
}
body[data-theme="light"] .theme-option small,
body[data-theme="light"] .settings-live-preview-head span,
body[data-theme="light"] .settings-preview-meta span,
body[data-theme="light"] .theme-market-note {
  color: #526274;
}
body[data-theme="light"] .theme-market-note {
  border-color: rgba(24, 35, 50, .14);
  background-color: var(--editorial-raised-solid, #f7f9fc);
}
body[data-theme="light"] .theme-market-note button {
  border-color: rgba(24, 35, 50, .2);
  background-color: var(--editorial-surface-solid, #fff);
}
body[data-theme="light"] .settings-preview-track-lines i {
  background-color: rgba(24, 35, 50, .72);
}
body[data-theme="light"] .settings-preview-track-lines i + i {
  background-color: rgba(24, 35, 50, .46);
}
body[data-theme="light"] .settings-preview-progress {
  background: linear-gradient(to right, var(--site-primary) 56%, rgba(24, 35, 50, .2) 56%);
}
body[data-theme="light"] .accent-swatch.active {
  outline-color: #182332;
}
body[data-theme="light"] .home-dj-card,
body[data-theme="light"] .catalog-stack-card,
body[data-theme="light"] .ai-chat,
body[data-theme="light"] .ai-side,
body[data-theme="light"] .ai-auto-panel,
body[data-theme="light"] .ai-auto-results,
body[data-theme="light"] .library-tile,
body[data-theme="light"] .playlist-card,
body[data-theme="light"] .recommend-card,
body[data-theme="light"] .mix-card,
body[data-theme="light"] .album-card,
body[data-theme="light"] .artist-card,
body[data-theme="light"] .track-list .track-row,
body[data-theme="light"] #catalogTracks .track-row,
body[data-theme="light"] #freshUploads .track-row {
  border-color: rgba(24, 35, 50, .14);
  background-color: var(--editorial-surface-solid, #fff);
  color: #182332;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body[data-theme="light"] .home-dj-card { border-left-color: var(--mc-accent); }
body[data-theme="light"] .home-dj-card,
body[data-theme="light"] .catalog-stack-card,
body[data-theme="light"] .ai-chat,
body[data-theme="light"] .ai-side,
body[data-theme="light"] .ai-auto-panel,
body[data-theme="light"] .ai-auto-results,
body[data-theme="light"] .library-tile,
body[data-theme="light"] .playlist-card,
body[data-theme="light"] .recommend-card {
  box-shadow: 0 4px 16px rgba(27, 44, 64, .06);
}
body[data-theme="light"] .top-search-field,
body[data-theme="light"] .search-large,
body[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body[data-theme="light"] textarea,
body[data-theme="light"] select,
body[data-theme="light"] .filter-chip,
body[data-theme="light"] .secondary-btn,
body[data-theme="light"] .stage-icon-btn:not(.main-play),
body[data-theme="light"] .mobile-title-like {
  border-color: rgba(24, 35, 50, .2);
  background-color: #fff;
  color: #182332;
}
body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder {
  color: #617185;
  opacity: 1;
}
body[data-theme="light"] .primary-btn {
  color: #101923;
  font-weight: 700;
}
body[data-theme="light"] .secondary-btn:hover,
body[data-theme="light"] .filter-chip:hover,
body[data-theme="light"] .stage-icon-btn:not(.main-play):hover,
body[data-theme="light"] .mobile-title-like:hover {
  border-color: rgba(24, 35, 50, .28);
  background-color: #edf2f7;
  color: #182332;
}
body[data-theme="light"] .track-list .track-row:hover,
body[data-theme="light"] #catalogTracks .track-row:hover,
body[data-theme="light"] #freshUploads .track-row:hover,
body[data-theme="light"] .mix-card:hover,
body[data-theme="light"] .album-card:hover,
body[data-theme="light"] .artist-card:hover {
  background-color: #f1f5f9;
}
body[data-theme="light"] .home-dj-meta,
body[data-theme="light"] .home-dashboard-welcome p,
body[data-theme="light"] .page-heading p,
body[data-theme="light"] .track-primary span,
body[data-theme="light"] .track-album,
body[data-theme="light"] .track-duration,
body[data-theme="light"] .artist-card span,
body[data-theme="light"] .settings-description,
body[data-theme="light"] .settings-note,
body[data-theme="light"] .settings-row-copy span,
body[data-theme="light"] .player-tab-mini span,
body[data-theme="light"] .empty-state {
  color: #526274;
}
body[data-theme="light"] .home-intro.home-dashboard .home-dj-meta,
body[data-theme="light"] .home-intro.home-dashboard .home-dashboard-welcome p {
  color: #526274;
}
body[data-theme="light"] .player-main,
body[data-theme="light"] .player-main .player-context,
body[data-theme="light"] .player-main .player-track-info,
body[data-theme="light"] .player-main .player-track-info h1,
body[data-theme="light"] .player-main .player-track-info p,
body[data-theme="light"] .player-main .player-track-info p span:first-child {
  color: #182332;
}
body[data-theme="light"][data-view="player"] #view-player.player-screen.active {
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}
body[data-theme="light"][data-view="player"] .player-main {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body[data-theme="light"] .artwork-viewer {
  background: rgba(247, 249, 252, .98);
  color: #182332;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
body[data-theme="light"] .artwork-viewer-close {
  border-color: rgba(24, 35, 50, .2);
  background: #fff;
  color: #182332;
}
body[data-theme="light"] .artwork-viewer-meta strong { color: #182332; }
body[data-theme="light"] .artwork-viewer-meta span,
body[data-theme="light"] .artwork-viewer p { color: #526274; }
body[data-theme="light"] .player-aside,
body[data-theme="light"] .player-main {
  background-color: var(--editorial-surface-solid, #fff) !important;
}
body[data-theme="light"] .player-aside {
  border: 0;
  border-left: 1px solid rgba(24, 35, 50, .14);
  box-shadow: none;
}
body[data-theme="light"] .player-bar .now-meta > strong,
body[data-theme="light"] .player-bar #nowTitle {
  color: #182332 !important;
}
body[data-theme="light"] .player-bar .now-meta > span,
body[data-theme="light"] .player-bar #nowArtist {
  color: #526274 !important;
}
body[data-theme="light"] .toast {
  border-color: rgba(24, 35, 50, .16);
  background: var(--editorial-surface-solid, #fff) !important;
  color: #182332 !important;
  box-shadow: 0 10px 28px rgba(27, 44, 64, .18);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body[data-theme="light"] .catalog-status {
  border: 1px solid rgba(24, 35, 50, .14);
  border-radius: 12px;
  background: var(--editorial-surface-solid, #fff) !important;
  color: #334459 !important;
}
body[data-theme="light"] .catalog-status button {
  border-color: rgba(24, 35, 50, .2);
  background: #f1f5f9;
  color: #182332;
}
body[data-theme="light"] .catalog-loading {
  background: #f3f6fa;
}
body[data-theme="light"] .loading-hero {
  border-color: rgba(24, 35, 50, .14);
  background: var(--editorial-surface-solid, #fff);
}
body[data-theme="light"] .loading-line,
body[data-theme="light"] .loading-actions i,
body[data-theme="light"] .loading-hero-art,
body[data-theme="light"] .loading-section-head i,
body[data-theme="light"] .loading-cards i,
body[data-theme="light"] .loading-rows i {
  background: linear-gradient(105deg, #e1e7ef 25%, #f2f5f9 43%, #e1e7ef 62%);
  background-size: 240% 100%;
}
body[data-theme="light"] .sleep-timer-backdrop {
  background: rgba(24, 35, 50, .22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body[data-theme="light"] .sleep-timer-dialog {
  border-color: rgba(24, 35, 50, .16);
  background:
    radial-gradient(ellipse at 50% -18%, color-mix(in srgb, var(--mc-accent) 12%, transparent), transparent 62%),
    linear-gradient(155deg, #fff, #f3f6fa 78%) !important;
  color: #182332;
  box-shadow: 0 24px 70px rgba(27, 44, 64, .2);
}
body[data-theme="light"] .sleep-timer-dialog h2,
body[data-theme="light"] .sleep-timer-dialog .sleep-timer-status {
  color: #182332;
}
body[data-theme="light"] .settings-live-preview {
  background-color: transparent !important;
  color: var(--appearance-preview-text, #182332);
}
body[data-theme="light"] .settings-preview-stage {
  background-color: var(--appearance-preview-surface, #fff) !important;
}
body[data-theme="light"] .settings-preview-track {
  background-color: var(--appearance-preview-raised, #f7f9fc) !important;
}

body.a11y-high-contrast :is(a, button, input, select, textarea, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px double currentColor !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--app-theme-bg, #fff);
}
body.a11y-high-contrast :is(.settings-row, .settings-inline-control, .track-row, .artist-card, .album-card, .playlist-card, .settings-window, .modal, .drawer) {
  border-color: color-mix(in srgb, var(--editorial-text, var(--mc-text)) 42%, transparent) !important;
}
body.a11y-high-contrast :is(.settings-description, .settings-note, .settings-row-copy span, .track-primary span, .track-album, .track-duration, .detail-meta, .empty-state) {
  color: var(--editorial-text, var(--mc-text)) !important;
}
body.a11y-reduced-transparency {
  --glass-blur: 0px !important;
}
body.a11y-reduced-transparency :is(.sidebar, .topbar, .player-bar, .mobile-nav, .player-tabs, .player-tab-mini, .settings-window, .settings-header, .settings-rail, .player-aside, .drawer, .modal, .sleep-timer-dialog, .settings-live-preview, .settings-preview-stage, .settings-preview-track) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.a11y-reduced-transparency :is(.sidebar, .topbar, .player-bar, .mobile-nav, .player-tabs, .player-tab-mini, .settings-window, .settings-header, .settings-rail, .player-aside, .drawer, .modal, .sleep-timer-dialog) {
  background-color: var(--editorial-surface-opaque, var(--mc-panel)) !important;
}
body.a11y-reduced-transparency .settings-live-preview {
  background-color: var(--appearance-preview-surface, var(--editorial-surface-opaque)) !important;
}
body.a11y-reduced-transparency .settings-preview-stage {
  background-color: var(--editorial-raised-opaque, var(--mc-panel-raised)) !important;
}
body.a11y-reduced-transparency .settings-preview-track {
  background-color: var(--editorial-surface-opaque, var(--mc-panel)) !important;
}
body.a11y-underline-links a:not(.brand-mark) {
  text-decoration: underline;
  text-underline-offset: .16em;
}
body.a11y-high-contrast .settings-preview-details { color: var(--appearance-preview-text, var(--mc-text)); }
body[data-theme="light"] .sleep-timer-dialog .sleep-timer-status { color: #526274; }
body[data-theme="light"] .sleep-timer-close {
  border-color: rgba(24, 35, 50, .16);
  background: #f1f5f9;
  color: #526274;
}
body[data-theme="light"] .sleep-timer-close:hover {
  background: #e7edf4;
  color: #182332;
}
body[data-theme="light"] .sleep-timer-orbit {
  background: conic-gradient(from -90deg, var(--mc-accent) 0deg var(--sleep-progress), rgba(24, 35, 50, .12) var(--sleep-progress) 360deg);
}
body[data-theme="light"] .sleep-timer-orbit > div { background: #fff; }
body[data-theme="light"] .sleep-timer-orbit > span { color: #182332; }
body[data-theme="light"] .sleep-timer-options button {
  border-color: rgba(24, 35, 50, .16);
  background: #fff;
  color: #334459;
}
body[data-theme="light"] .sleep-timer-options button:hover {
  border-color: color-mix(in srgb, var(--mc-accent) 65%, #182332);
  background: #f1f5f9;
  color: #182332;
}
body[data-theme="light"] .sleep-timer-options button.selected {
  border-color: var(--mc-accent);
  background: color-mix(in srgb, var(--mc-accent) 12%, #fff);
  color: #182332;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mc-accent) 30%, transparent);
}
body[data-theme="light"] .sleep-timer-cancel { color: #526274; }
body[data-theme="light"] .sleep-timer-cancel:hover {
  background: #edf2f7;
  color: #182332;
}
body[data-theme="light"] .player-bar,
body[data-theme="light"] .mobile-nav {
  background-color: var(--editorial-surface-solid, #fff) !important;
  box-shadow: 0 8px 24px rgba(27, 44, 64, .12);
}
body[data-theme="light"] :is(button, a, input, textarea, select):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--mc-accent) 72%, #182332);
  outline-offset: 2px;
}
body[data-theme="light"] :is(button, input, textarea, select):disabled {
  color: #526274;
  opacity: .68;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; }
}

.library-heading-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.ai-icon-frame {
  display: contents;
}
.ai-icon-frame::before,
.ai-icon-frame::after {
  display: none;
}
.ai-icon-frame svg { width: 18px; height: 18px; }

.mobile-nav button::after {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.mobile-nav button.active::after { background: transparent !important; }
.mobile-nav #mobileSearch svg { width: 18px; height: 18px; }
.mobile-search-form { display: none; }
.mobile-search-field {
  display: flex;
  min-width: 0;
  min-height: 48px;
  flex: 1;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--editorial-line);
  border-radius: var(--editorial-radius);
  background: var(--editorial-surface);
  color: var(--mc-muted);
}
.mobile-search-field svg { width: 19px; height: 19px; flex: 0 0 19px; }
.mobile-search-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--mc-text);
  font: inherit;
}
.mobile-search-form > .primary-btn { min-height: 48px; }
.mobile-search-history { display: none; }
.search-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 9px;
  color: var(--mc-muted);
  font-size: 10px;
}
.search-history-heading strong { font-weight: 650; }
.search-history-clear {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--mc-accent);
  font-size: inherit;
}
.search-history-list { display: grid; gap: 2px; }
.search-history-row { display: flex; align-items: center; gap: 4px; }
.search-history-query,
.search-history-remove {
  display: flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--mc-text);
}
.search-history-query { flex: 1; gap: 10px; padding: 0 10px; text-align: left; }
.search-history-query svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--mc-muted); }
.search-history-query span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-history-remove { width: 36px; flex: 0 0 36px; justify-content: center; color: var(--mc-muted); }
.search-history-row :is(.search-history-query,.search-history-remove):hover { background: color-mix(in srgb, var(--mc-accent) 10%, transparent); }
.search-history-remove svg { width: 18px; height: 18px; }
.global-search-pop .search-history-heading { padding-top: 6px; }
.mobile-search-history[hidden] { display: none !important; }

@media (max-width: 1020px) {
  body .workspace > .topbar { display: none !important; }
  .mobile-search-form { display: flex; gap: 10px; margin: 0 0 22px; }
  .mobile-search-history:not([hidden]) { display: block; margin: -10px 0 20px; }
  .mobile-nav button {
    border: 0 !important;
    box-shadow: none !important;
  }
  .mobile-nav button.active { box-shadow: none !important; }
  .mobile-nav button:focus-visible {
    outline: 2px solid var(--mc-accent);
    outline-offset: -2px;
  }
  .library-heading-tools {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .library-heading-actions > button { flex: 1 1 155px; justify-content: center; }
  .mobile-nav button .ai-icon-frame svg { width: 18px; height: 18px; }
  .mobile-nav button svg { width: 18px; height: 18px; flex: 0 0 18px; }
  .mobile-search-field svg { flex: 0 0 19px; color: var(--mc-muted); }
}
@media (max-width: 520px) {
  .library-heading-actions { width: 100%; }
  .library-heading-actions > button { min-width: 0; flex-basis: 0; padding-inline: 8px; font-size: 11px; }
}

/* Page-wide scrolling: the scroll container spans the full workspace so the scrollbar sits at the window edge on large screens. */
body:not([data-view="player"]) .content {
  max-width: none;
  padding-inline: max(clamp(22px, 4vw, 58px), calc((100% - 1660px) / 2));
}
@media (max-width: 760px) {
  body:not([data-view="player"]) .content { padding-inline: 14px; }
}

/* Settings open full screen on tablet and phone. */
@media (max-width: 1050px) {
  .settings-backdrop { align-items: stretch; padding: 0; }
  .settings-window {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
}
@media (min-width: 761px) and (max-width: 1050px) {
  .settings-window { grid-template-columns: 220px minmax(0, 1fr); }
}

.library-utility-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
@media (min-width: 1021px) {
  .library-utility-actions { display: none; }
}
@media (max-width: 1020px) {
  .library-utility-actions #topAccount,
  .library-utility-actions #topNotifications,
  .library-utility-actions #topAdmin:not([hidden]),
  .library-utility-actions #topSettings { display: grid !important; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; }
}
#topAdmin[hidden] { display: none !important; }
#topAdmin { place-items: center; }

/* Whole-page scrolling for every view except the full-screen player. */
html:has(body:not([data-view="player"])) { height: auto; min-height: 100%; }
body:not([data-view="player"]) {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}
body:not([data-view="player"]) .app-root {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}
body:not([data-view="player"]) .workspace {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}
body:not([data-view="player"]) .content {
  flex: 1 0 auto;
  height: auto;
  overflow: visible;
}
body:not([data-view="player"]) .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
}
