/* The map owns its route colour. Controls use the passenger surface palette. */
.passenger-app {
  --journey-signal:var(--booking-text);
  --journey-on-signal:var(--booking-surface);
  --journey-line:var(--booking-divider);
  -webkit-tap-highlight-color:transparent;
}
.passenger-app ::selection {background: var(--journey-signal); color: var(--journey-on-signal)}
.passenger-app :is(input, textarea) {caret-color: var(--journey-signal)}
.passenger-app :is(button, a, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--journey-signal);
  outline-offset: 3px;
}
.passenger-app :is(.destination-sheet, .account-wrap, .options-sheet, .active-detail-sheet) {
  scrollbar-width: thin;
  scrollbar-color: var(--journey-line) transparent;
}
.passenger-app :is(.destination-sheet, .account-wrap, .options-sheet)::-webkit-scrollbar {width: 4px}
.passenger-app :is(.destination-sheet, .account-wrap, .options-sheet)::-webkit-scrollbar-thumb {background: var(--journey-line); border-radius: 3px}
.passenger-app :is(.where-to, #btn-order):disabled {box-shadow: none; opacity: .5; cursor: default}
.passenger-app :is(.route-rail, .booking-route-rail) {color: var(--journey-signal)}
html:not([data-theme=light]) .passenger-app .menu-item>span:first-child {color: var(--journey-signal)}
.passenger-app .menu-item {min-height: 56px}
.passenger-app .menu-item>span:nth-child(2) {font-weight: 550}
/* This node has one owner; the previous CSS entrance must not compete with WAAPI. */
.passenger-app .account-screen.visible .account-wrap {animation: none}
.passenger-app :is(#s-home, #s-dest, #s-pin, #s-options, #s-searching, #s-rate) .sheet,
.passenger-app .screen.visible :is(.booking-dock, .destination-sheet, .pin-sheet, .options-sheet, .searching-sheet)>*,
.passenger-app #modal-holder .modal {animation: none}
.passenger-app :is(.booking-more, #booking-tariffs) {font-variant-numeric: tabular-nums}
.passenger-app #booking-tariffs {color: var(--muted); background: transparent; min-height: 44px; padding: 8px; font-size: 12px}
.passenger-app .booking-price-disclosure {display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px}
.passenger-app .booking-price-disclosure .booking-call-fee {margin: 0; text-align: left; min-width: 0}
.passenger-app .booking-price-disclosure #booking-tariffs {flex: 0 0 auto}
html:not([data-theme=light]) #s-active :is(.active-camera-view, #active-map-mode) {
  background: var(--booking-surface);
  border-color: var(--booking-edge);
  box-shadow: 0 5px 14px -9px #000b;
  color: var(--booking-text);
}
html:not([data-theme=light]) #s-active .active-route-guidance {background:var(--booking-surface); border-color:var(--booking-edge)}
html:not([data-theme=light]) #s-active .active-route-guidance #active-guidance-icon {color: #a1ff79}
html:not([data-theme=light]) #s-active .active-identity-copy b {color: var(--booking-text)}
html:not([data-theme=light]) .passenger-app .route-rail>i {border-color: #a1ff79}
html:not([data-theme=light]) .passenger-app .route-rail>span {background: #a1ff7966}
.passenger-app #modal-holder .modal::backdrop {background: #0009}
.passenger-app .install-instructions {margin: 18px 0 0; padding: 0 0 0 20px; line-height: 1.6}
.passenger-app .install-instructions li+li {margin-top: 12px}
.passenger-app .install-instructions strong {font-weight: 650}
.passenger-app .install-note {color: var(--muted); margin: 20px 0 0; line-height: 1.55; font-size: 13px}
.passenger-app #install-close {width: 44px; height: 44px; min-height: 44px; padding: 12px; background: transparent; color: var(--ink)}
/* ZM-18: press feedback. The press-down scales in its first frame over --ui-motion-press, the release over
   --ui-motion-surface, both on the response curve; colours keep --ui-motion-fast. The individual `scale`
   composes with any transform (centring, the floating cards). Reduced motion: no scale. */
@media (prefers-reduced-motion: no-preference) {
  .passenger-app :is(.where-to,#btn-order,.menu-item,.icon-button,.recent-row,.home-saved-places button,.destination-action) {transition:background-color var(--ui-motion-fast,140ms),color var(--ui-motion-fast,140ms),border-color var(--ui-motion-fast,140ms),opacity var(--ui-motion-effect,155ms) var(--ui-response,cubic-bezier(.16,.96,.36,1)),scale var(--ui-motion-surface,330ms) var(--ui-response,cubic-bezier(.16,.96,.36,1))}
  .passenger-app :is(.where-to,#btn-order,.menu-item,.icon-button,.recent-row,.home-saved-places button,.destination-action):not(:disabled):active {transition:background-color var(--ui-motion-fast,140ms),color var(--ui-motion-fast,140ms),border-color var(--ui-motion-fast,140ms),opacity var(--ui-motion-effect,155ms) var(--ui-response,cubic-bezier(.16,.96,.36,1)),scale var(--ui-motion-press,90ms) var(--ui-response,cubic-bezier(.16,.96,.36,1))}
  /* The full-width CTAs change colour at once (their state change is not a press, §6.2): only opacity and scale move. */
  .passenger-app :is(.where-to,#btn-order) {transition:opacity var(--ui-motion-effect,155ms) var(--ui-response,cubic-bezier(.16,.96,.36,1)),scale var(--ui-motion-surface,330ms) var(--ui-response,cubic-bezier(.16,.96,.36,1))}
  .passenger-app :is(.where-to,#btn-order):not(:disabled):active {transition:opacity var(--ui-motion-effect,155ms) var(--ui-response,cubic-bezier(.16,.96,.36,1)),scale var(--ui-motion-press,90ms) var(--ui-response,cubic-bezier(.16,.96,.36,1))}
  .passenger-app :is(.where-to, #btn-order):not(:disabled):active {scale:var(--ui-press-scale,.97)}
  .passenger-app :is(.recent-row,.home-saved-places button,.destination-action,.menu-item):not(:disabled):active {scale:var(--ui-press-scale-row,.985)}
  .passenger-app .icon-button:not(:disabled):active {scale:var(--ui-press-scale-icon,.94)}
}
@media (prefers-reduced-motion: reduce) {
  .passenger-app :is(.where-to,#btn-order,.menu-item,.icon-button,.recent-row,.home-saved-places button,.destination-action) {transition: none; scale: none}
}

/* Keep the address and its hit target in place. Only the small forward cue travels. */
.passenger-app :is(#welcome-auth [data-identity-submit], #btn-pin-confirm, #dest-suggestions .suggestion,
  #s-options .quote-itinerary button, .appearance-choice):enabled:active {
  transform: none;
  scale: none;
  transition: none;
}
html #s-login #welcome-auth [data-identity-submit]:enabled:active {
  scale: none;
  background-color: #dce1e6;
}
#dest-suggestions .suggestion:enabled:active,
#s-options .quote-itinerary button:enabled:active { background-color: var(--booking-field); }
#s-pin #btn-pin-confirm:enabled:active { opacity: .9; }
.appearance-choice:enabled:active .theme-swatch { outline: 1px solid currentColor; outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  html:not([data-ios-reduced-motion=true]) :is(#welcome-auth [data-identity-submit], #btn-pin-confirm,
    #dest-suggestions .suggestion, #s-options .quote-itinerary button) > :is([data-icon=arrow-right], [data-icon=chevron-right], svg:last-child) {
    transition: translate var(--ui-motion-effect,155ms) var(--ui-response,ease-out);
  }
  html:not([data-ios-reduced-motion=true]) :is(#welcome-auth [data-identity-submit], #btn-pin-confirm,
    #dest-suggestions .suggestion, #s-options .quote-itinerary button):enabled:active > :is([data-icon=arrow-right], [data-icon=chevron-right], svg:last-child) {
    translate: 3px 0;
    transition-duration: var(--ui-motion-press,65ms);
  }
  html:not([data-ios-reduced-motion=true]) .appearance-choice .theme-swatch {
    transition: scale var(--ui-motion-effect,155ms) var(--ui-response,ease-out);
  }
  html:not([data-ios-reduced-motion=true]) .appearance-choice:enabled:active .theme-swatch {
    scale: .91;
    transition-duration: var(--ui-motion-press,65ms);
  }
  html:not([data-ios-reduced-motion=true]) #s-dest .booking-address:focus-within::before {
    animation: address-stop-focus var(--ui-motion-pop,190ms) var(--ui-response,ease-out);
  }
}
@keyframes address-stop-focus {
  from { transform: scale(.75); }
  45% { transform: scale(1.16); }
  to { transform: scale(1); }
}
@media (forced-colors: active) {
  :is(#dest-suggestions .suggestion, #s-options .quote-itinerary button, #btn-pin-confirm,
    #welcome-auth [data-identity-submit]):enabled:active { outline: 2px solid Highlight; outline-offset: -2px; }
  .passenger-app :is(.where-to, #btn-order) {background: ButtonFace !important; color: ButtonText !important; border: 1px solid ButtonText; box-shadow: none}
}

/* Addresses are destinations to recognise, with one generous target per place. */
.passenger-app :is(#recent-list, #dest-suggestions) .address-history summary {
  min-height:48px;gap:10px;font-size:14px;font-weight:560;color:var(--booking-muted);
}
.passenger-app .recent-places {display:grid;gap:7px;padding:2px 0 10px}
.passenger-app :is(#recent-list, #dest-suggestions) .address-history .recent-row {
  display:grid;grid-template-columns:40px minmax(0,1fr) 18px;gap:11px;
  width:100%;min-height:60px;padding:10px 12px;border:1px solid var(--booking-divider);
  border-radius:14px;background:var(--booking-field);color:var(--booking-text);
  text-align:left;opacity:1;
}
.passenger-app :is(#recent-list, #dest-suggestions) .address-history .recent-row>span {
  margin:0;min-width:0;white-space:normal;overflow:visible;
}
.passenger-app :is(#recent-list, #dest-suggestions) .address-history .recent-row>.recent-place-icon {
  display:grid;place-items:center;width:40px;height:40px;border-radius:12px;
  color:var(--booking-signal);background:transparent;
}
.passenger-app :is(#recent-list, #dest-suggestions) .recent-place-icon svg {width:21px;height:21px}
.passenger-app .recent-place-copy strong {
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
  font-size:15px;line-height:1.35;font-weight:590;color:var(--booking-text);overflow-wrap:anywhere;
}
.passenger-app .recent-place-copy small {
  display:block;margin-top:3px;font-size:13px;line-height:1.35;color:var(--booking-muted);overflow-wrap:anywhere;
}
.passenger-app :is(#recent-list, #dest-suggestions) .recent-place-arrow {color:var(--booking-muted)}
.passenger-app :is(#recent-list, #dest-suggestions) .recent-place-arrow svg {width:18px;height:18px}
.passenger-app .booking-dock .home-saved-places {display:flex;flex-wrap:wrap;gap:8px}
.passenger-app .booking-dock .home-saved-places button {
  display:flex;align-items:center;justify-content:flex-start;gap:10px;
  min-height:52px;min-width:0;max-width:100%;flex:1 1 110px;padding:8px 12px;
  border:1px solid var(--booking-divider);border-radius:14px;
  background:var(--booking-field);color:var(--booking-text);opacity:1;
}
.passenger-app .saved-place-icon {display:grid;place-items:center;color:var(--booking-signal)}
.passenger-app .saved-place-icon svg {width:20px;height:20px}
.passenger-app .saved-place-copy {min-width:0;text-align:left}
.passenger-app .saved-place-copy strong {display:block;font-size:14px;line-height:1.35;font-weight:580;overflow-wrap:anywhere}
@media (hover:hover) and (pointer:fine) {
  .passenger-app :is(#recent-list, #dest-suggestions) .address-history .recent-row:hover,
.passenger-app .booking-dock .home-saved-places button:hover {border-color:var(--booking-muted)}
}
.passenger-app .booking-heading .availability-line[hidden] {display:none}
.passenger-app :where(button,a[href],summary):not([data-sheet-grip]) {touch-action:manipulation}
.passenger-app :is(.modal-head button,.card-row button,.history-actions button,.cancel-sched) {min-height:44px;min-width:44px}
.passenger-app :is(input,textarea,select) {font-size:max(16px,1em)}
#s-active :is(.active-icon-actions button,.active-contact-actions button) {font-size:14px;min-height:48px}
#s-active .active-detail-sheet .active-overview-action {font-size:14px;min-height:48px}
#s-active .active-safety-actions button {font-size:14px;min-height:48px}
/* One surface moves once: avoid separate layers for every child above the map. */
#s-home.visible .booking-dock>* {animation:none}
.passenger-app .active-call-fallback:not([hidden]) {display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:12px 16px;border:1px solid var(--booking-divider);border-radius:14px;color:var(--booking-text);background:var(--booking-field);font-size:15px;text-decoration:none;}
@media (forced-colors:active) {
  .passenger-app :is(#recent-list, #dest-suggestions) .address-history .recent-row,
  .passenger-app .booking-dock .home-saved-places button {border:1px solid ButtonText;background:ButtonFace;color:ButtonText}
  .passenger-app :is(.recent-place-icon,.recent-place-copy strong,.recent-place-copy small,.saved-place-icon) {color:ButtonText;background:transparent}
}

/*131: the same reachable grip on home and trip; the map keeps its own space. */
.passenger-app #passenger-booking-dock {padding-top:0;scroll-padding-top:44px}
.passenger-app .booking-sheet-grip {position:sticky;top:0;z-index:2;display:flex;justify-content:center;align-items:center;width:100%;height:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--booking-muted);touch-action:none;cursor:ns-resize}
.passenger-app .booking-sheet-grip span {display:block;width:32px;height:3px;border-radius:3px;background:currentColor}
.passenger-app #passenger-booking-dock {height:var(--ride-sheet-user-size, auto);--ride-sheet-min-height:96px}
.passenger-app #passenger-booking-dock .booking-sheet-grip {
  height:26px;min-height:26px;align-items:flex-start;padding-top:6px;
}
.passenger-app #passenger-booking-dock[data-sheet-state=collapsed] :is(.booking-heading,#btn-home-pickup,#home-saved-places,#recent-list) {display:none}
.passenger-app #passenger-booking-dock[data-sheet-state=collapsed] .booking-itinerary {margin:0;gap:0}
.passenger-app #passenger-booking-dock[data-sheet-state=expanded] {max-height:calc(100dvh - 112px)}

@media (orientation:landscape) {
  .passenger-app {--floating-map-panel:min(328px,38vw);--floating-map-edge:max(12px,env(safe-area-inset-left))}
  .passenger-app #mobility-map-root::before,#s-active.visible::before {display:none}
  .passenger-app #passenger-booking-dock,
  .passenger-app :is(#s-dest,#s-pin,#s-options,#s-searching) .sheet,
  #s-active .active-arrival {
    position:fixed;inset:auto auto max(12px,env(safe-area-inset-bottom)) var(--floating-map-edge);
    width:var(--floating-map-panel)!important;max-width:calc(100vw - 24px);max-height:calc(100dvh - 88px)!important;
    box-sizing:border-box;padding:16px!important;overflow:auto;overscroll-behavior:contain;
    border:1px solid var(--booking-divider);border-radius:18px;background:var(--booking-surface);box-shadow:0 6px 24px #0002;transform:none;
  }
  .passenger-app #passenger-booking-dock {padding-top:0!important;scroll-padding-top:44px}
  .passenger-app #passenger-booking-dock:not([data-sheet-state=expanded]) :is(.booking-heading,#home-saved-places,#recent-list) {display:none}
  .passenger-app #passenger-booking-dock[data-sheet-state=medium] .booking-itinerary {margin:0;gap:5px}
  .passenger-app #passenger-booking-dock .booking-heading h1 {font-size:24px;line-height:1.25}
  .passenger-app #passenger-booking-dock .destination-action {min-height:52px;padding:12px;font-size:16px}
  .passenger-app .screen :is(.destination-sheet,.pin-sheet,.options-sheet,.searching-sheet) h2 {font-size:23px;line-height:1.25;margin-bottom:16px}
  .passenger-app #s-dest .destination-sheet {overflow:auto}
  .passenger-app #s-dest .destination-sheet .dest-list {flex-shrink:0;max-height:none;overflow:visible}
  .passenger-app #s-dest[data-keyboard=true] .destination-sheet {bottom:calc(var(--address-keyboard-offset,0px) + 8px);max-height:calc(var(--address-viewport-height,100dvh) - 24px)!important}
  .passenger-app .screen .sheet-grip {display:none}
  .passenger-app #s-home .mobility-header {padding:12px max(12px,env(safe-area-inset-right)) 12px var(--floating-map-edge)}
  .passenger-app .map-locate {right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom))}
  .passenger-app #home-rider-gps {left:auto;right:12px;bottom:76px;max-width:calc(60vw - 28px)}
  #s-active {--ride-spacing:16px}
  #s-active .active-arrival {padding-top:0!important;border-color:var(--ride-line);pointer-events:auto;transition:none;scroll-padding-top:44px}
  .passenger-app #s-active .active-arrival[data-sheet-state],html[data-theme=light] .passenger-app #s-active .active-arrival[data-sheet-state] {background:var(--ride-bg)}
  #s-active .active-sheet-controls {position:sticky;top:0;z-index:3;background:var(--ride-bg)}
  #s-active .active-arrival[data-sheet-state=collapsed] {max-height:min(190px,calc(100dvh - 88px))!important}
  #s-active .active-destination h1,#s-active[data-phase=in_progress] .active-destination h1 {font-size:21px;line-height:1.25}
  #s-active .active-top {padding:12px max(12px,env(safe-area-inset-right)) 12px var(--floating-map-edge)}
  #s-active .active-route-guidance {top:76px;left:calc(var(--floating-map-panel) + 28px);max-width:calc(62vw - 40px)}
  #s-active .active-map-status {top:76px;left:var(--floating-map-edge);max-width:var(--floating-map-panel)}
  #s-active[data-guidance=true] .active-map-status {top:76px}
  #s-active .active-map-actions {right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom))}
  #s-active .active-detail-sheet,
  body:has(#s-active.visible) #modal-holder .active-ride-modal,
  .passenger-app dialog.modal {inset:12px 12px auto auto;margin:0;width:min(440px,calc(100vw - 24px));height:auto;max-height:calc(100dvh - 24px);padding:20px;border-radius:18px;overflow:auto;overscroll-behavior:contain}
}

@media (orientation:landscape) and (max-height:470px) and (max-width:899px) {
  .passenger-app {
    --floating-map-panel:min(348px,54vw);
    --floating-map-edge:max(10px,env(safe-area-inset-left,0px));
    --phone-map-right:max(10px,env(safe-area-inset-right,0px));
    --phone-map-bottom:max(10px,env(safe-area-inset-bottom,0px));
    --phone-map-top:max(8px,env(safe-area-inset-top,0px));
  }

  .passenger-app #s-home .mobility-header {
    padding:var(--phone-map-top) var(--phone-map-right) 0 var(--floating-map-edge);
  }

  .passenger-app #passenger-booking-dock,
  .passenger-app :is(#s-dest,#s-pin,#s-options,#s-searching) .sheet,
  .passenger-app #s-active .active-arrival {
    bottom:var(--phone-map-bottom);
    max-height:calc(100dvh - var(--phone-map-top) - var(--phone-map-bottom) - 56px)!important;
    padding:12px!important;
  }

  .passenger-app #passenger-booking-dock:not([data-sheet-state=expanded]) {
    display:grid;
    grid-template-columns:44px minmax(0,1fr);
    align-items:center;
    gap:6px;
    padding:6px!important;
    border-radius:13px;
  }

  .passenger-app #passenger-booking-dock:not([data-sheet-state=expanded]) .booking-sheet-grip {
    position:relative;
    inset:auto;
  }

  .passenger-app #passenger-booking-dock:not([data-sheet-state=expanded]) .booking-sheet-grip span {
    width:24px;
  }

  .passenger-app #passenger-booking-dock .destination-action {
    min-height:48px;
    padding:8px 10px;
    text-align:start;
  }

  .passenger-app #s-dest .destination-sheet {
    padding-block:8px!important;
  }

  .passenger-app #s-dest[data-keyboard=true] .destination-sheet {
    max-height:calc(var(--address-viewport-height,100dvh) - 20px)!important;
  }

  .passenger-app .screen :is(.destination-sheet,.pin-sheet,.options-sheet,.searching-sheet) h2 {
    font-size:20px;
    margin-bottom:8px;
  }

  .passenger-app :is(#s-dest,#s-pin,#s-options,#s-searching) .mobility-header {
    padding:var(--phone-map-top) var(--phone-map-right) 0 var(--floating-map-edge);
  }

  .passenger-app #passenger-map-display {
    right:var(--phone-map-right);
    top:calc(var(--phone-map-top) + 48px);
  }

  .passenger-app:has(#s-home.visible) #passenger-map-display {
    inset:auto calc(var(--phone-map-right) + 50px) var(--phone-map-bottom) auto;
  }

  #s-options .quote-map-controls {top:var(--phone-map-top);right:var(--phone-map-right)}

  .passenger-app #s-home #btn-home-locate {
    inset:auto var(--phone-map-right) var(--phone-map-bottom) auto;
  }

  .passenger-app #home-rider-gps {
    right:var(--phone-map-right);
    bottom:calc(var(--phone-map-bottom) + 52px);
    max-width:calc(46vw - 24px);
  }

  .passenger-app #s-active .active-arrival {
    padding-top:0!important;
  }

  #s-active .active-top {
    padding:var(--phone-map-top) var(--phone-map-right) 0 var(--floating-map-edge);
  }

  #s-active .active-route-guidance {
    left:calc(var(--floating-map-edge) + var(--floating-map-panel) + 10px);
    right:var(--phone-map-right);
    top:calc(var(--phone-map-top) + 48px);
    max-width:none;
  }

  #s-active .active-map-actions {
    right:var(--phone-map-right);
    bottom:var(--phone-map-bottom);
  }
}

/* Keep the centre of the moving scene clear. Only a confirmed turn earns a
   separate cue. Distance for the whole route lives with the destination. */
#s-active[data-phase=in_progress]{--ride-route-accent:#8ceaa1}
html[data-theme=light] #s-active[data-phase=in_progress]{--ride-route-accent:#226e39}
#s-active .active-top{
  display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:start;gap:12px;
  padding:calc(12px + env(safe-area-inset-top)) max(var(--ride-spacing),env(safe-area-inset-right)) 0 max(var(--ride-spacing),env(safe-area-inset-left));
  background:none;
}
#s-active .active-top .active-camera-view{
  grid-column:2;grid-row:1;justify-self:end;border-radius:10px;
}
#s-active .active-route-guidance{
  position:static;grid-column:1;grid-row:1;justify-self:start;pointer-events:none;
  max-width:100%;min-height:44px;
  padding:6px 11px 6px 9px;border:1px solid var(--ride-line);border-radius:10px;
  gap:8px;background:var(--ride-surface);box-shadow:0 5px 14px #0003;
}
html:not([data-theme=light]) #s-active .active-route-guidance{background:#141617}
html:not([data-theme=light]) #s-active .active-route-guidance #active-guidance-icon{color:var(--ride-route-accent,#8ceaa1)}
#s-active .active-route-guidance div{min-width:0;gap:1px}
#s-active .active-route-guidance strong{font-size:11px;line-height:1.3;font-weight:570;color:var(--ride-muted)}
#s-active .active-route-guidance div>span{font-size:16px;line-height:1.1}
#s-active #active-guidance-icon{width:26px;height:26px;filter:none}
#s-active .active-primary-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:7px}
#s-active .active-primary-actions[hidden]{display:none}
#s-active .active-primary-actions > button:not([hidden]){width:100%;min-width:0;justify-content:center}
#s-active[data-guidance="true"] .active-map-status{top:var(--ride-map-top,76px)}
@media(orientation:landscape){
  .passenger-app #s-active[data-phase=in_progress] .active-arrival[data-sheet-state=collapsed]{
    width:clamp(270px,33vw,320px)!important;border-radius:14px;
  }
  #s-active[data-phase=in_progress] .active-destination h1{font-size:clamp(18px,2.9vw,22px)}
  #s-active .maplibregl-ctrl-bottom-left,#s-active .leaflet-bottom.leaflet-left{
    left:var(--ride-map-side,44vw);bottom:max(8px,env(safe-area-inset-bottom));
  }
}
@media(forced-colors:active){
  #s-active .active-route-guidance{border:1px solid CanvasText;color:CanvasText;background:Canvas}
}

/* The highest-contrast edge belongs to the action at the front of the page. */
body.passenger-app :is(.home-header .account-button,#btn-home-locate,.map-single-mode button) {
  border-radius:13px;
  background:var(--booking-surface);
  color:var(--booking-text);
  border:1px solid var(--booking-edge);
  box-shadow:none;
}
/* The map layers separate when satellite imagery is active. The touch target stays still. */
#passenger-map-satellite[aria-pressed=true] path:first-child {transform:translateY(-1.25px)}
#passenger-map-satellite[aria-pressed=true] path:last-child {transform:translateY(1.25px)}
@media (prefers-reduced-motion:no-preference) {
  html:not([data-ios-reduced-motion=true]) #passenger-map-satellite path {
    transition:transform 140ms var(--ui-motion-ease,ease-out);
  }
}
.passenger-app :is(.booking-dock,.sheet,.modal,.account-wrap,.tariff-details) {
  transform-origin:50% 85%;
}
.passenger-app .account-wrap {transform-origin:12% 50%}
.passenger-app :is(#btn-home-pickup,#btn-where) {
  box-shadow:inset 0 1px 0 var(--booking-glint);
}
.passenger-app #s-home .booking-itinerary .pickup-preview {border-color:var(--booking-edge)}
#s-options .quote-tools button:is([data-has-note=true],[data-scheduled=true]) svg {
  color:var(--booking-text);
  filter:none;
}
@media(max-width:759px) and (orientation:portrait) {
  .passenger-app #passenger-booking-dock,
  .passenger-app :is(#s-dest,#s-pin,#s-searching) .sheet {
    border-radius:22px 22px 0 0;
    border:1px solid var(--booking-divider);
    border-top-color:var(--booking-edge);
    animation:none;
    border-bottom:0;
    background:var(--booking-surface);
    box-shadow:none;
  }
}
/* Each sheet samples at most a small rim or the fare footer. Expensive
   full-screen blur would compete with the map while the camera moves. */
body.passenger-app #s-options .options-sheet {
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
/* Frost stays only on the small header and map controls (≤ 10 % of the viewport). Every
   journey panel is opaque on every tier (experience 207, motion §3.1, owner Q11): the plate and
   the edge slides need panels that never show the map through them. */
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  html:is([data-ui-performance=balanced],[data-ui-performance=high]) .passenger-app :is(.home-header .account-button,#btn-home-locate,.map-single-mode button) {
    background:var(--booking-glass);
    -webkit-backdrop-filter:var(--control-frost,blur(9px));
    backdrop-filter:var(--control-frost,blur(9px));
  }
}
@media (prefers-reduced-transparency:reduce), (forced-colors:active) {
  html[data-ui-performance] body.passenger-app {
    --control-frost:none;
    --booking-glass:var(--booking-surface);
  }
}

.passenger-app #schedule-days {grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}
.passenger-app #schedule-days button {
  display:grid; justify-items:center; align-content:center; gap:2px; min-height:54px;
  border-color:transparent; border-radius:8px; font-variant-numeric:tabular-nums;
}
.passenger-app #schedule-days button span {font-size:11px; font-weight:550; color:var(--muted)}
.passenger-app #schedule-days button strong {font-size:18px; line-height:1.2; font-weight:630}
.passenger-app #schedule-days button strong {color:inherit}
.passenger-app #schedule-days button[aria-pressed=true] {
  border-color:var(--line); background:var(--ink); color:var(--card); box-shadow:none;
}
.passenger-app #schedule-days button[aria-pressed=true] span {color:inherit}
@media(max-width:370px){.passenger-app #schedule-days {grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(forced-colors:active){
  .passenger-app #schedule-days button[aria-pressed=true] {outline:2px solid Highlight}
}
@media (forced-colors:active) {
  html body.passenger-app :is(.home-header .account-button,#btn-home-locate,.map-single-mode button),
  html[data-theme=light] body.passenger-app :is(.home-header .account-button,#btn-home-locate,.map-single-mode button),
  html[data-ui-performance=high] body.passenger-app :is(.home-header .account-button,#btn-home-locate,.map-single-mode button),
  html[data-ui-performance=high][data-theme=light] body.passenger-app :is(.home-header .account-button,#btn-home-locate,.map-single-mode button) {
    background:ButtonFace;
    color:ButtonText;
    border:1px solid ButtonText;
    box-shadow:none;
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
  html[data-ui-performance=high]:has(.account-screen.visible) .passenger-app #modal-holder .modal::backdrop {
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
}

@media (forced-colors:none) {
  html[data-theme=dark] .passenger-app {
    --night-navigation:#76dedb;
    --night-ready:#a4e2be;
    --night-scheduled:#edc78e;
  }

  /* Colour identifies navigation, availability and the time of a planned ride. */
  html[data-theme=dark] #s-home #btn-where > [data-icon=arrow-right] {
    color:inherit;
    background:transparent;
    box-shadow:none;
  }
  html[data-theme=dark] :is(#btn-home-locate,#btn-dest-locate) .locate-symbol {
    color:var(--night-navigation);
  }
  html[data-theme=dark] #home-cars-chip[data-state=available]:not([hidden]) {
    color:var(--night-ready);
  }

  html[data-theme=dark] #s-options #btn-quote-pickup .quote-stop {
    border-color:var(--night-ready);
  }
  html[data-theme=dark] #s-options .quote-stop-destination {
    border-color:var(--night-navigation);
    background:var(--night-navigation);
  }

  html[data-theme=dark] #s-home .scheduled-ticket-mark,
  html[data-theme=dark] #s-home .scheduled-ticket-copy time,
  html[data-theme=dark] #s-options #btn-toggle-sched[data-scheduled=true] svg {
    color:var(--night-scheduled);
  }
  html[data-theme=dark] #s-home .scheduled-ticket-mark {
    border-color:#94764f;
    background:#251e16;
  }
  html[data-theme=dark] #s-home .scheduled-ticket-mark::before {
    border-color:#94764f;
  }

  html[data-theme=dark] #s-searching .dispatch-signal,
  html[data-theme=dark] #s-active[data-phase=in_progress] .active-arrival #active-arrival-time:not(:empty) {
    color:var(--night-navigation);
  }
  html[data-theme=dark] #s-active[data-phase=in_progress] .destination-station {
    border-color:var(--night-navigation);
  }
}

/* Searching horizon (experience 207): a calm light on the sheet's top edge,
 * drawn by /shared/aura.js. It sits behind the sheet, never takes input and
 * slides with one transform when the ride panel takes over. */
.journey-aura{position:fixed;height:108px;margin-top:-108px;pointer-events:none;z-index:499}
#s-active .journey-aura{z-index:599}

/* ---- Zeleni Motion r2, package B (experience 207, MOTION-SPEC §3.1) ----
   One opaque journey plate behind every portrait sheet hop. Hidden at rest; its colour and top
   edge equal the surface it stands in for, so taking over from it, and handing back, is invisible. */
.passenger-app{--plate-ride:var(--booking-surface);--plate-window:var(--booking-surface)}
html[data-theme=light] .passenger-app{--plate-ride:#f7f7f7;--plate-window:#f2f4f3}
.journey-plate{position:fixed;left:0;right:0;top:0;height:calc(100lvh + 64px);z-index:495;pointer-events:none;contain:strict;
  background:var(--booking-surface);border-radius:22px 22px 0 0;border-top:1px solid var(--booking-edge);
  box-shadow:none}
.journey-plate[hidden]{display:none}
.journey-plate[data-look=ride]{border-radius:0;border-top:0;box-shadow:none;background:linear-gradient(180deg,color-mix(in srgb,var(--plate-ride) 82%,transparent),var(--plate-ride) 42px)}
.journey-plate:is([data-look=window],[data-look=page]){border-radius:0;border-top:0;box-shadow:none;background:var(--plate-window)}
.journey-plate[data-look=page]{background:var(--booking-surface)}
/* Stacking (root context): maps 0, plate 495, leaving screen 496, carried page 497, aura 499,
   dock 500, sheets and top controls 600. Inside #s-active the plate sits under the panel (600)
   and the arrival window (620). */
.passenger-app .screen[data-zm-leaving]{display:block;position:fixed;inset:0;z-index:496;overflow:hidden;pointer-events:none;visibility:visible}
.passenger-app .screen[data-zm-leaving=over]{z-index:601}
.passenger-app [data-zm-carry]{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
.passenger-app [data-zm-carry]::before{display:none!important}
/* ZM-13: the finished ride keeps its screen (map and all) for the completion beats; the receipt
   page rides the plate above it, with no background of its own until the plate lands. */
.passenger-app #s-active[data-zm-hold]{display:block;pointer-events:none}
.passenger-app #s-rate[data-zm-carry]{position:fixed;inset:0;z-index:497;overflow:hidden}
/* ZM-10: the passenger's close fades the waiting panel and the small map controls in under the
   descending window. The arrival re-renders the panel for the waiting layout in the same task (and the
   map controls above it move with it), so on the rise both stay hidden at once, as before; the plate
   stands in for the panel at its displayed top and only the top controls, which do not move, fade. */
#s-active[data-boarding][data-zm-window=close]>:is(.active-arrival,.active-top,.active-map-actions),
#s-active[data-boarding][data-zm-window=open]>.active-top{visibility:visible}
/* Q3: the check beside "Завършен курс" is drawn once (a 24 px stroke; §6.2 exception). Its HTML
   wrapper takes the pop (scale), which the compositor can run; an SVG element it cannot. */
#s-rate .finish-heading h1{display:flex;align-items:center;gap:10px}
#s-rate .finish-check{flex:none;display:block;width:26px;height:26px;transform-origin:50% 60%}
#s-rate .finish-check[hidden]{display:none}
#s-rate .finish-check svg{display:block;width:100%;height:100%;fill:none;stroke:var(--booking-signal);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
#s-rate .finish-check path{stroke-dasharray:24;stroke-dashoffset:0}
html[data-theme=light] #s-rate .finish-check svg{stroke:#1f6b46}
@media (forced-colors:active){#s-rate .finish-check svg{stroke:CanvasText}}
/* §3.3 (S3): while a View Transition runs (html[data-zm-vt], package A), the frosted header and map controls
   are solid on every engine: a backdrop root inside a captured element breaks on WebKit. Their frost returns
   when it ends, through their own background transition (small controls, §6.2). */
html[data-zm-vt] body.passenger-app :is(.home-header .account-button,#btn-home-locate,.map-single-mode button){background:var(--booking-surface)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
/* ZM-15: dialogs and sheets enter and leave by translate at the edge they are anchored to (data-zm-edge,
   read before they open), at opacity 1 (principle 8); only the backdrop fades. Entry on every engine with
   @starting-style. Exits: where `overlay` exists, close() runs at once and the page is live while the box
   leaves (S14); elsewhere journey-motion.js runs a short exit before close(). A state-driven close is
   instant (data-zm-instant). Tokens inside ::backdrop carry literal fallbacks (C5). */
@media (prefers-reduced-motion:no-preference) {
  .passenger-app dialog[data-zm-edge][open]{translate:0 0;transition:translate var(--ui-motion-surface,330ms) var(--ui-response,cubic-bezier(.16,.96,.36,1))}
  .passenger-app dialog[data-zm-edge][open]::backdrop{opacity:1;transition:opacity var(--ui-motion-effect,155ms) var(--ui-response,cubic-bezier(.16,.96,.36,1))}
  @starting-style {
    .passenger-app dialog[data-zm-edge=bottom][open]{translate:0 100%}
    .passenger-app dialog[data-zm-edge=right][open]{translate:100% 0}
    .passenger-app dialog[data-zm-edge=float][open]{translate:0 var(--ui-motion-travel,24px)}
    .passenger-app dialog[data-zm-edge][open]::backdrop{opacity:0}
  }
  @supports (overlay:auto) {
    .passenger-app dialog[data-zm-edge]:not([open]){transition:translate var(--ui-motion-exit,150ms) var(--ui-exit,cubic-bezier(.4,0,1,1)),overlay var(--ui-motion-exit,150ms) allow-discrete,display var(--ui-motion-exit,150ms) allow-discrete}
    .passenger-app dialog[data-zm-edge=bottom]:not([open]){translate:0 100%}
    .passenger-app dialog[data-zm-edge=right]:not([open]){translate:100% 0}
    .passenger-app dialog[data-zm-edge=float]:not([open]){translate:0 calc(50dvh + 50%)}
    .passenger-app dialog[data-zm-edge]:not([open])::backdrop{opacity:0;transition:opacity var(--ui-motion-exit,150ms) var(--ui-exit,cubic-bezier(.4,0,1,1)),overlay var(--ui-motion-exit,150ms) allow-discrete,display var(--ui-motion-exit,150ms) allow-discrete}
  }
  .passenger-app dialog[data-zm-edge][data-zm-instant],.passenger-app dialog[data-zm-edge][data-zm-instant]::backdrop{transition:none}
}
/* §6.2 (P1): text fields are wider than 64 px, so their focus colour changes at once (package A's base rule
   transitions border and background colours on the main thread). */
.passenger-app :is(input,select,textarea){transition:none}
/* ZM-20: a theme change is the one View Transition of the whole page: the root is captured only then (package
   A's K2 rule leaves it uncaptured for every other transition) and its old and new images cross-fade. */
html[data-zm-vt=theme]{view-transition-name:root}

@media (prefers-reduced-motion:no-preference) {
  html:not([data-ios-reduced-motion=true]) #schedule-days[data-interacted=true] button[aria-pressed=true] strong {
    animation:calendar-date-settle 200ms ease-out;
  }
}
@keyframes calendar-date-settle { from {transform:translateY(2px);opacity:.7} to {transform:none;opacity:1} }

/* A narrow reflection on the floating quote controls keeps the map legible. */
@media (forced-colors:none) and (prefers-contrast:no-preference) {
  html:not([data-ios-reduced-transparency=true],[data-ios-increased-contrast=true],[data-ui-performance=low])
    #s-options .icon-button:is(#btn-opt-back,#btn-quote-center) {
    background-color:var(--quote-fill);
    background-image:linear-gradient(155deg,#ffffff14,transparent 58%);
    box-shadow:inset 0 1px #ffffff18;
    border-color:var(--booking-edge);border-radius:16px;
  }
}
@media (prefers-reduced-transparency:reduce) {
  html #s-options .icon-button:is(#btn-opt-back,#btn-quote-center) {background-image:none!important;box-shadow:none!important;}
}
