html, body {
  margin: 0;
  height: 100%;
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #1d2329;
  background: #e8e8e8;
}

#map {
  position: absolute;
  inset: 0;
}

#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

#drop-hint {
  position: absolute;
  inset: 12px;
  border: 3px dashed #2a7de1;
  border-radius: 12px;
  background: rgba(42, 125, 225, 0.12);
  color: #174a8a;
  font-size: 22px;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}
body.dragover #drop-hint { display: flex; }

#panel {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 270px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  box-sizing: border-box;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}
#panel h1 {
  margin: 0 0 6px;
  font-size: 17px;
}
#panel p { margin: 0 0 10px; }
.link {
  color: #1a62c4;
  text-decoration: underline;
  cursor: pointer;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.row label { width: 70px; }
.row input, .row select { flex: 1; min-width: 0; }
.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 10px 0 6px;
}
.buttons #export { grid-column: 1 / -1; }
button {
  font: inherit;
  padding: 5px 8px;
  border: 1px solid #b5bcc4;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}
button:hover:not(:disabled) { background: #eef3f9; }
button:disabled { opacity: 0.45; cursor: default; }
#export:not(:disabled) {
  background: #1a62c4;
  border-color: #1a62c4;
  color: #fff;
}
.check { display: block; font-size: 12.5px; color: #4a535c; }
.check[hidden] { display: none; }
details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; }
details ul { padding-left: 18px; margin: 6px 0 0; }
details li { margin-bottom: 4px; }
kbd {
  font: 12px ui-monospace, monospace;
  padding: 0 3px;
  border: 1px solid #c3c8ce;
  border-radius: 3px;
  background: #f5f6f7;
}

.cp circle.ring { fill: #e5382b; stroke: #fff; stroke-width: 2; }
.cp line { stroke: #fff; stroke-width: 1.5; }
.cp text {
  font: 600 11px system-ui, sans-serif;
  fill: #fff;
  paint-order: stroke;
  stroke: #000;
  stroke-width: 3px;
}
.cp.active circle.ring { fill: #ff9d00; }
.cp.hover circle.ring { stroke: #ffe46b; }
.outline {
  fill: none;
  stroke: #1a62c4;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}
.handle {
  fill: #fff;
  stroke: #1a62c4;
  stroke-width: 1.5;
}
.handle.hover { fill: #1a62c4; }

@media (max-width: 600px) {
  #panel { top: auto; bottom: 30px; width: auto; right: 10px; max-height: 45vh; }
}
