/* ============================================================================
   FLOW PROGRESS BAR — the 7-step linear workflow
   ----------------------------------------------------------------------------
   A sticky-ish horizontal stepper that shows where the user is in the
   Upload -> Record -> Split -> Turnkey -> Process -> Advanced -> Preview ->
   Export journey. Each step lights up as its prerequisites complete.
   ============================================================================ */

.flow-progress {
  background: linear-gradient(180deg, #1b1f27 0%, #14171d 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 12px;
  margin-bottom: 18px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.flow-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.flow-progress-head h2 {
  font-size: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flow-progress-head .flow-sub {
  font-size: 11.5px;
  color: var(--text-dim);
}

.flow-steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.flow-step {
  flex: 1 1 0;
  min-width: 96px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 6px 4px 2px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  transition: color 0.15s ease;
}

/* connector line between steps */
.flow-step::before {
  content: "";
  position: absolute;
  top: 17px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.flow-step:first-child::before { display: none; }
.flow-step.done::before,
.flow-step.active::before { background: var(--accent-3); }

.flow-dot {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #0d0f13;
  border: 2px solid var(--border);
  color: var(--text-dim);
  transition: all 0.18s ease;
}

.flow-step .flow-label {
  font-size: 10.5px;
  line-height: 1.25;
  letter-spacing: 0.2px;
  max-width: 110px;
}

.flow-step.active { color: var(--text); }
.flow-step.active .flow-dot {
  border-color: var(--accent);
  color: #171008;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.18);
}

.flow-step.done { color: var(--accent-3); }
.flow-step.done .flow-dot {
  border-color: var(--accent-3);
  background: var(--accent-3);
  color: #06241a;
}

.flow-step.locked { opacity: 0.55; }

.flow-step:hover .flow-dot { border-color: var(--accent-2); }

/* ---- Step 1 upload card (single song) ---- */
.step1-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 720px) {
  .step1-grid { grid-template-columns: 1fr; }
}

.step1-drop {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  background: var(--panel-2);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.step1-drop.loaded { border-style: solid; border-color: var(--accent-3); }
.step1-drop .big-icon { font-size: 30px; display: block; margin-bottom: 6px; }
.step1-drop .step1-name {
  font-size: 12.5px;
  color: var(--accent-3);
  margin-top: 8px;
  word-break: break-all;
  min-height: 16px;
}
.step1-drop .step1-name.empty { color: var(--text-dim); }

.step1-drop .step1-copyright {
  display: inline-block;
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.4;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
}
.step1-drop .step1-copyright:empty { display: none; }
.step1-drop .step1-copyright.scanning { color: var(--accent-2); border-color: var(--accent-2); }
.step1-drop .step1-copyright.ok { color: var(--accent-3); border-color: var(--accent-3); }
.step1-drop .step1-copyright.warn { color: #ffb020; border-color: #ffb020; }
.step1-drop .step1-copyright.blocked { color: var(--danger); border-color: var(--danger); }
.step1-drop.copyright-blocked { border-color: var(--danger); }

.step1-meta {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text-dim);
}
.step1-meta h4 { margin: 0 0 8px; font-size: 12px; color: var(--text); }
.step1-meta ul { margin: 0; padding-left: 16px; }
.step1-meta li { margin-bottom: 5px; line-height: 1.4; }

/* ---- Step 3 stem-split ---- */
.stem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 720px) {
  .stem-grid { grid-template-columns: 1fr; }
}
.stem-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12px;
}
.stem-card h4 {
  margin: 0 0 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stem-card .stem-state { color: var(--text-dim); font-size: 11px; }
.stem-card.ready { border-color: var(--accent-3); }
.stem-card.ready .stem-state { color: var(--accent-3); }
.stem-card .stem-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); display: inline-block;
}
.stem-card.ready .stem-dot { background: var(--accent-3); }

.stem-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- Step 6 advanced settings standalone ---- */
section.panel.advanced-standalone .advanced-body { margin-top: 8px; }

/* ---- Step gating: dim a step until it's reachable ---- */
section.panel.step-locked {
  opacity: 0.6;
  filter: saturate(0.7);
}
section.panel.step-locked .step-lock-note {
  display: block;
}
.step-lock-note {
  display: none;
  font-size: 11.5px;
  color: var(--accent);
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  background: rgba(255, 107, 53, 0.06);
}

/* ---- Step 1 drop zone: drag-over highlight ---- */
.step1-drop.dragover {
  border-color: var(--accent-2);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* ---- Stem card states: pending / missing ---- */
.stem-card.pending { border-color: var(--accent-2); }
.stem-card.pending .stem-state { color: var(--accent-2); }
.stem-card.pending .stem-dot { background: var(--accent-2); animation: stemPulse 1s ease-in-out infinite; }
.stem-card.missing { border-color: var(--border); opacity: 0.75; }
.stem-card.missing .stem-state { color: var(--text-dim); }

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

/* ============================================================================
   GUIDED WIZARD — show one module at a time (see wizard.js)
   ----------------------------------------------------------------------------
   When the body carries .wizard-on, every step panel is hidden except the one
   flagged .is-current. The existing stepper stays as the progress rail and a
   sticky Back / Next bar walks the user forward one module at a time.
   ============================================================================ */

/* Only the current step's panel is shown while the wizard is active. */
body.wizard-on section.panel { display: none; }
body.wizard-on section.panel.is-current {
  display: block;
  animation: wzIn 0.30s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes wzIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* The long reference footer is tucked away during the guided flow. */
body.wizard-on footer.limits { display: none; }

/* Keep the workflow rail visible so the user always sees where they are. */
body.wizard-on .flow-progress {
  position: sticky;
  top: 10px;
  z-index: 30;
}

/* Thin progress fill under the stepper. */
.wz-progress {
  position: relative;
  height: 4px;
  margin-top: 12px;
  border-radius: 999px;
  background: #0d0f13;
  border: 1px solid var(--border);
  overflow: hidden;
}
.wz-progress > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3));
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.5);
  transition: width 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Sticky Back / Next bar. */
.wizard-nav {
  position: sticky;
  bottom: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(30, 34, 43, 0.96) 0%, rgba(15, 17, 21, 0.97) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.wz-center { flex: 1 1 auto; min-width: 0; text-align: center; }
.wz-line { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.wz-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.wz-sep { color: var(--text-dim); }
.wz-name { font-size: 14px; font-weight: 600; color: var(--text); }
.wz-hint { font-size: 11.5px; color: var(--text-dim); margin-top: 3px; }
.wz-hint.warn { color: var(--accent); }

.wz-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.wz-btn .wz-arrow { font-size: 15px; line-height: 1; }
.wz-btn:hover:not(:disabled) { transform: translateY(-1px); }
.wz-btn:active:not(:disabled) { transform: translateY(0); }
.wz-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.wz-next {
  background: linear-gradient(180deg, var(--accent) 0%, #e85a25 100%);
  border-color: transparent;
  color: #171008;
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.35);
}
.wz-next:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(255, 107, 53, 0.5); }
.wz-back { background: var(--panel-2); }
.wz-back:hover:not(:disabled) { background: #262b35; border-color: var(--accent-2); }

@media (max-width: 620px) {
  .wizard-nav { flex-wrap: wrap; }
  .wz-center { order: -1; flex-basis: 100%; text-align: center; }
  .wz-btn { flex: 1 1 auto; justify-content: center; }
}

/* ============================================================================
   WELCOME / LAUNCH SCREEN — music-themed, high-tech (see wizard.js)
   ============================================================================ */

@property --wz-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

body.wz-welcome-open { overflow: hidden; }

.wz-welcome {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 50% 0%, #10151d 0%, #080a0e 58%, #050607 100%);
  animation: wzFade 0.35s ease both;
}
.wz-welcome.hidden { display: none; }
@keyframes wzFade { from { opacity: 0; } to { opacity: 1; } }

/* ---- animated backdrop --------------------------------------------------- */
.wz-welcome-bg { position: absolute; inset: 0; overflow: hidden; }

.wz-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(53, 194, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 194, 255, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(78% 68% at 50% 42%, #000 0%, transparent 76%);
  mask-image: radial-gradient(78% 68% at 50% 42%, #000 0%, transparent 76%);
  animation: wzGrid 26s linear infinite;
}
@keyframes wzGrid { to { background-position: 46px 46px, 46px 46px; } }

.wz-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.wz-glow-1 { width: 480px; height: 480px; background: rgba(255, 107, 53, 0.38); top: -140px; left: -90px; animation: wzFloat 13s ease-in-out infinite; }
.wz-glow-2 { width: 560px; height: 560px; background: rgba(53, 194, 255, 0.30); bottom: -180px; right: -120px; animation: wzFloat 16s ease-in-out infinite reverse; }
@keyframes wzFloat { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(26px, 20px, 0); } }

.wz-scan {
  position: absolute; left: 0; right: 0; height: 160px;
  background: linear-gradient(180deg, transparent, rgba(53, 194, 255, 0.07), transparent);
  animation: wzScan 7.5s linear infinite;
}
@keyframes wzScan { from { top: -160px; } to { top: 100%; } }

/* ---- glass card with a rotating neon edge -------------------------------- */
.wz-welcome-card {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  text-align: center;
  padding: 40px 38px 30px;
  border-radius: 22px;
  border: 1px solid rgba(120, 140, 160, 0.22);
  background: linear-gradient(180deg, rgba(24, 28, 36, 0.92), rgba(11, 13, 17, 0.95));
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: wzCardIn 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes wzCardIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.wz-welcome-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 23px;
  padding: 1.5px;
  background: conic-gradient(from var(--wz-ang),
    transparent 0 55%,
    rgba(53, 194, 255, 0.85) 72%,
    rgba(255, 107, 53, 0.9) 84%,
    rgba(53, 255, 158, 0.8) 92%,
    transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: wzSpin 6s linear infinite;
  pointer-events: none;
}
@keyframes wzSpin { to { --wz-ang: 360deg; } }

.wz-welcome-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; letter-spacing: 0.7px; text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 13px;
}
.wz-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); animation: wzPulse 1.6s ease-in-out infinite; }
@keyframes wzPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }

.wz-welcome-title {
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.6px;
  margin: 16px 0 12px;
  color: var(--text);
}
.wz-welcome-title span {
  background: linear-gradient(92deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wz-welcome-sub {
  max-width: 520px;
  margin: 0 auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
}
.wz-welcome-sub b { color: var(--text); }

/* ---- music icons --------------------------------------------------------- */
.wz-icons { display: flex; justify-content: center; gap: 12px; margin: 24px 0 4px; flex-wrap: wrap; }
.wz-ico {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #1b1f27 0%, #12151b 100%);
  color: var(--accent-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: wzBob 3.6s ease-in-out infinite;
}
.wz-ico svg { width: 26px; height: 26px; }
.wz-ico:nth-child(2) { color: var(--accent);   animation-delay: 0.35s; }
.wz-ico:nth-child(3) { color: var(--accent-3); animation-delay: 0.70s; }
.wz-ico:nth-child(4) { color: var(--accent-2); animation-delay: 1.05s; }
.wz-ico:nth-child(5) { color: var(--accent);   animation-delay: 1.40s; }
@keyframes wzBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---- animated equalizer -------------------------------------------------- */
.wz-eq {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 46px;
  margin: 18px 0 2px;
}
.wz-eq i {
  width: 4px;
  height: 40%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  animation-name: wzEq;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
@keyframes wzEq { 0%, 100% { height: 16%; opacity: 0.45; } 50% { height: 100%; opacity: 1; } }

/* ---- actions ------------------------------------------------------------- */
.wz-welcome-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 22px; }

.wz-launch {
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: #171008;
  background: linear-gradient(180deg, var(--accent) 0%, #e85a25 100%);
  box-shadow: 0 12px 34px rgba(255, 107, 53, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  animation: wzLaunchPulse 2.6s ease-in-out infinite;
  transition: transform 0.14s ease, box-shadow 0.2s ease;
}
.wz-launch:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(255, 107, 53, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.wz-launch:active { transform: translateY(0); }
.wz-rocket { font-size: 18px; }
@keyframes wzLaunchPulse {
  0%, 100% { box-shadow: 0 12px 34px rgba(255, 107, 53, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
  50% { box-shadow: 0 12px 46px rgba(255, 107, 53, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
}

.wz-skip {
  background: none; border: none;
  color: var(--text-dim);
  font: inherit; font-size: 12.5px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s ease;
}
.wz-skip:hover { color: var(--text); }

.wz-welcome-foot {
  display: flex; gap: 10px; justify-content: center; align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.wz-welcome-foot .wz-dot { color: var(--border); }

@media (max-width: 560px) {
  .wz-welcome-card { padding: 30px 22px 24px; }
  .wz-ico { width: 46px; height: 46px; }
  .wz-ico svg { width: 22px; height: 22px; }
  .wz-eq { height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .wz-welcome, .wz-welcome-card, .wz-grid, .wz-glow, .wz-scan,
  .wz-ico, .wz-eq i, .wz-launch, .wz-live-dot, .wz-welcome-card::before {
    animation: none !important;
  }
}

/* ============================================================================
   STEP 6 — Final Blend & Compare
   ============================================================================ */
.blend-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 4px 0 18px;
  background: linear-gradient(180deg, rgba(53,194,255,.08), rgba(23,26,33,.35));
}
.blend-head { margin-bottom: 14px; }
.blend-title { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.blend-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }

.blend-modes { display: flex; gap: 10px; margin-bottom: 14px; }
.blend-mode {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03); color: var(--text);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.blend-mode b { font-size: 13.5px; }
.blend-mode span { font-size: 11.5px; color: var(--text-dim); }
.blend-mode.is-active {
  border-color: var(--accent-2);
  background: rgba(53,194,255,.14);
  box-shadow: 0 0 0 1px var(--accent-2) inset, 0 6px 18px rgba(53,194,255,.16);
}

.blend-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.blend-row { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.blend-row .blend-label { min-width: 120px; color: var(--text-dim); }
.blend-row input[type="range"] { flex: 1; }
.blend-row .blend-val { min-width: 62px; text-align: right; font-variant-numeric: tabular-nums; }
.blend-toggle { gap: 8px; }
.blend-toggle input { accent-color: var(--accent-2); }
.blend-align { gap: 12px; }
.blend-align .blend-offset {
  min-width: auto; flex: 1; text-align: left; color: var(--text);
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.blend-mini-btn {
  padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 11.5px;
  border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text);
  transition: border-color .15s, background .15s;
}
.blend-mini-btn:hover { border-color: var(--accent-2); background: rgba(53,194,255,.14); }
.blend-panel.blend-punchy .blend-rows { opacity: .45; pointer-events: none; }

.blend-ab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.blend-ab-label { font-size: 12px; color: var(--text-dim); min-width: 120px; }
.blend-ab-btns { display: flex; gap: 8px; }
.blend-ab-btn {
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 12.5px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04); color: var(--text);
}
.blend-ab-btn.is-active { border-color: var(--accent-2); background: rgba(53,194,255,.16); }
.blend-ab-note { font-size: 11.5px; color: var(--text-dim); }

.blend-check { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.blend-check-result { font-size: 12px; color: var(--text-dim); }
.blend-check-result.ok { color: var(--accent-3); }
.blend-check-result.warn { color: var(--accent); }

/* ============================================================================
   STEP 7 — Final Mix (fidelity gate + AI-likeness meter + audition + download)
   ============================================================================ */
.final-mix {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 4px 0 18px;
  background: linear-gradient(180deg, rgba(53,255,158,.07), rgba(23,26,33,.35));
}
.fmx-head { margin-bottom: 14px; }
.fmx-title { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.fmx-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }
.fmx-player { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fmx-player-note { font-size: 12px; color: var(--text-dim); }
.final-mix .likeness-meter { margin: 4px 0 14px; }
.final-mix .rp-fidelity { margin: 4px 0 14px; }
.fmx-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fmx-actions-note { font-size: 12px; color: var(--text-dim); }
.fmx-actions-note.ok { color: var(--accent-3); }
.fmx-actions-note.error { color: var(--accent); }

/* ----------------------------------------------------------------------------
   §231 Pro Mix -- a real console: motorized lit faders + LED meters + MASTER OUT
   ---------------------------------------------------------------------------- */
.promix-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 4px 0 16px;
  background: linear-gradient(180deg, rgba(53,255,158,.06), rgba(23,26,33,.30));
}
.promix-head { margin-bottom: 14px; }
.promix-title { font-weight: 700; font-size: 14px; letter-spacing: .2px; }
.promix-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }

.promix-console {
  display: flex; align-items: flex-end; justify-content: center; gap: 26px;
  padding: 16px 12px 10px; margin-bottom: 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: linear-gradient(180deg, rgba(8,10,14,.6), rgba(16,19,26,.35));
  flex-wrap: wrap;
}
.promix-channel { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.promix-channel-master { padding-left: 22px; margin-left: 4px; border-left: 1px solid var(--border); }

/* vertical LED meter */
.promix-meter {
  position: relative; width: 16px; height: 134px; border-radius: 4px;
  background: #0a0d13; border: 1px solid var(--border); overflow: hidden;
}
.promix-meter-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0%;
  background: linear-gradient(180deg, #ff3b3b 0%, var(--accent) 24%, var(--accent-3) 56%, #35ff9e 100%);
  transition: height .05s linear;
}
.promix-meter-master { width: 30px; height: 134px; }

/* fader slot */
.promix-fader-slot {
  position: relative; width: 46px; height: 134px;
  border-radius: 8px; cursor: ns-resize; touch-action: none;
}
.promix-fader-slot::before {
  content: ''; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 8px;
  transform: translateX(-50%); border-radius: 4px;
  background: #0a0d13; border: 1px solid var(--border);
}
.promix-fader-fill {
  position: absolute; left: 50%; bottom: 4px; width: 8px; transform: translateX(-50%);
  height: calc(6px + var(--pm-pos, 0.5) * (100% - 20px));
  border-radius: 4px; pointer-events: none;
  background: linear-gradient(180deg, var(--accent-3), rgba(53,255,158,.25));
  box-shadow: 0 0 8px rgba(53,255,158,.45);
  transition: height .34s cubic-bezier(.22,.61,.36,1);
}
.promix-fader-cap {
  position: absolute; left: 50%; width: 40px; height: 20px;
  bottom: calc(10px + var(--pm-pos, 0.5) * (100% - 20px));
  transform: translateX(-50%); border-radius: 5px;
  background: linear-gradient(180deg, #eef3fa, #b7c1cf 45%, #7d8794);
  border: 1px solid #2a3140;
  box-shadow: 0 2px 5px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.4);
  cursor: ns-resize;
  transition: bottom .34s cubic-bezier(.22,.61,.36,1);
}
.promix-fader-cap::after {
  content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px;
  transform: translateY(-50%); background: rgba(20,24,32,.65); border-radius: 2px;
}
.promix-fader-cap:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 3px; }
.promix-channel.is-disabled .promix-fader-slot,
.promix-channel.is-disabled .promix-fader-cap { opacity: .38; cursor: not-allowed; }
.promix-range { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.promix-db { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.promix-name { font-size: 10px; letter-spacing: .14em; color: var(--text-dim); }

.promix-auto { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.promix-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; }
.promix-toggle input { accent-color: var(--accent-3); }
.promix-target { display: flex; flex-direction: column; gap: 6px; min-width: 220px; flex: 1; }
.promix-target label { font-size: 12px; color: var(--text-dim); display: flex; justify-content: space-between; gap: 8px; }
.promix-target input[type="range"] { width: 100%; accent-color: var(--accent-3); }
.promix-val { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.promix-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.promix-status { font-size: 12px; color: var(--text-dim); }
.promix-status.ok { color: var(--accent-3); }
.promix-status.error { color: var(--accent); }
.promix-status.pending { color: var(--accent); }
@media (max-width: 560px) {
  .promix-console { gap: 16px; }
  .promix-channel-master { padding-left: 14px; margin-left: 0; }
  .promix-meter, .promix-fader-slot { height: 116px; }
}

/* ============================================================================
   SECTION 175 — Route A (Direct AI Vocal Humanization) step gating
   ----------------------------------------------------------------------------
   Route A is the simple Direct path: Step 5 (Automatic Processing) and Step 6
   (Advanced Settings, PRO) are dropped, Step 4 is the automatic INSTRUMENTAL
   HUMANIZATION step, and Step 7 keeps only the Final Mix (mix + AI-likeness
   meter + fidelity gate) — the faithful re-production blend, the mixer and the
   master bus below the gate are hidden here but kept intact for Route B
   (RVC voice + Sing Along).
   ============================================================================ */

/* Step 6 (Advanced Settings) is not part of Route A. */
body.step6-hidden .flow-step[data-flow-step="6"] { display: none; }

/* Pass 4: Route A now has a real Master step. #panel-auto is shown on both
   routes; /api/turnkey/start accepts a Starter "master only" run sourced from
   the Step-3 humanize job, so the primary button no longer 403s. */

/* Route A Step 4 = instrumental humanization (automatic). Hide the PRO
   re-perform module + its Route-B copy; show the automatic block instead. */
body.route-a #tk-reperform-block,
body.route-a #step4-tags,
body.route-a #step4-hint-b1,
body.route-a #step4-hint-b2,
body.route-a #step4-footnote,
body.route-a #rp-step-skip { display: none; }
body.route-a #rai-block { display: block !important; }

/* Route A Step 7: keep the Final Mix + the Vocal Enhancer's live playback; hide
   the faithful re-production blend, the track strips and the master bus.
   NOTE: the transport is KEPT on Route A -- it is the ONLY playback that routes
   the lead vocal through the Vocal Enhancer (startLivePlayback), so without it
   the enhancer panel has nothing to process ("not connected to anything"). */
body.route-a #panel-preview #blend-panel,
body.route-a #panel-preview .track-strip,
body.route-a #panel-preview #master-bus-details { display: none !important; }

/* ---- Route A — "Rebuild the Instrumental" block ---- */
.rai-block {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 6px 0 18px;
  background: linear-gradient(180deg, rgba(53,255,158,.07), rgba(23,26,33,.35));
}
.rai-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rai-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #08151a;
  background: var(--accent-3); border-radius: 999px; padding: 3px 9px;
}
.rai-title { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.rai-sub { font-size: 12.5px; color: var(--text-dim); line-height: 1.6; margin: 0 0 14px; }
.rai-chain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .rai-chain { grid-template-columns: 1fr; } }
.rai-step {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 11.5px; color: var(--text-dim); line-height: 1.5;
  background: var(--panel-2);
}
.rai-step b { display: block; color: var(--text); font-size: 12.5px; margin-bottom: 4px; }
.rai-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-2); color: #08151a;
  font-size: 10.5px; font-weight: 700; margin-right: 6px;
}
.rai-status { display: block; margin-top: 12px; color: var(--accent-3); }
/* Pass 4: Step 4 transport — the key that actually produces the rebuilt bed. */
.rai-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.rai-actions .primary { min-width: 190px; }
.rai-actions .primary[disabled] { opacity: .55; cursor: progress; }
.rai-progress {
  flex: 1 1 180px; height: 6px; min-width: 140px; border-radius: 999px;
  background: rgba(255,255,255,.08); overflow: hidden;
}
.rai-progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
  transition: width .35s ease;
}

/* ---- Step 2: "Upload your own stems" — the recommended, front-and-center path ---- */
.stem-own {
  margin: 2px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.stem-own.recommended {
  border-color: rgba(53, 255, 158, 0.45);
  background:
    linear-gradient(180deg, rgba(53, 255, 158, 0.08) 0%, rgba(53, 255, 158, 0.015) 55%, transparent 100%),
    var(--panel-2);
  box-shadow: 0 0 0 1px rgba(53, 255, 158, 0.08), 0 14px 34px -22px rgba(53, 255, 158, 0.75);
}
.stem-own-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.stem-own-toggle:hover { background: rgba(255, 255, 255, 0.03); }
.stem-own-badge {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #06231a;
  background: var(--accent-3);
  border-radius: 999px;
  padding: 3px 9px;
}
.stem-own-label { flex: 1; }
.stem-own-caret { transition: transform 0.18s ease; color: var(--text-dim); }
.stem-own.open .stem-own-caret { transform: rotate(180deg); }
.stem-own-body { padding: 2px 15px 15px; border-top: 1px solid var(--border); }
.stem-own-lead {
  margin: 12px 0 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
}
.stem-own-lead b { color: var(--text); }
.stem-own-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .stem-own-grid { grid-template-columns: 1fr; }
}
.stem-own-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.stem-own-field > span { font-weight: 600; color: var(--text); }
.stem-own-field em {
  font-style: normal;
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-left: 4px;
}
.stem-own-field input[type="file"] {
  font-size: 11px;
  color: var(--text-dim);
}
.stem-own-field.has-file > span { color: var(--accent-3); }

/* "or separate it automatically" divider between the upload card and the split button */
.stem-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 14px;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stem-or::before,
.stem-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
/* De-emphasize the fallback "Split Stems" button so the upload path reads first. */
.stem-actions button.ghost {
  background: transparent;
  color: var(--text-dim);
}
.stem-actions button.ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--accent-2);
}

/* ============================================================================
   §246 — the fixed SIX-STEP wizard spine
   ----------------------------------------------------------------------------
   Step 1 asks ONE question (the goal) via three cards; Step 3 never re-asks
   (its retired chooser is hidden and a "your goal" note takes its place); and
   the Master stop merges today's Steps 5/6/7 into one screen.
   ============================================================================ */

/* ---- Step-1 goal chooser: three cards on desktop, one per row when narrow -- */
.route-cards-goals { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .route-cards-goals { grid-template-columns: 1fr; } }

/* ---- Step-3 "your goal" note (replaces the retired path chooser) ---------- */
.step3-goal-note {
  margin: 2px 0 14px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(53, 194, 255, 0.07), rgba(53, 194, 255, 0.01));
  font-size: 12.5px;
  color: var(--text-dim);
}
.step3-goal-note b { color: var(--text); }

/* ---- Master stop: group the three merged panels into one screen ----------- */
/* #panel-auto is the hero; #panel-advanced + #panel-preview read as sub-sections. */
body.master-step #panel-advanced,
body.master-step #panel-preview {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}
body.master-step .master-subhead {
  font-size: 16px;
  letter-spacing: 0.01em;
  margin: 0 0 10px;
  color: var(--text);
}
body.master-step .master-subhead::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
/* Keep the sub-section labels visible on mobile (wizard-mobile.css hides the
   duplicated in-body h2, but the Master sub-heads are useful there too). */
body.wizard-on.master-step section.panel > h2.master-subhead { display: block; }


/* §246.5 — ONE consistent Pro upgrade surface (was 6 scattered upsells).
   Each upsell keeps its own element + visibility mechanism; they all adopt
   this shared look + a single .plan-banner-inner row layout. */
.plan-banner {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,107,53,0.08), rgba(255,107,53,0.015));
  padding: 14px 16px;
  margin: 14px 0;
}
.plan-banner .plan-banner-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.plan-banner .plan-banner-ico { font-size: 22px; line-height: 1; flex-shrink: 0; }
.plan-banner .plan-banner-body { flex: 1 1 320px; min-width: 220px; }
.plan-banner .plan-banner-title { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.plan-banner .plan-banner-note { display: block; font-size: 12px; line-height: 1.5; color: var(--text-dim); }
.plan-banner .plan-banner-title b, .plan-banner .plan-banner-note b { color: var(--accent); }
.plan-banner .plan-banner-cta { flex-shrink: 0; white-space: nowrap; }
/* neutralize the bespoke outer layouts so the shared inner row wins */
.route-upsell.plan-banner { display: block; }
/* [hidden] must win over the display rule above (this sheet loads after style.css). */
.route-upsell.plan-banner[hidden] { display: none; }
.nuclear-upsell.plan-banner { padding: 14px 16px; }
.advanced-lock-banner.plan-banner { display: block; }
.rp-gate.plan-banner { padding: 14px 16px; }
.download-gate.plan-banner { border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: linear-gradient(180deg, rgba(255,107,53,0.08), rgba(255,107,53,0.015)); }
.download-gate.plan-banner b { color: var(--accent); }
