:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#243447;background:#edf4f9;color-scheme:light;-webkit-text-size-adjust:100%;text-size-adjust:100%;--blue:#087ead;--muted:#627b8e;--line:#d7e5ee}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 0,#f9fdff,#edf4f9 70%)}a{color:inherit;text-decoration:none}button,select{font:inherit}button{cursor:pointer;border:0}button:disabled{opacity:.5;cursor:default}button,a,select{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #087ead;outline-offset:3px}[hidden]{display:none!important}.journey-header{min-height:54px;padding:8px max(24px,env(safe-area-inset-right)) 8px max(24px,env(safe-area-inset-left));display:flex;align-items:center;justify-content:space-between;gap:16px;background:linear-gradient(110deg,#d9efff,#e9f8ff 55%,#d8f4ee);border-bottom:2px solid #8ccadf}.brand{font-size:22px;font-weight:800;letter-spacing:1px;color:#075f8f;display:flex;align-items:center;gap:18px}.brand span{font-size:9px;letter-spacing:1.3px;font-weight:600;color:#527b90}.back-link{font-size:13px;font-weight:600;color:#245875;white-space:nowrap;padding:9px 12px;background:#ffffffb8;border:1px solid #afd4e5;border-radius:10px}main{max-width:1440px;margin:auto;padding:28px max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left))}.intro{display:flex;align-items:center;justify-content:space-between;gap:16px}.eyebrow{font-size:10px;font-weight:700;color:#2586a3;letter-spacing:1.7px;margin:0 0 8px}h1{font-size:30px;letter-spacing:-.7px;line-height:1.2;margin:0 0 8px}h2{font-size:17px;margin:0;font-weight:650}.description{font-size:14px;color:var(--muted);line-height:1.6;margin:0}.live-badge{display:flex;align-items:center;gap:7px;flex-shrink:0;padding:8px 12px;border:1px solid #cfdee8;border-radius:20px;background:#f6f9fc;color:#607a8b;font-size:12px;font-weight:600}.live-badge.active{background:#e0f8ee;color:#177856;border-color:#a6deca}.live-badge.active::before{content:"";width:7px;height:7px;background:#10a87c;border-radius:50%}.journey-layout{margin-top:20px;display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}.map-card{position:relative;overflow:hidden;border:1px solid #cbdfe9;border-radius:18px;background:#dfeaf0;box-shadow:0 6px 24px #315b7110}#map{height:clamp(360px,calc(100dvh - 245px),740px);min-height:360px;background:#e4edf2;z-index:0}.map-actions{position:absolute;z-index:500;top:12px;right:12px;display:flex;gap:7px;max-width:calc(100% - 70px)}.map-actions button{min-height:42px;padding:9px 12px;border-radius:10px;background:#fffffff2;border:1px solid #c8dbe6;color:#216581;font-size:12px;font-weight:600;box-shadow:0 2px 10px #284f6b16}.map-key{display:flex;align-items:center;gap:20px;padding:13px 16px;background:#fff;color:#526d80;font-size:12px}.map-key span,.section-label{display:flex;align-items:center;gap:8px}.dot{display:inline-block;flex-shrink:0;width:10px;height:10px;border-radius:50%;background:#168bd1}.dot.mine{background:#10a77b}.journey-sidebar{display:flex;flex-direction:column;gap:16px;min-width:0}.my-card,.nearby-card{padding:20px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 3px 14px #315b7106}.my-card{border-top:3px solid #20af89}.my-name{margin:14px 0 6px;font-size:21px;font-weight:700;overflow-wrap:anywhere}#location-status{font-size:13px;line-height:1.65;color:#47687d;margin:0 0 10px}.details,.next-update,.nearby-note{font-size:12px;line-height:1.7;color:var(--muted);margin:6px 0;overflow-wrap:anywhere}.next-update{color:#148367;font-weight:550}.my-actions{display:flex;gap:8px;margin-top:18px}.my-actions button{flex:1;min-height:44px;border-radius:10px;padding:9px 10px;font-size:12px;font-weight:650}.primary{background:var(--blue);color:white}.primary:hover{background:#066d97}.secondary{border:1px solid #d6e1e9;background:#f5f8fb;color:#536d80}.secondary:hover{background:#eaf1f7}.nearby-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.nearby-heading h2{font-size:16px}.nearby-heading h2 span{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:7px;background:#e4f2fa;color:#087ead;font-size:12px;margin-left:4px}.nearby-heading label{display:flex;align-items:center;gap:4px;color:#718494;font-size:11px;white-space:nowrap}select{background:#f5f9fc;border:1px solid #cfdfeb;border-radius:8px;padding:6px;color:#34617a;min-height:40px;font-size:16px;max-width:88px}.nearby-note{margin:9px 0 12px}#nearby-list{max-height:370px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.neighbor{display:flex;align-items:center;gap:10px;text-align:left;width:100%;min-height:72px;padding:12px 0;background:#fff;border-top:1px solid #eaf0f5;color:inherit}.neighbor:hover{background:#f7fbff}.neighbor-avatar{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border-radius:12px;background:#e6f3fc;color:#137faf;font-weight:700}.neighbor-info{flex:1;min-width:0}.neighbor-name{display:block;font-size:14px;font-weight:600;overflow-wrap:anywhere}.neighbor-time{display:block;color:#71889a;font-size:11px;line-height:1.5;margin-top:4px}.neighbor-distance{font-size:11px;color:#147fa4;font-weight:650;white-space:nowrap}.empty{font-size:13px;line-height:1.8;color:#71889a;margin:14px 0}.leaflet-popup-content{font:13px/1.7 Inter,system-ui,sans-serif;color:#31536b}.leaflet-popup-content strong{display:block;color:#243447;font-size:14px;overflow-wrap:anywhere}.map-error{position:absolute;bottom:50px;left:12px;right:12px;z-index:500;margin:0;padding:10px 12px;background:#fff6e9;border:1px solid #efd5a9;border-radius:10px;color:#7e5e2e;font-size:12px;line-height:1.6}
@media(max-width:1000px){.journey-layout{grid-template-columns:minmax(0,1fr) 310px;gap:14px}.my-card,.nearby-card{padding:16px}.brand span{display:none}}
@media(max-width:720px), (height:662px){.journey-header{min-height:48px;padding:6px max(14px,env(safe-area-inset-right)) 6px max(14px,env(safe-area-inset-left))}.brand{font-size:20px}.back-link{font-size:12px;padding:8px 10px}main{padding:20px max(12px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}h1{font-size:25px}.description{font-size:13px}.live-badge{font-size:10px;padding:7px 9px}.journey-layout{margin-top:16px;grid-template-columns:1fr}#map{height:55vh;height:55dvh;min-height:300px;max-height:520px}.journey-sidebar{gap:12px}.my-card,.nearby-card{padding:18px}.my-actions button{font-size:13px}.neighbor-name{font-size:16px}.neighbor-time,.neighbor-distance{font-size:12px}#nearby-list{max-height:none}.map-actions button{min-height:44px}.map-key{font-size:11px}}
@media(max-height:500px){main{padding-top:14px}.intro h1{font-size:24px}.eyebrow{margin-bottom:5px}.journey-layout{margin-top:16px;grid-template-columns:1fr}#map{height:calc(100vh - 140px);height:calc(100dvh - 140px);min-height:230px;max-height:400px}.journey-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:12px}.my-card,.nearby-card{padding:15px}.my-name{font-size:18px}}
@media(max-width:450px){.journey-sidebar{display:flex}.intro{align-items:flex-start;gap:8px}h1{font-size:23px}.eyebrow{font-size:9px}.live-badge{max-width:110px;text-align:center}.map-actions{gap:5px}.map-actions button{padding:8px;font-size:11px}}

.journey-cluster {
  display:grid;place-items:center;border:3px solid white;border-radius:50%;
  background:#075f8f;color:white;font-weight:700;box-shadow:0 2px 10px #244e7055;
}
.cluster-list > div + div { margin-top:10px;padding-top:10px;border-top:1px solid var(--line); }
.vehicle-actions { display:flex;gap:8px;flex-wrap:wrap;margin:0 0 8px; }
.leaflet-popup-content .vehicle-actions { margin:8px 0 0; }
.vehicle-actions a,.vehicle-actions button,#chat button {
  display:inline-flex;align-items:center;justify-content:center;min-height:40px;
  padding:6px 12px;border-radius:8px;font-size:13px;font-weight:650;
}
.vehicle-actions a,.vehicle-actions button { background:#e6f3fc;color:#075f8f; }
#chat {
  width:min(460px,calc(100% - 24px));max-height:calc(100dvh - 24px);
  border:1px solid var(--line);border-radius:16px;padding:16px;color:inherit;
}
#chat::backdrop { background:#18344880; }
.chat-heading,#chat-form { display:flex;justify-content:space-between;align-items:center;gap:10px; }
#chat-log { height:min(42dvh,300px);overflow-y:auto;margin-top:10px;background:#f5f9fc;border-radius:8px;padding:8px; }
#chat-log p { margin:4px 12% 8px 0;padding:8px;border-radius:8px;background:#fff;overflow-wrap:anywhere; }
#chat-log .chat-mine { margin:4px 0 8px 12%;background:#e0f8ee; }
#chat-status { font-size:13px;color:var(--muted);min-height:1em; }
#chat-text { flex:1;min-width:0;font:inherit;padding:9px;border:1px solid var(--line);border-radius:8px; }

.edit-vehicle { display:inline-block;margin-top:8px;padding:8px 0;color:#075f8f;font-size:13px;font-weight:650; }
.my-vehicle-row,.vehicle-popup-heading { display:flex;align-items:center;gap:8px; }
.my-vehicle-row { margin:4px 0 8px; }
.my-vehicle-row .my-name { margin:0; }
.vehicle-thumbnail { display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:10px;background:#e6f3fc; }
.vehicle-thumbnail svg,.neighbor-avatar svg { display:block;width:31px;height:31px; }
.journey-pin {
  display:grid;place-items:center;border:2px solid #197aa8;border-radius:50%;
  background:#fff;box-shadow:0 2px 8px #183b5552;
}
.journey-pin svg { display:block;width:34px;height:34px; }
.journey-cluster { font-size:15px; }
.vehicle-popup-heading { margin-bottom:5px; }
.leaflet-popup-content .vehicle-actions { display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:10px; }
.leaflet-popup-content .vehicle-actions a,.leaflet-popup-content .vehicle-actions button {
  min-height:44px;padding:6px;text-align:center;line-height:1.2;
}
.vehicle-actions button.vehicle-chat { background:#087ead;color:#fff; }

.journey-self { display:grid;justify-items:center; }
.journey-self::after {
  content:"";
  position:absolute;
  top:43px;
  left:18px;
  width:12px;
  height:12px;
  border-radius:0 0 3px;
  background:#087a64;
  transform:rotate(45deg);
}
.journey-self-car {
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  border:3px solid #087a64;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 9px #123e3852;
}
.journey-self-car svg { width:38px;height:38px; }
.journey-self-label {
  position:absolute;
  bottom:calc(100% + 4px);
  padding:3px 9px;
  border:2px solid #fff;
  border-radius:20px;
  background:#087a64;
  color:#fff;
  font:700 12px/1.2 system-ui,sans-serif;
  white-space:nowrap;
  box-shadow:0 2px 6px #123e3840;
}
