:root {
  --color-link-default: #1176d4;
  --color-link-hover: #1b7097;
}
html {
  box-sizing: border-box;
  font-size: 16px;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  line-height: 1.7;
}
body {
  background-color: #e6d8c5;
  /* height: 100vh; */
  font-family: "Roboto", "Zen Kaku Gothic Antique", "游ゴシック体", "Yu Gothic",
    YuGothic, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-weight: 400;
  /* font-weight: 700; */
}
.maplibregl-map {
  font-family: "Roboto", "Zen Kaku Gothic Antique", "游ゴシック体", "Yu Gothic",
    YuGothic, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-weight: 400;
}
a:not([class]) {
  color: var(--color-link-default);
  text-decoration: underline;
  transition: 0.4s;
  &:hover {
    color: var(--color-link-hover);
    text-decoration-thickness: 2px;
  }
}
:root {
  --bg: #e6d8c5;
  --accent: #95515e;
  --muted: #7a6b61;
  --white_95: rgba(255, 255, 255, 0.95);
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Map 全画面 ===== */
.map_container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  transition: left 240ms ease, width 240ms ease;
}

/* ===== パネル（統一） =====
         - モバイル: 下にスナップ（80px / 50% / 90%）
         - PC: 左に常時表示（幅360px）
         クラス名は panel_ で統一
      */
.panel_container {
  position: fixed;
  z-index: 46;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(calc(100% - 80px)); /* 初期は折りたたみ */
  transition: transform 320ms cubic-bezier(0.22, 0.9, 0.25, 1);
  will-change: transform;
  pointer-events: auto;
}
.panel_inner {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  background-color: #e6e3d9;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow: hidden;
}

/* ハンドル部（80px） */
.panel_handle {
  height: 80px;
  display: flex;
  flex-direction: row-reverse;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  position: relative;
}
.panel_handle_dot {
  /* width: 48px;
  height: 48px; */
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* display: none; */
  font-size: 12px;

  width: 64px;
  height: 64px;
  color: var(--accent);
  background-color: #e1cace;
  background-color: transparent;
}
@media (min-width: 900px) {
  .panel_handle_dot {
    display: none;
  }
}
.panel_handle_dot:before {
  content: "\e896";
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 40px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}
.panel_open .panel_handle_dot {
  color: #ffffff;
  background-color: var(--accent);
}

.panel_handle_info {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 20px;
}
.panel_handle_sub {
  font-size: 12px;
  color: var(--muted);
}

.panel_handle_right {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow: scroll;
  position: relative;
  flex: 1;
}
.panel_handle_right::-webkit-scrollbar {
  display: none;
}
/* .panel_handle_right:after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(230, 227, 217, 0.95)
  );
} */

/* カテゴリ行: 横スクロール + 右側グラデ */
.category_row {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* padding-right: 16px; */
}
.cat_toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: #ffffff;
  /* border: 1px solid #eeeeee; */
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.cat_toggle::before {
  content: "";
  width: 40px;
  height: 40px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
/* 種別ごと */
#js_cat_station + label::before,
label:has(#js_cat_station)::before {
  background-image: url("/app/map/asset/img/icon_station.svg");
}
label:has(#js_cat_sightseeing)::before {
  background-image: url("/app/map/asset/img/icon_sightseeing.svg");
}
label:has(#js_cat_shop)::before {
  background-image: url("/app/map/asset/img/icon_shop.svg");
}
label:has(#js_cat_toilet)::before {
  /* background-image: url("/app/map/asset/img/icon_toilet.svg"); */
  content: "wc";
  color: var(--accent);
  font-family: "Material Symbols Rounded";
  font-size: 36px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal !important;
}
/* クリック操作を無効化 */
label:has(#js_cat_toilet) {
  pointer-events: none;
  /* opacity: 0.5; */
  position: relative;
}
label:has(#js_cat_toilet):after {
  content: "準備中";
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background-color: rgba(51, 51, 51, 0.5);
  border-radius: 8px;
}
label:has(#js_cat_trash)::before {
  /* background-image: url("/app/map/asset/img/icon_trash.svg"); */
  content: "delete";
  color: var(--accent);
  font-family: "Material Symbols Rounded";
  font-size: 36px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal !important;
}
label:has(#js_cat_parking)::before {
  /* background-image: url("/app/map/asset/img/icon_parking.svg"); */
  content: "parking_sign";
  color: var(--accent);
  font-family: "Material Symbols Rounded";
  font-size: 36px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal !important;
}
label:has(#js_cat_wifi)::before {
  /* background-image: url("/app/map/asset/img/icon_wifi.svg"); */
  content: "wifi";
  color: var(--accent);
  font-family: "Material Symbols Rounded";
  font-size: 36px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal !important;
}
.cat_toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cat_toggle:has(input:checked) {
  background: #e1cace;
  /* border-color: #95515e; */
  font-weight: bold;
}
/* .cat_toggle:has(input:checked)::before {
  transform: scale(1.1);
} */
@media (hover: hover) {
  .cat_toggle:hover {
    background: #f7f7f7;
  }
}

.category_fade_right {
  position: relative;
}
/* .category_fade_right:after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(230, 227, 217, 0.95)
  );
} */

.panel_content {
  overflow: hidden;
}
/* フィルタ行 */
.filters_row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 16px;
  gap: 8px;
  font-size: 14px;
}
.filters_open {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.filters_open:before {
  content: "#";
}
.filters_open_input {
  opacity: 0;
  width: 0px;
}
.filters_open:has(.filters_open_input:checked) {
  background: #e1cace;
}
.filters_clear {
  /* padding: 6px 10px; */
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #555555;
}

/* タグ: 3段の縦並び、各段が横スクロール */
.tags_block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px;
}
.tags_row {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0px 0px;
  -webkit-overflow-scrolling: touch;
}
.tags_row::-webkit-scrollbar {
  display: none;
}
.tag_chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.tag_chip:before {
  content: "#";
}
.tag_chip:last-child {
  margin-right: 16px;
}
.tag_chip_active {
  /* color: var(--accent); */
  background: #e1cace;
  /* box-shadow: 0 6px 12px rgba(149, 81, 94, 0.12); */
}
.tag_chip_disabled {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(1);
}

.tags_fade_right {
  position: relative;
}
.tags_fade_right:after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 56px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(230, 227, 217, 0.95)
  );
}

/* リストカード */
.list_wrap {
  padding: 0px 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;

  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 480px;
  padding-bottom: 160px;
}
@media (min-width: 900px) {
  .list_wrap {
    padding-bottom: 24px;
  }
}

.list {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}
.list_item {
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-top: solid 1px #cccccc;
  transition: 0.4s;
  cursor: pointer;
}
.list_item:hover {
  background: #ebe0d8;
}
.list_item:last-child {
  border-bottom: solid 1px #cccccc;
}
.list_item.is-active {
  background-color: #ebe0d8;
  border-left: 4px solid var(--accent);
}
/* .list_item_emoji {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
} */
.list_item_emoji {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: "Material Symbols Rounded";
  font-size: 24px;
  line-height: 1;
  color: #555555;
  background: #e6d8c5;
}
.list_item_emoji::before {
  content: "🏡";
}
.list_item_emoji_shop::before {
  content: "storefront";
}
.list_item_emoji_station::before {
  content: "train";
}
.list_item_emoji_sightseeing::before {
  content: "location_on";
}
.list_item_emoji_parking::before {
  content: "parking_sign";
}
.list_item_emoji_toilet::before {
  content: "wc";
}
.list_item_emoji_trash::before {
  content: "delete";
}

.list_item_body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.list_item_title {
  font-size: 16px;
  line-height: 1.4;
}
.list_item_desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
}
.list_item_meta {
  display: flex;
  align-items: center;
  gap: 4px 8px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted);
  flex-wrap: wrap;
}
/* .list_item:not([data-cat="shop"]) .open_status {
  display: none;
} */
.today_hours {
  width: 100%;
}

.empty_state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #888;
  text-align: center;
  padding: 24px;
}
.empty_title {
  font-size: 15px;
  font-weight: 600;
}
.empty_desc {
  font-size: 13px;
  margin-top: 4px;
}

/* ポップアップ */
.maplibregl-popup {
  z-index: 1;
}
.maplibregl-popup-content {
  padding: 0px;
  /* background: #e6e3d9; */
  border-radius: 12px;
}
/* .maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: #e6e3d9;
} */
.maplibregl-popup-close-button {
  font-size: 16px;
  right: 6px;
}
.popup_content {
  padding: 12px;
  font-size: 12px;
  line-height: 1.4;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.popup_content_title {
  color: #555555;
  font-size: 14px;
  font-weight: bold;
}
.popup_content a {
  color: #1176d4;
  display: inline-flex;
  text-decoration: underline;
}

/* マーカー: transform アニメを除去（動かないように） */
.marker_btn {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  background: #ffffff;
  border: solid 0.5px #e6e3d9;
}
.marker_btn.marker_show_name:not(.marker_selected)::after {
  content: var(--marker-name);
  display: block;
  font-size: 10px;
  line-height: 1;
  color: #555555;
  -webkit-text-stroke-width: 0.1px;
  -webkit-text-stroke-color: #ffffff;
  position: absolute;
  bottom: -16px;
  width: auto;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.marker_btn.marker_name_hidden::after {
  display: none !important;
}

.marker_btn_shop,
.marker_btn_sightseeing,
.marker_btn_station,
.marker_btn_trash,
.marker_btn_parking,
.marker_btn_wifi,
.marker_btn_toilet {
  font-size: 0px;
}
.marker_btn_shop:before,
.marker_btn_sightseeing:before,
.marker_btn_station:before,
.marker_btn_trash:before,
.marker_btn_parking:before,
.marker_btn_wifi:before,
.marker_btn_toilet:before {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  color: var(--accent);
}
.marker_btn_shop:before {
  content: "storefront"; /* store */
}
.marker_btn_sightseeing:before {
  content: "location_on";
}
.marker_btn_station:before {
  content: "train";
}
.marker_btn_trash:before {
  content: "delete";
}
.marker_btn_parking:before {
  content: "parking_sign";
}
.marker_btn_wifi:before {
  content: "wifi";
}
.marker_btn_toilet:before {
  content: "wc";
}
.list_item_emoji_nakacho-tourist-information-center::before,
.list_item_emoji_kawagoe-station-tourist-information-center::before,
.list_item_emoji_honkawagoe-station-tourist-information-center::before,
.marker_btn_nakacho-tourist-information-center::before,
.marker_btn_kawagoe-station-tourist-information-center::before,
.marker_btn_honkawagoe-station-tourist-information-center::before {
  content: "info";
}
.list_item_emoji_kashiba-onsen::before,
.list_item_emoji_kawagoe-onsen::before,
.list_item_emoji_kuranoyu::before,
.list_item_emoji_kawagoe-yuyu::before,
.marker_btn_kashiba-onsen::before,
.marker_btn_kawagoe-onsen::before,
.marker_btn_kuranoyu::before,
.marker_btn_kawagoe-yuyu::before {
  content: "bath_outdoor";
}
.list_item_emoji_daily-hotel::before,
.list_item_emoji_hatago-coedoya::before,
.list_item_emoji_kawagoe-dai1::before,
.marker_btn_daily-hotel::before,
.marker_btn_hatago-coedoya::before,
.marker_btn_kawagoe-dai1::before {
  content: "hotel";
}
.list_item_emoji_koedo-kurari::before,
.marker_btn_koedo-kurari::before {
  content: "shopping_bag";
}
.marker_btn_active {
  color: #ffffff;
  background-color: var(--accent);
  z-index: 1;
}
.marker_btn_active:before {
  color: #ffffff;
}
.marker_btn_icon {
  width: 56px;
  height: 56px;
  /* overflow: hidden; */
  border-radius: 0px;
  padding: 0;
  background-color: transparent;
  /* background: #ffffff;
  border: 2px solid #95515e; */
  box-shadow: none;
  border: none;
}
.marker_btn_icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0px 1px 8px rgba(255, 255, 255, 0.3));
}
.marker_btn.marker_btn_icon:before {
  content: "";
}

/* デスクトップ: パネル左固定、マップを右にオフセット */
@media (min-width: 900px) {
  .panel_container {
    left: 16px;
    top: 16px;
    bottom: auto;
    right: auto;
    width: 360px;
    transform: none;
  }
  .panel_inner {
    border-radius: 12px;
    max-height: calc(100vh - 32px);
  }
  .map_container {
    left: 392px;
    width: calc(100% - 392px);
  } /* 16 + 360 + 16 */
}
@media (max-width: 899px) {
  .panel_container {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
  }
  .map_container {
    left: 0;
    width: 100%;
  }
}

.heading1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.footer_credit {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 10px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.6);
  background: rgba(255, 255, 255, 0.6);
  padding: 2px 2px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 10;
}
@media (max-width: 899px) {
  .footer_credit {
    bottom: 80px;
    right: 0px;
  }
}

/* iframe埋め込まれ時表示するボタンのwrapper */
.iframe_open_wrapper {
  /* コンテナを右上に固定するための設定 */
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 999;
}

/* iframe埋め込まれ時表示するボタン */
.iframe_open {
  color: var(--accent);
  /* background-color: #e6e3d9; */
  background-color: #ffffff;
  border: none;
  padding: 4px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0px;
  box-shadow: 0 2px 10px rgba(51, 51, 51, 0.2);
  transition: 0.4s;
}
.iframe_open:before {
  content: "zoom_out_map";
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 32px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}
.iframe_open:hover {
  background-color: #ebe0d8;
}

/* 1. オーバーレイの基本設定 */
#js_scroll_guard_overlay {
  position: absolute; /* 親要素（bodyなど）に合わせた配置 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 初期状態は透明で前面に配置し、操作をブロックする */
  background-color: transparent;
  z-index: 998;
  cursor: grab; /* クリックで有効化できることを示すカーソル */

  /* メッセージの配置 */
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
/* 2. 操作指示メッセージのスタイル */
.scroll_guard_message {
  background-color: rgba(51, 51, 51, 0.75);
  color: #ffffff;
  padding: 16px 24px;
  margin: 24px 16px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.4;
  /* メッセージ自体がクリックイベントをブロックしないように透過させる */
  pointer-events: none;
}
/* 3. 操作が有効化された後の状態 */
/* JavaScriptでbodyに.scroll-activeクラスが付与されたらオーバーレイを非表示にする */
.scroll-active #js_scroll_guard_overlay {
  display: none;
}
