html, body { height: 100%; margin: 0; font-family: system-ui, Arial, sans-serif; }

#map { position: absolute; inset: 0 0 70px 0; }

#alarm-banner {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 1000; max-width: 70%; padding: 8px 14px; border-radius: 6px;
  background: #b00020; color: #fff; font-size: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
#alarm-banner[hidden] { display: none; }

#alarm-tab-button {
  position: absolute; top: 90px; left: 10px; z-index: 1000;
  padding: 8px 14px; border: 0; border-radius: 6px 6px 0 0;
  background: #555; color: #fff; font-size: 14px; font-weight: bold; cursor: pointer;
}
#alarm-tab-button.active { background: #d32f2f; }

#alarm-panel {
  position: absolute; top: 128px; bottom: 80px; left: 10px; z-index: 1000;
  width: 320px; padding: 8px; box-sizing: border-box; overflow-y: auto;
  background: #fff; border-radius: 0 6px 6px 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
#alarm-panel[hidden] { display: none; }
#alarm-panel h3 { margin: 0 0 8px 0; font-size: 14px; }

.alarm-item {
  margin-bottom: 6px; padding: 6px 8px; border-left: 4px solid #999;
  background: #f4f4f4; font-size: 12px; line-height: 17px; cursor: pointer;
}
.alarm-item:hover { background: #e6e6e6; }
.alarm-item.current { border-left-color: #d32f2f; background: #ffe9e9; }

#bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 70px;
  box-sizing: border-box; display: flex; align-items: center; gap: 10px;
  padding: 0 14px; background: #202428; color: #eee;
}
#bar button {
  padding: 8px 12px; border: 0; border-radius: 4px; background: #3a7afe;
  color: #fff; font-size: 14px; cursor: pointer; white-space: nowrap;
}
#bar select {
  padding: 6px; border: 1px solid #555; border-radius: 4px;
  background: #2c3238; color: #eee;
}
#bar #live-button { background: #555; }
#bar #live-button.on { background: #d32f2f; }

#slider { flex: 1; }
#time-label { min-width: 230px; font-size: 13px; }
#count-label { min-width: 150px; font-size: 12px; color: #bbb; }

.legend {
  padding: 8px 10px; border-radius: 6px; background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); font-size: 12px; line-height: 18px;
}
.legend-dot {
  display: inline-block; width: 12px; height: 12px; margin-right: 6px;
  border: 1px solid #333; border-radius: 50%; vertical-align: middle;
}
.facility-icon {
  width: 10px; height: 10px; background: #0057b8;
  border: 1px solid #fff; transform: rotate(45deg);
}
