* { box-sizing: border-box; margin: 0; }
:root { --bg:#0d0d0f; --panel:#141417; --line:#2a2a30; --fg:#e8e6e3; --dim:#8a8894; --acc:#ff7a1a; }
html, body, #map { height: 100%; }
body { font: 14px/1.45 system-ui, sans-serif; background: var(--bg); color: var(--fg); overflow: hidden; }

header { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; gap: 8px;
  align-items: center; padding: 8px 10px; background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
#brand { font-weight: 800; letter-spacing: 2px; }
#brand span { color: var(--acc); }
#search { flex: 1; min-width: 60px; background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; outline: none; }
#search:focus { border-color: var(--acc); }
button { background: var(--panel); color: var(--fg); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 11px; cursor: pointer; font: inherit; }
button:hover { border-color: var(--acc); }
button.ghost { width: 100%; border-style: dashed; color: var(--dim); }
#locbtn.on { border-color: var(--acc); color: var(--acc); box-shadow: 0 0 8px #ff7a1a55; }
#userbtn { white-space: nowrap; }

#drawer { position: fixed; top: 53px; bottom: 0; left: 0; width: 290px; z-index: 15;
  background: color-mix(in srgb, var(--panel) 94%, transparent); border-right: 1px solid var(--line);
  padding: 10px; overflow-y: auto; transition: transform .18s; }
#drawer.closed { transform: translateX(-100%); }
#hint { color: var(--dim); font-size: 12px; margin-top: 10px; }

.list { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px;
  cursor: pointer; border: 1px solid transparent; user-select: none; }
.list:hover { background: var(--bg); }
.list.on { border-color: var(--acc); background: var(--bg); }
.list .icon { font-size: 18px; width: 24px; text-align: center; }
.list .name { flex: 1; }
.list .meta { color: var(--dim); font-size: 11px; }
.list .vis { font-size: 11px; }
.list button { padding: 2px 7px; font-size: 12px; visibility: hidden; }
.list:hover button { visibility: visible; }

#addbar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 20;
  background: var(--acc); color: #000; padding: 9px 14px; border-radius: 10px; font-weight: 600; }
#addbar button { background: #0003; border: none; color: #000; margin-left: 8px; }

dialog { background: var(--panel); color: var(--fg); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px; min-width: 300px; max-width: 92vw; }
dialog::backdrop { background: #000a; }
dialog h3 { margin-bottom: 12px; }
dialog label { display: block; color: var(--dim); font-size: 12px; margin: 10px 0 3px; }
dialog input, dialog select, dialog textarea { width: 100%; background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; }
dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
dialog .danger { border-color: #a33; color: #f88; }
.member { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.member span { flex: 1; }

.maplibregl-popup-content { background: var(--panel); color: var(--fg); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; font: 13px/1.5 system-ui, sans-serif; }
.maplibregl-popup-tip { border-top-color: var(--panel) !important; }
.pop h4 { margin-bottom: 2px; }
.pop .cat { color: var(--acc); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.pop .blurb { margin: 6px 0; white-space: pre-wrap; }
.pop .by { color: var(--dim); font-size: 11px; }
.pop .row { margin-top: 8px; display: flex; gap: 6px; }
.pop button { padding: 3px 8px; font-size: 12px; }

.locdot { display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.locdot .dot { width: 14px; height: 14px; border-radius: 50%; background: #2f9dff;
  border: 2px solid #fff; box-shadow: 0 0 10px #2f9dffaa; }
.locdot .tag { background: #000c; color: #fff; font-size: 11px; padding: 1px 6px;
  border-radius: 6px; margin-top: 2px; }

.pin { font-size: 26px; line-height: 1; cursor: pointer; text-shadow: 0 1px 4px #000; }

@media (max-width: 700px) {
  #brand { display: none; }
  #drawer { width: 85vw; }
}
