/* Vocal Studio: the same warm instrument body as Drum Studio, in the light Studio Music Tools shell.
 * Selected, playing and rest states never rely on colour alone: they differ in border weight, border style, shape and text. */
.vs-intro h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); letter-spacing: -0.03em; margin: 12px 0 8px; }
.vs-intro__lede { max-width: 660px; }
.vs-intro__commerce { margin: 0; max-width: 46em; }
.vs-intro { padding-bottom: 44px; }
.vs-stage { padding-top: 96px; padding-bottom: 36px; }

.vs {
  --vs-body: #e7e3d9; --vs-body-2: #ddd8cb; --vs-key: #f4f1e9; --vs-key-2: #ebe7dc; --vs-line: #bdb6a6; --vs-line-2: #a9a291;
  --vs-ink: #25282c; --vs-ink-2: #3a3e44; --vs-ghost: #686d74; --vs-muted: #515659; --vs-led: #e0501e; --vs-hot: #c2410c; --vs-focus: #1f4fbf;
  --vs-wave: #3a3e44; --vs-wavebg: #f4f1e9; --vs-slice: rgba(224, 80, 30, 0.10); --vs-sel: rgba(224, 80, 30, 0.28); --vs-edge: #a9a291;
  background: var(--vs-body); color: var(--vs-ink); border: 1px solid var(--vs-line-2); border-radius: 6px;
  box-shadow: 0 1px 0 #fff inset, 0 2px 0 var(--vs-line); font-family: var(--font-body); font-size: 13px; min-width: 0;
}
:where(.vs) button, :where(.vs) select, :where(.vs) input { font: inherit; color: inherit; }
.vs :focus-visible { outline: 3px solid var(--vs-focus); outline-offset: 2px; }
.vs [hidden] { display: none !important; }

/* ---------- bar ---------- */
.vs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 12px 16px; border-bottom: 1px solid var(--vs-line-2); background: var(--vs-body-2); border-radius: 6px 6px 0 0; }
.vs-brand { display: flex; align-items: center; gap: 12px; padding-right: 20px; border-right: 1px solid var(--vs-line-2); }
.vs-brand__logo { display: block; height: 36px; width: auto; }
.vs-brand__name { display: flex; flex-direction: column; line-height: 1.1; }
.vs-brand__name strong { font-family: var(--font-heading); font-size: 17px; letter-spacing: 0.12em; }
.vs-brand__name span { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--vs-muted); margin-top: 3px; }
.vs-transport { display: flex; gap: 8px; flex-wrap: wrap; }
.vs-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vs-field label, .vs-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--vs-muted); display: flex; justify-content: space-between; gap: 8px; }
.vs-field output { color: var(--vs-ink); letter-spacing: 0.04em; font-weight: 600; }
.vs-field select, .vs-field input[type="number"], .vs-bpm__box { height: 34px; border: 1px solid var(--vs-line-2); border-radius: 3px; background: var(--vs-key); }
.vs-field select { padding: 0 8px; min-width: 96px; }
.vs-field input[type="number"] { padding: 0 8px; width: 100px; }
.vs-bpm__box { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; overflow: hidden; width: 128px; box-sizing: border-box; }
.vs .vs-bpm__box input[type="number"] { display: block; width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; text-align: center; box-sizing: border-box; font-family: var(--font-mono); font-size: 16px; font-weight: 600; -moz-appearance: textfield; }
.vs .vs-bpm__box input::-webkit-outer-spin-button, .vs .vs-bpm__box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vs-nudge, .vs-nudge2 { display: grid; place-items: center; width: 34px; height: 100%; padding: 0; border: 0; background: var(--vs-key-2); cursor: pointer; font-size: 18px; line-height: 1; }
.vs-nudge2 { height: 30px; width: 30px; border: 1px solid var(--vs-line-2); border-radius: 3px; background: var(--vs-key); flex: 0 0 auto; }
.vs-nudge:hover, .vs-nudge2:hover:not(:disabled) { background: var(--vs-line); }
.vs-nudge2:disabled { opacity: 0.45; cursor: not-allowed; }
.vs input[type="range"] { accent-color: var(--vs-ink); width: 100%; min-width: 96px; margin: 0; height: 22px; }
.vs-loopinfo { margin: 0 0 0 auto; font-size: 12px; color: var(--vs-muted); }

.vs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--vs-ink); border-radius: 3px; background: var(--vs-key); color: var(--vs-ink); font-family: var(--font-heading); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.vs-btn:hover:not(:disabled):not([aria-pressed="true"]) { background: #fff; }
.vs-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.vs-btn--primary { background: var(--vs-ink); color: #f4f1e9; }
.vs-btn--primary:hover:not(:disabled) { background: var(--vs-ink-2) !important; }
.vs-btn--quiet { border-color: var(--vs-line-2); height: 30px; padding: 0 11px; font-size: 11px; }
.vs-btn[aria-pressed="true"]:not(.vs-btn--play) { background: var(--vs-ink); color: #f4f1e9; border-color: var(--vs-ink); }
.vs-btn--play { min-width: 96px; }
.vs-btn--play[aria-pressed="true"] { background: var(--vs-hot); border-color: #8d2f08; color: #fff; }
.vs-btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.vs-ico { width: 0; height: 0; display: inline-block; }
.vs-ico--play { border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.vs-ico--stop { width: 11px; height: 11px; background: currentColor; }
.vs-filebtn { cursor: pointer; }
.vs-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.vs-file:focus-visible + .vs-drop__txt, .vs-drop:focus-within .vs-filebtn { outline: 3px solid var(--vs-focus); outline-offset: 2px; }

.vs-seg { display: inline-flex; border: 1px solid var(--vs-ink); border-radius: 3px; overflow: hidden; }
.vs-seg--wrap { flex-wrap: wrap; }
.vs-seg button { height: 32px; padding: 0 12px; border: 0; border-right: 1px solid var(--vs-line-2); background: var(--vs-key); cursor: pointer; font-size: 12px; font-weight: 600; }
.vs-seg button:last-child { border-right: 0; }
.vs-seg button[aria-pressed="true"] { background: var(--vs-ink); color: #f4f1e9; box-shadow: inset 0 -3px 0 var(--vs-led); }
.vs-seg button:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- workflow rail ---------- */
.vs-flow { display: flex; flex-wrap: wrap; gap: 4px 6px; list-style: none; margin: 0; padding: 8px 16px; border-bottom: 1px solid var(--vs-line-2); counter-reset: vsflow; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.vs-flow li { counter-increment: vsflow; }
.vs-flow li::before { content: counter(vsflow) "."; margin-right: 4px; color: var(--vs-muted); }
.vs-flow li + li::after { content: ""; }
.vs-flow a { color: var(--vs-ink); text-decoration: none; padding: 4px 8px; border-radius: 3px; border: 1px solid transparent; display: inline-block; }
.vs-flow a:hover { border-color: var(--vs-line-2); background: var(--vs-key); }
.vs-flow li.is-done a::after { content: " \2713"; font-weight: 700; }

/* ---------- panels ---------- */
.vs-panel { padding: 14px 16px 16px; border-bottom: 1px solid var(--vs-line-2); scroll-margin-top: 90px; }
.vs-panel:last-of-type { border-bottom: 0; }
.vs-panel__title { margin: 0 0 10px; font-family: var(--font-heading); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.vs-num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--vs-ink); color: #f4f1e9; font-size: 11px; letter-spacing: 0; }
.vs-panel.is-idle .vs-panel__title::after { content: "Load a recording first"; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; color: var(--vs-muted); margin-left: 6px; }
.vs-sub { margin: 14px 0 6px; font-family: var(--font-heading); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; display: flex; gap: 10px; align-items: baseline; }
.vs-fine { margin: 6px 0; font-size: 12px; line-height: 1.5; color: var(--vs-muted); }
.vs-fine a { color: var(--vs-focus); }
.vs-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 18px; margin-bottom: 8px; }
.vs-tools--edit { align-items: center; }
.vs-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.vs-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.vs-tools .vs-actions { margin-left: auto; }

/* ---------- source ---------- */
.vs-source { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.vs-drop { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 12px; border: 2px dashed var(--vs-line-2); border-radius: 4px; background: var(--vs-key); }
.vs-drop.is-over { border-style: solid; border-color: var(--vs-ink); background: #fff; }
.vs-drop__txt { font-size: 12px; color: var(--vs-muted); }
.vs-info { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; }
.vs-info div { display: flex; flex-direction: column; min-width: 0; }
.vs-info dt { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--vs-muted); }
.vs-info dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.vs-panel.is-busy { cursor: progress; }

/* ---------- waveform ---------- */
.vs-wavewrap { border: 1px solid var(--vs-line-2); border-radius: 4px; background: var(--vs-wavebg); overflow: hidden; }
.vs-wave { position: relative; height: 210px; touch-action: pan-y; }
.vs-wave canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
.vs-scroll { display: block; width: 100%; margin: 0; border-top: 1px solid var(--vs-line); }
.vs-zoom { display: flex; align-items: center; gap: 6px; }
.vs-sedit { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--vs-line-2); border-radius: 4px; background: var(--vs-key); }
.vs-sedit > strong { font-family: var(--font-heading); letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; align-self: center; min-width: 6em; }
.vs-bank { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.vs-pad { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 8px 10px; border: 1px solid var(--vs-line-2); border-radius: 3px; background: var(--vs-key); cursor: pointer; text-align: left; min-height: 52px; }
.vs-pad:hover { border-color: var(--vs-ink); }
.vs-pad__n { font-family: var(--font-heading); font-weight: 700; font-size: 16px; line-height: 1; }
.vs-pad__d { font-size: 11px; color: var(--vs-muted); font-variant-numeric: tabular-nums; }
.vs-pad i { position: absolute; left: 8px; bottom: 4px; height: 3px; max-width: calc(100% - 16px); background: var(--vs-ink-2); border-radius: 2px; }
.vs-pad[aria-pressed="true"] { background: var(--vs-ink); color: #f4f1e9; border-color: var(--vs-ink); outline: 2px solid var(--vs-led); outline-offset: -4px; }
.vs-pad[aria-pressed="true"] .vs-pad__d { color: #d8d3c6; }
.vs-pad[aria-pressed="true"] i { background: var(--vs-led); }

/* ---------- composer ---------- */
.vs-slots { display: flex; align-items: center; gap: 6px; }
.vs-slot { position: relative; width: 38px; height: 32px; border: 1px solid var(--vs-ink); border-radius: 3px; background: var(--vs-key); cursor: pointer; font-family: var(--font-heading); font-weight: 700; }
.vs-slot[aria-pressed="true"] { background: var(--vs-ink); color: #f4f1e9; box-shadow: inset 0 -3px 0 var(--vs-led); }
.vs-slot i { position: absolute; right: 3px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.vs-slot.has-data i { background: var(--vs-led); }
.vs-stepswrap { padding: 4px 0 2px; }
.vs-steps { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 4px; }
.vs-step { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; min-width: 0; height: 74px; padding: 4px 2px 8px; border: 1px solid var(--vs-line-2); border-bottom-width: 3px; border-radius: 3px; background: var(--vs-key); cursor: pointer; touch-action: manipulation; }
.vs-step--beat { background: var(--vs-key-2); }
.vs-step:hover { border-color: var(--vs-ink); }
.vs-step__n { font-family: var(--font-mono); font-size: 10px; color: var(--vs-muted); }
.vs-step--beat .vs-step__n { font-weight: 700; color: var(--vs-ink); }
.vs-step__s { font-family: var(--font-heading); font-size: 20px; font-weight: 700; line-height: 1; }
.vs-step__f { font-size: 10px; font-weight: 700; min-height: 12px; letter-spacing: 0; white-space: nowrap; }
.vs-step i { position: absolute; left: 3px; bottom: 2px; height: 3px; background: var(--vs-led); border-radius: 2px; max-width: calc(100% - 6px); }
.vs-step.is-rest { border-style: dashed; background: transparent; }
.vs-step.is-rest .vs-step__s { color: var(--vs-ghost); font-weight: 400; }
.vs-step:not(.is-rest) { background: var(--vs-ink); border-color: #15171a; color: #f4f1e9; }
.vs-step:not(.is-rest) .vs-step__n { color: #cfcabd; }
.vs-step[aria-pressed="true"] { outline: 3px solid var(--vs-ink); outline-offset: 1px; border-bottom-color: var(--vs-hot); }
.vs-step[aria-pressed="true"]:not(.is-rest) { outline-color: var(--vs-hot); }
.vs-step.is-play { box-shadow: 0 0 0 3px var(--vs-led); z-index: 1; }
.vs-step.is-play::before { content: ""; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top: 7px solid var(--vs-hot); border-bottom: 0; }
.vs-edit { margin-top: 12px; padding: 10px 12px 12px; border: 1px solid var(--vs-line-2); border-radius: 4px; background: var(--vs-key); }
.vs-edit .vs-sub { margin-top: 0; }
.vs-edit__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; margin-bottom: 10px; }
.vs-pitch { grid-column: span 2; }
.vs-pitch__row { display: flex; align-items: center; gap: 6px; }
.vs-pitch__row input[type="range"] { flex: 1 1 auto; }

/* ---------- generate / export ---------- */
.vs-gen { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px 24px; align-items: end; }
.vs-actions--gen { align-items: center; }
.vs-export { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 18px; }
.vs-export__pat { margin: 0; font-size: 13px; align-self: center; }
.vs-result { margin: 6px 0 0; font-size: 12.5px; font-family: var(--font-mono); color: var(--vs-ink); overflow-wrap: anywhere; }
.vs-foot { padding: 8px 16px 12px; border-top: 1px solid var(--vs-line-2); background: var(--vs-body-2); border-radius: 0 0 6px 6px; }
.vs-status { margin: 0; font-size: 13px; min-height: 1.4em; }
.vs-status[data-kind="error"] { color: #9b1c1c; font-weight: 600; }
.vs-status[data-kind="error"]::before { content: "Problem: "; }
.vs-status[data-kind="warn"]::before { content: "Note: "; font-weight: 600; }

/* ---------- copy ---------- */
.vs-copy__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px 36px; }
.vs-faq details { border-bottom: 1px solid var(--vs-line, #d8d3c6); padding: 10px 0; }
.vs-faq summary { cursor: pointer; font-weight: 600; }
.vs-related { margin-top: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .vs-gen { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .vs-actions--gen { grid-column: 1 / -1; }
  .vs-loopinfo { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 768px) {
  .vs-stage { padding-top: 84px; }
  .vs-brand { border-right: 0; padding-right: 0; flex-basis: 100%; }
  .vs-steps { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .vs-step { height: 70px; }
  .vs-gen { grid-template-columns: minmax(0, 1fr); }
  .vs-pitch { grid-column: 1 / -1; }
  .vs-tools .vs-actions { margin-left: 0; }
  .vs-wave { height: 170px; }
  .vs-bank { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}
@media (max-width: 480px) {
  .vs-bar, .vs-panel { padding-left: 12px; padding-right: 12px; }
  .vs-flow { padding-left: 12px; padding-right: 12px; }
  .vs-step__s { font-size: 17px; }
  .vs-step__f { font-size: 9px; }
  .vs-btn { padding: 0 11px; }
  .vs-drop { width: 100%; box-sizing: border-box; }
  .vs-field input[type="number"] { width: 84px; }
  .vs-sedit > strong { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .vs *, .vs *::before, .vs *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
