/* ============================================================
   mobile.css  手机端适配（≤900px 生效，PC 端不受任何影响）
   引入顺序：public.css / 各页 css 之后，故同级 !important 后者胜出；
   模板内联 style 用「选择器 + !important」压制。
   ============================================================ */

@media (max-width: 900px) {

    /* ---------------- 共享层 ---------------- */
    /* overflow-x 只放 html，body 用 clip（两者都 hidden 会让 body 变成第二个滚动容器，出现双滚动条） */
    html {
        min-width: 0 !important;
        overflow-x: hidden;
    }

    body {
        min-width: 0 !important;
        overflow-x: clip;
        font-size: 14px;
    }

    img {
        max-width: 100%;
    }

    .wrap {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* gw 导航压缩：114px -> 60px */
    .gw-navbar-inner {
        height: 60px !important;
        padding: 0 12px !important;
    }

    .gw-logo img {
        height: 40px !important;
        max-width: 40vw;
        object-fit: contain;
        object-position: left center;
    }

    .gw-nav-center {
        display: none !important;
    }

    .gw-btn-login {
        height: 32px !important;
        line-height: 32px !important;
        padding: 0 14px !important;
        font-size: 13px !important;
    }

    /* 手机端隐藏头像悬停弹窗（功能入口在抽屉菜单，点头像本身跳账户设置） */
    .gw-nav-right .user-popup {
        display: none !important;
    }

    /* 登录后头像区取消 150px 固定宽，昵称超长省略，避免撑破导航行 */
    .gw-nav-right .top-info {
        width: auto !important;
        gap: 6px !important;
    }

    .gw-nav-right .top-info .name {
        max-width: 64px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 头部占位 div 同步压缩 */
    div[style*="height:114px"],
    div[style*="height: 114px"] {
        height: 60px !important;
    }

    /* 面包屑 */
    .site {
        width: 100% !important;
        margin: 12px auto !important;
        padding: 0 12px !important;
        box-sizing: border-box;
        font-size: 13px !important;
    }

    .site a {
        padding: 0 4px !important;
        font-size: 13px !important;
    }

    /* 仅 PC 的悬浮件 */
    .fiexd-right,
    .fixed-left,
    #page1 {
        display: none !important;
    }

    /* footer.js 注入的底部 */
    .footer.warp,
    .footer .warp,
    .warp {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .footer {
        padding: 16px 12px !important;
        height: auto !important;
        font-size: 12px;
    }

    .footer * {
        max-width: 100%;
        white-space: normal !important;
    }

    /* layui 分页控件缩小 */
    .layui-laypage {
        font-size: 12px;
    }

    .layui-laypage a,
    .layui-laypage span {
        padding: 0 8px;
    }

    /* ---------------- course_classify 课程中心 ---------------- */
    /* 头部卡片（标题 + 类型 tab + 搜索） */
    .header-new {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 14px 12px !important;
        box-sizing: border-box;
        border-radius: 0 !important;
    }

    .header-new > .flex-row-start {
        flex-wrap: wrap !important;
    }

    .header-new .jpkc-text {
        font-size: 18px !important;
    }

    /* tab-new 内联 margin-left:90px;width:80% 压制 */
    .header-new .tab-new {
        margin-left: 0 !important;
        width: 100% !important;
        flex-wrap: wrap !important;
        margin-top: 12px;
        padding-top: 0 !important;
    }

    /* 类型 tab：横向可滚动 */
    .header-new .tab-new > .flex-row-start {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header-new .tab-new .course-ul {
        width: 100% !important;
        min-width: max-content;
        height: 44px !important;
        justify-content: flex-start !important;
        padding: 0 14px !important;
        border-radius: 22px !important;
        flex-wrap: nowrap !important;
    }

    .header-new .tab-new li {
        margin-right: 24px !important;
        font-size: 15px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .header-new .tab-new li:last-child {
        margin-right: 0 !important;
    }

    .header-new .tab-new li .tab-li-active {
        top: 30px !important;
    }

    /* 搜索框整行 */
    .header-new .seach {
        width: 100% !important;
        margin-top: 12px;
    }

    .header-new .seach #seach_value {
        flex: 1;
        min-width: 0;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* 筛选条（condition，如启用时） */
    .condition_box .tab_label {
        width: auto !important;
        margin-right: 10px !important;
        font-size: 14px !important;
        flex-shrink: 0;
    }

    .condition_box .condition-item {
        gap: 5px 14px !important;
        padding: 12px 0 !important;
    }

    .condition_box .condition-item .condition-name {
        font-size: 14px !important;
    }

    .condition_box .condition-item .condition-expand {
        position: static !important;
        width: auto !important;
    }

    /* 课程列表：单列卡片 */
    .list,
    .list1 {
        width: 100% !important;
        padding: 0 12px;
        box-sizing: border-box;
        margin: 16px auto !important;
    }

    .list > div {
        padding-bottom: 24px !important;
    }

    /* 分页改文档流排布（public.css 里 absolute 定位在窄屏会叠到卡片上） */
    .pagination {
        position: static !important;
        margin: 20px auto 0 !important;
        text-align: center;
    }

    .pagination .layui-laypage {
        display: inline-flex;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 6px;
    }

    .list .box {
        width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        margin-top: 14px !important;
    }

    .list .box > img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 308 / 171;
        object-fit: cover;
    }

    .list .box .title {
        font-size: 16px !important;
        height: auto !important;
    }

    /* 热门课程 */
    .hot-course {
        width: 100% !important;
        padding: 12px !important;
        box-sizing: border-box;
    }

    .hot-course .list-box {
        flex-wrap: wrap;
    }

    .hot-course .list-box .course_item {
        width: 100% !important;
        margin: 0 0 14px 0 !important;
    }

    /* ---------------- courses_details 课程详情 ---------------- */
    .centent1 {
        width: 100% !important;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .centent1 .left {
        width: 100% !important;
    }

    /* 顶部信息卡：视频 + 右侧信息纵向排列 */
    .centent1 .left .content {
        width: 100% !important;
        padding: 12px !important;
        box-sizing: border-box;
        flex-direction: column !important;
    }

    .centent1 .left .content > .flex-column-between {
        width: 100% !important;
    }

    /* 视频容器 内联 760x408 压制，16:9 自适应 */
    #mse {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
        overflow: hidden;
    }

    #mse img,
    #mse video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }

    /* 右侧信息列 内联 width:810px;margin-left:35px 压制 */
    .centent1 .left .content div[style*="width: 810px"] {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 14px;
    }

    .centent1 .left .content .title {
        font-size: 17px !important;
    }

    .course-sku {
        max-height: 180px !important;
    }

    .banxin {
        margin-right: 10px !important;
        margin-bottom: 10px !important;
        font-size: 13px !important;
    }

    .course-xx {
        margin: 16px 0 !important;
    }

    .centent1 .left .content .box .right1 .pay {
        height: 44px !important;
        line-height: 44px !important;
        padding: 0 30px !important;
        font-size: 15px !important;
    }

    .centent1 .left .content .box {
        padding-bottom: 10px !important;
    }

    /* 课程主体卡 */
    .centent1 .left .course {
        width: 100% !important;
        min-height: 0 !important;
        margin-bottom: 24px !important;
    }

    /* tab（简介/直播/录播/讲义/公开课）横向可滚动 */
    .centent1 .left .course .course-tab {
        display: flex;
        justify-content: flex-start !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 12px;
    }

    .centent1 .left .course .course-tab li {
        margin-left: 26px !important;
        font-size: 16px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .centent1 .left .course .course-tab li:nth-child(1) {
        margin-left: 0 !important;
    }

    /* 简介 内联 padding 57px 410px 压制 */
    .centent1 .jj {
        padding: 20px 12px !important;
    }

    .centent1 .jj img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 章节列表 */
    .centent1 .left .course .course-list {
        padding: 8px 12px 30px 12px !important;
    }

    .centent1 .left .course .course-list > li {
        margin-top: 24px !important;
    }

    .centent1 .left .course .course-list > li > ol {
        padding-left: 0 !important;
    }

    .centent1 .left .course .course-list > li > ol > li {
        padding: 14px 0 !important;
    }

    .left3 .title2 {
        font-size: 16px !important;
    }

    .course-list .left4 {
        width: 100%;
        font-size: 14px !important;
        flex-wrap: wrap;
    }

    /* 操作区整行换行、按钮去掉大左距 */
    .course-list .right4 {
        width: 100%;
        margin-top: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 8px 12px;
        align-items: center;
    }

    .centent1 .left .course .course-list .right4 .gkhf,
    .centent1 .left .course .course-list .right4 .gkzb,
    .centent1 .left .course .course-list .right4 .gklb,
    .centent1 .left .course .course-list .right4 .tjzy,
    .centent1 .left .course .course-list .right4 .bjzy,
    .centent1 .left .course .course-list .right4 .time {
        margin-left: 0 !important;
    }

    .course-list .right4 span[style] {
        font-size: 13px !important;
        margin-right: 0 !important;
    }

    /* 讲义文件：内联 1320px / 18px 压制 */
    .course-list div[style*="width: 1320px"] {
        width: 100% !important;
    }

    .course-list .left4 .flex-column-start {
        padding-left: 0 !important;
        width: 100%;
        min-width: 0;
    }

    .course-list div[style*="font-size: 18px"] {
        font-size: 12px !important;
    }

    .course-list div[style*="margin-left: 30px"] {
        margin-left: 12px !important;
    }

    /* 作业列表 */
    .course-list .course-title {
        flex-wrap: wrap;
    }

    .course-list .right3 {
        gap: 8px 16px !important;
        flex-wrap: wrap;
        margin-right: 0 !important;
        width: 100%;
        margin-top: 8px;
    }

    .course-list .right3 span[style] {
        font-size: 13px !important;
    }

    /* ---------------- detail 文章详情 ---------------- */
    .gg-left {
        width: 100% !important;
        padding: 20px 12px !important;
        box-sizing: border-box;
    }

    #right-news {
        width: 100% !important;
        margin-top: 16px;
    }

    .gg-list {
        width: 100% !important;
    }

    .centent1 .left .list p {
        width: 100% !important;
    }

    .recomment-news-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .gg-left .title {
        font-size: 19px !important;
        line-height: 1.5;
    }

    .gg-left .subheading,
    .gg-left .abstract {
        font-size: 14px !important;
        line-height: 1.7;
    }

    .content-text,
    .content-text p {
        font-size: 16px !important;
        line-height: 1.8 !important;
    }

    .content-text img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* ---------------- info / my_course / my_course_orders 通用容器 ---------------- */
    .info {
        width: 100% !important;
        margin-top: 16px !important;
        padding: 0 10px 40px 10px !important;
        box-sizing: border-box;
        display: block !important;
    }

    .info .member {
        display: none !important;
    }

    .info .right {
        width: 100% !important;
        min-height: 0 !important;
    }

    .info .right .set {
        width: 100% !important;
        padding: 18px 0 !important;
        box-sizing: border-box;
    }

    /* 标题行：h4 + 页签 + 200px 占位 */
    .info .right .set > .flex-row-between {
        flex-wrap: wrap;
        gap: 12px;
        padding: 0 12px;
        box-sizing: border-box;
    }

    .info .right .set > .flex-row-between > div[style*="width: 200px"] {
        display: none !important;
    }

    .info .right .set h4 {
        font-size: 18px !important;
        width: 100%;
    }

    .info .right .set .set-list {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
    }

    .info .right .set .set-list li {
        margin-right: 12px !important;
        padding: 0 14px;
        font-size: 14px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ---------------- info.html 账户设置 ---------------- */
    /* 内联 width:1245px 压制 */
    .info .right .set .content-wrap {
        width: 100% !important;
        padding: 0 12px !important;
        box-sizing: border-box;
    }

    .content-wrap form {
        margin-left: 0 !important;
    }

    .info .right .set .content,
    .info .right .set .content2 {
        height: auto !important;
        padding: 16px 0 !important;
    }

    .info .right .set .content > div,
    .info .right .set .content2 > div {
        margin-bottom: 22px !important;
    }

    /* 标签置于输入框上方 */
    .info .right .set .content > div .left,
    .info .right .set .content2 > div .left {
        display: block !important;
        width: auto !important;
        font-size: 15px !important;
        margin-bottom: 8px;
    }

    /* 性别行保持横向 */
    .info .right .set .content2 > div.code {
        display: flex;
        align-items: center;
    }

    .info .right .set .content2 > div.code .left {
        display: inline-block !important;
        width: 60px !important;
        margin-bottom: 0;
    }

    .info .right .set .content2 .list_chk label[style] {
        margin-left: 20px !important;
    }

    .info .right .set .content > div > input,
    .info .right .set .content2 > div > input {
        width: 100% !important;
        box-sizing: border-box;
        font-size: 16px !important;
    }

    /* 手机号 + 发送验证码 同行 */
    .info .right .set .content .phone {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .info .right .set .content .phone .left {
        width: 100% !important;
    }

    .info .right .set .content .phone > input {
        flex: 1;
        min-width: 0;
        width: auto !important;
    }

    .send-code {
        margin-left: 10px !important;
        flex-shrink: 0;
    }

    .info .button {
        width: 100% !important;
        margin-top: 24px !important;
        margin-left: 0 !important;
    }

    .layui-upload {
        margin-left: 0 !important;
    }

    .erea .erea-form {
        width: 100% !important;
    }

    .erea .layui-form-label {
        float: none !important;
        display: block;
        width: auto !important;
        text-align: left !important;
        padding: 0 0 6px 0 !important;
    }

    .erea .layui-input-block {
        margin-left: 0 !important;
    }

    /* ---------------- my_course 我的课程 ---------------- */
    .info .right .set .course-list,
    .info .right .set .course-list1,
    .info .right .set .course-list2 {
        margin-left: 0 !important;
        width: 100% !important;
        flex-wrap: wrap;
    }

    .course-item {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .course-item .top-img img {
        width: 100% !important;
        height: auto !important;
    }

    /* ---------------- my_course_orders 课程订单 ---------------- */
    .set .content {
        padding: 12px !important;
        margin-top: 12px !important;
    }

    /* 表头行隐藏 */
    .set .content .title1 {
        display: none !important;
    }

    /* 订单日期行（内联 height:58px / font-size:18px 压制） */
    .set .content div[style*="height: 58px"] {
        height: auto !important;
        flex-wrap: wrap;
        padding: 10px 12px !important;
        font-size: 13px !important;
        box-sizing: border-box;
    }

    .set .content div[style*="height: 58px"] > div {
        margin-left: 0 !important;
        margin-right: 14px;
        word-break: break-all;
    }

    /* 订单行 -> 纵向卡片 */
    .set .content .course-list {
        flex-wrap: wrap !important;
    }

    .set .content .course-list > div {
        height: auto !important;
        width: 100% !important;
        border-left: 0 !important;
        box-sizing: border-box;
    }

    .set .content .course-list .course {
        padding: 12px !important;
    }

    .set .content .course-img {
        width: 90px !important;
        height: 90px !important;
        flex-shrink: 0;
    }

    .set .content .course-list .details {
        padding-left: 10px !important;
        min-width: 0;
    }

    .set .content .course-list .details .course-title {
        font-size: 15px !important;
    }

    .set .content .course-list .class,
    .set .content .course-list .price,
    .set .content .course-list .state {
        justify-content: flex-start !important;
        align-items: flex-start !important;
        padding: 0 12px 8px 12px !important;
        font-size: 14px !important;
        border-bottom: 0 !important;
    }

    .set .content .course-list .price p[style],
    .set .content .course-list .state p,
    .set .content .course-list .price p {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }

    .set .content .course-list .operation {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 12px;
        padding: 0 12px 14px 12px !important;
        border-bottom: 0 !important;
    }

    .set .content .course-list .operation a[style],
    .set .content .course-list .operation p[style] {
        margin-top: 0 !important;
        font-size: 14px !important;
    }

    /* 空状态图（内联 margin: 90px 46% 压制） */
    .set .content img[style*="90px 46%"] {
        margin: 40px auto !important;
        display: block;
    }

    /* ---------------- pay / pay_info / view_order 订单支付 ---------------- */
    .tj-1 {
        margin-top: 16px !important;
        margin-bottom: 30px !important;
    }

    .tj-2 {
        width: 100% !important;
        padding: 0 12px 24px 12px !important;
        box-sizing: border-box;
    }

    .order-number {
        font-size: 14px !important;
        word-break: break-all;
    }

    /* 步骤条 */
    .status {
        width: 100% !important;
        margin-top: 24px !important;
    }

    .status .completion {
        flex-shrink: 0;
        max-width: 76px;
    }

    .status .completion img {
        width: 32px !important;
    }

    .status p {
        font-size: 13px !important;
        margin-top: 6px !important;
    }

    .status span {
        font-size: 11px !important;
        margin-top: 4px !important;
        text-align: center;
        white-space: normal;
        word-break: break-all;
    }

    .status .dian,
    .status .dian1 {
        width: 20px !important;
        min-width: 12px;
        flex: 1 1 auto;
        margin: 22px 4px 0 4px !important;
    }

    /* 信息区块纵向排列（含模板注入的 margin-right:500px/100px 压制） */
    .tj-8 {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 18px;
    }

    .pay-info,
    .money-class,
    .fkxx,
    .wlxx {
        width: 100% !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .pay-info .left,
    .money-class .left,
    .fkxx .left,
    .wlxx .left {
        width: 70px !important;
        flex-shrink: 0;
    }

    .pay-info .text,
    .money-class .text,
    .text6 {
        font-size: 15px !important;
        padding-left: 10px !important;
        line-height: 1.6 !important;
        word-break: break-all;
    }

    .pay-info .name,
    .pay-info .phone,
    .money-class .name,
    .money-class .time {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    /* “课程信息/书籍信息”标题 内联 22px 压制 */
    .tj-6 > div[style*="font-size: 22px"] {
        font-size: 17px !important;
        margin: 24px 0 12px 0 !important;
    }

    /* 订单信息表格：横向滚动兜底 */
    .tj-14 {
        display: block;
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tj-14 tr,
    .tj-14 tr:nth-child(n+2) {
        height: auto !important;
    }

    .tj-14 th {
        width: auto !important;
        min-width: 76px;
        font-size: 13px !important;
        padding: 8px 6px !important;
    }

    .tj-14 td {
        font-size: 13px !important;
        padding: 8px 6px !important;
        min-width: 76px;
    }

    .tj-14 tr:nth-child(n+2) > td:nth-child(1) {
        padding: 10px !important;
    }

    .tj-14 td img {
        width: 110px !important;
        height: auto !important;
        max-height: none !important;
    }

    .tj-14 span[style] {
        width: auto !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    .tj-14 tr > td > a {
        font-size: 14px !important;
    }

    /* 金额合计区 */
    .tj-32 {
        height: auto !important;
        padding: 12px !important;
        box-sizing: border-box;
    }

    .tj-34 {
        height: auto !important;
        margin-top: 0 !important;
    }

    .tj-35 {
        float: none !important;
        line-height: 1.8 !important;
        font-size: 14px !important;
    }

    .tj-36 {
        float: none !important;
        padding-right: 0 !important;
        justify-content: flex-start !important;
    }

    .tj-37 {
        line-height: 1.8 !important;
        height: auto !important;
        font-size: 16px !important;
    }

    .tj-37 > span,
    .tj-37 span {
        font-size: 20px !important;
        line-height: 1.8 !important;
        height: auto !important;
    }

    .tj-38,
    .pay_now {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 10px;
        min-height: 44px;
        height: 44px !important;
        line-height: 44px !important;
        box-sizing: border-box;
    }

    /* 支付方式选项块（pay/pay_info） */
    .code-class {
        flex-wrap: wrap;
    }

    .code-class > div {
        width: 100% !important;
        margin: 6px 0 !important;
        box-sizing: border-box;
    }

    .code-class .wx {
        margin-left: 0 !important;
    }

    .djs {
        font-size: 15px !important;
    }

    /* ---------------- about_us 关于我们 ---------------- */
    .beichen-top ul,
    .bcgy-content,
    .zzjj-nr,
    .gztzjs-nr,
    .djdsj,
    .dstd-top,
    .fzlc-year-ul,
    .fzlc-ul2,
    .fzlc-ul2-li,
    .pillar,
    .hxys-top,
    .kcjph-nr,
    .fwrxh-nr,
    .ptgmh_ul_left {
        width: 100% !important;
        box-sizing: border-box;
        padding-left: 12px;
        padding-right: 12px;
    }

    .jszyh-ul {
        width: 100% !important;
        flex-wrap: wrap;
    }

    .jszyh-ul li {
        width: 100% !important;
        margin: 0 0 12px 0 !important;
    }

    .beichen-top ul {
        flex-wrap: wrap;
    }

    .beichen-top ul li {
        margin: 0 16px 8px 0 !important;
    }

    .ptgmh_ul_right li {
        width: 100% !important;
    }

    .about_us .content-wrap,
    .swiper-container {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* 百度地图容器 */
    #map,
    .map,
    #allmap {
        width: 100% !important;
        height: 260px !important;
    }

    /* ---------------- 通用文字层级 ---------------- */
    h1 { font-size: 20px !important; }
    h2 { font-size: 18px !important; }
    h3 { font-size: 16px !important; }
}
