/* ============================================
   chndir.com mobile fixes — from 检查报告
   iPhone / max-width: 1200px
   ============================================ */

@media screen and (max-width: 1200px) {

  /* ---- 1. 右侧悬浮工具栏（Ukefu .side）→ 收起为底部可展开 ---- */
  .side {
    top: auto !important;
    bottom: 70px !important;
    right: 8px !important;
    margin-top: 0 !important;
    width: 48px !important;
    border: none !important;
    background: transparent !important;
    max-height: 48px;
    overflow: hidden;
    transition: max-height .3s ease;
    z-index: 10050 !important;
  }
  .side.is-open,
  .side:hover,
  .side:focus-within {
    max-height: 480px;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
  }
  .side ul li {
    width: 48px !important;
    height: 48px !important;
    font-size: 11px !important;
    line-height: 16px !important;
  }
  .side ul li i {
    margin-top: 6px !important;
    height: 20px !important;
    background-size: auto 18px !important;
  }
  .side ul li .sidebox,
  .side ul li.sideetel .telBox.son,
  .side ul li.sideewm .ewBox.son {
    left: auto !important;
    right: 52px !important;
    width: min(240px, 70vw) !important;
  }
  .side ul li.sideetel .telBox dd {
    padding-left: 16px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
  }
  .side ul li.sideetel .telBox dd span {
    white-space: normal !important;
    height: auto !important;
    margin-top: 12px !important;
  }

  /* ---- 2. 免费软件标签 / 侧栏遮挡 ---- */
  .side_bar {
    right: 6px !important;
    width: auto !important;
    z-index: 10040 !important;
  }
  .side_bar .side_top {
    display: none !important; /* 移动端隐藏「免费软件」展开条，避免遮挡 */
  }
  .side_bar .side_bot {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
  }
  .side_bar .side_bot img {
    width: 48px !important;
    height: 48px !important;
    object-fit: cover;
  }

  /* ---- 3. 汉堡菜单：确保默认折叠，仅勾选后展开 ---- */
  header nav,
  .header_box nav {
    top: -120% !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  input.hamburger:checked ~ nav,
  .header_box input.hamburger:checked ~ nav {
    top: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  .header_box .header_r > nav > ul {
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  label.menu {
    display: block !important;
  }

  /* ---- 4. 轮播标题不被遮挡 ---- */
  .banner_box .banner_wrap,
  .banner_box .banner_txt,
  .m_banner .banner_wrap,
  .m_banner .banner_txt {
    padding-right: 56px !important;
    padding-left: 4% !important;
    box-sizing: border-box;
    max-width: 100%;
  }
  .banner_box .banner_txt {
    font-size: clamp(18px, 5.2vw, 28px) !important;
    line-height: 1.35 !important;
    word-break: break-word;
  }

  /* ---- 5. 数据统计区间距 ---- */
  .gl_num,
  .global_box .gl_num,
  .gl_w {
    display: block;
  }
  .gl_num {
    margin-bottom: 8px !important;
  }
  .gl_w {
    font-size: 14px !important;
    line-height: 1.5 !important;
    padding: 0 6px;
  }

  /* ---- 6. 底部栏目 2×2 ---- */
  .footer_top .footer_nav ul.flex_box,
  .footer_nav ul {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px 16px !important;
    flex-wrap: wrap !important;
  }
  .footer_top .footer_nav ul li {
    width: auto !important;
    flex: none !important;
    text-align: center;
  }
  .footer_top .footer_nav ul li a {
    font-size: 14px !important;
    line-height: 1.5 !important;
    padding: 8px 4px !important;
    display: block;
  }

  /* ---- 7. 底部二维码放大 ---- */
  .footer_qr ul {
    display: flex !important;
    justify-content: center;
    gap: 20px;
  }
  .footer_qr .qr_img,
  .footer_qr .qr_img img {
    width: 120px !important;
    height: 120px !important;
    max-width: 38vw !important;
    max-height: 38vw !important;
  }

  /* ---- 8. 备案图标对齐 ---- */
  .footer_cpr,
  .footer_cpr span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    line-height: 1.6;
    font-size: 12px !important;
  }
  .footer_cpr img,
  .footer_bot img {
    height: 16px !important;
    width: auto !important;
    vertical-align: middle;
    display: inline-block;
  }
  .footer_bot {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px;
  }
  .footer_line {
    display: none !important;
  }

  /* ---- 9. 疗法体系：课程 Tab 横向滑动 ---- */
  .kctx_s1 .kctx_tab,
  .kctx_tab,
  .kctx_nav,
  ul.kctx_menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }
  .kctx_tab li,
  .kctx_nav li,
  ul.kctx_menu li {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-width: max-content;
  }
  .kctx_tab li p,
  .kctx_tab .kctx_w,
  .kctx_s1 .kctx_w {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: unset !important;
    font-size: 13px !important;
  }

  /* 适龄课程英文标题缩小/隐藏 */
  .kctx_s2 .kctx_en,
  .kctx_box .kctx_en {
    display: none !important;
  }

  /* 年龄滑块圆点缩小 */
  .kctx_s2 .ui-slider-handle,
  .kctx_s2 .ui-slider-pip,
  .ui-slider-pips .ui-slider-handle {
    width: 18px !important;
    height: 18px !important;
    margin-left: -9px !important;
  }
  .kctx_s2 .ui-slider-pip .ui-slider-line,
  .ui-slider-pips .ui-slider-pip {
    transform: scale(.75);
  }

  /* 课程表格左右留白 */
  .kctx_s2 .kctx_table,
  .kctx_s2 table,
  .kctx_rec {
    margin-left: 4% !important;
    margin-right: 4% !important;
    width: 92% !important;
    box-sizing: border-box;
  }

  /* 表单 placeholder 加深 */
  .kctx_form input::placeholder,
  .side_form input::placeholder,
  .news_sear1 input::placeholder,
  input::placeholder,
  textarea::placeholder {
    color: #888 !important;
    opacity: 1 !important;
  }

  /* Banner 右侧留白（疗法体系等） */
  .inner_main .banner_box,
  .kctx_box .banner_box,
  .inews_box {
    padding-right: 0;
  }

  /* ---- 10. 课程资源卡片 ---- */
  .pphd_box .pphd_item h3,
  .pphd_box .pphd_tit,
  .pphd_s1 h3,
  .pphd_s2 h3 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    text-overflow: ellipsis;
    line-height: 1.4 !important;
    max-height: 2.8em;
  }
  .pphd_box .pphd_desc,
  .pphd_box .pphd_sw,
  .pphd_s1 p,
  .pphd_s2 p {
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.55 !important;
    font-size: 14px !important;
  }

  /* ---- 11. 分页按钮加大 ---- */
  .list_pages a,
  .list_pages span,
  .pagination li a,
  .pagination li span,
  .pagination a,
  .pagination span {
    min-width: 44px !important;
    min-height: 44px !important;
    line-height: 44px !important;
    padding: 0 12px !important;
    margin: 4px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 14px !important;
    box-sizing: border-box;
  }
  .list_pages,
  .pagination {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  /* ---- 12. 训练测评：卡片纵向堆叠 ---- */
  .yeg_box .yeg_con,
  .yeg_box .yeg_list,
  .yeg_con {
    display: block !important;
  }
  .yeg_box .yeg_ss,
  .yeg_ss {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 16px !important;
    box-sizing: border-box;
  }
  .yeg_sw,
  .yeg_box .yeg_sw,
  .czmm_txt,
  .klcz_sw {
    font-size: 15px !important;
    line-height: 1.7 !important;
  }
  .czmm_box .czmm_con,
  .klcz_box .klcz_con ul,
  .klcz_con {
    display: block !important;
  }
  .klcz_ss {
    width: 100% !important;
    margin-bottom: 16px;
  }
  .czmm_l img,
  .czmm_img img,
  .yeg_img img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* ---- 13. AI智训：单卡滑动 / 大师 / 证书 ---- */
  .hyfl_s1 .swiper-slide,
  .hyfl_s1 .hyfl_card {
    width: 85% !important;
  }
  .hyfl_s2 img,
  .hyfl_master img,
  .hyfl_s2 .hyfl_item {
    min-width: 72px;
  }
  .hyfl_s2 .flex_box,
  .hyfl_master,
  .hyfl_s3 .flex_box,
  .hyfl_cert {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
  }
  .hyfl_s3 img,
  .hyfl_cert img {
    width: 140px !important;
    height: auto !important;
    max-width: none !important;
    flex: 0 0 auto;
  }
  .hyfl_s7 .qr_img img,
  .hyfl_box .footer_qr img,
  .hyfl_s5 img[src*="qr"],
  .hyfl_box img[src*="ewm"],
  .hyfl_box img[src*="QR"] {
    width: 140px !important;
    max-width: 50vw !important;
  }

  /* ---- 14. 视频教学：标签滑动、标题2行、间距 ---- */
  .spjx_tab,
  .shipin_tab,
  .video_tab,
  .lists_shiping .tab,
  .sp_nav,
  .spjx_box .flex_box.tab,
  .video_tags {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }
  .spjx_tab li,
  .video_tags a,
  .sp_nav a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
  .spjx_box h3,
  .shipin_list h3,
  .video_list h3,
  .sp_item h3,
  .spjx_tit {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4 !important;
  }
  .spjx_box ul.flex_box,
  .shipin_list ul,
  .video_list ul {
    gap: 14px !important;
  }

  /* ---- 15. 康复案例 ---- */
  .news_list2 .news_h,
  .inews_box .news_h,
  .news_list2 h3 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4 !important;
  }
  .news_list2 .news_w,
  .inews_box .news_w {
    font-size: 14px !important;
    line-height: 1.7 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .news_list2 .news_img,
  .news_list2 .news_img img {
    width: 100% !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    height: auto !important;
    max-height: 220px;
  }

  /* ---- 16. 购买支持 ---- */
  .jmhz_s1 h1,
  .jmhz_box h1 {
    word-break: keep-all;
    overflow-wrap: anywhere;
    line-height: 1.35 !important;
    font-size: clamp(18px, 5vw, 24px) !important;
  }
  .jmhz_box table,
  .jmhz_s1 table {
    display: block;
    width: 100% !important;
  }
  .jmhz_box table tr,
  .jmhz_s1 table tr {
    display: block;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
  }
  .jmhz_box table td,
  .jmhz_box table th,
  .jmhz_s1 table td,
  .jmhz_s1 table th {
    display: block;
    width: 100% !important;
    text-align: left !important;
    padding: 4px 0 !important;
  }
  .jmhz_box table td:first-child,
  .jmhz_box table th:first-child {
    font-weight: 600;
    color: #666;
    font-size: 13px;
  }
  .jmhz_s2 img[src*="douyin"],
  .jmhz_box .qr img,
  .jmhz_s2 .qr_img img {
    max-width: 160px !important;
    width: 40vw !important;
    margin: 0 auto;
    display: block;
  }
  .jmhz_tip,
  .jmhz_s1 .tip,
  .jmhz_box .tips,
  .jmhz_notice {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box;
  }
  .jmhz_s3 .flex_box,
  .jmhz_versions,
  .jmhz_s3 ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .jmhz_s3 li,
  .jmhz_versions li,
  .jmhz_s3 .item {
    width: 100% !important;
  }

  /* ---- 17. 关于我们 ---- */
  .yeg_box .article_w,
  .yeg_sw,
  .lists_single .article_w {
    line-height: 1.75 !important;
    font-size: 15px !important;
  }
  .yeg_box img,
  .czmm_box img,
  .klcz_box img {
    max-width: 100% !important;
    height: auto !important;
  }
  .klcz_con .flex_box {
    display: block !important;
  }
  .klcz_ss {
    width: 100% !important;
  }

  /* ---- 通用：占位白图 / 溢出 ---- */
  img {
    max-width: 100%;
  }
  .center_box {
    overflow-x: hidden;
  }

  /* 主内容右侧留出悬浮按钮空间（收起态） */
  body {
    padding-right: 0 !important;
  }
  main,
  .inner_main,
  .wave_container {
    padding-right: 8px;
  }

  /* 视频分类横向滑动 */
  .category-nav .category-list,
  .category-list-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding-bottom: 8px;
  }
  .category-list-scroll .category-item {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
  .video-title,
  .clamp_txt2 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    line-height: 1.4 !important;
  }
  .video-list {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 14px !important;
  }
  .video-item {
    width: auto !important;
  }

  /* 课程卡片：悬停层标题限制行数 */
  .pphd_stit {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
  }
  .pphd_w {
    display: -webkit-box !important;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.55 !important;
  }

  /* Ukefu 侧栏默认收起，点 FAB 展开 */
  .side:not(.is-open) {
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0;
    pointer-events: none;
  }
  .side.is-open {
    max-height: 480px !important;
    opacity: 1;
    pointer-events: auto;
  }
}

/* 手机竖屏进一步收紧 */
@media screen and (max-width: 767px) {
  .side {
    bottom: 16px !important;
  }
  .side_bar {
    bottom: 72px;
    right: 8px;
  }
  .footer_qr .qr_img,
  .footer_qr .qr_img img {
    width: 130px !important;
    height: 130px !important;
  }
  .side-toggle-fab {
    bottom: 16px !important;
  }
}


/* ===== remaining report fixes ===== */
@media screen and (max-width: 1200px) {
  /* 首页理念卡片：避免白块，保证背景图可见 */
  .phil_box .phil_img,
  .phil_img_fix {
    min-height: 220px !important;
    height: 56vw !important;
    max-height: 360px !important;
    background-color: #6f8fc4 !important;
    background-size: cover !important;
    background-position: center !important;
  }
  .phil_box .phil_img img {
    opacity: 0 !important; /* spacer only */
  }

  /* 关于我们：空 banner 不占位 */
  .banner_xjm:empty,
  .banner_xjm img[src=""],
  .banner_xjm img:not([src]) {
    display: none !important;
  }
  .banner_xjm {
    max-height: 42vw;
    overflow: hidden;
  }
  .banner_xjm img {
    width: 100%;
    height: auto;
    max-height: 42vw;
    object-fit: cover;
  }

  /* 课程资源：默认层保留，避免双标题叠字 */
  .pphd_box .pphd_show .pphd_stit {
    -webkit-line-clamp: 2;
  }
  .pphd_box .pphd_hide {
    /* 移动端不依赖悬停，允许点击/默认看 hide 层内容时可改为显示 */
  }

  /* 长文案可展开 */
  .news_w.clamp_txt,
  .phil_w.clamp_txt,
  .pphd_w.clamp_txt,
  .yeg_sw,
  .czmm_txt,
  .hyfl_exp {
    max-height: none;
  }
  .js-expandable {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    position: relative;
  }
  .js-expandable.is-open {
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  .js-expand-btn {
    display: inline-block;
    margin-top: 6px;
    color: #2ca6e0;
    font-size: 13px;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  /* 成长密码大图 */
  .czmm-zoom {
    cursor: zoom-in;
    width: 100%;
    height: auto !important;
    max-height: none !important;
  }
  .czmm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .czmm-lightbox[hidden] { display: none !important; }
  .czmm-lightbox-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.78);
  }
  .czmm-lightbox-img {
    position: relative;
    z-index: 1;
    max-width: 94vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
  }
  .czmm-lightbox-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    font-size: 28px;
    line-height: 40px;
    cursor: pointer;
  }

  /* AI 插图文字可读 */
  .hyfl_r img,
  .hyfl_s7 .hyfl_r img {
    max-width: 100% !important;
    height: auto !important;
  }
  .hyfl_qr img {
    width: 140px !important;
    max-width: 46vw !important;
  }
}
