html, body { height: 100%; margin: 0; }
body { font: 13px/1.45 system-ui, "Segoe UI", sans-serif; }
#map { height: 100%; }

.card {
  background: rgba(23, 25, 30, 0.92);
  color: #e8e9ec;
  border-radius: 10px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

#panel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 272px;
  padding: 12px 16px 14px;
  user-select: none;
}

.panel-header { display: flex; align-items: center; justify-content: space-between; }
.panel-header h1 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: 0.2px; }
#collapseBtn {
  background: none; border: none; color: #9aa0ab; font-size: 16px; line-height: 1;
  cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
#collapseBtn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
#panel.collapsed #panelBody { display: none; }
#panel.collapsed { width: auto; }

#panelBody > * + * { margin-top: 10px; }

.row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.row-stack { display: block; }
.label-line { display: flex; justify-content: space-between; color: #c6c9cf; margin-bottom: 3px; }
.label-line output { color: #8fb6f0; font-variant-numeric: tabular-nums; }

input[type="range"] { width: 100%; accent-color: #5b8def; margin: 0; }
input[type="checkbox"] { accent-color: #5b8def; }

select, input[type="number"], #keyInput {
  background: #2a2d34;
  color: #e8e9ec;
  border: 1px solid #3c404a;
  border-radius: 6px;
  padding: 4px 6px;
  font: inherit;
}
select { width: 100%; }
select:focus-visible, input:focus-visible, button:focus-visible { outline: 2px solid #5b8def; outline-offset: 1px; }

fieldset { border: 1px solid #3c404a; border-radius: 8px; padding: 8px 10px 10px; margin: 0; }
fieldset legend { color: #c6c9cf; padding: 0 4px; font-size: 12px; }
fieldset .row { margin-bottom: 8px; }
.minmax { display: flex; gap: 10px; }
.minmax label { display: flex; align-items: center; gap: 5px; color: #c6c9cf; flex: 1; }
.minmax input { width: 100%; min-width: 0; }
.minmax input:disabled { opacity: 0.45; }

#legend { width: 100%; height: 14px; border-radius: 4px; display: block; }
.legend-labels {
  display: flex; justify-content: space-between;
  color: #9aa0ab; font-size: 11px; margin-top: -6px;
  font-variant-numeric: tabular-nums;
}

.probe-line { color: #c6c9cf; }
#probe { color: #e8e9ec; font-variant-numeric: tabular-nums; }

.attrib { color: #9aa0ab; font-size: 11px; line-height: 1.5; }
.attrib a { color: #8fb6f0; }

/* ---- POI info window (rendered inside Google's white bubble) ---- */
.poi-info { font: 13px/1.5 system-ui, "Segoe UI", sans-serif; color: #202124; max-width: 260px; }
.poi-name { font-size: 14px; font-weight: 600; }
.poi-addr { color: #5f6368; margin-top: 2px; }
.poi-elev { margin-top: 6px; font-variant-numeric: tabular-nums; }
.poi-info a { display: inline-block; margin-top: 6px; color: #1a73e8; text-decoration: none; }
.poi-info a:hover { text-decoration: underline; }

/* ---- API key dialog ---- */
#keyDialog {
  background: #1c1e24;
  color: #e8e9ec;
  border: 1px solid #3c404a;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  width: min(440px, 90vw);
  padding: 20px 24px;
}
#keyDialog::backdrop { background: rgba(8, 10, 14, 0.7); backdrop-filter: blur(2px); }
#keyDialog h1 { font-size: 17px; margin: 0 0 8px; }
#keyDialog p, #keyDialog ol { margin: 8px 0; color: #c6c9cf; }
#keyDialog ol { padding-left: 20px; }
#keyDialog li { margin: 4px 0; }
#keyDialog a { color: #8fb6f0; }
#keyDialog code {
  background: #2a2d34; padding: 1px 5px; border-radius: 4px;
  font-size: 12px; font-family: ui-monospace, Consolas, monospace;
}
#keyInput { width: 100%; box-sizing: border-box; margin-top: 6px; padding: 8px 10px; }
#keyGo {
  margin-top: 12px; width: 100%;
  background: #5b8def; color: #fff; border: none; border-radius: 8px;
  padding: 9px 0; font: inherit; font-weight: 600; cursor: pointer;
}
#keyGo:hover { background: #6d9af0; }
.key-error { color: #f28b82; }
.fineprint { font-size: 11px; color: #9aa0ab; }
