:root {
  color-scheme: light;
  --ink: #17231e;
  --muted: #66736d;
  --forest: #12372a;
  --green: #1f6a4c;
  --mint: #dcece3;
  --cream: #f4f1e8;
  --paper: #fffdf8;
  --line: #d8ddd8;
  --orange: #dc6d3a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  line-height: 1.65;
}

.hero {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18,55,42,.98), rgba(31,106,76,.93)),
    repeating-linear-gradient(90deg, transparent 0 32px, rgba(255,255,255,.04) 32px 33px);
  padding: max(30px, env(safe-area-inset-top)) 20px 34px;
}
.hero__inner, main, footer { width: min(720px, 100%); margin-inline: auto; }
.eyebrow { font-size: .72rem; letter-spacing: .16em; opacity: .72; }
h1 { margin: 12px 0; font-size: clamp(2rem, 9vw, 3.4rem); line-height: 1.14; letter-spacing: -.04em; }
.hero p { margin: 0 0 22px; color: rgba(255,255,255,.82); font-size: .95rem; }
.progress { height: 7px; overflow: hidden; background: rgba(255,255,255,.18); border-radius: 99px; }
.progress span { display: block; width: 0; height: 100%; background: #b8ebcb; transition: width .25s ease; }

main { padding: 20px 14px 56px; }
.confirmed, fieldset, .result {
  margin: 0 0 16px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 7px 22px rgba(30,47,39,.05);
}
.confirmed { border-color: #b9d1c1; background: #eef7f1; }
.section-number { color: var(--green); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h2 { margin: 5px 0 14px; font-size: 1.25rem; line-height: 1.3; }
.confirmed ul { padding: 0; margin: 0; list-style: none; }
.confirmed li { display: grid; grid-template-columns: 88px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(31,106,76,.13); font-size: .9rem; }
.confirmed li:first-child { border-top: 0; }
.confirmed span { color: #435149; }

fieldset { min-width: 0; }
legend { padding: 0 5px; font-size: 1.16rem; font-weight: 800; }
legend span { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 9px; color: white; background: var(--forest); border-radius: 50%; font-size: .78rem; }
.help { margin: 4px 0 14px; color: var(--muted); font-size: .88rem; }
.choices { display: grid; gap: 9px; }
.choices.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices label {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.choices label:has(input:checked) { border-color: var(--green); background: var(--mint); box-shadow: inset 0 0 0 1px var(--green); }
.choices label.none { background: #f5f5f2; }
.choices input { width: 23px; height: 23px; flex: 0 0 auto; accent-color: var(--green); }
.choices span { font-weight: 700; line-height: 1.25; }
.choices small { display: block; margin-top: 4px; color: var(--muted); font-size: .76rem; font-weight: 400; }
.choices b { display: inline-block; margin-right: 5px; padding: 2px 6px; color: white; background: var(--orange); border-radius: 4px; font-size: .68rem; }
.radios label { min-height: 70px; }

.notes { display: block; margin: 22px 3px; font-weight: 800; }
textarea { width: 100%; margin-top: 8px; padding: 13px; border: 1px solid #bfc8c2; border-radius: 12px; background: white; color: var(--ink); font: inherit; resize: vertical; }
textarea:focus { outline: 3px solid rgba(31,106,76,.18); border-color: var(--green); }
.errors { margin: 15px 0; padding: 13px; border-radius: 10px; color: #842f1b; background: #fff0ea; font-weight: 700; }
button { min-height: 52px; padding: 12px 18px; border: 0; border-radius: 12px; font: inherit; font-weight: 800; cursor: pointer; }
.primary { width: 100%; color: white; background: var(--forest); box-shadow: 0 5px 0 #09251a; }
.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #09251a; }
.secondary { width: 100%; border: 1px solid var(--green); color: var(--green); background: transparent; }
.result { margin-top: 28px; border: 2px solid var(--green); }
.result textarea { min-height: 320px; background: #f8faf8; font-size: .82rem; }
.result__buttons { display: grid; gap: 10px; margin-top: 12px; }
.privacy { margin: 14px 0 0; color: var(--muted); text-align: center; font-size: .78rem; }
footer { padding: 20px 14px max(30px, env(safe-area-inset-bottom)); color: #7b857f; text-align: center; font-size: .72rem; }

@media (min-width: 620px) {
  main { padding-top: 30px; }
  .confirmed, fieldset, .result { padding: 28px; }
  .result__buttons { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
