:root {
  --ink: #15233a; --ink-soft: #4a5d78; --accent: #d6219b; --paper: #f4f1e9; --rule: #243a5e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #cdd7d2; color: var(--ink);
  font-family: "Spectral", Georgia, serif; overflow: hidden; }
#map { position: absolute; inset: 0; background: #cdd7d2; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

#title { position: absolute; top: 18px; left: 20px; z-index: 5; max-width: 380px;
  padding: 12px 16px 13px; pointer-events: none; transition: opacity 0.5s ease;
  background: rgba(244,241,233,0.92); border: 1px solid var(--rule);
  box-shadow: 0 0 0 3px rgba(244,241,233,0.92), 0 0 0 4px var(--rule), 0 8px 26px rgba(10,20,40,0.3); }
#title.dim { opacity: 0.16; } #title.dim:hover { opacity: 1; }
#title.hidden { opacity: 0; pointer-events: none; }
#title h1 { font-size: 27px; font-weight: 700; font-variant: small-caps; letter-spacing: 0.5px; line-height: 1; }
#title h1 .accent { color: var(--accent); }
#title .sub { margin-top: 6px; font-size: 13px; font-style: italic; color: var(--ink-soft); line-height: 1.4; }
#title-close { position: absolute; top: 4px; right: 7px; pointer-events: auto; border: 0;
  background: transparent; color: var(--ink-soft); font: 400 18px/1 "Spectral", serif; cursor: pointer; padding: 2px 5px; }
#title-close:hover { color: var(--accent); }

#panel { position: absolute; left: 20px; bottom: 18px; z-index: 5; min-width: 250px;
  padding: 13px 18px 14px; display: grid; gap: 9px;
  background: rgba(244,241,233,0.94); border: 1px solid var(--rule);
  box-shadow: 0 0 0 3px rgba(244,241,233,0.94), 0 0 0 4px var(--rule), 0 10px 34px rgba(10,20,40,0.32); }
.corner { position: absolute; width: 11px; height: 11px; border: 0 solid var(--accent); }
.corner.tl { top: 5px; left: 5px; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: 5px; right: 5px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: 5px; left: 5px; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: 5px; right: 5px; border-bottom-width: 2px; border-right-width: 2px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#count { font-size: 18px; font-weight: 600; color: var(--ink); }
#count .n { color: var(--accent); }
#asof { font-size: 11.5px; color: var(--ink-soft); font-family: "IBM Plex Mono", monospace; }
#asof.stale { color: #b3261e; font-weight: 500; }
.keylabel { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace; }
#legend { display: flex; gap: 8px; flex-wrap: wrap; }
.key { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink); }
.key .dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(20,35,58,0.4); }

#tooltip { position: absolute; z-index: 7; pointer-events: none; display: none;
  background: rgba(244,241,233,0.96); border: 1px solid var(--rule); padding: 7px 11px; font-size: 12.5px;
  max-width: 250px; box-shadow: 0 0 0 2px rgba(244,241,233,0.96), 0 0 0 3px var(--rule), 0 6px 20px rgba(10,20,40,0.4); }
#tooltip .nm { font-weight: 600; color: var(--ink); }
#tooltip .meta { color: var(--ink-soft); font-size: 11.5px; margin-top: 2px; font-family: "IBM Plex Mono", monospace; }

#toast { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 8;
  background: rgba(244,241,233,0.96); border: 1px solid var(--rule); color: var(--ink-soft);
  font-size: 12px; font-style: italic; padding: 7px 15px; max-width: 78vw; text-align: center;
  box-shadow: 0 0 0 2px rgba(244,241,233,0.96), 0 0 0 3px var(--rule), 0 6px 18px rgba(10,20,40,0.3);
  opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
#toast.show { opacity: 1; }
#notice { position: absolute; bottom: 4px; left: 24px; z-index: 5; font-size: 10.5px; font-style: italic;
  color: var(--ink-soft); font-family: "IBM Plex Mono", monospace; text-shadow: 0 1px 2px rgba(244,241,233,0.8); }

/* Live helicopters: spinning rotor-asterisk markers */
.heli-marker { cursor: pointer; line-height: 0; }
.heli-marker .rotor { display: block; animation: rotor-spin 1.3s linear infinite;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); }
.heli-marker .tag { display: block; margin-top: 1px; text-align: center;
  font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 10.5px;
  color: var(--ink); white-space: nowrap; transform: translateY(-2px);
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; pointer-events: none; }
/* U.S. helicopter main rotors turn counter-clockwise seen from above */
@keyframes rotor-spin { to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) { .heli-marker .rotor { animation: none; } }

.maplibregl-ctrl-group { border: 1px solid var(--rule) !important; }
@media (max-width: 640px) { #title { max-width: 240px; } #title h1 { font-size: 21px; } #notice { display: none; } }
