* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
}

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

#panel {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  width: 196px;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
}

#panel h1 {
  font-size: 12px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
  line-height: 1.4;
}

#unofficial {
  font-size: 10px;
  color: #999;
  margin-bottom: 8px;
}

#progress {
  font-size: 12px;
  color: #555;
  margin-bottom: 10px;
}

#progress strong {
  color: #111;
}

#panel-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#panel-footer a {
  font-size: 11px;
  color: #555;
  text-decoration: none;
}

#panel-footer a:hover {
  color: #111;
  text-decoration: underline;
}

#data-date {
  font-size: 11px;
  color: #999;
}

#version {
  font-size: 11px;
  color: #bbb;
}

#btn-reset {
  margin-top: 4px;
  padding: 4px 0;
  font-size: 11px;
  color: #999;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}

#btn-reset:hover {
  color: #555;
  border-color: #bbb;
}

/* GitHub control (top-right map corner) */
.leaflet-control-github {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #fff;
  border-radius: 4px;
  color: #555;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

.leaflet-control-github:hover {
  color: #111;
  background: #f4f4f4;
}

/* Marker labels (shown at high zoom) */
.marker-label {
  background: none;
  border: none;
  box-shadow: none;
  font-size: 11px;
  font-weight: 600;
  color: hsl(4, 92%, 38%);
  white-space: nowrap;
  padding: 0;
  pointer-events: none;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
}

.marker-label::before {
  display: none;
}

/* Municipality labels */
.muni-label {
  background: none;
  border: none;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  color: #222;
  white-space: nowrap;
  padding: 0;
  pointer-events: none;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
}

.muni-label::before {
  display: none;
}

/* Popup */
.location-popup h3 {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
  line-height: 1.3;
}

.location-popup .meta {
  font-size: 11px;
  color: #666;
  margin-bottom: 8px;
}


.popup-notice {
  font-size: 10px;
  color: #999;
  margin: 4px 0;
  line-height: 1.4;
}

.popup-notice a {
  color: #2563eb;
  text-decoration: none;
}

.popup-notice a:hover {
  text-decoration: underline;
}

.detail-info {
  font-size: 11px;
  color: #555;
  margin: 6px 0 2px;
}

.detail-address {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #555;
  margin-bottom: 4px;
}

.copy-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 3px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  border-radius: 3px;
}

.copy-btn:hover {
  color: #555;
  background: #f0f0f0;
}

.optional-notice {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 3px;
  padding: 1px 6px;
  margin-bottom: 6px;
}


.muni-inline {
  font-size: 11px;
  font-weight: 400;
  color: #666;
}

.maps-link {
  display: inline-block;
  font-size: 11px;
  color: #2563eb;
  text-decoration: none;
}

.maps-link:hover {
  text-decoration: underline;
}

.popup-actions {
  display: flex;
  gap: 6px;
  margin: 6px 0 2px;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 6px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #f5f5f5;
  color: #444;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.action-btn:hover {
  background: #e8e8e8;
}

.maps-btn {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.maps-btn:hover {
  background: #dbeafe;
}

.stamp-btn.stamped {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}

.stamp-btn.stamped:hover {
  background: #15803d;
  border-color: #15803d;
}

@media (max-width: 520px) {
  #panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 10px 10px 0 0;
    padding: 10px 14px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    max-height: none;
    overflow-y: visible;
  }

  #panel h1 {
    margin: 0;
    flex: 1;
    min-width: 100px;
  }

  #unofficial {
    display: none;
  }

  #progress {
    margin: 0;
    white-space: nowrap;
  }

  #btn-reset {
    display: none;
  }

  #panel-footer {
    flex-direction: row;
    margin: 0;
    padding: 0;
    border: none;
    gap: 10px;
    align-items: center;
  }
}
