:root { --bg: #f4f6f8; --card: #fff; --text: #1b1f24; --muted: #5b6672; --brand: #1f4e79; --ok: #1e7b3a; --warn: #9a5b00; --err: #b3261e; --line: #d5dbe1; --sel: #e3edf7; }
@media (prefers-color-scheme: dark) { :root { --bg: #14181c; --card: #1d2329; --text: #e7ebef; --muted: #9aa6b2; --brand: #7fb2e5; --ok: #6fcf8a; --warn: #f0b45c; --err: #ff8a80; --line: #33404c; --sel: #24384c; } }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.bar { position: sticky; top: 0; z-index: 2; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px calc(8px); padding-top: max(10px, env(safe-area-inset-top)); }
.brand { font-weight: 700; color: var(--brand); }
.dev { font-size: 12px; color: var(--warn); }
.status { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 13px; }
.pill { border-radius: 999px; padding: 2px 10px; border: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
.pill.on { color: var(--ok); border-color: var(--ok); } .pill.off { color: var(--err); border-color: var(--err); } .pill.warn { color: var(--warn); border-color: var(--warn); }
main { max-width: 720px; margin: 0 auto; padding: 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
h1 { font-size: 21px; margin: 0 0 10px; } h2 { font-size: 17px; margin: 18px 0 8px; color: var(--muted); }
label { display: block; font-weight: 600; margin: 10px 0 4px; }
input[type=text], input[type=password], textarea, select { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); }
textarea { min-height: 120px; resize: vertical; }
button { font: inherit; min-height: 48px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; touch-action: manipulation; }
button.primary { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
button:disabled { opacity: .5; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; }
.opts { display: grid; gap: 8px; }
.opt { text-align: left; width: 100%; }
.opt[aria-pressed=true] { background: var(--sel); border-color: var(--brand); font-weight: 600; }
.list button { width: 100%; text-align: left; margin-bottom: 8px; }
.meta { font-size: 13px; color: var(--muted); }
.note { font-size: 14px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 10px; margin: 8px 0; }
.err { color: var(--err); } .ok { color: var(--ok); }
.coding { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 6px; }
.q { font-size: 19px; font-weight: 600; margin: 4px 0 12px; }
.full { width: 100%; } button.small { min-height: 40px; }
.timer { font-weight: 600; color: var(--brand); margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.theme { margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.theme summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.theme ol { margin: 8px 0; padding-left: 22px; }
.lego { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--sel); }
.lego h2 { font-size: 16px; margin: 0 0 6px; }
.opts.scroll { max-height: 280px; overflow-y: auto; }
.person { font-size: 17px; font-weight: 700; color: var(--brand); border-left: 4px solid var(--brand); padding-left: 10px; margin: 10px 0 4px; }
.row.cand { align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
/* AEDI-FIELD-AUTO-02: shared RAW guidance + option explanations (mobile-first) */
.raw-hint { font-size: .9rem; color: #4a5568; margin: .35rem 0 .2rem; }
.raw-help { font-size: .9rem; margin: 0 0 .6rem; }
.raw-help summary { cursor: pointer; color: #1f4e79; min-height: 44px; display: flex; align-items: center; }
.raw-help p { margin: .3rem 0 0; color: #2d3748; }
.opt-expl { display: block; font-size: .82rem; font-weight: 400; color: #4a5568; margin-top: .25rem; line-height: 1.3; }
.opt[aria-pressed="true"] .opt-expl { color: inherit; }
/* delete unfinished questionnaire: secondary menu + confirmation (FIELD UX) */
.sess { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: start; margin-bottom: 8px; position: relative; }
.list .sess button { margin-bottom: 0; }
.sess-more { width: 48px; font-size: 1.4rem; line-height: 1; }
.sess-menu { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.sess-menu[hidden] { display: none; }
.danger-text { color: #b42318; border-color: #f1b8b2; width: auto !important; }
button.danger { background: #b42318; color: #fff; border-color: #b42318; font-weight: 600; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal-box { background: var(--card); border-radius: 12px; padding: 18px; max-width: 420px; width: 100%; }
.modal-box .row { display: flex; gap: 10px; justify-content: flex-end; }
.toast { background: #e7f6ec; border: 1px solid #9fd3b0; color: #14532d; border-radius: 10px; padding: 10px 14px; }
/* AEDI-LEGO-FIELD-VERIFY-01: TEST / DEBUG-only LEGO diagnostics */
.dbg { margin-top: 12px; padding: 8px; border: 1px dashed #b45309; background: #fffbeb; font: 12px/1.35 ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }
.dbg table { width: 100%; border-collapse: collapse; margin: 6px 0; }
.dbg th { text-align: left; vertical-align: top; width: 38%; font-weight: 600; padding: 2px 4px; }
.dbg td { padding: 2px 4px; }
.dbg-h { font-weight: 700; margin: 0 0 4px; }
.dbg-src, .dbg-skip { font-weight: 700; color: #92400e; margin: 2px 0; }
/* AEDI-LEGO-EMPIRICAL-CORRECTION-01: explicit activity referent */
.referent { margin: 6px 0 4px; padding: 6px 8px; border-left: 3px solid #2563eb; background: #eff6ff; font-weight: 600; }
/* AEDI-LEGO-SELECTION-GATE-01: respondent-facing activity cards (no ranking, no recommendation) */
.sel-card { display: block; text-align: left; }
.sel-card b { display: block; margin-bottom: 4px; }
.sel-card.single { padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; }
