:root {
  --ink: #173147;
  --muted: #617283;
  --canvas: #f3f8fb;
  --white: #fff;
  --line: #dce8ef;
  --nurse: #d96878;
  --nurse-dark: #a93f51;
  --nurse-soft: #fff0f3;
  --blue-soft: #eaf6fb;
  --blue: #1b7392;
  --shadow: 0 16px 42px rgba(37, 85, 113, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); }
[hidden] { display: none !important; }
.container { width: min(100% - 32px, 860px); margin-inline: auto; }

.topbar { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.topbar-inner { display: flex; min-height: 68px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: 172px; height: auto; }
.head-link { position: relative; padding-right: 19px; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.head-link::after { content: ""; position: absolute; right: 2px; top: 42%; width: 7px; height: 7px; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(45deg); }

.hero { padding: 34px 0 26px; }
.kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--nurse-dark); font-size: 14px; font-weight: 700; }
.cluster-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--white); background: var(--nurse); font-size: 12px; }
.cluster-mark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1 { margin: 0; font-size: clamp(34px, 7vw, 52px); line-height: 1.13; letter-spacing: -.045em; }
.h1-sub { display: block; margin-bottom: 4px; color: var(--muted); font-size: .48em; font-weight: 600; letter-spacing: -.02em; line-height: 1.35; }
.lead { max-width: 36em; margin: 15px 0 0; color: var(--muted); }

.tool-shell { margin-bottom: 34px; padding: 24px; border-radius: 24px; background: var(--canvas); }
.tool-shell h2 { margin: 0 0 4px; font-size: clamp(23px, 5vw, 30px); line-height: 1.35; }
.tool-help { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.mode-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-button, .count-button {
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 15px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  font-weight: 700;
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.mode-button:hover, .count-button:hover { border-color: #f0bac3; }
.mode-button.is-on, .count-button.is-on { color: var(--white); background: var(--nurse); box-shadow: 0 8px 18px rgba(217,104,120,.22); transform: translateY(-1px); }
.mode-button:focus-visible, .count-button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(27,115,146,.3); outline-offset: 3px; }
.input-panel { margin-top: 20px; }
.field-block + .field-block { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.field-title { display: block; margin-bottom: 8px; font-weight: 750; }
.count-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.count-button { min-width: 0; padding: 8px 3px; }
.extra-count { display: flex; align-items: center; gap: 10px; margin-top: 9px; color: var(--muted); font-size: 13px; }
.extra-money { position: relative; }
.extra-money input { width: 88px; min-height: 44px; padding: 6px 35px 6px 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--white); }
.extra-money span { position: absolute; top: 50%; right: 11px; transform: translateY(-50%); }
.money-label { display: block; margin-top: 16px; font-size: 14px; font-weight: 700; }
.money { position: relative; margin-top: 6px; }
.money input { width: 100%; min-height: 58px; padding: 10px 52px 10px 15px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--white); font-size: 18px; font-weight: 700; }
.money span { position: absolute; top: 50%; right: 17px; color: var(--muted); transform: translateY(-50%); }
.average-note { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.average-button { margin-top: 8px; padding: 7px 11px; border: 1px solid #f0bac3; border-radius: 999px; color: var(--nurse-dark); background: var(--white); cursor: pointer; font-size: 13px; font-weight: 700; }
.average-button:hover { background: var(--nurse-soft); }
.waiting { margin: 20px 0 0; padding: 14px; border-radius: 14px; color: var(--muted); background: var(--white); text-align: center; }

.result { margin-top: 22px; padding: 20px; border-radius: 22px; background: var(--white); box-shadow: var(--shadow); }
.result-main { padding: 22px 14px; border-radius: 18px; background: var(--nurse-soft); text-align: center; }
.result-eyebrow { margin: 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.result-amount { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 3px 8px; margin: 4px 0 0; }
.result-amount strong { color: var(--nurse-dark); font-size: clamp(42px, 13vw, 62px); line-height: 1.08; letter-spacing: -.05em; }
.annual { margin: 7px 0 0; font-size: 18px; }
.annual strong { color: var(--nurse-dark); font-size: 25px; }
.result-note { margin: 16px 0 0; font-size: 15px; }
.assumption { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.trial-note { margin: 8px 0 0; color: var(--nurse-dark); font-size: 13px; font-weight: 700; }
.result-details { margin-top: 13px; border-top: 1px solid var(--line); }
.result-details summary, .info-details summary { position: relative; min-height: 54px; padding: 14px 40px 14px 0; cursor: pointer; list-style: none; font-weight: 700; }
summary::-webkit-details-marker { display: none; }
.result-details summary::after, .info-details summary::after { content: "+"; position: absolute; top: 50%; right: 5px; color: var(--nurse); font-size: 22px; font-weight: 400; transform: translateY(-50%); }
.result-details[open] summary::after, .info-details[open] summary::after { content: "−"; }
.reference-copy { margin: 0 0 12px; color: var(--muted); }
.next-link { position: relative; display: flex; min-height: 58px; align-items: center; margin-top: 16px; padding: 12px 45px 12px 16px; border-radius: 16px; color: var(--ink); background: var(--blue-soft); font-weight: 750; text-decoration: none; }
.next-link::after { content: ""; position: absolute; right: 19px; width: 9px; height: 9px; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
.next-note { margin: 13px 0 0; color: var(--muted); font-size: 13px; }

.more { padding: 10px 0 44px; }
.more > h2 { margin: 0 0 4px; color: var(--muted); font-size: 17px; font-weight: 650; }
.info-details { border-bottom: 1px solid var(--line); }
.details-body { padding: 0 0 24px; color: var(--muted); }
.stats { width: 100%; border-collapse: collapse; color: var(--ink); font-size: 14px; }
.stats th, .stats td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.stats th:first-child, .stats td:first-child { text-align: left; }
.detail-note { margin-bottom: 0; font-size: 14px; }
.source-link { overflow-wrap: anywhere; }

.site-foot { padding: 28px 0; color: var(--muted); background: var(--canvas); font-size: 13px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.foot-links a { color: var(--ink); }
.site-foot p { margin: 0; }

@media (max-width: 520px) {
  .container { width: min(100% - 24px, 860px); }
  .topbar-inner { min-height: 62px; }
  .brand img { width: 164px; }
  .head-link { font-size: 12px; }
  .hero { padding: 27px 0 21px; }
  h1 { font-size: clamp(34px, 10.6vw, 43px); }
  .h1-line { display: block; }
  .lead { font-size: 15px; line-height: 1.7; }
  .tool-shell { padding: 18px 13px; border-radius: 20px; }
  .tool-shell h2 { font-size: clamp(21px, 6.4vw, 23px); white-space: nowrap; }
  .mode-buttons { gap: 7px; }
  .count-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .count-button { min-height: 52px; font-size: 14px; }
  .result { padding: 13px; }
  .result-main { padding: 20px 8px; }
  .result-amount strong { font-size: clamp(40px, 13vw, 54px); }
  .stats { font-size: 13px; }
  .stats th, .stats td { padding: 10px 5px; }
}

@media (max-width: 350px) {
  .container { width: min(100% - 20px, 860px); }
  .brand img { width: 150px; }
  .mode-button { font-size: 14px; }
  .result-amount strong { font-size: 39px; }
  .next-line { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mode-button, .count-button { transition: none; }
}
