:root {
  --paper: #f6f3ec; --card: #ffffff; --ink: #1d2433; --muted: #5d6475; --line: #e3ddd0;
  --accent: #2448a8; --accent-ink: #ffffff; --ok: #1f7a4d; --warn: #a35a00; --err: #b3261e;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #15171c; --card: #1e2128; --ink: #eceef3; --muted: #a2a8b6; --line: #2e323b;
    --accent: #7d9bff; --accent-ink: #0d1020; --ok: #5cc894; --warn: #f0a540; --err: #ff8a80; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; font-size: 17px; line-height: 1.5;
  -webkit-text-size-adjust: 100%; }
main { max-width: 560px; margin: 0 auto; padding: 24px 16px calc(32px + env(safe-area-inset-bottom)); }
.screen { animation: in .25s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.eyebrow { color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: .02em; margin-bottom: 6px; }
h1 { font-size: 27px; line-height: 1.25; margin: 0 0 10px; font-weight: 700; }
h2 { font-size: 23px; margin: 0 0 12px; font-weight: 700; }
.lead { font-size: 18px; margin: 0 0 18px; }
.small, .opt { color: var(--muted); font-size: 14px; font-weight: 400; }
.facts { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.facts li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
fieldset.q { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 500; margin-bottom: 8px; padding: 0; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { flex: 1 1 0; min-width: 80px; padding: 11px 10px; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
#ts-box { margin: 4px 0 12px; min-height: 0; }
button, .as-btn { -webkit-tap-highlight-color: transparent; }
.primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; padding: 12px 18px;
  font: inherit; font-size: 18px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border: 0;
  border-radius: var(--radius); cursor: pointer; }
.primary[disabled] { opacity: .45; cursor: not-allowed; }
.ghost { width: 100%; margin-top: 10px; padding: 12px; font: inherit; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.link { display: block; text-align: center; margin-top: 12px; color: var(--accent); text-decoration: underline; cursor: pointer; }
.err { color: var(--err); font-weight: 500; }
.howto { display: grid; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 16px; font-size: 16px; }
ol.items { list-style: none; padding: 0; margin: 0 0 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
ol.items li { display: grid; grid-template-columns: 1fr; align-items: baseline; gap: 2px 10px; padding: 8px 14px;
  border-bottom: 1px solid var(--line); }
ol.items li:last-child { border-bottom: 0; }
.num { grid-row: span 2; font-weight: 700; font-size: 20px; color: var(--accent); text-align: center; }
.lbl { color: var(--muted); font-size: 13px; }
.val { font-size: 21px; font-weight: 500; letter-spacing: .01em; overflow-wrap: anywhere; }
.val.ltr { direction: ltr; unicode-bidi: isolate; text-align: right; font-variant-numeric: tabular-nums; }
.sticky { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.tips { color: var(--muted); margin: 0 0 16px; }
.pick { margin-bottom: 14px; }
.photo { display: grid; grid-template-columns: 96px 1fr; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px; margin-bottom: 10px; align-items: start; }
.photo img { width: 96px; height: 128px; object-fit: cover; border-radius: 8px; background: var(--line); }
.photo .t { font-weight: 700; margin-bottom: 4px; display: flex; justify-content: space-between; gap: 8px; }
.photo .rm { font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 14px; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; }
.chip.ok { color: var(--ok); } .chip.warn { color: var(--warn); } .chip.busy { color: var(--muted); }
.summary { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; font-weight: 500; }
.summary.ok { background: color-mix(in srgb, var(--ok) 12%, var(--card)); color: var(--ok); }
.summary.warn { background: color-mix(in srgb, var(--warn) 14%, var(--card)); color: var(--warn); }
.summary .ov { display: flex; gap: 8px; align-items: center; margin-top: 8px; color: var(--ink); font-weight: 400; }
.summary .ov input { width: 20px; height: 20px; accent-color: var(--accent); }
.progress { position: relative; height: 34px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 12px; }
.progress .bar { position: absolute; inset: 0 0 0 auto; width: 0; background: var(--accent); transition: width .2s; }
.progress span { position: relative; display: block; text-align: center; line-height: 34px; font-weight: 500; color: var(--ink); mix-blend-mode: normal; }
.done-mark { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 38px;
  background: var(--ok); color: var(--paper); margin: 24px 0 16px; }
