html, body { height: 100%; margin: 0; }
body { overflow: hidden; }
main { position: relative; height: calc(100vh - 56px); }
#map { height: 100%; width: 100%; background: #dbeafe; }
.map-legend { position: absolute; z-index: 1000; left: 1rem; bottom: 1rem; width: min(330px, calc(100vw - 2rem)); max-height: 45vh; overflow: auto; }
.legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .75rem; }
.legend-item { display: flex; align-items: center; gap: .4rem; font-size: .8rem; }
.legend-item i { width: 1.2rem; text-align: center; }
.event-marker-wrapper { background: transparent; border: 0; }
.event-marker { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: #fff; border: 2px solid rgba(255,255,255,.95); border-radius: 50% 50% 50% 0; box-shadow: 0 2px 8px rgba(0,0,0,.42); font-size: 18px; transform: rotate(-45deg); }
.event-marker i { transform: rotate(45deg); }
.event-earthquake { background: #dc3545; }
.event-tsunami { background: #0d6efd; }
.event-volcano { background: #6f1d1b; }
.event-flood { background: #0dcaf0; }
.event-wildfire { background: #fd7e14; }
.event-storm { background: #6f42c1; }
.event-explosion { background: #ffc107; color: #212529; }
.event-armed_conflict { background: #343a40; }
.event-terrorism { background: #b02a37; }
.event-diplomatic_event { background: #198754; }
.event-ecological_disaster { background: #5c940d; }
.news-popup { min-width: 230px; max-width: 320px; }
.news-popup h3 { font-size: 1rem; line-height: 1.35; margin-bottom: .55rem; }
.news-popup .meta { color: #6c757d; font-size: .8rem; margin-bottom: .75rem; }
.opacity-sample { display: inline-block; width: 18px; height: 10px; margin-right: .4rem; background: #343a40; border-radius: 2px; }
.opacity-100 { opacity: 1; }
.opacity-65 { opacity: .65; }
.opacity-35 { opacity: .35; }
.loading-overlay { position: absolute; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; background: rgba(13, 27, 42, .28); pointer-events: none; }
@media (max-width: 575.98px) {
    .map-legend { max-height: 34vh; }
    .legend-grid { grid-template-columns: 1fr; }
}

.empty-map-message { position: absolute; z-index: 1100; top: 1rem; left: 50%; transform: translateX(-50%); width: min(520px, calc(100vw - 2rem)); text-align: center; }
