/* Gravy UI motion tokens — see ARCHITECTURE.md § UI motion and transitions */
:root {
  --gravy-motion-instant: 0ms;
  --gravy-motion-fast: 150ms;
  --gravy-motion-standard: 200ms;
  --gravy-motion-content: 280ms;
  --gravy-motion-spatial: 400ms;
  --gravy-ease-out: ease-out;
  --gravy-ease-standard: ease;
  --gravy-ease-emphasis: cubic-bezier(0.22, 1, 0.36, 1);
  --gravy-motion-enter-distance: 4px;
  --gravy-motion-graph-slide: 24px;
}

@keyframes gravy-motion-enter {
  from {
    opacity: 0;
    transform: translateY(calc(-1 * var(--gravy-motion-enter-distance)));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gravy-motion-enter,
.track-history-row--enter {
  animation: gravy-motion-enter var(--gravy-motion-content) var(--gravy-ease-out) both;
}

.gravy-motion-content-fade {
  transition: opacity var(--gravy-motion-standard) var(--gravy-ease-out);
}

@keyframes gravy-motion-deck-track-swap {
  from {
    opacity: 0.2;
    transform: translateY(calc(-1 * var(--gravy-motion-enter-distance)));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gravy-motion-deck-thumb-swap {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gravy-motion-deck-track-swap {
  animation: gravy-motion-deck-track-swap var(--gravy-motion-fast) var(--gravy-ease-out) both;
}

.deck-artist-thumb.gravy-motion-deck-thumb-swap,
.station-control-track-thumb.gravy-motion-deck-thumb-swap {
  animation: gravy-motion-deck-thumb-swap var(--gravy-motion-fast) var(--gravy-ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  .gravy-motion-enter,
  .track-history-row--enter {
    animation: none;
  }
  .gravy-motion-content-fade {
    transition: none;
  }
  .gravy-motion-deck-track-swap,
  .deck-artist-thumb.gravy-motion-deck-thumb-swap,
  .station-control-track-thumb.gravy-motion-deck-thumb-swap {
    animation: none;
  }
}

.playback-card .metrics-row,
.playback-card .extra-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 6px 0;
  font-size: 14px;
  color: #bbb;
}
.playback-card .metrics-row div,
.playback-card .extra-row div {
  min-width: 110px;
}
.metrics-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 600;
  color: #e5f3ff;
  white-space: nowrap;
}
.metric-badge .metric-label {
  color: #8ca0b9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 10px;
}
.metric-badge .metric-value {
  color: #fff;
  font-weight: 600;
}
.playback-card .meter {
  flex: 1;
  min-width: 120px;
}
.playback-card + .playback-card {
  margin-top: 16px;
}
.playback-card.track-transitioning {
  animation: track-transition 0.6s ease-out;
}
@keyframes track-transition {
  0% {
    background-color: rgba(255, 193, 7, 0.05);
  }
  50% {
    background-color: rgba(255, 193, 7, 0.15);
  }
  100% {
    background-color: transparent;
  }
}
.deck-grid {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 20px;
  align-items: stretch;
}
.deck-grid .playback-card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
}
.deck-grid .playback-card + .playback-card {
  margin-top: 0;
}

/* DECK LAYOUT REWRITE: unified deck-section. Rollback: see DECK_LAYOUT_ROLLBACK.md */
.station-main .deck-grid .deck-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.station-main .deck-grid .deck-section {
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(14, 28, 46, 0.95);
  border: none;
  box-shadow: none;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
}
.station-main .deck-grid .deck-section:last-child {
  margin-bottom: 0;
}
.station-main .deck-grid .deck-section--live {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.deck-live-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  width: 100%;
  min-height: 0;
}
#deckNowPlaying .deck-section--live {
  min-height: 0;
  contain: layout style paint;
}
#deckHistory,
#deckHistoryGraphWrap {
  contain: layout style paint;
}
.deck-deck-thumb-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  width: 88px;
  min-width: 88px;
}
.deck-deck-thumb-col--live {
  width: auto;
  min-width: 0;
  max-width: none;
  align-self: stretch;
  justify-content: flex-start;
  height: 100%;
}
.deck-deck-thumb-col--live .deck-slot-label {
  flex-shrink: 0;
  margin: 0 0 8px;
  padding-bottom: 2px;
}
.deck-deck-thumb-col--live .deck-artist-thumb {
  margin-top: 0;
  margin-bottom: 0;
  flex: 1 1 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  object-fit: cover;
  align-self: stretch;
}
.deck-deck-thumb-col .deck-slot-label,
.station-main .deck-grid .deck-section--history .deck-history-header-row .deck-slot-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8ca0b9;
  line-height: 1.2;
  text-align: left;
  width: 100%;
}
.station-main .deck-grid .deck-section--history .deck-history-header-row .deck-slot-label {
  width: auto;
}
.deck-artist-thumb--live,
.deck-deck-thumb-col--live .deck-artist-thumb {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 8px;
}
.deck-live-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-start;
  min-height: 0;
  align-self: stretch;
}
/* Push track row down above waveform only; image column unchanged */
#deckNowPlaying .deck-live-right {
  gap: 0;
}
#deckNowPlaying .deck-live-right::before {
  content: '';
  display: block;
  flex: 1 1 0;
  min-height: 0;
}
.deck-section-row--live-details {
  margin-bottom: 0;
  align-items: center;
  gap: 8px;
  padding: 0;
  flex-shrink: 0;
}
#deckNowPlaying .deck-section-row.deck-section-row--live-details {
  margin-top: 20px;
}
#deckNowPlaying.deck-now--waveform-off .deck-live-right::before {
  display: none;
}
#deckNowPlaying.deck-now--waveform-off .deck-live-layout,
#deckNowPlaying.deck-now--home-no-waveforms .deck-live-layout {
  align-items: center;
}
#deckNowPlaying.deck-now--waveform-off .deck-deck-thumb-col--live,
#deckNowPlaying.deck-now--home-no-waveforms .deck-deck-thumb-col--live {
  position: relative;
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  flex: 0 0 80px;
  align-self: center;
  justify-content: center;
  height: 80px;
  min-height: 80px;
  max-height: 80px;
}
#deckNowPlaying.deck-now--waveform-off .deck-deck-thumb-col--live .deck-slot-label,
#deckNowPlaying.deck-now--home-no-waveforms .deck-deck-thumb-col--live .deck-slot-label {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  transform: translateY(calc(-100% - 4px));
  line-height: 1.2;
  white-space: nowrap;
}
#deckNowPlaying.deck-now--waveform-off .deck-deck-thumb-col--live .deck-artist-thumb,
#deckNowPlaying.deck-now--waveform-off .deck-artist-thumb--live,
#deckNowPlaying.deck-now--home-no-waveforms .deck-deck-thumb-col--live .deck-artist-thumb,
#deckNowPlaying.deck-now--home-no-waveforms .deck-artist-thumb--live {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
  max-width: 80px;
  max-height: 80px;
  aspect-ratio: 1;
}
#deckNowPlaying.deck-now--waveform-off .deck-live-right,
#deckNowPlaying.deck-now--home-no-waveforms .deck-live-right {
  justify-content: center;
  align-self: stretch;
  align-items: stretch;
  width: 100%;
}
#deckNowPlaying.deck-now--waveform-off .deck-section-row.deck-section-row--live-details,
#deckNowPlaying.deck-now--home-no-waveforms .deck-section-row.deck-section-row--live-details {
  margin-top: 0;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
}
#deckNowPlaying.deck-now--waveform-off .deck-section-row--live-details .deck-track-info,
#deckNowPlaying.deck-now--home-no-waveforms .deck-section-row--live-details .deck-track-info {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  width: 100%;
  max-width: 100%;
}
#deckNowPlaying.deck-now--waveform-off .deck-section-row--live-details .deck-track-label-wrap,
#deckNowPlaying.deck-now--home-no-waveforms .deck-section-row--live-details .deck-track-label-wrap {
  width: 100%;
  align-items: flex-start;
}
#deckNowPlaying.deck-now--waveform-off .deck-section-row--live-details .deck-track-title-row,
#deckNowPlaying.deck-now--home-no-waveforms .deck-section-row--live-details .deck-track-title-row {
  justify-content: flex-start;
  width: 100%;
}
#deckNowPlaying.deck-now--waveform-off .deck-section-row--live-details .deck-track-info .deck-artist,
#deckNowPlaying.deck-now--waveform-off .deck-section-row--live-details .deck-track-info .deck-track,
#deckNowPlaying.deck-now--home-no-waveforms .deck-section-row--live-details .deck-track-info .deck-artist,
#deckNowPlaying.deck-now--home-no-waveforms .deck-section-row--live-details .deck-track-info .deck-track {
  text-align: left;
  width: 100%;
  max-width: 100%;
}
#deckNowPlaying.deck-now--waveform-off .deck-section--live,
#deckNowPlaying.deck-now--home-no-waveforms .deck-section--live {
  overflow: visible;
  padding-top: 22px;
}
#deckNowPlaying.deck-now--waveform-off .deck-waveform2-container--inline {
  display: none !important;
}
#deckNowPlaying .deck-section-row--live-details .deck-track-info {
  gap: 4px;
  line-height: 1.2;
}
.deck-live-right .deck-waveform2-container--inline {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  height: 96px;
  min-height: 96px;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.deck-waveform2-container--click-toggle {
  cursor: pointer;
}
.deck-waveform2-container--click-toggle:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.75);
  outline-offset: 2px;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-row .deck-deck-thumb-col {
  width: 52px;
  min-width: 52px;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-row .deck-deck-thumb-col .deck-artist-thumb {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-queue-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  grid-template-rows: 18px 44px;
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-queue-row .deck-deck-thumb-col {
  display: contents;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-queue-row .deck-slot-label {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  margin: 0;
  padding-bottom: 0;
  line-height: 1.2;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8ca0b9;
  text-align: left;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-queue-row .deck-deck-thumb-col .deck-artist-thumb {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  justify-self: center;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-queue-row .deck-track-row {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  width: 100%;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-queue-row .deck-metrics {
  grid-column: 3;
  grid-row: 2;
  align-self: center;
}
/* Deck home: queue rows without artist images — drop reserved thumb column */
body:not(.deck-home-show-artist-images) .station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-queue-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 44px;
  row-gap: 0;
  min-height: 44px;
  height: auto;
  max-height: none;
}
body:not(.deck-home-show-artist-images) .station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-queue-row .deck-track-row {
  grid-column: 1;
  grid-row: 1;
}
body:not(.deck-home-show-artist-images) .station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-queue-row .deck-metrics {
  grid-column: 2;
  grid-row: 1;
}
body.theme-light .deck-deck-thumb-col .deck-slot-label,
body.theme-light .station-main .deck-grid .deck-section--history .deck-history-header-row .deck-slot-label,
body.theme-light .station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-queue-row .deck-slot-label {
  color: #737373;
}
.station-main .deck-grid .deck-section-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px; /* #panel-playback: gap from .deck-grid, margin-top 0 */
  position: relative;
}
.station-main .deck-grid .deck-section .deck-section-row .deck-track-info,
.station-main .deck-grid .deck-section .deck-section-row .deck-track-row {
  flex: 1 1 auto;
  min-width: 0;
}
.station-main .deck-grid .deck-section .deck-metrics--right {
  flex-shrink: 0;
  margin-left: auto;
}
body.theme-light .station-main .deck-grid .deck-card {
  background: transparent;
  border: none;
  box-shadow: none;
}
body.theme-light .station-main .deck-grid .deck-section {
  background: #fff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Decks – On-Air title (LIVE/WAIT) + timer as text to the right of LIVE */
.deck-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.deck-remain-text {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: #9fa8b3;
  font-weight: 500;
}
/* DECK LAYOUT REWRITE: unified deck-section. Rollback: see DECK_LAYOUT_ROLLBACK.md */
#deckNowPlaying .progress {
  margin-top: 6px;
  margin-bottom: 6px;
}
#deckNowPlaying .progress .meter {
  height: 8px;
}
#deckNowPlaying .progress .meter > span {
  border-radius: 4px;
}
.deck-waveform-container {
  position: relative;
  width: 100%;
  height: 80px;
  margin: 8px 0;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  overflow: hidden;
}
.deck-waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.deck-waveform-status {
  position: absolute;
  right: 8px;
  top: 6px;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(8, 12, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 2px 8px;
  pointer-events: none;
}
.deck-waveform-status:empty,
.deck-waveform-status[hidden] {
  display: none;
}
.deck-waveform2-container {
  position: relative;
  width: 100%;
  height: 108px;
  margin: 8px 0 10px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  overflow: hidden;
}
.deck-waveform2-header {
  position: absolute;
  left: 10px;
  top: 8px;
  z-index: 2;
  pointer-events: auto;
}
.deck-waveform2-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.96);
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 2px 8px;
}
.deck-waveform2-info-btn {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.96);
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  padding: 0;
  cursor: pointer;
}
.deck-waveform2-info-btn:hover {
  background: rgba(30, 41, 59, 0.84);
}
.deck-waveform2-info-btn:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.85);
  outline-offset: 1px;
}
.deck-waveform2-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.deck-waveform2-status {
  position: absolute;
  right: 8px;
  top: 6px;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(8, 12, 20, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 2px 8px;
  pointer-events: none;
}
.deck-waveform2-status:empty,
.deck-waveform2-status[hidden] {
  display: none;
}
.deck-debug-row {
  display: grid;
  grid-template-columns: auto auto;
  align-items: start;
  gap: 6px 12px;
  margin-top: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* limit reflow/paint to this strip (avoids full-page flicker with Vanta/canvas behind deck) */
  contain: layout style;
}
.deck-debug-row .deck-heartbeat-debug,
.deck-debug-row .deck-profile-settings-debug {
  margin-top: 0;
  min-width: 0;
  width: auto;
  max-width: none;
}
.deck-debug-row .deck-heartbeat-debug[open],
.deck-debug-row .deck-profile-settings-debug[open] {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
}
.deck-debug-row .deck-heartbeat-debug[open] .deck-heartbeat-debug__panel,
.deck-debug-row .deck-profile-settings-debug[open] .deck-heartbeat-debug__panel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.deck-heartbeat-debug {
  margin-top: 6px;
  width: 100%;
  box-sizing: border-box;
}
.deck-heartbeat-debug__summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
  margin: 0;
}
.deck-heartbeat-debug__summary::-webkit-details-marker {
  display: none;
}
.deck-heartbeat-debug__summary::marker {
  content: '';
}
.deck-heartbeat-debug__summary-hint {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.5);
}
.deck-heartbeat-debug__chev {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid rgba(255, 255, 255, 0.55);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  margin-left: 2px;
  transition: transform 0.15s ease;
  transform: rotate(0deg);
}
.deck-heartbeat-debug[open] .deck-heartbeat-debug__chev {
  transform: rotate(90deg);
}
.deck-heartbeat-debug__panel {
  margin-top: 6px;
}
.deck-heartbeat-debug__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.deck-heartbeat-debug__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}
.deck-heartbeat-debug__clear {
  font-size: 11px;
  padding: 2px 10px;
  min-height: 0;
}
.deck-heartbeat-debug__body {
  margin: 0;
  max-height: 160px;
  overflow: auto;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.95);
  white-space: pre-wrap;
  word-break: break-word;
}
#deckNowPlaying {
  position: relative;
}
/* Deck status summary above decks */
.deck-status-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px; /* #panel-playback overrides to 20px */
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.deck-status-stack .deck-status-bar {
  margin-bottom: 0;
}
.deck-status-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
/* Profile name lives in live mode box — hide duplicate "Profile:" status row */
.deck-status-stack > .deck-status-bar {
  display: none;
}
.deck-status-stack .deck-live-mode-box.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px 16px;
  flex-wrap: nowrap;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 35, 56, 0.72), rgba(13, 24, 39, 0.62));
  overflow: hidden;
  box-sizing: border-box;
}
.deck-live-mode-copy {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.deck-live-mode-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-width: 0;
  line-height: 1.35;
  width: 100%;
}
.deck-live-mode-heading {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8ca0b9;
  flex-shrink: 0;
}
.deck-live-mode-box {
  --deck-live-mode-chip-height: 30px;
}
.deck-live-mode-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.deck-live-mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  height: var(--deck-live-mode-chip-height, 30px);
  min-height: var(--deck-live-mode-chip-height, 30px);
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(80, 140, 210, 0.28);
  background: rgba(10, 22, 38, 0.55);
  box-sizing: border-box;
}
.deck-live-mode-chip[hidden] {
  display: none !important;
}
.deck-live-mode-chip--profile {
  gap: 8px;
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
}
.deck-live-mode-chip--profile .deck-live-mode-profile-type-mini {
  flex-shrink: 0;
}
.deck-live-mode-chip--profile .deck-live-mode-chip-prefix {
  flex-shrink: 0;
}
.deck-live-mode-chip.deck-live-mode-chip--profile-type {
  gap: 0;
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
  padding: 0 12px;
  text-transform: none;
  letter-spacing: normal;
}
.deck-live-mode-chip.deck-live-mode-chip--profile-type .deck-live-mode-chip-value {
  color: inherit;
}
.deck-live-mode-chip--progression,
.deck-live-mode-chip--ident {
  gap: 8px;
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
}
.deck-live-mode-chip--progression .deck-live-mode-chip-menu-icon,
.deck-live-mode-chip--ident .deck-live-mode-chip-menu-icon {
  width: 18px;
  height: 18px;
}
.deck-live-mode-chip-label,
.deck-live-mode-chip-time {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: #e8f0fa;
  flex-shrink: 0;
}
.deck-live-mode-chip-label {
  letter-spacing: 0.02em;
}
.deck-live-mode-chip--progression .deck-live-mode-chip-time.is-due,
.deck-live-mode-chip--ident .deck-live-mode-chip-time.is-due {
  color: #6fe7a1;
}
.deck-live-mode-chip--progression .deck-live-mode-chip-time.is-armed,
.deck-live-mode-chip--ident .deck-live-mode-chip-time.is-armed {
  color: #f87171;
}
.deck-live-mode-chip--ident .deck-live-mode-chip-time.is-stage-queued {
  color: #6fe7a1;
}
.deck-live-mode-chip--ident .deck-live-mode-chip-time.is-stage-on-air {
  color: #6fe7a1;
}
.deck-live-mode-chip--progression .deck-live-mode-chip-time.is-pending-after-ident {
  color: #fbbf24;
}
.deck-live-mode-chip-menu-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  opacity: 0.72;
}
.deck-live-mode-chip-prefix {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: #e8f0fa;
  flex-shrink: 0;
}
.deck-live-mode-chip-value {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: #e8f0fa;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(32vw, 240px);
}
.deck-live-mode-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-left: auto;
  flex-shrink: 0;
}
.deck-live-mode-modal-dialog {
  width: min(440px, 92vw);
}
.deck-live-mode-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.deck-live-mode-modal-dialog:not(.deck-live-mode-modal-dialog--profile) .deck-live-mode-modal-profile-only {
  visibility: hidden;
  pointer-events: none;
}
.deck-live-mode-modal-body .form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.deck-live-mode-modal-body .form-row:has(#deckLiveModeNameCombo) {
  padding-bottom: 10px;
}
.deck-live-mode-modal-pills.deck-mode-pill-toggle {
  width: 100%;
  max-width: 280px;
}
.deck-live-mode-modal-divider {
  margin: 2px 0 0;
  border: 0;
  border-top: 1px solid rgba(140, 160, 185, 0.35);
}
body.theme-light .deck-live-mode-modal-divider {
  border-top-color: rgba(100, 116, 139, 0.28);
}
.deck-live-mode-modal-queue-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.deck-live-mode-clear-queue-actions[hidden] {
  display: none !important;
}
.deck-live-mode-clear-queue-actions:not([hidden]),
.deck-live-mode-clear-queue-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.deck-live-mode-clear-queue-btn {
  align-self: flex-start;
  min-height: 0;
}
.deck-live-mode-clear-queue-confirm[hidden] {
  display: none !important;
}
.deck-live-mode-clear-queue-confirm:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.08);
}
.deck-live-mode-clear-queue-confirm-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #e8eef5;
}
body.theme-light .deck-live-mode-clear-queue-confirm {
  border-color: rgba(185, 28, 28, 0.35);
  background: rgba(254, 226, 226, 0.65);
}
body.theme-light .deck-live-mode-clear-queue-confirm-text {
  color: #7f1d1d;
}
.deck-live-mode-clear-queue-status[hidden] {
  display: none !important;
}
.deck-live-mode-clear-queue-status {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #8ca0b9;
}
.deck-live-mode-clear-queue-status.is-success {
  color: #6ee7b7;
}
.deck-live-mode-clear-queue-status.is-error {
  color: #fca5a5;
}
body.theme-light .deck-live-mode-clear-queue-status {
  color: #64748b;
}
body.theme-light .deck-live-mode-clear-queue-status.is-success {
  color: #047857;
}
body.theme-light .deck-live-mode-clear-queue-status.is-error {
  color: #b91c1c;
}
.deck-live-mode-modal-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}
.deck-live-mode-modal-buttons__end {
  display: inline-flex;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
#deckLiveModeFlushQueueBtn {
  flex-shrink: 0;
}
body.theme-light .deck-live-mode-heading {
  color: #64748b;
}
body.theme-light .deck-live-mode-chip {
  border-color: hsl(0 0% 89.8%);
  background: #f8fafc;
}
body.theme-light .deck-live-mode-chip-value {
  color: #0f172a;
}
body.theme-light .deck-live-mode-chip-prefix {
  color: #0f172a;
}
body.theme-light .deck-live-mode-chip-label,
body.theme-light .deck-live-mode-chip-time {
  color: #0f172a;
}
body.theme-light .deck-live-mode-chip--progression .deck-live-mode-chip-time.is-due,
body.theme-light .deck-live-mode-chip--ident .deck-live-mode-chip-time.is-due {
  color: #15803d;
}
body.theme-light .deck-live-mode-chip--progression .deck-live-mode-chip-time.is-armed,
body.theme-light .deck-live-mode-chip--ident .deck-live-mode-chip-time.is-armed {
  color: #dc2626;
}
body.theme-light .deck-live-mode-chip--ident .deck-live-mode-chip-time.is-stage-queued,
body.theme-light .deck-live-mode-chip--ident .deck-live-mode-chip-time.is-stage-on-air {
  color: #15803d;
}
body.theme-light .deck-live-mode-chip--progression .deck-live-mode-chip-time.is-pending-after-ident {
  color: #b45309;
}
body.theme-light .deck-live-mode-chip-menu-icon {
  filter: brightness(0);
  opacity: 0.55;
}
.status-item--delay-sync {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.status-item--delay-sync .deck-delay-sync-toggle,
.status-item--delay-sync .deck-delay-sync-select {
  flex-shrink: 0;
}
.deck-status-bar .status-item.status-item--delay-sync {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 4px 10px;
  gap: 4px;
}
.deck-delay-sync-toggle {
  border: 1px solid rgba(120, 170, 230, 0.35);
  background: rgba(8, 20, 34, 0.78);
  color: #dbeafe;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.deck-delay-sync-toggle[aria-pressed="true"] {
  border-color: rgba(74, 222, 128, 0.65);
  background: rgba(8, 40, 24, 0.8);
  color: #86efac;
}
.deck-delay-sync-select,
.deck-delay-sync-input {
  min-width: 52px;
  width: 52px;
  height: 22px;
  border: 1px solid rgba(80, 140, 210, 0.3);
  border-radius: 6px;
  background: rgba(14, 28, 46, 0.95);
  color: #c8d6e5;
  font-size: 11px;
  padding: 1px 4px;
  box-sizing: border-box;
}
.deck-delay-sync-select:disabled,
.deck-delay-sync-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.deck-delay-sync-unit {
  font-size: 11px;
  color: #8ca0b9;
  margin-left: -2px;
}
.deck-delay-sync-calibrate-row {
  margin-top: 8px;
}
.deck-delay-sync-calibrate-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.deck-delay-sync-calibrate-btn,
.deck-delay-sync-hear-btn {
  border: 1px solid rgba(120, 170, 230, 0.35);
  background: rgba(8, 20, 34, 0.78);
  color: #dbeafe;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}
.deck-delay-sync-calibrate-btn[aria-pressed="true"] {
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(48, 32, 8, 0.85);
  color: #fcd34d;
}
.deck-delay-sync-hear-btn {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(8, 40, 24, 0.8);
  color: #86efac;
}
.deck-delay-sync-calibrate-status {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.35;
}

.deck-mode-card {
  margin-bottom: 16px;
}

.deck-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
}

.deck-mode-row--modes {
  justify-content: flex-start;
}

.deck-mode-row + .deck-mode-row {
  border-top: 1px solid rgba(80, 140, 210, 0.22);
}

.deck-mode-toggle-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deck-mode-toggle-switch {
  transform: scale(0.9);
}

.deck-mode-label {
  font-size: 0.9rem;
  color: #f1d28a;
}

.deck-mode-label-left {
  color: #ff6f6f;
}

.deck-mode-label-right {
  color: #f1d28a;
}

.deck-mode-select-group {
  min-width: 180px;
  flex: 0 0 200px;
}

/* Deck status summary inline with mode pills */
.deck-status-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

/* Deck mode pill toggle (Playlist vs Scheduler) */
.deck-mode-pill-toggle {
  position: relative;
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(80,140,210,0.35);
  padding: 3px;
  background: rgba(14,28,46,0.95);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  min-width: 220px;
  overflow: hidden;
}

.deck-mode-pill-highlight {
  position: absolute;
  inset: 1px;
  width: 50%;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  transition: transform 0.22s ease, background 0.22s ease;
  z-index: 0;
}

.deck-mode-pill-option {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #9fb3cc;
  padding: 5px 10px;
  cursor: pointer;
  user-select: none;
  border: none;
  background: transparent;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.deck-mode-pill-option--scheduler {
  color: #f1d28a;
}

.deck-mode-pill-toggle[data-mode="playlist"] .deck-mode-pill-highlight {
  transform: translateX(0%);
  background: linear-gradient(135deg, #ff6f6f, #b33030);
}

.deck-mode-pill-toggle[data-mode="scheduler"] .deck-mode-pill-highlight {
  transform: translateX(100%);
  background: linear-gradient(135deg, #ffd45c, #f0a500);
}

.deck-mode-pill-toggle[data-mode="playlist"] .deck-mode-pill-option--playlist {
  color: #040404;
}

.deck-mode-pill-toggle[data-mode="scheduler"] .deck-mode-pill-option--scheduler {
  color: #040404;
}

.deck-mode-pill-option.disabled {
  opacity: 0.45;
  cursor: default;
}
.deck-status-bar .status-item,
.deck-status-inline .status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #dfe9f5;
  flex: 1 1 170px;
  min-width: 0;
}
.deck-status-bar .status-item {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 6px 14px;
  border: 1px solid rgba(90, 142, 210, 0.24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 35, 56, 0.72), rgba(13, 24, 39, 0.62));
  overflow: hidden;
  box-sizing: border-box;
  flex-wrap: nowrap;
}
.deck-status-bar .status-item--wide,
.deck-status-inline .status-item--wide {
  flex: 2 1 260px;
  min-width: 220px;
}
.deck-status-bar .status-item--wide {
  flex: 1 1 auto;
  min-width: 0;
}
/* Scheduler + Profile: equal share, stable width when Sync toggles */
.deck-status-bar .status-item--deck-primary {
  flex: 1 1 0;
  min-width: 120px;
  max-width: 220px;
}
/* Ident only (no --compact-wide): fixed width */
.deck-status-bar .status-item--compact:not(.status-item--compact-wide) {
  flex: 0 0 168px;
  min-width: 168px;
  max-width: 168px;
}
/* Progression uses --compact-wide */
.deck-status-bar .status-item--compact.status-item--compact-wide {
  flex: 0 0 200px;
  max-width: 200px;
  min-width: 200px;
}
@media (min-width: 640px) {
  .deck-status-bar .status-item--deck-primary {
    flex: 1 1 0;
    min-width: 120px;
    max-width: 220px;
  }
  .deck-status-bar .status-item--compact:not(.status-item--compact-wide) {
    flex: 0 0 168px;
    min-width: 168px;
    max-width: 168px;
  }
  .deck-status-bar .status-item--compact.status-item--compact-wide {
    flex: 0 0 200px;
    min-width: 200px;
    max-width: 200px;
  }
  .deck-status-bar .status-item:not(.status-item--compact):not(.status-item--deck-primary):not(.status-item--delay-sync) {
    flex: 0 0 auto;
    min-width: 0;
  }
}
/* Hide status items one by one before they wrap (order: Sync, Profile, Scheduler; Idents stays last) */
@media (max-width: 1500px) {
  .deck-status-bar .status-item[data-system="delay-sync"] { display: none !important; }
}
@media (max-width: 1300px) {
  .deck-status-bar .status-item[data-system="engine"] { display: none !important; }
}
@media (max-width: 1100px) {
  .deck-status-bar .status-item[data-system="scheduler"] { display: none !important; }
}
@media (max-width: 950px) {
  .deck-status-bar .status-item {
    min-width: 0;
    flex: 1 1 auto;
  }
}
.deck-status-bar .status-label,
.deck-status-inline .status-label,
.deck-seed-status-bar .status-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 600;
  color: #8ca0b9;
  flex-shrink: 0;
  white-space: nowrap;
}
.deck-status-bar .status-value,
.deck-status-inline .status-value,
.deck-seed-status-bar .status-value {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  position: relative;
  top: -1px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deck-status-bar .status-meta,
.deck-status-inline .status-meta,
.deck-seed-status-bar .status-meta {
  color: #9fb7d4;
  font-size: 13px;
  position: relative;
  top: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deck-status-bar .status-item > .status-meta:empty,
.deck-status-inline .status-item > .status-meta:empty,
.deck-seed-status-bar .status-item > .status-meta:empty {
  display: none;
}
.deck-status-bar .status-meta.is-due,
.deck-status-inline .status-meta.is-due,
.deck-seed-status-bar .status-meta.is-due {
  color: #f39c12;
  font-weight: 600;
}
body.theme-light .deck-status-bar .status-meta.is-due,
body.theme-light .deck-status-inline .status-meta.is-due,
body.theme-light .deck-seed-status-bar .status-meta.is-due {
  color: #b87100;
}
.deck-status-bar .status-dot,
.deck-status-inline .status-dot,
.deck-seed-status-bar .status-dot {
  flex-shrink: 0;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #58657a, #3a4454);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.45);
}
.status-dot--on {
  background: linear-gradient(135deg, #6ee7a1, #2fbf71);
  box-shadow: 0 0 8px rgba(111, 231, 161, 0.6);
}
.status-dot--warn {
  background: linear-gradient(135deg, #ffd86f, #ffb347);
  box-shadow: 0 0 8px rgba(255, 216, 111, 0.55);
}
.status-dot--off {
  background: linear-gradient(135deg, #ff7a7a, #d13838);
  box-shadow: 0 0 8px rgba(255, 122, 122, 0.45);
}
.deck-status-pills .system-chip .chip-label {
  text-align: center;
}
.deck-status-pills .system-chip .chip-value {
  text-align: center;
}
.track-history-card {
  margin-top: 24px;
}
.track-history-header {
  background: #1a1a1a !important;
  border-bottom: 1px solid #333 !important;
  border-left: none !important;
  border-radius: 0 !important;
  padding: 12px 16px;
}
.track-history-body {
  padding: 16px;
}
.deck-bpm-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 10px;
  color: #ffd86f;
  background: rgba(255, 216, 111, 0.06);
}

/* Track history list (pool-result style) */
.track-history-list {
  scrollbar-color: #707070 #101010;
}
.track-history-list::-webkit-scrollbar {
  width: 8px;
}
.track-history-list::-webkit-scrollbar-track {
  background: #101010;
  border-radius: 6px;
}
.track-history-list::-webkit-scrollbar-thumb {
  background: #707070;
  border-radius: 6px;
}
.track-history-list::-webkit-scrollbar-thumb:hover {
  background: #8d8d8d;
}

/* Header row */
.track-history-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
  position: sticky;
  top: 0;
  background: rgba(17,17,17,0.97);
  z-index: 1;
}
.track-history-header-row .th-hcol.deck-slot-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8ca0b9;
  line-height: 1.2;
}
.th-hplay {
  flex-shrink: 0;
  width: 28px;
}
.th-htime {
  flex-shrink: 0;
  width: 40px;
}
#panel-history .track-history-list--dated .th-htime,
#panel-history .track-history-list--dated .th-time {
  width: 118px;
  min-width: 118px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.th-hartist {
  flex: 0 1 28%;
  min-width: 72px;
  max-width: 170px;
}
.th-htitle {
  flex: 1 1 0;
  min-width: 0;
}
.th-hprog-bpm,
.th-prog-bpm {
  flex: 0 0 64px;
  width: 64px;
  min-width: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
}
.th-hprog-bpm .th-hprogression,
.th-hprog-bpm .th-hbpm {
  flex: 0 0 auto;
  min-width: 0;
}
.th-hprogression {
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  text-align: center;
}
.th-hbpm {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  text-align: right;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}
.th-hharmonic {
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  text-align: center;
}
.th-htransition {
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  text-align: center;
}
.th-hprofile {
  flex: 0 0 130px;
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  text-align: right;
}
.th-hselection {
  flex: 0 0 130px;
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  text-align: right;
}
.th-hactions {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  text-align: right;
}

/* Data rows */
.track-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}
.track-history-row:last-child {
  border-bottom: none;
}
.track-history-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Play column */
.th-play {
  flex-shrink: 0;
  width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.th-play-placeholder {
  display: inline-block;
  width: 28px;
  height: 28px;
}
.track-history-play {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #9fb3cc;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.track-history-play:hover {
  background: rgba(41, 121, 255, 0.2);
  color: #fff;
}
.track-history-play.active {
  background: rgba(41, 121, 255, 0.3);
  color: #fff;
}

/* Time column */
.th-time {
  flex-shrink: 0;
  width: 40px;
  color: #8ca0b9;
  font-size: 11px;
  white-space: nowrap;
}

/* Artist thumb column */
.th-hthumb,
.th-thumb {
  flex: 0 0 28px;
  width: 28px;
  min-width: 28px;
  flex-shrink: 0;
}
.th-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.track-history-artist-thumb {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(90, 142, 210, 0.28);
  background: rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}
.track-history-artist-thumb--placeholder {
  object-fit: contain;
  padding: 5px;
  opacity: 0.55;
}
.track-history-artist-thumb--ident {
  object-fit: contain;
  padding: 4px;
  background: transparent;
  border-color: rgba(90, 142, 210, 0.22);
  filter: brightness(0) invert(1);
}
body.theme-light .track-history-artist-thumb {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
}
body.theme-light .track-history-artist-thumb--ident {
  filter: brightness(0);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Artist / title columns – match track pool results */
.th-artist,
.th-hartist {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.th-title,
.th-htitle {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.th-artist {
  flex: 0 1 28%;
  max-width: 170px;
}
.track-history-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow: hidden;
}
.track-history-artist {
  font-weight: 600;
  color: #fff;
}
.track-history-title {
  color: #b0c4de;
}
.track-history-row--ident .th-artist {
  flex: 1 1 0;
  max-width: none;
}
.track-history-row--ident .th-title {
  display: none;
}
.track-history-row--ident .track-history-ident-title {
  color: #8ca0b9;
  font-weight: 400;
}
.track-history-meta--ident {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.track-history-meta--ident .track-history-sep {
  display: none;
}
.track-history-ident-thumb {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  object-fit: contain;
  padding: 4px;
  box-sizing: border-box;
  background: transparent;
  filter: brightness(0) invert(1);
}
body.theme-light .track-history-ident-thumb {
  filter: brightness(0);
}
.track-history-ident-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.th-actions {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
}
.th-actions .track-search-actions {
  min-width: 0;
}
.track-history-actions-wrap {
  position: relative;
  display: inline-flex;
}
.track-history-actions-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.track-history-actions-trigger:hover,
.track-history-actions-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
}
.track-history-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(12, 20, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.track-history-actions-menu[hidden] {
  display: none !important;
}
.track-history-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #e8eefb;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.track-history-menu-item:hover,
.track-history-menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

/* BPM column */
.th-bpm {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  text-align: right;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #8ca0b9;
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
}
.th-progression {
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.track-history-bpm-value {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.track-history-progression-icon,
.deck-progression-icon {
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  /* SVG is dark-filled; invert on dark backgrounds (matches ident thumbs) */
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.track-history-progression-icon {
  width: 16px;
  height: 16px;
}
body.theme-light .track-history-progression-icon,
body.theme-light .deck-progression-icon {
  filter: brightness(0);
  opacity: 0.88;
}
.track-history-bpm-perceptual {
  color: #ffc107;
  font-weight: 600;
}

/* Harmonic column */
.th-key-transition-group {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  gap: 0;
}
.th-key-transition-group .th-hharmonic {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Shared key + harmonic chip (decks + track history) */
.deck-key-harmonic-chip {
  display: inline-flex;
  flex-direction: row;
  align-items: stretch;
  flex: 0 0 auto;
  width: 40px;
  height: 18px;
  min-height: 18px;
  border: none;
  border-radius: 3px;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.deck-key-harmonic-chip__key {
  order: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  min-width: 24px;
  width: 24px;
  max-width: 24px;
  min-height: 0;
  height: 100%;
  padding: 2px 1px;
  border-radius: 0;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deck-key-harmonic-chip__mix {
  order: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  min-width: 16px;
  width: 16px;
  height: auto;
  margin: 0;
  padding: 0;
  align-self: stretch;
  background: rgba(0, 0, 0, 0.35);
  line-height: 0;
  box-sizing: border-box;
}
body.theme-light .deck-key-harmonic-chip__mix {
  background: rgba(0, 0, 0, 0.06);
}
.deck-key-harmonic-chip__mix .harmonic-transition-icon {
  width: 12px;
  height: 12px;
}
.deck-key-harmonic-chip--key-only {
  width: 24px;
}
.deck-key-harmonic-chip--key-only .deck-key-harmonic-chip__key {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
}
.th-harmonic {
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.th-harmonic .metric-badge {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  justify-content: center;
  padding: 3px 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}
.th-harmonic .metric-badge .metric-value {
  font-size: 10px;
  font-weight: 600;
}
/* Camelot key colors — dark theme text is white */
.th-harmonic .metric-badge[class*="key-"] .metric-value {
  color: #fff;
}
.th-harmonic .metric-badge.key-1  { background-color: #e74c3c; }
.th-harmonic .metric-badge.key-2  { background-color: #e67e22; }
.th-harmonic .metric-badge.key-3  { background-color: #f1c40f; }
.th-harmonic .metric-badge.key-4  { background-color: #2ecc71; }
.th-harmonic .metric-badge.key-5  { background-color: #27ae60; }
.th-harmonic .metric-badge.key-6  { background-color: #1abc9c; }
.th-harmonic .metric-badge.key-7  { background-color: #3498db; }
.th-harmonic .metric-badge.key-8  { background-color: #2980b9; }
.th-harmonic .metric-badge.key-9  { background-color: #9b59b6; }
.th-harmonic .metric-badge.key-10 { background-color: #8e44ad; }
.th-harmonic .metric-badge.key-11 { background-color: #e91e63; }
.th-harmonic .metric-badge.key-12 { background-color: #f06292; }

/* Profile column */
.th-profile,
.th-hprofile {
  flex: 0 0 130px;
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  text-align: right;
  font-size: 12px;
  color: #8ca0b9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Selection column */
.th-selection,
.th-hselection {
  flex: 0 0 130px;
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  text-align: right;
  font-size: 12px;
  color: #8ca0b9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.th-selection.th-selection--sonic {
  color: #b8d4f0;
  font-variant-numeric: tabular-nums;
  padding-right: 0;
}
.sonic-selection-display {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: 100%;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.sonic-selection-display--similar .sonic-selection-icon--target {
  color: #6ee7a1;
}
.sonic-selection-display--different .sonic-selection-icon--mix {
  color: #ff8a80;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}
.sonic-selection-icon--target {
  display: block;
  flex-shrink: 0;
}
.sonic-selection-pct {
  flex-shrink: 0;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-sonic .metric-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding-left: 2px;
  padding-right: 2px;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-sonic--similar .sonic-selection-icon--target {
  color: #6ee7a1;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-sonic--different .sonic-selection-icon--mix {
  color: #ff8a80;
}

/* Transition column */
.th-transition {
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  text-align: center;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.th-htransition {
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  text-align: center;
}
.th-transition .harmonic-transition-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  line-height: 0;
}
.th-transition .harmonic-transition-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}
/* th-hactions width defined with header columns above */
.th-ident-label {
  display: inline-block;
  padding: 2px 6px;
  line-height: 1.2;
  color: #8ca0b9;
  font-size: 11px;
  font-weight: 400;
}

/* Empty / loading message */
.track-history-empty-msg {
  text-align: center;
  color: #8ca0b9;
  padding: 24px;
  font-size: 13px;
}

/* Pagination */
.track-history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#panel-history .track-history-pagination {
  padding: 10px 0 0;
}

/* Track history responsiveness: hide columns in order as width shrinks */
/* 1. Profile */
@media (max-width: 1100px) {
  #panel-history .track-history-header-row .th-hprofile,
  #panel-history .track-history-row .th-profile {
    display: none;
  }
}
/* 2. Preview audio */
@media (max-width: 1000px) {
  #panel-history .track-history-header-row .th-hplay,
  #panel-history .track-history-row .th-play {
    display: none;
  }
}
/* 3. Selection */
@media (max-width: 900px) {
  #panel-history .track-history-header-row .th-hselection,
  #panel-history .track-history-row .th-selection {
    display: none;
  }
}
/* 3b. Progression */
@media (max-width: 850px) {
  #panel-history .track-history-header-row .th-hprogression,
  #panel-history .track-history-row .th-progression {
    display: none;
  }
}
/* 4. Transition (mix icon half of key chip) */
@media (max-width: 800px) {
  #panel-history .track-history-header-row .th-key-transition-group .deck-key-harmonic-chip__mix,
  #panel-history .track-history-row .th-key-transition-group .deck-key-harmonic-chip__mix {
    display: none !important;
  }
  #panel-history .track-history-header-row .th-key-transition-group .deck-key-harmonic-chip,
  #panel-history .track-history-row .th-key-transition-group .deck-key-harmonic-chip {
    width: 24px;
  }
}
/* 5. Time */
@media (max-width: 700px) {
  #panel-history .track-history-header-row .th-htime,
  #panel-history .track-history-row .th-time {
    display: none;
  }
}
/* 6. Title – hide title column when very narrow */
@media (max-width: 600px) {
  #panel-history .th-htitle,
  #panel-history .th-title {
    display: none;
  }
  #panel-history .th-hartist,
  #panel-history .th-artist {
    flex: 1 1 0;
    max-width: none;
  }
}

/* Home (playback): no outer panel chrome — deck sections are the only boxes */
#panel-playback.panel {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 24px 16px 20px;
}
#panel-playback .deck-status-stack {
  margin-bottom: 20px;
}
#panel-playback .deck-grid {
  gap: 28px;
}
/* Live + Next/History share #deckNowPlaying — gap is inside the card, not on .deck-grid */
#panel-playback #deckNowPlaying.deck-card {
  gap: 28px;
}
#panel-playback .deck-section-group {
  gap: 28px;
  margin-top: 0;
}
#panel-playback .deck-grid .deck-section {
  margin-bottom: 0;
}
/* All station sidebar panels: no outer chrome (same as Home) */
.station-main .panel {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.station-main .panel:not(#panel-playback) {
  padding: 16px;
}
#panel-playback .deck-panel-header {
  margin: 0 0 12px 0;
  justify-content: flex-start;
  gap: 12px;
}
#panel-playback .deck-status-stack,
#panel-playback .deck-status-bar {
  margin-top: 0;
}
#deckNowPlaying .deck-now-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 35, 0.92);
  border-radius: 8px;
  padding: 12px;
  pointer-events: none;
}
#deckNowPlaying .deck-now-loading[aria-hidden="true"] {
  display: none;
}
.deck-now-loading-bar {
  height: 4px;
  width: 100%;
  max-width: 200px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
.deck-now-loading-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 40%;
  background: rgba(122, 167, 255, 0.9);
  border-radius: 2px;
  animation: deck-loading-slide 1.2s ease-in-out infinite;
}
@keyframes deck-loading-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
.deck-events-card {
  margin-top: 12px;
  padding: 8px;
}
.deck-events-card.deck-events-collapsible .deck-events-header {
  cursor: pointer;
  user-select: none;
  justify-content: flex-start;
  gap: 6px;
  margin: -8px -8px 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
}
.deck-events-card.deck-events-collapsible .deck-events-header .header-controls {
  margin-left: auto;
}
.deck-events-card.deck-events-collapsible.collapsed .deck-events-header .header-controls {
  display: none;
}
.deck-events-card.deck-events-collapsible .deck-events-toggle-arrow {
  display: inline-block;
  margin-right: 2px;
  font-size: 9px;
  transition: transform 0.2s ease;
}
.deck-events-card.deck-events-collapsible.collapsed .deck-events-toggle-arrow {
  transform: rotate(-90deg);
}
.deck-events-card.deck-events-collapsible.collapsed .deck-events-body {
  display: none;
}
.deck-events-card .deck-events-body.panel-body {
  padding: 8px 10px 10px;
}
.deck-events-card .events-panel {
  display: flex;
  flex-direction: column;
}
.deck-events-card .events-log {
  order: 1;
  margin-bottom: 0;
  max-height: 200px;
  padding: 4px 6px;
  font-size: 11px;
  border-radius: 6px;
  scrollbar-color: #707070 #101010;
}
.deck-events-card .events-log::-webkit-scrollbar {
  width: 6px;
}
.deck-events-card .events-log::-webkit-scrollbar-track {
  background: #101010;
  border-radius: 4px;
}
.deck-events-card .events-log::-webkit-scrollbar-thumb {
  background: #707070;
  border-radius: 4px;
}
.deck-events-card .events-log::-webkit-scrollbar-thumb:hover {
  background: #8d8d8d;
}
.deck-events-card .events-entry {
  padding: 4px 6px;
  gap: 6px;
  border-bottom: 1px solid #242424;
}
.deck-events-card .events-entry .event-body {
  gap: 3px;
}
.deck-events-card .events-entry .event-meta {
  font-size: 10px;
}
.deck-events-card .events-entry .event-time {
  font-size: 10px;
  min-width: 48px;
}
.deck-events-card .events-entry .event-kind {
  font-size: 10px;
}
.deck-events-card .event-section {
  font-size: 11px;
}
.deck-events-card .event-badge {
  font-size: 10px;
  padding: 2px 5px;
}
.deck-events-card .event-text {
  font-size: 11px;
}
.deck-events-card .btn.btn--sm {
  padding: 2px 8px;
  font-size: 11px;
}
.deck-events-card .events-toolbar {
  order: 2;
  margin-top: 0;
}
.deck-heading {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.deck-header-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.deck-header-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* DECK REWRITE: deck-section replaces cue-card for Next/Seed */
.station-main .deck-grid .deck-section .deck-queue-row {
  margin-top: 0;
}
.station-main .deck-grid .deck-section .deck-title--badge {
  flex-shrink: 0;
  width: 84px;
  min-width: 84px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #b8d4e8;
  text-align: center;
  box-sizing: border-box;
}
body.theme-light .station-main .deck-grid .deck-section .deck-title--badge {
  background: #e5e5e5;
  border-color: hsl(0 0% 85%);
  color: #525252;
}
.station-main .deck-grid .deck-section .deck-queue-row .deck-track-row {
  flex: 1 1 auto;
  min-width: 0;
}

/* Live deck: track info left, metrics right (same as Next/Seed) */
.deck-section-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-top: 4px;
  width: 100%;
}
.deck-section-row:first-child {
  margin-top: 0;
}
#deckNowPlaying .deck-live-layout .deck-live-badge {
  display: none;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-live .metric-value,
#deckNowPlaying .deck-metrics .metric-badge.metric-live .metric-value {
  color: #ef4444 !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* LIVE + Timer badge: same style box as Next/Seed, split left (red+white LIVE) / right (light red+black timer) */
.deck-live-badge {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-sizing: border-box;
}
.deck-live-badge .deck-live-badge-label,
.deck-live-badge .deck-live-badge-timer {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.deck-live-badge-label {
  padding: 4px 10px;
  text-align: center;
}
.deck-live-badge-label.live {
  background: #b91c1c;
  color: #fff !important;
}
.deck-live-badge-label.wait {
  background: #737373;
  color: #fff;
}
.deck-live-badge-timer {
  padding: 4px 10px;
  background: #fecaca;
  color: #000 !important;
  text-align: center;
}
body.theme-light .deck-live-badge {
  background: transparent;
  border-color: hsl(0 0% 85%);
}
body.theme-light .deck-live-badge-label.live {
  background: #b91c1c;
  color: #fff !important;
}
body.theme-light .deck-live-badge-label.wait {
  background: #737373;
  color: #fff;
}
body.theme-light .deck-live-badge-timer {
  background: #fecaca;
  color: #000 !important;
}
#deckNowPlaying .deck-now-row .deck-track-info {
  flex: 1 1 auto;
  min-width: 0;
}
/* Keep kebab next to artist/title, not pushed right by expanding track */
#deckNowPlaying .deck-track-info .deck-track {
  flex: 0 1 auto;
}
.deck-genre {
  display: block;
  align-self: flex-start;
  margin: 1px 0 0;
  padding: 0;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 400;
  color: #94a3b8;
  text-align: left;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deck-track-label-wrap > .deck-genre {
  order: 0;
}
.deck-genre[hidden] {
  display: none !important;
}
.deck-track-info--ident .deck-genre {
  display: none !important;
}
body.theme-light .deck-genre {
  color: #64748b;
}
#deckNowPlaying .deck-metrics--right {
  flex-shrink: 0;
  margin-left: auto;
}

.deck-header-wrapper {
  min-width: 0;
  overflow: visible;
}

.deck-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deck-track-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.deck-track-row .deck-track-info {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.deck-track-row .deck-metrics--queued {
  flex: 0 0 auto;
  white-space: nowrap;
}

.deck-header-separator {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 12px 0;
}

.deck-metrics--inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.deck-metrics--inline .deck-queued-block-btn {
  padding: 0;
  font-size: 10px;
  line-height: 1;
  border-radius: 3px;
  height: 18px;
  width: 18px;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  justify-content: center;
}
.deck-subtitle {
  position: relative;
  font-size: 16px;
  color: #f2fbff;
  font-weight: 600;
  letter-spacing: 0.1px;
  text-transform: none;
  white-space: nowrap;
  overflow: visible;
  text-overflow: ellipsis;
  padding-right: 16px;
}
.deck-edit-icon {
  position: absolute;
  top: 7px;
  right: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
  font-size: 11px;
  line-height: 1;
  padding: 2px 4px 2px 3px;
  cursor: pointer;
  opacity: 0.6;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  display: inline-block;
  z-index: 1;
  border-radius: 4px;
}
.deck-heading:hover .deck-edit-icon {
  opacity: 0.9;
}
.deck-edit-icon:hover:not(:disabled),
.deck-edit-icon:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  opacity: 1;
}
.deck-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 600;
  color: #7aa7ff;
}
.history-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.history-row > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.playback-card .history-row strong {
  font-size: 13px;
  color: #9fa8b3;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.history-value {
  font-size: 14px;
  color: #dfe6f3;
  font-weight: 600;
}
.playback-card .progress {
  margin-top: 14px;
  margin-bottom: 12px;
}
.cue-card .progress {
  margin-top: 14px;
  margin-bottom: 12px;
}

/* Stations deck – compact layout */
/* Deck metric badges: LABEL on top (fixed row), DATA below (fixed row); aligned across badge types */
.station-main .deck-grid .deck-metrics {
  padding: 4px 0;
  gap: 8px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}
.station-main .deck-grid .deck-metrics--right,
.station-main .deck-grid .deck-metrics--inline {
  flex: 0 0 auto;
  min-width: 392px;
  max-width: 100%;
  justify-content: flex-end;
}
.station-main .deck-grid .deck-metrics .metric-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  width: 56px;
  min-width: 56px;
  height: 40px;
  min-height: 40px;
  padding: 3px 3px;
  gap: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  background: transparent;
  border: none;
}
.station-main .deck-grid .deck-metrics .deck-harmonic-transition .harmonic-transition-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.station-main .deck-grid .deck-metrics .deck-harmonic-transition .harmonic-transition-icon {
  width: 12px;
  height: 12px;
}
.station-main .deck-grid .deck-metrics .metric-badge .metric-label {
  display: block;
  flex: 0 0 12px;
  height: 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8ca0b9;
  line-height: 12px;
  order: 1;
}
.station-main .deck-grid .deck-metrics .metric-badge .metric-value {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  min-height: 22px;
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
  order: 2;
}
/* Joined key + harmonic chip on deck metrics (must follow .metric-badge .metric-value) */
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: auto;
  min-height: 0;
  padding: 0;
  position: static;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group .deck-key-harmonic-chip {
  margin-top: 2px;
  order: 2;
  flex: 0 0 18px;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group .deck-key-harmonic-chip__key {
  flex: 0 0 24px;
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  padding: 2px 1px;
  font-size: 10px;
  line-height: 1;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group .deck-key-harmonic-chip__mix {
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  max-width: 16px;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group .deck-harmonic-transition .harmonic-transition-icon {
  width: 12px;
  height: 12px;
}
.station-main .deck-grid .deck-metrics .metric-label {
  font-size: 11px;
}
.station-main .deck-grid .deck-metrics .metric-value {
  font-size: 14px;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-last,
.station-main .deck-grid .deck-metrics .metric-badge.metric-live {
  width: 72px;
  min-width: 72px;
}
.deck-metric-last-wrap {
  display: inline-flex;
  align-items: stretch;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 0;
}
.deck-track-menu-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.deck-track-menu-anchor--metric {
  align-self: stretch;
}
.deck-track-menu-anchor--metric .deck-track-menu-btn {
  width: 28px;
  height: 40px;
  margin: 0;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
}
.deck-track-menu-anchor--metric .deck-track-menu {
  top: calc(100% + 6px);
  right: 0;
  bottom: auto;
}
/* Progression: flag when Set Programming shift applied to this pick */
.station-main .deck-grid .deck-metrics .deck-progression-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  margin: 0 8px 0 0;
  line-height: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.station-main .deck-grid .deck-metrics .deck-progression-chip.has-tooltip {
  position: relative;
  cursor: help;
}
.station-main .deck-grid .deck-metrics .deck-progression-chip.has-tooltip::after,
.station-main .deck-grid .deck-metrics .deck-progression-chip.has-tooltip::before {
  z-index: 40;
}
.station-main .deck-grid .deck-metrics .deck-progression-chip.has-tooltip:hover {
  z-index: 41;
}
.station-main .deck-grid .deck-metrics .deck-progression-chip[hidden] {
  display: none !important;
}
.station-main .deck-grid .deck-metrics .deck-progression-chip .deck-progression-icon {
  width: 22px;
  height: 22px;
  vertical-align: top;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-sonic[hidden] {
  display: none !important;
}

@keyframes deck-bpm-tempo-live-pulse-dark {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.45), 0 0 0 0 rgba(250, 204, 21, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(253, 224, 71, 0.85), 0 0 12px 3px rgba(250, 204, 21, 0.42);
  }
}

@keyframes deck-bpm-tempo-live-pulse-light {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(202, 138, 4, 0.55), 0 0 0 0 rgba(202, 138, 4, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.75), 0 0 10px 2px rgba(250, 204, 21, 0.38);
  }
}

/* Live tempo stretch: yellow chip on the number; arrow outside chip (badge width fixed — no flex shift) */
.station-main .deck-grid .deck-metrics .metric-badge.metric-bpm.metric-bpm--tempo-live {
  overflow: visible;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-bpm.metric-bpm--tempo-live > .metric-value {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  overflow: visible;
  animation: none;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-bpm.metric-bpm--tempo-live .metric-bpm-live-cell {
  position: relative;
  display: inline-block;
  overflow: visible;
  vertical-align: bottom;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-bpm.metric-bpm--tempo-live .metric-bpm-live-num {
  display: inline-block;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(234, 179, 8, 0.22);
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.45);
  color: #facc15;
  animation: deck-bpm-tempo-live-pulse-dark 1.35s ease-in-out infinite;
}
.station-main .deck-grid .deck-metrics .metric-badge.metric-bpm.metric-bpm--tempo-live .metric-bpm-live-cell > .metric-bpm-dir {
  position: absolute;
  left: 100%;
  margin-left: 3px;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #facc15;
  pointer-events: none;
  text-shadow: 0 0 6px rgba(250, 204, 21, 0.65);
}
/* KEY badge: joined key + harmonic chip colours */
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-1  .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-1,
.deck-key-harmonic-chip.key-1  { box-shadow: inset 0 0 0 1px #e74c3c; }
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-2  .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-2,
.deck-key-harmonic-chip.key-2  { box-shadow: inset 0 0 0 1px #e67e22; }
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-3  .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-3,
.deck-key-harmonic-chip.key-3  { box-shadow: inset 0 0 0 1px #f1c40f; }
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-4  .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-4,
.deck-key-harmonic-chip.key-4  { box-shadow: inset 0 0 0 1px #2ecc71; }
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-5  .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-5,
.deck-key-harmonic-chip.key-5  { box-shadow: inset 0 0 0 1px #27ae60; }
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-6  .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-6,
.deck-key-harmonic-chip.key-6  { box-shadow: inset 0 0 0 1px #1abc9c; }
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-7  .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-7,
.deck-key-harmonic-chip.key-7  { box-shadow: inset 0 0 0 1px #3498db; }
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-8  .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-8,
.deck-key-harmonic-chip.key-8  { box-shadow: inset 0 0 0 1px #2980b9; }
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-9  .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-9,
.deck-key-harmonic-chip.key-9  { box-shadow: inset 0 0 0 1px #9b59b6; }
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-10 .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-10,
.deck-key-harmonic-chip.key-10 { box-shadow: inset 0 0 0 1px #8e44ad; }
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-11 .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-11,
.deck-key-harmonic-chip.key-11 { box-shadow: inset 0 0 0 1px #e91e63; }
.station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group.key-12 .deck-key-harmonic-chip,
.th-key-transition-group .deck-key-harmonic-chip.key-12,
.deck-key-harmonic-chip.key-12 { box-shadow: inset 0 0 0 1px #f06292; }
.station-main .deck-grid .deck-metrics .metric-key.key-1  .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-1  .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-1 .deck-key-harmonic-chip__key { background-color: #e74c3c; color: #fff !important; }
.station-main .deck-grid .deck-metrics .metric-key.key-2  .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-2  .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-2 .deck-key-harmonic-chip__key { background-color: #e67e22; color: #fff !important; }
.station-main .deck-grid .deck-metrics .metric-key.key-3  .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-3  .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-3 .deck-key-harmonic-chip__key { background-color: #f1c40f; color: #fff !important; }
.station-main .deck-grid .deck-metrics .metric-key.key-4  .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-4  .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-4 .deck-key-harmonic-chip__key { background-color: #2ecc71; color: #fff !important; }
.station-main .deck-grid .deck-metrics .metric-key.key-5  .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-5  .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-5 .deck-key-harmonic-chip__key { background-color: #27ae60; color: #fff !important; }
.station-main .deck-grid .deck-metrics .metric-key.key-6  .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-6  .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-6 .deck-key-harmonic-chip__key { background-color: #1abc9c; color: #fff !important; }
.station-main .deck-grid .deck-metrics .metric-key.key-7  .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-7  .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-7 .deck-key-harmonic-chip__key { background-color: #3498db; color: #fff !important; }
.station-main .deck-grid .deck-metrics .metric-key.key-8  .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-8  .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-8 .deck-key-harmonic-chip__key { background-color: #2980b9; color: #fff !important; }
.station-main .deck-grid .deck-metrics .metric-key.key-9  .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-9  .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-9 .deck-key-harmonic-chip__key { background-color: #9b59b6; color: #fff !important; }
.station-main .deck-grid .deck-metrics .metric-key.key-10 .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-10 .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-10 .deck-key-harmonic-chip__key { background-color: #8e44ad; color: #fff !important; }
.station-main .deck-grid .deck-metrics .metric-key.key-11 .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-11 .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-11 .deck-key-harmonic-chip__key { background-color: #e91e63; color: #fff !important; }
.station-main .deck-grid .deck-metrics .metric-key.key-12 .deck-key-harmonic-chip__key,
.th-key-transition-group .deck-key-harmonic-chip.key-12 .deck-key-harmonic-chip__key,
.deck-key-harmonic-chip.key-12 .deck-key-harmonic-chip__key { background-color: #f06292; color: #fff !important; }

/* DECK REWRITE: deck-section (Up next / History) inherits from deck-section base */
.station-main .deck-grid .deck-section--upnext,
.station-main .deck-grid .deck-section--engine,
.station-main .deck-grid .deck-section--history {
  min-width: 0;
  overflow: visible;
}
.station-main .deck-grid .deck-section--engine {
  --deck-engine-content-inset: 0;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(90, 142, 210, 0.22);
}
.station-main .deck-grid .deck-section--engine:has(.deck-sets-flow-mini) {
  padding-bottom: 16px;
}
.deck-engine-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.station-main .deck-grid .deck-section--engine .deck-engine-header-row {
  display: block;
  margin-bottom: 2px;
}
.station-main .deck-grid .deck-section--engine .deck-engine-header-row .deck-slot-label {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}
.station-main .deck-grid .deck-section--engine .deck-queue-slot--engine .deck-queue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 0;
}
.station-main .deck-grid .deck-section--engine .deck-queue-slot--engine {
  padding: 6px 0 0;
  min-width: 0;
}
.station-main .deck-grid .deck-section--engine .deck-queue-slot--engine .deck-track-row {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: 100%;
  min-width: 0;
}
.station-main .deck-grid .deck-section--engine .deck-queue-slot--engine .deck-metrics {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}
.station-main .deck-grid .deck-section--engine .deck-engine-inline-slot-label {
  flex-shrink: 0;
}
.station-main .deck-grid .deck-section--engine .deck-track--muted {
  color: #8ca0b9;
  font-style: italic;
}
.station-main .deck-grid .deck-engine-scheduler-chip {
  margin: 6px 0 4px;
  width: fit-content;
  max-width: 100%;
}
.station-main .deck-grid .deck-engine-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.station-main .deck-grid .deck-engine-targets-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  min-width: 0;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.station-main .deck-grid .deck-section--engine .deck-slot-label,
.station-main .deck-grid .deck-section--engine .deck-engine-inline-slot-label,
.station-main .deck-grid .deck-section--engine .deck-engine-label,
.station-main .deck-grid .deck-section--engine .deck-engine-target__label,
.station-main .deck-grid .deck-section--engine .deck-engine-footnote__label,
.station-main .deck-grid .deck-section--engine .deck-engine-scheduler-chip .deck-live-mode-chip-label,
.station-main .deck-grid .deck-section--engine .deck-metrics .metric-badge .metric-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8ca0b9;
  line-height: 1.2;
}
.station-main .deck-grid .deck-section--engine .deck-metrics .metric-badge .metric-label {
  flex: 0 0 auto;
  height: auto;
}
.station-main .deck-grid .deck-engine-target {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: 0;
}
.station-main .deck-grid .deck-engine-target--harmonic .harmonic-transition-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
}
.station-main .deck-grid .deck-engine-target--harmonic .harmonic-transition-icon {
  width: 14px;
  height: 14px;
}
.station-main .deck-grid .deck-engine-target--key-harmonic .th-key-transition-group {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.station-main .deck-grid .deck-section--engine .deck-engine-target__value {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.2;
}
.station-main .deck-grid .deck-section--engine .deck-engine-target__tolerance {
  font-size: 14px;
  font-weight: 600;
  color: #8ca0b9;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.2;
}
.station-main .deck-grid .deck-engine-targets-sep {
  flex-shrink: 0;
  color: #5a6f86;
  font-weight: 600;
}
.station-main .deck-grid .deck-engine-progress-wrap {
  padding: 2px 0 4px var(--deck-engine-content-inset, 64px);
}
.station-main .deck-grid .deck-engine-progress-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}
.station-main .deck-grid .deck-engine-progress-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: rgba(56, 189, 248, 0.85);
  transition: width 0.35s ease;
}
/* Deck Sets mode: readonly mini flow graph */
.deck-engine-sets-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.deck-sets-flow-mini-host {
  min-width: 0;
}
.deck-engine-sets-genre {
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding-top: 2px;
  overflow: hidden;
}
.station-main .deck-grid .deck-section--engine .deck-engine-sets-genre .deck-engine-footnote__label {
  flex: 0 0 auto;
}
.station-main .deck-grid .deck-section--engine .deck-engine-sets-genre .deck-engine-footnote__value {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 400;
  color: #8ca0b9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.theme-light .station-main .deck-grid .deck-section--engine .deck-engine-sets-genre .deck-engine-footnote__value {
  color: #5c6b7d;
}
.deck-sets-flow-mini {
  --flow-chart-pad-x: 12px;
  min-width: 0;
}
.deck-sets-flow-mini__surface {
  position: relative;
  padding: 6px 8px 8px;
  overflow: visible;
  border-radius: var(--sfc-inner-radius, 8px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 3px rgba(0, 0, 0, 0.22);
  background: rgba(12, 17, 28, 0.28);
}
body.theme-light .deck-sets-flow-mini__surface {
  border-color: rgba(15, 23, 42, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 1px 2px rgba(15, 23, 42, 0.07);
  background: rgba(248, 250, 252, 0.72);
}
.deck-sets-flow-mini__surface.progression-graph-wrapper {
  overflow: visible;
}
.deck-sets-flow-mini__lanes {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.deck-sets-flow-mini__lane {
  min-width: 0;
}
.deck-sets-flow-mini__plot {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: visible;
}
.deck-sets-flow-mini__plot.sets-flow-chart__lane-plot--card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}
.deck-sets-flow-mini__plot .deck-sets-flow-mini__canvas {
  display: block;
  width: 100%;
  vertical-align: top;
}
.deck-sets-flow-mini__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.deck-sets-flow-mini .sets-flow-harmonic-transition.sets-flow-harmonic-transition--readonly,
.deck-sets-flow-mini .sets-flow-mood-transition.sets-flow-mood-transition--readonly,
.deck-sets-flow-mini .sets-flow-similar-transition.sets-flow-similar-transition--readonly {
  pointer-events: none;
  cursor: default;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  transform: translate(-50%, -50%);
}
.deck-sets-flow-mini .sets-flow-harmonic-transition--readonly.sets-flow-harmonic-transition--empty,
.deck-sets-flow-mini .sets-flow-mood-transition--readonly.sets-flow-mood-transition--empty,
.deck-sets-flow-mini .sets-flow-similar-transition--readonly.sets-flow-similar-transition--empty {
  border: none;
  border-style: none;
  opacity: 0.72;
}
.deck-sets-flow-mini .sets-flow-similar-transition--readonly.sets-flow-similar-transition--similar,
.deck-sets-flow-mini .sets-flow-similar-transition--readonly.sets-flow-similar-transition--different {
  border: none;
  background: transparent;
  box-shadow: none;
}
body.theme-light .deck-sets-flow-mini .sets-flow-harmonic-transition--readonly,
body.theme-light .deck-sets-flow-mini .sets-flow-mood-transition--readonly,
body.theme-light .deck-sets-flow-mini .sets-flow-similar-transition--readonly {
  background: transparent;
  border: none;
  box-shadow: none;
}
.deck-sets-flow-mini .sets-flow-mood-transition__label {
  font-size: 1rem;
  line-height: 1;
}
.deck-sets-flow-mini .sets-flow-genre-block--readonly {
  pointer-events: none;
  cursor: default;
}
.deck-sets-flow-mini__playhead {
  position: absolute;
  top: 6px;
  bottom: 8px;
  width: 2px;
  margin-left: -1px;
  background: rgba(248, 113, 113, 0.55);
  box-shadow: none;
  pointer-events: none;
  z-index: 4;
}
body.theme-light .deck-sets-flow-mini__playhead {
  background: rgba(220, 38, 38, 0.5);
  box-shadow: none;
}
.station-main .deck-grid .deck-engine-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0 0 var(--deck-engine-content-inset, 0);
  line-height: 1.2;
}
.station-main .deck-grid .deck-section--engine .deck-engine-footnote--profile-end {
  --deck-live-mode-chip-height: 30px;
  align-items: center;
  gap: 8px 10px;
}
.station-main .deck-grid .deck-section--engine .deck-engine-profile-end-chip {
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
}
.station-main .deck-grid .deck-section--engine .deck-engine-profile-end-chip .deck-live-mode-chip-value {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: #e8f0fa;
  max-width: min(32vw, 240px);
}
body.theme-light .station-main .deck-grid .deck-section--engine .deck-engine-profile-end-chip .deck-live-mode-chip-value {
  color: #0a0a0a;
}
.station-main .deck-grid .deck-section--engine .deck-engine-footnote__value {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.2;
}
.station-main .deck-grid .deck-section--engine .deck-engine-scheduler-chip .deck-live-mode-chip-time {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: normal;
  line-height: 1.2;
}
.station-main .deck-grid .deck-engine-empty {
  margin: 4px 0 0;
  padding-left: var(--deck-engine-content-inset, 64px);
  font-size: 12px;
}
body:not(.deck-home-show-artist-images) .station-main .deck-grid .deck-section--engine .deck-queue-slot--engine .deck-queue-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto;
  row-gap: 0;
}
body:not(.deck-home-show-artist-images) .station-main .deck-grid .deck-section--engine .deck-queue-slot--engine .deck-track-row {
  grid-column: 1;
  grid-row: 1;
}
body:not(.deck-home-show-artist-images) .station-main .deck-grid .deck-section--engine .deck-queue-slot--engine .deck-metrics {
  grid-column: 2;
  grid-row: 1;
}
body.theme-light .station-main .deck-grid .deck-section--engine {
  border-top-color: rgba(100, 116, 139, 0.25);
}
body.theme-light .station-main .deck-grid .deck-section--engine .deck-slot-label,
body.theme-light .station-main .deck-grid .deck-section--engine .deck-engine-inline-slot-label,
body.theme-light .station-main .deck-grid .deck-section--engine .deck-engine-label,
body.theme-light .station-main .deck-grid .deck-section--engine .deck-engine-target__label,
body.theme-light .station-main .deck-grid .deck-section--engine .deck-engine-target__tolerance,
body.theme-light .station-main .deck-grid .deck-section--engine .deck-engine-footnote__label,
body.theme-light .station-main .deck-grid .deck-section--engine .deck-engine-scheduler-chip .deck-live-mode-chip-label,
body.theme-light .station-main .deck-grid .deck-section--engine .deck-metrics .metric-badge .metric-label {
  color: #737373;
}
body.theme-light .station-main .deck-grid .deck-section--engine .deck-engine-target__value,
body.theme-light .station-main .deck-grid .deck-section--engine .deck-engine-footnote__value,
body.theme-light .station-main .deck-grid .deck-section--engine .deck-engine-scheduler-chip .deck-live-mode-chip-time {
  color: #0a0a0a;
}
body.theme-light .station-main .deck-grid .deck-engine-targets-sep {
  color: #a3a3a3;
}
body.theme-light .station-main .deck-grid .deck-section--engine .deck-track--muted {
  color: #64748b;
}
.station-main .deck-grid .deck-section--upnext {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 10px;
}
.deck-queue-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.deck-queue-slot {
  min-width: 0;
  padding: 10px 0;
}
.deck-queue-slot:first-child {
  padding-top: 8px;
}
.deck-queue-slot + .deck-queue-slot {
  border-top: 1px solid rgba(90, 142, 210, 0.22);
  margin-top: 0;
  padding-top: 10px;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-queue-row {
  grid-template-rows: 18px 44px;
  row-gap: 4px;
  min-height: 66px;
  height: 66px;
  max-height: 66px;
  box-sizing: border-box;
  margin-top: 0;
  overflow: visible;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-track-row {
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-track-info {
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-metrics {
  min-height: 40px;
  height: 40px;
  max-height: 40px;
  box-sizing: border-box;
  overflow: visible;
  position: relative;
  z-index: 2;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-metrics.deck-metrics--layout-reserved {
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  flex: 0 0 392px;
  min-width: 392px;
  max-width: 392px;
  min-height: 40px;
  height: 40px;
  max-height: 40px;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-metrics.deck-metrics--time-only {
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-metrics.deck-metrics--time-only .metric-badge:not(.metric-last) {
  display: none !important;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-metrics.deck-metrics--time-only .deck-track-menu-anchor {
  display: inline-flex !important;
  pointer-events: auto;
}
.deck-queue-slot[hidden] {
  display: none !important;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot--empty .deck-metrics {
  display: none !important;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot--empty .deck-artist-thumb {
  display: none !important;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot--empty .deck-track-badges {
  display: none !important;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot--empty .deck-track-menu-anchor {
  display: none !important;
}
.station-main .deck-grid .deck-section--upnext .deck-title--sub {
  width: 84px;
  min-width: 84px;
  font-size: 10px;
}
.deck-waiting-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-top: 1px solid rgba(90, 142, 210, 0.22);
  margin-top: 0;
}
.deck-waiting-stack[hidden] {
  display: none !important;
}
.deck-waiting-stack .deck-queue-slot--waiting + .deck-queue-slot--waiting {
  border-top: 1px solid rgba(90, 142, 210, 0.22);
}
.deck-waiting-stack .deck-slot-label--playlist-index {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
/* Profile-switch row: one grid line — ON END (col 1) + badges (col 2, same as track titles) */
.station-main .deck-grid .deck-section--upnext .deck-queue-slot--profile-switch .deck-queue-row--profile-switch {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: 44px;
  column-gap: 12px;
  row-gap: 0;
  align-items: center;
  min-height: 44px;
  height: auto;
  max-height: none;
  box-sizing: border-box;
  margin-top: 0;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot--profile-switch .deck-slot-label--profile-end {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: center;
  white-space: nowrap;
}
.station-main .deck-grid .deck-section--upnext .deck-queue-slot--profile-switch .deck-waiting-profile-switch-chips {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  align-self: center;
  --deck-live-mode-chip-height: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  width: auto;
  max-width: 100%;
  flex: none;
}
body:not(.deck-home-show-artist-images) .station-main .deck-grid .deck-section--upnext .deck-queue-slot--profile-switch .deck-queue-row--profile-switch {
  grid-template-columns: auto minmax(0, 1fr);
}
.deck-waiting-profile-switch-chips .deck-live-mode-chip {
  height: var(--deck-live-mode-chip-height, 30px);
  min-height: var(--deck-live-mode-chip-height, 30px);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.deck-waiting-profile-switch-chips .deck-live-mode-chip-value {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.deck-waiting-profile-switch-chips .deck-live-mode-chip-menu-icon {
  width: 18px;
  height: 18px;
}
.deck-track-menu-anchor--spacer {
  width: 28px;
  min-width: 28px;
  height: 28px;
  flex-shrink: 0;
  visibility: hidden;
  pointer-events: none;
}
.deck-seed-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
  padding-top: 10px;
  border-top: none;
  box-sizing: border-box;
}
.deck-seed-status-bar .status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #dfe9f5;
  min-width: 0;
  max-width: 100%;
  padding: 6px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 35, 56, 0.72), rgba(13, 24, 39, 0.62));
  overflow: hidden;
  box-sizing: border-box;
  flex-wrap: nowrap;
}
.deck-seed-status-bar .status-item--compact-wide {
  flex: 1 1 200px;
  max-width: 260px;
}
.deck-seed-status-bar .status-item[data-system="idents"] {
  flex: 0 0 168px;
  max-width: 168px;
}
body.theme-light .deck-seed-status-bar {
  border-top-color: hsl(0 0% 85%);
}
body.theme-light .deck-seed-status-bar .status-item {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.9));
}
.station-main .deck-grid .deck-section--history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.station-main .deck-grid .deck-section--history .deck-history-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 0;
  padding-top: 6px;
  min-height: 26px;
  line-height: 1.2;
  width: 100%;
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}
.deck-history-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
  flex-shrink: 0;
}
.station-main .deck-grid .deck-section--history .deck-history-header-row .deck-slot-label {
  margin: 0;
  padding: 0;
  text-align: left;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deck-history-badge-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-width: 20px;
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #8ca0b9;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}
.deck-history-badge-toggle-btn__icon {
  display: block;
  line-height: 1;
  transform: translateY(-0.04em);
  transition: transform var(--gravy-motion-spatial) var(--gravy-ease-emphasis);
}
.deck-history-badge-toggle-btn--active .deck-history-badge-toggle-btn__icon {
  transform: translateY(-0.04em) rotate(45deg);
}
.deck-history-badge-toggle-btn:hover,
.deck-history-badge-toggle-btn:focus-visible {
  color: #c5d8eb;
  background: rgba(90, 142, 210, 0.15);
  outline: none;
}
body.theme-light .deck-history-badge-toggle-btn {
  color: #737373;
}
body.theme-light .deck-history-badge-toggle-btn:hover,
body.theme-light .deck-history-badge-toggle-btn:focus-visible {
  color: #404040;
  background: rgba(0, 0, 0, 0.06);
}
#deckHistory.deck-history--graph {
  /* header (~26px) + gap (8px) + graph (200px) */
  min-height: 234px;
}
.station-main .deck-grid .deck-section--history .deck-history-canvas-wrap {
  min-width: 0;
  height: 200px;
  max-height: 200px;
  min-height: 200px;
  flex: 0 0 200px;
  background: transparent;
  border-radius: 0;
  display: block;
  overflow: hidden;
  box-sizing: border-box;
}
.station-main .deck-grid .deck-section--history .deck-history-table-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
.station-main .deck-grid .deck-section--history .deck-history-table-list {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}
#deckHistory.deck-history--table .deck-history-canvas-wrap {
  display: none !important;
}
#deckHistory.deck-history--table .deck-history-badge-toggle-btn {
  display: none !important;
}
.deck-history-badge-toggle-btn[hidden] {
  display: none !important;
}
#deckHistory.deck-history--graph .deck-history-table-wrap {
  display: none !important;
}
#deckHistory.deck-history--table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#deckHistory.deck-history--table .deck-history-table-wrap {
  flex: 0 0 auto;
  /* header ~32px + 10 data rows ~34px each */
  height: 372px;
  min-height: 372px;
  max-height: 372px;
  overflow: hidden;
}
#deckHistory.deck-history--table .deck-history-table-list {
  overflow: hidden;
  flex: 1 1 0;
  min-height: 0;
}
#deckHistory .track-history-header-row .th-hplay,
#deckHistory .track-history-row .th-play {
  display: none;
}
#deckHistory .track-history-header-row,
#deckHistory .track-history-row {
  gap: 8px;
  padding-left: 8px;
  padding-right: 8px;
  width: 100%;
  box-sizing: border-box;
}
#deckHistory .deck-history-table-rows {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#deckHistory .th-artist,
#deckHistory .th-hartist {
  flex: 0 1 36%;
  min-width: 72px;
  max-width: 190px;
}
#deckHistory .th-title,
#deckHistory .th-htitle {
  flex: 1 1 0;
  min-width: 0;
}
#deckHistory .track-history-row--ident .th-artist {
  flex: 1 1 0;
  max-width: none;
}
#deckHistory .th-time,
#deckHistory .th-htime {
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
}
#deckHistory .th-hthumb,
#deckHistory .th-thumb {
  flex: 0 0 24px;
  width: 24px;
  min-width: 24px;
}
#deckHistory .track-history-artist-thumb {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}
#deckHistory .th-hprog-bpm,
#deckHistory .th-prog-bpm {
  flex: 0 0 64px;
  width: 64px;
  min-width: 64px;
  gap: 4px;
}
#deckHistory .th-bpm,
#deckHistory .th-hbpm {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  text-align: right;
}
#deckHistory .th-progression,
#deckHistory .th-hprogression {
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  text-align: center;
}
#deckHistory .th-key-transition-group {
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  gap: 0;
}
#deckHistory .th-profile,
#deckHistory .th-hprofile {
  flex: 0 0 130px;
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  text-align: right;
  margin-left: auto;
}
#deckHistory .th-selection,
#deckHistory .th-hselection {
  flex: 0 0 88px;
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  text-align: right;
}
#deckHistory .th-actions,
#deckHistory .th-hactions {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  margin-left: 0;
  justify-content: flex-end;
}
.station-main .deck-grid .deck-section--history .deck-history-graph-stage {
  position: relative;
  min-width: 0;
  width: 100%;
  height: 200px;
}
.station-main .deck-grid .deck-section--history .deck-history-graph-stage .analytics-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  box-sizing: border-box;
  background: transparent;
  border-radius: 0;
}
.deck-history-artist-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}
.deck-history-artist-overlay[aria-hidden="true"] {
  display: none;
}
.deck-history-artist-overlay--animating .deck-history-artist-pin {
  transition:
    left var(--gravy-motion-spatial) var(--gravy-ease-emphasis),
    top var(--gravy-motion-spatial) var(--gravy-ease-emphasis),
    opacity var(--gravy-motion-content) var(--gravy-ease-out),
    transform var(--gravy-motion-spatial) var(--gravy-ease-emphasis);
}
.deck-history-artist-pin--enter {
  opacity: 0;
  transform: translateX(var(--gravy-motion-graph-slide));
}
.deck-history-artist-pin--retire {
  opacity: 0;
  pointer-events: none;
}
.deck-history-artist-pin {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
.deck-history-artist-pin[hidden] {
  display: none !important;
}
.deck-history-artist-pin__body {
  position: relative;
  width: 44px;
  overflow: hidden;
  filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.28));
}
.deck-history-artist-pin__body[data-has-badge="true"] {
  overflow: visible;
}
.deck-history-artist-pin__body[data-has-badge="true"] > .deck-history-artist-pin__svg--fill,
.deck-history-artist-pin__body[data-has-badge="true"] > .deck-history-artist-pin__svg--stroke {
  height: 38px;
}
.deck-history-artist-pin__pocket {
  position: absolute;
  left: 0;
  top: 36px;
  width: 44px;
  height: 21px;
  z-index: 0;
  overflow: visible;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.24));
  transform: translateY(0);
  transition:
    filter var(--gravy-motion-fast) var(--gravy-ease-out),
    transform var(--gravy-motion-spatial) var(--gravy-ease-emphasis);
}
.deck-history-artist-overlay--badges-hiding .deck-history-artist-pin__pocket {
  filter: none;
  transform: translateY(0);
  transition: filter var(--gravy-motion-fast) var(--gravy-ease-out);
}
.deck-history-artist-overlay--badges-hidden .deck-history-artist-pin__pocket {
  transform: translateY(-22px);
  filter: none;
  transition: transform var(--gravy-motion-spatial) var(--gravy-ease-emphasis);
}
.deck-history-artist-overlay:not(.deck-history-artist-overlay--badges-hidden):not(.deck-history-artist-overlay--badges-hiding) .deck-history-artist-pin__pocket {
  transform: translateY(0);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.24));
  transition:
    transform var(--gravy-motion-spatial) var(--gravy-ease-emphasis),
    filter var(--gravy-motion-standard) var(--gravy-ease-out) var(--gravy-motion-standard);
}
.deck-history-artist-pin__pocket .deck-history-artist-pin__svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 21px;
}
.deck-history-artist-pin__svg {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 44px;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.deck-history-artist-pin__svg--fill {
  z-index: 0;
}
.deck-history-artist-pin__svg--stroke {
  z-index: 2;
}
.deck-history-artist-pin__fill {
  fill: rgba(14, 28, 46, 0.96);
  stroke: none;
}
.deck-history-artist-pin__outline {
  fill: none;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.deck-history-artist-pin__head {
  position: absolute;
  left: 4px;
  top: 1px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 1;
}
.deck-history-artist-pin__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}
.deck-history-artist-pin__photo--ident {
  object-fit: contain;
  background: transparent;
  padding: 4px;
  box-sizing: border-box;
  filter: brightness(0) invert(1);
}
.deck-history-artist-pin__photo--placeholder {
  object-fit: contain;
  padding: 5px;
  opacity: 0.55;
  background: #1a2838;
  box-sizing: border-box;
}
body.theme-light .deck-history-artist-pin__photo--placeholder {
  background: #e8ecef;
}
.deck-history-artist-pin__badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  line-height: 0;
}
.deck-history-artist-pin__badge .harmonic-transition-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
}
.deck-history-artist-pin__badge .harmonic-transition-icon {
  width: 12px;
  height: 12px;
  display: block;
}
body.theme-light .deck-history-artist-pin__fill {
  fill: rgba(248, 250, 252, 0.98);
}
body.theme-light .deck-history-artist-pin__outline {
  stroke: rgba(15, 23, 42, 0.4);
}
body.theme-light .deck-history-artist-pin__body:not([data-harmonic-key]) .deck-history-artist-pin__outline {
  stroke: rgba(15, 23, 42, 0.4);
}
body.theme-light .deck-history-artist-pin--ident .deck-history-artist-pin__outline {
  stroke: rgba(15, 23, 42, 0.5);
}
.deck-history-artist-pin--ident .deck-history-artist-pin__outline {
  stroke: rgba(255, 255, 255, 0.45);
}
.deck-history-artist-pin--highlight-red .deck-history-artist-pin__outline {
  stroke: rgba(248, 113, 113, 0.88);
}
body.theme-light .deck-history-artist-pin--highlight-red .deck-history-artist-pin__outline {
  stroke: rgba(220, 38, 38, 0.78);
}
body.theme-light .deck-history-artist-pin__photo--ident {
  filter: brightness(0);
}
.station-main .deck-grid .deck-track-info {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #f2fbff;
  line-height: 1.3;
  min-width: 0;
  overflow: visible;
  max-width: 100%;
  position: relative;
}
.station-main .deck-grid .deck-track-info .deck-track-label-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 0 1 auto;
  position: relative;
}
.station-main .deck-grid .deck-track-info .deck-track-title-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.station-main .deck-grid .deck-section--live .deck-section-row {
  align-items: center;
  justify-content: flex-start;
}
.station-main .deck-grid .deck-section--live .deck-track-info {
  align-items: baseline;
  justify-content: flex-start;
}
.deck-artist-thumb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 5px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  display: block;
}
.deck-artist-thumb[hidden] {
  display: none !important;
}
.deck-artist-thumb--ident {
  object-fit: contain;
  background: transparent;
  padding: 5px;
  box-sizing: border-box;
  filter: brightness(0) invert(1);
}
body.theme-light .deck-artist-thumb--ident {
  filter: brightness(0);
}
.deck-artist-thumb--placeholder {
  object-fit: contain;
  background: #1a2838;
}
body.theme-light .deck-artist-thumb--placeholder {
  background: #e8ecef;
}
.station-main .deck-grid .deck-track-info .deck-track-badges {
  position: absolute;
  top: 100%;
  left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 2px;
}
.station-main .deck-grid .deck-track-info .deck-track-badges:empty {
  display: none;
}
.deck-track-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  background: #fef9c3;
  color: #0a0a0a;
  border: 1px solid rgba(180, 170, 0, 0.4);
}
.deck-track-badge--tempo,
.deck-track-badge--beatmix {
  background: #fef9c3;
  color: #0a0a0a;
  border-color: rgba(180, 170, 0, 0.4);
}
.station-main .deck-grid .deck-track-info .deck-artist {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.station-main .deck-grid .deck-track-info .deck-track {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deck-track-edit-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.deck-track-edit-btn:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
}
.deck-track-menu-btn {
  font-size: 20px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1;
  letter-spacing: -1px;
  text-shadow: 0 0 0.01px rgba(255, 255, 255, 0.9);
}
.deck-track-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1500;
  min-width: 168px;
  padding: 6px;
  border-radius: 10px;
  background-color: #0f1728;
  background-image: linear-gradient(180deg, #121f35 0%, #0c1422 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.35);
  isolation: isolate;
}
/* Portaled to document.body while open — above all deck cards. */
.deck-track-menu.deck-track-menu--floating {
  position: fixed;
  z-index: 10050;
  background-color: #0f1728;
  background-image: linear-gradient(180deg, #121f35 0%, #0c1422 100%);
}
.station-main .deck-grid .deck-section--upnext .deck-track-menu {
  z-index: 2500;
}
.deck-track-menu--up {
  top: auto;
  bottom: calc(100% + 6px);
}
.deck-track-menu[hidden] {
  display: none;
}
.deck-track-menu-item {
  width: 100%;
  display: block;
  border: 0;
  border-radius: 8px;
  background-color: #0f1728;
  color: #e8eefb;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  cursor: pointer;
}
.deck-track-menu-item:hover,
.deck-track-menu-item:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
}
.deck-track-menu-item--danger {
  color: #fca5a5;
}
.deck-track-menu-item[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.deck-track-edit-btn[hidden] {
  display: none;
}
body.theme-light .deck-track-edit-btn {
  color: rgba(0, 0, 0, 0.45);
}
body.theme-light .deck-track-menu-btn {
  color: rgba(17, 24, 39, 0.78);
  text-shadow: none;
}
body.theme-light .deck-track-edit-btn:hover {
  color: rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.08);
}
body.theme-light .deck-track-menu {
  background-color: #ffffff;
  background-image: none;
  border-color: rgba(17, 24, 39, 0.16);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.08);
}
body.theme-light .deck-track-menu.deck-track-menu--floating {
  background-color: #ffffff;
  background-image: none;
}
body.theme-light .deck-track-menu-item {
  background-color: #ffffff;
  color: #1f2937;
}
body.theme-light .deck-track-menu-item:hover,
body.theme-light .deck-track-menu-item:focus-visible {
  background: rgba(2, 132, 199, 0.12);
}
body.theme-light .deck-track-menu-item--danger {
  color: #b91c1c;
}
body.theme-light .deck-delay-sync-toggle {
  background: rgba(255, 255, 255, 0.96);
  color: #1f2937;
  border-color: rgba(17, 24, 39, 0.2);
}
body.theme-light .deck-delay-sync-toggle[aria-pressed="true"] {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(220, 252, 231, 0.95);
}
body.theme-light .deck-delay-sync-select,
body.theme-light .deck-delay-sync-input {
  background: rgba(255, 255, 255, 0.98);
  color: #111827;
  border-color: rgba(17, 24, 39, 0.18);
}
body.theme-light .deck-delay-sync-unit {
  color: #6b7280;
}
body.theme-light .deck-delay-sync-calibrate-btn,
body.theme-light .deck-delay-sync-hear-btn {
  background: rgba(255, 255, 255, 0.96);
  color: #1f2937;
  border-color: rgba(17, 24, 39, 0.2);
}
body.theme-light .deck-delay-sync-calibrate-btn[aria-pressed="true"] {
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(254, 243, 199, 0.95);
}
body.theme-light .deck-delay-sync-hear-btn {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(220, 252, 231, 0.95);
}
.station-main .deck-grid .deck-ident-badge {
  display: none;
  flex-shrink: 0;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 3px;
  background-color: #1a1a1a;
  color: #fff;
  position: relative;
  top: -2px;
}
.station-main .deck-grid .deck-ident-badge[aria-hidden="false"] {
  display: inline-block;
}
.station-main .deck-grid .deck-track-info--ident .deck-artist {
  color: #ffd700 !important;
}
body.theme-light .station-main .deck-grid .deck-track-info--ident .deck-artist {
  color: #b8860b !important;
}
.deck-status-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.deck-status-bar .status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #dfe9f5;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 6px 14px;
  border: 1px solid rgba(90, 142, 210, 0.24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 35, 56, 0.72), rgba(13, 24, 39, 0.62));
  overflow: hidden;
  box-sizing: border-box;
  flex-wrap: nowrap;
}
.deck-status-bar .status-item--wide {
  flex: 1 1 auto;
  min-width: 0;
}
/* Scheduler + Profile: equal share, stable width when Sync toggles */
.deck-status-bar .status-item--deck-primary {
  flex: 1 1 0;
  min-width: 120px;
  max-width: 220px;
}
/* Ident only (no --compact-wide): fixed width */
.deck-status-bar .status-item--compact:not(.status-item--compact-wide) {
  flex: 0 0 168px;
  min-width: 168px;
  max-width: 168px;
}
/* Progression uses --compact-wide */
.deck-status-bar .status-item--compact.status-item--compact-wide {
  flex: 0 0 200px;
  max-width: 200px;
  min-width: 200px;
}
@media (min-width: 640px) {
  .deck-status-bar .status-item--deck-primary {
    flex: 1 1 0;
    min-width: 120px;
    max-width: 220px;
  }
  .deck-status-bar .status-item--compact:not(.status-item--compact-wide) {
    flex: 0 0 168px;
    min-width: 168px;
    max-width: 168px;
  }
  .deck-status-bar .status-item--compact.status-item--compact-wide {
    flex: 0 0 200px;
    min-width: 200px;
    max-width: 200px;
  }
  .deck-status-bar .status-item:not(.status-item--compact):not(.status-item--deck-primary):not(.status-item--delay-sync) {
    flex: 0 0 auto;
    min-width: 0;
  }
}
/* Hide status items one by one before they wrap (order: Sync, Profile, Scheduler; Idents stays last) */
@media (max-width: 1500px) {
  .deck-status-bar .status-item[data-system="delay-sync"] { display: none !important; }
}
@media (max-width: 1300px) {
  .deck-status-bar .status-item[data-system="engine"] { display: none !important; }
}
@media (max-width: 1100px) {
  .deck-status-bar .status-item[data-system="scheduler"] { display: none !important; }
}
@media (max-width: 950px) {
  .deck-status-bar .status-item {
    min-width: 0;
    flex: 1 1 auto;
  }
}
.deck-status-bar .status-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 600;
  color: #8ca0b9;
}
.deck-status-bar .status-value {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  position: relative;
  top: -1px;
}
.deck-status-bar .status-meta {
  color: #9fb7d4;
  font-size: 13px;
  position: relative;
  top: 0;
}
.deck-status-bar .status-item > .status-meta:empty {
  display: none;
}
.station-main .deck-grid .deck-artist {
  font-size: 15px;
  color: #b8d4e8;
}
.station-main .deck-grid .deck-track {
  font-size: 12px;
  color: #8ca0b9;
  margin-top: 1px;
}
.station-main .deck-grid .deck-section--upnext .deck-artist,
.station-main .deck-grid .deck-queue-slot .deck-artist {
  color: #7a8fa3;
}
.station-main .deck-grid .deck-section--upnext .deck-track,
.station-main .deck-grid .deck-queue-slot .deck-track {
  color: #6b7a8a;
}

.station-main .deck-grid .playback-card .progress,
.station-main .deck-grid .cue-card .progress {
  margin-bottom: 0;
}
.cue-card .progress .meter > span {
  background-color: #555 !important;
  background-image: none !important;
  box-shadow: inset 0 2px 6px rgba(255,255,255,0.1), inset 0 -2px 4px rgba(0,0,0,0.2) !important;
  transform: scaleX(1) !important;
  opacity: 0.6;
}
/* Waveform image container */
.waveform-container {
  width: 100%;
  height: 80px; /* Fixed height to prevent collapse */
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.waveform-image {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* Waveform fade markers overlay */
.waveform-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none; /* Hidden by default, shown when fade data exists */
}

.waveform-fade-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: rgba(255, 200, 0, 0.8);
  z-index: 10;
}

.waveform-fade-marker.waveform-fade-start {
  background-color: rgba(0, 255, 150, 0.8); /* Green for fade start */
}

.waveform-fade-marker.waveform-fade-end {
  background-color: rgba(255, 100, 100, 0.8); /* Red for fade end */
}

.waveform-fade-region {
  position: absolute;
  top: 0;
  bottom: 0;
  background-color: rgba(255, 200, 0, 0.15); /* Yellow tint for fade region */
  z-index: 5;
}

/* Danceability curve overlay drawn on top of waveform */
.waveform-curve {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4; /* Below fade markers, above image */
}

.playback-card .line,
.playback-card .metrics-row,
.playback-card .extra-row,
.playback-card .progress {
  font-size: 14px;
}
.playback-card .line strong,
.playback-card .metrics-row strong,
.playback-card .extra-row strong,
.playback-card .progress strong {
  font-size: 14px;
  color: #9fa8b3;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.playback-card .line strong::after,
.playback-card .metrics-row strong::after,
.playback-card .extra-row strong::after,
.playback-card .progress strong::after {
  content: '';
}
/* Nudge Controls UI removed - functionality preserved for programmatic use */
/* 
.nudge-card {
  margin-top: 16px;
}
.nudge-card .nudge-body {
  padding: 18px 20px 20px;
}
.nudge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.nudge-control {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nudge-control .form-label {
  font-size: 12px;
  color: #d7d7d7;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.nudge-control .form-hint {
  margin: 0;
}
.nudge-range {
  height: 24px;
}
.nudge-range::-webkit-slider-runnable-track {
  height: 6px;
}
.nudge-range::-moz-range-track {
  height: 6px;
}
.nudge-range::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -4px;
}
.nudge-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
}
.nudge-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.nudge-actions .btn {
  min-width: 140px;
}
*/
.scoring-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.scoring-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
.scoring-grid--compact,
.scoring-inline-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.scoring-field--compact {
  width: 100%;
}
.scoring-bottom-row {
  margin-top: 8px;
}
.scoring-inline-label {
  display: contents;
}
.form-control--tight {
  max-width: 160px;
}
.form-control--wide {
  max-width: 280px;
}
.scoring-checkbox-inline .checkbox-label span {
  font-size: 14px;
}
.scoring-checkbox-inline .checkbox-label {
  margin-right: 0;
}
.scoring-inline-combo {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}
.scoring-inline-combo .shuffle-percent-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 16px;
}
.scoring-inline-combo select {
  min-width: 90px;
}
.scoring-field,
.scoring-inline-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 1em;
  width: 100%;
}
.scoring-toggle-field {
  flex: 1 1 auto;
  min-width: 220px;
  justify-content: space-between;
}
.scoring-select-field {
  flex: 1 1 100%;
}
.scoring-label {
  display: contents;
}
.scoring-field-label,
.scoring-inline-field .form-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  justify-self: flex-start;
  min-width: 240px;
  flex: 0 0 240px;
}
.scoring-field-hint,
.scoring-label .hint-wrapper,
.scoring-inline-field .hint-wrapper {
  justify-self: flex-start;
  flex: 0 0 auto;
}
.scoring-control,
.scoring-inline-control,
.scoring-slider {
  display: flex;
  align-items: center;
  justify-self: flex-start;
  flex: 0 0 auto;
}
.scoring-select {
  flex: 1 1 52%;
}
.scoring-select select {
  width: 100%;
}
.scoring-toggle .switch {
  margin-left: auto;
}
.short-range {
  width: 100%;
  max-width: 200px;
}
.scoring-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 6px 0;
}
.dbtools-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.crates-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.crate-list-section,
.crate-import-section {
  background: rgba(20,20,20,0.8);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.crate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.crate-table th,
.crate-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.crate-table th {
  text-align: left;
  color: #b0bec5;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 12px;
}
.crate-table td:last-child {
  text-align: right;
}
.crate-action-spacer {
  display: inline-block;
  width: 12px;
}
#panel-idents .idents-pool-field-pair .form-label {
  margin: 0;
}
#panel-idents .idents-pool-field-pair .idents-choose-btn {
  flex-shrink: 0;
}
#panel-idents .idents-selected-badges.disabled {
  opacity: 0.65;
  pointer-events: none;
}
.panel-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel-skeleton__line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0.1) 100%);
  animation: skeletonPulse 1.2s ease-in-out infinite;
}
.panel-skeleton__line--wide {
  width: 80%;
}
.panel-skeleton__line--medium {
  width: 60%;
}
.panel-skeleton__line--narrow {
  width: 35%;
}
.panel-skeleton__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.panel-skeleton__grid .panel-skeleton__line {
  width: 100%;
}
@keyframes skeletonPulse {
  0% {
    background-position: -120px 0;
  }
  100% {
    background-position: 120px 0;
  }
}
.track-pool-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.track-pool-crate-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}
.track-pool-crate-row.combined > .track-pool-crate-list {
  flex: 1 1 50%;
  min-width: 0;
}
.track-pool-crate-list {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.track-pool-range-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
  align-items: flex-start;
}
.track-pool-range {
  flex: 1 1 50%;
  min-width: 0;
}
.track-pool-checkboxes {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 8px 10px;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.track-pool-checkboxes label {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 0.95rem;
  gap: 8px;
}
.track-pool-checkboxes input[type="checkbox"] {
  margin-right: 4px;
}
.track-pool-preview {
  margin: 0;
  font-size: 13px;
  color: #9ccc65;
}
.track-pool-preview.error {
  color: #ef5350;
}
.track-pool-preview-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.simple-trackpool-order-row {
  margin-top: 8px;
  gap: 8px;
}
.simple-trackpool-order-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#trackPoolPreviewBtn {
  margin-left: auto;
}
.playlist-trackpool-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.toggled-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-title-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-title-toggle h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #f1f5ff;
}
.panel-subtitle {
  margin: 0;
  flex: 1 1 auto;
  font-size: 13px;
  color: #8ea0bb;
  line-height: 1.4;
}
.trackpool-master-switch {
  transform: none;
  margin-right: 10px;
}
.trackpool-header-text h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.4px;
}
.trackpool-header-text p {
  margin: 4px 0 0;
  color: #94b4cf;
  font-size: 13px;
}
.playlist-track-pool-body {
  gap: 14px;
}
.playlist-track-pool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.tiny-crate-list {
  flex: 0 0 auto;
  width: min(20ch, 220px);
}
.tiny-crate-list .track-pool-checkboxes {
  max-height: 120px;
}
.track-pool-range-stack {
  flex: 1 1 240px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.range-double--compact {
  max-width: 220px;
}

.range-double {
  position: relative;
  height: 32px;
  margin-top: 6px;
}
.range-double::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  background: rgba(255,255,255,0.2);
  transform: translateY(-50%);
  border-radius: 2px;
}
.range-double__input {
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  height: 32px;
  margin: 0;
}
.range-double__input::-webkit-slider-thumb {
  pointer-events: auto;
}
.range-double__input::-moz-range-thumb {
  pointer-events: auto;
}
.range-double__input--min {
  z-index: 2;
}
.range-double__input--max {
  z-index: 1;
}
.range-double__input::-webkit-slider-runnable-track,
.range-double__input::-moz-range-track {
  background: transparent;
}
.idents-status {
  margin: 0;
  font-size: 13px;
  color: #9ccc65;
}
.idents-status.pending {
  color: #b2ff59;
}
.idents-status.queued {
  color: #ffca28;
}
.idents-status.cleared {
  color: #4dd0e1;
}
.idents-status.disabled {
  color: #9e9e9e;
}
.idents-body .panel-message {
  margin: 0;
}
.idents-list {
  min-height: 160px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.2);
.idents-list.disabled {
  opacity: 0.5;
  pointer-events: none;
}
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.idents-list .panel-message {
  margin: 0;
  color: #cfd8dc;
}
.idents-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  line-height: 1.3;
}
.idents-item.disabled {
  opacity: 0.5;
}
.idents-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.idents-item span {
  flex: 1;
}
.crate-list-container {
  min-height: 120px;
}
.crate-import-section form .form-row {
  margin-bottom: 12px;
}
.hint-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.hint-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
  font-size: 11px;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  padding: 0;
}
.hint-icon:hover:not(:disabled),
.hint-icon:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.hint-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  line-height: 1.4;
  color: #e0e0e0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 40;
}
.hint-wrapper:hover .hint-popover,
.hint-wrapper:focus-within .hint-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.compact-range {
  height: 26px;
}
.compact-range::-webkit-slider-runnable-track {
  height: 6px;
}
.compact-range::-moz-range-track {
  height: 6px;
}
.compact-range::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -5px;
}
.compact-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
}
.scoring-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}
.scoring-actions.scoring-actions-left {
  justify-content: flex-start;
}
.scoring-actions .btn {
  min-width: 140px;
}
.playback-card .line-now strong,
.playback-card .line-queued strong,
.playback-card .progress strong {
  width: auto;
}
.toggle-badge { font-size: 11px; margin-left: 8px; padding: 1px 8px; border-radius: 10px; border: 1px solid #666; color:#ddd; background: transparent; cursor: pointer; }
.card.expandable .detail-body { max-height: 1200px; overflow: hidden; transition: max-height .25s ease, padding .25s ease; padding-top: 6px; }
.card.expandable.collapsed .detail-body { max-height: 0; padding-top: 0; }
/* Original font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  background: #000;
  color: #fff;
  font-size: 12px;
  overflow-x: hidden; /* Prevent horizontal scrollbar */
}
body.vanta-active {
  background: transparent;
  background-image: none;
}
#vanta-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
#vanta-bg canvas {
  pointer-events: none !important;
}
body.vanta-active .login-wrapper {
  position: relative;
  z-index: 1;
}
body.vanta-active.control-page .top-nav,
body.vanta-active.control-page .control-shell {
  position: relative;
  z-index: 1;
}
body.vanta-active.control-page .confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
body.vanta-active.control-page .gravy-live-player-bar {
  z-index: 350;
}
.top-nav {
  background: rgba(16, 30, 48, 0.96);
  border-bottom: 1px solid rgba(70, 120, 180, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px;
  margin: -10px -10px 24px -10px;
  min-height: 44px;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #eee;
  font-size: 24px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
}
.nav-left {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.nav-logo-link {
  display: inline-flex;
  align-items: center;
}
.nav-logo {
  height: 48px;
  width: auto;
  display: inline-block;
}
.nav-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.3px;
}
.nav-icons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-station-display {
  display: inline-flex;
  flex-direction: column;
  margin-left: 10px;
  min-width: 0;
  gap: 0;
  padding: 4px 0;
}
.nav-station-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-station-name--empty {
  color: #8a8a8a;
  font-style: italic;
}
.sidebar-heading {
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0.3px;
  font-weight: 600;
  color: #607080;
  padding: 16px 10px 4px;
  position: relative;
  user-select: none;
}
.sidebar-heading[data-section="playlist-engine"] {
  color: #d0d0d0;
  letter-spacing: 1.2px;
}
.playlist-engine-group {
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  box-shadow: none;
}
.sidebar-item.playback {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-item.playback .sidebar-icon {
  width: 20px;
  height: 20px;
}
.nav-icon {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  width: 44px;
  height: 44px;
  font-size: 20px;
  color: #e5f3ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  padding: 0;
}
.nav-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.nav-icon:hover:not(:disabled),
.nav-icon:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.nav-account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-account form {
  margin: 0;
}
.nav-account-name {
  font-size: 14px;
  color: #f0f0f0;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.nav-account .nav-icon {
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 18px;
}
.station-layout {
  --station-sidebar-width: 200px;
  --station-chrome-height: 52px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100vh;
  transition: margin-top 0.12s ease;
}
.station-right {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.station-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  height: var(--station-chrome-height, 52px);
  min-height: var(--station-chrome-height, 52px);
  max-height: var(--station-chrome-height, 52px);
  padding: 0 24px;
  background: rgba(16, 30, 48, 0.98);
  border-bottom: 1px solid rgba(70, 120, 180, 0.35);
  display: flex;
  align-items: center;
  z-index: 300;
  overflow: visible;
}
.station-right {
  padding-top: var(--station-chrome-height, 52px);
}
.sidebar-collapse-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #b0c4de;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.sidebar-collapse-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.station-top-bar-title {
  font-size: 14px;
  font-weight: 400;
  color: #e5f3ff;
  white-space: nowrap;
  margin-left: 8px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}
.topbar-station-name {
  font-size: 17px;
  font-weight: 700;
  color: #eaf6ff;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
/* Panel breadcrumb hidden when full sidebar shows the active section */
.station-top-bar-title .topbar-sep,
.station-top-bar-title .topbar-panel-name {
  display: none;
}
@media (min-width: 901px) {
  .station-layout.sidebar-collapsed .station-top-bar-title .topbar-sep,
  .station-layout.sidebar-collapsed .station-top-bar-title .topbar-panel-name {
    display: inline;
  }
}
@media (max-width: 900px) {
  .station-layout:not(.menu-open) .station-top-bar-title .topbar-sep,
  .station-layout:not(.menu-open) .station-top-bar-title .topbar-panel-name {
    display: inline;
  }
}
.topbar-sep {
  margin: 0 7px;
  color: #556;
  font-size: 16px;
  font-weight: 300;
}
.topbar-panel-name {
  font-weight: 600;
  font-size: 14px;
  color: #e5f3ff;
}
.station-top-bar-inner {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
}
.station-top-bar-account {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.profile-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(240px, 42vw);
  padding: 4px 6px 4px 4px;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}
.profile-account-trigger:hover,
.profile-account-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}
.profile-account-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #e5f3ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(90, 142, 210, 0.28);
}
.profile-account-icon svg {
  width: 20px;
  height: 20px;
}
.profile-account-trigger .profile-account-name,
.profile-account-trigger .nav-account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 600;
  color: #f0f0f0;
  letter-spacing: 0.2px;
  text-align: left;
}
.profile-account-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #8ca0b9;
}
.profile-account-chevron svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.profile-account-trigger[aria-expanded="true"] .profile-account-chevron svg {
  transform: rotate(180deg);
}
.profile-btn {
  cursor: pointer;
}
.profile-btn svg {
  width: 20px;
  height: 20px;
}
.profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  min-width: 240px;
  padding: 12px;
  background: rgba(16, 30, 48, 0.98);
  border: 1px solid rgba(70, 120, 180, 0.35);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 400;
}
.profile-menu-section {
  padding: 10px 12px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.profile-menu-section:last-of-type {
  margin-bottom: 12px;
}
.profile-menu-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
}
.profile-menu-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.profile-menu-label {
  color: #b0c4de;
}
.profile-menu-value {
  color: #e5f3ff;
  font-weight: 500;
  margin-left: 12px;
}
.profile-menu-signout-form {
  margin: 0;
  padding-top: 4px;
  border-top: 1px solid rgba(70, 120, 180, 0.25);
}
.profile-menu-signout {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #e5f3ff;
  background: rgba(255, 120, 80, 0.15);
  border: 1px solid rgba(255, 100, 60, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.profile-menu-signout:hover {
  background: rgba(255, 120, 80, 0.25);
  border-color: rgba(255, 100, 60, 0.55);
}
.station-top-bar .nav-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  font-size: 15px;
}
.top-bar-menu-toggle {
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 1;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.top-bar-menu-toggle .nav-logo,
.station-top-bar .nav-logo {
  height: 32px;
  width: auto;
  display: block;
}
.station-sidebar {
  background: rgba(14, 28, 46, 0.98);
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: var(--station-sidebar-width, 200px);
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: none;
  padding-bottom: 16px;
}

.sidebar-logo {
  flex-shrink: 0;
  padding: 0 10px;
  height: var(--station-chrome-height, 52px);
  min-height: var(--station-chrome-height, 52px);
  max-height: var(--station-chrome-height, 52px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.sidebar-logo-button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.stations-page .sidebar-logo-button .nav-logo,
body.control-page .nav-logo-link.sidebar-logo-button .nav-logo {
  height: 36px;
  width: auto;
}

.sidebar-logo-button .nav-logo {
  height: 56px;
}

body.stations-page .sidebar-logo-text,
body.control-page .sidebar-logo-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #ffffff;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

body.stations-page .top-bar-menu-toggle .sidebar-logo-text {
  display: none !important;
}

@media (min-width: 901px) {
  body.stations-page .station-layout:not(.sidebar-collapsed) .sidebar-logo .sidebar-logo-text {
    display: inline-flex !important;
    align-items: center;
  }
  /* Full sidebar: logo sits on same baseline as top-bar station name; nav starts below chrome row */
  body.stations-page .station-layout:not(.sidebar-collapsed) .sidebar-logo {
    align-items: flex-end;
    padding-bottom: 9px;
  }
  body.stations-page .station-layout:not(.sidebar-collapsed) .sidebar-item.playback {
    padding-top: 12px;
  }
  body.stations-page .station-layout.sidebar-collapsed .sidebar-item.playback {
    padding-top: 12px;
  }
}

.sidebar-account {
  margin-top: auto;
  padding: 10px 10px 14px;
  border-top: 1px solid rgba(80, 140, 210, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #dfe9f5;
}
.sidebar-account .nav-account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-subsection {
  padding-bottom: 8px;
}
.sidebar-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  color: #8c8c8c;
  letter-spacing: 0.08em;
  padding: 12px 10px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
.sidebar-subsection.disabled .sidebar-subtitle,
.sidebar-subsection.disabled .sidebar-item {
  opacity: 0.45;
  pointer-events: none;
}

.simple-status {
  font-size: 13px;
  color: #f39c12;
  margin: 0;
}
.simple-body.disabled .simple-status {
  color: #9e9e9e;
}
.simple-note {
  font-size: 12px;
  color: #9e9e9e;
  margin: 0;
}
.sidebar-item {
  position: relative;
  background: transparent;
  border: none;
  border-bottom: none;
  color: #b0c4d8;
  padding: 9px 10px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 9px;
}
.sidebar-item::before {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 0;
  bottom: 0;
  border-radius: 8px;
  z-index: -1;
  background: transparent;
  transition: background 0.2s;
}
.sidebar-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: transparent;
  filter: brightness(0) invert(1);
  opacity: 0.65;
  display: block;
  transition: opacity 0.2s;
}
.sidebar-item:hover .sidebar-icon {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}
.sidebar-item.active .sidebar-icon {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.sidebar-item:hover {
  color: #dfe9f5;
}
.sidebar-item:hover::before {
  background: rgba(255, 255, 255, 0.08);
}
.sidebar-item.active {
  color: #dfe9f5;
}
.sidebar-item.active::before {
  background: rgba(255, 255, 255, 0.15);
}
.sidebar-item:last-child {
  border-bottom: none;
}
.sidebar-item .sidebar-label.disabled {
  color: #777;
}
.sidebar-item .switch-inline {
  margin-right: 2px;
  transform: scale(0.8);
  display: inline-flex;
  align-items: center;
}
.sidebar-item .switch-inline input {
  display: none;
}
.sidebar-item .switch-inline.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.station-main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 24px;
}
.station-main .deck-grid {
  width: 100%;
}
.form-row.inline .form-group {
  align-items: flex-start;
}
.mix-toggle-header {
  margin-bottom: 12px;
}
.mix-toggle-header .panel-title-toggle {
  gap: 10px;
}
.mix-toggle-header .panel-title-toggle h3 {
  color: #f1d28a;
  margin: 0;
}
.panel {
  display: none;
}
.panel.active {
  display: block;
}
.panel-message {
  padding: 12px;
  color: #bbb;
  font-size: 13px;
}
.panel-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.playlist-master-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
/* Playlist mode toggle (AutoDJ/Simple/Crate/Sets) */
.playlist-mode-toggle {
  position: relative;
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(80,140,210,0.35);
  padding: 3px;
  background: rgba(14,28,46,0.95);
  cursor: pointer;
  min-width: 360px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  font: inherit;
}
.playlist-mode-toggle .toggle-display {
  display: flex;
  align-items: stretch;
  width: 100%;
}
/* Do not use inset + width:% together — inset sets left+right and overrides width, so the
   highlight stretched full width. Match four flex segments: (track − horizontal padding) / 4. */
.playlist-mode-toggle .toggle-highlight {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 4);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  transition: transform 0.22s ease, background 0.22s ease;
  z-index: 0;
  box-sizing: border-box;
}
.playlist-mode-toggle .toggle-option {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #9fb3cc;
  padding: 7px 12px;
  cursor: pointer;
  user-select: none;
  border: none;
  background: transparent;
  white-space: nowrap;
}
.toggle-option--crate {
  color: #ff6b6b;
}
.toggle-option--sets {
  color: #b388ff;
}
.playlist-mode-toggle[data-mode="autodj"] .toggle-highlight {
  transform: translateX(0%);
  background: linear-gradient(135deg, #ffd45c, #f0a500);
}
.playlist-mode-toggle[data-mode="simple"] .toggle-highlight {
  transform: translateX(100%);
  background: linear-gradient(135deg, #25c175, #1a8f54);
}
.playlist-mode-toggle[data-mode="crate"] .toggle-highlight {
  transform: translateX(200%);
  background: linear-gradient(135deg, #ff6b6b, #c62828);
}
.playlist-mode-toggle[data-mode="sets"] .toggle-highlight {
  transform: translateX(300%);
  background: linear-gradient(135deg, #b388ff, #7c4dff);
}
.playlist-mode-toggle[data-mode="autodj"] .toggle-option--autodj {
  color: #040404;
}
.playlist-mode-toggle[data-mode="simple"] .toggle-option--simple {
  color: #040404;
}
.playlist-mode-toggle[data-mode="crate"] .toggle-option--crate {
  color: #040404;
}
.playlist-mode-toggle[data-mode="sets"] .toggle-option--sets {
  color: #040404;
}
.status-badge-playlist-mode {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: opacity 0.2s ease;
  min-width: 0;
}
.status-badge-playlist-mode:not(:empty) {
  opacity: 1;
}
/* Ensure badge is visible when it has text content */
.status-badge-playlist-mode[style*="opacity: 1"],
.status-badge-playlist-mode:not(:empty) {
  opacity: 1 !important;
}
.status-badge-playlist-mode--autodj {
  background: linear-gradient(135deg, #ffd45c, #f0a500);
  color: #040404;
  box-shadow: 0 2px 8px rgba(255,210,92,0.4);
}
.status-badge-playlist-mode--simple {
  background: linear-gradient(135deg, #25c175, #1a8f54);
  color: #040404;
  box-shadow: 0 2px 8px rgba(24,196,123,0.4);
}
.status-badge-playlist-mode--crate {
  background: linear-gradient(135deg, #ff6b6b, #c62828);
  color: #040404;
  box-shadow: 0 2px 8px rgba(255,107,107,0.4);
}
.status-badge-playlist-mode--sets {
  background: linear-gradient(135deg, #b388ff, #7c4dff);
  color: #040404;
  box-shadow: 0 2px 8px rgba(179,136,255,0.45);
}
/* Badge in card headers */
h2.card-header .status-badge-playlist-mode {
  margin-left: auto;
  margin-right: 0;
  flex-shrink: 0;
}
.playlist-system-status {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.system-chip {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  min-width: 140px;
  gap: 2px;
  color: #dbe3f3;
}
.system-chip .chip-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8ca0b9;
}
.system-chip .chip-value {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.system-chip .chip-energy-mode,
.system-chip .chip-dfc-mirror,
.system-chip .chip-ident-title,
.system-chip .chip-profile-name,
.system-chip .chip-scheduler-status {
  font-size: 11px;
  color: #8ca0b9;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
}
.system-chip[data-system="engine"] .chip-profile-name {
  color: #0fdf88;
}
.system-chip .chip-dfc-mirror {
  color: #9fb3cc;
}
.system-chip .chip-ident-title.chip-marquee {
  animation: chip-marquee 15s linear infinite;
}
@keyframes chip-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(110px - 100%));
  }
}
.system-chip .chip-ident-title.chip-marquee:hover {
  animation-play-state: paused;
}
.system-chip.live .chip-value {
  color: #0fdf88;
}
.system-chip.warn .chip-value {
  color: #ffb347;
}
.system-chip.idle .chip-value {
  color: #9fb3cc;
}
.system-chip.playing .chip-value {
  color: #7ecbff;
}
.system-chip.chip-hidden {
  display: none;
}
.playlist-tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
}
#playlistTabs > .card {
  margin-top: 12px;
  /* Flex item: allow shrinking below canvas intrinsic width so graph stays inside playlists body */
  min-width: 0;
  max-width: 100%;
}
/* Tab bar: outside card, horizontal line under, no wrap, scroll arrows */
.playlist-tab-scroll-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  margin-bottom: 0;
  overflow: hidden;
}
.playlist-tab-scroll-wrapper .playlist-tab-bar {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.playlist-tab-scroll-wrapper .playlist-tab-bar::-webkit-scrollbar {
  display: none;
}
.playlist-tab-arrow {
  display: none;
  flex-shrink: 0;
  width: 32px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #8ca0b9;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.playlist-tab-arrow.visible {
  display: flex;
}
.playlist-tab-arrow:hover:not(:disabled) {
  color: #fff;
  background: rgba(148, 163, 184, 0.15);
}
.playlist-tab-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
.playlist-tab-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  padding: 0 0 6px 0;
  border-bottom: none;
}
.playlist-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  margin-bottom: 6px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #9fb3cc;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.playlist-tab:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #dfe9f5;
  text-decoration: none;
}
.playlist-tab.active {
  background: rgba(148, 163, 184, 0.2);
  color: #fff;
  text-decoration: none;
}
#playlistTabs[data-mode="autodj"] .playlist-tab[data-modes~="autodj"] {
  color: #9fb3cc;
}
#playlistTabs[data-mode="autodj"] .playlist-tab[data-modes~="autodj"].active {
  background: rgba(148, 163, 184, 0.2);
  color: #fff;
}
#playlistTabs[data-mode="autodj"] .playlist-tab[data-modes~="autodj"]:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #dfe9f5;
}
#playlistTabs[data-mode="simple"] .playlist-tab[data-tab="simple-settings"] {
  color: #9fb3cc;
}
#playlistTabs[data-mode="simple"] .playlist-tab[data-tab="simple-settings"].active {
  background: rgba(148, 163, 184, 0.2);
  color: #fff;
}
#playlistTabs[data-mode="simple"] .playlist-tab[data-tab="simple-settings"]:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #dfe9f5;
}
/* Green dot: function-enabled indicator on playlist tabs (same style as pool builder) */
#playlistTabs .playlist-tab::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
  margin-right: 4px;
}
#playlistTabs .playlist-tab.has-filter::before {
  background: #4caf50;
}
/* Active tab: red dot (enabled feature still on this tab) */
#playlistTabs .playlist-tab.active.has-filter::before {
  background: #f87171;
}
body.theme-light #playlistTabs .playlist-tab.has-filter::before {
  background: #16a34a;
}
body.theme-light #playlistTabs .playlist-tab.active.has-filter::before {
  background: #dc2626;
}
.playlist-tab.playlist-tab--hidden {
  display: none;
}
.playlist-tab:disabled,
.playlist-tab.disabled {
  opacity: 0.4;
  cursor: default;
}
.playlist-tab-panels {
  position: relative;
  min-width: 0;
}
.playlist-tab-panel {
  display: none;
}
.playlist-tab-panel.active {
  display: block;
  animation: tabFade 0.25s ease;
}
.playlist-tab-panel.playlist-tab-panel--hidden {
  display: none !important;
}
.playlist-tab-panel.playlist-tab-panel--flash {
  box-shadow: 0 0 0 2px rgba(64,133,224,0.55);
  border-radius: 12px;
}
@keyframes tabFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Smooth fade during batch settings reload (profile switch / station change).
   Applied by reloadAllEngineSettings() so individual panel loading states are
   hidden behind one clean transition instead of 13 staggered flashes. */
.playlist-tab-panels.is-settings-reloading {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--gravy-motion-fast) var(--gravy-ease-out);
}
.playlist-tab-panels:not(.is-settings-reloading) {
  opacity: 1;
  transition: opacity var(--gravy-motion-fast) var(--gravy-ease-out);
}
.card.playlist-mode-card,
.station-main .panel > .card.playlist-mode-card {
  border: 1px solid rgba(69, 118, 185, 0.38);
  border-radius: 12px;
  background: rgba(10, 20, 35, 0.94);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
  padding: 0;
  overflow: hidden;
}
.playlist-tab-panels .playlist-tab-panel > .panel-body:not(.next-track-engine-body):not(.profile-settings-body) {
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 16px 20px 26px 26px;
  gap: 12px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.playlist-mode-card .panel-body {
  padding: 16px 20px 26px 26px;
  gap: 12px;
  min-width: 0;
}
.playlist-tab-panels .playlist-tab-panel > .panel-body:has(.panel-title-toggle):not(.next-track-engine-body):not(.profile-settings-body) {
  min-height: 0;
}
.playlist-tab-panels .playlist-tab-panel > .panel-body.is-setting-section-off {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  filter: saturate(0.5) brightness(0.9);
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.profile-settings-cell.is-setting-section-off,
.next-track-engine-cell.is-setting-section-off {
  background: transparent !important;
  box-shadow: none !important;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.profile-settings-cell.is-setting-section-off .nte-section-meta,
.profile-settings-cell.is-setting-section-off .nte-section-controls,
.next-track-engine-cell.is-setting-section-off > .panel-title-toggle,
.next-track-engine-cell.is-setting-section-off > .nte-section-controls {
  filter: saturate(0.5) brightness(0.9);
}
.profile-settings-cell.is-setting-section-off .nte-section-meta,
.profile-settings-cell.is-setting-section-off .nte-section-controls,
.next-track-engine-cell.is-setting-section-off .nte-section-meta,
.next-track-engine-cell.is-setting-section-off .nte-section-controls {
  filter: saturate(0.5) brightness(0.9);
}
.playlist-tab-panels .playlist-tab-panel > .panel-body.is-setting-section-off .panel-title-toggle,
.profile-settings-cell.is-setting-section-off .panel-title-toggle,
.next-track-engine-cell.is-setting-section-off .panel-title-toggle {
  opacity: 0.72;
}
.playlist-tab-panels .playlist-tab-panel > .panel-body.is-setting-section-off .panel-title-toggle h3,
.profile-settings-cell.is-setting-section-off .panel-title-toggle h3,
.next-track-engine-cell.is-setting-section-off .panel-title-toggle h3 {
  color: #8ca0b9 !important;
}
.is-setting-section-off .panel-title-toggle .switch {
  opacity: 0.72;
}
.nte-section-controls--collapsed {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  user-select: none !important;
}
.nte-field-pair--sonic-bpm-order.nte-field-pair--collapsed {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  user-select: none !important;
}
.playlist-tab-panels .nte-section-controls--collapsed,
.profile-settings-cell .nte-section-controls--collapsed,
.next-track-engine-cell .nte-section-controls--collapsed {
  display: flex !important;
}
.profile-settings-tab .nte-field-pair--sonic-bpm-order.nte-field-pair--collapsed,
#panel-next-track-engine .nte-field-pair--sonic-bpm-order.nte-field-pair--collapsed {
  display: flex !important;
}
.playlists-body.panel-body {
  padding: 0;
  padding-top: 0;
  min-width: 0;
  width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
}
.form-row.inline .form-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.form-row.inline .form-group .switch {
  margin-left: auto;
}
.mix-toggle-header {
  margin-bottom: 8px;
}
.mix-toggle-header .panel-title-toggle h3 {
  color: #f1d28a;
}
.playlist-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0;
  gap: 16px;
}
.playlist-section-header h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.scoring-warning {
  margin: 0 0 8px;
}
.scoring-warning h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #ff6b6b;
}
.playlist-section-chip {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.4);
}
.playlist-section-chip.live {
  color: #0fdf88;
  border-color: rgba(15,223,136,0.65);
}
.playlist-section-chip.warn {
  color: #ffb347;
  border-color: rgba(255,179,71,0.65);
}
.simple-mode-select {
  max-width: 180px;
  min-width: 150px;
  font-size: 14px;
  padding: 6px 10px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row--spaced {
  margin-top: 14px;
}
.form-row.row-layout {
  flex-direction: row;
  align-items: flex-start;
}
.form-row.toggle-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.form-row.toggle-row .form-label {
  margin: 0;
}
.form-row.toggle-row.toggle-row-inline {
  margin-top: 4px;
}
.set-programming-body.disabled .form-row:not(.toggle-row),
.set-programming-body.disabled .form-hint {
  opacity: 0.45;
  pointer-events: none;
}
.scoring-energy-body.disabled .form-row,
.scoring-energy-body.disabled .form-hint.toggle-hint {
  opacity: 0.45;
  pointer-events: none;
}
.set-programming-body .form-hint.full {
  margin-top: 4px;
}
.form-row.inline {
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.form-row.inline .form-group {
  flex: 0 0 260px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row.inline .form-group .form-hint {
  margin-top: 2px;
}
.switch {
  position: relative;
  display: inline-flex;
  width: 50px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  inset: 0;
  background: #3a3a3a;
  border-radius: 24px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.switch-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #0b0b0b;
  transition: transform 0.2s ease, background 0.2s ease;
}
.switch input:checked + .switch-slider {
  background: linear-gradient(90deg, #ff9b0f, #ff6f00);
  box-shadow: 0 0 12px rgba(255, 130, 0, 0.45);
}
.switch input:checked + .switch-slider:before {
  transform: translateX(24px);
  background: #fff4e6;
}
.switch input:disabled + .switch-slider {
  opacity: 0.4;
  cursor: not-allowed;
}
.form-label .current {
  font-weight: 400;
  margin-left: 6px;
  color: #8bc34a;
}
.panel-group {
  margin-top: 0;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  font-size: 13px;
  color: #eee;
}
.history-table thead th {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #333;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #aaa;
}
.history-table tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid #262626;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-table tbody tr:last-child td {
  border-bottom: none;
}
.history-table tbody tr:hover {
  background: #1f1f1f;
}
.history-table th:nth-child(1),
.history-table td:nth-child(1) {
  width: 90px;
}
.history-table th:nth-child(4),
.history-table td:nth-child(4),
.history-table th:nth-child(6),
.history-table td:nth-child(6) {
  text-align: right;
}
.history-table th:nth-child(2),
.history-table td:nth-child(2),
.history-table th:nth-child(3),
.history-table td:nth-child(3) {
  max-width: 220px;
}
.history-table .truncate-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analytics-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.analytics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.analytics-row--legacy {
  display: none;
}
.analytics-block {
  background: #1f1f1f;
  border: 1px solid #303030;
  border-radius: 10px;
  padding: 12px;
}
.analytics-heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #999;
  margin-bottom: 8px;
}
.analytics-canvas {
  width: 100%;
  height: 200px;
  display: block;
  background: #0e0e0e;
  border-radius: 6px;
}
.analytics-canvas--with-border {
  border: 1px solid #333;
}
.station-main .deck-grid .deck-section--history .analytics-canvas--with-border {
  border: none;
}

/* Generic tooltip styling, reusable across the app */
.has-tooltip {
  position: relative;
  cursor: help;
}
.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 125%;
  transform: translateX(-50%);
  padding: 8px 12px;
  min-width: 260px;
  max-width: 420px;
  white-space: pre-line;
  font-size: 12px;
  line-height: 1.5;
  color: #f5f5f5;
  background: rgba(15, 15, 15, 0.95);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease-out;
  z-index: 20;
}
.has-tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 120%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(15, 15, 15, 0.95) transparent transparent transparent;
  opacity: 0;
  transition: opacity 0.12s ease-out;
  z-index: 20;
}
.has-tooltip:hover::after,
.has-tooltip:hover::before {
  opacity: 1;
}
.analytics-canvas.small {
  height: 200px;
}
.analytics-canvas.wheel {
  height: 240px;
}
.analytics-split {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.analytics-split .analytics-block {
  min-height: 260px;
}
.analytics-placeholder-body {
  font-size: 13px;
  color: #bdbdbd;
  padding: 12px;
  border: 1px dashed #444;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}
.chart-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: rgba(15,15,15,0.92);
  color: #f5f5f5;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  max-width: 220px;
  word-break: break-word;
}

/* Database Stats panel */
.dbstats-panel-body {
  padding: 16px;
  flex-direction: column;
  gap: 20px;
}
.dbstats-loading {
  color: #94a3b8;
  font-size: 14px;
}

/* Database Tools — de-dupe tab */
.dbtools-dedupe-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-shrink: 0;
}
.dbtools-dedupe-toolbar .playlist-profile-name-label {
  flex-shrink: 0;
  margin: 0;
}
.dbtools-dedupe-sensitivity {
  width: auto;
  min-width: 7rem;
  flex-shrink: 0;
}
.dbtools-dedupe-toolbar .btn {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .dbtools-dedupe-toolbar {
    flex-wrap: wrap;
  }
}
.dbtools-dedupe-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.dbtools-dedupe-spinner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: #94a3b8;
  font-size: 14px;
}
.dbtools-dedupe-spinner[hidden] {
  display: none !important;
}
.dbtools-dedupe-spinner-icon {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: simulator-spin 0.75s linear infinite;
}
.dbtools-dedupe-status--error {
  color: #f87171;
}
.dbtools-dedupe-results {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dbtools-dedupe-cluster {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.35);
}
.dbtools-dedupe-cluster-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}
.dbtools-dedupe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dbtools-dedupe-table th,
.dbtools-dedupe-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: top;
}
.dbtools-dedupe-table th {
  color: #94a3b8;
  font-weight: 500;
}
.dbtools-dedupe-file {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: #94a3b8;
}
.dbtools-dedupe-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}
.dbtools-dedupe-bitrate {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dbtools-dedupe-best-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}
.dbtools-dedupe-row--best td {
  background: rgba(52, 211, 153, 0.06);
}
/* Database Tools — purge duplicates tab */
.dbtools-purge-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.dbtools-purge-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #cbd5e1;
}
.dbtools-purge-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.dbtools-purge-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.35);
}
.dbtools-purge-chip-label {
  color: #94a3b8;
}
.dbtools-purge-chip-value {
  color: #e2e8f0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.dbtools-purge-results {
  margin-top: 16px;
  max-height: 340px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
}
.dbtools-purge-table {
  margin: 0;
}
.dbtools-purge-row--skipped td {
  opacity: 0.55;
}
.dbtools-purge-crate {
  color: #fcd34d;
  font-size: 12px;
}
.dbtools-purge-confirm {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.06);
}
.dbtools-purge-warning {
  margin: 0;
  font-size: 13px;
  color: #fca5a5;
}
.dbtools-purge-phrase-label {
  font-size: 13px;
  color: #cbd5e1;
}
.dbtools-purge-phrase-label code {
  font-family: ui-monospace, monospace;
  color: #fca5a5;
}
.dbtools-purge-phrase {
  max-width: 260px;
  font-family: ui-monospace, monospace;
}
body.theme-light .dbtools-purge-option,
body.theme-light .dbtools-purge-phrase-label {
  color: #334155;
}
body.theme-light .dbtools-purge-chip {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(15, 23, 42, 0.1);
}
body.theme-light .dbtools-purge-chip-value {
  color: #0f172a;
}
body.theme-light .dbtools-purge-confirm {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(220, 38, 38, 0.3);
}
body.theme-light .dbtools-purge-warning,
body.theme-light .dbtools-purge-phrase-label code {
  color: #b91c1c;
}

body.theme-light .dbtools-dedupe-cluster {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(15, 23, 42, 0.1);
}
body.theme-light .dbtools-dedupe-cluster-title {
  color: #0f172a;
}

.dbstats-error {
  color: #f87171;
  font-size: 14px;
}
.dbstats-summary-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.dbstats-card {
  display: flex;
  flex-direction: column;
  min-width: 120px;
  padding: 12px 16px;
  background: rgba(30,41,59,0.6);
  border: 1px solid rgba(71,85,105,0.5);
  border-radius: 8px;
}
.dbstats-card-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e2e8f0;
}
.dbstats-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-top: 4px;
}
.dbstats-section {
  border-top: 1px solid rgba(71,85,105,0.4);
  padding-top: 16px;
}
.dbstats-section:first-of-type {
  border-top: none;
  padding-top: 0;
}
.dbstats-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0 0 12px 0;
}
.dbstats-played-label {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 8px 0;
}
.dbstats-played-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
  align-items: flex-start;
}
.dbstats-played-grid .dbstats-chart-wrap {
  flex: 1 1 280px;
  min-width: 0;
  margin-top: 0;
}
.dbstats-chart-wrap {
  max-width: 500px;
  margin-top: 8px;
}
.dbstats-bar-chart {
  width: 100%;
  max-width: 100%;
  display: block;
  border-radius: 6px;
}
.dbstats-genre-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.dbstats-genre-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #94a3b8;
}
.dbstats-genre-controls input {
  cursor: pointer;
}
.dbstats-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 8px;
}
.dbstats-stats-row strong {
  color: #e2e8f0;
}
.dbstats-tempo-row {
  margin-top: 14px;
}
.dbstats-tabs {
  margin-top: 16px;
}
.dbstats-tabs .playlist-tab-scroll-wrapper {
  margin-bottom: 12px;
}
.dbstats-tab-panels {
  padding-top: 12px;
}
body.theme-light .dbstats-card {
  background: rgba(248,250,252,0.9);
  border-color: rgba(148,163,184,0.4);
}
body.theme-light .dbstats-card-value {
  color: #1e293b;
}
body.theme-light .dbstats-card-label {
  color: #64748b;
}
body.theme-light .dbstats-section-title {
  color: #1e293b;
}
body.theme-light .dbstats-played-label {
  color: #475569;
}
body.theme-light .dbstats-stats-row {
  color: #475569;
}
body.theme-light .dbstats-stats-row strong {
  color: #0f172a;
}
body.theme-light .dbstats-genre-controls label {
  color: #64748b;
}

.analytics-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 11px;
  color: #b0b0b0;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.analytics-legend span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
}
.analytics-legend span[data-key="key"]::before { background: #4fc3f7; }
.analytics-legend span[data-key="dance"]::before { background: #81c784; }
.analytics-legend span[data-key="trans"]::before { background: #ffb74d; }
.analytics-legend span[data-key="fresh"]::before { background: #ba68c8; }

.analytics-legend--harmonic {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  color: #dfe9f5;
  gap: 10px;
}
.analytics-legend--harmonic span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.analytics-legend--harmonic span::before {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--legend-color, #ffffff);
}

/* Scheduler panel – no outer card; Day/Week pill and profile bar in header, calendar in its own box */
.scheduler-help-link{font-size:.85rem;color:#76c2ff;text-decoration:none}
.scheduler-help-link:hover{text-decoration:underline}
.scheduler-header-controls{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.scheduler-inspector-header h3{display:none}
.scheduler-toggle{display:flex;align-items:center;gap:8px}
.scheduler-toggle .switch-slider{margin-right:4px}
.scheduler-profile-icon-btn--danger:hover:not(:disabled) {
  border-color: rgba(255, 112, 112, 0.55);
  color: #ff8a8a;
}
body.theme-light .scheduler-profile-icon-btn--danger:hover:not(:disabled) {
  border-color: rgba(220, 38, 38, 0.45);
  color: #dc2626;
}
.scheduler-copy-day-modal-dialog {
  width: min(480px, 94vw);
}
.scheduler-copy-day-mode-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scheduler-copy-day-target-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 4px 12px;
}
.scheduler-copy-day-target-field .form-label {
  margin: 0;
  font-size: 12px;
}
.scheduler-copy-day-target-field .form-control--compact:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.scheduler-grid-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 0 2px;
}
.scheduler-grid-footer[hidden] {
  display: none !important;
}
.scheduler-type-change-option--selected[data-type="day"] {
  border-color: rgba(0, 151, 167, 0.55);
  background: linear-gradient(135deg, rgba(77, 208, 225, 0.18), rgba(0, 151, 167, 0.08));
}
.scheduler-type-change-option--selected[data-type="week"] {
  border-color: rgba(56, 142, 60, 0.55);
  background: linear-gradient(135deg, rgba(129, 199, 132, 0.18), rgba(56, 142, 60, 0.08));
}
body.theme-light .scheduler-type-change-option--selected[data-type="day"]:hover:not(:disabled) {
  border-color: rgba(0, 151, 167, 0.75);
  background: linear-gradient(135deg, rgba(77, 208, 225, 0.42), rgba(0, 151, 167, 0.2));
  color: #0a0a0a;
}
body.theme-light .scheduler-type-change-option--selected[data-type="week"]:hover:not(:disabled) {
  border-color: rgba(56, 142, 60, 0.75);
  background: linear-gradient(135deg, rgba(129, 199, 132, 0.42), rgba(56, 142, 60, 0.2));
  color: #0a0a0a;
}
.scheduler-block-inspector {
  width: 100%;
  margin: 0 0 12px;
  box-sizing: border-box;
}
.scheduler-block-inspector__card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(80, 140, 210, 0.28);
  background: rgba(255, 255, 255, 0.035);
  box-sizing: border-box;
  min-width: 0;
}
.scheduler-block-inspector__card--active {
  border-color: rgba(100, 160, 230, 0.45);
}
.scheduler-block-inspector__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  min-width: 0;
}
.scheduler-block-inspector__context {
  display: grid;
  grid-template-columns: 8.75rem 7rem auto minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  row-gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.scheduler-block-inspector__day {
  grid-column: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8ca0b9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scheduler-block-inspector__time {
  grid-column: 2;
  font-size: 14px;
  font-weight: 600;
  color: #e5f3ff;
  white-space: nowrap;
}
.scheduler-block-inspector__idle {
  grid-column: 3;
  font-size: 13px;
  font-weight: 500;
  color: #9fb3cc;
  min-width: 0;
}
.scheduler-block-inspector__profile-row {
  grid-column: 3 / -1;
  display: flex;
  align-items: center;
  gap: 16px 20px;
  flex-wrap: wrap;
  min-width: 0;
}
.scheduler-block-inspector__profile.nte-field-pair {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 0 1 auto;
  min-width: 0;
}
.scheduler-block-inspector__arm-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.scheduler-block-inspector__arm-live-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
}
.scheduler-block-inspector__profile.nte-field-pair .form-label {
  margin: 0;
}
.scheduler-block-inspector__profile.nte-field-pair .playlist-profile-name-combo--compact {
  width: 14rem;
  min-width: 14rem;
  max-width: 14rem;
}
.scheduler-block-inspector__profile.nte-field-pair select.form-control--compact {
  width: 14rem;
  min-width: 14rem;
  max-width: 14rem;
}
.playlist-profile-name-combo--compact {
  position: relative;
  min-width: 0;
}
.playlist-profile-name-combo--compact .playlist-profile-name-combo__trigger {
  width: 100%;
  min-width: 0;
}
.playlist-profile-name-combo--compact .playlist-profile-name-combo__trigger-inner {
  min-width: 0;
}
#panel-general .crate-mode-on-end-field .playlist-profile-name-combo--compact,
#panel-crate-mode .crate-mode-on-end-field .playlist-profile-name-combo--compact {
  width: 100%;
  max-width: 20rem;
}
.scheduler-profile-modal-body .playlist-profile-name-combo--compact {
  width: 100%;
  max-width: 20rem;
}
.scheduler-block-inspector__notices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 1 auto;
  margin-left: auto;
}
.scheduler-notice-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 22rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.scheduler-notice-pill[hidden] {
  display: none !important;
}
.scheduler-notice-pill--hint {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.scheduler-notice-pill--hint::before {
  content: "⚠";
  font-size: 11px;
  flex-shrink: 0;
}
.scheduler-notice-pill--error {
  color: #ffab40;
  background: rgba(255, 138, 60, 0.12);
  border: 1px solid rgba(255, 138, 60, 0.35);
}
.scheduler-notice-pill--saved {
  color: #81c784;
  background: rgba(129, 199, 132, 0.12);
  border: 1px solid rgba(129, 199, 132, 0.35);
}
.scheduler-notice-pill--saving {
  color: #9fb3cc;
  background: rgba(159, 179, 204, 0.1);
  border: 1px solid rgba(159, 179, 204, 0.25);
}
.scheduler-block-inspector__controls {
  margin-top: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(80, 140, 210, 0.18);
}
.scheduler-inspector-transition {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-width: 0;
  min-height: 26px;
}
.scheduler-inspector-transition__heading {
  flex: 0 0 auto;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8ca0b9;
  line-height: 18px;
}
.scheduler-inspector-transition__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  margin: 0;
  line-height: 18px;
}
.scheduler-inspector-transition__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8ca0b9;
  white-space: nowrap;
  line-height: 18px;
}
.scheduler-inspector-transition .switch {
  width: 36px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
}
.scheduler-inspector-transition .switch-slider:before {
  height: 12px;
  width: 12px;
  left: 3px;
  top: 3px;
}
.scheduler-inspector-transition .switch input:checked + .switch-slider:before {
  transform: translateX(18px);
}
.scheduler-inspector-transition__pick-idents {
  flex: 0 0 auto;
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  min-height: 24px;
  line-height: 1.2;
  min-width: 7.25rem;
}
.scheduler-inspector-transition__pick-idents--concealed {
  visibility: hidden;
  pointer-events: none;
}
.scheduler-inspector-transition__after {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  margin: 0;
  line-height: 18px;
}
.scheduler-inspector-transition__after--off {
  visibility: hidden;
  pointer-events: none;
}
.scheduler-inspector-transition__after select.form-control--compact {
  width: 7.5rem;
  min-width: 7.5rem;
  max-width: 7.5rem;
  font-size: 12px;
  font-weight: 500;
  padding-top: 2px;
  padding-bottom: 2px;
  min-height: 24px;
  margin: 0;
}
.scheduler-inspector-transition__after select.form-control--compact:disabled {
  opacity: 1;
}
.scheduler-inspector-transition__save {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 5.25rem;
  min-height: 18px;
}
.profile-change-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}
.profile-change-controls__heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8ca0b9;
  flex-shrink: 0;
  margin-right: 4px;
}
.profile-change-controls__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.profile-change-controls__row--spread {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.profile-change-controls__fade-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex-shrink: 0;
}
.profile-change-controls__toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  flex-shrink: 0;
}
.profile-change-controls__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8ca0b9;
  white-space: nowrap;
}
.profile-change-controls .switch {
  width: 36px;
  height: 18px;
  flex-shrink: 0;
}
.profile-change-controls .switch-slider:before {
  height: 12px;
  width: 12px;
  left: 3px;
  top: 3px;
}
.profile-change-controls .switch input:checked + .switch-slider:before {
  transform: translateX(18px);
}
.profile-change-controls__fade-min {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  min-height: 26px;
}
.profile-change-controls__fade-min--off {
  visibility: hidden;
  pointer-events: none;
}
.profile-change-controls__fade-min select.form-control--compact:disabled {
  opacity: 1;
}
.profile-change-controls__fade-min select.form-control--compact {
  width: 7.5rem;
  min-width: 7.5rem;
  max-width: 7.5rem;
  font-size: 12px;
  font-weight: 500;
  padding-top: 2px;
  padding-bottom: 2px;
  min-height: 26px;
}
.deck-live-mode-modal-transition-section.profile-change-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  padding-bottom: 16px;
}
.deck-live-mode-modal-transition-section .profile-change-controls__heading {
  display: block;
  width: 100%;
  margin: 0 0 18px;
}
.deck-live-mode-modal-transition-section .profile-change-controls__row {
  width: 100%;
}
.deck-live-mode-modal-transition-section .profile-change-controls__row--spread {
  flex-wrap: nowrap;
  align-items: center;
}
.deck-live-mode-modal-transition-section .profile-change-controls__fade-group {
  align-items: flex-start;
  min-height: 0;
  gap: 8px;
}
.deck-live-mode-modal-transition-section .profile-change-controls__fade-min--off {
  display: none;
}
.scheduler-block-inspector__save {
  flex-shrink: 0;
}
.scheduler-block-inspector__save--idle {
  visibility: hidden;
}
.scheduler-block-inspector__save[hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  .scheduler-block-inspector__context {
    grid-template-columns: 1fr;
  }
  .scheduler-block-inspector__day,
  .scheduler-block-inspector__time,
  .scheduler-block-inspector__idle,
  .scheduler-block-inspector__profile-row {
    grid-column: 1;
  }
  .scheduler-inspector-transition {
    gap: 8px;
  }
}
.scheduler-segment-profile-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scheduler-segment-profile-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.scheduler-segment-profile-row .scheduler-segment-profile-label {
  flex: 1;
  min-width: 0;
}
.scheduler-segment-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.scheduler-segment-time {
  display: block;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0.82;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scheduler-segment[data-show-time="false"] .scheduler-segment-time {
  display: none;
}
.scheduler-segment[data-show-content="false"] .scheduler-segment-body {
  visibility: hidden;
}
body.theme-light .scheduler-block-inspector__card {
  background: #f8fafc;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: none;
}
body.theme-light .scheduler-block-inspector__card--active {
  border-color: hsl(0 0% 78%);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
body.theme-light .scheduler-block-inspector__day {
  color: #64748b;
}
body.theme-light .scheduler-block-inspector__time {
  color: #0a0a0a;
}
body.theme-light .scheduler-block-inspector__idle {
  color: #64748b;
}
body.theme-light .scheduler-block-inspector__controls {
  border-top: 1px solid hsl(0 0% 92%);
}
body.theme-light .scheduler-inspector-transition__heading,
body.theme-light .scheduler-inspector-transition__label,
body.theme-light .scheduler-block-inspector__arm-live-label {
  color: #64748b;
}
body.theme-light .profile-change-controls__heading,
body.theme-light .profile-change-controls__label {
  color: #64748b;
}
body.theme-light .scheduler-notice-pill--hint {
  color: #b45309;
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.4);
}
body.theme-light .scheduler-notice-pill--error {
  color: #c2410c;
  background: rgba(255, 138, 60, 0.1);
  border-color: rgba(255, 138, 60, 0.35);
}
body.theme-light .scheduler-notice-pill--saved {
  color: #2e7d32;
  background: rgba(46, 125, 50, 0.1);
  border-color: rgba(46, 125, 50, 0.3);
}
body.theme-light .scheduler-notice-pill--saving {
  color: #64748b;
  background: #f1f5f9;
  border-color: hsl(0 0% 89.8%);
}
#panel-scheduler .scheduler-profile-editor-settings-box {
  min-width: 0;
  overflow-x: visible;
}
#panel-scheduler .scheduler-profile-editor-settings-box .scheduler-grid-wrapper {
  margin-top: 0;
  margin-left: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: visible;
  overflow-y: auto;
}
/* Calendar editor – main box */
.scheduler-toolbar{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}
.scheduler-toolbar .pool-header-bar{margin-bottom:0}
.scheduler-status-text{font-size:.85rem;color:rgba(255,255,255,.7)}
.scheduler-grid-wrapper {
  position: relative;
  width: 100%;
  margin-left: 0;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(80, 140, 210, 0.35);
  background: rgba(14, 28, 46, 0.95);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  overflow-x: visible;
  overflow-y: auto;
  max-height: 600px;
  scrollbar-color: #707070 #101010;
}
.scheduler-grid-wrapper::-webkit-scrollbar{width:8px}
.scheduler-grid-wrapper::-webkit-scrollbar-track{background:#101010;border-radius:6px}
.scheduler-grid-wrapper::-webkit-scrollbar-thumb{background:#707070;border-radius:6px}
.scheduler-grid-wrapper::-webkit-scrollbar-thumb:hover{background:#8d8d8d}
.scheduler-grid{position:relative;width:100%;max-width:100%;min-width:0;box-sizing:border-box;height:992px;display:grid;gap:0;column-gap:4px;padding-left:52px;padding-top:32px}
.scheduler-grid.scheduler-grid--day{grid-template-columns:1fr}
.scheduler-grid.scheduler-grid--week{grid-template-columns:repeat(7,1fr)}
.scheduler-day-header-row{position:absolute;top:0;left:52px;right:0;display:grid;gap:0;column-gap:4px;grid-template-columns:inherit;z-index:6;pointer-events:none;height:32px;background:transparent}
.scheduler-day-header{position:relative;display:flex;align-items:center;justify-content:center;font-size:.85rem;font-weight:600;color:rgba(255,255,255,.5);padding:6px 50px 6px 8px;text-transform:uppercase;letter-spacing:.05em;outline:none;background:transparent;pointer-events:auto;min-width:0}
.scheduler-day-header__label{display:inline-flex;align-items:center;gap:4px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scheduler-day-header span{display:inline-flex;align-items:center;gap:4px}
.scheduler-day-header--selected{color:rgba(255,255,255,1);font-weight:700;outline:none!important}
.scheduler-column-controls{position:absolute;top:50%;right:4px;display:flex;gap:4px;z-index:2;transform:translateY(-50%);pointer-events:auto}
.scheduler-column-control-btn{box-sizing:border-box;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.04);color:#fff;border-radius:50%;width:20px;height:20px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .2s ease,border-color .2s ease,color .2s ease,transform .1s ease;padding:0;line-height:0}
.scheduler-column-control-btn svg{width:10px;height:10px;display:block;flex-shrink:0;pointer-events:none}
.scheduler-column-control-btn:hover{background:#00c853;border-color:#00c853;color:#050505}
.scheduler-column-control-btn:focus-visible{outline:2px solid #00c853;outline-offset:2px}
.scheduler-column-control-btn:active{transform:scale(.9)}
.scheduler-column-control-btn--delete{color:#fff;border-color:rgba(255,255,255,.4)}
.scheduler-column-control-btn--delete:hover{background:#ff1744;border-color:#ff1744;color:#050505}
.scheduler-grid-column{position:relative;min-width:0;border:none;border-radius:0;background:transparent;height:992px}
.scheduler-grid.scheduler-grid--week .scheduler-grid-column:not(:first-child)::before{content:"";position:absolute;left:-2px;top:0;bottom:0;width:1px;background:rgba(80,140,210,0.22);pointer-events:none;z-index:1}
.scheduler-grid-column--selected{background:transparent;outline:none}
.scheduler-hour-lines-container{position:absolute;top:32px;left:52px;right:0;height:960px;pointer-events:none;z-index:1}
.scheduler-hour-line{position:absolute;left:0;right:0;height:1px;background:rgba(255,255,255,.04)}
.scheduler-hour-label{position:absolute;left:-52px;top:-9px;font-size:12px;font-weight:600;letter-spacing:.06em;color:#8ca0b9;text-align:right;width:48px;pointer-events:none;padding-right:4px;line-height:1.25}
.scheduler-segment {
  position: absolute;
  left: 3px;
  right: 3px;
  padding: 5px 20px 16px 8px;
  font-size: 10px;
  line-height: 1.25;
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
  box-shadow: none;
  color: #f8fafc;
  font-weight: 500;
  cursor: pointer;
  overflow: visible;
  transition: box-shadow 0.15s ease;
  z-index: 2;
  background: #1e2e44;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.scheduler-segment[data-palette-idx="0"] { background: #1e2e44; color: #f1f5f9; }
.scheduler-segment[data-palette-idx="1"] { background: #2a223c; color: #f1f5f9; }
.scheduler-segment[data-palette-idx="2"] { background: #17353d; color: #f1f5f9; }
.scheduler-segment[data-palette-idx="3"] { background: #1c322a; color: #f1f5f9; }
.scheduler-segment[data-palette-idx="4"] { background: #32241c; color: #f1f5f9; }
.scheduler-segment[data-palette-idx="5"] { background: #342329; color: #f1f5f9; }
.scheduler-segment[data-selected="true"]{
  z-index:4;
  outline:none;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,0.28);
  filter:none;
}
.scheduler-segment:has(.scheduler-segment-delete:hover),
.scheduler-segment:has(.scheduler-segment-delete:focus-visible) {
  z-index: 50;
}
.scheduler-segment[data-error="true"]{
  outline:2px solid #ff6f6f !important;
  outline-offset:1px;
  filter:none;
}
.scheduler-segment-transition-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  color: #f8fafc;
  background: rgba(0, 0, 0, 0.28);
}
.scheduler-segment-warning{position:absolute;top:50%;right:24px;transform:translateY(-50%);padding:2px 6px;border-radius:999px;background:#ff5252;color:#fff;font-size:.58rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.scheduler-segment-warning--gap{background:#ffab40;color:#050505}
.scheduler-now-line{position:absolute;left:0;right:0;height:2px;background:#00bcd4;pointer-events:none;z-index:5;box-shadow:0 0 6px rgba(0,188,212,.6)}
.scheduler-segment-handle{position:absolute;left:0;right:0;height:8px;cursor:ns-resize;z-index:10;background:transparent}
.scheduler-segment-handle:hover{background:rgba(255,255,255,.2)}
.scheduler-segment-handle--top{top:-4px}
.scheduler-segment-handle--bottom{bottom:-4px}
.scheduler-segment-profile-btn{border:none;background:none;padding:0;margin:0;color:inherit;font:inherit;display:inline-flex;align-items:center;gap:4px;cursor:pointer}
.scheduler-segment-profile-btn:hover{text-decoration:underline}
.scheduler-segment-profile-caret{font-size:.75em;opacity:.8}
.scheduler-segment-delete {
  position: absolute;
  bottom: 4px;
  right: 4px;
  top: auto;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.32);
  color: #f8fafc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 0;
  line-height: 0;
  opacity: 0.9;
  transition: opacity 0.15s ease, background-color 0.15s ease;
  touch-action: manipulation;
}
.scheduler-segment-delete svg {
  width: 8px;
  height: 8px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}
.scheduler-segment-delete:hover {
  opacity: 1;
  background: rgba(255, 23, 68, 0.85);
  color: #fff;
}
.scheduler-segment-delete:active {
  opacity: 0.55;
}
.scheduler-grid-empty {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
  border-radius: 12px;
  background: rgba(14, 28, 46, 0.5);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}
.scheduler-grid-empty.active {
  display: flex;
}
.scheduler-grid-empty p {
  margin: 0;
  max-width: 280px;
}
.scheduler-grid-empty .btn {
  min-height: 44px;
  padding: 10px 20px;
  touch-action: manipulation;
}
.scheduler-profile-modal .modal-dialog{min-width:260px}
.scheduler-profile-modal-body{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}
.scheduler-profile-modal .modal-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.scheduler-inspector{flex:1;min-width:260px;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;background:rgba(0,0,0,.4);display:flex;flex-direction:column;gap:12px}
.scheduler-inspector-header{display:flex;justify-content:space-between;align-items:center}
.scheduler-inspector-field{display:flex;flex-direction:column;gap:6px}
.scheduler-time-row{display:flex;gap:12px}
.scheduler-time-row .form-field{flex:1}
.scheduler-time-inputs{display:flex;gap:8px;align-items:center}
.scheduler-time-inputs select{flex:1}
.scheduler-time-inputs span{color:rgba(255,255,255,.6);font-weight:600}
.scheduler-color-picker{width:80px;height:32px;border:none;border-radius:6px;padding:0;background:transparent}
.scheduler-inspector-actions{display:flex;gap:8px;flex-wrap:wrap}
.scheduler-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:8px}
.scheduler-footer-left,.scheduler-footer-right{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.scheduler-validation-message{min-height:22px;font-size:.85rem;color:#ffab40}


.station-control-group{padding:8px 12px}
.station-control-row{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.station-control-row:last-child{margin-bottom:0}
.station-control-label{font-size:14px;color:var(--text-secondary);white-space:nowrap;min-width:100px;flex-shrink:0;transition:color 0.2s}
.station-control-label.disabled{color:#666;opacity:0.6}
.station-control-row select{flex:1;min-width:0}
.scheduler-menu-toggle{display:inline-flex;align-items:center;margin-left:auto}
.playlist-header-row{display:flex;align-items:center;justify-content:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:8px}
/* Legacy playlist-profile-selector removed — now uses .pool-header-bar */
.track-pool-selector-controls .nav-icon{
  margin-left:0;
  border:1px solid rgba(80,140,210,0.35);
  background:rgba(14,28,46,0.95);
  color:#e5f3ff;
  border-radius:6px;
  padding:6px 10px;
  box-shadow:0 6px 14px rgba(0,0,0,0.35);
  transition:background 0.2s ease,border-color 0.2s ease;
}
.track-pool-selector-controls .nav-icon:hover{
  background:rgba(23,44,70,0.95);
  border-color:rgba(115,165,225,0.55);
}
.track-pool-match-count{
  padding-left:0;
  font-size:14px;
  color:var(--text-secondary);
  white-space:nowrap;
  font-weight:500;
  margin-left:0.5rem;
}
.playlists-body select,
.playlists-body .form-control,
.playlists-body .form-control--compact {
  background:rgba(14,28,46,0.95);
  border:1px solid rgba(80,140,210,0.35);
  color:#fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow:inset 0 0 0 1px rgba(41,96,180,0.1);
}
.playlists-body .form-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8ca0b9;
}
.playlists-body .form-hint {
  font-size: 12px;
  font-weight: 500;
  color: #8ca0b9;
}
.playlists-body select:focus,
.playlists-body .form-control:focus,
.playlists-body .form-control--compact:focus {
  border-color:rgba(130,190,255,0.8);
  box-shadow:0 0 0 2px rgba(66,133,244,0.25);
  outline:none;
}
h2.card-header .playlist-mode-toggle{margin-left:0}
.playlists-body h2.card-header{justify-content:flex-start}
#panel-playlists > .playlist-profile-editor-box,
#panel-playlists > .playlist-profile-editor-settings-box,
#panel-scheduler > .playlist-profile-editor-box,
#panel-scheduler > .playlist-profile-editor-settings-box,
#panel-track-pools-manager > .playlist-profile-editor-box,
#panel-track-pools-manager > .playlist-profile-editor-settings-box,
#panel-crates > .playlist-profile-editor-box,
#panel-crates > .playlist-profile-editor-settings-box,
#panel-tracksearch > .playlist-profile-editor-box,
#panel-tracksearch > .playlist-profile-editor-settings-box,
#panel-history > .playlist-profile-editor-box,
#panel-history > .playlist-profile-editor-settings-box,
#panel-imaging > .playlist-profile-editor-box,
#panel-imaging > .playlist-profile-editor-settings-box,
#panel-live-stream > .playlist-profile-editor-box,
#panel-live-stream > .playlist-profile-editor-settings-box,
#panel-settings > .playlist-profile-editor-box,
#panel-settings > .playlist-profile-editor-settings-box {
  margin: 0 0 12px 0;
}
#panel-tracksearch,
#panel-history,
#panel-imaging,
#panel-settings {
  min-width: 0;
  overflow-x: hidden;
}
#panel-crates {
  min-width: 0;
  overflow-x: hidden;
}
#panel-track-pools-manager {
  min-width: 0;
  overflow-x: hidden;
}
#panel-live-stream {
  min-width: 0;
  overflow-x: hidden;
}
#panel-scheduler {
  min-width: 0;
  overflow-x: visible;
}
.playlist-profile-bar {
  flex-basis: 100%;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
/* Profile Editor panels — matches home deck Live/Next section boxes */
.playlist-profile-editor-box,
.playlist-profile-editor-settings-box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: 12px;
  background: rgba(14, 28, 46, 0.95);
  border: none;
  box-shadow: none;
  box-sizing: border-box;
  width: 100%;
}
.playlist-profile-editor-box {
  padding: 14px 18px 16px;
}
.playlist-profile-editor-settings-box {
  padding: 14px 18px 16px;
}
#panel-playlists > .playlist-profile-editor-settings-box {
  padding: 14px 0 0;
  overflow: hidden;
  position: relative;
}
.playlist-profile-editor-settings-box .playlist-profile-editor-tabs {
  min-width: 0;
  width: 100%;
}
.playlist-profile-editor-settings-box #playlistTabs > .playlists-body.playlist-profile-editor-card {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.035);
  border: none;
  box-shadow: none;
  border-radius: 0 0 12px 12px;
  padding: 16px 18px 18px;
  box-sizing: border-box;
}
#panel-settings .settings-editor-settings-box {
  padding: 14px 0 0;
  overflow: hidden;
}
#panel-settings .settings-editor-settings-box .settings-tab-panels {
  margin: 0;
  padding: 16px 24px 26px;
  background: rgba(255, 255, 255, 0.035);
  border-radius: 0 0 12px 12px;
  box-sizing: border-box;
}
/* Tab body padding/typography: add-media.css (matches Settings → UI controls) */
.playlist-profile-editor-settings-box .playlist-tab-scroll-wrapper {
  border-bottom: none;
  min-height: 50px;
  margin-bottom: 0;
  padding: 0 18px;
  box-sizing: border-box;
}
#panel-settings .settings-editor-settings-box .playlist-tab-scroll-wrapper {
  border-bottom: none;
  min-height: 50px;
  margin-bottom: 0;
  padding: 0 24px;
  box-sizing: border-box;
}
body.theme-light .playlist-profile-editor-settings-box .playlist-tab-scroll-wrapper {
  border-bottom-color: transparent;
}
.playlist-profile-editor-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  width: 100%;
}
#panel-playlists .playlist-profile-editor-box .playlist-profile-editor-heading,
#panel-scheduler .playlist-profile-editor-box .playlist-profile-editor-heading,
#panel-track-pools-manager .playlist-profile-editor-box .playlist-profile-editor-heading,
#panel-crates .playlist-profile-editor-box .playlist-profile-editor-heading,
#panel-tracksearch .playlist-profile-editor-box .playlist-profile-editor-heading,
#panel-history .playlist-profile-editor-box .playlist-profile-editor-heading,
#panel-imaging .playlist-profile-editor-box .playlist-profile-editor-heading,
#panel-live-stream .playlist-profile-editor-box .playlist-profile-editor-heading,
#panel-settings .playlist-profile-editor-box .playlist-profile-editor-heading {
  margin: 0;
  padding: 10px 0 12px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #e5f3ff;
  line-height: 1.25;
  flex-shrink: 0;
}
body.theme-light #panel-playlists .playlist-profile-editor-box .playlist-profile-editor-heading,
body.theme-light #panel-scheduler .playlist-profile-editor-box .playlist-profile-editor-heading,
body.theme-light #panel-track-pools-manager .playlist-profile-editor-box .playlist-profile-editor-heading,
body.theme-light #panel-crates .playlist-profile-editor-box .playlist-profile-editor-heading,
body.theme-light #panel-tracksearch .playlist-profile-editor-box .playlist-profile-editor-heading,
body.theme-light #panel-history .playlist-profile-editor-box .playlist-profile-editor-heading,
body.theme-light #panel-imaging .playlist-profile-editor-box .playlist-profile-editor-heading,
body.theme-light #panel-live-stream .playlist-profile-editor-box .playlist-profile-editor-heading,
body.theme-light #panel-settings .playlist-profile-editor-box .playlist-profile-editor-heading {
  color: #0a0a0a;
}
#panel-playlists .playlist-profile-editor-box,
#panel-scheduler .playlist-profile-editor-box,
#panel-track-pools-manager .playlist-profile-editor-box,
#panel-crates .playlist-profile-editor-box,
#panel-tracksearch .playlist-profile-editor-box,
#panel-history .playlist-profile-editor-box,
#panel-imaging .playlist-profile-editor-box,
#panel-live-stream .playlist-profile-editor-box,
#panel-settings .playlist-profile-editor-box {
  font-size: 14px;
  box-sizing: border-box;
}
#panel-playlists .playlist-profile-editor-box,
#panel-scheduler .playlist-profile-editor-box,
#panel-track-pools-manager .playlist-profile-editor-box,
#panel-crates .playlist-profile-editor-box,
#panel-tracksearch .playlist-profile-editor-box,
#panel-history .playlist-profile-editor-box,
#panel-imaging .playlist-profile-editor-box,
#panel-live-stream .playlist-profile-editor-box,
#panel-settings .playlist-profile-editor-box {
  min-height: 135px;
}
#panel-live-stream .playlist-profile-editor-box {
  min-height: auto;
}
#panel-settings .settings-editor-header-box {
  min-height: auto;
}
#panel-settings .settings-editor-settings-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#panel-settings .settings-editor-settings-box .settings-tabs {
  min-width: 0;
  width: 100%;
}
body.theme-light #panel-settings .settings-editor-settings-box .playlist-tab-scroll-wrapper {
  border-bottom-color: transparent;
}
#panel-imaging .imaging-editor-settings-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#panel-imaging .imaging-editor-settings-box .imaging-tabs {
  min-width: 0;
  width: 100%;
}
#panel-imaging .imaging-editor-settings-box .playlist-tab-scroll-wrapper {
  border-bottom-color: rgba(80, 140, 210, 0.28);
  min-height: 50px;
  margin-bottom: 12px;
  padding: 0;
  box-sizing: border-box;
}
#panel-imaging .imaging-editor-settings-box .imaging-browse-results {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
#panel-imaging .imaging-editor-settings-box .imaging-browse-list {
  flex: 0 0 auto;
  height: clamp(240px, calc(100vh - 360px), 640px);
  min-height: 240px;
  max-height: clamp(240px, calc(100vh - 360px), 640px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.75);
}
#panel-imaging .imaging-editor-settings-box .imaging-browse-empty {
  margin: 10px 0 0;
}
#panel-imaging .playlist-profile-editor-row > .playlist-profile-select {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 20rem;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
body.theme-light #panel-imaging .playlist-profile-editor-row > .playlist-profile-select {
  color: #0a0a0a;
}
body.theme-light #panel-imaging .imaging-editor-settings-box .playlist-tab-scroll-wrapper {
  border-bottom-color: hsl(0 0% 89.8%);
}
body.theme-light #panel-imaging .imaging-editor-settings-box .imaging-browse-list {
  border-color: hsl(0 0% 89.8%);
  background: #fff;
}
.playlist-profile-editor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 0 0 14px;
  box-sizing: border-box;
}
.playlist-profile-editor-row > .playlist-profile-bar-actions {
  flex-shrink: 0;
}
.playlist-profile-editor-row > .simulator-open-btn {
  flex-shrink: 0;
  margin-left: auto;
  padding: 8px 18px;
}
.playlist-profile-type-cell--leading {
  flex-shrink: 0;
  margin-right: 12px;
}
.playlist-profile-playback-mode-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}
.playlist-profile-playback-mode-field .playback-mode-combo {
  width: 16rem;
  min-width: 16rem;
  max-width: 16rem;
}
.playlist-profile-playback-mode-field .playback-mode-combo .playlist-profile-name-combo__trigger {
  width: 100%;
}
.playlist-profile-playback-mode-field .playback-mode-combo .playlist-profile-name-combo__trigger-inner {
  min-width: 0;
  flex: 1;
}
.playlist-profile-playback-mode-field .playback-mode-combo .playlist-profile-name-combo__name {
  overflow: visible;
  text-overflow: clip;
}
#panel-general .general-mode-section[hidden],
#panel-general .general-mode-section.general-mode-section--hidden {
  display: none !important;
}
#rotationPresetSection .nte-field-pair--stacked select.form-control--compact {
  width: 100%;
  min-width: 16rem;
  max-width: 20rem;
  height: 36px;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: normal;
  box-sizing: border-box;
}
button.playlist-profile-type-pill {
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}
button.playlist-profile-type-pill:disabled {
  cursor: default;
  opacity: 0.72;
}
button.playlist-profile-type-pill:not(:disabled):hover {
  filter: brightness(1.08);
}
button.playlist-profile-type-pill:not(:disabled):active {
  filter: brightness(0.95);
}
button.playlist-profile-type-pill:focus-visible {
  outline: 2px solid rgba(120, 180, 255, 0.65);
  outline-offset: 2px;
}
.playlist-profile-editor-row > .playlist-profile-select,
.playlist-profile-editor-row > .playlist-profile-name-combo {
  flex: 0 1 auto;
}
.playlist-profile-editor-row > .playlist-profile-name-label,
.playlist-profile-editor-row > .playlist-profile-type-label {
  flex-shrink: 0;
}
.playlist-profile-editor-row > .playlist-profile-type-cell {
  flex-shrink: 0;
}
.playlist-profile-bar-actions {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  flex-shrink: 0;
  border: 1px solid rgba(80, 140, 210, 0.38);
  border-radius: 8px;
  overflow: visible;
  background: rgba(14, 28, 46, 0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.playlist-profile-icon-tooltip-wrap {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  position: relative;
}
.playlist-profile-bar-actions .playlist-profile-icon-tooltip-wrap + .playlist-profile-icon-tooltip-wrap {
  border-left: 1px solid rgba(80, 140, 210, 0.28);
}
.playlist-profile-bar-actions .playlist-profile-icon-btn {
  border: none;
  border-radius: 0;
  width: 34px;
  height: 34px;
}
.playlist-profile-bar-actions .playlist-profile-icon-tooltip-wrap:first-child .playlist-profile-icon-btn {
  border-top-left-radius: 7px;
  border-bottom-left-radius: 7px;
}
.playlist-profile-bar-actions .playlist-profile-icon-tooltip-wrap:last-child .playlist-profile-icon-btn {
  border-top-right-radius: 7px;
  border-bottom-right-radius: 7px;
}
.playlist-profile-bar-actions .playlist-profile-icon-btn + .playlist-profile-icon-btn {
  border-left: none;
}
.playlist-profile-type-label {
  align-self: center;
}
.playlist-profile-name-label,
.playlist-profile-type-label {
  flex-shrink: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8ca0b9;
  white-space: nowrap;
}
body.theme-light .playlist-profile-name-label,
body.theme-light .playlist-profile-type-label {
  color: #64748b;
}
/* Profile/scheduler type badge — same shape/size as Home Current programming profile chip */
.playlist-profile-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: fit-content;
  min-width: 0;
  max-width: min(32vw, 240px);
  padding: 6px 12px;
  margin: 0;
  border-radius: 8px;
  border: 1px solid rgba(80, 140, 210, 0.28);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none;
  justify-self: start;
  align-self: center;
  flex: 0 0 auto;
}
.playlist-profile-type-pill[data-mode="autodj"],
.deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="autodj"],
body.theme-light .deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="autodj"] {
  background: linear-gradient(135deg, #ffd45c, #f0a500);
  color: #fff;
  border-color: rgba(80, 140, 210, 0.28);
}
.playlist-profile-type-pill[data-mode="simple"],
.deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="simple"],
body.theme-light .deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="simple"] {
  background: linear-gradient(135deg, #25c175, #1a8f54);
  color: #fff;
  border-color: rgba(80, 140, 210, 0.28);
}
.playlist-profile-type-pill[data-mode="crate"],
.deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="crate"],
body.theme-light .deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="crate"] {
  background: linear-gradient(135deg, #ff6b6b, #c62828);
  color: #fff;
  border-color: rgba(80, 140, 210, 0.28);
}
.playlist-profile-type-pill[data-mode="sets"],
.deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="sets"],
body.theme-light .deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="sets"] {
  background: linear-gradient(135deg, #b388ff, #7c4dff);
  color: #fff;
  border-color: rgba(80, 140, 210, 0.28);
}
.playlist-profile-type-pill[data-mode="day"],
.deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="day"],
body.theme-light .deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="day"] {
  background: linear-gradient(135deg, #4dd0e1, #0097a7);
  color: #fff;
  border-color: rgba(80, 140, 210, 0.28);
}
.playlist-profile-type-pill[data-mode="week"],
.deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="week"],
body.theme-light .deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode="week"] {
  background: linear-gradient(135deg, #81c784, #388e3c);
  color: #fff;
  border-color: rgba(80, 140, 210, 0.28);
}
.playlist-profile-type-pill[data-mode=""],
.playlist-profile-type-pill.playlist-profile-type-pill--empty,
.deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode=""],
.deck-live-mode-chip.deck-live-mode-chip--profile-type.playlist-profile-type-pill--empty {
  background: rgba(14, 28, 46, 0.95);
  color: #9fb3cc;
  box-shadow: none;
}
body.theme-light .playlist-profile-type-pill[data-mode=""],
body.theme-light .playlist-profile-type-pill.playlist-profile-type-pill--empty,
body.theme-light .deck-live-mode-chip.deck-live-mode-chip--profile-type[data-mode=""],
body.theme-light .deck-live-mode-chip.deck-live-mode-chip--profile-type.playlist-profile-type-pill--empty {
  background: #f0f0f0;
  color: #64748b;
  border-color: hsl(0 0% 89.8%);
}
.deck-live-mode-chip.deck-live-mode-chip--profile-type.playlist-profile-type-pill {
  height: var(--deck-live-mode-chip-height, 30px);
  min-height: var(--deck-live-mode-chip-height, 30px);
  padding: 0 12px;
  text-transform: none;
  letter-spacing: normal;
}
.profile-type-change-modal-dialog {
  width: min(480px, 94vw);
}
.profile-type-change-intro {
  margin: -8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #9fb3cc;
}
body.theme-light .profile-type-change-intro {
  color: #64748b;
}
.profile-type-change-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.profile-type-change-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  text-align: left;
  border-radius: 10px;
  border: 1px solid rgba(80, 140, 210, 0.28);
  background: rgba(14, 28, 46, 0.65);
  color: #e5f3ff;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.profile-type-change-option:hover:not(:disabled) {
  border-color: rgba(100, 160, 230, 0.5);
  background: rgba(18, 36, 58, 0.85);
}
.profile-type-change-option--selected {
  border-color: rgba(120, 180, 255, 0.65);
  box-shadow: 0 0 0 1px rgba(120, 180, 255, 0.25);
}
.profile-type-change-option--selected[data-mode="autodj"] {
  border-color: rgba(240, 165, 0, 0.55);
  background: linear-gradient(135deg, rgba(255, 212, 92, 0.18), rgba(240, 165, 0, 0.08));
}
.profile-type-change-option--selected[data-mode="simple"] {
  border-color: rgba(37, 193, 117, 0.55);
  background: linear-gradient(135deg, rgba(37, 193, 117, 0.18), rgba(26, 143, 84, 0.08));
}
.profile-type-change-option--selected[data-mode="crate"] {
  border-color: rgba(255, 107, 107, 0.55);
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.18), rgba(198, 40, 40, 0.08));
}
.profile-type-change-option--selected[data-mode="sets"] {
  border-color: rgba(179, 136, 255, 0.55);
  background: linear-gradient(135deg, rgba(179, 136, 255, 0.18), rgba(124, 77, 255, 0.08));
}
.profile-type-change-option:disabled,
.profile-type-change-option.profile-type-change-option--hidden {
  display: none;
}
.profile-type-change-option-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.profile-type-change-option-desc {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: #9fb3cc;
  text-transform: none;
  letter-spacing: normal;
}
body.theme-light .profile-type-change-option {
  background: #fafafa;
  border-color: hsl(0 0% 89.8%);
  color: #0a0a0a;
}
/* Light theme: same visible yellow highlight for every option (mode tints are too faint) */
body.theme-light .profile-type-change-option--selected,
body.theme-light .profile-type-change-option--selected[data-mode="autodj"],
body.theme-light .profile-type-change-option--selected[data-mode="simple"],
body.theme-light .profile-type-change-option--selected[data-mode="crate"],
body.theme-light .profile-type-change-option--selected[data-mode="sets"] {
  border-color: rgba(240, 165, 0, 0.6);
  background: linear-gradient(135deg, rgba(255, 212, 92, 0.38), rgba(240, 165, 0, 0.16));
  box-shadow: 0 0 0 1px rgba(240, 165, 0, 0.22);
  color: #0a0a0a;
}
body.theme-light .profile-type-change-option:hover:not(:disabled),
body.theme-light .profile-type-change-option--selected:hover:not(:disabled),
body.theme-light .profile-type-change-option--selected[data-mode="autodj"]:hover:not(:disabled),
body.theme-light .profile-type-change-option--selected[data-mode="simple"]:hover:not(:disabled),
body.theme-light .profile-type-change-option--selected[data-mode="crate"]:hover:not(:disabled),
body.theme-light .profile-type-change-option--selected[data-mode="sets"]:hover:not(:disabled) {
  border-color: rgba(240, 165, 0, 0.75);
  background: linear-gradient(135deg, rgba(255, 212, 92, 0.52), rgba(240, 165, 0, 0.24));
  box-shadow: 0 0 0 1px rgba(240, 165, 0, 0.28);
  color: #0a0a0a;
}
body.theme-light .profile-type-change-option-desc {
  color: #64748b;
}
.playlist-profile-editor-row .playlist-profile-select {
  flex: 0 1 auto;
  width: min(20rem, 100%);
  min-width: 12rem;
  max-width: 20rem;
}
/* **visual profile name** — Profile Editor name combobox */
.playlist-profile-editor-row > .playlist-profile-name-combo {
  flex: 0 1 auto;
}
.playlist-profile-name-combo {
  position: relative;
  width: min(20rem, 100%);
  min-width: 12rem;
  max-width: 20rem;
}
.playlist-profile-name-combo--deck-modal {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.playlist-profile-select--native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.playlist-profile-name-combo__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.playlist-profile-name-combo__trigger:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}
.playlist-profile-name-combo__trigger-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.playlist-profile-name-combo__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playlist-profile-name-combo__chevron {
  flex-shrink: 0;
  opacity: 0.65;
  font-size: 12px;
  line-height: 1;
}
.playlist-profile-name-combo__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 3.75rem;
  min-width: 3.75rem;
  max-width: 3.75rem;
  padding: 2px 4px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
}

.playlist-profile-name-combo__pill[hidden],
.playlist-profile-name-combo__pill.playlist-profile-name-combo__pill--absent {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.playlist-profile-name-combo__trigger-inner--no-pill {
  gap: 0;
}
.scheduler-segment-profile-pill.playlist-profile-name-combo__pill {
  width: 2.65rem;
  min-width: 2.65rem;
  max-width: 2.65rem;
  padding: 1px 2px;
  font-size: 8px;
  border-radius: 4px;
}
.playlist-profile-name-combo__list {
  position: absolute;
  z-index: 120;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(80, 140, 210, 0.38);
  border-radius: 8px;
  background: rgba(14, 28, 46, 0.98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  padding: 4px;
}
.playlist-profile-name-combo__option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #e8eef6;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.playlist-profile-name-combo__option:hover,
.playlist-profile-name-combo__option.is-selected {
  background: rgba(80, 140, 210, 0.18);
}
.playlist-profile-name-combo__option-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.playlist-profile-name-combo__option--no-pill {
  gap: 0;
}
body.theme-light .playlist-profile-name-combo__list {
  background: #fff;
  border-color: hsl(0 0% 82%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
body.theme-light .playlist-profile-name-combo__option {
  color: #171717;
}
body.theme-light .playlist-profile-name-combo__option:hover,
body.theme-light .playlist-profile-name-combo__option.is-selected {
  background: rgba(109, 179, 255, 0.14);
}
/* **visual profile name** end */
.playlist-profile-type-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.playlist-profile-type-change-btn {
  flex-shrink: 0;
}
.playlist-profile-type-change-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.playlist-profile-bar .playlist-profile-btn {
  flex-shrink: 0;
}
.playlist-profile-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  flex-shrink: 0;
  font: inherit;
  line-height: 1;
  border: 1px solid rgba(80, 140, 210, 0.35);
  background: rgba(14, 28, 46, 0.95);
  color: #9fb3cc;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.playlist-profile-icon-btn:hover:not(:disabled) {
  background: rgba(23, 44, 70, 0.95);
  border-color: rgba(115, 165, 225, 0.55);
  color: #e5f3ff;
}
.playlist-profile-icon-btn__svg {
  display: block;
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.playlist-profile-icon-btn.has-tooltip {
  cursor: pointer;
}
.playlist-profile-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.playlist-profile-icon-tooltip-wrap.has-tooltip {
  cursor: default;
}
.playlist-profile-icon-tooltip-wrap.has-tooltip .playlist-profile-icon-btn:not(:disabled) {
  cursor: pointer;
}
.has-tooltip--profile-action::after {
  min-width: 0;
  max-width: 280px;
  white-space: nowrap;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: #eef4fc;
  background: rgba(16, 30, 50, 0.98);
  border: 1px solid rgba(90, 150, 220, 0.5);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
  z-index: 320;
}
.has-tooltip--profile-action::before {
  z-index: 320;
}
.has-tooltip--profile-action.has-tooltip--below::before {
  border-color: transparent transparent rgba(16, 30, 50, 0.98) transparent;
}
body.theme-light .has-tooltip--profile-action::after {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.99);
  border-color: rgba(100, 150, 210, 0.45);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
}
body.theme-light .has-tooltip--profile-action.has-tooltip--below::before {
  border-color: transparent transparent rgba(255, 255, 255, 0.99) transparent;
}
.has-tooltip--compact::after {
  min-width: 0;
  max-width: 240px;
  white-space: nowrap;
  padding: 6px 10px;
  bottom: calc(100% + 8px);
  font-size: 11px;
  line-height: 1.35;
}
.has-tooltip--compact::before {
  bottom: calc(100% + 3px);
}
.has-tooltip--below::after {
  bottom: auto;
  top: calc(100% + 8px);
}
.has-tooltip--below::before {
  bottom: auto;
  top: calc(100% + 3px);
  border-color: transparent transparent rgba(15, 15, 15, 0.95) transparent;
}
body.theme-light .has-tooltip--below::before {
  border-color: transparent transparent rgba(255, 255, 255, 0.98) transparent;
}
.scheduler-column-control-btn.has-tooltip,
.scheduler-segment-delete.has-tooltip {
  cursor: pointer;
}
.scheduler-column-control-btn.has-tooltip::after,
.scheduler-column-control-btn.has-tooltip::before,
.scheduler-segment-delete.has-tooltip::after,
.scheduler-segment-delete.has-tooltip::before {
  z-index: 100;
}
body.theme-light .playlist-profile-icon-btn {
  background: #f0f0f0;
  border-color: hsl(0 0% 89.8%);
  color: #525252;
}
body.theme-light .playlist-profile-icon-btn:hover:not(:disabled) {
  background: #e5e5e5;
  border-color: hsl(0 0% 80%);
  color: #171717;
}
/* Profile + Scheduler editor name selects — shared sizing */
#panel-playlists .playlist-profile-editor-row > .playlist-profile-name-combo,
#panel-playlists .playlist-profile-editor-row > .playlist-profile-select,
#panel-scheduler .playlist-profile-editor-row > .playlist-profile-name-combo,
#panel-scheduler .playlist-profile-editor-row > .playlist-profile-select {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 20rem;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
#panel-playlists .playlist-profile-btn {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8ca0b9;
}
#panel-playlists .playlist-profile-btn.pool-btn-new {
  color: #6db3ff;
}
#panel-playlists .playlist-profile-btn.pool-btn-delete {
  color: #ff7070;
}
body.theme-light .playlist-profile-editor-settings-box #playlistTabs > .playlists-body.playlist-profile-editor-card,
body.theme-light #panel-settings .settings-editor-settings-box .settings-tab-panels {
  background: #fafbfc;
}
body.theme-light .playlist-tab-panels .playlist-tab-panel > .panel-body.is-setting-section-off {
  background: transparent !important;
  border: none !important;
  filter: saturate(0.55) brightness(0.98);
  opacity: 1;
}
body.theme-light .profile-settings-cell.is-setting-section-off,
body.theme-light .next-track-engine-cell.is-setting-section-off {
  background: transparent !important;
  opacity: 1;
}
body.theme-light .profile-settings-cell.is-setting-section-off .nte-section-meta,
body.theme-light .profile-settings-cell.is-setting-section-off .nte-section-controls,
body.theme-light .next-track-engine-cell.is-setting-section-off > .panel-title-toggle,
body.theme-light .next-track-engine-cell.is-setting-section-off > .nte-section-controls {
  filter: saturate(0.55) brightness(0.98);
}
body.theme-light .profile-settings-cell.is-setting-section-off .nte-section-meta,
body.theme-light .profile-settings-cell.is-setting-section-off .nte-section-controls,
body.theme-light .next-track-engine-cell.is-setting-section-off .nte-section-meta,
body.theme-light .next-track-engine-cell.is-setting-section-off .nte-section-controls {
  filter: saturate(0.55) brightness(0.98);
}
body.theme-light .playlist-tab-panels .playlist-tab-panel > .panel-body.is-setting-section-off .panel-title-toggle h3,
body.theme-light .profile-settings-cell.is-setting-section-off .panel-title-toggle h3,
body.theme-light .next-track-engine-cell.is-setting-section-off .panel-title-toggle h3 {
  color: #94a3b8 !important;
}
body.theme-light .playlist-profile-editor-box,
body.theme-light .playlist-profile-editor-settings-box {
  background: #fff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
body.theme-light #panel-track-pools-manager .track-pools-editor-settings-box .pool-results-list {
  background: #fafafa;
  border-color: hsl(0 0% 89.8%);
}
body.theme-light #panel-playlists .playlist-profile-editor-row > .playlist-profile-name-combo__trigger,
body.theme-light #panel-playlists .playlist-profile-editor-row > .playlist-profile-select,
body.theme-light #panel-scheduler .playlist-profile-editor-row > .playlist-profile-name-combo__trigger,
body.theme-light #panel-scheduler .playlist-profile-editor-row > .playlist-profile-select {
  color: #0a0a0a;
}
body.theme-light #panel-playlists .playlist-profile-btn,
body.theme-light #panel-scheduler .scheduler-profile-btn {
  color: #525252;
}
body.theme-light #panel-playlists .playlist-profile-btn.pool-btn-new,
body.theme-light #panel-scheduler .scheduler-profile-btn.pool-btn-new {
  color: #171717;
}
body.theme-light #panel-playlists .playlist-profile-btn.pool-btn-delete,
body.theme-light #panel-scheduler .scheduler-profile-btn.pool-btn-delete {
  color: #dc2626;
}
.scheduler-menu-row{display:flex;align-items:center;gap:10px;margin-top:6px}
.scheduler-menu-row .sidebar-item{flex:1;margin:0}
@media (max-width: 900px) {
  .scheduler-inspector { width: 100%; }
  .scheduler-grid.scheduler-grid--week { grid-template-columns: repeat(2, 1fr); }
  .scheduler-grid-wrapper { width: calc(100% - 12px); margin-left: 12px; }
  .scheduler-toolbar .pool-header-bar .pool-btn-new,
  .scheduler-toolbar .pool-header-bar .pool-btn-save,
  .scheduler-toolbar .pool-header-bar .pool-btn-delete {
    min-height: 44px;
    padding: 8px 12px;
    touch-action: manipulation;
  }
}
@media (max-width: 640px) {
  .scheduler-grid-wrapper { width: calc(100% - 8px); margin-left: 8px; max-height: 480px; }
}

.panel-message.error {
  color: #ff6b6b;
}
.form-label {
  font-weight: 600;
  font-size: 16px;
  color: #f0f0f0;
}
.form-row--split {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.form-row--split .form-field {
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-control--compact {
  max-width: 280px;
}
.repeat-range-row .form-field {
  max-width: 280px;
}
.repeat-range-row .range-control--mini {
  width: 160px;
}
.progression-select-row .form-field {
  flex: 1 1 200px;
}

/* Progression controls container */
.progression-controls-container {
  margin-bottom: 0;
}
#panel-setprog.profile-settings-tab .progression-shift-options {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--nte-checkbox-gap, 16px);
  margin-top: 0;
  width: 100%;
  --progression-shift-label-width: auto;
  --progression-shift-control-width: 10rem;
  --progression-shift-control-min: 8.5rem;
  --progression-harmonic-mix-width: 18rem;
}
#panel-setprog .progression-shift-options {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 2rem;
}
#panel-setprog.profile-settings-tab .progression-shift-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px var(--nte-field-row-gap-x, 28px);
  width: 100%;
}
#panel-setprog.profile-settings-tab .progression-shift-row--sonic {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
#panel-setprog.profile-settings-tab .progression-shift-row--harmonic {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
#panel-setprog.profile-settings-tab .progression-shift-row--sonic .progression-shift-option,
#panel-setprog.profile-settings-tab .progression-shift-row--harmonic .progression-shift-option {
  flex: 0 0 auto;
  white-space: nowrap;
}
#panel-setprog.profile-settings-tab .progression-shift-row--sonic .progression-shift-option span,
#panel-setprog.profile-settings-tab .progression-shift-row--harmonic .progression-shift-option span {
  white-space: nowrap;
}
#panel-setprog.profile-settings-tab .progression-shift-row .progression-shift-option {
  align-self: center;
  margin-bottom: 0;
}
#panel-setprog.profile-settings-tab .progression-sonic-preset-pair {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  width: auto;
}
#panel-setprog.profile-settings-tab .progression-harmonic-mode-pair {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--nte-field-label-gap, 12px);
  margin: 0;
  flex: 1 1 var(--progression-harmonic-mix-width, 18rem);
  min-width: var(--progression-harmonic-mix-width, 18rem);
  max-width: 100%;
  width: auto;
}
#panel-setprog.profile-settings-tab .progression-sonic-preset-pair .form-label {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  white-space: nowrap;
}
#panel-setprog.profile-settings-tab .progression-harmonic-mode-pair .form-label {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  white-space: nowrap;
}
#panel-setprog.profile-settings-tab .progression-sonic-preset-pair select.form-control--compact {
  flex: 1 1 auto;
  width: auto;
  min-width: var(--progression-shift-control-min);
  max-width: var(--progression-shift-control-width);
  box-sizing: border-box;
}
#panel-setprog.profile-settings-tab .progression-harmonic-mode-pair .mix-type-combo-row {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: var(--progression-harmonic-mix-width, 18rem);
  box-sizing: border-box;
}
#panel-setprog.profile-settings-tab .progression-harmonic-mode-pair .mix-type-multiselect,
#panel-setprog.profile-settings-tab .progression-harmonic-mode-pair .mix-type-multiselect__trigger.form-control--compact {
  width: 100%;
  min-width: 0;
  max-width: var(--progression-harmonic-mix-width, 18rem);
}
#panel-setprog.profile-settings-tab .progression-harmonic-mode-pair .mix-type-multiselect__panel {
  min-width: var(--progression-harmonic-mix-width, 18rem);
}
#panel-setprog.profile-settings-tab .progression-select-row {
  align-items: flex-start;
}
#panel-setprog.profile-settings-tab .progression-toth-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--nte-checkbox-gap, 16px);
  width: 100%;
}
#panel-setprog.profile-settings-tab .progression-ident-before-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
#panel-setprog .progression-ident-rotation-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  width: 100%;
}
#panel-setprog .progression-ident-rotation-pair {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
}
#panel-setprog .progression-ident-choose-btn {
  flex: 0 0 auto;
  margin: 0;
}
#panel-setprog .progression-shift-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  width: 100%;
}
/* Profile editor inline checkboxes (Progression, Crate, NTE tempo, etc.) */
.profile-settings-tab .checkbox-label.progression-shift-option,
#panel-setprog .progression-shift-option {
  font-size: 13px;
  font-weight: 400;
  color: #94b4cf;
  flex: 0 0 auto;
}
.profile-settings-tab .checkbox-label.progression-shift-option span,
#panel-setprog .progression-shift-option span {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
#panel-setprog.profile-settings-tab .progression-advanced-section {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--nte-checkbox-gap, 16px);
  width: 100%;
}
#panel-setprog .progression-advanced-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 180, 207, 0.15);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}
#panel-setprog .progression-advanced-heading {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a9bb8;
}
#panel-setprog .progression-advanced-hint {
  margin: 0;
}
#panel-setprog .progression-ident-before-row,
#panel-setprog .progression-toth-fade-row {
  width: 100%;
}
#panel-setprog .progression-sonic-preset-pair {
  margin: 0;
  flex: 1 1 auto;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#panel-setprog .progression-harmonic-mode-pair {
  margin: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--nte-field-label-gap, 12px);
  min-width: 0;
}
#panel-setprog .progression-sonic-preset-pair .form-label {
  margin-bottom: 0;
  white-space: nowrap;
}
#panel-setprog .progression-sonic-preset-pair select.form-control--compact {
  width: 11rem;
  min-width: 11rem;
  max-width: 11rem;
}
#panel-setprog .progression-harmonic-mode-pair select.form-control--compact {
  width: 11rem;
  min-width: 11rem;
  max-width: 11rem;
}
body.theme-light .profile-settings-tab .checkbox-label.progression-shift-option,
body.theme-light #panel-setprog .progression-shift-option {
  color: rgba(0, 0, 0, 0.5);
}

/* Sets Flow: top-align controls — default form-row--split uses flex-end, so a taller third column made “When set completes” sit higher */
#panel-sets-flow.is-sets-sim-running .sets-flow-chart,
#panel-sets-flow.is-sets-sim-running .sets-flow-toolbar,
#panel-sets-flow.is-sets-sim-running .form-actions {
  pointer-events: none;
  opacity: 0.78;
  user-select: none;
}

#panel-sets-flow.is-sets-sim-running .sets-flow-sim-overlay {
  pointer-events: auto;
  opacity: 1;
}

#panel-sets-flow .sets-flow-sim-status--running {
  color: #93c5fd;
  font-weight: 600;
}

#panel-sets-flow .sets-flow-sim-status--complete {
  color: #86efac;
}

body.theme-light #panel-sets-flow .sets-flow-sim-status--running {
  color: #1d4ed8;
}

body.theme-light #panel-sets-flow .sets-flow-sim-status--complete {
  color: #15803d;
}

#panel-sets-flow .form-row--split {
  align-items: flex-start;
}

#panel-sets-flow .sets-flow-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
}

#panel-sets-flow .sets-flow-toolbar__row {
  width: 100%;
}

#panel-sets-flow .sets-flow-toolbar__row:not(.sets-flow-toolbar__row--end) {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 20px;
}

#panel-sets-flow .sets-flow-toolbar__spread-group {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  justify-content: space-evenly;
  gap: 20px;
  min-width: 0;
}

#panel-sets-flow .sets-flow-toolbar__row--end {
  justify-content: flex-start;
}

#panel-sets-flow .nte-inline-row--multi {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

#panel-sets-flow .nte-inline-row--multi .nte-field-pair {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
}

#panel-sets-flow .nte-inline-row--multi .nte-field-pair .form-label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: #8ca0b9;
}

#panel-sets-flow .nte-inline-row--multi .nte-field-pair select.form-control--compact,
#panel-sets-flow .nte-inline-row--multi .nte-field-pair .form-control--compact {
  flex: 0 0 auto;
  height: 32px;
  box-sizing: border-box;
}


#panel-sets-flow .nte-field-pair--sets-shuffle select {
  width: 7.5rem;
  min-width: 7.5rem;
  max-width: 7.5rem;
}

.sets-flow-chart__scoring-lanes {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

#panel-sets-flow .sets-flow-chart__lane {
  position: relative;
}

.sets-flow-chart__lane.is-scoring-lane-dragging {
  opacity: 1;
}

.sets-flow-chart__lane.is-scoring-lane-dragging::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(96, 165, 250, 0.55);
  border-radius: var(--sfc-inner-radius, 8px);
  background: rgba(96, 165, 250, 0.06);
  pointer-events: none;
  z-index: 6;
}

body.theme-light .sets-flow-chart__lane.is-scoring-lane-dragging::after {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.05);
}

.sets-flow-chart__lane-title--pill {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.18);
}

body.theme-light .sets-flow-chart__lane-title--pill {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 1px 2px rgba(15, 23, 42, 0.06);
}

.sets-flow-chart__lane-plot--card {
  border-radius: var(--sfc-inner-radius, 8px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 3px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  background: rgba(12, 17, 28, 0.28);
}

body.theme-light .sets-flow-chart__lane-plot--card {
  border-color: rgba(15, 23, 42, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 1px 2px rgba(15, 23, 42, 0.07);
  background: rgba(248, 250, 252, 0.72);
}

.sets-flow-chart__lane-plot--card > canvas {
  border-radius: 0;
  box-shadow: none;
}

.sets-flow-chart__lane-label.sets-flow-chart__lane-label--reorder {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.sets-lane-priority-handle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(148, 163, 184, 0.65);
  font-size: 0.75rem;
  line-height: 1;
  text-align: left;
  cursor: grab;
  touch-action: none;
}

.sets-flow-chart__lane-label--reorder > .sets-flow-chart__lane-title {
  flex: 0 1 auto;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
}

.sets-flow-chart__lane-label--reorder > .sets-flow-curve-mode {
  flex: 0 1 auto;
  min-width: 0;
  text-align: left;
}

.sets-flow-chart__lane-label.sets-flow-chart__lane-label--no-handle {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.sets-flow-chart__lane-label--no-handle > .sets-flow-chart__lane-title {
  flex: 0 1 auto;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
}

.sets-flow-chart__lane-label-stack {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.sets-lane-priority-handle--spacer {
  visibility: hidden;
  pointer-events: none;
  cursor: default;
}

.sets-lane-priority-handle:hover,
.sets-lane-priority-handle:focus-visible {
  color: rgba(96, 165, 250, 0.95);
  outline: none;
}

.sets-lane-priority-handle:active {
  cursor: grabbing;
}

#panel-sets-flow .numeric-stepper--mini {
  border-radius: 6px;
  height: 32px;
  flex: 0 0 auto;
  align-self: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 2px 6px rgba(0, 0, 0, 0.28);
}

#panel-sets-flow .numeric-stepper--mini .stepper-button {
  width: 20px;
  min-width: 20px;
  height: 100%;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  border-radius: 0;
}

#panel-sets-flow .numeric-stepper--mini .stepper-input {
  width: 26px;
  min-width: 26px;
  max-width: 26px;
  height: 100%;
  font-size: 12px;
  font-weight: 500;
  line-height: 32px;
  padding: 0 1px;
}

#panel-sets-flow .nte-field-pair--sets-length select.form-control--compact {
  width: 4.75rem;
  min-width: 4.75rem;
  max-width: 4.75rem;
  padding-left: 0.45rem;
  padding-right: 1.35rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#panel-sets-flow .nte-field-pair--sets-end {
  min-width: 0;
}

#panel-sets-flow .nte-field-pair--sets-end .playlist-profile-name-combo--compact {
  width: 16rem;
  min-width: 16rem;
  max-width: min(16rem, 100%);
}

#panel-sets-flow .nte-field-pair--sets-end .playlist-profile-name-combo__trigger {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 32px;
  box-sizing: border-box;
}

#panel-sets-flow .nte-field-pair--sets-smart-segue .switch--compact {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  #panel-sets-flow .sets-flow-toolbar__row:not(.sets-flow-toolbar__row--end) {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  #panel-sets-flow .sets-flow-toolbar__spread-group {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  #panel-sets-flow .nte-field-pair--sets-end .playlist-profile-name-combo--compact {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

/* Sets flow chart — BPM + harmonic; label column aligns with Set length label, plot with combo */
.sets-flow-chart {
  --sfc-radius: 12px;
  --sfc-inner-radius: 8px;
  --sfc-surface-bg: rgba(12, 17, 28, 0.78);
  --sfc-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --flow-chart-pad-x: 28px;
  --flow-bpm-edge-overdraw: var(--flow-chart-pad-x);
  --sets-flow-label-col: 4.5rem;
  --sets-flow-label-gap: 0.625rem;
  --sets-lane-handle-gutter: 1rem;
  min-width: 0;
  max-width: 100%;
}

.progression-graph-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 0.75rem;
  overflow-x: hidden;
}

/* Shared row titles inside the chart surface (same column + type ramp as Harmonic) */
.sets-flow-chart__section-label {
  display: block;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(148, 163, 184, 0.95);
}

body.theme-light .sets-flow-chart__section-label {
  color: #64748b;
}

.progression-graph-edit-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.progression-graph-edit-label {
  font-size: 14px;
  font-weight: 600;
  color: #8ca0b9;
}

.progression-graph-edit-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 14px;
}

.progression-graph-edit-radio span {
  font-size: 14px;
}

.sets-flow-chart__surface.progression-graph-wrapper,
.progression-graph-wrapper {
  position: relative;
  background: var(--sfc-surface-bg, rgba(12, 17, 28, 0.78));
  border: none;
  border-radius: var(--sfc-radius, 12px);
  padding: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  box-shadow: var(--sfc-shadow);
  overflow: hidden;
}

#panel-sets-flow .sets-flow-chart__surface.progression-graph-wrapper {
  padding: 10px;
}

.sets-flow-chart__lanes {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

#panel-sets-flow .sets-flow-chart__lane {
  display: grid;
  grid-template-columns: var(--sets-flow-label-col, 4.5rem) minmax(0, 1fr);
  column-gap: var(--sets-flow-label-gap, 0.625rem);
  align-items: stretch;
  min-width: 0;
}

.sets-flow-chart__lane {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.625rem;
  align-items: stretch;
  min-width: 0;
}

.sets-flow-chart__lane-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.125rem;
  min-width: 0;
  padding: 0.25rem 0;
}

.sets-flow-chart__lane-plot {
  position: relative;
  min-width: 0;
}

.sets-flow-harmonic-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.sets-flow-harmonic-transition {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.55);
  color: inherit;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.sets-flow-harmonic-transition:hover,
.sets-flow-harmonic-transition:focus-visible {
  border-color: rgba(96, 165, 250, 0.65);
  background: rgba(30, 41, 59, 0.82);
  outline: none;
  transform: translate(-50%, -50%) scale(1.06);
}

.sets-flow-harmonic-transition--empty {
  border-style: dashed;
  opacity: 0.72;
}

.sets-flow-harmonic-transition__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.sets-flow-harmonic-transition__icon .harmonic-transition-icon-wrap {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.sets-flow-harmonic-transition__icon .harmonic-transition-icon {
  width: 18px;
  height: 18px;
}

.sets-flow-harmonic-transition__icon--any {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(148, 163, 184, 0.9);
}

body.theme-light .sets-flow-harmonic-transition {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(148, 163, 184, 0.45);
}

body.theme-light .sets-flow-harmonic-transition:hover,
body.theme-light .sets-flow-harmonic-transition:focus-visible {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.45);
}

body.theme-light .sets-flow-harmonic-transition__icon--any {
  color: #64748b;
}

.sets-flow-harmonic-picker {
  position: fixed;
  z-index: 10070;
  min-width: 11.5rem;
  max-width: 14rem;
  padding: 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 24, 39, 0.97);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.sets-flow-harmonic-picker__title {
  margin: 0 0 0.35rem;
  padding: 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.sets-flow-harmonic-picker__list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sets-flow-harmonic-picker__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
}

.sets-flow-harmonic-picker__option:hover,
.sets-flow-harmonic-picker__option:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.sets-flow-harmonic-picker__option.is-selected {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(59, 130, 246, 0.12);
}

.sets-flow-harmonic-picker__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.sets-flow-harmonic-picker__actions-right {
  display: flex;
  gap: 0.5rem;
}

.sets-flow-harmonic-picker__btn {
  margin: 0;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.85);
  color: rgba(226, 232, 240, 0.95);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.sets-flow-harmonic-picker__btn--apply {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(37, 99, 235, 0.35);
}

.sets-flow-harmonic-picker__btn:hover,
.sets-flow-harmonic-picker__btn:focus-visible {
  filter: brightness(1.08);
}

.sets-flow-harmonic-picker__option-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
}

.sets-flow-harmonic-picker__option-icon .harmonic-transition-icon-wrap {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.sets-flow-harmonic-picker__option-icon .harmonic-transition-icon {
  width: 18px;
  height: 18px;
}

.sets-flow-harmonic-picker__option-icon--off {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
}

.sets-flow-harmonic-picker__option-label {
  min-width: 0;
  line-height: 1.2;
}

body.theme-light .sets-flow-harmonic-picker {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

body.theme-light .sets-flow-harmonic-picker__title {
  color: #64748b;
}

body.theme-light .sets-flow-harmonic-picker__option:hover,
body.theme-light .sets-flow-harmonic-picker__option:focus-visible {
  background: rgba(15, 23, 42, 0.05);
}

body.theme-light .sets-flow-harmonic-picker__option.is-selected {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(59, 130, 246, 0.1);
}

body.theme-light .sets-flow-harmonic-picker__btn {
  border-color: rgba(100, 116, 139, 0.35);
  background: rgba(248, 250, 252, 0.95);
  color: #1e293b;
}

body.theme-light .sets-flow-harmonic-picker__btn--apply {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(59, 130, 246, 0.15);
  color: #1e3a8a;
}

.sets-flow-mood-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.sets-flow-mood-transition {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.55);
  color: rgba(226, 232, 240, 0.95);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.sets-flow-mood-transition:hover,
.sets-flow-mood-transition:focus-visible {
  border-color: rgba(96, 165, 250, 0.65);
  background: rgba(30, 41, 59, 0.82);
  outline: none;
  transform: translate(-50%, -50%) scale(1.06);
}

.sets-flow-mood-transition--empty {
  border-style: dashed;
  opacity: 0.72;
}

.sets-flow-mood-transition__emoji {
  font-size: 1rem;
  line-height: 1;
}

.sets-flow-mood-transition__emoji--none {
  font-size: 0.625rem;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.9);
}

body.theme-light .sets-flow-mood-transition {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(148, 163, 184, 0.45);
  color: #334155;
}

body.theme-light .sets-flow-mood-transition:hover,
body.theme-light .sets-flow-mood-transition:focus-visible {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.45);
}

body.theme-light .sets-flow-mood-transition__emoji--none {
  color: #64748b;
}

.sets-flow-mood-picker {
  position: fixed;
  z-index: 10070;
  min-width: 11.5rem;
  max-width: 14rem;
  padding: 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 24, 39, 0.97);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.sets-flow-mood-picker__title {
  margin: 0 0 0.35rem;
  padding: 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.sets-flow-mood-picker__list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  max-height: min(16rem, 50vh);
  overflow-y: auto;
}

.sets-flow-mood-picker__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.5rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sets-flow-mood-picker__option:hover,
.sets-flow-mood-picker__option:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.sets-flow-mood-picker__option-emoji {
  flex: 0 0 1.25rem;
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
}

.sets-flow-mood-picker__option--none .sets-flow-mood-picker__option-emoji {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.95);
}

.sets-flow-mood-picker__option-label {
  font-size: 0.8125rem;
  font-weight: 500;
}

.sets-flow-mood-picker__option--none .sets-flow-mood-picker__option-label {
  color: rgba(148, 163, 184, 0.95);
}

body.theme-light .sets-flow-mood-picker {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}

body.theme-light .sets-flow-mood-picker__title {
  color: #64748b;
}

body.theme-light .sets-flow-mood-picker__option:hover,
body.theme-light .sets-flow-mood-picker__option:focus-visible {
  background: rgba(15, 23, 42, 0.05);
}

.sets-flow-similar-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.sets-flow-similar-transition {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.55);
  color: rgba(226, 232, 240, 0.95);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.sets-flow-similar-transition:hover,
.sets-flow-similar-transition:focus-visible {
  border-color: rgba(96, 165, 250, 0.65);
  background: rgba(30, 41, 59, 0.82);
  outline: none;
  transform: translate(-50%, -50%) scale(1.06);
}

.sets-flow-similar-transition--empty {
  border-style: dashed;
  opacity: 0.72;
}

.sets-flow-similar-transition__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  min-width: 0;
  min-height: 0;
}

.sets-flow-similar-transition__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.sets-flow-similar-transition__icon--similar .sonic-selection-icon--target {
  color: #6ee7a1;
}

.sets-flow-similar-transition__icon--different .sonic-selection-icon--mix {
  color: #ff8a80;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
}

.sets-flow-similar-transition--similar:not(.sets-flow-similar-transition--empty) {
  border-color: rgba(52, 211, 153, 0.45);
}

.sets-flow-similar-transition--different:not(.sets-flow-similar-transition--empty) {
  border-color: rgba(251, 191, 36, 0.5);
}

body.theme-light .sets-flow-similar-transition {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(148, 163, 184, 0.45);
  color: #334155;
}

body.theme-light .sets-flow-similar-transition:hover,
body.theme-light .sets-flow-similar-transition:focus-visible {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.45);
}

body.theme-light .sets-flow-similar-transition__icon--similar .sonic-selection-icon--target {
  color: #16a34a;
}

body.theme-light .sets-flow-similar-transition__icon--different .sonic-selection-icon--mix {
  color: #dc2626;
}

.sets-flow-similar-picker {
  position: fixed;
  z-index: 10070;
  width: 10.75rem;
  padding: 0.4rem 0.45rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 24, 39, 0.97);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.sets-flow-similar-picker__title {
  margin: 0 0 0.3rem;
  padding: 0 0.1rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.sets-flow-similar-picker__modes {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
}

.sets-flow-similar-picker__mode {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding: 0.28rem 0.15rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.45);
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
}

.sets-flow-similar-picker__mode:hover,
.sets-flow-similar-picker__mode:focus-visible {
  border-color: rgba(96, 165, 250, 0.55);
  outline: none;
}

.sets-flow-similar-picker__mode.is-active[data-similar-mode='similar'] {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.sets-flow-similar-picker__mode.is-active[data-similar-mode='different'] {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}

.sets-flow-similar-picker__mode.is-active[data-similar-mode='off'] {
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(148, 163, 184, 0.12);
}

.sets-flow-similar-picker__preset {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
}

.sets-flow-similar-picker__preset.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.sets-flow-similar-picker__preset-label {
  font-size: 0.625rem;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.95);
}

.sets-flow-similar-picker__preset .form-control--compact {
  min-height: 1.65rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.6875rem;
}

body.theme-light .sets-flow-similar-picker {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}

body.theme-light .sets-flow-similar-picker__title {
  color: #64748b;
}

body.theme-light .sets-flow-similar-picker__mode {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(148, 163, 184, 0.45);
  color: #334155;
}

body.theme-light .sets-flow-similar-picker__mode:hover,
body.theme-light .sets-flow-similar-picker__mode:focus-visible {
  border-color: rgba(37, 99, 235, 0.45);
}

body.theme-light .sets-flow-similar-picker__mode.is-active[data-similar-mode='similar']:hover,
body.theme-light .sets-flow-similar-picker__mode.is-active[data-similar-mode='similar']:focus-visible {
  border-color: #15803d;
  background: #15803d;
  color: #fff;
}

body.theme-light .sets-flow-similar-picker__mode.is-active[data-similar-mode='different']:hover,
body.theme-light .sets-flow-similar-picker__mode.is-active[data-similar-mode='different']:focus-visible {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff;
}

body.theme-light .sets-flow-similar-picker__preset-label {
  color: #64748b;
}

.sets-flow-chart__lane-plot--genre {
  min-height: 56px;
}

.sets-flow-sim-sweep {
  display: none;
  position: relative;
  width: 100%;
  height: 2px;
  margin-top: 0.2rem;
  overflow: hidden;
  border-radius: 1px;
  background: rgba(148, 163, 184, 0.18);
}

.sets-flow-sim-sweep::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 38%;
  height: 100%;
  border-radius: 1px;
  background: #60a5fa;
  animation: sets-flow-sim-sweep 1.15s ease-in-out infinite alternate;
}

#panel-sets-flow.is-sets-sim-running .sets-flow-sim-sweep {
  display: block;
}

@keyframes sets-flow-sim-sweep {
  0% {
    transform: translateX(-105%);
  }
  100% {
    transform: translateX(365%);
  }
}

body.theme-light .sets-flow-sim-sweep {
  background: rgba(100, 116, 139, 0.2);
}

body.theme-light .sets-flow-sim-sweep::after {
  background: #2563eb;
}

.sets-flow-sim-debug {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  padding: 0.5rem 0.625rem 0.625rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.35);
  min-width: 0;
}

.sets-flow-sim-debug__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.95);
  letter-spacing: -0.01em;
}

.sets-flow-sim-debug__body {
  margin-top: 0.35rem;
  max-height: 9rem;
  overflow: auto;
}

.sets-flow-sim-debug__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.6875rem;
  line-height: 1.35;
}

.sets-flow-sim-debug__table th,
.sets-flow-sim-debug__table td {
  padding: 0.2rem 0.35rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.sets-flow-sim-debug__table th {
  color: rgba(148, 163, 184, 0.85);
  font-weight: 600;
}

.sets-flow-sim-debug__track {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-light .sets-flow-sim-debug {
  background: rgba(248, 250, 252, 0.92);
  border-color: rgba(100, 116, 139, 0.25);
}

body.theme-light .sets-flow-sim-debug__title {
  color: #64748b;
}

.sets-flow-chart__lane-plot--simulate {
  position: relative;
  min-height: 40px;
}

.sets-flow-sim-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.sets-flow-sim-cell {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  background: none;
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  pointer-events: auto;
  cursor: default;
}

.sets-flow-sim-cell--perfect {
  color: #4ade80;
  font-size: 0.9375rem;
  font-weight: 700;
}

.sets-flow-sim-cell--score {
  color: rgba(226, 232, 240, 0.88);
  font-weight: 600;
}

.sets-flow-sim-cell--failed {
  color: #f87171;
  font-size: 0.875rem;
  font-weight: 700;
}

.sets-flow-sim-cell--skipped {
  color: rgba(148, 163, 184, 0.72);
  font-size: 0.8125rem;
  font-weight: 600;
}

.sets-flow-sim-cell--empty-hint {
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: 4px;
  color: rgba(148, 163, 184, 0.55);
  font-weight: 500;
  pointer-events: none;
}

body.theme-light .sets-flow-sim-cell--perfect {
  color: #16a34a;
}

body.theme-light .sets-flow-sim-cell--score {
  color: #334155;
}

body.theme-light .sets-flow-sim-cell--failed {
  color: #dc2626;
}

body.theme-light .sets-flow-sim-cell--skipped {
  color: #64748b;
}

body.theme-light .sets-flow-sim-cell--empty-hint {
  color: rgba(100, 116, 139, 0.55);
}

.sets-flow-genre-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.sets-flow-genre-drag-preview {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border: 1px dashed rgba(96, 165, 250, 0.75);
  border-radius: 6px;
  background: rgba(96, 165, 250, 0.12);
  pointer-events: none;
  z-index: 1;
}

.sets-flow-genre-block {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.62);
  color: rgba(226, 232, 240, 0.95);
  cursor: grab;
  pointer-events: auto;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  overflow: visible;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.sets-flow-genre-block[data-genre-hue] {
  border-color: hsl(var(--genre-block-hue) 50% 54% / 0.62);
  background: hsl(var(--genre-block-hue) 48% 34% / 0.88);
  color: hsl(var(--genre-block-hue) 22% 94%);
}

.sets-flow-genre-block[data-genre-hue]:hover,
.sets-flow-genre-block[data-genre-hue]:focus-visible {
  border-color: hsl(var(--genre-block-hue) 54% 60% / 0.78);
  background: hsl(var(--genre-block-hue) 52% 38% / 0.94);
}

.sets-flow-genre-block.is-dragging {
  cursor: grabbing;
}

.sets-flow-genre-block:hover:not([data-genre-hue]),
.sets-flow-genre-block:focus-visible:not([data-genre-hue]) {
  border-color: rgba(96, 165, 250, 0.65);
  background: rgba(30, 41, 59, 0.88);
  outline: none;
}

.sets-flow-genre-block--empty {
  border-style: dashed;
  opacity: 0.78;
}

.sets-flow-genre-block__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  pointer-events: none;
}

.sets-flow-genre-block__handle {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 10px;
  cursor: ew-resize;
  pointer-events: auto;
  z-index: 3;
}

.sets-flow-genre-block__handle--left {
  left: -3px;
}

.sets-flow-genre-block__handle--right {
  right: -3px;
}

.sets-flow-genre-picker {
  position: fixed;
  z-index: 10070;
  min-width: 240px;
  max-width: min(92vw, 320px);
  padding: 0.65rem 0.75rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.97);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.sets-flow-genre-picker__title {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(226, 232, 240, 0.95);
}

.sets-flow-genre-picker__body .form-label,
.sets-flow-genre-picker__body .pool-filter-section-label {
  font-size: 0.6875rem;
  margin-bottom: 0.25rem;
}

.sets-flow-genre-picker__body .form-control {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.sets-flow-genre-picker__body .pool-genre-mode-row {
  margin-bottom: 0.5rem;
}

.sets-flow-genre-picker__body .pool-genre-subs-wrap[hidden] {
  display: none !important;
}

.sets-flow-genre-picker__body .pool-genre-subs-list {
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 0.35rem;
}

.sets-flow-genre-picker__body .pool-genre-sub-option {
  font-size: 0.75rem;
  padding: 0.15rem 0;
  color: rgba(226, 232, 240, 0.95);
}

.sets-flow-genre-picker__body .pool-genre-sub-option span {
  color: inherit;
}

body.theme-light .sets-flow-genre-picker__body .pool-genre-sub-option {
  color: #334155;
}

.sets-flow-genre-picker__body .form-hint {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.9);
}

body.theme-light .sets-flow-genre-picker__body .form-hint {
  color: #64748b;
}

.sets-flow-genre-picker__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.sets-flow-genre-picker__actions-right {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.sets-flow-genre-picker__btn {
  margin: 0;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.85);
  color: rgba(226, 232, 240, 0.95);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.sets-flow-genre-picker__btn--apply {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(37, 99, 235, 0.35);
}

.sets-flow-genre-picker__btn--remove {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.35);
  color: rgba(254, 202, 202, 0.95);
}

.sets-flow-genre-picker__btn--remove[hidden] {
  display: none !important;
}

.sets-flow-genre-picker__btn:hover,
.sets-flow-genre-picker__btn:focus-visible {
  outline: none;
  filter: brightness(1.08);
}

body.theme-light .sets-flow-genre-block {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(148, 163, 184, 0.45);
  color: #0f172a;
}

body.theme-light .sets-flow-genre-block[data-genre-hue] {
  border-color: hsl(var(--genre-block-hue) 42% 38% / 0.48);
  background: hsl(var(--genre-block-hue) 48% 88% / 0.94);
  color: hsl(var(--genre-block-hue) 52% 22%);
}

body.theme-light .sets-flow-genre-block:hover:not([data-genre-hue]),
body.theme-light .sets-flow-genre-block:focus-visible:not([data-genre-hue]) {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.45);
}

body.theme-light .sets-flow-genre-block[data-genre-hue]:hover,
body.theme-light .sets-flow-genre-block[data-genre-hue]:focus-visible {
  border-color: hsl(var(--genre-block-hue) 46% 34% / 0.58);
  background: hsl(var(--genre-block-hue) 50% 84% / 0.98);
}

body.theme-light .sets-flow-genre-picker {
  background: #fff;
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

body.theme-light .sets-flow-genre-picker__title {
  color: #0f172a;
}

body.theme-light .sets-flow-genre-picker__btn {
  background: #f8fafc;
  color: #334155;
}

body.theme-light .sets-flow-genre-picker__btn--remove {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(254, 226, 226, 0.9);
  color: #b91c1c;
}

.sets-flow-chart__lane-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(148, 163, 184, 0.95);
  line-height: 1.2;
}

.sets-flow-curve-mode {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.sets-flow-curve-mode__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin: 0;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  user-select: none;
  outline: none;
}

.sets-flow-curve-mode__item .sets-flow-curve-mode__label {
  flex: 1 1 auto;
  min-width: 0;
}

.sets-flow-curve-mode__item:not(.is-active) .sets-flow-curve-mode__label {
  color: rgba(148, 163, 184, 0.42);
}

.sets-flow-curve-mode__item:hover .sets-flow-curve-mode__label,
.sets-flow-curve-mode__item:focus-visible .sets-flow-curve-mode__label {
  color: rgba(226, 232, 240, 0.92);
}

.sets-flow-curve-mode__item.is-active .sets-flow-curve-mode__label {
  color: rgba(148, 163, 184, 0.95);
}

.sets-flow-curve-mode__dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.32);
}

.sets-flow-curve-mode__item.is-active .sets-flow-curve-mode__dot {
  background: #4caf50;
}

body.theme-light .sets-flow-curve-mode__item {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 1px 2px rgba(15, 23, 42, 0.06);
}

body.theme-light .sets-flow-curve-mode__item:not(.is-active) .sets-flow-curve-mode__label {
  color: rgba(100, 116, 139, 0.55);
}

body.theme-light .sets-flow-curve-mode__item:hover .sets-flow-curve-mode__label,
body.theme-light .sets-flow-curve-mode__item:focus-visible .sets-flow-curve-mode__label {
  color: #334155;
}

body.theme-light .sets-flow-curve-mode__item.is-active .sets-flow-curve-mode__label {
  color: #64748b;
}

body.theme-light .sets-flow-curve-mode__item.is-active .sets-flow-curve-mode__dot {
  background: #16a34a;
}

body.theme-light .sets-flow-chart__lane-title {
  color: #64748b;
}

.sets-flow-graph-context-menu {
  position: fixed;
  z-index: 10075;
  min-width: 9.5rem;
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 24, 39, 0.97);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.sets-flow-graph-context-menu__item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.55rem;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: rgba(248, 250, 252, 0.95);
  font: inherit;
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
}

.sets-flow-graph-context-menu__item:hover,
.sets-flow-graph-context-menu__item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

body.theme-light .sets-flow-graph-context-menu {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

body.theme-light .sets-flow-graph-context-menu__item {
  color: #0f172a;
}

body.theme-light .sets-flow-graph-context-menu__item:hover,
body.theme-light .sets-flow-graph-context-menu__item:focus-visible {
  background: rgba(15, 23, 42, 0.05);
}

#progressionGraphCanvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 200px !important;
  min-height: 200px;
  cursor: crosshair;
  background: transparent;
  border-radius: var(--sfc-inner-radius, 8px);
  box-sizing: border-box;
}

.sets-flow-chart__titles-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 6px;
  min-width: 0;
}

.sets-flow-chart__lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0;
  min-width: 0;
}

.sets-flow-chart__lane-head--bpm {
  justify-content: flex-start;
  flex: 1 1 auto;
  min-width: 140px;
}

.sets-flow-chart__lane-head--harmonic {
  justify-content: flex-end;
  flex: 0 1 auto;
}

#setsHarmonicMarkersCanvas,
#setsSimilarMarkersCanvas,
#setsMoodMarkersCanvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 56px !important;
  min-height: 56px;
  margin-top: 0;
  cursor: pointer;
  border-radius: var(--sfc-inner-radius, 8px);
  box-sizing: border-box;
  overflow: hidden;
}

#setsGenreLaneCanvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-height: 56px;
  margin-top: 0;
  cursor: crosshair;
  border-radius: var(--sfc-inner-radius, 8px);
  box-sizing: border-box;
  overflow: hidden;
}

body.theme-light .sets-flow-chart {
  --sfc-surface-bg: #f8fafc;
  --sfc-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), inset 0 1px 0 #fff;
}

body.theme-light .sets-flow-chart__surface.progression-graph-wrapper,
body.theme-light .progression-graph-wrapper {
  background: var(--sfc-surface-bg);
  border: none;
  box-shadow: var(--sfc-shadow);
}

/* Sets: harmonic mix type picker */
.harmonic-mix-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(4px);
}

body.theme-light .harmonic-mix-picker-backdrop {
  background: rgba(15, 23, 42, 0.25);
}

.harmonic-mix-picker {
  position: fixed;
  z-index: 10050;
  min-width: 288px;
  max-width: min(400px, 92vw);
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 24, 39, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  color: #f1f5f9;
  overflow: visible;
}

.mix-type-combo-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.mix-type-combo-row .form-control {
  flex: 1 1 auto;
  min-width: 0;
}

.mix-type-multiselect {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.mix-type-multiselect__trigger {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.mix-type-multiselect__trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mix-type-multiselect__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mix-type-multiselect__panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.2rem);
  left: 0;
  right: 0;
  max-height: 14rem;
  overflow-y: auto;
  padding: 0.35rem 0;
  border-radius: 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #1e293b;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.45);
}

body.theme-light .mix-type-multiselect__panel {
  background: #fff;
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.mix-type-multiselect__option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.mix-type-multiselect__option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.mix-type-multiselect__option-icon .harmonic-transition-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  line-height: 0;
}

.mix-type-multiselect__option-icon .harmonic-transition-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.mix-type-multiselect__option-label {
  min-width: 0;
  line-height: 1.3;
  white-space: nowrap;
}

.mix-type-multiselect__option:hover {
  background: rgba(148, 163, 184, 0.12);
}

.harmonic-mix-info-item.is-selected {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(59, 130, 246, 0.12);
}

.mix-type-multiselect.is-disabled .mix-type-multiselect__trigger {
  opacity: 0.55;
  pointer-events: none;
}

.mix-type-field.mix-disabled .mix-type-multiselect__trigger {
  opacity: 0.72;
}

.mix-type-help-btn {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.14);
  color: rgba(203, 213, 225, 0.95);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.mix-type-help-btn:hover,
.mix-type-help-btn:focus-visible {
  background: rgba(148, 163, 184, 0.28);
  border-color: rgba(148, 163, 184, 0.7);
  color: #f8fafc;
  outline: none;
}

body.theme-light .mix-type-help-btn {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
}

body.theme-light .mix-type-help-btn:hover,
body.theme-light .mix-type-help-btn:focus-visible {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #334155;
}

#panel-setprog .progression-harmonic-mode-pair .mix-type-multiselect,
#panel-setprog .progression-harmonic-mode-pair .mix-type-multiselect__trigger.form-control--compact {
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
  max-width: var(--progression-harmonic-mix-width, 18rem);
}

.harmonic-mix-info-overlay {
  z-index: 10060;
}

.harmonic-mix-info-modal__intro {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(203, 213, 225, 0.88);
}

.nte-section-help-overlay {
  z-index: 10055;
}

.nte-section-help-dialog {
  max-width: 440px;
  width: calc(100vw - 32px);
}

.nte-section-help-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nte-section-help-body__paragraph {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(203, 213, 225, 0.9);
}

body.theme-light .nte-section-help-body__paragraph {
  color: #64748b;
}

body.theme-light .harmonic-mix-info-modal__intro {
  color: #64748b;
}

.harmonic-mix-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding-right: 0.15rem;
}

.harmonic-mix-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.harmonic-mix-info-item:hover,
.harmonic-mix-info-item:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(96, 165, 250, 0.45);
  outline: none;
}

body.theme-light .harmonic-mix-info-item {
  border-color: #e2e8f0;
  background: #f8fafc;
}

body.theme-light .harmonic-mix-info-item:hover,
body.theme-light .harmonic-mix-info-item:focus-visible {
  background: #f1f5f9;
  border-color: #93c5fd;
}

.harmonic-mix-info-item__swatch {
  margin-top: 0.15rem;
}

.harmonic-mix-info-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.05rem;
  line-height: 0;
}

.harmonic-mix-info-item__icon .harmonic-transition-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  line-height: 0;
}

.harmonic-mix-info-item__icon .harmonic-transition-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.harmonic-mix-info-item__swatch--off {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.55);
  flex-shrink: 0;
}

.harmonic-mix-info-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.harmonic-mix-info-item__label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.harmonic-mix-info-item__desc {
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(203, 213, 225, 0.88);
}

body.theme-light .harmonic-mix-info-item__desc {
  color: #64748b;
}

body.theme-light .harmonic-mix-picker {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04) inset;
}

.harmonic-mix-picker--compact {
  min-width: 0;
  width: max-content;
  max-width: min(300px, 92vw);
  border-radius: 10px;
}

.harmonic-mix-picker__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
}

.harmonic-mix-picker--compact .harmonic-mix-picker__list {
  padding: 5px;
}

.harmonic-mix-picker__option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.6rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  line-height: 1.25;
  transition: background 0.12s ease;
  position: relative;
}

.harmonic-mix-picker__option:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.theme-light .harmonic-mix-picker__option:hover {
  background: #f1f5f9;
}

.harmonic-mix-picker__option:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.55);
  outline-offset: 0;
}

body.theme-light .harmonic-mix-picker__option:focus-visible {
  outline-color: rgba(37, 99, 235, 0.45);
}

.harmonic-mix-picker__opt-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.harmonic-mix-picker__opt-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.harmonic-mix-picker__opt-desc {
  font-size: 0.6875rem;
  font-weight: 400;
  opacity: 0.72;
  line-height: 1.35;
}

.harmonic-mix-picker__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12) inset;
}

.harmonic-mix-picker--compact .harmonic-mix-picker__swatch {
  width: 8px;
  height: 8px;
  margin-top: 2px;
}

.harmonic-mix-picker__swatch--harmonic {
  background: #2ECC71;
}

.harmonic-mix-picker__swatch--energy {
  background: #F1C40F;
}

.harmonic-mix-picker__swatch--jaws {
  background: #E74C3C;
}

.harmonic-mix-picker__swatch--pa,
.harmonic-mix-picker__swatch--pa_mix {
  background: #C0392B;
}

.harmonic-mix-picker__swatch--subtle_mood_mix {
  background: #1ABC9C;
}

.harmonic-mix-picker__swatch--fifth_mix {
  background: #E67E22;
}

body.theme-light .harmonic-mix-picker__swatch--harmonic {
  background: #2ECC71;
}

body.theme-light .harmonic-mix-picker__swatch--energy {
  background: #F1C40F;
}

body.theme-light .harmonic-mix-picker__swatch--jaws {
  background: #E74C3C;
}

body.theme-light .harmonic-mix-picker__swatch--pa,
body.theme-light .harmonic-mix-picker__swatch--pa_mix {
  background: #C0392B;
}

body.theme-light .harmonic-mix-picker__swatch--subtle_mood_mix {
  background: #1ABC9C;
}

body.theme-light .harmonic-mix-picker__swatch--fifth_mix {
  background: #E67E22;
}

.progression-controls-left {
  flex: 0 0 auto;
  min-width: 300px;
}

@media (max-width: 1200px) {
  .progression-select-row {
    flex-direction: column;
  }
  
  .progression-graph-container {
    margin-left: 0;
    margin-top: 1.5rem;
    max-width: 100%;
  }

  /* Keep Harmonic Mix & Progression controls left-aligned on narrow layouts */
  #panel-next-track-engine .form-row--split,
  #panel-mix .form-row--split,
  #panel-setprog .form-row--split {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  #panel-next-track-engine .form-row--split .form-field,
  #panel-mix .form-row--split .form-field,
  #panel-setprog .form-row--split .form-field {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }
}
/* Sets Flow Styles */
.toggle-row .toggle-hint {
  margin: 0;
  flex: 1 1 320px;
  color: #aaa;
  font-size: 14px;
}
.form-control {
  background: #1f1f1f;
  border: 1px solid #444;
  color: #eee;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
}
select.form-control,
select.form-control--compact {
  max-width: 280px;
}
.form-control:focus {
  outline: none;
  border-color: #2979ff;
  box-shadow: 0 0 0 2px rgba(41,121,255,0.25);
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.form-actions--autosave {
  justify-content: flex-end;
  min-height: 20px;
}
.autosave-status {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: rgba(240, 240, 240, 0.82);
  min-height: 1.2em;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.autosave-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.autosave-status.is-pending,
.autosave-status.is-saving {
  color: #8dc6ff;
}
.autosave-status.is-error {
  color: #ff9b9b;
}
.theme-light .autosave-status {
  color: rgba(24, 32, 48, 0.72);
}
.theme-light .autosave-status.is-pending,
.theme-light .autosave-status.is-saving {
  color: #0b63ce;
}
.theme-light .autosave-status.is-error {
  color: #c23333;
}
.checkbox-row {
  gap: 4px;
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #f0f0f0;
}
.checkbox-label input[type="checkbox"],
.track-pool-checkboxes input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid #2cc36b;
  background-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, opacity 0.15s ease;
  position: relative;
  margin-right: 6px;
}

.checkbox-label input[type="checkbox"]::after,
.track-pool-checkboxes input[type="checkbox"]::after {
  content: '✔';
  font-size: 14px;
  color: #3bff88;
  position: absolute;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.checkbox-label input[type="checkbox"]:checked,
.track-pool-checkboxes input[type="checkbox"]:checked {
  border-color: #3bff88;
  background-color: transparent;
}

.checkbox-label input[type="checkbox"]:checked::after,
.track-pool-checkboxes input[type="checkbox"]:checked::after {
  opacity: 1;
}

.checkbox-label input[type="checkbox"]:hover,
.track-pool-checkboxes input[type="checkbox"]:hover {
  opacity: 0.9;
}

.checkbox-label input[type="checkbox"]:focus-visible,
.track-pool-checkboxes input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(59, 255, 136, 0.45);
  outline-offset: 2px;
}
.range-control {
  width: 140px;
  max-width: 100%;
  accent-color: #2979ff;
}

.range-control--mini {
  width: 120px;
  max-width: 120px;
}
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 16px;
  font-size: 13px;
  color: #ccc;
}
.value-grid strong {
  color: #fff;
  margin-right: 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
  font-size: 15px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  margin: 2px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
}
.btn-primary:hover:not(:disabled),
.btn-primary:focus-visible:not(:disabled) {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}
.btn-alert {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
}
.btn-alert:hover:not(:disabled),
.btn-alert:focus-visible:not(:disabled) {
  background: #a52a2a;
  border-color: #a52a2a;
  color: #fff;
}
.btn-danger {
  border-color: #b91c1c;
  background: #dc2626;
  color: #fff;
}
.btn-danger:hover:not(:disabled),
.btn-danger:focus-visible:not(:disabled) {
  background: #b91c1c;
  border-color: #991b1b;
  color: #fff;
}
.deck-status-stack .deck-live-mode-controls .btn.deck-live-mode-change-btn {
  flex-shrink: 0;
  box-sizing: border-box;
  height: var(--deck-live-mode-chip-height, 30px);
  min-height: var(--deck-live-mode-chip-height, 30px);
  margin: 0;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.btn-secondary {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
  font-size: 13px;
  padding: 8px 16px;
}
.btn-secondary:hover:not(:disabled),
.btn-secondary:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.btn-secondary.active {
  background: #d32f2f;
  border-color: #b71c1c;
  color: #fff;
}
.btn-secondary.active:hover:not(:disabled) {
  background: #c62828;
}
.btn-success {
  border-color: #15803d;
  background: #16a34a;
  color: #fff;
}
.btn-success:hover:not(:disabled),
.btn-success:focus-visible:not(:disabled) {
  background: #15803d;
  border-color: #166534;
  color: #fff;
}
.btn-info {
  border-color: #1d4ed8;
  background: #2563eb;
  color: #fff;
}
.btn-info:hover:not(:disabled),
.btn-info:focus-visible:not(:disabled) {
  background: #1d4ed8;
  border-color: #1e40af;
  color: #fff;
}
.save-status {
  font-size: 14px;
  color: #8bc34a;
}
.save-status.error {
  color: #ff6b6b;
}
.form-hint {
  font-size: 14px;
  color: #aaa;
  margin-top: 4px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
/* Stack stations vertically on the overview page */
#grid.grid { grid-template-columns: 1fr; }
.card {
  border: 1px solid rgba(69, 118, 185, 0.4);
  border-radius: 8px;
  padding: 0;
  background: rgba(10, 20, 35, 0.92);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  color: #fff;
}
/* Station menu panels: inner cards keep boxed chrome; outer panel shell is borderless */
.station-main .panel > .card {
  border: 1px solid rgba(69, 118, 185, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}
h2.card-header {
  margin: -12px -12px 12px;
  padding: 12px 16px;
  background: rgba(14, 28, 46, 0.95);
  border-bottom: 1px solid rgba(80, 140, 210, 0.35);
  border-left: 0;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: inset 0 0 0 1px rgba(41, 96, 180, 0.12);
  color: #e5f3ff;
  font-size: 18px;
  font-weight: 600;
}
h2.card-header.panel-main-header {
  display: none;
}
h2.card-header.panel-main-header.has-controls {
  display: flex;
  justify-content: flex-start;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  margin: -12px 0 0 0;
  padding: 4px 0 8px 0;
  min-height: 0;
  font-size: 0;
  color: transparent;
}
h2.card-header.panel-main-header.has-controls > span:first-child {
  display: none;
}
h2.card-header.panel-main-header.has-controls > * {
  font-size: 14px;
}
.header-controls { display: inline-flex; align-items: center; gap: 10px; }
.playback-card .header-controls {
  margin-left: auto;
  justify-content: flex-end;
}
h1 { margin-bottom: 16px; color:#fff; font-size:12px; }
h2 { margin: 0 0 8px 0; font-size:12px; color:#fff; }
.card h2 { font-size: 18px; font-weight: 600; }
.card h2 a { text-decoration: none; color: inherit; }
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 60px;
  width: 60px;
  height: 24px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.status-badge.live {
  background: rgba(255, 77, 77, 0.2);
  border-color: rgba(255, 77, 77, 0.5);
  color: #ff4d4d;
}
.status-badge.wait {
  background: rgba(255, 165, 0, 0.2);
  border-color: rgba(255, 165, 0, 0.5);
  color: #ffa500;
}
.status-badge.cue {
  background: rgba(139, 195, 74, 0.2);
  border-color: rgba(139, 195, 74, 0.5);
  color: #8bc34a;
}
.status-badge.empty {
  background: rgba(136, 136, 136, 0.2);
  border-color: rgba(136, 136, 136, 0.5);
  color: #888;
}
.status-badge.queued {
  background: rgba(100, 181, 246, 0.2);
  border-color: rgba(100, 181, 246, 0.5);
  color: #64b5f6;
}
.status-badge.preparing {
  background: rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.5);
  color: #ffc107;
  animation: preparing-pulse 2s ease-in-out infinite;
}
@keyframes preparing-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
.live-icon { width: 18px; height: 18px; display: none; }
.remain-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(135, 206, 250, 0.5);
  background: rgba(135, 206, 250, 0.2);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 60px;
  width: 60px;
  height: 24px;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.remain-badge.remain-header { margin-right: 6px; }
.err { color: #ff6b6b; }
a { color: inherit; text-decoration: none; }
.card strong { color:#fff; font-weight:600; }
.card .value, .card .bpm, .card .key, .card .len, .card .last-prev, .card .artist-prev, .card .beats, .card .played-at, .card .now-text, .card .next-text {
  font-size: 12px;
  color: #bbb;
  font-weight: normal;
}
.playback-card .value,
.playback-card .bpm,
.playback-card .key,
.playback-card .len,
.playback-card .dfc,
.playback-card .last-prev,
.playback-card .artist-prev {
  font-size: 14px;
  color: #f0f0f0;
  font-weight: 600;
}
.playback-card .line-text,
.playback-card .queued-text,
.playback-card .meter,
.playback-card .deck2-bpm,
.playback-card .deck2-key,
.playback-card .deck2-len,
.playback-card .deck2-last-prev,
.playback-card .deck2-artist-prev {
  font-weight: 600;
  color: #f5f5f5;
}
.playback-card .now-text,
.playback-card .queued-text {
  font-size: 16px;
  font-weight: 600;
  color: #f0f0f0;
}

/* Even vertical rhythm inside station cards */
.card .line,
.card .metrics,
.card .extra > div,
.card .progress,
.card .next {
  padding: 6px 0;
}

.card .line {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 6px;
}

.card .line-now strong,
.card .line-next strong {
  display: inline-block;
  width: 110px;
}

.card .line-next .line-text { font-weight: normal; }

.card .metrics, .card .progress { align-items: center; }
.row { display: flex; gap: 16px; align-items: stretch; }
.col-flex { flex: 1 1 auto; }
.col-fixed { flex: 0 0 360px; width: 360px; }
.legend { margin-top: 8px; font-size: 12px; color: #444; display: flex; flex-wrap: wrap; gap: 12px; }
.legend .item { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 12px; height: 12px; display: inline-block; border-radius: 2px; }

/* Progress meter inspired by CSS-Tricks */
.meter { height: 14px; position: relative; background: #555; border-radius: 12px; padding: 5px 8px; box-shadow: inset 0 -1px 1px rgba(255,255,255,0.15); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 12px; background-color: #2bc253; background-image: linear-gradient(to bottom, #2bc253, #54f054); box-shadow: inset 0 2px 6px rgba(255,255,255,0.25), inset 0 -2px 4px rgba(0,0,0,0.35); width: 100%; transform-origin: left center; transform: scaleX(0); transition: transform .12s linear; }
.meter.orange > span { background-color: #f1a165; background-image: linear-gradient(to bottom, #f1a165, #f36d0a); }
.meter.red > span { background-color: #f0a3a3; background-image: linear-gradient(to bottom, #f0a3a3, #f42323); }
.meter-mini { height: 8px; padding: 0; background: transparent; box-shadow: none; border: none; }
.meter-mini > span { height: 8px; border-radius: 6px; background-image: none; }

/* Progress bar on same line, fills remaining space */
.progress { display: flex; align-items: center; gap: 8px; }
.progress strong { flex: 0 0 auto; }
.progress .meter { height: 8px; flex: 1 1 auto; padding: 0; background: #555; border: none; box-shadow: none; border-radius: 6px; }
.progress .meter > span { height: 8px; border-radius: 6px; }

table.history { width: 100%; border-collapse: collapse; }
table.history th, table.history td { padding: 6px 8px; border-bottom: 1px solid #333; }
table.history th { text-align: left; color:#ccc; }

.tooltip { position: fixed; pointer-events: none; background: rgba(30,30,30,0.95); color:#fff; border: 1px solid #444; padding: 4px 6px; border-radius: 4px; font-size: 12px; z-index: 9999; }

/* Form controls */
input[type="range"] { width: 100%; cursor: pointer; }
input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
select { font-size: 12px; }

@media (min-width: 900px) {
  .sidebar-collapse-btn {
    display: flex;
  }
  .station-layout {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
  }
  .station-sidebar {
    flex: 0 0 var(--station-sidebar-width, 200px);
    width: var(--station-sidebar-width, 200px);
    height: 100vh;
    min-height: 100vh;
    position: sticky;
    top: 0;
    margin: 0;
    padding: 0;
    border-radius: 0;
    border-right: none;
    background: rgba(14, 28, 46, 0.98);
    box-shadow: none;
    transition: width 0.2s ease, flex-basis 0.2s ease;
    overflow: hidden;
  }
  .station-top-bar {
    left: var(--station-sidebar-width, 200px);
    right: 0;
    width: auto;
    max-width: none;
    transition: left 0.2s ease;
  }
  .station-right {
    flex: 1 1 auto;
    min-width: 0;
  }
  .station-main {
    flex: 1 1 auto;
    padding-left: 24px;
    padding-right: 24px;
  }
  /* Collapsed sidebar: icon-only strip, icons in same position as full menu */
  .station-layout.sidebar-collapsed .station-sidebar {
    flex: 0 0 52px;
    width: 52px;
    min-width: 52px;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
  }
  .station-layout.sidebar-collapsed .station-top-bar {
    left: 52px;
  }
  .station-layout.sidebar-collapsed .station-sidebar .sidebar-label,
  .station-layout.sidebar-collapsed .station-sidebar .sidebar-heading,
  .station-layout.sidebar-collapsed .station-sidebar .sidebar-logo-text {
    display: none !important;
  }
  .station-layout.sidebar-collapsed .station-sidebar .sidebar-logo {
    display: flex !important;
    justify-content: center;
    padding: 0;
    height: var(--station-chrome-height, 52px);
    min-height: var(--station-chrome-height, 52px);
    max-height: var(--station-chrome-height, 52px);
  }
  .station-layout.sidebar-collapsed .station-sidebar .sidebar-logo-button {
    justify-content: center;
    width: 100%;
  }
  body.stations-page .station-layout.sidebar-collapsed .sidebar-logo-button .nav-logo {
    height: 28px;
    width: auto;
  }
  .station-layout.sidebar-collapsed .top-bar-menu-toggle {
    display: inline-flex;
  }
  .station-layout.sidebar-collapsed .station-sidebar .sidebar-item {
    padding: 9px 10px;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
  }
  .station-layout.sidebar-collapsed .station-sidebar .playlist-engine-group {
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .station-layout {
    position: relative;
    gap: 0;
    padding-top: 0;
  }
  .station-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--station-sidebar-width, 200px);
    height: 100vh;
    background: rgb(14, 28, 46);
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: auto;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), top 0.25s cubic-bezier(0.4, 0, 0.2, 1), height 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease, box-shadow 0.2s ease;
    z-index: 200;
    padding-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  /* On mobile hide sidebar logo until slide-out menu is open (back to Control) */
  .station-sidebar .sidebar-logo {
    display: none !important;
  }
  .station-layout.menu-open .station-sidebar .sidebar-logo {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
    height: var(--station-chrome-height, 52px);
    min-height: var(--station-chrome-height, 52px);
    max-height: var(--station-chrome-height, 52px);
    flex-shrink: 0;
    opacity: 1;
    pointer-events: auto;
  }
  .station-layout.menu-open .station-sidebar .sidebar-logo .sidebar-logo-text {
    display: inline-flex !important;
    align-items: center;
  }
  .top-bar-menu-toggle {
    display: inline-flex;
  }
  .sidebar-collapse-btn {
    display: flex;
  }
  /* Keep top bar fixed so it doesn't take flow space (avoids double gap above station-right) */
  /* Collapsed: slide off-screen with transform */
  .station-layout:not(.menu-open) .station-sidebar {
    transform: translateX(-100%);
    background: transparent;
    z-index: 250;
  }
  .station-layout.menu-open .station-sidebar {
    transform: translateX(0);
    top: 52px;
    height: calc(100vh - 52px);
    background: rgba(14, 28, 46, 0.98);
    z-index: 200;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  }
  .station-sidebar .sidebar-item,
  .station-sidebar .sidebar-heading,
  .station-sidebar .playlist-engine-group {
    transition: opacity 0.2s ease;
  }
  .station-layout:not(.menu-open) .station-sidebar .sidebar-item,
  .station-layout:not(.menu-open) .station-sidebar .sidebar-heading,
  .station-layout:not(.menu-open) .station-sidebar .playlist-engine-group {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-out;
  }
  .station-layout.menu-open .station-sidebar .sidebar-item,
  .station-layout.menu-open .station-sidebar .sidebar-heading,
  .station-layout.menu-open .station-sidebar .playlist-engine-group {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.2s ease-in 0.05s;
  }
  .station-sidebar .sidebar-item {
    border-right: none;
    font-size: 15px;
  }
  /* Top bar: full viewport width; hamburger btn is inline so no extra left padding needed */
  .station-top-bar {
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    z-index: 100;
  }
  .station-layout.menu-open .station-top-bar {
    z-index: 300;
    isolation: isolate;
  }
  .station-top-bar-account {
    margin-right: 0;
    z-index: 2;
  }
  /* Backdrop: below top bar so Mr Gravy / logout stay visible; click to close */
  .sidebar-backdrop {
    position: fixed;
    top: 74px;
    left: var(--station-sidebar-width, 200px);
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 150;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  .station-layout.menu-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.events-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.events-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.events-log {
  border: 1px solid rgba(69, 118, 185, 0.35);
  border-radius: 10px;
  background: rgba(10, 20, 35, 0.85);
  max-height: 340px;
  overflow-y: auto;
  font-size: 12px;
}
.events-entry {
  padding: 10px 12px;
  border-bottom: 1px solid #242424;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.events-entry .event-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.events-entry .event-badge {
  align-self: flex-start;
}
.events-entry:last-child {
  border-bottom: none;
}
.events-entry .event-meta {
  font-size: 11px;
  color: #999;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.events-entry .event-kind {
  color: #ffb74d;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.events-entry .event-time {
  color: #93c5ff;
  font-size: 11px;
  min-width: 60px;
  flex-shrink: 0;
  align-self: center;
  position: relative;
  top: 2px;
}
.events-entry .event-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.event-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
  align-self: center;
  line-height: 1.2;
  white-space: nowrap;
  color: #e5f3ff;
  min-width: 80px;
  width: 80px;
}
.event-badge--green {
  background: rgba(111, 231, 161, 0.15);
  border: 1px solid rgba(111, 231, 161, 0.4);
  color: #6ee7a1;
}
.event-badge--red {
  background: rgba(255, 122, 122, 0.15);
  border: 1px solid rgba(255, 122, 122, 0.4);
  color: #ff7a7a;
}
.event-badge--ident {
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.4);
  color: #ffc107;
}
.event-badge--perceptual {
  background: rgba(255, 152, 0, 0.2);
  border: 1px solid rgba(255, 152, 0, 0.5);
  color: #ff9800;
}
.event-badge--neutral {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e5f3ff;
}
/* Playlist mode badge in events */
.event-badge-playlist-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
  align-self: center;
  line-height: 1.2;
  white-space: nowrap;
  min-width: 80px;
  width: 80px;
  border: none;
}
.event-badge-playlist-mode--autodj {
  background: linear-gradient(135deg, #ffd45c, #f0a500);
  color: #040404;
  box-shadow: 0 2px 8px rgba(255,210,92,0.4);
}
.event-badge-playlist-mode--simple {
  background: linear-gradient(135deg, #25c175, #1a8f54);
  color: #040404;
  box-shadow: 0 2px 8px rgba(24,196,123,0.4);
}
.event-badge-playlist-mode--crate {
  background: linear-gradient(135deg, #ff6b6b, #c62828);
  color: #040404;
  box-shadow: 0 2px 8px rgba(255,107,107,0.4);
}
.event-text {
  color: #dfe9f5;
  font-size: 12px;
  flex: 1;
  position: relative;
  top: 2px;
  align-self: center;
}
.event-text.event-text--ident {
  color: #ffd700 !important;
}
.events-empty {
  padding: 20px;
  text-align: center;
  color: #909090;
}
.event-section {
  font-size: 11px;
  color: #cfd8dc;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.event-section-label {
  color: #8bc34a;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-right: 6px;
}
.event-section .event-text {
  flex: 1;
  position: static;
  top: auto;
  align-self: auto;
}
.event-fallback-warning {
  display: inline-block;
  color: #ff7a7a;
  font-weight: 700;
  font-size: 12px;
  margin-left: 4px;
  vertical-align: middle;
}
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}
.confirm-dialog {
  width: min(420px, 90vw);
  background: #111;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.confirm-dialog h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}
.confirm-dialog p {
  margin: 0;
  font-size: 14px;
  color: #cfd8dc;
  line-height: 1.5;
}
.confirm-dialog.confirm-dialog--danger {
  background: #ef4444;
  border-color: #b91c1c;
  box-shadow: 0 10px 30px rgba(185, 28, 28, 0.45);
}
.confirm-dialog.confirm-dialog--danger h3,
.confirm-dialog.confirm-dialog--danger p {
  color: #fff;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.confirm-overlay[hidden] {
  display: none;
}
.daemon-action-dialog {
  align-items: center;
  text-align: center;
}
.daemon-action-progress {
  display: flex;
  justify-content: center;
  align-items: center;
}
.daemon-action-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(41, 182, 246, 0.24);
  border-top-color: #29b6f6;
  animation: daemon-action-spin 1s linear infinite;
}
.daemon-action-status {
  font-size: 12px;
  color: #90a4ae;
  margin-top: -6px;
}
@keyframes daemon-action-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.manual-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.manual-buttons .btn {
  font-size: 13px;
  padding: 8px 16px;
}
.deck-queue-test-strip {
  align-items: center;
  opacity: 0.85;
}
.deck-queue-test-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #8a9aaa);
  margin-right: 4px;
}
.deck-queue-test-strip .btn:disabled {
  opacity: 0.45;
}
.deck-queue-test-clear {
  margin-left: auto;
}
.badge-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px !important;
  font-weight: 600;
  white-space: nowrap;
  min-width: 120px;
  width: 120px;
  height: 24px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.badge-button--success {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
}
.badge-button--success:hover,
.badge-button--success:focus-visible {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}
.badge-button--alert {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
}
.badge-button--alert:hover,
.badge-button--alert:focus-visible {
  background: #a52a2a;
  border-color: #a52a2a;
  color: #fff;
}
.badge-button#blockCurrentBtn,
.badge-button#blockQueuedBtn {
  margin-left: auto;
}
.badge-button.success {
  background: rgba(129,199,132,0.85);
  border-color: rgba(129,199,132,0.7);
  color: #1b5e20;
}
.badge-button.error {
  background: rgba(229,57,53,0.85);
  border-color: rgba(229,57,53,0.7);
  color: #fff;
}
.badge-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Track pool mood pills */
.mood-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mood-pill {
  min-width: 100px;
  width: 100px;
  height: 24px;
  text-transform: none;
  font-size: 11px !important;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.mood-pill--neutral {
  opacity: 0.9;
}

.mood-pill--include {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}

.mood-pill--off {
  background: #5c1b1b;
  border-color: #7f2525;
  color: #ffe5e5;
  opacity: 0.85;
}

.mood-pill--off::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -10%;
  width: 120%;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(-20deg);
  pointer-events: none;
}

.login-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
body.vanta-active.login-page {
  background: transparent;
}

.login-wrapper {
  width: min(420px, 92vw);
  padding: 24px;
}

.login-card {
  background: rgba(17,17,17,0.88);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 36px 38px 42px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 18px 46px rgba(0,0,0,0.55);
}

.login-logo {
  height: 90px;
  display: block;
  margin: 0 auto 4px;
}

.login-title {
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  color: #f5f5f5;
  letter-spacing: 0.6px;
  margin: 0;
}
.login-tagline {
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  margin: 4px 0 0 0;
  letter-spacing: 0.2px;
}
.login-subtitle {
  text-align: center;
  font-size: 18px;
  color: #cfd8dc;
  margin: 0;
  letter-spacing: 0.4px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-alert,
.login-error {
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 8px;
  margin: -4px 0 6px;
}
.login-alert {
  background: rgba(41,121,255,0.15);
  border: 1px solid rgba(41,121,255,0.35);
  color: #c4ddff;
}
.login-error {
  background: rgba(244,67,54,0.18);
  border: 1px solid rgba(244,67,54,0.45);
  color: #ffab91;
}
.login-form .remember-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #e0e0e0;
  margin-top: -6px;
}
.login-form .remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.env-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
  vertical-align: middle;
  text-transform: uppercase;
}

.env-badge--beta {
  background: rgba(255, 193, 7, 0.22);
  border: 1px solid rgba(255, 193, 7, 0.55);
  color: #ffc107;
}

.nav-logo-link .env-badge,
.top-bar-menu-toggle .env-badge {
  margin-left: 8px;
}

body.app-env-beta .top-nav {
  border-bottom: 2px solid rgba(255, 193, 7, 0.45);
}

body.app-env-beta.stations-page .station-top-bar {
  border-bottom: 2px solid rgba(255, 193, 7, 0.35);
}

.login-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  color: #cfd8dc;
  letter-spacing: 0.2px;
}

.login-input {
  background: #111;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 14px 16px;
  color: #fff;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input:focus {
  outline: none;
  border-color: #2979ff;
  box-shadow: 0 0 0 2px rgba(41,121,255,0.35);
}

.login-submit {
  margin-top: 8px;
  width: 100%;
  font-size: 16px;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
}

.login-footer-text {
  font-size: 12px;
  color: rgba(229, 243, 255, 0.7);
}

.login-footer-separator {
  margin: 0 6px;
}

.login-footer-link {
  color: #e5f3ff;
  text-decoration: none;
  border-bottom: 1px dotted rgba(229, 243, 255, 0.5);
}

.login-footer-link:hover {
  color: #ffffff;
  border-bottom-style: solid;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  padding: 12px 16px;
  background: rgba(8, 14, 26, 0.98);
  border-top: 1px solid rgba(72, 119, 186, 0.7);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.7);
  font-size: 13px;
  color: #dfe9f5;
}

.cookie-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cookie-banner-text strong {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e5f3ff;
}

.cookie-banner-text span {
  font-size: 12px;
  color: #9fb7d4;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-btn-reject,
.cookie-btn-accept {
  font-size: 12px;
  padding: 6px 12px;
}

@media (max-width: 700px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner-actions {
    justify-content: flex-end;
  }
}

.privacy-page {
  background: radial-gradient(circle at top, #324a70 0, #050811 45%, #020309 100%);
  color: #e5f3ff;
}

.privacy-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.privacy-card {
  max-width: 800px;
  width: 100%;
  background: rgba(10, 18, 32, 0.96);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(89, 140, 205, 0.7);
  padding: 32px 28px;
}

.privacy-title {
  margin: 0 0 12px 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e5f3ff;
}

.privacy-intro {
  margin: 0 0 20px 0;
  color: #c1d5f0;
}

.privacy-card h2 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
  color: #e5f3ff;
}

.privacy-card p {
  margin: 0 0 12px 0;
  color: #c1d5f0;
  font-size: 14px;
  line-height: 1.6;
}

.privacy-card ul {
  margin: 0 0 14px 20px;
  padding: 0;
  color: #c1d5f0;
  font-size: 14px;
}

.privacy-card li + li {
  margin-top: 4px;
}

.privacy-card code {
  background: rgba(3, 11, 25, 0.9);
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 13px;
}

.privacy-back-link {
  margin-top: 20px;
}

.privacy-back-link a {
  color: #e5f3ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(229, 243, 255, 0.6);
}

.privacy-back-link a:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.control-shell {
  max-width: 560px;
  width: 100%;
  margin: 0 auto 40px;
  padding: 72px 12px 0;
  box-sizing: border-box;
}
body.control-page.live-player-bar-active .control-shell {
  margin-bottom: calc(40px + var(--gravy-live-player-bar-height, 52px));
}
/* Control page: lock viewport height; body scrolls full-width (scrollbar at screen edge). */
html.control-page-root,
html:has(body.control-page) {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
.control-page {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
  background: #000;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
body.control-page .top-nav {
  flex-shrink: 0;
  margin-bottom: 0;
}
body.control-page .control-shell {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  margin: 0 auto;
  padding: 16px 12px 40px;
}
body.control-page.live-player-bar-active .control-shell {
  margin-bottom: 0;
  padding-bottom: calc(40px + var(--gravy-live-player-bar-height, 52px));
}
/* Mobile: scroll inside main panel so expanded server/services sections are reachable */
@media (max-width: 520px) {
  body.control-page {
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    overflow: hidden;
  }
  body.control-page .control-shell {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    padding-top: 12px;
    padding-bottom: calc(20px + var(--gravy-live-player-bar-height, 52px));
  }
  body.control-page.live-player-bar-active .control-shell {
    padding-bottom: calc(20px + var(--gravy-live-player-bar-height, 52px));
  }
}
@media (min-width: 901px) {
  body.control-page .control-shell {
    padding-top: 56px;
  }
}
body.theme-light.control-page {
  background: #ececec;
}
.control-page .top-nav {
  /* Sticky while page scrolls */
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0;
  border-radius: 0;
}
.control-page .control-card .card-header {
  margin: 0 0 12px 0;
  padding: 0;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}
body.theme-light .control-page .control-card .card-header {
  background: transparent;
  border-bottom: none;
  color: #0a0a0a;
}
.control-card {
  margin: 0;
  padding: 16px;
}
.control-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.control-body--engine-off .station-control-list {
  display: none;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.control-body--engine-off #hostServerMetrics {
  display: none;
}
.control-body--engine-off .control-host-daemon-controls {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.control-events {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(18,18,18,0.85);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.numeric-stepper {
  display: inline-flex;
  align-items: stretch;
  align-self: flex-start;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.35);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 4px 10px rgba(0,0,0,0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: auto;
  max-width: max-content;
}
.numeric-stepper--mini {
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 3px 8px rgba(0,0,0,0.3);
}
.numeric-stepper--mini .stepper-button {
  width: 30px;
  font-size: 14px;
}
.numeric-stepper--mini .stepper-input {
  width: 44px;
  font-size: 15px;
}
.numeric-stepper.scoring-stepper .stepper-input {
  width: 56px;
  font-size: 16px;
  font-weight: 600;
}
.numeric-stepper.scoring-stepper .stepper-button {
  width: 32px;
  font-size: 16px;
}
.numeric-stepper--disabled {
  opacity: 0.5;
  pointer-events: none;
}
.numeric-stepper:focus-within {
  border-color: rgba(129, 212, 250, 0.6);
  box-shadow: 0 0 0 1px rgba(129, 212, 250, 0.4), 0 10px 26px rgba(0,0,0,0.5);
}
.stepper-button {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e5f3ff;
  font-size: 16px;
  width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  border-radius: 4px;
  padding: 4px;
}
.stepper-button:hover:not(:disabled),
.stepper-button:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.stepper-button:focus-visible {
  outline: 2px solid rgba(129,212,250,0.6);
  outline-offset: -2px;
}
.stepper-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.stepper-input {
  width: 48px;
  text-align: center;
  border: none;
  background: transparent;
  color: #e0f7fa;
  font-size: 18px;
  font-weight: 500;
  appearance: none;
  -moz-appearance: textfield;
  user-select: none;
  caret-color: transparent;
}
.stepper-input:focus {
  outline: none;
}
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stepper-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}
.stepper-value-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #90a4ae;
}
.stepper-value {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: #e3f2fd;
  margin-top: 6px;
}
.stepper-hint {
  margin: 0;
  font-size: 11px;
  color: #9fb4c0;
  max-width: 100%;
}
.setting-stepper-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.setting-stepper-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#panel-next-track-engine .form-row.form-row--split,
#panel-tempo .form-row.form-row--split {
  align-items: flex-start;
}
#panel-next-track-engine .bpm-variance-column,
#panel-tempo .bpm-variance-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
/* Full-width row under variance + bias so both checkboxes fit on one line (not trapped in 260px form-field) */
#panel-next-track-engine .bpm-tempo-checkboxes-row,
#panel-tempo .bpm-tempo-checkboxes-row {
  margin-top: 12px;
  width: 100%;
}
#panel-next-track-engine .bpm-tempo-checkboxes,
#panel-tempo .bpm-tempo-checkboxes {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 1.5rem;
  width: 100%;
}
#panel-next-track-engine .bpm-tempo-checkboxes .checkbox-label,
#panel-tempo .bpm-tempo-checkboxes .checkbox-label {
  flex: 0 1 auto;
  max-width: 100%;
}

.profile-settings-tab .next-track-engine-body,
.profile-settings-tab .profile-settings-body,
#panel-next-track-engine .next-track-engine-body {
  display: block;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.profile-settings-grid,
.next-track-engine-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  width: 100%;
}
.profile-settings-cell,
.next-track-engine-cell {
  display: block;
  min-width: 0;
  padding: 26px 24px 32px 26px;
  box-sizing: border-box;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.playlist-profile-editor-card {
  --nte-stack-gap: 32px;
  --nte-field-label-gap: 12px;
  --nte-field-row-gap-x: 28px;
  --nte-checkbox-gap: 16px;
  --nte-meta-desc-gap: 12px;
  --nte-section-controls-pad-top: 8px;
}
.profile-settings-tab {
  --nte-stack-gap: 32px;
  --nte-field-label-gap: 12px;
  --nte-field-row-gap-x: 28px;
  --nte-checkbox-gap: 16px;
  --nte-meta-desc-gap: 12px;
  --nte-section-controls-pad-top: 8px;
  --nte-controls-width: 26rem;
  --nte-layout-stack: 860px;
}
.profile-settings-tab .profile-settings-cell,
.profile-settings-tab .next-track-engine-cell {
  container-type: inline-size;
  container-name: nte-section;
}
.profile-settings-tab .nte-section-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: start;
  width: 100%;
}
.profile-settings-tab .nte-section-meta {
  min-width: 0;
  padding-bottom: 8px;
  max-width: max(220px, calc((100cqw - 48px) / 2.2));
}
.profile-settings-tab .nte-section-desc {
  margin: var(--nte-meta-desc-gap, 12px) 0 0;
  padding-bottom: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #94b4cf;
}
.profile-settings-tab .panel-title-toggle {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 0;
}
.profile-settings-cell:first-child,
.next-track-engine-cell:first-child {
  padding-top: 16px;
}
.profile-settings-cell:last-child,
.next-track-engine-cell:last-child {
  padding-bottom: 26px;
}
#panel-playlists .next-track-engine-grid > .next-track-engine-cell:not(:last-child),
#panel-playlists .profile-settings-grid > .profile-settings-cell:not(:last-child),
.profile-settings-tab .profile-settings-grid > .profile-settings-cell:not(:last-child),
.profile-settings-tab .next-track-engine-grid > .next-track-engine-cell:not(:last-child) {
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
}
#panel-playlists .next-track-engine-grid > .next-track-engine-cell.is-setting-section-off:not(:last-child),
#panel-playlists .profile-settings-grid > .profile-settings-cell.is-setting-section-off:not(:last-child),
.profile-settings-tab .profile-settings-grid > .profile-settings-cell.is-setting-section-off:not(:last-child),
.profile-settings-tab .next-track-engine-grid > .next-track-engine-cell.is-setting-section-off:not(:last-child) {
  border-bottom: 1px solid rgba(148, 163, 184, 0.45) !important;
}
.profile-settings-tab .panel-title-toggle .switch {
  order: 0;
  margin-left: 0;
  flex-shrink: 0;
  width: 44px;
  height: 22px;
}
.profile-settings-tab .panel-title-toggle .switch-slider:before {
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
}
.profile-settings-tab .panel-title-toggle .switch input:checked + .switch-slider:before {
  transform: translateX(22px);
}
.profile-settings-tab .panel-title-toggle h3,
.profile-settings-tab .panel-title-toggle > .form-label {
  order: 1;
  flex: 0 0 auto;
  margin: 0;
  min-width: 0;
}
.profile-settings-tab .panel-title-toggle--heading-only {
  gap: 0;
}
.profile-settings-tab .panel-title-toggle--heading-only h3 {
  order: 0;
}
.profile-settings-tab .panel-title-toggle .nte-section-help-btn {
  order: 2;
  flex-shrink: 0;
  margin-left: 0;
}
.profile-settings-tab .nte-section-controls {
  position: relative;
  gap: var(--nte-stack-gap, 32px);
  padding-top: var(--nte-section-controls-pad-top, 8px);
  padding-bottom: 36px;
  min-width: 0;
  justify-self: end;
  width: var(--nte-controls-width, 26rem);
  max-width: 100%;
}
.profile-settings-tab .profile-settings-cell .form-actions--autosave,
.profile-settings-tab .next-track-engine-cell .form-actions--autosave {
  position: absolute;
  right: 0;
  bottom: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.profile-settings-tab .profile-settings-cell .form-actions--autosave .autosave-status.is-visible,
.profile-settings-tab .next-track-engine-cell .form-actions--autosave .autosave-status.is-visible {
  pointer-events: auto;
}
.profile-settings-tab .panel-title-toggle h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #e5f3ff;
  letter-spacing: 0.02em;
  text-transform: none;
}
.nte-section-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.nte-section-controls[hidden] {
  display: none !important;
}
.nte-grid-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.nte-inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nte-inline-row .form-label {
  flex: 0 0 7.5rem;
  margin: 0;
  font-size: 13px;
  white-space: nowrap;
}
.nte-inline-row .form-control {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 12rem;
}
/* Label | control grid so selects and steppers share one vertical column */
#panel-next-track-engine .nte-inline-row:not(.nte-inline-row--multi) {
  display: grid;
  grid-template-columns: 9.25rem 11rem;
  align-items: center;
  column-gap: 12px;
  row-gap: 0;
  flex-wrap: nowrap;
}
/* Multiple label+control pairs on one row (Mix Type + Wheel Movement, etc.) */
#panel-next-track-engine .nte-inline-row--multi,
.playlist-profile-editor-card .nte-inline-row--multi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  grid-template-columns: unset;
}
#panel-next-track-engine .nte-inline-row--multi .nte-field-pair,
.playlist-profile-editor-card .nte-inline-row--multi .nte-field-pair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
#panel-next-track-engine .nte-inline-row--multi .nte-field-pair .form-label,
.playlist-profile-editor-card .nte-inline-row--multi .nte-field-pair .form-label {
  grid-column: unset;
  flex: 0 0 auto;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  max-width: none;
  color: #8ca0b9;
  text-transform: none;
  letter-spacing: normal;
}
#panel-next-track-engine .nte-inline-row--multi .nte-field-pair select.form-control--compact,
.playlist-profile-editor-card .nte-inline-row--multi .nte-field-pair select.form-control--compact,
#panel-next-track-engine .nte-inline-row--multi .nte-field-pair .form-control--compact,
.playlist-profile-editor-card .nte-inline-row--multi .nte-field-pair .form-control--compact {
  grid-column: unset;
  flex: 0 0 auto;
  width: 11rem;
  min-width: 11rem;
  max-width: 11rem;
  height: 32px;
  box-sizing: border-box;
}
#panel-next-track-engine .nte-inline-row--multi .nte-field-pair .numeric-stepper--nte,
#panel-next-track-engine .nte-inline-row--multi .nte-field-pair .numeric-stepper--mini,
.playlist-profile-editor-card .nte-inline-row--multi .nte-field-pair .numeric-stepper--nte,
.playlist-profile-editor-card .nte-inline-row--multi .nte-field-pair .numeric-stepper--mini {
  grid-column: unset;
  flex: 0 0 auto;
}
#panel-next-track-engine .nte-inline-row:not(.nte-inline-row--multi) .form-label {
  grid-column: 1;
  flex: none;
  width: auto;
  min-width: 0;
  max-width: 9.25rem;
  margin: 0;
  text-align: left;
  justify-self: start;
}
#panel-next-track-engine .nte-grid-fields--compact-labels .nte-inline-row:not(.nte-inline-row--multi) .form-control,
#panel-next-track-engine .nte-grid-fields:not(.nte-grid-fields--compact-labels) .nte-inline-row:not(.nte-inline-row--multi) .form-control,
#panel-next-track-engine .nte-inline-row:not(.nte-inline-row--multi) select.form-control--compact {
  grid-column: 2;
  justify-self: start;
  flex: none;
  width: 11rem;
  min-width: 11rem;
  max-width: 11rem;
  height: 32px;
  box-sizing: border-box;
}
#panel-next-track-engine .nte-inline-row:not(.nte-inline-row--multi) .numeric-stepper--nte {
  grid-column: 2;
  justify-self: start;
  flex: none;
}
#panel-next-track-engine .numeric-stepper--nte {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  height: 32px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 2px 5px rgba(0, 0, 0, 0.25);
}
#panel-next-track-engine .numeric-stepper--nte .stepper-button {
  width: 22px;
  min-width: 22px;
  height: 100%;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  border-radius: 0;
}
#panel-next-track-engine .numeric-stepper--nte .stepper-input {
  width: 28px;
  min-width: 28px;
  height: 100%;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 32px;
}
.nte-grid-hint {
  margin: 0;
  font-size: 13px;
  color: #94b4cf;
}
.profile-settings-tab .nte-grid-fields--stacked {
  display: grid;
  grid-auto-flow: row;
  row-gap: var(--nte-stack-gap, 32px);
  column-gap: 0;
  width: 100%;
  max-width: none;
}
.profile-settings-tab .nte-grid-fields--stacked > .nte-field-row,
.profile-settings-tab .nte-grid-fields--stacked > .nte-field-pair--stacked,
.profile-settings-tab .nte-grid-fields--stacked > .nte-bpm-checkboxes,
.profile-settings-tab .nte-grid-fields--stacked > .idents-pool-block,
.profile-settings-tab .nte-grid-fields--stacked > .progression-shift-options,
.profile-settings-tab .nte-grid-fields--stacked > .progression-advanced-section,
.profile-settings-tab .nte-grid-fields--stacked > .crate-mode-ident-block,
.profile-settings-tab .nte-grid-fields--stacked > .settings-ui-sync-fields,
.profile-settings-tab .nte-grid-fields--stacked > .repeat-rules-fields {
  margin: 0;
  min-width: 0;
}
.profile-settings-tab .nte-field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--nte-stack-gap, 32px) var(--nte-field-row-gap-x, 28px);
}
.profile-settings-tab .nte-field-row .nte-field-pair--stacked {
  flex: 1 1 9.5rem;
  min-width: 9.5rem;
  max-width: 11.5rem;
}
.profile-settings-tab .nte-field-pair--stacked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--nte-field-label-gap, 12px);
  min-width: 0;
  width: 100%;
}
.profile-settings-tab .nte-field-pair--stacked .form-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #8ca0b9;
  white-space: normal;
  text-transform: none;
  letter-spacing: normal;
}
.profile-settings-tab .nte-field-pair--stacked select.form-control--compact,
.profile-settings-tab .nte-field-pair--stacked .form-control--compact {
  width: 100%;
  min-width: 0;
  max-width: 11.5rem;
  height: 32px;
  box-sizing: border-box;
}
.profile-settings-tab .nte-grid-fields--stacked > .nte-field-pair--stacked select.form-control--compact,
.profile-settings-tab .nte-grid-fields--stacked > .nte-field-pair--stacked .form-control--compact {
  max-width: none;
}
.profile-settings-tab .nte-field-row .nte-field-pair--stacked select.form-control--compact,
.profile-settings-tab .nte-field-row .nte-field-pair--stacked .form-control--compact {
  max-width: none;
}
#panel-next-track-engine .nte-field-pair--stacked.mix-type-field .mix-type-combo-row,
#panel-next-track-engine .nte-field-pair--stacked.mix-type-field .mix-type-multiselect,
#panel-next-track-engine .nte-field-pair--stacked.mix-type-field .mix-type-multiselect__trigger.form-control--compact,
#panel-next-track-engine .nte-grid-fields--stacked > .nte-field-pair--stacked.mix-type-field .mix-type-combo-row,
#panel-next-track-engine .nte-grid-fields--stacked > .nte-field-pair--stacked.mix-type-field .mix-type-multiselect,
#panel-next-track-engine .nte-grid-fields--stacked > .nte-field-pair--stacked.mix-type-field .mix-type-multiselect__trigger.form-control--compact {
  width: 100%;
  max-width: 14rem;
}

/* Crossfade Style — mode selector (full control column width, same text size as other combos) */
#panel-crossfade-style .crossfade-mode-field {
  width: 100%;
}
#panel-crossfade-style select.crossfade-mode-select {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 7px 12px;
  font-size: 13px;
  line-height: normal;
  font-weight: inherit;
  box-sizing: border-box;
}

.profile-settings-tab .idents-pool-block {
  display: flex;
  flex-direction: column;
  gap: var(--nte-stack-gap, 32px);
  width: 100%;
  min-width: 0;
}
.profile-settings-tab .idents-pool-field-pair .idents-choose-btn {
  align-self: flex-start;
}
.profile-settings-tab .idents-selected-badges {
  min-height: 0;
  margin: 0;
}
.profile-settings-tab .idents-pool-hint {
  margin: 0;
  font-size: 13px;
  color: #94b4cf;
}
#panel-next-track-engine .nte-field-pair--stacked .numeric-stepper--nte,
#panel-next-track-engine .numeric-stepper--nte-compact,
.profile-settings-tab .nte-field-pair--stacked .numeric-stepper--nte,
.profile-settings-tab .numeric-stepper--nte-compact {
  align-self: flex-start;
  flex: 0 0 auto;
  width: auto;
  max-width: max-content;
}
#panel-next-track-engine .numeric-stepper--nte-compact,
.profile-settings-tab .numeric-stepper--nte-compact {
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(80, 140, 210, 0.35);
  background: rgba(14, 28, 46, 0.95);
  box-shadow: inset 0 0 0 1px rgba(41, 96, 180, 0.1);
  overflow: hidden;
}
#panel-next-track-engine .numeric-stepper--nte-compact:focus-within,
.profile-settings-tab .numeric-stepper--nte-compact:focus-within {
  border-color: rgba(130, 190, 255, 0.8);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.25);
}
#panel-next-track-engine .numeric-stepper--nte-compact .stepper-button,
.profile-settings-tab .numeric-stepper--nte-compact .stepper-button {
  width: 28px;
  min-width: 28px;
  height: 100%;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #c5d8ea;
  box-shadow: none;
}
#panel-next-track-engine .numeric-stepper--nte-compact .stepper-button:hover:not(:disabled),
#panel-next-track-engine .numeric-stepper--nte-compact .stepper-button:focus-visible:not(:disabled),
.profile-settings-tab .numeric-stepper--nte-compact .stepper-button:hover:not(:disabled),
.profile-settings-tab .numeric-stepper--nte-compact .stepper-button:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
  color: #e5f3ff;
}
#panel-next-track-engine .numeric-stepper--nte-compact .stepper-input,
.profile-settings-tab .numeric-stepper--nte-compact .stepper-input {
  width: 32px;
  min-width: 32px;
  height: 100%;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 32px;
  border-left: 1px solid rgba(80, 140, 210, 0.35);
  border-right: 1px solid rgba(80, 140, 210, 0.35);
}
#settingsPanelRepeat.profile-settings-tab .numeric-stepper--nte-compact .stepper-input,
#settingsPanelScoring.profile-settings-tab .numeric-stepper--nte-compact .stepper-input {
  width: 40px;
  min-width: 40px;
}
#panel-next-track-engine .nte-bpm-checkboxes {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--nte-checkbox-gap, 16px);
  margin: 0;
  padding: 0;
}
#panel-next-track-engine .nte-bpm-checkboxes .progression-shift-option {
  white-space: normal;
}

@container nte-section (max-width: 860px) {
  .profile-settings-tab .nte-section-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .profile-settings-tab .nte-section-meta {
    max-width: none;
  }
  .profile-settings-tab .nte-section-controls {
    justify-self: stretch;
    width: 100%;
    max-width: none;
  }
  .profile-settings-tab .nte-grid-fields--stacked {
    max-width: none;
  }
  .profile-settings-tab .nte-field-row {
    flex-direction: column;
    align-items: stretch;
  }
  .profile-settings-tab .nte-field-row .nte-field-pair--stacked {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  #panel-setprog.profile-settings-tab .progression-shift-row--sonic {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px 16px;
    max-width: 100%;
    min-width: 0;
  }
  #panel-setprog.profile-settings-tab .progression-shift-row--harmonic {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 16px;
    max-width: 100%;
    min-width: 0;
  }
  #panel-setprog.profile-settings-tab .progression-shift-row--sonic .progression-shift-option,
  #panel-setprog.profile-settings-tab .progression-shift-row--harmonic .progression-shift-option {
    flex: 0 0 auto;
    align-self: center;
    white-space: nowrap;
  }
  #panel-setprog.profile-settings-tab .progression-sonic-preset-pair {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    width: auto;
    align-self: center;
  }
  #panel-setprog.profile-settings-tab .progression-harmonic-mode-pair {
    flex: 1 1 var(--progression-harmonic-mix-width, 18rem);
    min-width: var(--progression-harmonic-mix-width, 18rem);
    max-width: 100%;
    width: auto;
    align-self: flex-end;
  }
  .profile-settings-tab .nte-field-pair--stacked select.form-control--compact,
  .profile-settings-tab .nte-field-pair--stacked .form-control--compact,
  .profile-settings-tab .nte-field-pair--stacked .mix-type-combo-row,
  .profile-settings-tab .nte-field-pair--stacked .mix-type-multiselect {
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  .profile-settings-tab .nte-section-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .profile-settings-tab .nte-section-meta {
    max-width: none;
  }
  .profile-settings-tab .nte-section-controls {
    justify-self: stretch;
    width: 100%;
    max-width: none;
  }
  .profile-settings-tab .nte-grid-fields--stacked {
    max-width: none;
  }
  .profile-settings-tab .nte-field-row {
    flex-direction: column;
    align-items: stretch;
  }
  .profile-settings-tab .nte-field-row .nte-field-pair--stacked {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  #panel-setprog.profile-settings-tab .progression-shift-row--sonic {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px 16px;
    max-width: 100%;
    min-width: 0;
  }
  #panel-setprog.profile-settings-tab .progression-shift-row--harmonic {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 16px;
    max-width: 100%;
    min-width: 0;
  }
  #panel-setprog.profile-settings-tab .progression-shift-row--sonic .progression-shift-option,
  #panel-setprog.profile-settings-tab .progression-shift-row--harmonic .progression-shift-option {
    flex: 0 0 auto;
    align-self: center;
    white-space: nowrap;
  }
  #panel-setprog.profile-settings-tab .progression-sonic-preset-pair {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    width: auto;
    align-self: center;
  }
  #panel-setprog.profile-settings-tab .progression-harmonic-mode-pair {
    flex: 1 1 var(--progression-harmonic-mix-width, 18rem);
    min-width: var(--progression-harmonic-mix-width, 18rem);
    max-width: 100%;
    width: auto;
    align-self: flex-end;
  }
  .profile-settings-tab .nte-field-pair--stacked select.form-control--compact,
  .profile-settings-tab .nte-field-pair--stacked .form-control--compact,
  .profile-settings-tab .nte-field-pair--stacked .mix-type-combo-row,
  .profile-settings-tab .nte-field-pair--stacked .mix-type-multiselect {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  #panel-next-track-engine .nte-inline-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 6px;
  }
  #panel-next-track-engine .nte-inline-row .form-label,
  #panel-next-track-engine .nte-inline-row .form-control,
  #panel-next-track-engine .nte-inline-row select.form-control--compact,
  #panel-next-track-engine .nte-inline-row .numeric-stepper--nte {
    grid-column: 1;
    max-width: 100%;
  }
  #panel-next-track-engine .nte-grid-fields--compact-labels .nte-inline-row .form-control,
  #panel-next-track-engine .nte-grid-fields:not(.nte-grid-fields--compact-labels) .nte-inline-row .form-control,
  #panel-next-track-engine .nte-inline-row select.form-control--compact {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  #panel-next-track-engine .nte-bpm-tracking-fields {
    flex-wrap: wrap;
  }
}

/* Compact toggles in playlist editor tabs */
.playlist-tab-panels .switch {
  width: 44px;
  height: 22px;
}
.playlist-tab-panels .switch-slider:before {
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
}
.playlist-tab-panels .switch input:checked + .switch-slider:before {
  transform: translateX(22px);
}

/* Unified toggle + title row across playlist editor + settings tabs */
.playlist-tab-panels .panel-title-toggle,
#panel-settings .settings-tab-panels .panel-title-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  margin-bottom: 0;
  padding: 10px 0 12px;
}
.playlist-tab-panels .panel-title-toggle .switch,
#panel-settings .settings-tab-panels .panel-title-toggle .switch {
  order: 0;
  margin-left: 0;
  flex-shrink: 0;
}
.playlist-tab-panels .panel-title-toggle h3,
.playlist-tab-panels .panel-title-toggle > .form-label,
#panel-settings .settings-tab-panels .panel-title-toggle h3,
#panel-settings .settings-tab-panels .panel-title-toggle > .form-label,
#panel-settings .settings-tab-panels .panel-title-toggle .form-label {
  order: 1;
  flex: 0 0 auto;
  margin: 0;
  min-width: 0;
}
.playlist-tab-panels .panel-title-toggle h3,
#panel-settings .settings-tab-panels .panel-title-toggle h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #f1f5ff;
  letter-spacing: 0.02em;
  text-transform: none;
}
.playlist-tab-panels .panel-title-toggle .nte-section-help-btn,
#panel-settings .settings-tab-panels .panel-title-toggle .nte-section-help-btn {
  order: 2;
  flex-shrink: 0;
  margin-left: 0;
}
.playlist-tab-panels .panel-title-toggle.mix-toggle-header h3 {
  color: #f1d28a;
}
.profile-settings-tab .nte-section-meta .panel-title-toggle {
  padding: 0;
  margin-bottom: 0;
}
.playlist-tab-panels .toggled-panel-header {
  margin-bottom: 0;
}
.playlist-tab-panels .playlist-tab-panel > .panel-body > .nte-section-controls {
  margin-top: 12px;
}

/* Profile editor: label + control on one line; multiple pairs per row */
.playlist-profile-editor-card .nte-inline-row--multi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}
.playlist-profile-editor-card .nte-field-pair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.playlist-profile-editor-card .nte-field-pair .form-label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.playlist-profile-editor-card .nte-field-pair select.form-control--compact,
.playlist-profile-editor-card .nte-field-pair .form-control--compact {
  flex: 0 0 auto;
  width: 11rem;
  min-width: 11rem;
  max-width: 11rem;
  height: 32px;
  box-sizing: border-box;
}
.playlist-profile-editor-card .nte-field-pair .numeric-stepper--nte,
.playlist-profile-editor-card .nte-field-pair .numeric-stepper--mini {
  flex: 0 0 auto;
}
.playlist-profile-editor-card .nte-field-pair--sonic-bpm[hidden],
.playlist-profile-editor-card .nte-field-pair--sonic-bpm-order[hidden] {
  display: none !important;
}
#panel-setprog .nte-field-pair[hidden],
#panel-setprog .progression-sonic-preset-pair[hidden],
#panel-setprog .progression-harmonic-mode-pair[hidden],
#panel-setprog .progression-toth-group[hidden],
#panel-setprog .progression-ident-before-row[hidden],
#panel-setprog .nte-field-row[hidden],
#panel-setprog .nte-field-pair--stacked[hidden] {
  display: none !important;
}
#panel-next-track-engine .nte-field-pair--stacked[hidden],
.profile-settings-tab .nte-field-pair--stacked[hidden] {
  display: none !important;
}
#panel-next-track-engine .nte-field-pair--sonic-bpm-order select.form-control--compact {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.playlist-profile-editor-card .nte-sonic-bpm-label {
  width: auto;
  max-width: none;
  font-size: 12px;
  white-space: nowrap;
}
.playlist-profile-editor-card .nte-field-pair--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--nte-field-label-gap, 12px);
}
.playlist-profile-editor-card .nte-field-pair--stacked .setting-stepper-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.playlist-profile-editor-card .nte-field-pair--stacked .form-hint {
  margin: 0;
  font-size: 12px;
}

/* Crate profile tab — profile-settings layout */
#panel-general.profile-settings-tab .crate-mode-field-hint,
#panel-crate-mode.profile-settings-tab .crate-mode-field-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #7f97b3;
}
#panel-general.profile-settings-tab .crate-mode-ident-block,
#panel-crate-mode.profile-settings-tab .crate-mode-ident-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}
#panel-general.profile-settings-tab .crate-mode-ident-hint,
#panel-crate-mode.profile-settings-tab .crate-mode-ident-hint {
  margin: 0;
}

/* Track repeat rules — settings layout */
#settingsPanelRepeat.profile-settings-tab .repeat-rules-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #7f97b3;
}
#settingsPanelRepeat.profile-settings-tab .repeat-rules-fields {
  width: 100%;
}
#settingsPanelRepeat.profile-settings-tab .repeat-rules-stepper-pair {
  width: auto;
  max-width: 100%;
}

/* Scoring weights — settings layout */
#settingsPanelScoring.profile-settings-tab .scoring-weights-fields {
  width: 100%;
}
#settingsPanelScoring.profile-settings-tab .scoring-weights-stepper-pair {
  width: auto;
  max-width: 100%;
}
#settingsPanelScoring.profile-settings-tab .scoring-weights-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #7f97b3;
}
#settingsPanelScoring.profile-settings-tab .scoring-weights-shuffle-combo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
#settingsPanelScoring.profile-settings-tab .scoring-weights-shuffle-combo .shuffle-percent-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#settingsPanelScoring.profile-settings-tab .scoring-weights-shuffle-combo .shuffle-percent-inline input {
  width: 4.5rem;
  min-width: 4.5rem;
  max-width: 4.5rem;
}
#settingsPanelScoring.profile-settings-tab .scoring-weights-bottom-row {
  align-items: flex-start;
}

body.theme-light #panel-playlists .next-track-engine-grid > .next-track-engine-cell:not(:last-child) {
  border-bottom: 1px solid hsl(0 0% 84%);
}
body.theme-light #panel-playlists .next-track-engine-grid > .next-track-engine-cell.is-setting-section-off:not(:last-child) {
  border-bottom: 1px solid hsl(0 0% 84%) !important;
}
.scoring-slider--stepper {
  width: auto;
}
.scoring-slider--stepper .numeric-stepper {
  width: auto;
  margin-top: 0;
}

@media (max-width: 640px) {
  .scoring-grid--compact,
  .scoring-inline-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .scoring-field-label,
  .scoring-inline-field .form-label,
  .scoring-field-hint,
  .scoring-inline-field .hint-wrapper,
  .scoring-control,
  .scoring-inline-control {
    justify-self: flex-start;
  }
}
.scoring-stepper {
  min-width: 100px;
  justify-content: center;
}

.control-events h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #b0bec5;
}
.control-events-list {
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-color: #707070 #101010;
}
.control-events-list::-webkit-scrollbar {
  width: 8px;
}
.control-events-list::-webkit-scrollbar-track {
  background: #101010;
  border-radius: 6px;
}
.control-events-list::-webkit-scrollbar-thumb {
  background: #707070;
  border-radius: 6px;
}
.control-events-list::-webkit-scrollbar-thumb:hover {
  background: #8d8d8d;
}
.control-event-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #d1d9df;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 6px;
}
.control-event-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.control-event-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #90a4ae;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.control-event-kind {
  color: #ffb74d;
}
.control-event-time {
  color: #81d4fa;
}
.control-event-body {
  color: #eceff1;
}
.station-control-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  max-height: none;
  overflow: visible;
}
.control-host-metrics {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: none;
}
.control-section-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
}
.control-section-toggle-arrow {
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
  color: #90a4ae;
  transform: rotate(0deg);
  transition: transform 0.18s ease;
}
.control-section-toggle[aria-expanded="true"] .control-section-toggle-arrow {
  transform: rotate(90deg);
}
.control-section-body[hidden] {
  display: none;
}
.control-section-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.control-host-metrics-title {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #90a4ae;
  margin: 0;
}
.control-host-metric-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: none;
}
.control-host-spark {
  height: 36px;
  width: 100%;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.control-host-spark svg {
  display: block;
  width: 100%;
  height: 100%;
  vertical-align: top;
}
.control-host-metric {
  display: grid;
  grid-template-columns: 52px 1fr minmax(5.5rem, auto);
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.control-host-metric-label {
  color: #b0bec5;
  font-weight: 500;
}
.control-host-metric-path {
  font-size: 11px;
  opacity: 0.85;
}
.control-host-metric-bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.control-host-metric-bar {
  height: 100%;
  width: 0%;
  max-width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4fc3f7, #29b6f6);
  transition: width 0.35s ease;
}
.control-host-metric[data-metric="memory"] .control-host-metric-bar {
  background: linear-gradient(90deg, #81c784, #66bb6a);
}
.control-host-metric[data-metric="disk"] .control-host-metric-bar {
  background: linear-gradient(90deg, #ffb74d, #ffa726);
}
.control-host-metric-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #eceff1;
  font-size: 12px;
  white-space: nowrap;
}
.control-host-metrics--error .control-host-metric-value {
  color: #ef9a9a;
}
.control-host-temps {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.control-host-temps-title {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #90a4ae;
  margin: 0 0 2px 0;
}
.control-host-temp-row {
  display: grid;
  grid-template-columns: minmax(4.5rem, 32%) 1fr minmax(4.5rem, auto);
  align-items: center;
  gap: 10px;
  font-size: 13px;
  max-width: none;
}
.control-host-temp-name {
  color: #b0bec5;
  font-weight: 500;
  min-width: 0;
}
.control-host-temp-bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  min-width: 0;
}
.control-host-temp-bar {
  height: 100%;
  width: 0%;
  max-width: 100%;
  border-radius: 999px;
  transition: width 0.35s ease, background 0.25s ease;
}
.control-host-temp-bar--ok {
  background: linear-gradient(90deg, #26c6da, #4dd0e1);
}
.control-host-temp-bar--warm {
  background: linear-gradient(90deg, #ffb74d, #ffa726);
}
.control-host-temp-bar--hot {
  background: linear-gradient(90deg, #ef5350, #e53935);
}
.control-host-temp-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #eceff1;
  font-size: 12px;
  white-space: nowrap;
}
.control-host-daemon-controls {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.control-host-daemon-controls-title {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #90a4ae;
  margin: 0;
}
.control-host-daemon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  background: rgba(18,18,18,0.85);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  max-width: none;
  min-width: 0;
  font-size: 13px;
}
.control-host-daemon-row-text {
  flex: 1;
  min-width: 0;
}
.control-host-daemon-row-title {
  color: #eceff1;
  font-weight: 500;
}
.control-host-daemon-row-hint {
  font-size: 11px;
  color: #90a4ae;
  margin-top: 2px;
}
.control-host-daemon-row--off .control-host-daemon-row-title {
  color: #b0bec5;
}
.control-host-daemon-row.unavailable .station-switch-input:disabled + .station-switch-slider {
  opacity: 0.45;
}
body.theme-light .control-host-metrics {
  border-top-color: hsl(0 0% 89.8%);
}
body.theme-light .control-host-metrics-title {
  color: #737373;
}
body.theme-light .control-section-toggle-arrow {
  color: #737373;
}
body.theme-light .control-host-spark {
  background: rgba(0, 0, 0, 0.04);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
body.theme-light .control-host-metric-label {
  color: #525252;
}
body.theme-light .control-host-metric-bar-wrap {
  background: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
body.theme-light .control-host-metric-value {
  color: #0a0a0a;
}
body.theme-light .control-host-metrics--error .control-host-metric-value {
  color: #b91c1c;
}
body.theme-light .control-host-temps {
  border-top-color: hsl(0 0% 89.8%);
}
body.theme-light .control-host-temps-title {
  color: #737373;
}
body.theme-light .control-host-temp-name {
  color: #525252;
}
body.theme-light .control-host-temp-bar-wrap {
  background: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
body.theme-light .control-host-temp-value {
  color: #0a0a0a;
}
body.theme-light .control-host-daemon-controls {
  border-top-color: hsl(0 0% 89.8%);
}
body.theme-light .control-host-daemon-controls-title {
  color: #737373;
}
body.theme-light .control-host-daemon-row {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
body.theme-light .control-host-daemon-row-title {
  color: #171717;
}
body.theme-light .control-host-daemon-row-hint {
  color: #737373;
}
body.theme-light .control-host-daemon-row--off .control-host-daemon-row-title {
  color: #525252;
}
.station-control-row {
  display: block;
  padding: 10px 10px 8px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  background: rgba(18,18,18,0.85);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  min-width: 0;
  max-width: none;
  overflow: visible;
}
.station-control-row.processing {
  opacity: 0.7;
}
.station-control-layout {
  display: grid;
  grid-template-columns: var(--station-control-thumb-size, 52px) auto minmax(0, 1fr) auto auto;
  grid-template-rows: var(--station-control-thumb-size, 52px) 18px;
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
  --station-control-thumb-size: 52px;
}
.station-control-layout > .station-control-art-play,
.station-control-layout > .station-control-track-thumb,
.station-control-layout > .station-control-track-thumb--offline,
.station-control-layout > img.station-control-track-thumb {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}
.station-control-layout > .station-control-status-tip {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}
.station-control-layout > .station-control-info {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  min-width: 0;
}
.station-control-layout > .station-control-visualizer {
  grid-column: 4;
  grid-row: 1;
  align-self: center;
  justify-self: end;
}
.station-control-layout > .station-control-gear-tip {
  grid-column: 5;
  grid-row: 1;
  align-self: center;
  justify-self: end;
}
.station-control-layout > .station-control-progress {
  grid-column: 1 / 5;
  grid-row: 2;
  margin-top: 0;
  width: 100%;
  min-width: 0;
}
.station-control-meta {
  display: flex;
  flex: 1 1 auto;
  align-items: flex-start;
  min-width: 0;
  overflow: visible;
  --station-control-thumb-size: 52px;
}
.station-control-body {
  display: grid;
  grid-template-columns: var(--station-control-thumb-size) auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
}
.station-control-body > .station-control-art-play,
.station-control-body > .station-control-track-thumb,
.station-control-body > .station-control-track-thumb--offline,
.station-control-body > img.station-control-track-thumb {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}
.station-control-body > .station-control-status-tip {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}
.station-control-body > .station-control-info {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  min-width: 0;
}
.station-control-body > .station-control-progress {
  grid-column: 2 / 4;
  grid-row: 2;
  margin-top: 0;
  align-self: start;
}
.station-control-status-badge {
  flex-shrink: 0;
  border: none;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.station-control-status-badge--on-air {
  background: #4caf50;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.35);
}
.station-control-status-badge--offline {
  background: rgba(110, 118, 128, 0.72);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.station-control-status-badge:hover:not(:disabled):not(.is-locked) {
  transform: translateY(-1px);
}
.station-control-status-badge--on-air:hover:not(:disabled):not(.is-locked) {
  box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.55), 0 4px 12px rgba(76, 175, 80, 0.25);
}
.station-control-status-badge:disabled,
.station-control-status-badge.processing {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}
.station-control-action-tip.has-tooltip .station-control-status-badge:not(:disabled):not(.is-locked) {
  cursor: pointer;
}
.station-control-visualizer {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 20px;
  padding: 0 2px;
  flex-shrink: 0;
}
.station-control-visualizer[hidden] {
  display: none !important;
}
.station-control-visualizer__bar {
  display: block;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: #4caf50;
  transform-origin: bottom center;
  transform: scaleY(0);
  will-change: transform;
}
.station-control-visualizer--live .station-control-visualizer__bar {
  animation: none;
}
.station-control-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  margin-bottom: 0;
  min-width: 0;
  min-height: 18px;
  width: 100%;
}
.station-control-progress--idle {
  visibility: hidden;
}
.station-control-nowplaying--placeholder {
  visibility: hidden;
}
.station-control-progress__track {
  flex: 1 1 auto;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  min-width: 0;
}
.station-control-progress__fill {
  height: 100%;
  width: 0;
  background: #4caf50;
  border-radius: 2px;
  transition: width 1s linear;
}
.station-control-progress__time {
  flex: 0 0 auto;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(160, 190, 220, 0.72);
  min-width: 38px;
  text-align: right;
  white-space: nowrap;
}
.station-control-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 39px;
  justify-content: center;
  overflow: hidden;
}
.station-control-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.station-control-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  min-height: 20px;
}
.station-control-listener-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #9e9e9e;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
}
.station-control-track-thumb {
  width: var(--station-control-thumb-size, 52px);
  height: var(--station-control-thumb-size, 52px);
  border-radius: 10px;
  flex-shrink: 0;
  align-self: center;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-sizing: border-box;
}
.station-control-track-thumb--placeholder {
  object-fit: contain;
  padding: 6px;
  opacity: 0.75;
  background: rgba(255, 255, 255, 0.04);
}
.station-control-track-thumb--ident {
  object-fit: contain;
  padding: 5px;
  background: rgba(255, 255, 255, 0.1);
}
.station-control-track-thumb--offline {
  display: inline-block;
  width: var(--station-control-thumb-size, 52px);
  height: var(--station-control-thumb-size, 52px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
  opacity: 0.9;
}
.station-control-art-play {
  position: relative;
  flex-shrink: 0;
  align-self: center;
  width: var(--station-control-thumb-size, 52px);
  height: var(--station-control-thumb-size, 52px);
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  line-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.station-control-art-play .station-control-track-thumb {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
}
.station-control-art-play__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  pointer-events: none;
  transition: background 0.15s ease;
}
.station-control-art-play:hover .station-control-art-play__overlay,
.station-control-art-play:focus-visible .station-control-art-play__overlay {
  background: rgba(0, 0, 0, 0.38);
}
.station-control-art-play.is-playing .station-control-art-play__overlay {
  background: rgba(0, 0, 0, 0.42);
}
.station-control-art-play:focus-visible {
  outline: 2px solid rgba(120, 170, 220, 0.8);
  outline-offset: 2px;
}
.station-control-art-play__icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.6));
  opacity: 1;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.station-control-art-play__icon--stop {
  display: none;
}
.station-control-art-play.is-playing .station-control-art-play__icon--play {
  display: none;
}
.station-control-art-play.is-playing .station-control-art-play__icon--stop {
  display: block;
}
.station-control-art-play:hover .station-control-art-play__icon,
.station-control-art-play:focus-visible .station-control-art-play__icon {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.7));
  transform: scale(1.06);
}
.station-control-listener-dot--live {
  background: #4caf50;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.55);
}
.station-control-nowplaying-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  min-height: 18px;
  overflow: hidden;
}
.station-control-nowplaying {
  font-size: 12px;
  line-height: 18px;
  min-height: 18px;
  color: rgba(200, 220, 240, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}
.station-control-remain {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  color: rgba(160, 190, 220, 0.65);
  white-space: nowrap;
}
.station-control-nowplaying--offline {
  color: rgba(160, 175, 195, 0.75);
}
.station-loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
  margin-left: 2px;
  flex-shrink: 0;
}
.station-loading-dots .ld-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(200, 220, 240, 0.9);
  animation: ld-dot-bounce 1.2s ease-in-out infinite;
}
.station-loading-dots .ld-dot:nth-child(1) { animation-delay: 0s; }
.station-loading-dots .ld-dot:nth-child(2) { animation-delay: 0.15s; }
.station-loading-dots .ld-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes ld-dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.6; }
  40% { transform: scale(1); opacity: 1; }
}
.station-status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0,0,0,0.45);
}
.station-status-dot.running {
  background: #4caf50;
}
.station-status-dot.stopped {
  background: #f44336;
}
.station-control-row.processing .station-status-dot {
  background: #9e9e9e !important;
}
.station-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  padding-right: 0;
}
.station-control-row .station-toggle {
  gap: 0;
  padding-right: 0;
}
.station-control-gear-col .station-toggle {
  flex: 0 0 auto;
}
.station-control-actions-end {
  display: flex;
  align-items: center;
  align-self: stretch;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-width: 0;
  gap: 10px;
  overflow: visible;
}
.station-control-action-tip.has-tooltip {
  cursor: default;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}
.station-control-action-tip.has-tooltip .station-control-status-badge:not(:disabled):not(.is-locked),
.station-control-action-tip.has-tooltip .station-gear-link {
  cursor: pointer;
}
.has-tooltip--align-end::after {
  left: auto;
  right: 0;
  transform: none;
}
.has-tooltip--align-end::before {
  left: auto;
  right: 10px;
  transform: none;
}
/* Control page on/off switch — compact, knob vertically centered */
.station-switch {
  --switch-w: 38px;
  --switch-h: 22px;
  --switch-border: 1px;
  --switch-knob: 14px;
  --switch-inset: 3px;
  position: relative;
  display: inline-block;
  width: var(--switch-w);
  height: var(--switch-h);
  flex-shrink: 0;
  cursor: pointer;
}
.station-switch-input {
  opacity: 0;
  width: 0;
  height: 0;
}
.station-switch-slider {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  background: rgba(244, 67, 54, 0.6);
  border-radius: var(--switch-h);
  transition: background 0.25s ease, box-shadow 0.25s ease;
  border: var(--switch-border) solid rgba(255, 255, 255, 0.1);
}
.station-switch-on,
.station-switch-off {
  display: none;
}
.station-switch-slider::before {
  content: '';
  position: absolute;
  width: var(--switch-knob);
  height: var(--switch-knob);
  left: var(--switch-inset);
  top: 50%;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  transform: translateY(-50%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 2;
}
.station-switch-input:checked + .station-switch-slider {
  background: rgba(76, 175, 80, 0.7);
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.5);
  border-color: rgba(76, 175, 80, 0.8);
}
.station-switch.processing .station-switch-slider {
  background: rgba(158, 158, 158, 0.6) !important;
  box-shadow: 0 0 8px rgba(158, 158, 158, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
  animation: station-switch-breathe 2.5s ease-in-out infinite;
}
.station-switch-input:checked + .station-switch-slider::before {
  transform: translate(
    calc(var(--switch-w) - (2 * var(--switch-border)) - var(--switch-knob) - (2 * var(--switch-inset))),
    -50%
  );
}
.station-switch-input:focus-visible + .station-switch-slider {
  outline: 2px solid rgba(0, 212, 255, 0.8);
  outline-offset: 2px;
}
.station-switch-input:disabled + .station-switch-slider {
  cursor: not-allowed;
}
.station-switch.processing {
  cursor: wait;
  pointer-events: none;
}
@keyframes station-switch-breathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
@media (max-width: 520px) {
  .station-control-row {
    padding: 8px 8px 6px;
  }
  .station-control-layout {
    column-gap: 8px;
    row-gap: 3px;
  }
  .station-control-nowplaying-sep,
  .station-control-nowplaying-title {
    display: none;
  }
  .control-host-daemon-row {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 8px;
  }
  .station-control-meta {
    flex: 1 1 auto;
    min-width: 0;
  }
  .station-control-name {
    font-size: 15px;
  }
  .control-host-daemon-row-title {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .control-host-daemon-row-hint {
    display: none;
  }
  .station-toggle {
    width: auto;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-right: 0;
  }
  .station-control-gear-col {
    margin-top: 0;
    margin-bottom: 0;
  }
  .control-host-daemon-row .station-toggle {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    padding-right: 0;
  }
}

body.control-page .gravy-live-player-bar__inner {
  padding: 0 16px;
}
body.control-page .gravy-live-player-bar--control-error .gravy-live-player-bar__inner {
  justify-content: center;
}
body.control-page .gravy-live-player-bar--idle .gravy-live-player-bar__inner {
  justify-content: flex-end;
}
body.control-page .gravy-live-player-bar--idle .gravy-live-player-bar__meta,
body.control-page .gravy-live-player-bar--idle .gravy-live-player-bar__status,
body.control-page .gravy-live-player-bar--idle .gravy-live-player-bar__volume {
  display: none;
}
.station-control-row .station-stream-link.gravy-live-player-bar__play .gravy-live-player-bar__icon--stop {
  display: none;
}
.station-control-row .station-stream-link.gravy-live-player-bar__play.is-playing .gravy-live-player-bar__icon--play {
  display: none;
}
.station-control-row .station-stream-link.gravy-live-player-bar__play.is-playing .gravy-live-player-bar__icon--stop {
  display: block;
}
.station-stream-link {
  flex-shrink: 0;
}
.station-control-row .station-stream-link.gravy-live-player-bar__play {
  width: 28px;
  height: 28px;
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}
.station-control-row .station-stream-link.gravy-live-player-bar__play:hover {
  background: #1d4ed8;
  border-color: #1e40af;
}
.station-control-row .station-stream-link.gravy-live-player-bar__play.is-playing {
  background: #1d4ed8;
  border-color: #1e40af;
}
.station-control-row .station-stream-link.gravy-live-player-bar__play .gravy-live-player-bar__icon {
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.station-stream-link:focus-visible {
  outline: 2px solid rgba(120, 170, 220, 0.8);
  outline-offset: 2px;
}

.station-control-gear-col {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  align-self: center;
  overflow: visible;
}
.station-control-gear-col .station-gear-link {
  align-self: center;
  flex-shrink: 0;
}
.station-gear-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  color: #cfd8dc;
  transition: color 0.2s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.station-control-row .station-gear-link {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
  color: #cfd8dc;
}
.station-control-row .station-gear-link:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: #e8f5e9;
  filter: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.station-gear-link:hover {
  color: #e8f5e9;
  filter: drop-shadow(0 0 8px rgba(139, 195, 74, 0.8));
}
.station-gear-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
}
.station-control-row .station-gear-link svg {
  width: 18px;
  height: 18px;
}
.station-control-row .station-gear-link:focus-visible {
  outline: 2px solid rgba(120, 170, 220, 0.85);
  outline-offset: 2px;
}
.station-gear-link:focus-visible {
  outline: 2px solid #8bc34a;
  outline-offset: 2px;
}

#panel-tracksearch.panel {
  display: none;
}
#panel-tracksearch.panel.active {
  display: block;
}

#panel-history.panel {
  display: none;
}
#panel-history.panel.active {
  display: block;
}
#panel-history .track-history-before-field {
  position: relative;
  flex: 1 1 200px;
  min-width: 0;
  max-width: 280px;
}
#panel-history .track-history-before-trigger {
  width: 100%;
  text-align: left;
  cursor: pointer;
}
#panel-history .track-history-before-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  width: 300px;
  max-width: min(300px, calc(100vw - 32px));
}
#panel-history .track-history-before-popover-panel {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.98);
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
#panel-history .track-history-datetime-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#panel-history .track-history-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#panel-history .track-history-picker-month {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #e8eef6;
}
#panel-history .track-history-picker-nav {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #c5d4e8;
  cursor: pointer;
}
#panel-history .track-history-picker-nav:hover {
  background: rgba(255, 255, 255, 0.12);
}
#panel-history .track-history-picker-weekdays,
#panel-history .track-history-picker-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
#panel-history .track-history-picker-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #8ca0b9;
}
#panel-history .track-history-picker-day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #e0e8f2;
  font-size: 12px;
  cursor: pointer;
}
#panel-history .track-history-picker-day--empty {
  pointer-events: none;
}
#panel-history .track-history-picker-day:hover {
  background: rgba(255, 255, 255, 0.08);
}
#panel-history .track-history-picker-day.is-today {
  border-color: rgba(41, 121, 255, 0.35);
}
#panel-history .track-history-picker-day.is-selected {
  background: rgba(41, 121, 255, 0.28);
  border-color: rgba(41, 121, 255, 0.55);
  color: #fff;
}
#panel-history .track-history-picker-time {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
#panel-history .track-history-picker-time-label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8ca0b9;
}
#panel-history .track-history-picker-time-select {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  font-size: 13px;
}
#panel-history .track-history-picker-time-sep {
  color: #8ca0b9;
  font-weight: 600;
}
#panel-history .track-history-before-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
#panel-history .track-history-editor-row .track-history-before-clear {
  flex-shrink: 0;
}
body.theme-light #panel-history .track-history-before-popover-panel {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
body.theme-light #panel-history .track-history-picker-month {
  color: #1e293b;
}
body.theme-light #panel-history .track-history-picker-nav {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  color: #475569;
}
body.theme-light #panel-history .track-history-picker-nav:hover {
  background: rgba(15, 23, 42, 0.08);
}
body.theme-light #panel-history .track-history-picker-weekdays span,
body.theme-light #panel-history .track-history-picker-time-label,
body.theme-light #panel-history .track-history-picker-time-sep {
  color: #64748b;
}
body.theme-light #panel-history .track-history-picker-day {
  color: #1e293b;
}
body.theme-light #panel-history .track-history-picker-day:hover {
  background: rgba(15, 23, 42, 0.06);
}
body.theme-light #panel-history .track-history-picker-day.is-selected {
  background: rgba(41, 121, 255, 0.16);
  border-color: rgba(41, 121, 255, 0.45);
  color: #1d4ed8;
}
body.theme-light #panel-history .track-history-picker-time,
body.theme-light #panel-history .track-history-before-popover-actions {
  border-top-color: rgba(15, 23, 42, 0.08);
}
#panel-history .track-history-editor-settings-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#panel-history .track-history-editor-settings-box .track-history-list {
  flex: 0 0 auto;
  height: clamp(240px, calc(100vh - 360px), 640px);
  min-height: 240px;
  max-height: clamp(240px, calc(100vh - 360px), 640px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.75);
}
#panel-history .track-history-editor-settings-box .track-history-pagination {
  flex-shrink: 0;
  margin-top: 0;
  padding: 10px 0 0;
  border-top: none;
}

#panel-history .track-history-editor-row .programming-history-open-btn {
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}

.programming-history-overlay {
  z-index: 10058;
}
.programming-history-modal__intro {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(203, 213, 225, 0.88);
}
body.theme-light .programming-history-modal__intro {
  color: #64748b;
}
.programming-history-table-wrap {
  max-height: min(58vh, 520px);
  overflow: hidden;
}
#programmingHistoryOverlay .track-history-list {
  max-height: min(58vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.75);
}
#programmingHistoryOverlay .programming-history-header-row,
#programmingHistoryOverlay .programming-history-row {
  min-width: 0;
  padding-right: 12px;
}
#programmingHistoryOverlay .programming-history-htime,
#programmingHistoryOverlay .programming-history-time {
  flex: 0 0 150px;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#programmingHistoryOverlay .programming-history-htime {
  white-space: nowrap;
}
#programmingHistoryOverlay .programming-history-time {
  font-size: 13px;
  font-weight: 400;
  color: #8ca0b9;
}
#programmingHistoryOverlay .programming-history-hprofile,
#programmingHistoryOverlay .programming-history-profile {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  text-align: left;
}
#programmingHistoryOverlay .programming-history-hscheduler,
#programmingHistoryOverlay .programming-history-scheduler {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  text-align: left;
}
#programmingHistoryOverlay .programming-history-profile,
#programmingHistoryOverlay .programming-history-scheduler {
  font-size: 13px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.theme-light #programmingHistoryOverlay .track-history-list {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
}
body.theme-light #programmingHistoryOverlay .programming-history-time {
  color: #737373;
}
.programming-history-empty,
.programming-history-loading,
.programming-history-error {
  margin: 0;
  padding: 1rem 0.25rem;
  font-size: 0.875rem;
  color: rgba(148, 163, 184, 0.95);
  text-align: center;
}
body.theme-light .programming-history-empty,
body.theme-light .programming-history-loading,
body.theme-light .programming-history-error {
  color: #64748b;
}

.track-search-header-bar {
  display: contents;
}
.track-search-header-bar .panel-main-header {
  margin-bottom: 0;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}
.track-search-header-bar .track-search-input-wrap {
  grid-column: 3;
  grid-row: 1;
}
.track-search-header-bar .track-search-filters-bar {
  grid-column: 3;
  grid-row: 2;
  margin: 0;
}
.track-search-body {
  grid-column: 3;
  grid-row: 3;
}
.track-search-input-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}
.track-search-icon {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}
.track-search-icon svg {
  width: 14px;
  height: 14px;
}
.track-search-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  background: rgba(14, 28, 46, 0.95);
  border: 1px solid rgba(80, 140, 210, 0.35);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  padding: 7px 12px 7px 32px;
  box-shadow: inset 0 0 0 1px rgba(41, 96, 180, 0.1);
}
.track-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.track-search-input:focus {
  outline: none;
  border-color: rgba(130, 190, 255, 0.8);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.25);
}
.track-search-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.track-search-filters-bar .track-search-filter-select {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 280px;
}
.track-search-filter-clear {
  flex: 0 0 auto;
}
.track-search-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.track-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(80, 140, 210, 0.35);
  background: rgba(41, 121, 255, 0.18);
  color: #d7ebff;
  font-size: 12px;
  font-weight: 600;
}
.track-search-chip-remove {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.track-search-chip-remove:hover,
.track-search-chip-remove:focus-visible {
  color: #fff;
}
body.theme-light #panel-tracksearch .track-search-icon {
  color: #737373;
}
body.theme-light #panel-tracksearch .track-search-input {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a !important;
  box-shadow: none;
}
body.theme-light #panel-tracksearch .track-search-input::placeholder {
  color: #737373;
}
body.theme-light #panel-tracksearch .track-search-input:focus {
  border-color: hsl(221 83% 53%);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
/* Crates sidebar: same conflict as track search — .form-control (light bg) + .track-search-input (white text !important) */
body.theme-light #panel-crates .track-search-icon {
  color: #737373;
}
body.theme-light #panel-crates .track-search-input {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a !important;
  box-shadow: none;
}
body.theme-light #panel-crates .track-search-input::placeholder {
  color: #737373;
}
body.theme-light #panel-crates .track-search-input:focus {
  border-color: hsl(221 83% 53%);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
body.theme-light .track-search-chip {
  border-color: hsl(0 0% 82%);
  background: rgba(10, 10, 10, 0.06);
  color: #1f2937;
}
body.theme-light .track-search-chip-remove:hover,
body.theme-light .track-search-chip-remove:focus-visible {
  color: #111827;
}
#panel-tracksearch .track-search-editor-row .track-search-editor-search {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 20rem;
}
#panel-tracksearch .track-search-editor-row .track-search-editor-filters {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
#panel-tracksearch .track-search-editor-row .track-search-filter-select {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 11rem;
}
#panel-tracksearch .track-search-editor-row .track-search-filter-clear {
  flex: 0 0 auto;
  min-height: 34px;
}
#panel-tracksearch .track-search-editor-settings-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
#panel-tracksearch .track-search-editor-settings-box .track-search-active-filters[hidden] {
  display: none;
}
#panel-tracksearch .track-search-editor-settings-box .track-search-results {
  flex: 0 0 auto;
  height: clamp(240px, calc(100vh - 360px), 640px);
  min-height: 240px;
  max-height: clamp(240px, calc(100vh - 360px), 640px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  container-type: normal;
  display: block;
  box-sizing: border-box;
}
#panel-tracksearch .track-search-results.empty {
  display: block;
}
#panel-tracksearch .track-search-header,
#panel-tracksearch .track-search-item {
  display: grid;
  grid-template-columns: 28px 28px minmax(80px, 0.28fr) minmax(0, 1fr) minmax(72px, 0.22fr) 44px 52px 50px 44px;
  column-gap: 8px;
  align-items: center;
  padding-left: 12px;
  padding-right: 12px;
}
#panel-tracksearch .track-search-item .th-thumb,
#panel-tracksearch .track-search-header .track-search-hthumb {
  justify-self: center;
}
#panel-tracksearch .track-search-item .track-history-artist-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
#panel-tracksearch .track-search-header {
  padding-top: 6px;
  padding-bottom: 6px;
}
#panel-tracksearch .track-search-item {
  padding-top: 7px;
  padding-bottom: 7px;
}
#panel-tracksearch .track-search-hplay,
#panel-tracksearch .track-search-hthumb,
#panel-tracksearch .track-search-hartist,
#panel-tracksearch .track-search-htitle,
#panel-tracksearch .track-search-hgenre,
#panel-tracksearch .track-search-hbpm,
#panel-tracksearch .track-search-hkey,
#panel-tracksearch .track-search-hdur,
#panel-tracksearch .track-search-hactions,
#panel-tracksearch .track-search-play,
#panel-tracksearch .track-search-artist,
#panel-tracksearch .track-search-title,
#panel-tracksearch .track-search-genre,
#panel-tracksearch .track-search-bpm,
#panel-tracksearch .track-search-key,
#panel-tracksearch .track-search-dur,
#panel-tracksearch .track-search-actions {
  min-width: 0;
}
#panel-tracksearch .track-search-artist,
#panel-tracksearch .track-search-title,
#panel-tracksearch .track-search-genre {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
#panel-tracksearch .track-search-genre {
  color: rgba(180, 195, 215, 0.88);
  font-size: 12px;
}
body.theme-light #panel-tracksearch .track-search-genre {
  color: rgba(51, 65, 85, 0.82);
}
#panel-tracksearch .track-search-hgenre {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(160, 180, 205, 0.9);
}
body.theme-light #panel-tracksearch .track-search-hgenre {
  color: rgba(71, 85, 105, 0.88);
}
#panel-tracksearch .track-search-artist,
#panel-tracksearch .track-search-hartist {
  max-width: 170px;
}
#panel-tracksearch .track-search-artist {
  color: #e8eef5;
}
#panel-tracksearch .track-search-title {
  color: rgba(200, 210, 225, 0.92);
}
#panel-tracksearch .track-search-hbpm,
#panel-tracksearch .track-search-bpm {
  text-align: left;
}
#panel-tracksearch .track-search-hkey,
#panel-tracksearch .track-search-key {
  text-align: left;
}
#panel-tracksearch .track-search-hdur,
#panel-tracksearch .track-search-dur {
  text-align: right;
}
#panel-tracksearch .track-search-item.is-preview-playing,
#panel-tracksearch .track-search-item.is-preview-loading,
#panel-crates .track-search-item.is-preview-playing,
#panel-crates .track-search-item.is-preview-loading,
#panel-track-pools-manager .track-search-item.is-preview-playing,
#panel-track-pools-manager .track-search-item.is-preview-loading,
#poolMapPreviewHeader.is-preview-playing,
#poolMapPreviewHeader.is-preview-loading,
#panel-history .track-history-row.is-preview-playing,
#panel-history .track-history-row.is-preview-loading {
  position: relative;
  cursor: pointer;
}
#panel-tracksearch .track-search-item.is-preview-playing::before,
#panel-tracksearch .track-search-item.is-preview-loading::before,
#panel-crates .track-search-item.is-preview-playing::before,
#panel-crates .track-search-item.is-preview-loading::before,
#panel-track-pools-manager .track-search-item.is-preview-playing::before,
#panel-track-pools-manager .track-search-item.is-preview-loading::before,
#poolMapPreviewHeader.is-preview-playing::before,
#poolMapPreviewHeader.is-preview-loading::before,
#panel-history .track-history-row.is-preview-playing::before,
#panel-history .track-history-row.is-preview-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.07);
  z-index: 0;
  pointer-events: none;
}
#panel-tracksearch .track-search-item.is-preview-playing::after,
#panel-crates .track-search-item.is-preview-playing::after,
#panel-track-pools-manager .track-search-item.is-preview-playing::after,
#poolMapPreviewHeader.is-preview-playing::after,
#panel-history .track-history-row.is-preview-playing::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--track-preview-progress, 0%);
  background: rgba(255, 255, 255, 0.14);
  z-index: 0;
  pointer-events: none;
  transition: width 0.08s linear;
}
#panel-tracksearch .track-search-item.is-preview-playing > *,
#panel-tracksearch .track-search-item.is-preview-loading > *,
#panel-crates .track-search-item.is-preview-playing > *,
#panel-crates .track-search-item.is-preview-loading > *,
#panel-track-pools-manager .track-search-item.is-preview-playing > *,
#panel-track-pools-manager .track-search-item.is-preview-loading > *,
#poolMapPreviewHeader.is-preview-playing > *,
#poolMapPreviewHeader.is-preview-loading > *,
#panel-history .track-history-row.is-preview-playing > *,
#panel-history .track-history-row.is-preview-loading > * {
  position: relative;
  z-index: 1;
}
#panel-tracksearch .track-search-item.is-preview-playing:hover,
#panel-tracksearch .track-search-item.is-preview-loading:hover,
#panel-tracksearch .track-search-item.is-preview-playing.selected,
#panel-tracksearch .track-search-item.is-preview-loading.selected,
#panel-crates .track-search-item.is-preview-playing:hover,
#panel-crates .track-search-item.is-preview-loading:hover,
#panel-track-pools-manager .track-search-item.is-preview-playing:hover,
#panel-track-pools-manager .track-search-item.is-preview-loading:hover,
#poolMapPreviewHeader.is-preview-playing:hover,
#poolMapPreviewHeader.is-preview-loading:hover,
#panel-history .track-history-row.is-preview-playing:hover,
#panel-history .track-history-row.is-preview-loading:hover {
  background: transparent;
}
body.theme-light #panel-tracksearch .track-search-item.is-preview-playing::before,
body.theme-light #panel-tracksearch .track-search-item.is-preview-loading::before,
body.theme-light #panel-crates .track-search-item.is-preview-playing::before,
body.theme-light #panel-crates .track-search-item.is-preview-loading::before,
body.theme-light #panel-track-pools-manager .track-search-item.is-preview-playing::before,
body.theme-light #panel-track-pools-manager .track-search-item.is-preview-loading::before,
body.theme-light #panel-history .track-history-row.is-preview-playing::before,
body.theme-light #panel-history .track-history-row.is-preview-loading::before {
  background: rgba(10, 10, 10, 0.06);
}
body.theme-light #panel-tracksearch .track-search-item.is-preview-playing::after,
body.theme-light #panel-crates .track-search-item.is-preview-playing::after,
body.theme-light #panel-track-pools-manager .track-search-item.is-preview-playing::after,
body.theme-light #poolMapPreviewHeader.is-preview-playing::after,
body.theme-light #panel-history .track-history-row.is-preview-playing::after {
  background: rgba(10, 10, 10, 0.12);
}
.track-search-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.track-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(17,17,17,0.75);
  max-height: 420px;
  overflow-y: auto;
  scrollbar-color: #707070 #101010;
  container-type: inline-size;
  container-name: track-search;
}
.track-search-results::-webkit-scrollbar {
  width: 8px;
}
.track-search-results::-webkit-scrollbar-track {
  background: #101010;
  border-radius: 6px;
}
.track-search-results::-webkit-scrollbar-thumb {
  background: #707070;
  border-radius: 6px;
}
.track-search-results::-webkit-scrollbar-thumb:hover {
  background: #8d8d8d;
}
.track-search-results.empty {
  display: none;
}

/* Column header row */
.track-search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6b7b8d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
  position: sticky;
  top: 0;
  background: rgba(17,17,17,0.97);
  z-index: 1;
}
.track-search-hplay {
  width: 28px;
  flex-shrink: 0;
}
.track-search-hmeta {
  flex: 1;
  min-width: 0;
}
.track-search-hbpm {
  flex-shrink: 0;
  min-width: 36px;
  text-align: right;
}
.track-search-hkey {
  flex-shrink: 0;
  min-width: 28px;
  text-align: right;
}
.track-search-hdur {
  flex-shrink: 0;
  min-width: 40px;
  text-align: right;
}
.track-search-hactions {
  flex-shrink: 0;
  min-width: 44px;
  text-align: right;
}
/* Responsive: hide BPM then Key as container narrows (before truncating artist/title) */
@container track-search (max-width: 560px) {
  .track-search-hbpm,
  .track-search-item .track-search-bpm {
    display: none;
  }
}
@container track-search (max-width: 440px) {
  .track-search-hkey,
  .track-search-item .track-search-key {
    display: none;
  }
}

/* Result rows */
.track-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.track-search-item.selected {
  background: rgba(139,195,74,0.15);
}
.track-search-item:last-child {
  border-bottom: none;
}
.track-search-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Play button */
.track-search-play {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #9fb3cc;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.track-search-play:hover {
  background: rgba(41, 121, 255, 0.2);
  color: #fff;
}

/* Meta: artist — title */
.track-search-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
  overflow: hidden;
}
.track-search-artist {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}
.track-search-sep {
  color: #556;
  flex-shrink: 0;
}
.track-search-title {
  color: #b0c4de;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}
.track-blocked-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  padding: 0;
  background: #8c1d1d;
  color: #fff;
  border: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
  text-align: center;
  line-height: 18px;
  flex-shrink: 0;
}
.track-duplicate-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  padding: 0;
  background: #92400e;
  color: #fff;
  border: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
  text-align: center;
  line-height: 18px;
  flex-shrink: 0;
}

/* Data columns */
.track-search-bpm,
.track-search-key,
.track-search-dur {
  flex-shrink: 0;
  font-size: 12px;
  color: #8ca0b9;
  min-width: 36px;
  text-align: right;
}
.track-search-key {
  min-width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}
.track-search-key .deck-key-harmonic-chip--key-only {
  flex-shrink: 0;
}
.track-search-dur {
  min-width: 40px;
}

/* Action popup menu */
.track-search-actions {
  flex-shrink: 0;
  min-width: 44px;
  display: inline-flex;
  justify-content: flex-end;
}
.track-search-actions-wrap {
  position: relative;
  display: inline-flex;
}
.track-search-actions-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.track-search-actions-trigger:hover,
.track-search-actions-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
}
.track-search-actions-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.track-search-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 1500;
  display: flex;
  flex-direction: row;
  gap: 4px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(12, 20, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.track-search-actions-menu[hidden] {
  display: none !important;
}
.track-search-menu-item {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #e8eefb;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.track-search-menu-item:hover,
.track-search-menu-item:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
}
.track-search-menu-item[data-track-action="block"] {
  color: #fca5a5;
}
.track-search-menu-item[data-track-action="unblock"] {
  color: #86efac;
}
.track-search-menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.track-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.idents-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.idents-preview-btn {
  padding: 1px 4px;
  font-size: 10px;
  line-height: 1;
  background: transparent;
  border: 1px solid transparent;
  color: #ffffff;
  cursor: pointer;
}
.idents-preview-btn:hover,
.idents-preview-btn:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}
.idents-edit-btn {
  padding: 1px 4px;
  font-size: 10px;
  line-height: 1;
  background: transparent;
  border: 1px solid transparent;
  color: #9fb3cc;
  cursor: pointer;
}
.idents-edit-btn:hover,
.idents-edit-btn:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}
.track-search-btn.success {
  background: rgba(129,199,132,0.85);
  border-color: rgba(129,199,132,0.7);
  color: #1b5e20;
}
.track-search-btn.error {
  background: rgba(229,57,53,0.9);
  border-color: rgba(211,47,47,0.8);
  color: #ffebee;
}
/* Track Search Pagination */
.track-search-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#panel-tracksearch .track-search-pagination {
  flex-shrink: 0;
  margin-top: 0;
  padding: 10px 0 0;
  border-top: none;
}
.pagination-btn {
  padding: 5px 14px;
  background: rgba(41, 121, 255, 0.18);
  border: 1px solid rgba(41, 121, 255, 0.35);
  color: #6db3ff;
  cursor: pointer;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.pagination-btn:hover:not(:disabled) {
  background: rgba(41, 121, 255, 0.3);
  border-color: rgba(41, 121, 255, 0.5);
}
.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination-btn.active {
  background: rgba(41, 121, 255, 0.35);
  border-color: rgba(41, 121, 255, 0.5);
}
.pagination-info {
  font-size: 12px;
  font-weight: 600;
  color: #8ca0b9;
  margin: 0 0.5rem;
}
.track-search-result-count {
  margin-right: 0.25rem;
  white-space: nowrap;
}
.pagination-numbers {
  display: flex;
  gap: 0.25rem;
}

/* Pagination – light theme (match playlist profile buttons) */
body.theme-light .pagination-btn {
  background: rgba(10, 10, 10, 0.06);
  border-color: hsl(0 0% 82%);
  color: #171717;
}
body.theme-light .pagination-btn:hover:not(:disabled) {
  background: rgba(10, 10, 10, 0.12);
  border-color: hsl(0 0% 72%);
}
body.theme-light .pagination-btn:disabled {
  opacity: 0.4;
}
body.theme-light .pagination-btn.active {
  background: rgba(10, 10, 10, 0.12);
  border-color: hsl(0 0% 72%);
  color: #171717;
}
body.theme-light .pagination-info {
  color: #525252;
}

.track-search-btn:focus-visible,
.track-search-play:focus-visible {
  outline: 2px solid rgba(139,195,74,0.8);
  outline-offset: 2px;
}

.dj-broadcast-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #c62828;
  border: 1px solid #b71c1c;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}
.dj-broadcast-banner[hidden] {
  display: none;
}
#panel-playback {
  position: relative;
}
/* Centres the takeover dialog and blocks deck input. No tint/backdrop-filter:
   the Home cards blur their own contents instead (see .deck-live-dj-on-air below). */
.dj-broadcast-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  pointer-events: auto;
}
.dj-broadcast-overlay[hidden] {
  display: none;
}
.dj-broadcast-overlay-dialog {
  width: min(480px, 92vw);
  background: rgba(26, 10, 10, 0.92);
  border: 2px solid #e53935;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}
.dj-broadcast-overlay.is-exiting .dj-broadcast-overlay-kicker {
  color: #ff8a80;
}
.dj-broadcast-overlay-kicker {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff5252;
}
.dj-broadcast-overlay-dj {
  margin: 0 0 20px;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  word-break: break-word;
}
.dj-broadcast-overlay-note {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  line-height: 1.45;
}
.dj-broadcast-overlay-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}
.dj-broadcast-overlay-btn {
  min-width: 10rem;
}
.dj-broadcast-overlay-status {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}
.dj-broadcast-overlay-status.is-error {
  color: #ff8a80;
}
#panel-playback.deck-live-dj-on-air .deck-grid,
#panel-playback.deck-live-dj-exiting .deck-grid,
#panel-playback.deck-live-dj-on-air .deck-status-stack,
#panel-playback.deck-live-dj-exiting .deck-status-stack {
  pointer-events: none;
}
/* Blur each card's contents, not the whole panel: card backgrounds and radii stay
   crisp so the Home layout still reads behind the dialog. overflow keeps the
   blur bleed inside the card bounds. */
#panel-playback.deck-live-dj-on-air .deck-section,
#panel-playback.deck-live-dj-exiting .deck-section,
#panel-playback.deck-live-dj-on-air .deck-live-mode-box,
#panel-playback.deck-live-dj-exiting .deck-live-mode-box {
  overflow: hidden;
}
#panel-playback.deck-live-dj-on-air .deck-section > *,
#panel-playback.deck-live-dj-exiting .deck-section > *,
#panel-playback.deck-live-dj-on-air .deck-live-mode-box > *,
#panel-playback.deck-live-dj-exiting .deck-live-mode-box > * {
  filter: blur(6px) saturate(0.8);
  opacity: 0.8;
}
/* Matches the profile settings general tab: 18px on the card, 26px on each
   section (like .profile-settings-cell), so dividers and content line up. */
.live-stream-panel-body {
  padding: 0 18px 18px;
}
.live-stream-error {
  position: absolute;
  left: 62px;
  right: 42px;
  top: 6px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(229, 57, 53, 0.15);
  border: 1px solid rgba(229, 57, 53, 0.45);
  color: #ff8a80;
  font-size: 0.9rem;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}
.live-stream-error[hidden] {
  display: none;
}
#panel-live-stream .playlist-profile-editor-settings-box {
  position: relative;
}
#panel-live-stream > .playlist-profile-editor-box {
  background: rgba(14, 28, 46, 0.95);
  border: none;
  box-shadow: none;
}
#panel-live-stream > .playlist-profile-editor-box .playlist-profile-editor-heading {
  color: #e5f3ff;
}
body.theme-light #panel-live-stream > .playlist-profile-editor-box {
  background: #fff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
body.theme-light #panel-live-stream > .playlist-profile-editor-box .playlist-profile-editor-heading {
  color: #0a0a0a;
}
.live-stream-arm-section {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  padding: 28px 24px 28px 44px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
}
.live-stream-arm-label {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: none;
  user-select: none;
  transition: color 0.15s ease;
  /* Inactive/grey by default (Armed while disarmed, Disarmed while armed). */
  color: rgba(255, 255, 255, 0.42);
}
/* Disarmed uses the profile-settings toggle label colour while inactive. */
.live-stream-arm-label--disarmed {
  color: #e5f3ff;
}
.live-stream-arm-section.is-armed .live-stream-arm-label--disarmed {
  color: rgba(255, 255, 255, 0.42);
}
.live-stream-arm-section.is-armed .live-stream-arm-label--armed {
  color: #ef5350;
}
body.theme-light .live-stream-arm-label {
  color: rgba(0, 0, 0, 0.35);
}
body.theme-light .live-stream-arm-label--disarmed {
  color: rgba(0, 0, 0, 0.88);
}
body.theme-light .live-stream-arm-section.is-armed .live-stream-arm-label--disarmed {
  color: rgba(0, 0, 0, 0.35);
}
body.theme-light .live-stream-arm-section.is-armed .live-stream-arm-label--armed {
  color: #c62828;
}
.live-stream-arm-switch input:checked + .switch-slider {
  background: linear-gradient(90deg, #ef5350, #c62828);
  box-shadow: 0 0 18px rgba(229, 57, 53, 0.55);
}
.live-stream-arm-switch input:checked + .switch-slider:before {
  background: #fff;
}
.live-stream-section-heading {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.live-stream-transitions-section {
  padding: 26px 24px 32px 44px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
}
.live-stream-transitions-grid {
  display: grid;
  gap: 16px;
}
.live-stream-transition-field--fade {
  max-width: 10rem;
}
.live-stream-transition-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.live-stream-transition-col {
  min-width: 0;
}
.live-stream-transition-col-heading {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
/* Toggle and ident picker share one row so the box stays short. */
.live-stream-transition-col-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.live-stream-transition-field {
  display: flex;
  align-items: center;
  flex: 1 1 12rem;
  min-width: 0;
}
.live-stream-transition-field > select {
  flex: 1 1 auto;
  min-width: 0;
}
.live-stream-transition-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.live-stream-transition-toggle .switch {
  flex-shrink: 0;
}
.live-stream-transition-toggle > span {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}
.live-stream-transitions-status {
  margin: 10px 0 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}
.live-stream-transitions-status[hidden] {
  display: block;
  visibility: hidden;
}
.live-stream-transitions-status.is-error {
  color: #ff8a80;
}
body.theme-light .live-stream-transition-toggle > span {
  color: rgba(0, 0, 0, 0.55);
}
body.theme-light .live-stream-transition-col-heading {
  color: rgba(0, 0, 0, 0.8);
}
.live-stream-connection-info {
  padding: 26px 24px 32px 44px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
}
.live-stream-conn-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-width: 28rem;
}
.live-stream-conn-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}
.live-stream-conn-list li > span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}
.live-stream-conn-list li code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  color: #fff;
  background: none;
  padding: 0;
}
.live-stream-djs-section {
  padding: 26px 24px 32px 44px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
}
.live-stream-section-header,
.live-stream-djs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.live-stream-section-header .live-stream-section-heading,
.live-stream-djs-header .live-stream-section-heading {
  margin: 0;
}
.live-stream-manage-btn,
.live-stream-action-btn {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 11rem;
  min-width: 11rem;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}
/* .btn-secondary:hover forces white text, which disappears on the light-theme
   hover background. */
body.theme-light .live-stream-manage-btn:hover:not(:disabled),
body.theme-light .live-stream-manage-btn:focus-visible:not(:disabled),
body.theme-light .live-stream-action-btn.btn-secondary:hover:not(:disabled),
body.theme-light .live-stream-action-btn.btn-secondary:focus-visible:not(:disabled) {
  background: #f5f5f5;
  border-color: hsl(0 0% 82%);
  color: #0a0a0a;
}
.live-stream-dj-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.live-stream-dj-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.live-stream-dj-name {
  font-weight: 600;
  color: #fff;
}
.live-stream-dj-user {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.live-stream-dj-flag {
  margin-left: auto;
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.live-stream-dj-flag.is-enabled {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.35);
}
.live-stream-dj-edit {
  flex-shrink: 0;
}
#liveStreamDjForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}
#liveStreamDjForm .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#liveStreamDjForm .form-hint {
  margin: 0;
}
#liveStreamDjForm .live-stream-dj-label-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
#liveStreamDjForm .live-stream-dj-label-row .form-label {
  margin: 0;
}
#liveStreamDjForm .live-stream-dj-enabled-row {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 10px 0 12px;
}
#liveStreamDjForm .live-stream-dj-enabled-row .form-label {
  margin: 0;
}
#liveStreamDjDeleteBtn {
  margin-right: auto;
}
.live-stream-empty {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}
body.theme-light .live-stream-section-heading {
  color: rgba(0, 0, 0, 0.8);
}
body.theme-light .live-stream-dj-list li {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
body.theme-light .live-stream-conn-list li > span,
body.theme-light .live-stream-dj-user {
  color: rgba(0, 0, 0, 0.55);
}
body.theme-light .live-stream-conn-list li code,
body.theme-light .live-stream-dj-name {
  color: #171717;
}
body.theme-light .live-stream-dj-flag {
  color: rgba(0, 0, 0, 0.55);
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.14);
}
body.theme-light .live-stream-dj-flag.is-enabled {
  color: #15803d;
  background: rgba(21, 128, 61, 0.1);
  border-color: rgba(21, 128, 61, 0.3);
}
body.theme-light .live-stream-empty {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.55);
}
.live-stream-recover-section {
  padding: 26px 24px 26px 44px;
}
body.theme-light .live-stream-arm-section,
body.theme-light .live-stream-transitions-section,
body.theme-light .live-stream-connection-info,
body.theme-light .live-stream-djs-section {
  border-bottom-color: hsl(0 0% 84%);
}
.live-stream-recover-hint {
  margin: 0;
}
.live-stream-recover-status {
  margin: 10px 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}
.live-stream-recover-status.is-error {
  color: #ff8a80;
}
body.theme-light .live-stream-recover-status.is-error {
  color: #c62828;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}
/* Stacked above pool-name-modal overlays (imaging picker z-index 9999) */
.modal-overlay.modal-overlay--above-imaging-picker {
  z-index: 10050;
}
.modal-overlay[hidden] {
  display: none;
}
.modal-dialog {
  width: min(420px, 92vw);
  background: #111;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-dialog--large {
  width: min(800px, 95vw);
  max-height: 90vh;
}
.modal-dialog h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}
#confirmMessage {
  white-space: pre-line;
  margin: 0;
  line-height: 1.45;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-buttons {
  display: inline-flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-error {
  color: #ff6b6b;
  font-size: 13px;
}
.modal-error[hidden] {
  display: none;
}

/* Ident edit modal — stacked label/control spacing (matches profile nte-field-pair--stacked) */
#identEditOverlay #identEditForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#identEditOverlay .nte-field-pair--stacked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--nte-field-label-gap, 12px);
  min-width: 0;
  width: 100%;
}
#identEditOverlay .nte-field-pair--stacked .form-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #8ca0b9;
}
#identEditOverlay .nte-field-pair--stacked .form-control {
  width: 100%;
  box-sizing: border-box;
}
body.theme-light #identEditOverlay .nte-field-pair--stacked .form-label {
  color: #4b5563;
}
#identEditOverlay .modal-actions {
  margin-top: 12px;
}

/* Track edit modal tabs */
.modal-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-dialog__close {
  appearance: none;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0.7;
}
.modal-dialog__close:hover,
.modal-dialog__close:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}
body.theme-light .modal-dialog__close:hover,
body.theme-light .modal-dialog__close:focus-visible {
  background: rgba(0, 0, 0, 0.06);
}
.track-edit-save-status {
  color: #81c784;
}
/* Track Edit: meta fields above tabs */
#trackEditOverlay .track-edit-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.track-edit-meta {
  flex-shrink: 0;
  padding: 12px 16px;
  --track-edit-thumb-size: 96px;
}
#trackEditOverlay .track-edit-meta-live-layout.deck-live-layout {
  align-items: flex-start;
  gap: 12px;
}
#trackEditOverlay .track-edit-meta-live-layout .deck-deck-thumb-col--live {
  align-self: flex-start;
  width: auto;
  height: auto;
  flex-shrink: 0;
  padding-top: 12px;
  padding-bottom: 12px;
}
#trackEditOverlay .deck-deck-thumb-col--live .deck-artist-thumb,
#trackEditOverlay .deck-deck-thumb-col--live .deck-artist-thumb.deck-artist-thumb--live {
  width: var(--track-edit-thumb-size);
  height: var(--track-edit-thumb-size);
  min-width: var(--track-edit-thumb-size);
  min-height: var(--track-edit-thumb-size);
  max-width: var(--track-edit-thumb-size);
  max-height: var(--track-edit-thumb-size);
  flex: 0 0 auto;
  align-self: auto;
  object-fit: cover;
}
#trackEditOverlay .deck-deck-thumb-col--live .deck-artist-thumb.deck-artist-thumb--ident {
  object-fit: contain;
  background: transparent;
  padding: 11px;
  box-sizing: border-box;
}
#trackEditOverlay .track-edit-meta-right.deck-live-right {
  gap: 0;
  flex: 1 1 0;
  min-width: 0;
  align-self: flex-start;
  padding-top: 0;
}
#trackEditOverlay .track-edit-meta-right.deck-live-right::before {
  display: none;
}
.track-edit-meta-fields {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.track-edit-meta .form-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.track-edit-meta-input {
  width: 100%;
  font-size: 15px;
  line-height: 1.35;
  padding: 8px 12px;
}
.track-edit-signal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 28px;
  margin-top: 2px;
}
.track-edit-signal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.85);
}
.track-edit-signal[hidden] {
  display: none !important;
}
.track-edit-signal--bpm {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.track-edit-signal--bpm::after {
  content: ' BPM';
  font-weight: 500;
  opacity: 0.65;
  letter-spacing: 0.04em;
  font-size: 11px;
}
.track-edit-signal--key .deck-key-harmonic-chip--key-only {
  transform: scale(0.95);
  transform-origin: left center;
}
.track-edit-signal--genre {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
}
.track-edit-signal--moods {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.track-edit-signal--moods[hidden] {
  display: none !important;
}
.track-edit-mood-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
.track-edit-mood-chip__emoji {
  font-size: 1rem;
  line-height: 1;
}
body.theme-light .track-edit-mood-chip {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(17, 24, 39, 0.16);
}
.track-edit-signal--tempo {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}
.track-edit-signal--tempo.is-slow {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
}
.track-edit-signal--tempo.is-fast {
  background: rgba(251, 146, 60, 0.2);
  color: #fdba74;
}
.track-edit-signal--tempo.is-unset {
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 0;
}
body.theme-light .track-edit-signal {
  color: rgba(0, 0, 0, 0.82);
}
body.theme-light .track-edit-signal--genre {
  color: rgba(0, 0, 0, 0.62);
}
body.theme-light .track-edit-signal--tempo {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.75);
}
body.theme-light .track-edit-signal--tempo.is-slow {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}
body.theme-light .track-edit-signal--tempo.is-fast {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}
body.theme-light .track-edit-signal--tempo.is-unset {
  background: transparent;
  color: rgba(0, 0, 0, 0.45);
}
/* Track Edit: Artist + title fields */
.track-edit-artist-row {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr auto;
  align-items: end;
  column-gap: 16px;
  margin-bottom: 0;
  width: 100%;
}
.track-edit-artist-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  grid-column: 1;
  min-width: 0;
}
.track-edit-artist-field .form-control {
  width: 100%;
}
.track-edit-title-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
  max-width: 320px;
}
.track-edit-title-row .form-control {
  max-width: none;
}
.track-edit-blocked-row {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  padding-bottom: 8px;
  white-space: nowrap;
}
.track-edit-blocked-row .form-label {
  margin: 0;
}
.track-edit-blocked-state {
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
}
.track-edit-blocked-state.is-on {
  color: #ff5a5a;
}
body.theme-light .track-edit-blocked-state {
  color: rgba(0, 0, 0, 0.55);
}
body.theme-light .track-edit-blocked-state.is-on {
  color: #c62828;
}
/* Red variant of the standard .switch. Selectors use .switch.switch--danger
   to out-specify the theme-light default orange override. */
.switch.switch--danger input:checked + .switch-slider {
  background: linear-gradient(90deg, #ff4d4d, #c62828);
  box-shadow: 0 0 12px rgba(255, 60, 60, 0.45);
}
.switch.switch--danger input:checked + .switch-slider:before {
  background: #fff0f0;
}
.modal-dialog--tabs {
  width: min(900px, 95vw);
  height: min(520px, 96vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 12px;
  gap: 12px;
}
#trackEditOverlay .modal-dialog--tabs {
  --track-edit-modal-border: rgba(255, 255, 255, 0.12);
  height: min(740px, 94vh);
  max-height: 94vh;
  padding: 0;
  gap: 0;
  border-width: 2px;
  border-color: var(--track-edit-modal-border);
  overflow: hidden;
}
.track-edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 14px 16px;
  background: var(--track-edit-modal-border);
  cursor: move;
  user-select: none;
  touch-action: none;
}
.track-edit-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.track-edit-modal-header .modal-dialog__close {
  cursor: pointer;
}
#trackEditOverlay .modal-dialog--track-edit.is-dragging {
  transition: none;
}
#trackEditOverlay .modal-tabs {
  margin: 0;
  padding: 18px 16px 0;
  flex-shrink: 0;
}
#trackEditOverlay .modal-tab-panel {
  flex: 1;
  min-height: 0;
  padding: 20px 16px 12px;
}
.track-edit-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--track-edit-modal-border, rgba(255, 255, 255, 0.12));
  padding: 12px 16px 14px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.track-edit-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.track-edit-footer .modal-error,
.track-edit-footer .track-edit-save-status {
  margin: 0;
}
body.theme-light #trackEditOverlay .modal-dialog--tabs {
  --track-edit-modal-border: hsl(0 0% 89.8%);
}
body.theme-light .track-edit-modal-header h3 {
  color: #0a0a0a;
}
.modal-tabs-hint {
  margin: 0 0 6px 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}
.modal-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin: 0 0 12px 0;
  flex-shrink: 0;
  padding: 0 2px 0 0;
}
.modal-tab {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  border-radius: 6px 6px 0 0;
}
.modal-tab:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.1);
}
.modal-tab.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-bottom-color: var(--accent, #4fc3f7);
}
.modal-tab[aria-selected="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-bottom-color: var(--accent, #4fc3f7);
}
.modal-tab-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-top: 8px;
}
#trackEditPanelDetails,
#trackEditPanelBeatgrid,
#trackEditPanelCuePoints {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.track-edit-history-mount .track-edit-history-section-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fb3cc;
}
body.theme-light .track-edit-history-mount .track-edit-history-section-title {
  color: rgba(0, 0, 0, 0.55);
}
.track-edit-history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 12px;
}
.track-edit-history-column-title {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8ca0b9;
}
.track-edit-history-item time {
  color: #c5d6ea;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
body.theme-light .track-edit-history-column-title {
  border-bottom-color: rgba(0, 0, 0, 0.1);
  color: #64748b;
}
body.theme-light .track-edit-history-item time {
  color: rgba(0, 0, 0, 0.82);
}
.modal-tab-panel[hidden] {
  display: none;
}
.track-edit-history-mount {
  min-height: 120px;
  padding-top: 4px;
}
.track-edit-waveform-row {
  margin-top: 4px;
}
.track-edit-waveform-compare {
  margin-top: 12px;
}
.track-edit-waveform-compare-label {
  display: block;
  margin-bottom: 6px;
}
.track-edit-waveform-container--compare {
  cursor: default;
}
.track-edit-waveform-canvas--compare {
  cursor: default;
}
.track-edit-waveform-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.track-edit-waveform-actions {
  display: inline-flex;
  gap: 6px;
}
.track-edit-waveform-label-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.track-edit-loop-length {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.track-edit-loop-length__select {
  width: auto;
  min-width: 88px;
  padding: 4px 8px;
  height: auto;
  font-size: 13px;
}
.track-edit-waveform-container {
  width: 100%;
  height: 114px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.track-edit-waveform-canvas {
  width: 100%;
  height: 100px;
  flex-shrink: 0;
  display: block;
  cursor: grab;
}
.track-edit-waveform-scroll {
  width: calc(100% - 24px);
  height: 8px;
  margin: 2px 12px 4px;
  flex-shrink: 0;
  box-sizing: border-box;
  cursor: pointer;
  align-self: center;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}
.track-edit-waveform-scroll::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(79, 195, 247, 0.9);
  cursor: pointer;
}
.track-edit-waveform-scroll::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(79, 195, 247, 0.9);
  cursor: pointer;
  border: none;
}
body.theme-light .track-edit-waveform-scroll {
  background: rgba(0, 0, 0, 0.08);
}
body.theme-light .track-edit-waveform-scroll::-webkit-slider-thumb,
body.theme-light .track-edit-waveform-scroll::-moz-range-thumb {
  background: rgba(25, 118, 210, 0.9);
}
.track-edit-waveform-canvas.is-dragging {
  cursor: grabbing;
}
.track-edit-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.track-edit-history-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}
.track-edit-history-item:last-child {
  border-bottom: none;
}
.track-edit-history-column--track .track-edit-history-item {
  justify-content: flex-start;
}
.track-edit-history-item-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #c5d6ea;
}
.track-edit-history-empty {
  margin: 0;
}
body.theme-light .track-edit-history-item-title {
  color: rgba(0, 0, 0, 0.82);
}
body.theme-light .modal-tabs-hint {
  color: rgba(0, 0, 0, 0.5);
}
body.theme-light .modal-tabs {
  border-bottom-color: rgba(0, 0, 0, 0.12);
}
body.theme-light .modal-tab {
  color: rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.04);
}
body.theme-light .modal-tab:hover {
  color: rgba(0, 0, 0, 0.9);
  background: rgba(0, 0, 0, 0.08);
}
body.theme-light .modal-tab.active,
body.theme-light .modal-tab[aria-selected="true"] {
  color: #0a0a0a;
  background: rgba(0, 0, 0, 0.08);
  border-bottom-color: var(--accent, #1976d2);
}
body.theme-light .track-edit-history-item {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
body.theme-light .track-edit-waveform-container {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

/* Track edit — Cue Points tab */
.track-edit-cue-row {
  margin-top: 4px;
}
.track-edit-cue-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 10px;
}
.track-edit-cue-toolbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.track-edit-cue-window-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.track-edit-cue-window-select {
  min-width: 5.5rem;
}
.track-edit-cue-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.track-edit-cue-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 11px;
  color: #9fb3cc;
}
body.theme-light .track-edit-cue-legend {
  color: rgba(0, 0, 0, 0.55);
}
.track-edit-cue-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.track-edit-cue-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.track-edit-cue-swatch--internal {
  background: rgba(45, 212, 191, 0.95);
}
.track-edit-cue-swatch--moonbase-raw {
  background: transparent;
  border: 2px dashed rgba(251, 191, 36, 0.95);
  box-sizing: border-box;
}
.track-edit-cue-swatch--moonbase-tight {
  background: rgba(251, 146, 60, 0.95);
}
.track-edit-cue-swatch--moonbase-smart {
  background: rgba(192, 132, 252, 0.95);
}
.track-edit-cue-swatch--gn {
  background: rgba(168, 85, 247, 0.85);
}
.track-edit-cue-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
@media (max-width: 720px) {
  .track-edit-cue-panes {
    grid-template-columns: 1fr;
  }
}
.track-edit-cue-pane-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8ca0b9;
}
body.theme-light .track-edit-cue-pane-label {
  color: #64748b;
}
.track-edit-cue-waveform-container {
  min-height: 88px;
  cursor: crosshair;
}
.track-edit-cue-canvas.is-dragging {
  cursor: grabbing;
}
.track-edit-cue-status {
  margin-top: 6px;
}
.track-edit-cue-status.is-error {
  color: #f87171;
}

/* Track preview modal */
.preview-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.preview-status-text {
  font-size: 13px;
  color: #cfd8dc;
}
.preview-footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-start;
}

/* Track Pool Tabs */
.track-pool-tabs {
  margin: 20px 0;
  display: block !important;
}

#trackPoolEditor .track-pool-tabs {
  display: block !important;
}

#trackPoolEditor .track-pool-tab-content[data-tab="genre"] {
  display: block !important;
  visibility: visible !important;
}

.track-pool-tab-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.track-pool-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s;
}

.track-pool-tab:hover {
  color: rgba(255, 255, 255, 0.9);
}

.track-pool-tab.active {
  color: #fff;
  border-bottom-color: #4a9eff;
}

.track-pool-genre-container {
  margin-top: 1rem;
}

.track-pool-genre-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.track-pool-genre-column {
  flex: 1;
  min-width: 0;
}

.track-pool-genre-column .form-label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #e5f3ff;
}

.track-pool-genre-checkboxes {
  display: flex;
  flex-direction: column;
}

.track-pool-genre-checkboxes .checkbox-label {
  font-size: 0.75rem;
  line-height: 1.3;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.track-pool-genre-checkboxes .checkbox-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
  margin-top: 0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: transparent;
  position: relative;
}

.track-pool-genre-checkboxes .checkbox-label input[type="checkbox"]:checked {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  border-width: 1px;
}

.track-pool-genre-checkboxes .checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #66bb6a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 2px rgba(102, 187, 106, 0.8), 0 0 4px rgba(102, 187, 106, 0.4);
}

.track-pool-genre-checkboxes .checkbox-label span {
  font-size: 0.75rem;
  line-height: 1.3;
  margin-top: 0px;
  flex: 1;
}

.track-pool-genre-scroll {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.track-pool-genre-scroll::-webkit-scrollbar {
  width: 8px;
}

.track-pool-genre-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.track-pool-genre-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

/* Genre dots */
.genre-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.genre-dot-maest {
  background-color: #ff4444; /* Red */
}

.genre-dot-mtg {
  background-color: #4444ff; /* Blue */
}

.genre-dot-apple {
  background-color: #ffaa00; /* Yellow */
}


.track-pool-genre-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.track-pool-tab-content {
  min-height: 200px;
}

.track-pool-criteria-tabs {
  display: block !important;
}

.track-pool-criteria-tabs .track-pool-tab-content {
  display: none;
}

.track-pool-criteria-tabs .track-pool-tab-content.active {
  display: block !important;
}

/* Ensure genre tab is visible on initial load */
.track-pool-criteria-tabs .track-pool-tab-content[data-tab="genre"].active {
  display: block !important;
}

.criteria-list {
  margin: 16px 0;
}

.criterion-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.criterion-row .form-control {
  flex: 1;
}

.criterion-row .criterion-values {
  display: flex;
  gap: 8px;
  flex: 2;
}

.track-pool-preview {
  margin-top: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.track-pool-preview-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
}

.track-pool-preview-count {
  color: #4a9eff;
}

.track-pool-preview-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.track-pool-preview-item:last-child {
  border-bottom: none;
}

.track-pool-preview-item[data-song-id] {
  cursor: pointer;
  transition: background-color 0.2s;
}

.track-pool-preview-item[data-song-id]:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.track-pool-preview-play-icon {
  display: inline-block;
  background: none;
  border: none;
  color: #e5f3ff;
  cursor: pointer;
  padding: 0 4px 0 0;
  font-size: 12px;
  vertical-align: middle;
  transition: color 0.2s ease, transform 0.1s ease;
  line-height: 1;
  width: 16px;
  text-align: center;
}

.track-pool-preview-play-icon:hover {
  color: #fff;
  transform: scale(1.2);
}

.track-pool-preview-play-icon:active {
  transform: scale(1.1);
}

/* Track Pool Tabs */
.track-pool-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.track-pool-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  font-size: 14px;
  color: #9fb3cc;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  margin-bottom: -1px;
}

.track-pool-tab:hover {
  color: #fff;
}

.track-pool-tab.active {
  color: #fff;
  border-bottom-color: #2979ff;
}

.track-pool-tab-content {
  display: none;
}

.track-pool-tab-content.active {
  display: block;
}

/* BPM Range Sliders */
.bpm-range-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.bpm-range-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.bpm-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2979ff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease, transform 0.1s ease;
}

.bpm-range-slider::-webkit-slider-thumb:hover {
  background: #1c5dd8;
  transform: scale(1.1);
}

.bpm-range-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2979ff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease, transform 0.1s ease;
}

.bpm-range-slider::-moz-range-thumb:hover {
  background: #1c5dd8;
  transform: scale(1.1);
}

/* Voice Probability Slider */
.voice-probability-slider-wrapper {
  position: relative;
  height: 8px;
}

.voice-probability-slider-fill {
  position: absolute;
  left: 0;
  top: 2px;
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #f44336 0%, #ff9800 25%, #ffc107 50%, #8bc34a 75%, #4caf50 100%);
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
  transition: width 0.1s ease;
}

.voice-probability-slider {
  position: relative;
  z-index: 2;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.voice-probability-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid #2979ff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.voice-probability-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.voice-probability-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid #2979ff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.voice-probability-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.voice-probability-slider::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

/* Mood Sliders */
.mood-slider-wrapper {
  position: relative;
  height: 8px;
}

.mood-slider-fill {
  position: absolute;
  left: 0;
  top: 2px;
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #f44336 0%, #ff9800 25%, #ffc107 50%, #8bc34a 75%, #4caf50 100%);
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
  transition: width 0.1s ease;
}

.mood-slider {
  position: relative;
  z-index: 2;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.mood-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid #2979ff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.mood-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.mood-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid #2979ff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.mood-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.mood-slider::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

/* Beta Badge */
.beta-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #ff9800;
  background: rgba(255, 152, 0, 0.15);
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: -10px;
  margin-top: -15px;
  transform: rotate(-15deg);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: top;
  position: relative;
}

/* Voice Probability Sliders */
.voice-slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.voice-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.voice-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2979ff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease, transform 0.1s ease;
}

.voice-slider::-webkit-slider-thumb:hover {
  background: #1c5dd8;
  transform: scale(1.1);
}

.voice-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2979ff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease, transform 0.1s ease;
}

.voice-slider::-moz-range-thumb:hover {
  background: #1c5dd8;
  transform: scale(1.1);
}

/* Dual-handle range slider */
.dual-range-container {
  position: relative;
  width: 50%;
  height: 40px;
  margin: 20px 0;
}

.dual-range-input {
  position: absolute;
  width: 100%;
  height: 6px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  z-index: 2;
}

.dual-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2979ff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  pointer-events: all;
  position: relative;
  z-index: 3;
  transition: background 0.2s ease, transform 0.1s ease;
}

.dual-range-input::-webkit-slider-thumb:hover {
  background: #1c5dd8;
  transform: scale(1.15);
}

.dual-range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2979ff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  pointer-events: all;
  position: relative;
  z-index: 3;
  transition: background 0.2s ease, transform 0.1s ease;
}

.dual-range-input::-moz-range-thumb:hover {
  background: #1c5dd8;
  transform: scale(1.15);
}

.dual-range-input.dual-range-min {
  z-index: 2;
}

.dual-range-input.dual-range-max {
  z-index: 1;
}

.dual-range-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  transform: translateY(-50%);
  z-index: 0;
}

.dual-range-fill {
  position: absolute;
  top: 50%;
  height: 6px;
  background: #2979ff;
  border-radius: 3px;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}

.dual-range-input.dual-range-min::-webkit-slider-thumb {
  z-index: 3;
}

.dual-range-input.dual-range-max::-webkit-slider-thumb {
  z-index: 4;
}

/* Disable section when toggle is off */
.track-pool-genre-section.disabled,
#trackPoolBpmSection.disabled,
#trackPoolVoiceSection.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Genre Dropdown Styles */
.genre-dropdown {
  position: relative;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.genre-dropdown-summary {
  display: block;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  color: #fff;
  transition: background-color 0.2s, border-color 0.2s;
}

.genre-dropdown-summary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.genre-dropdown-summary::-webkit-details-marker {
  display: none;
}

.genre-dropdown-summary::marker {
  display: none;
}

.genre-dropdown[open] .genre-dropdown-summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

.genre-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.genre-dropdown-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #e0e0e0;
  transition: background-color 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.genre-dropdown-item:last-child {
  border-bottom: none;
}

.genre-dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.genre-dropdown-item.selected {
  background-color: rgba(74, 158, 255, 0.2);
  color: #4a9eff;
  font-weight: 500;
}

.track-pool-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.track-pool-editor-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

/* Track Pools Manager panel layout – only visible when .active (same as .panel) */
.panel.track-pools-manager-panel {
  display: none;
}
.panel.track-pools-manager-panel.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 120px);
  max-height: calc(100vh - 120px);
  overflow: hidden;
  box-sizing: border-box;
}
#panel-track-pools-manager > .playlist-profile-editor-box {
  flex-shrink: 0;
}
#panel-track-pools-manager > .track-pools-editor-settings-box.pool-editor-layout {
  flex: 1 1 auto;
  min-height: 0;
}
.track-pools-manager-panel .track-pools-list-card .panel-body {
  padding-bottom: 0.5rem;
}
.track-pools-editor-card .card-header.track-pools-editor-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.track-pools-editor-card .track-pool-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.track-pools-editor-body {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 360px);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .track-pools-editor-body {
    grid-template-columns: 1fr;
  }
}
.track-pools-editor-criteria {
  min-width: 0;
}
.track-pools-editor-criteria .track-pool-criteria-tabs {
  margin-bottom: 1rem;
}
.track-pools-editor-criteria .track-pool-tab-content {
  padding: 0.75rem 0;
}
.track-pools-editor-criteria .form-field + .form-field,
.track-pools-editor-criteria .track-pool-range-row {
  margin-top: 0.5rem;
}
.track-pool-range-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.track-pool-range-row .range-sep {
  color: var(--text-secondary, #8ea0bb);
  font-weight: 500;
}
.track-pools-editor-crates {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.track-pools-editor-preview {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  background: rgba(14, 28, 46, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.track-pools-editor-preview .track-pool-preview-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #e5f3ff;
}
.track-pools-editor-preview .track-pool-preview-list {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 0.5rem;
}
.track-pools-editor-preview .track-pool-preview-item {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}
.track-pools-editor-preview .track-pool-preview-item:last-child {
  border-bottom: none;
}

/* ===== Shared pool-style header bar ===== */
.pool-header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* ===== Pool Builder ===== */
#panel-track-pools-manager .playlist-profile-editor-row > .playlist-profile-select {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 20rem;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
#panel-track-pools-manager .track-pools-editor-actions {
  gap: 0;
}
#panel-track-pools-manager .track-pools-editor-actions .playlist-profile-icon-btn {
  width: 30px;
  height: 30px;
}
body.theme-light #panel-track-pools-manager .playlist-profile-editor-row > .playlist-profile-select {
  color: #0a0a0a;
}
#panel-track-pools-manager .track-pools-editor-settings-box .pool-builder-tabs {
  min-width: 0;
  width: 100%;
}
#panel-track-pools-manager .track-pools-editor-settings-box .playlist-tab-scroll-wrapper {
  border-bottom-color: rgba(80, 140, 210, 0.28);
  min-height: 50px;
  margin-bottom: 12px;
  padding: 0;
  box-sizing: border-box;
}
#panel-track-pools-manager .track-pools-editor-settings-box .pool-builder-results {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
#panel-track-pools-manager .track-pools-editor-settings-box .pool-results-list {
  flex: 0 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: hidden;
}
#panel-track-pools-manager .track-pools-editor-settings-box .pool-results-list:empty {
  min-height: 120px;
}
#panel-track-pools-manager .track-pools-editor-settings-box .pool-results-list:not(:empty) {
  min-height: 300px;
  max-height: clamp(300px, calc(100vh - 300px), 900px);
  overflow-y: auto;
}
body.theme-light #panel-track-pools-manager .track-pools-editor-settings-box .playlist-tab-scroll-wrapper {
  border-bottom-color: hsl(0 0% 89.8%);
}
.pool-builder-header .pool-select,
.pool-header-bar .pool-select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 280px;
}
.pool-builder-tabs {
  margin-bottom: 0;
}
.pool-builder-tabs .playlist-tab-scroll-wrapper {
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  margin-bottom: 12px;
}
.pool-builder-tab .pool-pill-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  vertical-align: -1px;
}
.pool-builder-tab[data-filter="spotify_genre"] .pool-pill-icon {
  width: 14px;
  height: 14px;
}
/* Green dot: active selection indicator on pool builder tabs */
.pool-builder-tab::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
  margin-left: 4px;
}
.pool-builder-tab.has-filter::before {
  background: #4caf50;
}
.pool-builder-tab.active.has-filter::before {
  background: #fff;
}
body.theme-light .pool-builder-tab.has-filter::before {
  background: #16a34a;
}
body.theme-light .pool-builder-tab.active.has-filter::before {
  background: #fff;
}
.pool-builder-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 12px;
}
.pool-select {
  background: rgba(14, 28, 46, 0.95);
  color: #c8d6e5;
  border: 1px solid rgba(80, 140, 210, 0.3);
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
}
.pool-btn-new,
.pool-btn-save,
.pool-btn-delete,
.pool-btn-cancel {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.pool-btn-new {
  background: rgba(41, 121, 255, 0.18);
  color: #6db3ff;
  border-color: rgba(41, 121, 255, 0.35);
}
.pool-btn-new:hover { background: rgba(41, 121, 255, 0.3); }
.pool-btn-save {
  background: #2979ff;
  color: #fff;
  border-color: #2979ff;
}
.pool-btn-save:hover { background: #1c6ae0; }
.pool-btn-save:disabled {
  opacity: 0.4;
  cursor: default;
}
.pool-btn-delete {
  background: rgba(255, 68, 68, 0.12);
  color: #ff7070;
  border-color: rgba(255, 68, 68, 0.3);
}
.pool-btn-delete:hover { background: rgba(255, 68, 68, 0.25); }
.pool-btn-delete:disabled {
  opacity: 0.35;
  cursor: default;
}
.pool-btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #9fb3cc;
  border-color: rgba(255, 255, 255, 0.15);
}
.pool-btn-cancel:hover { background: rgba(255, 255, 255, 0.14); }

/* Pool name modal */
.pool-name-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}
/* Class display:flex must not override the HTML hidden attribute (crate rename overlay, etc.) */
.pool-name-modal[hidden] {
  display: none !important;
}
.pool-name-modal-content {
  background: #1a2940;
  border: 1px solid rgba(80, 140, 210, 0.3);
  border-radius: 10px;
  padding: 22px 26px;
  min-width: 320px;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.pool-name-modal-title {
  margin: 0 0 12px;
  font-weight: 600;
  font-size: 14px;
  color: #dfe9f5;
}
.pool-name-modal-content .form-control {
  width: 100%;
  background: rgba(14, 28, 46, 0.95);
  color: #c8d6e5;
  border: 1px solid rgba(80, 140, 210, 0.3);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  margin-bottom: 14px;
  box-sizing: border-box;
}
.pool-name-modal-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.pool-builder-pills {
  display: flex;
  gap: 6px;
  padding: 0 4px;
  margin-bottom: 0;
  flex-wrap: wrap;
}
.pool-pill-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  vertical-align: -1px;
}
.pool-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(80, 140, 210, 0.35);
  background: rgba(14, 28, 46, 0.95);
  color: #9fb3cc;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  user-select: none;
}
.pool-pill:hover {
  background: rgba(23, 44, 70, 0.95);
  color: #dfe9f5;
}
.pool-pill.active {
  background: #2979ff;
  border-color: #2979ff;
  color: #fff;
}
.pool-pill::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
}
.pool-pill.has-filter::after {
  background: #4caf50;
}
.pool-pill.active.has-filter::after {
  background: #fff;
}

/* Drawer slide animation */
.pool-builder-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin: 0;
}
.pool-builder-drawer.open {
  max-height: 500px;
}
.pool-drawer-content {
  padding: 16px 0 12px;
}

/* BPM slider */
.pool-bpm-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pool-bpm-label {
  font-size: 12px;
  color: #8ca0b9;
  min-width: 30px;
  text-align: center;
  flex-shrink: 0;
}
.pool-dual-range {
  position: relative;
  flex: 1;
  height: 36px;
}
.pool-dual-range-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  transform: translateY(-50%);
}
.pool-dual-range-fill {
  position: absolute;
  top: 50%;
  height: 6px;
  background: #2979ff;
  border-radius: 3px;
  transform: translateY(-50%);
  pointer-events: none;
}
.pool-dual-range-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  z-index: 2;
}
.pool-dual-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2979ff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  pointer-events: all;
  position: relative;
  z-index: 3;
  transition: background 0.15s, transform 0.1s;
}
.pool-dual-range-input::-webkit-slider-thumb:hover {
  background: #1c5dd8;
  transform: scale(1.15);
}
.pool-dual-range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2979ff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  pointer-events: all;
}
.pool-dual-range-input::-moz-range-thumb:hover {
  background: #1c5dd8;
  transform: scale(1.15);
}
.pool-energy-range .pool-dual-range-track {
  background: linear-gradient(90deg, #22c55e 0%, #f59e0b 55%, #ef4444 100%);
  opacity: 0.45;
}
.pool-energy-range .pool-dual-range-fill {
  background: linear-gradient(90deg, #22c55e 0%, #f59e0b 55%, #ef4444 100%);
}
.pool-energy-range .pool-dual-range-input::-webkit-slider-thumb {
  background: #f59e0b;
}
.pool-energy-range .pool-dual-range-input::-webkit-slider-thumb:hover {
  background: #d97706;
}
.pool-energy-range .pool-dual-range-input::-moz-range-thumb {
  background: #f59e0b;
}
.pool-energy-range .pool-dual-range-input::-moz-range-thumb:hover {
  background: #d97706;
}
.pool-danceability-range .pool-dual-range-track {
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
  opacity: 0.45;
}
.pool-danceability-range .pool-dual-range-fill {
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
}
.pool-danceability-range .pool-dual-range-input::-webkit-slider-thumb {
  background: #8b5cf6;
}
.pool-danceability-range .pool-dual-range-input::-webkit-slider-thumb:hover {
  background: #7c3aed;
}
.pool-danceability-range .pool-dual-range-input::-moz-range-thumb {
  background: #8b5cf6;
}
.pool-danceability-range .pool-dual-range-input::-moz-range-thumb:hover {
  background: #7c3aed;
}
.pool-emotion-panel {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  padding: 4px 8px 8px;
}
.pool-mood-map-wrap {
  flex: 0 0 auto;
  padding: 0;
}
.pool-mood-map {
  position: relative;
  width: 260px;
  max-width: 260px;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1a1a1a;
  cursor: default;
  touch-action: none;
  user-select: none;
}
.pool-mood-map-axis {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 0;
}
.pool-mood-map-axis--x {
  left: 10%;
  right: 10%;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
}
.pool-mood-map-axis--y {
  top: 10%;
  bottom: 10%;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
}
.pool-mood-map-point {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: rgba(41, 121, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(41, 121, 255, 0.35);
  cursor: grab;
  z-index: 2;
  transform: translate(-50%, -50%);
  touch-action: none;
  transition: width 0.12s ease, height 0.12s ease;
}
.pool-mood-map-point:hover {
  background: rgba(41, 121, 255, 0.72);
}
.pool-mood-map-point:active {
  cursor: grabbing;
}
.pool-mood-map-label {
  position: absolute;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: #8ca0b9;
  letter-spacing: 0.01em;
  pointer-events: none;
  z-index: 0;
}
.pool-mood-map-label--x-left {
  left: 10px;
  bottom: 8px;
  max-width: 38%;
}
.pool-mood-map-label--x-right {
  right: 10px;
  bottom: 8px;
  text-align: right;
  max-width: 38%;
}
/* Y axis: low arousal = bottom, high arousal = top (matches mapCoordsToEmotion in pool-builder JS). */
.pool-mood-map-label--y-bottom {
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}
.pool-mood-map-label--y-top {
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}
.pool-emotion-controls {
  flex: 1 1 auto;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 10px;
}
.pool-emotion-tolerance-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.pool-emotion-size-label.form-label {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #c0d0e0;
}
.pool-emotion-tolerance-input {
  width: 100%;
  max-width: 200px;
}
.pool-emotion-footer.pool-bpm-values {
  justify-content: flex-start;
  margin-top: 0;
  font-size: 13px;
  font-weight: 600;
  color: #8ca0b9;
}
body.theme-light .pool-mood-map {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}
body.theme-light .pool-mood-map-axis {
  background: rgba(0, 0, 0, 0.1);
}
body.theme-light .pool-mood-map-point {
  border-color: #ffffff;
  background: rgba(41, 121, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(41, 121, 255, 0.28);
}
body.theme-light .pool-mood-map-label {
  color: #737373;
}
body.theme-light .pool-emotion-size-label.form-label {
  color: #404040;
}
body.theme-light .pool-emotion-footer.pool-bpm-values {
  color: #737373;
}
.pool-bpm-values {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #e5f3ff;
  letter-spacing: 0.3px;
}
.pool-filter-clear {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #8ca0b9;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.pool-filter-clear:hover {
  background: rgba(239, 83, 80, 0.2);
  color: #ef5350;
  border-color: rgba(239, 83, 80, 0.4);
}
body.theme-light .pool-filter-clear {
  border-color: hsl(0 0% 82%);
  color: #737373;
}
body.theme-light .pool-filter-clear:hover {
  background: rgba(239, 83, 80, 0.1);
  color: #ef5350;
  border-color: rgba(239, 83, 80, 0.4);
}
.pool-bpm-options {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}

/* Genre grid */
.pool-genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px 16px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.pool-genre-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  cursor: pointer;
}
.pool-genre-name {
  flex: 1;
  color: #dfe9f5;
}
.pool-genre-count {
  font-size: 11px;
  color: #8ca0b9;
  min-width: 28px;
  text-align: right;
}

/* Genre tree (MAEST hierarchical) */
.pool-gtree {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}
.pool-gtree-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pool-gtree-group:last-child {
  border-bottom: none;
}
.pool-gtree-master {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
}
.pool-gtree-toggle {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: #6b7b8d;
  font-size: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  padding: 0;
}
.pool-gtree-toggle:hover {
  color: #c0d0e0;
  background: rgba(255, 255, 255, 0.06);
}
.pool-gtree-master-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  cursor: pointer;
  font-size: 13px;
}
.pool-gtree-master-name {
  flex: 1;
  font-weight: 600;
  color: #dfe9f5;
}
.pool-gtree-subs {
  padding: 0 0 6px 30px;
}
.pool-gtree-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
  cursor: pointer;
}
body.theme-light .pool-gtree-group {
  border-bottom-color: hsl(0 0% 92%);
}
body.theme-light .pool-gtree-toggle {
  color: #a3a3a3;
}
body.theme-light .pool-gtree-toggle:hover {
  color: #333;
  background: rgba(0, 0, 0, 0.05);
}
body.theme-light .pool-gtree-master-name {
  color: #171717;
}
body.theme-light .pool-gtree-subs .pool-genre-name {
  color: #525252;
}

/* Results */
.pool-builder-results {
  padding: 0;
}
.pool-results-count {
  font-size: 13px;
  color: #8ca0b9;
  margin-bottom: 8px;
  padding: 0 2px;
}
.pool-results-count strong {
  color: #4a9eff;
  font-weight: 700;
}
.pool-results-list {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.75);
}
.pool-result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6b7b8d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
}
.pool-result-hcol[data-sort] {
  cursor: pointer;
  transition: color 0.15s;
}
.pool-result-hcol[data-sort]:hover {
  color: #c0d0e0;
}
.pool-result-hplay {
  width: 28px;
  flex-shrink: 0;
}
.pool-result-hmeta {
  flex: 0 0 420px;
  width: 420px;
  min-width: 0;
  overflow: hidden;
}
.pool-result-hbpm {
  flex: 0 0 44px;
  width: 44px;
  text-align: left;
}
.pool-result-henergy {
  flex: 0 0 52px;
  width: 52px;
  text-align: left;
}
.pool-result-hdanceability {
  flex: 0 0 72px;
  width: 72px;
  text-align: left;
}
.pool-result-hgenre {
  flex: 1 1 300px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pool-result-hdur {
  flex: 0 0 50px;
  width: 50px;
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  text-align: right;
}
.pool-result-hactions {
  flex: 0 0 28px;
  width: 28px;
}
.pool-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}
.pool-result-item:last-child {
  border-bottom: none;
}
.pool-result-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
.pool-result-play {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #9fb3cc;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.pool-result-play:hover {
  background: rgba(41, 121, 255, 0.2);
  color: #fff;
}
.pool-result-meta {
  flex: 0 0 420px;
  width: 420px;
  min-width: 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
  overflow: hidden;
}
.pool-result-artist {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
  min-width: 0;
}
.pool-result-sep {
  color: #556;
  flex-shrink: 0;
}
.pool-result-title {
  color: #b0c4de;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}
.pool-result-bpm,
.pool-result-energy,
.pool-result-danceability,
.pool-result-dur {
  flex: 0 0 44px;
  width: 44px;
  font-size: 12px;
  color: #8ca0b9;
}
.pool-result-bpm {
  text-align: left;
}
.pool-result-energy {
  flex: 0 0 52px;
  width: 52px;
  text-align: left;
}
.pool-result-danceability {
  flex: 0 0 52px;
  width: 52px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.pool-result-dur {
  flex: 0 0 50px;
  width: 50px;
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  text-align: right;
}
.pool-result-actions {
  flex: 0 0 28px;
  width: 28px;
  display: flex;
  justify-content: flex-end;
}
.pool-result-actions-wrap {
  position: relative;
}
.pool-result-actions-trigger {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(207, 226, 255, 0.75);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.pool-result-actions-trigger:hover,
.pool-result-actions-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.pool-result-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 120px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 20, 0.98);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
  z-index: 20;
}
.pool-result-actions-menu[hidden] {
  display: none !important;
}
.pool-result-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  color: #e5f3ff;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
}
.pool-result-menu-item:hover,
.pool-result-menu-item:focus-visible {
  background: rgba(2, 132, 199, 0.22);
}
.pool-result-genre {
  flex: 1 1 300px;
  min-width: 0;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Light theme overrides */
body.theme-light .pool-pill {
  background: #f0f0f0;
  border-color: hsl(0 0% 85%);
  color: #525252;
}
body.theme-light .pool-pill:hover {
  background: #e5e5e5;
  color: #171717;
}
body.theme-light .pool-pill.active {
  background: #0a0a0a;
  border-color: #0a0a0a;
  color: #fff;
}
body.theme-light .pool-pill.has-filter::after {
  background: #22c55e;
}
body.theme-light .pool-pill.active.has-filter::after {
  background: #fff;
}
body.theme-light .pool-select,
body.theme-light .pool-header-bar .pool-select {
  background: #fff;
  color: #171717;
  border-color: hsl(0 0% 82%);
}
body.theme-light .pool-btn-new {
  background: rgba(10, 10, 10, 0.06);
  color: #171717;
  border-color: hsl(0 0% 82%);
}
body.theme-light .pool-btn-new:hover { background: rgba(10, 10, 10, 0.12); }
body.theme-light .pool-btn-save {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}
body.theme-light .pool-btn-save:hover { background: #262626; }
body.theme-light .pool-btn-delete {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.25);
}
body.theme-light .pool-btn-delete:hover { background: rgba(220, 38, 38, 0.16); }
body.theme-light .pool-btn-cancel {
  background: #f5f5f5;
  color: #525252;
  border-color: hsl(0 0% 82%);
}
body.theme-light .pool-btn-cancel:hover { background: #e5e5e5; }
body.theme-light .pool-name-modal-content {
  background: #fff;
  border-color: hsl(0 0% 85%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
body.theme-light .pool-name-modal-title {
  color: #0a0a0a;
}
body.theme-light .pool-name-modal-content .form-control {
  background: #fff;
  color: #171717;
  border-color: hsl(0 0% 82%);
}
body.theme-light .pool-dual-range-track {
  background: rgba(0, 0, 0, 0.1);
}
body.theme-light .pool-energy-range .pool-dual-range-track {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.45) 0%, rgba(245, 158, 11, 0.45) 55%, rgba(239, 68, 68, 0.45) 100%);
}
body.theme-light .pool-energy-range .pool-dual-range-fill {
  background: linear-gradient(90deg, #16a34a 0%, #d97706 55%, #dc2626 100%);
}
body.theme-light .pool-danceability-range .pool-dual-range-track {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.45) 0%, rgba(139, 92, 246, 0.45) 55%, rgba(168, 85, 247, 0.45) 100%);
}
body.theme-light .pool-danceability-range .pool-dual-range-fill {
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 55%, #9333ea 100%);
}
body.theme-light .pool-bpm-label {
  color: #737373;
}
body.theme-light .pool-bpm-values {
  color: #171717;
}
body.theme-light .pool-dual-range-input::-webkit-slider-thumb {
  border-color: rgba(0, 0, 0, 0.15);
}
body.theme-light .pool-genre-name {
  color: #171717;
}
body.theme-light .pool-genre-count {
  color: #737373;
}
body.theme-light .pool-results-count {
  color: #525252;
}
body.theme-light .pool-results-count strong {
  color: #0a0a0a;
}
body.theme-light .pool-results-list {
  background: #fafafa;
  border-color: hsl(0 0% 89.8%);
}
body.theme-light .pool-result-header {
  color: #8b8b8b;
  border-bottom-color: hsl(0 0% 88%);
}
body.theme-light .pool-result-hcol[data-sort]:hover {
  color: #333;
}
body.theme-light .pool-result-item {
  border-bottom-color: hsl(0 0% 92%);
}
body.theme-light .pool-result-item:hover {
  background: hsl(0 0% 96%);
}
body.theme-light .pool-result-play {
  border-color: hsl(0 0% 85%);
  color: #525252;
}
body.theme-light .pool-result-play:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #171717;
}
body.theme-light .pool-result-artist {
  color: #171717;
}
body.theme-light .pool-result-sep {
  color: #a3a3a3;
}
body.theme-light .pool-result-title {
  color: #525252;
}
body.theme-light .pool-result-bpm,
body.theme-light .pool-result-energy,
body.theme-light .pool-result-danceability,
body.theme-light .pool-result-genre,
body.theme-light .pool-result-dur {
  color: #737373;
}
body.theme-light .pool-result-actions-trigger {
  color: rgba(17, 24, 39, 0.78);
}
body.theme-light .pool-result-actions-trigger:hover,
body.theme-light .pool-result-actions-trigger:focus-visible {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.85);
}
body.theme-light .pool-result-actions-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(17, 24, 39, 0.16);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}
body.theme-light .pool-result-menu-item {
  color: #1f2937;
}
body.theme-light .pool-result-menu-item:hover,
body.theme-light .pool-result-menu-item:focus-visible {
  background: rgba(2, 132, 199, 0.12);
}
.image-carousel {
  position: relative;
  width: 100%;
  margin: 36px auto 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  overflow-x: hidden; /* Hide horizontal scrollbar */
}
.image-carousel--control {
  padding: 0 24px 24px;
  /* Full width - no max-width */
}
/* Gradients removed - images appear from right and disappear to left */
.image-carousel__track {
  display: flex;
  align-items: center;
  gap: 0; /* No gaps between images */
  transform: translateX(0);
  will-change: transform;
}
.image-carousel__item {
  flex: 0 0 auto;
  border-radius: 0; /* No curved borders */
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  background: rgba(18, 30, 50, 0.9);
  margin-right: 0; /* No gaps */
  opacity: 0; /* Hidden until loaded */
  transition: opacity 0.3s ease;
}
.image-carousel__item.loaded {
  opacity: 1;
}
.image-carousel__item img {
  display: block;
  height: 70px;
  width: auto;
}
@media (max-width: 600px) {
  .image-carousel {
    margin-top: 28px;
  }
  .image-carousel__item img {
    height: 56px;
  }
}

/* Track Debug Modal */
.track-debug-content {
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px 0;
}

.track-debug-loading,
.track-debug-error {
  padding: 20px;
  text-align: center;
  color: #aaa;
}

.track-debug-error {
  color: #ff6b6b;
}

.track-debug-tree {
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.track-debug-tree-root {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track-debug-group {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.track-debug-group-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.track-debug-group-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.track-debug-toggle {
  display: inline-block;
  width: 16px;
  text-align: center;
  color: #888;
  font-size: 10px;
  transition: transform 0.2s;
}

.track-debug-group-header strong {
  color: #fff;
  font-weight: 600;
}

.track-debug-group-content {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.track-debug-group-content[hidden] {
  display: none;
}

.track-debug-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.track-debug-item:last-child {
  border-bottom: none;
}

.track-debug-key {
  color: #4fc3f7;
  font-weight: 600;
  word-break: break-word;
}

.track-debug-value {
  color: #e0e0e0;
  word-break: break-word;
  white-space: pre-wrap;
}

.track-debug-null {
  color: #888;
  font-style: italic;
}

.track-debug-bool {
  color: #81c784;
  font-weight: 600;
}

.track-debug-number {
  color: #ffb74d;
}

.track-debug-empty {
  color: #888;
  font-style: italic;
}

.track-debug-object {
  color: #ba68c8;
  white-space: pre;
  font-size: 11px;
  max-height: 200px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: 4px;
  margin-top: 4px;
}

/* Theme toggle – sun/moon icon button */
.theme-toggle-btn,
.theme-toggle-btn.nav-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0 4px 0 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}
.theme-toggle-btn:hover {
  color: #fff;
}
.theme-toggle-btn:focus-visible {
  outline: none;
}
.theme-toggle-btn .theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle-btn .theme-icon[hidden] {
  display: none;
}
/* Initial paint: dark mode shows sun, light mode shows moon */
.theme-toggle-btn .theme-icon-moon {
  display: none;
}
body.theme-light .theme-toggle-btn .theme-icon-sun {
  display: none !important;
}
body.theme-light .theme-toggle-btn .theme-icon-moon {
  display: inline-flex !important;
}
body.theme-light .theme-toggle-btn {
  color: rgba(0, 0, 0, 0.7);
}
body.theme-light .theme-toggle-btn:hover {
  color: rgba(0, 0, 0, 0.9);
}

@media (max-width: 900px) {
  .station-top-bar .top-bar-menu-toggle {
    display: none !important;
  }
  .station-top-bar .profile-account-name,
  .station-top-bar .profile-account-chevron {
    display: none !important;
  }
  .station-top-bar .profile-account-trigger {
    padding: 4px;
    max-width: none;
    gap: 0;
  }
}

@media (min-width: 901px) {
  .station-layout.sidebar-collapsed .station-top-bar .top-bar-menu-toggle {
    display: none !important;
  }
  .station-layout.sidebar-collapsed .station-top-bar .profile-account-name,
  .station-layout.sidebar-collapsed .station-top-bar .profile-account-chevron {
    display: none !important;
  }
  .station-layout.sidebar-collapsed .station-top-bar .profile-account-trigger {
    padding: 4px;
    max-width: none;
    gap: 0;
  }
}

[data-basic-home-section].deck-home-hidden {
  display: none !important;
}
/* Collapse metrics column when no deck metric toggles are enabled */
body:not(.deck-home-show-metrics):not(.deck-home-show-deck-progression) .station-main .deck-grid .deck-metrics--right,
body:not(.deck-home-show-metrics):not(.deck-home-show-deck-progression) .station-main .deck-grid .deck-metrics--inline {
  min-width: 0;
  flex: 0 1 auto;
  max-width: 100%;
}
body:not(.deck-home-show-metrics):not(.deck-home-show-deck-progression) .station-main .deck-grid .deck-section-row .deck-track-info,
body:not(.deck-home-show-metrics):not(.deck-home-show-deck-progression) .station-main .deck-grid .deck-section-row .deck-track-row {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}
body:not(.deck-home-show-metrics):not(.deck-home-show-deck-progression) .station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-metrics.deck-metrics--layout-reserved {
  flex: 0 0 0;
  min-width: 0;
  max-width: 0;
  width: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: none;
  min-height: 40px;
  height: 40px;
  max-height: 40px;
  visibility: hidden;
  pointer-events: none;
}
/* Compact live layout when waveforms hidden via per-station config */
#deckNowPlaying.deck-now--home-no-waveforms .deck-live-right::before {
  display: none;
}
#deckNowPlaying.deck-now--home-no-waveforms .deck-waveform2-container--inline {
  display: none !important;
}
@media (max-width: 900px) {
  .station-main .deck-grid .deck-metrics--right,
  .station-main .deck-grid .deck-metrics--inline {
    min-width: 0;
    flex-wrap: wrap;
  }
}
body.theme-light .profile-settings-tab .panel-title-toggle h3 {
  color: rgba(0, 0, 0, 0.88);
}
body.theme-light .playlist-tab-panels .panel-title-toggle h3 {
  color: rgba(0, 0, 0, 0.88);
}
body.theme-light .playlist-tab-panels .panel-title-toggle.mix-toggle-header h3 {
  color: #9a7200;
}
body.theme-light .nte-grid-hint,
body.theme-light .profile-settings-tab .nte-section-desc,
body.theme-light .profile-settings-tab .idents-pool-hint {
  color: rgba(0, 0, 0, 0.5);
}
body.theme-light .profile-settings-tab .nte-field-pair--stacked .form-label {
  color: #64748b;
}

/* ========== Light theme (shadcn-style). Toggle via top bar button. ========== */
body.theme-light {
  background: #ececec;
  color: hsl(0 0% 3.9%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.theme-light input,
body.theme-light select,
body.theme-light button,
body.theme-light textarea,
body.theme-light table,
body.theme-light th,
body.theme-light td,
body.theme-light .card,
body.theme-light .panel,
body.theme-light h1,
body.theme-light h2,
body.theme-light h3 {
  font-family: inherit;
}
body.theme-light.vanta-active {
  background: #ececec;
}
body.theme-light.vanta-active.login-page {
  background: transparent;
}
body.theme-light.vanta-active.control-page {
  background: transparent;
}
body.theme-light .top-nav {
  background: #ffffff;
  border-bottom: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a;
}
body.theme-light .nav-title,
body.theme-light .nav-account-name,
body.theme-light .station-top-bar .nav-account-name {
  color: #0a0a0a;
}
body.theme-light .nav-icon {
  color: #0a0a0a;
  background: #f5f5f5;
  border: 1px solid hsl(0 0% 89.8%);
}
body.theme-light .profile-account-trigger:hover,
body.theme-light .profile-account-trigger:focus-visible {
  background: rgba(0, 0, 0, 0.06);
}
body.theme-light .profile-account-icon {
  color: #0a0a0a;
  background: #f5f5f5;
  border-color: hsl(0 0% 89.8%);
}
body.theme-light .profile-account-trigger .profile-account-name,
body.theme-light .profile-account-trigger .nav-account-name {
  color: #0a0a0a;
}
body.theme-light .profile-account-chevron {
  color: #64748b;
}
body.theme-light .nav-icon svg {
  fill: currentColor;
}
body.theme-light .nav-icon:hover:not(:disabled),
body.theme-light .nav-icon:focus-visible:not(:disabled) {
  background: #e5e5e5;
  border-color: hsl(0 0% 80%);
  color: #0a0a0a;
}
body.theme-light .station-top-bar {
  background: #ffffff;
  border-bottom: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a;
}
body.theme-light .profile-menu {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
body.theme-light .profile-menu-section {
  background: rgba(0, 0, 0, 0.04);
}
body.theme-light .profile-menu-row:not(:last-child) {
  border-bottom-color: hsl(0 0% 92%);
}
body.theme-light .profile-menu-label {
  color: #525252;
}
body.theme-light .profile-menu-value {
  color: #0a0a0a;
}
body.theme-light .profile-menu-signout-form {
  border-top-color: hsl(0 0% 89.8%);
}
body.theme-light .profile-menu-signout {
  color: #c2410c;
  background: rgba(234, 88, 12, 0.08);
  border-color: rgba(234, 88, 12, 0.3);
}
body.theme-light .profile-menu-signout:hover {
  background: rgba(234, 88, 12, 0.15);
  border-color: rgba(234, 88, 12, 0.45);
}
body.theme-light .station-top-bar-title {
  color: #0a0a0a;
}
body.theme-light .topbar-station-name {
  color: #0a0a0a;
}
body.theme-light .topbar-sep {
  color: #a3a3a3;
}
body.theme-light .topbar-panel-name {
  color: #171717;
}
body.theme-light .sidebar-collapse-btn {
  color: #737373;
}
body.theme-light .sidebar-collapse-btn:hover {
  color: #0a0a0a;
  background: rgba(0, 0, 0, 0.06);
}
body.theme-light .station-sidebar,
body.theme-light .station-layout.menu-open .station-sidebar {
  background: #fafafa;
  border-right: 1px solid hsl(0 0% 89.8%);
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.08);
}
body.theme-light .nav-logo {
  content: url('/assets/images/gravy_logo_invert.png');
}
body.theme-light .login-logo {
  content: url('/assets/images/gravy_logo_invert.png');
}
body.stations-page.theme-light .sidebar-logo-text,
body.control-page.theme-light .sidebar-logo-text,
body.theme-light .sidebar-heading,
body.theme-light .sidebar-subtitle {
  color: #374151;
}
body.theme-light .sidebar-item {
  color: #737b88;
}
body.theme-light .sidebar-item:hover {
  color: #4b5563;
}
body.theme-light .sidebar-item:hover::before {
  background: rgba(0, 0, 0, 0.06);
}
body.theme-light .card,
body.theme-light .control-card,
body.theme-light .station-main .panel > .card,
body.theme-light .playback-card,
body.theme-light .deck-events-card {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  color: #0a0a0a;
}
body.theme-light h2.card-header {
  background: #fafafa;
  border-bottom: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a;
  box-shadow: none;
}
body.theme-light h2.card-header.panel-main-header.has-controls {
  background: transparent;
  border-bottom: none;
}
body.theme-light h1,
body.theme-light h2,
body.theme-light .card h2,
body.theme-light .card strong {
  color: #0a0a0a;
}
body.theme-light .card .value,
body.theme-light .card .bpm,
body.theme-light .card .key,
body.theme-light .card .len,
body.theme-light .card .last-prev,
body.theme-light .card .artist-prev,
body.theme-light .playback-card .metrics-row,
body.theme-light .playback-card .extra-row {
  color: #525252;
}
body.theme-light .station-main .deck-grid .deck-artist {
  color: #171717;
}
body.theme-light .station-main .deck-grid .deck-track {
  color: #525252;
}
body.theme-light .station-main .deck-grid .deck-section--upnext .deck-artist,
body.theme-light .station-main .deck-grid .deck-queue-slot .deck-artist {
  color: #0f172a;
}
body.theme-light .station-main .deck-grid .deck-section--upnext .deck-track,
body.theme-light .station-main .deck-grid .deck-queue-slot .deck-track {
  color: #374151;
}
body.theme-light .station-main .deck-grid .deck-metrics .metric-label {
  color: #737373;
}
body.theme-light .station-main .deck-grid .deck-metrics .metric-value {
  color: #0a0a0a;
}
body.theme-light .station-main .deck-grid .deck-metrics .metric-badge.metric-key.deck-key-transition-group:not([class*="key-"]) .deck-key-harmonic-chip,
body.theme-light .th-key-transition-group .deck-key-harmonic-chip:not([class*="key-"]),
body.theme-light .deck-key-harmonic-chip--key-only:not([class*="key-"]) {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}
body.theme-light .station-main .deck-grid .deck-metrics .metric-key[class*="key-"] .deck-key-harmonic-chip__key,
body.theme-light .th-key-transition-group .deck-key-harmonic-chip[class*="key-"] .deck-key-harmonic-chip__key,
body.theme-light .deck-key-harmonic-chip[class*="key-"] .deck-key-harmonic-chip__key {
  color: #fff !important;
}
body.theme-light .station-main .deck-grid .deck-metrics .metric-badge.metric-live .metric-value {
  color: #b91c1c !important;
  font-weight: 700;
}
body.theme-light .station-main .deck-grid .deck-metrics .metric-badge.metric-bpm.metric-bpm--tempo-live .metric-bpm-live-num {
  background: rgba(250, 204, 21, 0.28);
  box-shadow: inset 0 0 0 1px rgba(202, 138, 4, 0.55);
  color: #a16207;
  animation: deck-bpm-tempo-live-pulse-light 1.35s ease-in-out infinite;
}
body.theme-light .station-main .deck-grid .deck-metrics .metric-badge.metric-bpm.metric-bpm--tempo-live .metric-bpm-live-cell > .metric-bpm-dir {
  color: #a16207;
  text-shadow: 0 0 4px rgba(202, 138, 4, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .station-main .deck-grid .deck-metrics .metric-badge.metric-bpm.metric-bpm--tempo-live .metric-bpm-live-num,
  body.theme-light .station-main .deck-grid .deck-metrics .metric-badge.metric-bpm.metric-bpm--tempo-live .metric-bpm-live-num,
  body.theme-light .station-main .deck-grid .deck-metrics .metric-badge.metric-bpm.metric-bpm--tempo-live .metric-bpm-live-cell > .metric-bpm-dir {
    animation: none;
  }
}
body.theme-light .station-main .panel {
  background: transparent;
  border: none;
  box-shadow: none;
}
/* Track Pools: inner list/editor cards provide surfaces; panel shell stays borderless */
body.theme-light .station-main .panel.track-pools-manager-panel {
  background: transparent;
  border: none;
  box-shadow: none;
}
body.theme-light .deck-status-bar .status-label,
body.theme-light .deck-status-bar .status-value,
body.theme-light .deck-seed-status-bar .status-label,
body.theme-light .deck-seed-status-bar .status-value {
  color: #525252;
}
body.theme-light .deck-status-bar .status-value,
body.theme-light .deck-seed-status-bar .status-value {
  color: #0a0a0a;
}
body.theme-light .deck-status-bar .status-meta,
body.theme-light .deck-seed-status-bar .status-meta {
  color: #737373;
}
body.theme-light .btn {
  border: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a;
  background: #fff;
}
body.theme-light .btn:hover {
  background: #f5f5f5;
}
body.theme-light .btn-primary {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}
body.theme-light .btn-primary:hover {
  background: #262626;
}
body.theme-light .btn-danger {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}
body.theme-light .btn-danger:hover:not(:disabled) {
  background: #b91c1c;
  border-color: #991b1b;
  color: #fff;
}
body.theme-light .btn-success {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
}
body.theme-light .btn-success:hover:not(:disabled),
body.theme-light .btn-success:focus-visible:not(:disabled) {
  background: #15803d;
  border-color: #166534;
  color: #fff;
}
body.theme-light .btn-info {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}
body.theme-light .btn-info:hover:not(:disabled),
body.theme-light .btn-info:focus-visible:not(:disabled) {
  background: #1d4ed8;
  border-color: #1e40af;
  color: #fff;
}
body.theme-light .login-wrapper {
  background: transparent;
}
body.theme-light .login-card {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  color: #0a0a0a;
}
body.theme-light .login-title,
body.theme-light .login-tagline,
body.theme-light .login-label {
  color: #0a0a0a;
}
body.theme-light .login-input {
  background: #fff;
  border: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a;
}
body.theme-light .confirm-overlay {
  background: rgba(0, 0, 0, 0.5);
}
body.theme-light .confirm-dialog {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #0a0a0a;
}
body.theme-light .confirm-dialog.confirm-dialog--danger {
  background: #ef4444;
  border-color: #b91c1c;
  box-shadow: 0 10px 30px rgba(185, 28, 28, 0.35);
  color: #fff;
}
body.theme-light .confirm-dialog.confirm-dialog--danger h3,
body.theme-light .confirm-dialog.confirm-dialog--danger p {
  color: #fff;
}
body.theme-light .confirm-dialog.confirm-dialog--danger .confirm-actions .btn-secondary {
  background: #0a0a0a;
  border-color: #0a0a0a;
  color: #fff;
}
body.theme-light .confirm-dialog.confirm-dialog--danger .confirm-actions .btn-secondary:hover:not(:disabled),
body.theme-light .confirm-dialog.confirm-dialog--danger .confirm-actions .btn-secondary:focus-visible:not(:disabled) {
  background: #262626;
  border-color: #262626;
  color: #fff;
}
body.theme-light .confirm-dialog.confirm-dialog--danger .confirm-actions .btn-primary {
  background: #0a0a0a;
  border-color: #0a0a0a;
  color: #fff;
}
body.theme-light .confirm-dialog.confirm-dialog--danger .confirm-actions .btn-primary:hover:not(:disabled),
body.theme-light .confirm-dialog.confirm-dialog--danger .confirm-actions .btn-primary:focus-visible:not(:disabled) {
  background: #262626;
  border-color: #262626;
  color: #fff;
}
body.theme-light .daemon-action-spinner {
  border-color: rgba(2, 132, 199, 0.18);
  border-top-color: #0284c7;
}
body.theme-light .daemon-action-status {
  color: #737373;
}
body.theme-light .control-body,
body.theme-light .control-events,
body.theme-light .station-control-list {
  color: #0a0a0a;
}
body.theme-light .deck-panel-header {
  color: #0a0a0a;
}
body.theme-light .remain-badge {
  color: #0a0a0a;
  background: rgba(0, 0, 0, 0.06);
  border-color: hsl(0 0% 80%);
}
body.theme-light #deckNowPlaying .deck-now-loading {
  background: rgba(255, 255, 255, 0.94);
}
body.theme-light .deck-now-loading-bar {
  background: rgba(0, 0, 0, 0.12);
}
body.theme-light .deck-now-loading-bar::after {
  background: hsl(221 83% 53%);
}

/* ----- Pill toggles (Playlist/Scheduler) ----- */
body.theme-light .deck-mode-pill-toggle {
  background: #f0f0f0;
  border: 1px solid hsl(0 0% 85%);
  box-shadow: none;
}
body.theme-light .deck-mode-pill-option {
  color: #404040;
}
body.theme-light .deck-mode-pill-highlight {
  background: #0a0a0a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}
body.theme-light .deck-mode-pill-toggle[data-mode="playlist"] .deck-mode-pill-option--playlist,
body.theme-light .deck-mode-pill-toggle[data-mode="scheduler"] .deck-mode-pill-option--scheduler {
  color: #fff;
}

/* ----- Progress bar / meter (on-air bar) ----- */
body.theme-light .meter,
body.theme-light .progress .meter {
  background: #e5e5e5;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
body.theme-light .meter > span {
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), inset 0 -1px 2px rgba(0, 0, 0, 0.08);
}
body.theme-light #deckNowPlaying .card-header {
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}
body.theme-light .track-history-card .card-header {
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}
body.theme-light #deckNowPlaying .progress .meter {
  height: 4px;
  background: #d4d4d4;
  border-radius: 999px;
  box-shadow: none;
}
body.theme-light #deckNowPlaying .progress .meter > span {
  height: 4px;
  background: #000;
  background-image: none;
  border-radius: 999px;
  box-shadow: none;
}

/* ----- Switch (on/off toggle) ----- */
body.theme-light .switch-slider {
  background: #d4d4d4;
}
body.theme-light .switch-slider:before {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
body.theme-light .switch input:checked + .switch-slider {
  background: linear-gradient(90deg, #ff9b0f, #ff6f00);
  box-shadow: 0 0 10px rgba(255, 130, 0, 0.35);
}
body.theme-light .switch input:checked + .switch-slider:before {
  background: #fff4e6;
}
body.theme-light .switch.switch--danger input:checked + .switch-slider {
  background: linear-gradient(90deg, #ff4d4d, #c62828);
  box-shadow: 0 0 10px rgba(198, 40, 40, 0.35);
}
body.theme-light .switch.switch--danger input:checked + .switch-slider:before {
  background: #fff0f0;
}

/* ----- Selects / combo boxes & form controls ----- */
body.theme-light select,
body.theme-light .form-control,
body.theme-light .form-control--compact {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a;
}
body.theme-light select:focus,
body.theme-light .form-control:focus,
body.theme-light .form-control--compact:focus {
  border-color: hsl(221 83% 53%);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  outline: none;
}
body.theme-light .playlists-body select,
body.theme-light .playlists-body .form-control,
body.theme-light .playlists-body .form-control--compact {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}
body.theme-light .playlists-body .form-label {
  color: #525252;
}
body.theme-light .playlists-body .form-hint {
  color: #737373;
}
body.theme-light .playlists-body select:focus,
body.theme-light .playlists-body .form-control:focus,
body.theme-light .playlists-body .form-control--compact:focus {
  border-color: hsl(221 83% 53%);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
body.theme-light .playlist-profile-selector .nav-icon,
body.theme-light .track-pool-selector-controls .nav-icon {
  background: #f5f5f5;
  border: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a;
}
body.theme-light .playlist-profile-selector .nav-icon:hover,
body.theme-light .track-pool-selector-controls .nav-icon:hover {
  background: #e5e5e5;
  border-color: hsl(0 0% 80%);
}
body.theme-light .scheduler-time-inputs span {
  color: #525252;
}

/* ----- Scheduler panel ----- */
body.theme-light .scheduler-status-text {
  color: #525252;
}
body.theme-light .scheduler-grid-wrapper {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  scrollbar-color: #c4c4c4 #f0f0f0;
}
body.theme-light .scheduler-grid-wrapper::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 6px;
}
body.theme-light .scheduler-grid-wrapper::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 6px;
}
body.theme-light .scheduler-grid-wrapper::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}
body.theme-light .scheduler-day-header-row {
  background: #ffffff;
}
body.theme-light .scheduler-day-header {
  color: #525252;
}
body.theme-light .scheduler-day-header--selected {
  color: #0a0a0a;
  font-weight: 700;
}
body.theme-light .scheduler-hour-line {
  background: hsl(0 0% 90%);
}
body.theme-light .scheduler-hour-label {
  color: #64748b;
}
body.theme-light .scheduler-grid.scheduler-grid--week .scheduler-grid-column:not(:first-child)::before {
  background: hsl(0 0% 88%);
}
body.theme-light .scheduler-grid-column {
  background: transparent;
  border: none;
}
body.theme-light .scheduler-grid-column--selected {
  background: transparent;
}
body.theme-light .scheduler-segment[data-palette-idx="0"] { background: #eff6ff; color: #1e293b; }
body.theme-light .scheduler-segment[data-palette-idx="1"] { background: #faf5ff; color: #1e293b; }
body.theme-light .scheduler-segment[data-palette-idx="2"] { background: #ecfdf5; color: #1e293b; }
body.theme-light .scheduler-segment[data-palette-idx="3"] { background: #f0fdf4; color: #1e293b; }
body.theme-light .scheduler-segment[data-palette-idx="4"] { background: #fff7ed; color: #1e293b; }
body.theme-light .scheduler-segment[data-palette-idx="5"] { background: #fff1f2; color: #1e293b; }
body.theme-light .scheduler-segment[data-selected="true"] {
  box-shadow: inset 0 0 0 2px rgba(30, 41, 59, 0.2);
  filter: none;
}
body.theme-light .scheduler-segment-transition-badge {
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}
body.theme-light .scheduler-segment-delete {
  background: rgba(255, 255, 255, 0.72);
  color: #404040;
}
body.theme-light .scheduler-segment-delete:hover {
  background: #ef4444;
  color: #fff;
}
body.theme-light .scheduler-column-control-btn {
  background: #f5f5f5;
  border: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a;
}
body.theme-light .scheduler-column-control-btn:hover {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}
body.theme-light .scheduler-column-control-btn--delete:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}
body.theme-light .scheduler-help-link {
  color: hsl(221 83% 53%);
}
body.theme-light .scheduler-grid-empty {
  background: rgba(250, 250, 250, 0.9);
  color: #525252;
}

/* ----- Graph / analytics ----- */
body.theme-light .analytics-block {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
}
body.theme-light .analytics-heading {
  color: #737373;
}
body.theme-light .analytics-canvas {
  background: #fafafa;
  border-radius: 6px;
}
body.theme-light .station-main .deck-grid .deck-section--history .deck-history-canvas-wrap,
body.theme-light .station-main .deck-grid .deck-section--history .deck-history-graph-stage .analytics-canvas {
  background: transparent;
  border-radius: 0;
}
body.theme-light .analytics-canvas--with-border {
  border: 1px solid hsl(0 0% 89.8%);
}
body.theme-light .station-main .deck-grid .deck-section--history .analytics-canvas--with-border {
  border: none;
}
body.theme-light .station-main .deck-grid .deck-section .deck-title,
body.theme-light .station-main .deck-grid .deck-section .deck-title--queued {
  color: #525252;
}
body.theme-light .deck-remain-text {
  color: #737373;
}
body.theme-light .deck-waveform-container {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
}
body.theme-light .deck-waveform2-container {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(224, 242, 254, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.28);
}
body.theme-light .deck-live-right .deck-waveform2-container--inline {
  border: none;
  background: transparent;
}
body.theme-light .deck-waveform2-title {
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(59, 130, 246, 0.18);
}
body.theme-light .deck-waveform2-info-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #1e3a8a;
  border-color: rgba(59, 130, 246, 0.28);
}
body.theme-light .deck-waveform-status {
  color: #1f2937;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(17, 24, 39, 0.15);
}
body.theme-light .deck-waveform2-status {
  color: #1f2937;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(17, 24, 39, 0.15);
}
body.theme-light .deck-heartbeat-debug__summary-hint {
  color: #94a3b8;
}
body.theme-light .deck-heartbeat-debug__chev {
  border-left-color: #64748b;
}
body.theme-light .deck-heartbeat-debug__title {
  color: #64748b;
}
body.theme-light .deck-heartbeat-debug__body {
  background: #f8fafc;
  border-color: hsl(0 0% 89.8%);
  color: #1e293b;
}
body.theme-light .analytics-placeholder-body {
  background: #f5f5f5;
  border: 1px dashed #d4d4d4;
  color: #525252;
}
body.theme-light .chart-tooltip {
  background: rgba(255, 255, 255, 0.96);
  color: #171717;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
body.theme-light .analytics-legend {
  color: #525252;
}
body.theme-light .analytics-legend--harmonic {
  color: #374151;
}
body.theme-light #progressionGraphCanvas {
  background: transparent;
}
body.theme-light .progression-graph-edit-label {
  color: #525252;
}
body.theme-light .progression-graph-edit-radio,
body.theme-light .progression-graph-edit-radio span {
  color: #171717;
}
body.theme-light .has-tooltip::after {
  background: rgba(255, 255, 255, 0.98);
  color: #171717;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
body.theme-light .has-tooltip::before {
  border-color: rgba(255, 255, 255, 0.98) transparent transparent transparent;
}

/* ----- Tables & lists ----- */
body.theme-light .history-table {
  color: #171717;
}
body.theme-light .history-table thead th {
  border-bottom: 1px solid hsl(0 0% 89.8%);
  color: #525252;
}
body.theme-light .history-table tbody td {
  border-bottom: 1px solid #f0f0f0;
}
body.theme-light .history-table tbody tr:hover {
  background: #f5f5f5;
}
body.theme-light .crate-list-section,
body.theme-light .crate-import-section {
  background: #fafafa;
  border: 1px solid hsl(0 0% 89.8%);
}
body.theme-light .checkbox-label {
  color: #0a0a0a;
}
body.theme-light .scoring-divider {
  background: hsl(0 0% 89.8%);
}

/* ----- Form labels & hints (global) ----- */
body.theme-light .form-label {
  color: #0a0a0a;
}
body.theme-light .form-hint {
  color: #737373;
}

/* ----- Numeric stepper ----- */
body.theme-light .numeric-stepper {
  background: #fff;
  border-color: hsl(0 0% 89.8%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
body.theme-light .numeric-stepper:focus-within {
  border-color: hsl(221 83% 53%);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
body.theme-light .stepper-button {
  border-color: hsl(0 0% 89.8%);
  background: #f5f5f5;
  color: #171717;
}
body.theme-light .stepper-button:hover:not(:disabled),
body.theme-light .stepper-button:focus-visible:not(:disabled) {
  background: #e5e5e5;
  border-color: hsl(0 0% 80%);
  color: #0a0a0a;
}
body.theme-light .stepper-input {
  color: #0a0a0a;
  background: transparent;
}
body.theme-light #panel-next-track-engine .numeric-stepper--nte-compact,
body.theme-light .profile-settings-tab .numeric-stepper--nte-compact {
  background: #fff;
  border-color: hsl(0 0% 89.8%);
  box-shadow: none;
}
body.theme-light #panel-next-track-engine .numeric-stepper--nte-compact:focus-within,
body.theme-light .profile-settings-tab .numeric-stepper--nte-compact:focus-within {
  border-color: hsl(221 83% 53%);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
body.theme-light #panel-next-track-engine .numeric-stepper--nte-compact .stepper-button,
body.theme-light .profile-settings-tab .numeric-stepper--nte-compact .stepper-button {
  color: #525252;
  background: transparent;
  border: none;
}
body.theme-light #panel-next-track-engine .numeric-stepper--nte-compact .stepper-button:hover:not(:disabled),
body.theme-light #panel-next-track-engine .numeric-stepper--nte-compact .stepper-button:focus-visible:not(:disabled),
body.theme-light .profile-settings-tab .numeric-stepper--nte-compact .stepper-button:hover:not(:disabled),
body.theme-light .profile-settings-tab .numeric-stepper--nte-compact .stepper-button:focus-visible:not(:disabled) {
  background: #f5f5f5;
  color: #171717;
}
body.theme-light #panel-next-track-engine .numeric-stepper--nte-compact .stepper-input,
body.theme-light .profile-settings-tab .numeric-stepper--nte-compact .stepper-input {
  border-left-color: hsl(0 0% 89.8%);
  border-right-color: hsl(0 0% 89.8%);
}

/* ----- Custom checkboxes ----- */
body.theme-light .checkbox-label input[type="checkbox"],
body.theme-light .track-pool-checkboxes input[type="checkbox"] {
  border-color: hsl(0 0% 78%);
}
body.theme-light .checkbox-label input[type="checkbox"]:checked,
body.theme-light .track-pool-checkboxes input[type="checkbox"]:checked {
  border-color: #16a34a;
}
body.theme-light .checkbox-label input[type="checkbox"]::after,
body.theme-light .track-pool-checkboxes input[type="checkbox"]::after {
  color: #16a34a;
}
body.theme-light .checkbox-label input[type="checkbox"]:focus-visible,
body.theme-light .track-pool-checkboxes input[type="checkbox"]:focus-visible {
  outline-color: rgba(22, 163, 74, 0.45);
}

/* ----- Track Pool (playlist editor tab) ----- */
body.theme-light .track-pool-checkboxes {
  border-color: hsl(0 0% 89.8%);
  background: #fafafa;
}
body.theme-light .trackpool-header-text p {
  color: #737373;
}
body.theme-light .track-pool-preview {
  color: #16a34a;
}
body.theme-light .track-pool-preview.error {
  color: #dc2626;
}
body.theme-light .track-pool-match-count {
  color: #171717;
}

/* ----- Track Pool tabs (genre/bpm/crate sub-tabs) ----- */
body.theme-light .track-pool-tab {
  color: #737373;
}
body.theme-light .track-pool-tab:hover {
  color: #171717;
}
body.theme-light .track-pool-tab.active {
  color: #0a0a0a;
  border-bottom-color: #0a0a0a;
}
body.theme-light .track-pool-genre-scroll::-webkit-scrollbar-track {
  background: #f0f0f0;
}
body.theme-light .track-pool-genre-scroll::-webkit-scrollbar-thumb {
  background: #c4c4c4;
}
body.theme-light .track-pool-genre-scroll::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}
body.theme-light .track-pool-genre-checkboxes .checkbox-label input[type="checkbox"]:checked {
  border-color: #16a34a;
}

/* ----- Track Pool preview list (pool builder) ----- */
body.theme-light .track-pool-preview-count {
  color: #0a0a0a;
}
body.theme-light .track-pool-preview-item {
  border-bottom-color: hsl(0 0% 92%);
}
body.theme-light .track-pool-preview-item:hover {
  background: hsl(0 0% 96%);
}
body.theme-light .track-pool-preview-play-icon {
  color: #737373;
}
body.theme-light .track-pool-preview-play-icon:hover {
  color: #171717;
}

/* ----- Toggle panel headings (Progression, Idents, Track Pool) ----- */
body.theme-light .panel-title-toggle h3 {
  color: #0a0a0a;
}
/* Mix toggle sub-headers keep a warm accent */
body.theme-light .mix-toggle-header .panel-title-toggle h3 {
  color: #92400e;
}

/* ----- Scoring panel text ----- */
body.theme-light .scoring-field-label {
  color: #0a0a0a;
}
body.theme-light .scoring-field-hint {
  color: #737373;
}
body.theme-light .scoring-checkbox-inline .checkbox-label span,
body.theme-light .scoring-inline-combo span {
  color: #0a0a0a;
}

/* ----- Idents panel ----- */
body.theme-light .idents-list {
  border-color: hsl(0 0% 89.8%);
  background: #fafafa;
}
body.theme-light .idents-list .panel-message {
  color: #737373;
}
body.theme-light .idents-item span {
  color: #171717;
}
body.theme-light .idents-status.disabled {
  color: #a3a3a3;
}
body.theme-light .idents-preview-btn {
  color: #525252;
}
body.theme-light .idents-preview-btn:hover,
body.theme-light .idents-preview-btn:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  border-color: hsl(0 0% 85%);
  color: #171717;
}
body.theme-light .idents-edit-btn {
  color: #a3a3a3;
}
body.theme-light .idents-edit-btn:hover,
body.theme-light .idents-edit-btn:focus-visible {
  color: #171717;
  background: rgba(0, 0, 0, 0.06);
  border-color: hsl(0 0% 85%);
}

/* ----- Track Pools Manager (editor card & preview) ----- */
body.theme-light .track-pools-editor-preview {
  background: #fafafa;
  border-color: hsl(0 0% 89.8%);
}
body.theme-light .track-pools-editor-preview .track-pool-preview-title {
  color: #0a0a0a;
}
body.theme-light .track-pools-editor-preview .track-pool-preview-item {
  border-bottom-color: hsl(0 0% 92%);
}

/* ----- Scoring warning ----- */
body.theme-light .scoring-warning h3 {
  color: #dc2626;
}

body.theme-light .toggle-badge {
  border: 1px solid hsl(0 0% 89.8%);
  color: #525252;
  background: #f5f5f5;
}
body.theme-light .toggle-row .toggle-hint {
  color: #525252;
}

/* ----- Station On/Off switch ----- */
body.theme-light .station-switch-input:not(:checked) + .station-switch-slider {
  background: rgba(239, 68, 68, 0.25);
  border-color: hsl(0 0% 89.8%);
}
body.theme-light .station-switch-slider::before {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ----- Playlist tabs & mode card ----- */
body.theme-light .playlist-tab-scroll-wrapper {
  border-bottom-color: rgba(0, 0, 0, 0.12);
}
body.theme-light .playlist-tab-arrow {
  color: #525252;
}
body.theme-light .playlist-tab-arrow:hover:not(:disabled) {
  color: #0a0a0a;
  background: rgba(0, 0, 0, 0.06);
}
body.theme-light .playlist-tab {
  color: #525252;
}
body.theme-light .playlist-tab:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #171717;
}
body.theme-light .playlist-tab.active {
  background: rgba(0, 0, 0, 0.1);
  color: #0a0a0a;
}
body.theme-light #playlistTabs[data-mode="autodj"] .playlist-tab[data-modes~="autodj"] {
  color: #525252;
}
body.theme-light #playlistTabs[data-mode="autodj"] .playlist-tab[data-modes~="autodj"].active {
  background: rgba(0, 0, 0, 0.1);
  color: #0a0a0a;
}
body.theme-light #playlistTabs[data-mode="autodj"] .playlist-tab[data-modes~="autodj"]:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #171717;
}
body.theme-light #playlistTabs[data-mode="simple"] .playlist-tab[data-tab="simple-settings"] {
  color: #525252;
}
body.theme-light #playlistTabs[data-mode="simple"] .playlist-tab[data-tab="simple-settings"].active {
  background: rgba(0, 0, 0, 0.1);
  color: #0a0a0a;
}
body.theme-light #playlistTabs[data-mode="simple"] .playlist-tab[data-tab="simple-settings"]:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #171717;
}
body.theme-light .card.playlist-mode-card,
body.theme-light #panel-playlists .card.playlist-mode-card {
  background: #fff;
  border-color: hsl(0 0% 89.8%);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}
body.theme-light .playlist-tab-panels .playlist-tab-panel > .panel-body:not(.next-track-engine-body):not(.profile-settings-body) {
  background: transparent;
  border: none;
  box-shadow: none;
}
body.theme-light .profile-settings-tab .profile-settings-cell,
body.theme-light .profile-settings-tab .next-track-engine-cell {
  background: transparent;
  box-shadow: none;
}
body.theme-light .playlist-profile-bar-actions {
  background: #fff;
  border-color: hsl(0 0% 85%);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
body.theme-light .playlist-profile-bar-actions .playlist-profile-icon-btn + .playlist-profile-icon-btn {
  border-left-color: hsl(0 0% 89.8%);
}
body.theme-light .playlist-mode-toggle {
  background: #f0f0f0;
  border: 1px solid hsl(0 0% 85%);
  box-shadow: none;
}
body.theme-light .playlist-mode-toggle .toggle-highlight {
  background: #0a0a0a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}
body.theme-light .playlist-mode-toggle .toggle-option {
  color: #404040;
}
body.theme-light .playlist-mode-toggle .toggle-option--crate,
body.theme-light .playlist-mode-toggle .toggle-option--sets {
  color: #404040;
}
body.theme-light .playlist-mode-toggle[data-mode="autodj"] .toggle-option--autodj,
body.theme-light .playlist-mode-toggle[data-mode="simple"] .toggle-option--simple,
body.theme-light .playlist-mode-toggle[data-mode="crate"] .toggle-option--crate,
body.theme-light .playlist-mode-toggle[data-mode="sets"] .toggle-option--sets {
  color: #fff;
}

/* ----- Engine events (light theme) ----- */
body.theme-light .events-log {
  background: #fafafa;
  border-color: hsl(0 0% 89.8%);
  scrollbar-color: #c4c4c4 #f0f0f0;
}
body.theme-light .events-log::-webkit-scrollbar-track {
  background: #f0f0f0;
}
body.theme-light .events-log::-webkit-scrollbar-thumb {
  background: #c4c4c4;
}
body.theme-light .events-log::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}
body.theme-light .events-entry {
  border-bottom-color: hsl(0 0% 92%);
}
body.theme-light .events-entry .event-meta {
  color: #737373;
}
body.theme-light .events-entry .event-kind {
  color: #b45309;
}
body.theme-light .events-entry .event-time {
  color: #525252;
}
body.theme-light .event-text {
  color: #171717;
}
body.theme-light .event-text.event-text--ident {
  color: #b8860b !important;
}
body.theme-light .event-section {
  color: #525252;
}
body.theme-light .event-section-label {
  color: #15803d;
}
body.theme-light .events-empty {
  color: #737373;
}
body.theme-light .event-fallback-warning {
  color: #dc2626;
}
/* Badges – keep colored tints but darken text for readability */
body.theme-light .event-badge {
  background: rgba(0, 0, 0, 0.04);
  border-color: hsl(0 0% 82%);
  color: #171717;
}
body.theme-light .event-badge--green {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.3);
  color: #15803d;
}
body.theme-light .event-badge--red {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.3);
  color: #dc2626;
}
body.theme-light .event-badge--ident {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.3);
  color: #b45309;
}
body.theme-light .event-badge--perceptual {
  background: rgba(234, 88, 12, 0.08);
  border-color: rgba(234, 88, 12, 0.3);
  color: #c2410c;
}
body.theme-light .event-badge--neutral {
  background: rgba(0, 0, 0, 0.04);
  border-color: hsl(0 0% 82%);
  color: #525252;
}
/* Playlist mode badges keep their gradients */
body.theme-light .event-badge-playlist-mode--autodj {
  box-shadow: 0 1px 4px rgba(240, 165, 0, 0.25);
}
body.theme-light .event-badge-playlist-mode--simple {
  box-shadow: 0 1px 4px rgba(26, 143, 84, 0.25);
}
body.theme-light .event-badge-playlist-mode--crate {
  box-shadow: 0 1px 4px rgba(198, 40, 40, 0.25);
}
/* ----- Track history (light theme: white background) ----- */
body.theme-light .track-history-header {
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none;
}
body.theme-light #panel-history .track-history-editor-settings-box .track-history-list {
  background: #ffffff;
  border-color: hsl(0 0% 89.8%);
}
body.theme-light .track-history-list {
  scrollbar-color: #c4c4c4 #f0f0f0;
}
body.theme-light .track-history-header-row {
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: hsl(0 0% 92%);
}
body.theme-light .track-history-header-row .th-hcol.deck-slot-label {
  color: #8ca0b9;
}
body.theme-light .track-history-row {
  border-bottom-color: hsl(0 0% 92%);
}
body.theme-light .track-history-row:hover {
  background: hsl(0 0% 96%);
}
body.theme-light .track-history-artist {
  color: #171717;
}
body.theme-light .track-history-title {
  color: #525252;
}
body.theme-light .track-history-sep {
  color: #a3a3a3;
}
body.theme-light .track-history-row--ident .track-history-artist,
body.theme-light .track-history-row--ident .track-history-title {
  color: #a3a3a3;
}
body.theme-light .track-history-play {
  border-color: rgba(0, 0, 0, 0.15);
  color: #525252;
}
body.theme-light .track-history-play:hover {
  background: rgba(41, 121, 255, 0.15);
  color: #0a0a0a;
}
body.theme-light .track-history-play.active {
  background: rgba(41, 121, 255, 0.25);
  color: #0a0a0a;
}
body.theme-light .th-time {
  color: #737373;
}
body.theme-light .th-bpm {
  color: #737373;
}
body.theme-light .track-history-bpm-perceptual {
  color: #d97706;
}
body.theme-light .th-profile,
body.theme-light .th-selection {
  color: #737373;
}
body.theme-light .th-ident-label {
  color: #a3a3a3;
}
body.theme-light .track-history-actions-trigger {
  color: rgba(17, 24, 39, 0.78);
}
body.theme-light .track-history-actions-trigger:hover,
body.theme-light .track-history-actions-trigger:focus-visible {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.85);
}
body.theme-light .track-history-actions-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(17, 24, 39, 0.16);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}
body.theme-light .track-history-menu-item {
  color: #1f2937;
}
body.theme-light .track-history-menu-item:hover,
body.theme-light .track-history-menu-item:focus-visible {
  background: rgba(2, 132, 199, 0.12);
}
body.theme-light .track-history-empty-msg {
  color: #737373;
}
body.theme-light .track-history-pagination {
  border-top-color: hsl(0 0% 92%);
}
/* Harmonic badge text: white on coloured key chips (legacy table cells + joined chip) */
body.theme-light .th-harmonic .metric-badge[class*="key-"] .metric-value,
body.theme-light .th-key-transition-group .deck-key-harmonic-chip[class*="key-"] .deck-key-harmonic-chip__key {
  color: #fff;
}

/* ----- Playlist tabs (duplicate removed — see above) ----- */

/* ----- Modals & dropdowns ----- */
body.theme-light .modal-dialog {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  color: #0a0a0a;
}
body.theme-light .modal-dialog h3,
body.theme-light .modal-dialog p,
body.theme-light .modal-dialog .form-label,
body.theme-light .modal-dialog strong,
body.theme-light .modal-dialog .form-hint {
  color: #0a0a0a;
}
body.theme-light .modal-dialog .form-hint {
  color: #525252;
}
body.theme-light .confirm-dialog h3 {
  color: #0a0a0a;
}
body.theme-light .confirm-dialog p {
  color: #525252;
}
body.theme-light .confirm-actions .btn {
  color: inherit;
}
body.theme-light .confirm-actions .btn-primary {
  color: #fff;
}
body.theme-light .modal-dialog .form-control,
body.theme-light .modal-dialog input,
body.theme-light .modal-dialog select {
  color: #0a0a0a;
}
/* .btn-secondary:hover forces white text, which disappears on a light dialog. */
body.theme-light .modal-dialog .btn-secondary {
  background: #ffffff;
  border-color: hsl(0 0% 86%);
  color: #0a0a0a;
}
body.theme-light .modal-dialog .btn-secondary:hover:not(:disabled),
body.theme-light .modal-dialog .btn-secondary:focus-visible:not(:disabled) {
  background: #f5f5f5;
  border-color: hsl(0 0% 82%);
  color: #0a0a0a;
}
body.theme-light .modal-dialog .track-edit-history-item {
  color: #525252;
}
body.theme-light .genre-dropdown-list {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
body.theme-light .genre-dropdown-item {
  color: #171717;
  border-bottom: 1px solid #f0f0f0;
}
body.theme-light .genre-dropdown-item:hover,
body.theme-light .genre-dropdown-item.selected {
  background: #f5f5f5;
}

/* ----- Generic tooltip & legend ----- */
body.theme-light .tooltip {
  background: rgba(255, 255, 255, 0.96);
  color: #171717;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
body.theme-light .legend {
  color: #525252;
}
body.theme-light table.history th,
body.theme-light table.history td {
  border-bottom: 1px solid #e5e5e5;
}
body.theme-light table.history th {
  color: #525252;
}
body.theme-light table.history td {
  color: #171717;
}
body.theme-light .panel-message {
  color: #525252;
}

/* ----- Control events list ----- */
body.theme-light .control-events-list {
  scrollbar-color: #c4c4c4 #f0f0f0;
}
body.theme-light .control-events-list::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 6px;
}
body.theme-light .control-events-list::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 6px;
}
body.theme-light .control-events-list::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}
body.theme-light .control-event-item {
  color: #525252;
  border-bottom: 1px solid #f0f0f0;
}

/* ----- Control page: station control rows ----- */
body.theme-light .station-control-row {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
body.theme-light .station-control-name {
  color: #0a0a0a;
}
body.theme-light .station-control-status-badge--on-air {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.35);
}
body.theme-light .station-control-status-badge--offline {
  background: #a3a3a3;
  color: #fff;
  box-shadow: none;
}
body.theme-light .station-control-visualizer__bar {
  background: #16a34a;
}
body.theme-light .station-control-progress__track {
  background: hsl(0 0% 90%);
}
body.theme-light .station-control-progress__fill {
  background: #16a34a;
}
body.theme-light .station-control-progress__time {
  color: #737373;
}
body.theme-light .station-control-listener-dot {
  background: #a3a3a3;
  box-shadow: none;
}
body.theme-light .station-control-track-thumb {
  background: #f5f5f5;
  border: 1px solid hsl(0 0% 82%);
}
body.theme-light .station-control-art-play {
  border-color: hsl(0 0% 82%);
}
body.theme-light .station-control-art-play .station-control-track-thumb {
  border: none;
}
body.theme-light .station-control-track-thumb--offline {
  background: #ebebeb;
  border-color: hsl(0 0% 76%);
  opacity: 1;
}
body.theme-light .station-control-listener-dot--live {
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.35);
}
body.theme-light .station-control-nowplaying {
  color: #525252;
}
body.theme-light .station-control-nowplaying--offline {
  color: #737373;
}
body.theme-light .station-control-remain {
  color: #737373;
}
body.theme-light .station-loading-dots .ld-dot {
  background: rgba(0, 0, 0, 0.45);
}
body.theme-light .station-control-art-play__overlay {
  background: rgba(0, 0, 0, 0.32);
}
body.theme-light .station-control-art-play:hover .station-control-art-play__overlay,
body.theme-light .station-control-art-play:focus-visible .station-control-art-play__overlay {
  background: rgba(0, 0, 0, 0.4);
}
body.theme-light .station-control-art-play.is-playing .station-control-art-play__overlay {
  background: rgba(0, 0, 0, 0.44);
}
body.theme-light .station-control-art-play .station-control-art-play__icon {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.55));
}
body.theme-light .station-control-art-play:hover .station-control-art-play__icon,
body.theme-light .station-control-art-play:focus-visible .station-control-art-play__icon {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.65));
}
body.theme-light .station-control-row .station-stream-link.gravy-live-player-bar__play {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}
body.theme-light .station-control-row .station-stream-link.gravy-live-player-bar__play:hover,
body.theme-light .station-control-row .station-stream-link.gravy-live-player-bar__play.is-playing {
  background: #1d4ed8;
  border-color: #1e40af;
}
body.theme-light .station-control-row .station-gear-link {
  background: #ffffff;
  border: 1px solid hsl(0 0% 86%);
  color: #525252;
}
body.theme-light .station-control-row .station-gear-link:hover {
  background: #f3f4f6;
  border-color: hsl(0 0% 78%);
  color: #0a0a0a;
  filter: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
body.theme-light .station-gear-link {
  color: #737373;
}
body.theme-light .station-gear-link:hover {
  color: #0a0a0a;
  filter: none;
}

/* ----- Track search (light theme: white background) ----- */
body.theme-light .track-search-results {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  scrollbar-color: #c4c4c4 #f0f0f0;
}
body.theme-light .track-search-results::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 6px;
}
body.theme-light .track-search-results::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 6px;
}
body.theme-light .track-search-results::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}
body.theme-light .track-search-header {
  color: #8b8b8b;
  background: rgba(250, 250, 250, 0.97);
  border-bottom-color: hsl(0 0% 92%);
}
body.theme-light .track-search-item {
  border-bottom-color: hsl(0 0% 92%);
  color: #171717;
}
body.theme-light .track-search-item.selected {
  background: rgba(34, 197, 94, 0.12);
}
body.theme-light .track-search-item:hover {
  background: hsl(0 0% 96%);
}
body.theme-light .track-search-play {
  border-color: hsl(0 0% 85%);
  color: #737373;
}
body.theme-light .track-search-play:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #171717;
}
body.theme-light #panel-tracksearch .track-search-artist {
  color: #171717;
}
body.theme-light #panel-tracksearch .track-search-title {
  color: #334155;
}
body.theme-light .track-search-artist {
  color: #171717;
}
body.theme-light .track-search-sep {
  color: #a3a3a3;
}
body.theme-light .track-search-title {
  color: #525252;
}
body.theme-light .track-search-bpm,
body.theme-light .track-search-key,
body.theme-light .track-search-dur {
  color: #737373;
}
body.theme-light .track-blocked-badge {
  background: #dc2626;
}
body.theme-light .track-duplicate-badge {
  background: #d97706;
}
body.theme-light .track-search-actions-trigger {
  color: rgba(17, 24, 39, 0.78);
}
body.theme-light .track-search-actions-trigger:hover,
body.theme-light .track-search-actions-trigger:focus-visible {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.85);
}
body.theme-light .track-search-actions-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(17, 24, 39, 0.16);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}
body.theme-light .track-search-menu-item {
  color: #1f2937;
}
body.theme-light .track-search-menu-item:hover,
body.theme-light .track-search-menu-item:focus-visible {
  background: rgba(2, 132, 199, 0.12);
}
body.theme-light .track-search-menu-item[data-track-action="block"] {
  color: #b91c1c;
}
body.theme-light .track-search-menu-item[data-track-action="unblock"] {
  color: #16a34a;
}
body.theme-light .track-search-btn {
  color: #fff;
}
body.theme-light .track-search-btn.success {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.3);
  color: #15803d;
}
body.theme-light .track-search-btn.error {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.3);
  color: #dc2626;
}

/* ----- Track history list scrollbar ----- */
body.theme-light .track-history-list::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 6px;
}
body.theme-light .track-history-list::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 6px;
}
body.theme-light .track-history-list::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}

/* ----- Sidebar active state ----- */
body.theme-light .sidebar-item.active {
  color: #1a1a1a;
}
body.theme-light .sidebar-item.active::before {
  background: rgba(0, 0, 0, 0.1);
}
body.theme-light .sidebar-icon {
  filter: brightness(0);
  opacity: 0.55;
}
body.theme-light .sidebar-item:hover .sidebar-icon {
  filter: brightness(0);
  opacity: 0.6;
}
body.theme-light .sidebar-item.active .sidebar-icon {
  filter: brightness(0);
  opacity: 0.9;
}

/* ----- Hint popover ----- */
body.theme-light .hint-popover {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid hsl(0 0% 89.8%);
  color: #171717;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ----- Deck mode labels (next to pill toggle) ----- */
body.theme-light .deck-mode-label {
  color: #b45309;
}
body.theme-light .deck-mode-label-left {
  color: #b91c1c;
}
body.theme-light .deck-mode-label-right {
  color: #b45309;
}

/* ----- Simulator modal (in Playlist Editor) ----- */
.simulator-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.simulator-open-btn--running {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}
body.theme-light .simulator-open-btn--running {
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(254, 226, 226, 0.95);
  color: #991b1b;
}
.simulator-open-btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.simulator-modal-overlay { align-items: center; justify-content: center; }

/* Profiles panel: simulator covers the settings/tabs card (not the profile name bar) */
#panel-playlists.panel.active.is-simulator-open {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--station-chrome-height, 52px) - 48px);
}
#panel-playlists.panel.active.is-simulator-open > .playlist-profile-editor-settings-box.is-simulator-open {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#panel-playlists .simulator-modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: rgba(10, 18, 30, 0.94);
  align-items: stretch;
  justify-content: stretch;
  border-radius: 0 0 12px 12px;
  border: 2px dashed rgba(80, 140, 210, 0.55);
}
#panel-playlists .simulator-modal-overlay[hidden] {
  display: none;
}
body.theme-light #panel-playlists .simulator-modal-overlay {
  background: rgba(250, 250, 250, 0.97);
  border-color: rgba(80, 140, 210, 0.45);
}

.simulator-modal-dialog {
  width: min(480px, 92vw);
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  flex-direction: column;
  gap: 12px;
  background: rgba(14, 28, 46, 0.98);
}

#panel-playlists .simulator-modal-dialog {
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  border-radius: 0 0 10px 10px;
  padding: 14px 16px 16px;
  box-shadow: none;
  border: none;
  background: rgba(14, 28, 46, 0.98);
}
body.theme-light #panel-playlists .simulator-modal-dialog {
  background: #fafafa;
}
.simulator-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.simulator-modal-header h3 { margin: 0; font-size: 18px; color: #fff; }
.simulator-close-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.simulator-close-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
body.theme-light .simulator-close-btn { color: #525252; }
body.theme-light .simulator-close-btn:hover { background: rgba(0,0,0,0.08); color: #0a0a0a; }
body.theme-light .simulator-modal-dialog { background: #fafafa; }

.simulator-modal-body .simulator-controls { margin-bottom: 1rem; flex-shrink: 0; }
.simulator-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}
.simulator-toolbar-duration {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 8.5rem;
}

.simulator-toolbar-duration__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.simulator-duration-sets-note {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.95);
  white-space: nowrap;
}

body.theme-light .simulator-duration-sets-note {
  color: #64748b;
}

.simulator-toolbar-label {
  font-size: 12px;
  font-weight: 600;
  color: #9fb3cc;
}
body.theme-light .simulator-toolbar-label {
  color: #525252;
}
.simulator-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.simulator-control-grid { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 0.75rem; }
#panel-playlists .simulator-modal-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.simulator-modal-body .simulator-row { margin-bottom: 0.5rem; }
.simulator-modal-body .simulator-row label { display: block; margin-bottom: 0.25rem; }
.simulator-actions { margin-top: 0.75rem; }
.simulator-actions .btn { margin-right: 0.5rem; }
.simulator-running-indicator { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: #38bdf8; font-weight: 600; }
.simulator-running-indicator[hidden] { display: none !important; }
.simulator-spinner { width: 14px; height: 14px; border: 2px solid rgba(56, 189, 248, 0.3); border-top-color: #38bdf8; border-radius: 50%; animation: simulator-spin 0.75s linear infinite; }
.simulator-modal-body .simulator-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--panel-bg, rgba(255,255,255,0.05));
  border-radius: 6px;
  flex-shrink: 0;
}
.simulator-stat-label { margin-right: 0.25em; font-size: 0.85rem; }
.simulator-modal-body .simulator-mini-history {
  margin-bottom: 1rem;
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#panel-playlists .simulator-modal-body .simulator-mini-history {
  margin-bottom: 0;
}
.simulator-mini-history-title { font-size: 0.95rem; margin-bottom: 0.4rem; flex-shrink: 0; }
.simulator-modal-body .simulator-recent-picks {
  height: 160px;
  min-height: 160px;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--border-color, rgba(255,255,255,0.15));
  border-radius: 6px;
  padding: 0.5rem;
  background: var(--panel-bg, rgba(0,0,0,0.2));
  -webkit-overflow-scrolling: touch;
}
#panel-playlists .simulator-modal-body .simulator-recent-picks {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: 100%;
}
#panel-playlists .simulator-history-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}
.simulator-history-table { margin-bottom: 0; font-size: 12px; table-layout: fixed; width: 100%; background: transparent; }
.simulator-history-table th.simulator-col-time,
.simulator-history-table td.simulator-col-time { width: 64px; min-width: 64px; max-width: 64px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.simulator-history-table th.simulator-col-track,
.simulator-history-table td.simulator-col-track { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.simulator-history-table th.simulator-col-bpm,
.simulator-history-table td.simulator-col-bpm { width: 52px; min-width: 52px; max-width: 52px; text-align: right; white-space: nowrap; box-sizing: border-box; }
.simulator-history-table th.simulator-col-key,
.simulator-history-table td.simulator-col-key { width: 64px; min-width: 64px; max-width: 64px; text-align: right; white-space: nowrap; box-sizing: border-box; }
.simulator-history-table th.simulator-col-energy,
.simulator-history-table td.simulator-col-energy { width: 72px; min-width: 72px; max-width: 72px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.simulator-history-table th.simulator-col-result,
.simulator-history-table td.simulator-col-result { width: 76px; min-width: 76px; max-width: 76px; text-align: right; white-space: nowrap; box-sizing: border-box; }
.simulator-history-table .simulator-col-key .metric-badge { margin-left: auto; margin-right: 0; }
body.theme-light .simulator-recent-picks { background: #fff; border-color: hsl(0 0% 89.8%); }
body.theme-light .simulator-history-table tbody td { color: #171717; }
body.theme-light .simulator-history-table thead th { color: #525252; }
.simulator-badge { font-size: 0.7em; padding: 0.15em 0.4em; border-radius: 4px; margin-right: 0.5em; }
.simulator-badge--scored { background: #16a34a; color: #fff; }
.simulator-badge--unscored { background: #6b7280; color: #fff; }
.simulator-sql-section { margin-bottom: 1rem; }
.simulator-sql-title { font-size: 0.95rem; margin-bottom: 0.5rem; }
.simulator-sql-list .simulator-sql-details { margin-bottom: 0.5rem; }
.simulator-sql-pre { font-size: 0.75rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 0.25rem 0; padding: 0.5rem; background: var(--code-bg, rgba(0,0,0,0.3)); border-radius: 4px; }
.simulator-recent-empty, .simulator-sql-empty { color: var(--muted, #94a3b8); font-size: 0.9rem; }
.simulator-modal-body .simulator-sql-pre,
.simulator-modal-body .simulator-sql-details,
.simulator-modal-body .simulator-sql-details summary,
.simulator-modal-body .simulator-stat-label,
.simulator-modal-body .simulator-mini-history-title,
.simulator-modal-body .simulator-sql-title,
.simulator-modal-body .simulator-row label { color: var(--text-primary, #e2e8f0); }
body.theme-light .simulator-modal-body .simulator-sql-pre,
body.theme-light .simulator-modal-body .simulator-sql-details,
body.theme-light .simulator-modal-body .simulator-sql-details summary,
body.theme-light .simulator-modal-body .simulator-stat-label,
body.theme-light .simulator-modal-body .simulator-mini-history-title,
body.theme-light .simulator-modal-body .simulator-sql-title,
body.theme-light .simulator-modal-body .simulator-row label { color: #171717; }
body.theme-light .simulator-modal-body .simulator-recent-empty,
body.theme-light .simulator-modal-body .simulator-sql-empty { color: #737373; }
body.theme-light .simulator-modal-body .simulator-stats { background: rgba(0,0,0,0.06); }
body.theme-light .simulator-modal-body .simulator-sql-pre { background: #f1f5f9; color: #0f172a; }
body.theme-light .simulator-running-indicator { color: #0c4a6e; }

@media (max-width: 860px) {
  .simulator-control-grid { grid-template-columns: 1fr; }
}

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

/* System Logs panel – label/select same as playlist editor */
#panel-system-logs .system-logs-source-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 280px;
  margin-bottom: 12px;
}
.system-logs-view-wrapper { margin-top: 8px; }
/* Results pane: same font as pool-result-title; wrap lines, no horizontal scroll */
.system-logs-content {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  padding: 12px;
  max-height: 70vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(0,0,0,0.25);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: pre-wrap;
  word-break: break-word;
  color: #b0c4de;
}
body.theme-light .system-logs-content {
  background: #f1f5f9;
  color: #525252;
  border-color: hsl(0 0% 89.8%);
}
.system-logs-content .log-track-highlight {
  background: rgba(74, 158, 255, 0.25);
  padding: 0 2px;
  border-radius: 2px;
}
body.theme-light .system-logs-content .log-track-highlight {
  background: rgba(59, 130, 246, 0.2);
}
.system-logs-content .log-line--error {
  color: #f87171;
}
.system-logs-content .log-line--warn {
  color: #fbbf24;
}
body.theme-light .system-logs-content .log-line--error {
  color: #dc2626;
}
body.theme-light .system-logs-content .log-line--warn {
  color: #d97706;
}

/* Playlist engine log — rich HTML layout */
.system-logs-content.system-logs-content--rich {
  white-space: normal;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  padding: 14px;
}
.system-logs-content--rich .log-pl-rich-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.system-logs-content--rich .log-pl-rich-preamble {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #94a3b8;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
body.theme-light .system-logs-content--rich .log-pl-rich-preamble {
  color: #64748b;
  background: #e2e8f0;
  border-color: #cbd5e1;
}
.system-logs-content--rich .log-pl-rich-record {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
body.theme-light .system-logs-content--rich .log-pl-rich-record {
  border-color: #e2e8f0;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.system-logs-content--rich .log-pl-rich-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}
body.theme-light .system-logs-content--rich .log-pl-rich-head {
  border-bottom-color: #e2e8f0;
  background: #f1f5f9;
}
.system-logs-content--rich .log-pl-rich-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.system-logs-content--rich .log-pl-rich-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #94a3b8;
}
body.theme-light .system-logs-content--rich .log-pl-rich-time {
  color: #64748b;
}
.system-logs-content--rich .log-pl-rich-level {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}
.system-logs-content--rich .log-pl-rich-level--warning {
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
}
.system-logs-content--rich .log-pl-rich-level--error {
  background: rgba(248, 113, 113, 0.2);
  color: #fca5a5;
}
body.theme-light .system-logs-content--rich .log-pl-rich-level {
  background: rgba(22, 163, 74, 0.15);
  color: #15803d;
}
.system-logs-content--rich .log-pl-rich-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.system-logs-content--rich .log-pl-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #bae6fd;
}
body.theme-light .system-logs-content--rich .log-pl-badge {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}
.system-logs-content--rich .log-pl-badge-k {
  font-weight: 600;
  opacity: 0.85;
}
.system-logs-content--rich .log-pl-badge-k::after {
  content: ':';
  margin-left: 1px;
  opacity: 0.7;
}
.system-logs-content--rich .log-pl-badge-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}
.system-logs-content--rich .log-pl-badge--smart-seq-on {
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.45);
  color: #ddd6fe;
}
body.theme-light .system-logs-content--rich .log-pl-badge--smart-seq-on {
  background: #ede9fe;
  border-color: #a78bfa;
  color: #5b21b6;
}
.system-logs-content--rich .log-pl-badge--smart-seq-ready {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
}
body.theme-light .system-logs-content--rich .log-pl-badge--smart-seq-ready {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}
.system-logs-content--rich .log-pl-rich-line--smart-seq {
  color: #c4b5fd;
  font-weight: 500;
}
body.theme-light .system-logs-content--rich .log-pl-rich-line--smart-seq {
  color: #6d28d9;
}
.system-logs-content--rich .log-pl-rich-summary {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  line-height: 1.4;
}
body.theme-light .system-logs-content--rich .log-pl-rich-summary {
  color: #0f172a;
}
.system-logs-content--rich .log-pl-rich-body {
  padding: 10px 12px 12px;
}
.system-logs-content--rich .log-pl-rich-body-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.system-logs-content--rich .log-pl-rich-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin-top: 10px;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}
.system-logs-content--rich .log-pl-rich-body-inner > .log-pl-rich-section-title:first-child {
  margin-top: 0;
}
body.theme-light .system-logs-content--rich .log-pl-rich-section-title {
  color: #0369a1;
  border-bottom-color: rgba(3, 105, 161, 0.2);
}
.system-logs-content--rich .log-pl-rich-hr {
  border: none;
  height: 1px;
  margin: 10px 0;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.45), transparent);
}
.system-logs-content--rich .log-pl-rich-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  padding: 3px 0 3px 8px;
  border-left: 2px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}
body.theme-light .system-logs-content--rich .log-pl-rich-line {
  color: #334155;
  border-left-color: #cbd5e1;
}
.system-logs-content--rich .log-pl-rich-line--seed {
  border-left-color: rgba(34, 197, 94, 0.5);
  color: #86efac;
}
body.theme-light .system-logs-content--rich .log-pl-rich-line--seed {
  color: #047857;
  border-left-color: #6ee7b7;
}
.system-logs-content--rich .log-pl-rich-line--harmonic {
  border-left-color: rgba(251, 191, 36, 0.55);
  color: #fde68a;
}
body.theme-light .system-logs-content--rich .log-pl-rich-line--harmonic {
  color: #a16207;
  border-left-color: #fbbf24;
}
.system-logs-content--rich .log-pl-rich-line--settings {
  border-left-color: rgba(192, 132, 252, 0.45);
  color: #e9d5ff;
}
body.theme-light .system-logs-content--rich .log-pl-rich-line--settings {
  color: #6b21a8;
  border-left-color: #d8b4fe;
}
.system-logs-content--rich .log-pl-rich-line--sets {
  border-left-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}
body.theme-light .system-logs-content--rich .log-pl-rich-line--sets {
  color: #b45309;
  border-left-color: #fcd34d;
}
.system-logs-content--rich .log-pl-rich-line--annotate {
  border-left-color: rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
}
body.theme-light .system-logs-content--rich .log-pl-rich-line--annotate {
  color: #0369a1;
  border-left-color: #38bdf8;
}
.system-logs-content--rich .log-pl-rich-picked {
  margin: 6px 0 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
}
.system-logs-content--rich .log-pl-rich-plain {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== Deck refresh (rollback-safe override block) ===== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.theme-light {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Keep content within a readable ultrawide field. Responsive padding. */
.station-main {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 10px;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

/* ===== Mobile collapse fix (rollback: delete this block) ===== */
@media (max-width: 1200px) {
  .station-main .deck-grid .deck-section .deck-section-row,
  .station-main .deck-grid .deck-section .deck-queue-row {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .station-main {
    padding-left: 12px;
    padding-right: 12px;
  }
  .station-main .panel {
    padding: 12px;
  }
  #panel-track-pools-manager .pool-track-search-results {
    min-height: 200px;
    max-height: none;
  }
  #panel-track-pools-manager .track-pools-editor-settings-box .pool-results-list:empty {
    min-height: 100px;
  }
  #panel-track-pools-manager .track-pools-editor-settings-box .pool-results-list:not(:empty) {
    min-height: 300px;
    max-height: clamp(300px, calc(100vh - 260px), 700px);
  }
  #panel-playback.panel {
    padding: 20px 12px 16px;
  }
  #panel-playback .deck-status-stack {
    margin-bottom: 16px;
  }
  #panel-playback .deck-grid {
    gap: 22px;
  }
  #panel-playback #deckNowPlaying.deck-card {
    gap: 22px;
  }
  #panel-playback .deck-section-group {
    gap: 22px;
  }
  .station-top-bar {
    padding-left: 16px;
    padding-right: 16px;
  }
  /* Deck: compact live row — 44px thumb + remain time; thumb centred on waveform */
  #deckNowPlaying .deck-live-layout {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 4px;
    align-items: center;
  }
  #deckNowPlaying .deck-deck-thumb-col--live {
    display: contents;
  }
  #deckNowPlaying .deck-deck-thumb-col--live .deck-slot-label {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: start;
    margin: 0;
    padding: 0;
    width: auto;
    position: static;
    transform: none;
    white-space: nowrap;
  }
  #deckNowPlaying .deck-deck-thumb-col--live .deck-artist-thumb,
  #deckNowPlaying .deck-artist-thumb--live {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    align-self: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
  }
  #deckNowPlaying .deck-live-right {
    display: contents;
  }
  #deckNowPlaying .deck-live-right::before {
    display: none;
  }
  #deckNowPlaying .deck-section-row.deck-section-row--live-details {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
    width: 100%;
    min-width: 0;
  }
  #deckNowPlaying .deck-live-right > .deck-waveform2-container--inline {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    margin-top: 0;
    margin-bottom: 0;
  }
  /* Waveform off: stack label+thumb in col 1, centred beside track row */
  #deckNowPlaying.deck-now--waveform-off .deck-live-layout,
  #deckNowPlaying.deck-now--home-no-waveforms .deck-live-layout {
    grid-template-rows: auto;
    align-items: center;
  }
  #deckNowPlaying.deck-now--waveform-off .deck-deck-thumb-col--live,
  #deckNowPlaying.deck-now--home-no-waveforms .deck-deck-thumb-col--live {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1;
    grid-row: 1;
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    flex: 0 0 52px;
    height: auto;
    min-height: 0;
    align-self: center;
    position: static;
  }
  #deckNowPlaying.deck-now--waveform-off .deck-deck-thumb-col--live .deck-slot-label,
  #deckNowPlaying.deck-now--home-no-waveforms .deck-deck-thumb-col--live .deck-slot-label {
    margin: 0 0 4px;
  }
  #deckNowPlaying.deck-now--waveform-off .deck-deck-thumb-col--live .deck-artist-thumb,
  #deckNowPlaying.deck-now--waveform-off .deck-artist-thumb--live,
  #deckNowPlaying.deck-now--home-no-waveforms .deck-deck-thumb-col--live .deck-artist-thumb,
  #deckNowPlaying.deck-now--home-no-waveforms .deck-artist-thumb--live {
    grid-column: auto;
    grid-row: auto;
  }
  #deckNowPlaying.deck-now--waveform-off .deck-section--live,
  #deckNowPlaying.deck-now--home-no-waveforms .deck-section--live {
    padding: 6px 8px;
    overflow: visible;
  }
  .station-main .deck-grid .deck-section--live .deck-metrics {
    display: flex !important;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
  }
  .station-main .deck-grid .deck-section--live .deck-metrics > *:not(.deck-metric-last-wrap) {
    display: none !important;
  }
  .station-main .deck-grid .deck-section--upnext .deck-queue-slot:not(.deck-queue-slot--empty) .deck-metrics {
    display: flex !important;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
  }
  .station-main .deck-grid .deck-section--upnext .deck-queue-slot .deck-metrics > *:not(.deck-metric-last-wrap) {
    display: none !important;
  }
  .station-main .deck-grid .deck-section {
    padding: 6px 8px;
  }
  body.theme-light .station-sidebar,
  body.theme-light .station-layout.menu-open .station-sidebar {
    border-right: none;
  }
  /* Current programming: stacked full-width chips; hide long values; Switch at bottom */
  #deckLiveModeBox.deck-live-mode-box.status-item {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  #deckLiveModeBox .deck-live-mode-copy,
  #deckLiveModeBox .deck-live-mode-line {
    width: 100%;
    min-width: 0;
  }
  #deckLiveModeBox .deck-live-mode-line {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  #deckLiveModeBox .deck-live-mode-heading {
    text-align: center;
  }
  #deckLiveModeBox .deck-live-mode-chips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }
  /* Progression + ident on one row when both visible */
  #deckLiveModeBox .deck-live-mode-chips:has(.deck-live-mode-chip--progression:not([hidden])):has(.deck-live-mode-chip--ident:not([hidden])) {
    grid-template-columns: 1fr 1fr;
  }
  #deckLiveModeBox .deck-live-mode-chip:not([hidden]) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
  }
  #deckLiveModeBox .deck-live-mode-chip-label,
  #deckLiveModeBox .deck-live-mode-chip-time,
  #deckLiveModeBox .deck-live-mode-chip-value,
  #deckLiveModeBox .deck-live-mode-chip-prefix {
    text-align: center;
  }
  #deckLiveModeBox .deck-live-mode-chip--profile:not([hidden]),
  #deckLiveModeBox .deck-live-mode-chip--scheduler:not([hidden]) {
    grid-column: 1 / -1;
  }
  #deckLiveModeBox .deck-live-mode-chip-value {
    display: none !important;
  }
  #deckLiveModeBox .deck-live-mode-chip--profile .deck-live-mode-chip-value,
  #deckLiveModeBox .deck-live-mode-chip--scheduler .deck-live-mode-chip-value {
    display: inline !important;
    flex: 0 1 auto;
    min-width: 0;
    max-width: none;
    text-align: center;
  }
  #deckLiveModeBox .deck-live-mode-controls {
    width: 100%;
    margin-left: 0;
    flex-shrink: 0;
  }
  #deckLiveModeBox .deck-live-mode-controls .btn.deck-live-mode-change-btn {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* Collapsed home: mini profile type reads as inline label, not Editor gradient pill */
  #deckLiveModeBox .deck-live-mode-profile-type-mini.playlist-profile-type-pill,
  #deckLiveModeBox .deck-live-mode-profile-type-mini.playlist-profile-type-pill[data-mode] {
    background: transparent;
    border-color: transparent;
    color: #e8f0fa;
    box-shadow: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    border-radius: 0;
  }
  body.theme-light #deckLiveModeBox .deck-live-mode-profile-type-mini.playlist-profile-type-pill,
  body.theme-light #deckLiveModeBox .deck-live-mode-profile-type-mini.playlist-profile-type-pill[data-mode] {
    background: transparent;
    border-color: transparent;
    color: #0f172a;
    box-shadow: none;
  }
  /* Deck home history (graph + mini table): hidden in drawer layout; use full Track History panel */
  #deckHistory {
    display: none !important;
  }
}

/* ===== Dark theme: borderless outer panel shell only (inner .card boxes keep chrome) ===== */
.station-main .panel {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
#panel-playback.panel {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

/* Sidebar active affordance (keep original padding for hover/selected box size). */
.sidebar-item.active .sidebar-label {
  font-size: 16.5px;
}

/* Live track should dominate visual hierarchy. */
#deckNowPlaying .deck-track-info .deck-artist {
  font-size: 20px;
  font-weight: 700;
  color: #eaf6ff;
}
#deckNowPlaying .deck-track-info .deck-track {
  font-size: 14px;
  color: #b4d2ea;
}

/* Mobile: tighter padding + smaller artist/track text */
@media (max-width: 640px) {
  .station-main {
    padding-left: 10px;
    padding-right: 10px;
  }
  .station-main .panel {
    padding: 10px;
  }
  #panel-playback.panel {
    padding: 16px 10px 12px;
  }
  #panel-playback .deck-grid {
    gap: 18px;
  }
  #panel-playback #deckNowPlaying.deck-card {
    gap: 18px;
  }
  #panel-playback .deck-section-group {
    gap: 18px;
  }
  .station-main .deck-grid .deck-section {
    padding: 6px 6px;
  }
  #deckNowPlaying .deck-track-info .deck-artist {
    font-size: 14px;
  }
  #deckNowPlaying .deck-track-info .deck-track {
    font-size: 11px;
  }
  .station-main .deck-grid .deck-artist {
    font-size: 11px;
  }
  .station-main .deck-grid .deck-track {
    font-size: 10px;
  }
}


/* Deck metric badges: no box styling; harmonic colors on Key only. */
.station-main .deck-grid .deck-metrics .metric-badge .metric-label {
  color: #8ca0b9;
}

/* Strong button hierarchy on deck controls. */
.badge-button#playNextBtn {
  border-color: rgba(92, 255, 164, 0.7);
  background: linear-gradient(135deg, #1bbf72, #14985a);
  color: #041a0f;
  box-shadow: 0 8px 18px rgba(27, 191, 114, 0.35);
}
.badge-button#playNextBtn:hover,
.badge-button#playNextBtn:focus-visible {
  background: linear-gradient(135deg, #22d183, #18aa66);
  border-color: rgba(126, 255, 189, 0.95);
  color: #03140c;
}
.badge-button#blockCurrentBtn,
.badge-button#blockQueuedBtn {
  border-color: rgba(255, 118, 118, 0.65);
  background: linear-gradient(135deg, #4b1f28, #6e2430);
  color: #ffd9d9;
  box-shadow: 0 8px 16px rgba(156, 43, 60, 0.25);
}
.badge-button#blockCurrentBtn:hover,
.badge-button#blockCurrentBtn:focus-visible,
.badge-button#blockQueuedBtn:hover,
.badge-button#blockQueuedBtn:focus-visible {
  background: linear-gradient(135deg, #6f2a37, #963446);
  border-color: rgba(255, 150, 150, 0.85);
  color: #fff2f2;
}

/* Status header feel with clearer grouping and live pips. */
.deck-status-bar .status-item {
  gap: 9px;
}
.status-dot {
  width: 11px;
  height: 11px;
}
.status-dot--on {
  animation: deck-status-live-pulse 1.8s ease-in-out infinite;
}
.status-dot--off {
  animation: none;
}
@keyframes deck-status-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(111, 231, 161, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(111, 231, 161, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 231, 161, 0); }
}

/* Light theme: status chips (non–live-mode); Current programming matches deck-section boxes */
body.theme-light .deck-status-bar .status-item {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.9));
}
body.theme-light .deck-status-stack .deck-live-mode-box.status-item {
  border: 1px solid hsl(0 0% 89.8%);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
/* DECK REWRITE: deck-section handles both themes; light colors in base .deck-section rule */
body.theme-light #deckNowPlaying .deck-track-info .deck-artist {
  color: #0f172a;
}
body.theme-light .deck-track-badge--tempo,
body.theme-light .deck-track-badge--beatmix {
  background: #fef9c3;
  color: #0a0a0a;
  border-color: rgba(180, 170, 0, 0.4);
}
body.theme-light #deckNowPlaying .deck-track-info .deck-track {
  color: #334155;
}

/* ===== Permission lock indicator =====
   Applied by assets/js/gravy-permissions.js when a user lacks a feature.
   .is-locked            -> disabled/greyed with a padlock glyph
   .is-readonly-locked   -> readable but non-editable, still shows the glyph */
.is-locked {
  position: relative;
  opacity: 0.55;
  filter: saturate(0.55);
  cursor: not-allowed !important;
  padding-right: 18px;
}
.is-locked::after {
  content: "\01F512";
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  font-size: 11px;
  line-height: 1;
  opacity: 0.85;
  pointer-events: none;
  z-index: 2;
}
.is-locked.is-readonly-locked {
  opacity: 0.85;
  filter: none;
}
.is-locked input,
.is-locked select,
.is-locked textarea,
.is-locked button {
  pointer-events: none;
}
body.theme-light .is-locked {
  filter: saturate(0.6);
}

/* Extra breathing room between tab text and the padlock glyph */
.playlist-tab.is-locked {
  padding-right: 28px;
}
.playlist-tab.is-locked::after {
  right: 8px;
}

/* Crate builder: search row actions = Add + ⋮ (same pattern as Track Search) */
#crateSearchResults .track-search-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

#panel-crates .track-search-hthumb,
#panel-crates .track-search-item .th-thumb {
  flex-shrink: 0;
  width: 28px;
}
#panel-crates .track-search-item .th-thumb {
  display: flex;
  justify-content: center;
}
#panel-crates .track-search-item .track-history-artist-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

/* Crate draft list: reorder drop indicator (shown while dragging a row) */
#crateDraftTracks {
  position: relative;
}
#crateDraftTracks .crate-draft-drop-line {
  display: none;
  position: absolute;
  left: 8px;
  right: 8px;
  height: 4px;
  margin-top: 0;
  border-radius: 2px;
  pointer-events: none;
  z-index: 12;
  transform: translateY(-50%);
  background: var(--accent, #4fc3f7);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 1px 4px rgba(79, 195, 247, 0.45);
}
body.theme-light #crateDraftTracks .crate-draft-drop-line {
  background: hsl(221 83% 52%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 1px 4px rgba(37, 99, 235, 0.35);
}

/* Crate draft: narrow column for ☰ grip (matches header .track-search-hdrag) */
#crateDraftTracks .track-search-hdrag {
  width: 22px;
  flex-shrink: 0;
}

/* Crate draft: cumulative playlist start time (after play column) */
#crateDraftTracks .track-search-hoffset,
#crateDraftTracks .track-search-offset {
  flex-shrink: 0;
  min-width: 54px;
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#crateDraftTracks .track-search-offset {
  color: #8ca0b9;
}
body.theme-light #crateDraftTracks .track-search-offset {
  color: #5a6a7d;
}

/* Crate builder draft list: align with Track Search grid; remove + ⋮ share one column */
#crateDraftTracks .track-search-hactions {
  min-width: 120px;
  text-align: right;
}
#crateDraftTracks .crate-draft-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
#crateDraftTracks .crate-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  cursor: grab;
  user-select: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1;
}
body.theme-light #crateDraftTracks .crate-drag-handle {
  color: #737373;
}
#crateDraftTracks .crate-draft-row:active .crate-drag-handle {
  cursor: grabbing;
}
body.theme-light #crateDraftTracks .crate-draft-row:active .crate-drag-handle {
  color: #525252;
}

/* Floating preview during drag — matches row width / height via JS setDragImage */
.track-search-item.crate-draft-drag-ghost {
  opacity: 0.96;
  border-radius: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.22),
    0 12px 28px rgba(0, 0, 0, 0.38);
  background: rgba(22, 26, 34, 0.98);
}
body.theme-light .track-search-item.crate-draft-drag-ghost {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.18);
}

/* Crates panel — toolbar + list actions: same metrics as Track Pools (pool-btn + profile type) */
#panel-crates .playlist-profile-editor-row > .playlist-profile-select {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 20rem;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
#panel-crates .crates-editor-actions {
  gap: 0;
}
#panel-crates .crates-editor-actions .playlist-profile-icon-btn {
  width: 30px;
  height: 30px;
}
#panel-crates .crates-builder-bar > .playlist-profile-btn {
  border-left: 1px solid rgba(80, 140, 210, 0.28);
  min-height: 30px;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
}
#panel-crates .crates-builder-bar .playlist-profile-btn,
#panel-crates .track-search-actions .playlist-profile-btn {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin: 0;
  min-height: 28px;
  box-sizing: border-box;
}
#panel-crates .crates-builder-bar .btn {
  margin: 0;
}
#panel-crates .crate-builder-search-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 0.65rem;
}
#panel-crates .crate-builder-search-bar .track-search-input-wrap {
  flex: 1 1 12rem;
  min-width: 0;
}
#panel-crates .crate-draft-add-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0 auto;
  padding: 0;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.75);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
#panel-crates .crate-draft-add-to-top .crate-draft-add-to-top-switch.switch {
  flex-shrink: 0;
  margin: 0;
  vertical-align: middle;
  align-self: center;
}
#panel-crates .crate-draft-add-to-top-text {
  margin: 0;
  line-height: 1.25;
  max-width: 12rem;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}
body.theme-light #panel-crates .crate-draft-add-to-top {
  color: rgba(10, 10, 10, 0.65);
}
body.theme-light #panel-crates .playlist-profile-editor-row > .playlist-profile-select {
  color: #0a0a0a;
}

/* Crates panel — search + crate list in settings box */
.crate-builder-search-bar {
  margin-top: 0;
}
#panel-crates .crate-builder-search-body.track-search-body {
  padding: 0;
  margin: 0 0 12px;
  gap: 0;
  min-width: 0;
}
/* Crate builder search hits: strip track-search panel chrome (no big grey box) */
#panel-crates #crateSearchResults.track-search-results {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  max-height: min(50vh, 420px);
  min-width: 0;
  scrollbar-color: rgba(120, 120, 120, 0.5) transparent;
}
#panel-crates #crateSearchResults.track-search-results::-webkit-scrollbar-track {
  background: transparent;
}
#panel-crates #crateSearchResults.track-search-results::-webkit-scrollbar-thumb {
  background: rgba(120, 120, 120, 0.45);
  border-radius: 4px;
}
#panel-crates #crateSearchResults .track-search-header {
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.theme-light #panel-crates #crateSearchResults.track-search-results {
  background: transparent;
  border: none;
  scrollbar-color: rgba(100, 100, 100, 0.45) transparent;
}
body.theme-light #panel-crates #crateSearchResults.track-search-results::-webkit-scrollbar-thumb {
  background: rgba(100, 100, 100, 0.4);
}
body.theme-light #panel-crates #crateSearchResults .track-search-header {
  background: transparent;
  border-bottom-color: hsl(0 0% 92%);
}
#panel-crates .crate-draft-heading {
  margin: 0.75rem 0 0.55rem;
}
.crate-draft-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
}
.crate-draft-heading-left {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  min-width: 0;
  flex: 1 1 auto;
}
#panel-crates .crate-add-ident-btn {
  flex: 0 0 auto;
  align-self: center;
}
.crate-draft-heading-title {
  flex: 0 0 auto;
}
.crate-draft-playtime-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.88em;
  font-weight: 500;
}
.crate-draft-playtime-muted {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
}
body.theme-light .crate-draft-playtime-muted {
  color: #737373;
}
.crate-draft-playtime-total {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.88);
}
body.theme-light .crate-draft-playtime-total {
  color: #171717;
}
#crateDraftTracks .crate-draft-meta--ident {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
#crateDraftTracks .crate-ident-kind-label {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.82;
  white-space: nowrap;
  flex-shrink: 0;
  color: rgba(200, 214, 229, 0.95);
}
body.theme-light #crateDraftTracks .crate-ident-kind-label {
  color: hsl(0 0% 32%);
  opacity: 0.9;
}
#crateDraftTracks .crate-draft-ident-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-search-play--ident-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.28);
}
body.theme-light .track-search-play--ident-placeholder {
  border-color: hsl(0 0% 82%);
  color: hsl(0 0% 72%);
}
#crateDraftTracks .crate-draft-row--ident .track-search-bpm,
#crateDraftTracks .crate-draft-row--ident .track-search-key,
#crateDraftTracks .crate-draft-row--ident .track-search-dur {
  color: rgba(255, 255, 255, 0.38);
}
body.theme-light #crateDraftTracks .crate-draft-row--ident .track-search-bpm,
body.theme-light #crateDraftTracks .crate-draft-row--ident .track-search-key,
body.theme-light #crateDraftTracks .crate-draft-row--ident .track-search-dur {
  color: hsl(0 0% 72%);
}

.pool-name-modal-content--crate-ident-picker {
  box-sizing: border-box;
  width: min(520px, 92vw);
  height: min(420px, 72vh);
  max-width: 520px;
  min-width: 320px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pool-name-modal-content--crate-ident-picker > .pool-name-modal-title {
  flex-shrink: 0;
}
.pool-name-modal-content--crate-ident-picker > .crate-ident-picker-hint {
  flex-shrink: 0;
}
.pool-name-modal-content--crate-ident-picker > .pool-name-modal-btns {
  flex-shrink: 0;
  margin-top: 12px;
}
.pool-name-modal-content--crate-ident-picker > .crate-ident-picker-split {
  flex: 1 1 auto;
  min-height: 0;
}
.crate-ident-picker-hint {
  margin: 0 0 0.5rem;
  font-size: 12px;
}
.crate-ident-picker-split {
  display: flex;
  gap: 10px;
  align-items: stretch;
  min-height: 0;
}
.crate-ident-picker-categories {
  flex: 0 0 42%;
  max-width: 220px;
  min-width: 130px;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 16, 28, 0.55);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.theme-light .crate-ident-picker-categories {
  border-color: hsl(0 0% 90%);
  background: hsl(0 0% 99%);
}
.crate-ident-picker-category {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 12px;
  line-height: 1.25;
  background: transparent;
  color: inherit;
}
.crate-ident-picker-category:hover {
  border-color: rgba(80, 140, 210, 0.35);
  background: rgba(41, 121, 255, 0.1);
}
.crate-ident-picker-category.is-active {
  border-color: rgba(80, 140, 210, 0.55);
  background: rgba(41, 121, 255, 0.18);
  font-weight: 600;
}
body.theme-light .crate-ident-picker-category:hover {
  background: hsl(0 0% 96%);
  border-color: hsl(220 70% 90%);
}
body.theme-light .crate-ident-picker-category.is-active {
  background: hsl(220 80% 94%);
  border-color: hsl(220 60% 80%);
}
.crate-ident-picker-pane-idents {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.crate-ident-picker-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 16, 28, 0.55);
}
body.theme-light .crate-ident-picker-list {
  border-color: hsl(0 0% 90%);
  background: hsl(0 0% 99%);
}
.crate-ident-picker-loading {
  margin: 0;
  padding: 0.5rem 0.25rem;
  font-size: 12px;
}
.crate-ident-picker-empty {
  position: absolute;
  inset: 0;
  margin: 0 !important;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-size: 12px;
  pointer-events: none;
}
.crate-ident-picker-empty:not([hidden]) {
  display: flex;
}
.crate-ident-picker-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0 0 4px;
}
.crate-ident-picker-row:last-child {
  margin-bottom: 0;
}
.imaging-browse-row.is-highlighted {
  background: rgba(90, 142, 210, 0.22);
  border-radius: 6px;
}
body.theme-light .imaging-browse-row.is-highlighted {
  background: rgba(37, 99, 235, 0.12);
}
.crate-ident-picker-preview {
  flex-shrink: 0;
}
.crate-ident-picker-item {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding: 8px 10px;
  margin: 0;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 13px;
  background: transparent;
  color: inherit;
}
.crate-ident-picker-line {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crate-ident-picker-item:hover {
  border-color: rgba(80, 140, 210, 0.35);
  background: rgba(41, 121, 255, 0.1);
}
body.theme-light .crate-ident-picker-item:hover {
  background: hsl(0 0% 96%);
  border-color: hsl(220 70% 90%);
}

/* Generic imaging picker modal (profile idents, future callers) */
.pool-name-modal-content--imaging-picker {
  box-sizing: border-box;
  width: min(520px, 92vw);
  height: min(460px, 78vh);
  max-width: 520px;
  min-width: 0;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pool-name-modal-content--imaging-picker > .pool-name-modal-title,
.pool-name-modal-content--imaging-picker > .imaging-picker-hint,
.pool-name-modal-content--imaging-picker > .imaging-picker-category-row,
.pool-name-modal-content--imaging-picker > .pool-name-modal-btns {
  flex-shrink: 0;
}
.pool-name-modal-content--imaging-picker > .imaging-picker-hint[hidden],
.pool-name-modal-content--imaging-picker > .imaging-picker-category-row[hidden] {
  display: none !important;
}
.pool-name-modal-content--imaging-picker > .imaging-picker-pane {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.imaging-picker-category-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}
.imaging-picker-category-label {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}
.imaging-picker-category-select {
  flex: 1 1 auto;
  min-width: 0;
}
.imaging-picker-list {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 16, 28, 0.55);
}
body.theme-light .imaging-picker-list {
  border-color: hsl(0 0% 90%);
  background: hsl(0 0% 99%);
}
.imaging-picker-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  width: 100%;
  box-sizing: border-box;
}
.imaging-picker-row + .imaging-picker-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
body.theme-light .imaging-picker-row + .imaging-picker-row {
  border-top-color: hsl(0 0% 92%);
}
.imaging-picker-check-wrap {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.imaging-picker-check {
  margin: 0;
  cursor: pointer;
}
.imaging-picker-preview {
  flex-shrink: 0;
}
.imaging-picker-line {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.imaging-picker-edit {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.imaging-picker-loading {
  padding: 8px 10px;
}
.imaging-picker-empty {
  margin: 8px 0 0;
  font-size: 12px;
}
.idents-selected-badges {
  min-height: 28px;
}
.idents-pool-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.idents-pool-summary-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  cursor: default;
  user-select: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.idents-pool-summary-tag--overflow {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.62);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  background: transparent;
}
.idents-pool-summary-tag--missing {
  border-color: rgba(220, 120, 80, 0.45);
  background: rgba(180, 80, 40, 0.12);
  color: rgba(255, 200, 170, 0.95);
}
body.theme-light .idents-pool-summary-tag {
  border-color: hsl(0 0% 86%);
  background: hsl(0 0% 96%);
  color: hsl(0 0% 22%);
}
body.theme-light .idents-pool-summary-tag--overflow {
  color: hsl(0 0% 42%);
  border-color: hsl(0 0% 78%);
  background: hsl(0 0% 99%);
}
body.theme-light .idents-pool-summary-tag--missing {
  border-color: hsl(25 70% 78%);
  background: hsl(25 80% 96%);
  color: hsl(25 50% 32%);
}
.idents-pool-empty {
  margin: 0;
  font-size: 12px;
}

.pool-name-modal-content--crate-import {
  min-width: 360px;
  max-width: 440px;
}
.pool-name-modal-content--crate-import .crate-import-modal-hint {
  margin: 0 0 10px;
  font-size: 12px;
}
.pool-name-modal-content--crate-import .form-label {
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 12px;
}
.pool-name-modal-content--crate-import .crate-import-file-label {
  margin-top: 12px;
}
.pool-name-modal-content--crate-import .crate-import-status-line {
  margin: 8px 0 0;
  min-height: 1.2em;
}
#panel-crates .crate-fetch-status,
#panel-crates .crate-save-status-line {
  margin: 0 0 8px;
  min-height: 0;
}
#panel-crates .crate-fetch-status[hidden],
#panel-crates .crate-save-status-line:empty {
  display: none;
  margin: 0;
}

/* Pool editor — grid: divider runs Pool preview → Filter / Results */
#panel-track-pools-manager .track-pools-editor-settings-box.pool-editor-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}
#panel-track-pools-manager .pool-editor-layout-grid {
  --pool-editor-sidebar-width: clamp(200px, 28%, 280px);
  display: grid;
  grid-template-columns: var(--pool-editor-sidebar-width) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
#panel-track-pools-manager .pool-editor-box-header {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  margin: 0;
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(80, 140, 210, 0.28);
}
#panel-track-pools-manager .pool-editor-box-header-start {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
#panel-track-pools-manager .pool-filter-add-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pool-similar-overlay {
  align-items: center;
  justify-content: center;
}
.pool-similar-overlay .pool-similar-modal-dialog {
  width: 680px;
  max-width: calc(100vw - 2rem);
  height: 520px;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.pool-similar-overlay .modal-dialog__header {
  flex: 0 0 auto;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(80, 140, 210, 0.18);
}
.pool-similar-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.pool-similar-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  flex: 1 1 auto;
  padding: 1rem 1.25rem 1.25rem;
  overflow: hidden;
}
.pool-similar-modal-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 180px) minmax(72px, 88px);
  gap: 0.75rem;
  align-items: end;
  flex: 0 0 auto;
}
.pool-similar-search-wrap {
  width: 100%;
}
.pool-similar-preset-wrap .form-label,
.pool-similar-limit-wrap .form-label {
  margin-bottom: 0.25rem;
}
.pool-similar-search-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(80, 140, 210, 0.18);
  border-radius: 8px;
}
.pool-similar-search-results .track-search-header,
.pool-similar-search-item {
  grid-template-columns: minmax(0, 1fr) 52px 52px 52px 72px;
}
body.theme-light #poolSimilarOverlay .track-search-icon {
  color: #737373;
}
body.theme-light #poolSimilarOverlay .track-search-input {
  background: #ffffff;
  border: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a !important;
  box-shadow: none;
}
body.theme-light #poolSimilarOverlay .track-search-input::placeholder {
  color: #737373;
}
body.theme-light #poolSimilarOverlay .track-search-input:focus {
  border-color: hsl(221 83% 53%);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
body.theme-light #poolSimilarOverlay .modal-dialog__header {
  border-bottom-color: hsl(0 0% 89.8%);
}
body.theme-light #poolSimilarOverlay .pool-similar-search-results {
  border-color: hsl(0 0% 89.8%);
  background: #ffffff;
}
@media (max-width: 640px) {
  .pool-similar-overlay .pool-similar-modal-dialog {
    width: calc(100vw - 1.5rem);
    height: min(520px, calc(100vh - 1.5rem));
  }
  .pool-similar-modal-controls {
    grid-template-columns: 1fr;
  }
}
#panel-track-pools-manager .pool-filter-add-btn.playlist-profile-type-pill {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 6px 12px;
  min-height: 30px;
  border-radius: 8px;
  text-transform: none;
  letter-spacing: normal;
  max-width: none;
  box-shadow: none;
  cursor: pointer;
  background: rgba(14, 28, 46, 0.95);
  color: #9fb3cc;
  border-color: rgba(80, 140, 210, 0.28);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
#panel-track-pools-manager .pool-filter-add-btn.playlist-profile-type-pill:hover {
  background: rgba(22, 40, 64, 0.98);
  border-color: rgba(100, 155, 220, 0.42);
  color: #c5d6ea;
}
#panel-track-pools-manager .pool-filter-add-btn.playlist-profile-type-pill:active {
  background: rgba(10, 22, 38, 0.98);
}
#panel-track-pools-manager .pool-filter-add-btn:focus-visible {
  outline: 2px solid rgba(74, 158, 255, 0.8);
  outline-offset: 2px;
}
body.theme-light #panel-track-pools-manager .pool-filter-add-btn.playlist-profile-type-pill {
  background: #f0f0f0;
  color: #64748b;
  border-color: hsl(0 0% 89.8%);
}
body.theme-light #panel-track-pools-manager .pool-filter-add-btn.playlist-profile-type-pill:hover {
  background: #e8e8e8;
  border-color: hsl(0 0% 82%);
  color: #334155;
}
.pool-filter-popover {
  position: fixed;
  z-index: 12050;
  margin: 0;
  padding: 0;
}
.pool-filter-popover-panel {
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 520px);
  border: 1px solid rgba(80, 140, 210, 0.45);
  border-radius: 8px;
  background: #1a2433;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.pool-filter-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(80, 140, 210, 0.28);
}
.pool-filter-popover-title {
  font-size: 13px;
  font-weight: 600;
  color: #e8f2ff;
}
.pool-filter-popover-close {
  border: none;
  background: transparent;
  color: rgba(200, 215, 235, 0.9);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.pool-filter-popover-close:hover { color: #fff; }
.pool-filter-popover-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}
.pool-filter-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(80, 140, 210, 0.28);
}
.pool-filter-popover-select {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: none;
}
.pool-filter-section-label {
  display: block;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(170, 190, 215, 0.9);
}
.pool-genre-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}
.pool-genre-mode-row .pool-filter-section-label {
  margin: 0;
  flex: 0 0 auto;
}
.pool-genre-mode-toggle {
  flex: 0 0 auto;
}
body.theme-light #panel-track-pools-manager .pool-view-toggle {
  border-color: hsl(0 0% 82%);
}
body.theme-light #panel-track-pools-manager .pool-view-toggle-btn.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: #1e40af;
}
.pool-genre-subs-list {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(80, 140, 210, 0.22);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.15);
}
.pool-genre-sub-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  font-size: 12px;
}
.pool-mood-tags-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 8px;
}
.pool-mood-match-all {
  font-size: 11px;
  margin: 0;
  white-space: nowrap;
}
.pool-mood-tags-table { margin-top: 4px; }
.pool-mood-tag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  gap: 6px 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(80, 140, 210, 0.12);
}
.pool-mood-tag-row:last-child { border-bottom: none; }
.pool-mood-tag-label {
  font-size: 12px;
  color: #e8eef5;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pool-mood-band {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 11px;
  white-space: nowrap;
}
.pool-active-filters-empty {
  margin: 12px 0;
  line-height: 1.45;
}
.pool-active-filters-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pool-active-filter-pill {
  display: flex;
  align-items: stretch;
  min-height: 32px;
  border: 1px solid rgba(80, 140, 210, 0.28);
  border-radius: 8px;
  background: rgba(14, 28, 46, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.pool-active-filter-pill[data-filter-kind="genre"] {
  background: linear-gradient(135deg, rgba(179, 136, 255, 0.42), rgba(124, 77, 255, 0.52));
  border-color: rgba(179, 136, 255, 0.45);
}
.pool-active-filter-pill[data-filter-kind="mood"] {
  background: linear-gradient(135deg, rgba(244, 143, 177, 0.42), rgba(233, 30, 140, 0.48));
  border-color: rgba(244, 143, 177, 0.45);
}
.pool-active-filter-pill[data-filter-kind="theme"] {
  background: linear-gradient(135deg, rgba(129, 199, 132, 0.42), rgba(46, 125, 50, 0.5));
  border-color: rgba(129, 199, 132, 0.5);
}
.pool-active-filter-pill[data-filter-kind="energy"] {
  background: linear-gradient(135deg, rgba(255, 212, 92, 0.45), rgba(240, 165, 0, 0.52));
  border-color: rgba(255, 212, 92, 0.5);
}
.pool-active-filter-pill[data-filter-kind="dance"] {
  background: linear-gradient(135deg, rgba(77, 208, 225, 0.4), rgba(0, 151, 167, 0.5));
  border-color: rgba(77, 208, 225, 0.45);
}
.pool-active-filter-pill[data-filter-kind="bpm"] {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.42), rgba(198, 40, 40, 0.5));
  border-color: rgba(255, 107, 107, 0.45);
}
.pool-active-filter-pill[data-filter-kind="upload"] {
  background: linear-gradient(135deg, rgba(37, 193, 117, 0.42), rgba(26, 143, 84, 0.5));
  border-color: rgba(37, 193, 117, 0.45);
}
.pool-active-filter-pill-label {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pool-active-filter-pill-label:hover {
  background: rgba(255, 255, 255, 0.1);
}
.pool-active-filter-pill-remove {
  flex: 0 0 28px;
  width: 28px;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.pool-active-filter-pill-remove:hover {
  background: rgba(220, 60, 60, 0.18);
  color: #ffb4b4;
}
.pool-active-filters-clear {
  margin-top: 10px;
  width: 100%;
}
.pool-active-filters-hint {
  margin: 10px 0 0;
  font-size: 11px;
}
body.theme-light .pool-filter-popover-panel {
  background: #fff;
  border-color: hsl(0 0% 85%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}
body.theme-light .pool-filter-popover-head,
body.theme-light .pool-filter-popover-actions {
  border-color: hsl(0 0% 90%);
}
body.theme-light .pool-filter-popover-title { color: #0f172a; }
body.theme-light .pool-filter-popover-close { color: #64748b; }
body.theme-light .pool-filter-popover-close:hover { color: #0f172a; }
body.theme-light .pool-filter-section-label { color: #64748b; }
body.theme-light .pool-genre-subs-list {
  border-color: hsl(0 0% 88%);
  background: #f8fafc;
}
body.theme-light .pool-mood-tag-label { color: #1e293b; }
body.theme-light .pool-mood-tag-row { border-bottom-color: hsl(0 0% 92%); }
body.theme-light .pool-active-filter-pill[data-filter-kind="genre"] {
  background: linear-gradient(135deg, #ede7ff, #ddd0ff);
  border-color: rgba(124, 77, 255, 0.28);
}
body.theme-light .pool-active-filter-pill[data-filter-kind="mood"] {
  background: linear-gradient(135deg, #fce4ec, #f8bbd0);
  border-color: rgba(233, 30, 140, 0.22);
}
body.theme-light .pool-active-filter-pill[data-filter-kind="theme"] {
  background: linear-gradient(135deg, #e8f5e9, #a5d6a7);
  border-color: rgba(46, 125, 50, 0.28);
}
body.theme-light .pool-active-filter-pill[data-filter-kind="energy"] {
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  border-color: rgba(240, 165, 0, 0.28);
}
body.theme-light .pool-active-filter-pill[data-filter-kind="dance"] {
  background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
  border-color: rgba(0, 151, 167, 0.25);
}
body.theme-light .pool-active-filter-pill[data-filter-kind="bpm"] {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  border-color: rgba(198, 40, 40, 0.22);
}
body.theme-light .pool-active-filter-pill[data-filter-kind="upload"] {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-color: rgba(26, 143, 84, 0.25);
}
body.theme-light .pool-active-filter-pill-label { color: #1e293b; }
body.theme-light .pool-active-filter-pill-label:hover { background: rgba(255, 255, 255, 0.45); }
body.theme-light .pool-active-filter-pill-remove {
  border-left-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.35);
  color: #64748b;
}
body.theme-light .pool-active-filter-pill-remove:hover {
  background: #fee2e2;
  color: #b91c1c;
}
#panel-track-pools-manager .pool-preset-band,
#panel-track-pools-manager .pool-filter-popover-body .pool-bpm-band {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 12px;
}
#panel-track-pools-manager .pool-energy-bands,
#panel-track-pools-manager .pool-dance-bands,
#panel-track-pools-manager .pool-filter-popover-body .pool-bpm-bands {
  margin: 0 0 12px;
}
#panel-track-pools-manager .pool-filter-popover-body .pool-bpm-options--popover {
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
}
#panel-track-pools-manager .pool-upload-list {
  max-height: 240px;
  overflow-y: auto;
  margin: 0 0 12px;
}
#panel-track-pools-manager .pool-upload-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 12px;
}
body.theme-light #panel-track-pools-manager .pool-preset-band,
body.theme-light #panel-track-pools-manager .pool-filter-popover-body .pool-bpm-band {
  color: #171717;
}
#panel-track-pools-manager .pool-editor-filter-header {
  grid-column: 1;
  grid-row: 2;
  border-right: 1px solid rgba(80, 140, 210, 0.28);
}
#panel-track-pools-manager .pool-editor-results-header {
  grid-column: 2;
  grid-row: 2;
}
#panel-track-pools-manager .pool-editor-sidebar {
  grid-column: 1;
  grid-row: 3;
  flex: none;
  max-width: none;
  min-width: 0;
  width: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid rgba(80, 140, 210, 0.28);
  padding: 0;
}
#panel-track-pools-manager .pool-editor-results-wrap {
  grid-column: 2;
  grid-row: 3;
  flex: none;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-self: stretch;
}
#panel-track-pools-manager .pool-editor-box-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #e5f3ff;
  line-height: 1.25;
}
#panel-track-pools-manager .pool-editor-box-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
#panel-track-pools-manager .pool-editor-box-header .pool-results-count {
  margin-bottom: 0;
  padding: 0;
}
#panel-track-pools-manager .pool-editor-box-header .pool-results-duration-value {
  color: #4a9eff;
  font-weight: 700;
}
body.theme-light #panel-track-pools-manager .pool-editor-box-header .pool-results-duration-value {
  color: #2563eb;
}
body.theme-light #panel-track-pools-manager .pool-editor-box-header {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
body.theme-light #panel-track-pools-manager .pool-editor-filter-header,
body.theme-light #panel-track-pools-manager .pool-editor-sidebar {
  border-right-color: rgba(0, 0, 0, 0.1);
}
body.theme-light #panel-track-pools-manager .pool-editor-box-heading {
  color: #1a2a3a;
}
#panel-track-pools-manager .pool-editor-sidebar-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 12px 12px;
  box-sizing: border-box;
}
#panel-track-pools-manager .pool-editor-column-header {
  flex-shrink: 0;
  margin: 0;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(180, 195, 215, 0.85);
  border-bottom: 1px solid rgba(80, 140, 210, 0.2);
  background: rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
  border-radius: 0;
}
#panel-track-pools-manager .pool-track-results-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#panel-track-pools-manager .pool-track-search-results {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
}
#panel-track-pools-manager .pool-track-search-results.empty {
  display: flex;
}
#panel-track-pools-manager .pool-editor-results-header,
#panel-track-pools-manager .pool-track-search-item {
  display: grid;
  grid-template-columns: 28px 28px minmax(80px, 0.28fr) minmax(0, 1fr) minmax(72px, 0.28fr) 36px;
  column-gap: 8px;
  align-items: center;
  padding-left: 12px;
  padding-right: 12px;
}
#panel-track-pools-manager .pool-track-search-item .th-thumb,
#panel-track-pools-manager .pool-editor-results-header .track-search-hthumb {
  justify-self: center;
}
#panel-track-pools-manager .pool-track-search-item .track-history-artist-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
#panel-track-pools-manager .pool-editor-results-header .pool-track-sort-col {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#panel-track-pools-manager .pool-editor-results-header .pool-track-sort-col:hover {
  color: #c0d0e0;
}
#panel-track-pools-manager .pool-editor-results-header .pool-track-sort-col.is-sorted {
  font-weight: 700;
}
body.theme-light #panel-track-pools-manager .pool-editor-results-header .pool-track-sort-col:hover {
  color: #334155;
}
#panel-track-pools-manager .pool-editor-results-header {
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
#panel-track-pools-manager .pool-editor-results-header .track-search-hartist,
#panel-track-pools-manager .pool-editor-results-header .track-search-htitle,
#panel-track-pools-manager .pool-editor-results-header .track-search-hgenre {
  font-weight: 700;
}
#panel-track-pools-manager .pool-editor-results-header .pool-track-sort-col:not(.is-sorted) {
  font-weight: 500;
}
#panel-track-pools-manager .pool-track-search-item .track-search-play {
  border: none;
  border-radius: 0;
  background: transparent;
}
#panel-track-pools-manager .pool-track-search-item .track-search-play:hover,
#panel-track-pools-manager .pool-track-search-item .track-search-play.active {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(41, 121, 255, 0.2);
  color: #fff;
}
body.theme-light #panel-track-pools-manager .pool-track-search-item .track-search-play:hover,
body.theme-light #panel-track-pools-manager .pool-track-search-item .track-search-play.active {
  border-color: hsl(0 0% 85%);
  background: rgba(0, 0, 0, 0.06);
  color: #171717;
}
#panel-track-pools-manager .pool-track-search-item {
  padding-top: 7px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(80, 140, 210, 0.12);
}
#panel-track-pools-manager .pool-track-search-item:last-child {
  border-bottom: none;
}
#panel-track-pools-manager .pool-track-search-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
#panel-track-pools-manager .pool-track-search-item .track-search-artist,
#panel-track-pools-manager .pool-track-search-item .track-search-title,
#panel-track-pools-manager .pool-track-search-item .track-search-genre {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
#panel-track-pools-manager .pool-track-search-item .track-search-artist,
#panel-track-pools-manager .pool-editor-results-header .track-search-hartist {
  max-width: 170px;
}
#panel-track-pools-manager .pool-track-search-item .track-search-artist {
  color: #e8eef5;
}
#panel-track-pools-manager .pool-track-search-item .track-search-title {
  color: rgba(200, 210, 225, 0.92);
}
#panel-track-pools-manager .pool-track-search-item .track-search-genre {
  color: rgba(170, 185, 205, 0.88);
  font-size: 12px;
}
body.theme-light #panel-track-pools-manager .pool-editor-column-header,
body.theme-light #panel-track-pools-manager .pool-editor-results-header {
  color: #64748b;
  border-bottom-color: hsl(0 0% 89.8%);
  background: rgba(0, 0, 0, 0.04);
}
body.theme-light #panel-track-pools-manager .pool-track-search-results {
  background: transparent;
  border: none;
}
body.theme-light #panel-track-pools-manager .pool-track-search-item {
  border-bottom-color: hsl(0 0% 93%);
}
body.theme-light #panel-track-pools-manager .pool-track-search-item:hover {
  background: rgba(0, 0, 0, 0.03);
}
body.theme-light #panel-track-pools-manager .pool-track-search-item .track-search-artist {
  color: #171717;
}
body.theme-light #panel-track-pools-manager .pool-track-search-item .track-search-title {
  color: #334155;
}
body.theme-light #panel-track-pools-manager .pool-track-search-item .track-search-genre {
  color: #64748b;
}
#panel-track-pools-manager .pool-track-search-results .pool-results-loading,
#panel-track-pools-manager .pool-track-search-results .pool-results-empty,
#panel-track-pools-manager .pool-track-search-results .pool-error {
  padding: 12px;
}
.pool-sidebar-section { margin-bottom: 12px; }
.pool-sidebar-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}
.pool-sidebar-section-head .pool-sidebar-section-toggle {
  flex: 1 1 auto;
  min-width: 0;
}
.pool-sidebar-section-head--mood {
  justify-content: flex-start;
  gap: 0;
  padding-left: 2px;
}
.pool-sidebar-section-head--mood .pool-sidebar-section-toggle {
  flex: 0 1 auto;
  width: auto;
  padding-right: 0;
}
.pool-mood-bin-op {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding-left: 2px;
}
.pool-mood-bin-op-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(140, 160, 185, 0.75);
  white-space: nowrap;
  transition: color 0.15s ease;
}
.pool-mood-bin-op-label.is-active {
  color: rgba(220, 235, 255, 0.95);
}
#panel-track-pools-manager .pool-mood-bin-switch.switch {
  width: 34px;
  height: 18px;
  flex-shrink: 0;
}
#panel-track-pools-manager .pool-mood-bin-switch .switch-slider:before {
  height: 12px;
  width: 12px;
  left: 3px;
  top: 3px;
}
#panel-track-pools-manager .pool-mood-bin-switch input:checked + .switch-slider:before {
  transform: translateX(16px);
}
body.theme-light #panel-track-pools-manager .pool-mood-bin-op-label {
  color: #94a3b8;
}
body.theme-light #panel-track-pools-manager .pool-mood-bin-op-label.is-active {
  color: #1e293b;
}
.pool-sidebar-section-toggle {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: inherit;
  font-weight: 400;
  padding: 6px 0;
  cursor: pointer;
}
.pool-sidebar-section-body { padding: 4px 0 8px 4px; }
.pool-genre-tree { font-size: 13px; }
.pool-genre-parent-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  min-height: 22px;
}
.pool-genre-expand-btn,
.pool-genre-expand-spacer {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 10px;
  line-height: 20px;
  text-align: center;
}
.pool-genre-expand-spacer { display: inline-block; cursor: default; }
.pool-genre-parent-label { flex: 1; min-width: 0; margin: 0; }
.pool-genre-parent-label--text { flex: 1; font-weight: 400; }
.pool-genre-children {
  margin: 0 0 12px 24px;
  padding-left: 8px;
  border-left: 1px solid rgba(80, 140, 210, 0.2);
}
.pool-genre-children--collapsed {
  display: none;
}
.pool-genre-child {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 10px;
  font-size: 12px;
  line-height: 1.25;
  min-height: 20px;
}
#panel-track-pools-manager .pool-genre-child input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
  align-self: center;
}
#panel-track-pools-manager .pool-genre-parent-label {
  display: flex;
  align-items: center;
  gap: 6px;
}
#panel-track-pools-manager .pool-genre-parent-label input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
  align-self: center;
}
#panel-track-pools-manager .pool-genre-parent-label input[type="checkbox"]:indeterminate {
  border-color: #3bff88;
  background-color: rgba(59, 255, 136, 0.12);
}
#panel-track-pools-manager .pool-genre-parent-label input[type="checkbox"]:indeterminate::after {
  content: '\2212';
  opacity: 1;
  color: #3bff88;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
body.theme-light #panel-track-pools-manager .pool-genre-parent-label input[type="checkbox"]:indeterminate {
  border-color: #2e7d32;
  background-color: rgba(46, 125, 50, 0.1);
}
body.theme-light #panel-track-pools-manager .pool-genre-parent-label input[type="checkbox"]:indeterminate::after {
  color: #2e7d32;
}
#panel-track-pools-manager .pool-track-search-pagination {
  flex-shrink: 0;
  margin-top: 0;
  padding: 10px 0 4px;
  border-top: 1px solid rgba(80, 140, 210, 0.2);
}
body.theme-light #panel-track-pools-manager .pool-track-search-pagination {
  border-top-color: hsl(0 0% 89.8%);
}
.pool-count { opacity: 0.65; font-size: 0.9em; }
.pool-mood-hint { margin: 8px 0; font-size: 11px; }
#panel-track-pools-manager .pool-sidebar-section-body {
  font-size: 13px;
}
#panel-track-pools-manager .pool-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  min-height: 28px;
}
#panel-track-pools-manager .pool-field-label {
  flex: 0 0 100px;
  width: 100px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  color: #f0f0f0;
  line-height: 1.3;
  white-space: nowrap;
}
#panel-track-pools-manager .pool-preset-select,
#panel-track-pools-manager .pool-sidebar-section-body select.form-control {
  flex: 0 0 100px;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  margin: 0;
  padding: 4px 24px 4px 8px;
  font-size: 13px;
  line-height: 1.3;
  min-height: 0;
  height: 28px;
  box-sizing: border-box;
}
#panel-track-pools-manager #poolSidebarMood .pool-lmh-select {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
  padding-right: 20px;
}
#panel-track-pools-manager #poolSidebarMood .pool-lmh-select:hover {
  color: #fff;
}
#panel-track-pools-manager #poolSidebarMood .pool-lmh-select:focus-visible {
  outline: none;
  color: #fff;
}
body.theme-light #panel-track-pools-manager #poolSidebarMood .pool-lmh-select:hover,
body.theme-light #panel-track-pools-manager #poolSidebarMood .pool-lmh-select:focus-visible {
  color: #0f172a;
}
#panel-track-pools-manager .pool-field-row--stacked {
  margin-bottom: 4px;
}
#panel-track-pools-manager .pool-bpm-bands {
  margin: 0 0 10px 0;
  padding-left: 0;
}
#panel-track-pools-manager .pool-bpm-band {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 6px;
  font-size: 12px;
  font-weight: 400;
  color: #f0f0f0;
}
#panel-track-pools-manager .pool-bpm-band input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
}
body.theme-light #panel-track-pools-manager .pool-bpm-band {
  color: #171717;
}
#panel-track-pools-manager .pool-genre-parent-label,
#panel-track-pools-manager .pool-genre-parent-label--text {
  font-size: 13px;
  font-weight: 400;
  color: #f0f0f0;
}
body.theme-light #panel-track-pools-manager .pool-field-label,
body.theme-light #panel-track-pools-manager .pool-sidebar-checkbox,
body.theme-light #panel-track-pools-manager .pool-genre-parent-label,
body.theme-light #panel-track-pools-manager .pool-genre-parent-label--text {
  color: #171717;
}
body.theme-light #panel-track-pools-manager .pool-editor-sidebar {
  border-right-color: hsl(0 0% 89.8%);
}

/* Pool mood field — custom hover help (fixed popup, not native title) */
#panel-track-pools-manager .pool-mood-tip-text {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  cursor: help;
  border-radius: 4px;
  outline: none;
}
#panel-track-pools-manager .pool-mood-tip-text:hover,
#panel-track-pools-manager .pool-mood-tip-text:focus-visible {
  color: #d8ecff;
}
.pool-mood-tip-popup {
  position: fixed;
  z-index: 10050;
  width: min(248px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(22, 32, 48, 0.98) 0%, rgba(12, 18, 28, 0.98) 100%);
  border: 1px solid rgba(100, 160, 230, 0.35);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  color: #e8eef5;
  pointer-events: none;
}
.pool-mood-tip-popup-title {
  font-size: 13px;
  font-weight: 600;
  color: #f4f8ff;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(100, 160, 230, 0.22);
}
.pool-mood-tip-popup-body {
  font-size: 12px;
  line-height: 1.55;
  color: #c8d4e4;
  white-space: pre-line;
}
body.theme-light #panel-track-pools-manager .pool-mood-tip-text:hover,
body.theme-light #panel-track-pools-manager .pool-mood-tip-text:focus-visible {
  color: #0f3d6e;
}
body.theme-light .pool-mood-tip-popup {
  background: linear-gradient(165deg, #ffffff 0%, #f4f7fb 100%);
  border-color: rgba(46, 125, 50, 0.28);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  color: #1a2332;
}
body.theme-light .pool-mood-tip-popup-title {
  color: #0f172a;
  border-bottom-color: rgba(15, 23, 42, 0.1);
}
body.theme-light .pool-mood-tip-popup-body {
  color: #334155;
}

/* Live listener bar (Icecast stream QA) */
:root {
  --gravy-live-player-bar-height: 52px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body.live-player-bar-active .station-layout {
  min-height: calc(100vh - var(--gravy-live-player-bar-height));
}
body.live-player-bar-active .station-main {
  padding-bottom: var(--gravy-live-player-bar-height);
}
@media (min-width: 900px) {
  body.live-player-bar-active .station-sidebar {
    height: calc(100vh - var(--gravy-live-player-bar-height));
    min-height: calc(100vh - var(--gravy-live-player-bar-height));
  }
}
@media (max-width: 899px) {
  body.live-player-bar-active .station-sidebar {
    height: calc(100vh - var(--gravy-live-player-bar-height));
  }
  body.live-player-bar-active .station-layout.menu-open .station-sidebar {
    height: calc(100vh - var(--station-chrome-height, 52px) - var(--gravy-live-player-bar-height));
  }
}
.gravy-live-player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 350;
  height: var(--gravy-live-player-bar-height);
  background: rgba(16, 30, 48, 0.98);
  border-top: 1px solid rgba(70, 120, 180, 0.35);
  color: #e5f3ff;
  box-sizing: border-box;
}
.gravy-live-player-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  max-width: 100%;
  padding: 0 16px 0 12px;
  box-sizing: border-box;
}
.gravy-live-player-bar__play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(70, 120, 180, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #eaf6ff;
  cursor: pointer;
  transition: background var(--gravy-motion-fast) var(--gravy-ease-out), border-color var(--gravy-motion-fast) var(--gravy-ease-out);
}
.gravy-live-player-bar__icon {
  display: block;
  flex-shrink: 0;
}
.gravy-live-player-bar__icon--stop {
  display: none;
}
.gravy-live-player-bar__play.is-playing .gravy-live-player-bar__icon--play {
  display: none;
}
.gravy-live-player-bar__play.is-playing .gravy-live-player-bar__icon--stop {
  display: block;
}
.gravy-live-player-bar__play:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(120, 170, 220, 0.65);
}
.gravy-live-player-bar__play:focus-visible {
  outline: 2px solid rgba(120, 170, 220, 0.8);
  outline-offset: 2px;
}
/* Control page art play: rounded square (not live-player-bar circle button) */
.station-control-art-play {
  display: block;
  width: var(--station-control-thumb-size, 52px) !important;
  height: var(--station-control-thumb-size, 52px) !important;
  border-radius: 10px !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  flex: 0 0 auto;
}
.station-control-art-play:hover {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
}
.gravy-live-player-bar__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.gravy-live-player-bar__label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7eb8e8;
}
.gravy-live-player-bar__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  color: #eaf6ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gravy-live-player-bar__status {
  flex: 0 1 auto;
  max-width: 28%;
  font-size: 12px;
  color: #9eb8d4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.gravy-live-player-bar__volume {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
  max-width: 160px;
}
.gravy-live-player-bar__volume-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9eb8d4;
  cursor: pointer;
  flex-shrink: 0;
}
.gravy-live-player-bar__volume-icon {
  display: block;
}
.gravy-live-player-bar__volume-slider {
  width: 96px;
  max-width: 28vw;
  height: 4px;
  margin: 0;
  accent-color: #7eb8e8;
  cursor: pointer;
}
.gravy-live-player-bar__volume-slider:focus-visible {
  outline: 2px solid rgba(120, 170, 220, 0.8);
  outline-offset: 2px;
}
body.theme-light .gravy-live-player-bar {
  background: #ffffff;
  border-top: 1px solid hsl(0 0% 89.8%);
  color: #0a0a0a;
}
body.theme-light .gravy-live-player-bar__play {
  background: rgba(0, 0, 0, 0.04);
  border-color: hsl(0 0% 85%);
  color: #0a0a0a;
}
body.theme-light .gravy-live-player-bar__play:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: hsl(0 0% 75%);
}
body.theme-light .gravy-live-player-bar__label {
  color: #2563eb;
}
body.theme-light .gravy-live-player-bar__title {
  color: #0a0a0a;
}
body.theme-light .gravy-live-player-bar__status {
  color: #525252;
}
body.theme-light .gravy-live-player-bar__volume-label {
  color: #525252;
}
body.theme-light .gravy-live-player-bar__volume-slider {
  accent-color: #2563eb;
}

@media (max-width: 640px) {
  .gravy-live-player-bar__volume {
    display: none !important;
  }
}
