:root {
  --bg: #0b1220;
  --panel: #111a2e;
  --line: #22304d;
  --fg: #e6edf7;
  --muted: #93a3bf;
  --accent: #2dd4bf;
  --accent-ink: #04221d;
  --warn: #f59e0b;
  --error: #f87171;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.brand { font-weight: 700; letter-spacing: .08em; }
.brand span { color: var(--accent); font-weight: 500; }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.langs button { padding: 4px 8px; font-size: 13px; }
.langs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
main { max-width: 760px; margin: 0 auto; padding: 20px 16px 40px; }
h1 { font-size: 24px; margin: 8px 0 8px; }
h2 { font-size: 17px; margin: 24px 0 8px; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.error { color: var(--error); }
button, input, textarea, select {
  font: inherit; color: var(--fg); background: #0e1628; border: 1px solid var(--line); border-radius: 8px;
}
button { padding: 8px 14px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.link { background: none; border: 0; color: var(--accent); padding: 4px 0; text-decoration: underline; }
button.danger { color: var(--error); }
input, textarea, select { padding: 10px 12px; width: 100%; }
textarea { resize: vertical; min-height: 160px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row input { flex: 1 1 240px; width: auto; }
.grow { flex: 1; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list button {
  width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px;
  background: var(--panel);
}
.list .count { color: var(--muted); font-size: 14px; white-space: nowrap; }
.guide { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px 12px; }
.guide h2 { color: var(--fg); }
.guide ul { margin: 0; padding-left: 20px; color: var(--muted); }
.recorder { display: flex; align-items: center; gap: 16px; margin: 20px 0 8px; flex-wrap: wrap; }
.mic {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; font-weight: 600;
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.mic .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent-ink); }
.mic[aria-pressed="true"] { background: var(--error); border-color: var(--error); color: #1b0606; }
.mic[aria-pressed="true"] .dot { animation: pulse 1s infinite; background: #1b0606; }
@keyframes pulse { 50% { opacity: .2; } }
.timer { font-variant-numeric: tabular-nums; color: var(--muted); }
.status { min-height: 1.5em; color: var(--muted); }
.status.error { color: var(--error); }
.status.ok { color: var(--accent); }
.draft { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 8px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.entries { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.entries li { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.entries .meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.entries .text { white-space: pre-wrap; margin: 8px 0; }
.entries audio { width: 100%; margin-top: 6px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 10px 0; }
.linkbox { word-break: break-all; font-family: ui-monospace, monospace; font-size: 13px; background: #0e1628; padding: 8px; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
@media (max-width: 520px) {
  .top { flex-wrap: wrap; }
  h1 { font-size: 21px; }
}
