:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --brand: #0369a1;
  --brand-dark: #075985;
  --border: #cbd5e1;
  --error: #b91c1c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --card: #111a2e;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --brand: #38bdf8;
    --brand-dark: #0ea5e9;
    --border: #334155;
    --error: #f87171;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
header {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 8px;
}
header img { border-radius: 50%; border: 2px solid #107ac0; flex: none; }
.org { font-size: 14px; color: var(--muted); }
h1 { font-size: 22px; margin: 0; line-height: 1.2; }
h2 { font-size: 22px; margin: 0 0 8px; }
main {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 16px 32px;
}
section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
label { display: block; font-weight: 600; margin-bottom: 8px; }
input {
  width: 100%;
  font-size: 28px;
  letter-spacing: 0.4em;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
input:focus { outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
button {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  font: inherit;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid var(--brand);
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
}
button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
button.secondary { background: transparent; color: var(--brand); }
button.link { background: transparent; border-color: transparent; color: var(--muted); text-decoration: underline; font-weight: 400; }
button:disabled { opacity: 0.6; cursor: default; }
button:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.q { font-weight: 600; margin-bottom: 0; }
#done-text { white-space: pre-line; }
.msg { color: var(--error); min-height: 1.5em; margin: 8px 0 0; }
.note { color: var(--muted); font-size: 16px; }
.contact { color: var(--muted); font-size: 16px; text-align: center; margin-top: 20px; }
@media (prefers-color-scheme: dark) {
  button { color: #0b1220; }
  button.secondary, button.link { color: var(--brand); }
  button.link { color: var(--muted); }
}
