/* 地図以外のページ（説明・データ・解説・規約など）の共通スタイル（2026-10-04）。
   旧 about.html のページ内 <style> を元に、共通ナビゲーション（ヘッダー・フッター）と表を足した。
   地図画面（style.css）とは独立＝ここを変えても地図の表示は変わらない。枠は backend/pages.py の _shell */
:root { color-scheme: only light; }
body { margin: 0; background: #f5f2ec; color: #1a1a1a; font-family: "Hiragino Kaku Gothic ProN", "Meiryo", "Yu Gothic", sans-serif; line-height: 1.7; }

/* ヘッダー: サイト名 + ナビ。画面の上に固定する（2026-10-04・ユーザー指示。スクロールしてもメニューが残る）。
   - 860px 以上: ナビを横並び 1 行（必要な幅は実測 832px + スクロールバー＝2026-10-14 にコラムを足した後の値）。高さ 52px
   - 859px 以下: 「サイト名 + ☰ メニュー」の 1 行（高さ 48px）。旧実装はナビが折り返して 360 幅 115px・740 幅 81px あり、
     固定すると本文が狭くなるため。☰（#nav-toggle のチェックボックスと label）でナビをヘッダーの下に重ねて開く。
     開閉は CSS だけ＝JavaScript が無効でも動く。HTML は backend/pages.py の _shell（ナビは 1 つだけ）
   scroll-padding-top: ページ内リンク・見出しへの移動で、見出しが固定ヘッダーの下に隠れないようにする */
html { scroll-padding-top: 64px; }
.site-header { position: sticky; top: 0; z-index: 100; background: #1a5c2e; color: #fff; padding: 8px 16px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 20px; row-gap: 2px; }
.site-title { color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; white-space: nowrap; }
.site-nav { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 0; }   /* 2026-10-14: コラムを足して 860px でも 1 行に収まるよう 14→12px（必要な幅 832px + スクロールバー） */
.site-nav a { color: rgba(255,255,255,.9); text-decoration: none; font-size: 13px; padding: 6px 0; white-space: nowrap; }
.site-nav a:hover { color: #fff; text-decoration: underline; }
.site-nav a[aria-current="page"] { color: #fff; font-weight: 700; border-bottom: 2px solid #fff; }
/* チェックボックスは見えなくするが Tab では届く（display:none にしない） */
.nav-toggle { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.nav-btn { display: none; }
@media (max-width: 859px) {
  .site-header { flex-wrap: nowrap; justify-content: space-between; column-gap: 8px; }
  .site-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .nav-btn { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 32px; padding: 0 8px; margin-right: -8px;
             border-radius: 4px; color: rgba(255,255,255,.9); font-size: 13px; white-space: nowrap; cursor: pointer; user-select: none; }
  .nav-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
  .nav-toggle:focus-visible + .nav-btn { outline: 2px solid #fff; }
  .nav-toggle:checked + .nav-btn { background: rgba(255,255,255,.2); color: #fff; }
  /* 一覧（地図画面のヘッダーのメニューと同じ見た目）: ヘッダーの右下に重ねる。画面より長いときは中でスクロール */
  .site-nav { display: none; position: absolute; right: 8px; top: calc(100% + 6px); flex-direction: column; flex-wrap: nowrap;
              min-width: 190px; max-height: calc(100dvh - 64px); overflow-y: auto; background: #fff; border: 1px solid #cfd8dc;
              border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.25); padding: 4px 0; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { color: #1a1a1a; font-size: 14px; line-height: 1.3; padding: 10px 14px; }
  .site-nav a:hover { background: #eef3ef; color: #1a1a1a; text-decoration: none; }
  .site-nav a[aria-current="page"] { color: #1a5c2e; font-weight: 700; border-bottom: none; }
}

main { max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; }
.catch { font-size: 30px; font-weight: 800; color: #1a7d3c; margin: 12px 0 4px; letter-spacing: .02em; }
h1 { font-size: 22px; margin: 8px 0 12px; line-height: 1.4; }
h2 { font-size: 17px; margin: 28px 0 8px; border-left: 4px solid #1a7d3c; padding-left: 8px; line-height: 1.4; }
h3 { font-size: 15px; margin: 16px 0 4px; }
p, li, td, th, dd, dt { font-size: 14px; }
ul, ol { padding-left: 20px; }
li { margin-bottom: 4px; }
a { color: #1a5c2e; }
.lead { font-size: 15px; }
.cta { display: inline-block; margin: 12px 0; padding: 10px 18px; background: #1a7d3c; color: #fff; border-radius: 6px; text-decoration: none; font-weight: 700; }
/* 青いボタン（2026-10-15・v6）: /contact の「お問い合わせフォームを開く」。大きさ・角・太さは .cta と同じで色だけ青。
   #1558b0 は白文字と 6.87:1（4.5:1 以上）、ヘッダーの緑 #1a7d3c や工事帯の赤・橙と紛れない */
.cta.cta-blue { background: #1558b0; }
.note { background: #fff8e1; border: 1px solid #e8dfc0; border-radius: 6px; padding: 10px 12px; color: #5d4c1e; font-size: 13px; }
.updated { font-size: 12px; color: #666; }
.signature { text-align: right; }   /* コラムの末尾の「（運営者）」（2026-10-15・v5） */
/* コラムの一覧（/column/・2026-10-14）: 題名・概要・更新日を 1 記事 1 項目で */
.column-list { list-style: none; padding: 0; margin: 12px 0; }
.column-list li { background: #fff; border: 1px solid #e3ddcf; border-radius: 6px; padding: 12px 14px; margin-bottom: 12px; }
.column-list li > a { font-size: 16px; font-weight: 700; line-height: 1.4; }
.column-list li p { margin: 6px 0 0; }
/* パンくず（2026-11-17・v10）: /column/sapa/ の上に置く「コラム › SA・PA に行ってみた」 */
.breadcrumb { font-size: 13px; color: #666; margin: 0 0 4px; }

/* コラムの写真（2026-11-08・v9）: 記事中の写真とキャプション。本文幅いっぱい・角丸・下に小さく説明。
   width/height 属性 + aspect-ratio で読み込み前から高さを確保する（CLS を抑える） */
figure.photo { margin: 14px 0 18px; }
figure.photo img { display: block; box-sizing: border-box; width: 100%; height: auto; aspect-ratio: 1600 / 901; border-radius: 6px; border: 1px solid #d9d4c7; background: #eee; }
figure.photo figcaption { font-size: 12px; color: #666; margin-top: 4px; }
/* 出典などの長い URL のリンクが狭い幅でもはみ出さないよう、途中でも折り返せるようにする（2026-11-08・v9） */
main a { overflow-wrap: anywhere; }

/* 表（解説ページ・外部送信の表）。狭い幅でもはみ出さないよう折り返す */
table { border-collapse: collapse; width: 100%; margin: 8px 0 12px; background: #fff; }
th, td { border: 1px solid #d9d4c7; padding: 6px 8px; vertical-align: top; text-align: left; word-break: break-word; }
th { background: #ece8dd; font-weight: 700; }
.ext-send-table th:first-child, .ext-send-table td:first-child { width: 24%; }
/* 数値の表（集計記事・2026-10-14）: 狭い画面で数字が途中で折り返さないように。8 列でも 360px に収まるよう文字を少し小さく */
table.stats th, table.stats td { white-space: nowrap; }
@media (max-width: 480px) { table.stats { font-size: 0.85em; } table.stats th, table.stats td { padding-left: 4px; padding-right: 4px; } }
.ext-send-note { font-size: 12px; color: #666; }

/* 表示の見本（解説ページ）: 地図の帯・一覧のタグと同じ色 */
.swatch { display: inline-block; width: 28px; height: 8px; border-radius: 4px; vertical-align: middle; margin-right: 6px; }
.tag { display: inline-block; font-size: 12px; padding: 0 6px; border-radius: 3px; background: #ece8dd; border: 1px solid #d9d4c7; white-space: nowrap; }

/* 解説の一覧（各解説ページの末尾） */
/* 今夜の夜間通行止めの欄（2026-10-20・v7）: 控えめな枠 1 つ。文字は本文と同じ大きさ */
.tonight { margin: 14px 0 20px; padding: 4px 14px 8px; background: #fff; border: 1px solid #d9d4c7; border-radius: 6px; }
.tonight h2 { border-left: none; padding-left: 0; margin: 10px 0 6px; font-size: 15px; }
.tonight ul { margin: 6px 0; padding-left: 1.4em; }
.tonight p { margin: 6px 0; }
.tonight .tonight-foot { color: #555; }
/* 手動の広告ユニット（2026-10-20・v8。backend/pages.py insert_ads。ID 設定時だけ HTML が出る）: 上下に余白を取り、上に小さく「広告」。
   最小の高さは ins の style（ID 設定時だけ）で確保 */
/* 広告（忍者AdMax・2026-11-24・v12）: 300×250 を中央に。高さは先に取っておく（表示されたときに本文がずれないように） */
.ad-unit { margin: 28px 0; text-align: center; }
.ad-unit .ad-label { display: block; font-size: 11px; color: #888; margin-bottom: 2px; text-align: left; }
.ad-unit .admax-ads { min-width: 300px; min-height: 250px; }
.guide-list { margin-top: 36px; padding: 4px 14px 10px; background: #fff; border: 1px solid #d9d4c7; border-radius: 6px; }
/* 一覧の箱が続くとき（2026-11-18・v11: SA・PA の記事の一覧の下の「人気のコラム」）は、間を詰める */
.guide-list + .guide-list { margin-top: 14px; }
.guide-list h2 { border-left: none; padding-left: 0; margin-top: 12px; font-size: 15px; }

.site-footer { max-width: 760px; margin: 0 auto; padding: 12px 16px 28px; font-size: 12px; color: #666; border-top: 1px solid #d9d4c7; }
.site-footer nav { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 0; }
.site-footer nav a { font-size: 13px; padding: 4px 0; white-space: nowrap; }
.site-footer nav a[aria-current="page"] { font-weight: 700; text-decoration: none; }
.site-footer p { font-size: 12px; margin: 8px 0 0; }
