:root {
  color-scheme: dark;
  --surface: #0b0b0f;
  --side: #100e13;
  --panel: #151218;
  --raised: #211c23;
  --wine: #381e27;
  --rose: #8c4551;
  --accent: #ff957b;
  --accent-hover: #ffb29d;
  --text: #f5e9e9;
  --muted: #aea2ad;
  --dark-ink: #261311;
  --line: #f5e9e916;
  --sidebar: 224px;
  --player: 86px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --fast: 180ms;
  --medium: 360ms;
  --display: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --heading: Manrope, var(--sans);
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--heading); }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; background: none; padding: 0; }
button:disabled { cursor: default; opacity: .38; }
button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.icon .solid { fill: currentColor; stroke: none; }
.skip-link { position: fixed; z-index: 10; left: 14px; top: 12px; background: var(--accent); color: var(--dark-ink); padding: 10px 16px; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.icon-button {
  width: 42px; height: 42px; display: inline-grid; flex: none; place-items: center;
  border-radius: 50%; color: var(--muted);
  transition: color var(--fast), background var(--fast), scale var(--fast) var(--ease);
}
.icon-button:hover:not(:disabled) { background: #ffffff0b; color: var(--text); }
.icon-button:active:not(:disabled), .primary:active:not(:disabled) { scale: .94; }
.icon-button[aria-pressed="true"], .icon-button[aria-pressed="true"]:hover { color: var(--accent); }
.icon-button[aria-pressed="true"] use[href="#i-heart"] { fill: currentColor; }
.primary {
  min-height: 46px; display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  padding: 0 21px; border-radius: 99px; background: var(--accent); color: var(--dark-ink);
  font-weight: 750; white-space: nowrap; transition: background var(--fast), scale var(--fast) var(--ease);
}
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.primary .icon { width: 18px; }
.text-button { color: var(--accent); font-size: 14px; font-weight: 650; padding: 5px 0; border-radius: 3px; text-align: left; }
.text-button:hover:not(:disabled) { text-decoration: underline; }
.artwork { display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, var(--wine), var(--raised)); color: #e5b1b8; }
.artwork > * { grid-area: 1 / 1; }
.artwork .icon { width: 34%; height: 34%; opacity: .65; }
.artwork img { position: relative; }
.kicker {
  color: var(--accent); display: flex; align-items: center; gap: 8px;
  font-size: 10px; line-height: 1.4; font-weight: 750; letter-spacing: .16em; text-transform: uppercase;
}

.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: calc(100dvh - var(--player) - var(--safe-bottom)); z-index: 2;
  display: flex; flex-direction: column; padding: 26px 19px 18px;
  background: linear-gradient(155deg, #171017, var(--side) 42%);
  border-right: 1px solid var(--line);
}
.brand { align-self: flex-start; display: flex; align-items: center; gap: 10px; margin: 1px 0 40px 5px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand span { font: 800 25px/1 var(--heading); letter-spacing: -.065em; }
.primary-nav { display: grid; gap: 4px; }
.primary-nav button, .collection-item, .sidebar-bottom button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 12px;
  border-radius: 9px; text-align: left; color: var(--muted); font-size: 13px; font-weight: 650;
  transition: color var(--fast), background var(--fast);
}
.primary-nav button { position: relative; }
.primary-nav button::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; background: var(--accent);
  border-radius: 4px; scale: 1 0; transition: scale var(--medium) var(--ease);
}
.primary-nav button:hover, .collection-item:hover, .sidebar-bottom button:hover { background: #ffffff08; color: var(--text); }
.primary-nav button[aria-current], .collection-item[aria-current] { color: var(--accent); background: linear-gradient(90deg,#ff957b19,#ff957b06); }
.primary-nav button[aria-current]::before { scale: 1; }
.primary-nav .icon { transition: rotate var(--medium) var(--ease); }
.primary-nav button:hover .icon { rotate: -8deg; }
.collection { margin-top: 26px; padding-top: 15px; border-top: 1px solid var(--line); min-height: 0; overflow: auto; scrollbar-width: thin; }
.collection-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 5px 12px; }
.collection-heading h2 { font: 750 10px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.collection-heading .icon-button { width: 32px; height: 32px; }
.collection-item { gap: 9px; }
.collection-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-symbol { display: grid; place-items: center; overflow: hidden; flex: none; width: 28px; height: 28px; border-radius: 6px; color: #e6b5bd; background: var(--wine); }
.playlist-symbol .icon { width: 15px; height: 15px; }
.favorites { color: var(--accent); background: linear-gradient(145deg, #723a49, #37202d); }
.sidebar-bottom { margin-top: auto; padding-top: 12px; }

.content { width: 100%; max-width: 1660px; min-width: 0; margin: 0 auto; padding: 0 clamp(24px, 3.05vw, 56px) calc(var(--player) + var(--safe-bottom) + 36px); }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.library-account:not([hidden]) { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 24px; }
.library-account p { margin: 0; color: var(--muted); font-size: .875rem; }
.library-account #library-account-toggle { min-height: 44px; }
.path { display: flex; align-items: center; gap: 9px; font: 750 14px/1 var(--heading); }
.path .icon { width: 17px; height: 17px; color: var(--accent); }
.search-field {
  display: flex; align-items: center; gap: 10px; width: min(340px, 70%);
  min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--muted); transition: border var(--fast), box-shadow var(--fast), width var(--medium) var(--ease);
}
.search-field.wide { margin-left: auto; width: min(480px, 100%); }
.search-field:focus-within { border-color: #ff957b82; box-shadow: 0 0 0 3px #ff957b13; }
.search-field .icon { width: 17px; height: 17px; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: none; background: none; color: var(--text); font-size: 14px; }
input::placeholder { color: var(--muted); }
kbd { font: 11px monospace; padding: 2px 5px; border: 1px solid #ffffff23; border-radius: 4px; }

.feature {
  position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
  align-items: center; min-height: clamp(327px, 29.4vw, 440px);
  padding: 32px clamp(27px, 4.35vw, 74px); border-radius: 20px; border: 1px solid #ffbfbe29;
  background: radial-gradient(ellipse at 78% 46%, #6e3748, var(--wine) 37%, #1b1119 80%);
}
.feature-bg, .feature-grid, .feature::after { position: absolute; pointer-events: none; }
.feature-bg { z-index: -3; inset: -13%; opacity: .39; translate: var(--parallax-x, 0) var(--parallax-y, 0); }
.feature-bg img { filter: blur(62px) saturate(.68); object-position: 80% 48%; animation: fade-in var(--medium) both; }
.feature::after {
  content: ""; z-index: -2; inset: 0;
  background: linear-gradient(90deg,#190f17f2 3%,#20121dda 32%,#37192355 70%,#1d101753),
    radial-gradient(ellipse at 85% 44%,#cf81912b,transparent 58%);
}
.feature-grid {
  z-index: -1; width: 61%; inset: 0 0 0 auto; opacity: .17;
  background: repeating-radial-gradient(circle at 72% 50%, transparent 0 46px,#f9cad648 47px,transparent 48px 67px);
  mask-image: linear-gradient(90deg,transparent,#000 42%,#000 83%,transparent);
}
.feature-copy { position: relative; z-index: 1; }
.feature .kicker span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px #ff957b80; }
.feature h1 {
  margin: 13px 0 13px; font: 400 clamp(52px, 6.4vw, 112px)/.88 var(--display);
  letter-spacing: -.027em; overflow-wrap: anywhere; text-wrap: balance; text-shadow: 0 4px 26px #130b13a8;
}
.feature h1.long-title { font-size: clamp(43px, 4.4vw, 72px); line-height: .92; }
.feature-artist { color: #e6cbd1; font-size: clamp(13px, 1.12vw, 17px); line-height: 1.45; }
.feature-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.feature-like { width: 46px; height: 46px; border: 1px solid #f7c3ce49; color: var(--text); }
.feature-art {
  position: relative; transform-style: preserve-3d; justify-self: center; width: clamp(165px, 20vw, 300px);
  aspect-ratio: 1; margin-right: clamp(36px, 5.2vw, 90px); border-radius: 9px;
  transform: perspective(820px) rotateY(-9deg) rotateZ(-8deg);
  translate: var(--parallax-x, 0) var(--parallax-y, 0);
  transition: transform 650ms var(--ease), translate 650ms var(--ease);
}
.feature-art:focus-visible { transform: perspective(820px) rotateX(5deg) rotateY(-3deg) rotateZ(-4deg) translateY(-5px); }
.feature-sleeve {
  position: absolute; z-index: 1; inset: 0; border-radius: inherit; border: 1px solid #fff5;
  transform: translateZ(17px);
  box-shadow: 0 24px 44px #0f080db5, 3px 3px 0 #130b10;
}
.vinyl {
  display: grid; place-items: center; border-radius: 50%; border: 1px solid #ffffff2f;
  background: repeating-radial-gradient(circle,#0000 0 2px,#ffffff17 3px,#0000 4px),
    conic-gradient(from 47deg,#100e13,#48404a,#171318 29%,#100e12 48%,#48404a 66%,#161217 76%,#100e13);
  box-shadow: 0 15px 30px #0f080db0;
}
.vinyl > span { position: relative; width: 34%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--rose); border: 2px solid #221b22; }
.vinyl > span::after { content: ""; position: absolute; width: 12%; aspect-ratio: 1; border-radius: 50%; background: #0b0b0f; box-shadow: 0 0 0 2px #ffffff52; }
.feature-vinyl-shell { position: absolute; width: 95%; aspect-ratio: 1; top: 2.5%; left: 38%; transition: transform 650ms var(--ease); }
.feature-art:is(:hover,:focus-visible) .feature-vinyl-shell, .feature.playing .feature-vinyl-shell { transform: translateX(9%); }
.feature-vinyl, .deck-vinyl { width: 100%; height: 100%; animation: rotate 8s linear infinite paused; }
.feature.playing .feature-vinyl, .deck.playing .deck-vinyl { animation-play-state: running; }

.charts-section, .shelf-section, .track-section { margin-top: 33px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2, .subheading { font: 800 clamp(18px, 1.7vw, 26px)/1.22 var(--heading); letter-spacing: -.046em; }
.section-heading p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.shelf-controls { display: flex; gap: 6px; }
.shelf-controls .icon-button, .chart-refresh { width: 36px; height: 36px; border: 1px solid var(--line); }
.shelf-controls .icon, .chart-refresh .icon { width: 16px; height: 16px; }
.chart-refresh:disabled .icon { animation: rotate 1.3s linear infinite; }
.charts-grid, .shelf { display: grid; grid-auto-flow: column; overflow: auto hidden; scroll-snap-type: x proximity; scrollbar-width: none; padding: 7px 4px 8px; margin-inline: -4px; }
.charts-grid::-webkit-scrollbar, .shelf::-webkit-scrollbar { display: none; }
.charts-grid { grid-auto-columns: max(163px, calc((100% - 48px)/5)); gap: 12px; }
.chart-card {
  --chart-tone: #472936;
  position: relative; isolation: isolate; display: grid; align-items: center; grid-template-columns: 44px minmax(0,1fr) 13px;
  gap: 10px; padding: 11px; min-height: 72px; border-radius: 11px; border: 1px solid var(--line); scroll-snap-align: start;
  background: linear-gradient(120deg, var(--chart-tone), var(--panel) 83%); text-align: left;
  transition: transform var(--medium) var(--ease), border-color var(--fast), box-shadow var(--fast);
  animation: enter var(--medium) var(--ease) backwards; animation-delay: calc(var(--order, 0) * 38ms);
}
.chart-card:hover, .chart-card:focus-visible { transform: translateY(-3px); border-color: #ffb2a467; box-shadow: 0 10px 22px #07050966; }
.chart-card .artwork { width: 44px; height: 44px; border-radius: 6px; box-shadow: 0 5px 11px #0b080b8f; }
.chart-card > .icon { width: 13px; height: 13px; color: var(--muted); }
.chart-card-copy { display: grid; gap: 3px; min-width: 0; }
.chart-card-copy strong { font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
.chart-card-copy small { color: #c9b9c1; font-size: 10px; line-height: 1.25; }
.chart-india { --chart-tone: #462e27; }
.chart-uk { --chart-tone: #2c2c46; }
.chart-india-hot { --chart-tone: #3e3527; }
.chart-new { --chart-tone: #233730; }

.shelf { grid-auto-columns: calc((100% - 65px)/6); gap: 13px; }
.shelf.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.shelf.dragging .shelf-card { cursor: grabbing; }
.shelf-card {
  min-width: 0; display: grid; gap: 3px; align-content: start; text-align: left; border-radius: 9px; scroll-snap-align: start;
  animation: enter var(--medium) var(--ease) backwards; animation-delay: calc(var(--order, 0) * 42ms);
}
.record-sleeve {
  position: relative; display: block; aspect-ratio: 1; perspective: 690px;
  overflow: visible; border-radius: 8px; transform-style: preserve-3d;
}
.shelf-art { margin-bottom: 7px; }
.sleeve-jacket, .sleeve-disc { position: absolute; transition: transform 560ms var(--ease), box-shadow var(--medium); }
.sleeve-jacket {
  z-index: 1; inset: 0; overflow: hidden; border-radius: inherit; border: 1px solid #f5e9e925;
  box-shadow: 0 8px 18px #080509a3, 2px 3px 0 #120e14; transform-origin: 50% 89%;
}
.sleeve-jacket::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(124deg, #ffe5d926, transparent 44%, #ffe5d909);
  transition: opacity var(--medium);
}
.sleeve-disc {
  display: grid; place-items: center; inset: 5%; border: 1px solid #a87f922d; border-radius: 50%;
  background: repeating-radial-gradient(transparent 0 2px,#fff2 3px,transparent 4px),
    conic-gradient(from 29deg,#171319,#3e3640,#0f0c11 40%,#37313a,#171319);
  box-shadow: 0 7px 17px #080509a6;
}
.sleeve-label { width: 33%; aspect-ratio: 1; border: 1px solid #ffaaa755; border-radius: 50%; background: radial-gradient(circle,#120d14 0 11%,#a25661 12% 15%,#6a3344 17%); }
[data-depth]:focus-visible .sleeve-jacket { transform: translate3d(-3%, -4px, 16px) rotateX(5deg) rotateY(-7deg); }
[data-depth]:focus-visible .sleeve-disc { transform: translateX(15%) rotate(15deg); }
@media (hover: hover) and (pointer: fine) {
  .feature-art:hover { transform: perspective(820px) rotateX(var(--tilt-x, 4deg)) rotateY(var(--tilt-y, -3deg)) rotateZ(-5deg) translateY(-5px); }
  [data-depth]:hover .sleeve-jacket {
    transform: translate3d(-4%, -5px, 22px) rotateX(var(--tilt-x, 5deg)) rotateY(var(--tilt-y, -7deg));
    box-shadow: 0 16px 24px #050307be, 2px 3px 0 #120e14;
  }
  [data-depth]:hover .sleeve-jacket::after { opacity: 1; }
  [data-depth]:hover .sleeve-disc { transform: translate3d(17%, 0, 6px) rotate(18deg); }
  .shelf.dragging .sleeve-jacket, .shelf.dragging .sleeve-disc { transform: none; }
  .deck:hover .deck-art {
    transform: perspective(800px) translateZ(24px) rotateX(var(--tilt-x, 5deg)) rotateY(var(--tilt-y, -7deg)) rotateZ(-5deg);
  }
}
.shelf-play {
  position: absolute; bottom: 8px; right: 8px; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; color: var(--dark-ink); background: var(--accent); opacity: 0; transform: translateY(5px);
  transition: opacity var(--fast), transform var(--medium) var(--ease);
}
.shelf-card:is(:hover,:focus-visible) .shelf-play { opacity: 1; transform: none; }
.shelf-card strong, .shelf-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-card strong { font: 750 13px/1.4 var(--heading); }
.shelf-card small { font-size: 12px; color: var(--muted); }

.track-list { display: grid; }
.track-row {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(65px,.5fr) 42px 42px; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line); min-height: 59px; padding: 5px 6px; border-radius: 6px;
  transition: background var(--fast);
}
.track-row.ranked { grid-template-columns: 24px minmax(0,1fr) minmax(65px,.5fr) 42px 42px; }
.track-row:hover, .track-row:focus-within { background: #ffffff06; }
.track-row.is-current { background: #ff957b0b; }
.track-row.is-current strong { color: var(--accent); }
.track-row .track-play, .current-open { display: flex; align-items: center; gap: 11px; min-width: 0; text-align: left; border-radius: 5px; }
.track-image-wrap { position: relative; width: 43px; height: 43px; flex: none; }
.track-image-wrap .artwork { width: 100%; height: 100%; border-radius: 6px; }
.row-play-icon { position: absolute; inset: 0; background: #0b0b0fa8; display: grid; place-items: center; border-radius: 6px; opacity: 0; transition: opacity var(--fast); }
.track-play:is(:hover,:focus-visible) .row-play-icon, .track-row.is-current .row-play-icon { opacity: 1; }
.track-text, .current-text { display: grid; gap: 3px; min-width: 0; }
.track-text strong, .track-text small, .track-album, .current-text b, .current-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-text strong, .current-text b { font-size: 14px; }
.track-text small, .track-album, .current-text small, .track-duration, .track-rank { color: var(--muted); font-size: 12px; }
.track-duration, .track-rank { text-align: center; font-variant-numeric: tabular-nums; }

.secondary { min-height: 70vh; }
.page-heading {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-wrap: wrap; align-items: end;
  gap: 16px 22px; min-height: 142px; padding: 23px 0 18px; margin-bottom: 27px;
}
.page-heading.has-art {
  align-items: center; min-height: 230px; padding: clamp(20px, 3.2vw, 44px); border-radius: 17px; border: 1px solid var(--line);
  background: linear-gradient(110deg,var(--wine),var(--panel));
}
.page-heading-copy { min-width: 0; flex: 1 1 190px; }
.page-heading h1 { font: 400 clamp(46px, 6.3vw, 88px)/.95 var(--display); letter-spacing: -.026em; overflow-wrap: anywhere; }
.page-heading .kicker { margin: 0 0 10px; }
#page-detail:not(:empty) { color: var(--muted); font-size: 14px; margin-top: 10px; }
.page-art { width: clamp(103px, 13vw, 174px); aspect-ratio: 1; border-radius: 10px; box-shadow: 0 12px 33px #0006; }
.artist-heading .page-art { border-radius: 50%; }
.page-atmosphere, .record-atmosphere { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.page-atmosphere img, .record-atmosphere img { filter: saturate(.68) blur(44px); opacity: .23; animation: fade-in var(--medium) both; }
#page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#page-actions .action-button:first-child { background: var(--accent); color: var(--dark-ink); font-weight: 750; }
#page-actions .action-button:first-child:hover { background: var(--accent-hover); }
.action-button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px;
  border-radius: 9px; background: var(--raised); color: var(--text); text-align: left;
  overflow-wrap: anywhere; font-size: 13px; font-weight: 650; transition: background var(--fast), color var(--fast);
}
.action-button:hover { background: #352832; }
.action-button .icon { width: 17px; height: 17px; }
.empty {
  padding: 28px 23px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); font-size: 14px; line-height: 1.5;
}
.subheading, .secondary .section-heading { margin: 26px 0 13px; }
.playlist-rack {
  --rack-gap: clamp(16px, 2.4vw, 34px);
  --rack-padding: clamp(13px, 2.4vw, 29px);
  margin-top: 29px; padding: clamp(13px, 2.4vw, 29px) var(--rack-padding) 15px;
  border: 1px solid var(--line); border-radius: 16px;
  background: radial-gradient(ellipse at 35% 0%, #4b28325c, transparent 58%), #171219;
}
.playlist-rack .playlist-rack-heading { align-items: center; margin: 0 0 15px; }
.playlist-rack-heading .shelf-controls { align-items: center; }
.playlist-rack-heading .action-button { min-height: 36px; padding: 5px 11px; }
.playlist-shelf, .playlist-wall { display: grid; gap: 24px var(--rack-gap); }
.playlist-shelf {
  grid-auto-flow: column; grid-auto-columns: clamp(126px, 22%, 232px);
  overflow: auto hidden; scrollbar-width: thin; scrollbar-color: #775260 transparent;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--rack-padding);
  margin-inline: calc(-1 * var(--rack-padding)); padding: 12px var(--rack-padding);
}
.playlist-wall { grid-template-columns: repeat(auto-fill, minmax(min(100%, 152px), 1fr)); padding: 12px 0 5px; }
.playlist-cover {
  position: relative; min-width: 0; display: grid; align-content: start; gap: 15px;
  text-align: left; border-radius: 7px; scroll-snap-align: start;
  animation: enter var(--medium) var(--ease) backwards; animation-delay: calc(var(--order, 0) * 38ms);
}
.playlist-cover .record-sleeve { display: block; margin-inline: 0 14%; }
.playlist-cover::before {
  content: ""; position: absolute; top: calc((100% - 51px) + 4px); inset-inline: calc(-.5 * var(--rack-gap));
  height: 8px; border-top: 1px solid #dd9ea251; border-bottom: 1px solid #110b11;
  background: linear-gradient(#67414f, #35232e 30%, #211621 85%); box-shadow: 0 6px 9px #08050a9a;
  pointer-events: none;
}
.playlist-cover .collection-copy { height: 36px; }
.playlist-jacket {
  display: grid; place-items: center; color: #e5a6b0; background: linear-gradient(148deg,#54323e,#251923 65%);
}
.playlist-jacket.liked-jacket { background: linear-gradient(148deg,#a45562,#4a2738 65%,#241824); color: #ffe1d7; }
.playlist-jacket.cover-0 { background-image: repeating-radial-gradient(ellipse at 70% 120%,transparent 0 14px,#ffddd313 15px 16px,transparent 17px 20px), linear-gradient(148deg,#613745,#261723 75%); }
.playlist-jacket.cover-0.liked-jacket { background-image: repeating-radial-gradient(ellipse at 70% 120%,transparent 0 14px,#ffddd321 15px 16px,transparent 17px 20px), linear-gradient(148deg,#a45562,#4a2738 70%); }
.playlist-jacket.cover-0 > .icon { width: 28%; height: 28%; }
.playlist-jacket > .artwork { width: 100%; height: 100%; min-width: 0; min-height: 0; }
.playlist-jacket:is(.cover-2,.cover-3,.cover-4) { grid-template-columns: repeat(2,minmax(0,1fr)); place-items: stretch; }
.playlist-jacket:is(.cover-3,.cover-4) { grid-template-rows: repeat(2,minmax(0,1fr)); }
.playlist-jacket.cover-3 > .artwork:first-child { grid-row: span 2; }
.jacket-badge {
  position: absolute; bottom: 7px; right: 7px; width: 27px; aspect-ratio: 1;
  display: grid; place-items: center; border-radius: 50%; background: #21121be6;
}
.jacket-badge .icon { width: 15px; height: 15px; }
@media (max-width: 520px) {
  .playlist-wall { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .playlist-rack-heading .shelf-controls { gap: 3px; }
  .playlist-rack-heading .shelf-controls .icon-button { width: 29px; height: 36px; }
  .playlist-rack-heading .action-button { padding-inline: 8px; font-size: 12px; }
}
.library-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(143px,1fr)); gap: 14px; }
.library-card {
  display: grid; min-width: 0; padding: 10px; gap: 10px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--panel); text-align: left; transition: transform var(--medium) var(--ease), background var(--fast);
  animation: enter var(--medium) var(--ease) backwards;
}
.library-card:is(:hover,:focus-visible) { transform: translateY(-4px); background: var(--raised); }
.library-card .playlist-symbol { width: 100%; height: auto; aspect-ratio: 1.2; border-radius: 7px; }
.library-card.artist-card .playlist-symbol { aspect-ratio: 1; width: 84%; margin: 4px auto; border-radius: 50%; }
.library-card .playlist-symbol .icon { width: 25%; height: 25%; }
.collection-copy { display: grid; min-width: 0; gap: 3px; padding: 0 2px 3px; }
.collection-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.collection-copy small { color: var(--muted); font-size: 12px; }
.library-toolbar, .filter-list, .suggestion-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.library-toolbar { justify-content: space-between; }
.filter-list .action-button, .suggestion-list .action-button { border-radius: 99px; }
.filter-list .action-button[aria-pressed="true"] { background: var(--accent); color: var(--dark-ink); }
.library-sort { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); padding: 9px 10px; min-height: 43px; font-size: 13px; }
.skeleton-rows { display: grid; gap: 8px; }
.skeleton {
  display: block; min-height: 57px; min-width: 0; border-radius: 10px;
  background: linear-gradient(105deg,#211923 25%,#332630 43%,#211923 64%) 100% 0 / 240% 100%;
  animation: shimmer 1.65s ease-in-out infinite;
}
.charts-grid .skeleton { min-height: 72px; }

.player {
  position: fixed; z-index: 4; inset: auto 0 0; display: grid; align-items: center;
  grid-template-columns: minmax(0,1fr) minmax(220px,1.52fr) minmax(132px,1fr); gap: 16px;
  min-height: calc(var(--player) + var(--safe-bottom)); padding: 8px clamp(13px, 2vw, 28px) calc(8px + var(--safe-bottom));
  border-top: 1px solid #ffe0e327; background: #171219f5; backdrop-filter: blur(16px);
}
.current { display: flex; align-items: center; gap: 5px; min-width: 0; }
.current-open { max-width: 100%; }
.current-open:disabled { opacity: 1; }
.current-open .artwork { flex: 0 0 49px; width: 49px; height: 49px; border-radius: 7px; box-shadow: 0 5px 11px #0006; }
.current-open .artwork img { animation: fade-in var(--medium) both; }
.expand-icon { width: 13px; height: 13px; color: var(--accent); opacity: 0; transition: opacity var(--fast); }
.current-open:is(:hover,:focus-visible):not(:disabled) .expand-icon { opacity: 1; }
.transport { display: grid; width: min(100%, 510px); gap: 2px; justify-self: center; }
.transport-buttons, .record-controls-main { display: flex; justify-content: center; align-items: center; gap: 9px; }
.transport-play { width: 41px; height: 41px; background: var(--accent); color: var(--dark-ink); }
.transport-play:hover:not(:disabled) { background: var(--accent-hover); color: var(--dark-ink); }
.timeline { display: grid; grid-template-columns: 35px minmax(0,1fr) 35px; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.timeline time:last-child { text-align: end; }
input[type=range] { appearance: none; display: block; width: 100%; height: 19px; margin: 0; background: transparent; cursor: pointer; }
input[type=range]:disabled { cursor: default; opacity: .43; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: linear-gradient(90deg,var(--accent) var(--progress,0%),#ffffff2b var(--progress,0%)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 99px; background: #ffffff2b; }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 99px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -3.5px; border-radius: 50%; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--accent); }
.player-tools { display: flex; justify-content: end; align-items: center; gap: 2px; min-width: 0; }
.player-tools input { width: min(88px, 40%); }

dialog {
  max-height: calc(100dvh - 28px - var(--safe-bottom)); max-width: calc(100vw - 26px); padding: 0;
  overflow: auto; overscroll-behavior: contain; color: var(--text); background: var(--panel);
  border: 1px solid #fedbe129; border-radius: 17px; box-shadow: 0 28px 85px #080508bd;
  opacity: 0; transform: translateY(12px) scale(.984);
  transition: opacity var(--medium) var(--ease), transform var(--medium) var(--ease),
    display var(--medium) allow-discrete, overlay var(--medium) allow-discrete;
}
dialog[open] { opacity: 1; transform: none; }
dialog::backdrop {
  background: #08060cbd; backdrop-filter: blur(8px); opacity: 0;
  transition: opacity var(--medium) var(--ease), display var(--medium) allow-discrete,
    overlay var(--medium) allow-discrete;
}
dialog[open]::backdrop { opacity: 1; }
@starting-style {
  dialog[open] { opacity: 0; transform: translateY(12px) scale(.984); }
  dialog[open]::backdrop { opacity: 0; }
}
.record-dialog { width: 660px; isolation: isolate; background: radial-gradient(ellipse at 70% 11%,#4e2838,var(--panel) 59%); }
.record-dialog.now-playing { width: 800px; transform-origin: center bottom; }
.record-dialog .close { position: absolute; top: 12px; right: 12px; z-index: 3; color: var(--text); background: #0b0b0f85; }
.record-stage { min-height: 240px; height: min(46vw, 332px); display: grid; place-items: center; overflow: hidden; }
.now-playing .record-stage { height: min(37dvh, 345px); }
.deck { width: min(219px, 42vw, 28dvh); aspect-ratio: 1; position: relative; transform: translateX(-21%); isolation: isolate; }
.now-playing .deck { width: min(250px, 42vw, 29dvh); animation: float-cover 6s ease-in-out infinite paused; }
.now-playing .deck.playing { animation-play-state: running; }
.deck-art {
  position: absolute; inset: 0; z-index: 2; border: 1px solid #ffffff3d; border-radius: 7px;
  transform: perspective(800px) rotateY(-9deg) rotateZ(-6deg); box-shadow: 0 20px 38px #0b070c9c;
  transition: transform 560ms var(--ease);
}
.deck-vinyl-shell { position: absolute; inset: 3%; transform: translateX(51%); animation: pull-record 670ms var(--ease) both; }
.tonearm {
  position: absolute; left: 148%; top: 9%; z-index: 3; height: 49%; width: 4px; border-radius: 5px;
  background: #bb9da7; transform-origin: 50% 0; transform: rotate(-7deg); transition: transform 650ms var(--ease);
}
.tonearm::before, .tonearm::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); background: #d1b0bb; border-radius: 4px; }
.tonearm::before { top: -5px; width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 2px 5px #0009; }
.tonearm::after { bottom: 0; width: 8px; height: 15px; }
.deck.playing .tonearm { transform: rotate(28deg); }
.record-meta { display: flex; align-items: end; justify-content: space-between; gap: 13px; padding: 12px 26px 18px; }
.record-copy { min-width: 0; }
.record-meta h2 { margin: 6px 0 3px; font: 400 clamp(35px, 6.5vw, 67px)/.93 var(--display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.record-actions, .record-links { display: flex; align-items: center; flex-wrap: wrap; }
.record-links { column-gap: 13px; }
.record-links .text-button { color: #e0bfc9; min-height: 34px; overflow-wrap: anywhere; }
.record-links .text-button:disabled { opacity: 1; }
.record-transport { position: relative; display: grid; gap: 12px; padding: 0 26px 18px; }
#record-spectrum { position: absolute; right: 26px; bottom: calc(100% + 12px); width: min(29%, 176px); height: 26px; opacity: .38; pointer-events: none; }
.record-transport .timeline { font-size: 12px; }
.record-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.record-controls-main { gap: 6px; }
.record-controls .transport-play { width: 52px; height: 52px; }
.record-controls-tools { display: flex; width: min(191px,100%); align-items: center; }
.record-controls-tools input { min-width: 52px; }
.mode-button { position: relative; }
.mode-button[data-repeat="2"]::after { content: "1"; position: absolute; right: 2px; top: 5px; color: var(--accent); font-size: 9px; font-weight: 800; }
.lyrics { padding: 14px 26px 18px; border-top: 1px solid var(--line); color: var(--muted); background: #110d1494; }
.lyrics summary { cursor: pointer; color: var(--text); font-size: 14px; font-weight: 700; }
#lyrics-lines { max-height: 210px; overflow: auto; margin-top: 10px; display: grid; gap: 3px; white-space: pre-line; }
.lyric-line { display: block; padding: 7px 0; text-align: left; color: var(--muted); line-height: 1.45; }
.lyric-line[aria-current] { color: var(--accent); font-weight: 750; }
.panel { width: 540px; padding: 16px 19px 20px; }
.small-panel { width: 370px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.panel-header h2 { font-size: 21px; overflow-wrap: anywhere; }
.panel .track-row { grid-template-columns: minmax(0,1fr) 38px 42px; }
.panel .track-album { display: none; }
#playlist-form, #track-actions { display: grid; gap: 10px; }
#playlist-form input { min-height: 44px; min-width: 0; color: var(--text); padding: 0 10px; background: var(--side); border: 1px solid #ffffff30; border-radius: 7px; }
#playlist-form .primary { justify-self: start; }
.toast {
  position: fixed; z-index: 8; bottom: calc(var(--player) + var(--safe-bottom) + 14px); left: 50%; transform: translateX(-50%);
  max-width: 90vw; padding: 9px 14px; border-radius: 8px; background: var(--text); color: var(--dark-ink);
  font-size: 13px; font-weight: 750; box-shadow: 0 8px 26px #0007; pointer-events: none;
}
.toast:empty, .dialog-toast:empty { display: none; }
.dialog-toast {
  position: sticky; z-index: 4; bottom: 8px; width: fit-content; max-width: calc(100% - 24px); margin: 0 auto 8px;
  padding: 8px 12px; border-radius: 8px; background: var(--text); color: var(--dark-ink);
  box-shadow: 0 6px 18px #0007; font-size: 13px; font-weight: 750; pointer-events: none;
}

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes pull-record { from { transform: translateX(4%); opacity: .45; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes enter { from { opacity: .4; translate: 0 8px; } }
@keyframes float-cover { 50% { translate: 0 -5px; } }
@keyframes shimmer { to { background-position: -100% 0; } }

@media (max-width: 1180px) {
  :root { --sidebar: 188px; }
  .sidebar { padding-inline: 14px; }
  .charts-grid { grid-auto-columns: max(158px, calc((100% - 36px)/4)); }
  .shelf { grid-auto-columns: calc((100% - 52px)/5); }
}

@media (max-width: 910px) {
  :root { --sidebar: 155px; }
  .sidebar { padding-inline: 9px; }
  .brand { margin-left: 9px; }
  .feature { padding-inline: 24px; }
  .feature-art { width: clamp(138px,22vw,200px); margin-right: 31px; }
  .feature h1 { font-size: clamp(46px,7.4vw,68px); }
  .feature h1.long-title { font-size: clamp(35px,5.6vw,49px); }
  .shelf { grid-auto-columns: calc((100% - 39px)/4); }
  .charts-grid { grid-auto-columns: max(158px, calc((100% - 24px)/3)); }
}

@media (max-width: 690px) {
  :root { --sidebar: 0px; --player: 70px; }
  .layout { display: block; }
  .sidebar { height: auto; position: static; flex-direction: row; align-items: center; gap: 8px; padding: calc(9px + env(safe-area-inset-top)) 15px 9px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { align-self: center; margin: 0 auto 0 0; gap: 7px; }
  .brand img { width: 32px; height: 32px; border-radius: 7px; }
  .brand span { font-size: 23px; }
  .primary-nav { display: flex; gap: 4px; }
  .primary-nav button { width: 44px; min-height: 44px; justify-content: center; padding: 0; }
  .primary-nav button::before { inset: auto 13px 3px; width: auto; height: 2px; }
  .primary-nav span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .collection, .sidebar-bottom { display: none; }
  .content { padding-inline: 16px; }
  .topbar { min-height: 61px; }
  .search-field { min-height: 42px; }
  .search-field input { font-size: 16px; }
  .search-field kbd { display: none; }
  .feature { min-height: 270px; }
  .feature-art { margin-right: clamp(22px,5vw,40px); }
  .charts-section, .shelf-section, .track-section { margin-top: 24px; }
  .charts-grid { grid-auto-columns: max(152px, calc((100% - 12px)/2.4)); }
  .shelf { grid-auto-columns: minmax(109px,31%); gap: 11px; }
  .track-row, .panel .track-row { grid-template-columns: minmax(0,1fr) 32px 42px; gap: 5px; padding-inline: 3px; }
  .track-row.ranked { grid-template-columns: 18px minmax(0,1fr) 32px 42px; }
  .track-album { display: none; }
  .player { grid-template-columns: minmax(0,1fr) auto 41px; gap: 3px; padding-inline: 11px; }
  .current-open { gap: 7px; }
  .current-open .artwork { flex-basis: 42px; width: 42px; height: 42px; }
  .current-like, .expand-icon, .player-tools .volume-toggle, .player-tools input { display: none; }
  .transport { width: 128px; gap: 0; }
  .transport-buttons { gap: 0; }
  .transport-buttons .icon-button { width: 42px; height: 42px; }
  .player .timeline { grid-template-columns: minmax(0,1fr); }
  .player .timeline time { display: none; }
  .player .timeline input { height: 13px; }
  .page-heading { min-height: 100px; margin-bottom: 19px; }
  .page-heading.has-art { min-height: 0; padding: 18px; gap: 14px; }
  .page-heading-copy { flex-basis: 155px; }
  .page-heading h1 { font-size: clamp(39px,9vw,59px); }
  .library-grid { grid-template-columns: repeat(auto-fill,minmax(125px,1fr)); gap: 10px; }
  .record-meta, .record-transport, .lyrics { padding-inline: 17px; }
  #record-spectrum { right: 17px; bottom: calc(100% + 72px); width: 21%; }
}

@media (max-width: 465px) {
  .feature {
    min-height: 0; grid-template-columns: minmax(0,1fr); align-content: center;
    padding: 25px 24px 23px; row-gap: 21px; border-radius: 15px;
  }
  .feature-art { grid-row: 1; width: clamp(132px, 39vw, 169px); margin-right: 48px; }
  .feature-copy { align-self: end; }
  .feature h1, .feature h1.long-title { font-size: clamp(42px, 12vw, 61px); margin: 7px 0 8px; text-wrap: initial; }
  .feature h1.long-title { font-size: clamp(35px, 9.3vw, 47px); }
  .feature-actions { margin-top: 14px; }
  .feature-grid { width: 115%; inset: 0 auto 0 -20%; }
  .feature::after { background: linear-gradient(0deg,#1a0e18ee,#32172360 70%,#472b391e); }
  .charts-grid { grid-auto-columns: max(164px, 47%); }
  .chart-card { grid-template-columns: 38px minmax(0,1fr); gap: 9px; }
  .chart-card > .icon { display: none; }
  .chart-card .artwork { width: 38px; height: 38px; }
  .chart-card-copy strong { overflow-wrap: normal; }
  .record-stage, .now-playing .record-stage { min-height: 0; height: clamp(166px, 53vw, 237px); }
  .record-meta { align-items: start; flex-direction: column; padding-top: 5px; padding-bottom: 12px; gap: 6px; }
  .now-playing .record-meta { flex-direction: row; align-items: end; }
  .record-actions { flex-wrap: nowrap; }
  .record-actions .icon-button { width: 36px; height: 40px; }
  .record-controls { justify-content: center; }
  .record-controls-tools { flex: 1 0 100%; width: 100%; }
}

@media (hover: none) {
  .shelf-play { opacity: 1; transform: none; width: 28px; height: 28px; }
  .shelf-play .icon { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  [data-depth]:is(:hover,:focus-visible) .sleeve-jacket,
  [data-depth]:is(:hover,:focus-visible) .sleeve-disc { transform: none; }
  .feature-art:is(:hover,:focus-visible) { transform: perspective(820px) rotateY(-9deg) rotateZ(-8deg); }
  .feature-art:is(:hover,:focus-visible) .feature-vinyl-shell { transform: none; }
  .deck:hover .deck-art { transform: perspective(800px) rotateY(-9deg) rotateZ(-6deg); }
}

.search-result-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
#queue-dialog { width: 642px; }
.queue-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.queue-autoplay { display: inline-flex; align-items: center; gap: 5px; padding: 0 5px; color: var(--muted); font-size: 13px; min-height: 38px; }
.queue-autoplay input { accent-color: var(--accent); }
#queue-list .queue-upcoming { grid-template-columns: minmax(0, 1fr) 33px 38px auto; }
.queue-reorder { display: flex; align-items: center; gap: 2px; }
.queue-reorder .icon-button { width: 33px; height: 37px; }
.queue-reorder .icon { width: 14px; height: 14px; }
.queue-reorder button:not(.queue-handle) .icon { rotate: 90deg; }
.queue-handle { cursor: grab; }
.queue-handle:active { cursor: grabbing; }
@media (max-width: 500px) {
  #queue-list .queue-upcoming { grid-template-columns: minmax(0, 1fr) 33px auto; }
  #queue-list .queue-upcoming .track-duration { display: none; }
  .queue-reorder { gap: 0; }
  .queue-reorder .icon-button { width: 29px; height: 39px; }
}


.youtube-dock {
  position: fixed;
  z-index: 8;
  inset-inline-end: max(12px, env(safe-area-inset-right));
  bottom: calc(var(--player) + var(--safe-bottom,0px) + 8px);
  width: min(494px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--player) - var(--safe-bottom,0px) - 14px);
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: 0 16px 40px #000b;
}
.youtube-dock-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 3px 5px 5px; }
.youtube-dock-header div { display: grid; min-width: 0; gap: 1px; }
.youtube-dock-header strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.youtube-dock-header span, .youtube-status { color: var(--muted); font-size: 12px; }
.youtube-status { padding: 6px 5px 2px; }
.youtube-status:empty { display: none; }
.youtube-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border: none; background: #000; }
.youtube-frame:empty { display: none; }
