:root {
  --bg: #f7f7f5; --surface: #ffffff; --text: #1a1a19; --text-2: #52514e; --border: #e2e1dc;
  --accent: #0f6b4f; --accent-ink: #ffffff; --accent-soft: #e6f2ed; --series-1: #2a78d6;
  --warn-bg: #fff4d6; --warn-text: #5c4300; --up: #b3261e; --down: #1c5fb0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413; --surface: #1e1e1c; --text: #f3f2ee; --text-2: #c3c2b7; --border: #3a3a36;
    --accent: #4cc39a; --accent-ink: #0c1f18; --accent-soft: #1b2f28; --series-1: #3987e5;
    --warn-bg: #3d3210; --warn-text: #ffe9a8; --up: #ff8a80; --down: #8ab4f8;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
header.site { background: var(--surface); border-bottom: 1px solid var(--border); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding-top: 10px; padding-bottom: 10px; }
.logo { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); }
nav.main { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; }
nav.main a { text-decoration: none; }
.pr-note { font-size: .75rem; color: var(--text-2); margin: 0; padding: 4px 0; }
main { padding: 16px 0 48px; }
h1 { font-size: 1.5rem; line-height: 1.4; margin: 12px 0; }
h2 { font-size: 1.2rem; margin: 36px 0 12px; padding-left: 10px; border-left: 4px solid var(--accent); }
h3 { font-size: 1rem; margin: 20px 0 8px; }
.lead { color: var(--text-2); }
.crumbs { font-size: .8rem; color: var(--text-2); }
.crumbs a { color: inherit; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
a.card { text-decoration: none; color: var(--text); display: block; }
a.card:hover { border-color: var(--accent); }
a.card b { display: block; color: var(--accent); margin-bottom: 4px; }
a.card span { font-size: .85rem; color: var(--text-2); }
.tile .k { font-size: .8rem; color: var(--text-2); }
.tile .v { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.tile .s { font-size: .8rem; color: var(--text-2); }
.up { color: var(--up); } .down { color: var(--down); }
.sample-banner { background: var(--warn-bg); color: var(--warn-text); padding: 8px 16px; font-size: .85rem; text-align: center; font-weight: 600; }
.cta { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 10px; padding: 16px; margin: 24px 0; }
.cta .pr { display: inline-block; font-size: .7rem; border: 1px solid var(--text-2); color: var(--text-2); border-radius: 3px; padding: 0 5px; line-height: 1.5; }
.cta .cta-title { font-weight: 700; font-size: 1.05rem; margin: 6px 0 4px; }
.cta p { margin: 4px 0 12px; font-size: .9rem; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 12px 22px; border-radius: 8px; text-decoration: none; border: 0; font-size: 1rem; cursor: pointer; }
.cta .unset { font-size: .75rem; color: var(--up); }
/* 査定フォームの枠の上の線に重ねる見出し（2026-10-18） */
.cta-form.has-lead { position: relative; margin-top: 40px; padding-top: 30px; }
.cta-form .cta-lead { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 24px); margin: 0; padding: 7px 18px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .95rem; line-height: 1.45; text-align: center; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.cta-form .cta-lead span { display: inline-block; }
.cta-form .cta-provider { margin: 8px 0 0; font-size: .8rem; color: var(--text-2); }
/* ツールの結果の下のフォーム：計算結果は目安で査定額ではないことの1文（2026-10-27） */
.cta-pick .cta-pick-q { margin: 4px 0 10px; font-weight: 700; text-align: center; }
.cta-pick .cta-pick-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.cta-pick .cta-pick-btn { font: inherit; cursor: pointer; width: 100%; padding: 12px 4px; }
.cta-pick .cta-pick-btn[aria-pressed="true"] { outline: 3px solid var(--text); outline-offset: 1px; }
.cta-pick .cta-pick-note { margin: 0 0 10px; font-size: .8rem; color: var(--text-2); text-align: center; }
.cta-sticky { display: none; }
@media (max-width: 560px) {
  .cta-sticky:not([hidden]) { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-align: center; padding: 12px; border-radius: 999px; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
  .cta-sticky .pr { border-color: currentColor; color: inherit; margin-right: 6px; }
}
.cta-pick .cta-pick-frame { scroll-margin-top: 12px; }
@media (max-width: 560px) { .cta-pick .cta-pick-btns { grid-template-columns: repeat(2, 1fr); } }
.cta-form .cta-note { margin: 0 0 8px; font-size: .85rem; color: var(--text-2); }
.cta-form .cta-lead::after { content: ""; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 0; border-top-color: var(--accent); }
@media (max-width: 560px) { .cta-form .cta-lead { font-size: .88rem; padding: 6px 14px; } .cta-form.has-lead { padding-top: 40px; } }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; background: var(--surface); }
th, td { border-bottom: 1px solid var(--border); padding: 8px 10px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { background: var(--accent-soft); font-weight: 600; }
table.sortable thead th { cursor: pointer; }
/* 暮らしのデータの項目と値の表（2026-10-19） */
table.kv th { background: var(--accent-soft); font-weight: 600; width: 38%; }
table.kv td { text-align: left; white-space: normal; }
details { margin: 8px 0; }
summary { cursor: pointer; font-size: .85rem; color: var(--text-2); }
.note { font-size: .8rem; color: var(--text-2); }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--text-2); font-size: 11px; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .bar { fill: var(--series-1); }
.chart .hit { fill: transparent; outline: none; }
.chart .hit:hover, .chart .hit:focus { fill: color-mix(in srgb, var(--series-1) 12%, transparent); }
#tip { position: fixed; z-index: 10; pointer-events: none; background: var(--text); color: var(--bg); font-size: .8rem; padding: 4px 8px; border-radius: 6px; white-space: pre; display: none; }
form.tool { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
form.tool label { display: block; font-size: .85rem; font-weight: 600; }
form.tool .full { grid-column: 1 / -1; }
form.tool input[type=number], form.tool select { width: 100%; padding: 10px; font-size: 1rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); margin-top: 4px; }
form.tool .check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.result { margin-top: 20px; }
.result .big { font-size: 1.9rem; font-weight: 700; line-height: 1.3; }
.range { position: relative; height: 10px; border-radius: 5px; background: var(--border); margin: 14px 0 4px; }
.range i { position: absolute; left: 20%; right: 20%; top: 0; bottom: 0; border-radius: 5px; background: var(--series-1); }
.range-labels { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-2); }
footer.site { border-top: 1px solid var(--border); background: var(--surface); font-size: .8rem; color: var(--text-2); padding: 20px 0 32px; }
footer.site a { color: inherit; }
ul.links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
ul.cols { columns: 3 140px; padding-left: 18px; }
[hidden] { display: none !important; }
.reading p { margin: .7em 0; }
ul.related { padding-left: 18px; }
ul.related li { margin: 4px 0; }
ul.points { padding-left: 18px; }
ul.points li { margin: 6px 0; }
.card h3 { margin-top: 0; }
ol.rank { margin: 0; padding-left: 1.5em; font-size: .9rem; }
/* 主要都市・都道府県の主な市区町村へのリンク */
ul.major-pref { padding-left: 18px; }
ul.major-pref li { margin: 6px 0; line-height: 1.8; }
ul.major-pref a.pref { font-weight: 600; }
ul.major-links { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-left: 0; list-style: none; }
/* 地区別表の集計期間・件数、手取りの控除あり・なしの比較、確認項目 */
td .cell-note { display: block; font-size: .72rem; color: var(--text-2); }
/* エリア比較の表：算出期間などの長い値は折り返す */
table.cmp td { white-space: normal; }
.compare .big { font-size: 1.5rem; }
.checklist { margin: 20px 0; }
.checklist ul { padding-left: 1.3em; margin: 8px 0; }
/* スマホ幅：見出しと1列目を折り返して金額の列を画面内に収める。収まらない表は1列目を固定して横スクロール */
@media (max-width: 600px) {
  table { font-size: .8rem; }
  th, td { padding: 6px 5px; }
  thead th { white-space: normal; }
  th:first-child, td:first-child { white-space: normal; min-width: 4.5em; position: sticky; left: 0; background: var(--surface); z-index: 1; }
  thead th:first-child { background: var(--accent-soft); }
  td .cell-note { font-size: .66rem; white-space: normal; }
  table.district th, table.district td, table.cond th, table.cond td { padding: 6px 3px; }
  table.district td, table.cond td { font-size: .75rem; }
}
/* 全国まとめ（/report/）：ヒーロー画像、図、出典表記 */
.report-hero img { width: 100%; height: auto; display: block; border-radius: 10px; aspect-ratio: 1200 / 625; object-fit: cover; }
figure.report-fig { margin: 16px 0; }
figure.report-fig figcaption { margin-bottom: 8px; }
.chart.report-chart .lab { fill: var(--text); font-size: 12px; }
.chart.report-chart { max-width: 600px; margin: 0 auto; }
.chart.report-chart .val { fill: var(--text-2); font-size: 11px; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.chart.report-chart .prev { fill: color-mix(in srgb, var(--text-2) 45%, var(--surface)); }
.chart.report-chart .ref { stroke: var(--text); stroke-width: 1; stroke-dasharray: 4 3; }
.chart.report-chart .base { stroke: var(--border); stroke-width: 1; }
.rank-pair h4 { margin: 12px 0 4px; font-size: .9rem; }
.cite-box { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; }
.cite-box code { white-space: normal; word-break: break-all; font-size: .9rem; }
/* 2026-10-14: 市区町村ページの目次（title 試験の対象・対照には付けない） */
.toc{border:1px solid #e3e3e3;border-radius:6px;padding:12px 16px;margin:16px 0;font-size:14px}.toc b{display:block;margin-bottom:6px}.toc ol{margin:0;padding-left:20px}.toc li{margin:3px 0}.toc a{text-decoration:underline;text-underline-offset:3px}

/* 畳んだ詳しいデータ（2026-10-18） */
details.more { margin: 8px 0 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
details.more > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; color: var(--accent); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "＋ "; }
details.more[open] > summary::before { content: "－ "; }
details.more[open] > summary { border-bottom: 1px solid var(--border); }
details.more > :not(summary) { margin-left: 14px; margin-right: 14px; }
.reading details.more { margin-top: 4px; }

/* ハザードマップ（市区町村ページの暮らしのデータ。地図は src/assets/js/hazard-map.js） */
.hazard-map { margin: 8px 0 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; }
.hm-tabs { display: flex; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.hm-tabs button { font: inherit; font-size: .9rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.hm-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.hm-canvas { position: relative; height: 380px; background: #e8e8e4; }
.hm-loading { margin: 0; padding: 16px; color: #52514e; font-size: .9rem; }
.hm-hint { position: absolute; z-index: 1000; left: 50%; bottom: 28px; transform: translateX(-50%); margin: 0; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .8rem; pointer-events: none; white-space: nowrap; }
.hm-legend { padding: 8px 10px; border-top: 1px solid var(--border); }
.hm-legend ul { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.hm-legend li { display: flex; align-items: center; gap: 4px; }
.hm-legend i { display: inline-block; width: 14px; height: 14px; border: 1px solid rgba(0, 0, 0, .25); border-radius: 2px; }
.hm-legend .note { margin: 4px 0 0; }
.hazard-map > details.hm-about { margin: 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.hazard-map > details.hm-about > summary { font-size: .9rem; padding: 8px 10px; }
.hazard-map .leaflet-container { font: inherit; }
.hazard-map .leaflet-control-attribution { font-size: 10px; }
@media (max-width: 600px) { .hm-canvas { height: 300px; } }

/* トップページ（2026-10-20）：地域への入口・市区町村ページで分かること・掲載内容の一例・全国集計 */
.home-jump { margin: 4px 0 14px; }
.home-jump a { display: inline-block; padding: 6px 14px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-weight: 700; text-decoration: none; font-size: .95rem; }
.home-jump a:hover { background: var(--accent-soft); }
ul.home-features { display: grid; gap: 8px 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 10px 0 14px; padding: 0; list-style: none; }
ul.home-features li { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; }
ul.home-features .hf-icon { grid-row: span 2; width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; }
ul.home-features b { font-size: .95rem; }
ul.home-features li > span:last-child { font-size: .8rem; color: var(--text-2); }
.home-sample { margin: 0 0 16px; }
.home-sample .hs-label { margin: 0 0 6px; font-weight: 700; }
.home-sample dl { margin: 0; display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.home-sample dl div { display: flex; flex-direction: column; }
.home-sample dt { font-size: .8rem; color: var(--text-2); }
.home-sample dd { margin: 0; font-weight: 700; font-size: 1.1rem; }
.home-sample dd small { display: block; font-weight: 400; font-size: .75rem; color: var(--text-2); }
.home-sample ul.hs-links { margin: 8px 0 4px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.home-sample .note { margin: 0; }
ul.home-report { padding-left: 18px; }
ul.home-report li { margin: 4px 0; }
.major details.more summary { font-weight: 600; }
@media (max-width: 600px) {
  .home-tools .grid { gap: 8px; }
  .home-tools a.card { padding: 10px 14px; }
  .home-tools a.card b { margin-bottom: 0; }
  .home-tools a.card span { font-size: .8rem; line-height: 1.5; display: block; }
}
/* 地区へ飛ぶリンク（売却意図の試験、2026-11-16） */
.district-jump { line-height: 1.9; }
table.district tr.is-target td { background: rgba(255, 190, 0, .2); }
table.district tr[id] { scroll-margin-top: 80px; }
/* 評価額換算の答えの1行（2026-11-16） */
.hyoka-answer { font-size: 1.05rem; margin: 0 0 10px; }
.hyoka-answer b { color: var(--accent); }
