:root {
  color-scheme: light;
  font-family: "Avenir Next", Avenir, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #1a302e;
  --muted: #657773;
  --line: #d9e2dd;
  --panel: rgba(250, 252, 249, 0.96);
  --accent: #da5b3f;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #e7ece8;
  color: var(--ink);
}

.map-shell {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#map {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  background: #e7ece8;
}

.radar-panel {
  position: absolute;
  z-index: 500;
  top: 18px;
  left: 18px;
  width: min(286px, calc(100vw - 36px));
  padding: 17px 18px 14px;
  border: 1px solid rgba(217, 226, 221, 0.9);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: 0 5px 22px rgba(26, 48, 46, 0.13);
  backdrop-filter: blur(8px);
  animation: panel-arrive 420ms ease-out both;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.live-mark {
  position: relative;
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.live-mark::after {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(218, 91, 63, 0.45);
  border-radius: inherit;
  content: "";
  animation: pulse 2.2s ease-out infinite;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.radar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin-top: 12px;
  padding: 7px 10px;
  border: 1px solid #1a302e;
  border-radius: 4px;
  background: #1a302e;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.radar-toggle[aria-pressed="false"] {
  background: transparent;
  color: var(--ink);
}

.radar-toggle:focus-visible {
  outline: 2px solid #17645d;
  outline-offset: 2px;
}

.legend {
  padding: 13px 0 12px;
}

.legend h2 {
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
}

.legend h2 span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.legend-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend-list li {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #344945;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.legend-list i {
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  border: 1px solid rgba(26, 48, 46, 0.16);
  border-radius: 2px;
  background: var(--swatch);
}

.update-block {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.update-label,
.refresh-status {
  color: var(--muted);
  font-size: 10px;
}

.update-block time {
  justify-self: end;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.refresh-status {
  grid-column: 1 / -1;
}

.refresh-status[data-state="error"] {
  color: #a13c2a;
}

.source {
  margin: 11px 0 0;
  color: #344945;
  font-size: 10px;
}

.source a {
  color: #17645d;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.source span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.leaflet-control-attribution {
  font-size: 10px !important;
}

.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: 0 2px 10px rgba(26, 48, 46, 0.18) !important;
}

.leaflet-control-zoom a {
  color: var(--ink) !important;
}

@keyframes panel-arrive {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    opacity: 0.7;
    transform: scale(0.65);
  }
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@media (max-width: 560px) {
  .radar-panel {
    top: 12px;
    left: 12px;
    width: min(270px, calc(100vw - 24px));
    padding: 14px 15px 12px;
  }

  .leaflet-bottom.leaflet-right {
    bottom: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}