:root {
  --surface: #ffffff;
  --ink: #1c1f23;
  --muted: #5b6470;
  --line: #d5d9de;
  --accent: #1f5fa8;
  --warn: #b3261e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { display: flex; font: 14px/1.4 system-ui, sans-serif; color: var(--ink); background: var(--surface); }
#map { flex: 1; min-width: 0; height: 100%; }
#panel { width: 340px; height: 100%; overflow-y: auto; padding: 14px 16px; border-left: 1px solid var(--line); }
h1 { font-size: 18px; margin: 0 0 10px; }
section { padding: 10px 0; border-top: 1px solid var(--line); }
label, .label { display: block; font-weight: 600; margin-bottom: 4px; }
.row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.row label { font-weight: 400; margin: 0; white-space: nowrap; }
.muted { color: var(--muted); margin: 4px 0; font-size: 13px; }
select, input[type=number] { font: inherit; padding: 4px 6px; max-width: 100%; }
#release, #ovmode { width: 100%; }
input[type=number] { width: 90px; }
button { font: inherit; padding: 5px 10px; border: 1px solid var(--line); background: #f4f5f7; border-radius: 4px; cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; width: 100%; margin-top: 8px; padding: 8px; }
button:disabled { opacity: 0.5; cursor: default; }
#bands label { display: inline-flex; gap: 4px; font-weight: 400; margin-right: 12px; }
#sizes { width: 100%; border-collapse: collapse; margin-top: 6px; }
#sizes td { padding: 2px 0; }
#sizes td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
#status { min-height: 1.4em; margin: 6px 0; }
#status.error { color: var(--warn); }
#files ul { list-style: none; padding: 0; margin: 4px 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; }
#files li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 6px; border-bottom: 1px solid var(--line); }
#files li:last-child { border-bottom: 0; }
#files span { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
#legend { margin-top: 8px; }
#legend .item { display: flex; align-items: center; gap: 6px; font-size: 13px; }
#legend .sw { width: 18px; height: 12px; border: 1px solid var(--line); }
footer { padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }
a { color: var(--accent); }
.leaflet-container { background: #e9ecef; }
.overlay-pixels { image-rendering: pixelated; }
@media (max-width: 700px) {
  body { flex-direction: column; }
  #map { height: 55%; flex: none; }
  #panel { width: 100%; height: 45%; border-left: 0; border-top: 1px solid var(--line); }
}
