/* マネー計算ラボ 専用デザイン（2026-08-01）
   参考：鳥取銀行「手取り計算」ページを実測して起こした
   骨格＝ベージュ背景 #f7f5f0 の上に白カード（1000px・角丸16px・padding32）
   配色＝紺 #005bac ＋ 黄 #ffcc58 ／ 本文 14px・行間1.7
   ※他メディアとCSSを共有しない（ジャンル特化のため） */
:root {
  --primary: #005bac;
  --primary-dark: #004a8a;
  --primary-light: #eaf2fb;
  --accent: #ffcc58;
  --accent-dark: #f0b427;
  --bg: #f7f5f0;
  --card: #ffffff;
  --panel: #f9f9f9;
  --text: #333333;
  --muted: #6b7280;
  --border: #dddddd;
  --line: #dcdcdc;
  --result-bg: #eaf2fb;
  --result-border: #b6d3ee;
  --dark: #1f2a37;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}

/* ヘッダー */
body::before { content: ""; display: block; height: 3px; background: var(--primary); }
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .inner {
  max-width: 1000px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand .logo-mark {
  width: 36px; height: 36px; border-radius: 6px; flex-shrink: 0;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.1rem;
}
.brand .brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; }
.brand .brand-sub { display: block; font-size: .62rem; font-weight: 400; color: var(--muted); letter-spacing: .04em; }
.header-nav { display: flex; gap: 4px; }
.header-nav a {
  text-decoration: none; color: var(--text); font-size: .82rem; font-weight: 700;
  padding: 8px 14px; border-radius: 4px; white-space: nowrap; transition: background .15s;
}
.header-nav a:hover { background: var(--primary-light); color: var(--primary); }

/* 本体＝白いカードが背景の上に載る */
main {
  max-width: 1000px; margin: 16px auto 0; padding: 32px;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* パンくず・見出し */
.breadcrumb { font-size: .75rem; color: var(--muted); margin: 0 0 10px; }
.breadcrumb a { color: var(--primary); text-decoration: underline; }
h1 { font-size: 1.5rem; line-height: 1.4; font-weight: 700; margin-bottom: 10px; letter-spacing: .01em; }
h1 .hl { background: linear-gradient(transparent 66%, var(--accent) 66%); padding: 0 2px; }
main > .breadcrumb + h1 { font-size: 1.5rem; margin-top: 0; }
.lead { color: var(--text); font-size: .93rem; max-width: 46em; margin-bottom: 20px; }
.pr-note { font-size: .69rem; color: #98a4b5; margin-bottom: 0; }

/* ヒーローは廃止（銀行系は装飾を持たない）→ 更新日バッジのみ残す */
.hero { margin: 0; padding: 0; background: none; }
.hero::after { display: none; }
.badge-update {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--primary-light); color: var(--primary-dark);
  border: 1px solid #cfe0f2;
  font-size: .72rem; font-weight: 700; padding: 5px 12px; border-radius: 4px;
  margin-bottom: 14px;
}
.badge-update::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.trust-badges span {
  font-size: .72rem; font-weight: 700; color: var(--primary-dark);
  background: var(--primary-light); border: 1px solid #cfe0f2; border-radius: 4px;
  padding: 5px 12px; display: inline-flex; align-items: center; gap: 6px;
}
.trust-badges span::before { content: "✓"; font-weight: 700; }

h2 {
  font-size: 1.22rem; font-weight: 700; margin: 48px 0 14px; line-height: 1.5;
  padding: 10px 0 10px 14px; border-left: 6px solid var(--primary);
  border-bottom: 1px solid var(--line);
}
h2::before { display: none; }
h2 + p, h2 + .lead { margin-top: 0; }
h2 + .table-scroll, h2 + .rank-cards, h2 + .calc-card, h2 + .tool-grid { margin-top: 16px; }
h3 {
  font-size: 1.02rem; font-weight: 700; margin: 30px 0 10px;
  padding-bottom: 8px; border-bottom: 3px solid #e7e7e7;
}
p { margin-bottom: 14px; }
ul, ol { margin: 0 0 16px 1.4em; }
li { margin-bottom: 6px; }
a { color: var(--primary); }

/* パネル（計算ツール・図解の枠）＝白カードの中に置く薄いグレー面 */
.calc-card, .content-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 24px; margin-bottom: 22px;
}
.panel-title {
  text-align: center; font-size: 1.12rem; font-weight: 700; color: var(--primary);
  padding-bottom: 12px; margin-bottom: 20px; border-bottom: 2px solid var(--primary);
}
.panel-sub { text-align: center; font-size: .78rem; color: var(--muted); margin: -14px 0 18px; }

/* 額面→控除→手取り のフロー図解 */
.flow {
  display: grid; grid-template-columns: 1fr auto 1.5fr auto 1fr;
  align-items: center; gap: 10px; margin: 4px 0 6px;
}
.flow-box {
  border: 2px solid var(--primary); border-radius: var(--radius-sm);
  background: #fff; padding: 16px 10px; text-align: center;
}
.flow-box.goal { background: var(--primary-light); }
.flow-tag {
  display: inline-block; background: var(--primary); color: #fff;
  font-size: .68rem; font-weight: 700; border-radius: 4px; padding: 3px 12px; margin-bottom: 8px;
}
.flow-name { font-size: 1.02rem; font-weight: 700; color: var(--primary); }
.flow-note { font-size: .72rem; color: var(--muted); }
.flow-op { font-size: 1.5rem; font-weight: 700; color: var(--primary); text-align: center; }
.flow-mid { border: 2px solid #e05a5a; border-radius: var(--radius-sm); padding: 12px 10px 14px; background: #fff; }
.flow-mid-tag {
  display: block; width: fit-content; margin: -24px auto 10px;
  background: #e05a5a; color: #fff; font-size: .72rem; font-weight: 700;
  border-radius: 999px; padding: 4px 16px;
}
.flow-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.flow-col { background: var(--primary-light); border-radius: 8px; padding: 10px 8px; }
.flow-col h4 {
  font-size: .8rem; font-weight: 700; color: var(--primary); text-align: center;
  border-bottom: 1px dashed #a9c6e4; padding-bottom: 5px; margin-bottom: 6px;
}
.flow-col ul { margin: 0 0 0 1.1em; }
.flow-col li { font-size: .74rem; margin-bottom: 2px; line-height: 1.6; }
@media (max-width: 720px) {
  .flow { grid-template-columns: 1fr; }
  .flow-op { transform: rotate(90deg); }
  .flow-mid-tag { margin-top: 0; }
}

/* 手取り率のドーナツ（conic-gradientのみで描画） */
.rate-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 18px 0; }
.rate-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 16px; text-align: center; }
.rate-card .rc-label { font-size: .82rem; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.donut {
  width: 118px; height: 118px; border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.donut::after {
  content: ""; position: absolute; width: 84px; height: 84px; border-radius: 50%; background: #fff;
}
.donut span { position: relative; z-index: 1; font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.donut-legend { list-style: none; margin: 0; text-align: left; display: inline-block; }
.donut-legend li { font-size: .76rem; margin-bottom: 4px; display: flex; align-items: center; gap: 7px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; display: inline-block; }

/* フォーム */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 7px; }
.field .note { font-weight: 400; color: var(--muted); font-size: .74rem; }
.field input[type="number"], .field select {
  width: 100%; max-width: 340px; padding: 12px 14px; font-size: 1rem;
  border: 1px solid #c9c9c9; border-radius: 8px; background: #fff;
  transition: border-color .15s; font-family: inherit;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,91,172,.12); }
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-group label {
  font-weight: 700; font-size: .85rem; display: flex; align-items: center; gap: 7px;
  border: 1px solid #c9c9c9; border-radius: 8px; padding: 10px 15px;
  cursor: pointer; background: #fff; transition: all .15s;
}
.radio-group label:has(input:checked) {
  border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark);
}
.calc-btn, .btn-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary);
  color: #fff !important; font-size: 1rem; font-weight: 700; text-decoration: none;
  border: none; border-radius: 8px; padding: 15px 44px; cursor: pointer;
  letter-spacing: .04em; transition: background .15s;
}
.calc-btn::before, .btn-cta::before { display: none; }
.calc-btn:hover, .btn-cta:hover { background: var(--primary-dark); transform: none; }
.btn-cta { font-size: .9rem; padding: 12px 24px; }
.btn-cta::after { content: "›"; font-weight: 700; }

/* 結果 */
.result {
  display: none; background: var(--result-bg); border: 1px solid var(--result-border);
  border-radius: var(--radius-sm); padding: 24px; margin-bottom: 22px;
}
.result.show { display: block; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.result-main { font-size: .85rem; font-weight: 700; color: var(--muted); text-align: center; }
.result-main .big {
  display: block; font-size: 2.4rem; font-weight: 700; color: var(--primary);
  line-height: 1.25; margin-top: 4px; font-variant-numeric: tabular-nums;
}
.result table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .87rem; background: #fff; }
.result th, .result td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #d9e5f0; font-weight: 400; }
.result td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.result tr.total th, .result tr.total td { font-weight: 700; background: var(--primary-light); }
.result tr.group th {
  background: var(--primary); color: #fff; font-weight: 700; font-size: .78rem; letter-spacing: .04em;
}
.result .rate-line { margin-top: 14px; font-size: .82rem; color: var(--muted); text-align: center; }

/* 表＝1列目を紺、他ヘッダーを黄にする2色ヘッダー（鳥取銀行の型） */
.article table, .content-card table, .table-scroll table {
  width: 100%; border-collapse: collapse; margin: 0 0 8px;
  font-size: .85rem; background: #fff; border: 1px solid var(--line);
  border-radius: 0; overflow: hidden;
}
.article th, .article td, .content-card th, .content-card td,
.table-scroll th, .table-scroll td {
  border: 1px solid var(--line); padding: 12px 12px; text-align: left; vertical-align: top;
}

/* 縦ヘッダー型の表（各行の先頭がth）は薄いグレーで */
.article th, .content-card th, .table-scroll th { background: #f2f4f6; }
.article tr:first-child:has(th + th) th, .table-scroll tr:first-child:has(th + th) th, .content-card tr:first-child:has(th + th) th {
  background: var(--accent); color: var(--primary-dark); font-size: .82rem; font-weight: 700;
  border-bottom: 2px solid var(--primary-dark); text-align: center;
}
.article tr:first-child th:first-child,
.table-scroll tr:first-child th:first-child,
.content-card tr:first-child th:first-child { background: var(--primary); color: #fff; }
.article tbody tr:nth-child(even) td, .table-scroll tr:nth-child(odd) td { background: #f7f9fb; }
.table-scroll { overflow-x: auto; margin-bottom: 16px; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 660px; }
/* 早見表のいちばん見せたい列 */
.article td.key, .table-scroll td.key { color: var(--primary); font-weight: 700; }

/* 比較カード */
.rank-cards { display: grid; gap: 14px; margin: 18px 0 10px; counter-reset: rank; }
.rank-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 22px 24px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: center;
  position: relative; transition: border-color .2s;
}
.rank-card:hover { border-color: var(--primary); }
.rank-card::before {
  counter-increment: rank; content: counter(rank);
  position: absolute; top: -10px; left: 16px;
  width: 26px; height: 26px; border-radius: 4px;
  background: var(--primary); color: #fff;
  font-size: .82rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.rank-card .rc-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; grid-column: 1; grid-row: 1; padding-top: 4px; }
.rank-card .rc-name { font-size: 1.1rem; font-weight: 700; }
.rank-card .rc-tag {
  font-size: .68rem; font-weight: 700; color: var(--primary-dark);
  background: var(--primary-light); border: 1px solid #cfe0f2;
  border-radius: 4px; padding: 2px 10px;
}
.rank-card .rc-tag.warn { color: #93370d; background: #fef0c7; border-color: #fedf89; }
.rank-card .rc-price { grid-column: 1; grid-row: 2; font-size: .85rem; color: var(--muted); margin: 2px 0 0; }
.rank-card .rc-price b { font-size: 1.5rem; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; padding: 0 1px; }
.rank-card .rc-note { font-size: .77rem; color: var(--muted); grid-column: 1 / -1; margin: 6px 0 0; border-top: 1px dashed var(--border); padding-top: 10px; }
.rank-card .rc-cta { grid-column: 2; grid-row: 1 / 3; align-self: center; }
@media (max-width: 620px) {
  .rank-card { grid-template-columns: 1fr; }
  .rank-card .rc-head, .rank-card .rc-price { grid-column: 1; grid-row: auto; }
  .rank-card .rc-cta { grid-column: 1; grid-row: auto; margin-top: 12px; }
  .rank-card .btn-cta { width: 100%; }
}

/* ツールカード */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; margin: 22px 0; }
.tool-card {
  display: block; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 22px; text-decoration: none; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.tool-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--primary); opacity: 0; transition: opacity .2s;
}
.tool-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: none; }
.tool-card:hover::before { opacity: 1; }
.tool-card .tool-icon {
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--primary-light); border: 1px solid #cfe0f2;
  font-size: 1.3rem; display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.tool-card .tool-name { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.tool-card .tool-desc { font-size: .8rem; color: var(--muted); line-height: 1.75; }
.tool-card .tool-more { display: inline-block; margin-top: 10px; font-size: .78rem; font-weight: 700; color: var(--primary); }

/* 目次 */
.toc { background: var(--panel) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important; }
.toc strong { color: var(--primary); }
.toc a { color: var(--text); text-decoration: underline; }

/* 注意・FAQ */
.disclaimer {
  background: #fffaeb; border: 1px solid #fedf89; border-left: 5px solid var(--accent-dark); border-radius: 8px;
  padding: 16px 20px; font-size: .78rem; color: #7a4d0b; margin: 28px 0; line-height: 1.85;
}
.faq dt { font-weight: 700; margin-top: 20px; padding-left: 30px; position: relative; }
.faq dt::before {
  content: "Q"; position: absolute; left: 0; top: 4px; width: 21px; height: 21px;
  background: var(--primary); color: #fff;
  font-size: .7rem; font-weight: 700; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.faq dd { margin: 7px 0 0 30px; color: var(--text); font-size: .9rem; }

/* フッター */
.site-footer { background: var(--dark); color: #cbd5e1; margin-top: 32px; }
.site-footer .inner { max-width: 1000px; margin: 0 auto; padding: 40px 24px 28px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px 64px; margin-bottom: 24px; }
.footer-brand { max-width: 300px; }
.footer-brand .fb-name { font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 9px; color: #fff; }
.footer-brand p { font-size: .76rem; color: #9aa5b1; margin: 0; line-height: 1.8; }
.footer-col .fc-title { font-size: .68rem; font-weight: 700; color: #8b96a3; letter-spacing: .1em; margin-bottom: 10px; }
.footer-col ul { list-style: none; margin: 0; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { font-size: .82rem; color: #cbd5e1; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-note { font-size: .69rem; color: #8b96a3; border-top: 1px solid #33404f; padding-top: 18px; }
.footer-note p { margin-bottom: 4px; }

@media (max-width: 640px) {
  main { margin: 0; border-radius: 0; padding: 20px 16px 44px; }
  h1 { font-size: 1.28rem; }
  h2 { font-size: 1.1rem; margin-top: 38px; }
  .header-nav { display: none; }
  .calc-card, .content-card { padding: 18px 14px; }
  .result-main .big { font-size: 1.85rem; }
  .calc-btn { width: 100%; }
  .rate-cards { grid-template-columns: 1fr; }
}

/* サービスロゴ */
.tlogo { border-radius: 4px; vertical-align: -4px; margin-right: 8px; background: #fff; box-shadow: 0 0 0 1px var(--border); }
.tcell { white-space: nowrap; }
.rc-name .tlogo-lg { width: 24px; height: 24px; vertical-align: -5px; }

/* 図解（figure）*/
.fig { margin: 20px 0; }
.fig svg { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.fig figcaption { font-size: .82rem; color: var(--muted); margin-top: 8px; line-height: 1.7; }

/* 結果テーブルの強調行 */
.result th.hl, .result td.hl { background: var(--primary-light); font-weight: 700; }
