/* H5 手机版（<1024px）：底部标签栏、紧凑顶栏、安全区、大点击区。独立于 Tailwind 编译产物，只写原生 CSS。 */
.h5-tabbar { display: none; }

@media (max-width: 1023.98px) {
  :root { --h5-tab-h: 56px; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body {
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
    padding-bottom: calc(var(--h5-tab-h) + env(safe-area-inset-bottom));
  }

  /* 顶栏更紧凑，并避开刘海 */
  header.sticky { padding-top: env(safe-area-inset-top); }
  header.sticky > .wrap { height: 56px !important; }
  header.sticky .text-\[22px\] { font-size: 18px; }
  header.sticky .size-8 { width: 1.75rem; height: 1.75rem; }

  /* 表单控件 16px，避免 iOS 聚焦时自动放大；按钮、链接点击区 ≥44px */
  input, select, textarea { font-size: 16px !important; }
  .btn:not(.btn-xs) { min-height: 44px; }
  .input, .select { min-height: 44px; }

  /* 卡片更圆润，页脚收紧 */
  .tp-card { border-radius: 16px; }
  footer.mt-16 { margin-top: 2rem; }
  footer .wrap { padding-top: 2rem; padding-bottom: 2rem; }

  /* 底部标签栏 */
  .h5-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(var(--h5-tab-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .05);
  }
  .h5-tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: #6b7280; font-size: 11px; line-height: 1; text-decoration: none; position: relative;
  }
  .h5-tabbar a:active { background: rgba(0, 0, 0, .04); }
  .h5-tabbar a.on { color: #00935f; font-weight: 600; }
  .h5-tabbar a.on::before {
    content: ""; position: absolute; top: 0; width: 24px; height: 3px; border-radius: 0 0 3px 3px; background: #00b67a;
  }
  .h5-tabbar .dot {
    position: absolute; top: 8px; margin-left: 14px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    background: #ef4444; color: #fff; font-size: 10px; line-height: 16px; text-align: center;
  }

  /* Toast 避开刘海 */
  .toast-top { top: env(safe-area-inset-top); }
}
