/* 全站移动端适配：在原有桌面门户样式之上做渐进增强 */
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  overflow-wrap: break-word;
}

img,
video,
iframe {
  max-width: 100%;
}

input,
button,
textarea {
  max-width: 100%;
}

.article .body,
.article h1,
.listpage .ph,
.box,
.focus {
  min-width: 0;
}

.article .body table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .header .wrap {
    flex-wrap: wrap;
    gap: 14px 20px;
  }

  .header .search {
    width: 100%;
  }

  .header .search input {
    width: auto;
    min-width: 0;
    flex: 1;
  }

  .nav {
    overflow: hidden;
  }

  .nav .wrap {
    width: 100%;
    padding: 0 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .nav a {
    min-height: 44px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
  }

  .cols {
    display: block;
    margin-top: 14px;
  }

  .main,
  .side {
    width: 100%;
  }

  .row2,
  .grid2 {
    grid-template-columns: 1fr;
  }

  .imgcards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article,
  .listpage {
    padding: 22px 20px;
  }

  .toc-cols {
    column-count: 1;
  }

  .backhome {
    right: 16px;
    bottom: 20px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .wrap {
    width: calc(100% - 24px);
  }

  .strip .wrap {
    gap: 4px 12px;
    flex-wrap: wrap;
    line-height: 1.5;
  }

  .strip .wrap span:last-child {
    display: none;
  }

  .header .wrap {
    padding: 12px 0;
    gap: 12px;
  }

  .logo {
    gap: 10px;
  }

  .logo .mark {
    padding: 7px 10px;
    font-size: 17px;
  }

  .logo .mark small {
    font-size: 8px;
  }

  .logo .site {
    font-size: clamp(18px, 5.8vw, 24px);
    letter-spacing: 0;
  }

  .logo .site small {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .search input,
  .search button,
  .searchpage .sbox input,
  .searchpage .sbox button,
  .consult input,
  .consult textarea,
  .consult button {
    min-height: 44px;
    font-size: 16px;
  }

  .search button {
    padding: 0 16px;
    white-space: nowrap;
  }

  .nav .wrap {
    padding: 0 12px;
  }

  .nav a {
    font-size: 14px;
  }

  .crumbbar .wrap {
    padding: 7px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .focus .headline {
    padding: 14px;
  }

  .focus .headline img.thumb {
    float: none;
    width: 100%;
    height: auto;
    max-height: 260px;
    margin: 0 0 12px;
  }

  .focus .headline a {
    font-size: 19px;
  }

  .imgcards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .imgcard {
    height: 190px;
  }

  .box .hd,
  .focus .hd {
    padding-left: 12px;
    padding-right: 12px;
  }

  .box ul,
  .focus ul {
    padding-left: 12px;
    padding-right: 12px;
  }

  .box ul li {
    gap: 8px;
  }

  .box ul li .dt {
    max-width: 34%;
  }

  .article,
  .listpage {
    padding: 18px 14px;
  }

  .article h1 {
    font-size: clamp(21px, 6vw, 25px);
    line-height: 1.45;
  }

  .article .meta span {
    display: block;
    margin: 2px 0;
  }

  .article .body {
    font-size: 16px;
    line-height: 1.9;
  }

  .article h2:not(.grp),
  .article .body h2:not(.grp) {
    font-size: 18px;
    line-height: 1.55;
  }

  .article th,
  .article td {
    min-width: 120px;
    padding: 7px 9px;
  }

  .article .body p,
  .article td,
  .article th,
  .pn a,
  .listpage ul li a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .pn {
    flex-direction: column;
    gap: 10px;
  }

  .pn a,
  .pn a[style] {
    text-align: left !important;
  }

  .listpage .ph h1 {
    display: block;
    font-size: 22px;
    line-height: 1.45;
  }

  .listpage .ph .cnt {
    display: block;
    margin: 4px 0 0;
  }

  .listpage h2.grp,
  .grp {
    margin-top: 18px;
    padding: 9px 12px;
  }

  .listpage ul li {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 5px 10px;
    padding: 10px 4px;
  }

  .listpage ul li small {
    flex-basis: 100%;
    max-width: 100%;
    text-align: left;
    white-space: normal;
  }

  .searchpage .sbox {
    align-items: stretch;
  }

  .searchpage .sbox input {
    min-width: 0;
    padding: 9px 10px;
  }

  .searchpage .sbox button {
    padding: 0 14px;
    letter-spacing: 2px;
    white-space: nowrap;
  }

  .searchpage li h3 {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  footer {
    margin-top: 20px;
  }

  footer .wrap {
    padding: 16px 0;
  }

  footer .fcontact p {
    line-height: 1.8;
  }

  .backhome {
    right: 12px;
    bottom: 12px;
    padding: 9px 12px;
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .wrap {
    width: calc(100% - 16px);
  }

  .logo .mark {
    padding: 6px 8px;
    font-size: 15px;
  }

  .logo .site small {
    display: none;
  }

  .header .search button {
    padding: 0 13px;
  }

  .article,
  .listpage {
    padding-left: 12px;
    padding-right: 12px;
  }
}
