:root {
  --accent: #e85d3d;
  --accent-dark: #c94a2d;
  --ink: #263b2f;
  --paper: #faf7f0;
  --marker-bg: #ffd400;
  --marker-bg-hover: #ffc300;
  --marker-border: #1d4ed8;
  --marker-number: #000000;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.site-header {
  text-align: center;
  padding: 1rem 1rem 0.75rem;
  flex: 0 0 auto;
}

.site-header h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.site-header p {
  margin: 0;
  color: #5a6b5e;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
}

.map-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem 1rem;
  overflow: hidden;
  touch-action: none;
}

.map-wrap {
  position: relative;
  aspect-ratio: 1766 / 2066;
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
  transition: transform 0.2s ease-out;
  cursor: grab;
}

.map-wrap.is-interacting {
  transition: none;
}

.map-wrap.is-panning {
  cursor: grabbing;
}

.map-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.markers {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.scatter-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.scatter-line {
  position: absolute;
  height: 6px;
  background: var(--marker-bg);
  opacity: 0.9;
  transform: translateY(-50%);
}

.scatter-anchor {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--marker-bg);
  opacity: 0.9;
  transform: translate(-50%, -50%);
}

.marker {
  position: absolute;
  transform: translate(calc(-50% + var(--scatter-x, 0px)), -50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--marker-bg);
  border: 3px solid var(--marker-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.marker-number {
  color: var(--marker-number);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.marker::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: var(--marker-bg);
  opacity: 0.35;
  animation: pulse 2s ease-out infinite;
  z-index: -1;
}

.marker:hover,
.marker:focus-visible {
  background: var(--marker-bg-hover);
  transform: translate(calc(-50% + var(--scatter-x, 0px)), -50%) scale(1.25);
  outline: none;
}

@keyframes pulse {
  0%   { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Overlay — a full page, not a small modal */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--paper);
  overflow-y: auto;
  z-index: 100;
}

.overlay[hidden] { display: none; }

.overlay-card {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.75rem 7rem;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.overlay-card h2 {
  margin: 0 0 0.75rem;
  color: var(--accent-dark);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  padding-right: 1.5rem;
}

.overlay-card p {
  line-height: 1.6;
  font-size: 1.05rem;
  color: #3a3a3a;
}

.overlay-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.overlay-gallery img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.return-home {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  background: var(--marker-bg);
  border: 3px solid var(--marker-border);
  color: var(--marker-number);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 101;
}

.return-home:hover {
  background: var(--marker-bg-hover);
}

/* Zoom controls */
.zoom-controls {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10;
}

.zoom-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.zoom-btn:hover {
  background: #f2efe8;
}

.zoom-btn:active {
  background: #e6e2d8;
}

.zoom-btn-reset {
  font-size: 1.1rem;
}

@media (max-width: 480px) {
  .zoom-controls { right: 0.75rem; bottom: 0.75rem; }
  .zoom-btn { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .marker { width: 20px; height: 20px; border-width: 2px; border-radius: 5px; }
  .marker-number { font-size: 0.65rem; }
}
