/* 退職金 × iDeCo/DC 受け取り順序シミュレーター
   黄色背景・丸みのある太いフォント・シンプルでポップなデザイン。
   文字は少なく、大きく、迷わず読めることを優先する。
   2026-11-24夜の見やすさ調整: 背景の格子柄を廃止し、ハードシャドウを弱め、
   本文の行間を1.8に広げ、表のセルの余白を広げた（黒帯見出しは維持）。 */
:root {
  --ink: #26221a;
  --muted: #6b6353;
  --bg: #ffd9ea;
  --card: #ffffff;
  --accent: #d81b60;
  --accent-ink: #ffffff;
  --best-bg: #c9f2d4;
  --best-line: #2e9e5b;
  --warn-bg: #fff6da;
}
* { box-sizing: border-box; }
html { font-size: 19px; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-weight: 500;
  line-height: 1.8;
  overflow-x: clip;
}
.icon {
  width: 1.12em; height: 1.12em;
  vertical-align: -0.2em;
  margin-right: 0.18em;
  fill: none; stroke: currentColor;
  stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.summary .big::before {
  content: "";
  display: inline-block;
  width: 1.15em; height: 1.15em;
  vertical-align: -0.22em;
  margin-right: 0.22em;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d81b60' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4h10v5a5 5 0 0 1-10 0V4z'/%3E%3Cpath d='M7 5H4a3 3 0 0 0 3 4M17 5h3a3 3 0 0 1-3 4'/%3E%3Cpath d='M12 14v3M8.5 20h7M12 17v3'/%3E%3C/svg%3E");
}
main { max-width: 880px; margin: 0 auto; padding: 20px 16px 40px; }
h1 {
  font-size: 2rem; font-weight: 800; line-height: 1.35;
  margin: 14px 0 8px; letter-spacing: 0.01em;
}
h2 {
  font-size: 1.45rem; font-weight: 800; margin: 40px 0 14px;
  background: var(--ink); color: #fff;
  display: block; padding: 8px 16px; border-radius: 0;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.22);
}
h3 { font-size: 1.15rem; font-weight: 800; margin: 22px 0 8px; }
p, li { font-size: 1rem; }
.lead { font-size: 1.12rem; font-weight: 700; margin-top: 0; }
.disclaimer {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.92rem;
  margin: 18px 0;
}
fieldset {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
  margin: 0 0 22px;
  padding: 18px 18px 8px;
  min-width: 0;
}
legend {
  font-weight: 800; font-size: 1.12rem;
  background: var(--card);
  border: 3px solid var(--ink); border-radius: 999px;
  padding: 2px 14px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 800; margin-bottom: 5px; }
.field .hint { font-weight: 500; color: var(--muted); font-size: 0.86rem; display: block; }
input[type="month"], input[type="date"], input[type="number"], select {
  font: inherit;
  font-size: 1.08rem; font-weight: 700;
  height: 60px;
  padding: 11px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  width: 100%;
  max-width: 320px;
  background: #fffdf5;
}
.dc-period {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
  border-top: 2px dashed #d8d2c2; padding-top: 14px; margin-bottom: 14px;
}
.dc-period .field { margin-bottom: 0; }
.dc-period input[type="month"] { max-width: 185px; }
.dc-period select { max-width: 155px; }
button {
  font: inherit;
  font-size: 1rem; font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button.sub { background: var(--card); color: var(--ink); padding: 8px 16px; font-size: 0.92rem; }
button.danger { border-color: #b03a3a; color: #b03a3a; background: var(--card); padding: 8px 14px; font-size: 0.9rem; }
.calc-button {
  width: 100%; padding: 18px;
  font-size: 1.35rem; font-weight: 800;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
}
.calc-button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(38, 34, 26, 0.25); }
.error {
  border: 3px solid #b03a3a; background: #fdeeee; border-radius: 14px;
  padding: 12px 16px; margin: 14px 0; font-weight: 700;
}
.summary {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
  padding: 16px 20px;
  margin: 22px 0;
}
.summary .big { font-size: 1.45rem; font-weight: 800; }
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--card);
  border: 3px solid var(--ink); border-radius: 16px;
  padding: 6px 10px;
  margin: 12px 0 20px;
}
table { border-collapse: collapse; width: 100%; line-height: 1.5; }
th, td { padding: 12px 12px; text-align: right; font-size: 0.98rem; border-bottom: 2px solid #eee5c8; }
th { text-align: center; font-weight: 800; }
td:first-child, th:first-child { text-align: center; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #fff8d6; }
tr.best { background: var(--best-bg); font-weight: 800; }
tr.selected { outline: 3px solid var(--accent); outline-offset: -3px; }
.badge {
  display: inline-block; font-size: 0.76rem; font-weight: 800;
  border: 2px solid var(--ink); background: var(--bg);
  border-radius: 999px; padding: 0 8px; margin-left: 6px; white-space: nowrap;
}
.badge.best-badge { border-color: var(--best-line); background: var(--best-bg); }
.detail-card {
  background: var(--card);
  border: 3px solid var(--ink); border-radius: 16px;
  padding: 8px 18px 14px; margin-bottom: 18px;
}
.detail-card .table-wrap { border: none; padding: 0; margin: 6px 0; }
.detail-card table td:first-child { text-align: left; }
.detail-card table td { text-align: right; }
ul.compact { padding-left: 1.25em; }
ul.compact li { margin-bottom: 8px; font-size: 1.02rem; }
.source-list { padding-left: 1.2em; }
.source-list li { margin-bottom: 8px; word-break: break-all; font-size: 0.92rem; }
details {
  background: var(--card);
  border: 3px solid var(--ink); border-radius: 16px;
  padding: 12px 18px; margin: 0 0 18px;
}
details summary {
  font-weight: 800; font-size: 1.08rem; cursor: pointer;
  list-style: none;
  display: flex; align-items: center; gap: 0.5em;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: "▶"; font-size: 0.72em; flex: none;
  transition: transform 0.15s ease;
}
details[open ] > summary::before { transform: rotate(90deg); }
details .table-wrap { border: none; padding: 0; }
footer { margin-top: 44px; }
.small { font-size: 0.88rem; color: var(--muted); }
footer .small { color: var(--ink); }

/* サイト共通: ヘッダー・ナビ・パンくず・ツールカード・フッター */
.site-header {
  max-width: 880px; margin: 0 auto;
  padding: 20px 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  position: relative;
}
.menu { display: none; }
details.menu {
  background: none; border: none; border-radius: 0;
  box-shadow: none; padding: 0; margin: 0;
}
details.menu > summary::before { content: none; }
.menu-btn {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: var(--card); border: 3px solid var(--ink); border-radius: 50%;
  box-shadow: 2px 2px 0 rgba(38, 34, 26, 0.25);
  cursor: pointer; list-style: none;
}
.menu-btn::-webkit-details-marker { display: none; }
.burger { display: block; width: 22px; height: 3.5px; background: var(--ink); border-radius: 2px; position: relative; }
.burger::before, .burger::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 3.5px;
  background: var(--ink); border-radius: 2px;
}
.burger::before { top: -7.5px; }
.burger::after { top: 7.5px; }
.menu-panel {
  position: absolute; right: 16px; top: calc(100% + 10px); z-index: 20;
  background: var(--card); border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
  padding: 6px; min-width: 220px;
  max-height: calc(100vh - 84px); overflow-y: auto;
}
.menu-panel a {
  display: block; padding: 11px 14px;
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1rem;
  border-radius: 9px;
}
.menu-panel a + a { border-top: 2px dashed #d8d2c2; }
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 1.5rem; font-weight: 800; color: var(--ink); text-decoration: none;
  letter-spacing: -0.02em;
}
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  background: var(--card); border: 3px solid var(--ink); border-radius: 50%;
  box-shadow: 2px 2px 0 rgba(38, 34, 26, 0.25), inset 0 0 0 3.5px var(--bg);
  font-size: 1.25rem;
}
.logo-mark .icon { margin: 0; }
.site-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.site-nav a {
  background: var(--card); color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 0.92rem;
  border: 3px solid var(--ink); border-radius: 999px; padding: 4px 14px;
}
.crumb { font-size: 0.9rem; font-weight: 700; margin: 6px 0 0; }
.crumb a { color: var(--ink); }
.hero { text-align: center; font-size: 2.3rem; margin-top: 26px; }
.lead.center { text-align: center; }
.ai-pill {
  display: block; width: fit-content; margin: 16px auto 0;
  font-weight: 800; font-size: 1rem;
  background: var(--best-line); color: #fff;
  border: 3px solid var(--ink); border-radius: 999px;
  padding: 8px 22px;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
}
.tool-cards { display: grid; gap: 18px; margin: 6px 0 8px; }
.tool-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px;
  background: var(--card); color: var(--ink); text-decoration: none;
  border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
  padding: 24px 20px 20px;
}
a.tool-card:active { transform: translate(2px, 2px); box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25); }
.tool-card.soon { opacity: 0.78; box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.18); }
.tool-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 80px; height: 80px; flex: none;
  background: var(--bg); border: 3.5px solid var(--ink); border-radius: 50%;
  box-shadow: inset 0 0 0 6px #fff, 2px 2px 0 rgba(38, 34, 26, 0.25);
  font-size: 2.05rem;
}
.tool-card.soon .tool-card-icon { background: #e8e2d2; }
.tool-card-icon .icon { margin: 0; }
.tool-card-body { display: block; }
.tool-card-title { display: block; font-weight: 800; font-size: 1.18rem; line-height: 1.45; }
.tool-card-text { display: block; margin-top: 5px; font-size: 0.96rem; }
.tool-card-go {
  display: inline-block; margin-top: 12px;
  font-weight: 800; color: #fff; background: var(--accent);
  border: 3px solid var(--ink); border-radius: 999px; padding: 6px 20px;
  box-shadow: 2px 2px 0 rgba(38, 34, 26, 0.25);
}
.hero-badge {
  width: 96px; height: 96px; margin: 26px auto 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 3.5px solid var(--ink); border-radius: 50%;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25), inset 0 0 0 6px var(--bg);
  font-size: 2.7rem;
}
.hero-badge .icon { margin: 0; }
/* アイコンと文字の縦位置を中央で揃える */
.in-flex { display: inline-flex; align-items: center; gap: 0.45em; }
.h2-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.55em; height: 1.55em; flex: none;
  background: #fff; color: var(--ink); border-radius: 50%;
}
.h2-icon .icon { margin: 0; width: 0.92em; height: 0.92em; }
.legend-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2em; height: 2em; flex: none;
  background: var(--bg); border: 3px solid var(--ink); border-radius: 50%;
  box-shadow: inset 0 0 0 3px #fff;
  font-size: 0.92em;
}
.legend-icon .icon { margin: 0; }
.sum-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.8em; height: 1.8em; flex: none;
  background: var(--bg); border: 2.5px solid var(--ink); border-radius: 50%;
  box-shadow: inset 0 0 0 2.5px #fff;
  font-size: 0.95em;
}
.sum-icon .icon { margin: 0; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.7em; height: 1.7em; flex: none;
  background: #fff; color: var(--ink); border-radius: 50%;
}
.btn-icon .icon { margin: 0; width: 0.95em; height: 0.95em; }
.badge.soon-badge { background: #e8e2d2; }
.foot-nav { font-weight: 700; font-size: 0.92rem; margin: 10px 0 2px; }
.foot-nav a { color: var(--ink); }

/* ドロワー（ハンバーガーメニュー）のアニメーション */
@keyframes drawer-in {
  from { transform: translateX(105%); }
  to { transform: translateX(0); }
}
@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  details.menu[open] .menu-panel, details.menu[open]::before { animation: none; }
}

/* スマホ: 見出しは字詰めしてセンター揃え。枠のはみ出しを防ぐ */
@media (max-width: 640px) {
  html { font-size: 17.5px; }
  main { padding: 14px 10px 32px; }
  h1 {
    font-size: 1.62rem;
    letter-spacing: -0.03em;
    text-align: center;
    line-height: 1.3;
  }
  .lead { text-align: center; font-size: 1.02rem; }
  h2 { display: block; text-align: center; letter-spacing: -0.02em; }
  h3 { font-size: 1.02rem; }
  fieldset, .summary, .detail-card, .table-wrap, details { box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25); }
  fieldset { padding: 14px 12px 4px; }
  legend { font-size: 0.95rem; max-width: 100%; padding: 2px 10px; }
  .legend-icon { width: 1.7em; height: 1.7em; }
  .h1-icon { display: block; margin: 0 auto 8px; }
  .field { min-width: 0; }
  input, select { min-width: 0; }
  .dc-period { flex-direction: column; align-items: stretch; }
  .dc-period:first-child { border-top: none; padding-top: 2px; }
  .dc-period input[type="month"], .dc-period select { max-width: none; }
  input[type="month"], input[type="date"], input[type="number"], select { max-width: none; }
  input[type="month"] {
    -webkit-appearance: none; appearance: none;
    display: block; text-align: center;
  }
  .summary .big { font-size: 1.22rem; }
  .hero { font-size: 1.95rem; }
  .site-nav { display: none; }
  /* ハンバーガー: 右からスライドインするドロワー型（暗幕つき） */
  .menu { display: block; position: fixed; top: 10px; right: 12px; z-index: 100; }
  .menu-btn { position: relative; z-index: 30; }
  details.menu[open]::before {
    content: ""; position: fixed; inset: 0; z-index: 10;
    background: rgba(38, 34, 26, 0.45);
    animation: overlay-in 0.25s ease both;
  }
  .menu-panel {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 20;
    width: auto; min-width: 0;
    height: 100vh; height: 100dvh;
    max-height: none; overflow-y: auto;
    border: none; border-radius: 0;
    box-shadow: none;
    padding: 84px 20px 40px;
  }
  .menu-panel a { font-size: 1.12rem; padding: 15px 8px; }
  .menu-panel .menu-kind { font-size: 0.76em; font-weight: 700; }
  .menu-panel .menu-desc { display: block; font-size: 0.8rem; font-weight: 500; color: var(--muted); line-height: 1.55; margin-top: 3px; }
  details.menu[open] .menu-panel { animation: overlay-in 0.25s ease both; }
  .burger, .burger::before, .burger::after { transition: transform 0.2s ease, top 0.2s ease, background-color 0.2s ease; }
  details.menu[open] .burger { background: transparent; }
  details.menu[open] .burger::before { top: 0; transform: rotate(45deg); }
  details.menu[open] .burger::after { top: 0; transform: rotate(-45deg); }
  /* 結果の表は潰さずに横スクロールさせる。文字も少し小さく */
  .table-wrap { padding: 2px 4px; }
  .table-wrap table { min-width: 600px; }
  th, td { font-size: 0.82rem; padding: 6px 7px; }
  td { white-space: nowrap; }
  th { word-break: keep-all; }
  .detail-card .table-wrap table { min-width: 0; }
  .detail-card td { white-space: normal; }
}
.h1-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9em; height: 1.9em;
  background: var(--card); border: 3.5px solid var(--ink); border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--bg), 2px 2px 0 rgba(38, 34, 26, 0.25);
  vertical-align: -0.55em; margin-right: 0.15em;
  font-size: 0.62em;
}
.h1-icon .icon { margin: 0; width: 1.5em; height: 1.5em; }

/* ===== 辞書624の動き: フェードイン／スライドイン／スタッガー／エンプティステート ===== */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.tool-card { animation: rise-in 0.5s ease both; }
.tool-card:nth-child(2) { animation-delay: 0.12s; }
.tool-card:nth-child(3) { animation-delay: 0.24s; }
#result .summary { animation: rise-in 0.45s ease both; }
@media (prefers-reduced-motion: reduce) {
  .tool-card, #result .summary { animation: none; }
}

/* ===== AI相談ボタンとトースト ===== */
.consult { margin: 22px 0 6px; text-align: center; }
.consult-btn {
  font: inherit; font-weight: 800; font-size: 1.02rem;
  background: var(--best-line); color: #fff;
  border: 3px solid var(--ink); border-radius: 999px;
  padding: 12px 26px; cursor: pointer;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
}
.consult-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(38, 34, 26, 0.25); }
.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 200;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 999px;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 92vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* hikaku (part B) */
.note { font-size: 0.85rem; color: #5A5340; }
.verdict { font-size: 1.25rem; font-weight: 800; background: #B8E986; border: 3px solid #26221A; border-radius: 12px; padding: 12px 14px; box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25); }
.crosslink { font-weight: 700; margin-top: 18px; }

.scope-box { background: #FFF7D6; border: 3px solid var(--ink); border-radius: 14px; padding: 14px 18px; margin: 18px 0; box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25); }
.scope-box .scope-title { font-weight: 800; margin: 0 0 6px; }
.scope-box ul { margin: 0 0 6px; padding-left: 1.3em; }
.scope-box li { margin: 2px 0; }

/* ===== 後発ページ（住民税・ふるさと納税・健保比較・プライバシー）の共通部品 =====
   これらのページのHTMLが使う部品クラスを、既存ページ（fieldset/.summary等）と
   同じ見た目・余白に揃えるための定義。 */
.card {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
  padding: 20px 20px 22px;
  margin: 0 0 24px;
}
.card > h2:first-child {
  margin: -20px -20px 16px;
  border-radius: 13px 13px 0 0;
  box-shadow: none;
}
.card > p:first-child { margin-top: 0; }
.card > p:last-child { margin-bottom: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid2 .field { min-width: 0; }
.yen-wrap { display: flex; align-items: center; gap: 8px; }
.yen-wrap input { flex: 1 1 auto; min-width: 0; }
.unit { font-weight: 700; flex: none; }
.big-result {
  font-size: 1.55rem; font-weight: 800; line-height: 1.4;
  background: var(--best-bg);
  border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
  padding: 12px 18px; margin: 16px 0 8px;
}
.big-label { font-size: 1rem; font-weight: 800; }
.btn-ai {
  font: inherit; font-weight: 800; font-size: 1.02rem;
  background: var(--best-line); color: #fff;
  border: 3px solid var(--ink); border-radius: 999px;
  padding: 12px 26px; cursor: pointer;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
  margin: 14px 0 18px;
}
.btn-ai:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(38, 34, 26, 0.25); }
.btn-sub { background: var(--card); color: var(--ink); padding: 8px 16px; font-size: 0.92rem; margin: 4px 0 10px; }
.btn-del { background: var(--card); color: #b03a3a; border-color: #b03a3a; padding: 5px 12px; font-size: 0.85rem; }
.member-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.h2-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.55em; height: 1.55em; flex: none;
  background: #fff; color: var(--ink); border-radius: 50%;
  vertical-align: -0.38em; margin-right: 0.45em;
}
.title-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; }
.title-row h1 { margin-top: 0; }
.title-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; flex: none;
  background: var(--card); border: 3px solid var(--ink); border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--bg), 2px 2px 0 rgba(38, 34, 26, 0.25);
  margin-top: 6px;
}
.crumbs { font-size: 0.9rem; font-weight: 700; margin: 6px 0 0; }
.crumbs a { color: var(--ink); }
.footer-nav { font-weight: 700; font-size: 0.92rem; margin: 10px 0 2px; }
.footer-nav a { color: var(--ink); }
/* フッターのツール一覧: 箇条書き（広い画面2列／スマホ1列） */
.footer-list {
  list-style: none; margin: 8px 0 4px; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px 26px;
  text-align: left;
}
.footer-list li { position: relative; padding-left: 1.1em; margin: 0; }
.footer-list li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 0.52em; height: 0.52em;
  background: var(--card); border: 2px solid var(--ink); border-radius: 2px;
}
.footer-list a { display: inline-block; padding: 2px 0; }
@media (max-width: 640px) {
  .footer-list { grid-template-columns: 1fr; }
}
.copy { font-size: 0.88rem; }
.subhead { border-bottom: 2.5px dashed #d8d2c2; padding-bottom: 5px; }
.check { display: block; font-weight: 700; margin: 10px 0; }
.check input { width: 1.05em; height: 1.05em; vertical-align: -0.12em; margin-right: 4px; }
ul.plain { padding-left: 1.25em; }
ul.plain li { margin-bottom: 8px; }
tr.total-row th, tr.total-row td { font-weight: 800; background: #fff8d6; }
/* 年収の壁チェッカーの壁カード */
.wall-item {
  background: var(--card);
  border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
  padding: 12px 16px 14px; margin: 0 0 14px;
}
.wall-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.wall-name { font-weight: 800; font-size: 1.05rem; }
.wall-amount { font-weight: 800; white-space: nowrap; }
.wall-state {
  display: inline-block; font-size: 0.8rem; font-weight: 800;
  border: 2px solid var(--ink); border-radius: 999px;
  padding: 1px 10px; margin-left: 8px; white-space: nowrap;
  background: var(--best-bg);
}
.wall-state.is-over { background: #f6c9c9; }
.wall-state.is-na { background: #e8e2d2; }
.wall-desc { margin: 8px 0 0; }
.wall-impact { font-weight: 800; margin: 6px 0 0; }
/* main の外にあるフッター（国保・健保比較・住民税・ふるさと納税）は本文幅に揃える */
body > footer { max-width: 880px; margin-left: auto; margin-right: auto; padding: 0 16px; }

@media (max-width: 640px) {
  .card { box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25); padding: 16px 14px 18px; }
  .card > h2:first-child { margin: -16px -14px 14px; }
  .grid2 { grid-template-columns: 1fr; }
  .big-result { font-size: 1.3rem; }
  .title-badge { width: 48px; height: 48px; }
  .title-row { margin-top: 8px; }
}

/* ヘッダーのタグライン（全ページ共通） */
.logo-name { display: flex; flex-direction: column; line-height: 1.2; }
.logo-tagline {
  font-size: 0.68rem; font-weight: 700; color: var(--muted);
  letter-spacing: 0.04em; white-space: nowrap;
}
@media (max-width: 640px) {
  .logo { font-size: 1.28rem; gap: 7px; }
  .logo-mark { width: 40px; height: 40px; }
  .logo-tagline { font-size: 0.58rem; letter-spacing: 0.02em; }
}

/* 総合の見解ボックス（複合版） */
.assess-box {
  background: var(--card); border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(38, 34, 26, 0.25);
  padding: 12px 16px; margin: 10px 0 18px;
}
.assess-box p { margin: 8px 0; }
.assess-box p:first-child { margin-top: 0; }
.assess-box p:last-child { margin-bottom: 0; }

/* ガントチャート（複合版） */
.gantt-wrap { overflow-x: auto; }
.gantt-table { border-collapse: collapse; width: 100%; }
.gantt-table th, .gantt-table td {
  border: 2px solid var(--ink); padding: 4px 5px;
  font-size: 0.74rem; text-align: right; white-space: nowrap;
}
.gantt-table th { background: var(--best-bg); text-align: center; font-weight: 800; }
.gantt-table td.g-label, .gantt-table th.g-label { text-align: left; font-weight: 800; }
.gantt-table td.g-on { background: var(--best-bg); font-weight: 800; }
.gantt-table td.g-off { background: var(--card); }
.gantt-table td.g-annual { font-weight: 800; background: var(--warn-bg); }
.gantt-table tr.g-total td { background: var(--warn-bg); font-weight: 800; }

/* 印刷（複合版: 入力を除き、結果＋内訳＋ガントを A4 横向きに収める。
 * 名前付きページで複合版の body にだけ効かせ、他ページの印刷には影響させない） */
@page compositeA4 { size: A4 landscape; margin: 10mm; }
body.composite-print { page: compositeA4; }
@media print {
  body.composite-print .site-header,
  body.composite-print .crumbs,
  body.composite-print .print-hide,
  body.composite-print .site-footer,
  body.composite-print #toast { display: none !important; }
  body.composite-print { background: #fff; }
  body.composite-print .wrap { max-width: none; padding: 0; }
  body.composite-print .card { box-shadow: none; break-inside: avoid; }
  body.composite-print .assess-box { box-shadow: none; }
  body.composite-print .gantt-table th,
  body.composite-print .gantt-table td { font-size: 8pt; padding: 2px 3px; }
  body.composite-print .gantt-table td.g-on {
    background: #e6e6e6 !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  body.composite-print h1 { font-size: 1.3rem; }
}
