:root{
  --bg:#f2f2f7;--glass:rgba(255,255,255,.72);--glass-still:rgba(250,250,252,.94);--line:rgba(60,60,67,.14);
  --text:#1c1c1e;--muted:#6c6c70;--accent:#007aff;--c5g:#ff7b00;--c4g:#5a5ce6;
  --ok:#248a3d;--no:#8e8e93;--shadow:0 8px 30px rgba(0,0,0,.12);
  color-scheme:light;
}
:root[data-theme="dark"]{
  --bg:#1c1c1e;--glass:rgba(36,36,38,.72);--line:rgba(235,235,245,.14);
  --text:#f2f2f7;--muted:#a1a1a6;--accent:#0a84ff;--ok:#30d158;--no:#8e8e93;
  --shadow:0 8px 30px rgba(0,0,0,.45);color-scheme:dark;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;height:100%;overflow:hidden;background:var(--bg);color:var(--text);
  font:15px/1.4 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased}
#map{position:fixed;inset:0}
button{font:inherit;color:inherit;cursor:pointer}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.glass{background:var(--glass);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);
  border:1px solid var(--line);box-shadow:var(--shadow)}
.moving .glass{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--glass-still)}
.muted{color:var(--muted);margin:4px 0 0}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;flex:none}
.c5g{background:var(--c5g)}.c4g{background:var(--c4g)}

.top{position:fixed;z-index:3;top:calc(12px + env(safe-area-inset-top));left:16px;right:16px;max-width:420px}
.search{display:flex;align-items:center;gap:8px;height:48px;padding:0 6px 0 14px;border-radius:14px}
.search svg{color:var(--muted)}
.search input{flex:1;min-width:0;height:100%;border:0;background:none;color:var(--text);font-size:16px;outline:none}
.search input::-webkit-search-cancel-button{display:none}
.icon-btn{border:0;background:none;width:44px;height:44px;display:grid;place-items:center;color:var(--muted);border-radius:10px}
.results{list-style:none;margin:8px 0 0;padding:6px;border-radius:14px;max-height:50vh;overflow:auto}
.results li{padding:10px 12px;border-radius:10px;cursor:pointer;min-height:44px}
.results li:hover,.results li[aria-selected="true"]{background:var(--line)}
.results li b{display:block;font-weight:600}
.results li span{color:var(--muted);font-size:13px}
.results li.empty{cursor:default;color:var(--muted)}
.chips{display:flex;gap:8px;margin-top:10px}
.chip{display:flex;align-items:center;gap:8px;height:36px;min-height:36px;padding:0 14px;border-radius:18px;font-size:14px;font-weight:600;
  transition:opacity .2s,transform .2s}
.chip:active{transform:scale(.96)}
.chip:not(.on){opacity:.55}
.chip:not(.on) .dot{background:var(--no)}

.tools{position:fixed;z-index:3;right:16px;top:calc(118px + env(safe-area-inset-top));display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.tool{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;color:var(--accent)}
.tool.wide{width:auto;display:flex;align-items:center;gap:6px;padding:0 14px 0 12px;font-size:14px;font-weight:600;white-space:nowrap}
.tool.busy svg{animation:pulse 1s infinite}
.tool.on{background:var(--accent);color:#fff}
@keyframes pulse{50%{opacity:.3}}

.sheet{position:fixed;z-index:2;left:0;right:0;bottom:0;padding:8px 20px calc(12px + env(safe-area-inset-bottom));
  border-radius:20px 20px 0 0;border-bottom:0;touch-action:none;will-change:transform;
  transform:translateY(var(--fold,0px));transition:transform .45s cubic-bezier(.32,.72,0,1)}
.sheet.dragging{transition:none}
.grab{display:block;width:100%;height:24px;margin:-8px 0 4px;border:0;background:none;touch-action:none}
.grab span{display:block;width:36px;height:5px;border-radius:3px;background:var(--line);margin:0 auto}
.head{display:flex;align-items:flex-start;gap:8px}
.head-text{flex:1;min-width:0}
.close{margin:-6px -10px 0 0}
.swap{display:grid}
.swap>*{grid-area:1/1;transition:opacity .3s}
.mini{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 0;opacity:0;pointer-events:none}
.mini span{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:14px;border:1px solid var(--line);font-size:13px;font-weight:600}
.mini span.yes{color:var(--ok)}
.mini span:not(.yes){color:var(--no)}
.sheet :is(#sheetIdle p,.rows,.note,.source){transition:opacity .3s}
.sheet.collapsed :is(#sheetIdle p,#placeSub,.rows,.note,.source){opacity:0}
.sheet.collapsed .mini{opacity:1}
.sheet.collapsed{cursor:pointer}
.sheet h1{font-size:22px;margin:0;letter-spacing:-.02em}
.sheet h2{font-size:20px;margin:2px 0 0;letter-spacing:-.01em;overflow-wrap:anywhere}
.eyebrow{margin:0;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.rows{margin:14px 0 8px;border-radius:12px;overflow:hidden;border:1px solid var(--line)}
.row{display:flex;align-items:center;gap:10px;padding:12px 14px;min-height:48px}
.row+.row{border-top:1px solid var(--line)}
.row span{flex:1;font-weight:600}
.row b{font-weight:600;color:var(--no)}
.row.yes b{color:var(--ok)}
.note{margin:0 0 10px;font-size:13px;color:var(--muted)}
.source{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;padding-top:10px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.source a{color:var(--accent);text-decoration:none}

.pin{position:relative;width:42px;height:56px;filter:drop-shadow(0 3px 4px rgba(0,0,0,.3));transform-origin:50% 100%}
.pin svg{width:42px;height:56px;stroke:none}
.pin img{position:absolute;left:8px;top:6px;width:26px;height:26px;object-fit:contain}
.pin.drop{animation:drop .5s cubic-bezier(.3,1.4,.6,1)}
@keyframes drop{0%{transform:translateY(-36px) scale(.8);opacity:0}60%{opacity:1}100%{transform:none}}
/* Your location: Aeris pin that gently bobs, with a pulse on the ground where you stand. */
.me{position:relative;width:42px;height:56px;pointer-events:none}
.me .ring{position:absolute;left:50%;bottom:-14px;width:56px;height:28px;margin-left:-28px;border-radius:50%;background:rgba(64,33,80,.35);animation:ping 2s ease-out infinite}
.me .ring::after{content:"";position:absolute;left:50%;top:50%;width:12px;height:6px;margin:-3px 0 0 -6px;border-radius:50%;background:rgba(64,33,80,.6)}
.pin.live{animation:bob 2s ease-in-out infinite}
@keyframes ping{0%{transform:scale(.3);opacity:1}100%{transform:scale(1.2);opacity:0}}
@keyframes bob{50%{transform:translateY(-5px)}}
.maplibregl-ctrl-attrib{font-size:11px}
.maplibregl-ctrl-bottom-right{bottom:var(--sheet-h,0px)}

@media (min-width:760px){
  .sheet{left:16px;right:auto;bottom:auto;top:calc(160px + env(safe-area-inset-top));width:360px;border-radius:16px;border-bottom:1px solid var(--line);padding:16px 20px;transform:none;touch-action:auto}
  .grab{display:none}
  .maplibregl-ctrl-bottom-right{bottom:0}
  .top{max-width:360px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
