/* The expanded now-playing overlay: cover, transport, lyrics, sync
   controls, credits, queue, and the ambient backdrop.

   Split out of app.css; load order is the cascade, so this file expects to
   come after the ones before it in index.html. */

/* ── Now Playing Overlay ──────────────────────────────────── */

/* Sliding it off screen left all seventeen of its controls in the tab order,
   so tabbing through the page walked into a sheet nobody could see and put
   focus on invisible buttons. visibility takes them out; it is delayed by the
   length of the slide so the sheet is still there to watch leave. */
.now-playing {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  /* Tinted toward the cover once a palette lands (--np-bg); flat black only
     before any track loads. The scrim's own washes sit over this. */
  background: var(--np-bg, var(--page));
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
  overflow: hidden;
}

.now-playing.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.25s var(--ease-out), visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
  .now-playing,
  .now-playing.is-open {
    transition: none;
  }
}

.now-playing__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

/* Their ambient technique: circular copies of the artwork, blurred, turning
   slowly in opposite directions with one orbiting. A single blurred cover
   sits flat; three that drift against each other do not. */
.ambient-layer {
  position: absolute;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  backface-visibility: hidden;
  filter: blur(72px) saturate(1.9);
}

.ambient-layer--1 {
  inline-size: 78%;
  aspect-ratio: 1;
  inset-block-start: -18%;
  inset-inline-start: -12%;
  opacity: 0.85;
  animation: ambient-spin 68s linear infinite;
}

.ambient-layer--2 {
  inline-size: 62%;
  aspect-ratio: 1;
  inset-block-end: -22%;
  inset-inline-end: -10%;
  opacity: 0.7;
  animation: ambient-spin-rev 84s linear infinite;
}

.ambient-layer--3 {
  inline-size: 46%;
  aspect-ratio: 1;
  inset-block-start: 24%;
  inset-inline-start: 34%;
  opacity: 0.55;
  animation: ambient-orbit 52s linear infinite;
}

@keyframes ambient-spin {
  to { transform: rotate(360deg); }
}

@keyframes ambient-spin-rev {
  to { transform: rotate(-360deg); }
}

@keyframes ambient-orbit {
  from { transform: rotate(0) translate(8%) rotate(0); }
  to   { transform: rotate(360deg) translate(8%) rotate(-360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-layer { animation: none; }
}

/* The scrim carries the artwork's own colours rather than one flat grey.
   Four washes from the extracted palette over a near-black tinted toward the
   cover — the reference's --np-c1..c4 and --np-bg, used the way it uses them.
   The flat layer underneath is what keeps text readable regardless. The wash
   strengths stay moderate deliberately: lyric and label contrast is asserted
   (verify-states, verify-np-full), so the scrims darken before text lightens. */
.now-playing__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 44% at 12% 8%,
      color-mix(in oklab, var(--np-c1, transparent) 40%, transparent), transparent 70%),
    radial-gradient(52% 40% at 88% 6%,
      color-mix(in oklab, var(--np-c2, transparent) 32%, transparent), transparent 68%),
    radial-gradient(60% 48% at 78% 92%,
      color-mix(in oklab, var(--np-c3, transparent) 28%, transparent), transparent 72%),
    radial-gradient(46% 38% at 22% 96%,
      color-mix(in oklab, var(--np-c4, transparent) 24%, transparent), transparent 70%),
    linear-gradient(to bottom,
      color-mix(in oklab, var(--np-bg, #0d0a14) 68%, transparent),
      color-mix(in oklab, var(--np-bg, #0d0a14) 84%, transparent));
  z-index: 0;
}

.now-playing__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  block-size: 100%;
}

.now-playing__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 48px;
  inline-size: 100%;
}

.np-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  inline-size: 40px;
  block-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s var(--ease-out), transform 0.15s var(--ease-out);
}

.np-btn:hover {
  background: rgba(255,255,255,0.1);
}

.np-btn svg {
  inline-size: 20px;
  block-size: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* V2f: the transport row is one family at 2px — the play/pause glyph sets the
   weight and the shuffle/repeat outlines are brought up to it, not down.
   Scoped to the transport so the sheet chrome (close, menu) keeps 1.75. */
.now-playing__transport .np-btn svg {
  stroke-width: 2;
}

.now-playing__meta {
  text-align: center;
}

.now-playing__eyebrow {
  display: block;
  font-size: 11px;
  line-height: 16.5px;
  font-weight: 500;
  letter-spacing: 1.1px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  margin-block-end: 4px;
  /* P9: 60% white passes on the page (6.9:1) but the pane sits over
     artwork-tinted glass; the shadow keeps light art from washing it out. */
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.now-playing__album {
  display: block;
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
}

.now-playing__body {
  display: flex;
  flex: 1;
  padding: 0 96px 48px;
  min-block-size: 0;
}

.now-playing__left {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.now-playing__cover {
  position: relative;
  inline-size: 279px;
  block-size: 279px;
  border-radius: 25.6px;
  background-size: cover;
  background-position: center;
  /* Layered drop + contact + rim: the hero floats over the ambient field
     rather than sitting pasted on it. Size and radius are reference pins
     (verify-np-full measures 279x279), so depth comes from light, not scale. */
  box-shadow:
    0 32px 80px -16px rgba(0, 0, 0, 0.65),
    0 12px 28px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.09);
  margin-block-end: 24px;
  align-self: center;
  transition: transform 200ms var(--ease-out);
}

/* Subtle hover tilt, transform-only and well under 6deg. Fine pointers only
   (no tilt on touch), and nothing under reduced-motion — the cross-cutting
   backstop would flatten it anyway, but the guard belongs here with the rule. */
@media (hover: hover) and (pointer: fine) {
  .now-playing__cover:hover {
    transform: perspective(900px) rotateX(2.5deg) rotateY(-4deg) scale(1.015);
  }
}

@media (prefers-reduced-motion: reduce) {
  .now-playing__cover {
    transition: none;
  }
  .now-playing__cover:hover {
    transform: none;
  }
}

/* Title row: title+subtitle left, icons right */
.np-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-block-end: 8px;
}

.np-title-row__text {
  flex: 1;
  min-inline-size: 0;
}

.now-playing__title {
  font-size: 25.6px;
  font-weight: 700;
  letter-spacing: -0.64px;
  color: var(--text);
  margin: 0 0 4px 0;
  line-height: 32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing__subtitle {
  font-size: 16.8px;
  line-height: 23.1px;
  font-weight: 400;
  letter-spacing: -0.176px;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 16px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* P9: same artwork wash-out guard as the eyebrow; invisible on dark. */
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.np-title-row__icons {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block-start: 12px;
}

.np-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  inline-size: 24px;
  block-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.15s var(--ease-out);
  position: relative;
}

/* Same treatment as the player bar: 24px visible, 44px tappable. */
.np-icon-btn::after {
  content: "";
  position: absolute;
  inset: -10px;
}

.np-icon-btn:hover {
  color: var(--text);
}

.np-icon-btn svg {
  inline-size: 20px;
  block-size: 20px;
}

.np-icon-btn--active {
  color: var(--accent);
}

/* Floating glass control bar: scrubber, transport and volume in one rounded
   pill, detached from the sheet edges. The glass-floating class carries the
   blur plus the opaque @supports fallback, the same technique the toast uses;
   this rule only lays out the pill. */
.np-control-bar {
  border-radius: 28px;
  padding: 20px 24px 18px;
  margin-block-start: 8px;
  display: flex;
  flex-direction: column;
}

/* The pill owns the outer spacing now; the rows keep their inner rhythm. */
.np-control-bar .now-playing__transport {
  margin-block-end: 16px;
}

.np-control-bar .np-quality-row {
  margin-block-end: 16px;
}

.now-playing__scrubber {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block-end: 8px;
}

.now-playing__time {
  font-size: 11px;
  line-height: 16.5px;
  color: rgba(255, 255, 255, 0.75);
  font-variant-numeric: tabular-nums;
  min-inline-size: 40px;
}

.now-playing__time--right {
  text-align: right;
}

.now-playing__track-bar {
  flex: 1;
  block-size: 24px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* The visible bar stays 4px; the tap area reaches 44px tall through an empty
   overlay, the same treatment as the player bar. Verified with
   elementFromPoint at the expanded edge (verify-player). */
.now-playing__track-bar::after {
  content: "";
  position: absolute;
  inset: -10px 0;
}

.now-playing__track-bg {
  position: absolute;
  inset-inline: 0;
  block-size: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.now-playing__track-fill {
  position: absolute;
  inset-inline-start: 0;
  block-size: 4px;
  background: var(--text);
  border-radius: 2px;
  inline-size: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.1s linear;
}

.now-playing__track-knob {
  position: absolute;
  inset-inline-start: 0;
  block-size: 12px;
  inline-size: 12px;
  border-radius: 50%;
  background: var(--text);
  transform: translateX(0px) translate(-50%, 0);
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  transition: transform 0.1s linear;
}

/* Quality & speed row */
.np-quality-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-block-end: 24px;
}

.np-quality-row__format {
  font-size: 11px;
  line-height: 16.5px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.np-quality-row__speed {
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s var(--ease-out);
  position: relative;
}

/* Bare text ~20px tall; the tap area reaches 44px through an empty overlay. */
.np-quality-row__speed::after {
  content: "";
  position: absolute;
  inset: -14px -12px;
}

.np-quality-row__speed:hover {
  color: var(--text);
}

.now-playing__transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-block-end: 24px;
}

.np-btn--play {
  inline-size: 72px;
  block-size: 72px;
  border-radius: 22px;
  background: var(--text);
  color: var(--page);
}

.np-btn--play:hover {
  background: white;
  transform: scale(1.04);
}

.np-btn--play svg {
  inline-size: 32px;
  block-size: 32px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

/* Bottom utility row */
.np-utility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Volume and the toggles sit together on the right; the output picker stays
   hard left, as the reference has it. */
.np-utility-row__group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.np-device {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--np-accent, var(--accent));
}

.np-device svg {
  inline-size: 18px;
  block-size: 18px;
}

#np-queue-btn {
  margin-inline-start: auto;
}

.np-vol-slider {
  inline-size: 100px;
  block-size: 24px;
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

/* Same 24px-to-44px treatment as the scrubber above it. */
.np-vol-slider::after {
  content: "";
  position: absolute;
  inset: -10px 0;
}

.np-vol-slider__track {
  position: relative;
  inline-size: 100%;
  block-size: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.np-vol-slider__fill {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  block-size: 4px;
  inline-size: 100%;
  background: var(--text);
  border-radius: 2px;
  transform: scaleX(1);
  transform-origin: left center;
}

.np-vol-slider__knob {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 0;
  block-size: 10px;
  inline-size: 10px;
  border-radius: 50%;
  background: var(--text);
  transform: translateX(0px) translate(-50%, -50%);
}

/* Now-playing right pane */
.now-playing__right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  overflow: hidden;
  position: relative;
}

/* Sync pill */
.np-sync-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 48px 0;
}

/* Measured: one 116x36 pill, rgba(255,255,255,0.1) over blur(12px), with
   the label at 12px/600 and 0.85 white. The minus and plus live inside it. */
.np-sync-group {
  display: flex;
  align-items: center;
  block-size: 36px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* overflow used to be hidden here, which clipped the minus/plus buttons'
     44px ::after hit areas back to 36px tall (elementFromPoint proved it).
     Nothing paints outside the pill today — the buttons exactly fill its
     height and flex-shrink:0 keeps the plus inside — so visible changes no
     pixel while letting the hit areas reach past the pill. */
  overflow: visible;
  /* As a flex item this was free to shrink below the 116px its own children
     need, and the overflow above then hid whatever no longer fit — which was
     always the plus. Lyrics could be nudged earlier but not later, on any
     window narrow enough to trigger it. */
  flex-shrink: 0;
}

.np-sync-pill {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  padding-inline: 11px;
  user-select: none;
}

/* The four round buttons beside it, same fill and blur. */
.np-lyric-action {
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 0.15s var(--ease-out);
  position: relative;
}

/* 36px paint, 44px tap: 4px per side through an empty overlay. */
.np-lyric-action::after {
  content: "";
  position: absolute;
  inset: -4px;
}

.np-lyric-action:hover {
  background: rgba(255, 255, 255, 0.18);
}

.np-lyric-action svg {
  inline-size: 17px;
  block-size: 17px;
}

.np-sync-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  inline-size: 32px;
  block-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s var(--ease-out);
  position: relative;
}

/* 32x36 paint, 44px tap: 6px per side horizontally, 4px vertically. The
   group's overflow is visible (see above) so this survives unclipped. */
.np-sync-btn::after {
  content: "";
  position: absolute;
  inset: -4px -6px;
}

.np-sync-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* The minus/plus used to be font glyphs, so the pill's look depended on the
   system font; now they are the same stroke language as every other NP icon
   (2.2px: small glyphs are drawn bolder). The 32x36 paint box and the 44px
   ::after tap area below are untouched. */
.np-sync-btn svg {
  inline-size: 15px;
  block-size: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.now-playing__lyrics {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding-block: 40px;
  padding-inline: 60px 48px;
}
.now-playing__lyrics::-webkit-scrollbar {
  display: none;
}

.np-lyric-placeholder {
  font-size: 20px;
  line-height: 28px;
  color: var(--text-dim);
}

/* ─ Up Next excerpt ─────────────────────────────────────────
   The no-lyrics state: the honest placeholder above, then the next five
   queued tracks instead of a dead zone. Rows reuse the queue row's shape at
   a tighter pad; small text over the washes gets the same shadow guard as
   the queue labels (P9), and durations use the em-dash, never 0:00. */

.np-upnext {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  margin-block-start: 20px;
  min-inline-size: 0;
}

.np-upnext__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-block-end: 8px;
}

.np-upnext__title {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}

.np-upnext__open {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s var(--ease-out);
  position: relative;
  flex: 0 0 auto;
}

/* Bare text ~20px tall; the tap area reaches 44px through an empty overlay. */
.np-upnext__open::after {
  content: "";
  position: absolute;
  inset: -12px;
}

.np-upnext__open:hover {
  color: var(--text);
}

.np-upnext__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-row);
  cursor: pointer;
  transition: background 0.15s var(--ease-out);
}

.np-upnext__row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.np-upnext__art {
  flex: 0 0 auto;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}

.np-upnext__info {
  display: flex;
  min-inline-size: 0;
  flex-direction: column;
  flex: 1;
}

.np-upnext__track,
.np-upnext__artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-upnext__track {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--text);
}

.np-upnext__artist {
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.np-upnext__duration {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 16.5px;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.np-upnext__empty {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.np-lyric-line {
  font-size: 36px;
  font-weight: 700;
  filter: blur(2.5px);
  transition: color 0.3s var(--ease-out), filter 0.3s var(--ease-out);
  line-height: 45px;
  padding-block: 12px;
  color: rgba(255, 255, 255, 0.68);
  max-inline-size: 620px;
}

.np-lyric-line--active {
  color: var(--text);
  filter: none;
}

/* ─ Popover menu ─ */
.np-menu {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 100%;
  inline-size: 248px;
  border-radius: 16px;
  padding: 8px 0;
  z-index: 100;
}

.np-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  inline-size: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  padding: 9px 16px;
  text-align: start;
  cursor: pointer;
  transition: background 0.15s var(--ease-out);
}

.np-menu__item svg {
  flex: 0 0 auto;
  inline-size: 18px;
  block-size: 18px;
  color: var(--text-muted);
}

.np-menu__item:hover svg {
  color: var(--text);
}

.np-menu__divider {
  block-size: 1px;
  margin: 6px 0;
  background: rgba(255, 255, 255, 0.1);
}

.np-menu__item:hover {
  background: rgba(255,255,255,0.08);
}


/* ─ Credits panel (now-playing overflow menu) ─────────────── */

.np-credits {
  position: absolute;
  inset-block-start: 76px;
  inset-inline-end: 32px;
  inline-size: 340px;
  max-block-size: calc(100% - 140px);
  overflow-y: auto;
  padding: 20px 22px 22px;
  border-radius: var(--radius-art-lg);
  z-index: 120;
  display: none;
}

.np-credits.is-open {
  display: block;
}

/* Panel entrances: the menu, credits, lyrics pane and right pane all toggle
   display with no transition, so they popped. Same restart-on-display trick
   as the view entrance: opacity only, no layout shift. */
@keyframes panel-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#np-menu,
.np-credits.is-open,
.now-playing__right,
.now-playing__lyrics {
  animation: panel-in 160ms var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  #np-menu,
  .np-credits.is-open,
  .now-playing__right,
  .now-playing__lyrics {
    animation: none;
  }
}

.np-credits__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 14px;
}

.np-credits__title {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}

.np-credits__row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding-block: 7px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.07);
}

.np-credits__row:first-child {
  border-block-start: 0;
}

.np-credits__key {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-block-start: 2px;
}

.np-credits__value {
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.np-credits__empty {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-muted);
}


/* ─ Queue ─────────────────────────────────────────────────────
   Shares the right-hand pane with the lyrics. */

.np-queue {
  display: flex;
  flex: 1;
  min-block-size: 0;
  flex-direction: column;
  padding-inline: 60px 48px;
  padding-block-start: 12px;
}

.np-queue__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block-end: 12px;
}

.np-queue__title {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--np-text);
}

.np-queue__clear {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s var(--ease-out);
  position: relative;
  margin-inline-start: auto;
}

/* Bare text ~20px tall; the tap area reaches 44px through an empty overlay. */
.np-queue__clear::after {
  content: "";
  position: absolute;
  inset: -12px;
}

/* New in P7: the queue's own close button. A real 44px box, not an overlay —
   there is no reference size to keep for chrome that did not exist. */
.np-queue__close {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: color 0.15s var(--ease-out), background 0.15s var(--ease-out);
  flex: 0 0 auto;
}

.np-queue__close:hover {
  color: var(--np-text);
  background: rgba(255, 255, 255, 0.08);
}

.np-queue__close svg {
  inline-size: 18px;
  block-size: 18px;
}

.np-queue__clear:hover {
  color: var(--np-text);
}

.np-queue__list {
  flex: 1;
  min-block-size: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.np-queue__list::-webkit-scrollbar {
  display: none;
}

.np-queue__label {
  margin: 16px 0 6px;
  font-size: 11px;
  line-height: 16.5px;
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  /* P9: 11px at 55% is the thinnest small text in the sheet — passes on the
     page (5.9:1) but gets the same shadow guard as the eyebrow over art. */
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.np-queue__label:first-child {
  margin-block-start: 0;
}

.np-queue__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 14px;
  border-radius: var(--radius-row);
  cursor: pointer;
  transition: background 0.15s var(--ease-out);
}

.np-queue__row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.np-queue__row.is-current {
  background: rgba(255, 255, 255, 0.1);
}

.np-queue__info {
  display: flex;
  min-inline-size: 0;
  flex-direction: column;
  flex: 1;
}

.np-queue__track,
.np-queue__artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-queue__track {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--np-text);
}

.np-queue__row.is-current .np-queue__track {
  color: var(--np-accent, var(--accent));
}

.np-queue__artist {
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.7);
  /* P9: artwork wash-out guard, as the eyebrow; invisible on dark. */
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.np-queue__duration {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 16.5px;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
  /* P9: artwork wash-out guard, as the eyebrow; invisible on dark. */
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.np-queue__empty {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.6);
  /* P9: artwork wash-out guard, as the eyebrow; invisible on dark. */
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}


/* ─ Visualiser ────────────────────────────────────────────────
   Bars over the foot of the cover. Their keyframe scales between 0.35
   and 1; here the height comes from real frequency data instead, so the
   same range is driven per bar. */

.np-eq {
  position: absolute;
  inset-block-end: 18px;
  inset-inline: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  block-size: 26px;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
  pointer-events: none;
}

.np-eq.is-live {
  opacity: 1;
}

.np-eq i {
  inline-size: 3px;
  block-size: 100%;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  transform: scaleY(0.35);
  transform-origin: bottom;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .np-eq { display: none; }
}
