@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('vendor/fonts/inter-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('vendor/fonts/inter-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('vendor/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('vendor/fonts/jetbrains-mono-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Design tokens (light is the default) ---------- */
:root {
  --bg: #f6f7fb; --bg2: #ffffff; --card: rgba(255,255,255,0.82); --card-solid: #ffffff; --card-border: rgba(16,24,40,0.07); --card-hover: #ffffff;
  --text: #0f172a; --muted: #475569; --muted2: #8b94a7; --line: rgba(16,24,40,0.08);
  --accent: #7c5cff; --accent2: #19c6e6; --accent3: #f472b6; --ok: #16a34a; --warn: #d97706; --err: #dc2626;
  --grad: linear-gradient(135deg, #7c5cff 0%, #19c6e6 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,92,255,0.12), rgba(25,198,230,0.12));
  --shadow: 0 18px 50px -24px rgba(16,24,40,0.28), 0 1px 2px rgba(16,24,40,0.04);
  --shadow-sm: 0 6px 18px -10px rgba(16,24,40,0.25);
  --glow: 0 12px 32px -12px rgba(124,92,255,0.55);
  --radius: 22px; --radius-s: 14px;
  --wave-orig: rgba(100,116,139,0.38); --wave-enh-a: #7c5cff; --wave-enh-b: #19c6e6; --wave-bg: rgba(16,24,40,0.045);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --tile: rgba(124,92,255,0.05);
}
:root[data-theme="dark"] {
  --bg: #07080c; --bg2: #0e1017; --card: rgba(255,255,255,0.045); --card-solid: #12141c; --card-border: rgba(255,255,255,0.08); --card-hover: rgba(255,255,255,0.07);
  --text: #eef0f6; --muted: #a3abbd; --muted2: #6b7386; --line: rgba(255,255,255,0.08);
  --ok: #34d399; --warn: #fbbf24; --err: #f87171;
  --grad-soft: linear-gradient(135deg, rgba(124,92,255,0.25), rgba(25,198,230,0.25));
  --shadow: 0 20px 60px -20px rgba(0,0,0,0.6); --shadow-sm: 0 6px 18px -10px rgba(0,0,0,0.6);
  --wave-orig: rgba(154,163,181,0.42); --wave-enh-a: #a78bfa; --wave-enh-b: #22d3ee; --wave-bg: rgba(0,0,0,0.3);
  --tile: rgba(255,255,255,0.05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
.mono { font-family: var(--mono); font-size: 0.85em; font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { margin: 0 0 8px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.28; animation: float 26s ease-in-out infinite alternate; will-change: transform; }
.b1 { width: 560px; height: 560px; left: -160px; top: -120px; background: #a78bfa; }
.b2 { width: 520px; height: 520px; right: -180px; top: 22vh; background: #67e8f9; animation-delay: -9s; }
.b3 { width: 420px; height: 420px; left: 38vw; top: 85vh; background: #f9a8d4; animation-delay: -17s; opacity: 0.18; }
:root[data-theme="dark"] .blob { opacity: 0.3; } :root[data-theme="dark"] .b1 { background: #7c5cff; } :root[data-theme="dark"] .b2 { background: #19c6e6; } :root[data-theme="dark"] .b3 { background: #f472b6; opacity: 0.18; }
.grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 20%, transparent 70%); opacity: 0.5; }
@keyframes float { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(60px, -40px, 0) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } .reveal { transition: none !important; opacity: 1 !important; transform: none !important; } }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 12px clamp(16px, 4vw, 48px); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.08rem; letter-spacing: -0.02em; }
.logo { width: 32px; height: 32px; border-radius: 9px; box-shadow: var(--glow); flex: none; }
.brand-sub { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.92rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--card); }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
@media (max-width: 820px) { .nav { display: none; } .brand-sub { display: none; } }

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary, .btn-ghost, .btn-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 13px 22px; font-weight: 700; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, color .2s; white-space: nowrap; text-decoration: none; min-height: 44px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -12px rgba(25,198,230,0.6); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--card-solid); border-color: var(--card-border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: rgba(124,92,255,0.5); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--card); }
.btn-link { background: none; color: var(--accent); padding: 8px 6px; font-weight: 600; min-height: 0; }
.btn-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn-primary.small, .btn-secondary.small, .btn-ghost.small { padding: 9px 16px; font-size: 0.9rem; min-height: 40px; }
.btn-icon { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--card-border); background: var(--card-solid); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; transition: background .15s, border-color .15s, transform .15s; box-shadow: var(--shadow-sm); }
.btn-icon:hover { border-color: rgba(124,92,255,0.5); transform: translateY(-1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
:root[data-theme="dark"] .ico-sun { display: none; }
:root[data-theme="light"] .ico-moon { display: none; }

/* ---------- Hero ---------- */
main { padding: 0 clamp(16px, 4vw, 48px) 60px; max-width: 1240px; margin: 0 auto; }
.hero { padding: clamp(44px, 7vw, 88px) 0 28px; text-align: center; max-width: 920px; margin: 0 auto; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--card-border); background: var(--card-solid); color: var(--muted); font-size: 0.84rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(22,163,74,0.18); } 50% { box-shadow: 0 0 0 7px rgba(22,163,74,0.05); } }
h1 { font-size: clamp(2.15rem, 5.4vw, 4.1rem); font-weight: 850; margin: 22px 0 16px; letter-spacing: -0.04em; line-height: 1.05; }
.lead { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.2rem); max-width: 760px; margin: 0 auto 34px; }

.drop { position: relative; border-radius: 28px; padding: 2px; background: linear-gradient(135deg, rgba(124,92,255,0.45), rgba(25,198,230,0.45)); transition: transform .2s, box-shadow .2s; outline: none; box-shadow: var(--shadow); }
.drop-inner { border-radius: 26px; background: var(--card-solid); padding: clamp(26px, 5vw, 44px) 24px; border: 1.5px dashed rgba(124,92,255,0.35); transition: background .2s, border-color .2s; }
:root[data-theme="dark"] .drop-inner { background: #0f1118; }
.drop:hover .drop-inner, .drop:focus-visible .drop-inner { border-color: var(--accent2); }
.drop.over { transform: scale(1.01); box-shadow: 0 24px 60px -20px rgba(124,92,255,0.5); }
.drop.over .drop-inner { background: var(--grad-soft); border-style: solid; border-color: var(--accent2); }
.drop-ico { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 20px; background: var(--grad-soft); display: grid; place-items: center; }
.drop-ico svg { width: 52px; height: 40px; }
.drop-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.drop-sub { color: var(--muted); margin-top: 4px; font-size: 0.95rem; }
.drop-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.drop .btn-link { margin-top: 8px; }

.trust { list-style: none; padding: 0; margin: 22px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { color: var(--ok); flex: none; }

.engine { margin: 18px auto 0; max-width: 560px; text-align: left; }
.engine-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(124,92,255,0.25); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 8px; border-radius: 999px; background: rgba(120,130,150,0.18); overflow: hidden; flex: 1; min-width: 60px; }
.progress.slim { height: 5px; }
.progress .bar { height: 100%; width: 0%; background: var(--grad); border-radius: inherit; transition: width .25s ease; }
.progress .bar.indet { width: 40% !important; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ---------- Work area ---------- */
.work { padding-top: 28px; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; align-items: start; }
.card { background: var(--card-solid); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); }
:root[data-theme="dark"] .card { background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.files-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.files-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.files { display: flex; flex-direction: column; gap: 14px; }
.shortcuts { color: var(--muted2); font-size: 0.8rem; margin: 10px 4px 0; }

.file { padding: 18px 20px; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.file-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.file-title { min-width: 0; display: flex; flex-direction: column; }
.fname { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.fmeta { color: var(--muted2); font-size: 0.82rem; font-family: var(--mono); margin-top: 2px; }
.file-status { display: flex; align-items: center; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 0.9rem; flex-wrap: wrap; }
.status-text { flex: none; min-width: 120px; }
.pct { min-width: 44px; text-align: right; color: var(--muted2); }
.eta { color: var(--muted2); }
.file.done .file-status { display: none; }

.viz { margin-top: 14px; }
.viz-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.tab { border: 1px solid var(--card-border); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 0.8rem; font-weight: 700; min-height: 32px; }
.tab.active { background: var(--grad-soft); color: var(--text); border-color: rgba(124,92,255,0.45); }
.legend { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.legend .sw.orig { background: var(--wave-orig); }
.legend .sw.enh { background: var(--grad); }
.canvas-wrap { position: relative; height: 150px; border-radius: 14px; overflow: hidden; background: var(--wave-bg); cursor: pointer; touch-action: pan-y; }
.canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); left: 0; pointer-events: none; opacity: 0; }
.canvas-wrap.playing .playhead, .canvas-wrap.seeked .playhead { opacity: 0.9; }

.controls { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.controls-row { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; min-width: 0; }
.btn-play { width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--glow); transition: transform .15s; flex: none; }
.btn-play:hover { transform: scale(1.06); }
.time { color: var(--muted); }
.btn-ab, .btn-noise { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--card-border); background: var(--card-solid); padding: 8px 14px; font-weight: 800; font-family: var(--mono); font-size: 0.85rem; user-select: none; -webkit-user-select: none; touch-action: none; transition: background .1s, border-color .1s; min-height: 40px; box-shadow: var(--shadow-sm); }
.btn-noise { font-family: var(--font); font-weight: 700; font-size: 0.82rem; color: var(--muted); }
.btn-ab .ab-lbl { font-family: var(--font); font-weight: 600; color: var(--muted); font-size: 0.8rem; }
.btn-ab .ab-a { color: var(--muted2); } .btn-ab .ab-b { color: var(--accent2); }
.btn-ab.active { background: rgba(217,119,6,0.12); border-color: var(--warn); }
.btn-ab.active .ab-a { color: var(--warn); } .btn-ab.active .ab-b { color: var(--muted2); }
.btn-noise.active { background: rgba(244,114,182,0.14); border-color: var(--accent3); color: var(--text); }
.controls .download { margin-left: auto; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.stat { background: var(--tile); border: 1px solid var(--card-border); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.stat .k { color: var(--muted2); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.stat .v { font-family: var(--mono); font-size: 1.05rem; margin-top: 2px; white-space: nowrap; }
.stat .v.good { color: var(--ok); }
.stat .s { color: var(--muted2); font-size: 0.76rem; }
.error { color: var(--err); background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.25); border-radius: 12px; padding: 10px 12px; margin: 12px 0 0; font-size: 0.9rem; }

/* ---------- Transcript ---------- */
.tx { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.tx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tx-head h4 { margin: 0; font-size: 1rem; font-weight: 800; }
.tx-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tx-controls select { max-width: 220px; min-height: 40px; }
.tx-note { margin-top: 8px; }
.tx-status { display: flex; align-items: center; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 0.9rem; }
.tx-status .tx-status-text { flex: none; }
.tx-meta { display: flex; align-items: center; gap: 6px; margin: 12px 0 8px; flex-wrap: wrap; color: var(--muted2); font-size: 0.82rem; }
.tx-segments { max-height: 320px; overflow: auto; border-radius: 14px; background: var(--tile); border: 1px solid var(--card-border); padding: 6px; }
.tx-seg { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer; line-height: 1.45; }
.tx-seg:hover { background: var(--card-solid); }
.tx-seg.current { background: var(--grad-soft); }
.tx-seg .t { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); padding-top: 2px; }
@media (max-width: 640px) { .tx-controls { width: 100%; } .tx-controls select { max-width: 100%; flex: 1 1 140px; } .tx-controls .tx-run { flex: 1 1 100%; } }

/* ---------- Settings ---------- */
.settings { padding: 0; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; }
.settings-body { padding: 20px; }
.settings-toggle { display: none; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: none; border: none; font-weight: 800; font-size: 1rem; }
.settings-toggle-l, .settings-toggle-r { display: inline-flex; align-items: center; gap: 8px; }
.preset-now { color: var(--accent); font-size: 0.85rem; font-weight: 700; }
.settings-toggle .chev { transition: transform .2s; color: var(--muted); }
.settings.open .settings-toggle .chev { transform: rotate(180deg); }
.settings h2 { font-size: 1.1rem; margin-bottom: 12px; }
.group-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted2); font-weight: 800; margin: 20px 0 8px; }
.field { margin: 10px 0; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.field output { font-family: var(--mono); font-size: 0.85rem; color: var(--accent); }
.hint { margin: 4px 0 0; color: var(--muted2); font-size: 0.8rem; line-height: 1.4; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { border: 1px solid var(--card-border); background: transparent; border-radius: 999px; padding: 7px 12px; font-size: 0.82rem; font-weight: 700; color: var(--muted); transition: all .15s; min-height: 34px; }
.chip:hover { color: var(--text); border-color: rgba(124,92,255,0.5); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
input[type="range"] { width: 100%; height: 30px; -webkit-appearance: none; appearance: none; background: transparent; margin: 2px 0 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) var(--p, 50%), rgba(120,130,150,0.25) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(120,130,150,0.25); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--grad); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); margin-top: -8px; box-shadow: 0 2px 8px rgba(16,24,40,0.25); cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); cursor: grab; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 32px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: rgba(120,130,150,0.3); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.switch input:checked + .track { background: var(--grad); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent2); outline-offset: 2px; }
select { font: inherit; font-size: 16px; color: var(--text); background: var(--bg2); border: 1px solid var(--card-border); border-radius: 10px; padding: 8px 10px; max-width: 60%; min-height: 40px; }
select.wide { max-width: 100%; width: 100%; margin-top: 6px; }
.settings-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- Info sections ---------- */
.info { padding: 72px 0 0; max-width: 980px; margin: 0 auto; }
.info h2 { margin-bottom: 20px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { padding: 24px; position: relative; overflow: hidden; }
.step::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: var(--grad-soft); filter: blur(10px); }
.step .num { width: 36px; height: 36px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; box-shadow: var(--glow); }
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.table-wrap { overflow: auto; -webkit-overflow-scrolling: touch; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 620px; }
.cmp th, .cmp td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp th { color: var(--muted); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.cmp th.us { color: var(--accent); }
.cmp td:first-child, .cmp th:first-child { position: sticky; left: 0; background: var(--card-solid); z-index: 1; }
:root[data-theme="dark"] .cmp td:first-child, :root[data-theme="dark"] .cmp th:first-child { background: #13151d; }
.cmp td.us { font-weight: 700; background: rgba(124,92,255,0.06); }
.cmp td.yes { color: var(--ok); } .cmp td.no { color: var(--err); } .cmp td.partial { color: var(--warn); }
.note { color: var(--muted); font-size: 0.92rem; }
.faq { display: flex; flex-direction: column; gap: 10px; }
details { padding: 14px 18px; }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 28px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; flex: none; margin-right: 4px; }
details[open] summary::after { transform: rotate(-135deg); }
details p { color: var(--muted); margin: 10px 0 0; }
.foot { padding: 40px clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); color: var(--muted2); font-size: 0.85rem; text-align: center; }
.foot a { color: var(--muted); }

/* ---------- Recorder dialog ---------- */
dialog.rec { border: 1px solid var(--card-border); background: var(--bg2); color: var(--text); border-radius: 22px; padding: 0; width: min(560px, 94vw); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(10,12,20,0.5); backdrop-filter: blur(6px); }
.rec-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.rec-body h3 { font-size: 1.2rem; }
.rec-body .field.select { display: flex; flex-direction: column; gap: 6px; }
.rec-body select { max-width: 100%; }
.rec-meter { position: relative; height: 120px; border-radius: 14px; overflow: hidden; background: var(--wave-bg); }
.rec-meter canvas { width: 100%; height: 100%; display: block; }
.rec-time { position: absolute; right: 12px; top: 10px; font-family: var(--mono); font-size: 1.1rem; }
.rec-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; display: inline-block; }
#recStart.live .rec-dot { background: #ef4444; animation: pulse 1s infinite; }

/* ---------- Support card ---------- */
.coffee { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-top: 16px; }
.coffee-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--grad-soft); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.coffee-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.coffee-text strong { font-size: 0.95rem; }
.coffee-text span { color: var(--muted); font-size: 0.86rem; }
.coffee-btn { flex: none; }
@media (max-width: 640px) { .coffee { flex-wrap: wrap; } .coffee-btn { width: 100%; } }

/* ---------- Legal pages / utility pages ---------- */
.legal-main { max-width: 860px; margin: 0 auto; padding: 36px clamp(14px, 4vw, 48px) 60px; }
.legal-card { padding: clamp(22px, 4vw, 40px); }
.legal-card h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 6px; }
.legal-card h2 { font-size: 1.1rem; margin: 26px 0 8px; }
.legal-card p, .legal-card li { color: var(--muted); font-size: 0.97rem; }
.legal-card ul { padding-left: 20px; }
.legal-card table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 8px; }
.legal-card th, .legal-card td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-card th { color: var(--muted2); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.legal-card code { font-family: var(--mono); font-size: 0.85em; }
.legal-back { margin-top: 18px; }
.top img.logo { display: block; }
.foot-legal a { font-weight: 600; color: var(--muted); }
.center-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.center-page h1 { font-size: 2rem; margin: 8px 0 12px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--bg2); border: 1px solid var(--card-border); color: var(--text); border-radius: 14px; padding: 12px 18px; box-shadow: var(--shadow); opacity: 0; transition: opacity .25s, transform .25s; z-index: 50; max-width: 90vw; font-size: 0.92rem; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .work-grid { grid-template-columns: 1fr; }
  .settings { order: 2; position: static; max-height: none; }
  .settings-toggle { display: flex; }
  .settings-body { display: none; border-top: 1px solid var(--line); }
  .settings.open .settings-body { display: block; }
}
@media (max-width: 640px) {
  main { padding: 0 14px 40px; }
  .hero { padding-top: 32px; }
  h1 { font-size: 2.15rem; }
  .lead { font-size: 1rem; margin-bottom: 24px; }
  .drop-inner { padding: 24px 16px; }
  .drop-title { font-size: 1.1rem; }
  .drop-actions { flex-direction: column; }
  .drop-actions .btn-primary, .drop-actions .btn-secondary { width: 100%; }
  .trust { flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 6px; }
  .file { padding: 14px; }
  .canvas-wrap { height: 118px; }
  .controls .download { margin-left: 0; width: 100%; }
  .btn-ab .ab-lbl { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .v { font-size: 0.95rem; }
  .status-text { min-width: 0; }
  .info { padding-top: 52px; }
  .step { padding: 20px; }
  .rec-body { padding: 18px; }
  .top { gap: 10px; }
}
@media (max-width: 380px) { .brand-name { font-size: 1rem; } .btn-icon { width: 36px; height: 36px; } }
