:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --text: #17202b;
  --muted: #5b6675;
  --line: #e2e7ee;
  --advice: #fbc10e;
  --watch: #e67309;
  --emergency: #cc2323;
  --safe: #1f9d55;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

header.topbar {
  background: #0f1a2b;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
header.topbar h1 { font-size: 20px; margin: 0; }
header.topbar .tag {
  font-size: 12px;
  color: #b9c4d4;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.topbar-right { display: flex; align-items: center; gap: 18px; }
.login-link {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  padding: 7px 14px;
  white-space: nowrap;
}
.login-link:hover { background: rgba(255,255,255,.12); }

.layout { flex: 1; display: flex; min-height: 0; }

aside.warnings {
  width: 360px;
  max-width: 42vw;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 16px;
}
aside.warnings h2 { font-size: 15px; margin: 0 0 12px; }
.warning-count { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

.warning-card {
  border: 1px solid var(--line);
  border-left: 6px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  cursor: pointer;
  background: #fff;
  transition: box-shadow .15s;
}
.warning-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.warning-card.advice { border-left-color: var(--advice); }
.warning-card.watch { border-left-color: var(--watch); }
.warning-card.emergency { border-left-color: var(--emergency); }

.warning-level {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.warning-level.advice { background: var(--advice); color: #3a2f00; }
.warning-level.watch { background: var(--watch); }
.warning-level.emergency { background: var(--emergency); }

.warning-card h3 { font-size: 15px; margin: 0 0 4px; }
.warning-card .area { font-size: 13px; color: var(--muted); }
.warning-card .msg { font-size: 13px; color: var(--muted); margin-top: 6px; }

.empty { color: var(--muted); font-size: 14px; padding: 24px 4px; }

main.map-wrap { flex: 1; position: relative; }
#map { position: absolute; inset: 0; }

.map-legend {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 500;
  background: rgba(255,255,255,.95);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.map-legend .row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.map-legend .swatch { width: 14px; height: 14px; border-radius: 4px; }

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  aside.warnings { width: 100%; max-width: 100%; max-height: 42vh; border-right: 0; border-bottom: 1px solid var(--line); }
}
