* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1d2329; }
body { display: flex; flex-direction: column; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 14px; background: #1d2329; color: #fff; }
header h1 { font-size: 17px; margin: 0 8px 0 0; font-weight: 600; }
header label { display: flex; align-items: center; gap: 6px; }
header select, header input { font: inherit; padding: 4px 6px; border-radius: 4px; border: 1px solid #5b6670; }
.btn { background: #e8590c; color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 4px; font-weight: 600; }
.btn:hover { background: #c94b07; }
#status { color: #c9d1d8; font-size: 13px; }
main { position: relative; flex: 1; min-height: 300px; }
#map { position: absolute; inset: 0; }
#legend { position: absolute; right: 12px; bottom: 24px; z-index: 500; background: #fff; padding: 8px 10px; border-radius: 6px;
          box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3); max-height: 70%; overflow: auto; }
#legend img { display: block; margin-top: 4px; }
.sub { color: #5b6670; font-size: 12px; }
footer { padding: 6px 14px; font-size: 12px; color: #5b6670; background: #f3f5f7; }
.btn2 { font: inherit; background: transparent; color: #fff; border: 1px solid #8a959f; border-radius: 4px; padding: 4px 10px; cursor: pointer; }
.btn2:hover { background: #2f3840; }
.leaflet-tooltip.aoi-label { background: rgba(255, 255, 255, 0.85); border: 0; box-shadow: none; padding: 1px 4px;
  font-size: 11px; font-weight: 600; color: #1d2329; }
.leaflet-tooltip.aoi-label::before { display: none; }
.leaflet-tooltip.aoi-label.on { background: #e8590c; color: #fff; }
