body {
  margin: 0;
  padding: 0;
}
html,
body,
#map {
  height: 100%;
}

/* 1. 外側のベース（ボタンを綺麗に浮かせる） */
#search-container {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  pointer-events: none; /* 下の地図の邪魔をしない */
}

/* 2. 開閉トグルボタンのデザイン */
#menu-toggle-btn {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
  transition: transform 0.2s ease, background-color 0.2s;
  outline: none;
}
#menu-toggle-btn:hover {
  background-color: #fcfcfc;
  transform: scale(1.05);
}

/* ボタン内の三本線 */
#menu-toggle-btn .bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: #444444;
  transition: all 0.3s ease;
}

/* ボタンがアクティブ（メニュー展開時）の時の三本線アニメーション（×印に変化） */
#menu-toggle-btn.active .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
#menu-toggle-btn.active .bar:nth-child(2) {
  opacity: 0;
}
#menu-toggle-btn.active .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 3. 中身のメニューバー本体（横一直線・カプセル型仕様） */
#menu-content {
  background: rgba(255, 255, 255, 0.98);
  padding: 0 24px;
  height: 44px;
  border-radius: 30px; /* ビラ掲示板と同調 */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: auto;
  box-sizing: border-box;
  
  /* 滑らかな開閉アニメーションの肝 */
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
  white-space: nowrap;
}

/* 🌟 折りたたまれている状態のスタイル（極限まで隠す） */
#menu-content.collapsed {
  opacity: 0;
  visibility: hidden;
  max-width: 0;
  padding: 0;
  transform: translateX(-20px);
}

/* 4. 入力窓・各種パーツのデザイン（統一仕様） */
#search-input,
#address-input {
  width: 150px;
  height: 30px;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  background: transparent;
  font-size: 13px;
  color: #444444;
  font-weight: 600;
  outline: none;
  box-sizing: border-box;
}
#search-input:focus,
#address-input:focus {
  border-bottom: 2px solid #444444;
}

#search-button,
#address-button {
  background: transparent;
  border: none;
  font-size: 13px;
  color: #444444;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
#search-button:hover,
#address-button:hover {
  color: #888888;
}

/* 各種チェックボックス */
.toggle-label {
  color: #444444;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.toggle-label input[type="checkbox"] {
  accent-color: #444444;
  cursor: pointer;
}

/* ==========================================
   スマートフォン用の完全レスポンシブ
   ========================================== */
@media (max-width: 767px) {
  #search-container {
    top: 10px;
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
  }
  
  /* スマホ展開時は画面一杯に縦並び風に広げる */
  #search-container:has(#menu-toggle-btn.active) {
    pointer-events: auto;
  }
  
  #menu-content {
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
    border-radius: 16px;
    gap: 12px;
  }
  
  #menu-content.collapsed {
    transform: translateY(-10px);
    max-width: none;
  }
  
  #search-input,
  #address-input {
    width: 100%;
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 10px;
    height: 38px;
  }
  
  #search-button,
  #address-button {
    background: #444444;
    color: #ffffff;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
  }
  #search-button:hover,
  #address-button:hover {
    color: #ffffff;
    background: #666666;
  }
}