:root { --panel: 320px; font-family: system-ui, sans-serif; }
html, body { height: 100%; margin: 0; }
body { display: flex; }
#panel { width: var(--panel); flex: none; overflow-y: auto; padding: 12px 14px; box-sizing: border-box; border-right: 1px solid #ddd; background: #fff; font-size: 14px; }
#map { flex: 1; min-width: 0; }
h1 { font-size: 18px; margin: 0 0 6px; }
h2 { font-size: 14px; margin: 14px 0 4px; }
.note { color: #555; margin: 0 0 10px; }
fieldset { border: 1px solid #ddd; margin: 0 0 10px; padding: 6px 8px; }
fieldset label { display: block; padding: 2px 0; }
#legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; margin-bottom: 8px; }
#legend i { display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; }
#districts { list-style: none; margin: 0; padding: 0; }
#districts li { display: flex; justify-content: space-between; padding: 3px 4px; cursor: pointer; border-radius: 3px; }
#districts li:hover, #districts li:focus { background: #eef; outline: none; }
#phase, #stats { color: #444; font-size: 12px; }
.attribution { color: #666; font-size: 11px; line-height: 1.4; margin-top: 14px; }
.maplibregl-popup-content { font-size: 13px; max-width: 240px; }
@media (max-width: 720px) {
  body { flex-direction: column-reverse; }
  #panel { width: auto; max-height: 40%; border-right: none; border-top: 1px solid #ddd; }
}
