/* =========================================================
   学生萌え · 移动端适配（v1.31）
   本文件在最后加载（依赖 sm-page），只在 ≤768px 生效。
   作用：统一修正移动端的三类问题 ——
     ① iPhone 输入框字号 <16px 会导致"聚焦自动放大整页"
     ② 点按热区太小（散落的文字链接只有 16px 高，拇指点不准）
     ③ 个别文字字号过小（<11px）
   ========================================================= */

@media (max-width: 768px) {

  /* ---------- ① iPhone 缩放：移动端输入框统一 16px ----------
     页面 CSS 各自写过输入框字号，所以这里必须用 !important 才能覆盖。 */
  input, textarea, select, .inp { font-size: 16px !important; }

  /* 顺带：不要左右橡皮筋，减少误触时的横向滑动 */
  html, body { overscroll-behavior-x: none; }

  /* 正文里的表单输入框：移动端不低于 40px 高（页眉搜索框不在此列，避免页眉被撑高） */
  .stage input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
  .d1 input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
  .d1 textarea,
  .stage textarea { min-height: 40px; }

  /* ---------- ② 点按热区：拇指友好（≥40px） ---------- */

  /* 页眉：logo / 站点名 / 用户名 / 头像 / 搜索按钮 */
  .r1 .logo,
  .r1 .sitname,
  .r1 .d12,
  .r1 .uname,
  .r1 .avatar { display: inline-flex; align-items: center; min-height: 40px; }
  .r1 .search button { min-height: 40px; padding: 0 18px; }

  /* 搜索页分类标签：最新文章 / 热门文章 / 我的收藏 / 我的关注 */
  .b1 a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 2px; }
  .b1 { gap: 2px 18px; }

  /* 首页三个大按钮：帖子 / 积分 / 帮助 */
  .menu a { display: flex; align-items: center; justify-content: center; min-height: 44px; }

  /* 正文里的行动链接：登录以回复 / 去登录 / 注册一个 / 忘记密码 / 返回登录 … */
  .tip a,
  .d1 .tip a,
  .c3 a,
  .c4 a,
  .comment-reply-login { display: inline-flex; align-items: center; min-height: 40px; padding: 0 2px; }

  /* 页脚：备案号 / 邮箱 / QQ */
  .r4 a { display: inline-flex; align-items: center; min-height: 40px; }
  .r4 { padding-bottom: 18px; }   /* 底部留白，避免被系统手势条压住 */

  /* ---------- ③ 字号兜底：移动端没有"需要眯眼"的字 ---------- */
  .panel h3,
  .card .meta,
  .bar-wrap i,
  .clockline .tz,
  .post .date { font-size: 12px !important; }

  /* 长标题行高松一点，触摸与阅读都更舒服 */
  .card .t, .panel a, .b2-head { line-height: 1.55; }
}
