:root {
  --forest: #183c32;
  --forest-2: #275b4d;
  --cream: #f6f1e8;
  --paper: #fffdf8;
  --ink: #2b2218;
  --muted: #6f6254;
  --gold: #c89543;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.topbar {
  min-height: 82px;
  padding: max(14px, env(safe-area-inset-top)) 18px 14px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  color: white;
  background: linear-gradient(135deg, var(--forest), var(--forest-2));
}
.back {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(255,255,255,.13);
  text-decoration: none;
  font-size: 1.45rem;
  font-weight: 800;
}
.eyebrow {
  margin: 0 0 2px;
  color: #e0c790;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1 { margin: 0; font-size: clamp(1.15rem, 5vw, 1.55rem); line-height: 1.05; }
.count {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  color: #f6dfaf;
  font-weight: 900;
  font-size: .82rem;
}
main { max-width: 1100px; margin: 0 auto; }
.intro {
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 18px;
  align-items: center;
}
.intro h2 { margin: 0 0 5px; font-size: 1.25rem; }
.intro p { margin: 0; color: var(--muted); line-height: 1.45; font-size: .93rem; }
#locateButton {
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, #a7732e, var(--gold));
  box-shadow: 0 10px 22px rgba(124, 82, 27, .22);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
#locateButton:disabled { opacity: .65; cursor: wait; }
.status { grid-column: 1 / -1; font-size: .78rem !important; }
#map {
  height: min(64vh, 650px);
  min-height: 430px;
  border-block: 1px solid rgba(50,38,23,.12);
  background: #e7e3d9;
}
.roof-pin {
  width: 34px !important;
  height: 34px !important;
  margin: -17px 0 0 -17px !important;
  display: grid !important;
  place-items: center;
  border: 3px solid white;
  border-radius: 50% 50% 50% 12%;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, #d4a653, #a46e25);
  box-shadow: 0 5px 15px rgba(49,33,13,.35);
}
.roof-pin span { transform: rotate(45deg); font-size: 16px; }
.active-roof-pin {
  background: linear-gradient(135deg, #4f9a78, #1f644e);
  box-shadow: 0 5px 15px rgba(24, 72, 55, .38);
}
.user-pin {
  width: 22px !important;
  height: 22px !important;
  margin: -11px 0 0 -11px !important;
  border: 4px solid white;
  border-radius: 50%;
  background: #287ee7;
  box-shadow: 0 0 0 8px rgba(40,126,231,.2);
}
.leaflet-popup-content { margin: 14px 16px; line-height: 1.4; }
.leaflet-popup-content strong { color: var(--forest); font-size: 1rem; }
.popup-date { color: var(--muted); font-size: .84rem; }
.summary {
  margin: 16px 18px calc(20px + env(safe-area-inset-bottom));
  padding: 15px 17px;
  display: flex;
  gap: 8px;
  flex-direction: column;
  border: 1px solid rgba(190,139,61,.25);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(54,36,16,.08);
}
.summary strong { color: var(--forest); }
.summary span { color: var(--muted); font-size: .9rem; }
@media (max-width: 640px) {
  .intro { grid-template-columns: 1fr; }
  #locateButton { width: 100%; }
  .status { grid-column: 1; }
  #map { height: 58vh; min-height: 390px; }
}
