:root {
  --bg: #f6f5f1; --card: #ffffff; --ink: #1c1c1a; --muted: #66655f; --faint: #96958d; --line: #e3e1da;
  --accent: #1f6f4a; --accent-ink: #ffffff; --accent-bg: #e5f1ea; --accent-line: #a9d3bb;
  --warn: #7a5200; --warn-bg: #fff3d6; --warn-line: #f0d48a;
  --bad: #a32d2d; --bad-bg: #fcebeb; --bad-line: #f0b9b9;
  --radius: 12px; --tap: 48px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413; --card: #1e1e1c; --ink: #edece7; --muted: #a9a8a0; --faint: #7d7c75; --line: #33332f;
    --accent: #5cc48e; --accent-ink: #0d1f15; --accent-bg: #1b3326; --accent-line: #2f5c43;
    --warn: #f0c46a; --warn-bg: #352a10; --warn-line: #5c4a1c;
    --bad: #f09595; --bad-bg: #3a1b1b; --bad-line: #6b2f2f;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 17px/1.5 system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Devanagari", sans-serif; -webkit-text-size-adjust: 100%; }
#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: 12px 16px 24px; }
.top { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.top h1 { font-size: 19px; margin: 0; flex: 1; font-weight: 650; }
.iconbtn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; border-radius: 10px; cursor: pointer; padding: 0; }
.iconbtn:active { background: var(--line); }
.ic { width: 22px; height: 22px; stroke-width: 1.8; vertical-align: middle; flex: none; }
.screen { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.lead { color: var(--muted); margin: 0; }
.small { font-size: 14px; color: var(--muted); margin: 0; }
h2 { font-size: 22px; margin: 4px 0 0; font-weight: 650; line-height: 1.25; }
h3 { font-size: 16px; margin: 0; font-weight: 650; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.choice .ic { width: 26px; height: 26px; color: var(--muted); }
.choice.sel { border-color: var(--accent); background: var(--accent-bg); }
.choice.sel .ic { color: var(--accent); }
.choice .grow { flex: 1; min-width: 0; }
.choice .sub { display: block; font-size: 14px; color: var(--muted); }
.choice.dashed { border-style: dashed; color: var(--muted); }
.btn { min-height: var(--tap); padding: 12px 16px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.danger { background: var(--bad); color: #fff; border-color: transparent; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; position: sticky; bottom: 0; background: linear-gradient(to bottom, transparent, var(--bg) 18px); }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
input[type=text], input[type=date], textarea, select { width: 100%; font: inherit; font-weight: 400; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus, .btn:focus-visible, .choice:focus-visible, .iconbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.err { color: var(--bad); font-size: 15px; margin: 0; min-height: 1.2em; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 15px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 15px; display: flex; gap: 8px; align-items: flex-start; }
.good { background: var(--accent-bg); border: 1px solid var(--accent-line); color: var(--accent); border-radius: 10px; padding: 10px 12px; font-size: 15px; display: flex; gap: 8px; align-items: flex-start; }
.bad { background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 8px 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.chip.on { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--accent-bg); color: var(--accent); vertical-align: middle; white-space: nowrap; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.grey { background: var(--line); color: var(--muted); }
.langs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.langs .choice { justify-content: center; font-size: 22px; min-height: 96px; }
.q { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; font: inherit; color: inherit; }
.q .ic { color: var(--faint); margin-top: 1px; }
.q.done .ic { color: var(--accent); }
.q.done span.qt { color: var(--muted); text-decoration: line-through; }
.mic { width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: 8px auto; cursor: pointer; }
.mic .ic { width: 40px; height: 40px; }
.mic.rec { background: var(--bad); color: #fff; }
.timer { font-size: 40px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; margin: 0; }
.recdot { display: inline-flex; align-items: center; gap: 6px; color: var(--bad); font-weight: 600; }
.recdot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.bars { display: flex; gap: 4px; align-items: center; justify-content: center; height: 56px; }
.bars i { width: 5px; height: 100%; border-radius: 3px; background: var(--accent); transform: scaleY(.2); transition: transform .1s; }
.seg { border-radius: 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); }
.seg.staff { background: var(--accent-bg); border-color: var(--accent-line); }
.seg.other, .seg.unclear { background: var(--warn-bg); border-color: var(--warn-line); }
.seg .who { font: inherit; font-weight: 650; font-size: 14px; padding: 4px 10px; border-radius: 99px; border: 1.5px solid currentColor; background: transparent; color: inherit; cursor: pointer; margin-right: 6px; }
.seg .time { font-size: 13px; color: var(--muted); }
.seg p { margin: 6px 0 0; }
.steps { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.step { display: flex; gap: 10px; align-items: center; color: var(--faint); }
.step.on { color: var(--ink); font-weight: 600; }
.step.done { color: var(--accent); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fieldbox { border-top: 1px solid var(--line); padding: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.fieldbox .head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flagged { background: var(--bad-bg); border: 1px solid var(--bad-line); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.flagged p { margin: 0 0 6px; }
.flagged .why { color: var(--bad); font-size: 14px; }
.list .item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; font: inherit; color: inherit; }
.list .item .grow { flex: 1; min-width: 0; }
.list .item .sub { display: block; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 15px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; z-index: 10; }
.toast.show { opacity: 1; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale .chip { padding: 8px 0; text-align: center; }
.hr { height: 1px; background: var(--line); margin: 4px 0; }
.center { text-align: center; }
.big-ic .ic { width: 48px; height: 48px; color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
