:root{color-scheme:dark}*{box-sizing:border-box}html,body{margin:0;height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#101114;color:#fff}body{overflow:hidden}#app{height:100%;display:flex;flex-direction:column}header{padding:calc(env(safe-area-inset-top) + 10px) 14px 10px;background:#15171c;border-bottom:1px solid #2a2d34}.title{font-size:19px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.subtitle{margin-top:3px;font-size:12px;color:#aeb5c0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#map{flex:1;min-height:260px;background:#0b0c0e}.bottom{background:#15171c;border-top:1px solid #2a2d34;padding:10px 12px calc(env(safe-area-inset-bottom) + 10px)}.status{text-align:center;font-weight:800;padding:9px 10px;border-radius:10px;background:#2a2d34;margin-bottom:9px;font-size:14px}.status.ok{background:#173b29}.status.warn{background:#59211e}.status.info{background:#1d334f}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:9px}.stat{background:#1e2127;border-radius:11px;padding:9px 6px;text-align:center}.val{font-size:19px;font-weight:800}.lbl{font-size:9px;color:#aeb5c0;text-transform:uppercase;letter-spacing:.08em;margin-top:2px}.controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.shareRow{margin-top:8px;display:grid;grid-template-columns:1fr;gap:8px}.shareHint{margin-top:7px;font-size:10px;color:#aeb5c0;text-align:center}.small{margin-top:8px;font-size:10px;color:#9097a3;text-align:center}button,.fileLabel{border:0;border-radius:12px;padding:12px 10px;font-size:14px;font-weight:800;text-align:center;cursor:pointer}.fileLabel{background:#fff;color:#111}button.primary{background:#fff;color:#111}button.secondary{background:#30343d;color:#fff}button.share{background:#1d6fe8;color:#fff}button.share.ready{background:#21a366}button:disabled{opacity:.45}input[type=file]{display:none}.rider-dot{width:28px;height:28px;border-radius:5px;background:#fff;color:#111;border:3px solid #111;box-shadow:0 0 0 3px rgba(255,255,255,.35);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900;line-height:1}.start-dot{width:12px;height:12px;border-radius:50%;background:#fff;border:2px solid #111}.finish-dot{width:14px;height:14px;border-radius:3px;background:#fff;border:2px solid #111}.leaflet-control-attribution{font-size:8px}.auth-overlay{position:fixed;inset:0;z-index:9999;background:#101114;display:flex;align-items:center;justify-content:center;padding:24px}.auth-card{width:min(420px,100%);background:#15171c;border:1px solid #2a2d34;border-radius:16px;padding:20px}.auth-card h1{font-size:22px;margin:0 0 8px}.auth-card p{font-size:13px;color:#aeb5c0;margin:0 0 16px}.auth-card input{width:100%;border:1px solid #343943;border-radius:10px;background:#0f1115;color:#fff;padding:12px;margin:0 0 10px;font-size:16px}.auth-card button{width:100%;background:#fff;color:#111}.auth-error{min-height:18px;color:#ff918a;font-size:12px;margin-top:10px}.hidden{display:none!important}

.riderRow{display:grid;grid-template-columns:1fr 48px;gap:8px;margin-bottom:9px}.rider-name-input{width:100%;border:1px solid #343943;border-radius:12px;background:#0f1115;color:#fff;padding:11px 12px;font-size:15px;outline:none}.rider-name-input:focus{border-color:#6f7785}.initials-preview{border-radius:12px;background:#fff;color:#111;border:3px solid #111;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:900}.rider-name-input::placeholder{color:#7f8793}

.fileLabel.disabled{opacity:.45;cursor:not-allowed;pointer-events:none}


/* Compact command rail + sponsor inventory */
.bottomActionRow{display:grid;grid-template-columns:minmax(0,1fr) 118px;gap:10px;align-items:stretch;margin-top:2px}
.commandStack{display:grid;grid-template-columns:1fr;gap:6px;align-content:stretch}
.commandStack .compactBtn{min-height:34px;padding:7px 6px;border-radius:9px;font-size:11px;line-height:1.05;display:flex;align-items:center;justify-content:center}
.ad-slot{min-height:114px;border:1px dashed #5b6370;border-radius:12px;background:linear-gradient(145deg,#1c1f25,#121419);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:10px;color:#c8ced7;overflow:hidden}
.ad-slot-kicker{font-size:8px;letter-spacing:.16em;color:#7f8793;font-weight:800}
.ad-slot-title{font-size:18px;font-weight:900;letter-spacing:.04em;margin-top:3px}
.ad-slot-size{font-size:9px;color:#8f97a3;margin-top:4px}
@media(max-width:380px){.bottomActionRow{grid-template-columns:minmax(0,1fr) 104px;gap:8px}.commandStack .compactBtn{font-size:10px}.ad-slot-title{font-size:16px}}

/* Permanent 320x100 sponsor placement */
.ad-slot{width:320px;height:100px;max-width:100%;padding:0;overflow:hidden;}
.ad-slot .ad-image{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit;}
.guest-dot{width:28px;height:28px;border-radius:5px;background:#2f80ed;color:#fff;border:3px solid #fff;box-shadow:0 0 0 2px #111;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900;line-height:1}

/* Compact rider roster */
.riders-box{background:#0f1115;border:1px solid #343943;border-radius:10px;padding:7px 9px;margin-bottom:8px;display:grid;grid-template-columns:58px 1fr;gap:8px;align-items:center}
.riders-box-title{font-size:10px;font-weight:900;letter-spacing:.12em;color:#aeb5c0}
.riders-list{font-size:12px;font-weight:700;line-height:1.35;white-space:normal;overflow:hidden;text-overflow:ellipsis}
.rider-roster-item{display:inline-flex;align-items:center;margin-right:12px;max-width:46%}
.rider-roster-swatch{width:9px;height:9px;border-radius:2px;margin-right:5px;flex:0 0 auto}
.rider-roster-swatch.lead{background:#fff;border:1px solid #111}
.rider-roster-swatch.guest{background:#2f80ed;border:1px solid #fff}

/* iPhone watch view: remove Last Update card to give the map more vertical room. */
@media (max-width: 600px), ((hover: none) and (pointer: coarse) and (max-height: 1000px)) {
  .watch-page .watch-last-update{display:none!important}
  .watch-page .stats{grid-template-columns:repeat(3,1fr);margin-bottom:0}
  .watch-page .bottom{padding-top:8px}
}

/* iPhone watch view: hide connection/receiving-data status bar to maximize map height. */
@media (max-width: 600px), ((hover: none) and (pointer: coarse) and (max-height: 1000px)) {
  .watch-page #status{display:none!important}
  .watch-page .riders-box{margin-top:0}
  .watch-page .bottom{padding-top:6px}
}

/* Watch layout: Last Update card removed everywhere so the map gets more vertical room. */
.watch-page .stats{grid-template-columns:repeat(3,1fr);margin-bottom:0}

/* v11: maximize map space — no sponsor banner, four controls in one horizontal row */
.ad-slot{display:none!important}
.bottomActionRow{display:block;margin-top:2px}
.commandStack{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.commandStack .compactBtn{min-height:34px;padding:7px 4px;border-radius:9px;font-size:11px;line-height:1.05}
@media(max-width:430px){
  .commandStack{gap:4px}
  .commandStack .compactBtn{font-size:10px;padding:7px 2px}
}

/* v22 standard single-rider UI */
.commandStack{grid-template-columns:repeat(3,minmax(0,1fr))!important}

/* v23 customer entry */
.customerIntro{text-align:center;margin:0 0 14px;font-size:14px;line-height:1.35}
.customerIntro strong{font-size:24px;letter-spacing:.3px}
.customerIntro span{opacity:.78}
.logoutBtn{display:block;width:auto;margin:4px 0 5px auto;padding:6px 12px!important;min-height:30px!important;font-size:11px!important}

/* v24 rider onboarding */
#riderSetupOverlay{z-index:10020}
#riderSetupForm label{display:block;margin:9px 0 4px;font-size:12px;font-weight:700}
#riderSetupForm input{width:100%;box-sizing:border-box;margin:0 0 5px}
#riderSetupForm button{width:100%;margin-top:10px}

/* v32: setup-first monetization preview */
.go-live-card{max-width:520px;max-height:calc(100dvh - 48px);overflow-y:auto;overscroll-behavior:contain}
.pass-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:14px 0}
.pass-choice{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:14px 12px;border-radius:12px}
.pass-choice strong,.pass-choice span{font-size:15px}
.purchase-test,.tester-area{margin-top:12px;padding:11px;border:1px solid #303641;border-radius:11px}
.purchase-test small{display:block;margin:5px 0 9px;opacity:.75}
.purchase-test button,.tester-area button{width:100%;margin-top:8px}
.tester-link{width:100%;margin-top:8px;background:#263f64!important;color:#fff!important;border:2px solid #91bbff!important;text-decoration:underline;min-height:48px}
.tester-area input{width:100%;box-sizing:border-box}
.back-route-btn{width:100%;margin-top:12px}

/* v34 password recovery */
.forgot-password-btn{width:100%;margin-top:8px;background:transparent!important;color:#e9efff!important;border:0!important;text-decoration:underline;padding:8px!important;min-height:44px}
.forgot-password-btn:focus-visible{outline:2px solid #fff;outline-offset:2px}
#passwordResetStatus{margin-top:6px;min-height:18px}

.finish-hint{color:#c5d3e7;text-align:center;font-size:12px;margin:-3px 0 7px;min-height:0}
.finish-hint:empty{display:none}
.finish-banner{border:2px solid #77db9c;border-radius:12px;background:#124c31;color:#fff;padding:12px;text-align:center;margin:0 0 9px;display:flex;flex-direction:column;gap:3px}
.finish-banner strong{font-size:20px}
.finish-banner span{font-size:13px}

.build-label{position:absolute;right:14px;top:calc(env(safe-area-inset-top) + 10px);font-size:11px;color:#aeb5c0;font-weight:700}

/* Build 45: unmistakable completed-ride marker */
.rider-dot-finished{background:#22c55e!important;color:#07140b!important;border-color:#fff!important;box-shadow:0 0 0 4px rgba(34,197,94,.35),0 0 18px rgba(34,197,94,.95);animation:wmdFinishBounce .65s ease-in-out infinite}
@keyframes wmdFinishBounce{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-14px) scale(1.12)}}

/* Build 46: stronger finish celebration */
.rider-dot-finished{background:#00e676!important;color:#001b0b!important;border:4px solid #fff!important;box-shadow:0 0 0 5px #00e676,0 0 28px #00e676!important;animation:wmdFinishBounce46 .5s cubic-bezier(.2,.8,.3,1) infinite!important;will-change:transform}
@keyframes wmdFinishBounce46{0%,100%{transform:translateY(0) scale(1)}45%{transform:translateY(-22px) scale(1.25)}60%{transform:translateY(-18px) scale(1.18)}}
.finish-celebration{background:#00e676!important;color:#001b0b!important;border-color:#fff!important;font-weight:900!important}

/* v49 scheduled ride start */
.ride-start-row{margin:10px 0;display:grid;gap:6px}.ride-start-row label{font-weight:800}.ride-start-row input{width:100%;box-sizing:border-box;padding:10px 12px;border-radius:10px;border:1px solid #aaa;font-size:16px;background:#fff;color:#111}

/* v56: force route-before-start-time setup order */
.ride-start-row.route-required{border:3px solid #d97706;background:#fff7ed;padding:12px;border-radius:12px}
.route-first-notice{font-weight:900;font-size:17px;text-align:center;padding:10px;border-radius:9px;background:#d97706;color:#fff;letter-spacing:.2px}
.route-first-notice.route-loaded{background:#15803d}
.ride-start-row input:disabled,.ride-start-row button:disabled{opacity:.42;cursor:not-allowed;filter:grayscale(1)}
.ride-start-row.route-required label{opacity:.5}


/* v57: compact action controls aligned to one side */
.bottomActionRow{display:flex!important;justify-content:flex-end!important;margin-top:6px}
.commandStack{display:flex!important;flex-wrap:wrap;justify-content:flex-end;gap:6px;width:auto!important}
.commandStack .compactBtn{width:auto!important;min-width:82px;min-height:34px;padding:7px 12px!important;font-size:11px}
@media(max-width:420px){.commandStack .compactBtn{min-width:76px;padding:7px 9px!important;font-size:10px}}

/* v58 compact start controls: no full-width date/time or action buttons */
.ride-start-row{justify-items:start!important}
.ride-start-row input{width:310px!important;max-width:100%!important;min-height:38px!important;padding:7px 10px!important}
.ride-start-row #saveRideStartBtn{width:auto!important;min-width:125px!important;max-width:180px!important;padding:8px 14px!important;justify-self:start!important}
@media(max-width:420px){.ride-start-row input{width:270px!important}.ride-start-row #saveRideStartBtn{min-width:115px!important}}

/* Build 59: compact inline route loader + consistent black setup surface */
.bottom{background:#000!important;}
.ride-start-row,.ride-start-row.route-required{background:#000!important;border:1px solid #2a2d34!important;padding:10px!important;border-radius:10px!important;}
.route-first-notice,.route-first-notice.route-loaded{width:100%;display:flex!important;align-items:center;justify-content:space-between;gap:10px;background:#000!important;color:#fff!important;border:1px solid #343943;padding:8px 10px!important;text-align:left!important;font-size:14px!important;}
.route-first-notice.route-loaded{border-color:#15803d!important;}
.inline-load-route{display:inline-flex!important;width:auto!important;min-width:78px!important;min-height:30px!important;padding:6px 10px!important;border-radius:8px!important;font-size:11px!important;flex:0 0 auto;background:#fff!important;color:#111!important;}
.ride-start-row.route-required label{opacity:1!important;}
.ride-start-row>label{color:#fff!important;}
.ride-start-row input{background:#111318!important;color:#fff!important;border-color:#343943!important;}
#rideStartSaved{color:#9097a3!important;}
@media(max-width:420px){.route-first-notice{font-size:12px!important}.inline-load-route{min-width:72px!important;padding:6px 8px!important;font-size:10px!important;}}

/* Build 60 compact setup controls */
.route-first-notice,.route-first-notice.route-loaded{width:max-content!important;max-width:100%!important;justify-content:flex-start!important;}
.start-time-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;width:max-content;max-width:100%;}
.start-time-line>label{white-space:nowrap;font-size:13px;}
.ride-start-row input{width:auto!important;min-width:215px!important;max-width:245px!important;}
.ride-start-row #saveRideStartBtn{min-width:0!important;max-width:none!important;width:auto!important;white-space:nowrap!important;padding:8px 11px!important;}
.ride-start-row #saveRideStartBtn.saved:disabled{opacity:1!important;background:#188a4a!important;color:#fff!important;border:1px solid #56d991!important;cursor:default}
.riderRow{display:flex!important;align-items:center;gap:6px!important;width:max-content!important;max-width:100%;}
.rider-name-input{width:220px!important;max-width:calc(100vw - 90px)!important;padding:7px 9px!important;font-size:12px!important;border-radius:8px!important;}
.initials-preview{width:42px!important;height:32px!important;flex:0 0 42px!important;border-radius:8px!important;font-size:11px!important;}
.logoutBtn{margin:8px auto 0 0!important;}
@media(max-width:520px){.start-time-line{align-items:flex-start}.start-time-line>label{width:100%}.ride-start-row input{min-width:200px!important}.rider-name-input{width:190px!important}}

/* Separate native date and time controls keep both values readable on mobile. */
.ride-start-row #rideStartInput{width:170px!important;min-width:150px!important;max-width:190px!important}
.ride-start-row #rideStartClock{width:130px!important;min-width:110px!important;max-width:150px!important}

/* Explicit AM/PM makes typed times unambiguous. Loaded routes lock the loader. */
.ride-start-row #rideStartPeriod{background:#111318;color:#fff;border:1px solid #343943;border-radius:8px;padding:7px 6px;min-height:34px;font-size:13px;width:65px;max-width:65px}
.inline-load-route.disabled{opacity:.45!important;pointer-events:none!important;cursor:not-allowed!important}

/* Tab moves between fixed date and time segments; punctuation stays visible. */
.start-parts{display:inline-flex;align-items:center;gap:3px;background:#111318;border:1px solid #343943;border-radius:8px;padding:2px 5px;white-space:nowrap}
.start-parts span{font-size:17px;color:#fff;font-weight:700}
.ride-start-row .start-parts input{width:34px!important;min-width:34px!important;max-width:34px!important;padding:5px 2px!important;text-align:center;border:0!important;background:transparent!important;font-size:14px!important}
.ride-start-row .start-parts #rideStartYear{width:55px!important;min-width:55px!important;max-width:55px!important}
.ride-start-row #rideStartZone{background:#111318;color:#fff;border:1px solid #343943;border-radius:8px;padding:7px 6px;min-height:34px;font-size:13px;max-width:150px}

/* Build 70: keep the rider screen inside narrow iPhone viewports. */
@media (max-width:600px){
  body:not(.watch-page){overflow:hidden;width:100%;}
  body:not(.watch-page) #app{height:100dvh;width:100%;max-width:100vw;min-width:0;overflow:hidden;}
  body:not(.watch-page) header{flex:0 0 auto;min-width:0;padding-right:72px;}
  body:not(.watch-page) #map{flex:1 1 auto;min-height:clamp(100px,20dvh,160px);min-width:0;}
  body:not(.watch-page) .bottom{flex:0 1 auto;min-height:0;max-height:55dvh;width:100%;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:8px 10px calc(env(safe-area-inset-bottom) + 12px)!important;}
  body:not(.watch-page) .bottom>*{max-width:100%;min-width:0;}
  body:not(.watch-page) .ride-start-row{width:100%;max-width:100%;min-width:0;}
  body:not(.watch-page) .route-first-notice{width:100%!important;max-width:100%!important;min-width:0;flex-wrap:wrap;overflow-wrap:anywhere;}
  body:not(.watch-page) .start-time-line{width:100%;max-width:100%;min-width:0;gap:6px;}
  body:not(.watch-page) .start-time-line>label{white-space:normal;line-height:1.2;}
  body:not(.watch-page) .start-parts{max-width:100%;flex-shrink:0;}
  body:not(.watch-page) #rideStartZone{max-width:min(150px,calc(100vw - 32px));}
  body:not(.watch-page) #rideStartSaved,body:not(.watch-page) #shareHint,body:not(.watch-page) .status{overflow-wrap:anywhere;}
  body:not(.watch-page) .riderRow{width:100%!important;max-width:100%!important;min-width:0;}
  body:not(.watch-page) .rider-name-input{min-width:0;max-width:calc(100% - 48px)!important;}
  body:not(.watch-page) .stats>*{min-width:0;}
  body:not(.watch-page) .bottomActionRow,body:not(.watch-page) .commandStack{max-width:100%;min-width:0;}
  body:not(.watch-page) .auth-overlay{width:100vw;max-height:100dvh;overflow-x:hidden;overflow-y:auto;align-items:flex-start;padding:calc(env(safe-area-inset-top) + 12px) 12px calc(env(safe-area-inset-bottom) + 12px);}
  body:not(.watch-page) .auth-card{width:100%;max-width:420px;min-width:0;margin:auto;}
}
@media (max-width:600px) and (max-height:500px){
  body:not(.watch-page) .bottom{max-height:60dvh;}
  body:not(.watch-page) #map{min-height:80px;}
}

/* Build 71: rider identity is already shown above; hide duplicate lower controls. */
.riderRow{display:none !important;}

/* Build 78: once Step 1 is complete, remove the Load Route control from view. */
.route-first-notice.route-loaded .inline-load-route{display:none!important;}

/* Build 79: Step 2 completion mirrors Step 1 completion */
.step2-notice{width:max-content;max-width:100%;display:flex;align-items:center;justify-content:flex-start;gap:10px;background:#000;color:#fff;border:1px solid #343943;padding:8px 10px;border-radius:9px;font-weight:900;font-size:14px;letter-spacing:.2px;}
.step2-notice.step-complete{border-color:#15803d!important;}
@media(max-width:420px){.step2-notice{font-size:12px;}}

/* Build 81 — Step 3 Save Ride */
.step3-notice{width:max-content;max-width:100%;display:flex;align-items:center;justify-content:flex-start;gap:10px;background:#000;color:#fff;border:1px solid #343943;padding:8px 10px;border-radius:9px;font-weight:900;font-size:14px;letter-spacing:.2px;margin-top:8px}
.step3-notice.step-complete{border-color:#15803d!important}
.step3-notice.hidden{display:none!important}
.step3-notice #saveRideBtn.saved:disabled{opacity:1!important;background:#188a4a!important;color:#fff!important;border:1px solid #56d991!important;cursor:default}
@media(max-width:420px){.step3-notice{font-size:12px}}

/* Build 82 distance pricing */
.pricing-menu{margin:10px 0 12px;padding:12px;border:1px solid #303641;border-radius:12px;background:#151922}
.pricing-title{font-weight:800;font-size:15px;letter-spacing:.4px}
.pricing-subtitle{font-size:13px;opacity:.82;margin:2px 0 9px}
.pricing-tiers{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.pricing-tiers div{display:flex;flex-direction:column;gap:3px;padding:8px;border:1px solid #303641;border-radius:9px;text-align:center;font-size:12px}
.pricing-tiers strong{font-size:15px}
.pricing-note{text-align:center;font-size:12px;margin-top:8px;opacity:.85}
.route-price-card{margin:14px 0;display:grid;gap:8px}
.route-price-card div{display:flex;justify-content:space-between;gap:16px;padding:12px;border:1px solid #303641;border-radius:10px}
.route-price-card strong{font-size:18px}
.pricing-tagline{font-size:13px}
@media(max-width:700px){.pricing-tiers{grid-template-columns:1fr 1fr}.pricing-tiers div:last-child{grid-column:1/-1}.pricing-menu{padding:10px}.route-price-card div{padding:10px}}

.restore-ride{padding:12px 16px;background:#111318;border-bottom:1px solid #343b46}.restore-ride form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.restore-ride label,.restore-ride #restoreRideMessage{flex-basis:100%}.restore-ride input{flex:1 1 200px;min-width:0;box-sizing:border-box;padding:12px;border:1px solid #343b46;border-radius:10px;background:#080a0e;color:#fff}.restore-ride button{flex:0 0 auto}.restore-ride #restoreRideMessage:empty{display:none}

/* Build 85: free map space after a successful saved-ride restore. */
.restore-ride.collapsed{padding:2px 14px;flex:0 0 auto;text-align:right}
.restore-ride .restore-ride-toggle{padding:5px 0;background:transparent;color:#aeb5c0;font-size:12px;font-weight:500;border-radius:0;min-height:28px}
.restore-ride .restore-ride-toggle:focus-visible{outline:2px solid #0098ff;outline-offset:2px}
.restore-ride.collapsed #restoreRideForm{display:none}

/* Build 87: riding view keeps GPS controls and gives the map the remaining height. */
body.riding-view #pricingMenu,
body.riding-view #rideStartRow,
body.riding-view #restoreRidePanel,
body.riding-view .riderRow,
body.riding-view #logoutBtn,
body.riding-view #shareHint,
body.riding-view .bottom>.small{display:none!important}
body.riding-view .bottom{flex:0 0 auto!important;max-height:40dvh!important}
body.riding-view #map{flex:1 1 auto!important;min-height:100px}
body.riding-view .stats{margin-bottom:5px}
body.riding-view .stat{padding:6px 4px}
body.riding-view .val{font-size:17px}
body.riding-view .status{padding:7px 8px;margin-bottom:5px;font-size:12px}
body.riding-view .riders-box{margin-bottom:5px;padding:5px 8px}
body.riding-view .bottomActionRow{margin-top:3px!important}
body.riding-view .commandStack{width:100%!important;justify-content:space-between}
body.riding-view .commandStack .compactBtn{flex:1;min-width:0}

/* Detour statuses fit the compact phone stats. */
#offroute,#motion{font-size:clamp(11px,3.2vw,17px);overflow-wrap:anywhere;}

/* Build 91: primary rider info is always visible in Setup. */
.rider-info-panel{border:1px solid #343943;border-radius:12px;padding:9px 10px;margin:0 0 9px;background:#111318}
.rider-info-title{font-size:11px;font-weight:900;letter-spacing:.08em}
.rider-info-subtitle{font-size:10px;color:#9097a3;margin:2px 0 7px}
.rider-info-panel .riderRow{grid-template-columns:minmax(0,1fr) 72px 42px;margin-bottom:0}
.rider-initials-input{width:100%;border:1px solid #343943;border-radius:12px;background:#0f1115;color:#fff;padding:11px 8px;font-size:13px;text-transform:uppercase;outline:none}
.rider-initials-input:focus{border-color:#6f7785}
@media(max-width:420px){.rider-info-panel .riderRow{grid-template-columns:minmax(0,1fr) 64px 42px;gap:6px}.rider-info-panel{padding:8px}}

/* Build 92: restore primary Rider Info fields in Setup. Overrides Build 71 duplicate-row hide. */
body:not(.riding-view) #riderInfoPanel{display:block!important;}
body:not(.riding-view) #riderInfoPanel .riderRow{display:grid!important;grid-template-columns:minmax(0,1fr) 72px 42px!important;gap:8px!important;width:100%!important;max-width:100%!important;align-items:center;}
@media(max-width:420px){body:not(.riding-view) #riderInfoPanel .riderRow{grid-template-columns:minmax(0,1fr) 64px 42px!important;gap:6px!important;}}
body.riding-view #riderInfoPanel{display:none!important;}

.finish-flag-bounce{animation:wmdFinishBounce46 .65s ease-in-out infinite;will-change:transform}
#manualFinishBtn{width:100%;margin-bottom:8px;background:#21a366;color:white}

.auth-overlay{overflow-y:auto}.auth-card input[hidden],.auth-card button[hidden]{display:none!important}

/* Build 110: keep the complete setup/control panel reachable on desktop.
   The app shell stays inside the viewport; the lower controls scroll instead
   of being pushed below the browser window by the map. */
@media (min-width:601px){
  body:not(.watch-page){overflow:hidden;width:100%;}
  body:not(.watch-page) #app{height:100dvh;min-width:0;overflow:hidden;}
  body:not(.watch-page) header{flex:0 0 auto;min-width:0;}
  body:not(.watch-page) #restoreRidePanel{flex:0 0 auto;}
  body:not(.watch-page) #map{flex:1 1 52dvh;min-height:260px;min-width:0;}
  body:not(.watch-page) .bottom{
    flex:0 1 auto;
    min-height:210px;
    max-height:44dvh;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  body:not(.watch-page) .bottom>*{max-width:100%;min-width:0;}
}
/* Build 120 — My Rides */
.account-actions{display:flex;gap:8px;align-items:center;justify-content:flex-start;flex-wrap:wrap}
.my-rides-card{width:min(720px,calc(100vw - 28px));max-height:min(78vh,760px);overflow:auto;text-align:left}
.my-rides-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}
.my-rides-head h1{margin:0 0 5px}.my-rides-head p{margin:0;opacity:.72}
.my-rides-list{display:grid;gap:10px}.my-ride-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid rgba(255,255,255,.14);border-radius:12px;background:rgba(255,255,255,.04)}
.my-ride-main{display:grid;gap:4px;min-width:0}.my-ride-main strong{font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.my-ride-main span{font-size:.85rem;opacity:.78}.my-ride-meta b{opacity:1}.my-rides-empty{padding:24px 10px;text-align:center;opacity:.7}
@media(max-width:600px){.my-ride-card{align-items:stretch;flex-direction:column}.my-ride-open{width:100%}.my-rides-head{align-items:center}}

/* Build 132 — My Rides delete action */
.my-ride-actions{display:flex;gap:8px;align-items:center}.my-ride-delete{border-color:rgba(255,110,110,.45);color:#ffb3b3;background:rgba(180,40,40,.12)}
@media(max-width:600px){.my-ride-actions{display:grid;grid-template-columns:1fr 1fr}.my-ride-actions .compactBtn{width:100%}}

.my-rides-head-actions{display:flex;gap:8px;align-items:center}
.delete-all-rides{background:#8b1e1e!important;color:#fff!important;border-color:#8b1e1e!important}
.delete-all-rides:disabled{opacity:.55;cursor:not-allowed}

/* Build 137 — optional account profile photo, shown away from the map marker */
.signup-photo-wrap{margin-top:10px;text-align:left}
.signup-photo-label{display:block;margin-bottom:7px;font-weight:700;color:#e8eef8}.signup-photo-label span{font-weight:400;color:#9aa9bd}
.signup-photo-row{display:flex;align-items:center;gap:10px}.signup-photo-preview{width:48px;height:48px;border-radius:50%;border:2px solid #5c6d83;display:flex;align-items:center;justify-content:center;overflow:hidden;color:#9aa9bd;font-size:11px;background:#111827;flex:0 0 auto}.signup-photo-preview img{width:100%;height:100%;object-fit:cover}.signup-photo-btn{display:inline-flex!important;align-items:center;justify-content:center;cursor:pointer}
.rider-profile-card{position:absolute;z-index:850;top:74px;right:12px;display:flex;align-items:center;gap:8px;max-width:min(230px,60vw);padding:6px 10px 6px 6px;border-radius:999px;background:rgba(9,11,15,.88);border:1px solid rgba(255,255,255,.24);box-shadow:0 4px 16px rgba(0,0,0,.35);backdrop-filter:blur(5px);pointer-events:none}.rider-profile-card.hidden{display:none!important}.rider-profile-card img{width:42px;height:42px;border-radius:50%;object-fit:cover;border:2px solid #fff;background:#1a2230}.rider-profile-card span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:800;color:#fff;font-size:14px}
@media(max-width:600px){.rider-profile-card{top:68px;right:8px}.rider-profile-card img{width:38px;height:38px}}
/* Build 138 — give the optional profile photo area more breathing room on Create Account */
.signup-photo-wrap{margin-top:14px;margin-bottom:22px}
.signup-photo-label{margin-bottom:10px}
.signup-photo-row{gap:12px}
.auth-card:has(#signupPhotoWrap:not([hidden])){padding-bottom:28px}
@media(max-width:600px){.signup-photo-wrap{margin-bottom:24px}}

/* Build 140: rider identity photo belongs in the upper-left of the tracking map.
   The initials square marker remains unchanged. */
.rider-profile-card{
  position:absolute!important;
  top:72px!important;
  left:12px!important;
  right:auto!important;
  z-index:900!important;
}
@media(max-width:600px){
  .rider-profile-card{top:68px!important;left:8px!important;right:auto!important}
}

/* Build 142 — account profile */
.profile-card{max-width:460px}.profile-editor{display:flex;flex-direction:column;gap:14px;padding-top:14px}.profile-editor label:not(.profile-change-photo){display:flex;flex-direction:column;gap:6px;font-weight:700;color:#e8eef8}.profile-editor input[type="text"]{width:100%;box-sizing:border-box}.profile-editor-photo{width:88px;height:88px;border-radius:50%;overflow:hidden;border:2px solid #fff;background:#172235;display:flex;align-items:center;justify-content:center;color:#9aa9bd;font-weight:800}.profile-editor-photo img{width:100%;height:100%;object-fit:cover}.profile-change-photo{align-self:flex-start}.account-actions{gap:8px;flex-wrap:wrap}

/* Build 145 — keep zoom controls clear of the rider profile card */
.leaflet-top.leaflet-left{left:auto!important;right:0!important}
.leaflet-top.leaflet-left .leaflet-control{margin-left:0!important;margin-right:10px!important}

/* Build 148 — clean Step 1 account actions */
#wizardProfileMount{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:22px}
#wizardProfileMount #profileBtn,#wizardProfileMount #myRidesBtn{position:static!important;margin:0!important;min-width:104px}
#wizardProfileMount #profileBtn{background:transparent;color:#dbe7f7;border:1px solid #526a8a}
#wizardProfileMount #myRidesBtn{background:transparent;color:#dbe7f7;border:1px solid #526a8a}
@media(max-width:700px){#wizardProfileMount{justify-content:flex-start;flex-wrap:wrap}}

/* Build 149 — remove the old duplicate Step 1 My Rides presentation */
#wizardRestoreMount .restore-ride-actions,
#wizardRestoreMount .restore-my-rides,
#wizardRestoreMount > button{display:none!important}

/* v162: consistent account and ride controls */
.account-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;margin-top:12px}
.account-actions .compactBtn,.commandStack .compactBtn{box-sizing:border-box!important;display:flex!important;align-items:center;justify-content:center;width:100%!important;min-width:0!important;min-height:44px!important;padding:10px 12px!important;border:1px solid #343a44!important;border-radius:12px!important;background:#23262d;color:#38a7ff;font:700 14px/1.2 system-ui,sans-serif!important;text-decoration:none!important;text-align:center;margin:0!important}
.account-actions [hidden],.commandStack .hidden{display:none!important}
.bottomActionRow{display:block!important;margin-top:8px!important}
.commandStack{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important}
.commandStack .compactBtn:disabled{opacity:.45}
.commandStack #shareBtn{background:#123d70;color:#fff}

/* v172: dedicated map view, without interrupting GPS. */
body.map-only-view #app>header,body.map-only-view .bottom{display:none!important}
body.map-only-view #map{flex:1 1 auto!important;min-height:0!important;height:100%!important}
#mapBackBtn{position:fixed;z-index:2000;top:calc(env(safe-area-inset-top) + 12px);left:60px;padding:12px 16px;border:1px solid #55647b;border-radius:10px;background:#151b27;color:#fff;font-size:14px;box-shadow:0 2px 10px #0005;min-height:44px}
#mapBackBtn[hidden],#screenAwakeStatus[hidden]{display:none!important}
#screenAwakeStatus{margin-top:6px;color:#a8bed8}

/* v172: dedicated map view, without interrupting GPS. */
body.map-only-view #app>header,body.map-only-view .bottom{display:none!important}
body.map-only-view #map{flex:1 1 auto!important;min-height:0!important;height:100%!important}
#mapBackBtn{position:fixed;z-index:2000;top:calc(env(safe-area-inset-top) + 12px);left:60px;padding:12px 16px;border:1px solid #55647b;border-radius:10px;background:#151b27;color:#fff;font-size:14px;box-shadow:0 2px 10px #0005;min-height:44px}
#mapBackBtn[hidden],#screenAwakeStatus[hidden]{display:none!important}
#screenAwakeStatus{margin-top:6px;color:#a8bed8}

/* Customer email preferences */
.profile-card{max-height:90dvh;overflow-y:auto}

/* v174: one round dot, one tracked phone, up to three names. */
.wmd-round-dot{box-sizing:border-box;width:15px;height:15px;border-radius:50%;background:#e8002c;border:2px solid #e8002c;box-shadow:inset 0 0 0 2px #fff,0 1px 3px #0006}.wmd-round-dot.rider-dot-finished{border-radius:50%!important;border:2px solid #00e676!important;background:#00e676!important;box-shadow:inset 0 0 0 2px #fff,0 0 6px #00e676!important}
.rider-group-list{position:absolute;top:72px;left:12px;z-index:900;max-width:min(240px,62vw);padding:9px 13px;border-radius:12px;background:rgba(9,11,15,.9);border:1px solid #ffffff40;box-shadow:0 4px 16px #0005;pointer-events:none}.rider-group-list[hidden]{display:none}.group-name{font-size:14px;font-weight:700;color:#fff;overflow-wrap:anywhere;line-height:1.45}.group-name+.group-name{margin-top:4px}.watch-page #ridersBox{display:none!important}.companion-editor{margin-top:18px}.companion-field{display:grid;grid-template-columns:1fr auto;gap:8px;margin-bottom:14px}.companion-field label{grid-column:1/-1}.companion-field input{min-width:0;width:100%;box-sizing:border-box;background:#10151e;border:1px solid #526a8a;border-radius:10px;padding:12px;color:#fff;font-size:16px}.companion-field button{align-self:center}.companion-editor .wizard-note{font-size:13px}@media(max-width:600px){.rider-group-list{top:68px;left:8px}}
