<view class="page-body">
  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">土壤初始 pH：</view>
      <input 
        class="input-field"  
        placeholder="3~6" 
        value="{{init_pH}}" 
        bindinput="onInitPhChange" 
        inputmode="decimal"  
      />
    </view>
  </view>

  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">土壤目标 pH：</view>
      <input 
        class="input-field"  
        placeholder="5~7" 
        value="{{target_pH}}" 
        bindinput="onTargetPhChange" 
        inputmode="decimal"  
      />
    </view>
  </view>

  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">土壤有机质(g/kg)：</view>
      <input 
        class="input-field" 
        type="text" 
        placeholder="10~30" 
        value="{{OM}}" 
        bindinput="onOMChange" 
        inputmode="decimal"
      />
    </view>
  </view>

  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">土壤粘粒(g/kg)：</view>
      <input 
        class="input-field" 
        type="text" 
        placeholder="50~600" 
        value="{{CL}}" 
        bindinput="onCLChange" 
        inputmode="decimal"
      />
    </view>
  </view>

  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">交换性氢(cmol/kg)：</view>
      <input 
        class="input-field" 
        type="text" 
        placeholder="0~4" 
        value="{{H}}" 
        bindinput="onHChange" 
        inputmode="decimal"
      />
    </view>
  </view>

  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">交换性铝(cmol/kg)：</view>
      <input 
        class="input-field" 
        type="text" 
        placeholder="0~4" 
        value="{{Al}}" 
        bindinput="onAlChange" 
        inputmode="decimal"
      />
    </view>
  </view>

  <!-- 弹窗部分 -->
  <view wx:if="{{showModal}}" class="modal-overlay">
    <view class="modal">
      <view class="modal-header">
        <text>每亩土壤(表层20cm)撒{{result}}吨生石灰</text>
        <button class="close-btn" bindtap="closeModal">×</button>
      </view>
      <view class="modal-body">
        <text>{{result}}吨</text>
      </view>
    </view>
  </view>

  <!-- 计算按钮 -->
  <view class="green-btn">
    <button class="btn" bindtap="calculate">计算</button>
  </view>
</view>
