.forum-page > .bh-top {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--plaza-aside-w, 300px);
    gap: inherit;
    align-items: stretch
}

@supports (grid-template-columns: subgrid) {
    .forum-page > .bh-top {
        grid-template-columns: subgrid
    }
}

.forum-page > .bh-top > .bh-slider {
    position: relative;
    min-width: 0;
    min-height: 240px;
    height: 100%;
    align-self: stretch
}

.forum-page > .bh-top > .bh-news {
    min-width: 0;
    align-self: stretch
}

.bh-top:not(:has(.uc-slider)) {
    grid-template-columns: 1fr
}

.bh-top:not(:has(.uc-slider)) .bh-slider {
    display: none
}

.forum-page > .bh-top .uc-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    margin: 0;
    border-radius: var(--radius, 20px)
}

.forum-main {
    gap: 16px;
    min-width: 0
}

.bh-news {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px 18px 12px
}

.bh-news-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px
}

.bh-news-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink, #fff);
    font-size: 12px;
    font-weight: 800
}

.bh-news-lead {
    display: block;
    text-decoration: none;
    color: inherit;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line)
}

.bh-news-title {
    display: block;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text)
}

.bh-news-title.is-hl {
    font-weight: 600
}

.bh-news-excerpt {
    display: -webkit-box;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.bh-news-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0
}

.bh-news-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 36px;
    border-bottom: 1px dashed var(--line)
}

.bh-news-list li:last-child {
    border-bottom: 0
}

.bh-news-list a {
    flex: 1;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.bh-news-list a.is-hl {
    font-weight: 600
}

.bh-news-list a:hover:not(.is-hl),
.bh-news-lead:hover .bh-news-title:not(.is-hl) {
    color: var(--accent)
}

.bh-news-list em {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-style: normal
}

.bh-group {
    padding: 16px 18px 18px
}

.bh-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px
}

.bh-group-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800
}

.bh-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    cursor: pointer
}

.bh-switch input {
    position: absolute;
    opacity: 0;
    inset: 0
}

.bh-switch span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: var(--stroke-strong);
    transition: background .16s ease
}

.bh-switch span:after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
    transition: transform .16s ease
}

.bh-switch input:checked + span {
    background: var(--accent)
}

.bh-switch input:checked + span:after {
    transform: translateX(18px)
}

.bh-group.is-folded .bh-grid {
    display: none
}

.bh-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px
}

.bh-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 118px;
    padding: 14px 14px 12px;
    border-radius: 16px;
    background: var(--chip);
    text-decoration: none;
    color: inherit;
    transition: background .12s ease, transform .12s ease
}

.bh-card:hover {
    background: var(--accent-soft);
    transform: translateY(-1px)
}

.bh-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0
}

.bh-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bh-bg, #eff6ff);
    color: var(--bh-ink, #2563eb);
    font-size: 20px;
    overflow: hidden
}

.bh-icon i {
    font-size: 20px;
    color: inherit
}

.bh-icon img,
.bh-icon .cat-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.bh-card-meta {
    min-width: 0
}

.bh-card-meta strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.bh-card-meta span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px
}

.bh-card-desc {
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--card);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    height: calc(16px + 3em);
    overflow: hidden;
    flex: 0 0 auto
}

.bh-card-desc span {
    display: -webkit-box;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    word-break: break-word
}

.bh-friends-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px
}

.bh-friends-list a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600
}

.bh-friends-list a:hover {
    color: var(--accent)
}

.bh-online {
    padding: 16px 18px 14px
}

.bh-online-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px
}

.bh-online-title {
    min-width: 0;
    flex: 1
}

.bh-online-title strong {
    display: inline;
    font-size: 15px;
    font-weight: 800
}

.bh-online-meta {
    display: inline;
    margin: 0 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6
}

.bh-online-body {
    margin-top: 12px
}

.bh-online.is-folded .bh-online-body {
    display: none
}

.bh-online-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600
}

.bh-online-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px
}

.bh-on-ico {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 12px;
    line-height: 1
}

.bh-on-ico.admin { background: #f43f5e }
.bh-on-ico.super { background: #f59e0b }
.bh-on-ico.mod { background: #38bdf8 }
.bh-on-ico.member { background: #22c55e }

.bh-on-admin { color: #f43f5e }
.bh-on-super { color: #f59e0b }
.bh-on-mod { color: #38bdf8 }
.bh-on-member { color: #22c55e }

.bh-online-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding-top: 12px;
    min-height: 28px
}

.bh-online-list a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700
}

.bh-online-empty {
    margin: 0;
    padding-top: 2px;
    color: var(--text);
    font-size: 13px
}

@media (max-width: 960px) {
    .plaza-main.forum-page {
        grid-template-columns: minmax(0, 1fr)
    }

    .forum-page > .bh-top {
        grid-column: auto;
        grid-template-columns: 1fr;
        gap: 16px
    }

    .forum-page > .bh-top > .bh-slider {
        position: static;
        height: auto;
        min-height: 0
    }

    .forum-page > .bh-top > .bh-news {
        height: auto
    }

    .forum-page > .bh-top .uc-slider {
        position: relative;
        inset: auto;
        min-height: 180px;
        max-height: 240px;
        aspect-ratio: 5 / 2
    }

    .bh-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .bh-online-title strong,
    .bh-online-meta {
        display: block;
        margin-left: 0
    }
}

@media (max-width: 640px) {
    .bh-grid {
        grid-template-columns: 1fr
    }

    .bh-news-list em {
        display: none
    }
}
