html, body { height: 100%; margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  background: #0b0b0b;
}

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


/* ---------- Lumberjack postcard look ---------- */

/* A subtle “printed on paper” tone & contrast on the map rendering */
#map canvas {
  /* warm/inky print feel */
  filter: saturate(0.92) contrast(1.08) brightness(0.96);
}

/* Paper tint overlay (warm parchment) */
#paperTint {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(1200px 800px at 30% 20%, rgba(255, 236, 205, 0.20), rgba(255, 236, 205, 0.04) 55%, rgba(20,16,12,0.10) 100%),
    linear-gradient(0deg, rgba(170, 120, 70, 0.10), rgba(170, 120, 70, 0.06));
  mix-blend-mode: multiply;
}

/* Grain overlay (CSS-only micro-noise approximation) */
#paperGrain {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0.18;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 2px, rgba(0,0,0,0.015) 3px, rgba(0,0,0,0.015) 5px);
  mix-blend-mode: overlay;
}

/* Vignette & gentle edge wear */
#paperVignette {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 50% 45%, rgba(0,0,0,0.00) 55%, rgba(0,0,0,0.22) 100%),
    radial-gradient(closest-side at 10% 10%, rgba(60, 35, 10, 0.12), rgba(0,0,0,0.00) 45%),
    radial-gradient(closest-side at 90% 15%, rgba(60, 35, 10, 0.10), rgba(0,0,0,0.00) 45%),
    radial-gradient(closest-side at 85% 90%, rgba(60, 35, 10, 0.12), rgba(0,0,0,0.00) 50%);
}

/* Optional: postcard “mat” edge (keeps title unboxed) */
body::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 8;
  pointer-events: none;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.10) inset,
    0 0 0 2px rgba(0,0,0,0.18) inset,
    0 18px 50px rgba(0,0,0,0.45);
}

/* Keep your UI above the overlays */
#title { z-index: 10; }
.fab { z-index: 12; }
.backdrop { z-index: 20; }
.modal { z-index: 21; }

/* Folksy title (upper-left, no background rectangle) */
#title {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  font-family: Rye, serif;
  font-size: clamp(20px, 3.2vw, 34px);
  letter-spacing: 0.5px;
  line-height: 1.05;
  color: rgba(255,255,255,0.96);
  text-shadow:
    0 2px 0 rgba(0,0,0,0.25),
    0 6px 18px rgba(0,0,0,0.45);
  user-select: none;
  pointer-events: none;
}

/* Hamburger button (lower-right) */
.fab {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 12;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  background: rgba(20, 16, 12, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  cursor: pointer;
}
.fab:focus-visible { outline: 2px solid rgba(255,255,255,0.65); outline-offset: 2px; }

.hamburger {
  display: inline-block;
  width: 18px;
  height: 12px;
  position: relative;
}
.hamburger::before, .hamburger::after, .hamburger { border-top: 2px solid rgba(255,255,255,0.92); }
.hamburger::before, .hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
}
.hamburger::before { top: 5px; }
.hamburger::after { top: 10px; }

/* Modal */
.backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.modal {
  position: absolute;
  right: 14px;
  bottom: 70px;
  width: min(420px, calc(100vw - 28px));
  z-index: 21;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(18, 14, 10, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 46px rgba(0,0,0,0.45);
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px 12px;
}
.modalTitle { font-weight: 600; color: rgba(255,255,255,0.94); }
.iconBtn {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}
.modalBody {
  padding: 0 12px 12px 12px;
  color: rgba(255,255,255,0.86);
  font-size: 14px;
}
.creditsList { margin: 6px 0 0 18px; padding: 0; }
.creditsList li { margin: 8px 0; }
.creditsList a { color: rgba(255,255,255,0.9); }

.divider { height: 1px; background: rgba(255,255,255,0.10); margin: 12px 0; }
.provRow { display: flex; align-items: baseline; gap: 10px; }
.provLink {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-weight: 600;
}
.provHint { opacity: 0.75; font-size: 12px; }
.fineprint { margin: 12px 0 0; opacity: 0.78; font-size: 12px; line-height: 1.35; }

.backdrop.open { opacity: 1; pointer-events: auto; }
.modal.open { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Hide MapLibre attribution UI (we provide our own) */
.maplibregl-ctrl-attrib, .maplibregl-ctrl-logo { display: none !important; }

/* Popup styling: rounded rectangle, NO tip/arrow */
.maplibregl-popup-tip { display: none !important; }
.maplibregl-popup-content {
  border-radius: 4px !important;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(18, 14, 10, 0.92) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.92);
  box-shadow: 0 18px 44px rgba(0,0,0,0.45);
  padding: 12px 12px 10px 12px !important;
  min-width: 220px;
}

.popupTitle { font-weight: 700; font-size: 15px; line-height: 1.2; margin: 0 0 6px 0; }
.popupMeta { font-size: 13px; opacity: 0.92; margin: 0 0 10px 0; }
.popupRow { display: flex; gap: 8px; align-items: center; margin: 2px 0; font-size: 13px; }

.badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  opacity: 0.9;
}

a.takeMeBtn {
  text-decoration: none;
}

.takeMeBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  box-sizing: border-box; /* <-- THIS FIXES IT */

  margin-top: 10px;
  padding: 10px 12px;

  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.95);
  font-weight: 700;
  text-decoration: none;

  cursor: pointer;
  
letter-spacing: 0.3px;
}


.takeMeBtn:hover { background: rgba(255,255,255,0.14); }
.takeMeBtn:active { transform: translateY(1px); }

/* Marker affordance */
.marker {
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.45));
}
.marker:hover { transform: translate(-50%, -50%) scale(1.06); }
