:root {
  color-scheme: dark;
  --bg: #040816;
  --bg-2: #071022;
  --panel: rgba(10, 17, 38, 0.88);
  --panel-strong: #0a1126;
  --text: #fff7e8;
  --text-soft: #cfc8db;
  --muted: #9f9ab3;
  --line: rgba(255, 247, 232, 0.13);
  --line-strong: rgba(255, 247, 232, 0.24);
  --accent: #ffb347;
  --accent-2: #59e3ff;
  --accent-3: #ff5ccf;
  --focus: #6dffa8;
  --danger: #ff7b83;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --radius-sm: 14px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transport-h: 132px;
  --topbar-pad: 12px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(89, 227, 255, 0.13), transparent 38%),
    radial-gradient(circle at 88% 6%, rgba(255, 92, 207, 0.11), transparent 34%),
    radial-gradient(circle at 50% 105%, rgba(255, 179, 71, 0.1), transparent 45%);
  background-attachment: fixed;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.36;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1.5px),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.3) 0 1px, transparent 1.5px);
  background-size:
    180px 180px,
    240px 240px,
    300px 300px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

a {
  color: var(--accent-2);
}

img {
  max-width: 100%;
}

.icon {
  width: 1.2em;
  height: 1.2em;
  display: block;
  flex: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: rgba(255, 179, 71, 0.35);
}

/* ---------- app shell ---------- */

.download-line {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 14px rgba(255, 179, 71, 0.55);
  transition: width 180ms linear;
}

.app {
  min-height: 100dvh;
  padding-bottom: calc(var(--transport-h) + env(safe-area-inset-bottom, 0px) + 12px);
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(var(--topbar-pad) + env(safe-area-inset-top, 0px)) clamp(14px, 2.4vw, 28px)
    var(--topbar-pad);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(4, 8, 22, 0.94), rgba(4, 8, 22, 0.72));
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-cover {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  object-fit: cover;
  image-rendering: pixelated;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  flex: none;
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(0.92rem, 1.2vw, 1.12rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
  flex: none;
}

.status-pill[data-state="ready"]::before {
  background: var(--focus);
}

.status-pill[data-state="downloading"]::before {
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

.status-pill[data-state="offline"]::before {
  background: var(--danger);
}

.status-pill[data-state="partial"]::before {
  background: var(--accent-2);
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition:
    background 150ms ease,
    transform 150ms ease,
    border-color 150ms ease;
}

.button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  border-color: transparent;
  background: var(--accent);
  color: #1a0d00;
}

.button.primary:hover {
  background: #ffc468;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.035);
}

.button.danger {
  color: var(--danger);
}

.button.danger:hover {
  border-color: rgba(255, 123, 131, 0.5);
  background: rgba(255, 123, 131, 0.1);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  transition:
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
  flex: none;
}

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

.icon-button.toggle[aria-pressed="true"] {
  color: var(--accent);
  border-color: rgba(255, 179, 71, 0.32);
  background: rgba(255, 179, 71, 0.11);
}

.icon-button .icon {
  width: 22px;
  height: 22px;
}

.play-button {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #1a0d00;
  box-shadow:
    0 0 0 6px rgba(255, 179, 71, 0.12),
    0 12px 32px rgba(255, 179, 71, 0.24);
  transition:
    transform 150ms ease,
    background 150ms ease;
  flex: none;
}

.play-button:hover {
  background: #ffc468;
  transform: scale(1.04);
}

.play-button .icon {
  width: 30px;
  height: 30px;
}

/* ---------- layout ---------- */

.content-column {
  display: contents;
}

.layout {
  width: min(2300px, 100%);
  margin: 0 auto;
  padding: 16px clamp(12px, 2vw, 24px) 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stage {
  order: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-panel {
  order: 2;
}

.notes-panel {
  order: 3;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 22, 47, 0.94), rgba(6, 11, 26, 0.96));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.notes-head {
  align-items: center;
  flex-wrap: wrap;
}

.notes-tabs {
  margin-left: auto;
}

.panel-head h2 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.panel-body {
  min-height: 0;
}

.queue-scroll,
.notes-scroll {
  padding: 12px;
}

.stage-hint {
  margin: 0;
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 360px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: #071022;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transform: scale(1.015);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(4, 8, 22, 0.96) 0%,
      rgba(4, 8, 22, 0.7) 42%,
      rgba(4, 8, 22, 0.12) 76%
    ),
    linear-gradient(0deg, rgba(4, 8, 22, 0.92) 0%, rgba(4, 8, 22, 0.2) 55%, transparent 100%);
}

.hero-art {
  position: absolute;
  left: clamp(16px, 2.8vw, 42px);
  bottom: clamp(20px, 3.2vw, 46px);
  width: clamp(112px, 15vw, 230px);
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.55);
  background: var(--bg-2);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
}

.hero-copy {
  position: absolute;
  left: calc(clamp(16px, 2.8vw, 42px) + clamp(112px, 15vw, 230px) + clamp(16px, 2.2vw, 30px));
  right: clamp(16px, 3vw, 46px);
  bottom: clamp(20px, 3.2vw, 46px);
  max-width: 760px;
}

.hero-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 3.1vw, 3.2rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.hero-copy > p:not(.eyebrow) {
  margin-bottom: 16px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: clamp(0.72rem, 0.9vw, 0.86rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

/* ---------- queue ---------- */

.queue-head {
  flex-wrap: wrap;
}

.queue-toggle {
  display: none;
}

.tablist {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  gap: 2px;
}

.tablist button {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.tablist button[aria-selected="true"] {
  background: rgba(255, 179, 71, 0.16);
  color: var(--accent);
}

.track-list,
.playlist-list,
.playlist-track-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.track-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 58px;
  padding: 4px 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition:
    background 140ms ease,
    border-color 140ms ease;
}

.track-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.track-row.is-current {
  border-color: rgba(255, 179, 71, 0.35);
  background: linear-gradient(90deg, rgba(255, 179, 71, 0.15), rgba(255, 179, 71, 0.035));
}

.track-play {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  padding: 7px 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
}

.track-number {
  display: inline-flex;
  align-items: center;
  width: 25px;
  flex: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.track-number-text {
  display: inline;
}

.is-current .track-number {
  color: var(--accent);
}

.track-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.track-title {
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-duration {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
}

.track-actions {
  display: flex;
  align-items: center;
  gap: 0;
  opacity: 0;
  transition: opacity 140ms ease;
}

.track-row:hover .track-actions,
.track-row:focus-within .track-actions {
  opacity: 1;
}

@media (hover: none) {
  .track-actions {
    opacity: 1;
  }
}

.track-actions .icon-button {
  width: 34px;
  height: 34px;
  color: var(--muted);
}

.track-actions .icon-button:hover {
  color: var(--text);
}

.playing-bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  width: 14px;
  height: 13px;
  margin-right: 3px;
  flex: none;
}

.track-row.is-current.is-playing .track-number-text {
  display: none;
}

.track-row.is-current.is-playing .playing-bars {
  display: inline-flex;
}

.playing-bars span {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: bottom;
  animation: eq 850ms ease-in-out infinite alternate;
}

.playing-bars span:nth-child(2) {
  animation-delay: -250ms;
}

.playing-bars span:nth-child(3) {
  animation-delay: -500ms;
}

.queue-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 7px 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.queue-label strong {
  color: var(--text-soft);
  font-weight: 500;
}

/* ---------- playlists ---------- */

.playlist-create {
  display: flex;
  gap: 6px;
  padding: 2px 2px 10px;
}

.playlist-create input,
.inline-form input {
  min-width: 0;
  flex: 1;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
}

.playlist-create button {
  min-height: 40px;
}

.playlist-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.playlist-row.is-active {
  border-color: rgba(89, 227, 255, 0.34);
}

.playlist-row-main {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 5px 5px 2px;
}

.playlist-select {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  padding: 8px 6px;
  border: 0;
  background: transparent;
  text-align: left;
}

.playlist-select .icon {
  color: var(--accent-2);
  width: 19px;
  height: 19px;
}

.playlist-copy {
  min-width: 0;
}

.playlist-name {
  display: block;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-meta {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
}

.playlist-detail {
  padding: 8px 8px 10px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
}

.playlist-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 2px 8px;
}

.playlist-detail-actions .button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.74rem;
}

.playlist-track-row {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 40px;
  border-radius: 8px;
}

.playlist-track-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.playlist-track-row .track-play {
  padding: 5px 4px;
}

.playlist-track-row .track-title {
  font-size: 0.78rem;
}

.playlist-track-row .icon-button {
  width: 30px;
  height: 30px;
}

.empty-state {
  padding: 22px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-soft);
}

/* ---------- notes ---------- */

.notes-content {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.7;
}

.notes-content .notes-track {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.notes-content .notes-track h3 {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.25;
}

.notes-content .notes-track p {
  margin-bottom: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.lyric-label {
  margin: 0 0 7px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.lyric-lines {
  margin: 0 0 18px;
  color: var(--text-soft);
  line-height: 1.65;
  white-space: pre-line;
}

.lyrics-content .lyric-lines:last-child {
  margin-bottom: 0;
}

.notes-content p {
  margin-bottom: 14px;
}

.notes-content p:last-child {
  margin-bottom: 0;
}

.notes-content blockquote {
  margin: 16px 0;
  padding: 4px 0 4px 14px;
  border-left: 3px solid var(--accent-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.65;
  white-space: pre-line;
}

.reflection {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ---------- transport ---------- */

.transport {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px clamp(12px, 2.4vw, 28px) calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(8, 14, 33, 0.92), rgba(4, 8, 22, 0.98));
  backdrop-filter: blur(22px);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.42);
}

.transport-track {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.transport-track img {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 9px;
  object-fit: cover;
  image-rendering: pixelated;
  flex: none;
}

.transport-track-copy {
  min-width: 0;
}

.transport-track-copy p {
  margin: 0;
}

#transport-title {
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#transport-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.transport-center {
  min-width: 0;
}

.transport-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 0.8vw, 10px);
}

.transport-progress {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  margin-top: 1px;
}

.time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.seek,
.volume-slider {
  --fill: 0%;
  width: 100%;
  height: 24px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.seek::-webkit-slider-runnable-track,
.volume-slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--accent) var(--fill),
    rgba(255, 255, 255, 0.16) var(--fill)
  );
}

.seek::-webkit-slider-thumb,
.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -4.5px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 2px var(--accent);
}

.seek::-moz-range-track,
.volume-slider::-moz-range-track {
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.seek::-moz-range-progress,
.volume-slider::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
}

.seek::-moz-range-thumb,
.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--text);
}

.transport-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.volume {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.volume .icon-button {
  width: 38px;
  height: 38px;
}

.volume-slider {
  width: min(110px, 9vw);
}

.volume-slider::-webkit-slider-runnable-track {
  height: 4px;
}

.transport-status {
  min-height: 32px;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.64rem;
}

/* ---------- fullscreen view ---------- */

body.fullscreen-open {
  overflow: hidden;
}

.fullscreen-view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #02040d;
  color: var(--text);
  overflow: hidden;
}

.fullscreen-view::backdrop {
  background: #02040d;
}

.fs-stage,
.fs-artwork-layer,
.fs-viz-layer,
.fs-viz {
  position: absolute;
  inset: 0;
}

.fs-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.fs-shade {
  display: none;
}

.fs-caption {
  position: absolute;
  z-index: 3;
  left: max(24px, env(safe-area-inset-left, 0px));
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  max-width: min(32vw, 560px);
  pointer-events: none;
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.85),
    0 0 3px rgba(0, 0, 0, 0.95);
}

.fs-caption-title {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 3vw, 3.4rem);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.fs-caption-time {
  margin: 0;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: clamp(0.72rem, 0.9vw, 0.9rem);
}

.fullscreen-view[data-mode="visualiser"] .fs-caption {
  display: none;
}

.fs-viz-layer {
  background: #02040d;
}

.fs-viz canvas {
  width: 100%;
  height: 100%;
}

.fs-topbar {
  position: absolute;
  z-index: 7;
  top: max(16px, env(safe-area-inset-top, 0px));
  left: max(16px, env(safe-area-inset-left, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.fs-mode-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(4, 8, 22, 0.56);
  backdrop-filter: blur(14px);
}

.fs-mode-switch button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.fs-mode-switch button[aria-pressed="true"] {
  background: rgba(255, 179, 71, 0.16);
  color: var(--accent);
}

.fs-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fs-close,
.fs-hide-button {
  border: 1px solid var(--line-strong);
  background: rgba(3, 7, 20, 0.58);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.fs-ui {
  position: absolute;
  z-index: 5;
  right: clamp(16px, 4vw, 48px);
  bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  width: min(540px, calc(100vw - 32px));
  max-height: min(74dvh, 720px);
  display: flex;
  flex-direction: column;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.fs-ui-head {
  align-items: center;
  padding: 10px 12px;
}

.fs-status {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  text-align: right;
}

.fs-ui-body {
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  scrollbar-width: thin;
}

.fs-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fs-now {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fs-art {
  width: 68px;
  height: 68px;
  flex: none;
  object-fit: cover;
  image-rendering: pixelated;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

.fs-now-copy {
  min-width: 0;
}

.fs-title {
  margin: 0 0 4px;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.fs-meta {
  margin: 0;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.fs-progress {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
}

.fs-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.fs-play {
  width: 58px;
  height: 58px;
}

.fs-play .icon {
  width: 27px;
  height: 27px;
}

.fs-skip {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(3, 7, 20, 0.4);
  backdrop-filter: blur(8px);
}

.fs-skip .icon {
  width: 22px;
  height: 22px;
}

.fs-notes {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.62;
}

.fs-notes p {
  margin: 0 0 10px;
}

.fs-notes p:last-child {
  margin-bottom: 0;
}

.fs-notes blockquote {
  margin: 12px 0;
  padding: 2px 0 2px 12px;
  border-left: 3px solid var(--accent-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
  white-space: pre-line;
}

.fs-lab-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.55;
}

.fs-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.fs-field select,
.fs-upload {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: normal;
  text-transform: none;
}

.fs-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.fs-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.fs-lab-audio {
  width: 100%;
  height: 34px;
}

.fs-lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fs-lab-actions .button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.74rem;
}

.fullscreen-view.is-idle .fs-topbar,
.fullscreen-view.is-idle .fs-ui {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.fs-hint {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 4, 13, 0.52);
  backdrop-filter: blur(7px);
}

.fs-hint-card {
  width: min(470px, 100%);
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 24, 51, 0.98), rgba(6, 11, 26, 0.98));
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
}

.fs-hint-card h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.fs-hint-card p {
  margin-bottom: 18px;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.6;
}

.fs-hint-card .button {
  width: 100%;
}

@media (orientation: portrait) {
  .fs-ui {
    left: max(14px, env(safe-area-inset-left, 0px));
    right: max(14px, env(safe-area-inset-right, 0px));
    width: auto;
    max-height: min(64dvh, 640px);
  }

  .fs-caption {
    top: max(82px, calc(env(safe-area-inset-top, 0px) + 82px));
    bottom: auto;
    max-width: calc(100vw - 28px);
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .fs-topbar {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .fs-ui {
    right: 10px;
    bottom: 10px;
    width: min(470px, calc(100vw - 20px));
    max-height: calc(100dvh - 74px);
  }

  .fs-ui-body {
    padding: 12px;
  }

  .fs-art {
    width: 52px;
    height: 52px;
  }

  .fs-title {
    font-size: 1rem;
  }

  .fs-notes {
    font-size: 0.76rem;
  }

  .fs-caption {
    max-width: min(38vw, 320px);
  }

  .fs-caption-title {
    font-size: clamp(1rem, 2.2vw, 1.5rem);
  }

  .fullscreen-view .update-banner {
    top: 64px;
    left: 10px;
    right: auto;
    width: min(340px, calc(100vw - 20px));
    transform: none;
  }
}

@media (min-width: 1600px) {
  .fs-ui {
    width: 620px;
    max-height: min(72dvh, 760px);
  }

  .fs-title {
    font-size: 1.55rem;
  }

  .fs-art {
    width: 82px;
    height: 82px;
  }

  .fs-play {
    width: 66px;
    height: 66px;
  }
}

/* ---------- update banner ---------- */

.update-banner {
  position: fixed;
  z-index: 55;
  left: 50%;
  bottom: calc(var(--transport-h) + env(safe-area-inset-bottom, 0px) + 18px);
  width: min(560px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 24, 51, 0.98), rgba(6, 11, 26, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.update-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.update-copy strong {
  font-size: 0.85rem;
}

.update-copy span {
  color: var(--text-soft);
  font-size: 0.72rem;
}

.update-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.update-actions .button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.76rem;
}

.fullscreen-view .update-banner {
  position: absolute;
  top: max(76px, calc(env(safe-area-inset-top, 0px) + 76px));
  bottom: auto;
  z-index: 25;
}

/* ---------- settings toggles ---------- */

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  cursor: pointer;
}

.switch-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: none;
}

.switch-row span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-row small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.onboarding-dialog:focus,
.onboarding-dialog:focus-visible {
  outline: none;
}

/* ---------- onboarding ---------- */

.onboarding-dialog {
  width: min(620px, calc(100vw - 24px));
}

.onboarding-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.onboarding-hero img {
  width: 96px;
  height: 96px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  object-fit: cover;
  image-rendering: pixelated;
}

.onboarding-hero p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.onboarding-section {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.onboarding-section h3 {
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.onboarding-section p {
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.55;
}

.onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.onboarding-actions .button {
  flex: 1;
  min-width: 150px;
}

@media (max-width: 520px) {
  .onboarding-hero {
    align-items: flex-start;
  }

  .onboarding-hero img {
    width: 72px;
    height: 72px;
  }

  .update-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .update-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ---------- dialogs ---------- */

.dialog {
  width: min(600px, calc(100vw - 24px));
  max-height: min(88dvh, 820px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.dialog::backdrop {
  background: rgba(2, 4, 12, 0.74);
  backdrop-filter: blur(9px);
}

.dialog-inner {
  max-height: min(88dvh, 820px);
  padding: 22px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: linear-gradient(180deg, #0d1733, #060b1a);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dialog-head h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.settings-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.settings-section h3 {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.95rem;
}

.settings-section p {
  margin-bottom: 10px;
}

.fine-print {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  accent-color: var(--accent);
}

progress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.1);
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

.playlist-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.playlist-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.playlist-choice:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.075);
}

.playlist-choice small {
  color: var(--muted);
  font-family: var(--mono);
}

.inline-form {
  display: flex;
  gap: 8px;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--transport-h) + env(safe-area-inset-bottom, 0px) + 18px);
  z-index: 60;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(12, 20, 44, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 0.8rem;
  text-align: center;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.noscript {
  position: fixed;
  inset: auto 12px 12px;
  z-index: 90;
  padding: 16px;
  border-radius: 12px;
  background: #2a1530;
  color: var(--text);
}

/* ---------- responsive ---------- */

@media (min-width: 700px) and (max-width: 1179px) {
  :root {
    --transport-h: 108px;
  }

  .layout {
    display: grid;
    height: calc(100dvh - var(--transport-h) - 100px);
    min-height: 0;
    overflow: hidden;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    grid-template-areas: "queue content";
    align-items: stretch;
  }

  .queue-panel {
    grid-area: queue;
    height: 100%;
    max-height: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .queue-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
    scrollbar-width: thin;
  }

  .content-column {
    grid-area: content;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
    scrollbar-width: thin;
  }

  .stage {
    flex: 0 0 auto;
    min-height: 0;
  }

  .hero {
    flex: none;
    min-height: 380px;
  }

  .notes-panel {
    flex: 1 0 auto;
    min-height: 280px;
    display: flex;
    flex-direction: column;
  }
}

@media (min-width: 1180px) {
  :root {
    --transport-h: 96px;
    --topbar-pad: 14px;
  }

  body {
    overflow: hidden;
  }

  .app {
    height: 100dvh;
    padding-bottom: 0;
    overflow: hidden;
  }

  .topbar {
    position: relative;
  }

  .layout {
    display: grid;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 16px 20px 18px;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(300px, 390px);
    grid-template-areas: "queue stage notes";
    align-items: stretch;
  }

  .stage {
    grid-area: stage;
    min-height: 0;
    height: 100%;
  }

  .queue-panel {
    grid-area: queue;
  }

  .notes-panel {
    grid-area: notes;
  }

  .hero {
    flex: 1;
    min-height: 0;
  }

  .queue-panel,
  .notes-panel {
    height: 100%;
    max-height: none;
    position: static;
    display: flex;
    flex-direction: column;
  }

  .queue-scroll,
  .notes-scroll {
    flex: 1;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
    scrollbar-width: thin;
  }

  .transport {
    position: static;
    width: 100%;
  }

  .toast {
    bottom: calc(var(--transport-h) + 24px);
  }
}

@media (max-width: 699px) {
  .queue-toggle {
    display: inline-grid;
  }

  .queue-panel.is-collapsed .queue-scroll {
    display: none;
  }

  .queue-panel.is-collapsed .panel-head {
    border-bottom: 0;
  }

  .hero {
    min-height: 330px;
  }

  .hero-copy {
    left: clamp(14px, 4vw, 28px);
    right: clamp(14px, 4vw, 28px);
    bottom: clamp(18px, 4vw, 30px);
  }

  .hero-art {
    top: clamp(14px, 4vw, 24px);
    left: clamp(14px, 4vw, 28px);
    bottom: auto;
    width: clamp(96px, 24vw, 150px);
  }

  .hero-copy {
    padding-left: 0;
  }

  .hero-shade {
    background:
      linear-gradient(
        0deg,
        rgba(4, 8, 22, 0.97) 0%,
        rgba(4, 8, 22, 0.72) 48%,
        rgba(4, 8, 22, 0.12) 100%
      ),
      linear-gradient(90deg, rgba(4, 8, 22, 0.72), transparent 75%);
  }

  .hero-copy h2 {
    font-size: clamp(1.55rem, 7.2vw, 2.8rem);
  }
}

@media (max-width: 900px) {
  .transport {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .transport-track,
  .transport-side {
    display: none;
  }

  .transport-controls {
    gap: 4px;
  }

  .transport-progress {
    margin-top: -1px;
  }

  .play-button {
    width: 56px;
    height: 56px;
  }

  .play-button .icon {
    width: 27px;
    height: 27px;
  }

  .transport .icon-button {
    width: 40px;
    height: 40px;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand-cover {
    width: 44px;
    height: 44px;
  }

  .status-pill {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .install-button span {
    display: none;
  }

  .install-button {
    width: 42px;
    padding: 0;
  }
}

@media (max-width: 520px) {
  .brand-copy h1 {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .status-pill {
    display: none;
  }

  .hero {
    min-height: 355px;
  }

  .hero-copy > p:not(.eyebrow) {
    margin-bottom: 12px;
  }

  .hero-actions .button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.78rem;
  }

  .panel-head {
    padding: 13px 14px 11px;
  }

  .queue-scroll,
  .notes-scroll {
    padding: 9px;
  }

  .track-actions {
    opacity: 1;
  }

  .track-actions .icon-button {
    width: 31px;
    height: 31px;
  }

  .notes-content {
    font-size: 0.84rem;
  }

  .inline-form {
    flex-direction: column;
  }

  .dialog-inner {
    padding: 18px;
  }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 1100px) {
  :root {
    --transport-h: 92px;
    --topbar-pad: 8px;
  }

  .topbar {
    position: relative;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .brand-cover {
    width: 38px;
    height: 38px;
  }

  .brand-copy h1 {
    font-size: 0.9rem;
  }

  .hero {
    min-height: 250px;
  }

  .hero-art {
    width: 78px;
    top: 12px;
    left: 12px;
  }

  .hero-copy {
    left: 104px;
    right: 14px;
    bottom: 12px;
  }

  .hero-copy h2 {
    font-size: clamp(1.05rem, 3.4vw, 1.6rem);
  }

  .hero-actions {
    display: none;
  }

  .stage-hint {
    display: none;
  }

  .transport {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 5px;
    padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));
  }

  .transport-track,
  .transport-side {
    display: none;
  }

  .transport-controls {
    gap: 2px;
  }

  .play-button {
    width: 48px;
    height: 48px;
  }

  .transport .icon-button {
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 1600px) {
  :root {
    --transport-h: 110px;
    --topbar-pad: 18px;
    --radius: 26px;
  }

  html {
    font-size: 18px;
  }

  .topbar {
    padding-left: 28px;
    padding-right: 28px;
  }

  .brand-cover {
    width: 60px;
    height: 60px;
  }

  .layout {
    grid-template-columns: minmax(340px, 400px) minmax(0, 1fr) minmax(360px, 460px);
    gap: 22px;
    padding: 20px 28px 24px;
  }

  .hero-art {
    width: 270px;
    border-radius: 22px;
  }

  .hero-copy {
    left: calc(28px + 270px + 34px);
  }

  .icon-button {
    width: 50px;
    height: 50px;
  }

  .play-button {
    width: 74px;
    height: 74px;
  }

  .play-button .icon {
    width: 34px;
    height: 34px;
  }

  .track-row {
    min-height: 64px;
  }

  .track-title {
    font-size: 0.94rem;
  }

  :focus-visible {
    outline-width: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes eq {
  from {
    transform: scaleY(0.3);
  }
  to {
    transform: scaleY(1);
  }
}

/* ---------- licence / preview ---------- */

.unlock-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.unlock-button .icon {
  width: 15px;
  height: 15px;
}

.track-row.is-locked {
  opacity: 0.55;
}

.track-row.is-locked:hover {
  background: rgba(255, 255, 255, 0.025);
}

.track-row.is-locked .track-title {
  color: var(--text-soft);
}

.track-row.is-locked .track-number,
.track-row.is-locked .track-duration {
  color: var(--muted);
}

.track-lock {
  display: inline-flex;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  vertical-align: -2px;
  color: var(--accent-2);
}

.mode-lock-icon {
  width: 12px;
  height: 12px;
  margin-left: 5px;
  vertical-align: -2px;
}

.fs-mode-switch button.is-locked {
  border: 1px dashed rgba(255, 233, 196, 0.28);
  color: var(--muted);
}

.fs-mode-switch button.is-locked[aria-pressed="true"] {
  background: transparent;
  color: var(--muted);
}

.unlock-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.unlock-hero img {
  flex: none;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.unlock-lead {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.unlock-benefits {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.65;
}

.unlock-benefits li::marker {
  color: var(--accent);
}

.unlock-buy {
  width: 100%;
  margin: 8px 0 6px;
}

.unlock-price {
  margin-bottom: 16px;
}

.unlock-form {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.unlock-form-title {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.unlock-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.unlock-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.86rem;
  letter-spacing: normal;
  text-transform: none;
}

.unlock-form input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.unlock-form .button {
  margin-top: 2px;
}

.unlock-status {
  min-height: 1.3em;
  margin: 10px 0 0;
  color: var(--accent);
  font-size: 0.8rem;
  line-height: 1.45;
}

.unlock-status[data-state="error"] {
  color: var(--danger);
}

@media (max-width: 520px) {
  .unlock-button {
    width: 42px;
    padding: 0;
  }

  .unlock-button span {
    display: none;
  }

  .unlock-hero {
    gap: 12px;
  }

  .unlock-hero img {
    width: 72px;
    height: 72px;
  }
}
