* {
  box-sizing: border-box;
  font-family: "Helvetica Neue", Arial, sans-serif;
  padding: 0;
  margin: 0;
}

body,
html {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #fff;
}





.header {
  width: 100%;
  height: 72px;

  padding: 0 40px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: #fff;
  border-bottom: 1px solid #eee;

  position: relative;
  z-index: 5000;
}

.logo {
  color: #9b2722;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: #9b2722;
  font-size: 14px;
  text-decoration: none;
}

.lang-switch {
  width: 42px;
  height: 24px;

  border: 1px solid #9b2722;
  border-radius: 999px;

  display: flex;
  justify-content: center;
  align-items: center;

  cursor: pointer;
}

.lang-switch p {
  color: #9b2722;
  font-size: 11px;
  line-height: 1;
}

.hamburger {
  display: none;
}

.sp-menu {
  display: none;
}


#layout {
  height: calc(100vh - 72px);
}





/* 左右分割レイアウト */
#layout {
  display: flex;
  width: 100%;
  height: 100%;
}


/* 左側エリア */
#left-sidebar {
  width: 50%;
  display: flex;
  flex-direction: column;
  background: #fff;
  z-index: 2000;

  position: relative;
  flex-shrink: 0;

  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#left-sidebar.minimized {
  width: 30vw;
}


/* 左側の中身 */
.sidebar-inner {
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;

  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* サイドバー開閉ボタン */
.toggle-sidebar-btn {
  position: absolute;
  top: 50%;
  right: -16px;
  transform: translateY(-50%);

  width: 16px;
  height: 48px;

  background: #fff;
  border: 1px solid #dcdcdc;
  border-left: none;
  border-radius: 0 8px 8px 0;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  z-index: 1000;

  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);

  font-size: 10px;
  color: #9b2722;
}

.toggle-sidebar-btn:hover {
  background: #f5f5f5;
  color: #7f1f1b;
}

.toggle-sidebar-btn::before {
  content: "◀";
}

#left-sidebar.minimized .toggle-sidebar-btn::before {
  content: "▶";
}


/* 上部エリア */
.sidebar-top {
  flex-shrink: 0;

  display: flex;
  flex-direction: column;
}


/* ロゴ */
.header-logo {
  padding: 30px 40px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #9b2722;
}


/* 右上のスイッチ / 言語切り替え */
.toggle-icon {
  width: 34px;
  height: 20px;

  border: 1.5px solid #9b2722;
  border-radius: 12px;

  background: transparent;

  position: relative;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-icon::after {
  content: "";

  position: absolute;
  right: 2px;
  top: 1.5px;

  width: 14px;
  height: 14px;

  background: white;
  border: 1.5px solid #9b2722;
  border-radius: 50%;

  box-sizing: border-box;
}

#lang-label {
  font-size: 10px;
  color: #9b2722;
  position: relative;
  z-index: 2;
}


/* タブ */
.nav-tabs {
  display: flex;

  border-top: 1px solid #ebebeb;
  border-bottom: 1px solid #ebebeb;
}

.nav-tab {
  flex: 1;

  text-align: center;
  padding: 18px 0;

  font-size: 14px;
  font-weight: 400;
  color: #aaa;

  cursor: pointer;
  transition: 0.2s;
}

.nav-tab.active {
  font-weight: 600;
  color: #9b2722;
}


/* 入力モード */
#mode-input {
  display: flex;
  flex-direction: column;

  transition: 0.3s;
}


/* 検索入力エリア */
.search-section {
  padding: 25px 40px 15px 40px;

  display: flex;
  flex-direction: column;
  gap: 15px;
}


/* 入力欄 */
.gray-input {
  width: 100%;

  background: #dcdcdc;
  border: none;
  border-radius: 25px;

  padding: 15px 25px;

  font-size: 14px;
  color: #9b2722;

  outline: none;
}

.gray-input::placeholder {
  color: #b67a77;
  font-weight: bold;
  letter-spacing: 1px;
}


/* 検索ボタン */
.search-section button {
  background: #9b2722;
  color: #fff;

  border: none;
  border-radius: 25px;

  padding: 15px 25px;

  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;

  cursor: pointer;
}

.search-section button:hover {
  background: #7f1f1b;
}


/* フィルター */
.filters {
  padding: 0 40px 25px 40px;

  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pill {
  background: #eee7e6;
  color: #9b2722;

  padding: 8px 15px;
  border-radius: 4px;

  font-size: 12px;
  font-weight: 500;

  cursor: pointer;
}

.filter-pill.dropdown {
  padding-right: 18px;
  position: relative;
}


/* 神社カード一覧 */
.shrine-grid {
  padding: 10px 40px 50px 40px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;

  overflow-y: auto;
  flex-grow: 1;
  align-content: flex-start;
}


/* 検索前メッセージ */
.empty-msg {
  grid-column: 1 / 3;

  padding: 40px;

  color: #aaa;
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}


/* 神社カード */
.grid-card {
  background: white;

  border: 1px solid #ebebeb;
  border-radius: 4px;

  padding: 12px;

  cursor: pointer;

  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}

.grid-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}


/* 神社カードの画像 */
.card-img {
  width: 70%;
  height: 130px;

  object-fit: cover;

  display: block;
  margin: 0 auto 12px auto;

  border-radius: 2px;
}


/* 神社名 */
.card-title {
  margin-bottom: 6px;

  font-size: 15px;
  font-weight: bold;
  color: #9b2722;
}


/* 評価 */
.card-rating {
  margin-bottom: 18px;

  font-size: 10px;
  color: #aaa;
}

.card-rating .stars {
  margin-right: 5px;

  color: #ddd;
  font-size: 13px;
  letter-spacing: 2px;
}


/* 営業状態 */
.card-status {
  font-size: 10px;
  color: #aaa;
}

.card-status .bold {
  color: #9b2722;
  font-weight: bold;
}


/* 右側マップエリア */
#map-area {
  flex: 1;

  height: 100%;

  position: relative;
  background: #e9e9e9;
}

#map {
  width: 100%;
  height: 100%;
}


/* マップピン */
.teardrop-marker {
  width: 32px;
  height: 32px;

  background-color: white;
  border-radius: 50% 50% 50% 0;

  transform: rotate(-45deg);

  box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.1);

  display: flex;
  align-items: center;
  justify-content: center;
}


/* ピンの中の丸 */
.teardrop-marker::after {
  content: "";

  width: 12px;
  height: 12px;

  background-color: #d8d8d8;
  border-radius: 50%;
}


/* 神社名の吹き出し */
.shrine-tooltip {
  background: white;

  border: none;
  border-radius: 4px;

  font-size: 13px;
  font-weight: bold;
  color: #9b2722;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}


/* 通知・ヘルプ */
#notification,
#help-text {
  position: absolute;
  z-index: 1001;

  background: #9b2722;
  color: #fff;

  padding: 12px 24px;
  border-radius: 20px;

  font-size: 13px;
  font-weight: bold;

  pointer-events: none;
}

#notification {
  top: 30px;
  left: 50%;
  transform: translateX(-50%);

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#help-text {
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}


/* 非表示 */
.hidden {
  display: none !important;
}

.is-hidden {
  display: none !important;
}












/* =========================
   スマホ版レイアウト
========================= */
@media screen and (max-width: 900px) {

  body,
  html {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }


  /* 全体 */
  #layout {
    width: 100%;
    height: 100dvh;
    position: relative;
    display: block;
  }


  /* 地図を全画面に敷く */
  #map-area {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    z-index: 1;
    background: #ddd;
  }

  #map {
    width: 100%;
    height: 100%;
  }


  /* 左サイドバーをスマホではUIレイヤーとして上に重ねる */
  #left-sidebar {
    position: fixed;
    inset: 0;
    width: 100% !important;
    height: 100dvh;
    background: transparent;
    box-shadow: none;
    z-index: 20;
    pointer-events: none;
  }

  #left-sidebar.minimized {
    width: 100% !important;
  }

  .sidebar-inner {
    width: 100%;
    height: 100%;
    display: block;
  }

  .toggle-sidebar-btn {
    display: none;
  }


  /* 上のヘッダー＋タブ */
  .sidebar-top {
    width: 100%;
    background: #f3f3f3;
    pointer-events: auto;
  }

  .header-logo {
    height: 88px;
    padding: 0 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2px;
    color: #9b2722;
  }


  /* スマホ版：右上の言語切り替えボタン */
  .toggle-icon {
    width: 42px;
    height: 24px;

    border: 1px solid #9b2722;
    border-radius: 999px;

    background: transparent;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .toggle-icon::before,
  .toggle-icon::after {
    display: none;
  }

  #lang-label {
    font-size: 11px;
    color: #9b2722;
  }


  /* タブ */
  .nav-tabs {
    width: 100%;
    height: 48px;
    display: flex;
    background: #f3f3f3;
    border-top: 1px solid #cfcfcf;
    border-bottom: 1px solid #cfcfcf;
  }

  .nav-tab {
    flex: 1;
    padding: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 14px;
    font-weight: 400;
    color: #9d9d9d;
  }

  .nav-tab + .nav-tab {
    border-left: 1px solid #cfcfcf;
  }

  .nav-tab.active {
    color: #9b2722;
    font-weight: 500;
  }


  /* 入力欄は地図の上に重ねる */
  #mode-input {
    width: 100%;
    position: fixed !important;
    top: 138px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    z-index: 30;
    background: transparent;
    pointer-events: auto;
  }

  .search-section {
    width: 100%;
    padding: 0 52px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .gray-input {
    width: 100%;
    height: 38px;
    padding: 0 30px;

    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 999px;

    font-size: 14px;
    color: #9b2722;
    outline: none;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .gray-input::placeholder {
    color: #bcbcbc;
    font-weight: 400;
    letter-spacing: 0;
  }


  /* 検索ボタンは文字だけ見せる */
  .search-section button {
    margin-top: 10px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;

    font-size: 13px;
    font-weight: 400;
    letter-spacing: 1px;
    color: #9b2722;

    box-shadow: none;
  }

  .search-section button:hover {
    background: transparent;
  }


  /* フィルターはこのデザインでは消す */
  .filters {
    display: none;
  }


  /* 下から出る一覧シート */
  .shrine-grid {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    height: 36dvh;

    display: flex;
    flex-direction: column;
    gap: 0;

    padding: 34px 34px 24px 34px;

    background: #f4f4f4;
    border-radius: 32px 32px 0 0;

    overflow-y: auto;
    z-index: 35;
    pointer-events: auto;
  }


  /* 上のつまみ */
  .shrine-grid::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);

    width: 48px;
    height: 4px;

    background: #9f9f9f;
    border-radius: 999px;
  }


  /* 空メッセージ */
  .empty-msg {
    grid-column: auto;
    padding: 24px 8px 8px 8px;
    color: #999;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
  }


  /* カードを横型レイアウトにする */
  .grid-card {
    display: grid;
    grid-template-columns: 1fr 150px;
    grid-template-areas:
      "title img"
      "status img"
      "rating img";
    column-gap: 18px;
    row-gap: 10px;

    padding: 8px 0 18px 0;
    margin: 0;

    background: transparent;
    border: none;
    border-bottom: 1px solid #d6d6d6;
    border-radius: 0;
    box-shadow: none;
  }

  .grid-card:hover {
    transform: none;
    box-shadow: none;
  }


  /* 画像は右 */
  .card-img {
    grid-area: img;

    width: 150px;
    height: 82px;

    object-fit: cover;
    display: block;
    margin: 0;

    border-radius: 0;
    background: #d8d8d8;
  }


  /* タイトル */
  .card-title {
    grid-area: title;
    margin: 0;

    align-self: end;

    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    color: #9b2722;
  }


  /* 営業情報 */
  .card-status {
    grid-area: status;

    font-size: 11px;
    color: #b0b0b0;
    line-height: 1.4;
  }

  .card-status .bold {
    color: #9b2722;
    font-weight: 500;
  }


  /* 星評価 */
  .card-rating {
    grid-area: rating;

    font-size: 12px;
    color: #b0b0b0;
    margin: 0;
    line-height: 1.2;
  }

  .card-rating .stars {
    margin-right: 4px;
    color: #d8d8d8;
    font-size: 15px;
    letter-spacing: 1px;
  }


  /* 通知系 */
  #notification,
  #help-text {
    font-size: 11px;
    padding: 10px 16px;
    border-radius: 999px;
  }

  #notification {
    top: 150px;
  }

  #help-text {
    bottom: calc(36dvh + 18px);
    width: 78%;
    text-align: center;
  }


  /* ズームボタンが下シートに被らないように */
  .leaflet-control-zoom {
    margin-bottom: calc(36dvh + 18px) !important;
  }

  .modal__panel.keepsake-modal {
    width: 100vw;
    height: 100vh;
    margin: 0;
  }

  .keepsake-modal__body {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 72px 18px 18px;
  }

  .keepsake-modal__image-wrap {
    height: 34vh;
  }

  .keepsake-modal__content {
    height: calc(66vh - 90px);
    padding-right: 0;
  }

  .keepsake-modal__title {
    font-size: 42px;
    line-height: 1.08;
  }

  .keepsake-modal__block h3,
  .modal-text-block h3 {
    font-size: 18px;
  }

  .keepsake-modal__block p,
  .modal-text-block p {
    font-size: 16px;
    line-height: 1.55;
  }
}