#helpButton {
  position: absolute;
  top: 80px; /* just below the zoom buttons */
  left: 10px;
  z-index: 1000;
  background-color: #f3efe2;
  border: 2px solid #a88f5e;
  border-radius: 4px;
  padding: 4px 10px;
  font-family: Georgia, serif;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

#helpPanel {
  position: absolute;
  bottom: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 500px;
  max-height: 300px;
  background: #f3efe2;
  border-top: 3px solid #a88f5e;
  padding: 20px;
  font-family: Georgia, serif;
  font-size: 14px;
  z-index: 1000;
  transition: bottom 0.3s ease-out;
  box-shadow: 0 -3px 8px rgba(0,0,0,0.3);
  box-sizing: border-box;
  text-align: center;
  overflow-y: auto;
  border-radius: 10px 10px 0 0;
}

#helpPanel.show {
  bottom: 0;
}

#helpPanelClose {
  position: absolute;
  top: 8px;
  right: 12px;
  font-weight: bold;
  font-size: 18px;
  cursor: pointer;
}

.pulse-img {
  width: 40px;
  height: 40px;
  animation: grow-shrink 2s infinite ease-in-out;
}

@keyframes grow-shrink {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.leaflet-popup-content-wrapper {
  background: #f3efe2;
  border: 3px solid #a88f5e;
  border-radius: 12px;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
  font-family: 'Georgia', serif;
  color: #3b2f1b;
  text-align: center;
}

.leaflet-popup-tip {
  background: #a88f5e;
}

.leaflet-popup-content {
  margin: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
}

.leaflet-popup-content h2 {
  font-size: 18px;
  font-weight: bold;
  color: #5b3a1a;
  margin-top: 0;
}

.leaflet-popup-content img {
  border-radius: 4px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  margin: 5px;
}

.leaflet-popup-content a {
  color: #7b4e1f;
  text-decoration: underline;
  display: block;
  margin: 1px 0; /* tighter top & bottom spacing */
  line-height: 1.3;
}

.leaflet-popup-content a:hover {
  color: #b94e16;
}

.leaflet-popup-close-button {
  font-size: 24px !important;
  line-height: 20px;
  right: 8px;
  top: 6px;
}

.marker-ux-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#marker-loader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 1200;
  color: #f3efe2;
  font-family: 'Georgia', serif;
  transition: opacity 0.2s ease;
}

#marker-loader p {
  margin: 0;
  font-size: 16px;
}

.loader-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(243, 239, 226, 0.2);
  border-top-color: #f3efe2;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#marker-error {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #f3efe2;
  color: #3b2f1b;
  border: 2px solid #a88f5e;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Georgia', serif;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  z-index: 1201;
  transition: opacity 0.2s ease;
}

#marker-error button {
  background: #a88f5e;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

#marker-error button:hover {
  background: #8b7345;
}
