/* Small-screen layout only. Transaction handlers and amounts stay unchanged. */
@media screen and (max-width:700px){
 .msp-data-compact .excel-data-grid{min-width:0!important;width:100%!important;max-width:100%!important}
 body{padding-bottom:env(safe-area-inset-bottom)}header{flex-wrap:wrap;gap:10px}header h1{font-size:18px}main{padding:10px}.card{padding:12px}.row input{max-width:100%}button,input,select,textarea{font-size:16px;min-height:44px}nav{gap:6px}nav button{padding:9px 12px}.excel-data-grid{min-width:0;width:100%}.excel-data-grid tbody{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.excel-data-grid td:first-child{min-height:0}.excel-data-grid td{min-height:0;padding:9px}.excel-data-grid .sale-line:last-child:nth-child(odd){grid-column:1/-1}.excel-slot{margin:-9px -9px 8px}.excel-data-grid input,.excel-data-grid td input.name{min-height:44px}.summary{gap:12px;padding:12px}.summary strong{font-size:20px}.confirm-dialog{max-width:94vw}#print-preview{padding:12px}.table-wrap{max-width:100%;overscroll-behavior-x:contain}}
@media screen and (max-width:390px){.excel-data-grid tbody{grid-template-columns:1fr}.excel-data-grid .sale-line:last-child:nth-child(odd){grid-column:auto}}

/* Current DATA workspace on phones: same records and handlers, touch-sized inputs. */
@media screen and (max-width:700px){
 .msp-data-compact .excel-data-grid tbody{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .msp-data-compact .excel-data-grid input,.msp-data-compact .excel-data-grid input.name,.msp-data-compact .excel-data-grid td:first-child input,.msp-data-compact .msp-data-header input,.msp-data-compact .pay .pay-fields input{min-height:44px!important;height:44px!important;font-size:16px!important}
 .msp-data-compact .excel-data-grid td:not(:first-child):not(:last-child){grid-template-columns:minmax(0,1fr)!important}
 #data-record-toolbar{flex-wrap:wrap}#data-record-badge{min-width:0;width:100%;text-align:start}
 .data-record-navigation{width:100%}.data-record-navigation button,#data-sheet-keys button{min-height:44px}
 .msp-data-compact .msp-data-items{display:block!important}.msp-data-compact .msp-data-header>.grid{grid-template-columns:1fr!important}
 .msp-data-compact .msp-data-header .excel-gold-rate{max-width:none!important;width:100%}
 .msp-data-compact #current-print-controls{display:flex;flex-wrap:wrap;float:none!important}
 .msp-data-compact #current-print-controls button{flex:1;min-width:140px}
}
@media screen and (max-width:390px){.msp-data-compact .excel-data-grid tbody{grid-template-columns:1fr!important}}
