/* 移动端(H5)兼容性/体验修复 —— 纯附加, 不改布局与视觉
   通过在每页 </head> 前最后引入, 借源码顺序覆盖页面内联 <style> 的同名规则 */

/* 文本/点击基础体验 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
* { -webkit-tap-highlight-color: transparent; }

/* 动态视口高度: 地址栏不再遮挡底部 (旧浏览器忽略 dvh, 回退到页面原 100vh) */
body { min-height: 100dvh; overscroll-behavior-y: contain; background-attachment: scroll; }
.app-wrap { height: 100dvh; }

/* 刘海/底部安全区: 吸底操作栏抬到 Home 指示条之上 (非刘海机 env()=0, 视觉不变) */
footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }

/* 防止 iOS 聚焦输入自动放大 (页面内 input 原为 14px) */
input, select, textarea, .form-control { font-size: 16px; }

/* ===== PC/宽屏: 整体限制为手机宽度(480px)并居中, 防止页面过宽 =====
   手机端(<=480px)完全不受影响; 桌面上呈现为居中的手机宽度列 + 中性留白 + 轻微阴影 */
@media (min-width: 481px) {
  html { background: #e9ecef; }
  /* 用 `html body` 提升优先级, 覆盖 Tailwind 运行时注入的 preflight `body{margin:0}` */
  html body {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.12);
  }
}

/* 统一 Tailwind 的 .max-w-md (默认 28rem=448px) 为 480px, 与全站一致
   (home/success/successb3ea 用到; !important 以覆盖 Tailwind 运行时注入的样式) */
.max-w-md { max-width: 480px !important; }
