/******************************
 * /map (page-id:8170) 専用CSS 完全版
 * ギャル盛り：読みやすさ・押しやすさ・スクロール最適化
 ******************************/

/* === 全画面マップ＆リセット === */
html, body,
.page-id-8170 #map,
.page-id-8170 .content,
.page-id-8170 #main,
.page-id-8170 #primary {
  margin: 0 !important;
  padding: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  box-sizing: border-box;
  overflow: hidden;
}

/* body固定（ページスクロール禁止） */
.page-id-8170 body {
  overflow: hidden;
}

/* マップdiv */
.page-id-8170 #map {
  display: block;
}

/* === ヘッダー/フッター類は非表示（全画面優先） === */
.mobile-footer-menu,
.navi-menu-button,
.mobile-menu,
.mobile-header-menu {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* === ロゴ調整（Leaflet左上ロゴだけに限定） === */
#logo-home img.custom-logo{
  width: 250px;
  height: auto;
  max-width: none;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  display: block;
}

/* === ロゴ＋切替ボタンの横並び === */
#logo-home{
  background: transparent;
}

/* ロゴ＋ボタンを横に並べる */
#logo-home .map-header-inner{
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 切替ボタン */
#logo-home .map-switch{
  display: flex;
  gap: 6px;
}

#logo-home .map-btn{
  padding: 5px 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  line-height: 1;
}

#logo-home .map-btn:hover{
  background: rgba(0,0,0,0.9);
}

#logo-home .map-btn.active{
  background: #ff6600;
}

@media screen and (max-width: 767px){

  /* ロゴ＋ボタン：スマホだけ縦に積む */
  #logo-home .map-header-inner{
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* ボタンは横並びのまま（好みで縦にもできる） */
  #logo-home .map-switch{
    width: 100%;
  }

  /* ボタン押しやすく */
  #logo-home .map-btn{
    font-size: 12px;
    padding: 7px 10px;
  }

  /* ロゴをちょい小さく＆余白も控えめ */
  #logo-home img.custom-logo{
    width: 160px;     /* ←ここ好みで 140〜180 */
    padding: 6px;
    margin-top: 0;    /* もう縦積みなので不要 */
  }
}


/* =========================
   Leaflet ポップアップ系
   ========================= */

/* 外枠（PC幅ベース） */
.leaflet-popup-content-wrapper {
  width: auto;
  max-width: 960px;            /* ← PCでしっかり太めにしたいならここを上げる */
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* 中身：右だけ余白が出ないよう、マージン殺し＋左右均等の内側余白 */
.leaflet-popup-content {
  margin: 0 !important;        /* ← Leaflet既定の左右マージンを消すのがキモ */
  line-height: 1.7;
  font-size: 16px;
  letter-spacing: 0.2px;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px;          /* ← 均等な内側余白に（好みで 12〜18px） */
  box-sizing: border-box;
}

/* ★ここだけ変更：幅は“100%”で外枠にフィット、上限pxは外す */
.custom-popup {
  width: 100% !important;      /* ← 枠いっぱいに広がる */
  max-width: none !important;  /* ← 940px 上限は撤去（ズレ防止） */
  max-height: none !important;
  overflow: visible !important;  /* ← ここがポイント */
  box-sizing: border-box;
  font-size: 16px;
  line-height: 1.6;
}

/* 画像も“細すぎ”をやめて本文幅いっぱいに */
.leaflet-popup-content img,
.custom-popup img {
width: 400px;        /* ← 固定！ */
  max-width: 100%;     /* ← スマホで400px入らん時は縮小 */
  height: auto;
  display: block;
  margin: 6px auto 10px;
  border-radius: 6px;
}

/* 長いURLで横伸び→右余白発生を防止 */
.leaflet-popup-content a,
.custom-popup a {
  overflow-wrap: anywhere;
  word-break: break-word;
}


/* タイトルやラベルの視認性UP */
.custom-popup .name {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 6px;
}
.custom-popup .label {
  font-size: 14px;
  font-weight: bold;
  display: block;
  color: #444;
  margin: 6px 0 2px;
}
.custom-popup .address,
.custom-popup .classify,
.custom-popup .memo {
  font-size: 16px;
  margin: 4px 0 6px;
}

/* リンク：押しやすさ＆見やすさ */
.custom-popup a,
.leaflet-popup-content a {
  color: #0078d7;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0,120,215,0.5);
  padding: 2px 0; /* タップ面積UP */
}
.custom-popup a:hover,
.leaflet-popup-content a:hover {
  border-bottom-style: solid;
}

.custom-popup .gmap-link { font-size: 14px; }
.custom-popup .blog-link { font-size: 16px; }

/* 画像：角丸＆ゆとり */
.custom-popup img,
.leaflet-popup-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 6px auto 10px;
  border-radius: 6px;
}

/* 駅用の小型ポップアップ（固定高さ→柔軟に） */
.custom-popup-station {
  width: 250px;
  max-height: 180px;   /* 固定ではなく上限に */
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.5;
}
.custom-popup-station .name { font-size: 18px; }

/* 閉じるボタン：指でも押しミスらんサイズに */
.leaflet-popup-close-button {
  font-size: 30px !important;
  width: 44px !important;      /* iOS/Androidガイドの最小タップ領域 */
  height: 44px !important;
  line-height: 42px !important;
  text-align: center !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #333 !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  z-index: 10000 !important;
}
.leaflet-popup-close-button:hover { opacity: 1; }

/* =========================
   CTA/広告ボタン
   ========================= */
.tabelog, .jalan, .rakuten {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  text-decoration: none;
  border: 1px solid #000;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.tabelog { background-color: #FFAA00; }
.jalan  { background-color: #FF7A15; }
.rakuten{ background-color: #00B900; }
.tabelog a, .jalan a, .rakuten a { color: #fff !important; }

.support-link-mid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #ffe066;
  color: #222;
  border: 1px solid #e0b100;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transition: background .3s, color .3s;
}
.support-link-mid:hover { background-color: #ffcc00; color: #000; }

/* =========================
   レイヤー類
   ========================= */
.hidden-layers {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.leaflet-control-layers-overlays {
  column-count: 2;
  column-gap: 10px;
  max-height: 400px;
  width: 400px;
  overflow-y: auto;
  row-gap: 6px;
  padding-right: 6px; /* スクロールバー逃がし */
}
.leaflet-control-layers-base label,
.leaflet-control-layers-overlays label {
  font-size: 18px;
  font-weight: 500;
  line-height: 2.0;
}

.custom-layers-panel {
  position: absolute;
  top: 50px;
  right: 10px;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* フォーカス見える化（アクセシビリティ） */
a:focus-visible, button:focus-visible, .leaflet-interactive:focus-visible {
  outline: 2px solid rgba(0,120,215,.6);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Leafletインタラクティブ既定のアウトラインは無効化 */
.leaflet-interactive:focus {
  outline: none;
  box-shadow: none;
}

/* =========================
   スポット追加フォーム
   ========================= */
#add-spot-form {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #aaa;
  z-index: 9999;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  width: 90vw;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.0;
  padding: 16px;
}
#add-spot-form h3 {
  margin: 0 0 5px;
  font-size: 15px;
  text-align: center;
}
#add-spot-form label {
  display: block;
  margin: 1px 0 0px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.0;
}
#add-spot-form input,
#add-spot-form textarea,
#add-spot-form select {
  width: 100%;
  padding: 2px 4px;
  margin: 0 0 2px;
  box-sizing: border-box;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 3px;
}
#add-spot-form textarea {
  resize: vertical;
  min-height: 48px;
}
#add-spot-form button {
  padding: 5px 10px;
  margin: 6px 4px 0 0;
  font-size: 13px;
  border: none;
  border-radius: 4px;
  background-color: #0078d7;
  color: #fff;
  cursor: pointer;
}
#add-spot-form button#cancel-spot { background-color: #aaa; }
#add-spot-form p {
  font-size: 12px;
  color: #555;
  margin-top: 6px;
}

/* =========================
   検索ボックス
   ========================= */
#search-container {
  background-color: #f0f8ff;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: none;
  box-shadow: none;
}
#search-box {
  width: 100%;
  padding: 10px 8px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #ffffff;
  color: #333;
}
#search-box:focus {
  outline: none;
  border-color: #0078d7;
  box-shadow: 0 0 4px rgba(0,120,215,0.4);
}
#search-button {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  background-color: #0078d7;
  color: white;
  border: none;
  border-radius: 6px;
  margin-top: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#search-button:hover { background-color: #005fa3; }
#search-results-wrapper {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-top: 6px;
}
#search-results li:hover { background-color: #f0f8ff; }
#close-results {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #888;
}
#close-results:hover { color: #000; }

/* =========================
   画像モーダル（最前面固定）
   ========================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;                 /* top/left/width/height を一発で */
  background-color: rgba(0,0,0,0.8);

  /* ★最重要：spot-panel(9999)より上へ */
  z-index: 20000;

  /* クリック/タップを確実に拾う */
  pointer-events: auto;
}

.modal-gallery{
  position: relative;
  width: 100%;
  height: 100%;
}

.modal-slide{
  position: absolute;
  max-width: 90%;
  max-height: 90%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

/* ナビボタン：モーダル内で最前面 */
.modal button.prev,
.modal button.next{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;

  z-index: 20002;
}

.modal .prev{ left: 10px; }
.modal .next{ right: 10px; }

/* 閉じるボタン */
.modal-close{
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  color: #fff;
  cursor: pointer;

  z-index: 20003;
}


/* =========================
   iframe 埋め込み時の調整
   ========================= */
body.iframe-mode .custom-popup {
  max-height: 350px;
  overflow-y: auto;
}

/* =========================
   お知らせポップアップ
   ========================= */
.notice-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 1em;
}
.popup-content {
  background: #fff;
  padding: 2em;
  border-radius: 15px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.center-list {
  margin: 0 auto 0.8em auto;
  padding-left: 0;
  list-style: none;
  text-align: left;
  max-width: 300px;
}
.center-list li { margin-bottom: 0.3em; }
#close-popup-button {
  background: #444;
  color: white;
  border: none;
  padding: 0.6em 1.5em;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
}

/* =========================
   クラスタ
   ========================= */
.custom-cluster {
  background-color: rgba(0, 123, 255, 0.85);
  color: #fff;
  font-weight: bold;
  text-align: center;
  border-radius: 50%;
  border: 2px solid white;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
}

/* =========================
   スマホ最適化
   ========================= */
@media screen and (max-width: 767px) {

  .leaflet-control-attribution {
    font-size: 10px;
    bottom: 15px !important;
    right: 6px !important;
  }

  .leaflet-control-zoom { display: none !important; }

  /* ロゴ */
  img.custom-logo {
    margin-top: 10px;
    width: 180px;
    padding: 5px;
  }

  /* ポップアップ外枠は画面幅に追従 */
  .leaflet-popup-content-wrapper {
    max-width: 90vw;
  }

  /* 中身：さらに読みやす盛り＋ぬるスク */
  .leaflet-popup-content {
    font-size: 15.5px;
    line-height: 1.75;
    max-height: 65vh;                 /* ← モバイルは65vh上限 */
    -webkit-overflow-scrolling: touch;
    padding: 10px 12px 12px;
    margin: 10px 14px;                /* 左右ちょい余白 */
  }

  .custom-popup {
    width: 100%;
    max-height: 65vh;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.5;
    box-sizing: border-box;
  }

  .custom-popup .blog-link {
    font-size: 14px;
    color: #0078d7;
    text-decoration: none;
  }

  /* リンク折返し */
  .custom-popup a { word-break: break-word; }

  /* 閉じるボタン大きめ */
  .leaflet-popup-close-button {
    font-size: 40px !important;
    width: 48px !important;
    height: 48px !important;
  }

  /* フォーム */
  #add-spot-form {
    width: 95vw;
    padding: 10px;
    font-size: 13px;
    line-height: 1.3;
  }
  #add-spot-form label { margin: 2px 0 1px; }
  #add-spot-form input,
  #add-spot-form textarea,
  #add-spot-form select {
    font-size: 13px;
    padding: 4px;
  }

  /* レイヤー */
  .layers-toggle-button {
    font-size: 14px !important;
    padding: 6px 10px !important;
    margin-top: 20px !important;
  }
  .custom-layers-panel {
    width: 320px;
    max-height: 80vh;
    overflow-y: auto;
    position: absolute;
    top: 45px;
    right: 5px;
    z-index: 1000;
    padding: 12px;
  }
  .leaflet-control-layers-overlays { width: 100%; }
  .leaflet-control-layers-overlays label {
    width: 120px;                 /* 列幅を固定して崩れ防止 */
    display: inline-block;
    font-size: 13.5px;
    line-height: 1.5;
    margin: 3px 0;
    word-break: break-word;
  }
  .leaflet-control-layers-base label { font-size: 12px; }
  .leaflet-control-layers input[type="checkbox"] {
    transform: scale(1.0);
    margin-right: 2px;
  }

  #search-container { margin-bottom: 10px; }
  #search-results-wrapper { margin-top: 8px; }

  /* お知らせポップアップ */
  .popup-content {
    padding: 1em 1em;
    font-size: 13px;
    line-height: 1.2;
    max-width: 90vw;
  }
  .center-list {
    max-width: 100%;
    font-size: 13px;
  }
  .center-list li { margin-left: 1em; }

  /* SNS/支援リンク：指タップ向け */
  .X1,
  .instagram1,
  .support-link-mid {
    font-size: 0.9em;
    padding: 5px 10px;
    margin: 2px 4px;
    display: inline-block;
  }

  #close-popup-button {
    font-size: 0.95em;
    padding: 0.5em 1.2em;
  }

  /* CTA ボタンの内側余白をスマホ寄りに */
  .tabelog, .jalan, .rakuten {
    padding: 5px 10px;
  }
}

/* ===== 近くの宿（楽天） ===== */
.nearby-hotels{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.15);
}
.nearby-hotels__head{
  font-weight: 700;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.nearby-hotels__head .pr{
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.25);
}
.nearby-hotels__body{
  display: grid;
  gap: 10px;
}

/* 返ってくる宿カード */
.nearby-hotel-card{
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid #c5e1a5;
  border-radius: 12px;
  background: #fff;
}

.nearby-hotel-card__img{
  position: relative;
}
.nearby-hotel-card__img img{
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.nearby-hotel-card__credit{
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.65);
  color: #fff;
}

.nearby-hotel-card__name{
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.nearby-hotel-card__btn{
  display: inline-block;
  padding: 10px 16px;   /* ←横ちょい広げる */
  border-radius: 10px;
  background: #8bc34a;
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;            /* ←これ超重要 */
  text-decoration: none;
  text-align: center;
  border: none;
  transition: all .2s ease;
  letter-spacing: 0.03em;      /* ←ちょい広げて読みやすく */
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* ホバー */
.nearby-hotel-card__btn:hover{
  background: #7cb342;
  transform: translateY(-1px);
}

/* 押したとき */
.nearby-hotel-card__btn:active{
  transform: scale(0.97);
  background: #689f38;
}



.nearby-hotel-card__meta::after{
  content: "楽天トラベル";
  display: block;
  font-size: 9px;
  color: #999;
  margin-top: 6px;
  opacity: 0.7;
}

/* ===== 距離表示（名前と横並び） ===== */
.nearby-hotel-card__top{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.nearby-hotel-card__dist{
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  margin-top: 2px;
}

/* ===== “他の宿も見る”ボタン ===== */
.nearby-hotels__more{
  text-align: center;
  margin-top: 6px;
}

.nearby-hotels__morebtn{
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
}

.nearby-hotels__morebtn:hover{
  background: #e0e0e0;
}

.nearby-hotels__morebtn:disabled{
  opacity: 0.6;
  cursor: default;
}

/* ===== エラー表示 ===== */
.nearby-hotels__err,
.nearby-hotels__empty{
  font-size: 13px;
  color: #888;
  text-align: center;
  padding: 8px;
}

/* ===== 評価（★） ===== */
.nearby-hotel-card__rating{
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 6px;
  font-size: 12px;
}

.nearby-hotel-card__rating .score{
  font-weight: 700;
}

.nearby-hotel-card__rating .count{
  color: black;
}

/* 星：塗りつぶし（--pctで割合） */
.nearby-hotel-card__rating .stars{
  position: relative;
  display: inline-block;
  line-height: 1;
  letter-spacing: 0.08em;
  color: rgb(86, 86, 86); /* ベース（灰色） */
}

.nearby-hotel-card__rating .stars::after{
  content: "★★★★★";
  position: absolute;
  left: 0;
  top: 0;
  width: var(--pct, 0%);
  overflow: hidden;
  white-space: nowrap;
  color: #f2b01e; /* 塗り（ゴールド） */
}


/* =========================
   FIX：スマホで右側切れる問題 完全対応
   ========================= */
@media (max-width: 767px){

  /* 右カラムがちゃんと縮むようにする（最重要） */
  .nearby-hotel-card{
    grid-template-columns: 80px minmax(0, 1fr);
    width: 100%;
    box-sizing: border-box;
  }

  /* 右側コンテンツのはみ出し防止 */
  .nearby-hotel-card__meta{
    min-width: 0;
    overflow: hidden;
  }

  /* ホテル名の折り返し */
  .nearby-hotel-card__name{
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* ★評価バッジのはみ出し防止 */
  .nearby-hotel-card__rating{
    flex-wrap: wrap;
    max-width: 100%;
  }

  /* 距離表示は無理に縮めない */
  .nearby-hotel-card__dist{
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ボタンのはみ出し防止 */
  .nearby-hotel-card__btn{
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* 念のため全体の横スクロール防止 */
  .nearby-hotels__body{
    overflow-x: hidden;
  }
}




/* =========================
   iPad mini 横（準スマホ化）
   ========================= */
@media screen and (min-width: 768px) and (max-width: 1133px) and (orientation: landscape) {

  .leaflet-control-attribution {
    font-size: 10px;
    bottom: 15px !important;
    right: 6px !important;
  }

  .leaflet-control-zoom { display: none !important; }

/* ロゴ（Leaflet左上ロゴだけ） */
#logo-home img.custom-logo{
  margin-top: 10px;
  width: 180px;
  height: auto;
  padding: 5px;
}

  /* ポップアップ外枠は画面幅に追従 */
  .leaflet-popup-content-wrapper {
    max-width: 90vw;
  }

  /* 中身：さらに読みやす盛り＋ぬるスク */
  .leaflet-popup-content {
    font-size: 15.5px;
    line-height: 1.75;

    /* iPad横は縦が浅いので、スマホより少しだけ上限下げると切れにくい */
    max-height: 70vh;

    -webkit-overflow-scrolling: touch;
    padding: 10px 12px 12px;
    margin: 10px 14px;
  }

  .custom-popup {
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.5;
    box-sizing: border-box;
  }

  .custom-popup .blog-link {
    font-size: 14px;
    color: #0078d7;
    text-decoration: none;
  }

  /* リンク折返し */
  .custom-popup a { word-break: break-word; }

  /* 閉じるボタン大きめ */
  .leaflet-popup-close-button {
    font-size: 40px !important;
    width: 48px !important;
    height: 48px !important;
  }

  /* フォーム */
  #add-spot-form {
    width: 95vw;
    padding: 10px;
    font-size: 13px;
    line-height: 1.3;
  }
  #add-spot-form label { margin: 2px 0 1px; }
  #add-spot-form input,
  #add-spot-form textarea,
  #add-spot-form select {
    font-size: 13px;
    padding: 4px;
  }

  /* レイヤー */
  .layers-toggle-button {
    font-size: 14px !important;
    padding: 6px 10px !important;
    margin-top: 20px !important;
  }
  .custom-layers-panel {
    width: 320px;
    max-height: 80vh;
    overflow-y: auto;
    position: absolute;
    top: 45px;
    right: 5px;
    z-index: 1000;
    padding: 12px;
  }
  .leaflet-control-layers-overlays { width: 100%; }
  .leaflet-control-layers-overlays label {
    width: 120px;
    display: inline-block;
    font-size: 13.5px;
    line-height: 1.5;
    margin: 3px 0;
    word-break: break-word;
  }
  .leaflet-control-layers-base label { font-size: 12px; }
  .leaflet-control-layers input[type="checkbox"] {
    transform: scale(1.0);
    margin-right: 2px;
  }

  #search-container { margin-bottom: 10px; }
  #search-results-wrapper { margin-top: 8px; }

  /* お知らせポップアップ */
  .popup-content {
    padding: 1em 1em;
    font-size: 13px;
    line-height: 1.2;
      /* 横幅は「画面に対して広すぎず狭すぎず」 */
  max-width: min(90vw, 420px);

  /* 縦が浅い端末でも切れにくくする */
  max-height: 70vh;
  overflow-y: auto;
  }
  .center-list {
    max-width: 100%;
    font-size: 13px;
  }
  .center-list li { margin-left: 1em; }

  /* SNS/支援リンク：指タップ向け */
  .X1,
  .instagram1,
  .support-link-mid {
    font-size: 0.9em;
    padding: 5px 10px;
    margin: 2px 4px;
    display: inline-block;
  }

  #close-popup-button {
    font-size: 0.95em;
    padding: 0.5em 1.2em;
  }

  /* CTA ボタン */
  .tabelog, .jalan, .rakuten {
    padding: 5px 10px;
  }
}

/* 共通ラベル */
.radius-label{
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 1km（強調） */
.radius-label--1km{
  background: rgba(255,77,77,0.9);
  color: #fff;
  border: 1px solid rgba(255,77,77,1);
}

/* 2km（控えめ） */
.radius-label--2km{
  background: rgba(51,136,255,0.9);
  color: #fff;
  border: 1px solid rgba(51,136,255,1);
  opacity: 0.9;
}

/* ===== PC 左パネル（GoogleMap風） ===== */
.spot-panel{
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: min(420px, 40vw);
  background: rgba(255,255,255,0.98);
  box-shadow: 6px 0 24px rgba(0,0,0,0.18);
  z-index: 9999;
  transform: translateX(-105%);
  transition: transform .2s ease;
  display: flex;
  flex-direction: column;
}

.spot-panel.is-open{ transform: translateX(0); }

.spot-panel__head{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.spot-panel__title{
  font-weight: 800;
  font-size: 14px;
  color: #222;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-panel__btn{
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
}

.spot-panel__close{
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}

.spot-panel__body{
  padding: 10px 12px 16px;
  overflow: auto;
  height: 100%;
}
/* ===== スマホ：下パネル（3段階：閉 / 半分 / 全開） ===== */
@media (max-width: 767px){
  .spot-panel{
    top: auto;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 70dvh;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.18);
    transform: translateY(105%); /* closed */
    transition: transform .2s ease;
    touch-action: none;
    z-index: 9000 !important;
  }
  .spot-panel.is-open{ transform: translateY(0); }       /* full */
  .spot-panel.is-peek{ transform: translateY(45dvh); }   /* half */

  /* つまみ */
  .spot-panel__head{
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .spot-panel__grab{
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    margin: 8px auto 6px;
    cursor: pointer;
  }
}



/* 1kmラベル（既にあるならそれでOK） */
.radius-label{
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.radius-label--1km{
  background: rgba(255,77,77,0.9);
  color: #fff;
  border: 1px solid rgba(255,77,77,1);
}
