/* ScoutTract Party tracking — navy #1F2A44, copper #B87333 */
.pt-dialog{width:min(760px,96vw);max-height:94vh;padding:0;border:0;border-radius:14px;box-shadow:0 18px 60px rgba(15,23,42,.35);color:#1F2A44;background:#fff;overflow:hidden}
.pt-dialog[open]{display:flex;flex-direction:column}
.pt-dialog::backdrop{background:rgba(15,23,42,.45)}
.pt-head{display:flex;align-items:center;gap:10px;padding:10px 14px;background:#1F2A44;color:#fff;flex-wrap:wrap}
.pt-head h3{margin:0;font-size:17px;color:#fff;white-space:nowrap}
.pt-tabs{display:flex;gap:4px;flex:1;flex-wrap:wrap}
.pt-tabs button{background:transparent;border:0;color:#cfd8e8;padding:7px 11px;border-radius:8px;font-weight:600;cursor:pointer;min-height:36px;max-width:16em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pt-tabs button[aria-selected=true]{background:#B87333;color:#fff}
.pt-x{background:transparent;border:0;color:#fff;font-size:18px;cursor:pointer;min-width:40px;min-height:40px}
.pt-body{padding:12px 14px;overflow:auto;flex:1;min-height:160px}
.pt-body h4{margin:16px 0 6px;font-size:14px;color:#1F2A44;border-bottom:2px solid #B87333;padding-bottom:3px}
.pt-msg{margin:0;padding:6px 14px;font-size:13px;min-height:1.6em;border-top:1px solid #e3e7ee}
.pt-msg.bad,.pt-bad{color:#b42318}
.pt-muted{color:#667085;font-size:12.5px}
.pt-note-p{background:#fff4e5;padding:8px;border-radius:8px}
.pt-empty{padding:20px;text-align:center;background:#f8f9fb;border-radius:10px}
.pt-form{display:flex;flex-direction:column;gap:10px}
.pt-form label{display:flex;flex-direction:column;gap:4px;font-weight:600;font-size:13.5px}
.pt-form input,.pt-form select,.pt-row input{min-height:40px;font-size:16px;padding:6px 10px;border:1px solid #c9d1de;border-radius:8px}
.pt-chk{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;font-weight:500!important;font-size:13.5px;margin:6px 0}
.pt-chk input{width:20px;height:20px;min-height:0}
.pt-chk select{min-height:30px;padding:2px 6px}
.pt-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:6px 0}
.pt-row input{flex:1;min-width:10em}
.pt-danger{margin-top:18px;padding-top:10px;border-top:1px solid #e3e7ee}
.pt-dialog button.danger,.pt-hud button.danger{background:#b42318;color:#fff;border:0;border-radius:8px;padding:8px 14px;font-weight:700;min-height:40px;cursor:pointer}
.pt-list,.pt-members{list-style:none;margin:0;padding:0}
.pt-list li,.pt-members li{display:flex;align-items:center;gap:10px;padding:9px 6px;border-bottom:1px solid #eef0f4}
.pt-list li>div,.pt-members li>div{flex:1;min-width:0}
.pt-list li.on{background:#fbf4ee;border-radius:8px}
.pt-tag{background:#1F2A44;color:#fff;font-size:10.5px;padding:1px 7px;border-radius:999px;font-weight:700;vertical-align:middle}
.pt-live{color:#B87333}
.pt-on{color:#16a34a;font-size:11px}
.pt-dot{display:inline-block;width:14px;height:14px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #1F2A44;flex:none}
.pt-dot.stale{opacity:.65}.pt-dot.old,.pt-dot.none{opacity:.35}
.pt-acts{display:flex;gap:4px}
.pt-sum{display:flex;gap:10px;align-items:center;background:#f4f6fa;border-radius:10px;padding:10px}
.pt-share{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:10px 0;padding:10px 12px;border-radius:10px;background:#f4f6fa;border:1px solid #d6dbe4}
.pt-share.on{background:#fbf4ee;border-color:#B87333}
.pt-invite{display:flex;gap:14px;align-items:flex-start;flex-wrap:wrap}
.pt-invite>div:last-child{flex:1;min-width:220px}
.pt-invite input{width:100%;box-sizing:border-box;font-size:13px!important}
.pt-qr{width:150px;height:150px;background:#fff;border:1px solid #e3e7ee;border-radius:8px;padding:6px;box-sizing:border-box}
.pt-qr svg{width:100%;height:100%}
.pt-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
.pt-tbl{border-collapse:collapse;width:100%;font-size:12.5px}
.pt-tbl th{background:#f1f3f7;text-align:left;padding:5px}
.pt-tbl td{padding:4px 5px;border-top:1px solid #e7eaf0}
.pt-help p{line-height:1.45}
.pt-bul{padding-left:18px;line-height:1.45}
.pt-join{width:min(460px,94vw)}
.pt-join form{padding:16px}
.pt-join h3{margin:0}

/* ---- map HUD ---- */
.pt-hud{position:fixed;z-index:880;left:50%;transform:translateX(-50%);bottom:22px;width:min(520px,calc(100vw - 20px));display:flex;flex-direction:column;gap:6px;pointer-events:none;font:14px system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:#1F2A44}
.pt-hud.mobile{bottom:calc(env(safe-area-inset-bottom,0px) + 74px)}
.pt-hud>*{pointer-events:auto}
.pt-banner{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 6px 6px 12px;border-radius:999px;box-shadow:0 4px 16px rgba(15,23,42,.25);font-size:13px}
.pt-banner span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pt-banner.on{background:#B87333;color:#fff}
.pt-banner.off{background:#fff;color:#1F2A44;border:1px solid #d6dbe4}
.pt-banner.offline::after{content:"offline · retrying";font-size:11px;background:#1F2A44;color:#fff;border-radius:999px;padding:2px 7px;margin-left:auto}
.pt-banner button{flex:none;border:0;border-radius:999px;padding:7px 16px;font-weight:800;min-height:36px;cursor:pointer}
.pt-banner.on button{background:#fff;color:#b42318}
.pt-banner.off button{background:#B87333;color:#fff}
.pt-strip{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:2px}
.pt-strip button{display:inline-flex;align-items:center;gap:5px;flex:none;background:#fff;border:1px solid #d6dbe4;border-radius:999px;padding:4px 10px 4px 6px;font-size:12.5px;font-weight:600;color:#1F2A44;box-shadow:0 2px 8px rgba(15,23,42,.15);cursor:pointer;min-height:32px}
.pt-strip button.none{opacity:.6}
.pt-strip button.talking{border-color:#B87333;box-shadow:0 0 0 3px rgba(184,115,51,.45)}
.pt-ctl{display:flex;align-items:center;justify-content:center;gap:8px}
.pt-round{position:relative;width:48px;height:48px;border-radius:50%;border:1px solid #d6dbe4;background:#fff;font-size:20px;box-shadow:0 3px 12px rgba(15,23,42,.25);cursor:pointer;flex:none}
.pt-round.on{background:#1F2A44;color:#fff}
.pt-round i{position:absolute;top:4px;right:4px;width:10px;height:10px;border-radius:50%;background:#b42318}
.pt-talk{flex:1 1 auto;min-width:0;max-width:260px;height:60px;border-radius:999px;border:0;background:#1F2A44;color:#fff;font-weight:800;font-size:15px;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 18px rgba(15,23,42,.35);cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.pt-talk .pt-ico{font-size:22px}
.pt-talk .pt-tl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pt-talk.rec{background:#b42318;animation:ptPulse 1s infinite}
.pt-talk.busy{background:#B87333}
.pt-talk.priv{background:#1F2A44;box-shadow:0 0 0 3px #B87333,0 4px 18px rgba(15,23,42,.35)}
.pt-talk.rec.priv{background:#b42318;box-shadow:0 0 0 3px #B87333}
.pt-talk.to-me{background:#B87333;box-shadow:0 0 0 3px #1F2A44}
/* push-to-talk target chip ("👥 All" / "● Name") + its picker */
.pt-torow{display:flex;align-items:center;gap:6px;min-width:0}
.pt-torow .pt-strip{flex:1 1 auto;min-width:0}
.pt-to{flex:none;display:inline-flex;align-items:center;gap:4px;height:34px;max-width:120px;padding:0 10px 0 8px;border-radius:999px;border:1px solid #1F2A44;background:#fff;color:#1F2A44;font-weight:700;font-size:13px;box-shadow:0 2px 8px rgba(15,23,42,.2);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pt-to i{font-style:normal;font-size:10px;color:#667085}
.pt-to.priv{border:2px solid #B87333;background:#fbf4ee;color:#8a5426}
.pt-to .pt-dot{width:11px;height:11px}
.pt-tomenu{display:flex;flex-direction:column;gap:4px;background:#fff;border-radius:12px;box-shadow:0 6px 24px rgba(15,23,42,.3);padding:10px 12px;max-height:50vh;overflow:auto}
.pt-tomenu>b{font-size:13px;color:#1F2A44}
.pt-tomenu button{display:flex;align-items:center;gap:8px;min-height:44px;border:2px solid transparent;border-radius:10px;background:#f4f6fa;padding:4px 10px;font-size:15px;font-weight:600;color:#1F2A44;text-align:left;cursor:pointer}
.pt-tomenu button small{margin-left:auto;font-weight:400;color:#667085;font-size:12px}
.pt-tomenu button.on{border-color:#B87333;background:#fbf4ee}
.pt-tomenu .pt-to-ic{width:14px;text-align:center}
.pt-tomenu p{margin:4px 0 0}
@keyframes ptPulse{0%,100%{box-shadow:0 0 0 0 rgba(180,35,24,.6)}50%{box-shadow:0 0 0 12px rgba(180,35,24,0)}}
.pt-note,.pt-meas{align-self:center;background:#1F2A44;color:#fff;border-radius:10px;padding:6px 12px;font-size:13px;box-shadow:0 3px 12px rgba(15,23,42,.3)}
.pt-meas{background:#fff;color:#1F2A44;border:2px solid #B87333;font-weight:700}
.pt-clips{background:#fff;border-radius:12px;box-shadow:0 6px 24px rgba(15,23,42,.3);padding:8px 12px;max-height:40vh;overflow:auto}
.pt-clips ul{list-style:none;margin:0;padding:0}
.pt-clips li{display:flex;align-items:center;gap:8px;padding:5px 0;border-bottom:1px solid #eef0f4}
.pt-clips li small{flex:1;color:#667085}
.pt-vol{display:flex;align-items:center;gap:6px;margin-left:auto;font-size:12px}
.pt-pinmenu{background:#fff;border-radius:12px;box-shadow:0 6px 24px rgba(15,23,42,.3);padding:10px 12px}
.pt-pinmenu input{width:100%;box-sizing:border-box;min-height:38px;font-size:16px;border:1px solid #c9d1de;border-radius:8px;padding:4px 8px;margin-top:6px}
.pt-pinkinds{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:6px}
.pt-pinkinds button{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:20px;background:#f4f6fa;border:2px solid transparent;border-radius:10px;padding:6px 2px;cursor:pointer}
.pt-pinkinds button small{font-size:11px;color:#1F2A44}
.pt-pinkinds button.on{border-color:#B87333;background:#fbf4ee}
.pt-popup .maplibregl-popup-content{border-radius:10px;padding:10px 12px}
.pt-pop{font-size:13px;color:#1F2A44}
.pt-pop small{display:block;color:#667085;margin-top:2px}
.pt-big{font-size:17px;font-weight:800;color:#B87333;margin:4px 0 2px}
.pt-btn{display:inline-flex;align-items:center;text-decoration:none;border-radius:8px;padding:5px 10px}
.pt-hud.tuck .pt-torow,.pt-hud.tuck .pt-strip,.pt-hud.tuck .pt-ctl,.pt-hud.tuck .pt-clips{display:none}
.pt-hud.mobile{left:8px;transform:none;width:calc(100vw - 88px)}
.pt-hud.mobile .pt-ctl{gap:4px;justify-content:flex-start}
.pt-hud.mobile .pt-round{width:40px;height:40px;font-size:17px}
.pt-hud.mobile .pt-banner{font-size:12px;border-radius:18px;line-height:1.25}
.pt-hud.mobile .pt-banner span{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-width:0}
.pt-hud.mobile .pt-talk{height:54px;font-size:13px;padding:0 6px;gap:3px}
.pt-hud.mobile .pt-talk .pt-ico{font-size:19px}
@media (max-width:700px){
  .pt-head{flex-wrap:nowrap;padding:8px 6px 8px 12px;gap:6px}
  .pt-head h3{display:none}
  .pt-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .pt-tabs button{flex:none;max-width:12em}
  .pt-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0}
  .pt-tabs button{padding:6px 8px;font-size:13px}
}
.pt-dialog .pt-body button.ghost{background:#fff;color:#1F2A44;border:1px solid #c9d1de;border-radius:8px;padding:5px 10px;font-weight:600;cursor:pointer;opacity:1}
.pt-dialog .pt-body button.ghost:hover{border-color:#B87333;color:#B87333}
@media (max-width:379px){.pt-hud.mobile .pt-talk .pt-tl{display:none}.pt-hud.mobile .pt-talk .pt-ico{font-size:22px}}   /* narrow phones: SOS shares the row, keep the mic icon only */

/* last known position (member offline / stopped sharing) */
.pt-strip button.offline{opacity:.7;background:#f1f3f6}.pt-strip button.offline .pt-dot{filter:grayscale(1)}
.pt-pop .pt-off{display:inline-block;font-size:11px;font-weight:700;color:#fff;background:#8a94a6;border-radius:999px;padding:1px 7px;vertical-align:1px}
.pt-pop .pt-last{margin:4px 0 2px;font-size:13px;font-weight:600;color:#1F2A44}

/* voice / mic error toast: above map, HUD and the chat sheet */
.pt-toast{position:fixed;left:0;right:0;margin:0 auto;width:max-content;top:calc(env(safe-area-inset-top,0px) + 64px);z-index:100000;max-width:min(92vw,460px);background:#1F2A44;color:#fff;border:2px solid #B87333;border-radius:12px;padding:10px 14px;font-size:14px;line-height:1.35;box-shadow:0 6px 24px rgba(15,23,42,.45);cursor:pointer}
.pt-toast[hidden]{display:none}
/* sharing banner = slim strip docked under the top bar, OFF the map: body.pt-sharebar-on grows the top bar by the
   strip height (phone --ga-top incl. the status-bar inset, desktop --stw-top), so the map canvas starts below it */
:root{--pt-sb-h:0px}
body.pt-sharebar-on{--pt-sb-h:36px}
body.ga-mobile.pt-sharebar-on{--ga-top:calc(54px + var(--st-sat,0px) + var(--pt-sb-h))}
body.ga-mobile.pt-sharebar-on .topbar{padding-bottom:var(--pt-sb-h)}
body.st-wm.pt-sharebar-on{--stw-top:calc(48px + var(--pt-sb-h))}
body.st-wm.pt-sharebar-on .topbar{padding-bottom:var(--pt-sb-h);box-sizing:border-box}
.pt-banner.pt-sharebar{position:fixed;z-index:61;left:0;right:0;top:0;height:var(--pt-sb-h,36px);margin:0;padding:2px max(6px,env(safe-area-inset-right)) 2px max(12px,env(safe-area-inset-left));box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:10px;border-radius:0;box-shadow:none;border:0;border-top:1px solid #1F2A44;font:600 12.5px/1.2 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;pointer-events:auto}
body.ga-mobile .pt-banner.pt-sharebar{top:calc(54px + var(--st-sat,0px));justify-content:space-between}
body.st-wm .pt-banner.pt-sharebar{top:48px}
.pt-banner.pt-sharebar.on{background:#B87333;color:#fff}
.pt-banner.pt-sharebar.off{background:#1F2A44;color:#e8ecf3;border-top-color:#B87333}
.pt-banner.pt-sharebar .pt-sb-txt{min-width:0;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.pt-banner.pt-sharebar button{flex:none;order:2;min-height:32px;height:32px;min-width:64px;padding:0 14px;border:0;border-radius:999px;font-weight:800;font-size:13px;cursor:pointer}
.pt-banner.pt-sharebar.on button{background:#fff;color:#b42318}
.pt-banner.pt-sharebar.off button{background:#B87333;color:#fff}
.pt-banner.pt-sharebar.offline::after{order:1;margin-left:auto;flex:none}
body.ga-mobile .pt-banner.pt-sharebar.offline::after{margin-left:0}

/* "Delete my trail history" — press and hold 3 s (hold-button.js sets --hold 0..1) */
.pt-traildel{margin:6px 0 12px;display:flex;flex-direction:column;gap:4px}
.pt-traildel small{color:#5b6472;font-size:12px}
.pt-hold{--hold:0;position:relative;display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px 12px;border-radius:10px;border:1px solid #c0392b;background:#fff;color:#a93226;font-weight:600;overflow:hidden;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:none;-webkit-touch-callout:none}
.pt-hold::before{content:"";position:absolute;inset:0;background:#fdecea;transform-origin:left;transform:scaleX(var(--hold));pointer-events:none}
.pt-hold>*{position:relative}
.pt-hold-ring{flex:0 0 26px;height:26px;border-radius:50%;background:conic-gradient(#c0392b calc(var(--hold)*360deg),#f1c4bf 0);-webkit-mask:radial-gradient(circle,transparent 8px,#000 9px);mask:radial-gradient(circle,transparent 8px,#000 9px)}
.pt-hold.holding{border-color:#922b21}
.pt-hold:focus-visible{outline:3px solid #B87333;outline-offset:2px}
.pt-hold:disabled{cursor:not-allowed;opacity:1;border-color:#aab2bf;color:#3d4552;background:#eef0f4}
.pt-hold:disabled .pt-hold-ring{background:#c9ced6}
@media (prefers-reduced-motion:reduce){.pt-hold::before{transition:none}}
.pt-trail-toast{z-index:2147483000}
