@import url("mz-menu.css"); /* canonical top-menu (.mz-topbar/.mz-auth) */
/* ============================================================
   Mazmazika — Vocal Remover (redesign)
   Tokens · themes (light/dark) · directions (studio/spectrum/console)
   ============================================================ */

:root {
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --maxw: 1080px;

  --font-ui: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- THEME: LIGHT (default) ---------- */
:root,
[data-theme="light"] {
  --bg: #f4f2ec;
  --bg-grad-a: #ffffff;
  --bg-grad-b: #ece8dd;
  --surface: #ffffff;
  --surface-2: #faf9f5;
  --surface-3: #f1eee6;
  --ink: #14151a;
  --ink-2: #54585f;
  --ink-3: #8d909a;
  --line: #e7e3d9;
  --line-strong: #d8d3c6;
  --shadow-card: 0 1px 0 rgba(20,20,22,.04), 0 22px 60px -28px rgba(20,20,22,.28);
  --shadow-pop: 0 30px 80px -30px rgba(20,20,22,.45);
  --track: #ece8de;
  --invert: #14151a;
  --invert-ink: #ffffff;
}

/* ---------- THEME: DARK ---------- */
[data-theme="dark"] {
  --bg: #0b0c10;
  --bg-grad-a: #15171f;
  --bg-grad-b: #0a0b0e;
  --surface: #15171e;
  --surface-2: #1a1d26;
  --surface-3: #21252f;
  --ink: #f3f4f7;
  --ink-2: #a7abb8;
  --ink-3: #6a6f7d;
  --line: #262a33;
  --line-strong: #353a45;
  --shadow-card: 0 1px 0 rgba(255,255,255,.03), 0 30px 70px -30px rgba(0,0,0,.8);
  --shadow-pop: 0 40px 90px -30px rgba(0,0,0,.9);
  --track: #20242e;
  --invert: #f3f4f7;
  --invert-ink: #0b0c10;
}

/* ---------- DIRECTION: STUDIO (default) ---------- */
:root,
[data-dir="studio"] {
  --accent: #5b53e8;
  --accent-2: #7b73ff;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in oklab, var(--accent) 12%, var(--surface));
  --accent-line: color-mix(in oklab, var(--accent) 35%, var(--line));
  --cta: linear-gradient(180deg, var(--accent-2), var(--accent));
  --cta-glow: 0 14px 34px -14px color-mix(in oklab, var(--accent) 70%, transparent);
  --wave-soft: 0;
  --stem-1: #5b53e8;
  --stem-2: #2bb3a3;
  --stem-3: #e8804f;
  --stem-4: #c14fa0;
  --stem-5: #6b7280;
  --face: var(--surface);
}

/* ---------- DIRECTION: SPECTRUM ---------- */
[data-dir="spectrum"] {
  --accent: #ff3d77;
  --accent-2: #ff8a3d;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in oklab, var(--accent) 14%, var(--surface));
  --accent-line: color-mix(in oklab, var(--accent) 40%, var(--line));
  --cta: linear-gradient(100deg, #7b3dff, #ff3d77 48%, #ff8a3d);
  --cta-glow: 0 16px 40px -14px color-mix(in oklab, #ff3d77 65%, transparent);
  --wave-soft: 1;
  --stem-1: #ff3d77;
  --stem-2: #ffb03d;
  --stem-3: #36d6c3;
  --stem-4: #7b3dff;
  --stem-5: #3da5ff;
  --face: var(--surface);
}

/* ---------- DIRECTION: CONSOLE ---------- */
[data-dir="console"] {
  --accent: #f5a524;
  --accent-2: #ffc24d;
  --accent-ink: #1a1405;
  --accent-soft: color-mix(in oklab, var(--accent) 16%, var(--surface));
  --accent-line: color-mix(in oklab, var(--accent) 45%, var(--line));
  --cta: linear-gradient(180deg, var(--accent-2), var(--accent));
  --cta-glow: 0 14px 34px -14px color-mix(in oklab, var(--accent) 70%, transparent);
  --wave-soft: 0;
  --stem-1: #6ee7b7;
  --stem-2: #f5a524;
  --stem-3: #f87171;
  --stem-4: #60a5fa;
  --stem-5: #c4b5fd;
  --face: var(--surface-2);
  --font-numeric: var(--font-mono);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1200px 700px at 50% -8%, var(--bg-grad-a) 0%, transparent 60%),
    radial-gradient(900px 600px at 108% 112%, var(--bg-grad-b) 0%, transparent 55%);
  background-attachment: fixed;
  transition: background-color .35s var(--ease), color .25s var(--ease);
}

.numeric { font-family: var(--font-numeric, var(--font-ui)); font-variant-numeric: tabular-nums; }

::selection { background: color-mix(in oklab, var(--accent) 30%, transparent); }

/* ============================================================
   Layout shell
   ============================================================ */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 22px 24px 80px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 2px 0; margin-bottom: 30px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--cta); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: var(--cta-glow);
  position: relative; overflow: hidden;
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { font-weight: 600; font-size: 16.5px; letter-spacing: -.02em; }
.brand-name em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); }

.top-actions { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 10px;
}
.nav-link:hover { color: var(--ink); background: var(--surface-3); }

.theme-toggle {
  appearance: none; border: 1px solid var(--line-strong); background: var(--surface);
  width: 40px; height: 40px; border-radius: 11px; cursor: pointer; color: var(--ink-2);
  display: grid; place-items: center; transition: .18s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ============================================================
   Hero
   ============================================================ */
.hero { text-align: center; margin: 18px auto 36px; max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-line); padding: 6px 13px; border-radius: 999px;
  margin-bottom: 18px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent); }
.hero h1 {
  margin: 0 0 14px; font-size: clamp(34px, 6vw, 56px); line-height: 1.04;
  letter-spacing: -.03em; font-weight: 600;
}
.hero h1 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.hero p { margin: 0 auto; max-width: 560px; color: var(--ink-2); font-size: 16.5px; line-height: 1.6; }

/* ============================================================
   Tool card
   ============================================================ */
.tool {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-card);
  overflow: hidden; position: relative;
}
.tool-head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.tool-head .label { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.tool-head .spacer { flex: 1; }
.chip-mini {
  font-size: 12px; color: var(--ink-3); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 999px; background: var(--surface);
}
.tool-body { padding: 26px 24px 28px; }

.section-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 12px;
}
.section-label .num {
  width: 19px; height: 19px; border-radius: 6px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-2); font-size: 11px; font-weight: 600;
}
.block + .block { margin-top: 26px; }

/* Segmented control */
.segment {
  display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-3);
  border: 1px solid var(--line); border-radius: 13px;
}
.segment.full { display: flex; }
.segment button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 9px 16px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px;
  flex: 1; justify-content: center; transition: .16s var(--ease); white-space: nowrap;
}
.segment button svg { width: 16px; height: 16px; }
.segment button[aria-selected="true"] {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 2px 8px -4px rgba(0,0,0,.25);
}

/* URL input */
.input-row { position: relative; margin-top: 14px; }
.input-row .lead {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); display: grid; place-items: center;
}
.input-row .lead svg { width: 18px; height: 18px; }
.input {
  width: 100%; height: 52px; padding: 0 16px 0 44px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
.paste-hint { margin: 9px 2px 0; font-size: 12.5px; color: var(--ink-3); }

/* Dropzone */
.dropzone {
  margin-top: 14px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg);
  background: var(--surface-2); padding: 34px 24px; text-align: center; cursor: pointer;
  transition: .18s var(--ease);
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-icon {
  width: 52px; height: 52px; border-radius: 15px; margin: 0 auto 14px;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line);
  color: var(--accent);
}
.dropzone .dz-icon svg { width: 24px; height: 24px; }
.dropzone .dz-title { font-weight: 600; font-size: 15px; margin-bottom: 5px; }
.dropzone .dz-sub { color: var(--ink-3); font-size: 13px; }
.dropzone .dz-browse { color: var(--accent); font-weight: 600; }

/* Stem cards */
.stem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stem-card {
  appearance: none; text-align: left; cursor: pointer; font: inherit;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius); padding: 15px 15px 14px; transition: .16s var(--ease);
  position: relative; overflow: hidden;
}
.stem-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.stem-card[aria-pressed="true"] {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.stem-card .sc-top { display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 33px; padding: 12px 0 0; margin-bottom: 9px; }
.stem-card .sc-count { font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.stem-card .sc-unit { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.stem-card .sc-name { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.stem-card .sc-desc { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.4; }
.stem-card .sc-check {
  position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
  opacity: 0; transform: scale(.6); transition: .16s var(--ease);
}
.stem-card .sc-check svg { width: 11px; height: 11px; }
.stem-card[aria-pressed="true"] .sc-check { opacity: 1; transform: scale(1); }

/* Mode options */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card {
  appearance: none; text-align: left; cursor: pointer; font: inherit;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius); padding: 16px; display: flex; gap: 13px; align-items: flex-start;
  transition: .16s var(--ease);
}
.mode-card:hover { border-color: var(--line-strong); }
.mode-card[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.mode-card .mc-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-2);
}
.mode-card[aria-pressed="true"] .mc-icon { background: var(--accent); color: var(--accent-ink); }
.mode-card .mc-icon svg { width: 19px; height: 19px; }
.mode-card .mc-title { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.mode-card .mc-desc { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.45; }

/* CTA */
.cta-row { margin-top: 28px; display: flex; gap: 14px; align-items: center; }
.cta {
  flex: 1; appearance: none; border: 0; cursor: pointer; font: inherit;
  height: 58px; border-radius: var(--radius); background: var(--cta); color: var(--accent-ink);
  font-size: 16px; font-weight: 600; letter-spacing: -.01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  box-shadow: var(--cta-glow), 0 1px 0 rgba(255,255,255,.2) inset;
  transition: transform .08s var(--ease), filter .18s var(--ease);
}
.cta:hover { filter: brightness(1.05); }
.cta:active { transform: translateY(1px); }
.cta svg { width: 20px; height: 20px; }
.cta .pulse { animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.cta-note { color: var(--ink-3); font-size: 12.5px; max-width: 130px; line-height: 1.4; }

/* ============================================================
   Processing state
   ============================================================ */
.proc {
  padding: 44px 24px 40px; text-align: center;
}
.proc-visual {
  height: 96px; display: flex; align-items: flex-end; justify-content: center; gap: 4px;
  margin-bottom: 26px;
}
.proc-visual .bar {
  width: 6px; border-radius: 4px; background: var(--cta);
  animation: eq 1s var(--ease) infinite;
}
@keyframes eq { 0%,100% { height: 14px; } 50% { height: 84px; } }
.proc h3 { margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.proc h3 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.proc p { margin: 0 auto 24px; color: var(--ink-2); font-size: 14.5px; max-width: 380px; line-height: 1.5; }
.progress { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; max-width: 420px; margin: 0 auto 12px; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--cta); transition: width .3s var(--ease); }
.proc-steps { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; color: var(--ink-3); font-size: 12.5px; }
.proc-steps .s { display: inline-flex; align-items: center; gap: 7px; }
.proc-steps .s.done { color: var(--accent); }
.proc-steps .s .ic { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; }
.proc-steps .s .ic svg { width: 9px; height: 9px; }

/* ============================================================
   Mixer
   ============================================================ */
.mixer-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.mixer-head .mh-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.mixer-head .mh-sub { font-size: 12.5px; color: var(--ink-3); }
.mixer-head .spacer { flex: 1; }
/* play + title take the left and can shrink (min-width:0 lets the title wrap/ellipsize);
   the button group is pushed right and reflows as ONE unit (see responsive rules below). */
.mh-info { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; min-width: 0; }
.mh-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.transport { display: inline-flex; align-items: center; gap: 10px; }
.play-btn {
  appearance: none; border: 0; cursor: pointer; width: 46px; height: 46px; border-radius: 50%;
  background: var(--cta); color: var(--accent-ink); display: grid; place-items: center;
  box-shadow: var(--cta-glow);
}
.play-btn svg { width: 18px; height: 18px; }
.time { font-size: 13px; color: var(--ink-2); }

.btn-ghost {
  appearance: none; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  height: 40px; padding: 0 15px; border-radius: 11px; display: inline-flex; align-items: center; gap: 8px;
  transition: .16s var(--ease);
}
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-ghost svg { width: 15px; height: 15px; }
.btn-solid {
  appearance: none; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600;
  border: 0; background: var(--invert); color: var(--invert-ink);
  height: 40px; padding: 0 16px; border-radius: 11px; display: inline-flex; align-items: center; gap: 8px;
  transition: .16s var(--ease);
}
.btn-solid:hover { filter: brightness(1.12); }
.btn-solid svg { width: 15px; height: 15px; }

.stems { padding: 8px 14px 16px; }
/* auto | 1fr | auto: the label and control columns hug their content, so the
   waveform (1fr) fills the middle and the 16px gap is even breathing room on BOTH
   sides. (Was 150px | 1fr | 132px — the 150px label column left ~80px of dead space
   before the waveform, and the 132px control column was ~50px too narrow for its own
   contents, so the fader overflowed leftward onto the waveform's right edge.) */
.stem-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 13px 10px; border-radius: 14px; transition: background .16s var(--ease);
}
.stem-row:hover { background: var(--surface-2); }
.stem-row.muted { opacity: .5; }
.stem-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.stem-swatch { width: 11px; height: 30px; border-radius: 4px; flex: none; }
.stem-id .meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.stem-id .nm { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.stem-id .sz { font-size: 11.5px; color: var(--ink-3); }

.wave { height: 46px; display: flex; align-items: center; gap: 2px; overflow: hidden; }
.wave .wbar { flex: 1; border-radius: 2px; min-width: 1px; transition: opacity .2s; }

.stem-ctl { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.icon-btn {
  appearance: none; cursor: pointer; width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; transition: .14s var(--ease);
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.icon-btn.on-mute { background: var(--ink-3); color: var(--surface); border-color: var(--ink-3); }
.icon-btn.on-solo { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.icon-btn svg { width: 15px; height: 15px; }

.fader { -webkit-appearance: none; appearance: none; width: 64px; height: 5px; border-radius: 999px;
  background: var(--track); cursor: pointer; }
.fader::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.fader::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); }
/* Stem volume faders read too short at the 64px default; give them a longer track.
   Scoped to .stem-ctl so the master seek bar keeps its own sizing. */
.stem-ctl .fader { width: 116px; }
/* Master seek/scrub bar sits in a housing so it reads as a distinct transport
   control (not a floating hairline). The wrap aligns to the stem-row CONTENT (14px
   .stems + 10px .stem-row padding = 24px each side), adds top breathing room below
   the header, and its surface-2 fill + border stand out against the stems area. */
.mx-scrub-wrap { margin: 18px 24px 10px; padding: 11px 16px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px; }
.mx-scrub { width: 100%; margin: 0; display: block; }

.mixer-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-2);
}
.mixer-foot .spacer { flex: 1; }
.mixer-foot .hint { font-size: 12.5px; color: var(--ink-3); }

/* Recording / sing-along panel (MS-377) */
.mx-record {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface-2);
}
.mx-record .spacer { flex: 1; }
.mx-record .rec-hint { font-size: 12.5px; }
.rec-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 700;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  height: 40px; padding: 0 16px; border-radius: 11px; display: inline-flex; align-items: center; gap: 9px;
  transition: .16s var(--ease);
}
.rec-btn:hover:not(:disabled) { border-color: var(--ink-3); }
.rec-btn:disabled { opacity: .55; cursor: default; }
.rec-btn .rec-dot { width: 11px; height: 11px; border-radius: 50%; background: #e5484d; }
.rec-btn.on { border-color: #e5484d; color: #e5484d; }
.rec-btn.on .rec-dot { animation: recPulse 1s infinite; }
@keyframes recPulse {
  0%   { box-shadow: 0 0 0 0 rgba(229,72,77,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(229,72,77,0); }
  100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); }
}
.rec-meter { flex: 1; min-width: 80px; max-width: 280px; height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.rec-meter > span { display: block; height: 100%; width: 0%; background: #e5484d; border-radius: 999px; transition: width .06s linear; }
.rec-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.rec-opt input[type="number"] {
  width: 56px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; padding: 0 6px; text-align: right;
}
.rec-opt input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }

/* ============================================================
   Info sections
   ============================================================ */
.info { margin-top: 56px; }
.info-title { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 18px; text-align: center; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px 20px; transition: .16s var(--ease);
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); border-color: var(--line-strong); }
.feature .f-ic {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.feature .f-ic svg { width: 20px; height: 20px; }
.feature h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.feature p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }

.formats { margin-top: 46px; }
.format-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.fmt {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 17px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.fmt .fmt-ic { color: var(--accent); display: grid; place-items: center; }
.fmt .fmt-ic svg { width: 17px; height: 17px; }
.fmt.duration { color: var(--ink-2); background: var(--surface-2); }

/* ============================================================
   Footer
   ============================================================ */
.foot { margin-top: 64px; padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot .copy { color: var(--ink-3); font-size: 13px; }
.foot .socials { display: flex; gap: 8px; }
.foot .socials a {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--ink-2); transition: .15s var(--ease);
}
.foot .socials a:hover { color: var(--ink); border-color: var(--ink-3); }
.foot .socials a svg { width: 16px; height: 16px; }

/* ============================================================
   State switcher (demo helper)
   ============================================================ */
.state-switch {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: inline-flex; gap: 4px; padding: 5px; z-index: 40;
  background: color-mix(in oklab, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px); border: 1px solid var(--line-strong);
  border-radius: 14px; box-shadow: var(--shadow-pop);
}
.state-switch button {
  appearance: none; border: 0; background: transparent; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 8px 14px; border-radius: 10px;
  transition: .15s var(--ease);
}
.state-switch button[aria-selected="true"] { background: var(--invert); color: var(--invert-ink); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .shell { padding: 16px 16px 90px; }
  .hero { margin-bottom: 26px; }
  .tool-body { padding: 22px 16px 24px; }
  /* Stack the source toggle so long labels (YouTube / SoundCloud, Upload file)
     get the full width and never clip. */
  .segment.full { flex-direction: column; }
  .segment.full button { justify-content: flex-start; }
  .stem-grid { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; align-items: stretch; }
  /* In a column flex row, .cta's `flex:1` (flex-basis:0%) governs height and
     collapses the button; restore an auto basis so height:58px applies. */
  .cta { flex: 0 0 auto; }
  .cta-note { max-width: none; text-align: center; }
  /* Header actions: the whole button group drops to a full-width row and the three
     buttons share it equally (3-across, no wrap → never a 2+1 split). */
  .mixer-head { gap: 12px 14px; }
  .mh-actions { width: 100%; margin-left: 0; }
  .mh-actions > button { flex: 1 1 auto; justify-content: center; }
  /* Label column is max-content so it can NEVER collapse under the control strip —
     that collapse was letting "Vocals/MP3" overflow on top of the fader. The fader
     then shrinks (flex-basis:0, min-width:36) to fit whatever space is left, sitting
     BESIDE the label with a clean gap, and never overflowing the row. */
  .stem-row { grid-template-columns: max-content 1fr; grid-template-areas: "id ctl" "wave wave"; gap: 10px 12px; }
  .stem-row .wave { grid-area: wave; }
  .stem-row .stem-id { grid-area: id; }
  .stem-row .stem-ctl { grid-area: ctl; min-width: 0; }
  .stem-ctl .fader { flex: 1 1 0; width: auto; min-width: 36px; }
  .nav-link.hide-sm { display: none; }
  /* Record panel: drop the flex spacer + hint so controls stack tightly, not with empty gaps. */
  .mx-record { gap: 10px 14px; }
  .mx-record .spacer { display: none; }
  .mx-record .rec-hint { flex-basis: 100%; }
  .mx-record .rec-meter { flex-basis: 100%; max-width: none; }
  .mx-record .rec-btn { flex: 1 1 100%; justify-content: center; }
}

/* Narrow phones: once 3-across gets tight, stack the buttons full-width so their
   labels ("Download mix" / "Download all") never truncate, overflow, or split 2+1. */
@media (max-width: 560px) {
  .mh-actions { flex-direction: column; align-items: stretch; }
}

.fade-in { animation: fadeIn .42s var(--ease); }
@keyframes fadeIn { from { transform: translateY(10px); } }
