/* ========================================
   LBOV日本地図 - ピン配置スタイル
   ======================================== */
/* マップコンテナ */
.map-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}
/* 地図 */
.map-image {
    width: 100%;
    height: auto;
    display: block;
}
/* ピン */
.pin {
    position: absolute;
    width: 4%;
    min-width: 15px;
    max-width: 60px;
    transform: translate(-50%, -100%);
    transition: transform 0.2s ease;
    z-index: 10;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}
.pin img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(2px 4px 4px rgba(0,0,0,0.4));
}
.pin:hover {
    transform: translate(-50%, -110%) scale(1.1);
    z-index: 20;
}
.pin::before,
.pin::after {
    position: absolute;
    left: 50%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
}
.pin::after {
    content: attr(data-text);
    bottom: 100%;
    transform: translate(-50%, -10px);
    background-color: #333;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.pin::before {
    content: "";
    bottom: 100%;
    transform: translate(-50%, -10px);
    border: 6px solid transparent;
    border-top-color: #333;
    margin-bottom: -4px;
    z-index: 100;
}
.pin:hover::before,
.pin:hover::after,
.pin:focus-visible::before,
.pin:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -12px);
}
.pin:hover,
.pin:focus {
    z-index: 20;
}
.pin:hover img {
    transform: scale(1.1);
}

/* ========================================
   LBOV自治体一覧 - Gridレイアウト（最終デザイン）
   ======================================== */

/* フォントサイズ定義（clamp使用） */
:root {
  --fs-label-text: clamp(0.875rem, 2vw, 1.2rem);                     /* 16px → 19.2px */
  --fs-municipality-name: clamp(0.75rem, 1.5vw, 0.875rem);    /* 12px → 14px */
  --fs-button-text: clamp(0.6875rem, 1.2vw, 0.8125rem);      /* 11px → 13px */
  --fs-arrow-icon: clamp(0.5rem, 0.8vw, 0.625rem);           /* 8px → 10px */
}

/* コンテナ */
.municipalities-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  padding: 20px;
  width: 100%;
  max-width: 100%; /* 1400pxから変更 */
  margin: 0 auto;
  background-color: #01415D;
  box-sizing: border-box; /* 追加 */
}

/* 各自治体ブロックのラッパー */
.report-btn_wrap {
  width: 100%;
  background-color: transparent;
  padding: 0;
}

/* 各自治体ブロック */
.report-btn {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.report-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* 自治体名エリア */
.report-btn_top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  padding: 10px 12px;
  background-color: #fff;
  border-radius: 8px 8px 0 0;
  text-align: left;
  font-weight: 600;
  min-height: 45px;
}
.report-btn_top img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}
.report-btn_top p {
  margin: 0;
  font-size: var(--fs-municipality-name);
  font-weight: 600;
  color: #333;
  line-height: 1.3;
  flex: 1;
}

/* 取組概要ボタン */
.report-btn_bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 15px;
  margin: 0;
  background: #0066cc;
  color: #ffffff;
  border: none;
  text-align: center;
  font-size: var(--fs-button-text);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.3s, opacity 0.3s;
  position: relative;
  min-height: 42px;
  outline-offset: 2px;
}
.report-btn_bottom::after {
  content: '▶';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-arrow-icon);
}
.report-btn_bottom:hover {
  opacity: 0.9;
}
.report-btn_bottom:focus {
  outline: 3px solid #4d90fe;
  outline-offset: -4px;
}
.report-btn_bottom:active {
  opacity: 0.8;
}

/* 年度別の色分け */
.report-btn_bottom.repo_2021,
.modal-year.repo_2021 {
  background-color: #A34D29;
}
.report-btn_bottom.repo_2021:hover {
  background-color: #8b3f22;
}
.report-btn_bottom.repo_2022,
.modal-year.repo_2022 {
  background-color: #065F94;
}
.report-btn_bottom.repo_2022:hover {
  background-color: #054d78;
}
.report-btn_bottom.repo_2023,
.modal-year.repo_2023 {
  background-color: #9C1C51;
}
.report-btn_bottom.repo_2023:hover {
  background-color: #7d1641;
}
.report-btn_bottom.repo_2024,
.modal-year.repo_2024 {
  background-color: #007074;
}
.report-btn_bottom.repo_2024:hover {
  background-color: #005a5d;
}
.report-btn_bottom.repo_2025,
.modal-year.repo_2025 {
  background-color: #c64836; /* #E95540; */
}
.report-btn_bottom.repo_2025:hover {
  background-color: #a03b2a; /* #d43e2a; */
}
/* 複数年のボタンがある場合の調整 */
.report-btn_bottom + .report-btn_bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* ========================================
   レスポンシブ対応
   ======================================== */

/* タブレット以下 */
@media (max-width: 768px) {
  .municipalities-container {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    padding: 15px;
  }
  .report-btn_top {
    padding: 8px 10px;
    min-height: 40px;
  }
  .report-btn_top img {
    width: 18px;
  }
  .report-btn_bottom {
    padding: 8px 12px;
    min-height: 38px;
  }
  .report-btn_bottom::after {
    right: 10px;
  }
}

/* スマホ（最小時2カラム） */
@media (max-width: 640px) {
  .municipalities-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .report-btn_top {
    flex-direction: row;
    gap: 6px;
    padding: 8px;
    text-align: center;
    justify-content: center;
    min-height: 38px;
  }
  .report-btn_top p {
    flex: initial;
  }
  .report-btn_top img {
    width: 16px;
  }
  .report-btn_bottom {
    padding: 8px 10px;
    min-height: 36px;
  }
  .report-btn_bottom::after {
    right: 8px;
  }
}

/* 極小スマホ対応 */
@media (max-width: 375px) {
  .municipalities-container {
    gap: 8px;
    padding: 10px;
  }

  .report-btn_top {
    padding: 6px;
    min-height: 36px;
  }

  .report-btn_top img {
    width: 14px;
  }

  .report-btn_bottom {
    padding: 6px 8px;
    min-height: 32px;
  }
}


/* =========================================
   ダイアログのベース設定（背景透明化）
   ========================================= */
dialog,
dialog * {
  font-family: 'BIZ UDPGothic', sans-serif;
}
dialog.custom-modal {
  width: 100%;
  height: 100%; 
  max-width: 100%; 
  max-height: 100%; 
  background: transparent;
  border: none;
  padding: 0;
  overflow-y: auto;
  display: none; 
}
dialog.custom-modal[open] {
  display: block;
}
dialog.custom-modal::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(3px);
}
.modal-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; 
  min-height: 100%; 
  padding: 40px 20px;
  box-sizing: border-box;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* =========================================
   1. ヘッダー（外側の白文字）
   ========================================= */
.modal-header-outer {
  text-align: center;
  color: #fff;
  margin-bottom: 15px;
  width: 100%;
}
.modal-year {
  font-size: clamp(12px, 3.5vw, 14px);
  font-weight: 700;
  margin: 0 auto 10px;
  width: 80px;
  border: 2px solid #fff;
  border-radius: 12px;
  padding: 4px 8px;
  color: #fff;

}
.modal-title-main {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 5px 0;
  letter-spacing: 0.1em;
}
.modal-title-main::after {
  content: "×";
  display: block;
  margin: 8px auto;
  font-size: 1.6rem;
  line-height: 1;
  color: #fff;
}
.modal-title-sub {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  opacity: 0.9;
}

/* =========================================
   2. ボディ（白い箱）
   ========================================= */
.modal-body-card {
  background: #fff;
  width: 100%;
  padding: 40px;
  margin-bottom: 40px;
  box-sizing: border-box;
  max-height: none;
  height: auto;
}

/* 見出し（魚アイコン付き） */
.fish-heading {
  font-size: clamp(20px, 3.5vw, 24px);
  color: #0070bc;
  font-weight: 800;
  margin: 30px 0 15px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* 魚アイコン（画像がある場合） */
.fish-heading::before {
  content: "";
  display: inline-block;
  width: 57px;
  height: 33px;
  background-image: url('../img/icon_fish.svg'); 
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* 最初の見出しだけ上マージンを消す */
.modal-section:first-child .fish-heading {
  margin-top: 0;
}
.fish-heading:not(:has(+ p)) {
  margin: 0;
}

/* テキストスタイル */
.modal-text {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 15px;
}
.modal-text strong {
  color: #004d80; /* 小見出しを少し濃く */
}

/* 図・画像のスタイル */
.modal-figure {
  margin: 12px auto 24px;
  text-align: center;
  max-width: 640px;
}
.modal-section:first-of-type .modal-figure {
  max-width: 480px;
  box-sizing: border-box;
}
.modal-figure img {
  max-width: 100%;
  height: auto;
}

/* =========================================
   3. 閉じるボタン（×印）
   ========================================= */
.close-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.close-circle-btn img {
  width: 40px;
  height: auto;
  display: block;
  object-fit: contain; 
}
.close-circle-btn:hover {
  transform: scale(1.1);
}
.close-position-top {
  position: absolute;
  top: 20px;
  right: 20px;
  margin: 0;
  z-index: 10;
}
.close-circle-btn.large {
  width: 100px;
  height: 100px;
}
.close-circle-btn.large img {
  width: 100px;
}

/* =========================================
   レスポンシブ（スマホ対応）
   ========================================= */
@media (max-width: 768px) {
  dialog.custom-modal {
    width: 90%;
    max-height: 90vh;
  }
  .modal-body-card {
    padding: 20px;
  }
  .close-position-top {
    top: 10px;
    right: 10px;
  }
}

/* グリッドレイアウト（レスポンシブ対応） */
.panel_list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}
.panel_card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: #333;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px 12px;
  box-sizing: border-box;
  transition: all 0.4s ease;
  position: relative;
  border: 2px solid #fff;
}
.panel_card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: #007bff;
}
.panel_header {
  margin-bottom: 4px;
  text-align: left;
}
.panel_list .panel_cat {
  align-self: flex-start;
  display: inline-flex;
  background: #FFF68B;
  color: #555;
  padding: 4px 8px;
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 8px;
  font-weight: bold;
}
.panel_cat.type-b {
  background: #A0D8EF;
  color: #333;
}
.panel_list .panel_title {
  text-align: left;
  margin: 0 auto;
  font-size: var(--fs-button-text);
  font-weight: bold;
  line-height: 1.5;
  color: #000;
  border: none;
  background-color: transparent;
  width: 100%;
}
.panel_img {
  margin: 20px 0;
  text-align: center;
}
.panel_img img {
  width: 80%;
  height: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.panel_list .panel_btn_fake {
  margin-top: auto;
  background-color: #FFF68B;
  border: solid 1px #DED244;
  color: #333;
  text-align: center;
  padding: 4px 12px;
  border-radius: 2px;
  font-weight: bold;
  font-size: var(--fs-label-text);
  line-height: 1.2;
  transition: all 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.panel_card:hover .panel_btn_fake {
  background-color: #ffce88;
}
.panel_list .file_size {
  font-size: var(--fs-button-text);
  font-weight: normal;
  line-height: 1;
  margin-left: 8px;
}