:root {
  /* Chelsey Webb brand palette — maroon-base dark theme */
  --bg: #321622;            /* brand --ink, page background */
  --bg-2: #3D1A2A;          /* lifted surfaces (cards) */
  --bg-3: #4A2032;          /* hover surfaces */
  --bg-deep: #1F0E15;       /* brand --ink-deep, used for stage/contrast */
  --surface: rgba(232, 212, 188, 0.05);
  --surface-hover: rgba(232, 212, 188, 0.09);
  --border: rgba(232, 212, 188, 0.12);
  --border-strong: rgba(232, 212, 188, 0.22);
  --ink: #E8D4BC;
  --ink-muted: rgba(232, 212, 188, 0.65);
  --ink-dim: rgba(232, 212, 188, 0.40);
  --coral: #DC5F4C;
  --coral-bright: #E7745F;
  --mustard: #DE8D07;
  --pink: #F293A5;
  --forest: #1B463F;
  --olive: #8F771F;
  --red: #911726;

  /* Track category colors */
  --c-click: #8A99B5;
  --c-drums: #DC5F4C;
  --c-bass: #7C4A8D;
  --c-acoustic: #D4A553;
  --c-electric: #C9854A;
  --c-keys: #5A8C7D;
  --c-synth: #66BB91;
  --c-brass: #DAA520;
  --c-strings: #6B9B7C;
  --c-vocals: #4A7BA8;
  --c-bg-vocals: #6B98C4;
  --c-other: #9C7BB5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
}
h1, h2, h3, h4 {
  font-family: 'DM Serif Display', 'Playfair Display', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.08;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; }

/* ─── TOP BAR ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: rgba(50, 22, 34, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.topbar-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo {
  height: 32px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(232, 212, 188, 0.08));
}
.topbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.topbar-tag {
  font-family: 'Sacramento', cursive;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--mustard);
  position: relative;
  padding-left: 14px;
}
.topbar-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mustard);
  box-shadow: 0 0 8px rgba(222, 141, 7, 0.5);
  transform: translateY(-50%);
}
@media (max-width: 520px) {
  .brand-logo { height: 26px; }
  .topbar-tag { font-size: 0.82rem; padding-left: 12px; }
  .topbar-tag::before { width: 5px; height: 5px; }
}
.topbar-spacer { width: 36px; }
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--ink);
  transition: background 0.15s ease;
}
.back-btn:hover { background: var(--surface-hover); }
.back-btn svg { width: 20px; height: 20px; }

/* ─── LAYOUT ─── */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 120px;
}
.container-wide { max-width: 1000px; }

.view-header,
.mixer-header {
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mustard);
  margin-bottom: 10px;
}
h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--ink);
  margin-bottom: 10px;
}
.lede {
  font-size: 0.98rem;
  color: var(--ink-muted);
  max-width: 560px;
}

/* ─── HERO (song-list view header) ─── */
.view-header--hero {
  position: relative;
  padding: 36px 0 32px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.view-header--hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--mustard), var(--pink));
  border-radius: 2px;
}
.hero-title {
  font-size: clamp(2.2rem, 5.6vw, 3.2rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin-bottom: 6px;
}
.hero-tagline {
  font-family: 'Sacramento', cursive;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  color: var(--pink);
  letter-spacing: 0.005em;
  line-height: 1.1;
  margin-bottom: 18px;
}
.hero-title .title-accent {
  font-family: 'Sacramento', cursive;
  font-weight: 400;
  color: var(--pink);
  letter-spacing: 0;
  font-size: 1.15em;
  line-height: 0.9;
  display: inline-block;
  transform: translateY(0.06em);
}
.hero-meta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px rgba(145, 23, 38, 0.6);
}
.hero-meta-sep { color: var(--ink-dim); opacity: 0.5; }

/* ─── SONG SEARCH ─── */
.search-wrap {
  position: relative;
  margin-top: 28px;
  max-width: 560px;
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-dim);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.98rem;
  padding: 13px 44px 13px 46px;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.search-input::placeholder { color: var(--ink-dim); }
.search-input:hover {
  border-color: var(--border-strong);
}
.search-input:focus {
  border-color: rgba(222, 141, 7, 0.45);
  background: var(--bg-3);
  box-shadow: 0 0 0 3px rgba(222, 141, 7, 0.10);
}
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.search-clear svg { width: 14px; height: 14px; }
.search-clear:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.search-no-results {
  text-align: center;
  padding: 36px 20px;
  color: var(--ink-muted);
  font-size: 1rem;
}
.search-no-results strong { color: var(--ink); }

/* Stems disclaimer note — under hero meta */
.hero-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(222, 141, 7, 0.06), rgba(242, 147, 165, 0.04));
  border: 1px solid rgba(222, 141, 7, 0.22);
  border-radius: 12px;
  max-width: 640px;
}
.hero-note-icon {
  width: 18px;
  height: 18px;
  color: var(--mustard);
  flex-shrink: 0;
  margin-top: 2px;
}
.hero-note-body {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-muted);
  font-weight: 400;
}
.hero-note-body strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 2px;
}

/* ─── FOLDER SECTIONS (Covers / Originals) ─── */
.folder-section {
  border-top: 1px solid var(--border);
  padding: 0;
}
.folder-section:first-child { border-top: none; }
.folder-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 22px 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  border-radius: 8px;
}
.folder-header:hover { background: var(--surface); }
.folder-chev {
  width: 18px;
  height: 18px;
  color: var(--mustard);
  flex-shrink: 0;
  transition: transform 0.25s ease;
  transform: rotate(-90deg);
}
.folder-section.open .folder-chev { transform: rotate(0deg); }
.folder-name {
  font-family: 'DM Serif Display', 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink);
  flex: 1;
}
.folder-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 100px;
  background: rgba(222, 141, 7, 0.10);
  border: 1px solid rgba(222, 141, 7, 0.32);
  color: var(--mustard);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.folder-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.folder-section.open .folder-body {
  max-height: 4000px;
  padding-bottom: 22px;
}
.folder-empty-msg {
  padding: 18px 8px 22px;
  font-family: 'Sacramento', cursive;
  font-size: 1.5rem;
  color: var(--ink-dim);
}

/* ─── SONG GRID ─── */
.song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.song-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.song-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mustard), var(--pink));
  opacity: 0;
  transition: opacity 0.2s ease;
}
.song-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-3);
  transform: translateY(-1px);
}
.song-card:hover::before { opacity: 1; }
.song-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.song-card-artist {
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.song-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.song-card-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-2);
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
}
.empty-emoji { font-size: 2.5rem; margin-bottom: 10px; }
.empty-state h3 { font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p { color: var(--ink-muted); max-width: 460px; margin: 0 auto; }
.empty-state code {
  background: var(--bg-3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--mustard);
  font-family: 'SF Mono', Menlo, monospace;
}

/* ─── TRANSPORT ─── */
.transport {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 22px;
}
.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--coral);
  color: white;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 8px 24px -6px rgba(220, 95, 76, 0.5);
}
.play-btn:hover { background: var(--coral-bright); transform: scale(1.04); }
.play-btn:active { transform: scale(0.96); }
.play-btn svg { width: 24px; height: 24px; }
.play-btn .icon-play { margin-left: 3px; }

.transport-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.time-display {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  display: flex;
  gap: 6px;
}
.time-display .time-sep { color: var(--ink-dim); }
#current-time { color: var(--ink); font-weight: 600; }

.scrubber-wrap {
  position: relative;
  height: 6px;
}
.scrubber {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 22px;            /* taller hit area for fingers */
  cursor: pointer;
  background: transparent;
  touch-action: pan-y;     /* allow vertical scrolling, claim horizontal */
}
.scrubber::-webkit-slider-runnable-track {
  height: 6px;
  background: rgba(232, 212, 188, 0.10);
  border-radius: 3px;
}
.scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mustard);
  margin-top: -6px;
  border: 2px solid var(--bg-2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: grab;
}
.scrubber::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.1); }
.scrubber::-moz-range-track {
  height: 6px;
  background: rgba(232, 212, 188, 0.10);
  border-radius: 3px;
}
.scrubber::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mustard);
  border: 2px solid var(--bg-2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
/* Coarse pointers (touch screens): bigger thumb */
@media (pointer: coarse) {
  .scrubber { height: 28px; }
  .scrubber::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -9px; }
  .scrubber::-moz-range-thumb { width: 24px; height: 24px; }
  .volume-slider { height: 26px; }
  .volume-slider::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -8px; }
  .volume-slider::-moz-range-thumb { width: 22px; height: 22px; }
}

.transport-status {
  font-size: 0.7rem;
  color: var(--ink-dim);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.transport-status.playing { color: var(--coral); }

/* ─── LOOP A→B ─── */
.loop-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--mustard);
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 0 8px rgba(222, 141, 7, 0.6);
}
.loop-marker::before {
  content: 'A';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--mustard);
  background: var(--bg-2);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(222, 141, 7, 0.5);
}
.loop-marker.loop-b-marker::before { content: 'B'; }
.loop-region {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(222, 141, 7, 0.12);
  border-top: 1px solid rgba(222, 141, 7, 0.4);
  border-bottom: 1px solid rgba(222, 141, 7, 0.4);
  pointer-events: none;
  z-index: 1;
  border-radius: 1px;
}

.loop-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.loop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--ink-muted);
  padding: 6px 10px 6px 6px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.loop-btn:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--ink);
}
.loop-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.loop-btn.active {
  background: rgba(222, 141, 7, 0.15);
  color: var(--mustard);
  border-color: rgba(222, 141, 7, 0.45);
}
.loop-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 6px;
  align-self: center;
}
.clear-solos-btn.active {
  background: rgba(242, 147, 165, 0.14);
  color: var(--pink);
  border-color: rgba(242, 147, 165, 0.45);
}
.loop-btn .kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: rgba(232, 212, 188, 0.10);
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink);
}
.loop-btn.active .kbd {
  background: rgba(222, 141, 7, 0.25);
  color: var(--mustard);
}
.loop-status {
  font-size: 0.72rem;
  color: var(--mustard);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  font-weight: 600;
  margin-left: 4px;
}
.loop-status:empty { display: none; }

/* ─── TRACKS ─── */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.track {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.track:hover { background: var(--bg-3); }
.track.muted { opacity: 0.45; }
.track.muted:hover { opacity: 0.65; }
.track.soloed { border-color: var(--mustard); }

.track-chip {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--c-other);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: white;
}
.track-chip.click { background: var(--c-click); }
.track-chip.drums { background: var(--c-drums); }
.track-chip.bass { background: var(--c-bass); }
.track-chip.acoustic { background: var(--c-acoustic); }
.track-chip.electric { background: var(--c-electric); }
.track-chip.keys { background: var(--c-keys); }
.track-chip.synth { background: var(--c-synth); }
.track-chip.brass { background: var(--c-brass); }
.track-chip.strings { background: var(--c-strings); }
.track-chip.vocals { background: var(--c-vocals); }
.track-chip.bg-vocals { background: var(--c-bg-vocals); }
.track-chip.other { background: var(--c-other); }

.track-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.track-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── WAVEFORM ─── */
.track-waveform {
  position: relative;
  width: 100%;
  height: 40px;
  background: rgba(232, 212, 188, 0.03);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}
.track-waveform canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.track-waveform.loading {
  background: linear-gradient(90deg,
    rgba(232, 212, 188, 0.03) 0%,
    rgba(232, 212, 188, 0.08) 50%,
    rgba(232, 212, 188, 0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.playhead {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: var(--ink);
  opacity: 0.9;
  pointer-events: none;
  transform: translateX(-1px);
  box-shadow: 0 0 6px rgba(232, 212, 188, 0.4);
}
.track.muted .track-waveform { opacity: 0.4; }
.track.soloed .track-waveform { box-shadow: inset 0 0 0 1px rgba(222, 141, 7, 0.4); }
/* Row: speaker icon + slider + percent label */
.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.volume-icon {
  width: 14px;
  height: 14px;
  color: var(--ink-dim);
  flex-shrink: 0;
}
.volume-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: right;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.volume-slider {
  flex: 1;
  min-width: 0;
  height: 18px;            /* taller hit area */
  cursor: pointer;
  background: transparent;
  --vol-fill: 100%;
}
/* WebKit (Chrome/Safari): paint a gradient so filled portion is mustard */
.volume-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--mustard) 0%,
    var(--mustard) var(--vol-fill),
    rgba(232, 212, 188, 0.14) var(--vol-fill),
    rgba(232, 212, 188, 0.14) 100%
  );
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  margin-top: -5px;
  border: 2px solid var(--mustard);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  cursor: grab;
  transition: transform 0.12s ease;
}
.volume-slider:hover::-webkit-slider-thumb { transform: scale(1.15); }
.volume-slider:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.1); }

/* Firefox: native progress + thumb */
.volume-slider::-moz-range-track {
  height: 6px;
  background: rgba(232, 212, 188, 0.14);
  border-radius: 3px;
}
.volume-slider::-moz-range-progress {
  height: 6px;
  background: var(--mustard);
  border-radius: 3px;
}
.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--mustard);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  cursor: grab;
}
.volume-slider:focus-visible {
  outline: none;
}
.volume-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(222, 141, 7, 0.35), 0 1px 4px rgba(0, 0, 0, 0.4);
}

.track-controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.track-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.track-btn:hover { background: var(--surface-hover); color: var(--ink); }
.track-btn svg { width: 18px; height: 18px; }
.track-btn.active.mute-btn {
  background: rgba(220, 95, 76, 0.18);
  color: var(--coral);
  border-color: rgba(220, 95, 76, 0.45);
}
.track-btn.active.solo-btn {
  background: rgba(222, 141, 7, 0.18);
  color: var(--mustard);
  border-color: rgba(222, 141, 7, 0.55);
}

.mixer-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-muted);
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(232, 212, 188, 0.10);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── STICKY BOTTOM (mobile) ─── */
.sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 10, 12, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 60;
}
.play-btn-mini { width: 42px; height: 42px; }
.play-btn-mini svg { width: 18px; height: 18px; }
.sticky-bottom-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.sticky-bottom-info span:first-child {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-bottom-info span:last-child {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* ─── RESPONSIVE ─── */
/* Faster tap response + no double-tap zoom on interactive controls */
button, .song-card, .folder-header, .play-btn, .loop-btn, .track-btn, .back-btn, .sticky-bar-cta {
  touch-action: manipulation;
}

@media (max-width: 640px) {
  .container { padding: 22px 16px 110px; }
  .transport { grid-template-columns: auto 1fr; padding: 14px; gap: 14px; }
  .transport-status { display: none; }
  .transport-info { grid-column: 1 / -1; order: 3; }
  .track { gap: 10px; padding: 14px 12px; }
  .track-chip { width: 36px; height: 36px; }
  .track-btn { width: 42px; height: 42px; }
  .song-grid { grid-template-columns: 1fr; }
  .folder-header { padding: 18px 4px; min-height: 48px; }
  .folder-name { font-size: 1.4rem; }
  .play-btn { width: 56px; height: 56px; }
  .play-btn-mini { width: 44px; height: 44px; }
  .loop-btn { padding: 8px 12px 8px 8px; min-height: 36px; }
  .hero-note { padding: 12px 14px; gap: 10px; }
  .hero-note-body { font-size: 0.84rem; }
  .search-input { font-size: 16px; /* prevent iOS zoom */ }
}

/* ─── VIEW TOGGLE ─── */
.view[hidden] { display: none; }
