/* ============================================================
   移动端补丁 2（2026-10-22）：抽屉列表显示 + 正文固定宽度溢出
   高优先级覆盖旧站样式，仅 <=767px 生效。
   ============================================================ */
@media (max-width: 767px) {

  /* ---------- 抽屉菜单：强制纵向列表显示 ---------- */
  body.m-nav-ready .m-drawer .m-nav {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  body.m-nav-ready .m-drawer .m-nav > li {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body.m-nav-ready .m-drawer .m-nav .m-row {
    display: flex !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body.m-nav-ready .m-drawer .m-nav .m-row > a {
    display: flex !important;
    flex: 1 1 auto !important;
    float: none !important;
    width: auto !important;
  }
  body.m-nav-ready .m-drawer .m-sub {
    display: none !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body.m-nav-ready .m-drawer .m-nav > li.open > .m-sub { display: block !important; }
  body.m-nav-ready .m-drawer .m-sub > li {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body.m-nav-ready .m-drawer .m-sub li a {
    display: flex !important;
    float: none !important;
    width: auto !important;
  }

  /* ---------- 正文：清除内联 width/float（含 "width: 700px" 带空格） ---------- */
  .contenttext [style*="width:"], .contenttext2 [style*="width:"],
  .contenttextb [style*="width:"], .contenttextt [style*="width:"], .textcontentt [style*="width:"],
  .contenttext [style*="float:"], .contenttext2 [style*="float:"],
  .contenttextb [style*="float:"], .contenttextt [style*="float:"], .textcontentt [style*="float:"] {
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
    box-sizing: border-box;
  }
  .contenttext img, .contenttext2 img, .contenttextb img, .contenttextt img {
    max-width: 100% !important;
    height: auto !important;
  }
  .contenttext table, .contenttext2 table, .contenttextb table {
    width: 100% !important;
    max-width: 100% !important;
  }
  .contenttext, .contenttext2, .contenttextb, .contenttextt, .textcontentt {
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  .maincontent, .maintext, .rightpage, .leftpage, .rightpage2 {
    max-width: 100% !important;
    box-sizing: border-box;
  }
}

/* ===== 补丁3：正文区所有后代宽度约束 ===== */
@media (max-width: 767px) {
  .maintext div, .maintext p, .maintext h1, .maintext h2, .maintext h3, .maintext h4,
  .maintext ul, .maintext ol, .maintext table, .maintext img,
  .rightpage div, .rightpage p, .rightpage h1, .rightpage h2, .rightpage h3, .rightpage h4,
  .rightpage ul, .rightpage ol, .rightpage table, .rightpage img,
  .leftpage div, .leftpage p, .leftpage ul, .leftpage table, .leftpage img {
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .maintext [style*="float"], .rightpage [style*="float"], .leftpage [style*="float"] {
    float: none !important;
  }
  .maintext, .rightpage, .leftpage {
    overflow-x: hidden;
  }
}

/* ===== 补丁4：左右边距对称 ===== */
@media (max-width: 767px) {
  .maincontent {
    margin-left: 8px !important;
    margin-right: 8px !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .maintext {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .rightpage, .rightpage2, .leftpage {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    padding-right: 0 !important;
  }
}
