:root {
  --bg: #0f1115;
  --panel: #171a21;
  --text: #e8e8ea;
  --muted: #9aa0a9;
  --accent: #ff7a1a;
  --accent-soft: rgba(255, 122, 26, 0.35);
  --border: #262a33;
  --topbar-h: 56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* --- Header -------------------------------------------------------------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 17, 21, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000; /* above Leaflet panes/controls */
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand img { display: block; border-radius: 8px; }

.wordmark {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.nav { display: flex; gap: 18px; }

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.nav a:hover, .nav a:focus { color: var(--text); }

/* --- Map page -------------------------------------------------------------- */
.map-page { overflow: hidden; }

#map {
  position: fixed;
  top: var(--topbar-h);
  left: 0; right: 0; bottom: 0;
  background: #0b0d11;
}

.noscript {
  position: fixed;
  top: calc(var(--topbar-h) + 16px);
  left: 16px;
}

.leaflet-container { font: inherit; }

.pin span {
  display: block;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.leaflet-popup-content-wrapper {
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.leaflet-popup-tip { background: var(--panel); }
.leaflet-popup-content { margin: 12px 14px; line-height: 1.35; }

.popup strong { font-size: 15px; }
.popup-date { color: var(--muted); font-size: 13px; margin-top: 2px; }
.popup-photo {
  display: block;
  width: 100%;
  max-width: 232px;
  height: auto;
  border-radius: 6px;
  margin-bottom: 8px;
}

.map-note {
  background: var(--panel);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  max-width: 320px;
}

.leaflet-control-attribution {
  background: rgba(15, 17, 21, 0.8) !important;
  color: var(--muted) !important;
}
.leaflet-control-attribution a { color: var(--muted); }

/* --- Text pages (privacy, support) ---------------------------------------- */
.text-page { padding-top: var(--topbar-h); }

.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  line-height: 1.6;
}

.content h1 { font-size: 28px; margin: 0 0 4px; }
.content h2 { font-size: 20px; margin: 32px 0 8px; }
.content .meta { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.content p, .content li { font-size: 16px; }
.content ul, .content ol { padding-left: 22px; }
.content code {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 14px;
}

.footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 40px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 480px) {
  .wordmark { font-size: 16px; }
  .nav { gap: 14px; }
}
