/* AudioMix — "Aurora" design system (clean-room, original code). */

:root {
  --bg: #06070c;
  --bg2: #0b0d15;
  --glass: rgba(255, 255, 255, .035);
  --glass2: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #f2f4fa;
  --muted: #a3adc2;
  --faint: #8b94ab; /* v18: raised from #6d7690 — must keep >=4.5:1 vs --bg in both themes */
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --grad: linear-gradient(135deg, #8b5cf6, #22d3ee);
  --grad-text: linear-gradient(92deg, #a78bfa, #22d3ee);
  --ok: #34d399;
  --danger: #fb7185;
  --warn: #fbbf24;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --glow: 0 0 0 1px rgba(139, 92, 246, .35), 0 8px 32px rgba(139, 92, 246, .28);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* aurora mesh background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(640px 420px at 12% -6%, rgba(139, 92, 246, .20), transparent 65%),
    radial-gradient(720px 460px at 88% 4%, rgba(34, 211, 238, .13), transparent 65%),
    radial-gradient(560px 520px at 50% 110%, rgba(244, 114, 182, .07), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 75%);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.18; letter-spacing: -.025em; margin: 0 0 .7rem; }
h1 { font-size: 2.2rem; font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 750; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1rem; }

.muted { color: var(--muted); font-size: .92rem; }
.lede { font-size: 1.08rem; color: var(--muted); }
.center { text-align: center; }
.narrow { max-width: 760px; }
.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #c9b8ff;
  background: rgba(139, 92, 246, .12);
  border: 1px solid rgba(139, 92, 246, .35);
  padding: .42rem .95rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 7, 12, .72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  border-radius: 11px;
  background: var(--grad);
  box-shadow: 0 4px 18px rgba(139, 92, 246, .45);
}
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: .94rem; transition: color .15s; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  color: #fff !important;
  background: var(--grad);
  padding: .5rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(139, 92, 246, .4);
}
.nav-cta:hover { filter: brightness(1.1); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 5rem;
  padding: 3rem 0 2.4rem;
  background: rgba(255, 255, 255, .015);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand p { color: var(--muted); font-size: .93rem; max-width: 320px; }
.footer-col h4 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--faint);
  margin: 0 0 .8rem;
}
.footer-col a { display: block; color: var(--muted); font-size: .93rem; margin-bottom: .5rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: .85rem;
}
.footer-bottom p { margin: 0; }

/* ---------- hero ---------- */

.hero { padding: 4.6rem 0 1rem; text-align: center; position: relative; overflow: hidden; } /* v19: clip aurora orbs (see .tool-hero) */
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); font-weight: 850; margin-bottom: 1rem; }
.hero-sub { max-width: 620px; margin: 0 auto 1.8rem; color: var(--muted); font-size: 1.12rem; }
.hero-sub strong { color: var(--text); }

.hero-canvas-wrap {
  max-width: 760px;
  margin: 0 auto 1.8rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  box-shadow: var(--shadow);
}
#heroWave { display: block; width: 100%; height: 132px; }

.search-wrap { max-width: 520px; margin: 0 auto 1.5rem; position: relative; }
.search-wrap::before {
  content: "\1F50D";
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: .55;
  pointer-events: none;
}
#toolSearch {
  width: 100%;
  padding: .95rem 1.2rem .95rem 3rem;
  font-size: 1.02rem;
  font-family: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  outline: none;
  backdrop-filter: blur(8px);
  transition: box-shadow .18s, border-color .18s;
}
#toolSearch:focus { border-color: var(--violet); box-shadow: var(--glow); }
#toolSearch::placeholder { color: var(--faint); }
#toolSearch::-webkit-search-cancel-button { filter: invert(.7); }

.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2.6rem; }
.badge {
  font-size: .8rem;
  font-weight: 700;
  padding: .38rem .9rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--muted);
  backdrop-filter: blur(6px);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
  padding: 1.4rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-num {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.02em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--faint); font-size: .85rem; margin-top: .15rem; }

/* ---------- section heads ---------- */

.section-head { margin: 3rem 0 1.2rem; }
.section-head h2 { margin-bottom: .3rem; }
.section-head p { color: var(--muted); margin: 0; font-size: .96rem; }
.cat-section { margin: 0 0 2.2rem; }

/* ---------- tool cards ---------- */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.25rem 1.2rem 1.15rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
  overflow: hidden;
}
.tool-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.tool-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow); background: var(--glass2); }
.tool-card:hover::after { opacity: 1; }
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.tool-card-icon {
  width: 46px; height: 46px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.45rem;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.tile-effects { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.tile-editing { background: linear-gradient(135deg, #22d3ee, #0e7490); }
.tile-analysis { background: linear-gradient(135deg, #f472b6, #be185d); }
.tile-guides { background: linear-gradient(135deg, #f59e0b, #b45309); }
.card-arrow {
  color: var(--faint);
  font-size: 1.15rem;
  transform: translateX(-4px);
  opacity: 0;
  transition: all .18s ease;
}
.tool-card:hover .card-arrow { transform: translateX(0); opacity: 1; color: var(--cyan); }
.tool-card-title { font-weight: 750; font-size: 1.04rem; letter-spacing: -.01em; }
.tool-card-tagline { color: var(--muted); font-size: .88rem; line-height: 1.55; }

/* ---------- content sections ---------- */

.content-section { margin: 3.2rem auto; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.feature {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem;
  backdrop-filter: blur(10px);
  transition: transform .18s, border-color .18s;
}
.feature:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.feature h3 { margin: 0 0 .45rem; font-size: 1.04rem; }
.feature p { margin: 0; color: var(--muted); font-size: .93rem; }
.feature-ico {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  border-radius: 12px;
  background: var(--grad);
  margin-bottom: .8rem;
  box-shadow: 0 4px 14px rgba(139, 92, 246, .35);
}

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps-3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.steps li {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.25rem 3.6rem;
  backdrop-filter: blur(10px);
}
.steps li strong { display: block; font-size: 1.02rem; margin-bottom: .25rem; }
.steps li span { color: var(--muted); font-size: .93rem; }
.step-num {
  position: absolute;
  left: 1.1rem; top: 1.15rem;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  box-shadow: 0 4px 14px rgba(139, 92, 246, .4);
}
ol.steps { list-style: decimal; padding-left: 1.4rem; }
ol.steps li strong { display: inline; }
ol.steps li { padding: 1.1rem 1.2rem; }
/* numbered-badge variant: hide native markers, badges carry the numbers */
ol.steps-3 { list-style: none; padding-left: 0; }
ol.steps-3 li { padding: 1.25rem 1.3rem 1.25rem 3.6rem; }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: .7rem; }
.faq-item {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: border-color .15s;
}
.faq-item[open] { border-color: rgba(139, 92, 246, .4); }
.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 650;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(135deg); }
.faq-body { padding: 0 1.2rem 1.15rem; color: var(--muted); }
.faq-body p { margin: 0 0 .7rem; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body code {
  background: rgba(34, 211, 238, .12);
  padding: .1rem .45rem;
  border-radius: 6px;
  font-size: .88em;
  color: #a5f3fc;
}

/* ---------- tool hero ---------- */

.tool-hero {
  padding: 3.4rem 0 2.4rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden; /* v19: clip the decorative aurora orbs — their float animation otherwise expands document scrollWidth on narrow screens */
}
.tool-hero-icon {
  width: 76px; height: 76px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
  border-radius: 22px;
  background: var(--grad);
  box-shadow: 0 10px 32px rgba(139, 92, 246, .45);
  margin-bottom: 1rem;
}
.tool-hero h1 { font-size: clamp(2rem, 4.5vw, 2.7rem); }
.tool-hero .tagline { color: var(--muted); font-size: 1.08rem; max-width: 640px; margin: 0 auto; }

/* ---------- tool workspace ---------- */

.tool-workspace { padding: 2.2rem 22px 1rem; max-width: 1120px; margin: 0 auto; }

.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(10px);
  padding: 2.8rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}
.dropzone:hover { border-color: var(--violet); box-shadow: var(--glow); }
.dropzone.dragover {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, .06);
  transform: scale(1.008);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .4), 0 8px 32px rgba(34, 211, 238, .2);
}
.dropzone:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.dropzone-icon {
  width: 60px; height: 60px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  border-radius: 18px;
  background: var(--grad);
  margin-bottom: .8rem;
  box-shadow: 0 6px 20px rgba(139, 92, 246, .4);
}
.dropzone-title { font-size: 1.18rem; font-weight: 750; margin-bottom: .15rem; letter-spacing: -.01em; }
.dropzone-sub { color: var(--faint); font-size: .9rem; margin-bottom: .8rem; }
.dropzone-hint { color: var(--faint); font-size: .85rem; margin: 1rem 0 0; }

.error-box {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: rgba(251, 113, 133, .08);
  border: 1px solid rgba(251, 113, 133, .45);
  color: #fecdd3;
  font-size: .95rem;
  backdrop-filter: blur(8px);
}
.notice {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: rgba(52, 211, 153, .07);
  border: 1px solid rgba(52, 211, 153, .4);
  color: #a7f3d0;
  font-size: .95rem;
  backdrop-filter: blur(8px);
}

.player-block { margin-top: 1.6rem; }
.player-block h3, .result-block h3 { margin: 0 0 .6rem; }
.player-block audio, .result-block audio { width: 100%; max-width: 640px; border-radius: 10px; }

.bpm-block { text-align: center; margin: 2.2rem 0 1rem; }
.bpm-number {
  font-size: 4.6rem;
  font-weight: 850;
  letter-spacing: -.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.05;
  text-shadow: 0 0 60px rgba(139, 92, 246, .25);
}
.bpm-label { color: var(--muted); margin: 0; }
.bpm-conf { color: var(--faint); font-size: .9rem; margin: .4rem 0 0; }
.bpm-key { margin-top: 1.6rem; }

/* Stem splitter rows (custom tool UI in tools.js). */
.stem-row { display: flex; align-items: center; gap: .6rem; margin: .55rem 0; flex-wrap: wrap; }
.stem-name { min-width: 4.5rem; font-weight: 700; }

.visual-block { margin-top: 1.6rem; }
.visual-block canvas {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #04050a;
  display: block;
  box-shadow: var(--shadow);
}

/* ---------- controls ---------- */

.controls { margin-top: 1.8rem; display: grid; gap: 1rem; }
.control-group {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  backdrop-filter: blur(10px);
}
.control-group > h3 { margin: 0 0 1rem; font-size: 1rem; }
.slider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem 1.3rem; }
.slider label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .4rem;
}
.slider label output { color: var(--text); font-weight: 750; font-variant-numeric: tabular-nums; }

input[type="range"] {
  width: 100%;
  accent-color: var(--violet);
  height: 26px;
  cursor: pointer;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #8b5cf6, #22d3ee);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 19px; height: 19px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #8b5cf6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .55), 0 0 12px rgba(139, 92, 246, .5);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #8b5cf6, #22d3ee);
}
input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #8b5cf6;
}

.toggle-row, .select-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
  margin-bottom: .7rem;
}
.toggle-row:last-child, .select-row:last-child { margin-bottom: 0; }
.toggle-row label, .select-row label { font-size: .92rem; color: var(--muted); }

select, input[type="number"], input[type="text"] {
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: .55rem .75rem;
  font-size: .95rem;
  font-family: inherit;
}
select:focus, input:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px rgba(139, 92, 246, .2); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--violet); cursor: pointer; }

.preset-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.preset-chip {
  font-size: .85rem;
  font-weight: 650;
  padding: .45rem .95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.preset-chip:hover { border-color: var(--violet); color: var(--text); transform: translateY(-1px); }
.preset-chip.active {
  background: rgba(139, 92, 246, .18);
  border-color: var(--violet);
  color: #e6dcff;
  box-shadow: 0 0 14px rgba(139, 92, 246, .3);
}

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: -.005em;
  padding: .78rem 1.6rem;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease, background .14s ease;
  color: var(--text);
  overflow: hidden;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn.primary {
  background: linear-gradient(135deg, #8b5cf6, #6366f1 55%, #22d3ee 130%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(139, 92, 246, .42);
}
.btn.primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .5s ease;
}
.btn.primary:hover { box-shadow: 0 10px 32px rgba(139, 92, 246, .55); filter: brightness(1.06); }
.btn.primary:hover::before { transform: translateX(120%); }

.btn.ghost {
  background: var(--glass);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn.ghost:hover { border-color: var(--violet); background: rgba(139, 92, 246, .1); box-shadow: var(--glow); }

.btn-lg { font-size: 1.08rem; padding: 1rem 2.2rem; border-radius: 16px; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; margin-top: 1.6rem; }
.fmt-label {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  color: var(--muted);
  margin-left: auto;
  max-width: 100%;
  min-width: 0; /* v19: let the row shrink on narrow screens instead of pushing the select past the viewport */
}
.fmt-label select { max-width: 100%; min-width: 0; }

/* ---------- progress ---------- */

.progress-wrap { margin-top: 1.6rem; }
.progress {
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, #8b5cf6, #22d3ee);
  box-shadow: 0 0 12px rgba(139, 92, 246, .6);
  transition: width .2s ease;
}
.progress-bar.indeterminate { width: 35%; animation: slide 1.1s ease-in-out infinite alternate; }
@keyframes slide { from { margin-left: -35%; } to { margin-left: 100%; } }
.progress-text { color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }

/* ---------- result ---------- */

.result-block {
  margin-top: 1.8rem;
  padding: 1.5rem;
  background: var(--glass);
  border: 1px solid rgba(52, 211, 153, .3);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 32px rgba(52, 211, 153, .08);
}
.result-meta { color: var(--muted); font-size: .9rem; margin: .8rem 0 0; }

/* ---------- preset / misc ---------- */

.crumb { color: var(--faint); font-size: .9rem; margin-bottom: .4rem; }
.cta-row { margin: 1.8rem 0 2.2rem; }
.preset-page .lede { margin-bottom: 1.2rem; }

.contact-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  text-align: center;
  margin: 1.6rem 0;
  backdrop-filter: blur(10px);
}
.contact-card p { margin-bottom: .8rem; }
.contact-card p:last-child { margin-bottom: 0; }

.big-404 {
  font-size: 6rem;
  font-weight: 850;
  letter-spacing: -.04em;
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: .6rem;
  filter: drop-shadow(0 0 30px rgba(139, 92, 246, .3));
}

/* ---------- tool-specific controls (markup lives in tools.js) ---------- */

.ctl-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: .95rem;
}
.ctl-row:last-child { margin-bottom: 0; }
.ctl-hint {
  color: var(--faint);
  font-size: .86rem;
  margin: .3rem 0 0;
  flex-basis: 100%;
  line-height: 1.55;
}

.btn-secondary {
  font-family: inherit;
  font-size: .88rem;
  font-weight: 650;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
  transition: all .15s ease;
}
.btn-secondary:hover {
  border-color: var(--violet);
  background: rgba(139, 92, 246, .12);
  transform: translateY(-1px);
  box-shadow: var(--glow);
}
.btn-secondary.active {
  background: rgba(139, 92, 246, .2);
  border-color: var(--violet);
  color: #e9e2ff;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .92rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

/* reverb room preset grid */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: .6rem;
  width: 100%;
}
.btn-room {
  font-family: inherit;
  font-size: .86rem;
  font-weight: 650;
  padding: .6rem .5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
  text-align: center;
}
.btn-room:hover { border-color: var(--violet); color: var(--text); transform: translateY(-1px); }
.btn-room.active {
  background: rgba(139, 92, 246, .18);
  border-color: var(--violet);
  color: #e9e2ff;
  box-shadow: 0 0 14px rgba(139, 92, 246, .3);
}

/* equalizer: graphic-EQ vertical faders */
.eq-bands {
  display: flex;
  gap: .4rem;
  justify-content: space-between;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1rem 1.1rem;
  margin-bottom: 1.1rem;
  overflow-x: auto;
  backdrop-filter: blur(10px);
}
.eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  flex: 1 1 0;
  min-width: 54px;
}
.eq-band output {
  font-size: .8rem;
  font-weight: 750;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  order: -1;
}
.eq-freq { font-size: .74rem; color: var(--faint); font-weight: 600; white-space: nowrap; }
.eq-band input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: ns-resize;
  width: 26px;
  height: 140px;
  padding: 0;
}
.eq-band input[type="range"]::-webkit-slider-runnable-track {
  width: 6px;
  height: 140px;
  border-radius: 3px;
  background: linear-gradient(0deg, #8b5cf6, #22d3ee);
}
.eq-band input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-left: -6px;
  margin-top: 0;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #8b5cf6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .55), 0 0 12px rgba(139, 92, 246, .55);
}
.eq-band input[type="range"]::-moz-range-track {
  width: 6px;
  height: 140px;
  border-radius: 3px;
  background: linear-gradient(0deg, #8b5cf6, #22d3ee);
}
.eq-band input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #8b5cf6;
}

/* trimmer time inputs */
.trimmer-times { margin-top: .9rem; }
.trimmer-times label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  color: var(--muted);
}
.trimmer-times input[type="text"] { width: 110px; font-variant-numeric: tabular-nums; }

/* ---------- new UI: theme toggle, toast, back-to-top, favorites, share ---------- */

.theme-toggle {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, border-color .15s;
  backdrop-filter: blur(8px);
}
.theme-toggle:hover { transform: scale(1.08); border-color: var(--violet); }

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 80px);
  background: rgba(20, 24, 38, .92);
  color: #fff;
  border: 1px solid var(--border-strong);
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  pointer-events: none;
  max-width: 90vw;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--glass2);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 150;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s, transform .2s, border-color .15s;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover { border-color: var(--violet); }

.fav-star {
  background: none;
  border: none;
  padding: .2rem;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--faint);
  cursor: pointer;
  transition: transform .15s, color .15s;
}
.fav-star:hover { transform: scale(1.25); color: #fbbf24; }
.fav-star.active { color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, .5); }

.filter-chips {
  display: flex;
  gap: .6rem;
  margin: 2.2rem 0 1.6rem;
  flex-wrap: wrap;
}
.fchip {
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  padding: .55rem 1.25rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
  backdrop-filter: blur(8px);
}
.fchip:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.fchip.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, .4);
}

.recent-section { margin-bottom: 2.4rem; }

.crumb-nav {
  padding-top: 1.4rem;
  font-size: .88rem;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.crumb-nav a { color: var(--muted); }
.crumb-nav a:hover { color: var(--text); }
.crumb-sep { opacity: .5; }
.crumb-current { color: var(--text); font-weight: 600; }

.hero-actions { margin-top: 1.2rem; display: flex; gap: .8rem; justify-content: center; }
.share-btn {
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  padding: .55rem 1.2rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
  transition: all .15s ease;
  backdrop-filter: blur(8px);
}
.share-btn:hover { border-color: var(--cyan); box-shadow: 0 0 16px rgba(34, 211, 238, .3); transform: translateY(-1px); }

/* ---------- light theme ---------- */

html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

html[data-theme="light"] {
  --bg: #eef1f8;
  --glass: rgba(255, 255, 255, .68);
  --glass2: rgba(255, 255, 255, .88);
  --border: rgba(20, 28, 55, .1);
  --border-strong: rgba(20, 28, 55, .2);
  --text: #151a2b;
  --muted: #4d5872;
  --faint: #5d6579; /* v18: darkened from #8b94ab — >=4.5:1 vs light --bg */
  --shadow: 0 18px 44px rgba(35, 50, 110, .12);
  --glow: 0 0 0 1px rgba(139, 92, 246, .3), 0 8px 28px rgba(139, 92, 246, .22);
  --grad-text: linear-gradient(92deg, #7c3aed, #0e7490); /* v18: darker stops — >=4.5:1 on light bg */
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(640px 420px at 12% -6%, rgba(139, 92, 246, .16), transparent 65%),
    radial-gradient(720px 460px at 88% 4%, rgba(34, 211, 238, .14), transparent 65%),
    radial-gradient(560px 520px at 50% 110%, rgba(244, 114, 182, .08), transparent 60%),
    #eef1f8;
}
html[data-theme="light"] body::after {
  background-image: radial-gradient(rgba(20, 28, 55, .07) 1px, transparent 1px);
}
html[data-theme="light"] .site-header { background: rgba(238, 241, 248, .78); }
html[data-theme="light"] .eyebrow { color: #5b21b6; background: rgba(139, 92, 246, .1); }
html[data-theme="light"] .tool-card:hover { background: #fff; }
html[data-theme="light"] .visual-block canvas { background: #0a0c14; }
html[data-theme="light"] .toast { background: rgba(21, 26, 43, .94); }
html[data-theme="light"] .back-top { background: rgba(255, 255, 255, .9); }
html[data-theme="light"] .faq-item summary::after,
html[data-theme="light"] .step-num,
html[data-theme="light"] .feature-ico,
html[data-theme="light"] .brand-mark,
html[data-theme="light"] .tool-hero-icon,
html[data-theme="light"] .dropzone-icon { box-shadow: 0 4px 14px rgba(139, 92, 246, .28); }

/* ---------- ULTRA-MODERN pack: crystal icons, orbs, marquee, reveal, counters ---------- */

* { -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

#tools, .cat-section, .recent-section { scroll-margin-top: 84px; }

/* crystal-gem icon tiles: per-tool hue via --h */
.tool-card-icon {
  background:
    radial-gradient(62% 46% at 30% 16%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 70%),
    linear-gradient(135deg, hsl(var(--h, 265), 88%, 64%), hsl(calc(var(--h, 265) + 42), 88%, 52%));
  box-shadow:
    0 10px 24px -8px hsl(var(--h, 265), 88%, 60%),
    inset 0 1px 1px rgba(255, 255, 255, .55),
    inset 0 -4px 8px rgba(0, 0, 0, .22);
  border: 1px solid rgba(255, 255, 255, .35);
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.tool-card:hover .tool-card-icon { transform: scale(1.14) rotate(-6deg); }
.tile-effects, .tile-editing, .tile-analysis { /* hue now comes from --h; keep classes harmless */ }

/* floating aurora orbs */
.hero, .tool-hero { position: relative; overflow: clip; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 14s ease-in-out infinite alternate;
}
.orb-a { width: 340px; height: 340px; left: -90px; top: -70px; background: radial-gradient(circle, #8b5cf6, transparent 70%); }
.orb-b { width: 300px; height: 300px; right: -70px; top: 10px; background: radial-gradient(circle, #22d3ee, transparent 70%); animation-delay: -6s; }
.orb-c { width: 220px; height: 220px; left: 38%; bottom: -110px; background: radial-gradient(circle, #f472b6, transparent 70%); animation-delay: -3s; opacity: .35; }
.hero > .wrap, .tool-hero > .wrap { position: relative; z-index: 1; }
@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(46px, 30px) scale(1.12); }
}

/* hero entrance */
@keyframes rise { from { opacity: 0; translate: 0 26px; } }
.hero .eyebrow { animation: rise .6s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero h1 { animation: rise .6s .08s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero .hero-sub { animation: rise .6s .16s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero .hero-canvas-wrap { animation: rise .6s .24s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero .search-wrap { animation: rise .6s .32s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero .hero-badges { animation: rise .6s .4s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero .stats-row { animation: rise .6s .48s cubic-bezier(.2, .7, .2, 1) backwards; }

/* animated gradient headline */
.hero h1 .grad {
  background: linear-gradient(92deg, #a78bfa, #22d3ee, #f472b6, #a78bfa);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 9s linear infinite;
}
@keyframes gradShift { to { background-position: 300% 0; } }

/* marquee ticker */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  background: rgba(255, 255, 255, .015);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq-item {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  padding: .85rem 1.4rem .85rem 0;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.mq-item i { font-style: normal; color: var(--violet); font-size: .7rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* scroll reveal */
.reveal {
  opacity: 0;
  translate: 0 28px;
  transition: opacity .65s ease var(--d, 0s), translate .65s cubic-bezier(.2, .7, .2, 1) var(--d, 0s);
  will-change: opacity, translate;
}
.reveal.in { opacity: 1; translate: 0 0; }
.tools-grid .tool-card:nth-child(1) { --d: .02s; }
.tools-grid .tool-card:nth-child(2) { --d: .06s; }
.tools-grid .tool-card:nth-child(3) { --d: .1s; }
.tools-grid .tool-card:nth-child(4) { --d: .14s; }
.tools-grid .tool-card:nth-child(5) { --d: .18s; }
.tools-grid .tool-card:nth-child(6) { --d: .22s; }
.tools-grid .tool-card:nth-child(7) { --d: .26s; }
.tools-grid .tool-card:nth-child(8) { --d: .3s; }
.tools-grid .tool-card:nth-child(n+9) { --d: .34s; }
.feature-grid .feature:nth-child(1) { --d: .05s; }
.feature-grid .feature:nth-child(2) { --d: .12s; }
.feature-grid .feature:nth-child(3) { --d: .19s; }
.steps-3 li:nth-child(1) { --d: .05s; }
.steps-3 li:nth-child(2) { --d: .14s; }
.steps-3 li:nth-child(3) { --d: .23s; }

/* bigger, friendlier touch targets */
.theme-toggle { width: 44px; height: 44px; }
.fchip { min-height: 44px; }
.fav-star { min-width: 44px; min-height: 44px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { padding: 3.2rem 0 .5rem; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}

@media (max-width: 600px) {
  h1 { font-size: 1.75rem; }
  .site-nav { gap: 1rem; }
  .site-nav a { font-size: .88rem; }
  .site-nav .nav-cta { padding: .45rem .9rem; }
  .brand { font-size: 1.1rem; }
  .brand-mark { width: 32px; height: 32px; font-size: 1.1rem; }
  .tools-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .tool-card { padding: 1rem .9rem; border-radius: 15px; }
  .tool-card-icon { width: 40px; height: 40px; font-size: 1.25rem; border-radius: 12px; }
  .tool-card-title { font-size: .92rem; }
  .tool-card-tagline { font-size: .78rem; }
  .card-arrow { display: none; }
  .btn-row .btn { flex: 1 1 auto; }
  .fmt-label { margin-left: 0; width: 100%; justify-content: space-between; }
  .slider-grid { grid-template-columns: 1fr 1fr; }
  .bpm-number { font-size: 3.4rem; }
  .big-404 { font-size: 4.2rem; }
  .dropzone { padding: 2.1rem 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  #heroWave { height: 104px; }
  .steps li { padding-left: 3.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: 0 0; }
  .marquee-track { animation: none; }
  .orb { display: none; }
}

/* ultra-responsive: small phones + landscape */
@media (max-width: 600px) {
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: none; margin: 1.6rem -22px 1.2rem; padding-left: 22px; padding-right: 22px; }
  .filter-chips::-webkit-scrollbar { display: none; }
  .fchip { flex: none; }
  .marquee-track { animation-duration: 20s; }
  .mq-item { font-size: .72rem; letter-spacing: .14em; }
  .orb-a { width: 220px; height: 220px; }
  .orb-b { width: 200px; height: 200px; }
  .stats-row { gap: .8rem; }
  .stat-num { font-size: 1.45rem; }
  .hero-actions { flex-wrap: wrap; }
  .site-nav { gap: .7rem; }
  .site-nav a:not(.nav-cta) { display: none; }
  .brand { font-size: 1.05rem; }
  .site-nav .nav-cta { padding: .5rem 1rem; font-size: .85rem; white-space: nowrap; }
}

@media (max-width: 380px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tool-card { flex-direction: row; align-items: center; gap: .9rem; padding: .85rem 1rem; }
  .tool-card-top { flex: none; }
  .tool-card-title { flex: 1; }
  .tool-card > span:last-child { display: none; }
  .hero h1 { font-size: 2rem; }
}

@media (min-width: 601px) and (max-width: 900px) and (orientation: landscape) {
  .hero { padding: 2.2rem 0 .5rem; }
  .hero h1 { font-size: 2.4rem; }
}

/* v8 fix: honor the `hidden` attribute everywhere. Class rules like .btn
   (display: inline-flex) otherwise outrank the UA stylesheet's [hidden]
   rule, so buttons hidden via .hidden = true (e.g. stem-splitter's
   hideStandardActions, bpm/joiner/visual kinds) stayed visible. */
[hidden] { display: none !important; }

/* ---------- v10: vocal group (karaoke LRC panel + enhancer compare) ---------- */
.k-lrc textarea {
  width: 100%; min-height: 5.5rem; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85rem; line-height: 1.6; padding: .6rem .75rem;
  border-radius: .6rem; border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .04); color: var(--text);
}
.k-lrc-btns, .ve-btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.k-lrc-lines {
  flex-basis: 100%; max-height: 12rem; overflow-y: auto;
  padding: .5rem .75rem; border-radius: .6rem;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .03);
}
.k-lrc-line { padding: .3rem .4rem; border-radius: .4rem; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.k-lrc-line.active { color: #fff; background: rgba(139, 92, 246, .22); font-weight: 650; }

/* ---------- v10: video group (videomaker) ---------- */
.vm-canvas{width:100%;max-width:660px;height:auto;border-radius:12px;background:#0b1020;display:block}
.vm-text{width:100%;max-width:420px;padding:8px 10px;border-radius:8px;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.05);color:inherit}
.vm-filename{opacity:.75;font-size:.9em;margin-left:8px}
.vm-fileline{display:flex;align-items:center;flex-wrap:wrap;gap:4px}
.vm-opt{opacity:.6;font-weight:normal}
.vm-meta{opacity:.75;font-size:.9em}
.vm-resultline{display:flex;align-items:center;gap:12px;margin-top:10px;flex-wrap:wrap}
.vm-stage{margin-top:12px}
.vm-note{background:rgba(34,211,238,.08);border:1px solid rgba(34,211,238,.25);border-radius:10px;padding:10px 12px;font-size:.92em;margin-bottom:12px}

/* ---------- v10: quality checker report ---------- */
.qc-report{margin-top:1rem;padding:1rem;border:1px solid var(--border,#2a3441);border-radius:12px;background:var(--card,rgba(255,255,255,.03))}
.qc-badge{display:inline-block;font-weight:700;padding:.35rem .9rem;border-radius:999px;margin-bottom:.75rem}
.qc-badge.ok{background:rgba(46,204,113,.15);color:#2ecc71;border:1px solid #2ecc71}
.qc-badge.warn{background:rgba(241,196,15,.15);color:#f1c40f;border:1px solid #f1c40f}
.qc-row{display:flex;justify-content:space-between;gap:1rem;padding:.3rem 0;border-bottom:1px dashed var(--border,#2a3441)}
.qc-label{opacity:.75}.qc-value{font-variant-numeric:tabular-nums;font-weight:600}
.qc-reasons{margin:.75rem 0 0 1.1rem;font-size:.92rem;line-height:1.5}

/* ---- long-task progress modal (v14; voice changer renders) ---- */
.task-modal-overlay{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;background:rgba(4,6,14,.72);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);animation:tmFade .18s ease-out}
.task-modal-overlay.task-modal-hidden{visibility:hidden}
.task-modal-card{width:min(420px,calc(100vw - 48px));background:linear-gradient(160deg,rgba(28,22,54,.97),rgba(10,12,26,.97));border:1px solid rgba(139,92,246,.35);border-radius:18px;padding:28px 26px 24px;text-align:center;box-shadow:0 24px 80px rgba(0,0,0,.55),0 0 44px rgba(139,92,246,.12)}
.task-modal-spin{width:44px;height:44px;margin:0 auto 14px;border-radius:50%;border:3px solid rgba(139,92,246,.25);border-top-color:#a78bfa;animation:tmSpin .8s linear infinite}
.task-modal-title{margin:0 0 4px;font-size:1.15rem}
.task-modal-file{margin:0 0 16px;font-size:.85rem;opacity:.65;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.task-modal-bar{height:10px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden;margin-bottom:10px}
.task-modal-fill{height:100%;width:0%;border-radius:999px;background:linear-gradient(90deg,#8b5cf6,#22d3ee);transition:width .15s ease-out}
.task-modal-stage{margin:0 0 18px;font-size:.9rem;opacity:.85;min-height:1.4em}
.task-modal-cancel{min-width:120px}
@keyframes tmSpin{to{transform:rotate(360deg)}}
@keyframes tmFade{from{opacity:0}}

/* ---------- v16: text to speech ---------- */
.tts-textarea{width:100%;min-height:9rem;resize:vertical;font-family:inherit;font-size:1rem;line-height:1.6;padding:.8rem .9rem;border-radius:.7rem;border:1px solid var(--border-strong);background:rgba(255,255,255,.04);color:var(--text)}
.tts-textarea:focus{outline:none;border-color:var(--violet);box-shadow:var(--glow)}
.tts-input{flex:1;min-width:0;padding:.6rem .75rem;border-radius:.6rem;border:1px solid var(--border-strong);background:rgba(255,255,255,.04);color:var(--text);font-size:.95rem}
.tts-input:focus{outline:none;border-color:var(--violet)}
select.tts-input option{color:#0b1020}
select.tts-input{width:100%;max-width:100%} /* standalone selects (voice pickers) must not size to long option text */
.tts-keyrow{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.tts-keyrow .tts-input{flex:1;min-width:200px}
#tts-count.tts-warn{color:#f1c40f;font-weight:700}
#tts-count.tts-over{color:#ff6b6b;font-weight:700}
.tab-sub{display:block;font-size:.72rem;opacity:.85;font-weight:400} /* v18: was .65 — unreadable on active pills in light mode */
#tts-tabs .btn-secondary{line-height:1.25}

/* ---------- v19: NEW badges + TTS download bar ---------- */
.badge-new{
  display:inline-block;font-size:.62rem;font-weight:800;letter-spacing:.06em;line-height:1;
  padding:.3em .6em;border-radius:999px;white-space:nowrap;vertical-align:.14em;
  background:linear-gradient(135deg,#7c3aed,#6d28d9);color:#fff;
  box-shadow:0 2px 10px rgba(124,58,237,.45);
}
.tts-dlbar{display:flex;flex-wrap:wrap;align-items:center;gap:.7rem .9rem;margin:1.1rem 0 .5rem}
.tts-dlbar-label{font-size:.85rem;font-weight:600;color:var(--muted)}
.tts-seg{display:inline-flex;flex-wrap:wrap;gap:.45rem}
.tts-seg .btn-secondary{padding:.5rem .95rem;font-size:.8rem}
.tts-seg .btn-secondary .badge-new{font-size:.56rem}
.tts-dl-btn{max-width:100%}
@keyframes dlPulse{
  0%,100%{box-shadow:0 0 0 0 rgba(139,92,246,0)}
  50%{box-shadow:0 0 0 12px rgba(139,92,246,.32)}
}
.dl-attention{animation:dlPulse 1.1s ease-in-out 3}
@media (max-width:520px){
  .tts-dlbar .tts-dl-btn{width:100%;text-align:center}
}

/* ---------- v18: cookie consent banner ---------- */
.cookie-banner{
  position:fixed;bottom:0;left:0;right:0;z-index:150;
  box-sizing:border-box;max-width:100%;width:100%;
  display:flex;align-items:center;justify-content:center;gap:1rem;flex-wrap:wrap;
  padding:.9rem 1.1rem;
  background:rgba(10,13,24,.96);
  border-top:1px solid var(--border-strong);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  box-shadow:0 -12px 40px rgba(0,0,0,.45);
  font-size:.92rem;color:var(--muted);
}
.cookie-banner p{margin:0;max-width:640px}
.cookie-banner .cb-actions{display:flex;gap:.6rem;flex-shrink:0}
.cookie-banner .btn{padding:.45rem 1.15rem;font-size:.9rem}
html[data-theme="light"] .cookie-banner{background:rgba(238,241,248,.96)}

/* ---------- v18: audio recorder ---------- */
.rc-timer{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:2.2rem;font-weight:700;letter-spacing:.08em;color:var(--text)}
.rc-timer.rc-live{color:#ff6b6b}
.rc-meter{display:block;width:100%;height:14px;border-radius:7px;background:rgba(255,255,255,.08);overflow:hidden}
.rc-meter > i{display:block;height:100%;width:0;border-radius:7px;background:linear-gradient(90deg,#22d3ee,#34d399)}

/* ---------- v18: theme contrast fixes (user-reported invisible text) ---------- */
/* Placeholders must be explicit: UA defaults wash out in light mode. */
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }

/* The progress modal card is always dark — pin light text in BOTH themes. */
.task-modal-card { color: #eef2fa; }
.task-modal-card .btn-secondary {
  color: #eef2fa;
  border-color: rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .06);
}
.task-modal-card .btn-secondary:hover {
  color: #fff;
  border-color: var(--violet);
  background: rgba(139, 92, 246, .22);
}

html[data-theme="light"] .error-box {
  color: #be123c;
  background: rgba(251, 113, 133, .13);
}
html[data-theme="light"] .notice {
  color: #036b47; /* v18: was #047857 at 4.46:1 — needs >=4.5 */
  background: rgba(52, 211, 153, .14);
}
/* Active pills/chips sit on a pale violet wash in light mode — pale lavender
 * text (#e9e2ff/#e6dcff) is unreadable there; use deep violet instead. */
html[data-theme="light"] .btn-secondary.active { color: #4c1d95; }
html[data-theme="light"] .btn-room.active { color: #4c1d95; }
html[data-theme="light"] .preset-chip.active { color: #4c1d95; }
html[data-theme="light"] .faq-body code { color: #0e7490; }

/* Links: --cyan (#22d3ee) is unreadable on light backgrounds — darken in light mode. */
html[data-theme="light"] a { color: #0e7490; }
html[data-theme="light"] .site-nav a { color: var(--muted); }
html[data-theme="light"] .site-nav a:hover { color: var(--text); }
html[data-theme="light"] .crumb-nav a { color: var(--muted); }
html[data-theme="light"] .crumb-nav a:hover { color: var(--text); }
html[data-theme="light"] .tool-card:hover .card-arrow { color: #0e7490; }
/* Animated hero headline gradient: darker stops in light mode (its own
 * hardcoded gradient, not var(--grad-text)). */
html[data-theme="light"] .hero h1 .grad {
  /* NOTE: use background-image, NOT the background shorthand — the shorthand
   * resets background-clip to border-box, which kills the text-clip and renders
   * a solid gradient block (the "invisible hero word" bug). */
  background-image: linear-gradient(92deg, #7c3aed, #0e7490, #be185d, #7c3aed);
}
