/* 共通 */
body {
    margin: 0;
    font-family: "Noto Sans JP", sans-serif;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e1e1e;
    color: white;
    text-align: start;
    padding: 5px;
    padding-left: 10px;
    font-size: 0.5rem;
}

.header-buttons button {
    margin-left: 8px;
    padding: 5px 10px;
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.header-buttons button:hover {
    background-color: #ff9900;
}

/* 丸アイコンは初期では非表示（スマホ専用） */
.icon-btn {
    display: none;
    background-color: #ff6600;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 5px;
}

.icon-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ハンバーガーもPCでは非表示 */
#hamburger-btn {
    display: none;
}

/* メインとサイドバー */
#main {
    display: flex;
    flex: 1;
    height: calc(100vh - 50px);
}

#map {
    flex: 2;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#sidebar {
    flex: none;
    width: 500px;
    max-width: 500px;
    background: #f7f7f7;
    padding: 10px;
    overflow-y: auto;
    border-left: 1px solid #ccc;
    height: calc(100vh - 50px);
}

#sidebar h2 {
    margin-top: 0;
}

#sidebar select {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
}

#place-list {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 20px; /* 一番下に余白 */
}

#place-list li {
    margin-bottom: 8px;
    padding: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

#place-list li:hover {
    background: #ffe6cc;
}

/* 背景マスク */
#mask {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 100;
}

/* --- スマホ用 --- */
/* スマホ用 */
@media (max-width: 768px) {

  /* PC用テキストボタン非表示 */
  #btn-locate, #btn-fullview {
    display: none;
  }

  /* 丸いボタン（現在地・全体表示） */
  .icon-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: #ff6600;
    width: 48px;
    height: 48px;
    margin-left: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: background 0.2s;
  }

  .icon-btn:hover {
    background-color: #ff9900;
  }

  .icon-btn img {
    width: 80%;
    height: 80%;
    object-fit: contain;
  }

  /* ハンバーガー表示 */
  #hamburger-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ff6600;
    border-radius: 50%;       /* 完全な円 */
    width: 48px;
    height: 48px;
    margin-left: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: background 0.2s;
    flex-direction: column;
  }

  #hamburger-btn span {
    display: block;
    width: 20px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    margin: 3px 0;
  }

  /* 横並び */
  .header-buttons {
    display: flex;
    align-items: center;
  }

  #sidebar {
    position: fixed;
    top: 50px;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100% - 50px);
    border-left: 1px solid #ccc;
    background: #f7f7f7;
    z-index: 200;
    transition: right 0.3s ease;
  }

  #sidebar.active {
    right: 0;
  }

  #mask.active {
    display: block;
  }

  #main {
    flex-direction: column;
  }
}