:root {
  color-scheme: dark;
  --page: #121419;
  --surface: #1a1d24;
  --surface-raised: #21252e;
  --preview: #101218;
  --track: #222630;
  --control: #292e3a;
  --control-hover: #33394a;
  --border: #353b49;
  --border-strong: #596176;
  --text: #f3f4f8;
  --muted: #b5bdcd;
  --accent: #c6b8ff;
  --accent-tint: #302946;
  --accent-border: #8070b2;
  --accent-ink: #221847;
  --success: #99dfc2;
  --audio: #a1e7d1;
  --audio-tint: #23473e;
  --audio-border: #689787;
  --sans: "Inter", "Segoe UI", system-ui, "Malgun Gothic", sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", ui-monospace, monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px;
  --radius: 5px; --radius-panel: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); font: 16px/1.45 var(--sans); }
h1,h2,h3,p { margin: 0; }
small,output,p { color: var(--muted); }
a { color: var(--accent); }
button,input,textarea,select,summary { font: inherit; }
button,select,input:not([type=checkbox],[type=range]),textarea {
  min-height: 34px; padding: 5px 9px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--control); color: var(--text);
}
button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; }
button:hover,select:hover { background: var(--control-hover); }
button:disabled { opacity: .56; cursor: default; }
button:disabled:hover { background-color: var(--control); }
select { cursor: pointer; }
input:not([type=checkbox]),select,textarea { width: 100%; min-width: 0; }
input[type=range],input[type=checkbox],progress { accent-color: var(--accent); }
input[type=range] { height: 22px; cursor: pointer; }
input[type=file]::file-selector-button { background: var(--surface-raised); color: var(--text); border: 1px solid var(--border-strong); border-radius: 3px; margin-right: 6px; padding: 2px 5px; }
label { display: block; color: var(--text); font-size: 13px; margin: 7px 0; }
label > :is(input:not([type=checkbox]),select,textarea) { margin-top: 3px; }
input::placeholder,textarea::placeholder { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; width: 17px; height: 17px; flex: 0 0 auto; vertical-align: middle; }
.icon-button { width: 36px; padding: 0; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.primary:hover { background: #ded3ff; color: var(--accent-ink); }
.primary:disabled:hover { background: var(--accent); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 820; font-size: 17px; white-space: nowrap; width: fit-content; letter-spacing: -.025em; }
.brand small { font: 550 12px var(--sans); color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
hr { height: 1px; border: 0; background: var(--border); margin: 12px 0; }
dialog { width: min(520px,calc(100% - 20px)); max-height: calc(100dvh - 22px); padding: var(--space-4); border: 1px solid var(--border-strong); border-radius: var(--radius-panel); color: var(--text); background: var(--surface); box-shadow: 0 15px 65px #0008; }
dialog::backdrop { background: #08090dbd; }
dialog h2 { font-size: 17px; }
dialog progress { width: 100%; }
