body {
    margin: 0;
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
}
 
/* ヘッダー */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #07ae6e;
    display: flex;
    align-items: center;
    justify-content: space-between; /* 左・中央・右に分散 */
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* ロゴの左余白 */
#logo {
    height: 60px;
    width: auto;
    margin-left: 20px;  /* 左端からの距離 */
    align-items: center;
}

/* 災害情報 */
#disaster-info {
  display: flex;
  gap: 2vw;         /* 左右要素間の隙間 */
  flex: 0 1 auto;   /* 残りスペースを取らない */
  min-width: 0;     /* テキスト折り返し対応 */
  margin-left: 20px;
}

#disaster-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin-right: 8px; /* 元は余白なしなら削除 */
}

#city-name {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
}

#disaster-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;  /* 高さ中央に揃える */
  align-items: center;
}

.disaster-item {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap; 
}

.disaster-item h4 {
  margin: 0;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap; 
}

.disaster-item p {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;      /* 長い文字列は折り返さず省略も可能 */
  overflow: hidden;
  text-overflow: ellipsis;
}

#disaster-source {
  margin-top: auto;
  margin-left: 4px;
  font-size: small;
  color: rgb(71, 71, 71);
  font-size: 12px;
  white-space: nowrap; 
}

#disaster-body p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* 右側ボタングループ */
#header-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;   /* 固定幅で縮まらない */
  margin-left: auto; 
  margin-right: 20px; 
}


/* 現在地に戻るボタン */
#recenter-btn {
  background: white;
  color: #07ae6e;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  margin-right: 10px;
  white-space: nowrap; 
}

#recenter-btn:hover {
  transform: scale(1.02);
}

/* 言語選択 */
#language-select {
  padding: 6px 10px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  margin-right: 10px;
}

/* コンテナ */
#container {
    display: flex;
    flex: 1;
    padding-top: 60px;
}
 
/* 避難所カード */
#shelter-list {
    width: 300px;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    padding: 10px;
    box-sizing: border-box;
    background-color: #f9f9f9;
}
 
.shelter-card {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;  /* 高さや背景色などの変化を滑らかに */
    overflow: hidden;
}
 
/* クリックで開いた状態のカード */
.shelter-card.expanded {
    background-color: #ebffe7;
    padding-bottom: 20px;  /* 詳細分の余白を追加 */
}
 
 
.shelter-card:hover {
    transform: scale(1.02);
}
 
 
/* マップ */
#map {
    flex: 1;
}
 
/* フッター */
#footer {
  display: flex;            /* 左右に分ける */
  justify-content: space-between; /* 左右に寄せる */
  align-items: center;      /* 縦中央揃え */
  padding: 0 20px;          /* 左右に余白 */
  height: 25px;
  font-size: 12px;
  background-color: #f0f0f0;
  color: #555;
}

#footer-left {
  /* 左側は特に追加スタイル不要。必要に応じて文字色やフォントを指定 */
  font-size: 12px;
}

#footer-right {
  font-size: 12px;
  color: #555;
}
 
/* 報告ダイアログ */
#reportDialog {
  display: none; /* 初期非表示 */
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 250px; /* 幅調整 */
  background-color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  font-family: 'Arial', sans-serif;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 開いたときのアニメーション */
#reportDialog.show {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

/* ダイアログのタイトル */
#reportDialog p {
  margin: 0 0 8px 0;
  font-weight: bold;
  font-size: 14px;
  color: #333;
}


/* テキストエリア */
#reportDialog textarea {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  resize: none;
  font-size: 13px;
  font-family: 'Arial', sans-serif;
}

/* テキストエリアフォーカス */
#reportDialog textarea:focus {
  outline: none;
  border-color: #4285F4;
  box-shadow: 0 0 4px rgba(66, 133, 244, 0.5);
}
.report-dialog {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;        /* 左端から余白 */
  right: 20px;       /* 右端から余白 */
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  width: auto;       /* 自動幅 */
  max-width: 360px;  /* 最大幅 */
  font-family: sans-serif;
  z-index: 1000;
}


/* ステータスラジオを縦並びでもOK */
.status-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

/* ボタン風ラベル */
.status-btn {
  flex: 1 1 45%;
  text-align: center;
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  color: #fff;
  user-select: none;
  position: relative;
}

.status-btn input[type="radio"] {
  display: none;
}

/* 色分け */
.status-btn.pass { 
  background: #4CAF50; 
}
.status-btn.fail { 
  background: #F44336; 
}
.status-btn.step { 
  background: rgb(159, 6, 236);
}
.status-btn.comment { 
  background: #e5cb05; 
}

.status-btn:hover {
  transform: scale(1.02);
}

/* コメント入力 */
#comment {
  width: 100%;
  height: 80px;
  padding: 8px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  resize: vertical;
  font-family: sans-serif;
  box-sizing: border-box;
}

/* 送信ボタン */
#send-btn {
  width: 100%;
  padding: 10px;
  background: #4CAF50;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

#send-btn:hover {
  transform: scale(1.02);
}

.status-btn.selected {
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.6);
  transform: translateY(-2px);
}

.report-header {
  display: flex;
  justify-content: space-between; /* タイトル左、ボタン右 */
  align-items: center;
  margin-bottom: 8px;
}

/* ×ボタン共通 */
#close-report {
  position: absolute;      /* ダイアログ右上に固定 */
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  padding: 0;              /* 内側余白なし */
  line-height: 24px;       /* 縦中央揃え */
  text-align: center;      /* 横中央揃え */
  font-size: 16px;
  font-weight: bold;
  border-radius: 50%;      /* 丸くする */
  border: none;
  background-color: #ddd;  /* 背景色 */
  color: #ff0000;          /* ×の色 */
  cursor: pointer;
  flex-shrink: 0;
  z-index: 1001;
}

#close-report:hover {
  background-color: #F44336;
  color: #fff;
}

/* ===============================
   モバイル対応強化
   =============================== */
@media (max-width: 820px) {

  /* ヘッダー調整 */
  #header {
    height: 80px;
    flex-wrap: nowrap;             /* 複数行に対応 */
    justify-content: center;     /* 中央寄せ */
    padding: 0 10px;
  }

  #logo {
    height: 40px;
    margin-left: 0;
  }

  /* 災害情報を1行で収める or 縦並び */
  #disaster-info {
    flex-direction: column;      /* 横並びだと潰れるので縦に */
    align-items: center;
    gap: 4px;
    margin-left: 0;
  }

  .disaster-item h4, .disaster-item p {
    font-size: 12px;
    text-align: center;
  }

  /* ボタン群を1行で表示（折り返さない） */
  #header-right {
    display: flex;
    flex-wrap: nowrap;         /* 折り返し禁止 */
    justify-content: center;   /* 中央揃え（右寄せにしたいなら「flex-end」） */
    align-items: center;       /* 縦方向中央 */
    gap: 8px;                  /* ボタン間の隙間 */
    margin: 4px 0;
  }

  #recenter-btn,
  #language-select {
    font-size: 12px;
    padding: 4px 8px;
  }

  /* フッター */
  #footer {
    flex-direction: column;   /* 左右並び→縦並び */
    text-align: center;
    height: auto;
    padding: 6px 10px;
    gap: 4px;
  }

  /* 地図と避難所リスト */
  #container {
    flex-direction: column;
  }

  #map {
    order: 1;
    height: 65vh;
    width: 100%;
  }

  #shelter-list {
    order: 2;
    width: 100%;
    height: 25vh;
    border-right: none;
    border-bottom: 1px solid #ccc;
    padding: 8px;
  }

  .shelter-card {
    font-size: 13px;
    padding: 8px;
  }

  /* コメントダイアログ */
  #reportDialog {
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    bottom: 10px;
    font-size: 13px;
  }

  #reportDialog textarea {
    height: 60px;
  }

}

/* さらに狭い画面（iPhone SEなど） */
@media (max-width: 400px) {
  #header {
    flex-direction: column;
    height: auto;
    padding: 6px 0;
  }

  #disaster-info {
    font-size: 11px;
  }

  .status-btn {
    flex: 1 1 100%;  /* 縦並び */
  }

  #footer {
    font-size: 11px;
  }
}

/* モバイル調整 */
@media screen and (max-width: 400px) {
  .status-btn {
    flex: 1 1 100%;  /* 狭い画面では縦並び */
  }
}
 
