@charset "utf-8";
/* ===============================================
   kingstone-project.jp/shakyo/  style.css
   =============================================== */

/* ---------- 基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, figure { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 56px; } /* 56px＝上のバーの高さ。ページ内リンクで見出しがバーに隠れない */
body {
  font-family: "Noto Sans JP", "游ゴシック体", YuGothic, "Yu Gothic", sans-serif;
  color: #000;
  background: #fff;
  line-height: 1.8;
}
img { max-width: 100%; height: auto; vertical-align: top; }
a { color: inherit; text-decoration: none; transition: opacity .2s; }
.sp { display: inline; }
.pc { display: none; }
@media (min-width: 768px) { .sp { display: none; } .pc { display: inline; } } /* 768px＝これより広いとPC表示 */

/* ---------- ★スクロールで出てくる動き（全ページ共通） ---------- */
.ef {
  opacity: 0;
  transform: translateY(20px);                      /* 20px＝下からずれて出てくる距離 */
  transition: opacity .8s ease var(--d, 0s), transform .8s ease var(--d, 0s); /* .8s＝出てくる速さ。--d＝遅らせる時間 */
}
.ef.on { opacity: 1; transform: none; }

/* ---------- ★上のバー（全ページ共通） ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 56px;                                     /* 56px＝バーの高さ */
  padding: 0 20px;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid #e8e8e8;
}
.topbar-logo { font-family: "Oswald", sans-serif; font-weight: 700; font-size: 18px; letter-spacing: .04em; color: #f40d0d; white-space: nowrap; }
.topbar-nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-nav a { font-family: "Oswald", sans-serif; font-weight: 500; font-size: 14px; letter-spacing: .05em; white-space: nowrap; }
.topbar a:hover { opacity: .6; }                    /* ★文字やボタン：少し薄く */
@media (max-width: 767px) {
  .topbar { padding: 0 12px; gap: 12px; }
  .topbar-logo { font-size: 15px; }
  .topbar-nav { gap: 14px; }
  .topbar-nav a { font-size: 12px; }
}

/* ---------- このページの土台 ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 0 20px; } /* 1100px＝中身の最大の幅 */
.btn { display: inline-block; padding: 14px 40px; color: #fff; background: #f40d0d; border-radius: 40px; font-weight: 700; transition: opacity .2s; }
.btn:hover { opacity: .7; }                          /* ★文字やボタン：少し薄く */

/* ---------- ページの見出し（写真なし。ほかのフォルダの画像に頼らない） ---------- */
.kv {
  display: flex; align-items: center; justify-content: center;
  min-height: 300px; padding: 50px 20px;            /* 300px＝見出しの高さ（PC）。地図を早く見せるため低め */
  background: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.5)), url(../assets/img/kv_bg.jpg) center / cover #333; /* 手の写真（災害・支援のページと同じ。2026-10-25）。.5＝写真を暗くする濃さ（文字を読みやすく） */
  color: #fff; text-align: center;
}
.kv-in > * { animation: up .9s ease both; }
.kv-in > :nth-child(2) { animation-delay: .2s; }
.kv-in > :nth-child(3) { animation-delay: .4s; }
@keyframes up { from { opacity: 0; transform: translateY(20px); } }
.kv-en { font-family: "Oswald", sans-serif; font-size: 20px; letter-spacing: .3em; color: #ffb3b3; }
.kv h1 { margin: 10px 0 18px; font-size: 38px; line-height: 1.4; } /* 38px＝ページ名の大きさ */
.kv-text { max-width: 640px; margin: 0 auto; font-size: 15px; }

/* パンくず */
.crumb { padding: 16px 0 0; font-size: 13px; color: #666; }
.crumb a { color: #f40d0d; }
.crumb a:hover { opacity: .6; }                     /* ★文字やボタン：少し薄く */
.crumb span { margin: 0 8px; }

/* ---------- 地図と情報 ---------- */
.mapwrap { display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; padding: 30px 0 10px; } /* 340px＝右の情報の幅 */
.map svg { display: block; width: 100%; height: auto; }
#prefs path {
  fill: #e4e0da;                                    /* 県の色 */
  stroke: #fff; stroke-width: 1.2;                  /* 1.2＝県境の線の太さ */
  stroke-linejoin: round;
  cursor: pointer; outline: none;
  transition: fill .2s;
}
#prefs path.has-page { fill: #cfc9c0; }             /* 市区町村の地図がある県は少し濃く */
#prefs path:hover, #prefs path:focus-visible { fill: #f9a3a3; } /* マウスを乗せたとき：薄い赤 */
#prefs path.on { fill: #f40d0d; }                   /* 選んだ県：赤 */
.oki-frame-unused { fill: transparent; stroke: #ccc; stroke-dasharray: 4 4; cursor: pointer; } /* 沖縄県の枠（点線）。島が小さいので枠ごと押せる */
.oki-frame-unused:hover ~ #m-okinawa { fill: #f9a3a3; }    /* 枠に乗せても沖縄県を薄い赤に */
.oki-label { font-size: 18px; fill: #888; pointer-events: none; } /* 18px＝「沖縄県」の文字の大きさ */

.panel { position: sticky; top: 132px; padding: 28px 24px; background: #f5f4f2; border-radius: 6px; } /* 132px＝上のバー（56px）＋ページ内タブ（56px）＋20px。スクロールしても情報が見える */
.panel-empty { color: #555; font-size: 14px; text-align: center; }
.panel-en { color: #f40d0d; font-family: "Oswald", sans-serif; font-size: 14px; letter-spacing: .15em; }
.panel-info { animation: up .4s ease both; }        /* .4s＝情報が切り替わるときの速さ */
.panel-region { color: #f40d0d; font-size: 13px; font-weight: 700; }
.panel-name { margin: 2px 0 4px; font-size: 30px; line-height: 1.3; } /* 30px＝県名の大きさ */
.panel-org { margin-bottom: 20px; font-size: 14px; color: #444; }
.panel-site { display: block; padding: 14px 20px; text-align: center; }
.panel-city { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e0dcd6; font-size: 13px; }
.panel-next {                                       /* 「市区町村の〜を地図で見る」：白地に赤い枠のボタン（2026-10-26 目立つように） */
  display: block; padding: 12px 16px; border: 2px solid #f40d0d; border-radius: 30px; background: #fff;
  color: #f40d0d; font-size: 15px; font-weight: 700; text-align: center; line-height: 1.5;
  transition: background .2s, color .2s;
}
.panel-next:hover { background: #f40d0d; color: #fff; } /* マウスを置いた時：赤地に白い字 */
.panel-soon { color: #888; }

/* ---------- 一覧 ---------- */
.block { padding: 70px 0 10px; }                    /* 70px＝ブロックの上の余白 */
.block-head { margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid #e8e8e8; }
.block-head .en { color: #f40d0d; font-family: "Oswald", sans-serif; font-size: 14px; letter-spacing: .15em; }
.block-head h2 { margin: 2px 0 10px; font-size: 26px; line-height: 1.4; }
.block-head p:last-child { font-size: 14px; color: #444; }

.regions { display: grid; gap: 30px; }
.region h3 { margin-bottom: 10px; padding-left: 12px; border-left: 4px solid #f40d0d; font-size: 17px; line-height: 1.4; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; } /* 240px＝カードの最小の幅。小さくすると横に多く並ぶ */
.links a {
  position: relative; display: flex; flex-direction: column; height: 100%;
  padding: 12px 40px 12px 16px; background: #fff; border: 1px solid #e8e8e8; border-radius: 6px;
  transition: border-color .2s;
}
.links a::after { content: "↗"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #f40d0d; }
.links .t { font-size: 14px; font-weight: 700; line-height: 1.5; text-underline-offset: 3px; }
.links .u { margin-top: 2px; font-size: 11px; color: #999; word-break: break-all; }
.links a:hover { border-color: #f40d0d; }
.links a:hover .t { color: #f40d0d; text-decoration: underline; } /* ★名前：赤＋下線 */

.back { margin: 60px 0 30px; text-align: center; }   /* 下の 30px＝すぐ下のバナーとのすき間 */

@media (max-width: 767px) {
  main { padding: 0 14px; }
  .kv { min-height: 240px; }
  .kv h1 { font-size: 24px; }
  .kv-text { font-size: 13px; text-align: left; }
  .mapwrap { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .map { margin: 0 -10px; }                         /* -10px＝スマホでは地図を少し横に広げる */
  .panel { position: static; padding: 22px 18px; }
  .panel-name { font-size: 24px; }
  .block { padding-top: 50px; }
  .block-head h2 { font-size: 21px; }
  .links { grid-template-columns: 1fr 1fr; gap: 8px; }
  .links a { padding: 10px 26px 10px 12px; }
  .links a::after { right: 8px; }
  .links .t { font-size: 13px; }
}

/* ---------- ★フッター（全ページ共通） ---------- */
.footer { padding: 50px 20px; color: #fff; background: #333; font-size: 14px; text-align: center; line-height: 2; }
.footer a { text-decoration: underline; }
.footer a:hover { opacity: .6; }
@media (max-width: 767px) { .footer { padding: 6vw 20px; font-size: 12px; } }

/* ---------- 上のバー: スマホは右の4つのリンクを「≡」にまとめる（押すと、バーの下に白い一覧） ★全ページ共通 ---------- */
.topbar-menu { display: none; }
@media (max-width: 767px) {
  .topbar-nav { display: none; }
  .topbar-menu {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px;                      /* 44px＝押しやすい大きさ */
    margin-right: -8px; padding: 0 10px;
    border: 0; background: none; cursor: pointer;
  }
  .topbar-menu span { display: block; height: 2px; border-radius: 2px; background: #333; transition: transform .25s, opacity .25s; }
  .topbar.is-open .topbar-menu span:nth-child(1) { transform: translateY(7px) rotate(45deg); }   /* ≡ → × */
  .topbar.is-open .topbar-menu span:nth-child(2) { opacity: 0; }
  .topbar.is-open .topbar-menu span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .topbar.is-open .topbar-nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 56px; left: 0; right: 0;   /* 56px＝バーの高さ（このすぐ下に出す） */
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 10px 24px rgba(0,0,0,.12);
  }
  .topbar.is-open .topbar-nav a { padding: 16px 20px; font-size: 16px; border-top: 1px solid #f0f0f0; }
  .topbar.is-open::after {                          /* 後ろのページを薄暗く（押すと閉じる） */
    content: ""; position: fixed; top: 56px; right: 0; bottom: 0; left: 0; z-index: -1;
    background: rgba(0,0,0,.35);
  }
}

/* ---------- ページ内タブ（handtohand と同じ形。2026-10-25） ---------- */
html { scroll-padding-top: 110px; }                 /* 110px＝上のバー＋タブの高さ。移動先の見出しが隠れない */
.tabs {
  position: sticky; top: 56px; z-index: 9;          /* 56px＝上のバーの高さ。そのすぐ下に止まる */
  display: flex; justify-content: center; gap: 6px;
  padding: 10px 16px; overflow-x: auto; scrollbar-width: none;
  background: #fff; border-bottom: 1px solid #e8e8e8;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex-shrink: 0; padding: 6px 14px; border-radius: 20px; background: #f5f4f2; font-size: 13px; font-weight: 700; white-space: nowrap; transition: background .2s, color .2s; }
.tabs a:hover, .tabs a:active, .tabs a.is-current { background: #f40d0d; color: #fff; }   /* マウスを置いた時・押した時・今いる場所 */
@media (max-width: 767px) {
  html { scroll-padding-top: 104px; }
  .tabs { justify-content: flex-start; }
}

/* ---------- 地方で選ぶ（2026-10-26） ---------- */
.area { padding: 26px 0 0; }                        /* 26px＝パンくずとのすき間 */
.area-ttl { margin-bottom: 10px; font-size: 15px; font-weight: 700; }
.area-ttl span { margin-left: 6px; font-size: 12px; font-weight: 400; color: #888; }
.area-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.area-btns button, .area-prefs button {
  padding: 8px 16px; border: 1px solid #e0dcd6; border-radius: 20px; background: #fff;
  font: inherit; font-size: 14px; font-weight: 700; color: #222; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.area-btns button:hover, .area-btns button.on,
.area-prefs button:hover, .area-prefs button.on { background: #f40d0d; border-color: #f40d0d; color: #fff; } /* マウスを置いた時・選んでいる所：赤 */
.area-box { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: center; margin-top: 14px; padding: 20px; background: #f5f4f2; border-radius: 6px; } /* 300px＝右の県のボタンの幅 */
.area-box[hidden] { display: none; }
.area-box { position: relative; }
.area-close { position: absolute; top: 10px; right: 12px; z-index: 1; padding: 4px 10px; border: 0; background: none; font: inherit; font-size: 13px; color: #666; cursor: pointer; } /* 右上の「閉じる ×」 */
.area-close:hover { color: #f40d0d; }
.area-map { display: block; width: 100%; height: 360px; overflow: hidden; }  /* 360px＝地方の地図の高さ（PC） */
.area-map path { fill: #fff; stroke: #cfc9c0; stroke-width: .8; stroke-linejoin: round; cursor: pointer; outline: none; transition: fill .2s; }
.area-map path:hover, .area-map path:focus-visible { fill: #f9a3a3; } /* 日本地図と同じ：薄い赤 */
.area-map path.on { fill: #f40d0d; }                                    /* 日本地図と同じ：赤 */
.area-map text { fill: #555; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.area-map text { paint-order: stroke; stroke: #fff; stroke-linejoin: round; } /* 県名に白い縁取り */
.area-map text.on { fill: #fff; stroke: #f40d0d; }                                      /* 選んだ県の名前は白 */
.area-prefs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.area-prefs button { padding: 10px 8px; }
@media (max-width: 767px) {
  .area { padding-top: 18px; }
  .area-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } /* 3＝1行に並ぶ地方の数（9つで3×3） */
  .area-btns button { padding: 8px 2px; font-size: 13px; }
  .area-box { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
  .area-map { height: 280px; }                      /* 280px＝地方の地図の高さ（スマホ） */
  .area-prefs { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .area-prefs button { padding: 10px 2px; font-size: 13px; }
}

/* ---------- 一番下のバナー（kingstone-project.jp の全ページでそろえる。2026-10-25） ----------
   1つの幅は 600px（2つ並ぶと 600px×2＋すき間20px＝1220px）。スマホは画面の幅いっぱい */
.bnrs { display: flex; justify-content: center; gap: 20px; max-width: 1220px; margin: 30px auto 0; padding: 0 0 80px; } /* 30px＝上とのすき間 ／ 20px＝バナーとバナーのすき間 */
.bnr { flex: 0 1 600px; margin: 0; }   /* 600px＝バナー1つの幅（2026-10-25 tonozuka.net とそろえる） */
.bnr a { display: block; overflow: hidden; }
.bnr img { width: 100%; height: auto; transition: transform .4s ease; }
.bnr a:hover img { transform: scale(1.04); }      /* ★写真：1.04倍（ほかのページのバナーと同じ） */
@media (max-width: 767px) {
  .bnrs { flex-direction: column; gap: 12px; }
  .bnr { flex: none; }
}
/* 本文の幅が狭いページでも、バナーはほかのページと同じ大きさ（1つ 600px）にする（PCだけ。スマホは今のまま）
   並び全体を 1220px（画面が狭いときは 画面の幅−40px）にして、本文の真ん中にそろえる */
@media (min-width: 768px) {
  .bnrs { width: min(1220px, calc(100vw - 40px)); max-width: none; margin-left: calc(50% - min(610px, 50vw - 20px)); margin-right: 0; } /* 610px＝1220px の半分 ／ 20px＝左右の余白 */
}

/* ---------- 大分県のページだけ（2026-10-26） ---------- */
.lake { fill: #fff; stroke: #cfc9c0; stroke-width: .8; pointer-events: none; } /* 湖：白で抜く（海と同じ白） */
.lake-name { font-size: 22px; fill: #9a948c; text-anchor: middle; dominant-baseline: central; pointer-events: none; } /* 22px＝湖の名前の大きさ */
.panel-links a { display: block; padding: 4px 0; color: #f40d0d; font-size: 14px; font-weight: 700; text-underline-offset: 3px; } /* 県全体・全国へのリンク */
.panel-links a:hover { text-decoration: underline; }   /* ★名前：赤＋下線（全国のページの書き方と同じ） */
.map-src { margin-top: 6px; font-size: 11px; color: #999; text-align: right; } /* 地図の出典 */
.tip { position: fixed; z-index: 20; padding: 3px 8px; background: #222; color: #fff; font-size: 12px; border-radius: 3px; pointer-events: none; transform: translate(12px, -130%); } /* マウスの右上に出る札 */
.tip[hidden] { display: none; }
.txt-link { color: #f40d0d; text-decoration: underline; text-underline-offset: 3px; }
.txt-link:hover { opacity: .6; }
.crumb .nw { margin: 0; white-space: nowrap; } /* 「大分県」を途中で折り返さない */
@media (max-width: 767px) {
}

/* #map で開いたとき、地図の上のパンくずまで見えるように、少し上で止める（2026-10-26）
   62px＝地図とパンくずの間（大きくすると、もっと上で止まる。上の写真の端が見え始める）。スマホは下の @media で 92px */
#map { scroll-margin-top: 62px; }
@media (max-width: 767px) { #map { scroll-margin-top: 92px; } }
