/* 見た目の方針（2026-11-09 改訂）
   参考に見たもの（SANKOU!）：川崎グリーンエナジー・サン防災（街のイラスト＋場所の印）、マネックス証券・みんなの銀行（線画）。
   借りたのは「イラストで街を描き、その上で場所ごとの状態を示す」という構造だけで、絵・色・書体は自前。

   「AIが作ったように見える」特徴を避けるための決まり（docs/design-log.md に根拠）
   - 箱に入れない。面は地（生成り）だけにして、区切りは罫線で付ける。箱にするのは計算結果の1か所だけ
   - 見出しの上に小さな札を置かない。節の見出しは主役の1節だけ大きくし、ほかは控えめにする
   - 同じ幅のカードを3つ並べない。数字は文の中に組む
   - 青〜紫（色相210〜270°）を使わない。色は役割があるものだけ：だいだい＝押すボタン、若葉＝受付中、朱＝残りわずか。リンクは墨＋下線
   - 値の種類を絞る。角丸は 4px（小さな部品）・12px（計算結果）・丸（ボタン）の3つ。
     文字の大きさは 12/14/16/20/28/40px と大きな数字の 56px。余白は 4・8・12・16・24・32・48・64・96px
   - 書体は2つ。見出し・数字・名前は Zen丸ゴシック、本文と操作は Zen角ゴシック New。小さな和文は太字にしない */
:root {
  --ink: #2b2a26;      /* 墨：本文・線・リンク */
  --ink-2: #5a564c;    /* 補足 */
  --faint: #8f897c;    /* 薄い文字 */
  --line: #e2dacb;     /* 罫線 */
  --line-2: #cbc1ae;   /* 強めの罫線・入力の枠 */
  --paper: #fbf8f1;    /* 地 */
  --sky: #f1e7d3;      /* イラストの空・帯 */
  --amber: #e9a640;    /* 押すボタンだけ */
  --open: #5d7f4c;     /* 受付中 */
  --low: #c4623a;      /* 残りわずか */
  --closed: #c9c1b1;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--gothic); font-size: 16px; line-height: 1.85; letter-spacing: 0.02em; }
a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ink); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.wide { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
small { font-size: 0.5em; letter-spacing: 0; margin-left: 2px; font-weight: 500; }
.nw { white-space: nowrap; }

/* 試作の帯と札 */
.proto { background: var(--ink); color: #e9e3d6; font-size: 12px; line-height: 1.6; padding: 8px 16px; text-align: center; }
.proto .mark { color: #e9e3d6; border-color: #7a7468; }
.mark { display: inline-block; font-family: var(--gothic); font-size: 12px; line-height: 1.5; color: var(--ink-2); border: 1px solid var(--faint); border-radius: 4px; padding: 0 4px; margin: 0 8px; vertical-align: 2px; font-weight: 400; letter-spacing: 0; }

/* ヘッダー */
header.site .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--round); font-weight: 700; font-size: 16px; letter-spacing: 0.04em; }
.logo { width: 30px; height: 18px; flex: none; }
.pr { font-size: 12px; color: var(--faint); white-space: nowrap; }

/* 見出し・数字は丸ゴシック */
h1, h2, .hs-n, .sc-max .v, .res-main .big, .cta-title, .tile-name, .r-amount-v, .r-name, .log-title { font-family: var(--round); }
h1 { font-weight: 700; letter-spacing: 0.02em; }
h2 { font-size: 20px; line-height: 1.5; font-weight: 700; margin: 0; letter-spacing: 0.02em; }
main { padding-bottom: 96px; }
section { margin-top: 64px; }
section.first { margin-top: 48px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 12px; margin-bottom: 24px; border-bottom: 1px solid var(--line-2); }
.sec-primary { border-bottom: 2px solid var(--ink); }
.sec-primary h2 { font-size: 28px; }
.spot { width: 96px; height: 80px; flex: none; margin-bottom: -8px; }
.note { font-size: 14px; color: var(--ink-2); margin: 16px 0 0; line-height: 1.8; }
.src { font-size: 12px; color: var(--ink-2); margin: 16px 0 0; line-height: 1.8; }
.crumb { font-size: 12px; color: var(--ink-2); margin: 24px 0 12px; }
.crumb span { margin: 0 8px; color: var(--faint); }

/* 1画面目（県のまとめ）：見出し → 数字を含む一文 → 説明 → 絵 */
.hero { background: var(--sky); }
.hero-text { padding-top: 48px; padding-bottom: 32px; }
.hero h1 { font-size: 40px; line-height: 1.5; margin: 0 0 24px; }
.hero-status { margin: 0 0 16px; max-width: 620px; line-height: 1.6; }
.hs-n { font-size: 56px; line-height: 1; font-weight: 700; margin-right: 8px; vertical-align: -4px; }
.hs-t { font-size: 20px; line-height: 1.6; font-family: var(--round); font-weight: 500; }
.lead { margin: 0; max-width: 40em; font-size: 16px; line-height: 2; color: var(--ink-2); }
.hero-date { display: inline-block; margin-left: 12px; font-size: 12px; color: var(--faint); }
.hero-art { max-width: 1120px; margin: 0 auto; }
.hero-illust { display: block; width: 100%; height: auto; }
.hero-sp { display: none; }

/* 状態の印 */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--closed); flex: none; }
.dot-open { background: var(--open); }
.dot-low { background: var(--low); }
.dot-unknown { background: transparent; border: 1.5px solid var(--faint); }
.dot-partial { background: linear-gradient(90deg, var(--open) 50%, transparent 50%); border: 1.5px solid var(--open); }

/* 予算の残りの棒 */
.meter { display: inline-block; height: 4px; width: 96px; background: var(--line); border-radius: 9999px; overflow: hidden; vertical-align: middle; flex: none; }
.meter > span { display: block; height: 100%; background: var(--open); }
.meter-low > span { background: var(--low); }

/* 主役の節：地図（左）と一覧（右） */
.split { display: grid; grid-template-columns: 400px 1fr; gap: 48px; align-items: start; }
.map-wrap { position: sticky; top: 24px; }
.map { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(5, auto); gap: 4px; }
.tile { display: flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 4px 8px; border-radius: 4px; background: var(--sky); text-decoration: none; color: var(--ink); outline: 1px solid transparent; transition: outline-color .15s; }
.tile:hover { outline-color: var(--ink); }
.tile-name { font-size: 14px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.tile-sub { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.tile-low { background: #f3dccd; }
.tile-closed { background: transparent; outline: 1px dashed var(--line-2); color: var(--faint); }
.tile-closed .tile-sub { color: var(--faint); }
.tile-partial { background: transparent; outline: 1px solid var(--open); }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 16px 0 0; font-size: 12px; color: var(--ink-2); }
.map-legend .legend-note { width: 100%; color: var(--faint); }

/* 市の一覧 */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li:first-child a { padding-top: 4px; }
.rows a { display: grid; grid-template-columns: 6em 9.5em 1fr auto; grid-template-areas: "name status budget amount" "name status budget amount2"; align-items: center; column-gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.rows a:hover .r-name { text-decoration: underline; text-underline-offset: 4px; }
.r-name { font-size: 16px; font-weight: 700; }
.r-status { font-size: 14px; white-space: nowrap; }
.r-budget { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.r-budget-t { white-space: nowrap; line-height: 1.5; }
.r-asof { display: block; color: var(--faint); white-space: normal; }
.r-name { grid-area: name; } .r-status { grid-area: status; } .r-budget { grid-area: budget; }
.r-amount { grid-area: amount; text-align: right; white-space: nowrap; line-height: 1.5; }
.r-amount.r-amount-pv { grid-area: amount2; }
.r-amount-k { display: inline-block; width: 8.5em; text-align: left; font-size: 12px; color: var(--faint); }
.r-amount-v { font-size: 20px; font-weight: 700; }
.r-none { font-size: 14px; font-weight: 500; color: var(--faint); font-family: var(--gothic); }
.rows li.off .r-name, .rows li.off .r-status, .rows li.off .r-amount-v { color: var(--faint); }

/* 確認の記録：箱にせず、左の罫線だけ */
.log { margin-top: 64px; padding: 4px 0 4px 24px; border-left: 2px solid var(--ink); }
.log-title { margin: 0 0 8px; font-weight: 700; font-size: 16px; }
.log ul { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 9em 1fr; gap: 12px; font-size: 14px; line-height: 1.9; }
.log time { color: var(--ink-2); }

/* 計算機：入力欄は地の上に直接置く */
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.calc-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ink-2); }
.field { position: relative; display: flex; }
.calc-form input, .calc-form select { width: 100%; font: inherit; font-size: 16px; color: var(--ink); padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; letter-spacing: 0.02em; }
.calc-form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232b2a26' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.calc-form input { padding-right: 56px; }
.calc-form label[hidden], .note[hidden] { display: none; }
.sub-h { font-size: 16px; margin: 24px 0 8px; }
.unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-size: 14px; }
.calc-form input:focus, .calc-form select:focus { outline: 2px solid var(--ink); outline-offset: 1px; }

.result { margin-top: 24px; }
.res-main { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; background: var(--ink); color: var(--paper); border-radius: 12px; padding: 24px 32px; }
.res-main .k { display: block; font-size: 12px; color: #cfc7b6; }
.res-main .big { display: block; font-size: 40px; line-height: 1.3; font-weight: 700; color: var(--paper); }
.res-main > div + div { border-left: 1px solid #4a4740; padding-left: 24px; }
.res-main .sub { display: block; font-size: 12px; color: #cfc7b6; }
.res-note { font-size: 14px; margin: 12px 0 0; }
.tag { display: inline-block; font-size: 12px; line-height: 1.5; color: var(--ink-2); background: var(--line); border-radius: 4px; padding: 0 4px; margin: 0 8px; vertical-align: 2px; }

.res-table { width: 100%; border-collapse: collapse; }
.res-table th { font-size: 12px; font-weight: 400; color: var(--ink-2); text-align: left; padding: 8px 0; border-bottom: 2px solid var(--ink); }
.res-table td { padding: 12px 0; border-bottom: 1px solid var(--line); }
.res-table .n { text-align: right; white-space: nowrap; padding-left: 16px; }
.res-table td.n { font-family: var(--round); font-weight: 700; font-size: 20px; }
.res-table tr.off td { color: var(--faint); }
.res-table tr.off a { color: var(--faint); }

/* 見積もりへの導線：箱ではなく、画面の端から端までの帯 */
.cta { margin-top: 64px; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); background: var(--sky); }
.cta-in { max-width: 760px; margin: 0 auto; padding: 48px 24px; display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: center; }
.cta-title { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.cta-lead { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.9; }
.cta-act { text-align: center; }
.btn { display: inline-block; background: var(--amber); color: var(--ink); font-family: var(--round); font-weight: 700; font-size: 16px; letter-spacing: 0.04em; padding: 16px 32px; border-radius: 9999px; text-decoration: none; white-space: nowrap; transition: transform .12s, background-color .12s; }
.btn:hover { background: #dd9530; }
.btn:active { transform: translateY(1px); }
.cta-sub { margin: 8px 0 0; font-size: 12px; color: var(--faint); }

/* 市のページの1画面目：箱にせず、上下の罫線で区切る */
.city-h1 { font-size: 28px; line-height: 1.5; margin: 0 0 24px; }
.summary-card { margin-top: 0; border-top: 2px solid var(--ink); }
.sc-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.sc-status { font-size: 16px; font-weight: 500; }
.sc-maxes { display: flex; gap: 32px; }
.sc-max { text-align: right; }
.sc-max .k { display: block; font-size: 12px; color: var(--faint); }
.sc-max .v { font-size: 40px; line-height: 1.2; font-weight: 700; }
.summary { margin: 0; }
.summary .row { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--ink-2); font-size: 14px; padding-top: 2px; }
.summary dd { margin: 0; font-size: 16px; }
.summary dd .meter { display: block; width: 100%; max-width: 320px; margin: 8px 0; }

.list { padding-left: 1.2em; margin: 0; }
.list li { margin: 8px 0; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 12px 0 12px 48px; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 12px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--ink); font-family: var(--round); font-weight: 700; font-size: 14px; line-height: 26px; text-align: center; }

/* フッター */
footer.site { background: var(--ink); color: #cfc7b6; padding: 48px 0 64px; font-size: 12px; line-height: 1.9; }
footer.site p { margin: 0 0 8px; }
.foot-brand { display: flex; align-items: center; gap: 8px; color: var(--paper); font-family: var(--round); font-weight: 700; font-size: 16px; margin-bottom: 16px !important; }
footer .logo g[stroke] { stroke: var(--paper); }

/* 見出しは文節の切れ目で改行する */
h1, h2, .cta-title { word-break: auto-phrase; text-wrap: balance; }
.hs-t { word-break: auto-phrase; }
.lead { text-wrap: pretty; }

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .map-wrap { position: static; max-width: 520px; }
}
@media (max-width: 560px) {
  .wrap, .wide { padding: 0 16px; }
  .hero-text { padding-top: 32px; padding-bottom: 24px; }
  .hero h1 { font-size: 28px; }
  .hs-n { font-size: 48px; }
  .hs-t { font-size: 16px; }
  .hero-pc { display: none; }
  .hero-sp { display: block; }
  h2 { font-size: 20px; }
  .sec-primary h2 { font-size: 20px; }
  .spot { width: 72px; height: 60px; }
  .tile { min-height: 48px; padding: 4px; }
  .tile-name { font-size: 12px; }
  .tile-sub { font-size: 12px; transform: scale(.85); transform-origin: left; }
  .tile-sub .dot { width: 6px; height: 6px; margin-right: 4px; }
  .calc-form { grid-template-columns: 1fr; gap: 12px; }
  .res-main { grid-template-columns: 1fr; padding: 16px 24px; gap: 12px; }
  .res-main > div + div { border-left: 0; padding-left: 0; border-top: 1px solid #4a4740; padding-top: 12px; }
  .res-main .big { font-size: 28px; }
  .res-table td.n { font-size: 16px; }
  .cta-in { grid-template-columns: 1fr; padding: 32px 16px; }
  .btn { display: block; text-align: center; }
  .city-h1 { font-size: 28px; }
  .sc-max .v { font-size: 28px; }
  .summary .row { grid-template-columns: 1fr; gap: 0; }
  .log { padding-left: 16px; }
  .log li { grid-template-columns: 1fr; gap: 0; }
  .rows a { grid-template-columns: 1fr; grid-template-areas: "name" "status" "budget" "amount" "amount2"; row-gap: 4px; }
  .r-amount { text-align: left; }
  .sc-top { flex-direction: column; align-items: flex-start; }
  .sc-maxes { gap: 24px; }
  .sc-max { text-align: left; }
}

/* 運営者情報などの文章ページ・フッターの案内・PR表示（2026-11-10） */
.prose { padding-bottom: 64px; }
.prose h2 { font-size: 20px; margin: 0 0 12px; }
.prose p, .prose li { line-height: 1.9; }
.prose ul { padding-left: 1.4em; }
.prose .summary { margin-top: 24px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #4a453d; }
.foot-nav a { color: #e9e3d6; }
.pr-tag { display: inline-block; font-family: var(--sans, sans-serif); font-size: 11px; font-weight: 500; line-height: 1; letter-spacing: 0.04em; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 3px 5px; margin-right: 8px; vertical-align: 3px; }

/* 計算結果の下の見積もり案内・追従バー・トップの見出し（2026-11-10） */
.h1-sub { font-size: 0.62em; font-weight: 500; }
.sc-jump { margin: 16px 0 0; font-size: 14px; }
.next { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.next-lead { margin: 0; font-size: 16px; line-height: 1.9; }
.next-fact { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.next-act { display: flex; align-items: center; gap: 4px; margin-top: 20px; }
.next-act .pr-tag { margin-right: 4px; }
.next-sub { margin: 8px 0 0; font-size: 12px; color: var(--faint); line-height: 1.8; }
.btn[aria-disabled="true"] { cursor: default; }
.sticky { display: none; }
@media (max-width: 560px) {
  .next-act { flex-direction: column; align-items: stretch; }
  .next-act .pr-tag { align-self: flex-start; }
  .sticky:not([hidden]) { display: flex; align-items: center; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line-2); }
  .sticky .btn { flex: 1; padding: 12px 16px; font-size: 15px; }
}

/* ---- 54市町村のときの地域ごとの一覧（地図の代わり） ---- */
.region-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.region-nav a { display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 14px; }
.region-nav a:hover { border-color: var(--ink); }
.region-nav small { color: var(--faint); font-size: 12px; }
.region-h { display: flex; align-items: baseline; gap: 8px; margin: 40px 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-family: var(--round); font-size: 18px; scroll-margin-top: 16px; }
.region-h small { font-family: inherit; font-size: 13px; font-weight: 500; color: var(--faint); }
.more { margin: 16px 0 0; font-size: 14px; }

/* 導線（2026-11-11）：ヘッダーの行き先・トップの市町村を選ぶ欄・フッターの全市町村・申請の順番の下の見積もり・受付終了の案内 */
.gnav { display: flex; gap: 24px; margin-left: auto; font-size: 14px; }
.gnav a { color: var(--ink-2); text-decoration: none; }
.gnav a:hover { color: var(--ink); text-decoration: underline; }
.pick { margin: 24px 0 32px; max-width: 420px; }
.pick label { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }
.pick select { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 4px; padding: 12px 40px 12px 12px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232b2a26' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.pick select:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.foot-cities { margin: 0 0 32px; padding-bottom: 24px; border-bottom: 1px solid #4a453d; }
.fc-title { color: var(--paper); font-size: 14px; margin-bottom: 8px !important; }
.fc-row { display: grid; grid-template-columns: 7em 1fr; gap: 0 16px; }
.fc-r { color: #8f897c; }
.fc-links { display: flex; flex-wrap: wrap; gap: 0 16px; }
.fc-row a { color: #e9e3d6; }
.step-cta { margin-top: 24px; }
.step-cta-lead { margin: 0; font-size: 14px; color: var(--ink-2); }
.step-cta .next-act { margin-top: 12px; }
.next-gain { margin: 12px 0 0; font-size: 16px; line-height: 1.9; }
.closed-box { border-top: 1px solid var(--line-2); }
.closed-box h2 { font-size: 20px; margin: 0 0 12px; }
.closed-box p { margin: 0 0 12px; }
.closed-act { margin-top: 20px !important; }
.ics { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border: 1px solid var(--ink); border-radius: 9999px; text-decoration: none; font-family: var(--round); font-weight: 700; font-size: 16px; }
.ics:hover { background: var(--sky); }
.ics-i { width: 20px; height: 20px; flex: none; }
@media (max-width: 560px) {
  header.site .bar { flex-wrap: wrap; height: auto; padding-top: 16px; padding-bottom: 8px; row-gap: 4px; }
  .gnav { order: 3; width: 100%; margin-left: 0; gap: 20px; }
  .fc-row { grid-template-columns: 1fr; margin-bottom: 12px !important; }
  .ics { display: flex; justify-content: center; }
}
