:root {
  --ink: #1d2a28;
  --ink-soft: #4a5856;
  --muted: #66736f;
  --bg: #f7f8f4;
  --paper: #fdfdfb;
  --line: #d9e0db;
  --green: #1f6f5c;
  --green-dark: #165243;
  --green-tint: #e5f0ea;
  --orange: #b4561c;
  --orange-tint: #fbeee3;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
a { color: var(--green); }
a:hover { color: var(--green-dark); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 12px; padding-bottom: 48px; }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.logo { font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--green); color: #fff; font-size: 20px; line-height: 1; }
.gnav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.gnav a { color: var(--ink-soft); text-decoration: none; }
.gnav a:hover { color: var(--green); text-decoration: underline; }

.crumbs { font-size: 13px; color: var(--muted); margin: 8px 0 16px; }
.crumbs a { color: var(--muted); }

h1 { font-size: 26px; line-height: 1.45; margin: 8px 0 16px; }
h2 { font-size: 20px; line-height: 1.5; margin: 40px 0 12px; padding-left: 12px; border-left: 5px solid var(--green); }
h3 { font-size: 17px; margin: 24px 0 8px; }
.eyebrow { color: var(--orange); font-weight: 700; font-size: 14px; margin: 16px 0 0; letter-spacing: .05em; }
.lead { font-size: 17px; color: var(--ink-soft); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

/* 即答ボックス */
.answer { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: flex-end; background: var(--paper); border: 2px solid var(--green); border-radius: var(--radius); padding: 16px 20px; margin: 8px 0 20px; }
.answer-main { display: flex; flex-direction: column; gap: 2px; }
.answer-label { font-size: 13px; color: var(--muted); }
.answer-main strong { font-size: 24px; line-height: 1.3; }
.answer-sub { font-size: 13px; color: var(--ink-soft); }
.answer .checked { flex-basis: 100%; margin: 0; }
.answer-text { display: block; }
.answer-text p { margin: 4px 0 0; font-weight: 700; }
.checked { font-size: 13px; color: var(--muted); }

/* badge */
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.badge-open { background: var(--green); color: #fff; }
.badge-soon { background: var(--orange-tint); color: var(--orange); border: 1px solid var(--orange); }
.badge-closed { background: #e6e8e6; color: #555f5c; }
.badge-check { background: #fff; color: var(--ink-soft); border: 1px dashed var(--muted); }
.answer .badge { font-size: 16px; padding: 4px 14px; align-self: flex-start; }

/* tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 15px; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.tbl thead th, .tbl tr:first-child th { background: var(--green-tint); }
.tbl.kv th { width: 30%; background: var(--green-tint); white-space: nowrap; }
.tbl.list td:first-child { min-width: 12em; }
.scope { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; }

/* notes, buttons */
.note { background: var(--orange-tint); border-left: 5px solid var(--orange); border-radius: 8px; padding: 12px 16px; margin: 24px 0; }
.note p { margin: 6px 0; }
.btn { display: inline-block; background: var(--green); color: #fff; text-decoration: none; font-weight: 700; padding: 10px 20px; border-radius: 999px; border: 0; font-size: 16px; cursor: pointer; }
.btn:hover { background: var(--green-dark); color: #fff; }
ol.steps { padding-left: 1.4em; }
ol.steps li { margin-bottom: 8px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--green); }
.card-title { font-weight: 700; }
.card-sub { font-size: 13px; color: var(--muted); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); text-decoration: none; }

/* hero */
.hero { background: var(--green); color: #fff; border-radius: var(--radius); padding: 28px 24px; margin-top: 16px; }
.hero h1 { font-size: 28px; margin-top: 0; }
.hero p { color: #e3f1ea; }
.hero-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: rgba(255,255,255,.12); padding: 12px 16px; border-radius: 10px; }
.hero-form label { font-weight: 700; }
.hero-form select { font-size: 16px; padding: 8px; border-radius: 8px; border: 0; min-width: 9em; }
.hero-form .btn { background: #fff; color: var(--green); }
.hero-stats { font-size: 14px; margin-bottom: 0; }
.about-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 12px; margin-top: 40px; }

/* faq */
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 8px 0 0; }

/* checker */
.checker { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.checker select { font-size: 16px; padding: 6px; margin-left: 8px; }
.checker fieldset { border: 0; padding: 0; margin: 0; }
.checker legend { font-weight: 700; margin-bottom: 6px; }
.ck-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; }
.ck { font-size: 15px; }
.ck-total { font-size: 18px; font-weight: 700; margin: 20px 0 8px; }

/* footer */
.site-footer { background: #23302e; color: #d6dfdc; font-size: 14px; padding: 32px 0 16px; }
.site-footer a { color: #d6dfdc; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.foot-title { font-weight: 700; color: #fff; margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.copy { text-align: center; margin-top: 24px; color: #9fb0ab; }

@media (max-width: 600px) {
  h1 { font-size: 22px; }
  .hero h1 { font-size: 23px; }
  .answer-main strong { font-size: 20px; }
  .tbl { font-size: 14px; }
}

/* brush-up */
.deadline { color: var(--orange); font-weight: 700; }
.foot-area { margin: 10px 0 2px; color: #9fb0ab; font-size: 13px; }
.foot-inline { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.editor-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; margin-top: 32px; }
.editor-title { font-weight: 700; margin: 0 0 4px; }
.answer-mid { font-size: 17px !important; line-height: 1.5 !important; }
.ref-list { padding-left: 1.2em; }
.ref-list li { margin-bottom: 8px; }

/* 国の住宅補助金の帯 */
.kuni-bar { display: block; background: var(--orange-tint); border-bottom: 1px solid #efd3bd; color: var(--ink); text-decoration: none; }
.kuni-bar .wrap { display: flex; align-items: center; gap: 10px; padding-top: 9px; padding-bottom: 9px; }
.kuni-badge { flex: none; background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.kuni-text { font-weight: 700; font-size: 15px; line-height: 1.5; }
.kuni-arrow { margin-left: auto; font-size: 22px; color: var(--orange); line-height: 1; }
.kuni-bar:hover .kuni-text { text-decoration: underline; }

/* フッターの市町村一覧（エリアごとのブロックを横に並べる） */
.foot-cities { border-top: 1px solid #3a4845; margin-top: 24px; padding-top: 20px; }
.foot-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 28px; }
.foot-areablock .foot-area { margin: 0 0 4px; color: #b9c8c3; font-weight: 700; font-size: 13px; }
.site-footer .foot-inline { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; line-height: 1.7; }
.site-footer ul li { line-height: 1.9; }
@media (max-width: 600px) {
  .foot-areas { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .kuni-text { font-size: 14px; }
}
.h2-kuni { border-left-color: var(--orange); }
.toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 18px; margin: 16px 0; }
.toc-title { font-weight: 700; margin: 0 0 4px; }
.toc ul { margin: 0; padding-left: 1.2em; }
ul.checklist { list-style: none; padding-left: 0; }
ul.checklist li { padding-left: 1.6em; position: relative; margin-bottom: 6px; }
ul.checklist li::before { content: "□"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.ninki-list { list-style: none; padding: 0; }
.ninki-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ninki-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--orange); border: 1px solid var(--orange); border-radius: 999px; padding: 0 8px; margin-right: 8px; }
@media (max-width: 600px) {
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 16px; }
  .foot-cols > div:first-child { grid-column: 1 / -1; }
  .site-footer ul li { line-height: 1.7; font-size: 13px; }
}

/* 地図から探す */
.map-layers { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.layer-btn { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; font-family: inherit; }
.layer-btn:hover { border-color: var(--green); }
.layer-btn.is-active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 700; }
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.map-box { background: #e7f0f5; border-radius: var(--radius); padding: 10px; }
.pref-map { width: 100%; height: auto; display: block; }
.muni { stroke: #ffffff; stroke-width: 0.9; cursor: pointer; transition: fill .25s; }
.muni:hover, .muni:focus { stroke: #1d2a28; stroke-width: 1.8; outline: none; }
.muni.is-selected { stroke: #b4561c; stroke-width: 2.6; }
.muni-label { font-size: 11px; fill: #1d2a28; text-anchor: middle; dominant-baseline: middle; pointer-events: none; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 3px; stroke-linejoin: round; }
.map-legend { margin-top: 8px; }
.map-legend .lg { display: inline-flex; align-items: center; gap: 5px; margin-right: 14px; font-size: 13px; }
.map-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.map-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; position: sticky; top: 12px; }
.panel-area { color: var(--orange); font-weight: 700; font-size: 13px; margin: 0; }
.panel-title { border: 0; padding: 0; margin: 2px 0 6px; font-size: 22px; }
.panel-count { margin: 0 0 8px; }
.panel-layer { font-size: 14px; background: var(--green-tint); border-radius: 8px; padding: 6px 10px; }
.panel-sub { font-weight: 700; font-size: 14px; margin: 10px 0 2px; }
.panel-list { padding-left: 1.2em; margin: 0 0 12px; font-size: 14px; }
.hero-map-link { color: #fff; font-weight: 700; margin-left: 4px; }
@media (max-width: 760px) {
  .map-wrap { grid-template-columns: 1fr; }
  .map-panel { position: static; }
  .muni-label { font-size: 13px; }
}
@media (max-width: 560px) {
  .muni-label { display: none; }
}
.map-hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
/* 地図の境界線（2層構造） */
.fills .muni { stroke: none; }
.fills .muni:hover, .fills .muni:focus { filter: brightness(0.92); outline: none; }
.borders path { fill: none; stroke: #55635f; stroke-width: 1; stroke-linejoin: round; pointer-events: none; }
.sel-outline { fill: none; stroke: #d9772f; stroke-width: 3; stroke-linejoin: round; pointer-events: none; }
.sel-outline.fill-mode { fill: rgba(217, 119, 47, 0.45); stroke: none; }

/* 体裁の見直し（2026-10-17） */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.entry-card { display: flex; flex-direction: column; gap: 2px; background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.entry-card:hover { border-color: var(--green); background: var(--green-tint); }
.entry-main { border-left-color: var(--orange); }
.entry-title { font-weight: 700; font-size: 17px; }
.entry-sub { font-size: 13px; color: var(--muted); }
.answer { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 24px; align-items: start; }
.answer .checked { grid-column: 1 / -1; }
.answer-text { display: block; }
.answer-sub { line-height: 1.6; }
h3 { color: var(--ink-soft); }
@media (max-width: 600px) {
  .gnav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; width: 100%; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .gnav::-webkit-scrollbar { display: none; }
  .gnav a { flex: none; }
  .entry-grid { grid-template-columns: 1fr 1fr; }
  .entry-title { font-size: 15px; }
}

/* 広告・紹介枠 */
.pr-notice { font-size: 12px; color: var(--muted); margin: -8px 0 12px; }
.pr-box { position: relative; background: #fffaf3; border: 1px solid #ecd2b8; border-radius: var(--radius); padding: 14px 18px 10px; margin: 24px 0; }
.pr-label { position: absolute; top: -10px; left: 14px; margin: 0; background: #b4561c; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 4px; }
.pr-title { font-weight: 700; font-size: 17px; margin: 4px 0; }
.pr-text { margin: 4px 0; font-size: 15px; }
.pr-btn { background: var(--orange); }
.pr-btn:hover { background: #8f4415; }
/* 計算例 */
ul.calc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 12px 2em; }
ul.calc li { margin: 4px 0; }
.pr-notice { font-size: 13px; color: var(--ink-soft); background: #fffaf3; border: 1px solid #ecd2b8; border-radius: 6px; padding: 4px 10px; margin: 0 0 14px; display: inline-block; }
.kuni-note { display: block; font-weight: 400; font-size: 12px; color: var(--ink-soft); }

/* 更新履歴 */
.changelog { list-style: none; padding: 0; margin: 0 0 12px; }
.changelog li { padding: 8px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.changelog time { display: inline-block; min-width: 9.5em; color: var(--muted, #6b7280); font-size: .9em; }
