:root {
  --bg: #f7f6f3;
  --text: #1d1d1b;
  --muted: #6e6d68;
  --surface: #ecebe6;
  --accent: #2c5f4a;
  --on-accent: #ffffff;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --text: #ecebe6;
    --muted: #9b9a94;
    --surface: #24241f;
    --accent: #7fbfa2;
    --on-accent: #10201a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
main {
  max-width: 620px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 28px) 20px calc(env(safe-area-inset-bottom) + 110px);
}
h1 { font-size: 30px; line-height: 1.15; font-weight: 700; margin: 0 0 4px; }
h2 { font-size: 20px; line-height: 1.25; font-weight: 650; margin: 0 0 10px; }
.muted { color: var(--muted); }
#meta { margin: 0 0 14px; font-size: 15px; }
#intro { margin: 0 0 8px; }
#notice { margin: 18px 0 0; padding: 14px 16px; background: var(--surface); border-radius: 12px; font-size: 15px; }
#notice button { margin-top: 10px; }

.q { margin-top: 44px; }
.q .num { color: var(--muted); font-weight: 600; margin-right: 6px; }
.q .done { color: var(--accent); font-size: 15px; font-weight: 600; margin-left: 6px; }
.q p { margin: 0 0 10px; }
.q ul { margin: 0 0 10px; padding-left: 20px; }
.q li { margin-bottom: 4px; }
.q .changed { color: var(--accent); font-size: 15px; font-weight: 600; margin: 0 0 8px; }

.opts { margin: 14px 0 0; }
.opt {
  display: flex; gap: 12px; align-items: flex-start;
  width: 100%; min-height: 48px; padding: 11px 4px;
  background: none; border: 0; color: inherit; font: inherit; text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.dot {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--muted);
}
.opt[aria-checked="true"] .dot { box-shadow: inset 0 0 0 7px var(--accent); }
.opt[aria-checked="true"] .lbl { font-weight: 600; }
.key { font-weight: 600; margin-right: 4px; }

.part { margin: 18px 0 0; }
.part .plabel { margin: 0 0 8px; }
.yn { display: flex; gap: 8px; }
.yn button {
  flex: 1; min-height: 44px; border: 0; border-radius: 10px;
  background: var(--surface); color: inherit; font: inherit; font-weight: 600;
}
.yn button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

input[type="text"], textarea {
  display: block; width: 100%; margin: 8px 0 0; padding: 12px 14px;
  border: 0; border-radius: 10px; background: var(--surface); color: inherit;
  font: inherit; font-size: 16px;
}
textarea { min-height: 48px; resize: vertical; }
.notebtn { margin-top: 10px; padding: 6px 0; background: none; border: 0; color: var(--accent); font: inherit; font-size: 15px; font-weight: 600; }

footer#bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px calc(env(safe-area-inset-bottom) + 12px);
  background: var(--bg);
  box-shadow: 0 -1px 0 rgba(127,127,127,.18);
}
#progress { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button { font: inherit; cursor: pointer; }
#send, #notice button {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-weight: 600;
}
#send:disabled { opacity: .5; }
button.quiet { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--accent); font-weight: 600; }
