/* 親子のはじめてノート - 共通スタイル
   外部フォント・外部ライブラリ不使用。スマホ表示優先の「読ませる」デザイン。
   図版はCSSとインラインSVG（HTML側）で構成する。 */
:root {
  --bg: #fdf8f1;
  --surface: #ffffff;
  --ink: #4a4038;
  --ink-soft: #7a6d60;
  --accent: #d97b4f;
  --accent-dark: #b85c33;
  --accent-soft: #fbeadd;
  --line: #eee0d0;
  --green: #7ba05b;
  --green-dark: #5d8140;
  --green-soft: #eef4e4;
  --amber: #e0a63f;
  --amber-soft: #fdf3dd;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(120, 84, 50, 0.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic", YuGothic, Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.01em;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; }
strong { color: #3d332a; }

/* ヘッダー */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 14px 18px 10px;
}
.site-title {
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.site-title a {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.site-title a:hover { text-decoration: none; }
.site-title a::before {
  content: "";
  flex: none;
  width: 30px;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4.5' y='3' width='15.5' height='18' rx='2.5' fill='%23d97b4f'/%3E%3Crect x='8.3' y='7.2' width='8' height='1.9' rx='0.95' fill='%23fff'/%3E%3Crect x='8.3' y='11.1' width='8' height='1.9' rx='0.95' fill='%23fff'/%3E%3Crect x='8.3' y='15' width='5' height='1.9' rx='0.95' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
}
.site-tagline {
  margin: 2px 0 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.88rem;
  padding-bottom: 6px;
}
.site-nav a { color: var(--ink-soft); }
.site-nav a.current { color: var(--accent-dark); font-weight: 700; }

/* 本文ラッパー */
main {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 18px 56px;
}
h1 {
  font-size: 1.55rem;
  line-height: 1.5;
  margin: 0 0 16px;
}
h2 {
  font-size: 1.28rem;
  line-height: 1.55;
  margin: 46px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-soft);
  scroll-margin-top: 16px;
}
h2 .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75em;
  height: 1.75em;
  margin-right: 0.45em;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.92em;
  font-weight: 700;
  vertical-align: 0.12em;
}
h3 {
  font-size: 1.08rem;
  margin: 30px 0 10px;
  padding-left: 10px;
  border-left: 4px solid var(--green);
  line-height: 1.6;
}
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 1.4em; }
li { margin-bottom: 7px; }
.lead { font-size: 1.04rem; }
.muted { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.75; }

/* ヒーロー（トップ） */
.hero {
  background: linear-gradient(160deg, #fdeeda 0%, var(--accent-soft) 60%, #f7e3d3 100%);
  border-radius: 20px;
  padding: 28px 22px 22px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}
.hero h1 { margin-bottom: 10px; font-size: 1.5rem; }
.hero p { margin-bottom: 0; }
.hero-art { margin-top: 18px; text-align: center; }
.hero-art svg { width: 100%; max-width: 430px; }

/* カードグリッド */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
@media (min-width: 600px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.card:hover { text-decoration: none; border-color: var(--accent); }
.card .card-title { font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; line-height: 1.55; }
.card .card-desc { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.65; }
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 11px;
}
.card-icon.green { background: var(--green-soft); }
.card-icon svg { width: 27px; height: 27px; }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 1px 9px;
  margin-left: 8px;
  vertical-align: middle;
}
.badge.soon { background: #c9b9a9; }
.badge.green { background: var(--green); }

/* 年代チップ */
.age-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.age-list a {
  display: inline-block;
  background: var(--green-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.9rem;
}
.age-list a:hover { text-decoration: none; background: #e2edd2; }

/* サイトの使い方（トップの3ステップ） */
.howto { display: grid; gap: 10px; margin-bottom: 8px; }
.howto-step {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.howto-num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.howto-step .howto-title { font-weight: 700; line-height: 1.5; }
.howto-step .howto-desc { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.65; }

/* ===== 記事コンポーネント ===== */

/* 結論サマリー */
.summary-box {
  background: linear-gradient(165deg, #fff6ec 0%, var(--accent-soft) 100%);
  border: 2px solid var(--accent);
  border-radius: 18px;
  padding: 20px 20px 8px;
  margin: 22px 0 26px;
  box-shadow: var(--shadow);
}
.summary-box .summary-label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 10px;
}
.summary-box .summary-lead { font-weight: 700; font-size: 1.05rem; line-height: 1.7; }
.summary-box ul { list-style: none; padding: 0; margin: 4px 0 10px; }
.summary-box li {
  position: relative;
  padding-left: 31px;
  margin-bottom: 9px;
  line-height: 1.7;
}
.summary-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 21px;
  height: 21px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10.5' fill='%237ba05b'/%3E%3Cpath d='M7.8 12.6l2.7 2.7 5.4-5.9' stroke='%23fff' stroke-width='2.3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 目次 */
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px 8px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}
.toc .toc-title { font-weight: 700; margin-bottom: 8px; }
.toc ol { padding-left: 1.5em; margin-bottom: 8px; }
.toc li { margin-bottom: 5px; line-height: 1.6; }

/* ポイントボックス */
.point-box {
  background: var(--green-soft);
  border-radius: var(--radius);
  padding: 16px 18px 4px;
  margin: 20px 0 22px;
}
.point-box .point-label {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 1px 11px;
  margin-bottom: 8px;
}
.point-box p:last-child { margin-bottom: 12px; }

/* 注意喚起コールアウト */
.callout-warn {
  background: var(--amber-soft);
  border: 1px solid #f0d9a0;
  border-left: 6px solid var(--amber);
  border-radius: 12px;
  padding: 14px 16px 2px 52px;
  margin: 20px 0 22px;
  position: relative;
  font-size: 0.95rem;
}
.callout-warn::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 15px;
  width: 26px;
  height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8L22.2 20.4H1.8z' fill='%23e0a63f'/%3E%3Crect x='11.05' y='9.2' width='1.9' height='5.9' rx='0.95' fill='%23fff'/%3E%3Ccircle cx='12' cy='17.6' r='1.25' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
}
.callout-warn p:last-child { margin-bottom: 12px; }

/* ステップフロー */
ol.steps {
  list-style: none;
  padding: 0;
  margin: 6px 0 22px;
  counter-reset: step;
}
ol.steps > li {
  counter-increment: step;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px 16px 13px 60px;
  margin-bottom: 12px;
  line-height: 1.75;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 15px;
  top: 15px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
ol.steps > li::after {
  content: "";
  position: absolute;
  left: 30px;
  bottom: -13px;
  width: 2px;
  height: 12px;
  background: var(--accent);
  opacity: 0.45;
}
ol.steps > li:last-child::after { display: none; }
ol.steps > li > ul { margin: 8px 0 4px; }
.step-note {
  background: var(--amber-soft);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* 図解：費用総額の考え方 */
.fig-total {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 20px 0 22px;
}
.fig-total .fig-title { font-weight: 700; margin-bottom: 12px; text-align: center; }
.fig-total .formula {
  display: flex;
  align-items: stretch;
  gap: 7px;
}
.fig-total .block {
  flex: 1;
  border-radius: 10px;
  padding: 11px 6px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fig-total .block small { font-weight: 400; font-size: 0.76rem; color: var(--ink-soft); }
.fig-total .block.body { background: var(--accent-soft); }
.fig-total .block.monthly { background: var(--green-soft); flex: 1.25; }
.fig-total .block.total { background: var(--accent); color: #fff; }
.fig-total .block.total small { color: #ffe9d9; }
.fig-total .op {
  align-self: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.fig-total .fig-caption { font-size: 0.84rem; color: var(--ink-soft); margin: 12px 0 0; line-height: 1.7; }
@media (max-width: 480px) {
  .fig-total .block { font-size: 0.8rem; padding: 9px 4px; }
  .fig-total .op { font-size: 1rem; }
}

/* 図解：フィルタリング3層 */
.fig-filter { margin: 20px 0 22px; }
.fig-filter .layer {
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 auto 8px;
  max-width: 520px;
  text-align: center;
  line-height: 1.6;
  box-shadow: var(--shadow);
}
.fig-filter .layer .layer-name { font-weight: 700; }
.fig-filter .layer .layer-desc { font-size: 0.84rem; color: var(--ink-soft); }
.fig-filter .layer.l1 { background: #fdeeda; border: 1.5px solid var(--accent); }
.fig-filter .layer.l2 { background: #fdf3dd; border: 1.5px solid var(--amber); }
.fig-filter .layer.l3 { background: var(--green-soft); border: 1.5px solid var(--green); }
.fig-filter .fig-caption { font-size: 0.84rem; color: var(--ink-soft); text-align: center; margin: 4px 0 0; }

/* 図解：3択の早見 */
.fig-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 20px 0 22px;
}
@media (min-width: 620px) {
  .fig-compare { grid-template-columns: 1fr 1fr 1fr; }
}
.fig-compare .opt {
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--surface);
}
.fig-compare .opt .opt-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.fig-compare .opt.a .opt-mark { background: var(--accent); }
.fig-compare .opt.b .opt-mark { background: #6d8ea8; }
.fig-compare .opt.c .opt-mark { background: var(--green); }
.fig-compare .opt .opt-name { font-weight: 700; line-height: 1.5; margin-bottom: 5px; }
.fig-compare .opt .opt-desc { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.65; }

/* 表（PC幅）／カード（スマホ幅） */
.table-wrap { margin: 0 0 20px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.65;
  background: var(--surface);
}
th, td {
  border: 1px solid var(--line);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}
thead th {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  line-height: 1.5;
}
tbody th {
  background: var(--accent-soft);
  font-weight: 700;
  width: 6.8em;
  line-height: 1.5;
}
.compare-cards { display: none; }
@media (max-width: 760px) {
  .table-wrap.responsive { display: none; }
  .compare-cards {
    display: grid;
    gap: 14px;
    margin: 0 0 20px;
  }
}
.opt-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 8px;
}
.opt-card.b { border-top-color: #6d8ea8; }
.opt-card.c { border-top-color: var(--green); }
.opt-card .opt-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.opt-card .opt-mark {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
}
.opt-card.b .opt-mark { background: #6d8ea8; }
.opt-card.c .opt-mark { background: var(--green); }
.opt-card .opt-card-title { font-weight: 700; line-height: 1.5; }
.opt-card dl { margin: 0; }
.opt-card .row {
  display: grid;
  grid-template-columns: 6.2em 1fr;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
  font-size: 0.9rem;
  line-height: 1.7;
}
.opt-card dt { font-weight: 700; color: var(--ink-soft); font-size: 0.84rem; padding-top: 0.15em; }
.opt-card dd { margin: 0; }

/* チェックリスト */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.checklist li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 11px 14px 11px 42px;
  position: relative;
  margin-bottom: 8px;
  line-height: 1.75;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 15px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: #fff;
}
.checklist-plain {
  background: var(--surface);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 18px 18px 8px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.checklist-plain .checklist li { box-shadow: none; background: #fdfcf9; }

/* テンプレ（pre） */
.template-wrap { margin: 0 0 20px; }
.template-head {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px 16px;
}
pre.template {
  background: #fffdf8;
  border: 1.5px dashed var(--accent);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 18px;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  font-family: inherit;
}

/* 失敗パターンのカード */
.pattern-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px 18px 4px;
  margin-bottom: 16px;
}
.pattern-card h3 {
  border-left: none;
  padding-left: 0;
  margin: 14px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pattern-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2em;
  height: 2em;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--amber-soft);
  border: 1.5px solid var(--amber);
  color: #8a6414;
  font-size: 0.82rem;
  font-weight: 700;
}

/* 注記ボックス */
.note {
  background: var(--green-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.8;
}
.note p:last-child { margin-bottom: 0; }
.pr-placeholder {
  color: #b3a695;
  font-size: 0.75rem;
  margin-bottom: 18px;
}

/* 出典 */
ul.sources {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 8px 2.2em;
  font-size: 0.88rem;
  line-height: 1.75;
  overflow-wrap: break-word;
}

/* 今後の記事リスト */
ul.soon-list { list-style: none; padding: 0; }
ul.soon-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  line-height: 1.65;
  box-shadow: var(--shadow);
}
ul.soon-list .soon-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  margin-right: 8px;
  vertical-align: middle;
}

/* 準備中ページ */
.coming-soon {
  background: var(--surface);
  border: 1.5px dashed #d8c8b4;
  border-radius: var(--radius);
  padding: 30px 22px 18px;
  text-align: center;
  color: var(--ink-soft);
}
.coming-soon::before {
  content: "";
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23c9b9a9' stroke-width='2'/%3E%3Cpath d='M12 7v5.2l3.4 2' stroke='%23c9b9a9' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* パンくず */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--ink-soft); }

/* フッター */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.site-footer .inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 18px 30px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 10px;
}
.site-footer a { color: var(--ink-soft); }
