:root{
  --brand:#ff4500;
  --brand-light:#ff6b35;
  --brand-dark:#c41e00;
  --ink:#1a1a1a;
  --muted:#64748b;
  --card:#ffffff;
  --border:#e2e8f0;
  --alert-bg:#fef3c7;
  --alert-border:#f59e0b;
  --fire-red:#dc2626;
  --fire-orange:#ea580c;
  --fire-yellow:#fbbf24;
  --bg-primary:#fafafa;
  --bg-secondary:#f8fafc;
  --shadow-sm:0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:0 10px 30px rgba(0,0,0,0.12), 0 5px 12px rgba(0,0,0,0.06);
  --shadow-float:0 8px 32px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.12);
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:16px;
  --transition:all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
*{box-sizing:border-box}
html,body{
  margin:0;height:100%;width:100%;overflow:hidden;
  background:#1a1a1a;
  color:#1a202c;
  font:15px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hide old header completely */
header{display:none !important;}

/* Full-screen map container */
.page{
  position:fixed;
  inset:0;
  margin:0;
  padding:0;
  display:block;
  height:100vh;
  width:100vw;
}


/* Floating Logo Overlay - Anchored to top of fire lists */
.logoOverlay {
  position: fixed;
  bottom: calc(60vh + 30px);
  left: 12px;
  z-index: 1000;
  width: 280px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: var(--radius-lg);
  padding: 8px 11px;
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(226, 232, 240, 0.6);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
.logoOverlay:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.22), 0 6px 20px rgba(0,0,0,0.15);
}
.logoOverlay img {
  height: 75px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Floating Title Overlay - Top Center (equally spaced between logo and controls) */
.titleOverlay {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: var(--radius-lg);
  padding: 14px 28px;
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(226, 232, 240, 0.6);
  transition: var(--transition);
}
.titleOverlay:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.22), 0 6px 20px rgba(0,0,0,0.15);
}
.titleOverlay h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1a202c 0%, #dc2626 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

/* Info Button - Left Side (below logo, avoiding Google Maps controls) */
.infoButton {
  position: fixed;
  left: 12px;
  top: 92px;
  z-index: 1000;
  width: 48px;
  height: 48px;
  background: rgba(26, 32, 44, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  font-family: 'Segoe UI', Arial, sans-serif;
}
.infoButton:hover {
  background: rgba(26, 32, 44, 0.95);
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 6px 20px rgba(0,0,0,0.2);
}
.infoButton:active {
  transform: scale(0.98);
}

/* Fire Lists Container - Bottom Left of screen */
.fireListsContainer {
  position: fixed;
  left: 12px;
  bottom: 40px;
  z-index: 1000;
  width: 280px;
  max-height: calc(60vh - 20px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.fireListsContainer::-webkit-scrollbar {display: none;}

.fireListsContainer .listBox {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(226, 232, 240, 0.6);
  transition: var(--transition);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
}
.fireListsContainer .listBox:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.18), 0 4px 15px rgba(0,0,0,0.12);
}
.fireListsContainer .listBox::-webkit-scrollbar {
  height: 4px;
}
.fireListsContainer .listBox::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.2);
  border-radius: 2px;
}
.fireListsContainer .listBox::-webkit-scrollbar-thumb {
  background: rgba(220, 38, 38, 0.4);
  border-radius: 2px;
}
.fireListsContainer .listBox::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 38, 38, 0.6);
}
.fireListsContainer .listBox h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #1a202c;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(220, 38, 38, 0.15);
  padding-bottom: 5px;
  white-space: nowrap;
}
.fireListsContainer .listBox ul {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 150px;
  overflow-y: auto;
}
.fireListsContainer .listBox ul::-webkit-scrollbar {display: none;}
.fireListsContainer .listBox li {
  padding: 5px 0;
  font-size: 10px;
  color: #334155;
  border-bottom: 1px solid rgba(226, 232, 240, 0.3);
  line-height: 1.4;
  white-space: nowrap;
}
.fireListsContainer .listBox li:last-child {
  border-bottom: none;
}
.fireListsContainer .listBox li .emoji {
  margin-right: 4px;
  font-size: 10px;
}
.fireListsContainer .listBox li .coord {
  color: #64748b;
  font-size: 9px;
}

.fireListsContainer .ageLine {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  font-size: 12px;
  white-space: nowrap;
}
.fireListsContainer .ageBox {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.fireListsContainer .ageLabel {
  color: #334155;
  font-size: 11px;
  line-height: 1.3;
}

/* Info Panel - Sliding from left */
.infoPanel {
  position: fixed;
  left: -420px;
  top: 92px;
  z-index: 1001;
  width: 400px;
  max-height: calc(100vh - 112px);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(226, 232, 240, 0.8);
  overflow-y: auto;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.infoPanel.open {
  left: 68px;
}
.infoPanel::-webkit-scrollbar {width: 6px;}
.infoPanel::-webkit-scrollbar-track {background: rgba(226, 232, 240, 0.3);border-radius:3px;}
.infoPanel::-webkit-scrollbar-thumb {background: rgba(220, 38, 38, 0.4);border-radius:3px;}
.infoPanel::-webkit-scrollbar-thumb:hover {background: rgba(220, 38, 38, 0.6);}

.infoPanel h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: #dc2626;
  border-bottom: 2px solid rgba(220, 38, 38, 0.15);
  padding-bottom: 8px;
  letter-spacing: -0.01em;
}
.infoPanel p {
  margin: 12px 0;
  color: #334155;
  line-height: 1.7;
  font-size: 14px;
}
.infoPanel ul {
  margin: 12px 0 0 20px;
  padding: 0;
}
.infoPanel li {
  margin: 8px 0;
  color: #334155;
}
.infoPanel a {
  color: #ea580c;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}
.infoPanel a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #dc2626;
  transition: width 0.3s ease;
}
.infoPanel a:hover {
  color: #dc2626;
}
.infoPanel a:hover::after {
  width: 100%;
}

/* Control Buttons - Top Right (stacked vertically) */
.controlButtons {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.controlButtons button {
  appearance: none;
  border: 1px solid rgba(226, 232, 240, 0.6);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  color: #334155;
}
.controlButtons button:hover {
  background: rgba(255, 255, 255, 1);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-float);
  transform: translateY(-2px);
  color: #1a202c;
}
.controlButtons button:active {
  transform: translateY(0);
}

/* Alert History Panel - Slide in from right like info panel */
.alertHistoryPanel {
  position: fixed;
  right: -420px;
  top: 92px;
  z-index: 1001;
  width: 400px;
  max-height: calc(100vh - 112px);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(226, 232, 240, 0.8);
  overflow: hidden;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.alertHistoryPanel.visible {
  right: 68px;
}

.alertHistoryHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alertHistoryHeader h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.alertHistoryHeader .closeBtn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  transition: var(--transition);
  padding: 0;
}

.alertHistoryHeader .closeBtn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.alertHistoryContent {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.alertHistoryContent::-webkit-scrollbar {
  width: 6px;
}

.alertHistoryContent::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.3);
  border-radius: 3px;
}

.alertHistoryContent::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.5);
  border-radius: 3px;
}

.alertHistoryContent::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.7);
}

.noAlerts {
  text-align: center;
  color: #64748b;
  font-size: 14px;
  padding: 40px 20px;
  font-style: italic;
}

.alertHistoryItem {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(239, 68, 68, 0.05) 100%);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-left: 4px solid #dc2626;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  transition: var(--transition);
  cursor: pointer;
}

.alertHistoryItem:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(239, 68, 68, 0.08) 100%);
  border-color: rgba(220, 38, 38, 0.4);
  transform: translateX(-2px);
  box-shadow: var(--shadow-md);
}

.alertHistoryItem:last-child {
  margin-bottom: 0;
}

.alertHistoryItem .alertTime {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.alertHistoryItem .alertTitle {
  font-size: 14px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.alertHistoryItem .alertDetails {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}

.alertHistoryItem .alertBadge {
  display: inline-block;
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
}

#alertHistoryBtn {
  position: relative;
}

#alertHistoryBtn .badgeCounter {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #dc2626;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
  line-height: 1.2;
}

/* ────────────────────────────────────────────────────────────────────────────
   Radius Slider Control
   ──────────────────────────────────────────────────────────────────────────── */

#radiusSliderContainer {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.radiusSliderLabel {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  writing-mode: horizontal-tb;
  margin-bottom: 4px;
  white-space: nowrap;
}

.radiusSliderValue {
  font-size: 18px;
  font-weight: 700;
  color: #3b82f6;
  text-align: center;
  min-width: 40px;
  padding: 6px 10px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.radiusSlider {
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  writing-mode: bt-lr;
  width: 8px;
  height: 200px;
  background: linear-gradient(to top, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.4));
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radiusSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
  transition: all 0.2s ease;
}

.radiusSlider::-webkit-slider-thumb:hover {
  background: #2563eb;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6);
}

.radiusSlider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #3b82f6;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
  transition: all 0.2s ease;
}

.radiusSlider::-moz-range-thumb:hover {
  background: #2563eb;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6);
}

.radiusSlider:hover {
  background: linear-gradient(to top, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.5));
}

.infoCard {display:none !important;}
.mapCard {
  position: fixed !important;
  inset: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  height: 100vh !important;
  width: 100vw !important;
  min-height: auto !important;
}
.mapHeader {display: none !important;}
#mapWrap {
  position: fixed !important;
  inset: 0 !important;
  min-height: auto !important;
}
#map {
  position: fixed !important;
  inset: 0 !important;
  border-radius: 0 !important;
}


/* =====  FIRE LIST BOXES - IN SIDEBAR ===== */
.listBox {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 250, 0.95) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border:1px solid rgba(226, 232, 240, 0.6);
  border-radius:var(--radius-md);
  padding:14px 16px;
  font:14px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-shadow:var(--shadow-sm);
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.listBox:hover {
  box-shadow:var(--shadow-md);
  border-color:rgba(220, 38, 38, 0.25);
  transform: translateY(-2px);
}
#fireListLeb, #fireListOther { max-height: 220px; overflow-y: auto; }
#fireListLeb::-webkit-scrollbar, #fireListOther::-webkit-scrollbar {display: none;}

/* Age legend box */
#ageLegend { max-width: 100%; }

.listBox h3 {
  margin:0 0 6px 0;
  font-size:16px;
  font-weight:700;
  color:#dc2626;
  letter-spacing:-0.01em;
  white-space: nowrap;
}
.listBox ul { list-style:none; margin:0; padding:0; }
.listBox li {
  margin:0;
  color:#1e293b;
  padding: 2px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  transition: var(--transition);
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}
.listBox li:last-child{border-bottom:none;}
.listBox .coord { color:#64748b; font-size:13px; font-weight:500; }
.listBox .emoji { margin-right:8px; }


/* Age legend specific styles */
.ageLine {
  display:flex;
  align-items:center;
  gap:10px;
  margin:2px 0;
  font-size:14px;
  padding: 2px 0;
  transition: var(--transition);
  white-space: nowrap;
}
.ageLine:hover {
  padding-left: 4px;
}
.ageBox {
  width:18px;
  height:18px;
  border-radius:4px;
  border:1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: var(--transition);
  flex-shrink: 0;
}
.ageLine:hover .ageBox {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.ageLabel {
  color:#334155;
  font-weight:500;
  font-size:13px;
}

/* Fire Alert Notification */
.fireAlert {
  position: fixed;
  top: 120px;
  right: 24px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color:#78350f;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  min-width: 320px;
  max-width: 420px;
  animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 5px solid #f59e0b;
  backdrop-filter: blur(8px);
}
.fireAlert.hiding {
  animation: slideOutRight 0.5s ease-in forwards;
}
.fireAlert h4 {
  margin: 0 0 10px 0;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color:#92400e;
  letter-spacing: -0.01em;
}
.fireAlert p {
  margin: 6px 0;
  font-size: 14.5px;
  opacity: 0.95;
  line-height: 1.6;
}
.fireAlert .close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(120, 53, 15, 0.08);
  border: 1px solid rgba(120, 53, 15, 0.15);
  color: #92400e;
  font-size: 22px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-weight: 300;
}
.fireAlert .close:hover {
  background: rgba(120, 53, 15, 0.15);
  transform: rotate(90deg);
}
@keyframes slideInRight {
  from { transform: translateX(450px) scale(0.9); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0) scale(1); opacity: 1; }
  to { transform: translateX(450px) scale(0.9); opacity: 0; }
}

/* Removed pulse for subtle alert */

/* Legend */
.legend {
  position:absolute; bottom:16px; right:16px;
  background: rgba(26, 32, 44, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color:#fff;
  padding:14px 16px;
  border-radius:var(--radius-md);
  font:13.5px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display:flex; flex-direction:column; gap:8px;
  max-width:480px; white-space:nowrap;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}
.legend:hover {
  background: rgba(26, 32, 44, 0.95);
}
.legend > * { pointer-events: auto; }
.legend .row {
  display:flex;
  align-items:center;
  gap:8px;
  transition: var(--transition);
  padding: 2px 0;
}
.legend .row:hover {
  padding-left: 4px;
}
.legend .chip {
  width:14px;
  height:14px;
  border-radius:50%;
  border:2px solid rgba(0, 0, 0, 0.3);
  display:inline-block;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: var(--transition);
}
.legend .row:hover .chip {
  transform: scale(1.15);
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}
.legend .note {
  font-size:12.5px;
  color:rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}


/* ====== RESPONSIVE TWEAKS (boxes + legend scale down) ====== */
@media (max-width: 1200px){
  .listBox{max-width:300px; font-size:13.5px; padding:9px 11px}
  .listBox h3{font-size:13.5px}
  .listBox .coord{font-size:11.5px}
  #fireListLeb{max-height:180px}
  #fireListOther{max-height:180px}
  .legend{transform:scale(.95); transform-origin:bottom right}
}
@media (max-width: 900px){
  .listBox{max-width:260px; font-size:13px; padding:8px 10px}
  .listBox h3{font-size:13px}
  .listBox .coord{font-size:11.5px}
  #fireListLeb{top:64px; max-height:160px}
  #fireListOther{top:248px; max-height:160px}
  .legend{transform:scale(.9)}
}
@media (max-width: 760px){
  /* Mobile: Hide title and keep only Lebanon fires */
  .titleOverlay {
    display: none !important;
  }
  
  /* Hide other fire lists and age legend on mobile */
  #fireListOther,
  #ageLegend {
    display: none !important;
  }
  
  /* Disable old listBox styles on mobile */
  .listBox,
  .listBox::before,
  .listBox::after {
    display: none !important;
  }
  
  /* Hide container, make fireListLeb position independently */
  .fireListsContainer {
    position: static !important;
    display: contents !important;
  }
  
  /* Lebanon fires - position at bottom left, full width */
  #fireListLeb {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    bottom: 80px !important;
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    height: 64px !important;
    max-height: 64px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
    border-radius: var(--radius-md) !important;
    padding: 6px 12px !important;
    box-shadow: var(--shadow-md) !important;
    border: 1px solid rgba(226, 232, 240, 0.6) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    overflow-y: auto !important;
    z-index: 1000 !important;
    line-height: 1.1 !important;
  }
  
  #fireListLeb::before {
    display: none !important;
  }
  
  #fireListLeb h3 {
    display: none !important;
  }
  
  #fireListLeb ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }
  
  #fireListLeb li {
    font-size: 10px !important;
    line-height: 1.1 !important;
    padding: 1px 0 !important;
  }
  
  #fireListLeb .coord {
    font-size: 9px !important;
    display: inline !important;
    margin-top: 0 !important;
    margin-left: 4px !important;
  }
  
  #fireListLeb::-webkit-scrollbar {
    display: none !important;
  }
  
  /* Ensure map legend stays on bottom-right with same height */
  .legend {
    position: fixed !important;
    bottom: 12px !important;
    left: 12px !important;
    right: 12px !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    min-height: auto !important;
    height: 64px !important;
    max-height: 64px !important;
    transform: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    gap: 2px !important;
  }
  
  .legend > div:first-child {
    display: none !important;
  }
  
  .legend * {
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .legend .row {
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.1 !important;
    padding: 1px 0 !important;
    gap: 6px !important;
  }
  
  .page{grid-template-columns:1fr; height:auto; padding:10px 12px}
  .mapCard{min-height:65vh; order:-1;}
  
  /* Mobile: Swap logo and info button positions */
  .logoOverlay {
    top: 100px !important;
    bottom: auto !important;
    left: 12px !important;
    width: auto !important;
    padding: 10px 16px !important;
    border-radius: var(--radius-md) !important;
  }
  
  .logoOverlay img {
    height: 24px !important;
    width: auto !important;
  }
  
  .infoButton {
    top: 160px !important;
    bottom: auto !important;
    left: 12px !important;
  }
  
  /* Mobile: Info panel responsive - centered popup */
  .infoPanel {
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) scale(0.95) !important;
    width: calc(100vw - 48px) !important;
    max-width: 85vw !important;
    height: auto !important;
    max-height: 70vh !important;
    border-radius: var(--radius-lg) !important;
    padding: 18px 14px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
  }
  
  .infoPanel.open {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  
  .infoPanel h2 {
    font-size: 17px !important;
    margin-bottom: 8px !important;
  }
  
  .infoPanel p {
    font-size: 12px !important;
    line-height: 1.5 !important;
    margin: 8px 0 !important;
  }
  
  .infoPanel ul {
    font-size: 12px !important;
    margin: 6px 0 0 14px !important;
  }
  
  .infoPanel li {
    font-size: 12px !important;
    margin: 5px 0 !important;
  }
  
  /* Mobile: Alert History Panel */
  .alertHistoryPanel {
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) scale(0) !important;
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    max-height: 80vh !important;
    right: auto !important;
    opacity: 0 !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease !important;
  }
  
  .alertHistoryPanel.visible {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
  }
  
  .alertHistoryHeader {
    padding: 14px 16px !important;
  }
  
  .alertHistoryHeader h3 {
    font-size: 16px !important;
  }
  
  .alertHistoryContent {
    padding: 12px !important;
  }
  
  .alertHistoryItem {
    padding: 10px 12px !important;
  }

  /* Mobile: Radius slider - vertical on left below info button */
  #radiusSliderContainer {
    right: auto !important;
    left: 12px !important;
    top: 220px !important; /* Below info button which is at 160px */
    bottom: auto !important;
    transform: none !important;
    flex-direction: column !important;
    padding: 12px !important;
    gap: 8px !important;
  }
  
  .radiusSliderLabel {
    display: none !important; /* Hide title on mobile */
  }
  
  .radiusSliderValue {
    font-size: 14px !important;
    padding: 4px 8px !important;
    min-width: 30px !important;
  }
  
  .radiusSlider {
    -webkit-appearance: slider-vertical !important;
    appearance: slider-vertical !important;
    writing-mode: bt-lr !important;
    width: 8px !important;
    height: 120px !important; /* Shorter for mobile */
    background: linear-gradient(to top, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.4)) !important;
  }
  
  .radiusSlider:hover {
    background: linear-gradient(to top, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.5)) !important;
  }
}
@media (max-width: 430px){
  .listBox{max-width:78vw; font-size:12px}
  .listBox h3{font-size:12px}
  .listBox .coord{font-size:11px}
}
