/*
 * 文章页移动端布局
 * 所有覆盖均限制在 991px 内，桌面端继续使用原有页面规则。
 */
.mobile-article-tags {
  display: none;
}

.mobile-tags-toggle {
  display: none;
}

@media (max-width: 991px) {
  .main-content {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .content-area {
    width: auto;
    margin: 0;
    padding: 0 var(--cd-mobile-page-gutter);
    box-sizing: border-box;
    font-size: 18px;
  }

  .content-area-title {
    margin: 0;
    padding: 28px 0 0;
    color: #090909;
    font-size: 30px;
    font-size: clamp(25px, 5.1vw, 32px);
    font-weight: 750;
    line-height: 1.48;
    text-align: left;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
  }

  .content-area-desc {
    display: flex;
    margin: 18px 0 20px;
    align-items: center;
    justify-content: center;
    color: var(--cd-mobile-muted);
    font-size: 15px;
    line-height: 1.5;
  }

  .content-area-desc .desc-label,
  .content-area-desc .desc-m1,
  .content-area-desc #wechat-share-trigger {
    display: none;
  }

  .content-area-desc .desc-l1,
  .content-area-desc .desc-r1 {
    display: inline-flex;
    align-items: center;
  }

  .content-area-desc .desc-r1 {
    margin-left: 18px;
  }

  .content-area-desc .desc-l1::after {
    content: "";
    width: 1px;
    height: 14px;
    margin-left: 18px;
    background: #d9d9d9;
  }

  .mobile-article-tags {
    display: block;
    margin: 0 0 14px;
  }

  .mobile-tags-list {
    --mobile-tags-collapsed-height: 120px;
    position: relative;
    display: flex;
    max-height: var(--mobile-tags-collapsed-height);
    margin-right: -10px;
    flex-wrap: wrap;
    overflow: hidden;
  }

  .mobile-article-tags.is-measuring .mobile-tags-list,
  .mobile-article-tags.is-ready:not(.is-collapsible) .mobile-tags-list,
  .mobile-article-tags.is-expanded .mobile-tags-list {
    max-height: none;
    overflow: visible;
  }

  .mobile-article-tags.is-collapsible .mobile-tags-toggle {
    display: inline-flex;
  }

  .mobile-tags-toggle {
    min-height: 38px;
    margin: 0 auto;
    padding: 2px 14px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--cd-mobile-blue);
    font: inherit;
    font-size: 15px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-tags-toggle-icon {
    width: 8px;
    height: 8px;
    margin: -4px 0 0 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 180ms ease, margin 180ms ease;
  }

  .mobile-article-tags.is-expanded .mobile-tags-toggle-icon {
    margin-top: 4px;
    transform: rotate(225deg);
  }

  .mobile-tag-item {
    display: inline-flex;
    min-height: 30px;
    padding: 3px 9px;
    box-sizing: border-box;
    align-items: center;
    border-radius: 6px;
    background: #edf2f5;
    color: #60656a;
    font-size: 15px;
    line-height: 1.25;
    white-space: normal;
    margin: 0 10px 10px 0;
  }

  .mobile-tag-hash {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #aebdc7;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    margin-right: 5px;
  }

  .content {
    max-width: 100%;
    color: #262626;
    font-size: 19px;
    font-size: clamp(17px, 3.45vw, 21px);
    line-height: 1.85;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .content > :first-child,
  .content .vditor-reset > :first-child {
    margin-top: 0;
  }

  .content p,
  .vditor-reset p {
    margin: 0 0 18px;
    line-height: 1.85;
  }

  .content h1,
  .content h2,
  .content h3,
  .content h4,
  .vditor-reset h1,
  .vditor-reset h2,
  .vditor-reset h3,
  .vditor-reset h4 {
    margin: 24px 0 14px;
    color: #1c1c1c;
    font-weight: 700;
    line-height: 1.5;
  }

  .content h1,
  .vditor-reset h1 {
    font-size: 1.35em;
  }

  .content h2,
  .vditor-reset h2 {
    font-size: 1.24em;
  }

  .content h3,
  .content h4,
  .vditor-reset h3,
  .vditor-reset h4 {
    font-size: 1.12em;
  }

  .content-area .content img,
  .content-area .vditor-reset img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto !important;
    margin: 18px auto 22px;
  }

  .content table,
  .vditor-reset table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .content pre,
  .vditor-reset pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .comments-section,
  #article-events-container,
  #event-hover-image,
  #wechat-share-popover {
    display: none !important;
  }

  .related {
    width: calc(100% + (var(--cd-mobile-page-gutter) * 2));
    margin: 34px calc(var(--cd-mobile-page-gutter) * -1) 0;
    padding: 30px 10px 34px;
    box-sizing: border-box;
    background: #f1f5f8;
  }

  .related-title {
    margin: 0 10px 14px;
    color: #0d0d0d;
    font-size: 29px;
    font-size: clamp(25px, 5vw, 31px);
    font-weight: 750;
    line-height: 1.25;
  }

  .related-title .section-icon {
    display: none;
  }

  .related .news-item {
    width: 100%;
    max-width: none;
    min-height: 126px;
    margin: 0 0 12px;
    padding: 13px;
    box-sizing: border-box;
    align-items: stretch;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
  }

  .related .news-item.related-mobile-overflow {
    display: none;
  }

  .related .news-link {
    display: flex;
    min-width: 0;
    align-items: stretch;
  }

  .related .news-image {
    width: 29%;
    height: auto;
    min-height: 100px;
    max-height: 112px;
    margin: 0 14px 0 0;
    flex: 0 0 29%;
    border-radius: 0;
    object-fit: cover;
  }

  .related .news-content {
    display: flex;
    width: auto;
    max-width: none;
    min-width: 0;
    height: auto;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
  }

  .related .news-title {
    display: -webkit-box;
    margin: 0 0 8px;
    color: #242424;
    font-size: 18px;
    font-size: clamp(16px, 3.4vw, 20px);
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .related .news-subtitle {
    display: -webkit-box;
    color: #858585;
    font-size: 14px;
    font-size: clamp(13px, 2.75vw, 16px);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .footer {
    margin: 0;
    padding: 16px var(--cd-mobile-page-gutter) 22px;
    padding: 16px var(--cd-mobile-page-gutter)
      calc(22px + env(safe-area-inset-bottom));
    background: #f1f5f8;
    color: #171717;
  }

  .footer-links {
    display: none;
  }

  .footer-text {
    width: auto;
    margin: 0;
    padding: 0;
    color: #171717;
    font-size: 10px;
    font-size: clamp(10px, 2.35vw, 14px);
    line-height: 1.65;
    letter-spacing: -0.01em;
    white-space: nowrap;
  }

  .footer-text p {
    margin: 0 0 2px;
    white-space: nowrap;
  }

  .footer-text a {
    color: #171717;
  }

  .footer-text img {
    display: none;
  }

  .login-modal {
    width: calc(100vw - 24px);
    max-width: 420px;
  }
}

@media (max-width: 374px) {
  .content-area-title {
    padding-top: 22px;
    font-size: 24px;
  }

  .content-area-desc {
    font-size: 14px;
  }

  .content-area-desc .desc-l1::after {
    margin-left: 12px;
  }

  .content-area-desc .desc-r1 {
    margin-left: 12px;
  }

  .mobile-tag-item {
    font-size: 14px;
  }

  .related .news-item {
    min-height: 112px;
    padding: 10px;
  }

  .related .news-image {
    min-height: 92px;
    margin-right: 10px;
  }
}
