:root {
  /* Light lilac studio — keep magenta/cyan + waveform hero; wave stage can stay tinted */
  --bg: #f3eef8;
  --bg-elev: #ebe3f5;
  --panel: #ffffff;
  --ink: #1a1228;
  --muted: #5e4d78;
  --line: #d4c8e8;
  --accent: #c4169a;             /* darker magenta for text/labels */
  --accent-bright: #ff2bd6;      /* fills / markers / neon chrome */
  --accent-2: #0a9e96;           /* cyan ink for links on light */
  --accent-2-bright: #2bfff2;    /* playhead / neon */
  --ok: #1a9a68;
  --danger: #c43c55;
  --wave: #7a5bb5;
  --wave-sel: rgba(255, 43, 214, 0.28);
  --playhead: #2bfff2;
  --wave-stage: #2a1748;         /* slightly darker waveform panel */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --page-max: 72rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --focus: var(--accent-2-bright);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
}
html[lang^="zh"] body { line-height: 1.65; }
a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img, svg, canvas { max-width: 100%; height: auto; display: block; }
button, input, select { font: inherit; color: inherit; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent-bright); color: #1a0b2e; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.wrap {
  width: min(100% - 1.5rem, var(--page-max));
  margin: 0 auto;
  padding: 0.85rem 0 2.5rem;
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
}

/* Mast */
.mast {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.65rem 1rem; margin-bottom: 1.1rem; position: relative;
  padding-bottom: 0.85rem; border-bottom: 1px solid var(--line);
}
.brand a {
  display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink);
}
.brand a:hover { color: var(--ink); }
.brand-mark {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(255, 43, 214, 0.22);
}
.brand-name {
  display: block; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand small { display: block; color: var(--muted); font-size: var(--text-xs); margin-top: 0.05rem; }
.top-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.45rem;
  position: relative; justify-content: flex-end;
}
.lang-switch { display: inline-flex; gap: 0.2rem; }
.lang-btn[aria-pressed="true"] {
  background: var(--accent-bright); color: #1a0b2e; border-color: var(--accent-bright);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.35rem; min-height: 44px; padding: 0.45rem 0.95rem;
  font-family: var(--sans); font-size: var(--text-sm); font-weight: 700;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--ink); cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--accent-2); text-decoration: none; color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn-primary {
  background: var(--accent-bright); color: #1a0b2e; border-color: var(--accent-bright);
  box-shadow: 0 0 16px rgba(255, 43, 214, 0.22);
}
.btn-primary:hover { filter: brightness(1.05); color: #1a0b2e; }
.btn-cyan {
  background: var(--accent-2-bright); color: #1a0b2e; border-color: var(--accent-2-bright);
}
.btn-cyan:hover { filter: brightness(1.05); color: #1a0b2e; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { border-color: var(--line); background: var(--bg-elev); }
.btn-pill { border-radius: var(--radius-pill); min-width: 2.75rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* Header XOR — hard */
.nav-toggle,
.btn.nav-toggle { display: none; }
.nav-guides {
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.55rem; align-items: center;
}
.nav-guides a {
  font-size: var(--text-sm); font-weight: 600;
  text-decoration: none; color: var(--muted);
  padding: 0.3rem 0.4rem; border-radius: 6px;
}
.nav-guides a:hover { color: var(--ink); background: var(--panel); text-decoration: none; }
@media (min-width: 900px) {
  .nav-toggle,
  .btn.nav-toggle { display: none !important; }
  .nav-guides { display: flex !important; position: static; }
  .top-converter-full { display: inline; }
  .top-converter-short { display: none; }
}
@media (max-width: 899px) {
  .nav-toggle,
  .btn.nav-toggle { display: inline-flex !important; }
  .nav-guides {
    display: none; position: absolute; right: 0; top: 100%;
    z-index: 40; flex-direction: column; align-items: stretch;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 0.5rem; min-width: 12rem;
    box-shadow: 0 12px 32px rgba(26,18,40,0.12);
  }
  .nav-guides.is-open { display: flex; }
  .top-converter-full { display: none; }
  .top-converter-short { display: inline; }
}

.kicker {
  font-family: var(--mono); font-size: var(--text-xs);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-2); margin: 0 0 0.4rem;
}
h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.15; margin: 0 0 0.6rem; max-width: 22ch;
}
.lead {
  margin: 0 0 0.85rem; max-width: 48rem;
  color: var(--muted); font-size: var(--text-base);
}
.trust-line {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem;
  align-items: center; margin-bottom: 1rem;
}
.chip {
  display: inline-flex; align-items: center; min-height: 32px;
  padding: 0.2rem 0.7rem; border-radius: var(--radius-pill);
  background: rgba(10, 158, 150, 0.1); color: var(--accent-2);
  font-size: var(--text-sm); font-weight: 600; border: 1px solid rgba(10, 158, 150, 0.28);
}
.session-chip {
  font-family: var(--mono); font-size: var(--text-xs); color: var(--muted);
}
.honest-note {
  margin: 0 0 1.15rem; padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-elev); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--text-sm); color: var(--muted); max-width: 52rem;
}
.honest-note strong { color: var(--ink); }

/* Dropzone — SaaS upload control (HeicLocal-class height; waveform stays hero below) */
.load-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 1.6rem 1.25rem 1.45rem;
  margin-bottom: 0.85rem;
  min-height: 10rem; /* ~160px empty state */
  background: #ffffff;
  border: 2px dashed rgba(196, 22, 154, 0.55);
  border-radius: var(--radius);
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(10, 158, 150, 0.08);
  transition: background 0.12s ease, border-color 0.12s ease, border-style 0.12s ease, box-shadow 0.12s ease;
}
.load-strip:hover {
  border-color: var(--accent-bright);
  background: #faf7fd;
  box-shadow: inset 0 0 0 1px rgba(255, 43, 214, 0.16), 0 0 20px rgba(255, 43, 214, 0.1);
}
.load-strip.is-drag {
  border-style: solid;
  border-color: var(--accent-2-bright);
  background: rgba(43, 255, 242, 0.12);
  box-shadow: inset 0 0 0 2px rgba(43, 255, 242, 0.25), 0 0 24px rgba(43, 255, 242, 0.14);
}
.load-strip:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.drop-badge {
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent-bright);
  background: linear-gradient(145deg, rgba(255, 43, 214, 0.18), rgba(43, 255, 242, 0.12));
  border: 1px solid rgba(255, 43, 214, 0.45);
  box-shadow: 0 0 18px rgba(255, 43, 214, 0.25);
}
.drop-badge svg { display: block; width: 1.5rem; height: 1.5rem; }
.drop-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  min-width: 0;
}
.load-strip .drop-title {
  margin: 0;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.load-strip .drop-hint {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.4;
}
.drop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.45rem;
}
.drop-actions .btn-primary {
  min-height: 2.75rem;
  padding: 0.55rem 1.25rem;
  font-weight: 800;
}
.drop-ghost {
  background: transparent;
  border: none;
  color: var(--accent-2);
  cursor: pointer;
  font-size: var(--text-sm);
  text-decoration: underline;
  text-underline-offset: 2px;
  min-height: 44px;
  padding: 0 0.5rem;
}
.drop-ghost:hover { color: var(--accent); }
.file-meta {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--muted);
  width: 100%;
  text-align: center;
  margin: 0;
}
@media (max-width: 560px) {
  .load-strip {
    min-height: 9rem;
    padding: 1.35rem 1rem 1.25rem;
  }
  .drop-badge { width: 3.15rem; height: 3.15rem; }
  .load-strip .drop-title { font-size: 1.05rem; }
}

/* Waveform studio hero */
.studio {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.85rem;
  box-shadow: 0 0 0 1px rgba(196, 22, 154, 0.1), 0 16px 40px rgba(26, 18, 40, 0.1);
}
.studio-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem; padding: 0.65rem 1rem; border-bottom: 1px solid var(--line);
}
.studio-head h2 {
  margin: 0; font-size: var(--text-sm); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  font-family: var(--mono);
}
.timecode {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.1rem;
  font-family: var(--mono); font-size: var(--text-sm); color: var(--ink);
}
.timecode span b { color: var(--accent-2); font-weight: 700; }
.wave-stage {
  position: relative; height: clamp(160px, 28vw, 240px);
  background:
    linear-gradient(180deg, rgba(255,43,214,0.12), transparent 45%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 49px,
      rgba(201, 166, 255, 0.18) 49px,
      rgba(201, 166, 255, 0.18) 50px
    ),
    var(--wave-stage);
  cursor: crosshair; touch-action: none; user-select: none;
}
.wave-stage .wave-empty { color: #c9a6ff; }
.wave-stage canvas {
  width: 100%; height: 100%; display: block;
}
.wave-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: var(--text-sm); pointer-events: none;
  text-align: center; padding: 1rem;
}
.wave-empty.hidden { display: none; }
.marker {
  position: absolute; top: 0; bottom: 0; width: 2px; z-index: 3;
  background: var(--accent-bright); pointer-events: none;
}
.marker::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 3px;
  background: var(--accent-bright); box-shadow: 0 0 12px rgba(255, 43, 214, 0.7);
}
.marker.out { background: var(--accent-2-bright); }
.marker.out::before { background: var(--accent-2-bright); box-shadow: 0 0 12px rgba(43, 255, 242, 0.7); }
.marker-hit {
  position: absolute; top: 0; bottom: 0; width: 28px; margin-left: -14px;
  z-index: 4; cursor: ew-resize; background: transparent; border: 0; padding: 0;
}
.playhead-line {
  position: absolute; top: 0; bottom: 0; width: 2px; z-index: 5;
  background: var(--playhead);
  box-shadow: 0 0 10px rgba(43, 255, 242, 0.9);
  pointer-events: none; display: none;
}
.playhead-line.is-on { display: block; }

/* Transport */
.transport {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.55rem;
  padding: 0.75rem 1rem; border-top: 1px solid var(--line);
  background: var(--panel);
}
.transport .btn-pill {
  width: 2.85rem; height: 2.85rem; padding: 0; font-size: 1rem;
}
.preset-row {
  display: flex; flex-wrap: wrap; gap: 0.35rem; margin-left: auto;
  align-items: center;
}
.preset-label {
  font-size: var(--text-xs); color: var(--muted); font-family: var(--mono);
  letter-spacing: 0.06em; text-transform: uppercase;
}

.action-bar {
  display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.85rem 0 1.25rem;
}
.progress-bar {
  height: 4px; background: var(--line); border-radius: 2px; overflow: hidden;
  margin: 0 0 0.85rem;
}
.progress-bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent-bright), var(--accent-2-bright));
  transition: width 0.15s ease;
}
.progress-bar.hidden { display: none; }

.proof {
  margin: 1.25rem 0; padding: 0.75rem 1rem;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.proof summary { cursor: pointer; font-weight: 700; }
.proof ol { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.proof p { margin: 0.5rem 0 0; color: var(--muted); font-size: var(--text-sm); }

.seo-block { margin-top: 1.75rem; }
.seo-copy p, .seo-copy li { font-size: var(--text-base); }
.seo-block h2 { font-size: 1.25rem; margin: 0 0 0.55rem; }
.guide-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.65rem; margin: 1rem 0;
}
.guide-card {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.85rem; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); min-height: 4.5rem;
}
.guide-card:hover { border-color: var(--accent); text-decoration: none; color: var(--ink); }
.guide-card strong { font-size: var(--text-sm); }
.guide-card span { font-size: var(--text-sm); color: var(--muted); }
.faq details {
  border-bottom: 1px solid var(--line); padding: 0.55rem 0;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 0.35rem 0 0.5rem; color: var(--muted); }

/* Footer 3-col hard */
.site-footer {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent-2); text-decoration: none; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}
.footer-col { min-width: 0; }
.footer-col h4 {
  font-family: var(--mono); font-size: var(--text-xs);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin: 0 0 0.55rem; color: var(--muted); font-weight: 700;
}
.footer-col ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.35rem;
}
.footer-col li a { display: inline-flex; min-height: 36px; align-items: center; padding: 0 0.15rem; }
.footer-copy { margin: 0 0 0.4rem; font-size: var(--text-sm); color: var(--muted); }
.footer-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  margin-top: 1.1rem; padding-top: 0.75rem; border-top: 1px solid var(--line);
  font-size: var(--text-xs); color: var(--muted); letter-spacing: 0.02em;
  font-family: var(--mono);
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
  .load-actions { margin-left: 0; width: 100%; }
  .preset-row { margin-left: 0; width: 100%; }
}

.legal-page, .article-page { max-width: 42rem; }
.legal-page h1, .article-page h1 {
  margin-top: 0.5rem; font-size: clamp(1.5rem, 3vw, 2rem); max-width: none;
}
.legal-page h2, .article-page h2 {
  font-size: 1.15rem; margin: 1.35rem 0 0.45rem;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.hidden { display: none !important; }

/* UX-OPT-2026-10-20 */
.limit-note {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--muted, #64748b);
  max-width: 36rem;
}
.limit-note strong { color: var(--ink, #0f172a); font-weight: 600; }
.ux-banner {
  display: none;
  margin: 0.75rem 0;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.4;
  border: 1px solid transparent;
}
.ux-banner.is-on { display: block; }
.ux-banner.is-ok {
  background: color-mix(in srgb, #10b981 12%, transparent);
  border-color: color-mix(in srgb, #10b981 35%, transparent);
  color: var(--ink, #065f46);
}
.ux-banner.is-err {
  background: color-mix(in srgb, #ef4444 10%, transparent);
  border-color: color-mix(in srgb, #ef4444 30%, transparent);
  color: var(--ink, #991b1b);
}
.ux-banner .ux-banner-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.45rem; }
.drop-sample-prominent,
.dropzone .drop-sample,
.drop-actions .drop-ghost,
.dropzone .sample-link,
.drop-strip .drop-ghost {
  font-weight: 600 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}
@media (max-width: 480px) {
  body { padding-bottom: max(var(--sc-fb-pad, 72px), env(safe-area-inset-bottom)); }
  .batch-bar, #batchBar, .action-bar {
    padding-right: 4.25rem; /* leave room for feedback FAB */
  }
  .tool-stage, .paste-stage, .desk, .crt-bench, .studio, main {
    overflow-x: clip;
  }
}
