/* ==========================================================================
   移动端体验增强 · Mobile Enhancement  (chuan2.cn)
   引入位置：main.css 之后；仅在 ≤760px 生效，不影响桌面端
   优化点：顶部授权条拥挤 / 触控目标过小 / 字号过小 / 列表行过挤
   ========================================================================== */

@media (max-width: 760px) {

  /* ---- 基础：禁止 iOS 横竖屏字号重排，轻触反馈 ---- */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { -webkit-tap-highlight-color: rgba(220, 38, 38, .10); }

  /* ============ 1. 顶部授权条：横向滑动代替挤压 ============ */
  .top-auth-strip { padding: 7px 0; }
  .top-auth-row {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
  }
  .top-auth-row::-webkit-scrollbar { display: none; }
  .top-auth-left {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
  }
  .top-auth-sep { display: none; }
  .top-auth-badge {
    font-size: 11.5px;
    padding: 4px 11px;
    gap: 5px;
    white-space: nowrap;
    border-radius: 999px;
    flex: none;
  }
  .top-auth-badge .auth-icon,
  .top-auth-badge svg { width: 12px; height: 12px; flex: none; }

  /* ============ 2. 导航：触控目标 ≥ 40px ============ */
  .site-header .nav-row { min-height: 58px; }
  .nav-account { gap: 8px; }
  .nav-account .btn {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 13.5px;
    border-radius: 8px;
  }
  .nav-burger { min-width: 46px; min-height: 46px; border-radius: 8px; }
  .site-header.open .main-nav {
    top: 58px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  }
  .site-header.open .main-nav .nav-link {
    padding: 15px 8px;
    font-size: 15px;
    letter-spacing: .5px;
  }

  /* ============ 3. Hero 标题区：层级清晰不拥挤 ============ */
  .hero-split { gap: 14px; }
  .path-title { line-height: 1.3 !important; }
  .path-title .t-main { font-size: 1.66rem; letter-spacing: 1px !important; }
  .path-title .grad { font-size: .98rem; letter-spacing: .5px !important; }
  .path-title .t-rule { margin-top: 10px !important; }
  .path-title .t-tag { font-size: 9.5px; letter-spacing: 2.5px; }
  .hero-split-right .path-subtitle,
  .hero-split-right .hero-desc {
    font-size: 13px !important;
    line-height: 1.85 !important;
  }
  .hero-stats { gap: 8px !important; }
  .hs-chip { font-size: 12px; padding: 6px 12px; border-radius: 999px; }

  /* ============ 4. 课程搜索工具栏 ============ */
  .cx-toolbar { gap: 10px; }
  .cx-search {
    flex: 1 1 100%;
    min-height: 46px;
    font-size: 15px; /* ≥16px 规避 iOS 聚焦缩放，15 为折中 */
    padding: 11px 14px;
  }
  #cxReset {
    min-height: 46px;
    min-width: 96px;
    font-size: 14px;
    flex: 0 0 auto;
  }

  /* ============ 5. 最新更新列表：减负 + 呼吸感 ============ */
  .rc-item { padding: 14px 16px; gap: 10px; }
  .rc-date { font-size: 12px; min-width: 0; flex: none; opacity: .78; }
  .rc-title {
    font-size: 14px;
    line-height: 1.6;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .rc-dur { display: none; } /* 手机上省去时长，保标题 */
  .rc-go { font-size: 12.5px; flex: none; }
  .rc-group-head { padding: 9px 12px; }
  .rc-g-name { font-size: 14px; }
  .rc-g-count { font-size: 12px; }
  .nbadge {
    font-size: 9.5px;
    padding: 2px 6px;
    box-shadow: none;
  }
  .nbadge::before { animation: none; opacity: .9; } /* 手机上停用闪烁动画，减视觉噪音 */

  /* ============ 6. 九阶系列与课程列表 ============ */
  .cx-s-name { font-size: 13.5px; }
  .cx-s-meta { font-size: 12px; }
  .cx-c-head { font-size: 15px; padding: 12px 14px; }
  .cx-c-head small { font-size: 12px; }
  .cx-lesson { padding: 13px 14px; gap: 10px; }
  .cx-lesson .ti { font-size: 14px; line-height: 1.6; }
  .cx-lesson .no { font-size: 11.5px; min-width: 30px; }
  .cx-lesson .du { display: none; }
  .cx-lesson .go { font-size: 12.5px; flex: none; }
  .cx-courses { max-height: none; } /* 手机上放开高度，整页自然滚动 */
  .cx-series { max-height: 260px; }

  /* ============ 7. 通用按钮触控增强 ============ */
  .section .btn,
  .cx-toolbar .btn { min-height: 42px; }
}

/* ---- 超小屏（≤390px）再收紧一档 ---- */
@media (max-width: 390px) {
  .path-title .t-main { font-size: 1.52rem; }
  .path-title .grad { font-size: .92rem; }
  .hs-chip { font-size: 11.5px; padding: 5px 10px; }
  .top-auth-badge { font-size: 11px; padding: 4px 9px; }
}

/* ---- 触控设备无 hover 时的列表行反馈 ---- */
@media (hover: none) and (max-width: 760px) {
  .rc-item:active,
  .cx-lesson:active { background: #fef2f2; }
  .nav-account .btn:active,
  .nav-burger:active { opacity: .82; }
}
