/* Preserve existing POS controls; size the keypad intrinsically and scroll only when necessary. */
@media(min-width:701px){
 body.uiNextPos #posSaleForm.cashier117{grid-template-rows:46px 36px 28px clamp(90px,calc(100dvh - 620px),202px) minmax(0,1fr) 64px!important}
 body.uiNextPos #posSaleForm .uiNext-keypad{min-height:0!important;min-width:0!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-width:thin}
 body.uiNextPos #posSaleForm.cashier117 .uiNext-keypad>.cashier116-pay{height:auto!important;min-height:100%!important;max-height:none!important;overflow:visible!important;padding:4px!important;box-sizing:border-box}
 body.uiNextPos #posSaleForm .cashier116-keypad{padding:0!important;margin:0!important}
 body.uiNextPos #posSaleForm .cashier116-keypad>div{gap:5px!important}
 body.uiNextPos #posSaleForm .cashier116-keypad [data-key117]{height:clamp(36px,5.8dvh,46px)!important;min-height:clamp(36px,5.8dvh,46px)!important;max-height:none!important;padding:3px!important;font-size:clamp(16px,2.6dvh,21px)!important;line-height:1.2!important}
 body.uiNextPos #posSaleForm .cashier116-keypad [data-key117=Enter]{height:auto!important}
 body.uiNextPos #posSaleForm .cashier117-entry{gap:3px!important;margin:0 0 4px!important;padding:0!important;font-size:12px!important}
 body.uiNextPos #posSaleForm .cashier117-entry input{height:clamp(34px,5.8dvh,46px)!important;min-height:clamp(34px,5.8dvh,46px)!important;padding:3px 6px!important;font-size:21px!important}
 body.uiNextPos #posSaleForm>.cashier117-rail{height:64px!important;min-height:64px!important;max-height:64px!important;bottom:6px!important;padding:4px!important;flex-wrap:nowrap!important;justify-content:flex-start!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin;overscroll-behavior-x:contain}
 body.uiNextPos #posSaleForm>.cashier117-rail>button:not([hidden]){flex:0 0 auto!important;height:44px!important;min-height:44px!important;max-height:44px!important;min-width:100px!important;margin:0!important}
}
@media(max-width:700px){
 body.uiNextPos.cashier-focus116{overflow-y:auto!important}
 body.uiNextPos.cashier-focus116 main{height:auto!important;min-height:100dvh!important;overflow:visible!important}
 body.uiNextPos.cashier-focus116 #posPanel{height:auto!important;min-height:0!important;padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
 body.uiNextPos #posSaleForm.cashier117{height:auto!important;min-height:0!important;padding-bottom:12px!important}
 body.uiNextPos #posSaleForm .uiNext-keypad,body.uiNextPos #posSaleForm .uiNext-keypad>.cashier116-pay{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
 body.uiNextPos #posSaleForm>.cashier117-rail{justify-content:start!important;box-sizing:border-box!important;left:0!important;right:0!important;width:100%!important;grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:minmax(100px,1fr)!important;grid-template-rows:44px!important;height:calc(72px + env(safe-area-inset-bottom))!important;min-height:72px!important;max-height:none!important;padding:6px 6px calc(6px + env(safe-area-inset-bottom))!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin}
}
