/* FoodOS V9.9.2 — conservative mobile safety layer.
   Keeps the proven V9.7.1 layouts and only prevents actions from leaving the visible viewport. */
html,body{max-width:100%;overflow-x:hidden}
button,input,select,textarea{max-width:100%;box-sizing:border-box}
@media (max-width:760px){
  .v9-modal{padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;align-items:flex-end!important}
  .v9-modal-card{width:100%!important;max-height:calc(100vh - 16px)!important;max-height:calc(100dvh - 16px)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
  .v9-modal-card>form,.v9-modal-form{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-y:contain!important;scroll-padding-bottom:84px!important}
  .v9-modal-card>form>footer,.v9-modal-form>footer{position:sticky!important;bottom:0!important;z-index:30!important;margin-bottom:0!important;padding-bottom:calc(10px + env(safe-area-inset-bottom))!important;background:var(--panel)!important}
  .v931-edit-card,.v922-sheet-card,.v930-sheet-card{max-height:calc(100vh - 8px)!important;max-height:calc(100dvh - 8px)!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  .v931-edit-card form,.v922-sheet-card form,.v930-sheet-card form{min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-y:contain!important;scroll-padding-bottom:84px!important}
  .v931-edit-card footer,.v922-product-form footer{position:sticky!important;bottom:0!important;z-index:30!important;background:var(--panel)!important;padding-bottom:calc(10px + env(safe-area-inset-bottom))!important}
  .v930-material-form .button.wide,.v930-material-form>button.wide{min-height:48px!important;width:100%!important}
  input,select,textarea{font-size:16px!important}
  .v99-customizer-card{max-height:calc(100vh - 4px)!important;max-height:calc(100dvh - 4px)!important}
  .v99-customizer-body{overscroll-behavior-y:contain!important}
  .v99-customizer-card>footer{position:sticky!important;bottom:0!important;z-index:20!important;padding-bottom:calc(10px + env(safe-area-inset-bottom))!important}
}
@media (max-width:380px){
  .v9-modal-card>form>footer,.v9-modal-form>footer,.v931-edit-card footer,.v99-customizer-card>footer{grid-template-columns:1fr!important}
  .button,button{min-height:44px}
}
