:root {
  --green: #176448;
  --background: #f4f2ea;
  --ink: #17221d;
  --muted: #5d6862;
  --line: #d9dfda;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans JP", sans-serif;
  line-height: 1.7;
}

a:focus-visible,
button:focus-visible,
input:focus-visible + span {
  outline: 3px solid #f0a25b;
  outline-offset: 3px;
}

.qa-banner {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 9px 16px;
  background: #4b2d11;
  color: #fff;
  font-weight: 800;
}

.qa-banner[hidden] { display: none; }

.qa-banner button {
  border: 1px solid #fff;
  border-radius: 8px;
  background: #fff;
  color: #4b2d11;
  padding: 4px 12px;
  font-weight: 800;
}

header,
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px max(18px, calc((100% - 1080px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
}

header a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.2rem;
}

header small {
  background: #fff0df;
  border-radius: 999px;
  padding: 4px 10px;
}

main {
  width: min(1080px, calc(100% - 28px));
  margin: auto;
}

.hero {
  padding: 64px 0 42px;
  max-width: 850px;
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  line-height: 1.12;
  margin: .2em 0;
}

.hero > p:last-child {
  font-size: 1.15rem;
  color: var(--muted);
}

.tag {
  color: var(--green);
  font-weight: 800;
  margin: 0;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(20px, 4vw, 42px);
  margin-bottom: 24px;
  box-shadow: 0 12px 36px #1d362b14;
}

.card h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin: .2em 0 1em;
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 24px;
}

fieldset { border: 0; padding: 0; }
legend { font-weight: 800; margin-bottom: 8px; }

.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.choices.days { grid-template-columns: 1fr 1fr; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; }

.choices span {
  display: grid;
  place-items: center;
  min-height: 50px;
  border: 2px solid var(--line);
  border-radius: 13px;
  font-weight: 800;
}

.choices input:checked + span {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.result {
  background: #eff7f2;
  padding: 20px;
  border-radius: 20px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.metrics article { background: #fff; border-radius: 14px; padding: 15px; }
.metrics article > b { color: var(--green); }
.metrics h4 { margin: .3em 0; }
.metrics strong { font-size: 1.35rem; color: var(--green); }
.metrics p,
.note { font-size: .8rem; color: var(--muted); }

.lists {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.lists fieldset { border: 1px solid var(--line); border-radius: 15px; padding: 15px; }
.lists label { display: block; padding: 6px 0; }
.lists input { width: 18px; height: 18px; accent-color: var(--green); vertical-align: middle; }

.card ol,
.special {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card li { display: grid; gap: 5px; }
.special article { background: #fff; padding: 14px; border-radius: 14px; }
.safety { background: #fff8eb; }

.print {
  background: var(--green);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.print .tag { color: #c9f0dc; }
.print button { padding: 14px 20px; border: 0; border-radius: 12px; color: var(--green); font-weight: 900; }
.sources li { margin: 10px 0; }
.sources a,
.privacy a { color: var(--green); font-weight: 800; }

footer { background: #16221c; color: #fff; border: 0; }
footer a { color: #fff; }

@media (max-width: 900px) {
  form,
  .metrics,
  .lists,
  .card ol,
  .special { grid-template-columns: 1fr 1fr; }
  .print { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  header,
  footer { align-items: flex-start; flex-direction: column; }
  .hero { padding: 38px 0 28px; }
  .hero h1 { font-size: 2.15rem; }
  .card { border-radius: 18px; padding: 18px; }
  form,
  .metrics,
  .lists,
  .card ol,
  .special { grid-template-columns: 1fr; }
  .print button { width: 100%; }
}

@media print {
  body { background: #fff; font-size: 10pt; }
  header { padding: 5mm 0; }
  .qa-banner,
  header small,
  .hero > p:last-child,
  form,
  .card ol,
  .print,
  footer { display: none !important; }
  main { width: 100%; }
  .hero { padding: 6mm 0; }
  .hero h1 { font-size: 20pt; }
  .card { box-shadow: none; border: 1px solid #999; border-radius: 0; margin: 0 0 5mm; padding: 7mm; break-inside: avoid; }
  .metrics,
  .lists,
  .special { grid-template-columns: repeat(2, 1fr); }
  .sources a { color: #000; text-decoration: none; }
  .sources a::after { content: "（" attr(href) "）"; font-size: 7pt; }
}
