.map-wrap { margin-bottom: 14px; }
#pwa-map { height: 320px; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface-2); z-index: 0; }
.map-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; align-items: center; }
.map-tools button { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .84rem; }
.map-tools button[aria-current="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.map-tools .locate { margin-left: auto; border-color: var(--accent); color: var(--accent); font-weight: 700; }
#pwa-map-note { font-size: .8rem; color: var(--muted); min-height: 1.2em; }
.leaflet-container { font-family: var(--font-body); }

/* ---------- sign-in, account, members, sync status (Gmail version) ---------- */
.pwa-login { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: var(--page-grad, var(--bg)); background-color: var(--bg);
  display: flex; align-items: flex-start; justify-content: center; padding: max(48px, env(safe-area-inset-top)) 16px 32px; }
.pl-card { width: 100%; max-width: 420px; background: var(--card-grad, var(--surface)); background-color: var(--surface); border-radius: 20px; padding: 26px 20px 20px;
  box-shadow: var(--hl, none), var(--elev-2, var(--shadow)); }
.pl-card h1 { margin: 2px 0 10px; }
.pl-lead { color: var(--muted); margin: 0 0 18px; }
.pl-invite { background: var(--accent-soft); color: var(--accent-text); border-radius: 12px; padding: 10px 12px; font-weight: 700; margin: 0 0 16px; }
.pl-google { min-height: 48px; display: flex; justify-content: center; margin: 8px 0; }
.pl-wait, .pwa-wait { color: var(--muted); font-size: .9rem; }
.pl-error { color: var(--warn); font-size: .9rem; margin: 8px 0; }
.pl-error:empty { display: none; }
.pl-test { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pl-note { margin: 18px 0 0; font-size: .8rem; color: var(--faint); line-height: 1.55; }
.btn.block { width: 100%; }

.list-head .acct-btn { margin-left: auto; }
.acct-btn { width: 42px; height: 42px; border-radius: 50%; padding: 0; border: 2px solid var(--surface); overflow: hidden; background: var(--accent-soft);
  color: var(--accent-text); font-weight: 700; font-size: 1.05rem; box-shadow: var(--hl, none), var(--elev-1, var(--shadow)); display: inline-flex; align-items: center; justify-content: center; }
.acct-btn img { width: 100%; height: 100%; object-fit: cover; }
.av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.av.lg { width: 56px; height: 56px; }
.av-letter { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.av.lg.av-letter { font-size: 1.4rem; }
.acct { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; min-width: 0; }
.acct > div { min-width: 0; }
.acct-name { font-weight: 700; font-size: 1.05rem; }
.acct-mail { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.members { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 8px; }
.members li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); box-shadow: var(--hl, none), var(--elev-1, var(--shadow)); min-width: 0; }
.members .m-text { flex: 1; min-width: 0; display: grid; }
.members .m-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.members .m-mail { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.members .pill { background: var(--accent-soft); color: var(--accent-text); }
.switch { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; font-weight: 700; }
.switch input { appearance: auto; -webkit-appearance: checkbox; width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; border: 0; box-shadow: none; background: none; accent-color: var(--accent); flex: none; }

.pwa-sync { position: fixed; z-index: 55; top: calc(env(safe-area-inset-top) + 8px); left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--ink); color: var(--bg); box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .4); cursor: default; }
.pwa-sync[data-state="offline"] { background: #6b5a4c; color: #fff; }
.pwa-sync[data-state="signed_out"] { background: var(--warn); color: #fff; cursor: pointer; }

/* public read-only link: hide everything that changes the trip */
body.ro [data-act]:not([data-act^="go-"]):not([data-act="open-stop"]):not([data-act="close-sheet"]):not([data-act="sheet-scrim"]):not([data-act="theme"]):not([data-act="nav-pref"]):not([data-act="copy-text"]):not([data-act="export-txt"]):not([data-act="export-json"]):not([data-act^="pwa-"]),
body.ro label[for="import-backup"], body.ro .grip, body.ro [data-act="go-tab"][data-tab="ai"], body.ro [data-act="go-new"] { display: none !important; }
