:root {
  --bg: #8e6a4b;
  --panel: #d8ba93;
  --line: #6a462f;
  --ink: #2f1a10;
  --muted: #61493a;
  --accent: #3f2417;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 25% 10%, rgba(255, 226, 186, 0.35) 0%, transparent 35%),
    radial-gradient(circle at 90% 85%, rgba(62, 28, 18, 0.2) 0%, transparent 40%),
    linear-gradient(140deg, #b88e68 0%, #9b7557 40%, #7d5c45 100%);
}

.map-shell {
  min-height: 100vh;
  padding: 0.95rem;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0.95rem;
}

.left-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(170deg, rgba(244, 220, 186, 0.94) 0%, rgba(216, 186, 147, 0.96) 100%);
  padding: 0.95rem;
  display: grid;
  gap: 0.9rem;
  align-content: start;
  box-shadow: 0 12px 40px rgba(41, 23, 14, 0.27);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
}

.submit-link {
  color: #4a2b1d;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

h1 {
  margin: 0.25rem 0 0;
  font-size: 1.4rem;
  font-family: "UnifrakturCook", "Times New Roman", serif;
  letter-spacing: 0.04em;
}

.panel-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(251, 239, 215, 0.6);
}

.panel-block h2 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.86rem;
}

input,
select,
button {
  width: 100%;
  font: inherit;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0.5rem 0.6rem;
  color: var(--ink);
  background: #f3e1c0;
}

select + label,
input + label,
button + label {
  margin-top: 0.5rem;
}

button {
  margin-top: 0.55rem;
  cursor: pointer;
  background: #5d3b29;
  color: #f4e7cf;
}

button:hover {
  background: #7c5139;
}

.muted {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.checkbox-row {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

.location-detail {
  color: var(--muted);
  line-height: 1.45;
}

.panel-cta {
  display: inline-block;
  margin-top: 0.7rem;
  text-decoration: none;
  color: #f5ead8;
  background: #4a2b1d;
  border: 1px solid #6a462f;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
}

.panel-cta:hover {
  background: #6a412d;
}

.location-detail h3 {
  margin: 0;
  color: var(--ink);
}

.location-detail p {
  margin: 0.45rem 0 0;
}

.map-area {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(41, 23, 14, 0.25);
  position: relative;
}

.map-area::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 232, 201, 0.21), transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(60, 28, 18, 0.12), transparent 45%),
    radial-gradient(circle at 30% 75%, rgba(60, 28, 18, 0.14), transparent 45%);
  mix-blend-mode: multiply;
}

#map {
  width: 100%;
  height: calc(100vh - 1.9rem);
}

.leaflet-tile-pane {
  filter: sepia(0.82) saturate(0.55) contrast(0.92) brightness(0.96);
}

.leaflet-container {
  background: #d8ba93;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #f2e2c4;
  color: #2f1a10;
  border: 1px solid #6a462f;
}

.ghost-marker {
  width: 24px;
  height: 24px;
  border-radius: 0;
  box-shadow: none;
  position: relative;
}

.ghost-marker::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask: var(--pin-mask) center / contain no-repeat;
  mask: var(--pin-mask) center / contain no-repeat;
}

.ghost-marker.curated-ghost {
  color: #d4a947;
  --pin-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='white' d='M32 4c13.3 0 24 10.7 24 24v26l-7-6-7 6-10-8-10 8-7-6-7 6V28C8 14.7 18.7 4 32 4zm-8 20a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm16 0a4 4 0 1 0 0 8 4 4 0 0 0 0-8z'/%3E%3C/svg%3E");
}

.ghost-marker.experience-ghost {
  color: #c43844;
  --pin-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='white' d='M32 4c13.3 0 24 10.7 24 24v26l-7-6-7 6-10-8-10 8-7-6-7 6V28C8 14.7 18.7 4 32 4zm-8 20a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm16 0a4 4 0 1 0 0 8 4 4 0 0 0 0-8z'/%3E%3C/svg%3E");
}

.ghost-marker.submitted-location-ghost {
  color: #4b7fcc;
  --pin-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='white' d='M32 4c13.3 0 24 10.7 24 24v26l-7-6-7 6-10-8-10 8-7-6-7 6V28C8 14.7 18.7 4 32 4zm-8 20a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm16 0a4 4 0 1 0 0 8 4 4 0 0 0 0-8z'/%3E%3C/svg%3E");
}

.ghost-marker.town-village-ghost {
  color: #3fa96f;
  --pin-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='white' d='M32 4c13.3 0 24 10.7 24 24v26l-7-6-7 6-10-8-10 8-7-6-7 6V28C8 14.7 18.7 4 32 4zm-8 20a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm16 0a4 4 0 1 0 0 8 4 4 0 0 0 0-8z'/%3E%3C/svg%3E");
}

.ghost-marker.cryptid-monster {
  color: #111111;
  --pin-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='white' d='M32 4c13.3 0 24 10.7 24 24v26l-7-6-7 6-10-8-10 8-7-6-7 6V28C8 14.7 18.7 4 32 4zm-8 20a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm16 0a4 4 0 1 0 0 8 4 4 0 0 0 0-8z'/%3E%3C/svg%3E");
}

.marker-count {
  position: absolute;
  right: -10px;
  top: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  border: 1px solid #2a2f3d;
  background: #f4f1e7;
  color: #1a1f2b;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.leaflet-control-container .leaflet-control {
  border: 1px solid #6a462f;
  box-shadow: 0 4px 12px rgba(38, 20, 12, 0.25);
}

.leaflet-control-container .leaflet-control a {
  background: #f4e7cf;
  color: #2f1a10;
}

.poi-overlay {
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  width: min(360px, calc(100% - 1.7rem));
  z-index: 5000;
  border: 1px solid #6a462f;
  border-radius: 14px;
  padding: 0.85rem;
  background: linear-gradient(170deg, rgba(247, 227, 196, 0.98) 0%, rgba(227, 199, 162, 0.98) 100%);
  color: #2f1a10;
  box-shadow: 0 10px 30px rgba(42, 23, 14, 0.32);
  transition: left 140ms ease, top 140ms ease;
}

.hidden {
  display: none;
}

.close-overlay-btn {
  width: auto;
  float: right;
  margin-top: 0;
  padding: 0.2rem 0.48rem;
  border-radius: 8px;
  background: #5a3828;
}

.overlay-kicker {
  margin: 0;
  color: #6a462f;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.76rem;
  font-weight: 700;
}

.poi-overlay h3 {
  margin: 0.28rem 0 0;
  font-family: "UnifrakturCook", "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.15;
}

.overlay-meta {
  margin: 0.32rem 0 0;
  color: #5e4636;
  font-size: 1rem;
}

.overlay-excerpt {
  margin: 0.45rem 0 0;
  line-height: 1.45;
  color: #372116;
}

.overlay-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: #f5ead8;
  text-decoration: none;
  background: #4a2b1d;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
}

.overlay-link:hover {
  background: #6a412d;
}

.overlay-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.overlay-actions .overlay-link {
  margin-top: 0;
}

.overlay-link.secondary {
  background: #1f3148;
  border: 1px solid #2b4a6f;
}

.overlay-link.secondary:hover {
  background: #2b4a6f;
}

@media (max-width: 980px) {
  .map-shell {
    grid-template-columns: 1fr;
  }

  #map {
    height: 58vh;
  }
}

/* Dark/gold site theme overrides */
:root {
  --bg: #111318;
  --panel: #181d25;
  --line: #8c6d31;
  --ink: #f4f1e7;
  --muted: #c7bea9;
  --accent: #d0ae68;
}

body {
  color: var(--ink) !important;
  background:
    radial-gradient(circle at 18% 8%, rgba(185, 147, 70, 0.14), transparent 32%),
    radial-gradient(circle at 80% 82%, rgba(143, 29, 36, 0.12), transparent 35%),
    linear-gradient(180deg, #101217 0%, var(--bg) 100%) !important;
}

.left-panel,
.panel-block,
.poi-overlay {
  background: var(--panel) !important;
  border-color: var(--line) !important;
}

label,
.muted,
.location-detail,
.overlay-kicker,
.overlay-meta {
  color: var(--muted) !important;
}

input,
select,
button,
.leaflet-control-container .leaflet-control a {
  background: #10141b !important;
  color: var(--ink) !important;
  border-color: #3f4a5e !important;
}

button,
.panel-cta,
.close-overlay-btn {
  background: #8f1d24 !important;
  color: #fff3e6 !important;
  border-color: #71161b !important;
}

button:hover,
.panel-cta:hover,
.close-overlay-btn:hover {
  background: #b02b34 !important;
}

.overlay-link {
  background: #8f1d24 !important;
  color: #fff3e6 !important;
  border-color: #71161b !important;
}

.overlay-link:hover {
  background: #b02b34 !important;
}

.overlay-link.secondary {
  background: #1f3148 !important;
  border-color: #2b4a6f !important;
}

.overlay-link.secondary:hover {
  background: #2b4a6f !important;
}

.map-area {
  border-color: var(--line) !important;
}
