#btop-home-news .btop-home-news-grid {
    display: grid;
    grid-template-columns: repeat(var(--btop-news-count, 4), minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 24px;
}

#btop-home-news .btop-home-news-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 354px;
    padding: 15px 18px 10px;
    margin: 0;
    border-radius: 8px;
}

#btop-home-news .btop-home-news-card--wechat {
    height: auto;
}

#btop-home-news .btop-home-news-card--wechat .btop-home-news-scroll {
    flex: none;
    max-height: 424px;
}

#btop-home-news .btop-home-news-card--wechat .btop-home-news-meta {
    max-width: 32%;
}

#btop-home-news .btop-home-news-side {
    display: grid;
    gap: 16px;
}

#btop-home-news .btop-home-news-side .btop-home-news-card {
    height: 236px;
}

#btop-home-news .btop-home-news-grid--split .btop-home-news-card--industry {
    grid-column: 1 / -1;
}

#btop-home-news .btop-home-news-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--border-color, rgba(120, 120, 130, .18));
}

#btop-home-news .btop-home-news-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

#btop-home-news .btop-home-news-label {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px 12px;
    min-width: 0;
}

#btop-home-news .btop-home-news-note {
    color: var(--muted-color, #68717a);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

#btop-home-news .btop-home-news-header::after {
    position: absolute;
    content: "";
    bottom: -2px;
    left: 0;
    width: 38px;
    height: 3px;
    border-radius: 4px;
    background: var(--theme-color, #8324db);
}

#btop-home-news .btop-home-news-scroll {
    flex: 1;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    margin-top: 6px;
    padding-right: 3px;
}

#btop-home-news ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

#btop-home-news li:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 2px;
    border-bottom: 1px solid var(--border-color, rgba(120, 120, 130, .13));
}

#btop-home-news .btop-home-news-rank {
    flex: 0 0 22px;
    height: 18px;
    color: #61438d;
    background: #eee6f9;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

#btop-home-news .btop-home-news-card--industry .btop-home-news-rank { color: var(--muted-color, #68717a); background: rgba(125, 125, 135, .10); }
#btop-home-news .btop-home-news-card--industry li:nth-child(1) .btop-home-news-rank { color: #d9475d; background: rgba(226, 75, 100, .12); }
#btop-home-news .btop-home-news-card--industry li:nth-child(2) .btop-home-news-rank { color: #ba631d; background: rgba(220, 120, 58, .13); }
#btop-home-news .btop-home-news-card--industry li:nth-child(3) .btop-home-news-rank { color: #7940d4; background: rgba(142, 90, 230, .13); }

#btop-home-news .btop-home-news-title,
#btop-home-news .btop-home-news-source {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#btop-home-news .btop-home-news-title {
    flex: 1 1 0;
    font-size: 14px;
    line-height: 1.45;
}

#btop-home-news .btop-home-news-meta,
#btop-home-news .btop-home-news-empty {
    color: var(--muted-color, #68717a);
    font-size: 12px;
}

#btop-home-news .btop-home-news-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
    max-width: 42%;
    margin-inline-start: auto;
    white-space: nowrap;
}

#btop-home-news .btop-home-news-meta time {
    flex: none;
    font-variant-numeric: tabular-nums;
}

#btop-home-news .btop-home-news-source + time::before { content: "·"; margin-inline-end: 4px; }
#btop-home-news .btop-home-news-empty { padding-top: 10px; }

#btop-home-news .btop-home-news-all {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 0;
    border-radius: 6px;
    background: #7425cc;
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
}

#btop-home-news .btop-home-news-all:hover { background: #5b16ab; color: #fff; }
#btop-home-news .btop-home-news-all:focus-visible { outline: 2px solid currentColor; }

#btop-home-news .btop-home-news-end {
    display: block;
    padding: 9px 0 3px;
    text-align: center;
    color: #7425cc;
    font-size: 13px;
    font-weight: 600;
}

#btop-home-news a:focus-visible,
#btop-home-news button:focus-visible,
#btop-home-news .btop-home-news-scroll:focus-visible {
    outline: 2px solid var(--theme-color, #8324db);
    outline-offset: -2px;
}

@media (max-width: 1199px) {
    #btop-home-news .btop-home-news-grid { grid-template-columns: repeat(min(var(--btop-news-count, 4), 2), minmax(0, 1fr)); }
}
@media (min-width: 992px) {
    #btop-home-news .btop-home-news-grid--split {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    #btop-home-news .btop-home-news-grid--split .btop-home-news-card--wechat {
        grid-column: span 2;
    }
    #btop-home-news .btop-home-news-side {
        grid-auto-rows: minmax(0, 1fr);
        contain: size;
        min-height: 236px;
    }
    #btop-home-news .btop-home-news-side:has(> :nth-child(2)) {
        min-height: 388px;
    }
    #btop-home-news .btop-home-news-side .btop-home-news-card { height: auto; }
}
@media (max-width: 991px) {
    #btop-home-news .btop-home-news-grid--split {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 575px) {
    #btop-home-news .btop-home-news-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    #btop-home-news .btop-home-news-card { height: 285px; padding-inline: 14px; }
    #btop-home-news .btop-home-news-card--wechat { height: auto; }
    #btop-home-news .btop-home-news-side { gap: 12px; }
}

.btop-wechat-archive,
.btop-wechat-archive-intro,
.btop-wechat-archive-list {
    display: grid;
    gap: 12px;
    min-width: 0;
}
.btop-wechat-archive-page h1 {
    font-size: clamp(22px, 3.5vw, 27px);
    font-weight: 700;
}
.btop-wechat-archive .btop-wechat-archive-note {
    margin: 0;
    color: var(--muted-color, #68717a);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}
.btop-wechat-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 6px;
}
.btop-wechat-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}
.btop-wechat-filter select,
.btop-wechat-filter button {
    padding: 5px 12px;
    border-radius: 6px;
    font: inherit;
}
.btop-wechat-filter button {
    border: 0;
    background: #7425cc;
    color: #fff;
    cursor: pointer;
}
.btop-wechat-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-inline-start: auto;
}
.btop-wechat-qr { position: relative; }
.btop-wechat-qr summary {
    padding: 5px 12px;
    border: 1px solid #d7c6ef;
    border-radius: 6px;
    background: #f1eafa;
    color: #5c2a9e;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.btop-wechat-qr-image {
    position: absolute;
    z-index: 5;
    inset: auto 0 auto auto;
    margin-top: 7px;
    padding: 10px;
    border: 1px solid #e5ddef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(42, 22, 77, .16);
}
.btop-wechat-qr-image img { display: block; max-width: min(200px, 64vw); height: auto; }
.btop-wechat-poster-button,
.btop-wechat-poster button,
.btop-wechat-poster-download a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #7425cc;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.btop-wechat-poster-button:hover,
.btop-wechat-poster button:hover,
.btop-wechat-poster-download a:hover {
    background: #5c2a9e;
    color: #fff;
}
.btop-wechat-poster-button[hidden],
.btop-wechat-poster [hidden] { display: none; }
.btop-wechat-poster {
    position: fixed;
    inset: 0;
    width: min(620px, calc(100% - 24px));
    max-height: 88vh;
    max-height: 88dvh;
    margin: auto;
    padding: 0;
    border: 1px solid #e5ddef;
    border-radius: 12px;
    background: #fff;
    color: #242034;
    box-shadow: 0 16px 40px rgba(42, 22, 77, .22);
}
.btop-wechat-poster[open] { display: flex; flex-direction: column; }
.btop-wechat-poster::backdrop { background: rgba(22, 15, 37, .55); }
.btop-wechat-poster-bar,
.btop-wechat-poster-download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 0 0 auto;
    padding: 12px 16px;
}
.btop-wechat-poster-bar { border-bottom: 1px solid #eeeaf1; }
.btop-wechat-poster-bar form { margin: 0; }
.btop-wechat-poster-preview {
    min-height: 0;
    padding: 12px 16px;
    overflow: auto;
    overscroll-behavior: contain;
}
.btop-wechat-poster-status { margin: 0; }
.btop-wechat-poster-status:empty { display: none; }
.btop-wechat-poster-latest { margin-top: 10px; }
.btop-wechat-poster-preview img { display: block; width: 100%; height: auto; }
.btop-wechat-poster-download { border-top: 1px solid #eeeaf1; }
.btop-wechat-poster-download small { color: #72717a; }
.btop-wechat-year {
    border: 1px solid var(--border-color, #e5ddef);
    border-radius: 8px;
}
.btop-wechat-year summary,
.btop-wechat-year-link {
    padding: 12px 16px;
    font-weight: 600;
    cursor: pointer;
}
.btop-wechat-year-link::before { content: '▸'; margin-inline-end: 8px; }
.btop-wechat-month, .btop-wechat-empty { padding: 0 16px; }
.btop-wechat-archive .btop-wechat-month h2 {
    margin: 10px 0 2px;
    font-size: 16px;
}
.btop-wechat-archive .btop-wechat-month ol { list-style: none; margin: 0 0 12px; padding: 0; }
.btop-wechat-month li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 18px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-color, #eeeaf1);
}
.btop-wechat-month li > a {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.btop-wechat-month .btop-wechat-rank {
    min-width: 2.2em;
    padding: 2px 4px;
    border-radius: 4px;
    background: #eee6f9;
    color: #61438d;
    font-size: .8em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.btop-wechat-month .btop-wechat-meta { color: #72717a; font-size: .88em; text-align: end; }
.btop-wechat-month time { margin-inline-start: 6px; white-space: nowrap; }
@media (max-width: 575px) {
    .btop-wechat-archive-page main.container { padding-inline: 12px; }
    .btop-wechat-archive-page .content-layout > .panel.card {
        background: transparent !important;
        border: 0;
        box-shadow: none;
    }
    .btop-wechat-archive-page .content-layout > .panel.card > .card-body {
        padding-inline: 0;
    }
    .btop-wechat-archive-page .content-layout > .panel.card > .card-body > .panel-header {
        margin: 0 !important;
        padding: 14px 14px 8px;
        border-radius: 12px 12px 0 0;
        background: #fff;
    }
    .btop-wechat-archive-page .panel-header h1 {
        margin: 0;
        color: #292638;
        font-size: clamp(18px, 5vw, 22px);
        line-height: 1.35;
    }
    .btop-wechat-archive-page .content-layout > .panel.card > .card-body > .panel-body { margin-top: 0 !important; }
    .btop-wechat-archive-intro {
        gap: 10px;
        padding: 0 14px 14px;
        border-radius: 0 0 12px 12px;
        background: #fff;
    }
    .btop-wechat-archive .btop-wechat-archive-note { color: #696573; }
    .btop-wechat-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; }
    .btop-wechat-filter {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        color: #393544;
    }
    .btop-wechat-filter label { margin: 0; font-weight: 600; white-space: nowrap; }
    .btop-wechat-filter select,
    .btop-wechat-filter button,
    .btop-wechat-actions .btop-wechat-poster-button,
    .btop-wechat-qr summary {
        min-height: 42px;
        padding: 7px 8px;
        border-radius: 8px;
        font-size: clamp(12px, 3.5vw, 14px);
    }
    .btop-wechat-filter select {
        width: 100%;
        min-width: 0;
        border: 1px solid #ded8e8;
        color: #292638;
        background: #faf9fc;
    }
    .btop-wechat-filter button {
        border: 1px solid #dccbed;
        padding-inline: 12px;
        background: #f1eafa;
        color: #5c2a9e;
        font-weight: 600;
        white-space: nowrap;
    }
    .btop-wechat-actions {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        margin: 0;
    }
    .btop-wechat-actions .btop-wechat-poster-button { white-space: nowrap; }
    .btop-wechat-qr summary {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        list-style: none;
    }
    .btop-wechat-qr summary::-webkit-details-marker { display: none; }
    .btop-wechat-qr summary::after {
        content: '';
        width: 6px;
        height: 6px;
        border-inline-end: 1px solid currentColor;
        border-bottom: 1px solid currentColor;
        transform: rotate(45deg);
    }
    .btop-wechat-qr[open] summary::after { transform: rotate(225deg); }
    .btop-wechat-archive-list {
        gap: 8px;
        padding: 8px 12px 4px;
        border-radius: 12px;
        background: #fff;
        color: #292638;
    }
    .btop-wechat-archive-list a { color: inherit; }
    .btop-wechat-archive .btop-wechat-year { border: 0; }
    .btop-wechat-archive .btop-wechat-year summary,
    .btop-wechat-archive .btop-wechat-year-link,
    .btop-wechat-archive .btop-wechat-month,
    .btop-wechat-archive .btop-wechat-empty { padding-inline: 0; }
    .btop-wechat-month li {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 4px 8px;
    }
    .btop-wechat-month .btop-wechat-meta { grid-column: 2; text-align: start; }
}
