/* Phone optimizations (<= 760px) */
html{-webkit-text-size-adjust:100%;overscroll-behavior-y:none}
button,a,input,select{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
@media(max-width:760px){
 body{overflow-x:hidden}
 .wrap{padding-left:14px!important;padding-right:14px!important;padding-bottom:calc(104px + env(safe-area-inset-bottom))!important}
 h1{font-size:26px;line-height:1.15}
 /* bottom nav: scrollable, comfortable touch targets */
 .nav{justify-content:flex-start!important;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scrollbar-width:none;padding:6px 8px calc(6px + env(safe-area-inset-bottom))!important;gap:2px}
 .nav::-webkit-scrollbar{display:none}
 .nav button{flex:0 0 auto!important;min-width:62px!important;min-height:48px;padding:6px 8px;font-size:10.5px!important;scroll-snap-align:center}
 .nav button svg{width:21px!important;height:21px!important}
 /* header rows */
 .top{gap:8px}
 .top>div:last-child{display:flex;gap:8px;align-items:center;flex-wrap:wrap;max-width:100%}
 .live{font-size:9.5px;padding:5px 9px}
 /* inputs: 16px stops iOS zoom, 44px touch height */
 input,select,textarea{font-size:16px!important;min-height:44px}
 input[type=checkbox],input[type=radio]{min-height:0}
 .exrow input{font-size:14px!important;min-height:38px}
 button{min-height:40px}
 .chip,.seg button,.mseg button{min-height:38px}
 /* chip rows wrap instead of clipping */
 .chips,.row.chips,.seg,.mseg,.pills{flex-wrap:wrap!important}
 .card{padding:16px;border-radius:20px}
 .grid2{grid-template-columns:1fr 1fr;gap:10px}
 /* timer button: smaller, out of the way */
 #fab{right:12px;bottom:calc(76px + env(safe-area-inset-bottom))}
 #fab>button,#fab .fabb{width:46px;height:46px;opacity:.92}
 #rt{left:12px;right:12px;bottom:calc(132px + env(safe-area-inset-bottom));width:auto}
 /* modal full width */
 .mdl .pan{max-width:100%;border-radius:22px 22px 0 0}
 table{font-size:13px}
 .stats{grid-template-columns:1fr 1fr!important}
 svg text{font-size:10px}
 .grid2>*,.grid3>*{min-width:0}
 input,select,textarea{box-sizing:border-box;width:100%}
 input[type=checkbox],input[type=radio]{width:auto}
 .top>div:last-child{width:100%;justify-content:space-between}
}
@media(max-width:380px){h1{font-size:23px}.kpi b{font-size:26px}}
@media(max-width:760px){input,select,textarea{min-width:0;max-width:100%}}
