html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

/* Emoji marker: centre the glyph on the coordinate with no default box
   (mirrors the garden map page). */
.emoji-marker {
  font-size: 26px;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
  cursor: default;
}

/* Instruction panel floating over the map, top centre. */
.panel {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 20px);
  max-width: 380px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  line-height: 1.5;
  color: #222;
}

.panel h1 {
  margin: 0 0 6px;
  font-size: 17px;
}

.panel p {
  margin: 0 0 10px;
}

.panel .hint {
  color: #555;
  font-size: 13px;
}

.panel button {
  font: inherit;
  padding: 7px 14px;
  border: none;
  border-radius: 6px;
  background: #0f9d58;
  color: #fff;
  cursor: pointer;
}

.panel button:hover:not(:disabled) {
  background: #0c7f47;
}

.panel button:disabled {
  background: #bbb;
  cursor: default;
}

/* Secondary "go back" action, styled as a link. */
.panel button.linkish {
  background: none;
  color: #555;
  padding: 6px 0 0;
  text-decoration: underline;
}

.panel button.linkish:hover {
  background: none;
  color: #222;
}

#name-form {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

#name-form input {
  font: inherit;
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #bbb;
  border-radius: 6px;
}

.panel .error {
  margin: 8px 0 0;
  color: #c5221f;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  border: 2px solid #0f9d58;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

/* Keep Leaflet's zoom control clear of the panel on narrow screens, where the
   panel spans nearly the full width. */
@media (max-width: 480px) {
  .leaflet-top.leaflet-left {
    top: 170px;
  }
}
