:root {
  --bg: #f7f5f0; --panel: #ffffff; --ink: #1f2428; --mid: #55606b; --rule: #d9d4c8;
  --accent: #1f5f8b; --accent-ink: #ffffff; --pick: #e3eff7; --soft: #efece4; --warn: #9a4a12;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181c; --panel: #1d2127; --ink: #e8eaed; --mid: #a9b3bd; --rule: #343b44;
    --accent: #7fb6dc; --accent-ink: #10202c; --pick: #1f3442; --soft: #252a31; --warn: #e2a36a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.5 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
#top { position: sticky; top: 0; background: var(--bg); padding: 10px 16px 6px; z-index: 2; }
progress { width: 100%; height: 8px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 4px; overflow: hidden; background: var(--soft); }
progress::-webkit-progress-bar { background: var(--soft); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
#status { font-size: .8rem; color: var(--mid); min-height: 1.3em; text-align: right; margin-top: 2px; }
#status.waiting { color: var(--warn); }
main { max-width: 680px; margin: 0 auto; padding: 8px 16px 140px; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 18px 0 12px; }
h2 { font-size: 1.25rem; line-height: 1.35; margin: 10px 0 14px; font-weight: 600; }
p { margin: 0 0 14px; }
.quiet { color: var(--mid); font-size: .9rem; }
.where { color: var(--mid); font-size: .85rem; margin-top: 10px; }
.note { background: var(--soft); border-radius: 8px; padding: 10px 12px; font-size: .92rem; }
.subject { font-weight: 600; margin: 18px 0 6px; }
.options { display: grid; gap: 8px; margin: 0 0 8px; }
button { font: inherit; color: inherit; cursor: pointer; }
.opt { text-align: left; min-height: 48px; padding: 10px 14px; background: var(--panel); border: 1.5px solid var(--rule); border-radius: 10px; }
.opt[aria-pressed="true"] { background: var(--pick); border-color: var(--accent); font-weight: 600; }
.opt.unsure { border-style: dashed; }
textarea, input[type="text"] { width: 100%; font: inherit; color: inherit; background: var(--panel); border: 1.5px solid var(--rule); border-radius: 10px; padding: 10px 12px; margin: 0 0 8px; }
textarea { min-height: 96px; resize: vertical; }
textarea:focus, input:focus, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.part { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--rule); }
.part > .label { font-weight: 600; margin-bottom: 8px; }
.record { background: var(--pick); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.record small { display: block; color: var(--mid); margin-bottom: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.row .opt { flex: 1 1 150px; text-align: center; }
label.check { display: flex; gap: 10px; align-items: center; margin: 14px 0 0; font-size: .95rem; }
label.check input { width: 22px; height: 22px; }
details { margin-top: 14px; font-size: .95rem; }
summary { color: var(--accent); cursor: pointer; padding: 6px 0; }
#bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 1px solid var(--rule); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
#bar .inner { max-width: 680px; margin: 0 auto; display: flex; gap: 8px; }
.nav { min-height: 50px; padding: 10px 16px; border-radius: 10px; border: 1.5px solid var(--rule); background: var(--panel); }
.nav.main { flex: 1; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.nav.stop { color: var(--mid); }
.stack { display: grid; gap: 10px; margin-top: 20px; }
.stack .nav { width: 100%; }
