:root {
  --bg: #e9efe5;
  --panel: rgba(248, 245, 236, 0.9);
  --panel-strong: #f5f1e6;
  --ink: #203128;
  --muted: #536458;
  --accent: #355f44;
  --accent-soft: #8bab7e;
  --highlight: #d88c3b;
  --shadow: 0 18px 40px rgba(37, 54, 44, 0.16);
  --border: rgba(53, 95, 68, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(136, 171, 126, 0.24), transparent 24%),
    radial-gradient(circle at bottom right, rgba(216, 140, 59, 0.22), transparent 20%),
    linear-gradient(180deg, #edf4ea 0%, #dfe7d6 100%);
}

button {
  font: inherit;
}

.page-shell {
  width: min(1600px, calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 0;
}

.hero {
  padding: 12px 18px 10px;
  border: 1px solid var(--border);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(245, 241, 230, 0.88)),
    linear-gradient(90deg, rgba(136, 171, 126, 0.14), rgba(216, 140, 59, 0.1));
  box-shadow: var(--shadow);
}

.hero-copy h1,
.info-card h2 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  letter-spacing: 0.02em;
}

.hero-copy h1 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1;
}

.eyebrow,
.info-kicker {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  color: var(--accent);
}

.intro {
  max-width: 66ch;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.filter-button,
.zoom-button {
  border: 1px solid rgba(53, 95, 68, 0.18);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.7);
}

.layout {
  margin-top: 10px;
}

.map-panel,
.info-card,
.legend-card {
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.map-panel {
  padding: 10px;
  border-radius: 0;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.filter-group,
.zoom-controls {
  display: flex;
  gap: 10px;
}

.filter-button,
.zoom-button {
  min-height: 42px;
  padding: 8px 15px;
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.filter-button:hover,
.zoom-button:hover,
.filter-button:focus-visible,
.zoom-button:focus-visible {
  transform: translateY(-1px);
}

.filter-button.is-active,
.zoom-button:active {
  background: var(--accent);
  color: #f9f6ee;
}

.map-canvas {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: start;
  gap: 8px;
}

.map-frame {
  position: relative;
  min-width: 0;
}

.map-viewport {
  position: relative;
  overflow: hidden;
  height: calc(100dvh - 164px);
  min-height: 560px;
  border-radius: 0;
  border: 1px solid rgba(53, 95, 68, 0.18);
  background:
    linear-gradient(180deg, rgba(136, 171, 126, 0.12), rgba(255, 255, 255, 0.62)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 28px,
      rgba(53, 95, 68, 0.04) 28px,
      rgba(53, 95, 68, 0.04) 29px
    );
  touch-action: none;
}

.map-stage {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1024px;
  height: 768px;
  overflow: hidden;
  transform-origin: 0 0;
  will-change: transform;
}

.map-content {
  position: absolute;
  inset: 0;
  transform: rotate(-1deg) scale(1.03);
  transform-origin: center;
}

.map-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.marker-layer {
  position: absolute;
  inset: 0;
}

.marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 0;
  border-radius: 50%;
  color: white;
  font-size: 0.9rem;
  box-shadow: 0 8px 16px rgba(32, 49, 40, 0.24);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, outline-color 160ms ease;
}

.marker:hover,
.marker:focus-visible,
.marker.is-selected {
  transform: scale(1.08);
  box-shadow: 0 10px 18px rgba(32, 49, 40, 0.32);
  outline: 3px solid rgba(255, 255, 255, 0.76);
}

.marker.landmark {
  background: linear-gradient(180deg, #3f6d50 0%, #21402d 100%);
}

.marker.animal {
  background: linear-gradient(180deg, #e09a44 0%, #b35e1f 100%);
}

.marker-label {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 0;
  background: rgba(245, 241, 230, 0.96);
  color: var(--ink);
  font-size: 0.72rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 140ms ease;
  pointer-events: none;
}

.marker:hover .marker-label,
.marker:focus-visible .marker-label,
.marker.is-selected .marker-label {
  opacity: 1;
}

.gesture-hint {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: 360px;
  padding: 9px 12px;
  border-radius: 0;
  background: rgba(32, 49, 40, 0.78);
  color: #f4f1e7;
  font-size: 0.88rem;
  line-height: 1.4;
  pointer-events: none;
}

.info-panel {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(340px, calc(100% - 28px));
  pointer-events: none;
}

.info-card,
.legend-card {
  padding: 16px;
  border-radius: 0;
  pointer-events: auto;
}

.info-card {
  position: relative;
}

.info-card h2 {
  padding-right: 30px;
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.info-card.is-empty {
  max-width: 260px;
  margin-left: auto;
  background:
    linear-gradient(180deg, rgba(248, 245, 236, 0.9), rgba(232, 240, 225, 0.92)),
    var(--panel);
}

.info-dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(53, 95, 68, 0.1);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
}

.info-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 16px;
}

.info-badge {
  padding: 8px 10px;
  border-radius: 0;
  background: rgba(53, 95, 68, 0.1);
  color: var(--accent);
  font-size: 0.8rem;
}

.legend-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.legend-card {
  box-shadow: none;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 50%;
}

.landmark-dot {
  background: var(--accent);
}

.animal-dot {
  background: var(--highlight);
}

@media (max-width: 720px) {
  .page-shell {
    width: 100%;
    padding: 0;
  }

  .hero {
    border-width: 0 0 1px;
    border-radius: 0;
    padding: 10px 14px 9px;
    box-shadow: none;
  }

  .hero-copy h1 {
    font-size: 1.45rem;
  }

  .intro {
    display: none;
  }

  .eyebrow {
    margin-bottom: 3px;
    font-size: 0.65rem;
  }

  .map-panel {
    padding: 8px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .map-viewport {
    height: calc(100dvh - 142px);
    min-height: 430px;
    border-radius: 0;
  }

  .map-canvas {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .filter-group {
    flex: 1;
    gap: 5px;
  }

  .zoom-controls {
    gap: 5px;
  }

  .filter-button,
  .zoom-button {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 0.86rem;
  }

  .zoom-button[data-action="reset"] {
    display: none;
  }

  .gesture-hint {
    top: 10px;
    bottom: auto;
    left: 10px;
    max-width: calc(100% - 20px);
    padding: 7px 10px;
    font-size: 0.76rem;
  }

  .info-panel {
    top: auto;
    right: 10px;
    bottom: 10px;
    width: calc(100% - 20px);
  }

  .info-card,
  .legend-card {
    padding: 14px;
    border-radius: 0;
  }

  .info-card.is-empty {
    max-width: 230px;
  }

  .legend-card {
    order: -1;
    padding: 10px 12px;
  }

  .legend-card .info-kicker {
    margin-bottom: 7px;
  }

  .legend-list {
    gap: 7px;
  }
}

@media (max-height: 650px) {
  .map-viewport {
    min-height: 420px;
  }
}
