/* 文章、公告列表及详情的移动端布局。 */
.news-categories-toggle,
.news-mobile-category-nav,
.news-mobile-back {
    display: none;
}

.news-scroll-table {
    display: contents;
}

@media (max-width: 820px) {
    .news-list-page {
        --news-mobile: 1;
    }

    .news-list-page,
    .news-list-page * {
        box-sizing: border-box;
    }

    .news-list-page #columns {
        width: 100%;
        min-width: 0 !important;
        max-width: none;
        padding: 0 16px 24px;
    }

    .news-list-page .breadcrumb {
        min-width: 0;
        height: auto;
        margin: 0;
        padding: 16px 0;
        font-size: 14px;
        line-height: 1.8;
        overflow-wrap: anywhere;
    }

    .news-list-page #columns > .row {
        display: flex;
        flex-direction: column;
        gap: 14px;
        margin: 0;
    }

    .news-list-page #left_column,
    .news-list-page #center_column {
        float: none;
        width: 100%;
        min-width: 0;
        max-width: none;
        margin: 0 !important;
        padding: 0;
    }

    .news-list-page #left_column > .block:not(.list_table),
    .news-notice-page #left_column {
        display: none;
    }

    .news-list-page .news-categories-toggle {
        display: flex;
        width: 100%;
        min-height: 50px;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        border: 1px solid rgba(61, 30, 88, .1);
        border-radius: 14px;
        color: #3d1e58;
        background: #fff;
        font-size: 16px;
        font-weight: 700;
    }

    .news-list-page .news-categories-toggle span {
        font-size: 22px;
    }

    .news-list-page .news-categories-toggle[aria-expanded="true"] {
        border-color: #6c3a96;
        background: #f5effb;
    }

    .news-list-page #left_column .list_table {
        display: none;
    }

    .news-list-page .news-mobile-category-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        max-height: min(420px, 55dvh);
        margin: 8px 0 0;
        padding: 12px;
        overflow: auto;
        overscroll-behavior: contain;
        border: 1px solid rgba(61, 30, 88, .1);
        border-radius: 14px;
        background: #fff;
    }

    .news-list-page #left_column.news-categories-open .news-mobile-category-nav {
        display: grid;
    }

    .news-list-page .news-category-option {
        min-width: 0;
    }

    .news-list-page .news-category-option > a {
        display: flex;
        min-height: 50px;
        align-items: center;
        justify-content: center;
        padding: 10px 12px;
        border-radius: 10px;
        color: #4a4460;
        background: #f7f3fb;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.5;
        text-align: center;
        text-decoration: none;
        overflow-wrap: anywhere;
    }

    .news-list-page .news-category-option > a[aria-current="page"] {
        color: #fff;
        background: #6c3a96;
    }

    .news-list-page .news-category-children {
        display: grid;
        gap: 4px;
        margin: 6px 0 0;
        padding-left: 8px;
        border-left: 2px solid #e6d9f2;
    }

    .news-list-page .news-category-children .news-category-option > a {
        justify-content: flex-start;
        font-size: 14px;
        font-weight: 400;
        text-align: left;
    }

    .news-list-page .news-category-option > a:focus-visible,
    .news-list-page .news-categories-toggle:focus-visible {
        outline: 2px solid #6c3a96;
        outline-offset: 2px;
    }

    .news-list-page #center_column {
        padding: 18px 18px 12px;
        border: 1px solid rgba(61, 30, 88, .1);
        border-radius: 18px;
        background: #fff;
    }

    .news-list-page .page-heading {
        height: auto;
        margin: 0 0 6px;
        padding: 0 0 14px;
        border-bottom: 1px solid rgba(61, 30, 88, .1);
        color: #3d1e58;
        font-size: 22px;
        font-weight: 700;
        line-height: 1.5;
    }

    .news-list-page .page-heading-title2 {
        height: auto;
        margin: 0;
        padding: 0;
        border: 0;
        line-height: inherit;
    }

    .news-list-page .news_box_list,
    .news-list-page .news_box_list > ul {
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .news-list-page .news_box_list > ul > li {
        display: flex;
        min-width: 0;
        flex-direction: column;
        gap: 4px;
        height: auto;
        margin: 0 !important;
        padding: 14px 0 !important;
        border-bottom: 1px solid rgba(61, 30, 88, .08);
        background: none;
        line-height: 1.6;
    }

    .news-list-page .news_box_list > ul > li > a {
        display: block;
        float: none;
        width: 100%;
        min-height: 50px;
        margin: 0;
        padding: 10px 0;
        color: #3a3550;
        font-size: 17px;
        font-weight: 600;
        line-height: 1.6;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .news-list-page .news_box_list > ul > li > span {
        display: block;
        float: none;
        width: auto;
        margin: 0;
        padding: 0;
        color: #8a8294;
        font-size: 14px;
        line-height: 1.6;
        text-align: left;
        white-space: normal;
    }

    .news-list-page .pages_bar {
        display: flex;
        width: 100%;
        min-width: 0;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        justify-content: flex-start;
        height: auto;
        margin: 0;
        padding: 18px 0 4px;
        font-size: 14px;
        line-height: 2.6;
        text-align: left;
        white-space: normal;
    }

    .news-list-page .pages_bar > span {
        flex-basis: 100%;
        min-width: 0;
        height: auto;
        margin: 0 !important;
        padding: 0;
        line-height: 2.8;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .news-list-page .pages_bar input {
        width: 44px !important;
        height: 40px;
        margin: 0 3px;
        padding: 4px;
        border: 1px solid rgba(61, 30, 88, .15);
        border-radius: 6px;
        font-size: 16px;
        line-height: 1.4;
        text-align: center;
    }

    .news-list-page .pages_bar > a {
        display: inline-flex;
        min-width: 50px;
        min-height: 50px;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 8px 12px;
        border: 1px solid rgba(61, 30, 88, .12);
        border-radius: 8px;
        color: #5a2e85;
        background: #f8f5fb;
        line-height: 1.5;
    }

    .news-list-page .pointsRule {
        width: 100%;
        min-width: 0;
        height: auto;
        margin-top: 12px;
        overflow: auto;
    }

    .news-list-page .pointsRule > ul {
        display: flex;
        width: max-content;
        min-width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
    }

    .news-list-page .pointsRule li {
        flex: none;
        min-height: 50px;
    }

    .news-detail-page #columns {
        padding-top: 16px;
    }

    .news-detail-page #center_column > .page-heading,
    .news-detail-page #center_column > .page-heading-title2 {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 0 12px;
        padding: 0 0 14px;
        font-size: 24px !important;
        font-weight: 700;
        line-height: 1.5 !important;
        text-align: left !important;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .news-detail-page .page-heading > .page-heading-title2 {
        display: inline;
        float: none;
        font-size: inherit;
    }

    .news-detail-page .news-mobile-back {
        display: inline-flex;
        min-height: 50px;
        align-items: center;
        margin-bottom: 10px;
        color: #6c3a96;
        font-size: 15px;
    }

    .news-detail-page .entry-detail,
    .news-detail-page .content-text {
        float: none;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .news-detail-page .entry-detail .date {
        height: auto !important;
        padding: 0 0 12px;
        font-size: 14px;
        line-height: 1.7;
        text-align: left !important;
    }

    .news-detail-page .share-fa {
        float: none !important;
        min-height: 40px;
        margin-bottom: 12px;
        text-align: right;
    }

    .news-detail-page .content-text {
        color: #3a3550;
        font-size: 18px;
        line-height: 1.85;
        overflow-wrap: anywhere;
    }

    .news-detail-page .content-text * {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-wrap: anywhere;
    }

    .news-detail-page .content-text :is(p, div, section, article, h1, h2, h3, h4) {
        width: auto !important;
        height: auto !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        white-space: normal !important;
    }

    .news-detail-page .content-text :is(p, li) {
        margin-bottom: 14px;
        line-height: 1.85 !important;
    }

    .news-detail-page .content-text :is(img, video, iframe) {
        display: block;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        margin-inline: auto;
    }

    .news-detail-page .content-text :is(iframe, video) {
        width: 100% !important;
        aspect-ratio: 16 / 9;
    }

    .news-detail-page .content-text pre {
        overflow: auto;
        white-space: pre;
    }

    .news-detail-page .content-text .news-scroll-table {
        display: block;
        width: 100% !important;
        margin: 16px 0;
        overflow-x: auto;
        overscroll-behavior: contain;
    }

    .news-detail-page .content-text .news-scroll-table table {
        width: auto !important;
        min-width: 100% !important;
        max-width: none !important;
    }

    .news-detail-page .news-article-adjacent,
    .news-detail-page .news-related-products {
        margin-left: 0 !important;
        margin-top: 16px;
    }

    .news-detail-page .news-article-adjacent > a {
        display: flex;
        min-height: 50px;
        gap: 10px;
        align-items: flex-start;
        padding: 12px 0;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

    .news-detail-page .article_front_after {
        flex: 0 0 60px;
        margin: 0;
    }

    .news-detail-page .article_front_after_content {
        min-width: 0;
        font-size: 16px;
        line-height: 1.7;
    }

    .news-detail-page .news-related-products .product-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 12px 0 0;
    }

    .news-detail-page .news-related-products .product-list > li {
        float: none;
        width: 100%;
        min-width: 0;
        padding: 0;
    }

    .news-detail-page .news-related-products img {
        max-width: 100%;
        height: auto;
    }

    body:has(.news-list-page) .new_affixed > ul {
        top: 58%;
        right: 0;
        bottom: auto;
        transform: translateY(-50%);
    }

    html[data-yys-theme="dark"] .news-list-page #center_column,
    html[data-yys-theme="dark"] .news-list-page .news-categories-toggle,
    html[data-yys-theme="dark"] .news-list-page .news-mobile-category-nav {
        color: #e6e0d5;
        background: #303334;
        border-color: rgba(235, 224, 201, .16);
    }

    html[data-yys-theme="dark"] .news-list-page :is(.page-heading, .news_box_list > ul > li > a, .help-title a) {
        color: #e6e0d5;
    }

    html[data-yys-theme="dark"] .news-list-page :is(.news_box_list > ul > li > span, .breadcrumb) {
        color: #c0b6cc;
    }

    html[data-yys-theme="dark"] .news-list-page .pages_bar > a,
    html[data-yys-theme="dark"] .news-list-page .pages_bar input {
        color: #d3b9f1;
        background: #383c3d;
    }

    html[data-yys-theme="dark"] .news-list-page .news-category-option > a {
        color: #e6e0d5;
        background: #383c3d;
    }

    html[data-yys-theme="dark"] .news-list-page .news-category-option > a[aria-current="page"] {
        color: #fff;
        background: #6c3a96;
    }

    html[data-yys-theme="dark"] .news-detail-page :is(.content-text, .page-heading, .page-heading-title2, .article_front_after_content) {
        color: #e6e0d5;
    }

    html[data-yys-theme="dark"] .news-detail-page .news-mobile-back {
        color: #d3b9f1;
    }
}
