:root {
  color-scheme: light dark;
  --bg: #f4f7f9;
  --surface: rgba(255,255,255,.92);
  --surface-2: #ffffff;
  --text: #071d31;
  --muted: #637282;
  --line: rgba(7,29,49,.10);
  --brand: #078ce5;
  --brand-2: #10c9c3;
  --accent: #ffad16;
  --danger: #ef4f64;
  --success: #11a978;
  --shadow: 0 14px 35px rgba(8,29,49,.10);
  --nav-h: 76px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}
:root[data-theme="dark"] {
  --bg: #061421;
  --surface: rgba(11,31,49,.94);
  --surface-2: #0c2032;
  --text: #f5fbff;
  --muted: #9db0bf;
  --line: rgba(226,241,250,.11);
  --brand: #18a5ff;
  --brand-2: #20d6cf;
  --accent: #ffb52d;
  --danger: #ff6478;
  --success: #25c992;
  --shadow: 0 14px 35px rgba(0,0,0,.30);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin:0; min-height:100%; background:var(--bg); color:var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { overscroll-behavior-y: none; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline:3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset:2px; }
.app-shell { min-height:100svh; padding-top:var(--safe-top); }
.topbar { height:66px; position:fixed; top:var(--safe-top); left:0; right:0; z-index:1000; display:flex; align-items:center; justify-content:space-between; padding:8px 14px; background:color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter:blur(18px); border-bottom:1px solid var(--line); }
.brand-button { display:flex; align-items:center; gap:9px; border:0; background:transparent; padding:0; min-width:0; text-align:left; }
.brand-mark { width:42px; height:42px; object-fit:contain; border-radius:12px; }
.brand-copy { display:flex; flex-direction:column; min-width:0; }
.brand-copy strong { font-size:17px; letter-spacing:-.4px; line-height:1.05; }
.brand-copy small { color:var(--muted); font-size:10px; margin-top:3px; }
.top-actions { display:flex; gap:7px; }
.icon-btn { width:42px; height:42px; border:1px solid var(--line); background:var(--surface); border-radius:14px; display:grid; place-items:center; font-size:20px; box-shadow:0 4px 12px rgba(0,0,0,.03); }
.hidden { display:none!important; }
.main-content { padding:82px 14px calc(var(--nav-h) + var(--safe-bottom) + 18px); max-width:760px; margin:auto; }
.screen { display:none; animation:screenIn .18s ease-out; }
.screen.active { display:block; }
@keyframes screenIn { from { opacity:.4; transform:translateY(5px); } to { opacity:1; transform:none; } }
.screen-heading { display:flex; align-items:end; justify-content:space-between; gap:12px; margin:5px 2px 14px; }
.screen-heading h1 { margin:2px 0 0; font-size:28px; line-height:1.05; letter-spacing:-1px; }
.eyebrow { font-size:10px; font-weight:800; color:var(--brand); letter-spacing:1.35px; }
.pill-button { border:1px solid var(--line); background:var(--surface); border-radius:999px; min-height:40px; padding:0 14px; font-size:12px; font-weight:750; white-space:nowrap; }
.map-wrap { position:relative; height:43svh; min-height:330px; max-height:490px; border-radius:24px; overflow:hidden; box-shadow:var(--shadow); background:linear-gradient(145deg,#173c51,#0b6c76); }
.map { height:100%; width:100%; }
.leaflet-control-attribution { font-size:8px!important; }
:root[data-theme="dark"] .leaflet-tile-pane { filter:brightness(.72) saturate(.75) contrast(1.18); }
.map-fallback { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; background:radial-gradient(circle at 70% 20%,rgba(20,189,200,.5),transparent 30%),linear-gradient(160deg,#0a2741,#0f5568); color:white; text-align:center; padding:30px; }
.map-fallback span { opacity:.75; font-size:13px; }
.locate-btn { position:absolute; z-index:500; right:12px; bottom:48px; width:46px; height:46px; border:0; border-radius:15px; background:var(--surface-2); color:var(--brand); font-size:25px; box-shadow:0 8px 25px rgba(0,0,0,.2); }
.map-status { position:absolute; z-index:500; left:12px; bottom:12px; right:12px; min-height:28px; border-radius:999px; background:color-mix(in srgb,var(--surface-2) 88%,transparent); backdrop-filter:blur(12px); display:flex; align-items:center; gap:7px; padding:0 11px; font-size:10px; font-weight:650; width:max-content; max-width:calc(100% - 24px); }
.status-dot, .motion-dot { width:8px; height:8px; border-radius:50%; background:var(--success); box-shadow:0 0 0 4px color-mix(in srgb,var(--success) 15%,transparent); }
.member-strip { display:flex; gap:9px; overflow-x:auto; padding:13px 2px 5px; scrollbar-width:none; }
.member-strip::-webkit-scrollbar { display:none; }
.member-chip { flex:0 0 auto; border:1px solid var(--line); background:var(--surface); border-radius:18px; padding:7px 10px 7px 7px; display:flex; align-items:center; gap:8px; min-height:54px; }
.avatar { width:38px; height:38px; border-radius:14px; display:grid; place-items:center; font-weight:850; color:white; background:linear-gradient(145deg,var(--brand),var(--brand-2)); }
.member-chip div { display:flex; flex-direction:column; align-items:flex-start; }
.member-chip strong { font-size:12px; }
.member-chip small { color:var(--muted); font-size:9px; margin-top:2px; }
.quick-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; margin-top:9px; }
.quick-card { min-height:87px; border:1px solid var(--line); background:var(--surface); border-radius:20px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; padding:13px; box-shadow:0 7px 20px rgba(0,0,0,.025); }
.quick-card .quick-icon { font-size:19px; margin-bottom:5px; }
.quick-card strong { font-size:13px; }
.quick-card small { font-size:9px; color:var(--muted); margin-top:2px; }
.activity-hero { display:flex; flex-direction:column; align-items:center; padding:14px 0 20px; }
.activity-ring { width:min(58vw,240px); aspect-ratio:1; border-radius:50%; padding:13px; background:conic-gradient(var(--brand),var(--brand-2),var(--accent),var(--brand)); box-shadow:0 18px 42px color-mix(in srgb,var(--brand) 18%,transparent); }
.activity-ring.tracking { animation:pulseRing 2.1s infinite; }
@keyframes pulseRing { 50% { box-shadow:0 18px 54px color-mix(in srgb,var(--brand) 35%,transparent); transform:scale(1.01); } }
.track-button { width:100%; height:100%; border:0; border-radius:50%; background:var(--surface-2); display:flex; flex-direction:column; align-items:center; justify-content:center; }
.track-button > span { font-size:30px; color:var(--brand); }
.track-button strong { margin-top:7px; font-size:24px; letter-spacing:1.5px; }
.track-button small { color:var(--muted); margin-top:2px; }
.live-state { margin-top:14px; display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
.motion-dot { background:#9aa5ad; box-shadow:none; }
.motion-dot.active { background:var(--success); box-shadow:0 0 0 4px color-mix(in srgb,var(--success) 15%,transparent); }
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.stat-card { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:13px 11px; min-height:94px; display:flex; flex-direction:column; }
.stat-card span { font-size:10px; color:var(--muted); }
.stat-card strong { font-size:25px; letter-spacing:-1px; margin-top:5px; }
.stat-card small { font-size:9px; color:var(--muted); margin-top:auto; }
.section-card { margin-top:11px; background:var(--surface); border:1px solid var(--line); border-radius:22px; padding:16px; }
.card-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.card-heading h2 { font-size:18px; margin:2px 0 0; letter-spacing:-.4px; }
.segment-badge { font-size:9px; font-weight:850; letter-spacing:1px; padding:6px 9px; border-radius:999px; background:color-mix(in srgb,var(--brand) 12%,transparent); color:var(--brand); }
.segment-meter { height:7px; overflow:hidden; border-radius:999px; background:var(--line); margin:16px 0 10px; }
.segment-meter div { height:100%; width:0%; background:linear-gradient(90deg,var(--brand),var(--brand-2)); transition:width .35s; }
.muted, .subtle { color:var(--muted); }
.muted { font-size:11px; line-height:1.5; margin:0; }
.subtle { font-size:10px; }
.segment-list { display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.segment-row { border-top:1px solid var(--line); padding-top:10px; display:grid; grid-template-columns:34px 1fr auto; gap:9px; align-items:center; }
.segment-row:first-child { border-top:0; padding-top:0; }
.segment-row .seg-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:12px; background:color-mix(in srgb,var(--brand) 10%,transparent); }
.segment-row strong { font-size:12px; display:block; }
.segment-row small { font-size:9px; color:var(--muted); }
.segment-row em { font-style:normal; font-weight:800; font-size:11px; }
.empty-state { color:var(--muted); font-size:11px; padding:12px 0; }
.safety-card { display:grid; grid-template-columns:1fr auto; align-items:center; gap:4px 10px; border-left:4px solid var(--success); }
.safety-card strong { font-size:13px; }
.safety-card span { color:var(--muted); font-size:10px; grid-column:1; }
.safety-card button { grid-column:2; grid-row:1 / span 2; }
.text-button { border:0; background:transparent; color:var(--brand); font-weight:750; font-size:11px; padding:8px; }
.crew-list { display:flex; flex-direction:column; gap:9px; margin-top:11px; }
.crew-card { display:grid; grid-template-columns:48px 1fr auto; align-items:center; gap:11px; background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:11px; }
.crew-card .avatar { width:48px; height:48px; border-radius:17px; }
.crew-card h3 { font-size:14px; margin:0; }
.crew-card p { font-size:10px; color:var(--muted); margin:3px 0 0; }
.crew-meta { text-align:right; }
.crew-meta strong { font-size:12px; display:block; }
.crew-meta small { color:var(--muted); font-size:9px; }
.awards-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.award-card { border:1px solid var(--line); border-radius:17px; padding:12px; min-height:108px; background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 9%,var(--surface-2)),var(--surface-2)); }
.award-card .award-icon { font-size:22px; }
.award-card strong { display:block; font-size:12px; margin-top:6px; }
.award-card span { display:block; color:var(--muted); font-size:9px; margin-top:3px; }
.chat-feed { display:flex; flex-direction:column; gap:8px; padding:2px 1px 86px; min-height:56svh; }
.message { max-width:82%; border-radius:18px 18px 18px 5px; background:var(--surface); border:1px solid var(--line); padding:9px 11px; align-self:flex-start; }
.message.me { align-self:flex-end; border-radius:18px 18px 5px 18px; background:linear-gradient(145deg,var(--brand),color-mix(in srgb,var(--brand) 70%,var(--brand-2))); color:white; border:0; }
.message strong { display:block; font-size:9px; margin-bottom:4px; opacity:.75; }
.message p { font-size:12px; margin:0; line-height:1.38; }
.message time { display:block; font-size:8px; margin-top:5px; opacity:.65; }
.message a { color:inherit; font-weight:750; word-break:break-all; }
.composer { position:fixed; z-index:700; bottom:calc(var(--nav-h) + var(--safe-bottom) + 8px); left:max(14px,calc((100vw - 732px)/2)); right:max(14px,calc((100vw - 732px)/2)); background:var(--surface-2); border:1px solid var(--line); border-radius:22px; padding:6px; display:flex; align-items:center; gap:5px; box-shadow:var(--shadow); }
.composer input { min-width:0; flex:1; height:44px; border:0; background:transparent; color:var(--text); outline:0; padding:0 6px; font-size:13px; }
.composer-action, .send-btn { width:44px; height:44px; border:0; border-radius:15px; display:grid; place-items:center; }
.composer-action { background:color-mix(in srgb,var(--brand) 10%,transparent); color:var(--brand); }
.send-btn { background:var(--brand); color:white; font-size:20px; }
.talk-stage { min-height:52svh; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.talk-avatar-stack { display:flex; padding-left:18px; margin-bottom:20px; }
.talk-avatar-stack span { width:48px; height:48px; border-radius:50%; margin-left:-18px; background:linear-gradient(145deg,var(--brand),var(--brand-2)); color:white; display:grid; place-items:center; border:3px solid var(--bg); font-weight:850; }
.talk-stage p { font-size:13px; color:var(--muted); }
.ptt-button { margin-top:18px; width:min(62vw,250px); aspect-ratio:1; border-radius:50%; border:11px solid color-mix(in srgb,var(--brand) 20%,transparent); background:linear-gradient(145deg,var(--brand),var(--brand-2)); color:white; display:flex; flex-direction:column; align-items:center; justify-content:center; box-shadow:0 20px 45px color-mix(in srgb,var(--brand) 25%,transparent); touch-action:none; user-select:none; }
.ptt-button span { font-size:42px; }
.ptt-button strong { font-size:14px; margin-top:9px; }
.ptt-button.transmitting { transform:scale(.96); box-shadow:0 0 0 16px color-mix(in srgb,var(--brand) 10%,transparent),0 20px 45px color-mix(in srgb,var(--brand) 35%,transparent); }
.talk-stage > small { max-width:320px; color:var(--muted); line-height:1.5; margin-top:20px; font-size:10px; }
.voice-list { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.voice-item { display:flex; align-items:center; gap:10px; border-top:1px solid var(--line); padding-top:9px; }
.voice-item:first-child { border-top:0; }
.voice-item audio { width:100%; height:34px; }
.profile-head { display:flex; gap:14px; align-items:center; margin:7px 2px 18px; }
.profile-avatar { width:70px; height:70px; border-radius:24px; background:linear-gradient(145deg,var(--brand),var(--brand-2)); color:white; display:grid; place-items:center; font-size:26px; font-weight:850; }
.profile-head h1 { margin:2px 0; font-size:28px; }
.profile-head p { margin:0; color:var(--muted); font-size:11px; }
.profile-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; margin-top:12px; }
.profile-stats div { border-right:1px solid var(--line); }
.profile-stats div:last-child { border-right:0; }
.profile-stats strong { display:block; font-size:22px; }
.profile-stats span { color:var(--muted); font-size:9px; }
.settings-list { padding:4px 14px; }
.settings-list button { width:100%; min-height:64px; background:transparent; border:0; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; text-align:left; padding:8px 1px; }
.settings-list button:last-child { border-bottom:0; }
.settings-list strong { display:block; font-size:12px; }
.settings-list small { display:block; color:var(--muted); margin-top:2px; font-size:9px; }
.build-note { text-align:center; color:var(--muted); font-size:9px; margin:18px 0; }
.bottom-nav { position:fixed; z-index:1000; bottom:0; left:0; right:0; height:calc(var(--nav-h) + var(--safe-bottom)); padding:6px 7px var(--safe-bottom); display:grid; grid-template-columns:repeat(5,1fr); background:color-mix(in srgb,var(--surface-2) 92%,transparent); backdrop-filter:blur(22px); border-top:1px solid var(--line); }
.nav-item { border:0; background:transparent; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; color:var(--muted); min-width:0; }
.nav-item span { font-size:20px; line-height:1; }
.nav-item small { font-size:9px; font-weight:700; }
.nav-item.active { color:var(--brand); }
.sheet { border:0; padding:0; width:min(calc(100% - 20px),520px); max-height:80svh; margin:auto auto max(10px,var(--safe-bottom)); border-radius:28px; background:var(--surface-2); color:var(--text); box-shadow:0 25px 70px rgba(0,0,0,.35); }
.sheet::backdrop { background:rgba(0,13,23,.58); backdrop-filter:blur(4px); }
.sheet-inner { padding:20px; }
.sheet-grabber { width:44px; height:5px; border-radius:999px; background:var(--line); margin:-7px auto 15px; }
.sheet h2 { margin:0; font-size:22px; }
.sheet p { color:var(--muted); font-size:11px; line-height:1.5; }
.sheet-options { display:flex; flex-direction:column; gap:7px; margin-top:15px; }
.sheet-options button { min-height:54px; border:1px solid var(--line); border-radius:17px; background:var(--surface); text-align:left; padding:10px 13px; }
.sheet-options button strong { display:block; font-size:12px; }
.sheet-options button small { display:block; color:var(--muted); font-size:9px; margin-top:2px; }
.sheet-input { width:100%; min-height:52px; border:1px solid var(--line); background:var(--surface); color:var(--text); border-radius:16px; padding:0 13px; margin-top:12px; outline:0; }
.sheet-primary { width:100%; min-height:52px; margin-top:9px; border:0; border-radius:16px; background:var(--brand); color:white; font-weight:800; }
.toast { position:fixed; z-index:2000; left:50%; bottom:calc(var(--nav-h) + var(--safe-bottom) + 18px); transform:translate(-50%,20px); opacity:0; pointer-events:none; max-width:calc(100% - 28px); background:#031522; color:white; padding:10px 15px; border-radius:999px; font-size:10px; font-weight:700; box-shadow:0 12px 30px rgba(0,0,0,.28); transition:.2s; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.toast.show { opacity:1; transform:translate(-50%,0); }
@media (min-width:760px) {
  .main-content { padding-left:18px; padding-right:18px; }
  .map-wrap { height:470px; }
  .bottom-nav { left:50%; transform:translateX(-50%); max-width:760px; border-left:1px solid var(--line); border-right:1px solid var(--line); border-radius:22px 22px 0 0; }
}
@media (max-width:360px) {
  .brand-copy small { display:none; }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .screen-heading h1 { font-size:24px; }
  .quick-card { padding:10px; }
}

/* CrewBeacon V1.2 family-first additions */
.map-avatar { width:42px; height:42px; border-radius:15px; background:linear-gradient(145deg,var(--brand),var(--brand-2)); color:white; display:grid; place-items:center; font-weight:900; border:3px solid white; box-shadow:0 5px 16px rgba(0,0,0,.25); }
.status-dot.pending { background:var(--accent); box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 15%,transparent); }
.status-dot.error { background:var(--danger); box-shadow:0 0 0 4px color-mix(in srgb,var(--danger) 15%,transparent); }
.invite-chip .avatar.add { background:color-mix(in srgb,var(--brand) 12%,var(--surface-2)); color:var(--brand); font-size:20px; }
.empty-circle-card { text-align:center; display:flex; flex-direction:column; align-items:center; gap:8px; padding:24px 18px; }
.empty-circle-card p { margin:4px auto 6px; color:var(--muted); max-width:380px; font-size:11px; line-height:1.5; }
.empty-circle-icon { width:52px; height:52px; border-radius:18px; display:grid; place-items:center; background:color-mix(in srgb,var(--brand) 10%,transparent); color:var(--brand); font-size:25px; }
.sheet-primary.compact { width:auto; min-width:150px; padding:0 18px; }
.chat-empty { min-height:54svh; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; color:var(--muted); padding:40px 25px 100px; }
.chat-empty > span { font-size:34px; }
.chat-empty strong { color:var(--text); font-size:15px; margin-top:10px; }
.chat-empty p { max-width:300px; font-size:11px; line-height:1.5; }
.location-card .sheet-primary, .optional-activity-card .sheet-primary { margin-top:14px; }
.segment-badge.ready { background:color-mix(in srgb,var(--success) 13%,transparent); color:var(--success); }
.optional-activity-card p { color:var(--muted); font-size:11px; line-height:1.55; margin:12px 0 0; }
.optional-badge { font-size:9px; font-weight:850; letter-spacing:1px; padding:6px 9px; border-radius:999px; background:var(--line); color:var(--muted); }
.optional-badge.on { color:var(--success); background:color-mix(in srgb,var(--success) 13%,transparent); }
.session-privacy-note { display:flex; gap:10px; align-items:center; padding:11px 13px; border-radius:17px; background:color-mix(in srgb,var(--brand) 8%,var(--surface)); border:1px solid color-mix(in srgb,var(--brand) 16%,var(--line)); margin-bottom:7px; }
.session-privacy-note > span { color:var(--brand); font-size:17px; }
.session-privacy-note strong { display:block; font-size:11px; }
.session-privacy-note small { display:block; color:var(--muted); font-size:9px; margin-top:2px; }
.secondary-wide { width:100%; min-height:50px; margin:13px 0 4px; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--text); font-weight:750; }
.history-row { border-top:1px solid var(--line); padding:10px 0; display:grid; grid-template-columns:30px 1fr auto; gap:9px; align-items:center; }
.history-row:first-child { border-top:0; padding-top:0; }
.history-row strong { display:block; font-size:11px; }
.history-row small { display:block; color:var(--muted); font-size:9px; margin-top:2px; }
.history-row em { font-style:normal; font-weight:800; font-size:10px; }
.onboarding { position:fixed; z-index:5000; inset:0; padding:max(22px,var(--safe-top)) 18px max(22px,var(--safe-bottom)); display:grid; place-items:center; background:linear-gradient(155deg,color-mix(in srgb,var(--bg) 90%,var(--brand)),var(--bg)); overflow:auto; }
.onboarding-card { width:min(100%,460px); background:var(--surface-2); border:1px solid var(--line); border-radius:30px; padding:24px; box-shadow:0 28px 80px rgba(0,0,0,.22); }
.onboarding-card > img { width:72px; height:72px; border-radius:20px; margin-bottom:14px; }
.onboarding-card h1 { margin:5px 0 8px; font-size:32px; letter-spacing:-1.2px; }
.onboarding-card > p { color:var(--muted); font-size:12px; line-height:1.55; margin:0 0 18px; }
.onboarding-card > small { display:block; color:var(--muted); font-size:9px; line-height:1.45; margin-top:12px; }
.signup-form { display:flex; flex-direction:column; gap:11px; }
.signup-form label, .sheet-label { display:block; font-size:10px; font-weight:750; color:var(--muted); }
.signup-form input { width:100%; min-height:52px; border:1px solid var(--line); background:var(--surface); color:var(--text); border-radius:16px; padding:0 13px; margin-top:5px; outline:0; }
.sheet-label .sheet-input { margin-top:5px; }

/* CrewBeacon V1.3 map profiles */
.map-provider-chip {
  position:absolute;
  z-index:520;
  top:12px;
  left:12px;
  max-width:calc(100% - 24px);
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.45);
  border-radius:999px;
  background:rgba(4,24,39,.72);
  color:#fff;
  backdrop-filter:blur(12px);
  font-size:9px;
  font-weight:800;
  letter-spacing:.15px;
  box-shadow:0 5px 18px rgba(0,0,0,.16);
  pointer-events:none;
}
.sport-map-wrap {
  position:relative;
  height:31svh;
  min-height:230px;
  max-height:330px;
  border-radius:22px;
  overflow:hidden;
  background:linear-gradient(145deg,#173c51,#0b6c76);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  margin-bottom:8px;
}
.sport-map { width:100%; height:100%; }
.sport-provider-chip { top:11px; left:11px; }
.sport-locate-btn { bottom:12px; right:12px; }
.sport-avatar { width:38px; height:38px; border-radius:14px; }
.accuracy-ring { stroke:var(--brand); fill:var(--brand); }
.maplibregl-map { font:inherit; }
.maplibregl-ctrl-attrib { font-size:8px!important; }
:root[data-theme="dark"] .sport-map-wrap .leaflet-tile-pane { filter:brightness(.72) saturate(.8) contrast(1.12); }
.sport-options button { min-height:62px; }
@media (min-width:760px) {
  .sport-map-wrap { height:300px; }
}

/* CrewBeacon V1.4 work mode */
.work-shift-banner {
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:12px;
  padding:15px 16px;
  margin-bottom:9px;
  border:1px solid var(--line);
  border-radius:22px;
  background:var(--surface);
  box-shadow:0 7px 20px rgba(0,0,0,.025);
  border-left:4px solid var(--muted);
}
.work-shift-banner.active { border-left-color:var(--success); background:color-mix(in srgb,var(--success) 5%,var(--surface)); }
.work-shift-banner strong { display:block; font-size:19px; margin-top:2px; letter-spacing:-.4px; }
.work-shift-banner small { display:block; color:var(--muted); font-size:9px; margin-top:3px; }
.shift-button { min-width:104px; min-height:48px; border:0; border-radius:16px; background:var(--brand); color:#fff; font-size:11px; font-weight:850; }
.shift-button.danger { background:var(--danger); }
.work-privacy { margin-bottom:9px; }
.work-map-wrap {
  position:relative;
  height:34svh;
  min-height:255px;
  max-height:380px;
  overflow:hidden;
  border-radius:23px;
  border:1px solid var(--line);
  background:linear-gradient(145deg,#173c51,#0b6c76);
  box-shadow:var(--shadow);
}
.work-map { width:100%; height:100%; }
.work-locate-btn { right:12px; bottom:12px; }
.work-map-crosshair {
  position:absolute;
  z-index:480;
  left:50%; top:50%;
  transform:translate(-50%,-50%);
  width:34px; height:34px;
  border-radius:50%;
  display:grid; place-items:center;
  color:rgba(7,29,49,.44);
  font-size:28px;
  font-weight:300;
  pointer-events:none;
  text-shadow:0 1px 2px rgba(255,255,255,.7);
}
:root[data-theme="dark"] .work-map-crosshair { color:rgba(255,255,255,.55); text-shadow:0 1px 2px rgba(0,0,0,.8); }
.work-user-avatar { box-shadow:0 6px 18px rgba(0,0,0,.28); }
.work-pin { width:38px; height:38px; border-radius:15px 15px 15px 5px; transform:rotate(-45deg); display:grid; place-items:center; color:white; font-weight:900; border:2px solid white; box-shadow:0 6px 18px rgba(0,0,0,.28); }
.work-pin::before { transform:rotate(45deg); }
.base-pin { background:var(--success); font-size:0; }
.base-pin::before { content:'⌂'; font-size:18px; }
.stop-pin { background:var(--brand); }
.stop-pin.done { background:var(--muted); opacity:.75; }
.stop-pin { line-height:1; }
.work-pin.stop-pin { color:transparent; font-size:0; }
.work-pin.stop-pin::before { content:attr(data-label); }
/* Leaflet div icons cannot reliably expose generated text through attrs in every browser; keep visible numbering via inner content rotation fix. */
.stop-pin { color:#fff; font-size:11px; }
.stop-pin::before { content:none; }
.stop-pin { transform:rotate(0); border-radius:14px 14px 14px 4px; }
.work-eta-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:10px; }
.eta-card { min-height:105px; padding:14px; border:1px solid var(--line); border-radius:20px; background:var(--surface); display:flex; flex-direction:column; }
.eta-card span { font-size:9px; font-weight:850; color:var(--muted); letter-spacing:.8px; }
.eta-card strong { font-size:30px; letter-spacing:-1.2px; margin:5px 0 3px; }
.eta-card small { margin-top:auto; color:var(--muted); font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.eta-meta { min-height:38px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:2px 5px 0; }
.eta-meta > span { color:var(--muted); font-size:9px; line-height:1.35; }
.work-driver-focus { margin-top:9px; padding:16px; border:1px solid color-mix(in srgb,var(--brand) 20%,var(--line)); border-radius:22px; background:color-mix(in srgb,var(--brand) 5%,var(--surface)); }
.work-driver-focus h2 { margin:2px 0 0; font-size:20px; }
.work-driver-focus > p { margin:11px 0 0; }
.work-action-row { display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:7px; margin-top:13px; }
.work-action { min-height:48px; border:1px solid var(--line); border-radius:15px; background:var(--surface-2); font-size:10px; font-weight:800; }
.work-action.primary { background:var(--brand); color:white; border-color:transparent; }
.work-action:disabled { opacity:.38; }
.work-stop-list { display:flex; flex-direction:column; margin-top:10px; padding:0; }
.work-stop { display:grid; grid-template-columns:34px 1fr auto; gap:9px; align-items:center; min-height:72px; padding:9px 0; border-top:1px solid var(--line); }
.work-stop:first-child { border-top:0; }
.work-stop.done { opacity:.58; }
.stop-order { width:30px; height:30px; border-radius:11px; display:grid; place-items:center; background:color-mix(in srgb,var(--brand) 11%,transparent); color:var(--brand); font-weight:900; font-size:11px; }
.stop-main { min-width:0; }
.stop-main strong { display:block; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stop-main small { display:block; margin-top:2px; color:var(--muted); font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stop-status { display:block; margin-top:4px; color:var(--brand); font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.35px; }
.stop-controls { display:flex; gap:4px; }
.stop-controls button { width:31px; height:35px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); font-size:10px; font-weight:800; }
.work-driver-list { display:flex; flex-direction:column; margin-top:9px; }
.work-driver { min-height:61px; display:grid; grid-template-columns:42px 1fr auto; gap:9px; align-items:center; border-top:1px solid var(--line); padding:8px 0; }
.work-driver:first-child { border-top:0; }
.work-driver .avatar { width:42px; height:42px; border-radius:15px; }
.work-driver strong { display:block; font-size:11px; }
.work-driver small { display:block; color:var(--muted); font-size:8px; margin-top:2px; }
.work-driver em { font-style:normal; font-size:8px; font-weight:800; color:var(--muted); padding:6px 8px; border-radius:999px; background:var(--line); }
.work-driver em.live { color:var(--success); background:color-mix(in srgb,var(--success) 12%,transparent); }
.coordinate-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }
.sheet-inline-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:9px; }
.sheet-inline-actions button { min-height:46px; border:1px solid var(--line); background:var(--surface); border-radius:14px; font-size:10px; font-weight:750; }
.sheet-options button.selected { border-color:var(--brand); background:color-mix(in srgb,var(--brand) 9%,var(--surface)); }
@media (min-width:760px){ .work-map-wrap { height:340px; } }
@media (max-width:390px){
  .work-action-row { grid-template-columns:1fr 1fr; }
  .work-action.primary { grid-column:1 / -1; }
  .stop-controls button:nth-child(-n+2) { display:none; }
  .work-shift-banner { grid-template-columns:1fr; }
  .shift-button { width:100%; }
}

/* V1.5 shared Work Crew cloud */
.work-cloud-bar { width:100%; margin:9px 0 0; min-height:56px; border:1px solid var(--line); border-radius:18px; background:var(--surface); color:var(--text); display:grid; grid-template-columns:12px 1fr auto; gap:10px; align-items:center; padding:10px 13px; text-align:left; box-shadow:var(--shadow-soft); }
.work-cloud-bar strong { display:block; font-size:10px; }
.work-cloud-bar small { display:block; margin-top:2px; color:var(--muted); font-size:8px; }
.cloud-dot { width:9px; height:9px; border-radius:999px; background:var(--muted); box-shadow:0 0 0 4px color-mix(in srgb,var(--muted) 12%,transparent); }
#workCloudStatus.ready + small { color:var(--muted); }
.work-cloud-bar:has(#workCloudStatus.ready) .cloud-dot { background:var(--success); box-shadow:0 0 0 4px color-mix(in srgb,var(--success) 14%,transparent); }
.work-driver.cloud-driver { width:100%; border:0; border-top:1px solid var(--line); background:transparent; color:var(--text); text-align:left; cursor:pointer; }
.work-driver.cloud-driver:first-child { border-top:0; }
.work-driver.cloud-driver.selected { margin:3px 0; padding-left:7px; padding-right:7px; border:1px solid color-mix(in srgb,var(--brand) 32%,var(--line)); border-radius:15px; background:color-mix(in srgb,var(--brand) 7%,var(--surface)); }
.work-crew-avatar { border:2px solid var(--surface); box-shadow:0 4px 12px rgba(0,0,0,.22); }
.work-crew-avatar.selected { outline:3px solid color-mix(in srgb,var(--brand) 46%,transparent); }
.work-crew-avatar.stale { opacity:.62; filter:saturate(.55); }
.cloud-connected,.cloud-setup { margin:13px 0; padding:12px; border:1px solid var(--line); border-radius:16px; background:color-mix(in srgb,var(--brand) 4%,var(--surface)); }
.cloud-connected strong,.cloud-setup strong { display:block; font-size:11px; }
.cloud-connected small,.cloud-setup small { display:block; color:var(--muted); margin-top:4px; font-size:8px; line-height:1.45; }
.cloud-actions { display:grid; gap:8px; margin-top:12px; }
.invite-code-input { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-weight:900; letter-spacing:2px; text-transform:uppercase; }
.invite-code-display { margin:14px 0; padding:18px 12px; border:1px dashed color-mix(in srgb,var(--brand) 45%,var(--line)); border-radius:16px; text-align:center; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-weight:900; font-size:24px; letter-spacing:4px; background:color-mix(in srgb,var(--brand) 5%,var(--surface)); }
