:root {
  --bg: #141418;
  --panel: #1d1d24;
  --panel2: #24242c;
  --line: #32323c;
  --cream: #f2e9d8;
  --cream-dim: #c9c0ae;
  --red: #e04438;
  --red-soft: #ff6a5e;
  --gold: #e8b84b;
  --gold-soft: #f5d47e;
  --green: #4fc47f;
  --muted: #8b8b98;
  --blue: #6ea5c8;   /* coach / left-dock accent (was undefined → invisible button) */
  /* Geometric sans — MixMaster Pro Lab display face, used everywhere. */
  --sans: "Archivo", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Archivo Expanded", "Archivo", sans-serif;
  /* Mono kept ONLY for numeric readouts (dB values align better tabular). */
  --mono: "Archivo", "SF Mono", ui-monospace, Menlo, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
/* [hidden] must always win, even over classes that set display */
[hidden] { display: none !important; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  min-height: 100vh;
}
/* dB values / scores stay column-aligned despite the proportional font */
.db-readout, .ms-timer, .ib-count, .big, .ms-score, .inst-score, #dnaTable td,
.rrow .rv, .dev-scale, .kpi .v { font-variant-numeric: tabular-nums; }
/* ---------- top bar ---------- */
header {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.logo { font-family: var(--display); font-weight: 800; display: flex; align-items: baseline; gap: 8px; }
.logo .lg-main { font-size: 18px; letter-spacing: 1px; color: var(--cream); text-transform: uppercase; }
.logo .lg-accent {
  font-size: 11px; letter-spacing: 2px; color: var(--gold-soft); text-transform: uppercase;
  border: 1px solid var(--gold); border-radius: 5px; padding: 2px 6px;
}
nav { display: flex; gap: 4px; }
nav button {
  background: none; border: none; color: var(--muted);
  font-size: 14px; padding: 8px 14px; border-radius: 8px; cursor: pointer;
}
nav button.active { color: var(--cream); background: var(--panel2); }
.coins {
  margin-left: auto; font-family: var(--mono); font-size: 13px;
  color: var(--muted); border: 1px dashed var(--line);
  padding: 6px 12px; border-radius: 8px;
}
/* ---------- layout ---------- */
.screen { display: none; padding: 28px; max-width: 1200px; margin: 0 auto; }
.screen.active { display: block; }
h2 { font-size: 15px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.empty { color: var(--muted); text-align: center; padding: 60px 20px; font-size: 14px; }
.sub { font-size: 11px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; margin-bottom: 14px; }
/* ---------- exercise ---------- */
.ex-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; }
.ex-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.song-title { font-size: 18px; font-weight: 700; }
.chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); color: var(--cream-dim);
}
.chip.stem { border-color: var(--red); color: var(--red-soft); }
/* audio diagnostic strip */
.audio-diag { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.audio-diag .chip { cursor: pointer; }
.audio-diag .chip.bad { border-color: var(--red); color: var(--red-soft); animation: diag-pulse 1.2s ease-in-out infinite; }
@keyframes diag-pulse { 50% { box-shadow: 0 0 0 3px rgba(224,68,56,.25); } }
.meter { flex: 1; height: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0%; background: var(--cream); opacity: .8; }
.meter-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: var(--muted); }
/* listen modes */
.modes { display: flex; gap: 10px; margin-bottom: 18px; }
.mode {
  flex: 1; padding: 16px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel2);
  text-align: center; color: var(--muted); transition: all .12s;
}
.mode .key { font-family: var(--mono); font-size: 10px; opacity: .6; display: block; margin-top: 5px; }
.mode .name { font-size: 14px; font-weight: 700; }
.mode.orig { flex: .6; }
.mode.live { border-color: var(--cream); color: var(--cream); background: #2c2c35; box-shadow: 0 0 0 1px var(--cream); }
.mode.live.test { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); color: var(--red-soft); }
/* transport */
.transport { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.play {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--cream); color: #111; font-size: 16px; font-weight: 700;
}
.wave { flex: 1; height: 44px; border-radius: 8px; background: var(--panel2); position: relative; overflow: hidden; }
.wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.playhead { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--red); pointer-events: none; }
.loop-region { position: absolute; top: 0; bottom: 0; background: rgba(224,68,56,.14); border-left: 2px solid var(--red); border-right: 2px solid var(--red); }
.loop-region.off { background: rgba(139,139,152,.08); border-color: var(--line); }
.loop-grip { position: absolute; top: -8px; width: 14px; height: 14px; border-radius: 50%; background: var(--red); cursor: ew-resize; z-index: 3; }
.loop-grip.l { left: -8px; } .loop-grip.r { right: -8px; }
.loop-btn { background: var(--panel2); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 10px 14px; cursor: pointer; font-size: 13px; font-family: var(--mono); white-space: nowrap; }
.loop-btn.on { border-color: var(--red); color: var(--red-soft); }
/* fader */
.fader-row { display: flex; gap: 40px; align-items: stretch; justify-content: center; padding: 10px 0 6px; }
.fader-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fader-label { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--red-soft); }
.fader-track {
  width: 72px; height: 260px; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 10px; position: relative; cursor: ns-resize; touch-action: none;
}
.fader-track .zero { position: absolute; left: 8px; right: 8px; top: 50%; height: 1px; background: var(--muted); opacity: .5; }
.fader-handle {
  position: absolute; left: 6px; right: 6px; height: 34px; border-radius: 7px;
  background: linear-gradient(180deg, #faf3e3, #d9cfba); top: calc(50% - 17px);
  box-shadow: 0 3px 8px rgba(0,0,0,.5);
}
.fader-handle::after { content:""; position: absolute; left: 10px; right: 10px; top: 50%; height: 2px; background: var(--red); }
.db-readout { font-family: var(--mono); font-size: 22px; font-weight: 600; min-width: 110px; text-align: center; }
.db-readout small { display: block; font-size: 10px; color: var(--muted); letter-spacing: 1px; margin-top: 4px; }
.ticks { display: flex; flex-direction: column; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--muted); padding: 4px 0; }
.submit {
  display: block; margin: 22px auto 0; padding: 14px 54px; border-radius: 10px; border: none;
  background: var(--red); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.submit:hover { background: var(--red-soft); }
.hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 12px; }
/* result */
.result { display: none; margin-top: 22px; border-radius: 12px; padding: 20px; text-align: center; border: 1px solid var(--line); background: var(--panel2); }
.result.show { display: block; }
.result .big { font-family: var(--mono); font-size: 34px; font-weight: 700; margin: 6px 0; }
.result .verdict { font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.result .detail { color: var(--muted); font-size: 13px; margin-top: 8px; }
.result .next { margin-top: 16px; background: var(--cream); color: #111; border: none; border-radius: 8px; padding: 10px 26px; font-weight: 700; cursor: pointer; }
.pass .verdict, .pass .big { color: var(--green); }
.fail .verdict, .fail .big { color: var(--red-soft); }
/* sidebar */
.stat { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.stat:last-child { border-bottom: none; }
.stat b { font-family: var(--mono); font-weight: 600; }
.sidebar h3 { font-size: 11px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; margin-bottom: 8px; }
.sidebar .panel + .panel { margin-top: 16px; }
/* ---------- library ---------- */
.drop {
  border: 2px dashed var(--line); border-radius: 14px; padding: 40px; text-align: center;
  color: var(--muted); margin-bottom: 20px; cursor: pointer;
}
.drop.drag { border-color: var(--red); color: var(--cream); }
.drop b { color: var(--cream); }
.demucs-warn { color: var(--red-soft); font-family: var(--mono); font-size: 12px; margin-top: 14px; }
.lib-controls { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.diff-pick { font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; display: flex; flex-direction: column; gap: 6px; }
.diff-pick select {
  background: var(--panel2); color: var(--cream); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; font-family: var(--mono); font-size: 12px; cursor: pointer;
}
.song { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 10px; }
.art { width: 44px; height: 44px; border-radius: 8px; background: linear-gradient(135deg, #3a3a46, #22222a); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 14px; font-weight: 800; color: var(--cream);
  letter-spacing: 1px; overflow: hidden; border: 1px solid var(--line); }
.song .meta { flex: 1; min-width: 0; }
.song .meta .t { font-weight: 700; font-size: 14px; }
.song .meta .s { font-size: 12px; color: var(--muted); margin-top: 3px; font-family: var(--mono); }
.badge { font-family: var(--mono); font-size: 11px; padding: 5px 10px; border-radius: 6px; white-space: nowrap; }
.badge.ok { color: var(--green); border: 1px solid var(--green); }
.badge.working { color: var(--cream-dim); border: 1px solid var(--line); }
.badge.err { color: var(--red-soft); border: 1px solid var(--red); }
.train-btn { background: var(--red); color: #fff; border: none; border-radius: 8px; padding: 9px 20px; font-weight: 700; cursor: pointer; font-size: 13px; }
.train-btn[disabled] { background: var(--panel2); color: var(--muted); cursor: default; }
.train-btn:not([disabled]):hover { background: var(--red-soft); }
/* ---------- history ---------- */
.hist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.kpi .v { font-family: var(--mono); font-size: 24px; font-weight: 700; }
.kpi .l { font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-top: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); font-family: var(--mono); }
td.pass-c { color: var(--green); } td.fail-c { color: var(--red-soft); }
td.uncounted { color: var(--muted); }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 12px; }
.bar-row .bl { width: 60px; color: var(--muted); font-family: var(--mono); }
.bar { flex: 1; height: 10px; background: var(--panel2); border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--red); border-radius: 5px; }
.bar-row .bv { width: 60px; text-align: right; font-family: var(--mono); color: var(--cream-dim); }
.prog-wrap { font-size: 13px; }
.prog-wrap .big { font-family: var(--mono); font-size: 28px; font-weight: 700; }
/* ---------- mode toggle (FREE / INSTINCT) ---------- */
.mode-toggle { display: inline-flex; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mode-toggle .mt {
  background: var(--panel2); border: none; color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px; padding: 7px 14px;
}
.mode-toggle .mt.active { background: var(--red); color: #fff; }
.mode-toggle .mt:not(.active):hover { color: var(--cream); }
/* ---------- instinct bar (banner + countdown) ---------- */
.instinct-bar {
  display: flex; align-items: center; gap: 18px; margin-bottom: 20px;
  padding: 16px 20px; border: 1px solid var(--red); border-radius: 12px;
  background: rgba(224,68,56,.08);
}
.ib-banner { flex: 1; font-size: 15px; font-weight: 700; color: var(--cream); }
.ib-timer { text-align: center; min-width: 96px; }
.ib-count { font-family: var(--mono); font-size: 46px; font-weight: 700; line-height: 1; color: var(--red-soft); }
.ib-count.listen { color: var(--cream); }
.ib-phase { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: var(--muted); margin-top: 6px; }
.fader-track.locked { opacity: .45; cursor: not-allowed; }
.fader-track.locked .fader-handle { box-shadow: none; }
/* ---------- instinct result chart ---------- */
.instinct-result.show { display: block; }
.inst-chart { margin: 18px auto 8px; max-width: 460px; }
.inst-chart svg { width: 100%; height: auto; display: block; }
.inst-lines { font-family: var(--mono); font-size: 13px; color: var(--cream-dim); margin-top: 10px; line-height: 1.9; }
.inst-lines b { color: var(--cream); }
/* green = accuracy only, never direction */
.inst-lines .exact { color: var(--green); }
.inst-score { color: var(--cream); }
.inst-score.perfect { color: var(--green); text-shadow: 0 0 18px rgba(79,196,127,.45); }
/* ---------- instinct bias (history) ---------- */
.ib-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ib-row:last-child { border-bottom: none; }
.ib-row .ib-stem { width: 110px; font-family: var(--mono); color: var(--muted); letter-spacing: 1px; }
.ib-row .ib-n { font-family: var(--mono); color: var(--muted); width: 54px; }
.ib-row { flex-wrap: wrap; }
.ib-row .ib-flow { flex: 1; font-family: var(--mono); }
.ib-row .ib-flow .exact { color: var(--green); }
.ib-row .ib-flow .arrow { color: var(--muted); margin: 0 8px; }
.ib-row .trend { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; white-space: nowrap; }
.ib-row .trend.up { color: var(--green); }
.ib-row .trend.down { color: var(--red-soft); }
.ib-row .trend.flat { color: var(--muted); }
.ib-row .spark { display: block; }
.ib-row .spark-wrap { display: flex; align-items: center; gap: 8px; }
.ib-row .spark-label { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--muted); }
.ib-row.empty-row { color: var(--muted); font-family: var(--mono); }
.reseparate-btn { background: var(--panel2); color: var(--red-soft); border: 1px solid var(--red); border-radius: 8px; padding: 9px 16px; font-weight: 700; cursor: pointer; font-size: 12px; font-family: var(--mono); white-space: nowrap; margin-left: 8px; }
.reseparate-btn:hover { background: var(--red); color: #fff; }
/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--red); color: var(--cream);
  padding: 12px 20px; border-radius: 10px; font-size: 13px; z-index: 100;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}

/* ---------- MIX THE SONG ---------- */
.chip.gold { border-color: var(--gold); color: var(--gold-soft); }
.mixsong-chip { background: none; cursor: pointer; box-shadow: 0 0 14px rgba(232,184,75,.25); }
.mixsong-chip:hover { background: rgba(232,184,75,.12); }

.stage {
  border: 1px solid var(--gold); border-radius: 14px; padding: 26px; position: relative; overflow: hidden;
  margin-top: 20px;
  background:
    radial-gradient(ellipse at 10% 10%, rgba(232,184,75,.08), transparent 45%),
    radial-gradient(ellipse at 90% 30%, rgba(224,68,56,.07), transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(79,196,127,.05), transparent 50%),
    var(--panel);
}
.stage::before { /* stage lights */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle 2px at 8% 12%, var(--gold) 0, transparent 3px),
    radial-gradient(circle 1.5px at 22% 6%, var(--red-soft) 0, transparent 3px),
    radial-gradient(circle 2px at 41% 10%, var(--gold-soft) 0, transparent 3px),
    radial-gradient(circle 1.5px at 63% 5%, var(--green) 0, transparent 3px),
    radial-gradient(circle 2px at 78% 11%, var(--gold) 0, transparent 3px),
    radial-gradient(circle 1.5px at 93% 7%, var(--red-soft) 0, transparent 3px);
}
.stage-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.stage-head .ms-title { font-family: var(--mono); font-size: 16px; font-weight: 700; letter-spacing: 2px; color: var(--gold-soft); }
.phase-bar { display: flex; gap: 6px; margin-bottom: 16px; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; }
.ph { flex: 1; text-align: center; padding: 7px 4px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.ph.live { border-color: var(--gold); color: var(--gold-soft); box-shadow: 0 0 0 1px var(--gold); }
.ph.done { color: var(--cream-dim); opacity: .55; }
.ph.clickable { cursor: pointer; }
.ph.clickable:hover { border-color: var(--cream-dim); color: var(--cream); }
/* result close (X) */
.result-close {
  position: absolute; top: 12px; right: 14px; z-index: 5;
  background: none; border: none; color: var(--muted); font-size: 20px;
  cursor: pointer; line-height: 1; padding: 4px;
}
.result-close:hover { color: var(--cream); }
.ms-timer { text-align: center; font-family: var(--mono); font-size: 44px; font-weight: 700; color: var(--gold-soft); margin-bottom: 2px; }
.ms-banner { text-align: center; font-size: 14px; color: var(--cream-dim); margin-bottom: 20px; }
.ms-faders { display: flex; justify-content: center; gap: 38px; padding: 8px 0 4px; }
.ms-faders.locked .track { opacity: .55; cursor: default; }
.msf { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.msf .name { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--red-soft); }
.msf .lock { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--gold); border: 1px solid var(--gold); border-radius: 4px; padding: 2px 7px; }
.msf .lock.ghost { border-color: transparent; color: transparent; }
.msf .track { width: 68px; height: 240px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; position: relative; cursor: ns-resize; touch-action: none; }
.msf .zero { position: absolute; left: 9px; right: 9px; height: 1px; background: var(--muted); opacity: .5; }
.msf .handle { position: absolute; left: 4px; right: 4px; height: 40px; transform: translateY(-50%); background: linear-gradient(180deg,#34343e,#262630); border: 1px solid #4a4a56; border-radius: 7px; pointer-events: none; box-shadow: 0 2px 5px rgba(0,0,0,.35); }
.msf .handle::after { content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 3px; transform: translateY(-50%); background: var(--red); border-radius: 2px; }
.msf.anchor .track { border-color: var(--gold); box-shadow: 0 0 10px rgba(232,184,75,.25); cursor: default; }
.msf.anchor .name { color: var(--gold-soft); }
.msf.anchor .handle { border-color: var(--gold); }
.msf .db { font-family: var(--mono); font-size: 12px; color: var(--cream); display: inline-flex; align-items: center; gap: 4px; }
.msf .db i { font-style: normal; font-size: 10px; color: var(--muted); }
/* Editable exact-dB field — type a number, Enter/blur commits, ↑/↓ nudge. */
.msf .db-in {
  width: 46px; font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--cream); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 6px; padding: 3px 4px; text-align: center;
  -moz-appearance: textfield; cursor: text;
}
.msf .db-in:focus { outline: none; border-color: var(--gold); color: var(--gold-soft); box-shadow: 0 0 0 1px var(--gold); }
.ms-faders.locked .db-in { opacity: .55; pointer-events: none; }

.ms-result { margin-top: 22px; }
.ms-score { color: var(--cream); }
.ms-score.perfect { color: var(--green); text-shadow: 0 0 22px rgba(79,196,127,.45); }
.ms-rows { max-width: 540px; margin: 10px auto 0; text-align: left; }
.rrow { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
.rrow:last-child { border-bottom: none; }
.rrow .rn { width: 100px; color: var(--muted); letter-spacing: 1px; }
.rrow .rbar { flex: 1; height: 7px; background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.rrow .rbar i { display: block; height: 100%; }
.rrow .rv { width: 150px; text-align: right; color: var(--cream-dim); }
.rrow .rv b { color: var(--cream); }
.rrow .rv b.ok { color: var(--green); }

.unlock-overlay {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,14,.75); backdrop-filter: blur(3px);
}
.unlock-card {
  max-width: 520px; width: calc(100% - 48px); border: 1px solid var(--gold); border-radius: 14px; padding: 30px; text-align: center;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(232,184,75,.14), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(232,184,75,.10), transparent 50%),
    var(--panel);
  box-shadow: 0 0 44px rgba(232,184,75,.25);
}
.unlock-card .streak { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: var(--green); }
.unlock-card h1 { font-size: 28px; letter-spacing: 2px; margin: 12px 0 8px; color: var(--gold-soft); text-shadow: 0 0 24px rgba(232,184,75,.5); }
.unlock-card p { color: var(--cream-dim); font-size: 14px; }
.unlock-card .go {
  margin-top: 20px; background: var(--gold); color: #141418; border: none; border-radius: 10px;
  padding: 13px 38px; font-weight: 800; font-size: 15px; letter-spacing: 1px; cursor: pointer;
  box-shadow: 0 0 22px rgba(232,184,75,.45);
}
.unlock-card .later { display: block; margin: 14px auto 0; background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; }

.ms-run-score { font-weight: 700; color: var(--cream); }
.ms-run-score.exact, .ib-flow .exact { color: var(--green); }
.ms-run-song { margin-left: auto; }

/* song pool toggle (library) */
.pool-btn {
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: 9px 14px; cursor: pointer; font-size: 11px;
  font-family: var(--mono); letter-spacing: 1px; white-space: nowrap;
}
.pool-btn.on { border-color: var(--gold); color: var(--gold-soft); }

/* gold MIX button (library, visible when a round is banked) */
.mix-btn {
  background: var(--gold); color: #141418; border: none; border-radius: 8px;
  padding: 9px 18px; cursor: pointer; font-size: 12px; font-weight: 800;
  font-family: var(--mono); letter-spacing: 1px; white-space: nowrap;
  box-shadow: 0 0 14px rgba(232,184,75,.35);
}
.mix-btn:hover { background: var(--gold-soft); }

/* mixer label + pool-by-mixer controls */
.mixer-chip { border-color: var(--line); color: var(--muted); white-space: nowrap; }
.pool-mixer-btn {
  background: var(--panel2); border: 1px solid var(--gold); color: var(--gold-soft);
  border-radius: 8px; padding: 9px 14px; cursor: pointer; font-size: 11px;
  font-family: var(--mono); letter-spacing: 1px; white-space: nowrap; align-self: end;
}
.pool-mixer-btn:hover { background: rgba(232,184,75,.12); }
.pool-mixer-btn.all { border-color: var(--line); color: var(--muted); }

/* STOP + flag controls */
.stop-btn {
  background: var(--panel2); border: 1px solid var(--red); color: var(--red-soft);
  border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 11px;
  font-weight: 800; font-family: var(--mono); letter-spacing: 1.5px; white-space: nowrap;
}
.stop-btn:hover { background: var(--red); color: #fff; }
.flag-btn {
  background: none; border: 1px dashed var(--line); color: var(--muted);
  border-radius: 6px; padding: 5px 10px; cursor: pointer; font-size: 11px;
  font-family: var(--mono); letter-spacing: 1px; white-space: nowrap;
}
.flag-btn:hover { border-color: var(--red); color: var(--red-soft); }

/* ---------- one-screen layout: results float, everything tighter ---------- */
.result.show {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 80; width: min(620px, calc(100vw - 48px));
  max-height: 88vh; overflow-y: auto;
  border-color: var(--cream-dim);
  box-shadow: 0 24px 90px rgba(0,0,0,.7);
}
.result .next.retry { background: var(--panel2); color: var(--cream); border: 1px solid var(--line); margin-left: 10px; }
.result .next.retry:hover { border-color: var(--cream); }
.screen { padding: 16px 28px; }
.ex-head { margin-bottom: 10px; }
.panel { padding: 16px 22px; }
.modes { margin-bottom: 10px; }
.mode { padding: 10px 10px; }
.transport { margin-bottom: 12px; }
.audio-diag { margin-top: 8px; }
.fader-row { padding: 4px 0 2px; }
.fader-track { height: 200px; }
.submit { margin: 12px auto 0; padding: 11px 44px; }
.hint { font-size: 11px; margin-top: 8px; }
.instinct-bar { margin-bottom: 12px; padding: 12px 18px; }
h2 { margin-bottom: 10px; }

/* ---------- full-mix deviation scale ---------- */
.dev-scale {
  flex: 1; position: relative; height: 18px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 9px;
}
.dev-scale::before {
  content: "LOW"; position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 8px; letter-spacing: 1px; color: var(--muted);
}
.dev-scale::after {
  content: "HOT"; position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 8px; letter-spacing: 1px; color: var(--muted);
}
.ds-ref {
  position: absolute; left: 50%; top: 2px; bottom: 2px; width: 2px;
  background: var(--green); transform: translateX(-50%); border-radius: 1px;
}
.ds-ref.gold { background: var(--gold); }
.ds-you {
  position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%;
  background: var(--cream); transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(0,0,0,.6); z-index: 1;
}
.ds-you.ok { background: var(--green); }
.ds-you.far { background: var(--red); }

/* single-stem drill result: score sub-line + relation-to-reference graph */
.ex-sub { font-family: var(--mono); font-size: 13px; color: var(--cream-dim); margin: 2px 0 10px; }
.ex-relation { max-width: 360px; margin: 6px auto 12px; }
.ex-relation .rel-cap { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ex-relation .dev-scale { height: 20px; }
.ex-relation .rel-note { font-family: var(--mono); font-size: 12px; margin-top: 6px; color: var(--cream-dim); }
.ex-relation .rel-note.ok { color: var(--green); }
.ex-relation .rel-note.far { color: var(--red-soft); }

/* ===================== CAREER RUN ===================== */
.run-hud { font-family: var(--mono); font-size: 12px; color: var(--cream-dim);
  background: var(--panel2); border: 1px solid var(--gold); border-radius: 8px;
  padding: 6px 11px; margin-right: 8px; white-space: nowrap; }
.run-hud[hidden] { display: none; }
.run-hud b { color: var(--gold-soft); }

.run-end-overlay { position: fixed; inset: 0; background: rgba(8,8,10,.9);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
  z-index: 95; padding: 20px; }
.run-end-overlay[hidden] { display: none; }
.run-end-card { background: linear-gradient(180deg, #221c10, #17150f);
  border: 2px solid var(--gold); border-radius: 18px; padding: 34px 32px;
  max-width: 460px; width: 100%; text-align: center;
  box-shadow: 0 0 0 6px rgba(232,184,75,.18), 0 24px 80px rgba(0,0,0,.75);
  animation: dock-in-b .5s cubic-bezier(.2,.9,.3,1.3); }
.run-end-kicker { font: 700 11px/1 var(--mono); letter-spacing: 2px; text-transform: uppercase; color: var(--gold-soft); }
.run-end-tier { font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--cream); margin: 10px 0 6px; }
.run-end-score { font-family: var(--mono); color: var(--cream-dim); margin-bottom: 14px; }
.run-end-score b { font-size: 26px; color: var(--gold); }
.run-end-blurb { font-size: 15px; line-height: 1.55; color: var(--cream); font-style: italic; margin-bottom: 14px; }
.run-end-stats { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.run-end-actions { display: flex; gap: 10px; justify-content: center; }

/* mixer multi-select chips (the selection IS the pool) */
/* ---------- mixer gallery (portrait cards) ---------- */
.mixer-gallery-head { display: flex; align-items: center; gap: 14px; margin: 14px 0 12px; }
.mg-actions { display: flex; gap: 8px; margin-left: auto; }
.mixer-gallery {
  display: grid; gap: 12px; margin-bottom: 26px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
/* STEP 2 — one screen, no scroll */
#stepMixers {
  height: calc(100vh - 62px - 56px); /* header + screen padding */
  display: flex; flex-direction: column; min-height: 0;
}
#stepMixers .mixers-title {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 26px; letter-spacing: 0.5px; color: var(--cream);
  text-align: center; margin: 4px 0 16px;
}
#stepMixers .mixer-gallery {
  flex: 1 1 auto; min-height: 0; margin: 0; overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px; align-content: start;
}
#stepMixers .mixer-card .mc-name { font-size: 13px; bottom: 25px; line-height: 1.05; }
#stepMixers .mixer-card .mc-count { font-size: 9px; }
#stepMixers .mc-mono { font-size: 34px; }
.play-bar { flex: 0 0 auto; text-align: center; padding: 14px 0 2px; }
.play-bar .go-btn { font-size: 15px; padding: 13px 40px; }
.mixer-card {
  position: relative; aspect-ratio: 3 / 4; border-radius: 12px; cursor: pointer;
  overflow: hidden; padding: 0; border: 1px solid var(--line);
  background-color: var(--panel2); background-size: cover; background-position: center top;
  transition: transform .12s, box-shadow .12s, border-color .12s; text-align: left;
}
.mixer-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.55); }
.mixer-card.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 10px 28px rgba(232,184,75,.25); }
/* monogram backdrop — shown until (or instead of) a photo */
.mc-mono {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--mono-bg), #16161c);
  font-family: var(--mono); font-size: 46px; font-weight: 800; color: rgba(242,233,216,.85);
  letter-spacing: 2px;
}
.mixer-card.has-photo .mc-mono { display: none; }
.mc-grad {
  position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
  background: linear-gradient(to top, rgba(10,10,14,.92) 8%, rgba(10,10,14,.55) 48%, transparent);
}
.mc-name {
  position: absolute; left: 12px; right: 12px; bottom: 30px; z-index: 2;
  color: #fff; font-size: 16px; font-weight: 800; line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.mc-count {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--cream-dim);
}
.mc-check {
  position: absolute; top: 8px; right: 8px; z-index: 3; width: 24px; height: 24px;
  border-radius: 50%; background: var(--gold); color: #141418; display: none;
  align-items: center; justify-content: center; font-weight: 900; font-size: 13px;
}
.mixer-card.on .mc-check { display: flex; }

/* early submit */
.submit-now {
  background: var(--green); color: #10271a; border: none; border-radius: 8px;
  padding: 8px 16px; cursor: pointer; font-size: 11px; font-weight: 800;
  font-family: var(--mono); letter-spacing: 1px; white-space: nowrap;
}
.submit-now:hover { filter: brightness(1.12); }
/* The mix submit row — SUBMIT + SKIP SONG + BAD AUDIO, all big and easy to hit. */
#mixsongStage .stage-head .submit-now { font-size: 13px; padding: 11px 22px; }
.row-action {
  background: var(--panel2); color: var(--cream-dim); border: 1px solid var(--line);
  border-radius: 8px; padding: 11px 18px; cursor: pointer; font-size: 13px;
  font-weight: 800; font-family: var(--mono); letter-spacing: 1px; white-space: nowrap;
}
.row-action:hover { border-color: var(--red); color: var(--red-soft); }
#msTransportSlot .transport { margin: 0 0 14px; }

/* mixer DNA table */
#dnaTable { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
#dnaTable th { text-align: left; color: var(--muted); font-size: 10px; letter-spacing: 1px; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
#dnaTable td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
#dnaTable tr:last-child td { border-bottom: none; }
.dna-std { color: var(--muted); font-size: 10px; }

/* no text selection while riding faders (Shift+drag) */
.fader-track, .fader-row, .ms-faders, .msf, .msf .track, .transport { user-select: none; -webkit-user-select: none; }

/* fader link toggle */
.link-btn {
  background: none; border: 1px dashed var(--line); color: var(--muted);
  border-radius: 4px; padding: 2px 8px; cursor: pointer; font-size: 9px;
  font-family: var(--mono); letter-spacing: 1px;
}
.link-btn.on { border: 1px solid var(--green); color: var(--green); }

/* post-score A/B audition */
.ms-ab { display: flex; gap: 10px; justify-content: center; margin: 8px 0 4px; }
.ab-btn {
  background: var(--panel2); border: 1px solid var(--line); color: var(--cream);
  border-radius: 8px; padding: 9px 20px; cursor: pointer; font-size: 12px;
  font-weight: 700; font-family: var(--mono); letter-spacing: 1px;
}
.ab-btn.on { border-color: var(--green); color: var(--green); box-shadow: 0 0 0 1px var(--green); }

/* GO — start the game with the current settings */
.go-btn {
  background: var(--gold); color: #141418; border: none; border-radius: 10px;
  padding: 12px 34px; cursor: pointer; font-size: 15px; font-weight: 800;
  letter-spacing: 1.5px; font-family: var(--mono); align-self: end;
  box-shadow: 0 0 20px rgba(232,184,75,.4);
}
.go-btn:hover { background: var(--gold-soft); }
/* The primary call-to-action pulses so it's unmistakably the thing to press. */
#library .play-bar.left .go-btn { animation: go-pulse 1.6s ease-in-out infinite; }
#library .play-bar.left .go-btn:hover { animation: none; }
@keyframes go-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,184,75,.55), 0 0 18px rgba(232,184,75,.35); transform: scale(1); }
  50%      { box-shadow: 0 0 0 10px rgba(232,184,75,0), 0 0 26px rgba(232,184,75,.55); transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) { #library .play-bar.left .go-btn { animation: none; } }


/* ---------- add song by name ---------- */
.add-song { display: flex; gap: 10px; align-items: stretch; margin: 6px 0 8px; flex-wrap: wrap; }
.add-song input[type=text] {
  flex: 1; min-width: 280px; background: var(--panel2); border: 1px solid var(--line);
  color: var(--cream); border-radius: 10px; padding: 13px 16px; font-size: 14px;
}
.add-song input[type=text]::placeholder { color: var(--muted); }
.add-song input[type=text]:focus { outline: none; border-color: var(--gold); }
.add-song select {
  background: var(--panel2); border: 1px solid var(--line); color: var(--cream-dim);
  border-radius: 10px; padding: 0 12px; font-family: var(--mono); font-size: 12px;
}
#fetchBtn {
  background: var(--gold); color: #141418; border: none; border-radius: 10px;
  padding: 0 24px; font-weight: 800; font-size: 14px; letter-spacing: 1px;
  font-family: var(--mono); cursor: pointer;
}
#fetchBtn:hover { background: var(--gold-soft); }
.add-upload {
  background: none; border: 1px dashed var(--line); color: var(--muted);
  border-radius: 10px; padding: 0 16px; font-size: 12px; font-family: var(--mono); cursor: pointer;
}
.add-upload:hover { border-color: var(--cream-dim); color: var(--cream-dim); }
.add-status { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; min-height: 0; }
.prep-pill {
  font-family: var(--mono); font-size: 11px; color: var(--gold-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
  background: rgba(232,184,75,.06);
}
.prep-pill.err { color: var(--red-soft); border-color: var(--red); background: rgba(224,68,56,.06); }

/* ---------- home hero (one action: choose masters) ---------- */
.hero { max-width: 820px; margin: 40px auto 26px; text-align: center; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--gold-soft); margin-bottom: 10px;
}
.hero-title {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 48px; line-height: 1.02; letter-spacing: 0.5px;
  color: var(--cream); margin-bottom: 12px;
}
.hero-lead { font-size: 16px; line-height: 1.5; color: var(--cream-dim); }
@media (max-width: 640px) { .hero-title { font-size: 34px; } }

.pool-note { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); }
/* mixer step: PLAY + actions at the top of the page */
.mixer-topbar { display: flex; align-items: center; gap: 14px; margin: 6px 0 10px; flex-wrap: wrap; }
.mixer-topbar .topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.mixer-topbar .add-fold { max-width: none; margin: 0; }
.mixer-topbar .add-fold > summary { padding: 7px 10px; }
.mixer-topbar .add-fold .add-song { position: absolute; z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.pool-note-row { margin: 0 0 12px; }
/* step nav + mode badge (where am I: train or test) */
.step-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.mode-badge {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 2px;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
}
.mode-badge.train { color: var(--gold-soft); border-color: var(--gold); }
.mode-badge.test { color: var(--red-soft); border-color: var(--red); }
.ex-head .mode-badge { margin-right: 4px; }

/* step 1 — mode cards */
.mode-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  max-width: 760px; margin: 8px auto 0;
}
.mode-card {
  text-align: left; cursor: pointer; border: 1px solid var(--line);
  background: var(--panel2); border-radius: 14px; padding: 26px 24px;
  display: flex; flex-direction: column; gap: 12px; transition: all .12s;
}
.mode-card:hover { border-color: var(--cream-dim); transform: translateY(-2px); }
.mode-card.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.mcd-name {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 22px; letter-spacing: 0.5px; color: var(--cream);
}
.mcd-desc { font-size: 14px; line-height: 1.5; color: var(--cream-dim); }
.mode-go { text-align: center; margin: 26px 0 0; }
.mode-go .go-btn:disabled { opacity: .4; cursor: not-allowed; }
.back-link {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: 1px; padding: 0 0 8px;
}
.back-link:hover { color: var(--cream-dim); }
@media (max-width: 640px) { .mode-cards { grid-template-columns: 1fr; } }

/* start bar — top-left, above the gallery */
.startbar {
  display: flex; align-items: flex-end; gap: 16px; justify-content: flex-start;
  margin: 0 0 18px; flex-wrap: wrap;
}
.startbar .go-btn { align-self: flex-end; }

/* add-your-own-song, tucked under a disclosure */
.add-fold { max-width: 760px; margin: 18px auto 0; }
.add-fold > summary {
  cursor: pointer; font-family: var(--mono); font-size: 12px; letter-spacing: 1px;
  color: var(--muted); list-style: none; text-align: center; padding: 8px;
}
.add-fold > summary::-webkit-details-marker { display: none; }
.add-fold > summary:hover { color: var(--cream-dim); }
.add-fold .add-song { margin-top: 12px; }

/* per-stem controls on the mix stage */
.msf-ctl { display: flex; gap: 5px; align-items: center; justify-content: center; }
.mute-btn {
  width: 22px; height: 20px; border-radius: 5px; cursor: pointer;
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted);
  font-family: var(--mono); font-size: 10px; font-weight: 800;
}
.mute-btn.on { background: var(--red); border-color: var(--red); color: #fff; }
.msf.muted .track { opacity: .4; }

/* VS A FRIEND cards */
.vs-card .big { font-size: 40px; }
.vs-scores { display: flex; align-items: center; justify-content: center; gap: 26px; margin: 14px 0; }
.vs-col { text-align: center; }
.vs-label { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--muted); margin-bottom: 4px; }
.vs-col .big { font-family: var(--mono); font-size: 48px; font-weight: 800; color: var(--cream); }
.vs-vs { font-family: var(--display); font-weight: 800; color: var(--muted); font-size: 18px; }
.vs-winner {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 22px; letter-spacing: 1px; color: var(--gold-soft); margin: 6px 0 4px;
}

/* history top bar + clear button */
.hist-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.clear-hist-btn {
  background: var(--panel2); border: 1px solid var(--red); color: var(--red-soft);
  border-radius: 8px; padding: 9px 16px; cursor: pointer; font-size: 12px;
  font-family: var(--mono); letter-spacing: 1px; white-space: nowrap;
}
.clear-hist-btn:hover { background: var(--red); color: #fff; }
.hist-back-btn {
  background: var(--panel2); border: 1px solid var(--line); color: var(--cream);
  border-radius: 8px; padding: 9px 16px; cursor: pointer; font-size: 12px;
  font-family: var(--mono); letter-spacing: 1px; white-space: nowrap;
}
.hist-back-btn:hover { background: var(--panel); border-color: var(--gold); color: var(--gold-soft); }

/* refine: green target mark on each fader (the master's correct level) */
.msf .track .target {
  position: absolute; left: 2px; right: 2px; height: 3px; transform: translateY(-50%);
  background: var(--green); box-shadow: 0 0 6px rgba(79,196,127,.6); z-index: 1; border-radius: 2px;
}

/* BY MIXER / BY GENRE toggle */
.pick-toggle { display: inline-flex; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pick-toggle .pt {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px; padding: 7px 14px;
}
.pick-toggle .pt.active { background: var(--gold); color: #141418; font-weight: 800; }
/* genre cards — big centered label on a color block */
.mixer-card.genre-card { display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--mono-bg), #16161c); }
.mixer-card.genre-card .mc-name {
  position: static; text-align: center; font-family: var(--display); font-weight: 800;
  text-transform: uppercase; font-size: 20px; letter-spacing: 1px; bottom: auto;
}
.mixer-card.genre-card .mc-count { left: 0; right: 0; text-align: center; }

/* home fits one screen — no page scroll; galleries scroll internally */
#library.active { display: flex; flex-direction: column; height: calc(100vh - 62px); }
#library .hero { margin: 18px auto 14px; }
#library .hero-title { font-size: 34px; }
#library .split-pick.half { flex: 1 1 auto; min-height: 0; }
#library .split-col { height: 100%; display: flex; flex-direction: column; min-height: 0; }
#library .split-gal {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 6px;
  align-content: start; grid-auto-rows: 150px; scrollbar-gutter: stable;
}
/* fixed card height in the split galleries — deterministic rows, no overlap */
#library .split-gal .mixer-card { aspect-ratio: auto; height: 150px; }
#library .genre-gal { grid-auto-rows: 110px; }
#library .genre-gal .mixer-card { height: 110px; }
#library .play-bar { flex: 0 0 auto; margin: 0; padding: 12px 0 4px; }

/* split home: BY MIXER | BY GENRE — exactly half & half */
.split-pick { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 24px; align-items: start; }
.split-col { min-width: 0; }
.split-div { background: var(--line); align-self: stretch; }
.split-head {
  font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: var(--cream-dim);
  text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px;
}
.split-head .count-inline { font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.split-gal { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
/* genre cards: clean typographic blocks, no emoji — strong hierarchy */
.genre-gal { grid-template-columns: 1fr 1fr; gap: 12px; }
.genre-gal .mixer-card { aspect-ratio: 3 / 2; }
.genre-gal .mc-mono { display: none; }
.mixer-card.genre-card {
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
  background: linear-gradient(145deg, var(--mono-bg), #15151b);
}
.mixer-card.genre-card .mc-grad { display: none; }
.mixer-card.genre-card .mc-name {
  position: static; text-align: left; font-family: var(--display); font-weight: 800;
  text-transform: uppercase; font-size: 22px; letter-spacing: 0.5px; line-height: 1; bottom: auto;
}
.mixer-card.genre-card .mc-count { position: static; margin-top: 4px; left: auto; }
@media (max-width: 760px) { .split-pick { grid-template-columns: 1fr; } .split-div { display: none; } }

/* hamburger menu */
.hamburger { background: none; border: none; color: var(--cream); font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1; }
.menu-pop {
  position: absolute; top: 56px; left: 16px; z-index: 60; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 12px 34px rgba(0,0,0,.6);
  display: flex; flex-direction: column; min-width: 220px;
}
.menu-item {
  background: none; border: none; color: var(--cream-dim); text-align: left; cursor: pointer;
  font-size: 14px; padding: 11px 14px; border-radius: 8px;
}
.menu-item:hover { background: var(--panel2); color: var(--cream); }

/* home song count + add-your-own */
.lib-count { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 22px auto 0; max-width: 760px; }
.lib-count #songCount { font-family: var(--mono); font-size: 13px; letter-spacing: 1px; color: var(--muted); }
.add-own-btn {
  background: none; border: 1px dashed var(--gold); color: var(--gold-soft);
  border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 12px;
  font-family: var(--mono); letter-spacing: 1px;
}
.add-own-btn:hover { background: rgba(232,184,75,.1); }
.add-card { max-width: 560px; text-align: left; position: relative; }
.add-card h1 { color: var(--cream); }
.add-card p { color: var(--cream-dim); font-size: 14px; margin: 8px 0 16px; }
.add-card .add-song { display: flex; gap: 8px; }
.add-card .add-song input { flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--cream); border-radius: 8px; padding: 11px 14px; font-size: 14px; }
.add-card .add-song select { background: var(--panel2); border: 1px solid var(--line); color: var(--cream-dim); border-radius: 8px; padding: 0 10px; font-family: var(--mono); font-size: 12px; }
.add-card #fetchBtn { background: var(--gold); color: #141418; border: none; border-radius: 8px; padding: 0 20px; font-weight: 800; font-family: var(--mono); letter-spacing: 1px; cursor: pointer; }
.add-note { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 10px; }
.link-inline { background: none; border: none; color: var(--gold-soft); cursor: pointer; text-decoration: underline; font-family: var(--mono); font-size: 11px; padding: 0; }

/* rating (Lichess-style) */
.rating-badge {
  margin-left: auto; font-family: var(--mono); font-size: 14px; color: var(--gold-soft);
  border: 1px solid var(--gold); border-radius: 8px; padding: 6px 12px; letter-spacing: 1px;
}
.rating-badge b { color: var(--cream); font-weight: 800; }
.rating-line { font-family: var(--mono); font-size: 14px; color: var(--cream-dim); margin: 8px 0; }
.rating-line b { color: var(--cream); }
.rating-line .rd { font-weight: 800; margin-left: 4px; }
.rating-line .rd.up { color: var(--green); }
.rating-line .rd.down { color: var(--red-soft); }
.kpi.rating-kpi .v { color: var(--gold-soft); }

/* practice stem picker */
.stem-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.stem-pick button {
  background: var(--panel2); border: 1px solid var(--line); color: var(--cream);
  border-radius: 8px; padding: 11px 16px; cursor: pointer; font-size: 13px;
  font-family: var(--mono); letter-spacing: 1px;
}
.stem-pick button:hover { border-color: var(--gold); color: var(--gold-soft); }

/* Stats: balance-tendency rows */
.bar-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 13px; }
.bar-row:last-child { border-bottom: none; }
.bar-row .bl { width: 110px; color: var(--muted); letter-spacing: 1px; }
.bar-row .dev-scale { flex: 1; }
.bar-row .bv { width: 130px; text-align: right; }
.bar-row .bv.exact { color: var(--green); }
.bar-row .bv.hot { color: var(--red-soft); }
.bar-row .bv.low { color: var(--gold-soft); }
/* Distance-based colour: near→green, mid→orange, far→red */
.bar-row .bv.near { color: var(--green); }
.bar-row .bv.mid { color: #ffb24d; }
.bar-row .bv.far { color: var(--red-soft); }

/* Stats: your-mixes list */
.run-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.run-row:last-child { border-bottom: none; }
.run-score { font-family: var(--mono); font-size: 28px; font-weight: 800; color: var(--cream); width: 54px; text-align: center; font-variant-numeric: tabular-nums; }
.run-score.exact { color: var(--green); }
.run-meta { display: flex; flex-direction: column; min-width: 150px; }
.run-song { font-size: 14px; font-weight: 700; color: var(--cream); }
.run-when { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.run-stems { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.run-stem { display: flex; flex-direction: column; align-items: center; font-family: var(--mono); min-width: 80px;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.run-stem b { font-size: 10px; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.run-stem em { font-style: normal; font-size: 14px; font-weight: 800; margin-top: 2px; }
.run-stem.exact { border-color: var(--green); } .run-stem.exact em { color: var(--green); }
.run-stem.hot { border-color: rgba(224,68,56,.5); } .run-stem.hot em { color: var(--red-soft); }
.run-stem.low { border-color: rgba(232,184,75,.5); } .run-stem.low em { color: var(--gold-soft); }
/* Distance-based colour (sign carries direction): near→green, mid→orange, far→red.
   Filled tint + bold border + matching value so the three states read instantly. */
.run-stem.near { border-color: var(--green); background: rgba(79,196,127,.14); }
.run-stem.near em { color: var(--green); }
.run-stem.mid { border-color: #ff9f1c; background: rgba(255,159,28,.15); }
.run-stem.mid em { color: #ffb24d; }
.run-stem.far { border-color: var(--red); background: rgba(224,68,56,.16); }
.run-stem.far em { color: var(--red-soft); }

/* ===================== Mastery panel (genre / mixer) ===================== */
.mas-block { margin-bottom: 18px; }
.mas-block:last-child { margin-bottom: 0; }
.mas-h { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 10px; }
.mas-row { display: flex; flex-wrap: wrap; gap: 10px; }
.mas-chip {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px;
  background: var(--panel2); min-width: 118px; display: flex; flex-direction: column; gap: 3px;
}
.mas-chip .mas-name { font-size: 13px; color: var(--cream); font-weight: 600; }
.mas-chip small { font-family: var(--mono); font-size: 11px; color: var(--cream-dim); }
.mas-chip.near { border-color: var(--green); background: rgba(79,196,127,.12); }
.mas-chip.near .mas-name { color: var(--green); }
.mas-chip.far { border-color: var(--red); background: rgba(224,68,56,.13); }
.mas-chip.far .mas-name { color: var(--red-soft); }
.mas-cover { margin-top: 12px; font-size: 13px; color: var(--cream-dim); }
.mas-cover small { color: var(--muted); }

/* Trend badges — "up" always means getting better (score up / error down) */
.trend { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .5px; white-space: nowrap; }
.trend.up { color: var(--green); }
.trend.down { color: var(--red-soft); }
.trend.flat { color: var(--muted); }
.trend-slot { margin-left: 6px; }

/* Inline payout on the score card — pay + rep, part of the score moment */
.ms-payout { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center;
  margin: 2px 0 8px; font-family: var(--mono); font-size: 13px; }
.ms-payout[hidden] { display: none; }
.ms-payout span { color: var(--gold-soft); }

/* ===================== PRESS — recognition feed ===================== */
.press-btn { position: relative; appearance: none; -webkit-appearance: none;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 9px;
  font-size: 16px; line-height: 1; padding: 7px 9px; cursor: pointer; margin-right: 8px; }
.press-btn:hover { border-color: var(--gold); }
.press-badge { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff;
  font: 700 10px/17px var(--mono); text-align: center; }
.press-badge[hidden] { display: none; }

/* feed rows */
#pressList { display: flex; flex-direction: column; gap: 8px; }
.clip-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.clip-row:hover { border-color: var(--gold); }
.clip-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; margin-top: 5px;
  background: transparent; border: 1px solid var(--muted); }
.clip-row.unread .clip-dot { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 8px rgba(232,184,75,.5); }
.clip-row.unread .clip-row-head { color: var(--cream); font-weight: 700; }
.clip-row-outlet { font: 700 11px/1.4 var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-soft); }
.clip-row-head { color: var(--cream-dim); font-size: 15px; margin-top: 2px; }
.clip-star { color: var(--gold); }

/* clipping read modal — a focused "press cutting" moment */
.clip-overlay { position: fixed; inset: 0; background: rgba(8,8,10,.82); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.clip-overlay[hidden] { display: none; }
.clip-card { position: relative; background: linear-gradient(180deg, #f3ead6, #e6dcc4);
  color: #1a160e; max-width: 460px; width: 100%; border-radius: 10px; padding: 30px 32px 26px;
  box-shadow: 0 24px 80px rgba(0,0,0,.7); animation: dock-in-b .4s cubic-bezier(.2,.9,.3,1.3); }
.clip-card .result-close { color: #6b6150; }
.clip-outlet { font: 800 13px/1 var(--mono); letter-spacing: 3px; text-transform: uppercase; color: #a8321f; text-align: center; }
.clip-rule { height: 2px; background: #1a160e; margin: 10px 0 16px; opacity: .8; }
.clip-headline { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.15; text-align: center; margin-bottom: 14px; }
.clip-body { font-size: 15.5px; line-height: 1.6; color: #2a2318; }
.clip-card .gig-later { margin: 20px auto 0; display: block; background: #1a160e; color: var(--cream); border: none; }

/* Tier-3 MILESTONE — the rare, big moment (rocket, not pistol) */
.clip-card.milestone { border: 2px solid var(--gold); box-shadow: 0 0 0 6px rgba(232,184,75,.25), 0 24px 90px rgba(0,0,0,.75), 0 0 60px rgba(232,184,75,.4); animation: milestone-in .5s cubic-bezier(.2,.9,.3,1.3); }
.clip-card.milestone::before { content: "★ CAREER MILESTONE ★"; display: block; text-align: center;
  font: 800 11px/1 var(--mono); letter-spacing: 3px; color: #a8321f; margin: -6px 0 14px; }
@keyframes milestone-in { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* Decision embedded in a big clipping (artistic integrity vs commercial buzz) */
.clip-choice { margin-top: 18px; border-top: 1px dashed #b3a88e; padding-top: 16px; }
.clip-choice[hidden] { display: none; }
.clip-choice-prompt { font-weight: 700; font-size: 15px; color: #1a160e; margin-bottom: 12px; text-align: center; }
.clip-choice-opts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.clip-choice-opts .gig-accept { background: #1a160e; color: var(--cream); }
.clip-result { font-style: italic; font-size: 15px; line-height: 1.55; color: #2a2318; text-align: center;
  background: rgba(26,22,14,.06); border-radius: 8px; padding: 12px 14px; }

/* Studio → Shop door, and the Shop screen intro */
.shop-cta { appearance: none; -webkit-appearance: none; display: block; width: 100%;
  margin: 18px 0 4px; background: var(--gold); color: #10140f; border: none;
  border-radius: 12px; padding: 15px 20px; font-weight: 800; font-size: 15px;
  cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,.35); }
.shop-cta:hover { background: var(--gold-soft); }
.shop-intro { color: var(--cream-dim); font-size: 14px; margin: 4px 0 16px; }

/* Career hub banner on the studio screen */
.st-hub { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 4px; }
.st-hub[hidden] { display: none; }
.hub-scene, .hub-rent {
  font-family: var(--mono); font-size: 12px; color: var(--cream-dim);
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px;
}
.hub-move {
  font-size: 13px; font-weight: 600; color: #0f0f14; background: var(--gold);
  border: none; border-radius: 9px; padding: 8px 15px; cursor: pointer; margin-left: auto;
}
.hub-move:hover { background: var(--gold-soft); }

/* START MIXING pinned to the TOP-LEFT corner of the home (hero stays centred) */
#library { position: relative; }
/* Pinned left, vertically aligned with the hero title line and flush with the
   mixer column's left edge — reads as one intentional row with the centred hero. */
#library .play-bar.left { position: absolute; top: 40px; left: 28px; z-index: 5; margin: 0; padding: 0; min-height: 0; }
#library .play-bar.left .go-btn { padding: 12px 30px; font-size: 14px; }

/* ===================== MY STUDIO — reward meta-game ===================== */
#studio.active { display: block; }
.st-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.st-back { background: var(--panel2); border: 1px solid var(--line); color: var(--cream); width: 36px; height: 36px; border-radius: 9px; font-size: 18px; cursor: pointer; }
.st-h1 { font-size: 15px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.st-pts { margin-left: auto; font-size: 13px; color: var(--cream-dim); }
.st-pts b { color: var(--gold-soft); }
.st-hero { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/8; background: #000; }
.st-hero img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.05); }
.st-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,12,.55) 0%, rgba(10,10,12,0) 32%, rgba(10,10,12,.80) 100%); }
.st-tl { position: absolute; left: 24px; top: 20px; }
.st-tier { font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: .3px; text-shadow: 0 2px 14px rgba(0,0,0,.7); }
.st-tag { display: inline-block; margin-top: 6px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-soft); border: 1px solid var(--gold); border-radius: 5px; padding: 2px 8px; background: rgba(0,0,0,.35); }
.st-status { position: absolute; left: 24px; right: 24px; bottom: 20px; }
.st-role { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-soft); }
.st-headline { font-size: 20px; font-weight: 700; margin-top: 4px; text-shadow: 0 2px 14px rgba(0,0,0,.85); max-width: 720px; }
.st-journeys { display: flex; align-items: center; gap: 8px; margin: 14px 0 2px; }
.st-journeys .jl { font-size: 11px; color: var(--muted); }
.arch { font-size: 11px; color: var(--cream-dim); border: 1px solid var(--line); border-radius: 20px; padding: 4px 12px; cursor: pointer; }
.arch.on { border-color: var(--gold); color: var(--gold-soft); }
.st-journey { display: flex; gap: 0; margin: 14px 0 4px; overflow-x: auto; padding-bottom: 6px; }
.st-journey .beat { flex: 0 0 auto; width: 150px; padding: 0 10px; position: relative; }
.st-journey .beat .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--panel2); border: 2px solid var(--line); margin-bottom: 8px; }
.st-journey .beat::before { content: ""; position: absolute; left: -65px; top: 6px; width: 130px; height: 2px; background: var(--line); }
.st-journey .beat:first-child::before { display: none; }
.st-journey .beat.done .dot { background: var(--green); border-color: var(--green); }
.st-journey .beat.done::before { background: var(--green); }
.st-journey .beat.now .dot { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(232,184,75,.22); }
.st-journey .beat.now::before { background: linear-gradient(90deg, var(--green), var(--gold)); }
.st-journey .beat .bt { font-size: 11px; font-weight: 700; line-height: 1.25; }
.st-journey .beat.now .bt { color: var(--gold-soft); }
.st-journey .beat .bs { font-size: 10px; color: var(--muted); margin-top: 2px; }
.st-journey .beat.locked { opacity: .45; }
.st-h2 { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 20px 0 12px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.st-item { background: var(--panel2); border: 1px solid var(--line); border-radius: 11px; padding: 12px; position: relative; }
.st-item .cat { font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.st-item .nm { font-size: 13px; font-weight: 700; margin-top: 3px; line-height: 1.25; }
.st-item.owned { border-color: var(--green); background: rgba(79,196,127,.08); }
.st-item.owned .tick { position: absolute; top: 9px; right: 10px; color: var(--green); font-size: 13px; }
.st-item.next { border-color: var(--gold); }
.st-item.next .need { font-size: 10px; color: var(--gold-soft); margin-top: 6px; }
.st-item.locked { opacity: .4; }
/* clickable score → studio */
.ms-score.clickable { cursor: pointer; }
.ms-score.clickable:hover { color: var(--gold-soft); }
.run-score.clickable { cursor: pointer; }
.run-score.clickable:hover { color: var(--gold-soft); }
/* in-play unlock popup */
.studio-toast { position: fixed; right: 22px; bottom: 22px; max-width: 340px; background: var(--panel); border: 1px solid var(--gold); border-left: 4px solid var(--gold); border-radius: 12px; padding: 14px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.55); transform: translateY(160%); transition: transform .45s cubic-bezier(.2,.9,.3,1.3); z-index: 60; }
.studio-toast.show { transform: translateY(0); }
.studio-toast .k { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-soft); }
.studio-toast .t { font-size: 15px; font-weight: 700; margin-top: 3px; }
.studio-toast .d { font-size: 12px; color: var(--cream-dim); margin-top: 4px; line-height: 1.4; }

/* ===================== THE SHOP (money economy) ===================== */
.wallet { margin-left: auto; display: flex; align-items: center; gap: 10px; background: linear-gradient(180deg, #2a2616, #1d1d24); border: 1px solid var(--gold); border-radius: 12px; padding: 7px 16px; }
.wallet .wlab { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.wallet .wamt { font-size: 22px; font-weight: 800; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.st-cat { margin: 24px 0 6px; font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold-soft); }
.shelf { position: relative; padding: 10px 0 24px; overflow-x: auto; }
.shelf-row { display: flex; gap: 18px; perspective: 900px; padding: 8px 2px 0; }
.shelf-line { height: 14px; margin-top: -2px; border-radius: 0 0 8px 8px; background: linear-gradient(180deg, #3a3026, #241c14); box-shadow: 0 10px 20px rgba(0,0,0,.5); }
.prod { flex: 0 0 172px; background: linear-gradient(180deg, #262630, #1a1a20); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; transform: rotateX(6deg); transform-origin: bottom center; transition: transform .18s, box-shadow .18s, border-color .18s; }
.prod:hover { transform: rotateX(0deg) translateY(-6px); box-shadow: 0 16px 34px rgba(0,0,0,.55); border-color: var(--gold); }
.prod-img { height: 92px; border-radius: 8px; overflow: hidden; background: #0e0e12; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-icon { width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 40px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.prod-tier { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.prod-nm { font-size: 13px; font-weight: 700; line-height: 1.25; min-height: 33px; margin-top: 2px; }
.prod-price { margin-top: 7px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--gold-soft); }
.prod.owned { border-color: var(--green); background: linear-gradient(180deg, #1e2a22, #161b17); }
.prod.owned .prod-price { color: var(--green); }
.prod.cant { opacity: .55; }
.prod.cant .prod-price { color: var(--red-soft); }
/* Deep-link pulse: the mentor pointed you at this exact item. */
.prod.pulse { animation: prod-pulse 1.1s ease-in-out 3; border-color: var(--gold); }
@keyframes prod-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,184,75,0); }
  50% { box-shadow: 0 0 0 4px rgba(232,184,75,.55), 0 10px 30px rgba(232,184,75,.25); transform: rotateX(6deg) scale(1.04); }
}
/* buy drawer */
.buybar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(170%); transition: transform .35s cubic-bezier(.2,.9,.3,1.3); background: var(--panel); border: 1px solid var(--gold); border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.6); z-index: 60; min-width: 440px; max-width: 92vw; }
.buybar.show { transform: translateX(-50%) translateY(0); }
.buybar .bb-icon { font-size: 26px; }
.buybar .bb-txt { display: flex; flex-direction: column; }
.buybar .bb-nm { font-weight: 800; font-size: 15px; }
.buybar .bb-fl { font-size: 12px; color: var(--cream-dim); }
.buybar button { margin-left: auto; border: none; border-radius: 10px; padding: 11px 22px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.buybar .bb-ok { background: var(--green); color: #10140f; }
.buybar .bb-no { background: var(--panel2); color: var(--red-soft); border: 1px solid var(--red); cursor: not-allowed; }

/* ---- Your rig (owned gear in the studio) ---- */
.st-h2-sub { font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: none; margin-left: 8px; }
.rig-empty { color: var(--muted); font-size: 13px; background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; padding: 18px 20px; }
.rig-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; }
.rig-item { flex: 0 0 120px; background: linear-gradient(180deg, #1e2a22, #161b17); border: 1px solid var(--green); border-radius: 11px; padding: 9px; }
.rig-img { height: 66px; border-radius: 7px; overflow: hidden; background: #0e0e12; display: flex; align-items: center; justify-content: center; margin-bottom: 7px; }
.rig-img img { width: 100%; height: 100%; object-fit: cover; }
.rig-icon { width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 30px; }
.rig-nm { font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--cream); }
.rig-item.pop { animation: rig-pop .6s cubic-bezier(.2,.9,.3,1.4); box-shadow: 0 0 0 2px var(--green), 0 10px 26px rgba(79,196,127,.3); }
@keyframes rig-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

/* ---- fader lasso multi-select ---- */
.msf-marquee { position: absolute; border: 1.5px dashed var(--gold); background: rgba(232,184,75,.12); border-radius: 6px; pointer-events: none; z-index: 5; }
.msf.selected .track { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232,184,75,.5); }
.msf.selected .name { color: var(--gold-soft); }
/* buy-drawer close */
.bb-close { background: var(--panel2) !important; color: var(--muted) !important; border: 1px solid var(--line) !important; border-radius: 8px !important; width: 34px; padding: 9px 0 !important; margin-left: 8px; font-weight: 700; }
.bb-close:hover { color: var(--cream) !important; }

/* ---- studio location + window view ---- */
.st-loc { margin-top: 16px; }
.st-view { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); height: 170px; background: #0e0e12; }
.st-view img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-view-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,12,.1) 40%, rgba(10,10,12,.8) 100%); }
.st-view-label { position: absolute; left: 18px; bottom: 14px; font-size: 16px; font-weight: 700; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.st-view-label b { color: var(--gold-soft); }
.st-view-label span { color: var(--cream-dim); font-weight: 500; }
.st-loc-h { margin: 16px 0 10px !important; }
.st-loc-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.loc-card { flex: 0 0 128px; cursor: pointer; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--panel2); transition: border-color .15s, transform .15s; }
.loc-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.loc-card.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.loc-thumb { height: 72px; background: #0e0e12; }
.loc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.loc-city { font-size: 12px; font-weight: 700; padding: 7px 10px 0; }
.loc-view { font-size: 10px; color: var(--muted); padding: 1px 10px 9px; }
/* view fallback gradient when scenery image is missing */
.st-view { background: linear-gradient(135deg, #2a2440, #16161b 60%, #1d2a33); }

/* ===================== SIDE DOCKS (coach = left, world = right) =====================
   Non-blocking slide-in cards. The score/stats in the centre stay fully visible
   and clickable — the overlay layer itself passes pointer events through; only
   the card catches them. RIGHT = the world (gigs, mix-offs, moves); add .left
   for the coach (Director's development nudges). */
.gig-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: auto; width: min(360px, 94vw);
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 18px 22px;
  z-index: 82; pointer-events: none; background: none; }
.gig-overlay.left { right: auto; left: 0; justify-content: flex-start; }
.gig-overlay[hidden] { display: none; }
.gig-card { pointer-events: auto; background: linear-gradient(180deg, #221c10, #1a1a20);
  border: 1px solid var(--gold); border-left: 4px solid var(--gold); border-radius: 16px;
  padding: 20px 22px; max-width: 340px; text-align: left; max-height: 82vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: dock-in-r .42s cubic-bezier(.2,.9,.3,1.3); }
.gig-overlay.left .gig-card { border-left: 1px solid var(--blue); border-right: 4px solid var(--blue);
  animation-name: dock-in-l; }
.gig-overlay.left .gig-kicker, .gig-overlay.left .gig-note b { color: var(--blue); }
@keyframes dock-in-r { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dock-in-l { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
.gig-env { font-size: 34px; }
.gig-kicker { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-soft); margin-top: 6px; }
.gig-artist { font-family: var(--display); font-weight: 800; font-size: 21px; margin: 3px 0 10px; }
.gig-msg { font-size: 14px; line-height: 1.5; color: var(--cream); font-style: italic; }
.gig-quote { font-size: 16px; line-height: 1.45; color: var(--cream); font-style: italic; margin: 5px 0 12px; }
.gig-note { font-size: 12px; color: var(--cream-dim); margin: 12px 0 16px; line-height: 1.5; }
.gig-note b { color: var(--gold-soft); }
.gig-paid { font-size: 15px; font-weight: 800; color: var(--gold-soft); margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.gig-actions { display: flex; gap: 10px; justify-content: flex-start; flex-wrap: wrap; }
/* appearance:none is REQUIRED — Safari's native button chrome otherwise
   suppresses the custom background on a border:none button, leaving dark text
   on the dark card (invisible). box-shadow gives the pill a definite edge. */
.gig-accept { appearance: none; -webkit-appearance: none; background: var(--gold); color: #10140f; border: none; border-radius: 11px; padding: 12px 22px; font-weight: 800; font-size: 14px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.gig-overlay.left .gig-accept { background: var(--blue); color: #08141c; }
.gig-accept:hover { filter: brightness(1.08); }
.gig-later { appearance: none; -webkit-appearance: none; background: var(--panel2); color: var(--cream-dim); border: 1px solid var(--line); border-radius: 11px; padding: 12px 16px; font-weight: 600; cursor: pointer; }
/* On a phone, dock to the bottom full-width instead of the side. */
@media (max-width: 620px) {
  .gig-overlay, .gig-overlay.left { top: auto; left: 0; right: 0; width: auto; justify-content: center;
    align-items: flex-end; padding: 0 10px 12px; }
  .gig-card { max-width: none; width: 100%; animation-name: dock-in-b; }
}
@keyframes dock-in-b { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
/* distinct mix stage for a real gig */
#mixsongStage.gig { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 40px rgba(232,184,75,.12); }
#mixsongStage.gig .ms-head #msSong { color: var(--gold-soft); }
#mixsongStage.gig #msAnchor { color: var(--gold-soft); border-color: var(--gold); }

/* ---- Your studio: a room assembled from your gear ---- */
.studio-scene {
  display: grid; gap: 12px;
  grid-template-columns: 190px 1fr 210px;
  grid-template-areas: "wall wall wall" "mics desk rack" "inst inst inst";
  background: linear-gradient(180deg, #241d33 0%, #1a1a20 44%, #17140f 100%);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px;
}
.sz { background: rgba(0,0,0,.18); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.sz-wall { grid-area: wall; } .sz-mics { grid-area: mics; } .sz-desk { grid-area: desk; } .sz-rack { grid-area: rack; } .sz-inst { grid-area: inst; }
.sz-desk { background: linear-gradient(180deg, rgba(44,38,30,.55), rgba(20,18,14,.55)); border-color: #3a3328; }
.sz-rack { background: #121218; border-color: #2a2a33; }
.sz-label { font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 9px; opacity: .85; }
.sz-items { display: flex; flex-wrap: wrap; gap: 9px; min-height: 42px; align-content: flex-start; }
.sz-rack .sz-items { flex-direction: column; flex-wrap: nowrap; }
.sz-empty { color: #4d4d57; font-size: 11px; font-style: italic; }
.scene-tile { width: 82px; display: flex; flex-direction: column; }
.scene-tile img { width: 82px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid #2d2d38; background: #0e0e12; }
.scene-ic { width: 82px; height: 54px; display: none; align-items: center; justify-content: center; font-size: 26px; border-radius: 8px; border: 1px solid #2d2d38; background: #0e0e12; }
.scene-nm { font-size: 9px; line-height: 1.15; color: var(--cream-dim); margin-top: 4px; max-height: 22px; overflow: hidden; }
.sz-rack .scene-tile { width: 100%; flex-direction: row; align-items: center; gap: 8px; }
.sz-rack .scene-tile img, .sz-rack .scene-tile .scene-ic { width: 54px; height: 32px; flex: 0 0 54px; }
.sz-rack .scene-nm { margin-top: 0; max-height: none; }
.scene-tile.pop { animation: rig-pop .6s cubic-bezier(.2,.9,.3,1.4); }
.scene-hint { grid-area: desk; color: var(--cream-dim); font-size: 13px; align-self: center; line-height: 1.5; }
@media (max-width: 760px) { .studio-scene { grid-template-columns: 1fr; grid-template-areas: "wall" "desk" "mics" "rack" "inst"; } }

/* ---- Stats: progress-over-time chart ---- */
.prog-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--cream-dim); margin-bottom: 8px; }
.prog-head b { color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.prog-svg { display: block; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.prog-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 10px; color: var(--muted); }
.prog-legend .pl-avg { color: var(--gold-soft); }

/* Stats accuracy bar (MAE fill — lower/shorter = better) */
.dev-scale.acc { position: relative; background: var(--panel2); border-radius: 4px; overflow: hidden; }
.dev-scale.acc .ds-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; opacity: .85; }
.dev-scale.acc .ds-fill.near { background: var(--green); }
.dev-scale.acc .ds-fill.mid { background: #ffb24d; }
.dev-scale.acc .ds-fill.far { background: var(--red-soft); }
.bar-row .bv small { color: var(--muted); font-weight: 400; }

/* Balance tendency: centred target axis (left=too low, right=too hot) */
.bar-axis { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; font-family: var(--mono); }
.bar-axis .bl { width: 110px; } .bar-axis .bv { width: 130px; }
.bar-axis .ax { flex: 1; display: flex; justify-content: space-between; align-items: center; font-size: 9px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.bar-axis .ax-c { color: var(--cream-dim); font-weight: 700; }
.dev-scale.centered { position: relative; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(224,68,56,.14), rgba(79,196,127,.16) 50%, rgba(224,68,56,.14)); }
.dev-scale.centered .ds-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--cream); transform: translateX(-1px); border-radius: 1px; }
.dev-scale.centered .ds-you { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid var(--bg); box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.dev-scale.centered .ds-you.near { background: var(--green); }
.dev-scale.centered .ds-you.far { background: var(--red-soft); }
.bar-row .bv.near { color: var(--green); } .bar-row .bv.far { color: var(--red-soft); }
.prog-legend .pl-avg { color: var(--cream-dim); }

/* Remy's reactive line on the result card */
.remy-line { display: flex; align-items: center; gap: 10px; background: #1a1a20; border: 1px solid var(--gold); border-radius: 12px; padding: 10px 14px; margin: 12px auto; max-width: 480px; text-align: left; font-size: 14px; line-height: 1.4; }
.remy-line .remy-av { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #10140f; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 13px; }
#msRemyText { color: var(--cream); }

/* Client roster (relationships) */
.st-roster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 2px; }
.st-roster .rost-lbl { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.st-roster .rost-chip { font-size: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 20px; padding: 4px 11px; color: var(--cream-dim); }
.st-roster .rost-chip b { color: var(--gold-soft); }

/* Deliberate-practice nudge (drill your weakest stem) */
.weak-drill { display: flex; align-items: center; gap: 12px; background: #1a1a20; border: 1px solid var(--gold); border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; }
.weak-drill .wd-txt { flex: 1; font-size: 14px; line-height: 1.4; color: var(--cream-dim); }
.weak-drill .wd-txt b { color: var(--cream); }
.weak-drill .drill-btn { flex: 0 0 auto; background: var(--gold); color: #10140f; border: none; border-radius: 10px; padding: 11px 18px; font-weight: 800; font-size: 14px; cursor: pointer; }
.weak-drill .drill-btn:hover { background: var(--gold-soft); }

/* Career perks (points / room / passive income) */
.st-perks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 2px; }
.st-perks .perk-lbl { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.st-perks .perk-chip { font-size: 12px; background: linear-gradient(180deg,#2a2616,#1d1d24); border: 1px solid var(--gold); border-radius: 20px; padding: 4px 11px; color: var(--gold-soft); }
.st-perks .room-btn { font-size: 12px; background: var(--gold); color: #10140f; border: none; border-radius: 20px; padding: 5px 14px; font-weight: 800; cursor: pointer; }
.st-perks .room-btn.dim { opacity: .5; cursor: not-allowed; }

/* Shootout ranked board */
.so-board { text-align: left; margin: 2px auto 0; max-width: 320px; font-size: 14px; }
.so-board .so-row { display: flex; justify-content: space-between; padding: 5px 10px; border-radius: 7px; color: var(--cream-dim); }
.so-board .so-row b { color: var(--cream); font-variant-numeric: tabular-nums; }
.so-board .so-row.you { background: rgba(232,184,75,.14); border: 1px solid var(--gold); color: var(--gold-soft); }
.so-board .so-row.you b { color: var(--gold-soft); }
.weak-drill .drill-btn.alt { background: var(--panel2); color: var(--cream); border: 1px solid var(--gold); }
.weak-drill .drill-btn.alt:hover { background: #2c2c35; }

/* ===================== CAREER — character creation (wizard) ============== */
.cc-card{
  max-width:560px; width:92vw; text-align:left;
  max-height:92vh; overflow-y:auto;
}
.cc-dots{ display:flex; gap:7px; margin-bottom:22px; }
.cc-dot{
  width:28px; height:4px; border-radius:2px; background:var(--line);
  transition:background .15s;
}
.cc-dot.done{ background:var(--red); opacity:.5; }
.cc-dot.on{ background:var(--red); }
.cc-step{ min-height:168px; }
.cc-kick{ color:var(--red-soft); font-size:11px; font-weight:800;
  letter-spacing:2px; text-transform:uppercase; }
.cc-h{ font-family:var(--display); font-size:25px; font-weight:800;
  text-transform:uppercase; letter-spacing:.5px; margin:5px 0 16px; }
.cc-hint{ font-size:13.5px; color:var(--cream-dim); margin:-8px 0 14px; }
.cc-input{
  width:100%; background:var(--panel2); border:1px solid var(--line);
  border-radius:9px; padding:13px 15px; color:var(--cream); font-size:16px;
  font-family:var(--sans);
}
.cc-input:focus{ outline:none; border-color:var(--red); }
.cc-chips{ display:flex; gap:8px; flex-wrap:wrap; }
.cc-chip{
  background:var(--panel2); border:1px solid var(--line); border-radius:20px;
  padding:8px 15px; font-size:13px; color:var(--cream-dim); cursor:pointer;
  font-family:var(--sans); transition:all .12s;
}
.cc-chip:hover{ border-color:var(--muted); color:var(--cream); }
.cc-chip.on{ background:var(--red); border-color:var(--red); color:#fff; font-weight:700; }
.cc-foot{ display:flex; gap:12px; align-items:center; margin-top:22px; }
.cc-back{
  background:none; border:none; color:var(--cream-dim); font-size:14px;
  cursor:pointer; font-family:var(--sans); padding:8px 4px;
}
.cc-back:hover{ color:var(--cream); }
.cc-go{
  flex:1; background:var(--red); color:#fff; font-weight:800;
  text-transform:uppercase; letter-spacing:1px; font-size:14px;
  border:none; border-radius:9px; padding:14px; cursor:pointer; font-family:var(--sans);
}
.cc-go:hover{ background:var(--red-soft); }

/* ---- low-score coaching tip (the method) ---- */
.coach-tip {
  margin-top: 12px; padding: 14px 16px; border-radius: 10px;
  background: rgba(110,165,200,.10); border-left: 3px solid var(--blue);
  font-size: 14px; line-height: 1.55; color: var(--cream);
}
.coach-tip-label {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--blue); font-weight: 800; margin-bottom: 5px;
}

/* ---- onboarding: how a round works (one-time, new players) ---- */
.ob-card { max-width: 560px; width: 92vw; text-align: left; }
.ob-kick { color: var(--red-soft); font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.ob-h { font-family: var(--display); font-size: 24px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; margin: 5px 0 16px; }
.ob-flow { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.ob-row { display: flex; align-items: center; gap: 12px; }
.ob-sec { flex: 0 0 56px; font-family: var(--mono); font-weight: 800; color: var(--gold-soft); font-size: 15px; text-align: right; }
.ob-desc { font-size: 14px; color: var(--cream-dim); }
.ob-desc b { color: var(--cream); }
.ob-controls { font-size: 13.5px; color: var(--cream-dim); line-height: 1.6; border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 18px; }
.ob-controls b { color: var(--cream); }
.ob-go { width: 100%; background: var(--red); color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 14px; border: none; border-radius: 9px; padding: 14px; cursor: pointer; font-family: var(--sans); }
.ob-go:hover { background: var(--red-soft); }

/* ===================== VINTAGE MIXER — the mix channel ===================== */
/* Warm tape-deck faceplate (Oded's cassette palette), inset fader grooves, and
 * 3D fader caps with a per-channel colour. The dark page frames it like a real
 * console dropped onto the desk. */
.ms-faders {
  background: linear-gradient(180deg, #e7ddc6 0%, #d3c4a2 100%);
  border: 1px solid #b7a884; border-radius: 16px;
  padding: 22px 30px 20px; gap: 30px;
  box-shadow:
    inset 0 2px 0 rgba(255,250,235,.65),
    inset 0 -4px 10px rgba(90,70,40,.22),
    0 14px 34px rgba(0,0,0,.48);
}
.ms-faders .msf .name { color: #6b4f3a; }
.ms-faders .msf .db { color: #3a2e22; }
.ms-faders .msf .db i { color: #8a6f52; }
.ms-faders .msf .db-in { background: #2a2620; color: #f0e6d0; border-color: #8a7a5a; }
/* the fader SLOT — an inset groove routed into the faceplate */
.ms-faders .msf .track {
  width: 62px; height: 244px;
  background: linear-gradient(180deg, #2c2822, #39332a);
  border: 1px solid #8a7a5a; border-radius: 8px;
  box-shadow: inset 0 3px 7px rgba(0,0,0,.6), inset 0 -1px 0 rgba(255,245,220,.15);
}
.ms-faders .msf .track::before {
  content: ""; position: absolute; left: 50%; top: 12px; bottom: 12px; width: 4px;
  transform: translateX(-50%); border-radius: 2px;
  background: linear-gradient(180deg, #100f0c, #1c1a15);
  box-shadow: inset 0 0 2px rgba(0,0,0,.85);
}
.ms-faders .msf .zero { background: #d8c08a; opacity: .5; }
/* the 3D fader CAP riding the slot */
.ms-faders .msf .handle {
  left: 6px; right: 6px; height: 36px; border-radius: 6px;
  background: linear-gradient(180deg, #5c5751 0%, #413d37 47%, #2a2723 50%, #4b463f 100%);
  border: 1px solid #1a1814;
  box-shadow: 0 3px 6px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.28);
}
.ms-faders .msf .handle::after {
  left: 7px; right: 7px; height: 4px; border-radius: 2px; transform: translateY(-50%);
}
/* per-channel vintage colours (cassette label palette) */
.ms-faders .msf[data-stem="bass"]   .handle::after { background: #7fae5f; box-shadow: 0 0 7px rgba(127,174,95,.65); }
.ms-faders .msf[data-stem="other"]  .handle::after { background: #6f9ec8; box-shadow: 0 0 7px rgba(111,158,200,.65); }
.ms-faders .msf[data-stem="vocals"] .handle::after { background: #d98a98; box-shadow: 0 0 7px rgba(217,138,152,.65); }
.ms-faders .msf.anchor .handle::after { background: #e0b24a; box-shadow: 0 0 7px rgba(224,178,74,.65); }
/* channel labels pick up the cassette colour so you read strips at a glance */
.ms-faders .msf[data-stem="bass"]   .name { color: #4f7a3a; }
.ms-faders .msf[data-stem="other"]  .name { color: #406a92; }
.ms-faders .msf[data-stem="vocals"] .name { color: #b0566a; }
.ms-faders .msf.anchor .name { color: #9a7524; }
/* the anchor slot keeps its gold ring, warmed to the plate */
.ms-faders .msf.anchor .track { border-color: #c79a3a; box-shadow: inset 0 3px 7px rgba(0,0,0,.6), 0 0 10px rgba(199,154,58,.3); }
/* mute / link chips on the warm plate */
.ms-faders .msf .mute-btn, .ms-faders .msf .link-btn {
  background: #cdbf9e; border-color: #9a865f; color: #5a4632;
}
.ms-faders .msf .mute-btn.on { background: var(--red); border-color: var(--red); color: #fff; }
.ms-faders .msf .link-btn.on { background: #406a92; border-color: #406a92; color: #fff; }

/* whole channel strip is grabbable — the fader cursor spans the strip, not just
   the thin track, so you can grab from the side or below the cap */
.ms-faders .msf:not(.anchor) { cursor: ns-resize; }
.ms-faders .msf .mute-btn, .ms-faders .msf .link-btn { cursor: pointer; }
.ms-faders .msf .db-in { cursor: text; }
.ms-faders .msf.anchor { cursor: default; }

/* onboarding "how to hear each part" */
.ob-card { max-height: 92vh; overflow-y: auto; }
.ob-hear { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 16px; }
.ob-hear-h { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-soft); font-weight: 800; margin-bottom: 10px; }
.ob-part { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--cream-dim); margin-bottom: 10px; }
.ob-part b { color: var(--cream); }
.ob-dot { flex: 0 0 11px; width: 11px; height: 11px; border-radius: 50%; margin-top: 4px; }
.ob-dot.bass { background: #7fae5f; }
.ob-dot.other { background: #6f9ec8; }
.ob-dot.vocals { background: #d98a98; }
.ob-tipline { font-size: 13px; color: var(--cream); background: rgba(232,184,75,.08); border-left: 3px solid var(--gold); padding: 9px 12px; border-radius: 0 6px 6px 0; margin-top: 4px; }
.ob-tipline b { color: var(--gold-soft); }

/* ============ VINTAGE TOP HALF — match the cream faceplate below ============ */
/* Warm the stage frame so the per-song club wash shows through and the whole
   console reads as one vintage machine (top controls + bottom faders). */
#mixsongStage {
  border-color: #4a3f2a;
  background: linear-gradient(180deg, rgba(42,34,22,.42), rgba(18,16,18,.30));
}
/* Phase tabs → cassette index labels, the active one glowing like a VU lamp */
#mixsongStage .phase-bar .ph {
  background: linear-gradient(180deg,#e7ddc6,#d3c4a2); border: 1px solid #b7a884;
  color: #6b4f3a; font-weight: 800; border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255,250,235,.55);
}
#mixsongStage .phase-bar .ph.live {
  background: linear-gradient(180deg,#f0c75a,#d89a28); border-color: #b5842a; color: #3a2a0e;
  box-shadow: 0 0 14px rgba(232,184,75,.6), inset 0 1px 0 rgba(255,250,235,.6);
}
#mixsongStage .phase-bar .ph.done { background: #bcac86; color: #5a4a30; opacity: .72; }
#mixsongStage .phase-bar .ph.clickable:hover { border-color: #8a6f3a; color: #3a2a0e; }
/* Skip / Bad → warm cassette chips (Submit stays green, Stop stays red) */
#mixsongStage .stage-head .row-action {
  background: linear-gradient(180deg,#e7ddc6,#d3c4a2); border: 1px solid #b7a884;
  color: #5a4632; box-shadow: inset 0 1px 0 rgba(255,250,235,.55);
}
#mixsongStage .stage-head .row-action:hover { border-color: var(--red); color: var(--red); }
/* Big countdown → warm amber LED glow */
#mixsongStage .ms-timer { text-shadow: 0 0 20px rgba(232,184,75,.45); }
/* Waveform → warm tape tone */
#mixsongStage .wave {
  background: linear-gradient(180deg,#2b2620,#201c17);
  border: 1px solid #6b5a3e; box-shadow: inset 0 0 14px rgba(0,0,0,.55);
}
#mixsongStage .wave canvas { filter: sepia(.55) saturate(1.35) hue-rotate(-10deg) brightness(1.08); }
#mixsongStage .playhead { background: #f0c75a; box-shadow: 0 0 8px rgba(240,199,90,.8); }
/* Play button → warm cassette key */
#mixsongStage .play {
  background: linear-gradient(180deg,#e7ddc6,#cdbf9e); color: #3a2a0e; border: 1px solid #b7a884;
  box-shadow: 0 2px 7px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.55);
}
#mixsongStage .play:hover { background: linear-gradient(180deg,#f2e9d8,#d8c8a8); }

/* ============ NEON on the faders — club-lit mix channel ============ */
/* Each cap's colour line glows like neon; the slot gets a faint channel wash. */
.ms-faders .msf[data-stem="bass"]   .handle::after { background:#8fd06a; box-shadow: 0 0 12px rgba(127,214,95,.95), 0 0 4px #8fd06a; }
.ms-faders .msf[data-stem="other"]  .handle::after { background:#78c0ff; box-shadow: 0 0 12px rgba(120,192,255,.95), 0 0 4px #78c0ff; }
.ms-faders .msf[data-stem="vocals"] .handle::after { background:#ff8fb0; box-shadow: 0 0 12px rgba(255,143,176,.95), 0 0 4px #ff8fb0; }
.ms-faders .msf.anchor .handle::after { background:#ffcf5e; box-shadow: 0 0 12px rgba(255,207,94,.95), 0 0 4px #ffcf5e; }
/* a soft neon column glow inside each slot, in the channel colour */
.ms-faders .msf[data-stem="bass"]   .track { box-shadow: inset 0 3px 7px rgba(0,0,0,.6), inset 0 0 16px rgba(127,214,95,.12); }
.ms-faders .msf[data-stem="other"]  .track { box-shadow: inset 0 3px 7px rgba(0,0,0,.6), inset 0 0 16px rgba(120,192,255,.12); }
.ms-faders .msf[data-stem="vocals"] .track { box-shadow: inset 0 3px 7px rgba(0,0,0,.6), inset 0 0 16px rgba(255,143,176,.12); }
/* a slow club shimmer so the neon feels alive (kept gentle; off for reduced-motion) */
@keyframes neon-breathe { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.ms-faders .msf .handle::after { animation: neon-breathe 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ms-faders .msf .handle::after { animation: none; } }

/* ---- wizard avatar grid ---- */
.cc-avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-height: 48vh; overflow-y: auto; padding: 2px; }
.cc-av { padding: 0; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--panel2); aspect-ratio: 1; transition: border-color .12s, box-shadow .12s; }
.cc-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-av:hover { border-color: var(--muted); }
.cc-av.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 6px 16px rgba(0,0,0,.4); }
@media (max-width: 560px) { .cc-avatars { grid-template-columns: repeat(3, 1fr); } }

/* ---- your character in the Studio ---- */
.st-avatar { position: absolute; right: 20px; bottom: 18px; width: 86px; height: 86px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); box-shadow: 0 6px 20px rgba(0,0,0,.5); z-index: 3; }
.st-you { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .5px; color: var(--cream); text-transform: uppercase; margin-bottom: 2px; }
@media (max-width: 560px) { .st-avatar { width: 60px; height: 60px; right: 14px; bottom: 12px; } }

/* ---- home: by-decade strip ---- */
.decade-row { margin: 14px 28px 0; }
.decade-label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.decade-gal { display: flex; flex-wrap: wrap; gap: 10px; }
.decade-gal .mixer-card { flex: 0 0 auto; width: 92px; }

/* wizard "select all genres" toggle */
.cc-allbtn {
  display: inline-block; margin-bottom: 12px; background: var(--panel2);
  border: 1px dashed var(--muted); border-radius: 20px; padding: 7px 16px;
  font-size: 12.5px; font-weight: 700; color: var(--cream-dim); cursor: pointer;
  font-family: var(--sans); letter-spacing: .3px;
}
.cc-allbtn:hover { border-color: var(--gold); color: var(--gold-soft); }
.cc-allbtn.on { background: var(--gold); border-style: solid; border-color: var(--gold); color: #141418; }

/* ===================== CAREER — the rise, made visible ===================== */
.career-hud {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px 12px 6px 6px; max-width: 320px;
}
.career-hud .ch-av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); flex: 0 0 auto; }
.career-hud .ch-body { min-width: 160px; }
.ch-top { display: flex; align-items: baseline; gap: 8px; }
.ch-name { font-family: var(--display); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--cream); }
.ch-chapter { font-size: 11px; color: var(--gold-soft); font-weight: 700; margin-left: auto; white-space: nowrap; }
.ch-bar { height: 5px; background: #15151a; border-radius: 3px; overflow: hidden; margin: 5px 0 3px; }
.ch-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); border-radius: 3px; transition: width .5s ease; }
.ch-next { font-size: 10px; color: var(--muted); font-family: var(--mono); letter-spacing: .5px; }
@media (max-width: 760px) { .career-hud { max-width: 200px; } .career-hud .ch-body { min-width: 110px; } .ch-name { display: none; } }

/* chapter-up ceremony */
.cu-card { max-width: 440px; text-align: center; border: 1px solid var(--gold); background: linear-gradient(180deg, #221d12, #161411); }
.cu-kick { color: var(--gold-soft); font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.cu-badge { font-size: 54px; margin: 8px 0; filter: drop-shadow(0 0 20px rgba(232,184,75,.6)); }
.cu-h { font-family: var(--display); font-size: 28px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--gold-soft); margin-bottom: 10px; }
.cu-blurb { color: var(--cream-dim); font-size: 15px; margin-bottom: 20px; }
.cu-go { background: var(--gold); color: #141418; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 14px; border: none; border-radius: 9px; padding: 13px 28px; cursor: pointer; font-family: var(--sans); }

/* career ending — the summit */
.ce-card { max-width: 520px; text-align: center; border: 1px solid var(--gold); background: linear-gradient(180deg, #241d10, #15120d); }
.ce-kick { color: var(--red-soft); font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.ce-h { font-family: var(--display); font-size: 30px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--gold-soft); margin: 6px 0 10px; }
.ce-blurb { color: var(--cream-dim); font-size: 15px; line-height: 1.5; margin-bottom: 20px; }
.ce-stats { display: flex; justify-content: center; gap: 28px; margin-bottom: 20px; }
.ce-stat { display: flex; flex-direction: column; }
.ce-v { font-family: var(--display); font-size: 30px; font-weight: 800; color: var(--cream); }
.ce-l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.ce-ladder { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-bottom: 22px; font-size: 11px; }
.ce-rung { color: var(--cream-dim); background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; }
.ce-rung.top { border-color: var(--gold); color: var(--gold-soft); font-weight: 800; }
.ce-arrow { color: var(--red); align-self: center; }
.ce-actions { display: flex; gap: 12px; }
.ce-new { flex: 1; background: var(--red); color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 14px; border: none; border-radius: 9px; padding: 14px; cursor: pointer; font-family: var(--sans); }
.ce-stay { background: none; border: 1px solid var(--line); color: var(--cream-dim); border-radius: 9px; padding: 14px 18px; cursor: pointer; font-family: var(--sans); }
