:root { color-scheme: light; font-family: "Yu Gothic UI", Meiryo, sans-serif; color: #18322f; background: #eef4f1; }
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.7; }
header { background: #11463e; color: white; padding: 1rem 1.25rem; font-weight: 700; }
header div { max-width: 56rem; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
header span { margin-left: .6rem; font-size: .8rem; color: #d0ece0; }
header .header-title { margin: 0; font-size: 1rem; color: white; }
main { max-width: 56rem; margin: 1.5rem auto; padding: clamp(1rem, 4vw, 2.5rem); background: #fff; border: 1px solid #d2e0da; border-radius: 1rem; }
h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.3; margin: .2rem 0 1.25rem; }
h2 { line-height: 1.4; margin: .2rem 0 .8rem; }
.eyebrow, .status { color: #276052; font-weight: 700; margin: 0; }
fieldset, .guide { min-width: 0; border: 1px solid #c9dad3; padding: 1rem; margin: 1rem 0; border-radius: .65rem; }
legend { font-weight: 700; padding: 0 .35rem; max-width: 100%; }
.consent-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .45rem; }
.choice { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem; cursor: pointer; padding: .5rem; border: 1px solid #cfdfd9; border-radius: .4rem; background: #f7faf8; }
.choice:has(input:checked) { border-color: #126458; background: #e3f2eb; }
input { accent-color: #126458; }
input[name=identifier], textarea { display: block; font: inherit; width: 100%; padding: .65rem; border: 1px solid #7d9e94; border-radius: .4rem; }
input[name=identifier] { max-width: 20rem; }
button { display: block; margin-top: 1.25rem; padding: .7rem 1.2rem; font: inherit; font-weight: 700; color: white; background: #126458; border: 0; border-radius: .5rem; cursor: pointer; }
button:disabled { background: #54645f; cursor: default; }
:focus-visible { outline: 3px solid #875811; outline-offset: 2px; }
.flow-scroll { width: 100%; min-width: 0; margin: 1rem 0; }
.flow { position: relative; width: 100%; min-width: 0; padding: 1rem clamp(.1rem, 1vw, .75rem); font-size: clamp(.72rem, 2.6vw, 1rem); }
.flow svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.flow-row { position: relative; display: flex; justify-content: center; align-items: stretch; gap: clamp(.3rem, 2vw, 2rem); list-style: none; padding: 0; margin: 0; }
.flow-row + .flow-row { margin-top: clamp(2rem, 6vw, 4rem); }
.flow-row li { flex: 0 1 18rem; min-width: 0; padding: .5rem .7rem; background: #f5f9f7; border: 1px solid #c9dad3; border-radius: .4rem; overflow-wrap: anywhere; }
.flow-row li:has(.choice) { padding: .2rem; }
.flow-reference-row { display: grid; grid-template-columns: repeat(1000, minmax(0, 1fr)); column-gap: 0; }
.flow-reference-row li { width: 100%; }
.flow-row small { display: block; padding: .2rem .35rem; color: #276052; }
.tag { display: inline-block; padding: 0 .4rem; border-radius: .3rem; font-size: .85rem; font-weight: 700; color: #173e35; background: #dbeee5; }
.flow-row .flow-muted { background: #f1f2f3; color: #40464a; border-color: #aeb4b8; }
.flow-muted .tag, .flow-muted .choice { background: #e4e6e8; color: inherit; }
.flow-muted small, .flow-muted .status { color: inherit; }
.flow-muted .choice:has(input:checked) { background: #d4d8db; border-color: #40464a; }
.flow-row .flow-highlight { background: #e3f2eb; border: 2px solid #126458; font-weight: 700; }
.flow-highlight .tag { background: #126458; color: white; }
.flow-row .flow-selected { box-shadow: inset 0 0 0 3px #126458; }
.flow .choice { padding: clamp(.2rem, .8vw, .5rem); gap: .2rem; }
.flow .tag { font-size: .85em; padding-inline: .2em; }
.flow-row small { font-size: .8em; padding-inline: .1rem; }
.flow-interactive .choice { cursor: pointer; }
[hidden] { display: none !important; }
.flow-row li[data-concealed=true] { visibility: hidden; }
.flow-interactive .flow-choice { background: #f5f9f7; }
.flow-choice { margin: 0; width: 100%; background: transparent; color: inherit; padding: .5rem; text-align: left; font-weight: inherit; }
.flow-choice[aria-pressed=true] { box-shadow: inset 0 0 0 3px #126458; }
.note { background: #eff7f3; border-left: 3px solid #47917d; padding: .65rem .85rem; }
.error { color: #8e241e; background: #fff0ed; padding: .75rem; border-radius: .4rem; }
#page-end { height: 1px; }
.survey-page { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.survey-page > header { flex-shrink: 0; padding-block: .6rem; }
.survey-main { flex: 1; min-height: 0; width: min(56rem, calc(100% - 1rem)); margin: .5rem auto; display: flex; flex-direction: column; padding: clamp(.75rem, 2vw, 1.5rem); }
.survey-heading { flex-shrink: 0; }
.survey-heading h1 { margin-bottom: .4rem; font-size: clamp(1.2rem, 3vw, 1.8rem); }
.survey-heading p { margin-block: .3rem; }
.answer-count { font-weight: 700; color: white; font-size: clamp(.85rem, 2.6vw, 1.15rem); margin: 0; white-space: nowrap; text-align: right; }
.survey-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.question-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; padding: .25rem .6rem .75rem 0; }
.survey-footer { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .6rem; border-top: 1px solid #d2e0da; }
.survey-footer button { margin: 0 0 0 auto; }
.guide-lead { font-size: clamp(1.15rem, 2.8vw, 1.6rem); font-weight: 700; line-height: 1.5; }
.action-prompt { font-weight: 700; margin-bottom: .25rem; }
.flow-page { display: block; height: auto; min-height: 100dvh; overflow: visible; }
.flow-page > header { position: sticky; top: 0; z-index: 10; }
.flow-page .survey-main, .flow-page .survey-form { display: block; }
.flow-page .question-scroll { overflow: visible; scrollbar-gutter: auto; overscroll-behavior: auto; padding-right: 0; }
@media (max-width: 480px) { .flow-page fieldset, .flow-page .guide { padding: .55rem .35rem; } header .header-title { font-size: .85rem; } }
@media (max-width: 58rem) { main { margin: .75rem; } }
@media (max-width: 58rem) { .survey-main { margin: .5rem auto; } }
@media (max-height: 650px) { .survey-heading p:not(.answer-count):not(.guide-lead):not(.eyebrow) { font-size: .85rem; } .survey-page > header { padding-block: .2rem; } }
@media (max-height: 500px) { .survey-heading p { line-height: 1.35; margin-block: .15rem; } .survey-heading .guide-lead { font-size: 1.05rem; } .survey-heading h1 { font-size: 1.1rem; } .answer-count { font-size: 1rem; } }
