:root {
  --bg: #f7f7f5;
  --panel: #ffffff;
  --text: #1c1c1a;
  --muted: #6b6b66;
  --border: #e3e3de;
  --accent: #21918c;
  --warn-bg: #fff4d6;
  --warn-text: #6b4e00;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --panel: #1c1c1b;
    --text: #ecece8;
    --muted: #9a9a94;
    --border: #2e2e2c;
    --accent: #5ec962;
    --warn-bg: #3a2f10;
    --warn-text: #f3d68a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
a { color: var(--accent); }

/* Gallery */
.gallery { max-width: 880px; margin: 0 auto; padding: 48px 16px; }
.gallery h1 { font-size: 2rem; margin: 0 0 4px; }
.gallery p.lede { color: var(--muted); margin: 0 0 32px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { display: block; padding: 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: inherit; }
.card:hover { border-color: var(--accent); }
.card h2 { font-size: 1.05rem; margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.card.soon { opacity: .55; pointer-events: none; }
.tag { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; vertical-align: middle; margin-left: 4px; }

/* Map pages */
.map-page { display: flex; height: 100%; }
.sidebar { width: 340px; flex-shrink: 0; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--border); padding: 20px 16px; }
.sidebar h1 { font-size: 1.25rem; margin: 0 0 4px; }
.sidebar .sub { color: var(--muted); font-size: .85rem; margin: 0 0 16px; }
.sidebar h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 20px 0 8px; }
.banner { background: var(--warn-bg); color: var(--warn-text); padding: 10px 12px; border-radius: 8px; font-size: .85rem; margin-bottom: 12px; }
.controls label { display: flex; align-items: center; gap: 6px; font-size: .9rem; margin: 4px 0; }
.controls .prices { display: flex; gap: 12px; }
.controls input[type=range] { width: 100%; }
.legend-bar { height: 10px; border-radius: 5px; background: linear-gradient(to right, #440154, #3b528b, #21918c, #5ec962, #fde725); }
.legend-labels { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 4px; }
ol.top { padding-left: 22px; margin: 0; }
ol.top li { margin: 0 0 8px; font-size: .9rem; cursor: pointer; }
ol.top li .meta { color: var(--muted); font-size: .8rem; }
#map { flex: 1; }
.maplibregl-popup-content { background: var(--panel); color: var(--text); border-radius: 8px; font-size: .85rem; }
.maplibregl-popup-tip { border-top-color: var(--panel) !important; }
.back { font-size: .85rem; text-decoration: none; }

@media (max-width: 720px) {
  .map-page { flex-direction: column-reverse; }
  .sidebar { width: 100%; height: 45%; border-right: 0; border-top: 1px solid var(--border); }
  #map { min-height: 55%; }
}
