/* ============================================================
   E-計算！ 共通スタイル（/assets/css/ek.css）
   Life・Insurance・Health の全ページで読み込む。2026-10-03 に life/css/style.css から移動。
   分野ごとの違いは <html data-section="…"> のアクセント色だけ（末尾の「分野の色」）。
   ============================================================ */

/* フォント（2026-10-05 表示速度の改善で変更）
   以前は Google Fonts を @import で Inter と Noto Sans JP を読んでいたが、
   日本語フォントが約45ファイル・約1MBあり、スマホでの最初の表示が9秒前後かかっていた（PageSpeed Insights）。
   ・日本語は端末のフォントを使う（iPhone・Mac はヒラギノ、Android は Noto 系、Windows は Yu Gothic UI・メイリオ）。
     下の font-family の "Noto Sans JP" は、端末に入っていれば使われるだけ（ダウンロードはしない）。
   ・数字と英字の Inter だけ自分のサーバーに置く（latin のみ・太さ可変の1ファイル 48KB）。
     Inter © The Inter Project Authors, SIL Open Font License 1.1（https://openfontlicense.org/）
     元ファイル：fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 基本トークン。値は末尾の新UI層（html[data-ui="v2"]）と同じ。
   2026-09-20 に全ページが v2 になったので、ここは v2 と同じ中立な値にしてある。
   （以前の「生成りの紙」調のトークンと、セクションごとの朱／藍の切り替えは廃止した） */
:root {
  color-scheme: light;
  --r: 10px;
  --page: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #1B2A41;
  --ink-2: #4A5568;
  --muted: #5F6B7A;
  --grid: #E6E9EE;
  --baseline: #D5DAE1;
  --line-strong: #8A96A6;
  --border: rgba(27, 42, 65, 0.08);
  /* series (charts) */
  --s1: #2B5785;  /* blue   */
  --s2: #D97A2B;  /* orange */
  --s3: #1E7B4C;  /* green  */
  --s4: #C99A00;  /* yellow */
  --good-text: #1E7B4C;
  --accent: #2B5785;
  --accent-ink: #FFFFFF;
  --accent-soft: #EAF1F8;
  --shadow: 0 1px 2px rgba(27, 42, 65, 0.04), 0 6px 20px rgba(27, 42, 65, 0.06);
  --tint-warn: #FFF4E5; --tint-warn-ink: #8A4B00;
  --tint-good: #EAF6EE;
  --marker: #FFEFB8;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0F1622; --surface: #172033;
    --ink: #E8EDF5; --ink-2: #B7C1D0; --muted: #8B97A8;
    --grid: #263042; --baseline: #33405A; --line-strong: #5B6A82;
    --border: rgba(232, 237, 245, 0.08);
    --s1: #7FB0E6; --s2: #E6935A; --s3: #6CCB8F; --s4: #E0B230;
    --good-text: #6CCB8F;
    --accent: #7FB0E6; --accent-ink: #0F1622; --accent-soft: rgba(127, 176, 230, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
    --tint-warn: #3A2A14; --tint-warn-ink: #F0C27A;
    --tint-good: #16301F;
    --marker: rgba(255, 214, 102, 0.28);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0F1622; --surface: #172033;
  --ink: #E8EDF5; --ink-2: #B7C1D0; --muted: #8B97A8;
  --grid: #263042; --baseline: #33405A; --line-strong: #5B6A82;
  --border: rgba(232, 237, 245, 0.08);
  --s1: #7FB0E6; --s2: #E6935A; --s3: #6CCB8F; --s4: #E0B230;
  --good-text: #6CCB8F;
  --accent: #7FB0E6; --accent-ink: #0F1622; --accent-soft: rgba(127, 176, 230, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
  --tint-warn: #3A2A14; --tint-warn-ink: #F0C27A;
  --tint-good: #16301F;
  --marker: rgba(255, 214, 102, 0.28);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}
.brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
}
.brand small {
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
  margin-left: 2px;
}
.header-nav {
  margin-left: auto;
  font-size: 13px;
}
.header-nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
}
.header-nav a:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- layout ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.page-title { margin: 6px 0 4px; font-size: 26px; line-height: 1.35; }
.page-lede { margin: 0 0 22px; color: var(--ink-2); font-size: 14px; max-width: 46em; }

/* 監修者・確認日をタイトル近くに1行で（出典の詳細はページ末尾へリンク） */
.byline { margin: -12px 0 20px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.byline a { color: var(--accent); }

.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- hero (index) ---------- */
.hero {
  padding: 30px 0 8px;
}
.hero h1 {
  font-size: clamp(26px, 4.6vw, 38px);
  line-height: 1.3;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.hero h1 .accent { color: var(--accent); }
.hero p {
  color: var(--ink-2);
  max-width: 44em;
  margin: 0 0 8px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.06em;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--grid);
}
.section-label .dot {
  width: 9px; height: 9px; border-radius: 50%;
}

/* ---------- card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.tool-card .icon {
  font-size: 22px;
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
}
.tool-card h3 { margin: 2px 0 0; font-size: 16px; }
.tool-card p { margin: 0; font-size: 13px; color: var(--ink-2); }
.tool-card .go {
  margin-top: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- tool page layout ---------- */
.tool-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) {
  .tool-layout { grid-template-columns: 1fr; }
}
/* グリッド項目の既定は min-width:auto なので、中身（入力欄の初期幅や
   white-space:nowrap の表）より狭くなれない。スマホでページ全体が
   画面幅を超えて横スクロールする原因になるため、縮めるよう明示する。 */
.tool-layout > * { min-width: 0; }

/* AdSense の自動広告は .tool-layout の直下にも要素を差し込むことがある。
   .tool-layout はグリッドなので、差し込まれた要素がそのままグリッド項目になり
   カラムを1つ占有してしまう（入力フォームが右にずれ、結果が2行目に落ちる）。
   861px 以上の2カラム時に顕在化し、iPad 横向きで崩れる原因になっていた。
   挿入位置に関係なく「全幅・最後の行」に追い出して、2カラムの配置を守る。 */
.tool-layout > ins,
.tool-layout > iframe,
.tool-layout > [class*="google"],
.tool-layout > [id*="google"] { grid-column: 1 / -1; }
/* ---------- 入力フォーム下のアフィリエイト枠 ---------- */
/* .tool-side は ek.js の OC.offerSide() が生成し、フォームと案件カードを包む */
.tool-side { min-width: 0; }
.offer-card {
  position: relative;
  display: block;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.offer-head { display: flex; align-items: center; gap: 8px; }
/* 広告であることが一目で分かるように（ステマ規制の「明瞭な表示」）、12px・コントラスト 4.5:1 以上 */
.offer-pr {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--ink-2);
  background: var(--surface);
  color: var(--ink);
}
.offer-title { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.offer-desc { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.8; }
.offer-cta {
  display: block;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.offer-cta:hover { filter: brightness(1.06); }
.offer-note { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; }
.offer-banner { display: block; margin-top: 10px; line-height: 0; text-align: center; }
.offer-banner img { max-width: 100%; height: auto; border-radius: 4px; }

/* PC では結果カラムが長いため、余白を活かして追従させる */
@media (min-width: 861px) {
  .tool-side { align-self: stretch; }
  .offer-card { position: sticky; top: 64px; }
}

.offer-placeholder {
  border-style: dashed;
  border-color: var(--baseline);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

/* フッターの「アフィリエイト広告を利用しています」表示 */
.ad-disclosure { display: block; margin-top: 6px; color: var(--muted); }

/* 横長の枠（OC.offerWide）。追従させない */
.offer-card.offer-wide { position: static; margin: 20px 0 0; padding: 12px 14px; }
.offer-wide .offer-banner { margin-top: 8px; }
/* スマホでは横長バナーの文字が読めない大きさになるので出さない（lazy の画像も読み込まれず、表示数も数えない） */
@media (max-width: 860px) { .offer-card.offer-wide { display: none; } }
/* スマホで結果の後ろに置いた枠 */
.offer-card.offer-after { grid-column: 1 / -1; }
@media print { .offer-card { display: none; } }

/* ---------- Google AdSense の枠（ek.js の OC.adsense） ---------- */
/* 広告が後から入っても下の文章がずれないよう、高さを先に取っておく */
.ek-ad { margin: 28px 0; text-align: center; }
.ek-ad-label { margin-bottom: 4px; font-size: 12px; color: var(--ink-2); text-align: left; }
.ek-ad ins.adsbygoogle { min-height: 250px; }
/* 配信がなかった枠は「広告」の文字ごと消す */
.ek-ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.ek-ad-placeholder > div:last-child {
  min-height: 250px;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--baseline); border-radius: 12px;
  color: var(--muted); font-size: 12px;
}
@media print { .ek-ad { display: none; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.panel + .panel { margin-top: 20px; }
.panel h2 {
  margin: 0 0 14px;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel h2::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- form ---------- */
.field { margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 6px; }

.input-unit {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.input-unit input[type="number"],
.input-unit input[type="text"],
.field select {
  width: 100%;
  /* input は width:100% でも既定の表示文字数ぶんの幅（約180px）より縮まないため、
     狭い画面で親を押し広げてしまう。0 を明示して画面幅に追従させる。 */
  min-width: 0;
  padding: 9px 12px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--page);
  border: 1px solid var(--baseline);
  border-radius: 9px;
  text-align: right;
}
.field select { text-align: left; }
/* 入力欄の枠は認識の手掛かりなので 3:1 以上の線色にする */
.field select, .input-unit input { border-color: var(--line-strong); }

.input-unit input:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
.input-unit .unit {
  flex: none;
  font-size: 13px;
  color: var(--ink-2);
  min-width: 2.4em;
}

.radio-row { display: flex; flex-wrap: wrap; gap: 6px; }
.radio-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 13.5px;
  border: 1px solid var(--baseline);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}
.radio-row label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 700;
}
.radio-row input { accent-color: var(--accent); margin: 0; }

.field-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-2col > * { min-width: 0; }

.btn-calc {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.2em;
}
.btn-calc:hover { filter: brightness(1.08); }

/* ---------- results ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.stat {
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.stat .label { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.stat .value { font-size: 22px; font-weight: 700; line-height: 1.3; margin-top: 2px; }
.stat .value small { font-size: 12px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
.stat .sub { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.stat.hero-stat { border-color: var(--accent); background: var(--accent-soft); }
.stat.hero-stat .value { font-size: 26px; color: var(--accent); }
.stat .value.good { color: var(--good-text); }

/* ---------- share ---------- */
/* 入口1: ヘッダー（タイトルバー）の共有ボタン。スクロールしても常に見える */
.header-share {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}
.header-share:hover { border-color: var(--accent); }
.header-share .ico { width: 14px; height: 14px; fill: currentColor; }

/* 入口2: 結果パネル内。数字を見た直後に押せる位置に置く */
.share-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--grid);
}
.share-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
  cursor: pointer;
}
.share-inline-btn:hover { background: var(--accent); color: var(--accent-ink); }
.share-inline-btn .ico { width: 15px; height: 15px; flex: none; fill: currentColor; }
.share-inline-hint { font-size: 12px; color: var(--muted); }

/* 共有シート: スマホは画面下から、PCは中央のダイアログ */
.share-sheet {
  padding: 0;
  border: none;
  background: transparent;
  max-width: 100%;
  max-height: 100%;
}
.share-sheet::backdrop { background: rgba(0, 0, 0, 0.45); }
.share-sheet-in {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  padding: 18px 18px 20px;
}
.share-sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.share-sheet-head h3 { margin: 0; font-size: 15.5px; color: var(--ink); }
.share-close {
  margin-left: auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font-size: 14px;
  color: var(--ink-2);
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
}
.share-close:hover { color: var(--ink); border-color: var(--baseline); }
.share-sheet .share-lead { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn.primary {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.share-btn.primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.share-btn.done { background: var(--good-text); border-color: var(--good-text); }
.share-btn .ico { width: 15px; height: 15px; flex: none; fill: currentColor; }
.share-url {
  width: 100%;
  min-width: 0;
  margin-top: 12px;
  padding: 8px 11px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 9px;
}

/* PC: 画面中央に出す */
@media (min-width: 561px) {
  .share-sheet { width: 460px; }
}

/* スマホ: 画面下からせり上がるシート。
   自動広告のアンカー広告と競合しないよう、常設の固定バーにはしない。 */
@media (max-width: 560px) {
  .share-sheet {
    width: 100%;
    margin: auto auto 0;     /* 下端に寄せる */
  }
  .share-sheet-in {
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
    animation: share-up 0.18s ease-out;
  }
  .share-btns .share-btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .share-btns .share-btn.primary { flex-basis: 100%; padding: 12px 14px; }
  .share-inline { flex-direction: column; align-items: stretch; }
  .share-inline-btn { justify-content: center; padding: 12px 16px; font-size: 14px; }
  .share-inline-hint { text-align: center; }
}
@keyframes share-up {
  from { transform: translateY(14px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- chart ---------- */
.chart-block { margin-top: 18px; }
.chart-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px; }
.chart-sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.chart-legend .chip { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend .swatch { width: 10px; height: 10px; border-radius: 3px; }
.chart-host { position: relative; width: 100%; }
.chart-host svg { display: block; width: 100%; height: auto; }
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
  z-index: 10;
  display: none;
}
.chart-tip .t-label { font-weight: 700; color: var(--ink-2); }
.chart-tip .t-row { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.chart-tip .swatch { width: 8px; height: 8px; border-radius: 2px; flex: none; }

/* ---------- table ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 10px;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.data th, table.data td {
  padding: 7px 12px;
  text-align: right;
  border-bottom: 1px solid var(--grid);
}
table.data th:first-child, table.data td:first-child { text-align: center; }
table.data thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--baseline);
  text-align: center;
}
table.data tbody tr:hover { background: var(--accent-soft); }
table.data tbody tr.year-row { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); font-weight: 700; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--baseline);
  border-bottom: none;
  background: var(--page);
}

/* ---------- 比較表 / 判定 ---------- */
/* 項目名の列・見出し行・偶数行に淡い色を敷いて、横に視線を追いやすくする。
   列数が2〜4と可変なので、特定の列だけを塗り分けることはしない。 */
table.data.compare th:first-child,
table.data.compare td:first-child {
  text-align: left;
  color: var(--ink);
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border-right: 1px solid var(--grid);
}
table.data.compare thead th {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--ink);
  font-weight: 700;
}
table.data.compare thead th:first-child {
  background: color-mix(in srgb, var(--accent) 24%, var(--surface));
}
table.data.compare tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--ink-2) 5%, var(--surface));
}
table.data.compare tbody tr:nth-child(even) td:first-child {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}
/* tr への背景指定は td の背景に隠れるため、hover と year-row は td 側で上書きする */
table.data.compare tbody tr.year-row td {
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
}
table.data.compare tbody tr:hover td {
  background: var(--accent-soft);
}
table.data.compare tbody tr:hover td:first-child {
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
}
table.data .diff-good { color: var(--good-text); font-weight: 700; }
table.data .diff-bad { color: var(--s2); font-weight: 700; }

/* 比較表は見出し列が長いので、狭い画面では折り返して収める。
   table.data の white-space:nowrap より詳細度が高いので、この1行だけで効く。
   560px の一括縮小より先にここが効かないと、560〜860px の帯だけ横スクロールになる。 */
@media (max-width: 700px) {
  table.data.compare { white-space: normal; }
}

.verdict {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-2);
}
.verdict strong { color: var(--ink); }
.verdict[hidden] { display: none; }
.verdict.warn {
  background: color-mix(in srgb, var(--s2) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--s2) 38%, var(--border));
}
.verdict .warn-title,
.verdict .info-title {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}
.verdict .warn-title { color: var(--s2); }
.verdict .info-title { color: var(--accent); }

.radio-row label:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }

/* ---------- シナリオの金利推移表示 ---------- */
.scenario-path {
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--page);
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.scenario-path .desc { display: block; color: var(--muted); font-size: 11.5px; }

details.detail-toggle { margin-top: 16px; }
details.detail-toggle summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  user-select: none;
}

/* ---------- misc ---------- */
.note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.8;
}
.note ul { margin: 4px 0 0; padding-left: 1.4em; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.site-footer .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 20px 30px;
  font-size: 12px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
/* フッターのサイト内リンク（common.js の OC.shell が描く） */
.site-footer .foot-nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 4px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px 24px;
}
.site-footer .foot-h { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.site-footer .foot-nav ul { list-style: none; margin: 0; padding: 0; }
.site-footer .foot-nav li { font-size: 12.5px; line-height: 1.5; margin: 0 0 7px; }
.site-footer .foot-nav a { text-decoration: none; }
.site-footer .foot-nav a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .foot-nav + .inner { border-top: 1px solid var(--grid); margin-top: 14px; }
@media (max-width: 860px) {
  .site-footer .foot-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .site-footer .foot-nav { padding: 22px 16px 0; gap: 16px 14px; }
}

.tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- スマホ ---------- */
/* iOS Safari は font-size が 16px 未満の入力欄をタップすると自動でズームし、
   戻らないため「画面からはみ出した」状態になる。入力系だけ 16px にして防ぐ。 */
@media (max-width: 560px) {
  .input-unit input[type="number"],
  .input-unit input[type="text"],
  .field select { font-size: 16px; }
}

/* ヘッダーは共有ボタンを足したぶん、狭い画面で要素を削って1行に収める。
   2行に折り返すと sticky ヘッダーが高くなり、本文の見える範囲が減るため。 */
@media (max-width: 560px) {
  .brand small { display: none; }
}
@media (max-width: 400px) {
  .brand { font-size: 14px; }
  .header-nav a { padding: 6px 6px; font-size: 12px; }
}
@media (max-width: 344px) {
  .header-share { padding: 7px 9px; }
  .header-share span { display: none; }   /* 最狭幅ではアイコンのみ */
}

/* 画面が狭いほど左右の余白が効いてくるので、本文に使える幅を広げる */
@media (max-width: 480px) {
  .wrap { padding: 20px 14px 48px; }
  .site-header .inner { padding: 10px 14px; }
  .site-footer .inner { padding: 22px 14px 30px; }
  .panel { padding: 16px 14px; }
  .page-title { font-size: 22px; }
  .page-lede { font-size: 13.5px; }
  /* 文字と余白を詰めて、列数の少ない比較表が横スクロールなしで収まるようにする */
  table.data { font-size: 12px; }
  table.data th, table.data td { padding: 7px 6px; }
  /* 比較表の折り返しは上の @media (max-width: 700px) で指定済み。
     償還表のような列数の多い表は従来どおり .table-scroll で横スクロールする。 */
  .field-2col { gap: 8px; }
  .input-unit { gap: 6px; }
  .input-unit .unit { font-size: 12px; min-width: 0; }
}

@media print {
  .site-header, .site-footer, .btn-calc, details.detail-toggle summary { display: none; }
  body { background: #fff; }
  .panel { box-shadow: none; }
}

/* ---------- 解説記事（.article / .faq / .link-grid ほか） ---------- */
/* 全ツールページ共通。以前は各ページの <style> に複製していたが、
   34ページで同一内容だったうえに差異が生じ始めたため共通化した。
   ページ固有の装飾はこれまでどおり各ページの <style> に書く（後勝ちで上書きできる）。 */
.article section.panel {
  margin-bottom: 20px;
}
/* 解説の部品（基本形）。見た目の仕上げは末尾の v2 層で行う
   .callout（point / warn / example）、.steps（h3 に番号）、.mk（強調）、.stat-row.lead-first */
.article h2 { font-size: 20px; margin: 0 0 12px; color: var(--ink); line-height: 1.4; font-weight: 700; }
.article h2::before { content: none; }
.article h3 { font-size: 16px; margin: 22px 0 6px; color: var(--ink); font-weight: 700; }
.article .steps { counter-reset: step; }
.callout { margin: 18px 0 8px; padding: 14px 18px; border-radius: var(--r); background: var(--accent-soft); color: var(--ink); font-size: 14.5px; line-height: 1.9; }
.callout .cl-title { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 4px; color: var(--accent); }
.callout strong, .callout b { color: inherit; }
.callout p { margin: 0; color: inherit; }
.callout p + p { margin-top: 6px; }
.callout ul, .callout ol { margin: 4px 0 0; padding-left: 1.3em; }
.callout a { color: inherit; text-decoration: underline; }
.callout.warn { background: var(--tint-warn); }
.callout.warn .cl-title { color: var(--tint-warn-ink); }
.callout.example { background: var(--tint-good); }
.callout.example .cl-title { color: var(--good-text); }
.mk { font-weight: 600; color: var(--ink); padding: 1px 4px; border-radius: 4px; background: var(--marker); }
.article .stat-row { margin: 14px 0 16px; }
.article .stat-row.lead-first { grid-template-columns: 1fr 1fr; }
.article .stat-row.lead-first > .stat:first-child { grid-column: 1 / -1; }
.article .table-scroll { background: var(--surface); }
.article table.data { background: var(--surface); }
.article p, .article li {
  font-size: 15.5px; color: var(--ink-2); line-height: 1.9;
}
.article ul, .article ol {
  padding-left: 1.4em; margin: 0 0 12px;
}
.article table.data {
  white-space: normal;
}
.faq details {
  border-bottom: 1px solid var(--grid); padding: 12px 0;
}
.faq details:last-child {
  border-bottom: none;
}
.faq summary {
  font-size: 14.5px; font-weight: 700; cursor: pointer; color: var(--ink);
}
.faq .a {
  font-size: 13.5px; color: var(--ink-2); line-height: 1.9; margin-top: 8px;
}
.link-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px;
}
.link-grid a {
  display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px;
  text-decoration: none; color: var(--ink); background: var(--page);
}
.link-grid a:hover {
  border-color: var(--accent);
}
.link-grid .t {
  font-size: 13.5px; font-weight: 700; display: block;
}
.link-grid .d {
  font-size: 12px; color: var(--ink-2); line-height: 1.7; display: block;
}
.prosncons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px;
}
.pc-card {
  border-radius: 12px; padding: 16px 18px; border: 1px solid var(--border);
}
.pc-card h3 {
  margin-top: 0;
}
.pc-card.pro {
  background: color-mix(in srgb, var(--s3) 8%, var(--surface));
}
.pc-card.pro h3 {
  color: var(--good-text);
}
.pc-card.con {
  background: color-mix(in srgb, var(--s2) 8%, var(--surface));
}
.pc-card.con h3 {
  color: var(--s2);
}
.hist td:first-child {
  white-space: nowrap;
}
.hist-now, .hist-end, .hist-soon {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px;
  border-radius: 999px; margin-right: 6px; white-space: nowrap;
}
.hist-now {
  background: color-mix(in srgb, var(--s3) 18%, var(--surface)); color: var(--good-text);
}
.hist-end {
  background: color-mix(in srgb, var(--s2) 16%, var(--surface)); color: var(--s2);
}
.hist-soon {
  background: color-mix(in srgb, var(--s4) 22%, var(--surface)); color: var(--ink-2);
}
@media (max-width: 600px) {
  .prosncons { grid-template-columns: 1fr; }
}

/* ---------- スライダー入力（割合の調整などに使う） ---------- */
input[type="range"] {
  width: 100%; accent-color: var(--accent); height: 6px; cursor: pointer; margin: 10px 0 4px;
}
.range-label {
  display: flex; justify-content: space-between; font-size: 13px; font-weight: 700;
}
.range-label .val {
  color: var(--accent);
}

/* ---------- トップページ：検索・目的から探す・分類ナビ・コンパクトカード ----------
   一覧が40本を超えて探しにくくなったため、2026-09-08 にトップを再構成した。
   一覧の HTML は documents/build-index.js が生成する（分類は documents/index-taxonomy.js）。 */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tool-search { margin: 18px 0 4px; max-width: 640px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 4px 14px;
  background: var(--surface); border: 1px solid var(--baseline); border-radius: 999px;
  box-shadow: var(--shadow);
}
.search-box:focus-within { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.search-box .ico { width: 18px; height: 18px; fill: var(--muted); flex: none; }
.search-box input {
  flex: 1; min-width: 0; padding: 10px 4px; font-size: 16px; font-family: inherit;
  color: var(--ink); background: transparent; border: none; outline: none;
}
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--page); color: var(--ink-2); font-size: 13px; cursor: pointer;
}
.search-clear[hidden] { display: none; }
.search-hints { margin: 10px 0 0 6px; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.search-hints button {
  font: inherit; font-size: 12px; color: var(--accent); background: var(--accent-soft);
  border: 1px solid transparent; border-radius: 999px; padding: 4px 10px; cursor: pointer;
}
.search-hints button:hover { border-color: var(--accent); }
.search-results[hidden], #catalog[hidden] { display: none; }
.section-label .count, .all-count {
  margin-left: 4px; font-size: 11.5px; font-weight: 700; color: var(--muted);
  background: var(--page); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px;
}

/* 目的から探す */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.event {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px 12px; box-shadow: var(--shadow);
}
.event-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; margin-bottom: 8px; }
.event .ev-icon {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); font-size: 17px; flex: none;
}
.event ul { list-style: none; margin: 0; padding: 0; }
.event li { font-size: 13px; line-height: 1.5; padding: 4px 0; border-top: 1px dashed var(--grid); }
.event li:first-child { border-top: none; }
.event li a { color: var(--ink-2); text-decoration: none; display: block; }
.event li a::before { content: "›"; color: var(--accent); margin-right: 6px; font-weight: 700; }
.event li a:hover { color: var(--accent); }

/* 分類ナビ（ヘッダーの下に追従） */
.cat-nav {
  position: sticky; top: 49px; z-index: 40;
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  margin: 30px -20px 4px; padding: 8px 20px;
  background: color-mix(in srgb, var(--page) 90%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a {
  flex: none; font-size: 12.5px; font-weight: 700; color: var(--ink-2); text-decoration: none;
  padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  white-space: nowrap;
}
.cat-nav a:hover, .cat-nav a.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.all-label { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 -14px; }
.all-label h2 { margin: 0; font-size: 20px; }
.tool-group { scroll-margin-top: 38px; }   /* html の scroll-padding-top 72px と足して 110px（固定ヘッダー＋分類バーの下） */
.group-blurb { margin: -6px 0 12px; font-size: 12.5px; color: var(--muted); }

/* コンパクトなカード：アイコン＋タイトル＋1行説明を横並びにして密度を上げる */
.card-grid.compact { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.card-grid.compact .tool-card { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 14px; }
.card-grid.compact .tool-card .icon { width: 36px; height: 36px; font-size: 19px; flex: none; }
.card-grid.compact .tool-card .body { min-width: 0; }
.card-grid.compact .tool-card h3 { margin: 0; font-size: 14.5px; line-height: 1.4; }
.card-grid.compact .tool-card p {
  margin: 3px 0 0; font-size: 12px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 480px) {
  .cat-nav { margin: 24px -14px 4px; padding: 8px 14px; top: 47px; }
  .card-grid.compact { grid-template-columns: 1fr; }
  .search-hints { display: none; }
}


/* ============================================================
   新UI層（2026）— html[data-ui="v2"] を付けたページだけに効く
   方針：白ベース＋濃紺の文字＋ブルー1色＋大きな数字＋余白多め＋説明は必要なときだけ展開。
   角丸は --r（10px）に統一。枠線は原則なし（影と薄い区切り線だけ）。
   移行：ページの <html> に data-ui="v2" を付けると切り替わる。付けないページは従来のまま。
   ============================================================ */
html[data-ui="v2"] {
  --r: 10px;
  --page: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #1B2A41;
  --ink-2: #4A5568;
  --muted: #5F6B7A;          /* #F7F8FA の上で 5.2:1 */
  --grid: #E6E9EE;
  --baseline: #D5DAE1;
  --line-strong: #8A96A6;    /* 入力欄の枠。白の上で 3:1 */
  --border: rgba(27, 42, 65, 0.08);
  --accent: #2B5785;         /* ブランドの青（1色） */
  --accent-ink: #FFFFFF;
  --accent-soft: #EAF1F8;
  --good-text: #1E7B4C;
  --s1: #2B5785; --s2: #D97A2B; --s3: #1E7B4C; --s4: #C99A00;
  --shadow: 0 1px 2px rgba(27, 42, 65, 0.04), 0 6px 20px rgba(27, 42, 65, 0.06);
  --tint-warn: #FFF4E5; --tint-warn-ink: #8A4B00;
  --tint-good: #EAF6EE;
  --marker: #FFEFB8;
  --font-round: inherit;
  --sec-insurance: #2B5785;
}
@media (prefers-color-scheme: dark) {
  html[data-ui="v2"]:where(:not([data-theme="light"])) {
    --page: #0F1622; --surface: #172033;
    --ink: #E8EDF5; --ink-2: #B7C1D0; --muted: #8B97A8;
    --grid: #263042; --baseline: #33405A; --line-strong: #5B6A82;
    --border: rgba(232, 237, 245, 0.08);
    --accent: #7FB0E6; --accent-ink: #0F1622; --accent-soft: rgba(127, 176, 230, 0.14);
    --good-text: #6CCB8F;
    --s1: #7FB0E6; --s2: #E6935A; --s3: #6CCB8F; --s4: #E0B230;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
    --tint-warn: #3A2A14; --tint-warn-ink: #F0C27A;
    --tint-good: #16301F;
    --marker: rgba(255, 214, 102, 0.28);
    --sec-insurance: #7FB0E6;
  }
}
html[data-ui="v2"][data-theme="dark"] {
  --page: #0F1622; --surface: #172033;
  --ink: #E8EDF5; --ink-2: #B7C1D0; --muted: #8B97A8;
  --grid: #263042; --baseline: #33405A; --line-strong: #5B6A82;
  --border: rgba(232, 237, 245, 0.08);
  --accent: #7FB0E6; --accent-ink: #0F1622; --accent-soft: rgba(127, 176, 230, 0.14);
  --good-text: #6CCB8F;
  --s1: #7FB0E6; --s2: #E6935A; --s3: #6CCB8F; --s4: #E0B230;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
  --tint-warn: #3A2A14; --tint-warn-ink: #F0C27A;
  --tint-good: #16301F;
  --marker: rgba(255, 214, 102, 0.28);
  --sec-insurance: #7FB0E6;
}

/* ---- 書体・基本 ---- */
html[data-ui="v2"] body {
  font-family: Inter, "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  font-feature-settings: "palt";
}
html[data-ui="v2"] :is(h1, h2, h3, .page-title, .brand, .panel h2, .stat .value, .callout .cl-title) { font-family: inherit; }
html[data-ui="v2"] .page-title { font-size: 26px; letter-spacing: -0.01em; margin: 8px 0 8px; }
html[data-ui="v2"] .page-lede { font-size: 14.5px; margin-bottom: 8px; }
html[data-ui="v2"] .byline { margin: 0 0 26px; font-size: 12.5px; color: var(--muted); }
html[data-ui="v2"] .breadcrumb { margin-top: 26px; }

/* ---- ヘッダー／フッター ---- */
html[data-ui="v2"] .site-header { background: var(--surface); border-bottom: 1px solid var(--grid); backdrop-filter: none; }
html[data-ui="v2"] .site-header .inner { height: 56px; padding-top: 0; padding-bottom: 0; }
html[data-ui="v2"] .brand .mark { border-radius: 8px; font-weight: 700; }
html[data-ui="v2"] .header-nav a { font-weight: 500; }
html[data-ui="v2"] .header-share { border-radius: 999px; }
html[data-ui="v2"] .site-footer { border-top: 1px solid var(--grid); }

/* ---- カード（パネル）。枠線をやめて影だけ ---- */
html[data-ui="v2"] .panel { border: 0; border-radius: var(--r); box-shadow: var(--shadow); padding: 22px 22px 20px; background: var(--surface); }
html[data-ui="v2"] .panel + .panel { margin-top: 16px; }
html[data-ui="v2"] .panel h2 { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: 0; margin: 0 0 12px; display: block; }
html[data-ui="v2"] .panel h2::before { content: none; }
html[data-ui="v2"] form.panel > h2 { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 16px; }
html[data-ui="v2"] .tool-layout { gap: 24px; }
html[data-ui="v2"] .offer-placeholder { border: 1px dashed var(--baseline); box-shadow: none; }

/* ---- 入力：ラベル → 入力 → 必要なら補足 ---- */
html[data-ui="v2"] .field { margin-bottom: 18px; }
html[data-ui="v2"] .field > label { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
html[data-ui="v2"] .field .hint { display: block; margin: 3px 0 0; font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.6; }
html[data-ui="v2"] .input-unit input[type="number"], html[data-ui="v2"] .input-unit input[type="text"], html[data-ui="v2"] .field select {
  height: 44px; padding: 0 12px; font-size: 15px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
}
html[data-ui="v2"] .field select { padding-right: 32px; }
html[data-ui="v2"] .input-unit .unit { font-size: 13px; color: var(--muted); }
html[data-ui="v2"] .input-unit input:focus, html[data-ui="v2"] .field select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
/* ラジオはセグメント。チェックボックス1つのときは軽いチップ */
html[data-ui="v2"] .radio-row { gap: 2px; background: var(--page); border-radius: var(--r); padding: 3px; }
html[data-ui="v2"] .radio-row label { flex: 1 1 0; justify-content: center; padding: 9px 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); border: 0; border-radius: 8px; }
html[data-ui="v2"] .radio-row label:has(input:checked) { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(27, 42, 65, 0.10); }
html[data-ui="v2"] .radio-row input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
html[data-ui="v2"] .radio-row:has(input[type="checkbox"]) { background: transparent; padding: 0; }
html[data-ui="v2"] .radio-row:has(input[type="checkbox"]) label { flex: 0 1 auto; justify-content: flex-start; gap: 8px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--r); }
html[data-ui="v2"] .radio-row:has(input[type="checkbox"]) label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: none; }
html[data-ui="v2"] .note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
html[data-ui="v2"] .btn-calc { height: 48px; padding: 0; margin-top: 8px; font-size: 15px; letter-spacing: 0.04em; border-radius: var(--r); }
html[data-ui="v2"] .btn-calc:hover { filter: brightness(1.06); }

/* ---- 結果：主役の数字カード ---- */
html[data-ui="v2"] .res-hero .k { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
html[data-ui="v2"] .res-hero .big { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
html[data-ui="v2"] .res-hero .big b { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
html[data-ui="v2"] .res-hero .big span { font-size: 16px; color: var(--ink-2); font-weight: 500; }
html[data-ui="v2"] .res-hero .sub { font-size: 14px; color: var(--ink-2); }
html[data-ui="v2"] .res-hero .sub b { color: var(--ink); font-weight: 600; }
html[data-ui="v2"] .res-hero .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
html[data-ui="v2"] .res-hero .tags span { font-size: 12.5px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
html[data-ui="v2"] .res-mini { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--grid); margin-top: 18px; padding-top: 14px; }
html[data-ui="v2"] .res-mini > div { padding: 0 8px; min-width: 0; }
html[data-ui="v2"] .res-mini > div:first-child { padding-left: 0; }
html[data-ui="v2"] .res-mini > div + div { border-left: 1px solid var(--grid); padding-left: 14px; }
html[data-ui="v2"] .res-mini .k { font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1.4; }
html[data-ui="v2"] .res-mini .v { font-size: 17px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; color: var(--ink); }
html[data-ui="v2"] .res-mini .v small { font-size: 11.5px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
html[data-ui="v2"] .res-mini .v.good { color: var(--good-text); }
html[data-ui="v2"] details.why { margin-top: 16px; border-top: 1px solid var(--grid); padding-top: 12px; }
html[data-ui="v2"] details.why > summary { list-style: none; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 8px; user-select: none; }
html[data-ui="v2"] details.why > summary::-webkit-details-marker { display: none; }
html[data-ui="v2"] details.why > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform 0.15s; margin-left: 2px; }
html[data-ui="v2"] details.why[open] > summary::before { transform: rotate(45deg); }
html[data-ui="v2"] .formula { margin-top: 12px; padding: 12px 14px; border: 0; border-radius: var(--r); background: var(--page); font-size: 13px; line-height: 1.9; }
html[data-ui="v2"] .formula .ttl { font-size: 11.5px; }
html[data-ui="v2"] .formula .sum { border-top: 1px solid var(--grid); }
html[data-ui="v2"] .verdict { border: 0; border-radius: var(--r); background: var(--accent-soft); font-size: 13px; }
html[data-ui="v2"] .verdict.warn { background: var(--tint-warn); color: var(--ink-2); }
html[data-ui="v2"] .verdict.warn .warn-title { color: var(--tint-warn-ink); }
html[data-ui="v2"] .verdict .info-title { color: var(--accent); }
html[data-ui="v2"] .share-btn { border-radius: var(--r); background: var(--page); border: 0; font-weight: 600; }
html[data-ui="v2"] .share-btn.primary { background: var(--accent); color: var(--accent-ink); }
html[data-ui="v2"] .share-inline-hint, html[data-ui="v2"] .share-url { font-size: 12.5px; }

/* ---- 数字タイル（結果の副次パネルで使う） ---- */
html[data-ui="v2"] .stat { border: 0; border-radius: var(--r); background: var(--page); padding: 12px 14px; }
html[data-ui="v2"] .stat .label { font-size: 11.5px; font-weight: 600; }
html[data-ui="v2"] .stat .value { font-size: 20px; letter-spacing: -0.01em; }
html[data-ui="v2"] .stat.hero-stat { background: var(--accent-soft); }

/* ---- 表：薄い区切り線だけ ---- */
html[data-ui="v2"] table.data { font-size: 13.5px; }
html[data-ui="v2"] table.data th, html[data-ui="v2"] table.data td { padding: 9px 10px; border-bottom: 1px solid var(--grid); }
html[data-ui="v2"] table.data thead th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--grid); }
html[data-ui="v2"] table.data tbody tr:hover { background: var(--page); }
html[data-ui="v2"] table.data tbody tr.hit td { color: var(--accent); font-weight: 700; background: transparent; }
html[data-ui="v2"] table.data tbody tr.hit td.pn { background-color: var(--surface); background-image: none; }
html[data-ui="v2"] .table-scroll { border: 0; border-radius: var(--r); background: var(--surface); margin-top: 8px; }
html[data-ui="v2"] table.data.compare thead th { background: var(--page); color: var(--ink-2); font-weight: 600; }
html[data-ui="v2"] table.data.compare thead th:first-child { background: var(--page); }
html[data-ui="v2"] table.data.compare th:first-child, html[data-ui="v2"] table.data.compare td:first-child { background: transparent; border-right: 0; font-weight: 600; }
html[data-ui="v2"] table.data.compare tbody tr:nth-child(even) td { background: transparent; }
html[data-ui="v2"] table.data.compare tbody tr:hover td { background: var(--page); }
html[data-ui="v2"] .t-good { color: var(--good-text); }

/* ---- 解説：カードなし、余白で区切る ---- */
/* 解説もツール部分と同じ幅・同じ白いカードに載せる。見出しの飾りだけ外す */
html[data-ui="v2"] .article { max-width: none; margin-top: 32px; }
html[data-ui="v2"] .article section.panel { background: var(--surface); border: 0; box-shadow: var(--shadow); border-radius: var(--r); padding: 26px 26px 22px; margin: 0 0 16px; }
html[data-ui="v2"] .article h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 12px; line-height: 1.4; }
html[data-ui="v2"] .article > p.note, html[data-ui="v2"] .article > .note { max-width: none; }
html[data-ui="v2"] .article h2::after, html[data-ui="v2"] .article h2::before { content: none; display: none; }
html[data-ui="v2"] .article h3 { font-size: 16px; margin: 24px 0 6px; display: block; }
html[data-ui="v2"] .article h3::before { content: none; }
html[data-ui="v2"] .article p, html[data-ui="v2"] .article li { font-size: 15.5px; line-height: 1.9; color: var(--ink-2); }
html[data-ui="v2"] .article strong { color: var(--ink); font-weight: 600; }
html[data-ui="v2"] .article .steps h3 { display: flex; align-items: center; gap: 10px; }
html[data-ui="v2"] .article .steps h3::before {
  content: counter(step); counter-increment: step; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 700; line-height: 1;
}
html[data-ui="v2"] .callout { margin: 18px 0 8px; padding: 14px 18px; border-radius: var(--r); box-shadow: none; transform: none; background: var(--accent-soft); color: var(--ink); font-size: 14.5px; }
html[data-ui="v2"] .callout::before { display: none; }
html[data-ui="v2"] .callout .cl-title { font-size: 12px; letter-spacing: 0.06em; color: var(--accent); }
html[data-ui="v2"] .callout .cl-title::before { content: none; }
html[data-ui="v2"] .callout p, html[data-ui="v2"] .article .callout p, html[data-ui="v2"] .article .callout li { font-size: 14.5px; color: var(--ink); }
html[data-ui="v2"] .callout.warn { background: var(--tint-warn); }
html[data-ui="v2"] .callout.warn .cl-title { color: var(--tint-warn-ink); }
html[data-ui="v2"] .callout.example { background: var(--tint-good); }
html[data-ui="v2"] .callout.example .cl-title { color: var(--good-text); }
html[data-ui="v2"] .mk { background: var(--marker); padding: 1px 4px; border-radius: 4px; font-weight: 600; }
html[data-ui="v2"] .article .stat { background: var(--surface); box-shadow: var(--shadow); border: 0; }
html[data-ui="v2"] .article .stat .value { color: var(--ink); }
html[data-ui="v2"] .article .table-scroll { box-shadow: var(--shadow); margin: 10px 0 14px; }
html[data-ui="v2"] .article table.data { background: var(--surface); }
html[data-ui="v2"] .faq details { border-bottom: 1px solid var(--grid); padding: 14px 0; }
html[data-ui="v2"] .faq summary { font-size: 15px; font-weight: 600; }
html[data-ui="v2"] .faq .a { font-size: 14.5px; }
html[data-ui="v2"] .link-grid a { border: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r); }
html[data-ui="v2"] .link-grid a:hover { box-shadow: 0 0 0 2px var(--accent) inset; }

/* ---- 一覧（カード・見出し） ---- */
html[data-ui="v2"] .tool-card { border: 0; border-radius: var(--r); box-shadow: var(--shadow); }
html[data-ui="v2"] .tool-card:hover { box-shadow: 0 0 0 2px var(--accent) inset, var(--shadow); transform: none; }
html[data-ui="v2"] .tool-card .icon { border-radius: 8px; }
html[data-ui="v2"] .tool-card[href*="insurance/"] h3::after { content: none; }
html[data-ui="v2"] .tool-card[href*="insurance/"] .icon { background: var(--accent-soft); }
html[data-ui="v2"] .section-label { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
html[data-ui="v2"] .section-label::after { background: var(--grid); }
html[data-ui="v2"] .tag { border-radius: 999px; }

@media (max-width: 560px) {
  html[data-ui="v2"] .panel { padding: 18px 16px 16px; }
  html[data-ui="v2"] .article section.panel { padding: 20px 16px 18px; }
  html[data-ui="v2"] .res-hero .big b { font-size: 40px; }
  html[data-ui="v2"] .res-mini > div + div { padding-left: 10px; }
  html[data-ui="v2"] .res-mini > div { padding-right: 4px; }
}

/* ---- v2：シナリオの金利推移・グラフ見出し・折りたたみ ---- */
html[data-ui="v2"] .scenario-path { border: 0; border-radius: var(--r); background: var(--page); font-size: 12.5px; }
html[data-ui="v2"] .chart-title { font-size: 13px; font-weight: 600; color: var(--ink); }
html[data-ui="v2"] details.detail-toggle summary { font-weight: 600; }
html[data-ui="v2"] .field-2col { gap: 12px; }
/* ---- v2：選択肢が4つ以上のラジオはセグメントでなくチップ（折り返し）にする ---- */
html[data-ui="v2"] .radio-row:has(> label:nth-child(4)) { background: transparent; padding: 0; gap: 6px; }
html[data-ui="v2"] .radio-row:has(> label:nth-child(4)) label { flex: 0 1 auto; padding: 8px 12px; background: var(--page); border-radius: var(--r); font-size: 13.5px; }
html[data-ui="v2"] .radio-row:has(> label:nth-child(4)) label:has(input:checked) { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
/* 2列の入力は、補足文の長さが違っても入力欄の下端を揃える */
html[data-ui="v2"] .field-2col { align-items: end; }
html[data-ui="v2"] .field-2col > .field { margin-bottom: 18px; }
/* 3分割の補足行 */
html[data-ui="v2"] .res-mini .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
/* ---- v2：追加計算（planning）ページの見出し・グループ ---- */
html[data-ui="v2"] .planning-title { border-top: 1px solid var(--grid); padding-top: 32px; margin-top: 44px; font-size: 22px; letter-spacing: -0.01em; }
html[data-ui="v2"] .planning-group legend { border-top: 1px solid var(--grid); padding-top: 16px; margin: 22px 0 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); }
html[data-ui="v2"] .planning-group:first-of-type legend { border-top: 0; padding-top: 0; margin-top: 4px; }
html[data-ui="v2"] .planning-import { font-size: 13px; text-decoration: none; font-weight: 600; }
html[data-ui="v2"] .planning-tool .panel > h2 { font-size: 14px; }
/* ---- v2：common.js が組み替えた結果行（.stat-row[data-v2-hero]）の見た目 ---- */
html[data-ui="v2"] .stat-row[data-v2-hero] { display: block; margin-bottom: 0; }
html[data-ui="v2"] .stat-row.v2-rest { display: grid; margin-top: 16px; }
html[data-ui="v2"] .res-hero .big b small { font-size: 16px; font-weight: 500; color: var(--ink-2); margin-left: 4px; }
html[data-ui="v2"] .res-hero .big b.good { color: var(--good-text); }
html[data-ui="v2"] .res-hero .big b.text { font-size: 26px; }
html[data-ui="v2"] .res-mini .v.text { font-size: 15px; line-height: 1.4; }
html[data-ui="v2"] .res-mini .v small { font-size: 11.5px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
/* 組み替えた結果行の直前にある「シミュレーション結果」などの見出しは、主役のラベルと重複するので消す */
html[data-ui="v2"] .panel > h2:has(+ .stat-row[data-v2-hero]) { display: none; }
html[data-ui="v2"] .stat-row[data-v2-hero] + .verdict { margin-top: 16px; }

/* ヘッダーの「E-計算！トップ」：狭い画面では「トップ」だけにして、ブランド名の折り返しを防ぐ */
@media (max-width: 560px) {
  .header-nav .nav-long, .header-nav .nav-wide { display: none; }
}
@media (max-width: 430px) {
  /* トップへのリンクが増えた分、共有ボタンはアイコンだけにしてヘッダーを1行に収める */
  .header-share { padding: 7px 9px; }
  .header-share span { display: none; }
}

/* ============================================================
   E-計算！ 共通ヘッダー（2026-10-03〜）
   tools/build-shell.js が各ページの <body> 直後に静的に書き出す。
   ロゴ「e＝」と E-計算！ の色はトップ（assets/css/home.css）と同じ。分野名だけ分野のアクセント色。
   ============================================================ */
/* 新UI（v2）になっていないページ（life/souzoku/ など）でも、ヘッダーは同じ書体・字詰めにする */
.ek-header { font-family: Inter, "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif; font-feature-settings: "palt"; }
.ek-header .inner { gap: 10px; }
.ek-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #123d32; font-weight: 800; font-size: 18px; letter-spacing: -0.5px; white-space: nowrap; }
.ek-icon { width: 30px; height: 30px; border-radius: 8px; background: #123d32; color: #d7f58a; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600; line-height: 1; flex: none; }
.ek-icon span { font-size: 11px; margin-left: 1px; }
.ek-bang { color: #4a7955; }
.ek-sep { color: var(--muted); margin: 0 -2px; }
.ek-sec { color: var(--accent); font-weight: 700; font-size: 16px; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; }
.ek-header .header-nav { display: flex; align-items: center; gap: 2px; }
.ek-header .header-nav .ek-sw[aria-current] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .ek-brand { color: var(--ink); }
  :root:where(:not([data-theme="light"])) .ek-bang { color: #d7f58a; }
}
:root[data-theme="dark"] .ek-brand { color: var(--ink); }
:root[data-theme="dark"] .ek-bang { color: #d7f58a; }
/* 狭い画面：分野の切り替えは隠し（フッターとトップからたどれる）、ロゴ・分野名・共有ボタンを1行に */
@media (max-width: 600px) {
  .ek-header .header-nav .ek-sw { display: none; }
  .ek-brand { font-size: 16px; gap: 7px; }
  .ek-icon { width: 26px; height: 26px; font-size: 21px; }
  .ek-icon span { font-size: 10px; }
  .ek-sec { font-size: 15px; }
}

/* ============================================================
   分野の色（<html data-section="…">）。Life は既定値（青 #2B5785）のまま
   ============================================================ */
html[data-section="insurance"] { --accent: #5B4B8A; --accent-ink: #FFFFFF; --accent-soft: #EFECF6; }   /* 紫。白の上で約8:1 */
html[data-section="health"] { --accent: #1D6B61; --accent-ink: #FFFFFF; --accent-soft: #E5F2EF; --s1: #1D6B61; }   /* 青緑。白の上で 6.3:1 */
html[data-section="math"] { --accent: #94461F; --accent-ink: #FFFFFF; --accent-soft: #F6ECE6; }   /* 錆色。白の上で 6.66:1（2026-10-06 math.css から移動） */
html[data-section="fortune"] { --accent: #7A5410; --accent-ink: #FFFFFF; --accent-soft: #F5EEDF; }   /* 金茶。白の上で 6.77:1（2026-10-16） */
@media (prefers-color-scheme: dark) {
  html[data-section="insurance"]:where(:not([data-theme="light"])) { --accent: #B4A7E6; --accent-ink: #0F1622; --accent-soft: rgba(180, 167, 230, 0.14); }
  html[data-section="health"]:where(:not([data-theme="light"])) { --accent: #6CC9B7; --accent-ink: #0F1622; --accent-soft: rgba(108, 201, 183, 0.14); --s1: #6CC9B7; }
  html[data-section="math"]:where(:not([data-theme="light"])) { --accent: #E9A47E; --accent-ink: #1A1410; --accent-soft: rgba(233, 164, 126, 0.14); }
  html[data-section="fortune"]:where(:not([data-theme="light"])) { --accent: #E3C26E; --accent-ink: #17130A; --accent-soft: rgba(227, 194, 110, 0.14); }
}
html[data-section="insurance"][data-theme="dark"] { --accent: #B4A7E6; --accent-ink: #0F1622; --accent-soft: rgba(180, 167, 230, 0.14); }
html[data-section="health"][data-theme="dark"] { --accent: #6CC9B7; --accent-ink: #0F1622; --accent-soft: rgba(108, 201, 183, 0.14); --s1: #6CC9B7; }
html[data-section="math"][data-theme="dark"] { --accent: #E9A47E; --accent-ink: #1A1410; --accent-soft: rgba(233, 164, 126, 0.14); }
html[data-section="fortune"][data-theme="dark"] { --accent: #E3C26E; --accent-ink: #17130A; --accent-soft: rgba(227, 194, 110, 0.14); }

/* ============================================================
   全ページ共通の使いやすさ（2026-10-06。Math で先に入れていた暫定の指定を共通にした）
   ============================================================ */
/* 固定ヘッダー（高さ約57px、相続の7ページは48px）の下に、ページ内リンクの飛び先やキーボードのフォーカスが隠れないようにする。
   v2 でないページ（life/souzoku/）にも効くよう html 全体に付ける */
html { scroll-padding-top: 72px; }
/* セグメント型のラジオ（入力は見えない）に、キーボードで移ったときの枠を出す */
html[data-ui="v2"] .radio-row label:has(input[type="radio"]:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 出典の長い DOI・URL を折り返す（狭い画面で横にはみ出さないように） */
#sources li { overflow-wrap: anywhere; }
/* 制作行の日付（2026年10月3日）を途中で改行しない */
.byline time { white-space: nowrap; }

/* ヘッダーの「分野一覧」（2026-10-16。分野が増えたので、切替は主要4分野だけにして、ほかはトップの #categories へ）。
   狭い画面でも出す（分野の切替は600px以下で隠れるため） */
.ek-header .header-nav .ek-all { margin-left: 6px; padding: 6px 10px; border-radius: 999px; font-size: 13px; color: var(--ink-2); text-decoration: none; white-space: nowrap; border: 1px solid var(--line, #E2E8F0); }
.ek-header .header-nav .ek-all:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 600px) { .ek-header .header-nav .ek-all { margin-left: 0; padding: 4px 9px; font-size: 12px; } }
/* 2026-10-21〜「分野一覧」は押すとその場で開く一覧（<details>）。トップの #categories へは移らない */
.ek-menu { position: relative; }
.ek-header .header-nav .ek-menu > summary.ek-all { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; list-style: none; user-select: none; background: var(--surface); }
.ek-menu > summary::-webkit-details-marker { display: none; }
.ek-menu > summary::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.ek-menu[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.ek-header .header-nav .ek-menu[open] > summary.ek-all { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.ek-menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ek-menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 80; width: 320px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(15, 22, 34, 0.16);
  padding: 8px;
}
.ek-menu-panel ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.ek-menu-panel li a {
  display: flex; flex-direction: column; gap: 1px; padding: 9px 10px 9px 24px; border-radius: 10px; position: relative;
  text-decoration: none; color: var(--ink);
}
.ek-menu-panel li a::before { content: ""; position: absolute; left: 10px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--accent)); }
.ek-menu-panel li a b { font-size: 14px; font-weight: 700; }
.ek-menu-panel li a span { font-size: 11.5px; color: var(--muted); }
.ek-menu-panel li a:hover { background: var(--page); }
.ek-menu-panel li a[aria-current] { background: var(--accent-soft); }
.ek-menu-panel li a[aria-current] b { color: var(--accent); }
.ek-menu-panel a[data-k="life"] { --dot: #2B5785; }
.ek-menu-panel a[data-k="insurance"] { --dot: #5B4B8A; }
.ek-menu-panel a[data-k="health"] { --dot: #1D6B61; }
.ek-menu-panel a[data-k="math"] { --dot: #94461F; }
.ek-menu-panel a[data-k="fortune"] { --dot: #7A5410; }
.ek-menu-panel a[data-k="money"] { --dot: #2F6B2A; }
.ek-menu-panel a[data-k="property"] { --dot: #8A2E44; }
.ek-menu-panel a[data-k="business"] { --dot: #3D4F5C; }
.ek-menu-top { display: block; margin: 6px 2px 0; padding: 9px 10px 4px; border-top: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.ek-menu-top::after { content: " ›"; color: var(--accent); }
.ek-menu-top:hover { color: var(--accent); }
@media (max-width: 600px) { .ek-menu-panel { right: -6px; width: 300px; } }
/* AdSense の side（PC だけ、入力フォームの下）。フォームとの間をあけ、列の幅に収める */
.tool-side > .ek-ad-side { margin: 18px 0 0; }
.tool-side > .ek-ad-side ins.adsbygoogle { width: 100%; }

/* ---------- 右の欄（幅 1440px 以上の PC だけ。assets/js/ek.js の OC.rail が作る。2026-11-10 年齢計算で試す） ----------
   <html data-rail> のページだけ、ページ全体の幅を 1080px → 1420px に広げ、左右の空いた余白に右の欄（300px）を置く。
   本文の幅は今までどおり 1040px（1420 − 左右の余白 40 − 列の間 40 − 右の欄 300）。1440px 未満は今までどおり1列で、右の欄は出さない
   （HTML に目印を書くのは、読み込みの途中で幅が変わって画面がずれないようにするため）
   .ek-cols-ad  … 計算ツールから早見表までの横。スクロールに付いてくる広告は ここだけに置く
   .ek-cols-article … 解説の横。目次と関連ツールが付いてくる（解説の中に mid・end の広告があるので、こちらには広告を置かない）
   AdSense の付いてくる広告の決まり：PC だけ・幅 300px まで・同時に1つ・本文や広告に近づけすぎない */
.ek-cols-main { min-width: 0; }
.ek-rail { display: none; }
@media (min-width: 1440px) {
  html[data-rail] .wrap, html[data-rail] .site-header .inner { max-width: 1420px; }
  .ek-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 40px; }
  .ek-cols.ek-cols-article { margin-top: 28px; }
  .ek-cols-main > :first-child { margin-top: 0 !important; }
  .ek-rail { display: block; min-width: 0; }
}
.ek-rail-box { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px 12px; }
.ek-rail-box + .ek-rail-box { margin-top: 16px; }
.ek-rail-h { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.ek-rail ul { list-style: none; margin: 0; padding: 0; }
.ek-rail li a { display: block; padding: 6px 0; font-size: 13.5px; line-height: 1.55; color: var(--ink); text-decoration: none; }
.ek-rail li a:hover { color: var(--accent); }
.ek-rail li a small { display: block; font-size: 11.5px; color: var(--muted); }
.ek-rail-stick { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow-y: auto; }
.ek-toc li a { padding: 5px 0 5px 10px; border-left: 2px solid var(--grid); font-size: 13px; color: var(--ink-2); }
.ek-toc li a[aria-current="true"] { border-left-color: var(--accent); color: var(--accent); font-weight: 700; }
.ek-rail-ad { margin-top: 24px; }
/* 付いてくるのは、広告の全体（「広告」の表示から下端まで）が画面に収まる高さのときだけ。72px（上）＋20px（表示）＋広告＋余白 */
@media (min-height: 720px) { .ek-rail-ad.h600 { position: sticky; top: 72px; } }
@media (min-height: 380px) { .ek-rail-ad.h250 { position: sticky; top: 72px; } }
.ek-rail-ad > .ek-ad { margin: 0; }
.ek-rail-ad > .ek-ad ins.adsbygoogle { min-height: 0; }
@media print { .ek-rail { display: none !important; } .ek-cols { display: block !important; } }
/* 目次から飛んだとき、見出しが固定ヘッダーの下に隠れないように */
.ek-cols-article .article > section { scroll-margin-top: 16px; }
