

@media (hover:none) and (pointer:coarse) and (orientation:portrait){
  /* v1.0.25: mobile portrait polish only. PC layout/controls/GAS/central lobby unchanged. */

  /* Allow the MOMO wheel to overlap the passive MAP slightly. */
  .mpGrid{overflow:visible!important;}
  .mpLeft{overflow:visible!important;position:relative!important;z-index:8!important;}
  .mpCenter{position:relative!important;z-index:2!important;}
  .mpCockpit{overflow:visible!important;position:relative!important;}
  .mpWheel{
    left:54%!important;
    width:110%!important;
    max-width:none!important;
    bottom:-48%!important;
    z-index:9!important;
    pointer-events:none!important;
    transform:translateX(-50%) rotate(0deg)!important;
    transform-origin:50% 50%!important;
  }
  /* Hit areas follow the visible wheel, including the part overlapping the MAP. */
  .mpSteerHit{top:0!important;bottom:0!important;z-index:12!important;touch-action:none!important;}
  .mpSteerHit.left{left:-1%!important;right:auto!important;width:55%!important;}
  .mpSteerHit.right{left:54%!important;right:auto!important;width:55%!important;}

  /* Slightly taller lower deck is allowed; use it only for larger gears and brake. */
  #game{height:calc(100dvh - clamp(180px,23dvh,205px))!important;}
  #mobileDriveUI{
    height:clamp(180px,23dvh,205px)!important;
    grid-template-rows:minmax(0,1fr) 62px!important;
    gap:2px!important;
  }
  .mpRight{grid-template-rows:repeat(5,minmax(0,1fr))!important;gap:2px!important;padding:3px!important;}
  .mpGear{
    min-height:0!important;
    height:100%!important;
    padding:0!important;
    font:900 clamp(9px,3vw,13px)/1 Arial!important;
  }
  .mpBrake{
    grid-column:1 / -1!important;
    height:62px!important;
    min-height:62px!important;
    width:100%!important;
    margin:0!important;
    transform:none!important;
    font:900 clamp(15px,4.8vw,22px)/1 Arial!important;
  }

  /* Aggressively suppress iOS/Android callout, magnifier, selection and double-tap zoom on controls. */
  #mobileDriveUI,#mobileDriveUI *{
    -webkit-user-select:none!important;
    user-select:none!important;
    -webkit-touch-callout:none!important;
    -webkit-user-drag:none!important;
    -webkit-tap-highlight-color:transparent!important;
  }
  #mobileDriveUI button,#mobileDriveUI .mpSteerHit{touch-action:none!important;}
}

