/* 離婚準備ナビ — 共通スタイル（モバイルファースト） */

:root {
  --bg: #f4f8f9;
  --surface: #ffffff;
  --border: #dde6ea;
  --text: #22333b;
  --text-sub: #5b6f78;
  --primary: #2f7d8f;
  --primary-dark: #256374;
  --primary-soft: #e8f2f5;
  --accent: #3f8f6f;
  --accent-soft: #e9f4ef;
  --warn: #b26a2e;
  --warn-soft: #fdf2e6;
  --danger: #b1503f;
  --danger-soft: #fbeeeb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(34, 51, 59, .07), 0 6px 18px rgba(34, 51, 59, .05);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic", Meiryo, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
  overflow-wrap: anywhere;   /* 長いURLでも横スクロールを起こさない */
  word-break: normal;
  line-break: strict;
}

code {
  font-size: .92em;
  background: #eef3f5;
  border-radius: 4px;
  padding: 1px 5px;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

/* ---------- ヘッダー / フッター ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.site-header a.brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
}
.site-header .tagline {
  font-size: 12px;
  color: var(--text-sub);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 16px 48px;
  font-size: 14px;
  color: var(--text-sub);
}
.site-footer .inner { max-width: 640px; margin: 0 auto; }
.site-footer nav a {
  color: var(--primary-dark);
  margin-right: 16px;
  display: inline-block;
}

/* ---------- テキスト ---------- */

h1 { font-size: 26px; line-height: 1.45; margin: 28px 0 8px; }
h2 { font-size: 20px; line-height: 1.5; margin: 36px 0 10px; }
h3 { font-size: 17px; margin: 22px 0 6px; }
p  { margin: 10px 0; }
a  { color: var(--primary-dark); }

.lead { color: var(--text-sub); font-size: 15px; }
.small { font-size: 13px; color: var(--text-sub); line-height: 1.7; }
.note { font-size: 13px; color: var(--text-sub); margin-top: 6px; }

/* ---------- カード ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}

/* ---------- フォーム ---------- */

.step { margin: 22px 0 0; }
.step-label {
  display: block;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 4px;
}
.step-hint { font-size: 13px; color: var(--text-sub); margin: 0 0 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  min-height: 44px;
}
.chip[aria-pressed="true"] {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 700;
}

select, input[type="number"], input[type="text"] {
  font-family: inherit;
  font-size: 16px;
  padding: 11px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  width: 100%;
  min-height: 46px;
}
select:focus, input:focus, .chip:focus-visible, button:focus-visible {
  outline: 3px solid rgba(47, 125, 143, .35);
  outline-offset: 1px;
}

.field-row { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.field-row label { flex: 0 0 auto; font-size: 15px; min-width: 88px; }
.suffix { flex: 0 0 auto; font-size: 15px; color: var(--text-sub); }

.ages { margin-top: 10px; }
.ages:empty { display: none; }

.hidden { display: none !important; }

/* ---------- ボタン ---------- */

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  padding: 16px;
  min-height: 56px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn:hover { background: var(--primary-dark); }
.btn-secondary {
  background: var(--surface);
  color: var(--primary-dark);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary-soft); }

.btn-hero { font-size: 19px; padding: 18px; min-height: 62px; margin: 20px 0 6px; }

.link-btn {
  background: none;
  border: none;
  color: var(--primary-dark);
  font-family: inherit;
  font-size: 15px;
  padding: 8px 0;
  cursor: pointer;
  text-decoration: underline;
}
.invisible { visibility: hidden; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- A. ファーストビュー ---------- */

.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 12px 0 4px;
}
.trust-chips li {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid #c9dfe6;
  border-radius: 999px;
  padding: 5px 12px;
}
.trust-chips li::before { content: "✓ "; }

.how-it-works {
  list-style: none;
  counter-reset: none;
  padding: 0;
  margin: 22px 0;
  display: grid;
  gap: 8px;
}
.how-it-works li {
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.how-it-works .num {
  grid-row: 1 / 3;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.how-it-works strong { font-size: 16px; line-height: 1.4; }
.how-it-works .d { font-size: 13px; color: var(--text-sub); }

.neutrality {
  font-size: 14px;
  color: var(--text-sub);
  border-left: 3px solid var(--primary);
  padding-left: 12px;
  margin: 20px 0;
}

/* ---------- FAQ / アコーディオン ---------- */

details.faq, details.breakdown-acc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 8px 0;
  overflow: hidden;
}
details.faq > summary,
details.breakdown-acc > summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 42px 15px 16px;
  font-size: 16px;
  font-weight: 700;
  position: relative;
  min-height: 44px;
}
details.faq > summary::-webkit-details-marker,
details.breakdown-acc > summary::-webkit-details-marker { display: none; }
details.faq > summary::after,
details.breakdown-acc > summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .18s ease;
}
details[open].faq > summary::after,
details[open].breakdown-acc > summary::after {
  transform: translateY(-30%) rotate(225deg);
}
.faq-body, .acc-body {
  padding: 0 16px 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 15px;
}
.faq-body p, .acc-body p { margin: 8px 0; }
.acc-body h3:first-child { margin-top: 4px; }

details.breakdown-acc { margin: 16px 0; }

/* ---------- B. ウィザード ---------- */

.progress-wrap { margin: 20px 0 12px; }
.progress-track {
  height: 8px;
  background: #dfe9ed;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 25%;
  background: var(--primary);
  border-radius: 999px;
  transition: width .3s ease;
}
.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-sub);
  margin: 6px 0 0;
  font-weight: 700;
}
.progress-remain { color: var(--primary-dark); }

.wizard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px 14px;
  box-shadow: var(--shadow);
  min-height: 340px;
  display: flex;
  flex-direction: column;
}

.wq {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 4px;
}
.wq-hint { font-size: 14px; color: var(--text-sub); margin: 0 0 16px; }

.chips-lg .chip { flex: 1 1 auto; min-width: 68px; justify-content: center; }
.chips-col { flex-direction: column; }
.chips-col .chip { width: 100%; text-align: left; padding: 15px 18px; border-radius: 12px; }
.chip-wide { width: 100%; }

.sub-block { margin-top: 18px; }
.sub-label {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 8px;
}
.next-btn { margin-top: 16px; }

.wizard-foot {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.privacy-inline {
  font-size: 12px;
  color: var(--text-sub);
  margin: 0;
  text-align: right;
}
.privacy-inline::before { content: "🔒 "; }

/* ---------- C. レバー ---------- */

.lever {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.lever-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 4px;
  padding: 2px 9px;
}
.lever h3 { margin: 8px 0 6px; font-size: 18px; }
.lever p { font-size: 15px; }
.src-inline {
  font-size: 12px;
  color: var(--text-sub);
  border-left: 3px solid var(--border);
  padding-left: 10px;
  margin: 6px 0 12px;
}
.cta-inline { margin-top: 16px; background: var(--bg); }
.cta-inline h4 { margin: 0 0 4px; font-size: 15px; }

.gap-note {
  font-size: 15px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(34, 51, 59, .25);
}

.hero-caption { margin: 2px 0 0; font-size: 14px; }

.save-hint {
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
  margin: 18px 0;
}
.save-hint::before { content: "📷 "; }

.disclaimer-compact { font-size: 13px; padding: 12px 14px; }

/* ---------- 結果 ---------- */

.result-hero {
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  border: 1.5px solid var(--border);
  background: var(--surface);
}
.result-hero .verdict-label {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.result-hero .balance {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  margin: 4px 0;
  letter-spacing: -.01em;
}
.result-hero .balance-unit { font-size: 20px; font-weight: 700; }
.result-hero .verdict-msg { font-size: 15px; margin: 8px 0 0; }

.v-comfortable { border-color: var(--accent); background: var(--accent-soft); }
.v-comfortable .verdict-label { background: var(--accent); color: #fff; }
.v-comfortable .balance { color: #2c6b52; }

.v-tight { border-color: var(--warn); background: var(--warn-soft); }
.v-tight .verdict-label { background: var(--warn); color: #fff; }
.v-tight .balance { color: #8f5423; }

.v-shortage { border-color: var(--danger); background: var(--danger-soft); }
.v-shortage .verdict-label { background: var(--danger); color: #fff; }
.v-shortage .balance { color: #8e3f31; }

table.breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-top: 8px;
}
table.breakdown th, table.breakdown td {
  border-bottom: 1px solid var(--border);
  padding: 10px 4px;
  text-align: left;
  vertical-align: top;
}
table.breakdown td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.breakdown tr.total td, table.breakdown tr.total th {
  font-weight: 700;
  border-bottom: 2px solid var(--text-sub);
}
table.breakdown .src { display: block; font-size: 12px; color: var(--text-sub); font-weight: 400; }

.tag-approx {
  display: inline-block;
  font-size: 11px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* ---------- 免責 ---------- */

.disclaimer {
  background: #fffaf2;
  border: 1.5px solid #e6c99a;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
  margin: 18px 0;
}
.disclaimer strong { color: #8a5d1c; }

/* ---------- CTA ---------- */

.cta {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 34px 16px 16px;
  margin: 14px 0;
}
.cta .pr-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #6d7d85;
  background: #eef2f4;
  border: 1px solid #d8e1e5;
  border-radius: 4px;
  padding: 1px 7px;
}
.cta h3 { margin: 0 0 4px; font-size: 16px; }
.cta p { font-size: 14px; color: var(--text-sub); margin: 4px 0 12px; }
.cta .btn { font-size: 16px; min-height: 50px; padding: 13px; }

/* ---------- チェックリスト ---------- */

.checklist-group { margin: 24px 0; }
.checklist-group > h2 { margin-bottom: 4px; }
.checklist-group ul { list-style: none; padding: 0; margin: 10px 0 0; }
.checklist-group li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.checklist-group li strong { display: block; font-size: 16px; }
.checklist-group li span { font-size: 14px; color: var(--text-sub); }

/* ---------- 目次 / その他 ---------- */

ul.plain { padding-left: 1.2em; }
ul.plain li { margin: 6px 0; }

.src-list { font-size: 13px; color: var(--text-sub); padding-left: 1.2em; }
.src-list li { margin: 5px 0; word-break: break-all; }

@media (min-width: 600px) {
  body { font-size: 18px; }
  h1 { font-size: 30px; }
  .result-hero .balance { font-size: 48px; }
}
