/* 响应式适配层：仅在窄屏生效，桌面（>980px）保持原站 1:1 视觉。
   品牌色取自原站：深蓝 #0b4f8a / #1f5fa8，橙 #ff6800，绿 #66CC00。
   核心策略：窄屏把固定宽表格布局整体退化为单栏块级流，规避像素宽/colspan 撑破；
   仅正文内的数据表格保留表格语义。 */

/* ===== 移动端导航组件（桌面隐藏） ===== */
.m-nav { display: none; }

.m-nav-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    cursor: pointer;
    padding: 12px 16px;
    color: #fff;
    text-align: left;
    background: linear-gradient(135deg, #0b4f8a 0%, #1f5fa8 55%, #2f7fc4 100%);
    box-shadow: 0 2px 6px rgba(11, 79, 138, .35);
    font-family: "Microsoft YaHei", "微软雅黑", Tahoma, Arial, sans-serif;
}
.m-nav-icon { display: inline-flex; flex-direction: column; gap: 4px; width: 24px; flex: 0 0 auto; }
.m-nav-icon i { display: block; height: 3px; width: 100%; background: #fff; border-radius: 2px; transition: transform .25s, opacity .25s; }
.m-nav-title { flex: 1 1 auto; font-size: 16px; font-weight: 700; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-nav-hint { flex: 0 0 auto; font-size: 12px; padding: 3px 10px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 14px; }
.m-nav.m-nav-open .m-nav-icon i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.m-nav.m-nav-open .m-nav-icon i:nth-child(2) { opacity: 0; }
.m-nav.m-nav-open .m-nav-icon i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.m-nav-panel {
    max-height: 0;
    overflow: hidden;
    background: #fff;
    border-bottom: 3px solid #1f5fa8;
    transition: max-height .3s ease;
    font-family: "Microsoft YaHei", "微软雅黑", Tahoma, Arial, sans-serif;
}
.m-nav.m-nav-open .m-nav-panel { max-height: 1600px; overflow-y: auto; }
.m-nav-member { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: #eef4fb; border-bottom: 1px solid #d6e4f2; }
.m-nav-member a { font-size: 13px; color: #0b4f8a; text-decoration: none; padding: 5px 12px; background: #fff; border: 1px solid #c4d8ee; border-radius: 16px; }
.m-nav-member a.m-nav-join { color: #fff; background: #ff6800; border-color: #ff6800; font-weight: 700; }
.m-nav-list { list-style: none; margin: 0; padding: 4px 0; }
.m-nav-list > li { border-bottom: 1px solid #eef2f6; }
.m-nav-list a { display: block; color: #333; text-decoration: none; }
.m-nav-leaf > a { padding: 13px 18px; font-size: 15px; font-weight: 600; color: #0b4f8a; }
.m-nav-leaf > a:active { background: #eef4fb; }
.m-nav-list details > summary {
    list-style: none;
    cursor: pointer;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #0b4f8a;
    position: relative;
}
.m-nav-list details > summary::-webkit-details-marker { display: none; }
.m-nav-list details > summary::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #ff6800;
    border-bottom: 2px solid #ff6800;
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s;
}
.m-nav-list details[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.m-nav-list details[open] > summary { background: #f5f9fd; }
.m-nav-list details ul { list-style: none; margin: 0; padding: 2px 0 8px; background: #fafcfe; }
.m-nav-list details ul a { padding: 10px 18px 10px 34px; font-size: 14px; color: #444; border-top: 1px dashed #e6edf4; }
.m-nav-list details ul a:active { color: #66CC00; }

/* ===== 窄屏适配（<=980px：原站自然宽度以下） ===== */
@media (max-width: 980px) {
    html { -webkit-text-size-adjust: 100%; }
    body { overflow-x: hidden; background: #f3f5f8; }

    /* 隐藏图片按钮导航与悬停下拉，启用移动导航 */
    table.menu.ico, .menu_sub { display: none !important; }
    .m-nav { display: block; position: sticky; top: 0; z-index: 999; }

    /* 表格布局整体退化为单栏块级流 */
    table, tbody, tr, td, th {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
    td, th { overflow: hidden; word-wrap: break-word; }
    /* 正文内的数据表格保留表格语义 */
    .detail table, #frameContent table { display: table !important; table-layout: fixed !important; }
    .detail tr, #frameContent tr { display: table-row !important; }
    .detail td, .detail th, #frameContent td, #frameContent th { display: table-cell !important; width: auto !important; }

    /* 图片自适应 */
    img { max-width: 100%; height: auto; }
    /* 装饰性间隔小图隐藏，避免空白色块 */
    img[src$="sh_01.jpg"], img[src$="sh_03_02.jpg"], img[src$="sh_07.jpg"],
    img[src$="sh_18.jpg"], img[src$="sh_19.jpg"], img[src$="sh_21.jpg"],
    img[src$="sh_30.jpg"], img[src$="sh_40.jpg"], img[src$="sh_41.jpg"],
    img[src$="sh_68.jpg"], img[src$="sh_69.jpg"], img[src$="sh_71.jpg"],
    img[src$="sh_72.jpg"], img[src$="sh_74.jpg"], img[src$="gb_23.jpg"],
    img[src$="gb_15.jpg"], img[src$="info_10.jpg"], img[src$="newxx_06.jpg"] {
        display: none !important;
    }

    /* 背景渐变条拉伸填满，避免窄屏裁切露底 */
    td[background] { background-size: 100% 100% !important; background-repeat: no-repeat !important; }

    /* 窄屏隐藏桌面顶栏（问候/会员链接已由移动导航提供），保留 logo */
    body > table:first-of-type > tbody > tr:first-child { display: none !important; }
    /* 隐藏 IE 专用设为首页/加入收藏 */
    a[onclick*="setHomePage"], a[href*="AddFavorite"] { display: none !important; }
    /* 对联/浮层广告（z-index 888888）在窄屏遮挡内容并拦截点击，隐藏 */
    [id^="PCMSAD_"] { display: none !important; }

    /* 轮播流式 */
    .slideBox { width: 100% !important; height: auto !important; border: 0; }
    .slideBox .bd, .slideBox .bd ul, .slideBox .bd li { width: 100% !important; }
    .slideBox .bd img { width: 100% !important; height: 200px !important; object-fit: cover; }
    .slideBox .hd { right: 8px; bottom: 8px; }

    /* 跑马灯 / 图片滚动容器流式 */
    .qr-qr-picMarquee-left, .hy-picMarquee-left, .picScroll-left,
    .img-list, .tempWrap { width: 100% !important; max-width: 100% !important; }
    .qr-qr-picMarquee-left .qr-bd ul li, .hy-picMarquee-left .qr-bd ul li { margin: 0 6px; }
    .qr-qr-picMarquee-left .qr-bd ul li .qr-pic img { width: 140px; height: 120px; }
    .hy-picMarquee-left .qr-bd ul li .qr-pic img { width: 110px; height: 128px; }
    .picScroll-left .bd ul li .pic img { width: 150px; height: 140px; }
    .rollBox, .rollBox .Cont { width: 100% !important; max-width: 100% !important; }

    /* 友情链接选项卡 */
    #links { width: 100% !important; padding: 0 8px; }
    #Tab2 { width: 100% !important; }
    .Menubox { height: auto; background: #eef4fb; border-bottom: 2px solid #1f5fa8; }
    .Menubox ul { min-width: 0 !important; width: 100% !important; height: auto; line-height: 1.4; display: flex; flex-wrap: wrap; }
    .Menubox li { width: auto !important; flex: 1 1 33%; height: auto; line-height: 1.4; padding: 9px 4px; font-size: 13px; border-bottom: 1px solid #d6e4f2; }
    .Menubox li.hover { width: auto !important; height: auto; line-height: 1.4; background: #fff; color: #ff3300; border: 0; border-bottom: 2px solid #ff6800; }
    .Contentbox { height: auto !important; padding: 10px 6px; }
    .Contentbox .con1 { width: 100% !important; padding: 0; }
    .Contentbox .con1 li { width: 100% !important; }
    .Contentbox .con1 li a { width: 31% !important; margin: 1%; }
    .Contentbox .con1 li a img { width: 100% !important; height: auto; }
    .Contentbox .con2, .Contentbox .con3, .Contentbox .con4,
    .Contentbox .con5, .Contentbox .con6 { padding: 6px; line-height: 2; }

    /* 分页 */
    #pages { padding: 12px 6px; text-align: center; }
    #pages a, #pages span { margin: 2px; }

    /* 正文详情 */
    #frameContent, .detail { width: 100% !important; margin-left: 0 !important; }
    div[style*="width:950px"], div[style*="width:953px"] { width: auto !important; max-width: 100% !important; margin-left: 0 !important; }
    .detail img, #frameContent img { max-width: 100% !important; height: auto !important; }
    h1 { font-size: 20px; line-height: 1.4; }

    /* 页脚 */
    .footer, #footer { width: 100% !important; }
    .doc-backtop { right: 10px; bottom: 16px; }
}

/* ===== 小屏手机细化（<=600px） ===== */
@media (max-width: 600px) {
    body { font-size: 14px; line-height: 1.7; }
    .m-nav-title { font-size: 15px; }
    .Menubox li { flex: 1 1 50%; }
    .Contentbox .con1 li a { width: 48% !important; }
    .qr-qr-picMarquee-left .qr-bd ul li .qr-pic img { width: 120px; height: 100px; }
    h1 { font-size: 18px; }
}

/* ===== 会员页（login/register/center）窄屏适配 ===== */
@media (max-width: 980px) {
    /* 会员页未加载 pintuer 的 border-box，需自行声明防 padding 撑破 */
    #header .content, #content, #footer, .box, .form-login, .form-reg { box-sizing: border-box; }
    #header { height: auto !important; }
    #header .content, #content, #footer { width: 100% !important; max-width: 100% !important; padding-left: 14px; padding-right: 14px; }
    #header .content { height: auto !important; padding-top: 10px; }
    #header .logo { float: none !important; padding-right: 0 !important; background: none !important; }
    #header .logo img { max-width: 70%; }
    .log { float: none !important; display: block; height: auto !important; padding: 6px 0; }
    #content { padding-top: 18px !important; }
    .form-login, .form-reg { width: 100% !important; padding-left: 0 !important; float: none !important; }
    .form-login .input label { width: 70px !important; }
    .form-reg .input label { width: 90px !important; }
    .take, .reg, .err, .ok { padding-left: 0 !important; }
    .col-auto, .col-1 { display: none !important; }
    .box { padding: 14px !important; }
    .box .row label { width: 84px !important; }
    .input-text { max-width: 100%; }
}