/* ════════════════════════════════════════════════════════════
   AURAL — Spatial Audio Atelier
   Design system · royal, restrained, precise
   ════════════════════════════════════════════════════════════ */

:root {
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-veil: cubic-bezier(0.77, 0, 0.18, 1);

  --header-h: 72px;
}

/* ---------- Dark theme (default) ---------- */
:root[data-theme="dark"] {
  --bg: #0b0d12;
  --bg-elev: #10131b;
  --bg-elev-2: #151926;
  --surface: rgba(255, 255, 255, 0.028);
  --surface-strong: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);
  --ink: #e9e6dd;
  --ink-mute: #9a97a5;
  --ink-faint: #5d5b68;
  --gold: #c9a24b;
  --gold-bright: #e6c476;
  --gold-ink: #14100a;
  --glow: rgba(201, 162, 75, 0.35);
  --veil-bg: #07080c;
  --scrim: rgba(11, 13, 18, 0.72);
  --shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.7);
  --wave-base: rgba(233, 230, 221, 0.22);
  --wave-fill: #c9a24b;
}

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  --bg: #f5f2ea;
  --bg-elev: #fbf9f3;
  --bg-elev-2: #ffffff;
  --surface: rgba(24, 26, 38, 0.035);
  --surface-strong: rgba(24, 26, 38, 0.065);
  --line: rgba(24, 26, 38, 0.13);
  --line-soft: rgba(24, 26, 38, 0.07);
  --ink: #1d1f2a;
  --ink-mute: #5b5d6b;
  --ink-faint: #9b9daa;
  --gold: #a67c1e;
  --gold-bright: #8a6510;
  --gold-ink: #fffbef;
  --glow: rgba(166, 124, 30, 0.28);
  --veil-bg: #14161f;
  --scrim: rgba(245, 242, 234, 0.72);
  --shadow: 0 24px 64px -28px rgba(30, 32, 48, 0.35);
  --wave-base: rgba(29, 31, 42, 0.2);
  --wave-fill: #a67c1e;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: var(--gold-ink); }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
[hidden] { display: none !important; }

/* Subtle vignette texture */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(1200px 700px at 50% -10%, var(--glow), transparent 60%);
  opacity: 0.14;
  transition: opacity 0.5s;
}

/* ════════════════ HEADER ════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex; align-items: center; gap: 32px;
  padding: 0 clamp(20px, 4vw, 48px);
  z-index: 50;
  background: linear-gradient(to bottom, var(--bg) 20%, transparent);
  backdrop-filter: blur(2px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 30px; height: 30px; color: var(--gold); transition: transform 0.8s var(--ease-out), color 0.5s; }
.brand:hover .brand-mark { transform: rotate(180deg); }
.brand-word {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600;
  letter-spacing: 0.34em; text-indent: 0.34em;
}

.site-nav { display: flex; gap: 8px; margin-left: auto; }
.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
  transition: color 0.3s;
}
.nav-link::after {
  content: "";
  position: absolute; left: 16px; right: 16px; bottom: 2px;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  position: relative; width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--ink-mute);
  transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out);
  overflow: hidden;
}
.theme-toggle:hover { color: var(--gold); border-color: var(--gold); transform: rotate(15deg); }
.theme-toggle svg {
  position: absolute; width: 18px; height: 18px;
  transition: transform 0.55s var(--ease-out), opacity 0.4s;
}
:root[data-theme="dark"] .ico-sun { opacity: 0; transform: translateY(120%) rotate(90deg); }
:root[data-theme="dark"] .ico-moon { opacity: 1; transform: none; }
:root[data-theme="light"] .ico-sun { opacity: 1; transform: none; }
:root[data-theme="light"] .ico-moon { opacity: 0; transform: translateY(-120%) rotate(-90deg); }

/* ════════════════ BUTTONS ════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 28px;
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, background-color 0.3s,
              color 0.3s, border-color 0.3s;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn-ico { width: 16px; height: 16px; }

.btn-gold {
  background: var(--gold); color: var(--gold-ink);
  box-shadow: 0 8px 28px -10px var(--glow);
}
.btn-gold:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -10px var(--glow);
}
.btn-ghost {
  border-color: var(--line); color: var(--ink-mute);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

.btn-lg { padding: 16px 34px; font-size: 13px; }
.btn-sm { padding: 9px 18px; font-size: 11px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ════════════════ PAGE TRANSITION VEIL ════════════════
   A single curtain sweeps down to cover the page, then continues
   down and off-screen — one element, so it can never half-cover. */
.veil { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.veil-curtain {
  position: absolute; left: 0; right: 0; top: -2%; bottom: -2%;
  background: var(--veil-bg);
  transform: translateY(-103%);
}
.veil.is-closed .veil-curtain,
.veil.is-open .veil-curtain { transition: transform 0.55s var(--ease-veil); }
.veil.is-closed { pointer-events: all; }
.veil.is-closed .veil-curtain { transform: translateY(0); }
.veil.is-open .veil-curtain { transform: translateY(103%); }
.veil-mark {
  position: absolute; top: 50%; left: 50%;
  width: 68px; height: 68px;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  transition: opacity 0.25s, transform 0.5s var(--ease-out);
}
.veil-mark::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, #c9a24b 28%, transparent);
}
.vm-core {
  position: absolute; top: 50%; left: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #e6c476;
  box-shadow: 0 0 12px rgba(201, 162, 75, 0.8);
  animation: vmBreathe 1.6s ease-in-out infinite;
}
@keyframes vmBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.45); }
}
.vm-orbit {
  position: absolute; inset: 0;
  animation: vmSpin 1.5s linear infinite;
}
.vm-dot {
  position: absolute; top: -3.5px; left: 50%;
  width: 7px; height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: #c9a24b;
  box-shadow: 0 0 10px rgba(201, 162, 75, 0.9);
}
@keyframes vmSpin { to { transform: rotate(360deg); } }
.veil.is-closed .veil-mark { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ════════════════ VIEWS ════════════════ */
main { position: relative; z-index: 1; }
.view { display: none; min-height: 100vh; padding-top: var(--header-h); }
.view.is-active { display: block; animation: viewIn 0.7s var(--ease-out) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ════════════════ HOME ════════════════ */
.view-home { position: relative; display: none; }
.view-home.is-active { display: flex; flex-direction: column; }
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: -1; opacity: 0.85;
}
.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(48px, 11vh, 130px) 24px 40px;
  text-align: center;
}
.hero-eyebrow {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.42em; text-transform: uppercase; text-indent: 0.42em;
  color: var(--gold);
  margin-bottom: 26px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(46px, 8.5vw, 96px);
  line-height: 1.04;
  letter-spacing: 0.01em;
}
.hero-title span { display: block; }
.hero-title em { font-style: italic; color: var(--gold); }
.hero-sub {
  max-width: 560px; margin: 30px auto 0;
  color: var(--ink-mute);
  font-size: 16px; font-weight: 300; line-height: 1.75;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-top: 42px; flex-wrap: wrap; }
.hero-note {
  margin-top: 34px;
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint);
}
.note-ico { width: 16px; height: 16px; }

/* staggered reveal */
.reveal { opacity: 0; animation: revealUp 0.9s var(--ease-out) forwards; animation-delay: calc(var(--d, 0) * 90ms + 150ms); }
@keyframes revealUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
/* re-trigger on view switch */
.view:not(.is-active) .reveal { animation: none; }

.feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
  margin-top: auto;
}
.feature {
  background: var(--bg);
  padding: 34px 30px 38px;
  transition: background-color 0.4s;
}
.feature:hover { background: var(--bg-elev); }
.feature-ico { width: 26px; height: 26px; color: var(--gold); margin-bottom: 18px; }
.feature h3 {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 600; letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.feature p { font-size: 13.5px; color: var(--ink-mute); font-weight: 300; }

.site-footer {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 26px 24px;
  font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint);
  flex-wrap: wrap; text-align: center;
}
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }

/* ════════════════ STUDIO ════════════════ */
.view-studio { display: none; }
.view-studio.is-active { display: block; }

/* --- Import stage --- */
.import-stage {
  min-height: calc(100vh - var(--header-h));
  display: grid; place-items: center;
  padding: 30px 24px 60px;
}
.import-card {
  width: min(620px, 100%);
  text-align: center;
  padding: clamp(40px, 6vw, 72px) clamp(28px, 5vw, 64px);
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: var(--surface);
  transition: border-color 0.35s, background-color 0.35s, transform 0.35s var(--ease-out);
  outline: none;
}
.import-card:hover, .import-card:focus-visible, .import-card.is-over {
  border-color: var(--gold);
  background: var(--surface-strong);
  transform: translateY(-3px);
}
.import-ring {
  width: 92px; height: 92px; margin: 0 auto 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  position: relative;
}
.import-ring::before, .import-ring::after {
  content: ""; position: absolute; inset: -14px;
  border-radius: 50%; border: 1px solid var(--line-soft);
  animation: ringPulse 3.2s var(--ease-out) infinite;
}
.import-ring::after { animation-delay: 1.6s; }
@keyframes ringPulse {
  0% { transform: scale(0.82); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: scale(1.18); opacity: 0; }
}
.import-ico { width: 34px; height: 34px; color: var(--gold); }
.import-card h2 {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 600; margin-bottom: 12px;
}
.import-card p { color: var(--ink-mute); font-weight: 300; font-size: 14.5px; }
.import-actions { display: flex; gap: 14px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

/* --- Drag-over veil --- */
.drop-veil {
  position: fixed; inset: 0; z-index: 60;
  background: var(--scrim);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.drop-veil.is-on { opacity: 1; }
.drop-veil-inner {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 48px 72px;
  border: 1px dashed var(--gold);
  border-radius: 8px;
  color: var(--gold);
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
}
.drop-veil-inner svg { width: 42px; height: 42px; }

/* --- Workspace layout --- */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  padding: 10px clamp(16px, 3vw, 36px) 32px;
  max-width: 1560px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h));
  animation: viewIn 0.7s var(--ease-out) both;
}

.stage-pane { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.stage-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.track-id { display: flex; align-items: center; gap: 13px; min-width: 0; }
.track-ico {
  width: 38px; height: 38px; padding: 9px;
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--gold); flex: none;
}
.track-meta { display: flex; flex-direction: column; min-width: 0; }
.track-name {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-sub { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.stage-head-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.pos-readout {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold);
  padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 20px;
  min-width: 108px; text-align: center;
  transition: color 0.3s;
}

.stage-canvas-wrap {
  position: relative;
  flex: 1; min-height: 420px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, var(--surface-strong), transparent 75%),
    var(--bg-elev);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: background-color 0.5s;
}
#stageCanvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.stage-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
  opacity: 0.85; pointer-events: none;
  transition: opacity 0.5s;
}
.stage-canvas-wrap:hover .stage-hint { opacity: 0.35; }

/* --- Transport --- */
.transport {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--bg-elev);
}
.tbtn {
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-mute);
  border: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s, background-color 0.3s, transform 0.25s var(--ease-out);
}
.tbtn svg { width: 17px; height: 17px; }
.tbtn:hover { color: var(--gold); transform: scale(1.08); }
.tbtn.is-on { color: var(--gold); border-color: var(--gold); }
.tbtn-main {
  width: 50px; height: 50px;
  background: var(--gold); color: var(--gold-ink);
  box-shadow: 0 8px 24px -8px var(--glow);
  position: relative;
}
.tbtn-main:hover { color: var(--gold-ink); background: var(--gold-bright); }
.tbtn-main svg { position: absolute; width: 20px; height: 20px; transition: opacity 0.2s, transform 0.3s var(--ease-out); }
.tbtn-main .ico-pause { opacity: 0; transform: scale(0.5); }
.tbtn-main.is-playing .ico-play { opacity: 0; transform: scale(0.5); }
.tbtn-main.is-playing .ico-pause { opacity: 1; transform: scale(1); }

.t-time {
  font-size: 12px; font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em; color: var(--ink-mute);
  min-width: 42px; text-align: center; flex: none;
}
.waveform {
  position: relative; flex: 1; height: 52px;
  cursor: pointer; min-width: 0;
}
#waveCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave-cursor {
  position: absolute; top: 4px; bottom: 4px; left: 0;
  width: 1.5px; background: var(--gold-bright);
  box-shadow: 0 0 10px var(--glow);
  pointer-events: none;
  transition: opacity 0.3s;
}

/* ════════════════ CONTROL PANE ════════════════ */
.control-pane {
  display: flex; flex-direction: column; gap: 18px;
  align-self: start;
  position: sticky; top: calc(var(--header-h) + 10px);
}
.cgroup {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--bg-elev);
  padding: 20px 20px 22px;
  transition: background-color 0.5s;
}
.cgroup-title {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.cgroup-title::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

.field-label {
  display: block;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint);
  margin: 4px 0 10px;
}

/* --- mode switch --- */
.mode-switch {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 18px;
}
.mode-btn {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 8px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute);
  transition: color 0.35s;
}
.mode-btn svg { width: 15px; height: 15px; }
.mode-btn.is-active { color: var(--gold-ink); }
.mode-thumb {
  position: absolute; top: 0; left: 0; width: 50%; height: 100%;
  background: var(--gold);
  transition: transform 0.4s var(--ease-out);
}
.mode-switch[data-active="manual"] .mode-thumb { transform: translateX(100%); }

/* --- path chips --- */
.path-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  padding: 8px 14px;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-mute);
  transition: all 0.3s var(--ease-out);
}
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.is-active {
  background: var(--gold); border-color: var(--gold);
  color: var(--gold-ink);
  box-shadow: 0 4px 16px -6px var(--glow);
}

/* --- segmented --- */
.seg {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line); border-radius: 5px; overflow: hidden;
}
.seg-btn {
  padding: 8px 6px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  color: var(--ink-mute);
  transition: all 0.3s;
}
.seg-btn.is-active { background: var(--surface-strong); color: var(--gold); }

/* --- sliders --- */
.slider-row {
  display: grid;
  grid-template-columns: 76px 1fr 64px;
  align-items: center; gap: 12px;
  margin-top: 14px;
}
.slider-row label {
  font-size: 12px; color: var(--ink-mute); letter-spacing: 0.04em;
}
.slider-val {
  font-size: 11.5px; font-variant-numeric: tabular-nums;
  color: var(--ink-faint); text-align: right;
  transition: color 0.3s;
}
.slider-row:hover .slider-val { color: var(--gold); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px;
  background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 2px; border-radius: 2px;
  background: linear-gradient(to right, var(--gold) var(--fill, 50%), var(--line) var(--fill, 50%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; margin-top: -6px;
  border-radius: 50%;
  background: var(--bg-elev-2);
  border: 1.5px solid var(--gold);
  box-shadow: 0 2px 10px -2px var(--glow);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.25); box-shadow: 0 0 14px var(--glow); }
input[type="range"]::-moz-range-track {
  height: 2px; border-radius: 2px; background: var(--line);
}
input[type="range"]::-moz-range-progress { height: 2px; background: var(--gold); }
input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-elev-2); border: 1.5px solid var(--gold);
  transition: transform 0.25s var(--ease-out);
}
input[type="range"]:hover::-moz-range-thumb { transform: scale(1.25); }

/* --- position pad --- */
.pad-wrap { display: grid; place-items: center; margin-bottom: 6px; }
.pad {
  position: relative;
  width: min(230px, 100%); aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle, var(--surface-strong), transparent 72%);
  cursor: crosshair;
  touch-action: none;
}
.pad-axis { position: absolute; background: var(--line-soft); }
.pad-axis-v { left: 50%; top: 6%; bottom: 6%; width: 1px; }
.pad-axis-h { top: 50%; left: 6%; right: 6%; height: 1px; }
.pad-ring { position: absolute; border: 1px solid var(--line-soft); border-radius: 50%; }
.pad-ring-1 { inset: 18%; }
.pad-ring-2 { inset: 36%; }
.pad-label {
  position: absolute;
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-faint);
}
.pad-n { top: 7px; left: 50%; transform: translateX(-50%); }
.pad-s { bottom: 7px; left: 50%; transform: translateX(-50%); }
.pad-w { left: 9px; top: 50%; transform: translateY(-50%); }
.pad-e { right: 9px; top: 50%; transform: translateY(-50%); }
.pad-dot {
  position: absolute; width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent), 0 0 18px var(--glow);
  transform: translate(-50%, -50%);
  left: 50%; top: 22%;
  transition: box-shadow 0.3s;
}
.pad:active .pad-dot { box-shadow: 0 0 0 7px color-mix(in srgb, var(--gold) 30%, transparent), 0 0 26px var(--glow); }

/* --- export --- */
.export-note { font-size: 12.5px; color: var(--ink-mute); font-weight: 300; margin-bottom: 16px; }
.export-bar {
  height: 2px; margin-top: 14px;
  background: var(--line-soft); border-radius: 2px;
  overflow: hidden;
  opacity: 0; transition: opacity 0.3s;
}
.export-bar.is-on { opacity: 1; }
.export-bar span {
  display: block; height: 100%; width: 0%;
  background: var(--gold);
  transition: width 0.2s linear;
}

/* ════════════════ GUIDE ════════════════ */
.view-guide.is-active { display: block; }
.guide-inner {
  max-width: 720px; margin: 0 auto;
  padding: clamp(40px, 8vh, 90px) 24px 100px;
}
.guide-eyebrow {
  font-size: 12px; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 20px;
}
.guide-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 60px); font-weight: 500; line-height: 1.1;
  margin-bottom: 24px;
}
.guide-lede {
  font-size: 17px; font-weight: 300; line-height: 1.8;
  color: var(--ink-mute);
  margin-bottom: 64px;
}
.steps { list-style: none; display: flex; flex-direction: column; }
.step {
  display: flex; gap: 28px;
  padding: 34px 0;
  border-top: 1px solid var(--line-soft);
}
.step:last-child { border-bottom: 1px solid var(--line-soft); }
.step-num {
  font-family: var(--font-display);
  font-size: 30px; font-style: italic; color: var(--gold);
  min-width: 52px;
  line-height: 1.15;
}
.step-body h3 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 600; margin-bottom: 8px;
}
.step-body p { color: var(--ink-mute); font-weight: 300; font-size: 14.5px; }
.guide-cta { margin-top: 60px; text-align: center; }

/* ════════════════ TOAST ════════════════ */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translate(-50%, 80px);
  z-index: 90;
  padding: 13px 26px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 4px;
  font-size: 13px; letter-spacing: 0.03em;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.4s;
  pointer-events: none;
  max-width: min(480px, calc(100vw - 40px));
  text-align: center;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ════════════════ RESPONSIVE ════════════════ */
@media (max-width: 1040px) {
  .workspace { grid-template-columns: 1fr; }
  .control-pane { position: static; }
  .stage-canvas-wrap { min-height: 340px; }
}
@media (max-width: 720px) {
  .site-nav { display: none; }
  .header-cta { display: none; }
  .brand-word { font-size: 18px; }
  .hero-title { font-size: clamp(40px, 12vw, 60px); }
  .stage-head { flex-direction: column; align-items: flex-start; }
  .transport { flex-wrap: wrap; }
  .waveform { order: 5; flex-basis: 100%; }
  .step { gap: 18px; }
}

/* Mobile nav fallback: show nav below header on small screens */
@media (max-width: 720px) {
  .site-nav {
    display: flex;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    justify-content: center;
    padding: 4px 0 10px;
    background: linear-gradient(to bottom, var(--bg) 60%, transparent);
    z-index: 49;
  }
  .view { padding-top: calc(var(--header-h) + 40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
