:root{
  /* Palette taken from the logo: palm, sky, sun, terracotta, sage, sand */
  --ink:#0f3530; --ink2:#4b5f59; --line:#e6dcc6; --panel:#fffaf0; --wash:#f6eedc;
  --path:#0e9f4f; --pathd:#0a6e36; --route:#1a56db; --dusk:#c24e1d; --mid:#5b6b66;
  --sky:#38b0c4; --skyd:#17819a; --sun:#fdc53a; --terra:#b9471c; --terrad:#a33d15; --sage:#8ba272; --sand:#f1e4c4;
  --stripe:linear-gradient(90deg,var(--sky) 0 34%,var(--sun) 34% 62%,#e8803f 62% 82%,#c24e1d 82%);
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{font-family:'Atkinson Hyperlegible',system-ui,-apple-system,Segoe UI,sans-serif;color:var(--ink);font-size:16px;line-height:1.4}
#map{position:fixed;inset:0;background:#efe6d0}
.leaflet-container.pin-mode{cursor:crosshair}
button,input{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--route);outline-offset:2px}

.panel,.sheet{
  position:fixed;z-index:1100;background:var(--panel);border:1px solid var(--line);
  border-radius:16px;box-shadow:0 8px 28px rgba(20,38,43,.2);
}
.panel{top:max(10px,env(safe-area-inset-top));left:10px;right:10px;padding:10px 12px;max-width:430px;max-height:calc(100vh - 20px);overflow:auto}
.title{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.title h1{flex:1}
h1{font-size:1.05rem;margin:0;letter-spacing:.1px}
.panel.collapsed .collapsible{display:none}
.panel.collapsed .title{margin-bottom:0}
.panel.collapsed #collapse svg{transform:rotate(180deg)}

.stops{display:flex;flex-direction:column;gap:8px}
.stop{display:flex;align-items:center;gap:8px}
.badge{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:700;font-size:.85rem}
.field{position:relative;flex:1;min-width:0}
.field input{width:100%;height:44px;padding:0 44px 0 12px;border:1px solid var(--line);border-radius:10px;background:#fff}
.field.two input{padding-right:84px}
.field input:focus{border-color:var(--ink)}
.icon{display:grid;place-items:center;width:40px;height:40px;border:0;background:transparent;border-radius:10px;cursor:pointer;color:var(--ink2);flex:none}
.icon:hover{background:var(--wash)}
.field .icon{position:absolute;right:2px;top:2px}
.field .icon.locate{right:42px}
.field .icon.armed{background:var(--ink);color:#fff}
.rm{width:32px;height:32px}

.sugg{position:fixed;z-index:1300;margin:0;padding:4px;list-style:none;max-height:45vh;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 20px rgba(20,38,43,.22)}
.sugg:empty{display:none}
.sugg li{padding:10px;border-radius:8px;cursor:pointer;font-size:.95rem}
.sugg li:hover,.sugg li:focus{background:var(--wash);outline:none}
.sugg li .n{display:block;font-weight:700}
.sugg li .s{display:block;font-size:.82rem;color:var(--ink2);margin-top:1px}
.sugg li.empty{color:var(--ink2);cursor:default}

.tools{margin:8px 0 0}
.tools .ghost{flex:1;height:38px}
.modes{display:flex;gap:4px;margin:10px 0 8px;padding:3px;background:var(--wash);border-radius:12px}
.modes button{flex:1;height:38px;border:0;border-radius:9px;background:transparent;cursor:pointer;font-size:.95rem}
.modes button[aria-checked="true"]{background:#fff;box-shadow:0 1px 3px rgba(20,38,43,.25);font-weight:700}

.row{display:flex;gap:8px}
.primary{flex:1;height:44px;border:0;border-radius:10px;background:var(--ink);color:#fff;font-weight:700;cursor:pointer}
.primary:hover{background:#0c1a1e}
.primary:disabled{opacity:.6;cursor:progress}
.ghost{height:44px;padding:0 14px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer}
.ghost:hover{background:var(--wash)}
.ghost[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}

.legend{display:flex;flex-wrap:wrap;gap:4px 14px;margin:10px 2px 0;font-size:.85rem;color:var(--ink2)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.sw{display:inline-block;width:22px;height:6px;border-radius:3px}
.sw.g{background:var(--path);opacity:.8;box-shadow:0 0 0 2px #fff,0 0 0 3px #b7c9c2}
.sw.b{background:var(--route);box-shadow:0 0 0 2px #fff,0 0 0 3px #b7c9c2}
.sw.p{background:repeating-linear-gradient(90deg,#d98a00 0 3px,#fff 3px 7px);box-shadow:0 0 0 1px #b7c9c2}
.sw.d{background:repeating-linear-gradient(90deg,var(--route) 0 5px,#fff 5px 9px);box-shadow:0 0 0 1px #b7c9c2}

.status{margin:8px 2px 0;font-size:.88rem;color:var(--ink2)}
.status.err{color:#b3261e}
.data{margin-top:6px;font-size:.88rem;color:var(--ink2)}
.data summary{cursor:pointer;padding:4px 2px}
.data p{margin:.3rem 0 .6rem}
.data .file{display:inline-block;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer;margin-right:6px}
.data input[type=file]{display:none}
.data .ghost{height:40px}

.sheet{left:10px;right:10px;bottom:max(10px,env(safe-area-inset-bottom));max-width:430px;overflow:hidden}
.sheet[hidden]{display:none}
.sheet-head{width:100%;display:grid;grid-template-columns:auto auto 1fr auto;gap:2px 12px;align-items:baseline;padding:12px 14px;border:0;background:transparent;text-align:left;cursor:pointer}
.time{font-size:1.5rem;font-weight:700}
.dist{font-size:1.05rem;color:var(--ink2)}
.onlink{grid-column:1 / 4;font-size:.9rem;color:var(--pathd)}
.chev{grid-row:1 / 3;grid-column:4;align-self:center;transition:transform .2s}
.sheet.open .chev{transform:rotate(180deg)}
.sheet-body{display:none;max-height:42vh;overflow:auto;padding:0 14px 12px;border-top:1px solid var(--line)}
.sheet.open .sheet-body{display:block}
.note{font-size:.9rem;color:var(--ink2);margin:10px 0}
.steps{list-style:none;margin:0;padding:0}
.steps li{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid var(--wash);cursor:pointer}
.steps li:last-child{border-bottom:0}
.steps li.hdr{cursor:default;font-weight:700;padding-top:14px;border-bottom:2px solid var(--line)}
.steps .d{margin-left:auto;white-space:nowrap;color:var(--ink2);font-size:.9rem}
.steps .link{color:var(--pathd);font-weight:700}
.steps .mk{flex:none;width:10px;height:10px;margin-top:7px;border-radius:50%;background:var(--route)}
.steps .link .mk{background:var(--path)}
.steps .hdr .mk{display:none}

.pin{width:30px;height:30px;border-radius:50%;border:3px solid #fff;color:#fff;display:grid;place-items:center;font-weight:700;box-shadow:0 2px 6px rgba(0,0,0,.45)}
.leaflet-popup-content{margin:8px}
.popup{display:flex;flex-direction:column;gap:6px;min-width:150px}
.popup button{height:40px;border:1px solid var(--line);border-radius:8px;background:#fff;cursor:pointer;font-size:.95rem}
.popup button:hover{background:var(--wash)}

/* Live location button, dot and off-route notice */
.locate-fab{position:fixed;z-index:1100;right:12px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + var(--sheet-h,0px) + 54px);
  width:56px;height:56px;border-radius:50%;border:1px solid var(--line);background:var(--panel);color:var(--ink);
  display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 20px rgba(20,38,43,.28)}
.locate-fab:hover{background:var(--wash)}
.locate-fab.on{color:var(--me,#7c3aed);border-color:var(--me,#7c3aed)}
.locate-fab.follow{background:var(--me,#7c3aed);color:#fff}
.me-dot{width:22px;height:22px;border-radius:50%;background:var(--me,#7c3aed);border:3px solid #fff;box-shadow:0 0 0 2px rgba(124,58,237,.35),0 2px 6px rgba(0,0,0,.4)}
.toast{position:fixed;z-index:1100;left:12px;right:80px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + var(--sheet-h,0px) + 54px);
  min-height:44px;display:flex;align-items:center;padding:10px 14px;border-radius:12px;background:var(--ink);color:#fff;font-weight:700;box-shadow:0 6px 20px rgba(20,38,43,.3)}
.toast[hidden]{display:none}
.maplibregl-canvas{outline:none}

@media (min-width:700px){
  .toast{left:460px;right:auto;max-width:360px;bottom:24px}
  .locate-fab{bottom:24px}
  .sheet{right:auto;width:430px}
  .leaflet-bottom{bottom:0!important}
}
@media (max-width:699px){
  .leaflet-control-zoom{display:none}
  .leaflet-bottom{bottom:var(--sheet-h,0px)}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

.stopdot{min-width:26px;height:26px;border-radius:13px;border:2px solid #fff;color:#fff;display:grid;place-items:center;font:700 .68rem/1 'Atkinson Hyperlegible',system-ui,sans-serif;box-shadow:0 1px 4px rgba(0,0,0,.5);padding:0 4px}
.stopdot.w{height:22px;border-radius:11px;font-size:.62rem}
.via-dot{width:26px;height:26px;border-radius:50%;background:#fff;border:5px solid #1a56db;box-shadow:0 2px 8px rgba(0,0,0,.5)}
.drag-hit{cursor:grab;touch-action:none}
.popup .pk{font-size:.85rem;color:var(--ink2)}
.stoptoggle{display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.stoptoggle input{width:18px;height:18px}
.kdot{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:10px;background:#0a6e36;color:#fff;font-size:.6rem;padding:0 3px}
.stopdot .rk{margin-left:5px;padding:1px 5px;border-radius:9px;background:#6d28d9;font-size:.62rem}
.stopdot.w{gap:0;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}

.layer-fab{position:fixed;z-index:1100;right:12px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + var(--sheet-h,0px) + 54px + 66px);
  min-width:56px;height:44px;padding:0 14px;border-radius:22px;border:1px solid var(--line);background:var(--panel);color:var(--ink);font-weight:700;cursor:pointer;box-shadow:0 6px 20px rgba(20,38,43,.28)}
.layer-fab:hover{background:var(--wash)}
.layer-fab[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
@media (min-width:700px){.layer-fab{bottom:90px}}

/* Brand */
.logo{flex:none;display:block;border-radius:11px;box-shadow:0 1px 4px rgba(10,110,54,.35)}
.brand{flex:1;min-width:0;line-height:1.15}
.brand h1{font-size:1.1rem;letter-spacing:.1px}
.brand .tag{margin:1px 0 0;font-size:.78rem;color:var(--ink2)}
.panel.collapsed .brand .tag{display:none}
.icon.tour{color:var(--pathd)}

/* Tour */
.tour-block{position:fixed;inset:0;z-index:2000;background:transparent}
.tour-hole{position:fixed;z-index:2001;border-radius:12px;box-shadow:0 0 0 9999px rgba(10,22,26,.66);border:3px solid #ffb020;pointer-events:none;transition:all .25s ease}
.tour-hole.none{border-color:transparent;width:0!important;height:0!important}
.tour-card{position:fixed;z-index:2002;width:min(340px,calc(100vw - 24px));background:#fff;border-radius:16px;padding:16px 16px 12px;box-shadow:0 12px 40px rgba(0,0,0,.45);color:var(--ink)}
.tour-card h2{margin:0 0 6px;font-size:1.12rem}
.tour-card p{margin:0 0 8px;font-size:.98rem;line-height:1.45}
.tour-card .tip{font-size:.88rem;color:var(--ink2);background:var(--wash);padding:8px 10px;border-radius:10px}
.tour-nav{display:flex;align-items:center;gap:8px;margin-top:10px}
.tour-dots{flex:1;display:flex;gap:4px;flex-wrap:nowrap;min-width:0}
.tour-dots i{flex:none;width:6px;height:6px;border-radius:50%;background:#cbd8d4}
.tour-dots i.on{background:var(--path);transform:scale(1.25)}
.tour-card button{height:42px;padding:0 16px;border-radius:10px;border:1px solid var(--line);background:#fff;font-weight:700;cursor:pointer}
.tour-card button.next{background:var(--ink);color:#fff;border-color:var(--ink)}
.tour-card .skip{border:0;background:transparent;color:var(--ink2);font-weight:400;padding:0 8px;text-decoration:underline}
.tour-card .tour-logo{display:block;margin:0 auto 8px}

.beta{display:inline-block;vertical-align:middle;margin-left:4px;padding:1px 6px;border-radius:6px;background:#ffb020;color:#3b2a00;font-size:.62rem;font-weight:700;letter-spacing:.6px}
.fb{margin:8px 2px 0;font-size:.9rem}
.fb a{color:var(--pathd);font-weight:700}
@media (display-mode: standalone){body{overscroll-behavior:none}}
.ghost.danger{color:#b3261e;border-color:#e5c3bf}
.ghost.danger:hover{background:#fdecea}

.credits-fab{position:fixed;z-index:1000;left:8px;bottom:calc(max(8px,env(safe-area-inset-bottom)) + var(--sheet-h,0px));padding:4px 10px;border-radius:14px;background:rgba(255,255,255,.88);color:var(--ink2);font-size:.78rem;text-decoration:none;border:1px solid rgba(0,0,0,.12);box-shadow:0 1px 4px rgba(0,0,0,.18)}
.credits-fab:hover{color:var(--ink);background:#fff}
@media (min-width:700px){.credits-fab{bottom:8px}}


/* ===== California modern: warm sand surfaces, palm-green ink, sunset stripe, terracotta action ===== */
body{letter-spacing:.005em}
.panel,.sheet{background:var(--panel);border:1px solid var(--line);border-radius:22px;
  box-shadow:0 14px 36px rgba(15,53,48,.20),0 2px 6px rgba(15,53,48,.10)}
.panel{padding:16px 14px 12px;background:var(--stripe) top left/100% 5px no-repeat,var(--panel)}
.sheet{background:var(--stripe) top left/100% 4px no-repeat,var(--panel)}
.sheet-head{padding-top:16px}
.logo{border-radius:12px;box-shadow:none;filter:drop-shadow(0 2px 4px rgba(15,53,48,.28))}
.brand h1{font-size:1.18rem;font-weight:700;letter-spacing:-.005em}
.brand .tag{color:var(--terrad);font-weight:700;font-size:.8rem;letter-spacing:.02em}
.beta{background:var(--sun);color:#3b2a00;border-radius:999px;padding:1px 8px}
.field input{border-radius:14px;background:#fff;border-color:var(--line)}
.field input:focus{border-color:var(--skyd);box-shadow:0 0 0 3px rgba(56,176,196,.25);outline:none}
.icon:hover{background:var(--sand)}
.icon.tour{color:var(--skyd)}
.modes{border-radius:999px;background:var(--sand);padding:4px}
.modes button{border-radius:999px;color:var(--ink2)}
.modes button[aria-checked="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(15,53,48,.28),inset 0 -3px 0 var(--sky)}
.primary{border-radius:999px;background:var(--terra);color:#fff;letter-spacing:.02em;box-shadow:0 4px 12px rgba(185,71,28,.35)}
.primary:hover{background:var(--terrad)}
.ghost{border-radius:999px;background:#fff;border-color:var(--line)}
.ghost:hover{background:var(--sand)}
.ghost[aria-pressed="true"]{background:var(--ink)}
.ghost.danger{color:#a8281f;border-color:#ecc9c0}
.ghost.danger:hover{background:#fdeae4}
.sugg{border-radius:16px;background:var(--panel);border-color:var(--line)}
.sugg li:hover,.sugg li:focus{background:var(--sand)}
.steps li{border-bottom-color:var(--sand)}
.steps li.hdr{border-bottom-color:var(--line)}
.sheet-body{border-top-color:var(--line)}
.time{color:var(--ink);letter-spacing:-.01em}
.locate-fab,.layer-fab{background:var(--panel);border-color:var(--line)}
.locate-fab:hover,.layer-fab:hover{background:var(--sand)}
.layer-fab[aria-pressed="true"]{background:var(--ink);color:#fff}
.credits-fab{background:rgba(255,250,240,.92);border-color:var(--line);color:var(--ink2)}
.toast{background:var(--ink);border-radius:16px}
.popup button{border-radius:12px;background:var(--panel)}
.popup button:hover{background:var(--sand)}
.status{color:var(--ink2)}
.tour-hole{border-color:var(--sun)}
.tour-card{background:var(--panel);border-radius:22px}
.tour-card button{border-radius:999px;background:#fff}
.tour-card button.next{background:var(--terra);border-color:var(--terra);color:#fff}
.tour-card .tip{background:var(--sand)}
.tour-dots i{background:#e0d3b6}
.tour-dots i.on{background:var(--terra)}
.leaflet-container{font-family:inherit}


/* Reshape the route by dragging */
.leaflet-container{touch-action:none}
.via-icon{display:grid;place-items:center;cursor:grab;touch-action:none}
.via-handle{width:18px;height:18px;border-radius:50%;background:#fff;border:5px solid var(--route);box-shadow:0 2px 6px rgba(0,0,0,.45)}
.via-icon:hover .via-handle{transform:scale(1.15)}
.reshape{position:fixed;z-index:1100;left:12px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + var(--sheet-h,0px) + 112px);
  display:flex;align-items:center;gap:4px;max-width:calc(100vw - 90px);padding:4px 6px 4px 14px;border-radius:999px;background:var(--ink);color:#fff;font-weight:700;font-size:.92rem;box-shadow:0 6px 20px rgba(15,53,48,.3)}
.reshape[hidden]{display:none}
.reshape button{height:38px;padding:0 12px;border:0;border-radius:999px;background:transparent;color:var(--sun);font-weight:700;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.reshape button:hover{background:rgba(255,255,255,.12)}
@media (min-width:700px){.reshape{left:460px;bottom:84px}}


/* Saved places */
.field input{padding-right:84px}
.field.two input{padding-right:124px}
.field .icon.starbtn{right:42px}
.field.two .icon.starbtn{right:82px}
.starbtn{color:var(--ink2)}
.starbtn.on{color:#d98a00}
.starbtn:disabled{opacity:.35;cursor:default}
.savedbar{display:flex;align-items:center;gap:8px;margin:2px -2px 10px 0;padding:0 2px 4px 0;overflow-x:auto;white-space:nowrap;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.savedbar::-webkit-scrollbar{display:none}
.savedbar[hidden]{display:none}
.sb-label{display:inline-flex;align-items:center;gap:4px;flex:none;color:#a86e00;font-weight:700;font-size:.85rem}
.chip{flex:none;height:40px;padding:0 16px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font-weight:700;cursor:pointer;max-width:200px;overflow:hidden;text-overflow:ellipsis}
.chip:hover{background:var(--sand)}
.sugg li.sv{padding-right:64px;position:relative}
.sugg li .ed{position:absolute;right:6px;top:50%;transform:translateY(-50%);height:36px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink2);font-size:.85rem;cursor:pointer}
.dlg{position:fixed;inset:0;z-index:1900;display:grid;place-items:center;padding:16px;background:rgba(15,53,48,.5)}
.dlg[hidden]{display:none}
.dlg-card{width:min(380px,100%);background:var(--panel);border-radius:22px;padding:18px 18px 14px;box-shadow:0 18px 50px rgba(0,0,0,.4);background-image:var(--stripe);background-repeat:no-repeat;background-size:100% 5px}
.dlg-card h2{margin:4px 0 2px;font-size:1.2rem}
.dlg-sub{margin:0 0 12px;color:var(--ink2);font-size:.9rem;overflow-wrap:anywhere}
.dlg-card label{display:block;font-weight:700;font-size:.9rem;margin-bottom:4px}
.dlg-card input{width:100%;height:46px;padding:0 14px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:1rem}
.dlg-card input:focus{border-color:var(--skyd);box-shadow:0 0 0 3px rgba(56,176,196,.25);outline:none}
.dlg-chips{display:flex;gap:8px;margin:10px 0 4px}
.dlg-chips button{height:38px;padding:0 16px;border:1px solid var(--line);border-radius:999px;background:#fff;font-weight:700;cursor:pointer}
.dlg-chips button:hover{background:var(--sand)}
.dlg-note{margin:6px 0 12px;font-size:.82rem;color:var(--ink2)}
.dlg-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.dlg-actions button{height:44px;padding:0 18px;border-radius:999px;border:1px solid var(--line);background:#fff;font-weight:700;cursor:pointer}
.dlg-actions .primary{flex:none;background:var(--terra);color:#fff;border:0}
.dlg-actions .danger{color:#a8281f;margin-right:auto}

/* ===================== Accounts, friends, trip sharing, saved routes (v19) ===================== */
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pdot{display:inline-grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:var(--c);color:var(--t,#fff);font-weight:700;font-size:14px;line-height:1;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.18)}
.icon.acct{position:relative;color:var(--ink)}
.icon.acct .av{display:grid;place-items:center}
.icon.acct[hidden]{display:none}
.icon.acct.has-req::after{content:"";position:absolute;top:5px;right:5px;width:11px;height:11px;border-radius:50%;background:var(--terra);border:2px solid var(--panel)}

/* route card: save + share next to the summary */
.sheet-top{display:flex;align-items:stretch}
.sheet-top .sheet-head{flex:1;min-width:0}
.sheet-acts{display:flex;align-items:center;gap:2px;padding:8px 8px 0 0}
.sheet-acts .icon{width:44px;height:44px;color:var(--ink)}
.sheet-acts .icon[hidden]{display:none}

/* map buttons: friends sits above the satellite button */
.people-fab{position:fixed;z-index:1100;right:12px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + var(--sheet-h,0px) + 54px + 132px);
  width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background:var(--panel);color:var(--ink);border:1px solid var(--line);box-shadow:0 3px 10px rgba(0,0,0,.25);cursor:pointer}
.people-fab[hidden]{display:none}
.people-fab:hover{background:var(--sand)}
.people-fab.on{background:var(--me,#7c3aed);color:#fff;border-color:transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--me,#7c3aed) 30%,transparent),0 3px 10px rgba(0,0,0,.25)}
.pf-badge{position:absolute;top:-3px;right:-3px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--terra);color:#fff;font-size:.8rem;font-weight:700;display:grid;place-items:center;border:2px solid #fff}
.pf-badge[hidden]{display:none}
.share-pill{position:fixed;z-index:1100;right:74px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + var(--sheet-h,0px) + 54px + 132px + 8px);height:38px;padding:0 14px;border-radius:999px;border:0;background:var(--ink);color:#fff;font-weight:700;font-size:.9rem;cursor:pointer;box-shadow:0 3px 10px rgba(0,0,0,.25)}
.share-pill[hidden]{display:none}
.share-pill::before{content:"";display:inline-block;width:9px;height:9px;margin-right:8px;border-radius:50%;background:#4ade80;vertical-align:1px;animation:cvpulse 1.6s ease-out infinite}
@keyframes cvpulse{0%{box-shadow:0 0 0 0 rgba(74,222,128,.7)}100%{box-shadow:0 0 0 9px rgba(74,222,128,0)}}
@media (min-width:700px){.people-fab{bottom:156px}.share-pill{bottom:164px}}

/* friends on the map */
.fr-icon{background:none;border:0}
.fr-pin{width:34px;height:34px;border-radius:50%;background:var(--c);color:var(--t,#fff);display:grid;place-items:center;font-weight:700;font-size:16px;border:3px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.45)}
.fr-name{position:absolute;top:36px;left:50%;transform:translateX(-50%);white-space:nowrap;max-width:140px;overflow:hidden;text-overflow:ellipsis;padding:1px 8px;border-radius:9px;background:rgba(255,250,240,.95);color:var(--ink);font-size:12px;font-weight:700;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.fr-icon.stale{opacity:.55}
.fr-icon.stale .fr-pin{border-style:dashed}
.fr-pop{display:flex;flex-direction:column;gap:4px;min-width:150px}
.fr-pop small{color:var(--ink2)}

/* dialog: bottom sheet on phones, centered card on wider screens */
.sdlg{z-index:1950}
.dlg-card.big{width:min(460px,100%);max-height:min(86vh,760px);overflow:auto;overscroll-behavior:contain;outline:none;padding:16px 18px 18px}
@media (max-width:699px){
  .sdlg{place-items:end stretch;padding:0}
  .dlg-card.big{width:100%;max-height:90vh;border-radius:22px 22px 0 0;padding-bottom:calc(18px + env(safe-area-inset-bottom))}
}
.s-head{display:flex;align-items:center;gap:6px;margin:4px 0 4px}
.s-head h2{flex:1;margin:0;font-size:1.2rem;overflow-wrap:anywhere}
.s-head .icon{width:44px;height:44px;margin:-6px}
.s-head .s-back{margin-right:0}
.s-me{flex:1;display:flex;align-items:center;gap:10px;min-width:0}
.s-me h2{font-size:1.25rem}
.sdlg h3{margin:18px 0 8px;font-size:1rem}
.sdlg h3 small{font-weight:400;color:var(--ink2)}
.sdlg label{display:block;font-weight:700;font-size:.92rem;margin:12px 0 4px}
.sdlg input:not([type=checkbox]):not([type=radio]){width:100%;height:48px;padding:0 14px;border:1px solid var(--line);border-radius:14px;background:#fff;font:inherit;font-size:1rem;color:var(--ink)}
.sdlg input:focus{border-color:var(--skyd);box-shadow:0 0 0 3px rgba(56,176,196,.25);outline:none}
.sdlg input[readonly]{background:var(--wash)}
.s-hint{margin:4px 0 0;font-size:.85rem;color:var(--ink2);line-height:1.4}
.s-note{margin:14px 0 0;font-size:.9rem;color:var(--ink2)}
.s-empty{margin:4px 0;padding:12px 14px;border-radius:14px;background:var(--wash);color:var(--ink2);font-size:.92rem;line-height:1.45}
.s-big{font-size:1.05rem;line-height:1.5}
.s-banner{margin:8px 0;padding:10px 12px;border-radius:14px;background:#fff4d6;border:1px solid #f2d68a;font-size:.92rem}
.s-msg{margin:10px 0 0;font-size:.92rem;min-height:0}
.s-msg:empty{display:none}
.s-msg.err{color:#a8281f;background:#fdeae4;padding:9px 12px;border-radius:12px}
.s-msg.ok{color:#0a6e36;background:#e3f4e8;padding:9px 12px;border-radius:12px}
.s-row{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap;align-items:center}
.s-row.end{justify-content:flex-end}
.s-row input{flex:1;min-width:0}
.s-btn{height:46px;padding:0 18px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--ink);font:inherit;font-weight:700;cursor:pointer}
.s-btn:hover{background:var(--sand)}
.s-btn.primary{background:var(--terra);border-color:var(--terra);color:#fff;box-shadow:0 3px 10px rgba(185,71,28,.3)}
.s-btn.primary:hover{background:var(--terrad)}
.s-btn.danger{color:#fff;background:#b3261e;border-color:#b3261e}
.s-btn.wide{width:100%;margin-top:14px}
.s-btn.sm{height:38px;padding:0 13px;font-size:.88rem}
.s-btn.ghosty{border-color:transparent;background:transparent;color:var(--ink2);text-decoration:underline;text-underline-offset:3px}
.s-btn.ghosty.danger{color:#fff;background:#b3261e;text-decoration:none}
.s-btn:disabled{opacity:.6;cursor:progress}
.s-link{border:0;background:none;padding:6px 2px;color:var(--skyd);font:inherit;font-weight:700;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.s-alt{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;margin-top:12px;font-size:.92rem;align-items:center}
.pw{position:relative}
.pw input{padding-right:70px!important}
.pw-eye{position:absolute;right:4px;top:4px;height:40px;padding:0 12px;border:0;border-radius:10px;background:transparent;color:var(--skyd);font:inherit;font-weight:700;cursor:pointer}
.s-check{display:flex!important;gap:10px;align-items:flex-start;font-weight:400!important;font-size:.92rem!important;line-height:1.4;margin:14px 0 0!important;cursor:pointer}
.s-check input{width:22px;height:22px;flex:none;margin:0;accent-color:var(--terra)}
.s-fs{border:0;padding:0;margin:14px 0 0}
.s-fs legend{font-weight:700;font-size:.92rem;padding:0}
.swatches{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.sw-pick{margin:0!important;cursor:pointer;position:relative}
.sw-pick input{position:absolute;opacity:0;width:44px;height:44px;margin:0}
.sw-pick span{display:block;width:44px;height:44px;border-radius:50%;background:var(--c);border:3px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.2)}
.sw-pick input:checked+span{box-shadow:0 0 0 3px var(--ink)}
.sw-pick input:checked+span::after{content:"";display:block;width:12px;height:20px;margin:7px auto 0;border:solid #fff;border-width:0 4px 4px 0;transform:rotate(45deg)}
.sw-pick input[value="#eab308"]:checked+span::after{border-color:#1d1a10}
.sw-pick input:focus-visible+span{outline:3px solid var(--skyd);outline-offset:3px}
.s-tabs{display:flex;gap:4px;margin:10px 0 4px;padding:4px;border-radius:999px;background:var(--wash)}
.s-tabs button{flex:1;height:42px;border:0;border-radius:999px;background:transparent;font:inherit;font-weight:700;color:var(--ink2);cursor:pointer}
.s-tabs button[aria-selected="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 4px rgba(0,0,0,.12)}
.s-tabs .cnt{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--terra);color:#fff;font-size:.75rem}
.s-list{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:16px;background:#fff;overflow:hidden}
.s-list>li+li{border-top:1px solid var(--line)}
.s-item{display:flex;align-items:center;gap:10px;padding:10px 12px;flex-wrap:wrap}
.s-name{flex:1;min-width:120px;display:flex;flex-direction:column}
.s-name small,.s-open small{color:var(--ink2);font-size:.84rem}
.s-acts{display:flex;gap:6px;flex-wrap:wrap}
.s-route{padding:6px 8px 10px}
.s-open{display:flex;flex-direction:column;width:100%;text-align:left;border:0;background:none;padding:8px 6px;border-radius:12px;font:inherit;color:var(--ink);cursor:pointer}
.s-open:hover{background:var(--wash)}
.s-open b{overflow-wrap:anywhere}
.s-route .s-acts{padding:0 4px}
.s-box{padding:14px;border-radius:16px;background:var(--wash)}
.s-box .s-btn.wide{margin-top:8px}
.s-first{margin:0}
.s-label{margin:0;font-size:.85rem;color:var(--ink2);font-weight:700}
.s-code{margin:2px 0 4px;font-size:2rem;font-weight:700;letter-spacing:.18em;font-variant-numeric:tabular-nums}
.s-inline{margin-top:6px}
.s-inline .s-row{margin-top:0;flex-wrap:nowrap}
.s-picks{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.s-pick{display:flex!important;align-items:center;gap:10px;margin:0!important;padding:8px 12px;min-height:52px;border:1px solid var(--line);border-radius:14px;background:#fff;cursor:pointer;font-weight:700}
.s-pick>span:not(.pdot){flex:1}
.s-pick input{width:24px;height:24px;margin:0;accent-color:var(--terra)}
.s-pick:has(input:checked){border-color:var(--terra);background:#fff4ee}
.s-seg{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:4px;border-radius:16px;background:var(--wash)}
.s-seg label{margin:0!important;position:relative}
.s-seg input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.s-seg span{display:grid;place-items:center;height:44px;border-radius:12px;font-weight:700;font-size:.9rem;text-align:center;cursor:pointer;color:var(--ink2)}
.s-seg input:checked+span{background:#fff;color:var(--ink);box-shadow:0 1px 4px rgba(0,0,0,.12)}
.s-seg input:focus-visible+span{outline:3px solid var(--skyd)}
.s-live{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;border-radius:16px;background:#e3f4e8;margin-top:6px}
.s-live p{margin:0;line-height:1.45}
.s-pulse{flex:none;width:12px;height:12px;margin-top:6px;border-radius:50%;background:#16a34a;animation:cvpulse 1.6s ease-out infinite}
.s-dl{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:16px 0 0;font-size:.95rem}
.s-dl dt{color:var(--ink2)}
.s-dl dd{margin:0;overflow-wrap:anywhere}
.s-dl small{color:var(--ink2)}
.s-color .swatches{margin-top:4px}
.s-danger{margin-top:22px;padding-top:10px;border-top:1px solid var(--line)}
.s-danger summary{cursor:pointer;color:#a8281f;font-weight:700;padding:8px 0;min-height:44px;display:flex;align-items:center}
@media (prefers-reduced-motion:reduce){.share-pill::before,.s-pulse{animation:none}}
