* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; }
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-logo { height: 32px; width: auto; vertical-align: middle; }
.map-container { position: relative; width: 100vw; height: calc(100vh - 48px); margin-top: 48px; }
#map { width: 100%; height: 100%; }
.zoom-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  pointer-events: none;
}
.zoom-overlay.is-hidden { display: none; }
.zoom-overlay-msg {
  background: rgba(255,255,255,0.5);
  padding: 24px 32px;
  border-radius: 10px;
  text-align: center;
  max-width: 420px;
  font-size: 1.05rem;
}
.coord-popup { font-family: system-ui, sans-serif; font-size: 13px; }
.coord-popup h3 { margin: 0 0 10px 0; font-size: 14px; }
.coord-popup p { margin: 4px 0; line-height: 1.4; }
.coord-popup-typeform { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e8e8e8; }
.typeform-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: default;
  border: none;
}
.typeform-btn--active {
  background: #0066cc;
  color: #fff !important;
  cursor: pointer;
}
.typeform-btn--active:hover { background: #0052a3; color: #fff; }
.typeform-btn--disabled {
  background: #ccc;
  color: #666;
}
.typeform-btn-hint {
  margin: 8px 0 0 0 !important;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}
.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.nominatim-json {
  margin-top: 10px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 11px;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  transition: background 0.2s;
}
.info-btn:hover { background: #f0f0f0; }
.info-btn-right { margin-left: auto; }
.info-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.info-modal.is-open { display: flex; }
.info-modal-box {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.info-modal-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.info-modal h2 { margin: 0; font-size: 1.25rem; }
.info-modal-logo { height: 32px; width: auto; }
.info-modal p { line-height: 1.5; color: #444; }
.info-modal-software {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}
.info-modal-software strong { color: #444; }
.info-modal-software a { color: #0066cc; text-decoration: none; }
.info-modal-software a:hover { text-decoration: underline; }
.info-modal-close {
  margin-top: 16px;
  padding: 8px 16px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.info-modal-close:hover { background: #555; }
.debug-popup {
  display: none;
  position: fixed;
  top: 56px;
  right: 16px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  z-index: 1500;
  pointer-events: none;
  max-width: 400px;
  max-height: 70vh;
  overflow: auto;
}
body.debug .debug-popup { display: block; }
.debug-popup-zoom { margin-bottom: 8px; }
.debug-popup-json {
  font-size: 10px;
  white-space: pre-wrap;
  word-break: break-all;
}
.geojson-status {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  z-index: 600;
  transition: opacity 0.3s;
}
.geojson-status.is-hidden { display: none; }
.geojson-status.error { background: rgba(180,0,0,0.9); }
