:root {
  color-scheme: dark;
  font:
    400 14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #f4f4f7;
  background: #101116;
  --muted: #a4a5b5;
  --accent: #c4bbff;
  --line: #ffffff12;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-width: 320px;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 50% 0 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 115%, #656dc84a, transparent 68%);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
}
button,
a {
  transition:
    background-color 150ms var(--ease),
    color 150ms var(--ease),
    border-color 150ms var(--ease),
    transform 150ms var(--ease);
}
button:active:not(:disabled),
a:active {
  transform: scale(0.97);
}
button:disabled {
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
input,
select {
  color: inherit;
}
input {
  min-width: 0;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
svg {
  display: block;
  flex: 0 0 auto;
}
button svg,
a svg {
  width: 20px;
  height: 20px;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  z-index: 20;
  padding: 12px 16px;
  background: var(--accent);
  color: #16141e;
  border-radius: 12px;
}
.skip-link:focus {
  transform: none;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 80px;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #101116e8;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.4px;
}
.brand svg {
  width: 30px;
  height: 30px;
  color: #d7d4ed;
}
.header-actions {
  display: flex;
  gap: 10px;
}
.icon-button,
.header-control {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #cecedd;
}
.header-control {
  border: 1px solid #b8badc38;
  background: #25273555;
}
.secondary-nav {
  position: fixed;
  inset: 74px 24px auto auto;
  margin: 0;
  padding: 8px;
  width: 256px;
  color: #f4f4f7;
  border: 1px solid #c8c4f336;
  border-radius: 20px;
  background: #262733f7;
  box-shadow: 0 16px 60px #0008;
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
}
.secondary-nav:popover-open {
  display: grid;
  gap: 3px;
}
.nav-item {
  min-height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  color: #c5c5d3;
}
.nav-item svg {
  width: 20px;
  height: 20px;
}
.nav-item.selected {
  background: #c4bbff1c;
  color: #e0dbff;
}
.dock-add {
  margin-top: 5px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
}
.logout {
  color: #b2b2c0;
}
.pending-count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 50%;
  background: #c4bbff22;
  color: #ded8ff;
  font-size: 11px;
  font-weight: 650;
}
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 32px 180px;
}
.library-heading {
  margin: 0 0 26px;
}
h1 {
  font-size: 48px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -1.7px;
  margin: 0 0 8px;
}
#library-caption {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
}
.toolbar,
.explore-form {
  margin: 0;
}
.search {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px 0 20px;
  border: 1px solid #b7b4d243;
  border-radius: 18px;
  background: linear-gradient(110deg, #252733cc, #22232c99);
  transition:
    border-color 150ms var(--ease),
    box-shadow 150ms var(--ease);
}
.search:focus-within {
  border-color: #b9b1f09e;
  box-shadow: 0 0 0 3px #b7aaff0b;
}
.search > span {
  color: #c6c3df;
}
.search svg {
  width: 22px;
  height: 22px;
}
.search input {
  flex: 1;
  width: 100%;
  min-height: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 16px;
  color: #f2f1f8;
}
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration {
  -webkit-appearance: none;
}
.search input::placeholder {
  color: #9393a6;
  opacity: 1;
}
.search-clear {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 50%;
  background: #b8b4dc33;
  color: #f4f1ff;
}
.search-clear svg {
  width: 18px;
  height: 18px;
}
.library-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.library-tools label {
  display: flex;
  align-items: center;
  gap: 9px;
}
select {
  font-size: 12px;
  border: 0;
  border-radius: 8px;
  background: #1e2029;
  padding: 8px 24px 8px 10px;
}
.text-button {
  color: var(--accent);
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
}
.results-caption {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 45px;
  font-size: 13px;
  color: #b5b3cf;
  padding-left: 2px;
}
.search-kinds {
  display: flex;
  gap: 6px;
  margin: 14px 0 4px;
}
.search-kinds button {
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 9px 17px;
  color: var(--muted);
  font-size: 13px;
}
.search-kinds button[aria-pressed="true"] {
  color: #ece8ff;
  background: #b8aefa1c;
  border-color: #b8aefa40;
}
.entity-card {
  display: flex;
  width: 100%;
  gap: 18px;
  align-items: center;
  padding: 16px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
}
.entity-art {
  width: 64px;
  height: 64px;
}
.entity-artist .entity-art,
.catalogue-cover.is-artist {
  border-radius: 50%;
}
.entity-text {
  min-width: 0;
  flex: 1;
}
.entity-text strong,
.entity-text > span {
  display: block;
  overflow-wrap: anywhere;
}
.entity-text strong {
  font-size: 15px;
}
.entity-text > span {
  margin-top: 5px;
  font-size: 12px;
}
.entity-arrow {
  color: var(--accent);
  font-size: 22px;
}
.catalogue-header {
  margin: 18px 0 4px;
}
.catalogue-header > .text-button {
  margin-bottom: 16px;
}
#catalogue-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}
#catalogue-heading h2 {
  margin: 0;
  font-size: 18px;
}
#catalogue-heading p {
  font-size: 13px;
  line-height: 1.6;
  margin: 6px 0 0;
}
.catalogue-cover {
  width: 80px;
  height: 80px;
}
.catalogue-albums {
  margin-top: 36px;
}
.catalogue-albums-title {
  font-size: 20px;
  margin-bottom: 8px;
}
.track-text .album-link {
  display: block;
  color: var(--muted);
  font-size: 12px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}
.discovery-state {
  display: block;
  margin-top: 5px;
  color: #afabc1;
  font-size: 11px;
}
.discovery-state.ready {
  color: #b9decb;
}
.discovery-state.pending {
  color: #d4c5ff;
}
.discovery-state.unavailable {
  color: #d7b5bb;
}
@media (max-width: 600px) {
  .entity-card {
    gap: 14px;
    padding: 14px 0;
  }
  .entity-art {
    width: 54px;
    height: 54px;
  }
  .catalogue-cover {
    width: 64px;
    height: 64px;
  }
  #catalogue-heading h2 {
    font-size: 16px;
  }
}
.track-list,
#explore-results {
  width: 100%;
}
.table-heading {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 150px 52px 100px 44px;
  gap: 14px;
  padding: 8px 12px 12px;
  font-size: 11px;
  color: #8f90a3;
  border-bottom: 1px solid var(--line);
}
.track-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 150px 52px 100px 44px;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid transparent;
  border-bottom-color: var(--line);
  border-radius: 0;
}
.track-row .row-play {
  width: 36px;
  height: 44px;
}
.track-row.is-current {
  border-color: #b9b1ef30;
  background: #b0a3fb0c;
  border-radius: 16px;
}
.track-row.is-current .track-title,
.track-row.is-current .row-play {
  color: #d5ceff;
}
.track-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.note-tile {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: #272936;
  color: #c2bddb;
  border: 1px solid #ffffff12;
  border-radius: 9px;
}
.note-tile > svg {
  width: 24px;
  height: 24px;
}
.note-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.note-tile.has-artwork > svg {
  visibility: hidden;
}
.track-art,
.discovery-art {
  width: 56px;
  height: 56px;
}
.track-text {
  min-width: 0;
  flex: 1;
}
.track-title,
.discovery-title {
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  text-align: left;
}
.track-subtitle,
.discovery-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-subtitle .artist-link {
  display: inline;
}
.artist,
.discovery-meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}
.artist-link {
  display: inline;
  color: inherit;
  padding: 0;
  text-align: left;
  line-height: inherit;
  font-size: inherit;
  border-radius: 2px;
}
.artist-link:not(:disabled) {
  text-decoration: underline;
  text-decoration-color: #c4bbff45;
  text-underline-offset: 3px;
}
.track-subtitle .artist-link {
  text-decoration: none;
}
.track-duration {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #9e9fb0;
}
.status.pending {
  color: #c8bfff;
}
.status.failed {
  color: #efacac;
}
.import-error {
  padding: 8px 16px 16px 64px;
  color: #e8b3b3;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.import-error summary {
  cursor: pointer;
  min-height: 28px;
}
.import-error p {
  margin: 6px 0 0;
  color: #b6a6b0;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.discovery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 88px;
  padding: 12px 4px;
  border: 1px solid transparent;
  border-bottom-color: var(--line);
}
.discovery-row .track-main {
  flex: 1;
}
.discovery-title {
  font-size: 16px;
}
.discovery-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
}
.discovery-actions .icon-button {
  border: 1px solid #a7a5c19e;
  color: #e1def3;
}
.discovery-actions .is-saved {
  color: #c4bbff;
  border-color: #c4bbff28;
  opacity: 0.65;
}
.spinner {
  display: inline-block;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.6px solid #c4bbff30;
  border-top-color: #d7ceff;
  animation: spin 800ms linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.search-loading > div {
  height: 88px;
  margin-bottom: 1px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(#272936, #272936) 4px 16px / 56px 56px no-repeat,
    linear-gradient(#252631, #252631) 78px 24px / 32% 12px no-repeat,
    linear-gradient(#20212b, #20212b) 78px 47px / 24% 10px no-repeat;
  opacity: 0.7;
}
.empty-state {
  min-height: 290px;
  padding: 62px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: #bbb3f10c;
  color: #b0abc8;
}
.empty-icon svg {
  width: 27px;
  height: 27px;
}
.empty-state h2 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.4px;
  font-weight: 600;
}
.empty-state p {
  margin: 0 0 24px;
  max-width: 390px;
  color: var(--muted);
  font-size: 14px;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  background: #c4bbff;
  color: #201b35;
  border: 1px solid transparent;
  border-radius: 12px;
}
.primary:disabled {
  opacity: 0.6;
}
.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #cba7d212;
  border: 1px solid #efb2b51e;
  color: #edc2cf;
  font-size: 13px;
}
.listening-dock {
  position: fixed;
  z-index: 6;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(1080px, calc(100% - 48px));
  border-radius: 28px;
  border: 1px solid #c3baff65;
  background: linear-gradient(125deg, #44475a8c, #252631b8 55%, #383e6577);
  box-shadow:
    inset 0 1px 1px #eeeaff27,
    0 16px 60px #0005;
  backdrop-filter: blur(36px) saturate(145%);
  -webkit-backdrop-filter: blur(36px) saturate(145%);
}
.player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 1.2fr) minmax(
      120px,
      0.8fr
    );
  gap: 24px;
  align-items: center;
  min-height: 108px;
  padding: 16px 24px;
}
.now-playing {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.player-art {
  width: 60px;
  height: 60px;
  border-radius: 9px;
}
.now-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
#playing-title {
  width: 100%;
  display: block;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
#playing-artist {
  max-width: 100%;
  font-size: 12px;
  color: #b8b6cc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playing-mode {
  display: block;
  max-width: 100%;
  color: #c0b6e4;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.play-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid #e0d7ff9e;
  border-radius: 50%;
  background: #c4bbff18;
  color: #e6dfff;
}
.play-main svg {
  width: 22px;
  height: 22px;
}
.play-main:disabled {
  opacity: 0.35;
}
.transport .icon-button:disabled {
  opacity: 0.25;
}
.timeline {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
}
.timeline span {
  font-size: 10px;
  color: #c3bed9;
  font-variant-numeric: tabular-nums;
  min-width: 27px;
}
.timeline span:last-child {
  text-align: right;
}
input[type="range"] {
  --progress: 0%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 8px;
  margin: 10px 0;
  padding: 0;
  background: linear-gradient(
    to right,
    #b2a0fa var(--progress),
    #c8bfed24 var(--progress)
  );
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d7caff;
  box-shadow: 0 1px 4px #0002;
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0;
  background: #d7caff;
}
input[type="range"]:disabled {
  cursor: default;
  opacity: 0.35;
}
#seek {
  flex: 1;
  width: 100%;
}
.player-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}
.volume {
  display: flex;
  align-items: center;
  gap: 10px;
}
.volume svg {
  width: 18px;
  height: 18px;
  color: #c9c5e0;
}
#volume {
  width: 76px;
}

a.disabled {
  pointer-events: none;
  opacity: 0.25;
}
dialog {
  padding: 0;
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  border: 1px solid #b3aadb40;
  border-radius: 28px;
  background: #23242ff5;
  color: #f4f4f7;
  box-shadow: 0 28px 100px #0008;
}
dialog::backdrop {
  background: #05060bb0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.similar-tracks {
  padding-left: 24px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.similar-tracks li { margin-block: 8px; }
.dialog-content {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 36px;
}
.dialog-content h2 {
  margin: 8px 28px 12px 0;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.8px;
  line-height: 1.2;
}
.dialog-content p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}
.dialog-content label {
  margin-bottom: 8px;
  font-size: 12px;
  color: #c9c6d6;
}
.dialog-content input {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid #aaa5c63b;
  border-radius: 12px;
  background: #171820;
  font-size: 16px;
}
.dialog-content .primary {
  margin-top: 24px;
}
.dialog-content .form-error {
  margin: 12px 0 0;
  color: #f0b6bf;
  font-size: 13px;
}
.close-dialog {
  position: absolute;
  right: 14px;
  top: 14px;
}
.dialog-brand {
  margin-bottom: 16px;
  color: #c4bbff;
}
.dialog-brand svg {
  width: 36px;
  height: 36px;
}
.toast {
  position: fixed;
  z-index: 15;
  left: 50%;
  bottom: calc(150px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 14px 20px;
  border: 1px solid #c1b9eb38;
  border-radius: 16px;
  background: #30313ff5;
  box-shadow: 0 8px 30px #0005;
  font-size: 13px;
  color: #eeebfc;
}
@media (hover: hover) and (pointer: fine) {
  .icon-button:hover:not(:disabled),
  .nav-item:hover:not(.selected, :disabled),
  .text-button:hover {
    background: #c4bbff16;
  }
  .primary:hover:not(:disabled) {
    background: #d3ccff;
  }
  .track-row:hover,
  .discovery-row:hover {
    background: #aaa1ce0a;
    border-radius: 14px;
  }
  .artist-link:hover {
    color: #ddd4ff;
    text-decoration-color: currentColor;
  }
  .search-clear:hover {
    background: #b8b4dc55;
  }
}
@media (max-width: 1000px) {
  .table-heading,
  .track-row {
    grid-template-columns: 32px minmax(0, 1fr) 46px 94px 40px;
    gap: 10px;
  }
  .table-heading > span:nth-child(3),
  .track-row > .artist {
    display: none;
  }
  .player {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 1.1fr) 48px;
    gap: 16px;
  }
  .volume {
    display: none;
  }
  .player-tools {
    gap: 0;
  }
  .player-art {
    width: 48px;
    height: 48px;
  }
}
@media (max-width: 640px) {
  .app-header {
    height: 72px;
    padding: 12px 20px;
  }
  .brand {
    font-size: 16px;
    gap: 9px;
  }
  .brand svg {
    width: 26px;
    height: 26px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-control {
    width: 42px;
    height: 42px;
  }
  .secondary-nav {
    top: 66px;
    right: 16px;
    width: min(280px, calc(100% - 32px));
  }
  main {
    padding: 28px 20px 180px;
  }
  h1 {
    font-size: 32px;
    letter-spacing: -1px;
    margin-bottom: 8px;
  }
  #library-caption {
    font-size: 14px;
  }
  .library-heading {
    margin-bottom: 24px;
  }
  .search {
    gap: 10px;
    padding-left: 14px;
    border-radius: 16px;
  }
  .search input {
    font-size: 16px;
  }
  .library-tools {
    padding-top: 16px;
    font-size: 11px;
    gap: 6px;
  }
  .library-tools label {
    gap: 6px;
  }
  .library-tools select {
    font-size: 11px;
    padding-right: 16px;
  }
  .text-button {
    font-size: 11px;
  }
  .table-heading {
    display: none !important;
  }
  .track-row {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 36px 36px;
    min-height: 84px;
    gap: 5px;
    padding: 12px 0;
  }
  .track-row .row-play {
    grid-column: 2;
    grid-row: 1;
    width: 36px;
  }
  .track-row .track-main {
    grid-column: 1;
    grid-row: 1;
    gap: 12px;
  }
  .track-row .track-duration,
  .track-row .status {
    display: none;
  }
  .track-row > .icon-button:last-child {
    grid-column: 3;
    grid-row: 1;
    width: 36px;
  }
  .track-art,
  .discovery-art {
    width: 48px;
    height: 48px;
    border-radius: 8px;
  }
  .track-title,
  .discovery-title {
    font-size: 14px;
  }
  .track-subtitle,
  .discovery-meta {
    font-size: 11px;
  }
  .discovery-row {
    min-height: 88px;
    gap: 8px;
    padding: 12px 0;
  }
  .discovery-row .track-main {
    gap: 12px;
  }
  .discovery-actions {
    gap: 4px;
  }
  .discovery-actions .icon-button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
  }
  .discovery-actions svg {
    width: 20px;
    height: 20px;
  }
  .results-caption {
    font-size: 12px;
  }
  .import-error {
    padding: 8px 4px 16px 60px;
  }
  .empty-state {
    padding: 44px 8px 32px;
  }
  .empty-state h2 {
    font-size: 18px;
  }
  .empty-state p {
    font-size: 13px;
  }
  .listening-dock {
    width: calc(100% - 24px);
    bottom: calc(12px + env(safe-area-inset-bottom));
    border-radius: 24px;
  }
  .player {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 52px 24px;
    gap: 6px 12px;
    min-height: 110px;
    padding: 12px 16px;
  }
  .now-playing {
    gap: 12px;
  }
  .player-art {
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }
  #playing-title {
    font-size: 12px;
  }
  #playing-artist {
    font-size: 11px;
  }
  .playing-mode {
    font-size: 9px;
  }
  .playback {
    display: contents;
  }
  .transport {
    grid-column: 2;
    grid-row: 1;
    gap: 2px;
  }
  #previous {
    display: none;
  }
  .transport .icon-button {
    width: 32px;
    height: 44px;
  }
  .play-main {
    width: 42px;
    height: 42px;
  }
  .timeline {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 10px;
  }
  .timeline span {
    font-size: 10px;
  }
  .player-tools {
    display: none;
  }
  .toast {
    bottom: calc(138px + env(safe-area-inset-bottom));
    font-size: 12px;
    padding: 12px 16px;
  }
  dialog {
    border-radius: 26px 26px 0 0;
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 40px);
    margin: auto 0 0;
    border-bottom: 0;
  }
  .dialog-content {
    padding: 30px 24px calc(28px + env(safe-area-inset-bottom));
  }
  .dialog-content h2 {
    font-size: 24px;
  }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .listening-dock,
  .secondary-nav,
  .app-header,
  dialog {
    background: #242631;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .listening-dock,
  .secondary-nav {
    border-color: #aaa4c9;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  button:active:not(:disabled),
  a:active {
    transform: none;
  }
}
/* The artwork anchors one larger playback surface; navigation stays in the header. */
.listening-dock {
  overflow: hidden;
}
.player {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1.3fr) 118px;
  min-height: 136px;
  padding: 20px 28px 20px 160px;
  gap: 28px;
}
.player-art {
  position: absolute;
  inset: 0 auto 0 0;
  width: 136px;
  height: 100%;
  border: 0;
  border-radius: 0;
}
.now-playing {
  gap: 0;
}
#playing-title {
  font-size: 16px;
}
#playing-artist {
  font-size: 13px;
}
.playing-mode {
  font-size: 10px;
}
.transport {
  gap: 20px;
}
.transport .icon-button {
  width: 48px;
  height: 48px;
}
.transport .icon-button svg {
  width: 22px;
  height: 22px;
}
.play-main {
  width: 60px;
  height: 60px;
}
.play-main svg {
  width: 26px;
  height: 26px;
}
.timeline {
  position: relative;
  height: 28px;
}
#seek {
  height: 28px;
  margin: 0;
  border-radius: 0;
  background: transparent !important;
}
#seek::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 6px;
  background: linear-gradient(
    to right,
    #b8a5fa var(--progress),
    #c8bfed24 var(--progress)
  );
  transition: height 150ms var(--ease);
}
#seek::-moz-range-track {
  height: 2px;
  border-radius: 6px;
  background: linear-gradient(
    to right,
    #b8a5fa var(--progress),
    #c8bfed24 var(--progress)
  );
}
#seek::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -5px;
  opacity: 0;
  transition:
    opacity 150ms var(--ease),
    margin-top 150ms var(--ease);
}
#seek::-moz-range-thumb {
  opacity: 0;
}
#seek:focus-visible::-webkit-slider-runnable-track,
#seek:active::-webkit-slider-runnable-track {
  height: 6px;
}
#seek:focus-visible::-webkit-slider-thumb,
#seek:active::-webkit-slider-thumb {
  margin-top: -3px;
  opacity: 1;
}
#seek:focus-visible::-moz-range-track,
#seek:active::-moz-range-track {
  height: 6px;
}
#seek:focus-visible::-moz-range-thumb,
#seek:active::-moz-range-thumb {
  opacity: 1;
}
.volume {
  display: flex;
}
.player-tools {
  justify-content: end;
}
@media (hover: hover) and (pointer: fine) {
  .timeline:hover #seek::-webkit-slider-runnable-track {
    height: 6px;
  }
  .timeline:hover #seek::-webkit-slider-thumb {
    margin-top: -3px;
    opacity: 1;
  }
  .timeline:hover #seek::-moz-range-track {
    height: 6px;
  }
  .timeline:hover #seek::-moz-range-thumb {
    opacity: 1;
  }
}
@media (max-width: 1000px) and (min-width: 641px) {
  .player {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 1.2fr);
    padding-left: 152px;
  }
  .player-tools {
    display: none;
  }
}
@media (max-width: 640px) {
  main {
    padding-bottom: 208px;
  }
  .player {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 48px 48px 24px;
    gap: 0;
    min-height: 148px;
    padding: 10px 16px 10px 126px;
  }
  .player-art {
    width: 110px;
    height: 100%;
    border-radius: 0;
  }
  .now-playing {
    grid-column: 1;
    grid-row: 1;
  }
  #playing-title {
    font-size: 13px;
  }
  #playing-artist {
    font-size: 11px;
  }
  .playing-mode {
    font-size: 9px;
  }
  .transport {
    grid-column: 1;
    grid-row: 2;
    gap: 10px;
    justify-content: center;
  }
  #previous {
    display: inline-flex;
  }
  .transport .icon-button {
    width: 44px;
    height: 44px;
  }
  .play-main {
    width: 48px;
    height: 48px;
  }
  .play-main svg {
    width: 22px;
    height: 22px;
  }
  .timeline {
    grid-column: 1;
    grid-row: 3;
    height: 24px;
    gap: 8px;
  }
  .timeline span {
    font-size: 9px;
    min-width: 23px;
  }
  #seek {
    height: 24px;
  }
  #seek::-webkit-slider-thumb {
    opacity: 1;
    width: 8px;
    height: 8px;
    margin-top: -3px;
  }
  #seek:active::-webkit-slider-thumb,
  #seek:focus-visible::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    margin-top: -3px;
  }
  .player-tools {
    display: none;
  }
  .toast {
    bottom: calc(176px + env(safe-area-inset-bottom));
  }
}
/* Import recovery belongs beside the failed action, with manual browser verification. */
.import-failure {
  margin: 0 0 12px 64px;
  padding: 16px 20px;
  border: 1px solid #eeb2bc24;
  border-radius: 16px;
  background: #d397b608;
}
.source-badge {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}
.backup-search {
  margin-bottom: 1rem;
}
.backup-notice {
  line-height: 1.6;
}
.backup-candidate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(185, 183, 220, 0.15);
  font-size: 0.85rem;
}
.backup-candidate > span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.backup-candidate button {
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .backup-candidate {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }
}
.import-failure > strong {
  font-size: 13px;
  font-weight: 600;
  color: #edc3cf;
}
.import-failure > p {
  margin: 5px 0 8px;
  max-width: 680px;
  font-size: 12px;
  color: var(--muted);
}
.repair-import {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 0;
  font-size: 12px;
}
.repair-import svg {
  width: 16px;
  height: 16px;
}
.import-failure .import-error {
  padding: 8px 0 0;
  border: 0;
  font-size: 11px;
  color: #a6a0b2;
}
.import-failure .import-error p {
  font-size: 11px;
}
#recovery-dialog {
  width: min(560px, calc(100% - 32px));
}
.recovery-content {
  padding: 30px;
}
.recovery-content #recovery-context {
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.recovery-content .recovery-issue {
  padding: 12px 14px;
  margin-bottom: 22px;
  font-size: 12px;
  color: #d6d0e8;
  border-radius: 12px;
  background: #c4bbff0a;
  border: 1px solid #c4bbff16;
}
.recovery-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.step-number {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  height: 24px;
  border-radius: 50%;
  color: #d7cfff;
  background: #c4bbff18;
  font-size: 11px;
  font-weight: 600;
}
.recovery-step > div {
  min-width: 0;
  flex: 1;
}
.recovery-step h3 {
  margin: 1px 0 6px;
  font-size: 13px;
  font-weight: 600;
}
.recovery-step p {
  margin: 0;
  font-size: 12px;
}
.recovery-step .primary {
  margin-top: 14px;
  min-height: 44px;
  font-size: 12px;
  padding: 10px 14px;
}
.primary.secondary {
  background: #c4bbff12;
  color: #ddd5ff;
  border-color: #c4bbff36;
}
.recovery-source {
  margin-top: 16px;
}
.recovery-source label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
}
.recovery-source > div {
  display: flex;
  align-items: center;
  gap: 6px;
}
.recovery-source input {
  font-size: 12px;
  min-height: 42px;
  padding: 10px;
}
.recovery-content .recovery-progress {
  font-size: 12px;
  color: #c6bddf;
  margin: 2px 0 0;
}
.recovery-content #recovery-refresh {
  margin-top: 16px;
}
.recovery-footer {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
}
.recovery-footer p {
  margin: 0 0 6px;
  font-size: 11px;
  color: #9d9baa;
}
.recovery-footer .text-button {
  font-size: 11px;
  padding: 4px 0;
  min-height: 32px;
}
@media (max-width: 640px) {
  .import-failure {
    margin-left: 0;
    padding: 14px 16px;
  }
  #recovery-dialog {
    width: 100%;
  }
  .recovery-content {
    padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
  }
}

.recovery-step .recovery-browser-note {
  font-size: 11px;
  margin: 8px 0 0;
  color: #a6a2b3;
}
