/* S-6（2026-09-17）：磨课域触控目标下限 44×44px
 *
 * 背景：PRD §4.2 S-6 —— 移动端/微信 X5 下，磨课页主按钮、工具栏、导航、删除钮、表单控件的
 *       命中区低于平台自定 44px（Apple HIG / Material 最小可点尺寸）。
 * 口径：① 仅在「触摸设备」或「窄屏 ≤820px」生效，不影响桌面版既有排版；
 *       ② 只加最小尺寸与内边距，不改颜色/字号/位置；
 *       ③ 用 !important 兜底，压过各模板内联 <style> 的同名规则（否则被模板特异性覆盖）；
 *       ④ 本文件为**样式级**修复，模拟器量测见报告；真机像素量测仍待补（PRD 判据 A10）。
 * 量测（Chrome 移动视口 390×844，design/materials/staff 三页合计未达标数）：24 → 4。
 */
@media (pointer: coarse), (max-width: 820px) {
  /* ① 按钮/链接类：最小命中区 44×44 */
  .btn,
  .analysis-btn,
  .nav-back,
  .header-btn,
  .btn-start,
  .btn-next-round,
  .btn-save,
  .btn-cancel,
  .btn-upload,
  .recording-btn,
  .btn-copy,
  .btn-download,
  .back,
  a.back,
  button,
  input[type="submit"],
  input[type="button"] {
    box-sizing: border-box !important;
    min-height: 44px !important;
    min-width: 44px !important;
  }

  .btn,
  .analysis-btn,
  .nav-back,
  .header-btn,
  .btn-start,
  .btn-next-round,
  .btn-save,
  .btn-cancel,
  .btn-upload,
  .recording-btn,
  .btn-copy,
  .btn-download,
  .back,
  a.back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* ② 工具栏/页签/操作条 */
  .toolbar a,
  .toolbar button,
  .tabs a,
  .tabs button,
  .actions a,
  .actions button,
  .btn-group > .btn,
  .btn-group > button {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    min-width: 44px !important;
  }

  /* ③ 表单控件（排除勾选框/单选框/文件框，避免视觉放大） */
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea {
    box-sizing: border-box !important;
    min-height: 44px !important;
  }

  /* ④ 带 onclick 的"整块可点"容器（卡片头/折叠标题）：只兜底最小高度 */
  [onclick] {
    min-height: 44px !important;
  }

  /* ⑤ 磨课域内的纯文本链接（返回 / 退出登录等，无 class） */
  a[href^="/ai-lesson-planning"],
  a.nav-back,
  a.back {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    min-width: 44px !important;
  }

  /* ⑥ 公共返回链（wx_back_guard.js 注入，href=javascript:void(0)，无 class）——命中区下限 44×44 */
  a[href^="javascript:"],
  [onclick][href] {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    min-width: 44px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
