:root {
  --bg: #f7f6f2; --card: #ffffff; --ink: #1c1b19; --muted: #66635c; --line: #dedbd2;
  --accent: #1f5f4a; --accent-ink: #ffffff; --soft: #e9f2ee; --warn: #8a4b00; --warn-bg: #fff4e0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141513; --card: #1d1f1c; --ink: #ecebe6; --muted: #a3a097; --line: #33362f;
    --accent: #6fcfae; --accent-ink: #0c1f18; --soft: #1f2b26; --warn: #ffcf8a; --warn-bg: #33290f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
header.site, main, footer.site { max-width: 760px; margin: 0 auto; padding: 0 16px; }
header.site { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 6px; }
header.site .brand { font-weight: 700; letter-spacing: .02em; text-decoration: none; color: var(--ink); }
header.site nav a { margin-left: 16px; font-size: 14px; }
h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.15; margin: 22px 0 8px; text-wrap: balance; }
h2 { font-size: 19px; margin: 30px 0 8px; }
p.lead { color: var(--muted); margin: 0 0 18px; max-width: 60ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 14px 0; }
label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
textarea, select, input[type=file] {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px;
}
textarea { min-height: 170px; resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.row > div { flex: 1 1 180px; min-width: 0; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
button, a.btn {
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  border-radius: 8px; padding: 10px 16px;
}
button.ghost, a.btn.ghost { background: transparent; color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.status { font-size: 14px; color: var(--muted); min-height: 22px; margin-top: 10px; }
.status.err { color: var(--warn); }
progress { width: 100%; height: 8px; margin-top: 8px; accent-color: var(--accent); }
audio { width: 100%; margin-top: 12px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.count { font-variant-numeric: tabular-nums; }
.note { background: var(--soft); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 22px 14px; text-align: center; color: var(--muted); }
.drop.over { border-color: var(--accent); background: var(--soft); }
#out { white-space: pre-wrap; min-height: 140px; }
ul.plain { padding-left: 20px; margin: 8px 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid2 .card { margin: 0; }
.grid2 h2 { margin-top: 0; }
footer.site { color: var(--muted); font-size: 13px; padding-top: 26px; padding-bottom: 40px; }
[hidden] { display: none !important; }
