/* Standalone public player. Load after styles.css and public.css. */
body.has-public-player,
body.public-site.has-public-player {
  --audio-bass: 0;
  --audio-energy: 0;
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}

.nl-player {
  --nl-cyan: #00e5ff;
  position: fixed;
  z-index: 80;
  inset: auto 0 0;
  padding: 16px max(24px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  color: #f5f8fb;
  background: #05080df5;
  border-top: 1px solid #26343e;
  box-shadow: 0 -8px 40px #0003;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  font: 400 12px/1.4 Onest, sans-serif;
}

.nl-player__inner {
  width: min(1440px, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(160px, 1.35fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 34px);
  min-height: 52px;
}

.nl-player__track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nl-player__art { position: relative; display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; background: #0a2029; border: 1px solid #18404b; overflow: hidden; }
.nl-player__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.nl-player__art span { color: var(--nl-cyan); font-size: 17px; font-weight: 800; letter-spacing: -.09em; }
.nl-player__copy { min-width: 0; }
.nl-player__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; letter-spacing: -.015em; line-height: 1.5; margin: 0 0 3px; }
.nl-player__subtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9baab8; font-size: 9px; line-height: 1.5; margin: 0; }
.nl-player__transport,
.nl-player__tools { display: flex; align-items: center; gap: 4px; }
.nl-player__button { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #bac8d2; cursor: pointer; touch-action: manipulation; }
.nl-player__button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nl-player__button:hover { background: #12232b; color: #fff; }
.nl-player__button:focus-visible,
.nl-player input:focus-visible { outline: 2px solid var(--nl-cyan); outline-offset: 3px; }
.nl-player__button:active { background: #19343e; }
.nl-player__button:disabled { opacity: .3; cursor: default; background: transparent; }
.nl-player__play { width: 48px; height: 48px; flex-basis: 48px; color: #05080d; background: var(--nl-cyan); }
.nl-player__play:hover { color: #05080d; background: #8cf4ff; }
.nl-player__play:active { color: #05080d; background: #00bbd1; }
.nl-player.is-loading .nl-player__play { box-shadow: 0 0 0 3px #00e5ff24; }
.nl-player__repeat[aria-pressed=true] { color: var(--nl-cyan); }
.nl-player__repeat[data-repeat=one] { position: relative; }
.nl-player__repeat[data-repeat=one]::after { content: '1'; position: absolute; inset: 13px auto auto 19px; font-size: 9px; font-weight: 700; background: #05080d; line-height: 16px; width: 7px; }
.nl-player__timeline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nl-player__elapsed,
.nl-player__duration { min-width: 31px; color: #a3b2bf; font-size: 9px; font-variant-numeric: tabular-nums; text-align: center; }
.nl-player input[type=range] { display: block; min-width: 0; height: 44px; margin: 0; padding: 0; border: 0; accent-color: var(--nl-cyan); cursor: pointer; background: transparent; touch-action: pan-y; }
#nl-player-seek { flex: 1; width: 100%; }
#nl-player-volume { width: 74px; }
.nl-player input[type=range]:disabled { opacity: .4; cursor: default; }
.nl-player__message { max-width: 1440px; margin: 8px auto 0; color: #ffc9a0; font-size: 11px; line-height: 1.5; }
.nl-player [hidden] { display: none !important; }
.nl-player__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

button[data-play-track] { min-width: 44px; min-height: 44px; }
button[data-play-track]:focus-visible { outline: 2px solid #00e5ff; outline-offset: 4px; }
button[data-play-track].is-playing { color: #00e5ff; }
[data-track-row].is-current { border-color: #24505e; }
[data-track-row].is-playing { background-color: #00e5ff07; }
#sound-field { pointer-events: none; }

/* Signal accents stay on artwork and a thin line, never move playback controls. */
.nl-player::before { content: ''; position: absolute; inset: -1px 10% auto; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, #00e5ff, transparent); opacity: 0; transform-origin: center; }
body.audio-reactive .nl-player::before { opacity: calc(.12 + var(--audio-energy, 0) * .6); transform: scaleX(calc(.65 + var(--audio-bass, 0) * .35)); }
body.audio-reactive .nl-player__art { box-shadow: 0 0 calc(4px + var(--audio-bass, 0) * 16px) #00e5ff30; border-color: #00e5ff80; }

button[data-motion-toggle] { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; min-width: 44px; padding: 9px 14px; border: 1px solid #29424e; border-radius: 24px; background: #071219; color: #9bb1bf; font: inherit; font-size: 11px; line-height: 1.4; cursor: pointer; touch-action: manipulation; }
button[data-motion-toggle]::before { content: ''; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: #607681; }
button[data-motion-toggle][aria-pressed=true] { color: #c2f9ff; border-color: #00e5ff66; background: #07303a66; }
button[data-motion-toggle][aria-pressed=true]::before { background: #00e5ff; box-shadow: 0 0 9px #00e5ff60; }
button[data-motion-toggle]:hover { color: #f5f8fb; border-color: #00e5ff99; }
button[data-motion-toggle]:focus-visible { outline: 2px solid #00e5ff; outline-offset: 4px; }
button[data-motion-toggle][aria-disabled=true] { color: #8da2ad; cursor: help; }

@media (max-width: 1100px) {
  .nl-player__inner { grid-template-columns: minmax(150px, 1fr) auto minmax(130px, 1fr) auto; gap: 12px; }
  #nl-player-volume { width: 52px; }
  .nl-player__tools { gap: 0; }
}

@media (max-width: 760px) {
  body.has-public-player,
  body.public-site.has-public-player { padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }
  .nl-player { padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .nl-player__inner { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
  .nl-player__track { gap: 9px; }
  .nl-player__art { width: 38px; height: 38px; flex-basis: 38px; }
  .nl-player__art span { font-size: 15px; }
  .nl-player__title { font-size: 11px; }
  .nl-player__subtitle { font-size: 8px; }
  .nl-player__transport { gap: 0; }
  .nl-player__play { width: 44px; height: 44px; flex-basis: 44px; }
  .nl-player__timeline { grid-column: 1 / -1; grid-row: 2; padding-right: 88px; gap: 8px; }
  .nl-player__tools { grid-column: 2; grid-row: 2; justify-self: end; width: 88px; }
  .nl-player__mute { width: 44px; }
  #nl-player-volume { display: none; }
  .nl-player__message { margin-top: 3px; font-size: 10px; }
}

@media (max-width: 360px) {
  .nl-player__art { display: none; }
  .nl-player { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .nl-player *, .nl-player::before, button[data-play-track], button[data-motion-toggle] { animation: none !important; transition: none !important; }
}
