/* Crew finder: a full-screen map with a bottom sheet. Phone first, thumbs only. */
.stack { display: grid; gap: 14px; }
.stack > label:not(.check), .card label:not(.check) { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.stack input:not([type]), .card input:not([type]), .card input[type=search] { width: 100%; min-height: 52px; padding: 12px 14px; font: 17px var(--body); color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r); }
.small { font-size: 14px; }
.crew-start h1 { font: 400 2.2rem/1.1 var(--display); margin: 0 0 8px; }
.crew-start { display: grid; gap: 16px; }

body:has(#crew) { overflow: hidden; background-image: none; }
#crew { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
.cbar { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 8px) 12px 8px; background: var(--surface);
  border-bottom: 1px solid var(--line); z-index: 500; }
.cbrand img { display: block; }
.ctitle { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.ctitle b { font: 400 1.1rem/1.2 var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctitle span { font-size: 13px; color: var(--muted); }
.ctitle span.off { color: var(--error); }
.cbtn { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink);
  font: 400 15px var(--label); cursor: pointer; }
.cbtn.icon { width: 40px; padding: 0; font-size: 18px; }

#map { flex: 1; min-height: 0; background: #111; }
.leaflet-container { font: 14px var(--body); }
.dark-tiles { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9); }
.leaflet-control-attribution { font-size: 10px; }

.fabs { position: absolute; right: 12px; bottom: calc(var(--sheet-h, 240px) + 14px); display: grid; gap: 10px; z-index: 600; }
.fab { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5); cursor: pointer; }
.pickbar { position: absolute; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 70px); z-index: 700; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--pink); color: #23030F; font: 400 16px var(--label); }
.pickbar[hidden] { display: none; }

.sheet { background: var(--surface); border-top: 1px solid var(--line); max-height: 42vh; display: flex; flex-direction: column; z-index: 500;
  padding-bottom: env(safe-area-inset-bottom); }
.tabs { display: flex; gap: 6px; padding: 10px 12px 6px; align-items: center; }
.tabs [role=tab] { background: none; border: 0; color: var(--muted); font: 400 15px var(--label); padding: 8px 10px; border-radius: 999px; cursor: pointer; }
.tabs [role=tab].on { color: var(--ink); background: var(--surface-2); }
.tagbtn { margin-left: auto; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--pink); color: #23030F;
  font: 400 15px var(--label); cursor: pointer; box-shadow: 0 0 16px rgba(255, 61, 139, .4); }
.panel { overflow-y: auto; padding: 0 12px 12px; display: grid; gap: 10px; align-content: start; }
.panel[hidden] { display: none; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.list li.empty { cursor: default; color: var(--muted); background: none; justify-content: center; }
.dot { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--body); color: #0B0A0D; }
.who { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { font-size: 13px; color: var(--muted); }
.who span.stale { color: #E3B341; }
.far { display: grid; justify-items: center; min-width: 64px; font: 400 15px var(--label); }
.arrow { font-size: 24px; line-height: 1; transition: transform .25s ease; color: var(--blue); }
.far small { font-size: 12px; color: var(--muted); font-family: var(--body); }
.spot-emoji { font-size: 26px; width: 34px; text-align: center; }
.del { background: none; border: 0; color: var(--muted); font-size: 18px; padding: 6px; cursor: pointer; }
.btn.wide { width: 100%; min-height: 48px; font-size: 1rem; }

/* Map markers */
.pin { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #0B0A0D; font: 700 14px var(--body); color: #0B0A0D;
  box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 2px 10px rgba(0,0,0,.6); }
.pin.me { box-shadow: 0 0 0 3px #fff, 0 0 18px rgba(255,255,255,.7); }
.pin.stale { opacity: .55; }
.pin-label { position: absolute; top: 36px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 1px 6px; border-radius: 6px;
  background: rgba(11,10,13,.85); color: #fff; font: 600 12px var(--body); }
.spotpin { font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.8)); text-align: center; }
.spotpin.meet { font-size: 34px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.leaflet-popup-content { margin: 10px 14px; font-size: 15px; }
.leaflet-popup-content .muted { font-size: 13px; }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; background: rgba(0,0,0,.6); }
.modal[hidden] { display: none; }
.card { background: var(--surface); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 20px 18px calc(env(safe-area-inset-bottom) + 20px);
  max-height: 92vh; overflow-y: auto; display: grid; gap: 12px; }
.card h2 { margin: 0; font: 400 1.6rem/1.15 var(--display); }
.card p { margin: 0; }
.card.center { text-align: center; justify-items: center; }
.card .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.card .btn { min-height: 50px; font-size: 1rem; width: 100%; }
.card .btn.danger { color: var(--error); border-color: rgba(255,138,122,.4); }
.qr { width: min(240px, 70vw); background: #fff; padding: 6px; border-radius: 12px; }
.qr svg { display: block; width: 100%; height: auto; }
.link code { font-size: 14px; color: var(--blue-core); word-break: break-all; }
.kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kinds label { cursor: pointer; }
.kinds input { position: absolute; opacity: 0; pointer-events: none; }
.kinds span { display: block; text-align: center; padding: 10px 2px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2);
  font-size: 13px; line-height: 1.4; color: var(--ink); }
.kinds span::first-line { font-size: 26px; }
.kinds input:checked + span { border-color: var(--pink); box-shadow: 0 0 12px rgba(255, 61, 139, .45); }
.kinds input:focus-visible + span { outline: 2px solid var(--blue-core); }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 66px); transform: translateX(-50%); z-index: 1100; max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 15px; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.toast[hidden] { display: none; }

/* /crew onboarding */
.icons { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.icons label { cursor: pointer; }
.icons input { position: absolute; opacity: 0; pointer-events: none; }
.icons span { display: grid; place-items: center; aspect-ratio: 1; font-size: 24px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); }
.icons input:checked + span { border-color: var(--pink); box-shadow: 0 0 12px rgba(255, 61, 139, .5); background: rgba(255, 61, 139, .15); }
.icons input:focus-visible + span { outline: 2px solid var(--blue-core); outline-offset: 2px; }
@media (max-width: 360px) { .icons { grid-template-columns: repeat(6, 1fr); } }
.check span small { display: block; color: var(--muted); font-size: 14px; }
.me-row { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.me-icon { font-size: 30px; }
.linkish { margin-left: auto; background: none; border: 0; color: var(--blue-core); font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; }
.crew-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.crew-list button { width: 100%; text-align: left; display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--r); border: 1.5px solid var(--line);
  background: var(--surface-2); color: var(--ink); cursor: pointer; }
.crew-list button:active { border-color: var(--pink); }
.crew-list b { font: 400 1.3rem/1.2 var(--label); }
.crew-list span { font-size: 14px; color: var(--muted); }
.pin.emoji, .dot.emoji { font-size: 18px; }
.icons label[hidden] { display: none; }
.icons-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: -4px; }
.legend-ish { font: 400 14px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* "Share my location" box: one big tappable box split into choices */
.sharebox { border: 2px solid var(--blue); border-radius: var(--r); overflow: hidden; box-shadow: 0 0 18px rgba(34, 211, 238, .25); }
.sharebox-title { padding: 10px 14px 8px; font: 400 1.05rem/1.2 var(--label); letter-spacing: .04em; color: var(--blue-core); text-align: center; }
.segs { display: flex; border-top: 1.5px solid rgba(34, 211, 238, .45); }
.segs label { flex: 1; cursor: pointer; }
.segs label + label { border-left: 1.5px solid rgba(34, 211, 238, .45); }
.segs input { position: absolute; opacity: 0; pointer-events: none; }
.segs span { display: grid; place-items: center; align-content: center; min-height: 56px; padding: 8px 4px; font: 400 1.05rem/1.15 var(--label); color: var(--ink); text-align: center; }
.segs small { font: 12px var(--body); color: var(--muted); }
.segs input:checked + span { background: var(--blue); color: #04181D; }
.segs input:checked + span small { color: #04181D; }
.segs input:focus-visible + span { outline: 2px solid var(--pink-core); outline-offset: -4px; }
.sharebar { display: grid; gap: 8px; padding: 0 12px 10px; }
.sharebar[hidden] { display: none; }
.sharebar p { margin: 0; font-size: 14px; color: #E3B341; }
.sharebar .segs span { min-height: 46px; }

/* Friends: one swipeable row of compact tiles */
#p-friends { display: block; min-width: 0; }
.tiles-row { min-width: 0; display: flex; gap: 8px; overflow-x: auto; margin: 0 -12px; padding: 6px 12px 4px; scrollbar-width: none; }
.tiles-row::-webkit-scrollbar { display: none; }
.tiles { flex: none; list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.tile { flex: none; display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.tile .dot { width: 30px; height: 30px; font-size: 13px; }
.tile .dot.emoji { font-size: 16px; }
.tinfo { display: grid; line-height: 1.15; }
.tinfo b { font-size: 14px; font-weight: 600; max-width: 9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tdir { display: flex; align-items: center; gap: 3px; font: 400 13px var(--label); color: var(--blue-core); white-space: nowrap; }
.tdir .arrow { font-size: 15px; display: inline-block; }
.tile.stale { opacity: .5; }
.tile.empty { cursor: default; color: var(--muted); font-size: 14px; padding: 10px 14px; }

/* Friend card: docked at the bottom, map stays visible above */
.dock { background: var(--surface); border-top: 1px solid var(--line); z-index: 520; display: flex; flex-direction: column; max-height: 52vh;
  padding: 10px 12px calc(env(safe-area-inset-bottom) + 10px); gap: 8px; }
.dock[hidden], .sheet[hidden] { display: none; }
.dock-head { display: flex; align-items: center; gap: 10px; }
.dock-head .dot { width: 40px; height: 40px; font-size: 16px; }
.dock-head .dot.emoji { font-size: 22px; }
.dock-head .who b { font: 400 1.15rem/1.2 var(--label); }
.dock-head .who span { font-size: 13px; color: var(--muted); }
.dock-head .who span.stale { color: #E3B341; }
.dock-head .far { font: 400 17px var(--label); color: var(--blue-core); display: flex; align-items: center; gap: 4px; min-width: 0; }
.dock-head .far .arrow { font-size: 24px; display: inline-block; }
.chat { list-style: none; margin: 0; padding: 4px 2px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 60px; flex: 1; }
.chat li { max-width: 80%; display: grid; gap: 2px; }
.chat li > .bubble { padding: 8px 12px; border-radius: 16px; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.chat li small { font-size: 11px; color: var(--muted); padding: 0 6px; }
.chat li.mine { align-self: flex-end; justify-items: end; }
.chat li.mine > .bubble { background: var(--pink); color: #23030F; border-bottom-right-radius: 4px; }
.chat li.theirs { align-self: flex-start; }
.chat li.theirs > .bubble { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat li.hint-line { align-self: center; max-width: none; color: var(--muted); font-size: 13px; }
.quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick button { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--blue); background: none; color: var(--blue-core); font: 14px var(--body); cursor: pointer; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 16px var(--body); }
.chat-form .btn { min-height: 44px; padding: 0 18px; font-size: 1rem; width: auto; }

/* Crew chat tab */
.chatpanel { display: flex; flex-direction: column; gap: 8px; height: 38vh; }
.chatpanel[hidden] { display: none; }
.chat li em { font-style: normal; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; padding: 0 4px; }
.chat li em .mini { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #0B0A0D; }
.tabbadge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: 9px; background: var(--pink);
  color: #23030F; font: 700 11px/18px var(--body); text-align: center; vertical-align: 1px; box-shadow: 0 0 8px rgba(255, 61, 139, .6); }
.tabbadge[hidden] { display: none; }
.locbar { display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 10px 12px; border-radius: 12px; background: rgba(227, 179, 65, .12); border: 1px solid rgba(227, 179, 65, .45); }
.locbar[hidden] { display: none; }
.locbar p { margin: 0; flex: 1; font-size: 13px; line-height: 1.35; color: #F2D27A; }
.locbar .cbtn { flex: none; }

/* /crew first-time steps */
.steps { display: flex; justify-content: center; gap: 8px; }
.steps[hidden] { display: none; }
.steps span { width: 28px; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.done { background: var(--blue); }
.steps span.on { background: var(--pink); box-shadow: 0 0 8px rgba(255, 61, 139, .7); }
.step h1 { margin: 0; }
.step p { margin: 0; }
.linkish.back { margin: 0; justify-self: start; text-decoration: none; padding: 0; }
.choice2 { display: grid; gap: 10px; }
.choice2 input { position: absolute; opacity: 0; pointer-events: none; }
.choice2 span { display: block; padding: 16px 18px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--surface-2); font: 400 1.15rem var(--label); cursor: pointer; }
.choice2 input:checked + span { border-color: var(--pink); box-shadow: 0 0 14px rgba(255, 61, 139, .45); }
.choice2 input:focus-visible + span { outline: 2px solid var(--blue-core); }
.how { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 16px; }
.shareglyph { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--blue-core); border-radius: 5px; font-size: 13px; color: var(--blue-core); }
.notif { display: grid; gap: 6px; }
.chat .at { font-weight: 700; }
.chat li.theirs .at { color: var(--blue-core); }
.chat li.tagged > .bubble { border-color: var(--pink); box-shadow: 0 0 10px rgba(255, 61, 139, .35); }
.mentions { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.mentions[hidden] { display: none; }
.mentions button { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--pink);
  background: var(--surface-2); color: var(--ink); font: 14px var(--body); cursor: pointer; }
.mentions .mini { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #0B0A0D; }
.chatpanel { position: relative; }
.chat li > .bubble { cursor: pointer; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -2px; }
.reacts button { padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 13px var(--body); cursor: pointer; }
.reacts button.mine { border-color: var(--pink); background: rgba(255, 61, 139, .18); }
.chat li.mine .reacts { justify-content: flex-end; }
.reactbar { position: absolute; z-index: 5; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(0,0,0,.6); }
.reactbar[hidden] { display: none; }
.reactbar button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 22px; cursor: pointer; }
.reactbar button:active { background: var(--surface-2); transform: scale(1.15); }
.typing { margin: 0; font-size: 13px; color: var(--muted); font-style: italic; }
.typing[hidden] { display: none; }
.appnudge { display: grid; gap: 8px; padding: 14px; border-radius: var(--r); border: 1.5px solid var(--pink); background: rgba(255, 61, 139, .08); box-shadow: 0 0 16px rgba(255, 61, 139, .25); }
.appnudge[hidden] { display: none; }
.appnudge b { font: 400 1.1rem var(--label); }
.appnudge p { margin: 0; }
.appnudge .btn[hidden] { display: none; }
/* The glass in the crew map's top bar opens the site menu */
.crew-menu summary { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: none; border: 0; box-shadow: none; }
.crew-menu summary img { display: block; filter: drop-shadow(0 0 6px rgba(34, 211, 238, .6)); }
.crew-menu[open] summary { background: var(--surface-2); }
.crew-menu .drawer { z-index: 1200; }
.cbar:has(.crew-menu[open]) { z-index: 1100; position: relative; }
/* Tag a spot: quick picks + search results share one tile style */
.kinds .em { display: block; font-size: 26px; font-weight: 400; line-height: 1.2; }
.kinds span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kinds.results { max-height: 168px; overflow-y: auto; }
.kinds.results[hidden] { display: none; }
.kinds.results p { grid-column: 1 / -1; margin: 0; }

/* Share-my-location slider */
.sharebox.slider { padding: 0 0 14px; display: grid; gap: 6px; }
.share-readout { margin: 0; padding: 0 16px; text-align: center; font: 400 1.2rem/1.2 var(--label); color: var(--ink); }
.sharebox [data-range] { -webkit-appearance: none; appearance: none; margin: 6px 16px 0; height: 8px; border-radius: 4px; outline: none;
  background: linear-gradient(90deg, var(--blue) var(--fill, 100%), var(--surface-2) var(--fill, 100%)); box-shadow: 0 0 10px rgba(34, 211, 238, .35); }
.sharebox [data-range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-core); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--blue), 0 0 14px rgba(34, 211, 238, .8); cursor: pointer; }
.sharebox [data-range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--blue-core); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--blue); cursor: pointer; }
.sharebox [data-range]:focus-visible { box-shadow: 0 0 0 2px var(--pink-core); }
.share-scale { display: flex; justify-content: space-between; padding: 0 16px; font-size: 12px; color: var(--muted); }
.share-actions { display: flex; gap: 8px; padding: 4px 16px 0; }
.share-actions .btn { flex: 1; min-height: 46px; font-size: 1rem; }
.share-actions .btn[hidden] { display: none; }
.sharebar .share-readout { color: var(--ink); font-size: 1.1rem; }
.fab { position: relative; }
.fab-alert { position: absolute; top: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%; background: #F87171; color: #1A0505;
  font: 800 13px/20px var(--body); text-align: center; box-shadow: 0 0 10px rgba(248, 113, 113, .8); animation: alertpulse 1.6s ease-in-out infinite; }
@keyframes alertpulse { 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .fab-alert { animation: none; } }
#m-shareloc .sharebox { margin: 0; }
.bell { position: relative; font-size: 17px; }
.bell[hidden] { display: none; }
.bell-dot { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: #F87171; box-shadow: 0 0 8px rgba(248, 113, 113, .9); }
.notiftip { margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .35); font-size: 13px; }
.notiftip[hidden] { display: none; }
.notiftip .linkish { margin-left: 4px; font-size: 13px; }
#m-notif .btn[hidden] { display: none; }

/* ☰ / Invite / 🔔: one panel attached to the right edge, sliding down from under the top bar */
.modal.dropdown { display: block; background: rgba(0, 0, 0, .25); }
.modal.dropdown .card { position: absolute; top: 60px; right: 0; width: min(330px, 88vw); max-height: calc(100% - 60px); overflow-y: auto;
  border: 1px solid var(--line); border-right: 0; border-top: 0; border-radius: 0 0 0 18px; padding: 16px 14px 18px; gap: 10px;
  box-shadow: -10px 18px 40px rgba(0, 0, 0, .55); animation: slidedown .24s cubic-bezier(.2, .8, .2, 1); }
@keyframes slidedown { from { clip-path: inset(0 0 100% 0); transform: translateY(-10px); } to { clip-path: inset(0 0 0 0); transform: none; } }
.modal.dropdown h2 { font-size: 1.25rem; }
.modal.dropdown .stack { gap: 8px; }
.modal.dropdown .btn { min-height: 42px; font-size: .95rem; padding: 8px 12px; }
.modal.dropdown .check { font-size: 14px; }
.modal.dropdown .appnudge { padding: 10px 12px; gap: 6px; }
.modal.dropdown .appnudge b { font-size: 1rem; }
.modal.dropdown .sharebox-title { padding: 8px 12px 4px; font-size: .95rem; }
.modal.dropdown .share-readout { font-size: 1rem; }
.modal.dropdown .share-actions .btn { min-height: 40px; }
@media (prefers-reduced-motion: reduce) { .modal.dropdown .card { animation: none; } }

/* Camera view */
.ar { position: fixed; inset: 0; z-index: 1600; background: #000; overflow: hidden; }
.ar[hidden] { display: none; }
.ar video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ar.nocam { background: radial-gradient(120% 80% at 50% 40%, #1a1525, #050407); }
.ar-layer { position: absolute; inset: 0; pointer-events: none; }
.ar-top { position: absolute; top: calc(env(safe-area-inset-top) + 10px); left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; z-index: 3; }
.ar-top .cbtn { background: rgba(11, 10, 13, .7); }
.ar-heading { font: 400 15px var(--label); color: #fff; text-shadow: 0 1px 4px #000; padding: 6px 10px; border-radius: 999px; background: rgba(11, 10, 13, .55); }
.ar-msg { position: absolute; left: 16px; right: 16px; top: 40%; margin: 0; text-align: center; font: 400 1.1rem var(--label); color: #fff;
  text-shadow: 0 1px 6px #000; z-index: 3; }
.ar-msg[hidden] { display: none; }
.ar-near { position: absolute; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 16px); padding: 10px 14px; border-radius: 14px;
  background: rgba(11, 10, 13, .75); border: 1px solid var(--pink); color: #fff; font-size: 15px; z-index: 3; }
.ar-near[hidden] { display: none; }
.ar-tag { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px;
  background: rgba(11, 10, 13, .72); border: 1.5px solid var(--blue); color: #fff; white-space: nowrap; will-change: transform;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .5), 0 0 14px rgba(34, 211, 238, .35); transition: opacity .3s; }
.ar-tag.person { border-color: var(--pink); box-shadow: 0 4px 18px rgba(0, 0, 0, .5), 0 0 14px rgba(255, 61, 139, .4); }
.ar-tag.meet { border-color: #fff; }
.ar-tag.stale { opacity: .6; }
.ar-face { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; color: #0B0A0D; font-weight: 700; flex: none; }
.ar-tag.spot .ar-face { background: none; font-size: 24px; }
.ar-text { display: grid; line-height: 1.15; }
.ar-text b { font-size: 15px; }
.ar-text small { font: 400 13px var(--label); color: var(--blue-core); }
.ar-arrow { display: none; font-size: 26px; color: var(--pink-core); }
.ar-tag.edge .ar-arrow { display: block; }
.ar-tag.edge.left { flex-direction: row-reverse; padding: 6px 6px 6px 12px; }
.ar-tag.edge .ar-text small::after { content: " · turn"; }

/* Camera view: focus on one person/spot */
.ar-layer .ar-tag { pointer-events: auto; cursor: pointer; }
.ar-tag.focus { border-width: 2.5px; box-shadow: 0 0 0 4px rgba(255, 61, 139, .25), 0 0 26px rgba(255, 61, 139, .7); }
.ar-arrowwrap { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 150px); width: 150px; height: 190px; margin-left: -75px;
  perspective: 420px; pointer-events: none; z-index: 2; }
.ar-arrowwrap[hidden] { display: none; }
.ar-arrowwrap { --arrow: 34, 211, 238; --arrow-core: 171, 238, 249; }
.ar-big { width: 100%; height: 100%; transform-origin: 50% 60%; transition: transform .12s linear; overflow: visible;
  filter: drop-shadow(0 0 10px rgba(var(--arrow), .9)) drop-shadow(0 0 26px rgba(var(--arrow), .5)); }
.ar-big path { fill: rgba(var(--arrow), .55); stroke: rgb(var(--arrow-core)); stroke-width: 4; stroke-linejoin: round; transition: fill .4s, stroke .4s; }
/* In the look-around radius: full pink, hyper glow, pulsing */
.ar-arrowwrap.hot .ar-big { animation: hotglow 1s ease-in-out infinite; }
.ar-arrowwrap.hot .ar-big path { fill: rgba(255, 61, 139, .85); stroke: #fff; }
@keyframes hotglow {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(255, 61, 139, 1)) drop-shadow(0 0 30px rgba(255, 61, 139, .7)); }
  50% { filter: drop-shadow(0 0 22px rgba(255, 61, 139, 1)) drop-shadow(0 0 60px rgba(255, 61, 139, .95)) drop-shadow(0 0 90px rgba(255, 120, 190, .6)); }
}
.ar-arrowwrap.hot { animation: hotpulse 1s ease-in-out infinite; }
@keyframes hotpulse { 50% { transform: scale(1.12); } }
.ar-focus { position: absolute; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 16px); display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 18px; background: rgba(11, 10, 13, .82); border: 1.5px solid var(--pink); color: #fff; z-index: 3; }
.ar-focus[hidden] { display: none; }
.ar-focus .ar-face { width: 46px; height: 46px; font-size: 26px; }
.arf-text { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.arf-text b { font-size: 17px; }
#arf-dir { font: 400 1.15rem var(--label); color: var(--pink-core); }
.arf-text small { font-size: 13px; color: var(--blue-core); }
.ar-focus .cbtn { flex: none; font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .ar-big { transition: none; } .ar-arrowwrap.hot, .ar-arrowwrap.hot .ar-big { animation: none; } }
.ar-near { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ar-near button { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--pink); background: rgba(255, 61, 139, .15); color: #fff; font: 14px var(--body); cursor: pointer; }
/* Invite and 🔔 as dropdowns: a little narrower, QR sized to fit */
#m-share.dropdown .qr { width: min(190px, 60vw); }
#m-share.dropdown .row { grid-template-columns: 1fr 1fr; }
#m-notif.dropdown p { font-size: 14px; }

/* Bottom panel: full, or shrunk to three icons while you use the map */
.sheet-mini { display: none; }
.sheet.collapsed > :not(.sheet-mini) { display: none !important; }
.sheet.collapsed .sheet-mini { display: flex; gap: 6px; padding: 8px 10px; }
.sheet-mini button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 400 14px var(--label); cursor: pointer; }
.sheet-mini button:active { border-color: var(--pink); }
.sheet-mini .mi { font-size: 18px; }
.sheet-mini b { font: 600 12px var(--body); color: var(--muted); }
.sheet-mini b.tabbadge { color: #23030F; }
.grabber { display: block; width: 100%; height: 16px; padding: 6px 0 0; border: 0; background: none; cursor: pointer; }
.grabber span { display: block; width: 40px; height: 4px; margin: 0 auto; border-radius: 2px; background: var(--line); }
.grabber:hover span, .grabber:focus-visible span { background: var(--muted); }
.sheet .tabs { padding-top: 4px; }

/* Top bar: slim by default, tap the crew name for the status line and Invite */
.ctitle { background: none; border: 0; padding: 0; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.ctitle .caret { display: inline-block; font-size: .8em; color: var(--muted); transition: transform .25s; }
.cbar:not(.collapsed) .ctitle .caret { transform: rotate(180deg); }
.cbar.collapsed { padding-top: calc(env(safe-area-inset-top) + 6px); padding-bottom: 6px; }
.cbar.collapsed #c-status, .cbar.collapsed .top-more { display: none; }
.cbar.collapsed .cbtn { min-height: 36px; }
.cbar.collapsed .cbtn.icon { width: 36px; }
/* Contents fade in as a panel opens */
.sheet:not(.collapsed) > .tabs, .sheet:not(.collapsed) > .panel:not([hidden]), .cbar:not(.collapsed) #c-status, .cbar:not(.collapsed) .top-more { animation: fadein .3s ease-out; }
.sheet.collapsed .sheet-mini { animation: fadein .25s ease-out; }
@keyframes fadein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet > *, .cbar * { animation: none !important; } }

/* Chat speech bubbles on the map */
.leaflet-tooltip.say { background: #fff; color: #0B0A0D; border: 0; border-radius: 14px; padding: 6px 10px; font: 600 13px/1.25 var(--body);
  width: max-content; max-width: 210px; white-space: normal; box-shadow: 0 4px 14px rgba(0, 0, 0, .5), 0 0 12px rgba(255, 61, 139, .45); animation: sayin .25s ease-out; }
.leaflet-tooltip.say::before { border-top-color: #fff; }
@keyframes sayin { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .leaflet-tooltip.say { animation: none; } }
.chat .at.link { cursor: pointer; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.chat li.mine .at.link { text-decoration-color: rgba(35, 3, 15, .6); }
.mentions button.spot { border-color: var(--blue); }
.mentions button.spot .mini { background: none; font-size: 16px; }
/* Spot pop-ups in the bar's dark look (Leaflet's own stylesheet loads after ours, so be more specific) */
.leaflet-container .leaflet-popup-content-wrapper, .leaflet-container .leaflet-popup-tip { background: var(--surface); color: var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.6); }
.leaflet-container .leaflet-popup-content .muted { color: var(--muted); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }

/* Grouped friends on the map */
.cluster { position: relative; display: flex; align-items: center; height: 40px; padding: 3px 26px 3px 3px; border-radius: 999px; width: max-content;
  background: rgba(11, 10, 13, .85); border: 2px solid var(--pink); box-shadow: 0 0 14px rgba(255, 61, 139, .5), 0 3px 10px rgba(0,0,0,.6); cursor: pointer; }
.cl-face { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--body); color: #0B0A0D;
  border: 2px solid #0B0A0D; flex: none; }
.cluster .cl-face + .cl-face { margin-left: -12px; }
.cl-count { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 700 14px var(--body); color: #fff; }
.cl-list { display: grid; gap: 6px; margin-top: 8px; }
.cl-list button { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font: 14px var(--body); cursor: pointer; text-align: left; }
.cl-list .cl-face { width: 26px; height: 26px; font-size: 14px; }

/* Bottom panel, large: most of the screen (a sliver of map stays visible) */
.sheet.large { max-height: none; height: calc(100% - 120px); }
.sheet.large > .panel:not([hidden]), .sheet.large > .chatpanel:not([hidden]) { flex: 1; min-height: 0; height: auto; max-height: none; }
.sheet.large .tiles-row { flex-wrap: wrap; overflow: visible; margin: 0; padding: 6px 0 4px; }
.sheet.large .tiles { flex-wrap: wrap; flex: 1 1 100%; }
.sheet.large .tile { flex: 1 1 calc(50% - 8px); min-width: 0; }
.grabber span { width: 48px; height: 5px; }
#crew.sheet-large .fabs { display: none; }   /* map controls hide while the panel covers the map */
.with-me { display: grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--pink); color: #23030F;
  font: 700 13px var(--body); border: 2px solid #0B0A0D; box-shadow: 0 0 10px rgba(255, 61, 139, .8); cursor: pointer; }
.sheet.dragging { transition: none; }
.sheet .grabber, .sheet .tabs, .sheet .sheet-mini { touch-action: none; }   /* these drag the panel instead of scrolling the page */
/* Invite: the word when the top bar is open, a + when it's slim */
.inv-plus { display: none; font: 400 22px/1 var(--body); }
.cbar.collapsed .invite { width: 36px; padding: 0; }
.cbar.collapsed .inv-word { display: none; }
.cbar.collapsed .inv-plus { display: block; }

/* Settings: a grouped list (one row style, labels between groups, switches for on/off) */
.card.settings { gap: 0; padding: 12px 0 14px; }
.set-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 6px 16px; }
.set-head h2 { font-size: 1.3rem; }
.set-label { margin: 12px 16px 4px; font: 400 11px var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.set-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 16px; background: none; border: 0;
  border-top: 1px solid var(--line); color: var(--ink); font: 15px var(--body); text-align: left; text-decoration: none; cursor: pointer; }
.set-label + .set-row, .set-label + a.set-row { border-top-color: transparent; }
.set-row:active { background: var(--surface-2); }
.set-row .si { width: 24px; flex: none; text-align: center; font-size: 18px; }
.set-row .st { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.set-row .st small { font-size: 12px; color: var(--muted); }
.set-row .st small.warn { color: #E3B341; }
.set-row .sv { flex: none; font-size: 14px; color: var(--blue-core); }
.set-row.danger .st { color: var(--error); }
.set-app { display: flex; align-items: center; gap: 10px; margin: 2px 12px 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 61, 139, .55);
  background: rgba(255, 61, 139, .1); color: var(--ink); text-decoration: none; font-size: 14px; }
.set-app[hidden] { display: none; }
.set-app b { flex: 1; font-weight: 600; }
.set-app .sv { color: var(--pink-core); font-size: 18px; }
.set-sub { padding: 0 12px 8px; }
.set-sub[hidden] { display: none; }
.set-sub .sharebox { border-width: 1px; box-shadow: none; }
.set-sub .sharebox-title:empty { display: none; }
.set-sub .share-readout { padding-top: 10px; }
/* Switch */
.switch { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 46px; height: 28px; margin: 0; border-radius: 14px;
  background: var(--line); cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .2s; }
.switch:checked { background: var(--pink); }
.switch:checked::after { transform: translateX(18px); }
.switch:disabled { opacity: .4; }
.switch:focus-visible { outline: 2px solid var(--blue-core); outline-offset: 2px; }
.card label.set-row { display: flex; gap: 12px; color: var(--ink); font-size: 15px; }   /* beat the generic ".card label" form rule */
