:root {
  --bg: #050507;
  --panel: #0d0d12;
  --panel-2: color-mix(in srgb, var(--accent) 6%, #111118);
  --panel-3: color-mix(in srgb, var(--accent) 13%, #15151e);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f7f4ff;
  --muted: #b8b1c8;
  --quiet: #7d758d;
  --accent: #7d3cff;
  --accent-2: #9f65ff;
  --accent-3: #d0b5ff;
  --accent-dark: #3f1e90;
  --accent-rgb: 125, 60, 255;
  --danger: #ff5579;
  --gold: #efad45;
  --cyan: #46d0d9;
  --green: #49d39d;
  --radius: 8px;
  --bar-height: 92px;
  --titlebar-height: 44px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}



.pairing-code {
  margin-top: 10px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}


* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  min-width: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow: visible;
}

.startup-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  --startup-progress: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 54%, rgba(8, 6, 18, 0.04), rgba(2, 3, 10, 0.2) 58%, rgba(2, 3, 10, 0.32) 100%),
    linear-gradient(180deg, rgba(4, 5, 13, 0.24), rgba(4, 4, 10, 0.06) 38%, rgba(5, 6, 14, 0.14)),
    #04050b;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 360ms ease,
    visibility 360ms ease;
}

html.electron-shell .startup-loader {
  top: var(--titlebar-height);
}

.startup-loader-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.startup-loader::before,
.startup-loader::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.startup-loader::before {
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.12), transparent 14%),
    radial-gradient(circle at 50% 67%, rgba(82, 39, 210, 0.1), transparent 21%),
    linear-gradient(90deg, rgba(83, 31, 150, 0.18), transparent 31%, transparent 69%, rgba(0, 179, 217, 0.16)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 38%, rgba(0, 0, 0, 0.06));
  opacity: 0.72;
}

.startup-loader::after {
  z-index: 0;
  left: 12%;
  right: 12%;
  top: 17%;
  height: 62%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.18), transparent 58%),
    linear-gradient(135deg, transparent 16%, rgba(153, 74, 255, 0.18) 36%, transparent 38%, transparent 61%, rgba(0, 225, 236, 0.14) 81%, transparent 83%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 72%);
  opacity: 0.58;
  animation: startupAura 5.8s ease-in-out infinite alternate;
}

.startup-loader.is-complete {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.startup-loader-panel {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(620px, 100%);
  text-align: center;
  transform: translateY(-2px);
}

.startup-loader-logo {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(180, 145, 255, 0.64),
    0 0 0 6px rgba(62, 35, 125, 0.2),
    0 24px 54px rgba(0, 0, 0, 0.46),
    0 0 42px rgba(var(--accent-rgb), 0.42),
    0 0 48px rgba(33, 225, 225, 0.16);
}

.startup-loader-copy {
  margin-top: 20px;
}

.startup-loader-copy h1 {
  margin: 0;
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 900;
  color: #fbf8ff;
  text-shadow:
    0 0 20px rgba(176, 103, 255, 0.48),
    0 0 34px rgba(24, 221, 232, 0.2),
    0 12px 40px rgba(var(--accent-rgb), 0.38);
}

.startup-loader-copy p {
  margin: 8px 0 0;
  color: #c6a5ff;
  font-size: 20px;
  font-weight: 760;
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.38);
}

.startup-loader-progress {
  width: min(420px, 86vw);
  margin-top: 34px;
}

.startup-loader-progress-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(8, 7, 20, 0.9);
  box-shadow:
    0 0 0 1px rgba(190, 160, 255, 0.22),
    0 18px 44px rgba(0, 0, 0, 0.4),
    inset 0 0 18px rgba(0, 0, 0, 0.52);
}

.startup-loader-progress-track::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(90deg, rgba(29, 230, 242, 0.12), rgba(var(--accent-rgb), 0.14), rgba(181, 85, 255, 0.12));
  opacity: 0.55;
}

.startup-loader-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #1de6f2 0%, var(--accent) 52%, #b554ff 100%);
  box-shadow:
    0 0 24px rgba(29, 230, 242, 0.42),
    0 0 36px rgba(var(--accent-rgb), 0.5),
    0 0 30px rgba(181, 85, 255, 0.34);
  transform-origin: left center;
  transform: scaleX(var(--startup-progress));
  transition: transform 720ms cubic-bezier(0.2, 0.82, 0.22, 1);
  animation:
    startupProgressPulse 1.4s ease-in-out infinite alternate;
}

.startup-loader-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.7) 48%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0.54;
  animation: startupProgressSheen 1.5s ease-in-out infinite;
}

.startup-loader-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: #d9d7e9;
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.42);
}

.startup-loader-stage {
  position: relative;
  margin-top: 24px;
  color: #d9d7e9;
  font-size: 18px;
  font-weight: 760;
  text-shadow: 0 0 18px rgba(107, 72, 210, 0.38);
}

.startup-loader-stage::before,
.startup-loader-stage::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 22px 4px;
  border-radius: 50%;
  background: #b555ff;
  box-shadow: 0 0 13px rgba(181, 85, 255, 0.85);
}

.startup-loader-stage::after {
  background: #20e2e7;
  box-shadow: 0 0 13px rgba(32, 226, 231, 0.85);
}

.startup-loader.is-error .startup-loader-progress-fill {
  animation: none;
  background: linear-gradient(90deg, var(--danger), #ff8fa7);
}

.startup-loader.is-error .startup-loader-copy p,
.startup-loader.is-error .startup-loader-stage {
  color: #ff8fa7;
}

@keyframes startupProgressPulse {
  from {
    filter: saturate(1) brightness(0.9);
  }

  to {
    filter: saturate(1.25) brightness(1.18);
  }
}

@keyframes startupProgressSheen {
  from {
    transform: translateX(-115%);
  }

  to {
    transform: translateX(115%);
  }
}

@keyframes startupAura {
  from {
    transform: scale(0.98);
    opacity: 0.72;
  }

  to {
    transform: scale(1.04);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .startup-loader {
    padding: 20px;
  }

  .startup-loader-logo {
    width: 86px;
    height: 86px;
    border-radius: 20px;
  }

  .startup-loader-copy h1 {
    font-size: 40px;
  }

  .startup-loader-copy p {
    font-size: 15px;
  }

  .startup-loader-progress {
    width: min(340px, 88vw);
    margin-top: 24px;
  }

  .startup-loader-stage {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .startup-loader::after,
  .startup-loader-progress-fill,
  .startup-loader-progress-fill::after {
    animation: none;
  }

  .startup-loader-progress-fill {
    transform: scaleX(0.82);
  }
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, filter 160ms ease;
}

a.tool-button {
  color: inherit;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, filter 160ms ease;
}

button:not(:disabled)::after,
a.tool-button::after {
  content: "";
  position: absolute;
  inset: -42%;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--click-x, 50%) var(--click-y, 50%), rgba(255, 255, 255, 0.62) 0, rgba(var(--accent-rgb), 0.38) 24%, rgba(var(--accent-rgb), 0.12) 52%, transparent 72%);
  opacity: 0;
  transform: scale(0.32);
}

button:not(:disabled):active,
a.tool-button:active {
  filter: brightness(1.14);
  transform: translateY(1px) scale(0.97);
}

button.button-click-feedback:not(:disabled),
a.tool-button.button-click-feedback {
  animation: buttonClickPress 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

button.button-click-feedback:not(:disabled)::after,
a.tool-button.button-click-feedback::after {
  animation: buttonClickRipple 460ms cubic-bezier(0.16, 1, 0.3, 1);
}

button:disabled::after {
  content: none;
}

@keyframes buttonClickPress {
  0% {
    filter: brightness(1);
    transform: scale(1);
  }

  38% {
    filter: brightness(1.24);
    transform: scale(0.94);
  }

  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

@keyframes buttonClickRipple {
  0% {
    opacity: 0.72;
    transform: scale(0.24);
  }

  58% {
    opacity: 0.42;
  }

  100% {
    opacity: 0;
    transform: scale(1.42);
  }
}

@media (prefers-reduced-motion: reduce) {
  button,
  a.tool-button {
    transition: filter 120ms ease;
  }

  button:not(:disabled):active,
  a.tool-button:active {
    transform: none;
  }

  button.button-click-feedback:not(:disabled),
  a.tool-button.button-click-feedback {
    animation: none;
    filter: brightness(1.16);
  }

  button.button-click-feedback:not(:disabled)::after,
  a.tool-button.button-click-feedback::after {
    animation: none;
    opacity: 0.26;
    transform: none;
  }
}

[hidden] {
  display: none !important;
}

.desktop-titlebar {
  display: none;
}

html.electron-shell .desktop-titlebar {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  height: var(--titlebar-height);
  padding-left: 14px;
  overflow: hidden;
  user-select: none;
  -webkit-app-region: drag;
  background:
    radial-gradient(circle at 10% -120%, rgba(var(--accent-rgb), 0.5), transparent 38%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent-dark) 42%, rgba(8, 7, 13, 0.98)), rgba(8, 7, 13, 0.98));
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 22px rgba(var(--accent-rgb), 0.24);
}

html.electron-shell .desktop-titlebar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.45), transparent);
  pointer-events: none;
}

.desktop-titlebar-brand {
  display: grid;
  grid-template-columns: 26px auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--text);
}

.desktop-titlebar-brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.38);
}

.desktop-titlebar-drag {
  min-width: 24px;
  height: 100%;
}

.desktop-window-controls {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 46px);
  height: 100%;
  -webkit-app-region: no-drag;
}

.desktop-window-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 100%;
  color: rgba(247, 244, 255, 0.86);
  background: transparent;
}

.desktop-window-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.desktop-window-button.close:hover {
  background: #c42b4f;
  color: #fff;
}

.desktop-window-button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.window-icon-restore,
html.window-maximized .window-icon-maximize {
  display: none;
}

html.window-maximized .window-icon-restore {
  display: block;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 330px;
  grid-template-rows: minmax(0, 1fr) var(--bar-height);
  height: 100vh;
  min-width: 0;
  gap: 8px;
  padding: 8px;
  background:
    radial-gradient(circle at 48% -20%, rgba(var(--accent-rgb), 0.24), transparent 36%),
    var(--bg);
}

html.electron-shell .app-shell {
  height: calc(100vh - var(--titlebar-height));
  padding-top: 0;
}

.app-shell.chords-open {
  grid-template-columns: 240px minmax(0, 1fr) minmax(380px, 440px);
}

.sidebar,
.queue-panel,
.main-panel {
  min-height: 0;
  background: rgba(13, 13, 18, 0.96);
  border: 1px solid var(--line);
}

.sidebar {
  grid-row: 1 / 2;
  border-radius: var(--radius);
  padding: 18px 12px;
  overflow: hidden;
}

.main-panel {
  grid-row: 1 / 2;
  border-radius: var(--radius);
  container: main-panel / inline-size;
  overflow: auto;
}

.queue-panel {
  grid-row: 1 / 2;
  border-radius: var(--radius);
  padding: 18px 12px;
  overflow: hidden;
}

.brand-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 6px 18px;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  overflow: hidden;
  background: #050507;
  box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.36);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  font-weight: 800;
}

.brand-subtitle,
.surface-meta,
.queue-count,
.player-artist,
.song-subtitle,
.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.surface-copy,
.brand-row > div,
.song-copy,
.queue-item > div,
.player-copy {
  min-width: 0;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-home-group {
  display: grid;
  gap: 3px;
}

.nav-voidfm-icon {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: cover;
}

.nav-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: var(--panel-3);
  color: var(--text);
}

.nav-sublinks {
  display: grid;
  gap: 2px;
  padding-left: 34px;
}

.nav-subitem {
  min-height: 30px;
  padding: 0 10px;
  overflow: hidden;
  border-radius: 6px;
  background: transparent;
  color: var(--quiet);
  font-size: 13px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-subitem:hover,
.nav-subitem.active {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.nav-item svg,
.icon-button svg,
.tool-button svg,
.primary-button svg,
.round-play svg,
.play-button svg,
.search-icon svg,
.volume-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.volume-muted-icon .mute-x {
  stroke: var(--danger);
}

.sidebar-section {
  margin-top: 20px;
  padding: 0 6px;
}

.section-title {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.label-help {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

.label-help > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.help-dot {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--quiet);
  cursor: help;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
}

.help-dot:hover,
.help-dot:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.58);
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--text);
  outline: none;
}

.sidebar-playlists {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.sidebar-playlist {
  display: block;
  width: 100%;
  padding: 9px 8px;
  overflow: hidden;
  border-left: 2px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-playlist[draggable="true"] {
  cursor: grab;
}

.sidebar-playlist[draggable="true"]:active {
  cursor: grabbing;
}

.sidebar-playlist:hover,
.sidebar-playlist.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.sidebar-playlist.has-playlist-text {
  color: var(--playlist-text);
}

.sidebar-playlist.has-playlist-highlight {
  border-left-color: var(--playlist-highlight);
  background: rgba(var(--playlist-highlight-rgb), 0.12);
}

.sidebar-playlist.has-playlist-text:hover,
.sidebar-playlist.has-playlist-text.active {
  color: var(--playlist-text);
}

.sidebar-playlist.has-playlist-highlight:hover,
.sidebar-playlist.has-playlist-highlight.active {
  background: rgba(var(--playlist-highlight-rgb), 0.22);
}

.sidebar-playlist.is-dragging {
  opacity: 0.48;
}

.sidebar-playlist.drag-over-before {
  box-shadow: 0 -2px 0 var(--accent);
}

.sidebar-playlist.drag-over-after {
  box-shadow: 0 2px 0 var(--accent);
}

.sidebar-playlist.drag-over-playlist {
  background: rgba(var(--accent-rgb), 0.2);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.78);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(220px, 420px) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: rgba(13, 13, 18, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.history-buttons,
.transport-controls,
.surface-actions,
.volume-row,
.progress-row,
.row-actions,
.queue-header {
  display: flex;
  align-items: center;
}

.history-buttons,
.transport-controls,
.row-actions {
  gap: 8px;
}

.search-field {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  height: 42px;
  border-radius: 999px;
  padding: 0 14px;
  background: var(--panel-3);
  border: 1px solid transparent;
}

.search-field:focus-within {
  border-color: rgba(var(--accent-rgb), 0.7);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-field input::placeholder {
  color: var(--quiet);
}

.icon-button,
.tool-button,
.primary-button,
.play-button,
.round-play {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 999px;
}

.icon-button {
  width: 36px;
  height: 36px;
  background: transparent;
  color: var(--muted);
}

.icon-button:hover,
.icon-button.active {
  background: var(--panel-3);
  color: var(--text);
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.icon-button:disabled:hover {
  background: transparent;
  color: var(--muted);
}

.primary-button,
.tool-button {
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 0;
  grid-auto-flow: column;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.primary-button span,
.tool-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primary-button {
  justify-self: end;
}

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

.tool-button.active {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--text);
}

.danger-button {
  border-color: rgba(255, 85, 121, 0.32);
  color: #ffb1c2;
}

.danger-button:hover {
  background: rgba(255, 85, 121, 0.14);
}

.tool-button:disabled {
  cursor: default;
  opacity: 0.82;
}

.primary-button:disabled {
  cursor: default;
  opacity: 0.82;
}

.primary-button:disabled svg,
.tool-button:disabled svg {
  animation: none;
}

.primary-button:disabled svg:first-child,
.tool-button:disabled svg:first-child {
  opacity: 0.9;
}

.enrich-button.is-running {
  border-color: rgba(73, 211, 157, 0.35);
  background: rgba(73, 211, 157, 0.1);
  color: var(--text);
}

.enrich-button.is-running svg {
  animation: spinRefresh 0.9s linear infinite;
}

@keyframes spinRefresh {
  to {
    transform: rotate(360deg);
  }
}

.now-surface {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: end;
  gap: 24px;
  padding: 32px 30px 28px;
  min-height: 300px;
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), 0.54), rgba(20, 19, 27, 0.86) 58%),
    var(--panel);
}

.now-surface.utility-surface {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 148px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    var(--panel);
}

.now-surface.hidden-surface {
  display: none;
}

.now-surface.playlist-custom-surface {
  background: var(--playlist-hero-background);
}

.now-surface.playlist-custom-surface h1 {
  color: #fff;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.62),
    0 0 14px rgba(0, 0, 0, 0.72),
    1px 1px 0 rgba(0, 0, 0, 0.76),
    -1px 1px 0 rgba(0, 0, 0, 0.76),
    1px -1px 0 rgba(0, 0, 0, 0.76),
    -1px -1px 0 rgba(0, 0, 0, 0.76);
}

.now-surface.playlist-custom-surface .eyebrow,
.now-surface.playlist-custom-surface .surface-meta {
  color: #fff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.72),
    0 0 10px rgba(0, 0, 0, 0.68);
}

.cover-stack {
  position: relative;
  width: 220px;
  height: 220px;
}

.cover-tile,
.mini-art,
.song-art,
.queue-art,
.browser-card-art {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02)),
    var(--accent);
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

.cover-tile {
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cover-stack.single-cover .cover-tile {
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover-tile:nth-child(1) {
  left: 0;
  bottom: 0;
}

.cover-tile:nth-child(2) {
  right: 0;
  bottom: 22px;
}

.cover-tile:nth-child(3) {
  left: 44px;
  top: 0;
}

.eyebrow {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

h1 {
  margin: 8px 0 10px;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0;
}

.surface-actions {
  gap: 10px;
  margin-top: 22px;
}

.round-play {
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.5);
}

.round-play:hover,
.play-button:hover {
  transform: scale(1.04);
}

.view {
  display: none;
  padding: 0 22px 28px;
}

.view.active {
  display: block;
}

.library-toolbar,
.playlist-grid,
.rule-grid {
  display: grid;
  gap: 12px;
}

.library-toolbar {
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 58px;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.filter-toolbar.has-filter-value {
  grid-template-columns: minmax(100px, 0.7fr) minmax(120px, 0.85fr) minmax(150px, 1fr) auto;
}

.filter-toolbar .tool-button {
  justify-self: end;
  width: auto;
  min-width: 78px;
}

.filter-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.filter-field select {
  height: 34px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  padding: 0 10px;
  background: var(--panel-3);
  color: var(--text);
}

.row-actions.playlist-detail-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.playlist-search-field {
  display: grid;
  grid-template-columns: 18px minmax(150px, 1fr);
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  max-width: 320px;
  height: 38px;
  min-width: 230px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-3);
  color: var(--muted);
}

.playlist-search-field:focus-within {
  border-color: rgba(var(--accent-rgb), 0.7);
}

.playlist-search-field .search-icon {
  display: flex;
  color: var(--quiet);
}

.playlist-search-field .search-icon svg {
  width: 18px;
  height: 18px;
}

.playlist-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.playlist-search-field input::placeholder {
  color: var(--quiet);
}

.playlist-sort-field {
  display: inline-grid;
  grid-template-columns: auto minmax(140px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 205px;
  color: var(--muted);
  font-size: 12px;
}

.playlist-sort-field select {
  height: 38px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  padding: 0 10px;
  background: var(--panel-3);
  color: var(--text);
}

@container main-panel (max-width: 900px) {
  .library-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 0;
  }

  .row-actions.playlist-detail-actions {
    justify-content: stretch;
  }

  .playlist-search-field {
    flex: 1 1 260px;
    max-width: none;
    min-width: 0;
  }

  .playlist-sort-field {
    flex: 1 1 190px;
    min-width: 0;
  }

  .playlist-detail-actions .tool-button {
    flex: 1 1 auto;
  }

  .now-surface:not(.utility-surface) {
    grid-template-columns: 164px minmax(0, 1fr);
    gap: 20px;
    min-height: 236px;
    padding: 24px 22px 22px;
  }

  .cover-stack {
    width: 164px;
    height: 164px;
  }

  .cover-tile {
    width: 104px;
    height: 104px;
  }

  .cover-tile:nth-child(2) {
    bottom: 16px;
  }

  .cover-tile:nth-child(3) {
    left: 32px;
  }

  .now-surface h1 {
    font-size: 48px;
  }
}

@container main-panel (max-width: 760px) {
  .row-actions.playlist-detail-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.72fr);
  }

  .playlist-search-field,
  .playlist-sort-field {
    grid-column: auto;
    width: 100%;
  }

  .playlist-detail-actions .tool-button {
    width: 100%;
    justify-content: center;
  }
}

@container main-panel (max-width: 620px) {
  .library-toolbar {
    gap: 8px;
  }

  .row-actions.playlist-detail-actions {
    gap: 7px;
  }

  .filter-toolbar,
  .filter-toolbar.has-filter-value {
    grid-template-columns: minmax(90px, 0.75fr) minmax(132px, 1fr) auto;
    gap: 7px;
    padding: 8px;
  }

  .filter-toolbar.has-filter-value {
    grid-template-columns: minmax(74px, 0.7fr) minmax(92px, 0.85fr) minmax(118px, 1fr) auto;
  }

  .filter-sort-field,
  .filter-toolbar .tool-button {
    grid-column: auto;
  }

  .filter-toolbar .tool-button {
    min-height: 32px;
    min-width: 70px;
    padding: 0 10px;
    font-size: 12px;
  }

  .filter-field {
    gap: 3px;
    font-size: 11px;
  }

  .filter-field select {
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .playlist-search-field {
    grid-template-columns: 15px minmax(0, 1fr);
    gap: 6px;
    height: 32px;
    padding: 0 9px;
    font-size: 12px;
  }

  .playlist-search-field .search-icon svg {
    width: 15px;
    height: 15px;
  }

  .playlist-sort-field {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    font-size: 11px;
  }

  .playlist-sort-field select {
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .playlist-detail-actions .tool-button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .playlist-detail-actions .tool-button svg {
    width: 14px;
    height: 14px;
  }

  .playlist-detail-table {
    margin-top: 8px;
  }

  .table-head {
    min-height: 26px;
    padding: 0 8px;
    font-size: 10px;
  }

  .now-surface:not(.utility-surface) {
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 14px;
    min-height: 196px;
    padding: 18px 14px;
  }

  .cover-stack {
    width: 124px;
    height: 124px;
  }

  .cover-tile {
    width: 80px;
    height: 80px;
  }

  .cover-tile:nth-child(2) {
    bottom: 10px;
  }

  .cover-tile:nth-child(3) {
    left: 24px;
  }

  .now-surface h1 {
    font-size: 38px;
    overflow-wrap: anywhere;
  }

  .surface-actions {
    flex-wrap: wrap;
  }
}

@container main-panel (max-width: 460px) {
  .now-surface,
  .now-surface:not(.utility-surface) {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 12px;
  }

  .cover-stack {
    width: 118px;
    height: 118px;
  }

  .cover-tile {
    width: 76px;
    height: 76px;
  }

  .now-surface h1 {
    font-size: 34px;
  }

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

  .row-actions.playlist-detail-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }

  .playlist-detail-actions .tool-button {
    min-height: 40px;
    min-width: 0;
    padding-inline: 8px;
  }

  .playlist-detail-actions .tool-button[data-play-playlist] {
    display: none;
  }

  .playlist-search-field {
    grid-column: 1 / -1;
    height: 44px;
    font-size: 14px;
  }

  .playlist-sort-field {
    grid-column: 1;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .playlist-sort-field select {
    height: 40px;
    font-size: 14px;
  }
}

.void-review {
  display: grid;
  gap: 14px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(255, 255, 255, 0.035)),
    var(--panel);
}

.void-review h2 {
  margin: 4px 0 0;
  font-size: 28px;
}

.void-review p {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
}

.review-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.review-stats > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
}

.review-stats strong,
.review-stats span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-stats span {
  color: var(--muted);
  font-size: 12px;
}

.void-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.year-review-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 3, 7, 0.82);
  backdrop-filter: blur(18px);
}

.year-review-modal {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 18px;
  width: min(980px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  min-height: 620px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(9, 9, 16, 0.78), rgba(6, 7, 11, 0.96)),
    linear-gradient(135deg, color-mix(in srgb, var(--year-review-tone) 36%, transparent), rgba(73, 211, 157, 0.13));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  color: #fff;
}

.year-review-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  opacity: 0.28;
  pointer-events: none;
}

.year-review-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 3, 7, 0.84), rgba(3, 3, 7, 0.32), rgba(3, 3, 7, 0.9)),
    linear-gradient(0deg, rgba(3, 3, 7, 0.94), rgba(3, 3, 7, 0.12), rgba(3, 3, 7, 0.86));
}

.year-review-bg span {
  min-height: 100%;
  background-position: center;
  background-size: cover;
  filter: saturate(1.1) contrast(1.05);
}

.year-review-top,
.year-review-progress,
.year-review-stage,
.year-review-actions {
  position: relative;
  z-index: 1;
}

.year-review-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.year-review-top h2 {
  margin: 4px 0 0;
  font-size: 34px;
  line-height: 1.05;
}

.year-review-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 8px;
}

.year-review-progress button {
  height: 28px;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.year-review-progress button span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform: scaleX(0.36);
  transform-origin: left center;
  background: rgba(255, 255, 255, 0.52);
  transition: transform 240ms ease, background 240ms ease;
}

.year-review-progress button.active span {
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--year-review-tone), #49d39d, #ff5579);
}

.year-review-stage {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 22px;
  min-height: 0;
}

.year-review-copy {
  align-self: center;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.year-review-copy > span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.year-review-copy strong {
  overflow-wrap: anywhere;
  font-size: 48px;
  line-height: 1;
}

.year-review-copy p {
  max-width: 360px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.5;
}

.year-review-body {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
}

.year-review-rank-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.year-review-rank-list.compact {
  gap: 6px;
}

.year-review-rank-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.year-review-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--year-review-tone) 48%, rgba(255, 255, 255, 0.14));
  font-weight: 900;
}

.year-review-rank-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.year-review-rank-main strong,
.year-review-rank-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.year-review-rank-main small {
  color: rgba(255, 255, 255, 0.68);
}

.year-review-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.year-review-stat-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.year-review-stat-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 26px;
}

.year-review-stat-grid span,
.year-review-saving,
.year-review-error {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.year-review-error {
  color: #ff9aa9;
}

.year-review-playlist-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 120px;
}

.year-review-playlist-art {
  width: 96px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
}

.year-review-playlist-card div:last-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.year-review-playlist-card strong,
.year-review-playlist-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.year-review-playlist-card span,
.year-review-empty,
.year-review-empty-row {
  color: rgba(255, 255, 255, 0.7);
}

.year-review-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.year-playlist-home-card .home-card-art {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

@media (max-width: 980px) {
  .year-review-modal {
    min-height: 0;
  }

  .year-review-stage {
    grid-template-columns: 1fr;
  }

  .year-review-copy {
    align-self: start;
  }

  .year-review-copy strong {
    font-size: 38px;
  }

  .year-review-stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .year-review-backdrop {
    padding: 10px;
  }

  .year-review-modal {
    max-height: calc(100vh - 20px);
    padding: 14px;
    gap: 12px;
  }

  .year-review-top h2 {
    font-size: 26px;
  }

  .year-review-copy strong {
    font-size: 32px;
  }

  .year-review-body {
    padding: 10px;
  }

  .year-review-playlist-card {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 92px;
  }

  .year-review-playlist-art {
    width: 72px;
  }

  .year-review-actions .tool-button,
  .year-review-actions .primary-button {
    flex: 1 1 130px;
  }
}

.table {
  width: 100%;
}

.table-head,
.track-row {
  display: grid;
  grid-template-columns: 42px minmax(220px, 1.7fr) minmax(140px, 1fr) minmax(130px, 0.9fr) 82px;
  align-items: center;
  gap: 12px;
}

.table-head {
  position: sticky;
  top: 71px;
  z-index: 5;
  min-height: 38px;
  padding: 0 12px;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(13, 13, 18, 0.96);
  border-bottom: 1px solid var(--line);
}

.track-row {
  min-height: 62px;
  padding: 6px 12px;
  border-radius: var(--radius);
  color: var(--muted);
}

.track-row[draggable="true"] {
  cursor: grab;
}

.track-row[draggable="true"]:active {
  cursor: grabbing;
}

.track-row.is-library-dragging {
  opacity: 0.52;
}

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

.track-row.blocked {
  opacity: 0.48;
}

.track-row.unsupported-format {
  background: rgba(255, 175, 80, 0.035);
}

.track-row.unsupported-format .song-art,
.track-row.unsupported-format [data-play-track] {
  cursor: not-allowed;
  opacity: 0.5;
}

.track-row.unsupported-format .song-title {
  color: #f1d2b2;
}

.track-row.playing .song-title {
  color: var(--accent-3);
}

.playlist-track-row.playlist-custom-playing.playing {
  background: var(--playlist-playing-background);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.28);
}

.playlist-track-row.playlist-custom-playing.playing,
.playlist-track-row.playlist-custom-playing.playing .song-title,
.playlist-track-row.playlist-custom-playing.playing .song-subtitle,
.playlist-track-row.playlist-custom-playing.playing .album-cell,
.playlist-track-row.playlist-custom-playing.playing .artist-cell,
.playlist-track-row.playlist-custom-playing.playing .time-cell,
.playlist-track-row.playlist-custom-playing.playing .icon-button {
  color: #fff;
}

.playlist-track-row.playlist-custom-playing.playing .song-title,
.playlist-track-row.playlist-custom-playing.playing .song-subtitle,
.playlist-track-row.playlist-custom-playing.playing .album-cell,
.playlist-track-row.playlist-custom-playing.playing .artist-cell,
.playlist-track-row.playlist-custom-playing.playing .time-cell {
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.72),
    0 0 10px rgba(0, 0, 0, 0.68);
}

.song-main {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.song-art {
  width: 44px;
  height: 44px;
  border-radius: 6px;
}

.song-title,
.player-title,
.queue-title {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.song-title-line .song-title,
.song-title-line .queue-title {
  min-width: 0;
}

.track-format-warning {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 22px;
  max-width: 150px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 190, 105, 0.35);
  border-radius: 999px;
  background: rgba(255, 174, 72, 0.1);
  color: #ffd6a3;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.song-subtitle,
.album-cell,
.artist-cell,
.time-cell,
.queue-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-row .song-subtitle {
  display: none;
}

.library-link {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-link:hover {
  color: var(--accent-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.library-link[draggable="true"] {
  cursor: grab;
}

.library-link[draggable="true"]:active {
  cursor: grabbing;
}

.library-link.is-library-dragging {
  opacity: 0.52;
}

@container main-panel (max-width: 760px) {
  .table-head,
  .track-row {
    grid-template-columns: 42px minmax(0, 2fr) minmax(140px, 1fr) 82px;
  }

  .artist-head,
  .library-link.artist-cell {
    display: none;
  }

  .track-row .song-subtitle {
    display: block;
  }
}

@container main-panel (max-width: 620px) {
  .table-head {
    display: none;
  }

  .track-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .library-link.album-cell,
  .time-cell {
    display: none;
  }
}

.browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.browser-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.browser-card[draggable="true"],
.home-card[draggable="true"] {
  cursor: grab;
}

.browser-card[draggable="true"]:active,
.home-card[draggable="true"]:active {
  cursor: grabbing;
}

.browser-card.is-library-dragging,
.home-card.is-library-dragging {
  opacity: 0.52;
}

.browser-card:hover {
  background: rgba(255, 255, 255, 0.075);
}

.browser-card-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
}

.artist-card-art {
  border-radius: var(--radius);
  background-repeat: no-repeat;
  background-size: contain;
}

.browser-card-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.browser-card-copy strong,
.browser-card-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-card-copy span {
  color: var(--muted);
  font-size: 13px;
}

.artist-detail {
  display: grid;
  gap: 22px;
}

.artist-detail-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.artist-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 0 2px;
}

.artist-section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.artist-section-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.artist-track-list,
.artist-album-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.artist-top-track-row {
  grid-template-columns: 42px 40px minmax(220px, 1.5fr) minmax(140px, 1fr) 82px;
}

.artist-album-track-row {
  grid-template-columns: 42px 40px minmax(220px, 1fr) 82px;
}

.artist-track-rank,
.artist-track-number {
  display: grid;
  place-items: center;
  min-width: 0;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 800;
}

.artist-album-group {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.artist-album-head {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 4px 2px 8px;
}

.artist-album-art {
  width: 66px;
  height: 66px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

.artist-album-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.artist-album-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}

.artist-album-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-album-tracks {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.artist-album-track-row {
  min-height: 46px;
}

.artist-album-track-row .song-title-line {
  padding-left: 2px;
}

.similar-artist-section {
  padding-bottom: 18px;
}

.artist-card-skeleton {
  pointer-events: none;
}

.artist-card-skeleton .browser-card-art,
.artist-card-skeleton .browser-card-copy span {
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.artist-card-skeleton .browser-card-copy span {
  width: 74%;
  height: 13px;
  border-radius: 999px;
}

.artist-card-skeleton .browser-card-copy span:last-child {
  width: 58%;
  opacity: 0.72;
}

@media (prefers-reduced-motion: no-preference) {
  .artist-card-skeleton .browser-card-art,
  .artist-card-skeleton .browser-card-copy span {
    animation: skeleton-pulse 1.2s ease-in-out infinite;
  }
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 0.58;
  }

  50% {
    opacity: 1;
  }
}

.home-dashboard {
  display: grid;
  gap: 24px;
  padding: 22px;
}

.home-section {
  display: grid;
  gap: 12px;
}

.home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.home-section-head h2 {
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
}

.home-section-head span {
  color: var(--muted);
  font-size: 13px;
}

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.home-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 82px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
}

.home-card:hover {
  background: rgba(255, 255, 255, 0.075);
}

.home-card.unsupported-format {
  border-color: rgba(255, 190, 105, 0.22);
  background: rgba(255, 174, 72, 0.055);
  cursor: not-allowed;
  opacity: 0.76;
}

.home-card.unsupported-format:hover {
  background: rgba(255, 174, 72, 0.075);
}

.home-card-art {
  width: 64px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    var(--accent);
  background-position: center;
  background-size: cover;
}

.home-card span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.home-card strong,
.home-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-card small {
  color: var(--muted);
  font-size: 13px;
}

.home-empty {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.select-check {
  display: grid;
  place-items: center;
}

.select-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.playlist-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.playlist-detail-back {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 14px 0 8px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.playlist-detail-back:hover {
  border-color: rgba(var(--accent-rgb), 0.58);
  background: rgba(var(--accent-rgb), 0.14);
}

.playlist-detail-back svg {
  width: 21px;
  height: 21px;
}

.playlist-card,
.settings-group,
.rules-band {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}

.playlist-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(var(--playlist-highlight-rgb, var(--accent-rgb)), 0.14), rgba(var(--playlist-highlight-rgb, var(--accent-rgb)), 0.035) 44%, rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.playlist-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--playlist-card-glow, none);
  opacity: 0.16;
}

.playlist-card > * {
  position: relative;
  z-index: 1;
}

.playlist-card[draggable="true"] {
  cursor: grab;
}

.playlist-card[draggable="true"]:active {
  cursor: grabbing;
}

.playlist-card.is-dragging {
  opacity: 0.5;
}

.playlist-card.drag-over-before {
  box-shadow: inset 3px 0 0 var(--accent);
}

.playlist-card.drag-over-after {
  box-shadow: inset -3px 0 0 var(--accent);
}

.playlist-card.drag-over-playlist {
  background: rgba(var(--accent-rgb), 0.16);
  box-shadow: inset 0 0 0 2px rgba(var(--accent-rgb), 0.72);
}

.playlist-art-wrap {
  position: relative;
}

.playlist-art {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent-dark) 55%, #171720), var(--accent));
  background-position: center;
  background-size: cover;
}

.playlist-art:hover {
  filter: brightness(1.08);
}

.playlist-card-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(var(--playlist-highlight-rgb, var(--accent-rgb)), 0.88);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
}

.playlist-card-play:hover {
  background: var(--playlist-highlight, var(--accent));
  transform: scale(1.04);
}

.playlist-card-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.playlist-fade-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-fade-summary span {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 0 18%, var(--playlist-highlight, #35c845) 18% 28%, transparent 28% 42%, var(--playlist-highlight, #35c845) 42% 52%, transparent 52% 66%, var(--playlist-highlight, #35c845) 66% 76%, transparent 76%),
    transparent;
}

.playlist-name {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--playlist-text, var(--text));
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-name:hover {
  color: var(--playlist-highlight, var(--accent-3));
}

.playlist-card .row-actions {
  justify-content: flex-end;
}

.playlist-shuffle-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 7px;
  align-items: center;
  min-width: 0;
  cursor: context-menu;
}

.playlist-shuffle-summary::before {
  content: "";
  width: 16px;
  height: 16px;
  grid-row: 1 / span 2;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 0 18%, var(--playlist-highlight, var(--accent)) 18% 28%, transparent 28% 42%, var(--playlist-highlight, var(--accent)) 42% 52%, transparent 52% 66%, var(--playlist-highlight, var(--accent)) 66% 76%, transparent 76%),
    transparent;
  opacity: 0.95;
}

.playlist-shuffle-summary span,
.playlist-shuffle-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-shuffle-summary span {
  color: var(--muted);
  font-size: 12px;
}

.playlist-shuffle-summary strong {
  color: var(--text);
  font-size: 13px;
}

.playlist-window-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 5, 7, 0.72);
}

.modal-playback-unlocked .player-bar {
  position: relative;
  z-index: 85;
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.16), 0 18px 44px rgba(0, 0, 0, 0.42);
}

.playlist-window {
  width: min(620px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111019;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.56);
}

.playlist-settings-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.playlist-window-head,
.playlist-window-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.playlist-window-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

.dialog-pending-status {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(73, 211, 157, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(var(--accent-rgb), 0.08), rgba(73, 211, 157, 0.18), rgba(var(--accent-rgb), 0.08)),
    rgba(73, 211, 157, 0.08);
  background-size: 240% 100%, auto;
  animation: metadataSweep 1.8s ease-in-out infinite;
}

.dialog-pending-status svg {
  width: 19px;
  height: 19px;
  color: var(--green);
  animation: spinRefresh 0.9s linear infinite;
}

.dialog-pending-status strong,
.dialog-pending-status small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-pending-status strong {
  font-size: 13px;
}

.dialog-pending-status small {
  color: var(--muted);
  font-size: 12px;
}

.playlist-settings-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.playlist-photo-editor,
.playlist-settings-fields {
  display: grid;
  gap: 12px;
}

.playlist-color-grid {
  display: grid;
  gap: 6px;
}

.playlist-color-row {
  display: grid;
  grid-template-columns: minmax(104px, 0.9fr) 34px minmax(86px, 0.7fr) minmax(96px, 1.15fr) minmax(96px, 1.15fr);
  align-items: end;
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.playlist-color-use {
  align-self: end;
}

.playlist-color-swatch {
  position: relative;
  align-self: end;
  display: block;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 7px;
  background: var(--playlist-color-preview);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  overflow: hidden;
}

.playlist-color-swatch input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.playlist-color-format {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.playlist-color-format > span {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.playlist-color-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  min-width: 0;
}

.playlist-color-channel {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.playlist-color-channel span {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.playlist-color-row input[data-color-hex],
.playlist-color-row input[data-color-rgb],
.playlist-color-row input[data-color-hsl] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: var(--panel-3);
  color: var(--text);
}

.playlist-color-row input[data-color-hex]:focus,
.playlist-color-row input[data-color-rgb]:focus,
.playlist-color-row input[data-color-hsl]:focus {
  border-color: rgba(var(--accent-rgb), 0.7);
}

.playlist-color-row input[data-color-hex] {
  height: 30px;
  padding: 0 5px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.playlist-color-row input[data-color-rgb],
.playlist-color-row input[data-color-hsl] {
  height: 27px;
  min-width: 0;
  padding: 0 2px;
  font-size: 11px;
  text-align: center;
}

.playlist-color-row input[data-color-rgb]::-webkit-outer-spin-button,
.playlist-color-row input[data-color-rgb]::-webkit-inner-spin-button,
.playlist-color-row input[data-color-hsl]::-webkit-outer-spin-button,
.playlist-color-row input[data-color-hsl]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.playlist-color-row input[data-color-rgb],
.playlist-color-row input[data-color-hsl] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.compact-checkbox {
  min-height: 42px;
}

.playlist-photo-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent-dark) 55%, #171720), var(--accent));
  background-position: center;
  background-size: cover;
}

.playlist-photo-editor input[type="file"] {
  height: auto;
  min-height: 42px;
  padding: 9px 10px;
}

.playlist-window-actions {
  justify-content: end;
  padding-top: 4px;
}

@media (max-height: 680px) {
  .playlist-window {
    max-height: calc(100vh - 24px);
  }

  .playlist-settings-form {
    gap: 10px;
    padding: 12px;
  }

  .playlist-window-head h2 {
    font-size: 22px;
  }

  .playlist-settings-grid {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
  }

  .playlist-photo-editor,
  .playlist-settings-fields {
    gap: 9px;
  }

  .playlist-window .field {
    gap: 4px;
  }

  .playlist-window .field input,
  .playlist-window .field select {
    height: 36px;
  }

  .playlist-photo-editor input[type="file"] {
    min-height: 36px;
    padding: 7px 10px;
  }

  .playlist-window-actions .tool-button,
  .playlist-window-actions .primary-button {
    min-height: 36px;
  }

  .playlist-color-row {
    grid-template-columns: minmax(104px, 0.9fr) 32px minmax(86px, 0.7fr) minmax(96px, 1.15fr) minmax(96px, 1.15fr);
    padding: 5px;
  }

  .playlist-color-swatch {
    width: 32px;
    height: 32px;
  }

  .playlist-color-row input[data-color-hex] {
    height: 28px;
  }

  .playlist-color-row input[data-color-rgb],
  .playlist-color-row input[data-color-hsl] {
    height: 25px;
  }

  .compact-checkbox {
    min-height: 36px;
  }
}

.playlist-track-editor-window {
  width: min(820px, 100%);
}

.track-editor-summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.track-editor-art {
  width: 54px;
  height: 54px;
}

.track-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.track-data-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.16);
}

.track-data-details summary {
  cursor: pointer;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.track-data-json {
  max-height: 320px;
  margin: 0;
  overflow: auto;
  padding: 0 12px 12px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.track-info-window {
  width: min(860px, 100%);
}

.track-info-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.track-info-stat,
.track-info-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.track-info-stat {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
}

.track-info-stat span,
.track-info-row span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.track-info-stat strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.track-info-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
}

.track-info-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-add-window {
  width: min(520px, 100%);
}

.shuffle-save-window {
  width: min(480px, 100%);
}

.playlist-add-fields {
  display: grid;
  gap: 12px;
}

.playlist-add-summary,
.playlist-inline-status {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 13px;
}

.playlist-inline-status {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--text);
}

.playlist-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.confirm-window {
  width: min(440px, 100%);
}

.confirm-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.app-toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  z-index: 300;
  width: min(520px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
  padding: 12px 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(23, 21, 34, 0.94) 40%),
    rgba(15, 14, 22, 0.94);
  color: var(--text);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.46),
    0 0 22px rgba(var(--accent-rgb), 0.14);
  font-size: 14px;
  text-align: center;
  backdrop-filter: blur(14px);
}

.app-context-menu-shield {
  position: fixed;
  inset: 0;
  z-index: 310;
  background: transparent;
}

.app-context-menu {
  position: fixed;
  left: var(--context-x);
  top: var(--context-y);
  z-index: 320;
  display: grid;
  width: min(272px, calc(100vw - 16px));
  padding: 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: var(--radius);
  background: var(--panel-2);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.56);
}

.shuffle-context-menu {
  max-height: min(440px, calc(100vh - 16px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.app-context-menu-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
}

.shuffle-context-menu-head {
  grid-template-columns: 22px minmax(0, 1fr);
}

.shuffle-context-menu-head > svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.context-menu-art {
  width: 38px;
  height: 38px;
}

.app-context-menu-head strong,
.app-context-menu-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-context-menu-head strong {
  color: var(--text);
  font-size: 13px;
}

.app-context-menu-head span {
  margin-top: 2px;
  color: var(--quiet);
  font-size: 12px;
}

.app-context-menu button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 34px;
  min-width: 0;
  padding: 0 9px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.app-context-menu button:hover,
.app-context-menu button:focus-visible {
  outline: 0;
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--text);
}

.app-context-menu button.selected {
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--text);
}

.app-context-menu button.selected svg {
  color: var(--accent);
}

.app-context-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.app-context-menu button svg {
  width: 18px;
  height: 18px;
}

.app-context-menu button span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-context-menu-separator {
  height: 1px;
  margin: 5px 8px;
  background: var(--line);
}

@media (max-width: 720px) {
  .track-info-stats,
  .track-info-grid {
    grid-template-columns: 1fr;
  }

  .track-info-row {
    grid-template-columns: 112px minmax(0, 1fr);
  }
}

body.now-playing-active {
  overflow: hidden;
}

.mini-art {
  padding: 0;
  border: 0;
  cursor: zoom-in;
}

.mini-art:disabled {
  cursor: default;
  opacity: 0.62;
}

.now-playing-mode {
  --now-green: var(--accent);
  --now-green-soft: rgba(var(--accent-rgb), 0.18);
  --now-panel: rgba(17, 18, 27, 0.78);
  --now-line: rgba(255, 255, 255, 0.14);
  --np-color-1: var(--accent-dark);
  --np-color-2: var(--accent);
  --np-color-3: var(--accent-2);
  --np-color-4: #11121b;
  --np-color-5: #050507;
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: clamp(16px, 2vw, 28px);
  min-width: 0;
  padding: 34px clamp(22px, 4.6vw, 70px) 38px;
  overflow: hidden;
  overflow-x: hidden;
  background: #050507;
  color: #f8f7ff;
}

.now-playing-mode *,
.now-playing-mode *::before,
.now-playing-mode *::after {
  box-sizing: border-box;
}

.now-playing-bg,
.now-playing-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.now-playing-bg {
  inset: -10%;
  background:
    radial-gradient(circle at 18% 54%, color-mix(in srgb, var(--np-color-1) 82%, transparent), transparent 31%),
    radial-gradient(circle at 45% 30%, color-mix(in srgb, var(--np-color-2) 74%, transparent), transparent 33%),
    radial-gradient(circle at 78% 42%, color-mix(in srgb, var(--np-color-3) 68%, transparent), transparent 34%),
    radial-gradient(circle at 55% 84%, color-mix(in srgb, var(--np-color-4) 62%, transparent), transparent 36%),
    radial-gradient(circle at 88% 76%, color-mix(in srgb, var(--np-color-5) 56%, transparent), transparent 34%),
    linear-gradient(115deg, color-mix(in srgb, var(--np-color-1) 24%, #050507), #050507 68%);
  background-size: 150% 150%, 160% 160%, 145% 145%, 170% 170%, 155% 155%, 120% 120%;
  filter: blur(34px) saturate(1.65) contrast(1.08);
  opacity: 0.86;
  transform: scale(1.08);
  animation: nowPlayingPaletteDrift 34s ease-in-out infinite alternate;
}

.now-playing-scrim {
  background:
    radial-gradient(circle at 50% 58%, rgba(5, 5, 7, 0.05), rgba(5, 5, 7, 0.48) 58%, rgba(5, 5, 7, 0.82) 100%),
    linear-gradient(90deg, rgba(5, 5, 7, 0.76) 0%, rgba(5, 5, 7, 0.38) 45%, rgba(5, 5, 7, 0.78) 100%),
    linear-gradient(180deg, rgba(5, 5, 7, 0.24) 0%, rgba(5, 5, 7, 0.6) 58%, #050507 100%);
}

@keyframes nowPlayingPaletteDrift {
  0% {
    background-position: 0% 42%, 82% 18%, 100% 50%, 46% 100%, 8% 88%, 50% 50%;
  }

  50% {
    background-position: 38% 20%, 42% 72%, 68% 18%, 12% 64%, 78% 12%, 48% 52%;
  }

  100% {
    background-position: 88% 58%, 10% 28%, 30% 84%, 88% 34%, 42% 90%, 50% 50%;
  }
}

.now-playing-top,
.now-playing-main,
.now-playing-progress,
.now-playing-bottom {
  position: relative;
  z-index: 5;
}

.now-playing-top {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.now-playing-brand {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.now-playing-brand-mark {
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 8px;
  background: #050507;
  box-shadow: 0 0 26px rgba(var(--accent-rgb), 0.26);
}

.now-playing-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.now-playing-brand strong,
.now-playing-context-card strong {
  display: block;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing-brand small,
.now-playing-context-card small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #a9a6bd;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.now-playing-top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 12px;
}

.now-playing-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(24, 25, 35, 0.78);
  color: #d6d3e6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 34px rgba(0, 0, 0, 0.28);
}

.now-playing-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing-pill svg,
.now-playing-control svg,
.now-playing-play svg,
.now-playing-badge svg {
  width: 20px;
  height: 20px;
  display: block;
}

.now-playing-pill:hover,
.now-playing-pill.active {
  border-color: rgba(var(--accent-rgb), 0.42);
  color: #fff;
}

.now-playing-main {
  display: grid;
  grid-template-columns: minmax(270px, 31vw) minmax(400px, 1fr) minmax(280px, 340px);
  align-items: center;
  gap: clamp(24px, 3vw, 40px);
  min-height: 0;
}

.now-playing-art-wrap {
  display: grid;
  justify-items: center;
  min-width: 0;
}

.now-playing-art {
  width: min(31vw, 470px);
  min-width: 280px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background-position: center;
  background-size: cover;
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(var(--accent-rgb), 0.08),
    0 0 54px rgba(var(--accent-rgb), 0.18);
}

.now-playing-info {
  display: grid;
  align-content: center;
  gap: 12px;
  max-width: 660px;
  min-width: 0;
}

.now-playing-kicker {
  display: inline-flex;
  align-items: end;
  gap: 8px;
  color: var(--now-green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.now-playing-kicker i {
  display: block;
  width: 3px;
  border-radius: 999px;
  background: currentColor;
}

.now-playing-kicker i:nth-child(2) {
  height: 12px;
}

.now-playing-kicker i:nth-child(3) {
  height: 17px;
}

.now-playing-kicker i:nth-child(4) {
  height: 10px;
}

.now-playing-kicker i:nth-child(5) {
  height: 15px;
}

.now-playing-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.now-playing-title-row h2 {
  margin: 0;
  overflow-wrap: break-word;
  font-size: clamp(42px, 4.2vw, 60px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
  text-shadow: 0 8px 36px rgba(0, 0, 0, 0.62);
}

.now-playing-control,
.now-playing-play {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}

.now-playing-artist {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  max-width: 100%;
  padding: 0;
  background: transparent;
  color: var(--now-green);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
}

.now-playing-artist span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing-artist svg {
  width: 22px;
  height: 22px;
}

.now-playing-album {
  overflow: hidden;
  color: #aaa6bd;
  font-size: clamp(17px, 1.5vw, 24px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.now-playing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(18, 19, 28, 0.66);
  color: #d6d3e5;
  font-size: 13px;
  white-space: nowrap;
}

.now-playing-badge svg {
  color: var(--now-green);
}

.now-playing-badge.unsupported {
  border-color: rgba(255, 190, 105, 0.38);
  background: rgba(255, 174, 72, 0.1);
  color: #ffd6a3;
}

.now-playing-badge.unsupported svg {
  color: #ffb25d;
}

.now-playing-side-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 0;
  max-height: min(560px, calc(100vh - 260px));
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(18, 19, 28, 0.72);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
}

.now-playing-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #aaa6bd;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.now-playing-lyrics-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 3px;
}

.now-playing-side-empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  color: #aaa6bd;
  text-align: center;
}

.now-playing-lyrics-card {
  grid-template-rows: auto minmax(0, 1fr);
}

.now-playing-lyric-line {
  padding: 9px 8px;
  font-size: 16px;
}

.now-playing-spectrum-wrap {
  position: relative;
  display: grid;
  min-height: clamp(220px, 30vh, 340px);
  margin-top: clamp(-18px, -1.2vw, -8px);
  padding: clamp(18px, 2vh, 32px) 0 0;
}

.now-playing-spectrum {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  height: clamp(198px, 27vh, 310px);
  min-width: 0;
  gap: 0;
  padding: 0 18px 10px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
  transform: scaleY(var(--bass-scale, 1));
  transform-origin: bottom;
}

.now-playing-spectrum::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.3), rgba(255, 255, 255, 0.12), rgba(var(--accent-rgb), 0.22), transparent);
  box-shadow: none;
  opacity: 0.48;
}

.now-playing-spectrum span {
  position: relative;
  z-index: 1;
  flex: 0 0 clamp(3px, 0.28vw, 5px);
  min-width: 3px;
  max-width: 5px;
  height: 100%;
  border-radius: 999px 999px 2px 2px;
  background: transparent;
  opacity: 0.7;
  transition: opacity 120ms ease;
}

.now-playing-spectrum span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  border-radius: 999px 999px 2px 2px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.98), rgba(var(--accent-rgb), 0.52) 58%, rgba(var(--accent-rgb), 0.16));
  box-shadow:
    0 0 8px rgba(var(--accent-rgb), 0.36),
    0 10px 18px rgba(var(--accent-rgb), 0.08);
  transform: scaleY(var(--level, 0.05));
  transform-origin: bottom;
  transition: transform 64ms cubic-bezier(0.18, 0.88, 0.22, 1), opacity 120ms ease;
  will-change: transform;
}

.now-playing-spectrum span.bass::after {
  box-shadow:
    0 0 11px rgba(var(--accent-rgb), 0.44),
    0 14px 24px rgba(var(--accent-rgb), 0.1);
}

.now-playing-spectrum span.mid::after {
  opacity: 0.9;
}

.now-playing-spectrum span.treble::after {
  opacity: 0.78;
}

.now-playing-spectrum.listening span {
  opacity: 0.92;
}

.now-playing-timeline {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 26px;
}

.now-playing-progress {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: end;
  gap: 16px;
  color: #aaa6bd;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.now-playing-progress span:first-child {
  text-align: right;
}

.now-playing-progress input,
.now-playing-volume input {
  width: 100%;
  height: 18px;
  background: transparent;
  accent-color: var(--now-green);
  -webkit-appearance: none;
  appearance: none;
}

.now-playing-progress input {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
}

.now-playing-progress input::-webkit-slider-runnable-track,
.now-playing-volume input::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.now-playing-progress input::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--now-green) 0%, var(--now-green) var(--progress-percent, 0%), rgba(255, 255, 255, 0.18) var(--progress-percent, 0%), rgba(255, 255, 255, 0.18) 100%);
}

.now-playing-progress input::-webkit-slider-thumb,
.now-playing-volume input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6.5px;
  border: 0;
  border-radius: 999px;
  background: var(--now-green);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.62);
  -webkit-appearance: none;
  appearance: none;
}

.now-playing-progress input::-moz-range-track,
.now-playing-volume input::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.now-playing-progress input::-moz-range-progress,
.now-playing-volume input::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--now-green);
}

.now-playing-progress input::-moz-range-thumb,
.now-playing-volume input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: var(--now-green);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.62);
}

.now-playing-bottom {
  display: grid;
  grid-template-columns: minmax(170px, 230px) 112px minmax(320px, 1fr) minmax(220px, 310px);
  align-items: center;
  gap: 18px;
}

.now-playing-context-card,
.now-playing-volume {
  min-height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(22, 23, 32, 0.82);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.now-playing-context-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.now-playing-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 28px);
}

.now-playing-control {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 21, 30, 0.86);
  color: #f7f5ff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.now-playing-control.active {
  color: var(--now-green);
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: 0 0 26px rgba(var(--accent-rgb), 0.18);
}

.now-playing-play {
  width: 92px;
  height: 92px;
  background: var(--now-green);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.24) inset,
    0 0 42px rgba(var(--accent-rgb), 0.62),
    0 18px 54px rgba(0, 0, 0, 0.36);
}

.now-playing-play svg {
  width: 34px;
  height: 34px;
}

.now-playing-volume {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}

.now-playing-volume input::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--now-green) 0%, var(--now-green) var(--volume-percent, 50%), rgba(255, 255, 255, 0.18) var(--volume-percent, 50%), rgba(255, 255, 255, 0.18) 100%);
}

.now-playing-volume span {
  color: #c5c0d8;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

@media (max-width: 1180px) {
  .now-playing-mode {
    overflow: auto;
    padding-inline: 28px;
  }

  .now-playing-main {
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    align-items: center;
  }

  .now-playing-side-card {
    grid-column: 1 / -1;
    max-height: 280px;
  }

  .now-playing-bottom {
    grid-template-columns: minmax(170px, 230px) 96px minmax(300px, 1fr);
  }

  .now-playing-volume {
    grid-column: 1 / -1;
    justify-self: end;
    width: min(310px, 100%);
  }
}

@media (max-width: 820px) {
  .now-playing-mode {
    grid-template-rows: auto auto auto auto;
    gap: 18px;
    padding: 20px 16px 18px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .now-playing-bg,
  .now-playing-scrim {
    inset: 0;
  }

  .now-playing-top {
    grid-template-columns: 1fr;
  }

  .now-playing-top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    justify-content: stretch;
    gap: 8px;
  }

  .now-playing-pill {
    justify-content: center;
    min-width: 0;
    min-height: 38px;
    padding: 0 14px;
  }

  .now-playing-pill.exit {
    grid-column: 1 / -1;
  }

  .now-playing-main {
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    justify-items: stretch;
  }

  .now-playing-art {
    width: min(72vw, 360px);
    min-width: 0;
  }

  .now-playing-info {
    justify-items: start;
    width: 100%;
  }

  .now-playing-title-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .now-playing-title-row h2 {
    font-size: clamp(38px, 12vw, 62px);
  }

  .now-playing-side-card {
    max-height: 300px;
    padding: 16px;
    width: 100%;
  }

  .now-playing-spectrum-wrap {
    min-height: 190px;
    margin-top: 0;
    padding-top: 18px;
  }

  .now-playing-spectrum {
    height: 168px;
    padding-inline: 12px;
    gap: 0;
  }

  .now-playing-timeline {
    height: 24px;
  }

  .now-playing-progress {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
    font-size: 12px;
  }

  .now-playing-bottom {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }

  .now-playing-context-card,
  .now-playing-volume {
    width: 100%;
    min-height: 60px;
  }

  .now-playing-controls {
    order: -1;
    gap: 10px;
    width: 100%;
  }

  .now-playing-control {
    width: 48px;
    height: 48px;
  }

  .now-playing-play {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 520px) {
  .now-playing-mode {
    display: block;
    width: 100vw;
    max-width: 100vw;
  }

  .now-playing-top {
    display: grid;
    width: 100%;
    max-width: 100%;
    gap: 14px;
  }

  .now-playing-top-actions {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .now-playing-brand {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .now-playing-brand-mark {
    width: 38px;
    height: 38px;
  }

  .now-playing-pill.exit {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .now-playing-pill.exit span {
    max-width: none;
  }

  .now-playing-main {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 18px;
  }

  .now-playing-art-wrap {
    display: grid;
    justify-items: center;
    width: 100%;
    max-width: 100%;
  }

  .now-playing-art {
    width: min(72vw, 280px);
    max-width: 100%;
    margin: 0 auto;
  }

  .now-playing-info {
    width: 100%;
    max-width: 100%;
    margin-top: 18px;
  }

  .now-playing-title-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .now-playing-title-row h2 {
    min-width: 0;
    font-size: clamp(34px, 10vw, 42px);
    line-height: 1.04;
  }

  .now-playing-side-card {
    display: none;
  }

  .now-playing-progress {
    margin-top: 16px;
  }

  .now-playing-spectrum-wrap {
    min-height: 158px;
    margin-top: 4px;
    padding-top: 14px;
  }

  .now-playing-spectrum {
    height: 140px;
    padding: 0 8px 8px;
    gap: 0;
  }

  .now-playing-timeline {
    height: 24px;
  }

  .now-playing-bottom {
    margin-top: 14px;
  }

  .now-playing-badges {
    gap: 7px;
  }

  .now-playing-badge {
    min-height: 30px;
    padding-inline: 10px;
  }

  .now-playing-control {
    width: 42px;
    height: 42px;
  }

  .now-playing-play {
    width: 64px;
    height: 64px;
  }

  .now-playing-volume {
    grid-template-columns: 28px minmax(0, 1fr) 38px;
    padding-inline: 14px;
  }
}

.now-playing-mode {
  --now-green: var(--accent);
  --now-green-soft: rgba(var(--accent-rgb), 0.18);
  --now-panel: rgba(15, 16, 24, 0.72);
  --now-line: rgba(255, 255, 255, 0.13);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1.2vh, 14px);
  padding: clamp(22px, 3.3vh, 34px) clamp(24px, 3.8vw, 56px) clamp(22px, 3vh, 34px);
  overflow: hidden;
  background: #030407;
  isolation: isolate;
}

.now-playing-bg {
  inset: -12%;
  background:
    radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--np-color-1) 68%, transparent), transparent 32%),
    radial-gradient(circle at 35% 34%, color-mix(in srgb, var(--np-color-2) 70%, transparent), transparent 34%),
    radial-gradient(circle at 68% 34%, color-mix(in srgb, var(--np-color-3) 66%, transparent), transparent 35%),
    radial-gradient(circle at 36% 76%, color-mix(in srgb, var(--np-color-4) 50%, transparent), transparent 34%),
    radial-gradient(circle at 78% 74%, color-mix(in srgb, var(--np-color-5) 46%, transparent), transparent 36%),
    linear-gradient(115deg, #030407 0%, color-mix(in srgb, var(--np-color-1) 22%, #030407) 44%, #030407 100%);
  background-size: 150% 150%, 160% 160%, 170% 170%, 150% 150%, 165% 165%, 120% 120%;
  filter: blur(46px) saturate(1.92) contrast(1.08);
  opacity: 0.92;
  transform: scale(1.08);
}

.now-playing-scrim {
  background:
    radial-gradient(circle at 50% 40%, rgba(5, 5, 8, 0.08), rgba(5, 5, 8, 0.52) 62%, rgba(3, 4, 7, 0.88) 100%),
    linear-gradient(90deg, rgba(3, 4, 7, 0.72) 0%, rgba(3, 4, 7, 0.28) 50%, rgba(3, 4, 7, 0.74) 100%),
    linear-gradient(180deg, rgba(3, 4, 7, 0.26), rgba(3, 4, 7, 0.34) 45%, rgba(3, 4, 7, 0.84) 100%);
}

.now-playing-top,
.now-playing-stage,
.now-playing-main,
.now-playing-spectrum-wrap,
.now-playing-progress,
.now-playing-bottom {
  position: relative;
  z-index: 5;
}

.now-playing-top {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: start;
  gap: 18px;
}

.now-playing-top-context {
  justify-self: start;
  width: min(230px, 24vw);
  transform: translateY(8px);
}

.now-playing-context-card,
.now-playing-exit-button,
.now-playing-up-next-card {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(17, 18, 27, 0.7);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
}

.now-playing-context-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 15px;
}

.now-playing-context-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--now-green);
}

.now-playing-context-icon svg {
  width: 24px;
  height: 24px;
}

.now-playing-brand {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  justify-self: center;
  gap: 12px;
  min-width: 0;
  opacity: 0.86;
  transform: translateY(5px);
}

.now-playing-brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 8px;
}

.now-playing-brand strong {
  font-size: 21px;
  line-height: 1;
}

.now-playing-top-actions {
  justify-self: end;
  gap: 8px;
  transform: translateY(8px);
}

.now-playing-pill {
  min-height: 52px;
  padding: 0 22px;
  background: rgba(18, 19, 29, 0.72);
}

.now-playing-pill.icon-only {
  width: 64px;
  padding: 0;
  justify-content: center;
}

.now-playing-pill.icon-only svg {
  width: 24px;
  height: 24px;
}

.now-playing-stage {
  display: grid;
  align-self: center;
  align-content: center;
  justify-items: center;
  gap: clamp(4px, 0.62vh, 8px);
  width: min(1080px, 86vw);
  min-height: 0;
  margin: 0 auto;
  padding-top: 0;
  transform: translateY(clamp(22px, 3.2vh, 48px));
}

.now-playing-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: center;
  gap: clamp(8px, 1vh, 13px);
  width: min(960px, 100%);
  min-height: 0;
  margin-inline: auto;
  text-align: center;
}

.now-playing-art-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  width: 100%;
}

.now-playing-art {
  position: relative;
  width: clamp(310px, 44vh, 500px);
  min-width: 0;
  border-color: rgba(255, 255, 255, 0.32);
  border-radius: 18px;
  box-shadow:
    0 24px 88px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(var(--accent-rgb), 0.08),
    0 0 68px color-mix(in srgb, var(--np-color-1) 26%, transparent);
}

.now-playing-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68) 100%),
    rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 180ms ease;
}

.now-playing-mode.lyrics-open .now-playing-art::after {
  opacity: 1;
}

.now-playing-info {
  justify-items: center;
  gap: 5px;
  max-width: min(960px, 100%);
}

.now-playing-kicker {
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0;
}

.now-playing-title-row h2 {
  max-width: min(960px, 88vw);
  font-size: clamp(36px, 5.2vh, 58px);
  line-height: 0.98;
  text-align: center;
  text-wrap: balance;
}

.now-playing-artist {
  justify-self: center;
  font-size: clamp(19px, 2.5vh, 24px);
}

.now-playing-album {
  max-width: min(620px, 80vw);
  color: #c1bdd4;
  font-size: clamp(17px, 2.2vh, 21px);
}

.now-playing-badges {
  justify-content: center;
  margin-top: 8px;
}

.now-playing-badge {
  min-height: 40px;
  padding: 0 18px;
  background: rgba(14, 15, 23, 0.54);
  color: #eeeaf8;
  font-size: 15px;
  font-weight: 800;
}

.now-playing-badge i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--now-green);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.68);
}

.now-playing-badge.unsupported {
  color: #ffd6a3;
}

.now-playing-art-wrap > .now-playing-lyrics-card {
  position: absolute;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  top: 0;
  left: 50%;
  right: auto;
  bottom: auto;
  z-index: 8;
  width: clamp(310px, 44vh, 500px);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  max-height: none;
  transform: translateX(-50%);
  padding: clamp(14px, 2vh, 22px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(12, 13, 19, 0.58);
  box-shadow:
    0 24px 82px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(3px);
}

.now-playing-art-wrap > .now-playing-lyrics-card .now-playing-side-head {
  display: none;
}

.now-playing-side-card {
  border-radius: 8px;
  background: rgba(17, 18, 27, 0.74);
}

.now-playing-lyrics-list {
  gap: clamp(7px, 1.1vh, 13px);
  padding: 2px 4px 16px 0;
  scrollbar-color: rgba(255, 255, 255, 0.42) transparent;
}

.now-playing-art-wrap > .now-playing-lyrics-card .now-playing-lyrics-list {
  padding-right: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.now-playing-art-wrap > .now-playing-lyrics-card .now-playing-lyrics-list::-webkit-scrollbar {
  display: none;
}

.now-playing-lyric-line {
  padding: 8px 10px;
  color: rgba(247, 244, 255, 0.72);
  font-size: clamp(14px, 1.7vh, 18px);
  font-weight: 800;
  line-height: 1.28;
  text-align: center;
}

.now-playing-lyric-line.active {
  background: rgba(var(--accent-rgb), 0.36);
  color: #f7fff7;
  transform: none;
}

.now-playing-spectrum-wrap {
  display: grid;
  justify-self: center;
  width: min(1040px, 100%);
  min-height: clamp(118px, 15vh, 178px);
  margin-top: clamp(1px, 0.35vh, 5px);
  padding: 0;
}

.now-playing-spectrum {
  --spectrum-bar-gap: clamp(7px, 0.62vw, 12px);
  --spectrum-bar-width: clamp(3px, 0.32vw, 5px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spectrum-bar-gap);
  height: clamp(118px, 15vh, 178px);
  padding: 0 4px;
  overflow: visible;
  mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  transform: scaleY(var(--bass-scale, 1));
  transform-origin: center;
}

.now-playing-spectrum::after {
  display: none;
}

.now-playing-spectrum-group {
  display: contents;
}

.now-playing-spectrum .now-playing-spectrum-bar {
  position: relative;
  z-index: 1;
  display: block;
  width: var(--spectrum-bar-width);
  min-width: var(--spectrum-bar-width);
  max-width: var(--spectrum-bar-width);
  height: 100%;
  border-radius: 999px;
  background: transparent;
  opacity: 0.86;
}

.now-playing-spectrum .now-playing-spectrum-bar::before,
.now-playing-spectrum .now-playing-spectrum-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: calc(50% - 1px);
  border-radius: 999px;
  background: var(--now-green);
  box-shadow:
    0 0 7px rgba(var(--accent-rgb), 0.3),
    0 8px 14px rgba(var(--accent-rgb), 0.07);
  transform: scaleY(var(--level, 0.05));
  transition: opacity 120ms ease;
  will-change: transform;
}

.now-playing-spectrum .now-playing-spectrum-bar::before {
  bottom: 50%;
  transform-origin: bottom;
}

.now-playing-spectrum .now-playing-spectrum-bar::after {
  top: 50%;
  opacity: 0.58;
  transform-origin: top;
}

.now-playing-spectrum .now-playing-spectrum-bar.treble {
  opacity: 0.72;
}

.now-playing-spectrum .now-playing-spectrum-bar.mid {
  opacity: 0.84;
}

.now-playing-spectrum .now-playing-spectrum-bar.bass {
  opacity: 0.95;
}

.now-playing-spectrum .now-playing-spectrum-bar.bass::before,
.now-playing-spectrum .now-playing-spectrum-bar.bass::after {
  box-shadow:
    0 0 10px rgba(var(--accent-rgb), 0.38),
    0 10px 22px rgba(var(--accent-rgb), 0.1);
}

.now-playing-progress {
  justify-self: center;
  width: min(1040px, 100%);
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 16px;
  margin-top: clamp(-12px, -1.1vh, -5px);
}

.now-playing-advanced-panel {
  position: relative;
  z-index: 7;
  width: min(1040px, 100%);
  margin-top: 2px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(170px, 0.85fr) minmax(330px, 1.7fr) minmax(126px, 0.62fr);
}

.now-playing-mode.advanced-open .now-playing-advanced-panel {
  max-height: 138px;
  overflow: visible;
  z-index: 7;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.now-playing-mode.ab-loop-menu-open .now-playing-advanced-panel {
  z-index: 40;
}

.now-playing-mode.advanced-open .now-playing-stage {
  z-index: 12;
  overflow: visible;
}

.now-playing-progress input::-webkit-slider-runnable-track {
  height: 4px;
}

.now-playing-progress input::-moz-range-track,
.now-playing-progress input::-moz-range-progress {
  height: 4px;
}

.now-playing-bottom {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(420px, 1fr);
  align-items: end;
  gap: clamp(16px, 2vw, 28px);
  transform: translateY(clamp(-10px, -0.8vh, -4px));
}

.now-playing-center-actions {
  position: relative;
  z-index: 12;
  display: grid;
  align-items: center;
  justify-items: center;
  justify-self: center;
  gap: clamp(10px, 1.1vh, 14px);
  width: min(820px, 100%);
  margin-top: clamp(1px, 0.25vh, 4px);
}

.now-playing-exit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 10px;
  width: min(230px, 24vw);
  min-height: 54px;
  padding: 0 22px;
  color: #eeeaf8;
  font-weight: 800;
}

.now-playing-exit-button svg {
  width: 20px;
  height: 20px;
  color: var(--now-green);
}

.now-playing-volume {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
  width: min(340px, 100%);
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(17, 18, 27, 0.7);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 8;
  pointer-events: auto;
}

.now-playing-volume .volume-button {
  color: #f4f0ff;
}

.now-playing-volume input {
  min-width: 0;
  position: relative;
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
  touch-action: pan-x;
}

.now-playing-volume span {
  color: #c8c2d8;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.now-playing-controls {
  justify-self: center;
  gap: clamp(16px, 2.2vw, 32px);
}

.now-playing-control {
  width: 62px;
  height: 62px;
  color: #fff;
}

.now-playing-play {
  width: 88px;
  height: 88px;
  color: #fff;
}

.now-playing-up-next-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto 20px;
  grid-template-areas:
    "label label label label"
    "art copy time chevron";
  align-items: center;
  justify-self: end;
  gap: 8px 14px;
  width: min(450px, 100%);
  min-height: 126px;
  padding: 16px;
  color: #f8f7ff;
  text-align: left;
}

.now-playing-up-next-card.empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
}

.now-playing-up-next-label,
.now-playing-up-next-card.empty > span {
  grid-area: label;
  color: var(--now-green);
  font-size: 16px;
  font-weight: 900;
}

.now-playing-up-next-art {
  grid-area: art;
  width: 82px;
  aspect-ratio: 1;
  border-radius: 6px;
  background-position: center;
  background-size: cover;
}

.now-playing-up-next-copy {
  grid-area: copy;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.now-playing-up-next-copy strong,
.now-playing-up-next-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing-up-next-copy strong {
  font-size: 17px;
}

.now-playing-up-next-copy small {
  color: #b8b3c9;
  font-size: 15px;
}

.now-playing-up-next-time {
  grid-area: time;
  color: #c3bfd2;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.now-playing-up-next-chevron {
  grid-area: chevron;
  align-self: center;
  justify-self: end;
  color: var(--now-green);
  opacity: 0.82;
}

.now-playing-up-next-chevron svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 1180px) {
  .now-playing-mode {
    overflow-y: auto;
  }

  .now-playing-stage {
    width: min(960px, 92vw);
    transform: translateY(clamp(16px, 2.2vh, 34px));
  }

  .now-playing-top {
    grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  }

  .now-playing-art {
    width: clamp(292px, 40vh, 460px);
  }

  .now-playing-art-wrap > .now-playing-lyrics-card {
    width: clamp(292px, 40vh, 460px);
  }

  .now-playing-mode.advanced-open .now-playing-advanced-panel {
    max-height: 224px;
  }
}

@media (max-width: 820px) {
  .now-playing-mode {
    grid-template-rows: auto auto auto;
    padding: 20px 16px;
    overflow-y: auto;
  }

  .now-playing-top {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .now-playing-brand {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .now-playing-top-context {
    grid-column: 1;
    grid-row: 2;
    width: min(230px, 100%);
  }

  .now-playing-top-actions {
    grid-column: 2;
    grid-row: 2;
    display: flex;
  }

  .now-playing-pill {
    min-height: 44px;
    padding: 0 16px;
  }

  .now-playing-pill.icon-only {
    width: 50px;
  }

  .now-playing-main {
    width: 100%;
    margin-top: 0;
  }

  .now-playing-stage {
    width: 100%;
    padding-top: 12px;
    transform: none;
  }

  .now-playing-art {
    width: min(74vw, 370px);
  }

  .now-playing-title-row h2 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .now-playing-art-wrap > .now-playing-lyrics-card {
    width: min(74vw, 370px);
  }

  .now-playing-spectrum-wrap,
  .now-playing-progress {
    width: 100%;
  }

  .now-playing-advanced-panel {
    width: 100%;
  }

  .now-playing-mode.advanced-open .now-playing-advanced-panel {
    max-height: min(42vh, 430px);
    overflow-y: auto;
  }

  .now-playing-spectrum {
    --spectrum-bar-gap: 3px;
    --spectrum-bar-width: 3px;
    height: 84px;
    padding-inline: 0;
  }

  .now-playing-bottom {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .now-playing-center-actions {
    order: 0;
    flex-direction: column;
    width: 100%;
    min-width: 0;
  }

  .now-playing-controls {
    gap: 12px;
  }

  .now-playing-volume {
    justify-self: center;
    width: min(320px, 100%);
  }

  .now-playing-advanced-panel .player-advanced-card {
    min-height: 94px;
  }

  .now-playing-control {
    width: 48px;
    height: 48px;
  }

  .now-playing-play {
    width: 72px;
    height: 72px;
  }

  .now-playing-exit-button,
  .now-playing-up-next-card {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .now-playing-mode {
    display: grid;
  }

  .now-playing-context-card {
    min-height: 54px;
  }

  .now-playing-brand-mark {
    width: 38px;
    height: 38px;
  }

  .now-playing-brand strong {
    font-size: 20px;
  }

  .now-playing-art {
    width: min(78vw, 322px);
    border-radius: 14px;
  }

  .now-playing-art-wrap > .now-playing-lyrics-card {
    width: min(78vw, 322px);
    padding: 12px;
  }

  .now-playing-badges {
    gap: 7px;
  }

  .now-playing-badge {
    min-height: 28px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .now-playing-progress {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 9px;
  }

  .now-playing-spectrum {
    --spectrum-bar-width: 2px;
    height: 72px;
  }

  .now-playing-volume {
    grid-template-columns: 28px minmax(0, 1fr) 38px;
    padding-inline: 12px;
  }

  .now-playing-mode.advanced-open .now-playing-advanced-panel {
    max-height: min(50vh, 430px);
  }

  .now-playing-control {
    width: 42px;
    height: 42px;
  }

  .now-playing-play {
    width: 64px;
    height: 64px;
  }
}

.recovery-notice,
.runtime-notice {
  position: fixed;
  left: 50%;
  top: 16px;
  z-index: 120;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: min(760px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 14px;
  border: 1px solid rgba(244, 185, 66, 0.5);
  border-radius: var(--radius);
  background: #211a12;
  color: var(--text);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.54);
}

.runtime-notice {
  border-color: rgba(255, 85, 121, 0.48);
  background: #25121a;
}

.recovery-notice strong,
.runtime-notice strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.recovery-notice p,
.runtime-notice p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.recovery-notice span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.recovery-notice .tool-button,
.runtime-notice .tool-button {
  align-self: start;
}

.playlist-edit-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.playlist-track-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
  min-width: 0;
}

.playlist-track-form .primary-button,
.playlist-edit-panel > .danger-button {
  min-height: 42px;
  align-self: end;
}

.playlist-suggestion-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  min-width: 0;
  padding-top: 4px;
}

.playlist-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  min-width: 0;
}

.playlist-suggestion-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 62px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.playlist-suggestion-card:hover {
  background: rgba(255, 255, 255, 0.07);
}

.playlist-suggestion-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.playlist-suggestion-copy strong,
.playlist-suggestion-copy span,
.playlist-suggestion-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-suggestion-copy strong {
  color: var(--text);
}

.playlist-suggestion-copy span,
.playlist-suggestion-copy small {
  color: var(--muted);
}

.playlist-detail-table {
  margin-top: 6px;
}

.settings-group,
.rules-band {
  min-width: 0;
  padding: 18px;
  margin-top: 16px;
}

.settings-layout {
  display: grid;
  gap: 14px;
  min-width: 0;
  container: settings-layout / inline-size;
}

.settings-group-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.settings-group-head p {
  margin: 6px 0 0;
}

.settings-form {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.accent-form {
  display: grid;
  grid-template-columns: minmax(0, 320px) auto;
  gap: 12px;
  align-items: end;
  justify-content: start;
}

.local-library-form {
  grid-template-columns: minmax(150px, 0.6fr) minmax(240px, 1.4fr) auto;
}

.local-library-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.local-library-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.local-library-check {
  padding: 0;
  border: 0;
  background: transparent;
}

.settings-subsection {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings-subsection-head {
  display: grid;
  gap: 5px;
}

.settings-subsection-head p {
  margin: 0;
}

.settings-dashboard {
  gap: 16px;
}

.settings-action-bar {
  display: flex;
  justify-content: end;
  gap: 10px;
  margin-top: -2px;
}

.settings-eq-button {
  min-width: 176px;
}

.settings-apply-button {
  min-width: 112px;
}

.settings-grid {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.settings-grid-two {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
}

.settings-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@container settings-layout (max-width: 1050px) {
  .settings-grid-three {
    grid-template-columns: 1fr;
  }
}

.settings-wide {
  margin-top: 0;
}

.settings-connection-form {
  grid-template-columns: minmax(320px, 1.05fr) minmax(300px, 1.15fr) minmax(170px, 0.55fr);
  align-items: start;
  gap: 10px 12px;
}

.settings-connection-form .field {
  grid-template-rows: 18px 42px minmax(18px, auto);
  gap: 5px;
  min-width: 0;
}

.settings-connection-form .field input,
.settings-connection-form .field select {
  min-width: 0;
}

.settings-connection-form .field small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  min-height: 18px;
}

.settings-connection-form .field:not(:has(small))::after {
  content: "";
  min-height: 18px;
}

.plex-connection-actions,
.plex-auth-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.plex-connection-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.settings-plex-card.collapsed .settings-group-head {
  margin-bottom: 0;
}

.plex-connection-body {
  display: grid;
  gap: 12px;
}

.plex-auth-toggle {
  min-width: 0;
}

.plex-auth-help-button {
  width: 34px;
  height: 34px;
  font-weight: 800;
}

.plex-auth-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
}

.plex-auth-link-row {
  flex: 1 1 100%;
  flex-wrap: wrap;
}

.plex-auth-link-row code {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 9px 10px;
  user-select: all;
}

.plex-auth-panel .pairing-code {
  margin-top: 0;
  font-size: 1.25rem;
}

.plex-auth-panel p {
  flex-basis: 100%;
  margin: 0;
}

.plex-auth-help-window {
  max-width: 560px;
}

.plex-auth-help-copy {
  display: grid;
  gap: 10px;
}

.plex-auth-help-copy p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.settings-library-picker {
  margin-top: 18px;
}

.settings-library-checks {
  grid-template-columns: repeat(auto-fit, minmax(190px, max-content));
}

.settings-stack-form {
  grid-template-columns: 1fr;
  align-items: start;
}

.settings-stack-form .primary-button {
  justify-self: end;
}

.playback-behavior-form {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings-toggle-row {
  min-height: 48px;
}

.chord-sync-form {
  grid-template-columns: minmax(0, 1fr);
  justify-content: start;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings-file-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 10px;
  margin-top: 22px;
}

.settings-file-actions .tool-button {
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding-inline: 10px;
  text-align: center;
}

.settings-file-actions .tool-button span {
  line-height: 1.08;
  white-space: normal;
}

.lyrics-scan-actions {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.lyrics-scan-actions .metadata-action-button {
  width: 100%;
  min-height: 48px;
}

@container settings-layout (max-width: 780px) {
  .settings-grid-two,
  .settings-grid-three,
  .settings-connection-form,
  .settings-form,
  .accent-form {
    grid-template-columns: 1fr;
  }

  .settings-action-bar {
    justify-content: stretch;
  }

  .settings-eq-button,
  .settings-form .primary-button,
  .accent-form .primary-button {
    width: 100%;
    justify-self: stretch;
  }

  .settings-group-head {
    display: grid;
  }
}

.eq-layout {
  display: grid;
  gap: 16px;
  padding-bottom: 30px;
}

.eq-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.eq-mode-button {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  min-width: 210px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-weight: 800;
}

.eq-mode-button svg {
  width: 20px;
  height: 20px;
}

.eq-mode-button:hover,
.eq-mode-button.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.42), rgba(var(--accent-rgb), 0.2));
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.35), 0 18px 40px rgba(var(--accent-rgb), 0.14);
}

.eq-panel,
.eq-control-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.075), transparent 34%),
    rgba(255, 255, 255, 0.045);
}

.eq-panel {
  padding: 24px;
}

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

.eq-panel-head p {
  margin: 6px 0 0;
}

.eq-preset-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: end;
  gap: 10px;
}

.eq-preset-select {
  display: grid;
  grid-template-columns: auto minmax(160px, 220px);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.eq-preset-select select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel-3);
  color: var(--text);
}

.eq-bands {
  display: grid;
  gap: 12px;
}

.eq-bands.standard {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.eq-bands.advanced {
  grid-template-columns: repeat(10, minmax(74px, 1fr));
  gap: 8px;
}

.eq-band {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
}

.eq-standard-band {
  min-height: 420px;
  padding: 20px 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(18, 18, 25, 0.72);
}

.eq-advanced-band {
  min-height: 390px;
  padding: 10px 4px 6px;
}

.eq-band-title {
  overflow-wrap: anywhere;
  text-align: center;
  font-weight: 800;
}

.eq-band-frequency {
  margin-top: -8px;
  color: var(--muted);
  font-size: 13px;
}

.eq-slider-row {
  display: grid;
  grid-template-columns: 40px 34px 18px;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  min-height: 248px;
}

.advanced .eq-slider-row {
  grid-template-columns: 34px 30px 14px;
}

.eq-scale {
  display: grid;
  align-content: space-between;
  height: 248px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.eq-slider-shell {
  position: relative;
  width: 28px;
  height: 248px;
}

.eq-slider-track,
.eq-slider-fill {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 14px;
  border-radius: 999px;
  transform: translateX(-50%);
  pointer-events: none;
}

.eq-slider-track {
  top: 0;
  background: #07070b;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.eq-slider-fill {
  height: var(--eq-fill, 50%);
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.3);
}

.eq-slider-shell input {
  position: absolute;
  inset: 0;
  width: 248px;
  height: 28px;
  margin: 0;
  transform: translate(-110px, 110px) rotate(-90deg);
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.eq-slider-shell input::-webkit-slider-runnable-track {
  height: 28px;
  background: transparent;
}

.eq-slider-shell input::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
  margin-top: -1px;
  appearance: none;
  border: 2px solid color-mix(in srgb, var(--accent) 70%, white 20%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.2) 23%, transparent 24%),
    linear-gradient(135deg, #d6d6d6, #5d5d5d 55%, #1f1f1f);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.9);
}

.eq-slider-shell input::-moz-range-track {
  height: 28px;
  background: transparent;
}

.eq-slider-shell input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #9a9a9a;
}

.eq-ticks {
  display: grid;
  align-content: space-between;
  height: 248px;
}

.eq-ticks span {
  width: 8px;
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.eq-value-box,
.eq-preamp-value {
  min-width: 76px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 8, 12, 0.62);
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.eq-control-panel {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: 22px;
  padding: 24px 28px;
}

.eq-preamp-block,
.eq-bypass-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
}

.eq-bypass-block {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.eq-preamp-block p,
.eq-bypass-block p {
  margin: 6px 0 0;
}

.eq-knob-control {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
  flex: none;
}

.eq-knob {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #1a1a1d 0 42%, transparent 43%),
    conic-gradient(from 225deg, var(--accent) 0 var(--eq-knob-fill), rgba(255, 255, 255, 0.12) var(--eq-knob-fill) 75%, transparent 75% 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 5px #0a0a0d, inset 0 0 16px rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.42);
}

.eq-knob::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  transform: translate(-50%, -100%) rotate(var(--eq-knob-angle));
  transform-origin: 50% 100%;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
}

.eq-knob-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  cursor: pointer;
}

.eq-save-block {
  display: grid;
  gap: 12px;
}

.eq-safety-block {
  align-content: center;
  justify-items: start;
}

.eq-option-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.eq-clip-indicator {
  display: grid;
  gap: 2px;
  min-height: 36px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.eq-clip-indicator span {
  font-weight: 800;
}

.eq-clip-indicator small {
  color: var(--muted);
}

.eq-clip-indicator.safe {
  border-color: rgba(73, 211, 157, 0.38);
  color: #9cf0c9;
}

.eq-clip-indicator.limit {
  border-color: rgba(var(--accent-rgb), 0.42);
  color: var(--accent-3);
}

.eq-clip-indicator.risk {
  border-color: rgba(255, 85, 121, 0.46);
  color: #ffb1c2;
}

.eq-clip-indicator.muted {
  color: var(--muted);
}

.eq-switch {
  position: relative;
  display: inline-flex;
  width: 54px;
  height: 28px;
}

.eq-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.eq-switch span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  transition: background 0.16s ease, border-color 0.16s ease;
}

.eq-switch span::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.16s ease, background 0.16s ease;
}

.eq-switch input:checked + span {
  border-color: rgba(var(--accent-rgb), 0.75);
  background: rgba(var(--accent-rgb), 0.38);
}

.eq-switch input:checked + span::after {
  transform: translateX(25px);
  background: #fff;
}

.link-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.link-form .primary-button {
  grid-column: 1 / -1;
  justify-self: end;
}

.track-search-field {
  position: relative;
  min-width: 0;
}

@container (max-width: 1050px) {
  .link-form {
    grid-template-columns: 1fr;
  }
}

.track-search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  gap: 4px;
  max-height: 270px;
  padding: 4px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #171522;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.46);
  z-index: 60;
}

.track-search-results:empty {
  display: none;
}

.track-search-result,
.track-search-empty {
  display: grid;
  gap: 5px;
  min-height: 54px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
}

.track-search-result:hover {
  background: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.track-search-result span {
  overflow: visible;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.track-search-result small {
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-search-result small,
.track-search-empty {
  color: var(--muted);
  font-size: 12px;
}

.error-text {
  color: #ff8f9a;
}

.provider-form {
  align-items: center;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-3);
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.toggle-pill .label-help {
  min-width: 0;
}

.toggle-pill .label-help > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toggle-pill input {
  position: relative;
  width: 28px;
  height: 16px;
  flex: none;
  margin: 0;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.16s ease, border-color 0.16s ease;
}

.toggle-pill input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.16s ease, background 0.16s ease;
}

.toggle-pill input:checked {
  border-color: rgba(var(--accent-rgb), 0.75);
  background: rgba(var(--accent-rgb), 0.55);
}

.toggle-pill input:checked::after {
  transform: translateX(12px);
  background: #fff;
}

.toggle-pill:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(255, 255, 255, 0.07);
}

.rule-builder-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.shuffle-rule-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.shuffle-rule-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(190px, 1.4fr) 120px 36px;
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.shuffle-workshop {
  display: grid;
  gap: 16px;
  container: shuffle-workshop / inline-size;
  padding-top: 18px;
}

.workshop-hero,
.workshop-stats,
.workshop-grid,
.workshop-block-grid {
  display: grid;
  gap: 12px;
}

.workshop-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.workshop-hero h2 {
  margin: 6px 0 6px;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

.workshop-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  flex-wrap: wrap;
}

.workshop-generate-stack {
  display: grid;
  position: relative;
  min-width: 250px;
}

.workshop-generate-stack .generate-button {
  width: 100%;
  justify-content: center;
}

.workshop-generate-stack > .metadata-action-button {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 4;
  width: 100%;
  min-width: 0;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
}

.metadata-action-button {
  display: grid;
  position: relative;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 250px;
  min-height: 38px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
}

.metadata-action-button svg,
.metadata-action-button > span {
  position: relative;
  z-index: 1;
}

.metadata-action-button:hover:not(:disabled) {
  border-color: rgba(73, 211, 157, 0.45);
  background:
    radial-gradient(circle at 100% 0%, rgba(73, 211, 157, 0.18), transparent 34%),
    rgba(var(--accent-rgb), 0.12);
}

.metadata-action-button:disabled {
  opacity: 1;
  cursor: default;
}

.metadata-action-button svg {
  width: 18px;
  height: 18px;
}

.metadata-action-button.is-running svg {
  animation: spinRefresh 0.9s linear infinite;
}

.metadata-action-button strong,
.metadata-action-button small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metadata-action-button strong {
  font-size: 12px;
  line-height: 1.15;
}

.metadata-action-button small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.workshop-profile-select {
  height: 38px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #15131d;
  color: var(--text);
  padding: 0 12px;
}

.generate-button {
  border-color: rgba(73, 211, 157, 0.45);
  background: linear-gradient(135deg, rgba(73, 211, 157, 0.9), rgba(var(--accent-rgb), 0.75));
  color: #fff;
}

.workshop-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 70% 0%, rgba(70, 208, 217, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.035);
}

.workshop-stat {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 12px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb), 0.16), transparent 34%),
    rgba(15, 14, 22, 0.78);
}

.stat-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: var(--accent-3);
  background: rgba(var(--accent-rgb), 0.16);
}

.workshop-stat strong {
  font-size: 20px;
}

.workshop-stat small {
  color: var(--muted);
  font-size: 12px;
}

.workshop-stat small .label-help {
  color: var(--muted);
  font-size: 12px;
}

.workshop-grid {
  grid-template-columns: minmax(210px, 0.85fr) minmax(320px, 1.25fr) minmax(220px, 0.9fr);
  align-items: start;
}

.workshop-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(12, 11, 18, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.rule-library-panel,
.shuffle-flow-panel,
.workshop-inspector,
.profile-basics-panel,
.saved-workshop-panel {
  padding: 14px;
}

.rule-library-panel,
.shuffle-flow-panel,
.workshop-inspector {
  height: min(720px, calc(100vh - 300px));
  min-height: 420px;
  max-height: min(720px, calc(100vh - 300px));
  overflow: hidden;
}

.rule-library-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
}

.shuffle-flow-panel,
.workshop-inspector {
  overflow: auto;
}

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

.panel-head p {
  margin: 4px 0 0;
}

.compact-head {
  align-items: center;
  margin-bottom: 8px;
}

.link-button {
  padding: 0;
  background: transparent;
  color: var(--accent-3);
  font-size: 12px;
}

.workshop-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-3);
}

.workshop-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.rule-filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.mini-pill {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
}

.mini-pill.active,
.mini-pill:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--text);
}

.rule-library-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.rule-category {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.rule-category summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 10px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.rule-category summary::-webkit-details-marker {
  display: none;
}

.rule-category summary small {
  color: var(--quiet);
}

.rule-category-list {
  display: grid;
  gap: 6px;
  padding: 0 8px 8px;
}

.rule-library-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 24px;
  align-items: start;
  gap: 8px;
  min-height: 66px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.rule-library-item:hover {
  background: rgba(var(--accent-rgb), 0.14);
}

.rule-library-item .rule-grip,
.rule-library-item .rule-add {
  opacity: 0;
  transition: opacity 0.16s ease;
}

.rule-library-item:hover .rule-grip,
.rule-library-item:hover .rule-add,
.rule-library-item:focus-visible .rule-grip,
.rule-library-item:focus-visible .rule-add {
  opacity: 1;
}

.rule-library-item strong,
.rule-library-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rule-library-item > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rule-library-title {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.rule-library-title strong {
  min-width: 0;
}

.rule-library-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.rule-library-item strong {
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.rule-library-item small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.rule-library-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.rule-library-badges em {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--quiet);
  font-size: 10px;
  font-style: normal;
}

.rule-library-badges .help-dot,
.queue-reason-row .help-dot {
  width: 12px;
  height: 12px;
  font-size: 8px;
}

.rule-grip,
.rule-add {
  color: var(--quiet);
  text-align: center;
}

.rule-library-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px;
  border: 1px dashed rgba(var(--accent-rgb), 0.35);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
}

.flow-stack {
  gap: 12px;
}

.flow-health {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.flow-health > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.flow-health strong {
  font-size: 15px;
}

.flow-health > div > span:not(.section-title):not(.label-help) {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: normal;
}

.flow-health .label-help:not(.section-title) {
  color: var(--muted);
  font-size: 11px;
}

.flow-health-strong {
  border-color: rgba(73, 211, 157, 0.32);
  background: rgba(73, 211, 157, 0.08);
}

.flow-health-narrow,
.flow-health-restrictive {
  border-color: rgba(239, 173, 69, 0.35);
  background: rgba(239, 173, 69, 0.08);
}

.flow-health-warning {
  border-color: rgba(255, 85, 121, 0.38);
  background: rgba(255, 85, 121, 0.08);
}

.flow-rule-card {
  grid-template-columns: 24px minmax(0, 1fr) auto 32px;
  position: relative;
  min-height: 96px;
  align-items: start;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(90deg, var(--rule-tone, rgba(var(--accent-rgb), 0.25)), transparent 4px),
    rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.flow-rule-card.selected {
  border-color: color-mix(in srgb, var(--rule-tone, var(--accent)) 70%, white 10%);
  background:
    linear-gradient(90deg, var(--rule-tone, rgba(var(--accent-rgb), 0.32)), transparent 5px),
    rgba(255, 255, 255, 0.065);
}

.flow-rule-card + .flow-rule-card::before {
  content: "";
  position: absolute;
  left: 22px;
  top: -13px;
  width: 1px;
  height: 13px;
  border-left: 1px dashed rgba(255, 255, 255, 0.22);
}

.flow-rule-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.flow-rule-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.flow-rule-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.flow-rule-title-line strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-rule-title-line > span:not(.help-dot):not(.label-help) {
  flex: none;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 10px;
}

.flow-rule-main p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.rule-tone-artist { --rule-tone: rgba(154, 109, 255, 0.5); }
.rule-tone-title { --rule-tone: rgba(70, 160, 255, 0.5); }
.rule-tone-mood { --rule-tone: rgba(255, 85, 150, 0.5); }
.rule-tone-genre { --rule-tone: rgba(73, 211, 157, 0.5); }
.rule-tone-time { --rule-tone: rgba(239, 173, 69, 0.55); }
.rule-tone-discovery { --rule-tone: rgba(70, 208, 217, 0.5); }

.rule-type-dot {
  width: 10px;
  height: 34px;
  border-radius: 999px;
  background: var(--rule-tone, var(--accent));
}

.flow-rule-settings {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.flow-rule-setting-wide {
  grid-column: 1 / -1;
}

.flow-rule-setting-wide {
  display: grid;
  gap: 5px;
}

.flow-rule-settings .control-label {
  font-size: 11px;
}

.compact-segmented button {
  min-height: 30px;
}

.flow-rule-card .field {
  gap: 4px;
  min-width: 0;
  font-size: 11px;
}

.flow-rule-card .field span {
  overflow: hidden;
  color: var(--quiet);
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.flow-rule-card .field input,
.flow-rule-card .field select {
  height: 34px;
  padding: 0 9px;
  font-size: 12px;
}

.rule-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.rule-inline-toggle {
  width: 100%;
  align-self: stretch;
  justify-content: start;
  min-height: 34px;
}

.flow-rule-setting-wide.rule-inline-toggle {
  display: inline-flex;
}

.rule-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.58fr);
  align-items: center;
  gap: 8px;
}

.flow-rule-toggle {
  min-height: 32px;
  padding: 0 6px;
}

.flow-rule-toggle input {
  margin: 0;
}

.drop-rule-zone {
  display: grid;
  place-items: center;
  grid-auto-flow: column;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}

.drop-rule-zone svg {
  width: 18px;
  height: 18px;
}

.compact-drop-zone {
  min-height: 36px;
  justify-content: start;
  padding: 0 12px;
}

.workshop-inspector h3 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin: 8px 0 5px;
  font-size: 18px;
}

.control-label {
  color: var(--muted);
  font-size: 13px;
}

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.inspector-tabs button {
  min-height: 30px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.inspector-tabs button.active {
  background: rgba(var(--accent-rgb), 0.22);
  color: var(--text);
}

.selected-rule-editor {
  display: grid;
  gap: 12px;
}

.inspector-rule-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.inspector-note,
.inspector-warning {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 12px;
}

.inspector-note.good {
  border-color: rgba(73, 211, 157, 0.28);
  background: rgba(73, 211, 157, 0.08);
}

.inspector-warning {
  border-color: rgba(239, 173, 69, 0.25);
  background: rgba(239, 173, 69, 0.07);
}

.inspector-warning strong {
  color: var(--text);
}

.inspector-warning-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segmented-control button {
  min-height: 32px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
}

.segmented-control .active-primary {
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--text);
}

.profile-basics {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-basics-panel .profile-basics {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.profile-basics-panel .inspector-fields {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  align-items: end;
}

.profile-basics-panel .field-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-basics-panel .field-pair:last-child {
  grid-column: span 2;
}

.profile-basics summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.standalone-preview {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.queue-reason-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.queue-reason-row em {
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--quiet);
  font-size: 10px;
  font-style: normal;
}

.inspector-fields,
.queue-preview-list {
  display: grid;
  gap: 9px;
}

.inspector-fields {
  margin-top: 14px;
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
}

.inspector-toggle {
  align-self: end;
}

.queue-preview-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.queue-preview-panel.standalone-preview {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.queue-preview-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 46px;
}

.queue-preview-row .queue-art {
  width: 36px;
  height: 36px;
}

.queue-preview-row strong,
.queue-preview-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-preview-row span,
.queue-preview-row small {
  color: var(--muted);
  font-size: 11px;
}

.enrichment-status-card,
.lyrics-scan-button {
  margin: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(73, 211, 157, 0.12), transparent 34%),
    rgba(var(--accent-rgb), 0.08);
}

.enrichment-status-card::before,
.lyrics-scan-button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--metadata-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(73, 211, 157, 0.22), rgba(var(--accent-rgb), 0.2));
  opacity: 0.75;
  pointer-events: none;
  transition: width 220ms ease;
}

.lyrics-scan-button::before {
  width: var(--lyrics-progress, 0%);
}

.enrichment-status-card.is-running,
.lyrics-scan-button.is-running {
  border-color: rgba(73, 211, 157, 0.34);
  background:
    linear-gradient(115deg, rgba(var(--accent-rgb), 0.08), rgba(73, 211, 157, 0.22), rgba(var(--accent-rgb), 0.08)),
    radial-gradient(circle at 100% 0%, rgba(73, 211, 157, 0.18), transparent 34%),
    rgba(var(--accent-rgb), 0.08);
  background-size: 240% 100%, auto, auto;
  animation: metadataSweep 1.8s ease-in-out infinite;
}

@keyframes metadataSweep {
  0% {
    background-position: 100% 0, 0 0, 0 0;
  }
  100% {
    background-position: -100% 0, 0 0, 0 0;
  }
}

.workshop-block-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workshop-block-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 0%, rgba(var(--accent-rgb), 0.12), transparent 36%),
    rgba(255, 255, 255, 0.035);
}

.workshop-block-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workshop-block-card strong,
.workshop-block-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workshop-block-card strong {
  white-space: nowrap;
}

.workshop-block-card span {
  display: -webkit-box;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.compact-empty {
  min-height: 64px;
}

@media (max-width: 1500px) {
  .workshop-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .workshop-actions {
    justify-content: start;
  }
}

@container shuffle-workshop (max-width: 980px) {
  .workshop-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .workshop-actions {
    justify-content: start;
  }

  .workshop-generate-stack {
    gap: 6px;
  }

  .workshop-generate-stack > .metadata-action-button {
    position: static;
    width: 100%;
    min-width: 0;
    box-shadow: none;
  }

  .workshop-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-basics-panel .inspector-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workshop-grid {
    grid-template-columns: minmax(190px, 0.82fr) minmax(0, 1.18fr);
  }

  .workshop-inspector {
    grid-column: 1 / -1;
    height: auto;
    min-height: 240px;
    max-height: none;
  }

  .workshop-block-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container shuffle-workshop (max-width: 700px) {
  .workshop-grid,
  .workshop-stats,
  .workshop-block-grid {
    grid-template-columns: 1fr;
  }

  .rule-library-panel,
  .shuffle-flow-panel,
  .workshop-inspector {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .rule-library-list {
    overflow: visible;
    padding-right: 0;
  }

  .panel-head {
    display: grid;
  }
}

@container shuffle-workshop (max-width: 460px) {
  .workshop-hero h2 {
    font-size: 28px;
  }

  .workshop-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .profile-basics-panel .inspector-fields,
  .profile-basics-panel .field-pair {
    grid-template-columns: 1fr;
  }

  .profile-basics-panel .field-pair:last-child {
    grid-column: auto;
  }

  .workshop-actions > *,
  .workshop-profile-select,
  .workshop-generate-stack,
  .workshop-generate-stack > .metadata-action-button,
  .metadata-action-button {
    width: 100%;
    min-width: 0;
  }

  .workshop-generate-stack {
    gap: 6px;
  }

  .workshop-generate-stack > .metadata-action-button {
    position: static;
    box-shadow: none;
  }

  .workshop-stats,
  .rule-library-panel,
  .shuffle-flow-panel,
  .workshop-inspector,
  .profile-basics-panel,
  .saved-workshop-panel {
    padding: 10px;
  }

  .workshop-stat {
    min-height: 64px;
    padding: 10px;
  }

  .flow-rule-card {
    grid-template-columns: 24px minmax(0, 1fr) 36px;
    gap: 8px;
  }

  .flow-rule-main {
    grid-column: 2 / -1;
  }

  .flow-rule-settings {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .flow-rule-toggle {
    grid-column: 2;
    justify-self: start;
  }

  .flow-rule-card > .icon-button {
    grid-column: 3;
    grid-row: 3;
  }
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.field .label-help {
  justify-self: start;
  color: var(--muted);
}

.field input,
.field select {
  height: 42px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  outline: 0;
  padding: 0 12px;
  background: var(--panel-3);
  color: var(--text);
}

.color-field input {
  max-width: 96px;
  padding: 4px;
}

.field input:focus,
.field select:focus {
  border-color: rgba(var(--accent-rgb), 0.7);
}

.checkbox-field {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-3);
  color: var(--text);
  font-size: 13px;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.checkbox-field span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-picker {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.section-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.shuffle-profiles {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.shuffle-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.shuffle-profile.active {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.12);
}

.shuffle-profile strong,
.shuffle-profile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shuffle-profile small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.section-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.section-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.section-check span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.section-check strong,
.section-check small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-check small {
  color: var(--muted);
  font-size: 12px;
}

.rule-grid {
  margin-top: 14px;
}

.link-rule-grid {
  margin-top: 0;
}

.rule-row,
.link-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.link-row {
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) auto;
}

.pill {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(var(--accent-rgb), 0.22);
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.queue-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.queue-header {
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 14px;
}

.queue-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.queue-list {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
  padding-right: 4px;
}

.queue-panel.chords-open .queue-list {
  overflow-x: hidden;
}

.queue-item {
  display: grid;
  grid-template-columns: 28px 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 7px 9px;
  border-radius: var(--radius);
  color: var(--muted);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  width: 100%;
}

.queue-item:hover {
  background: rgba(255, 255, 255, 0.065);
}

.queue-item.active {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.28);
}

.queue-item.unsupported-format {
  border-color: rgba(255, 190, 105, 0.18);
  background: rgba(255, 174, 72, 0.055);
}

.queue-item.unsupported-format .queue-title {
  color: #f1d2b2;
}

.queue-status {
  display: grid;
  place-items: center;
  color: var(--quiet);
  text-align: center;
}

.queue-status svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.queue-art {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  box-shadow: none;
}

.queue-item.active .queue-title {
  color: var(--accent-3);
}

.player-bar {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(300px, 560px) minmax(160px, 1fr);
  align-items: center;
  align-content: center;
  column-gap: 18px;
  row-gap: 0;
  min-height: var(--bar-height);
  overflow: visible;
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #08080c;
  transition: box-shadow 220ms ease;
}

.player-bar.advanced-open {
  align-items: center;
  align-content: center;
  row-gap: 0;
  overflow: visible;
  z-index: 80;
  box-shadow: 0 -18px 46px rgba(0, 0, 0, 0.34);
}

.player-bar.ab-loop-menu-open {
  z-index: 120;
}

.player-bar.ab-loop-menu-open > .player-advanced-panel {
  overflow: visible;
}

.player-track {
  grid-row: 1;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mini-art {
  width: 58px;
  height: 58px;
  border-radius: 6px;
}

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

.transport {
  grid-row: 1;
  display: grid;
  justify-items: stretch;
  gap: 8px;
}

.transport-top {
  display: grid;
  grid-template-columns: minmax(36px, 1fr) auto minmax(36px, 1fr);
  align-items: center;
  width: 100%;
}

.transport-top .transport-controls {
  grid-column: 2;
  justify-content: center;
}

.transport-top .transport-feature-buttons {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.play-button {
  width: 42px;
  height: 42px;
  background: #fff;
  color: #060509;
}

.play-button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.78), 0 0 22px rgba(var(--accent-rgb), 0.35);
}

#shuffleButton,
#repeatButton,
#advancedPlayerButton,
#chordsButton,
#lyricsButton {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: transparent;
  color: #fff;
}

#shuffleButton.active,
#repeatButton.active,
#advancedPlayerButton.active,
#chordsButton.active,
#lyricsButton.active {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--accent-3);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.42);
}

#lyricsButton:not(.active) {
  border-color: rgba(255, 255, 255, 0.78);
  background: transparent;
  color: #fff;
  box-shadow: none;
}

#lyricsButton.active {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}

.player-advanced-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(132px, 0.62fr) minmax(132px, 0.62fr) minmax(146px, 0.66fr) minmax(590px, 2.55fr);
  gap: 7px;
  width: 100%;
  max-height: 0;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: none;
  transition: max-height 220ms ease, opacity 220ms ease;
}

.player-bar > .player-advanced-panel {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: calc(100% + 6px);
  box-sizing: border-box;
  width: min(1280px, calc(100vw - 48px));
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(8, 8, 12, 0.97);
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
  z-index: 2;
  transform: translateX(-50%);
  transition: max-height 220ms ease, opacity 220ms ease;
}

.player-bar.advanced-open > .player-advanced-panel {
  max-height: 148px;
  overflow: hidden;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%);
}

.player-bar.advanced-open.ab-loop-menu-open > .player-advanced-panel {
  overflow: visible;
}

.player-bar.advanced-open.ab-loop-launcher-open > .player-advanced-panel {
  overflow: visible;
}

.player-advanced-card {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: 76px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 16, 24, 0.96);
}

.advanced-card-head,
.advanced-select-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.advanced-card-head span,
.advanced-select-field span {
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advanced-card-head strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.advanced-card-head strong.active {
  color: var(--green);
}

.player-advanced-card small {
  align-self: end;
  min-width: 0;
  overflow: hidden;
  color: var(--quiet);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-advanced-card button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.advanced-select-field select {
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  outline: 0;
  background: var(--panel-2);
  color: var(--text);
}

.advanced-select-field select {
  width: 112px;
  padding: 0 8px;
}

.advanced-stepper {
  display: grid;
  grid-template-columns: 30px minmax(46px, 1fr) 30px;
  align-items: center;
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.advanced-stepper button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 100%;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.advanced-stepper button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.advanced-stepper svg {
  width: 14px;
  height: 14px;
}

.advanced-stepper output {
  min-width: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.advanced-reset-button {
  justify-self: center;
  min-height: 23px;
  min-width: 62px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 11px;
}

.advanced-reset-button:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.14);
}

.ab-loop-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: start;
  gap: 5px;
  min-width: 0;
}

.ab-loop-actions .tool-button {
  width: auto;
  min-width: 0;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.ab-loop-time-control {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ab-loop-time-control .tool-button {
  width: 100%;
}

.ab-loop-time-input {
  width: 100%;
  min-width: 0;
  height: 26px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-align: center;
  outline: none;
}

.ab-loop-time-input::placeholder {
  color: rgba(235, 231, 245, 0.36);
}

.ab-loop-time-input:focus {
  border-color: rgba(var(--accent-rgb), 0.58);
  background: rgba(var(--accent-rgb), 0.13);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.14);
}

.ab-loop-time-input:disabled {
  opacity: 0.45;
}

.ab-loop-time-input[aria-invalid="true"] {
  border-color: rgba(255, 110, 110, 0.78);
  box-shadow: 0 0 0 2px rgba(255, 80, 80, 0.15);
}

.ab-loop-save-button {
  align-self: start;
}

.ab-loop-launcher-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  min-height: 0;
}

.player-bar > .player-advanced-panel .ab-loop-launcher-panel {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: calc(100% + 12px);
  z-index: 8;
  box-sizing: border-box;
  width: min(1120px, calc(100vw - 64px));
  max-height: min(72vh, 620px);
  overflow: visible;
  padding: 28px 30px 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 12%, rgba(var(--accent-rgb), 0.18), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(91, 162, 255, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(18, 19, 29, 0.98), rgba(7, 7, 12, 0.98) 62%, rgba(5, 5, 8, 0.99));
  box-shadow:
    0 -26px 70px rgba(0, 0, 0, 0.62),
    0 0 42px rgba(var(--accent-rgb), 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -28px 58px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
}

.loop-launcher-popout::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 34%, rgba(var(--accent-rgb), 0.06));
}

.loop-launcher-grab-handle {
  position: absolute;
  top: 0;
  left: calc(50% - 52px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 104px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(var(--accent-rgb), 0.72);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.44), rgba(var(--accent-rgb), 0.72));
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.2), inset 0 -1px 0 rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  transform: none;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, filter 120ms ease;
}

.loop-launcher-grab-handle::before {
  content: "";
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.28);
}

.loop-launcher-grab-handle:hover {
  border-color: rgba(var(--accent-rgb), 0.92);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.52), rgba(var(--accent-rgb), 0.82));
  box-shadow: 0 7px 20px rgba(var(--accent-rgb), 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

.loop-launcher-grab-handle:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.9);
  outline-offset: 3px;
}

.loop-launcher-grab-handle:not(:disabled):active,
.loop-launcher-grab-handle.button-click-feedback:not(:disabled) {
  animation: none;
  filter: brightness(1.12);
  transform: none;
}

.loop-launcher-grab-handle.button-click-feedback:not(:disabled)::after {
  animation: none;
  opacity: 0;
}

.ab-loop-launcher-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 46px;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.ab-loop-launcher-head strong {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: start;
  gap: 10px;
  min-width: 0;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0;
}

.ab-loop-launcher-head svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.55));
}

.ab-loop-launcher-head small {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.loop-launcher-help {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(238, 232, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.ab-loop-pad-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 16px;
}

.ab-loop-pad {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-width: 0;
  aspect-ratio: 1 / 1;
  min-height: 132px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--accent-rgb), 0.14), transparent 44%),
    linear-gradient(145deg, rgba(22, 25, 38, 0.94), rgba(10, 11, 18, 0.98));
  color: #dfe8ff;
  text-align: left;
  cursor: pointer;
  box-shadow:
    inset 0 0 24px rgba(var(--accent-rgb), 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.32);
  transition: transform 160ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ab-loop-pad::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 38%, rgba(var(--accent-rgb), 0.06));
}

.ab-loop-pad:hover {
  border-color: rgba(var(--accent-rgb), 0.62);
  box-shadow:
    0 0 28px rgba(var(--accent-rgb), 0.24),
    inset 0 0 30px rgba(var(--accent-rgb), 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 34px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.ab-loop-pad.empty {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(18, 18, 27, 0.88), rgba(8, 8, 13, 0.97));
  color: rgba(235, 231, 245, 0.54);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.025),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(0, 0, 0, 0.28);
}

.ab-loop-pad.assigned {
  border-color: rgba(var(--accent-rgb), 0.42);
  background:
    radial-gradient(circle at 50% 43%, rgba(var(--accent-rgb), 0.15), transparent 45%),
    linear-gradient(145deg, rgba(18, 20, 33, 0.96), rgba(9, 10, 18, 0.98));
}

.ab-loop-pad.playing,
.ab-loop-pad.active {
  border-color: rgba(91, 162, 255, 0.95);
  background:
    radial-gradient(circle at 50% 44%, rgba(var(--accent-rgb), 0.5), rgba(var(--accent-rgb), 0.18) 43%, rgba(11, 13, 21, 0.97) 72%),
    linear-gradient(145deg, rgba(24, 27, 43, 0.98), rgba(8, 9, 16, 0.98));
  box-shadow:
    0 0 30px rgba(var(--accent-rgb), 0.55),
    0 0 76px rgba(var(--accent-rgb), 0.24),
    inset 0 0 42px rgba(var(--accent-rgb), 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.ab-loop-pad.queued {
  border-color: rgba(var(--accent-rgb), 0.74);
  background:
    radial-gradient(circle at 50% 45%, rgba(var(--accent-rgb), 0.3), rgba(var(--accent-rgb), 0.12) 42%, rgba(9, 10, 18, 0.98) 70%),
    linear-gradient(145deg, rgba(21, 23, 36, 0.97), rgba(8, 9, 15, 0.98));
  animation: loopPadQueuedPulse 2.2s ease-in-out infinite;
}

.ab-loop-pad.queued::after {
  content: "";
  position: absolute;
  inset: 28%;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: 999px;
  pointer-events: none;
  animation: loopPadQueuedRipple 2.2s ease-out infinite;
}

.loop-pad-number {
  position: relative;
  z-index: 1;
  justify-self: start;
  color: currentColor;
  font-size: 20px;
  font-weight: 850;
}

.loop-pad-status {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  color: var(--accent);
}

.loop-pad-status svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 9px rgba(var(--accent-rgb), 0.75));
}

.loop-pad-status > span {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.58);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.16);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.28);
}

.loop-pad.assigned .loop-pad-status > span {
  min-width: 9px;
  width: 9px;
  height: 9px;
  padding: 0;
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.46);
}

.loop-pad.empty .loop-pad-status {
  display: none;
}

.loop-pad-core {
  position: absolute;
  inset: 28%;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.18), transparent 64%);
  opacity: 0.55;
  filter: blur(1px);
}

.loop-pad.empty .loop-pad-core {
  opacity: 0;
}

.loop-pad-name,
.loop-pad-meta {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loop-pad-name {
  align-self: end;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  text-align: center;
}

.loop-pad-meta {
  color: rgba(235, 231, 245, 0.68);
  font-size: 11px;
  text-align: center;
}

.loop-pad.empty .loop-pad-name {
  color: rgba(255, 255, 255, 0.88);
}

.loop-launcher-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.loop-launcher-legend,
.loop-launcher-footer-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.loop-launcher-legend span,
.loop-launcher-footer-actions span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.loop-launcher-footer-actions {
  color: rgba(235, 231, 245, 0.72);
  font-weight: 750;
}

.loop-launcher-footer-actions svg {
  width: 17px;
  height: 17px;
  color: rgba(235, 231, 245, 0.72);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.legend-dot.playing {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.65);
}

.legend-dot.queued {
  border: 2px solid rgba(var(--accent-rgb), 0.78);
  background: rgba(var(--accent-rgb), 0.14);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.34);
  animation: loopLegendQueuedPulse 2.2s ease-in-out infinite;
}

.legend-dot.empty {
  background: rgba(255, 255, 255, 0.22);
}

@keyframes loopPadQueuedPulse {
  0%, 100% {
    box-shadow:
      0 0 18px rgba(var(--accent-rgb), 0.22),
      inset 0 0 32px rgba(var(--accent-rgb), 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 12px 28px rgba(0, 0, 0, 0.34);
  }
  50% {
    box-shadow:
      0 0 34px rgba(var(--accent-rgb), 0.48),
      0 0 78px rgba(var(--accent-rgb), 0.18),
      inset 0 0 42px rgba(var(--accent-rgb), 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 18px 36px rgba(0, 0, 0, 0.42);
  }
}

@keyframes loopPadQueuedRipple {
  0% {
    opacity: 0.52;
    transform: scale(0.56);
  }
  100% {
    opacity: 0;
    transform: scale(2.1);
  }
}

@keyframes loopLegendQueuedPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.18);
  }
  50% {
    box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.5);
  }
}

.looper-advanced-view {
  display: grid;
  gap: 18px;
  min-height: calc(100vh - var(--player-height) - 132px);
  padding: 22px;
}

.looper-advanced-header,
.looper-advanced-editor,
.looper-advanced-pads {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(12, 12, 18, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.looper-advanced-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(160px, auto);
  align-items: center;
  gap: 18px;
  padding: 16px;
}

.looper-advanced-back {
  min-width: 96px;
}

.looper-advanced-track {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.looper-advanced-art {
  width: 58px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.looper-advanced-track h2 {
  min-width: 0;
  margin: 3px 0 2px;
  overflow: hidden;
  color: #fff;
  font-size: 20px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.looper-advanced-track p,
.looper-advanced-loop-summary small {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.looper-advanced-loop-summary {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 0;
  text-align: right;
}

.looper-advanced-loop-summary strong {
  color: #fff;
  font-size: 13px;
}

.looper-advanced-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.looper-advanced-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.looper-advanced-actions {
  max-width: 620px;
}

.looper-advanced-waveform {
  position: relative;
  min-height: clamp(260px, 42vh, 520px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    #09090d;
  cursor: crosshair;
  touch-action: none;
}

.looper-advanced-waveform canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.looper-advanced-marker-layer {
  position: absolute;
  inset: 0 18px;
  z-index: 4;
}

.looper-advanced-played-region {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18px;
  z-index: 2;
  width: var(--played-width, 0px);
  background: linear-gradient(90deg, rgba(66, 255, 164, 0.12), rgba(66, 255, 164, 0.035));
  border-right: 1px solid rgba(66, 255, 164, 0.18);
  pointer-events: none;
}

.looper-advanced-boundary {
  top: 50%;
  height: calc(100% - 20px);
}

.looper-advanced-boundary span {
  transform: translateY(-14px);
}

.looper-advanced-playhead,
.looper-advanced-placement-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--playhead-x, 18px);
  width: 0;
  pointer-events: none;
}

.looper-advanced-playhead {
  z-index: 8;
  color: #51ffac;
}

.looper-advanced-playhead::before {
  content: "";
  position: absolute;
  top: 32px;
  bottom: 14px;
  width: 2px;
  border-radius: 999px;
  background: #4cff9d;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(2, 25, 12, 0.5), 0 0 18px rgba(76, 255, 157, 0.6);
}

.looper-advanced-playhead span {
  position: absolute;
  left: 0;
  top: 8px;
  display: block;
  padding: 3px 7px;
  border: 1px solid rgba(81, 255, 172, 0.48);
  border-radius: 999px;
  background: rgba(3, 15, 9, 0.9);
  color: #d8ffe9;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.72);
}

.looper-advanced-playhead.edge-start span {
  transform: translateX(0);
}

.looper-advanced-playhead.edge-end span {
  transform: translateX(-100%);
}

.looper-advanced-placement-marker {
  left: var(--marker-left, 0%);
  z-index: 6;
  width: 28px;
  margin-left: -14px;
  border: 0;
  background: transparent;
  color: #dfe7ff;
  pointer-events: auto;
  cursor: context-menu;
}

.looper-advanced-placement-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 32px;
  bottom: 12px;
  width: 2px;
  border-radius: 999px;
  background: rgba(223, 231, 255, 0.86);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.46), 0 0 18px rgba(130, 165, 255, 0.36);
  transform: translateX(-50%);
}

.looper-advanced-placement-marker span {
  position: absolute;
  left: 50%;
  top: 8px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(9, 9, 13, 0.82);
  color: #eef2ff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
}

.looper-advanced-placement-marker.edge-start {
  margin-left: 0;
}

.looper-advanced-placement-marker.edge-start::before,
.looper-advanced-placement-marker.edge-start span {
  left: 0;
  transform: none;
}

.looper-advanced-placement-marker.edge-end {
  margin-left: -28px;
}

.looper-advanced-placement-marker.edge-end::before,
.looper-advanced-placement-marker.edge-end span {
  left: 100%;
  transform: translateX(-100%);
}

.looper-advanced-waveform-status {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 6;
  max-width: min(360px, calc(100% - 28px));
  overflow: hidden;
  color: rgba(235, 231, 245, 0.64);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.looper-advanced-pads {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.looper-advanced-pads .ab-loop-pad-grid {
  grid-template-columns: repeat(5, minmax(112px, 1fr));
}

.looper-advanced-marker-menu .ab-loop-menu-action > span:first-child {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffe58a;
  font-size: 11px;
  font-weight: 900;
}

@container main-panel (max-width: 760px) {
  .looper-advanced-view {
    padding: 14px;
  }

  .looper-advanced-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .looper-advanced-back {
    justify-self: start;
  }

  .looper-advanced-loop-summary {
    justify-items: start;
    text-align: left;
  }

  .looper-advanced-toolbar {
    grid-template-columns: 1fr;
  }

  .looper-advanced-actions {
    max-width: none;
  }

  .looper-advanced-waveform {
    min-height: 280px;
  }

  .looper-advanced-pads .ab-loop-pad-grid {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    min-width: 520px;
  }

  .looper-advanced-pads {
    overflow-x: auto;
  }
}

.ab-loop-pad-menu,
.ab-loop-saved-menu {
  position: fixed;
  z-index: 250;
  display: grid;
  gap: 4px;
  width: min(240px, calc(100vw - 16px));
  max-height: min(320px, calc(100vh - 16px));
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.38);
  border-radius: 8px;
  background: #111019;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.52);
}

.ab-loop-pad-menu-title {
  padding: 3px 6px 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.ab-loop-pad-menu button,
.ab-loop-saved-menu button {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.ab-loop-pad-menu .ab-loop-pad-edit-action,
.ab-loop-saved-menu .ab-loop-menu-action {
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  color: var(--text);
  font-weight: 850;
}

.ab-loop-pad-menu .ab-loop-pad-edit-action svg,
.ab-loop-saved-menu .ab-loop-menu-action svg {
  width: 15px;
  height: 15px;
}

.ab-loop-pad-menu button:hover,
.ab-loop-saved-menu button:hover {
  background: rgba(var(--accent-rgb), 0.16);
}

.ab-loop-pad-plays {
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.ab-loop-pad-plays > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.ab-loop-pad-plays > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 6px;
}

.ab-loop-pad-menu .ab-loop-pad-plays button {
  display: grid;
  place-items: center;
  min-width: 28px;
  min-height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.ab-loop-pad-menu .ab-loop-pad-plays button:hover {
  border-color: rgba(var(--accent-rgb), 0.52);
  background: rgba(var(--accent-rgb), 0.18);
}

.ab-loop-pad-plays strong {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ab-loop-pad-menu strong,
.ab-loop-pad-menu small,
.ab-loop-saved-menu strong,
.ab-loop-saved-menu small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ab-loop-pad-menu small,
.ab-loop-saved-menu small {
  color: var(--muted);
  font-size: 10px;
}

.ab-loop-saved-menu .ab-loop-menu-action.danger {
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  color: #ffb3b3;
  font-weight: 850;
}

.ab-loop-card {
  grid-template-columns: minmax(190px, 0.9fr) minmax(280px, 1.1fr);
  grid-template-rows: auto auto auto;
  align-content: start;
  column-gap: 10px;
  position: relative;
}

.ab-loop-card.power-off {
  border-color: rgba(255, 255, 255, 0.09);
}

.ab-loop-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ab-loop-head-left,
.ab-loop-head-middle,
.ab-loop-head-right {
  display: flex;
  align-items: center;
  min-width: 0;
}

.ab-loop-head-left {
  gap: 6px;
}

.ab-loop-head-middle {
  justify-content: start;
  gap: 6px;
}

.ab-loop-head-right {
  justify-content: end;
  gap: 6px;
}

.ab-loop-title-icon {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: var(--accent-3);
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.45));
}

.ab-loop-title-icon svg {
  width: 20px;
  height: 20px;
}

.ab-loop-head-left strong {
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ab-loop-launcher-toggle,
.ab-loop-clear-inline {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  color: rgba(247, 244, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 120ms ease, background 160ms ease;
}

.ab-loop-launcher-toggle svg,
.ab-loop-clear-inline svg {
  width: 14px;
  height: 14px;
}

.ab-loop-launcher-toggle.active,
.ab-loop-launcher-toggle:hover:not(:disabled),
.ab-loop-clear-inline:hover:not(:disabled) {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.07));
  color: #fff;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ab-loop-launcher-toggle:hover:not(:disabled),
.ab-loop-clear-inline:hover:not(:disabled),
.ab-loop-power-button:hover {
  transform: translateY(-1px);
}

.ab-loop-launcher-toggle:active:not(:disabled),
.ab-loop-clear-inline:active:not(:disabled),
.ab-loop-power-button:active {
  transform: scale(0.96);
}

.ab-loop-queue-control {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ab-loop-queue-control > span {
  color: rgba(247, 244, 255, 0.86);
  font-size: 11px;
  font-weight: 900;
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ab-loop-actions {
  grid-column: 1;
}

.ab-loop-active-wrap {
  position: relative;
  grid-column: 2;
  grid-row: 2 / span 2;
  min-width: 0;
}

.ab-loop-active-button {
  display: grid;
  align-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  border-radius: 6px;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb), 0.15), transparent 42%),
    rgba(var(--accent-rgb), 0.1);
  color: var(--text);
  text-align: left;
}

.ab-loop-active-button strong {
  font-size: 16px;
  line-height: 1.08;
}

.ab-loop-active-button.off {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.045), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.ab-loop-active-button strong,
.ab-loop-active-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ab-loop-active-button small {
  color: var(--muted);
  font-size: 10px;
}

.ab-loop-status-note::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  vertical-align: 1px;
}

.ab-loop-active-button .ab-loop-status-note.queue-ready,
.ab-loop-active-button.active .ab-loop-status-note {
  color: rgba(var(--accent-rgb), 0.92);
}

.ab-loop-active-button .ab-loop-status-note.queue-ready::before,
.ab-loop-active-button.active .ab-loop-status-note::before {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.44);
}

.ab-loop-popover {
  position: absolute;
  z-index: 160;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  border-radius: 8px;
  background: #111019;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.ab-loop-popover button {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}

.ab-loop-popover button:hover,
.ab-loop-popover button.active {
  background: rgba(var(--accent-rgb), 0.16);
}

.ab-loop-popover strong,
.ab-loop-popover small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ab-loop-popover small,
.ab-loop-empty {
  color: var(--muted);
  font-size: 12px;
}

.ab-loop-card > small {
  grid-column: 1;
  align-self: center;
}

.advanced-switch {
  justify-self: center;
  display: grid;
  align-items: center;
  width: 38px;
  height: 22px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.advanced-switch span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  transform: translateX(0);
  transition: transform 160ms ease;
}

.advanced-switch.active {
  background: var(--accent);
}

.advanced-switch.active span {
  transform: translateX(16px);
}

.ab-loop-queue-toggle {
  width: 32px;
  height: 18px;
}

.ab-loop-queue-toggle span {
  width: 12px;
  height: 12px;
}

.ab-loop-queue-toggle span {
  width: 12px;
  height: 12px;
}

.ab-loop-queue-toggle.active span {
  transform: translateX(14px);
}

.ab-loop-power-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015) 62%),
    rgba(255, 255, 255, 0.035);
  color: rgba(247, 244, 255, 0.76);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.035),
    inset 0 0 18px rgba(255, 255, 255, 0.045);
  transition: transform 120ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, background 160ms ease;
}

.ab-loop-power-button svg {
  width: 21px;
  height: 21px;
}

.ab-loop-power-button.active {
  border-color: rgba(var(--accent-rgb), 0.72);
  background:
    radial-gradient(circle at 50% 45%, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-rgb), 0.04) 64%),
    rgba(255, 255, 255, 0.035);
  color: #fff;
  box-shadow:
    0 0 0 2px rgba(var(--accent-rgb), 0.18),
    0 0 24px rgba(var(--accent-rgb), 0.34),
    inset 0 0 18px rgba(var(--accent-rgb), 0.14);
}

.ab-loop-power-button:hover {
  border-color: rgba(var(--accent-rgb), 0.72);
  color: #fff;
  box-shadow:
    0 0 0 2px rgba(var(--accent-rgb), 0.14),
    0 0 22px rgba(var(--accent-rgb), 0.24),
    inset 0 0 18px rgba(255, 255, 255, 0.055);
}

.ab-loop-card.power-off .ab-loop-head-middle,
.ab-loop-card.power-off .ab-loop-queue-control {
  opacity: 0.54;
}

.lyrics-panel {
  display: grid;
  min-height: 0;
  gap: 16px;
}

.lyrics-now {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: var(--radius);
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  background: rgba(var(--accent-rgb), 0.1);
}

.lyrics-lines {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 0;
  padding: 8px 8px 28px 4px;
}

.lyrics-line {
  padding: 8px 7px;
  border-radius: 6px;
  color: rgba(247, 244, 255, 0.48);
  font-size: 18px;
  line-height: 1.28;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.lyrics-line.active {
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent-3);
  transform: translateX(3px);
}

.lyrics-line.plain {
  color: rgba(247, 244, 255, 0.78);
}

.chords-panel {
  display: grid;
  min-height: 0;
  gap: 14px;
}

.chords-sticky {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  gap: 9px;
  padding: 0 0 10px;
  background: linear-gradient(180deg, rgba(13, 13, 18, 0.98) 0%, rgba(13, 13, 18, 0.98) 82%, rgba(13, 13, 18, 0) 100%);
}

.chords-now {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.chord-reference {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 2px;
}

.chord-align-note,
.chord-import-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chord-chip {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(247, 244, 255, 0.74);
  font-weight: 800;
  line-height: 1;
}

.chord-changes {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  padding: 4px 2px 28px;
}

.chord-change {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(52px, auto) 44px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(247, 244, 255, 0.5);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.chord-change.active {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent-3);
  transform: translateX(3px);
}

.chord-time,
.chord-confidence {
  color: var(--muted);
  font-size: 12px;
}

.chord-name {
  justify-self: center;
  color: inherit;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.chord-confidence {
  justify-self: end;
}

.chord-sheet {
  display: grid;
  gap: 10px;
  padding: 2px 2px 22px;
}

.chord-sheet-line {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(247, 244, 255, 0.62);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.chord-sheet-line.active {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent-3);
  transform: translateX(3px);
}

.chord-sheet-progression-line {
  gap: 6px;
}

.chord-sheet-progression {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  color: rgba(247, 244, 255, 0.7);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.chord-sheet-progression-token.chord {
  color: var(--accent-3);
  font-weight: 900;
}

.chord-sheet-progression-token.bar,
.chord-sheet-progression-token.repeat {
  color: rgba(148, 226, 231, 0.9);
}

.chord-sheet-section {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.chord-sheet-pair {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding-bottom: 2px;
}

.chord-sheet-pair.no-chords {
  overflow-x: visible;
  padding-bottom: 0;
}

.chord-sheet-chordline,
.chord-sheet-lyric {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.35;
}

.chord-sheet-pair.has-chords .chord-sheet-chordline,
.chord-sheet-pair.has-chords .chord-sheet-lyric {
  display: block;
  max-width: 100%;
  white-space: pre-wrap;
}

.chord-sheet-chordline {
  min-height: 18px;
  color: var(--accent-3);
  font-weight: 900;
}

.chord-sheet-lyric {
  overflow-wrap: anywhere;
  word-break: normal;
}

.chord-sheet-pair.no-chords .chord-sheet-lyric {
  white-space: pre-wrap;
}

.chord-import {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.chord-import summary {
  cursor: pointer;
  color: rgba(247, 244, 255, 0.8);
  font-size: 13px;
  font-weight: 800;
}

.chord-import-form {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.chord-import-form textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(5, 5, 8, 0.72);
  color: var(--text);
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.35;
}

.chord-import-note {
  color: rgba(247, 244, 255, 0.62);
  font-size: 12px;
  line-height: 1.4;
}

.progress-row {
  width: 100%;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.progress-row span {
  width: 38px;
  text-align: center;
}

.progress-scrub-wrap {
  position: relative;
  display: grid;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  height: 24px;
}

.progress-scrub-wrap.timeline-zoomed,
.now-playing-timeline.timeline-zoomed {
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(240, 201, 74, 0.08), rgba(var(--accent-rgb), 0.08), rgba(240, 201, 74, 0.08));
  box-shadow: inset 0 0 0 1px rgba(240, 201, 74, 0.14), 0 0 18px rgba(240, 201, 74, 0.08);
}

input[type="range"] {
  accent-color: var(--accent);
}

.progress-row input {
  width: 100%;
}

.progress-scrub-wrap input,
.now-playing-timeline input {
  position: relative;
  z-index: 1;
}

.ab-loop-marker-layer {
  position: absolute;
  inset: 0 12px;
  z-index: 2;
  pointer-events: none;
}

.ab-loop-marker {
  position: absolute;
  left: var(--marker-left, 0%);
  top: 50%;
  display: grid;
  place-items: center;
  width: 22px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffe58a;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  transform: translate(-50%, -50%);
  cursor: ew-resize;
}

.ab-loop-marker span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 11px;
  line-height: 1;
  transform: translateY(-9px);
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.72);
}

.ab-loop-marker:hover,
.ab-loop-marker:focus-visible {
  outline: none;
}

.ab-loop-marker.marker-b {
  color: #ffd06e;
}

.ab-loop-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 2px;
  height: calc(100% - 6px);
  border-radius: 999px;
  background: rgba(255, 229, 138, 0.9);
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(18, 14, 2, 0.46), 0 0 12px rgba(240, 201, 74, 0.35);
}

.ab-loop-marker:hover::after,
.ab-loop-marker:focus-visible::after {
  background: #fff0a8;
  box-shadow: 0 0 0 1px rgba(18, 14, 2, 0.56), 0 0 18px rgba(240, 201, 74, 0.62);
}

.volume-row {
  grid-row: 1;
  justify-content: end;
  gap: 8px;
  --volume-fill: var(--accent);
  --volume-track: rgba(255, 255, 255, 0.18);
}

.volume-row.is-muted {
  --volume-fill: #ffffff;
}

.volume-button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: none;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.volume-button:hover,
.volume-button.active {
  background: rgba(255, 255, 255, 0.08);
}

.volume-button.is-bypassed {
  color: var(--muted);
}

.volume-row input {
  width: min(140px, 100%);
  height: 20px;
  background: transparent;
  accent-color: var(--volume-fill);
  -webkit-appearance: none;
  appearance: none;
}

.volume-row input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--volume-fill) 0%, var(--volume-fill) var(--volume-percent, 50%), var(--volume-track) var(--volume-percent, 50%), var(--volume-track) 100%);
}

.volume-row input::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 999px;
  background: var(--volume-fill);
  -webkit-appearance: none;
  appearance: none;
}

.volume-row input::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--volume-track);
}

.volume-row input::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--volume-fill);
}

.volume-row input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--volume-fill);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
}

.lazy-row-status {
  min-height: 54px;
}

.lazy-browser-status {
  grid-column: 1 / -1;
}

@supports (content-visibility: auto) {
  .track-row,
  .browser-card,
  .home-card,
  .queue-item,
  .chord-change {
    content-visibility: auto;
  }

  .track-row {
    contain-intrinsic-size: 62px;
  }

  .browser-card {
    contain-intrinsic-size: 230px;
  }

  .home-card {
    contain-intrinsic-size: 82px;
  }

  .queue-item {
    contain-intrinsic-size: 54px;
  }

  .chord-change {
    contain-intrinsic-size: 48px;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .app-shell.chords-open {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .queue-panel {
    display: none;
  }

  .queue-panel.lyrics-open,
  .queue-panel.chords-open {
    display: grid;
    grid-column: 1 / -1;
  }

  .workshop-grid {
    grid-template-columns: minmax(220px, 0.85fr) minmax(360px, 1.25fr);
  }

  .workshop-inspector {
    grid-column: 1 / -1;
  }

  .workshop-block-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-bar {
    grid-template-columns: minmax(180px, 1fr) minmax(280px, 520px) 140px;
  }

  .player-advanced-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .player-advanced-panel .ab-loop-card {
    grid-column: 1 / -1;
  }

  .player-bar.advanced-open > .player-advanced-panel {
    max-height: 220px;
  }

  .settings-grid-three,
  .eq-control-panel {
    grid-template-columns: 1fr;
  }

  .eq-bypass-block {
    padding-left: 0;
    border-left: 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .eq-bands.advanced {
    grid-template-columns: repeat(5, minmax(82px, 1fr));
    row-gap: 18px;
  }
}

@media (max-width: 1050px) {
  .table-head,
  .track-row {
    grid-template-columns: 42px minmax(220px, 2fr) minmax(140px, 1fr) 82px;
  }

  .artist-top-track-row {
    grid-template-columns: 42px 40px minmax(220px, 2fr) minmax(140px, 1fr) 82px;
  }

  .artist-album-track-row {
    grid-template-columns: 42px 40px minmax(220px, 1fr) 82px;
  }

  .artist-head,
  .artist-cell {
    display: none;
  }

  .track-row .song-subtitle {
    display: block;
  }
}

@media (max-width: 820px) {
  :root {
    --mobile-player-height: 134px;
    --mobile-player-inset: 8px;
  }

  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    min-height: 100vh;
    padding-bottom: calc(var(--mobile-player-height) + var(--mobile-player-inset) + 8px);
  }

  html.electron-shell .app-shell {
    min-height: calc(100vh - var(--titlebar-height));
  }

  .app-shell.chords-open {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-row: auto;
  }

  .main-panel {
    grid-row: auto;
    padding-bottom: calc(var(--mobile-player-height) + var(--mobile-player-inset) + 18px);
  }

  .sidebar-section {
    display: none;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-home-group {
    min-width: 0;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    width: auto;
    min-width: 0;
    padding: 0;
  }

  .nav-item span {
    display: none;
  }

  .nav-sublinks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    padding-left: 0;
  }

  .nav-subitem {
    min-height: 28px;
    padding: 0 3px;
    font-size: 12px;
    text-align: center;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .primary-button {
    grid-column: auto;
    justify-self: end;
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .primary-button span {
    display: none;
  }

  .now-surface {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  h1 {
    font-size: 42px;
  }

  .table-head {
    display: none;
  }

  .filter-toolbar,
  .filter-toolbar.has-filter-value {
    grid-template-columns: minmax(96px, 0.75fr) minmax(142px, 1fr) auto;
    gap: 7px;
    padding: 8px;
  }

  .filter-toolbar.has-filter-value {
    grid-template-columns: minmax(74px, 0.7fr) minmax(96px, 0.85fr) minmax(122px, 1fr) auto;
  }

  .playlist-edit-panel,
  .playlist-track-form {
    grid-template-columns: 1fr;
  }

  .row-actions.playlist-detail-actions {
    justify-content: stretch;
  }

  .playlist-search-field,
  .playlist-sort-field {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }

  .playlist-suggestion-grid {
    grid-template-columns: 1fr;
  }

  .filter-sort-field,
  .filter-toolbar .tool-button {
    grid-column: auto;
  }

  .track-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .artist-top-track-row,
  .artist-album-track-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .artist-track-rank,
  .artist-track-number,
  .artist-top-album {
    display: none;
  }

  .artist-album-head {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .artist-album-art {
    width: 54px;
    height: 54px;
  }

  .album-cell,
  .time-cell {
    display: none;
  }

  .settings-form,
  .accent-form {
    grid-template-columns: 1fr;
  }

  .settings-grid-two,
  .settings-grid-three,
  .settings-connection-form,
  .eq-bands.standard,
  .eq-bands.advanced {
    grid-template-columns: 1fr;
  }

  .settings-action-bar {
    justify-content: stretch;
  }

  .settings-eq-button,
  .settings-file-actions .tool-button {
    width: 100%;
  }

  .settings-file-actions {
    grid-template-columns: 1fr;
  }

  .eq-panel-head,
  .eq-preset-toolbar,
  .eq-preamp-block,
  .eq-bypass-block {
    display: grid;
    justify-content: stretch;
  }

  .eq-preset-select {
    grid-template-columns: 1fr;
  }

  .eq-control-panel {
    padding: 18px;
  }

  .rule-builder-head {
    display: grid;
  }

  .shuffle-rule-row {
    grid-template-columns: 1fr;
  }

  .workshop-hero,
  .workshop-grid,
  .workshop-stats,
  .workshop-block-grid {
    grid-template-columns: 1fr;
  }

  .workshop-hero {
    align-items: start;
  }

  .workshop-actions {
    justify-content: stretch;
  }

  .workshop-actions > * {
    flex: 1 1 auto;
  }

  .workshop-generate-stack {
    gap: 6px;
  }

  .workshop-generate-stack > .metadata-action-button {
    position: static;
    width: 100%;
    box-shadow: none;
  }

  .rule-library-panel,
  .shuffle-flow-panel,
  .workshop-inspector {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .rule-library-list {
    overflow: visible;
    padding-right: 0;
  }

  .flow-rule-card {
    grid-template-columns: 28px minmax(0, 1fr) auto 36px;
  }

  .flow-rule-settings {
    grid-column: 2 / -1;
  }

  .field-pair {
    grid-template-columns: 1fr;
  }

  .profile-basics-panel .inspector-fields {
    grid-template-columns: 1fr;
  }

  .section-checks {
    grid-template-columns: 1fr;
  }

  .player-bar {
    position: fixed;
    left: var(--mobile-player-inset);
    right: var(--mobile-player-inset);
    bottom: var(--mobile-player-inset);
    z-index: 60;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "track volume"
      "transport transport";
    height: auto;
    max-height: calc(100vh - var(--mobile-player-inset) - var(--mobile-player-inset));
    margin: 0;
    overflow: visible;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.48);
  }

  .player-bar.advanced-open {
    overflow: visible;
  }

  .player-advanced-panel {
    grid-area: unset;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-bar:not(.advanced-open) .player-advanced-panel {
    display: grid;
  }

  .player-bar > .player-advanced-panel {
    left: 0;
    right: 0;
    bottom: calc(100% + 6px);
    width: auto;
    transform: none;
  }

  .player-bar.advanced-open > .player-advanced-panel {
    max-height: min(52vh, 430px);
    overflow-x: hidden;
    overflow-y: auto;
    transform: none;
  }

  .player-bar.advanced-open.ab-loop-menu-open > .player-advanced-panel {
    overflow: visible;
  }

  .player-bar.advanced-open.ab-loop-launcher-open > .player-advanced-panel {
    overflow: visible;
  }

  .player-bar > .player-advanced-panel .ab-loop-launcher-panel {
    left: 0;
    right: 0;
    width: auto;
    max-height: min(62vh, 520px);
    padding: 24px 18px 20px;
    overflow-x: auto;
    overflow-y: auto;
    transform: none;
  }

  .ab-loop-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .ab-loop-head,
  .ab-loop-actions,
  .ab-loop-active-wrap,
  .ab-loop-card > small {
    grid-column: 1;
  }

  .ab-loop-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ab-loop-head-left,
  .ab-loop-head-middle,
  .ab-loop-head-right {
    justify-content: space-between;
  }

  .ab-loop-active-wrap {
    grid-row: auto;
  }

  .ab-loop-active-button {
    min-height: 50px;
  }

  .ab-loop-launcher-head {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ab-loop-launcher-head small {
    text-align: left;
  }

  .ab-loop-pad-grid {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    gap: 12px;
    min-width: 520px;
  }

  .ab-loop-pad {
    min-height: 104px;
    padding: 13px;
  }

  .loop-launcher-footer {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .loop-launcher-legend,
  .loop-launcher-footer-actions {
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .player-track {
    grid-area: track;
  }

  .transport {
    grid-area: transport;
  }

  .volume-row {
    grid-area: volume;
    display: flex;
    align-items: center;
    align-self: center;
    justify-self: end;
    min-width: 0;
  }

  .volume-row input {
    width: min(116px, 22vw);
  }
}

@media (max-width: 700px) {
  :root {
    --bar-height: auto;
    --mobile-player-height: 128px;
    --mobile-player-inset: 6px;
  }

  .app-shell {
    gap: 6px;
    padding: 6px;
  }

  .sidebar {
    padding: 12px 10px;
  }

  .brand-row {
    padding: 0 2px 12px;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .nav-home-group {
    grid-column: 1 / -1;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: stretch;
    gap: 6px;
    min-width: 0;
  }

  .nav-home-group .nav-item {
    width: 44px;
  }

  .nav-item {
    min-height: 40px;
    border-radius: 7px;
  }

  .nav-sublinks {
    align-self: stretch;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding-left: 0;
  }

  .nav-subitem {
    min-height: 40px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.035);
    text-align: center;
  }

  .sidebar-section {
    display: none;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px 12px;
  }

  .primary-button {
    grid-column: auto;
    justify-self: end;
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .primary-button span {
    display: none;
  }

  .search-field {
    min-width: 0;
  }

  .now-surface:not(.utility-surface) {
    grid-template-columns: 138px minmax(0, 1fr);
    align-items: end;
    gap: 18px;
    min-height: 220px;
    padding: 24px 20px 22px;
  }

  .cover-stack {
    width: 138px;
    height: 138px;
  }

  .cover-tile {
    width: 88px;
    height: 88px;
  }

  .cover-tile:nth-child(2) {
    bottom: 12px;
  }

  .cover-tile:nth-child(3) {
    left: 25px;
  }

  h1 {
    font-size: 42px;
  }

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

  .view {
    padding-inline: 16px;
  }

  .home-dashboard {
    padding: 18px 0 22px;
  }

  .home-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .player-bar {
    gap: 10px;
    padding: 10px 12px;
  }

  .player-advanced-panel {
    gap: 8px;
  }

  .player-advanced-card {
    min-height: 94px;
    padding: 9px;
  }

  .player-track {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
  }

  .mini-art {
    width: 46px;
    height: 46px;
  }

  .transport-top {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .transport-controls {
    gap: 5px;
  }

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

  .progress-row {
    gap: 6px;
  }

  .progress-row span {
    width: 34px;
  }

  .volume-row {
    gap: 6px;
  }

  .volume-row input {
    width: min(102px, 20vw);
  }

  .volume-button {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 520px) {
  :root {
    --bar-height: auto;
    --mobile-player-height: 134px;
    --mobile-player-inset: 4px;
  }

  .app-shell {
    gap: 4px;
    padding: 4px;
  }

  .sidebar,
  .queue-panel,
  .main-panel,
  .player-bar {
    border-radius: 6px;
  }

  .sidebar {
    padding: 10px 8px;
  }

  .brand-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    padding: 0 2px 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-section {
    display: none;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-home-group {
    grid-column: 1 / -1;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
  }

  .nav-home-group .nav-item {
    width: 38px;
  }

  .nav-sublinks {
    align-self: stretch;
  }

  .nav-item {
    min-height: 38px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  .history-buttons {
    display: none;
  }

  .search-field {
    height: 38px;
    min-width: 0;
  }

  .primary-button {
    grid-column: auto;
    justify-self: end;
    width: 38px;
    min-width: 38px;
    padding: 0;
  }

  .shuffle-workshop {
    gap: 12px;
    padding-top: 10px;
  }

  .workshop-hero h2 {
    font-size: 28px;
  }

  .workshop-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .workshop-actions .workshop-profile-select,
  .workshop-actions .workshop-generate-stack {
    grid-column: 1 / -1;
  }

  .workshop-stats,
  .rule-library-panel,
  .shuffle-flow-panel,
  .workshop-inspector,
  .profile-basics-panel,
  .saved-workshop-panel {
    padding: 10px;
  }

  .workshop-stat {
    min-height: 64px;
    padding: 10px;
  }

  .flow-rule-card {
    grid-template-columns: 24px minmax(0, 1fr) 36px;
    gap: 8px;
  }

  .flow-rule-index {
    width: 22px;
    height: 22px;
  }

  .flow-rule-main {
    grid-column: 2 / -1;
  }

  .flow-rule-settings {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .flow-rule-toggle {
    grid-column: 2;
    justify-self: start;
  }

  .flow-rule-card > .icon-button {
    grid-column: 3;
    grid-row: 3;
  }

  .workshop-block-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
  }

  .now-surface,
  .now-surface:not(.utility-surface) {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 12px;
  }

  .cover-stack {
    width: 118px;
    height: 118px;
  }

  .cover-tile {
    width: 76px;
    height: 76px;
  }

  .cover-tile:nth-child(2) {
    bottom: 10px;
  }

  .cover-tile:nth-child(3) {
    left: 22px;
  }

  h1 {
    font-size: 34px;
    overflow-wrap: anywhere;
  }

  .surface-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

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

  .tool-button {
    min-height: 36px;
    padding: 0 12px;
  }

  .tool-button span,
  .primary-button span {
    display: none;
  }

  .view {
    padding: 0 10px 18px;
  }

  .library-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 0;
    padding: 10px 0;
  }

  .filter-toolbar,
  .filter-toolbar.has-filter-value {
    grid-template-columns: minmax(70px, 0.75fr) minmax(110px, 1fr) auto;
    gap: 6px;
    padding: 8px;
  }

  .filter-toolbar.has-filter-value {
    grid-template-columns: minmax(58px, 0.65fr) minmax(70px, 0.75fr) minmax(92px, 1fr) auto;
  }

  .filter-toolbar .tool-button {
    min-width: 34px;
    min-height: 30px;
    padding: 0 8px;
  }

  .filter-field {
    gap: 3px;
    font-size: 10px;
  }

  .filter-field select {
    height: 30px;
    padding: 0 7px;
    font-size: 11px;
  }

  .home-dashboard {
    padding: 14px 0 18px;
    gap: 18px;
  }

  .home-section-head {
    display: grid;
    align-items: start;
  }

  .home-card-grid {
    grid-template-columns: 1fr;
  }

  .home-card {
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 70px;
    gap: 9px;
  }

  .home-card-art {
    width: 52px;
  }

  .track-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
    min-height: 56px;
    padding: 5px;
  }

  .song-main {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
  }

  .song-art {
    width: 38px;
    height: 38px;
  }

  .track-format-warning {
    max-width: 96px;
    padding: 0 6px;
  }

  .row-actions {
    justify-content: end;
    gap: 2px;
  }

  .row-actions .icon-button {
    width: 28px;
    height: 28px;
  }

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

  .playlist-grid {
    grid-template-columns: 1fr;
  }

  .playlist-window-backdrop {
    align-items: end;
    padding: 8px;
  }

  .playlist-settings-grid,
  .playlist-color-grid,
  .track-editor-fields,
  .playlist-window-actions {
    grid-template-columns: 1fr;
  }

  .playlist-settings-grid {
    display: grid;
  }

  .playlist-window-actions {
    display: grid;
    justify-content: stretch;
  }

  .playlist-color-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .playlist-color-row .playlist-color-format {
    grid-column: 1 / -1;
  }

  .app-toast {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    width: calc(100vw - 20px);
  }

  .recovery-notice {
    top: 10px;
    grid-template-columns: 1fr;
    width: calc(100vw - 20px);
  }

  .recovery-notice .tool-button {
    justify-self: stretch;
  }

  .browser-grid {
    grid-template-columns: 1fr;
  }

  .home-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .home-card-art {
    width: 44px;
  }

  .settings-group,
  .rules-band {
    padding: 12px;
  }

  .settings-group-head {
    display: grid;
  }

  .rule-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .rule-row .pill {
    grid-column: 1 / -1;
  }

  .link-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .link-row .muted-text {
    display: none;
  }

  .link-row > div:nth-child(3) {
    grid-column: 1;
  }

  .link-row button {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .player-bar {
    gap: 10px;
    padding: 8px;
  }

  .player-advanced-panel {
    grid-template-columns: 1fr;
  }

  .ab-loop-card {
    grid-template-columns: 1fr;
  }

  .ab-loop-head,
  .ab-loop-actions,
  .ab-loop-active-wrap,
  .ab-loop-card small {
    grid-column: 1;
  }

  .ab-loop-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ab-loop-queue-control {
    justify-self: auto;
  }

  .ab-loop-pad-grid {
    grid-template-columns: repeat(5, minmax(82px, 1fr));
    min-width: 470px;
  }

  .player-track {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
  }

  .mini-art {
    width: 46px;
    height: 46px;
  }

  .transport-controls {
    gap: 5px;
  }

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

  .progress-row {
    gap: 6px;
  }

  .progress-row span {
    width: 34px;
  }

  .volume-row input {
    width: min(88px, 18vw);
  }
}

@media (max-width: 340px) {
  .app-shell {
    padding: 3px;
  }

  .brand-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .nav-item svg,
  .icon-button svg,
  .tool-button svg,
  .primary-button svg,
  .round-play svg,
  .play-button svg,
  .search-icon svg {
    width: 18px;
    height: 18px;
  }

  .topbar {
    padding: 8px;
  }

  .now-surface {
    padding: 12px 9px;
  }

  h1 {
    font-size: 28px;
  }

  .tool-button,
  .primary-button {
    min-width: 38px;
    padding: 0 10px;
  }

  .track-row {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 5px;
  }

  .song-main {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 7px;
  }

  .song-art {
    width: 34px;
    height: 34px;
  }

  .row-actions .icon-button {
    width: 26px;
    height: 26px;
  }

  .player-bar {
    padding: 7px;
  }

  .player-advanced-panel {
    grid-template-columns: 1fr;
  }

  #equalizerButton {
    display: none;
  }

  .volume-row input {
    width: 76px;
  }

  .transport-controls {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 390px) {
  :root {
    --mobile-player-inset: max(4px, env(safe-area-inset-bottom));
  }

  html,
  body,
  .app-shell,
  .main-panel,
  .view,
  .settings-layout,
  .settings-grid,
  .workshop-grid,
  .shuffle-flow-panel,
  .rule-library-panel,
  .workshop-inspector {
    max-width: 100%;
    overflow-x: hidden;
  }

  .player-bar {
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
  }

  .settings-form,
  .settings-file-actions,
  .settings-action-bar,
  .plex-connection-actions,
  .library-toolbar,
  .workshop-actions,
  .queue-header,
  .transport-top,
  .volume-row {
    min-width: 0;
    max-width: 100%;
  }

  .local-library-form,
  .settings-connection-form,
  .chord-import-form {
    grid-template-columns: 1fr;
  }

  .ab-loop-pad-grid,
  .rule-library-list,
  .looper-advanced-timeline,
  .track-table,
  .settings-library-checks {
    min-width: 0;
    max-width: 100%;
  }

  .ab-loop-pad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browser-folder-picker {
    width: 100%;
  }

  .settings-action-bar {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 8px;
  }

  .settings-action-bar .tool-button,
  .settings-action-bar .primary-button {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .tool-button span,
  .primary-button span,
  .nav-subitem,
  .player-title,
  .player-artist,
  .song-title,
  .song-meta,
  .muted-text,
  .field input,
  .field select {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .settings-group .tool-button span,
  .settings-action-bar .tool-button span,
  .settings-action-bar .primary-button span,
  .eq-layout .tool-button span,
  .workshop-actions .tool-button span,
  .playlist-detail-actions .tool-button span,
  .year-review-actions .tool-button span,
  .settings-file-actions .tool-button span,
  .lyrics-scan-actions .tool-button span,
  .browser-folder-picker span,
  .browser-file-import span {
    display: inline;
  }

  .settings-group .tool-button,
  .settings-action-bar .tool-button,
  .settings-action-bar .primary-button,
  .eq-layout .tool-button,
  .workshop-actions .tool-button,
  .playlist-detail-actions .tool-button,
  .year-review-actions .tool-button {
    gap: 7px;
    min-height: 38px;
    padding-inline: 10px;
  }

  .settings-group-head {
    gap: 12px;
  }

  .settings-group-head > .settings-file-actions,
  .settings-group-head > .plex-connection-actions {
    margin-top: 0;
  }

  .eq-layout {
    gap: 10px;
    padding-bottom: 10px;
  }

  .eq-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .eq-mode-button {
    min-width: 0;
    min-height: 38px;
    padding: 0 8px;
    gap: 6px;
    font-size: 12px;
  }

  .eq-panel {
    padding: 10px 8px;
  }

  .eq-panel-head {
    margin-bottom: 10px;
    gap: 10px;
  }

  .eq-panel-head p {
    display: none;
  }

  .eq-preset-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .eq-preset-select {
    grid-column: 1 / -1;
  }

  .eq-preset-select select {
    height: 38px;
  }

  .eq-bands.standard {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .eq-bands.advanced {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 2px;
  }

  .eq-band {
    gap: 4px;
  }

  .eq-standard-band,
  .eq-advanced-band {
    min-height: 166px;
    padding: 4px 1px;
  }

  .eq-band-title {
    font-size: 11px;
    line-height: 1.05;
  }

  .eq-band-frequency {
    display: none;
  }

  .eq-slider-row,
  .advanced .eq-slider-row {
    grid-template-columns: minmax(0, 18px);
    min-height: 112px;
    gap: 0;
  }

  .eq-scale,
  .eq-ticks {
    display: none;
  }

  .eq-slider-shell {
    width: 18px;
    height: 112px;
  }

  .eq-slider-track,
  .eq-slider-fill {
    width: 9px;
  }

  .eq-slider-shell input {
    width: 112px;
    height: 24px;
    transform: translate(-47px, 44px) rotate(-90deg);
  }

  .eq-slider-shell input::-webkit-slider-runnable-track,
  .eq-slider-shell input::-moz-range-track {
    height: 24px;
  }

  .eq-slider-shell input::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
  }

  .eq-value-box {
    min-width: 0;
    min-height: 26px;
    width: 100%;
    padding: 0 2px;
    font-size: 11px;
  }

  .eq-control-panel {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .eq-preamp-block,
  .eq-bypass-block {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding-left: 0;
    border-left: 0;
  }

  .eq-knob-control {
    width: 48px;
    height: 48px;
  }

  .eq-knob::after {
    height: 18px;
  }

  .eq-preamp-value {
    grid-column: 1 / -1;
    min-height: 30px;
  }
}

@media (max-width: 320px) {
  .topbar,
  .now-surface,
  .settings-group,
  .workshop-panel {
    padding-left: 7px;
    padding-right: 7px;
  }

  .player-track {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .mini-art {
    width: 38px;
    height: 38px;
  }

  .transport-feature-buttons,
  .history-buttons {
    gap: 3px;
  }

  .volume-row input {
    width: 64px;
  }
}

@media (max-width: 820px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 70;
    border-color: rgba(var(--accent-rgb), 0.24);
    backdrop-filter: blur(18px);
  }

  .brand-row {
    display: none;
  }

  .nav-voidfm-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    object-fit: cover;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
  }

  .nav-home-group {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 6px;
  }

  .nav-home-group .nav-item {
    width: 40px;
    min-width: 0;
    min-height: 40px;
    padding: 0;
  }

  .nav-sublinks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding-left: 0;
  }

  .nav-subitem {
    min-height: 40px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
  }

  .nav-item {
    min-height: 40px;
  }

  .nav-item span {
    display: none;
  }

  .playlist-grid,
  .browser-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .playlist-card,
  .browser-card {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 52px;
    grid-template-areas: "art copy play";
    align-items: center;
    gap: 12px;
    min-height: 0;
    padding: 10px 14px;
  }

  .browser-card {
    grid-template-columns: 74px minmax(0, 1fr);
    grid-template-areas: none;
    gap: 10px;
    padding: 9px;
  }

  .playlist-card {
    min-height: 96px;
    border-radius: 10px;
  }

  .playlist-art-wrap,
  .browser-card-art {
    grid-area: art;
    width: 74px;
    min-width: 74px;
  }

  .browser-card-art {
    width: 74px;
    height: 74px;
    aspect-ratio: 1 / 1;
  }

  .playlist-art-wrap,
  .playlist-art {
    width: 70px;
    min-width: 70px;
    height: 70px;
  }

  .artist-card-art {
    background-size: cover;
  }

  .playlist-card-copy,
  .browser-card-copy {
    align-content: center;
    gap: 2px;
  }

  .playlist-card-copy {
    grid-area: copy;
    align-content: center;
    gap: 4px;
  }

  .playlist-name,
  .browser-card-copy strong {
    font-size: 17px;
    line-height: 1.15;
  }

  .playlist-card-copy .muted-text,
  .playlist-fade-summary {
    font-size: 14px;
    line-height: 1.15;
  }

  .playlist-shuffle-summary,
  .playlist-shuffle-summary strong,
  .playlist-shuffle-summary span {
    font-size: 14px;
    line-height: 1.18;
  }

  .playlist-shuffle-summary {
    display: none;
  }

  .playlist-shuffle-summary span {
    display: none;
  }

  .browser-card-copy span {
    font-size: 12px;
  }

  .playlist-card .row-actions {
    display: none;
  }

  .playlist-card-play {
    grid-area: play;
    position: static;
    justify-self: end;
    align-self: center;
    width: 46px;
    height: 46px;
    border: 2px solid var(--playlist-highlight, #35c845);
    background: rgba(12, 16, 18, 0.78);
    color: var(--playlist-highlight, #73ff6e);
    box-shadow: 0 0 0 1px rgba(var(--playlist-highlight-rgb, 53, 200, 69), 0.18), 0 12px 26px rgba(0, 0, 0, 0.42);
  }

  .home-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .sidebar {
    padding: 8px;
  }

  .playlist-detail-back {
    width: 34px;
    height: 34px;
    margin: 10px 0 6px 12px;
  }

  .playlist-detail-back svg {
    width: 18px;
    height: 18px;
  }

  .nav-list,
  .nav-sublinks,
  .nav-home-group {
    gap: 5px;
  }

  .nav-home-group {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .nav-home-group .nav-item,
  .nav-item,
  .nav-subitem {
    min-height: 38px;
  }

  .nav-home-group .nav-item {
    width: 38px;
  }

  .nav-subitem {
    padding: 0 5px;
    font-size: 12px;
  }

  .nav-voidfm-icon {
    width: 24px;
    height: 24px;
  }

  .playlist-card,
  .browser-card {
    grid-template-columns: 62px minmax(0, 1fr) 42px;
    gap: 9px;
    padding: 9px 10px;
  }

  .playlist-art-wrap,
  .browser-card-art,
  .playlist-art {
    width: 62px;
    min-width: 62px;
    height: 62px;
  }

  .playlist-card {
    min-height: 84px;
  }

  .playlist-name,
  .browser-card-copy strong {
    font-size: 15px;
  }

  .browser-card-copy span,
  .playlist-card-copy .muted-text,
  .playlist-fade-summary {
    font-size: 12px;
  }

  .playlist-card-play {
    width: 38px;
    height: 38px;
  }
}

@media (min-width: 391px) and (max-width: 520px) {
  .settings-group .tool-button span,
  .settings-action-bar .tool-button span,
  .settings-action-bar .primary-button span,
  .eq-layout .tool-button span,
  .workshop-actions .tool-button span,
  .playlist-detail-actions .tool-button span,
  .year-review-actions .tool-button span,
  .settings-file-actions .tool-button span,
  .lyrics-scan-actions .tool-button span,
  .browser-folder-picker span,
  .browser-file-import span {
    display: inline;
  }

  .settings-group .tool-button,
  .settings-action-bar .tool-button,
  .settings-action-bar .primary-button,
  .eq-layout .tool-button,
  .workshop-actions .tool-button,
  .playlist-detail-actions .tool-button,
  .year-review-actions .tool-button {
    gap: 8px;
    min-height: 40px;
  }

  .eq-panel {
    padding: 12px 10px;
  }

  .eq-panel-head {
    margin-bottom: 12px;
  }

  .eq-panel-head p {
    display: none;
  }

  .eq-preset-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .eq-preset-select {
    grid-column: 1 / -1;
  }

  .eq-bands.standard {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .eq-bands.advanced {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 3px;
  }

  .eq-standard-band,
  .eq-advanced-band {
    min-height: 190px;
    padding: 6px 2px;
  }

  .eq-band {
    gap: 5px;
  }

  .eq-band-title {
    font-size: 12px;
    line-height: 1.05;
  }

  .eq-band-frequency,
  .eq-scale,
  .eq-ticks {
    display: none;
  }

  .eq-slider-row,
  .advanced .eq-slider-row {
    grid-template-columns: minmax(0, 22px);
    min-height: 132px;
    gap: 0;
  }

  .eq-slider-shell {
    width: 22px;
    height: 132px;
  }

  .eq-slider-shell input {
    width: 132px;
    height: 26px;
    transform: translate(-55px, 53px) rotate(-90deg);
  }

  .eq-value-box {
    min-width: 0;
    min-height: 28px;
    width: 100%;
    font-size: 12px;
  }

  .eq-control-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }
}

@media (max-width: 820px) {
  :root {
    --mobile-player-inset: 0px;
    --mobile-player-height: 174px;
  }

  .app-shell {
    padding-bottom: calc(var(--mobile-player-height) + env(safe-area-inset-bottom) + 14px);
  }

  .main-panel {
    padding-bottom: calc(var(--mobile-player-height) + env(safe-area-inset-bottom) + 18px);
  }

  .player-bar {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: var(--mobile-player-height);
    max-height: calc(100vh - env(safe-area-inset-top));
    grid-template-columns: minmax(0, 1fr) minmax(92px, 0.38fr);
    grid-template-areas:
      "track volume"
      "transport transport";
    align-items: start;
    gap: 10px 14px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 28px 28px 0 0;
    background:
      radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.06), transparent 34%),
      linear-gradient(180deg, rgba(17, 17, 22, 0.98), rgba(4, 5, 8, 0.99));
    box-shadow: 0 -18px 46px rgba(0, 0, 0, 0.56);
  }

  .player-track {
    grid-area: track;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
  }

  .mini-art {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
  }

  .player-copy {
    align-self: center;
    min-width: 0;
  }

  .player-title {
    max-width: 100%;
    font-size: clamp(18px, 4.7vw, 25px);
    line-height: 1.08;
    font-weight: 800;
    color: #fff;
  }

  .player-artist {
    margin-top: 4px;
    font-size: clamp(14px, 3.7vw, 18px);
    line-height: 1.12;
    color: rgba(228, 226, 241, 0.78);
  }

  .volume-row {
    grid-area: volume;
    justify-self: end;
    align-self: center;
    display: grid;
    grid-template-columns: 30px minmax(58px, 1fr);
    gap: 8px;
    min-width: 92px;
    width: min(31vw, 152px);
  }

  #equalizerButton {
    display: none;
  }

  .volume-row .volume-button {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #fff;
  }

  .volume-row input {
    width: 100%;
    min-width: 58px;
  }

  .transport {
    grid-area: transport;
    display: grid;
    gap: 11px;
    min-width: 0;
  }

  .transport-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .transport-top .transport-controls {
    display: grid;
    grid-template-columns: 42px 28px 58px 28px 42px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .transport-controls .icon-button {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.045);
    color: #f5f4ff;
  }

  #previousButton,
  #nextButton {
    width: 28px;
    height: 42px;
    border: 0;
    background: transparent;
  }

  .play-button {
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: #fff;
    color: #050506;
    box-shadow: 0 0 0 3px rgba(44, 181, 64, 0.34), 0 15px 30px rgba(0, 0, 0, 0.42);
  }

  .transport-top .transport-feature-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }

  .transport-feature-buttons .icon-button {
    width: 40px;
    height: 40px;
    border-radius: 15px;
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.035);
    color: #fff;
  }

  .progress-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: center;
    width: 100%;
    font-size: 15px;
    color: rgba(234, 233, 246, 0.85);
  }

  .progress-scrub-wrap {
    min-width: 0;
  }

  .player-bar.advanced-open > .player-advanced-panel,
  .player-bar.ab-loop-menu-open > .player-advanced-panel,
  .player-bar.ab-loop-launcher-open > .player-advanced-panel {
    display: none;
  }

  .player-advanced-panel .ab-loop-card,
  .player-bar > .player-advanced-panel .ab-loop-launcher-panel,
  .ab-loop-popover,
  .ab-loop-pad-menu,
  .ab-loop-saved-menu,
  .ab-loop-marker-layer {
    display: none !important;
  }
}

@media (max-width: 520px) {
  :root {
    --mobile-player-height: 156px;
  }

  .player-bar {
    gap: 8px 10px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
  }

  .player-track {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 9px;
  }

  .mini-art {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }

  .player-title {
    font-size: 16px;
    line-height: 1.12;
  }

  .player-artist {
    margin-top: 2px;
    font-size: 13px;
  }

  .volume-row {
    grid-template-columns: 26px minmax(46px, 1fr);
    gap: 6px;
    min-width: 74px;
    width: min(27vw, 110px);
  }

  .volume-row .volume-button {
    width: 26px;
    height: 26px;
  }

  .volume-row input {
    min-width: 46px;
  }

  .transport {
    gap: 8px;
  }

  .transport-top {
    gap: 7px;
  }

  .transport-top .transport-controls {
    grid-template-columns: 38px 23px 52px 23px 38px;
    gap: 5px;
  }

  .transport-controls .icon-button {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  #previousButton,
  #nextButton {
    width: 23px;
    height: 38px;
  }

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

  .transport-top .transport-feature-buttons {
    gap: 5px;
    padding-left: 7px;
  }

  .transport-feature-buttons .icon-button {
    width: 35px;
    height: 35px;
    border-radius: 13px;
  }

  .progress-row {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 6px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  :root {
    --mobile-player-height: 148px;
  }

  .player-bar {
    padding: 9px 8px calc(9px + env(safe-area-inset-bottom));
  }

  .player-track {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px;
  }

  .mini-art {
    width: 44px;
    height: 44px;
  }

  .player-title {
    font-size: 15px;
  }

  .player-artist {
    font-size: 12px;
  }

  .volume-row {
    width: 78px;
  }

  .transport-top .transport-controls {
    grid-template-columns: 34px 20px 48px 20px 34px;
    gap: 4px;
  }

  .transport-controls .icon-button {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  #previousButton,
  #nextButton {
    width: 20px;
    height: 34px;
  }

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

  .transport-feature-buttons .icon-button {
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }
}

@media (max-width: 520px) {
  :root {
    --mobile-player-height: 218px;
  }

  .app-shell {
    padding-bottom: calc(var(--mobile-player-height) + env(safe-area-inset-bottom) + 12px);
  }

  .main-panel {
    padding-bottom: calc(var(--mobile-player-height) + env(safe-area-inset-bottom) + 16px);
  }

  .player-bar {
    min-height: var(--mobile-player-height);
    grid-template-columns: minmax(0, 1fr) minmax(96px, 0.32fr);
    grid-template-areas:
      "track volume"
      "transport transport";
    align-content: start;
    gap: 18px 14px;
    padding: 18px 18px calc(16px + env(safe-area-inset-bottom));
    border-radius: 30px 30px 0 0;
  }

  .player-track {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 16px;
  }

  .mini-art {
    width: 70px;
    height: 70px;
    border-radius: 15px;
  }

  .player-title {
    font-size: clamp(22px, 6.4vw, 34px);
  }

  .player-artist {
    font-size: clamp(17px, 4.8vw, 24px);
  }

  .volume-row {
    grid-template-columns: 34px minmax(70px, 1fr);
    width: min(31vw, 170px);
  }

  .volume-row .volume-button {
    width: 34px;
    height: 34px;
  }

  .volume-row .volume-button svg {
    width: 28px;
    height: 28px;
  }

  .transport {
    gap: 16px;
  }

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

  .transport-top .transport-controls {
    display: grid;
    grid-template-columns: 48px 48px minmax(12px, 1fr) 34px 68px 34px;
    gap: 8px;
    align-items: center;
    justify-content: stretch;
    width: 100%;
  }

  #shuffleButton {
    grid-column: 1;
  }

  #repeatButton {
    grid-column: 2;
    grid-row: 1;
  }

  #previousButton {
    grid-column: 4;
    grid-row: 1;
  }

  #playButton {
    grid-column: 5;
    grid-row: 1;
  }

  #nextButton {
    grid-column: 6;
    grid-row: 1;
  }

  .transport-controls .icon-button {
    width: 48px;
    height: 48px;
    border-radius: 18px;
  }

  #previousButton,
  #nextButton {
    width: 34px;
    height: 54px;
    border-radius: 10px;
  }

  .play-button {
    width: 68px;
    height: 68px;
    box-shadow: 0 0 0 4px rgba(44, 181, 64, 0.36), 0 17px 34px rgba(0, 0, 0, 0.48);
  }

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

  .transport-top .transport-feature-buttons {
    gap: 8px;
    padding-left: 12px;
  }

  .transport-feature-buttons .icon-button {
    width: 44px;
    height: 44px;
    border-radius: 17px;
  }

  .progress-row {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 12px;
    font-size: 17px;
  }
}

@media (max-width: 520px) {
  :root {
    --mobile-player-height: 194px;
  }

  .player-bar {
    gap: 13px 10px;
    padding: 14px 12px calc(13px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }

  .player-track {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
  }

  .mini-art {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }

  .player-title {
    font-size: 18px;
  }

  .player-artist {
    font-size: 15px;
  }

  .volume-row {
    grid-template-columns: 28px minmax(54px, 1fr);
    width: min(27vw, 112px);
  }

  .volume-row .volume-button,
  .volume-row .volume-button svg {
    width: 26px;
    height: 26px;
  }

  .transport {
    gap: 11px;
  }

  .transport-top {
    gap: 7px;
  }

  .transport-top .transport-controls {
    grid-template-columns: 40px 40px minmax(6px, 1fr) 24px 54px 24px;
    gap: 5px;
  }

  .transport-controls .icon-button {
    width: 40px;
    height: 40px;
    border-radius: 15px;
  }

  #previousButton,
  #nextButton {
    width: 24px;
    height: 40px;
  }

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

  .play-button svg {
    width: 24px;
    height: 24px;
  }

  .transport-top .transport-feature-buttons {
    gap: 5px;
    padding-left: 7px;
  }

  .transport-feature-buttons .icon-button {
    width: 36px;
    height: 36px;
    border-radius: 14px;
  }

  .progress-row {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 7px;
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  :root {
    --mobile-player-height: 184px;
  }

  .player-bar {
    padding: 12px 8px calc(12px + env(safe-area-inset-bottom));
  }

  .player-track {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .mini-art {
    width: 50px;
    height: 50px;
  }

  .transport-top .transport-controls {
    grid-template-columns: 36px 36px minmax(2px, 1fr) 20px 50px 20px;
    gap: 4px;
  }

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

  #previousButton,
  #nextButton {
    width: 20px;
    height: 36px;
  }

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

  .transport-feature-buttons .icon-button {
    width: 33px;
    height: 33px;
  }
}

@media (max-width: 520px) {
  #viewSettings,
  .settings-layout,
  .settings-dashboard {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .settings-action-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
    justify-content: stretch;
  }

  .settings-action-bar .settings-eq-button,
  .settings-action-bar .settings-apply-button,
  .settings-action-bar .tool-button,
  .settings-action-bar .primary-button {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-content: center;
    padding-inline: 10px;
  }

  .settings-action-bar .settings-eq-button {
    grid-row: 1;
  }

  .settings-action-bar .settings-apply-button {
    grid-row: 2;
  }
}

@media (max-width: 600px) {
  .now-playing-mode {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(7px, 2.2vw, 10px);
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: max(10px, env(safe-area-inset-top)) clamp(12px, 4vw, 18px) max(12px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .now-playing-bg,
  .now-playing-scrim {
    position: fixed;
    inset: 0;
  }

  .now-playing-top,
  .now-playing-stage,
  .now-playing-main,
  .now-playing-spectrum-wrap,
  .now-playing-progress,
  .now-playing-center-actions,
  .now-playing-bottom {
    position: relative;
    inset: auto;
    z-index: 5;
    width: min(100%, 420px);
    max-width: 420px;
    min-width: 0;
    margin-inline: auto;
    transform: none;
  }

  .now-playing-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .now-playing-brand {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    gap: 8px;
    transform: none;
  }

  .now-playing-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  .now-playing-brand strong {
    font-size: 20px;
  }

  .now-playing-top-context {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    width: min(244px, 100%);
    transform: none;
  }

  .now-playing-context-card {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    min-height: 50px;
    padding: 0 11px;
    border-radius: 8px;
  }

  .now-playing-context-icon {
    width: 32px;
    height: 32px;
  }

  .now-playing-context-icon svg {
    width: 22px;
    height: 22px;
  }

  .now-playing-context-card small {
    font-size: 10px;
  }

  .now-playing-context-card strong {
    font-size: 14px;
  }

  .now-playing-top-actions {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    display: flex;
    gap: 7px;
    transform: none;
  }

  .now-playing-pill {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 24px;
  }

  .now-playing-pill.icon-only {
    width: 48px;
  }

  .now-playing-pill:not(.icon-only) span {
    display: none;
  }

  .now-playing-stage {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(7px, 2vw, 10px);
    padding: 0;
  }

  .now-playing-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(7px, 2vw, 10px);
    text-align: center;
  }

  .now-playing-art-wrap {
    position: relative;
    display: grid;
    width: min(64vw, 30dvh, 300px);
    max-width: 300px;
    min-width: 0;
    margin-inline: auto;
    justify-items: center;
  }

  .now-playing-art {
    width: 100%;
    min-width: 0;
    max-width: 300px;
    aspect-ratio: 1;
    border-radius: 14px;
  }

  .now-playing-info {
    display: grid;
    justify-items: center;
    width: 100%;
    max-width: 100%;
    gap: 2px;
    text-align: center;
  }

  .now-playing-kicker {
    justify-content: center;
    margin-top: 0;
  }

  .now-playing-title-row {
    justify-content: center;
    width: 100%;
  }

  .now-playing-title-row h2 {
    max-width: 100%;
    margin: 0;
    font-size: clamp(1.85rem, 8.2vw, 2.6rem);
    line-height: 0.96;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .now-playing-artist {
    justify-content: center;
    max-width: 100%;
    font-size: clamp(1.08rem, 4.5vw, 1.45rem);
    line-height: 1.08;
  }

  .now-playing-album {
    max-width: 100%;
    font-size: clamp(0.98rem, 4vw, 1.16rem);
    line-height: 1.2;
    text-align: center;
  }

  .now-playing-badges {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
  }

  .now-playing-badge {
    min-height: 28px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .now-playing-spectrum-wrap {
    display: grid;
    min-height: 20px;
    height: 20px;
    margin-top: 0;
  }

  .now-playing-spectrum {
    --spectrum-bar-gap: 4px;
    --spectrum-bar-width: 2px;
    width: 92%;
    height: 18px;
    margin-inline: auto;
    opacity: 0.55;
  }

  .now-playing-progress {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    font-size: 14px;
  }

  .now-playing-center-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    align-self: center;
  }

  .now-playing-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(14px, 5vw, 24px);
    width: 100%;
  }

  .now-playing-control {
    width: 48px;
    height: 48px;
  }

  .now-playing-play {
    width: 64px;
    height: 64px;
  }

  .now-playing-volume {
    grid-template-columns: 28px minmax(0, 1fr) 42px;
    width: min(100%, 320px);
    min-height: 48px;
    padding-inline: 12px;
    border-radius: 8px;
  }

  .now-playing-bottom {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 0;
  }

  .now-playing-up-next-card,
  .now-playing-exit-button {
    position: static;
    inset: auto;
    width: 100%;
    max-width: 100%;
    transform: none;
  }

  .now-playing-up-next-card {
    order: 1;
    grid-template-columns: 58px minmax(0, 1fr) auto 18px;
    gap: 6px 10px;
    min-height: 92px;
    padding: 12px;
  }

  .now-playing-up-next-art {
    width: 58px;
  }

  .now-playing-up-next-copy strong {
    font-size: 16px;
  }

  .now-playing-up-next-copy small {
    font-size: 14px;
  }

  .now-playing-exit-button {
    order: 2;
    justify-self: stretch;
    min-height: 48px;
    padding-inline: 16px;
  }

  .now-playing-advanced-panel,
  .now-playing-mode.advanced-open .now-playing-advanced-panel {
    position: static;
    inset: auto;
    width: 100%;
    max-width: 100%;
    max-height: min(42vh, 360px);
    transform: none;
  }

  .now-playing-art-wrap > .now-playing-lyrics-card {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    max-height: none;
    transform: none;
    border-radius: 14px;
  }
}

@media (max-width: 600px) and (max-height: 880px) {
  .now-playing-mode {
    gap: 6px;
    padding-block: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-bottom));
  }

  .now-playing-stage {
    gap: 6px;
  }

  .now-playing-main {
    gap: 6px;
  }

  .now-playing-art-wrap {
    width: min(58vw, 27dvh, 270px);
    max-width: 270px;
  }

  .now-playing-art {
    max-width: 270px;
  }

  .now-playing-title-row h2 {
    font-size: clamp(1.72rem, 7.4vw, 2.3rem);
  }

  .now-playing-artist {
    font-size: clamp(1rem, 4.1vw, 1.28rem);
  }

  .now-playing-album {
    font-size: clamp(0.92rem, 3.7vw, 1.04rem);
  }

  .now-playing-spectrum-wrap {
    height: 14px;
    min-height: 14px;
  }

  .now-playing-spectrum {
    height: 12px;
  }

  .now-playing-center-actions {
    gap: 7px;
  }

  .now-playing-control {
    width: 44px;
    height: 44px;
  }

  .now-playing-play {
    width: 58px;
    height: 58px;
  }

  .now-playing-volume {
    min-height: 44px;
  }

  .now-playing-bottom {
    gap: 8px;
  }

  .now-playing-up-next-card {
    min-height: 82px;
    padding: 10px;
  }

  .now-playing-up-next-art {
    width: 50px;
  }

  .now-playing-exit-button {
    min-height: 44px;
  }
}
