/* SamiMap R108: full-width compact mobile navigation HUD BELOW right-side X.
   All changes scoped to mobile while navigation is active; core scripts untouched. */
@media(max-width:760px){
 html body.bx-r38-ui.navigation-active #rightRail{
   top:max(36px,calc(100dvh - 690px))!important;
   bottom:auto!important;
 }
 html body.bx-r38-ui.navigation-active:is(.bx100-hud-summary,.bx100-hud-collapsed) #driveHud{
   left:max(8px,env(safe-area-inset-left,0px))!important;
   right:max(8px,env(safe-area-inset-right,0px))!important;
   width:calc(100vw - 16px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px))!important;
   max-width:none!important;
   top:auto!important;
   bottom:max(8px,env(safe-area-inset-bottom,0px))!important;
   height:152px!important;min-height:152px!important;max-height:152px!important;
   transform-origin:center bottom!important;
   touch-action:pan-y!important;
   transition:transform 640ms cubic-bezier(.22,1,.36,1),opacity 420ms ease!important;
 }
 html body.bx-r38-ui.navigation-active:is(.bx100-hud-summary,.bx100-hud-collapsed) #driveHud > #bxR40RoadHud{
   box-sizing:border-box!important;
   height:152px!important;min-height:152px!important;max-height:152px!important;
   grid-template-columns:repeat(3,minmax(0,1fr))!important;
   grid-template-rows:57px 28px 49px!important;
   grid-template-areas:"arrival eta remain" "road road road" "steps steps steps"!important;
   gap:0!important;
   align-content:center!important;
   padding:7px 11px!important;
   border-radius:18px!important;
 }
 html body.bx-r38-ui.navigation-active:is(.bx100-hud-summary,.bx100-hud-collapsed) #bxR40RoadHud > .bx40-metric{
   height:57px!important;
   padding:2px 5px 3px!important;
   justify-content:center!important;gap:2px!important;
 }
 html body.bx-r38-ui.navigation-active #bxR40RoadHud > .bx40-metric .bx40-metric-icon{
   width:23px!important;height:23px!important;min-width:23px!important;flex:0 0 23px!important;
 }
 html body.bx-r38-ui.navigation-active #bxR40RoadHud > .bx40-metric .bx40-metric-copy strong{
   font-size:15px!important;line-height:1.1!important;
 }
 html body.bx-r38-ui.navigation-active #bxR40RoadHud > .bx40-road-sign{
   height:27px!important;min-height:27px!important;max-height:27px!important;
   margin:1px 0!important;padding:0 8px!important;
 }
 html body.bx-r38-ui.navigation-active #bxR40RoadHud > .bx40-road-sign .bx40-road-name strong{
   font-size:12px!important;
 }
 html body.bx-r38-ui.navigation-active #bxR40RoadHud > #bx102StepsButton{
   height:43px!important;min-height:43px!important;max-height:43px!important;
   width:100%!important;margin:5px 0 0!important;
   border-radius:13px!important;
 }
 html body.bx-r38-ui.navigation-active.bx100-hud-summary #bx102SpeedMap:not([hidden]){
   bottom:max(171px,calc(env(safe-area-inset-bottom,0px) + 171px))!important;
 }
 html body.bx-r38-ui.navigation-active.bx100-hud-summary #bx97HudArrow:not([hidden]){
   left:calc(50% - 24px)!important;
   bottom:max(160px,calc(env(safe-area-inset-bottom,0px) + 160px))!important;
   height:28px!important;
 }
 html body.bx-r38-ui.navigation-active.bx100-hud-collapsed #bx97HudArrow:not([hidden]){
   left:calc(50% - 24px)!important;
 }
 html body.bx-r38-ui.navigation-active #bx97HudArrow:not([hidden]){
   touch-action:none!important;
 }
 html body.bx-r38-ui.navigation-active #driveHud, 
 html body.bx-r38-ui.navigation-active #bx97RouteSheet .bx97-header,
 html body.bx-r38-ui.navigation-active #bx97SheetHandle{
   -webkit-user-select:none!important;user-select:none!important;
 }
}
@media(max-width:760px) and (max-height:680px){
 html body.bx-r38-ui.navigation-active #rightRail{
   top:20px!important;
   gap:2px!important;
 }
 html body.bx-r38-ui.navigation-active #rightRail>button{
   height:38px!important;min-height:38px!important;flex-basis:38px!important;
   width:42px!important;min-width:42px!important;
 }
}
@media(prefers-reduced-motion:reduce){
 html body.bx-r38-ui.navigation-active:is(.bx100-hud-summary,.bx100-hud-collapsed) #driveHud{
   transition:none!important;
 }
}

/* Stronger than R105 summary's height:calc(100% - 22px) legacy rule. */
@media(max-width:760px){
 html body.bx-r38-ui.navigation-active:is(.bx100-hud-summary,.bx100-hud-collapsed) #bxR40RoadHud > .bx40-road-sign{
   height:27px!important;min-height:27px!important;max-height:27px!important;
   align-self:center!important;box-sizing:border-box!important;
   margin:0!important;padding:0 8px!important;
   overflow:hidden!important;align-items:center!important;
 }
 html body.bx-r38-ui.navigation-active:is(.bx100-hud-summary,.bx100-hud-collapsed) #bxR40RoadHud > .bx40-road-sign .bx40-road-name{
   height:24px!important;min-height:0!important;max-height:24px!important;
   align-items:center!important;
 }
 html body.bx-r38-ui.navigation-active:is(.bx100-hud-summary,.bx100-hud-collapsed) #bxR40RoadHud > .bx40-road-sign .bx40-road-name span{
   align-self:center!important;overflow:hidden!important;text-overflow:ellipsis!important;
   max-width:45%!important;
 }
 html body.bx-r38-ui.navigation-active:is(.bx100-hud-summary,.bx100-hud-collapsed) #bxR40RoadHud > .bx40-road-sign .bx40-road-name strong{
   align-self:center!important;
   height:auto!important;max-height:22px!important;line-height:1.2!important;
 }
}
