* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #080d1a;
  --surface:  #0f1629;
  --surface2: #162035;
  --accent:   #38bdf8;
  --warning:  #f59e0b;
  --danger:   #f87171;
  --success:  #34d399;
  --text:     #f1f5f9;
  --muted:    #94a3b8;
  --border:   rgba(255,255,255,0.07);
}

body {
  font-family: 'Hiragino Sans', 'Meiryo', 'Yu Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}

/* ===== Header ===== */
#header {
  background: linear-gradient(160deg, #080f22 0%, #0c1a38 60%, #0a1628 100%);
  border-bottom: 1px solid rgba(56,189,248,0.15);
  position: relative;
  overflow: hidden;
}

#header::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(56,189,248,0.10) 0%, transparent 70%);
  pointer-events: none;
}

#header::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(245,158,11,0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* アラートバー */
#alert-bar {
  background: linear-gradient(90deg, rgba(239,68,68,0.18) 0%, rgba(245,158,11,0.12) 100%);
  border-bottom: 1px solid rgba(239,68,68,0.2);
  padding: 9px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.alert-chip {
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.4px;
}

.alert-chip.critical {
  background: rgba(239,68,68,0.2);
  border: 1px solid rgba(239,68,68,0.45);
  color: #fca5a5;
  animation: pulse 1.6s ease-in-out infinite;
}

.alert-chip.highlight {
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.4);
  color: #fde68a;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* タイトルエリア */
#header-main {
  padding: 16px 18px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* シナリオ選択 */
#scenario-section {
  padding: 10px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.scenario-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scenario-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  min-width: 90px;
}

.scenario-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.scenario-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
}

.scenario-btn:hover {
  border-color: rgba(56,189,248,0.5);
  color: var(--accent);
  background: rgba(56,189,248,0.08);
}

.scenario-btn.active {
  background: rgba(56,189,248,0.18);
  border-color: rgba(56,189,248,0.6);
  color: var(--accent);
}

.header-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, rgba(56,189,248,0.25), rgba(14,165,233,0.10));
  border: 1px solid rgba(56,189,248,0.35);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(56,189,248,0.12);
}

.header-text .title-city {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 3.5px;
  text-transform: uppercase;
  margin-bottom: 3px;
  font-weight: 700;
  opacity: 0.9;
}

.header-text h1 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-shadow: 0 0 30px rgba(56,189,248,0.25);
}

/* ===== アプリ説明 ===== */
#app-description {
  margin: 0;
  padding: 10px 18px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
}

#app-description p {
  margin-bottom: 6px;
}

#app-description ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ===== Location Section ===== */
#location-section {
  background: var(--surface);
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
}

#gps-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 18px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 14px;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(14,165,233,0.30);
  letter-spacing: 0.5px;
}

#gps-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(14,165,233,0.20);
}
@keyframes gps-pulse {
  0%   { box-shadow: 0 4px 20px rgba(14,165,233,0.30), 0 0 0 0 rgba(14,165,233,0.55); }
  60%  { box-shadow: 0 4px 20px rgba(14,165,233,0.30), 0 0 0 14px rgba(14,165,233,0); }
  100% { box-shadow: 0 4px 20px rgba(14,165,233,0.30), 0 0 0 0 rgba(14,165,233,0); }
}
#gps-btn.pulse-ring {
  animation: gps-pulse 1.4s ease-out 4;
}

#or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin: 12px 0;
  font-size: 13px;
}

#or-divider::before,
#or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

#addr-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
  letter-spacing: 0.3px;
}

#address-input-wrap {
  display: flex;
  gap: 8px;
}

#town-select {
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 8px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  text-align: center;
}

#town-select:focus {
  border-color: rgba(56,189,248,0.5);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.08);
}

#address-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#address-input:focus {
  border-color: rgba(56,189,248,0.5);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.08);
}

#address-input::placeholder {
  color: #4b5a72;
}

#search-btn {
  background: var(--surface2);
  color: var(--accent);
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

#search-btn:active {
  background: rgba(56,189,248,0.12);
  border-color: rgba(56,189,248,0.4);
}

/* ===== Zone Warning ===== */
#zone-warning {
  padding: 11px 16px;
  font-size: 13px;
  display: none;
  letter-spacing: 0.2px;
  line-height: 1.5;
}

#zone-warning.zone-danger {
  background: rgba(245,158,11,0.10);
  color: #fde68a;
  border-left: 3px solid var(--warning);
}

#zone-warning.zone-safe {
  background: rgba(52,211,153,0.08);
  color: #6ee7b7;
  border-left: 3px solid var(--success);
}

/* ===== Map Controls ===== */
#map-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}


/* ===== Map ===== */
#map {
  height: 42vh;
  min-height: 240px;
  background: var(--surface);
}

/* ===== Map Legend ===== */
.legend-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  user-select: none;
}
.legend-arrow { font-size: 8px; transition: transform 0.2s; }
.map-legend.collapsed .legend-body { display: none; }
.map-legend.collapsed .legend-arrow { transform: rotate(180deg); }

.shelter-details { margin-top: 8px; }
.shelter-details summary {
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.shelter-details summary::-webkit-details-marker { display: none; }
.shelter-details summary::before { content: '▶ '; font-size: 9px; }
.shelter-details[open] summary::before { content: '▼ '; }

.map-legend {
  background: rgba(8,13,26,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  padding: 3px 5px;
  font-size: 9px;
  color: #f1f5f9;
  line-height: 1.45;
}
.map-legend-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: middle;
}
.map-legend-char {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  margin-right: 3px;
  vertical-align: middle;
}

/* ===== 避難所マーカー（丸＋漢字）===== */
.shelter-dot-marker {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 3px rgba(0,0,0,0.7);
  box-shadow: 0 1px 4px rgba(0,0,0,0.45);
}

/* ===== Leaflet Popup Close Button ===== */
.leaflet-popup-close-button {
  width: 27px !important;
  height: 27px !important;
  font-size: 24px !important;
  line-height: 27px !important;
  padding: 0 !important;
  text-align: center !important;
}

/* ===== Zoom Controls ===== */
.leaflet-control-zoom {
  margin: 8px !important;
}
.leaflet-control-zoom a {
  width: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
  font-size: 14px !important;
}

/* ===== Results ===== */
#results {
  padding: 8px 14px 36px;
  display: none;
}
#gps-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
#gps-row #gps-btn { flex: 1; }
#reset-btn {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  height: 40px;
  padding: 0 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.07);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
#reset-btn:active { opacity: 0.7; }

#results h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 22px 0 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

#results h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== Shelter Card ===== */
.shelter-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-top: 2px solid rgba(248,113,113,0.35);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.shelter-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(56,189,248,0.18) 50%, transparent 100%);
}

.shelter-card.safe {
  border-top-color: rgba(52,211,153,0.45);
}

.shelter-card.safe::before {
  background: linear-gradient(90deg, transparent 0%, rgba(52,211,153,0.18) 50%, transparent 100%);
}

.shelter-card.caution {
  border-top-color: rgba(245,158,11,0.45);
}

.shelter-card.caution::before {
  background: linear-gradient(90deg, transparent 0%, rgba(245,158,11,0.14) 50%, transparent 100%);
}

.shelter-rank {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}

.shelter-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
  color: #f8fafc;
}

.badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted);
}

.badge.elev-safe    { background: rgba(52,211,153,0.10); border-color: rgba(52,211,153,0.28); color: #6ee7b7; }
.badge.elev-caution { background: rgba(245,158,11,0.09); border-color: rgba(245,158,11,0.28); color: #fcd34d; }
.badge.elev-danger  { background: rgba(248,113,113,0.09); border-color: rgba(248,113,113,0.28); color: #fca5a5; }

/* 時間バッジ */
.badge.time-ok     { background: rgba(56,189,248,0.10); border-color: rgba(56,189,248,0.28); color: #7dd3fc; font-size: 14px; font-weight: 700; }
.badge.time-danger { background: rgba(248,113,113,0.09); border-color: rgba(248,113,113,0.28); color: #fca5a5; font-size: 14px; font-weight: 700; }

/* 距離バッジ */
.badge.dist-badge  { background: rgba(139,92,246,0.09); border-color: rgba(139,92,246,0.25); color: #c4b5fd; }

/* 概算バッジ */
.badge.est-badge   { background: rgba(234,179,8,0.08); border-color: rgba(234,179,8,0.22); color: #fde047; font-size: 11px; }

/* 収容人数バッジ */
.badge.cap-lg { background: rgba(52,211,153,0.15); border-color: rgba(52,211,153,0.45); color: #6ee7b7; font-weight: 700; }
.badge.cap-md { background: rgba(56,189,248,0.12); border-color: rgba(56,189,248,0.40); color: #7dd3fc; font-weight: 700; }
.badge.cap-sm { background: rgba(148,163,184,0.10); border-color: rgba(148,163,184,0.25); color: #94a3b8; }

/* 徒歩バッジ */
.badge.walk-ok { background: rgba(163,230,53,0.10); border-color: rgba(163,230,53,0.30); color: #bef264; }

/* 時間・距離の行 */
.time-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
  align-items: center;
}

/* 標高・海岸・収容の行 */
.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  align-items: center;
}

.shelter-addr {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 11px;
  letter-spacing: 0.3px;
}

.shelter-link-row {
  margin-bottom: 8px;
}

.shelter-official-btn {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.shelter-official-btn:hover { opacity: 1; text-decoration: underline; }

.route-btn {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: 9px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.route-btn:active {
  background: rgba(56,189,248,0.10);
  border-color: rgba(56,189,248,0.4);
}

.no-result {
  color: var(--muted);
  text-align: center;
  padding: 24px 16px;
  font-size: 14px;
  line-height: 1.7;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* ===== Loading ===== */
#loading {
  position: fixed;
  inset: 0;
  background: rgba(8,13,26,0.88);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loading-inner {
  text-align: center;
  color: var(--text);
}

.spinner {
  width: 46px;
  height: 46px;
  border: 3px solid rgba(56,189,248,0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 14px;
}

@keyframes spin { to { transform: rotate(360deg); } }

#loading-inner p {
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

/* AI推奨バッジ */
.badge.ai-rec-badge {
  background: rgba(250,204,21,0.15);
  border-color: rgba(250,204,21,0.4);
  color: #fde68a;
  font-weight: 700;
  font-size: 12px;
  display: inline-block;
  margin-bottom: 8px;
}

.ai-rec-row {
  font-size: 13px;
  color: #bae6fd;
  margin-bottom: 5px;
  line-height: 1.5;
}

.ai-advice-body {
  font-size: 14px;
  color: #e2e8f0;
  line-height: 1.7;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.07);
  white-space: pre-wrap;
}

/* ===== AI Hint ===== */
#ai-hint {
  display: none;
  font-size: 12px;
  color: var(--accent);
  margin-top: 7px;
  text-align: center;
  letter-spacing: 0.3px;
  opacity: 0.9;
}

/* ===== AI Advice Card ===== */
#ai-advice {
  display: none;
  background: linear-gradient(135deg, rgba(56,189,248,0.07) 0%, rgba(139,92,246,0.06) 100%);
  border: 1px solid rgba(56,189,248,0.18);
  border-radius: 14px;
  padding: 14px 15px;
  margin: 16px 0 4px;
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
  flex: 1;
}

.ai-badge {
  font-size: 10px;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 20px;
  padding: 2px 9px;
  letter-spacing: 0.5px;
}

#ai-text {
  font-size: 14px;
  color: #e2e8f0;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ===== 検索結果 AI アドバイス ===== */
.search-ai-box {
  background: linear-gradient(135deg, rgba(56,189,248,0.07) 0%, rgba(139,92,246,0.06) 100%);
  border: 1px solid rgba(56,189,248,0.18);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
}

.search-ai-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--warning);
  margin-bottom: 6px;
}

.search-ai-line {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.7;
  padding: 2px 0;
}

/* ===== Consent Modal ===== */
#consent-modal {
  position: fixed;
  inset: 0;
  background: rgba(8,13,26,0.90);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

#consent-box {
  background: var(--surface);
  border: 1px solid rgba(56,189,248,0.22);
  border-radius: 18px;
  padding: 26px 20px 22px;
  max-width: 400px;
  width: 100%;
}

.consent-icon {
  font-size: 38px;
  text-align: center;
  margin-bottom: 10px;
}

.consent-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.consent-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.consent-body p {
  margin-bottom: 10px;
}

.consent-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 0;
}

.consent-body ul li {
  padding-left: 8px;
  border-left: 2px solid rgba(56,189,248,0.28);
}

.consent-body strong {
  color: var(--text);
}

.consent-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.consent-btn-agree {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(14,165,233,0.30);
}

.consent-btn-agree:active { opacity: 0.85; }

.consent-btn-cancel {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.consent-btn-cancel:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
}

/* ===== Responsive ===== */
@media (max-width: 380px) {
  .header-text h1  { font-size: 14px; }
  #gps-btn         { font-size: 16px; padding: 15px; }
  .shelter-name    { font-size: 15px; }
  .alert-chip      { font-size: 11px; padding: 3px 9px; }
}

/* ===== 地図ファースト レイアウト ===== */
:root {
  --bs-h: 180px;
  --header-h: 52px;
}

body {
  overflow: hidden;
}

/* ヘッダー：固定・コンパクト */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 900;
  overflow: visible;
}

#header::before, #header::after { display: none; }

#header-main {
  padding: 0 10px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.header-logo { flex-shrink: 0; }

.header-text h1 {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.header-subtitle {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* シナリオエリア（ラベル＋チップのラッパー） */
.scenario-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}
.scenario-label-top {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.3px;
  line-height: 1;
}

/* シナリオチップ（タップで設定を開く） */
#scenario-chip {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(56,189,248,0.12);
  border: 1px solid rgba(56,189,248,0.30);
  border-radius: 20px;
  padding: 3px 8px;
  white-space: nowrap;
  letter-spacing: 0.2px;
  cursor: pointer;
}
#scenario-chip:active { opacity: 0.7; }

/* ？ヘルプボタン */
#help-btn {
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text);
  border-radius: 9px;
  width: 36px;
  height: 36px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
#help-btn:active { background: rgba(56,189,248,0.15); }

/* 初回アピール用パルスアニメーション */
@keyframes help-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56,189,248,0.8); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(56,189,248,0); transform: scale(1.12); }
}
#help-btn.pulse {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56,189,248,0.12);
  animation: help-pulse 1.6s ease-in-out infinite;
}

/* 初回アピール吹き出し */
#help-tooltip {
  position: fixed;
  top: calc(var(--header-h) + 10px);
  right: 10px;
  background: var(--accent);
  color: #080d1a;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 15px;
  border-radius: 10px;
  white-space: nowrap;
  z-index: 1100;
  cursor: pointer;
  user-select: none;
  /* 初期は非表示 */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
#help-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}
/* 上矢印（ ? ボタンを指す） */
#help-tooltip-arrow {
  position: absolute;
  top: -8px;
  right: 15px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--accent);
}

/* オフラインバナー */
#offline-banner {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 880;
}

/* 地図：フルスクリーン */
#map {
  position: fixed;
  top: var(--header-h);
  bottom: var(--bs-h);
  left: 0; right: 0;
  height: auto;
  min-height: unset;
  z-index: 100;
}

/* 地図コントロール：地図上に浮かぶ */
#map-controls {
  position: fixed;
  bottom: calc(var(--bs-h) + 8px);
  left: 10px;
  right: auto;
  max-width: 55vw;
  z-index: 500;
  display: flex;
  gap: 5px;
  align-items: stretch;
  padding: 0;
  background: none;
  border: none;
}

.filter-btn {
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.25);
  color: var(--muted);
  background: rgba(8,13,26,0.82);
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1.2;
}
.filter-btn.active {
  color: #fff;
  border-color: rgba(56,189,248,0.6);
  background: rgba(56,189,248,0.30);
}
.filter-btn.active .filter-sub { opacity: 1; color: rgba(255,255,255,0.85); }
.filter-btn:active { opacity: 0.7; }

/* ボトムシート */
#bottom-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bs-h);
  background: var(--surface);
  border-top: 2px solid rgba(56,189,248,0.22);
  border-radius: 16px 16px 0 0;
  z-index: 1000;
  overflow: hidden;
  transition: height 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.55);
}

/* ドラッグハンドル */
#bs-handle {
  width: 40px;
  height: 5px;
  background: rgba(255,255,255,0.35);
  border-radius: 3px;
  margin: 10px auto 0;
  cursor: grab;
  touch-action: none;
  flex-shrink: 0;
}
#bs-handle:active { cursor: grabbing; }
@keyframes handle-bounce {
  0%, 100% { transform: translateY(0); }
  35%       { transform: translateY(-7px); }
  65%       { transform: translateY(-3px); }
}
#bs-handle.bounce {
  animation: handle-bounce 0.65s ease 3;
  background: rgba(56,189,248,0.7);
}

/* ボトムシートの中身 */
#bs-content {
  height: calc(100% - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ボトムシート内の location-section */
#bs-content #location-section {
  border-top: none;
}

/* ボトムシート内の zone-warning */
#bs-content #zone-warning {
  display: none;
}
#bs-content #zone-warning.zone-danger,
#bs-content #zone-warning.zone-safe {
  display: block;
}

/* 設定モーダル */
#settings-modal {
  position: fixed;
  inset: 0;
  background: rgba(8,13,26,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 11000;
}
#settings-modal.open {
  display: flex;
}

#settings-box {
  background: var(--surface);
  border: 1px solid rgba(56,189,248,0.20);
  border-radius: 18px 18px 0 0;
  padding: 20px 18px 40px;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

#settings-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

#settings-close {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: inherit;
  flex-shrink: 0;
}
#settings-close:active { background: rgba(255,255,255,0.15); }

/* 設定モーダル内のシナリオ選択 */
#settings-modal #scenario-section {
  padding: 0 0 14px;
  border: none;
}

/* 設定モーダル内の使い方（details） */
#settings-modal #app-description {
  margin: 0;
  padding: 14px 0 0;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
}

#settings-modal #app-description > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  list-style: none;
  padding: 4px 0 8px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
#settings-modal #app-description > summary::-webkit-details-marker { display: none; }
#settings-modal #app-description > summary::after { content: '▼'; font-size: 10px; opacity: 0.7; }
#settings-modal #app-description[open] > summary::after { content: '▲'; }

#settings-modal #app-description p,
#settings-modal #app-description ol {
  margin-top: 6px;
}

/* ===== END 地図ファースト レイアウト ===== */

/* ===== ハンバーガーメニューボタン ===== */
#menu-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  padding: 0;
  transition: background 0.15s;
}
#menu-btn:active { background: rgba(255,255,255,0.1); }

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ヘッダーテキスト：タイトルが余白を使うよう調整 */
.header-text {
  flex: 1;
  min-width: 0;
}

/* ===== ドロワーオーバーレイ ===== */
#drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 11800;
  pointer-events: none;
  transition: background 0.3s;
}
#drawer-overlay.open {
  background: rgba(0,0,0,0.55);
  pointer-events: auto;
}

/* ===== ナビゲーションドロワー ===== */
#nav-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: var(--surface);
  border-right: 1px solid rgba(56,189,248,0.12);
  z-index: 12000;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 4px 0 32px rgba(0,0,0,0.5);
}
#nav-drawer.open {
  transform: translateX(0);
}

#drawer-header {
  padding: 20px 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(160deg, #080f22 0%, #0c1a38 60%, #0a1628 100%);
  border-bottom: 1px solid rgba(56,189,248,0.12);
  flex-shrink: 0;
}

#drawer-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-app-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.drawer-app-sub {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1px;
  font-weight: 600;
  text-transform: uppercase;
}

#drawer-close {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--muted);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  flex-shrink: 0;
  transition: all 0.15s;
}
#drawer-close:active { background: rgba(255,255,255,0.15); color: #fff; }

#drawer-nav-list {
  flex: 1;
  padding: 10px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 18px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  position: relative;
}
.nav-item:hover {
  background: rgba(56,189,248,0.06);
  color: var(--accent);
}
.nav-item:active {
  background: rgba(56,189,248,0.12);
}
.nav-item.active {
  background: rgba(56,189,248,0.10);
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.nav-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-label-ja {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.nav-label-en {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.8px;
  opacity: 0.55;
  line-height: 1;
  text-transform: uppercase;
}
.nav-item.active .nav-label-en,
.nav-item:hover .nav-label-en {
  opacity: 0.75;
}

.nav-arrow {
  font-size: 20px;
  color: var(--muted);
  opacity: 0.4;
  font-weight: 300;
  flex-shrink: 0;
}
.nav-item.active .nav-arrow,
.nav-item:hover .nav-arrow {
  opacity: 0.7;
}

#drawer-footer {
  padding: 16px 18px;
  font-size: 11px;
  color: rgba(148,163,184,0.35);
  text-align: center;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ===== 情報ページ（右からスライド） ===== */
#info-page {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
#info-page.open {
  transform: translateX(0);
}

#info-header {
  height: var(--header-h);
  background: linear-gradient(160deg, #080f22 0%, #0c1a38 60%, #0a1628 100%);
  border-bottom: 1px solid rgba(56,189,248,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  flex-shrink: 0;
  position: relative;
}

#info-back {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(56,189,248,0.10);
  border: 1px solid rgba(56,189,248,0.22);
  color: var(--accent);
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
  letter-spacing: 0.2px;
}
#info-back span { font-size: 20px; line-height: 1; margin-top: -1px; }
#info-back:active { background: rgba(56,189,248,0.20); }

#info-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#info-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.info-section {
  display: none;
  padding: 20px 16px 48px;
}
.info-section.active {
  display: block;
}

/* ── タイムライン（更新履歴） ── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 24px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 82px;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: rgba(56,189,248,0.18);
}
.timeline-item:last-child::before { display: none; }

.timeline-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 3px;
  min-width: 82px;
  letter-spacing: 0.3px;
}

.timeline-content {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  position: relative;
}
.timeline-content::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 10px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.timeline-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.timeline-tag.new {
  background: rgba(52,211,153,0.15);
  border: 1px solid rgba(52,211,153,0.35);
  color: #34d399;
}

/* ── 情報カード（避難所データ） ── */
.info-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.info-card.warning-card {
  border-color: rgba(245,158,11,0.25);
  background: rgba(245,158,11,0.04);
}

.info-card-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
  margin-top: 2px;
}

.info-card-body {
  flex: 1;
}

.info-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.info-card-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.info-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(56,189,248,0.3);
  padding-bottom: 1px;
  word-break: break-all;
}
.info-link:hover { border-bottom-color: var(--accent); }

/* ── ポリシーブロック（プライバシーポリシー） ── */
.policy-block {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.policy-block:first-child { padding-top: 0; }
.policy-block:last-child { border-bottom: none; }

.policy-icon {
  font-size: 26px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
  margin-top: 2px;
}

.policy-body {
  flex: 1;
}

.policy-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  letter-spacing: 0.3px;
}

.policy-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── 製作者情報 ── */
.creator-hero {
  background: linear-gradient(135deg, rgba(56,189,248,0.07) 0%, rgba(139,92,246,0.06) 100%);
  border: 1px solid rgba(56,189,248,0.18);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 20px;
}

.creator-org-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(56,189,248,0.12);
  border: 1px solid rgba(56,189,248,0.28);
  border-radius: 20px;
  padding: 4px 14px;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.creator-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.creator-kana {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.creator-email {
  display: inline-block;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(56,189,248,0.28);
  border-radius: 10px;
  padding: 8px 18px;
  transition: all 0.2s;
}
.creator-email:hover { background: rgba(56,189,248,0.10); }

.creator-about {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}

.creator-about-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.creator-about p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
}

.info-copy {
  text-align: center;
  font-size: 12px;
  color: rgba(148,163,184,0.35);
  padding-top: 8px;
}

/* ── 使い方ページ ── */
.howto-intro {
  background: rgba(56,189,248,0.06);
  border: 1px solid rgba(56,189,248,0.18);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.howto-intro strong { color: var(--text); }

.howto-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.howto-step {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.howto-step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(56,189,248,0.30);
}

.howto-step-body { flex: 1; }

.howto-step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.howto-step-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 6px;
}

.howto-step-body ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.howto-step-body li {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 4px;
}
.howto-step-body strong { color: var(--text); }

.howto-note {
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.22);
  border-radius: 12px;
  padding: 14px 16px;
}

.howto-note-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--warning);
  margin-bottom: 6px;
}

.howto-note p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
.howto-note strong { color: var(--text); }

/* ── 用語解説 ── */
.howto-glossary {
  margin-top: 20px;
  background: rgba(56,189,248,0.05);
  border: 1px solid rgba(56,189,248,0.15);
  border-radius: 12px;
  padding: 14px 16px;
}
.howto-glossary-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.howto-glossary-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.howto-glossary-item:last-child { border-bottom: none; }
.howto-glossary-term {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.howto-glossary-def {
  font-size: 12px;
  color: var(--accent);
}

/* ── 多言語翻訳案内 ── */
.howto-translate {
  margin-top: 16px;
  border: 1px solid rgba(52,211,153,0.18);
  border-radius: 12px;
  overflow: hidden;
}
.howto-translate-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  padding: 12px 16px 10px;
  background: rgba(52,211,153,0.07);
  border-bottom: 1px solid rgba(52,211,153,0.12);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.howto-translate-title::-webkit-details-marker { display: none; }
.howto-translate-title::after { content: '▶'; font-size: 10px; color: var(--muted); }
details[open] .howto-translate-title::after { content: '▼'; }
.translate-lang-block {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.translate-lang-block:last-child { border-bottom: none; }
.translate-lang-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 5px;
}
.translate-lang-block > p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.5;
}
.translate-steps { display: flex; flex-direction: column; gap: 5px; }
.translate-step {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  padding-left: 4px;
}
.translate-step strong { color: var(--text); }

/* ── ナビ区切り線 ── */
.nav-divider-line {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 6px 16px;
}
.nav-item-admin { opacity: 0.7; }
.nav-item-admin:hover { opacity: 1; }

/* ── 管理者パネル ── */
.admin-login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  gap: 12px;
}
.admin-login-icon { font-size: 44px; }
.admin-login-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.admin-login-desc {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin: 0;
}
.admin-password-input {
  width: 100%;
  max-width: 280px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  text-align: center;
  letter-spacing: 2px;
  outline: none;
}
.admin-password-input:focus { border-color: var(--accent); }
.admin-login-btn {
  width: 100%;
  max-width: 280px;
  padding: 12px;
  background: var(--accent);
  color: #080d1a;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.admin-login-error {
  font-size: 13px;
  color: #f87171;
  min-height: 18px;
}
.admin-panel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(56,189,248,0.07);
  border-bottom: 1px solid rgba(56,189,248,0.15);
  flex-wrap: wrap;
}
.admin-panel-title { font-size: 13px; font-weight: 700; color: var(--accent); }
.admin-role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  vertical-align: middle;
  margin-left: 4px;
}
.admin-role-badge.master   { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.admin-role-badge.standard { background: rgba(148,163,184,0.12); color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }
.admin-view-tabs { display: flex; gap: 4px; }
.admin-tab {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.admin-tab.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 700;
}
.admin-area-btns {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}
.admin-area-btn {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.admin-area-btn.active {
  background: rgba(56,189,248,0.2);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}
#admin-map {
  height: 300px;
  width: 100%;
}
#admin-map-form {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.admin-map-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.admin-map-form-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}
.admin-logout-btn {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.admin-panel-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-filter-row {
  display: flex;
  gap: 6px;
}
.admin-search-input {
  flex: 1;
  padding: 8px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.admin-filter-select {
  padding: 8px 6px;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* 避難所リスト */
.admin-item {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
}
.admin-item-header:active { background: rgba(255,255,255,0.04); }
.admin-item-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.admin-type-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.admin-type-kinkyuu { background: rgba(56,189,248,0.15); color: #38bdf8; }
.admin-type-hinanjo  { background: rgba(52,211,153,0.15); color: #34d399; }
.admin-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.admin-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}
.admin-badge-open { background: rgba(52,211,153,0.15); color: #34d399; }
.admin-badge-half { background: rgba(251,191,36,0.15); color: #fbbf24; }
.admin-badge-full { background: rgba(248,113,113,0.15); color: #f87171; }
.admin-badge-none { background: rgba(148,163,184,0.10); color: #64748b; }
.admin-chevron { color: var(--muted); font-size: 16px; transition: transform 0.2s; }

/* 編集フォーム */
.admin-item-form {
  display: none;
  padding: 0 14px 14px;
  background: rgba(0,0,0,0.15);
}
.admin-item-form.open { display: block; }
.admin-form-field { margin-top: 12px; }
.admin-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.admin-status-btns { display: flex; gap: 6px; }
.admin-status-btn {
  flex: 1;
  padding: 7px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.admin-status-btn-open.active { background: rgba(52,211,153,0.20); color: #34d399; border-color: #34d399; }
.admin-status-btn-half.active { background: rgba(251,191,36,0.20); color: #fbbf24; border-color: #fbbf24; }
.admin-status-btn-full.active { background: rgba(248,113,113,0.20); color: #f87171; border-color: #f87171; }
.admin-status-btn-none.active { background: rgba(255,255,255,0.10); color: var(--text); border-color: rgba(255,255,255,0.4); }
.admin-textarea {
  width: 100%;
  min-height: 58px;
  padding: 9px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}
.admin-textarea:focus { border-color: var(--accent); }
.admin-save-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: #080d1a;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.admin-save-msg {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #34d399;
  text-align: center;
}

/* ── 管理者 CRUD ── */
.admin-edit-meta-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--muted);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}
.admin-edit-meta-btn:hover { color: var(--accent); border-color: var(--accent); }

.admin-delete-shelter-btn {
  background: rgba(248,113,113,0.07);
  border: 1px solid rgba(248,113,113,0.18);
  color: #f87171;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

.admin-meta-form {
  padding: 12px 14px 14px;
  background: rgba(56,189,248,0.04);
  border-top: 1px solid rgba(56,189,248,0.12);
}

.admin-form-row { display: flex; gap: 10px; }
.admin-form-row .admin-form-field { flex: 1; min-width: 0; }

.admin-input, .admin-select {
  width: 100%;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.admin-input:focus, .admin-select:focus { border-color: var(--accent); }
.admin-select option { background: #101825; }

.admin-form-btns { display: flex; gap: 8px; margin-top: 12px; }
.admin-save-btn.admin-save-half { flex: 1; margin-top: 0; }
.admin-cancel-btn {
  flex: 1;
  padding: 10px;
  background: rgba(255,255,255,0.07);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.admin-badge-custom { background: rgba(52,211,153,0.12); color: #34d399; font-size: 10px; }

.admin-create-bar { padding: 10px 14px 0; }
.admin-add-btn {
  width: 100%;
  padding: 10px;
  background: rgba(52,211,153,0.10);
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.22);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.admin-add-btn:active { background: rgba(52,211,153,0.20); }

.admin-create-form {
  margin: 10px 14px 0;
  padding: 14px;
  background: rgba(52,211,153,0.05);
  border: 1px solid rgba(52,211,153,0.18);
  border-radius: 12px;
}
.admin-create-title {
  font-size: 14px;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 8px;
}

.admin-map-add-btn {
  display: block;
  margin: 8px 8px 0;
  padding: 8px 14px;
  background: rgba(52,211,153,0.10);
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.22);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  width: calc(100% - 16px);
  box-sizing: border-box;
}
.admin-map-add-btn.active {
  background: rgba(52,211,153,0.22);
  border-color: #34d399;
  animation: gps-pulse 1.2s ease-out infinite;
}
.admin-map-btn-row {
  display: flex;
  gap: 6px;
  margin: 8px 8px 0;
}
.admin-map-btn-row .admin-map-add-btn,
.admin-map-btn-row .admin-ann-add-btn,
.admin-map-btn-row .admin-ann-cancel-btn {
  margin: 0;
  flex: 1;
  width: auto;
}
.admin-ann-add-btn {
  padding: 8px 14px;
  background: rgba(239,68,68,0.10);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
}
.admin-ann-cancel-btn {
  padding: 8px 14px;
  background: rgba(100,116,139,0.15);
  color: #94a3b8;
  border: 1px solid rgba(100,116,139,0.2);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
}

/* ── 製作者リンクボタン ── */
.creator-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.creator-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 8px 16px;
  text-decoration: none;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}
.creator-link-btn:hover {
  background: rgba(56,189,248,0.12);
  border-color: rgba(56,189,248,0.30);
  color: var(--accent);
}

/* ===== END メニュー・ページ ===== */

/* ===== Footer ===== */
#app-footer {
  margin-top: 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 16px 32px;
  font-size: 13px;
  color: var(--muted);
}

.footer-section {
  margin-bottom: 20px;
}

.footer-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.footer-privacy {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-privacy li {
  padding-left: 10px;
  border-left: 2px solid rgba(56,189,248,0.25);
  line-height: 1.55;
}

.footer-creator {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.6;
}

.footer-mail {
  color: var(--accent);
  text-decoration: none;
}

.footer-mail:hover {
  text-decoration: underline;
}

.footer-copy {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: rgba(148,163,184,0.5);
}

/* ===== 管理者ヘルプモーダル ===== */
#admin-help-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-end;
}
.admin-help-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
.admin-help-box {
  position: relative;
  width: 100%;
  max-height: 85vh;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  border-top: 2px solid rgba(56,189,248,0.25);
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.admin-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.admin-help-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
}
.admin-help-body {
  padding: 12px 16px 20px;
}
.admin-help-section {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.admin-help-section:last-child { border-bottom: none; }
.admin-help-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.admin-help-section ol,
.admin-help-section ul {
  margin: 4px 0 0 18px;
  padding: 0;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.9;
}
.admin-help-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  margin-bottom: 4px;
}
.admin-help-badge-standard { background: rgba(148,163,184,0.12); color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }
.admin-help-badge-master   { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.admin-help-method {
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.admin-help-method b {
  display: block;
  font-size: 12px;
  color: #e2e8f0;
  margin-bottom: 4px;
}
.admin-help-note {
  font-size: 11px;
  color: #94a3b8;
  margin: 6px 0 0;
}
.admin-help-btn {
  background: none;
  border: 1px solid rgba(148,163,184,0.3);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.admin-help-btn:hover { color: var(--accent); border-color: rgba(56,189,248,0.4); }

/* ===== 地図タップ位置指定 ===== */
#map-tap-btn {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 11px 16px;
  background: rgba(56,189,248,0.08);
  border: 1px dashed rgba(56,189,248,0.35);
  border-radius: 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
#map-tap-btn:active { background: rgba(56,189,248,0.15); }
#map-tap-banner {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 800;
  background: rgba(56,189,248,0.92);
  color: #080d1a;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#map-tap-cancel {
  background: rgba(0,0,0,0.15);
  border: none;
  border-radius: 6px;
  color: #080d1a;
  font-size: 14px;
  padding: 3px 10px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== 地図注記（アノテーション）エディタ ===== */
.ann-color-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}
.ann-color-btn {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.ann-color-btn.active {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
}
