html, body { height: 100%; margin: 0; font: 13px/1.4 system-ui, sans-serif; color: #222; }
#map { position: absolute; inset: 0; }
.pure-overlay { image-rendering: pixelated; }

#panel {
  position: absolute; top: 10px; right: 10px; z-index: 1000; width: 270px; max-height: calc(100% - 20px);
  display: flex; flex-direction: column; background: rgba(255, 255, 255, 0.96);
  border-radius: 8px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
#panel header { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid #e3e3e3; }
#panel .body { overflow-y: auto; padding: 6px 10px 10px; }
.panel-collapsed #panel .body { display: none; }
#toggle { border: 0; background: none; font-size: 16px; cursor: pointer; }

fieldset { border: 1px solid #e3e3e3; border-radius: 6px; margin: 6px 0; padding: 4px 8px 6px; }
fieldset legend { font-weight: 600; font-size: 12px; color: #555; }
label { display: block; margin: 4px 0; }
label select, label input[type=number] { font: inherit; }
label input[type=number] { width: 60px; }
label select#filter { width: 100%; }
label.check { margin: 2px 0; }
h4 { margin: 10px 0 4px; font-size: 12px; color: #555; }
.muted { color: #777; font-size: 12px; }
.hint { font-size: 12px; background: #fff7d6; padding: 4px 6px; border-radius: 4px; }
button.link { border: 0; background: none; color: #1565c0; cursor: pointer; padding: 0; font: inherit; }

#legend { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
#legend li { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 4px; cursor: pointer; }
#legend li:hover { background: #f0f0f0; }
#legend li.active { background: #e3f2fd; font-weight: 600; }
#legend li span { margin-left: auto; color: #555; font-variant-numeric: tabular-nums; }
#legend li.empty { color: #888; cursor: default; }
#legend i, .probe i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; flex: none; }

.pin-form { display: flex; gap: 4px; margin: 4px 0; }
.pin-form input { flex: 1; min-width: 0; font: inherit; padding: 2px 4px; }
.error { color: #c62828; font-size: 12px; margin: 2px 0; }
#pinList { list-style: none; margin: 4px 0 0; padding: 0; }
#pinList li { display: flex; align-items: baseline; gap: 6px; padding: 1px 0; }
#pinList small { color: #777; font-variant-numeric: tabular-nums; }
#pinList .del { margin-left: auto; border: 0; background: none; color: #999; cursor: pointer; font-size: 15px; line-height: 1; }
#pinList .del:hover { color: #c62828; }

.pin-icon .pin {
  position: absolute; left: -11px; top: -27px; width: 18px; height: 18px;
  background: #d32f2f; border: 2px solid #fff; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.pin-icon .pin-label {
  position: absolute; left: 10px; top: -34px; padding: 0 4px; border-radius: 3px;
  background: #fff; font: 600 12px/16px system-ui, sans-serif; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.probe ul { list-style: none; margin: 6px 0; padding: 0; }
.probe li { margin: 4px 0; }
.probe li i { margin-right: 5px; vertical-align: -1px; }
.probe small { display: block; color: #666; margin-left: 16px; }
.probe .pure { color: #2e7d32; }
.probe .near { color: #777; font-size: 12px; margin: 4px 0; }
.probe .coords { color: #999; font-size: 11px; margin: 4px 0 0; }

@media (max-width: 600px) {
  #panel { width: auto; left: 10px; top: auto; bottom: 20px; max-height: 55%; }
}
