:root {
  --bg: #1f3d2b;
  --fg: #f4f1e8;
  --panel: #ffffff;
  --ink: #1d1d1b;
  --muted: #6b6b66;
  --accent: #e07a1f;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); }
body { display: flex; flex-direction: column; }

.bar {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--bg); color: var(--fg); z-index: 1000;
}
.brand { white-space: nowrap; font-size: 15px; }
#search { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 0; font-size: 15px; }
.icon { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; width: 38px; height: 38px; font-size: 18px; cursor: pointer; }
.icon.active { background: var(--accent); border-color: var(--accent); }

#map { flex: 1; }

.panel {
  position: absolute; top: 56px; right: 8px; width: min(320px, calc(100% - 16px));
  max-height: calc(100% - 72px); overflow: auto;
  background: var(--panel); border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); z-index: 1001;
}
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 6px; }
.row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 15px; }
.swatch { display: inline-block; width: 22px; height: 6px; border-radius: 3px; }
.muted { color: var(--muted); font-size: 13px; }
.wide { width: 100%; padding: 10px; border: 0; border-radius: 8px; background: var(--bg); color: var(--fg); font-size: 15px; cursor: pointer; }
#near-list { padding-left: 20px; margin: 8px 0 0; }
#near-list li { padding: 4px 0; cursor: pointer; }
#near-list li:hover { text-decoration: underline; }

.hidden { display: none !important; }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1002;
  background: var(--panel); border-radius: 14px 14px 0 0;
  padding: 14px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(0,0,0,.25); max-height: 55%; overflow: auto;
}
@media (min-width: 800px) {
  .sheet { left: 8px; right: auto; bottom: 8px; width: 420px; border-radius: 12px; }
}
.close { position: absolute; top: 10px; right: 10px; color: var(--ink); border-color: #ccc; width: 32px; height: 32px; font-size: 14px; }
.sheet h3 { margin: 0 40px 6px 0; font-size: 18px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; color: #fff; font-size: 13px; font-weight: 600; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 14px; margin: 10px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.profile svg { width: 100%; height: 130px; display: block; }
.profile .stats { font-size: 14px; margin-top: 4px; }
.sheet a { color: var(--bg); }

#search-results {
  position: absolute; top: 54px; left: 10px; right: 10px; max-width: 480px;
  list-style: none; margin: 0; padding: 4px 0; background: var(--panel);
  border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.25); z-index: 1003; max-height: 50%; overflow: auto;
}
#search-results li { padding: 8px 12px; cursor: pointer; font-size: 15px; }
#search-results li:hover { background: #f0eee6; }

.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #1e6ff2; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(30,111,242,.4); }
.attribution-note { font-size: 12px; }
