:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #17161a;
  --soft: rgba(23, 22, 26, 0.58);
  --faint: rgba(23, 22, 26, 0.36);
  --line: rgba(23, 22, 26, 0.09);
  --accent: #f0532d;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

.pl { position: relative; width: min(324px, 100%); padding: 12px; border-radius: 26px; background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(23, 22, 26, 0.05), 0 26px 44px -26px rgba(23, 22, 26, 0.3); }

.pl__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 2px 0 6px; }
.pl__name { min-width: 0; display: grid; }
.pl__name b { font-size: 16px; line-height: 21px; font-weight: 740; font-stretch: 108%; letter-spacing: -0.012em; white-space: nowrap; }
.pl__sub { display: block; height: 16px; overflow: hidden; font-size: 11.500px; line-height: 16px; font-weight: 540; color: var(--soft); white-space: nowrap; }
.pl__sub span { display: block; overflow: hidden; text-overflow: ellipsis; }
.pl__play { position: relative; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); color: #ffffff; cursor: pointer; outline: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 16px -10px rgba(23, 22, 26, 0.7); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.pl__ico { position: absolute; inset: 10px; width: 24px; height: 24px; fill: currentColor; transition: opacity 0.18s ease, transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1); }
.pl__ico--play { opacity: 0; transform: scale(0.5) rotate(-30deg); }
.pl__play[aria-pressed="false"] .pl__ico--play { opacity: 1; transform: none; }
.pl__play[aria-pressed="false"] .pl__ico--pause { opacity: 0; transform: scale(0.5) rotate(30deg); }
.pl__play:focus-visible, .pl__hit:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }

.pl__list { list-style: none; margin-top: 10px; display: grid; gap: 2px; }
/* --p goes from 0, a closed row, to 1, the track being played: every measure of the row follows it */
.pl__row { --p: 0; position: relative; height: calc(38px + 40px * var(--p)); border-radius: 14px; }
.pl__row::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: color-mix(in srgb, var(--accent) 9%, #ffffff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); opacity: var(--p); }
.pl__hit { position: absolute; inset: 0; z-index: 2; border: 0; border-radius: inherit; background: transparent; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .pl__row:not(.is-now) .pl__hit:hover { background: rgba(23, 22, 26, 0.045); } }

/* the cover: a small square in a closed row, a record once the track plays */
.pl__disc { position: absolute; left: calc(8px + 4px * var(--p)); top: calc(8px + 5px * var(--p)); width: calc(22px + 30px * var(--p)); height: calc(22px + 30px * var(--p)); border-radius: calc(6px + 20px * var(--p)); overflow: hidden; box-shadow: 0 0 0 1px rgba(23, 22, 26, 0.1), 0 calc(8px * var(--p)) calc(12px * var(--p)) calc(-6px * var(--p)) rgba(23, 22, 26, 0.5); }
.pl__art { position: absolute; inset: 0; display: block; background: linear-gradient(140deg, var(--a) 8%, var(--b) 92%); }
.pl__art::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.16) 2px 2.500px), conic-gradient(from 20deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 18%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.26) 58%, rgba(255, 255, 255, 0) 74%); opacity: var(--p); }
.pl__art::after { content: ""; position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; margin: -15% 0 0 -15%; border-radius: 50%; background: radial-gradient(circle, #ffffff 0 22%, var(--ink) 23% 100%); opacity: var(--p); }

.pl__text { position: absolute; left: calc(40px + 34px * var(--p)); right: 84px; top: calc(10px + 2px * var(--p)); display: grid; pointer-events: none; }
.pl__text b { font-size: 13.500px; line-height: 18px; font-weight: 660; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl__text span { font-size: 11.500px; line-height: 15px; font-weight: 540; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: var(--p); }
.pl__row.is-now .pl__text b { font-weight: 740; }
.pl__len { position: absolute; right: 12px; top: calc(10px + 2px * var(--p)); font-size: 11.500px; line-height: 18px; font-weight: 580; color: var(--soft); font-variant-numeric: tabular-nums; pointer-events: none; }
.pl__eq { position: absolute; right: 48px; top: calc(13px + 2px * var(--p)); display: flex; align-items: flex-end; gap: 2.500px; height: 12px; opacity: var(--p); transition: opacity 0.2s ease; pointer-events: none; }
.pl.is-paused .pl__eq { opacity: 0; }
.pl__eq i { display: block; width: 3px; height: 12px; border-radius: 1.500px; background: var(--accent); transform-origin: 50% 100%; transform: scaleY(0.3); }
.pl__time { position: absolute; left: 74px; right: 12px; top: 51px; display: flex; align-items: center; gap: 8px; font-size: 11px; line-height: 14px; font-weight: 620; color: var(--ink); font-variant-numeric: tabular-nums; opacity: calc(var(--p) * 1.6 - 0.6); pointer-events: none; }
.pl__time > span:first-child { flex: none; min-width: 26px; }
.pl__bar { flex: 1 1 auto; height: 4px; border-radius: 2px; background: rgba(23, 22, 26, 0.12); overflow: hidden; }
.pl__bar i { display: block; height: 100%; border-radius: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

.pl__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17161a; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }
