/* Keep a full line for the weight, independent of the unit and +/- buttons.
   Use the input's available space, not an iOS user-agent check or fixed ch width. */
@media screen and (max-width:900px), screen and (pointer:coarse){
  :is(#quickWeights,#recordWeights) .weight-control .stepper{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:center;
    row-gap:4px;
    column-gap:0;
    container-type:inline-size;
  }
  :is(#quickWeights,#recordWeights) .weight-control .weight-number{
    display:contents;
    container-type:normal;
  }
  :is(#quickWeights,#recordWeights) .weight-control .weight-number input{
    grid-column:1/-1;
    grid-row:1;
    width:100%;
    min-width:0;
    max-width:100%;
    min-height:36px;
    box-sizing:border-box;
    margin:0;
    padding:0 2px;
    border:0;
    font-size:22px;
    font-size:clamp(16px, 27cqw, 28px);
    font-variant-numeric:tabular-nums;
    line-height:1.25;
    text-align:center;
    letter-spacing:0;
    text-indent:0;
    appearance:textfield;
    -webkit-appearance:none;
    -webkit-text-size-adjust:100%;
  }
  :is(#quickWeights,#recordWeights) .weight-control .weight-number input::-webkit-inner-spin-button,
  :is(#quickWeights,#recordWeights) .weight-control .weight-number input::-webkit-outer-spin-button{
    -webkit-appearance:none;
    margin:0;
  }
  :is(#quickWeights,#recordWeights) .weight-control .weight-number>span{
    grid-column:2;
    grid-row:2;
    justify-self:center;
  }
  :is(#quickWeights,#recordWeights) .weight-control .stepper>button{
    grid-row:2;
    max-width:100%;
    margin:0;
  }
  :is(#quickWeights,#recordWeights) .weight-control .stepper>button:first-child{
    grid-column:1;
    justify-self:start;
  }
  :is(#quickWeights,#recordWeights) .weight-control .stepper>button:last-child{
    grid-column:3;
    justify-self:end;
  }
}
