/* ==========================================================================
   蝶梦 · 首页视觉（对应设计稿「蝶梦官网首页」）
   --------------------------------------------------------------------------
   仅作用于 .bh-page / .bh-* 命名空间，与老 index.css 完全隔离。
   ========================================================================== */

/* ==========================================================================
   1. 顶部导航
   ========================================================================== */
.bh-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--bh-header-h);
    border-bottom: none;
    /* 导航下半部压在横幅上：白色渐变，上实下透；滚动时由 .is-stuck 切成实心白 */
    background: linear-gradient(180deg,
        #ffffff 0%,
        #ffffff 56%,
        rgba(255, 255, 255, .74) 82%,
        rgba(255, 255, 255, 0) 100%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.bh-header__inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 28px;
}

.bh-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

/* 站点 Logo 统一用 /public/images/logo.png（3:1 横版），按高度缩放 */
.bh-logo__img {
    display: block;
    height: 27px;
    width: auto;
}

.bh-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-shrink: 0;
}

.bh-nav__item {
    position: relative;
    font-size: var(--bh-fs-md);
    color: var(--bh-text);
    text-decoration: none;
    padding: 4px 0;
    transition: var(--bh-transition);
    white-space: nowrap;
}

.bh-nav__item:hover {
    color: var(--bh-primary);
}

.bh-nav__item.is-active {
    color: var(--bh-primary);
    font-weight: 600;
}

/* 未上线入口（图书馆 / 导出下载）：不挂链接，视觉上压暗、不响应 hover，免得被当成死链 */
.bh-nav__item--soon {
    cursor: default;
    opacity: .55;
}

.bh-nav__item--soon:hover {
    color: var(--bh-text);
}

.bh-nav__badge {
    position: absolute;
    top: -8px;
    right: -14px;
    padding: 0 4px;
    height: 14px;
    line-height: 14px;
    border-radius: 3px;
    background: var(--bh-primary);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 右侧：头像 +（管理员）管理后台 + 投稿
   ---------------------------------------------------------------------------
   2026-12-04：原来是一排文字（消息/管理后台/退出 + 投稿），信息噪音大。
   现在收敛为「圆头像（hover 出菜单）+ 投稿」，管理员多一个管理后台入口。 */
.bh-header__right {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.bh-header__link {
    font-size: var(--bh-fs-sm);
    color: var(--bh-text-sub);
    text-decoration: none;
    padding: 6px 2px;
    transition: var(--bh-transition);
    white-space: nowrap;
}

.bh-header__link:hover {
    color: var(--bh-primary);
}

.bh-header__post {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 16px;
    border-radius: var(--bh-radius-pill);
    background: var(--bh-primary);
    color: #fff;
    font-size: var(--bh-fs-sm);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--bh-transition);
    box-shadow: 0 4px 12px rgba(255, 84, 83, 0.24);
}

.bh-header__post:hover {
    background: #f0403f;
    box-shadow: 0 6px 16px rgba(255, 84, 83, 0.32);
}

.bh-header__post-ico {
    font-size: 13px;
    line-height: 1;
}

/* 只在窄屏出现：头像菜单靠 hover，移动端点不出来，直接给一个退出入口 */
.bh-header__logout {
    display: none;
    font-size: var(--bh-fs-sm);
    color: var(--bh-text-muted);
    text-decoration: none;
    white-space: nowrap;
}

/* 圆头像 + 悬浮菜单 */
.bh-me {
    position: relative;
    display: flex;
    align-items: center;
}

/* 头像与菜单之间的透明过渡带，避免移动鼠标时 hover 断掉 */
.bh-me::after {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    top: 100%;
    height: 16px;
}

.bh-me__avatar {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffd3dc, #ffb3c1);
    color: var(--bh-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 0 0 1px var(--bh-border-light);
    transition: var(--bh-transition);
}

.bh-me__avatar:hover {
    box-shadow: 0 0 0 2px var(--bh-primary-light);
}

.bh-me__img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bh-me__ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.bh-me__dot {
    position: absolute;
    top: -1px;
    right: -1px;
    z-index: 2;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bh-primary);
    border: 2px solid #fff;
}

.bh-me__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    min-width: 136px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--bh-border-light);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(20, 24, 40, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: var(--bh-transition);
}

.bh-me:hover .bh-me__menu,
.bh-me:focus-within .bh-me__menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.bh-me__name {
    display: block;
    margin-bottom: 4px;
    padding: 4px 10px 8px;
    border-bottom: 1px solid var(--bh-border-light);
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-placeholder);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bh-me__menu a {
    display: block;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: var(--bh-fs-sm);
    color: var(--bh-text-sub);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--bh-transition);
}

.bh-me__menu a:hover {
    background: var(--bh-bg-hover);
    color: var(--bh-primary);
}

.bh-search {
    position: relative;
    width: 220px;
    height: 34px;
    border-radius: var(--bh-radius-pill);
    background: var(--bh-bg-input);
    display: flex;
    align-items: center;
    padding: 0 14px;
    flex-shrink: 0;
}

.bh-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: var(--bh-fs-sm);
    font-family: inherit;
    color: var(--bh-text);
    min-width: 0;
}

.bh-search input::placeholder {
    color: var(--bh-text-placeholder);
}

.bh-search__icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--bh-text-muted);
}

/* ==========================================================================
   2. Hero 主视觉（2026-12-03 改版）
   --------------------------------------------------------------------------
   横幅 banner-welcome.jpg 是 2880×400 的超宽插画，且文案已画在图上。
   做法：图片按原始比例铺满整宽（aspect-ratio 锁定 → 任何断点都不裁切、不变形），
   底部用白色渐变把插画柔和过渡到下方文案区，标题/简介落在白底上保证可读性。
   ========================================================================== */
.bh-hero {
    position: relative;
    background: #fff;
    overflow: hidden;
    /* 顶部导航压住横幅上半部：整块上移「头部高度的一半」 */
    margin-top: calc(var(--bh-header-h) / -2);
}

.bh-hero__banner {
    position: relative;
    line-height: 0;
    /* 原始素材 2400px 宽：超过这个宽度就停止放大并居中，避免大屏被拉糊 */
    max-width: 2400px;
    margin: 0 auto;
    /* 插画底色是浅粉与奶油色，给横幅一条极淡的底色，图片未加载时也不会露白块 */
    background: linear-gradient(120deg, #dff0fb 0%, #fdeef2 45%, #fdf3e8 100%);
}

/* <picture> 只是为「小屏不下图」服务的语义包装，不能让它参与布局，
   否则 .bh-hero__img 会从 .bh-hero__banner 的直接子元素变成它的孙元素 */
.bh-hero__banner picture {
    display: contents;
}

.bh-hero__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2400 / 333;
    object-fit: cover;
    object-position: center;
}

/* 底部覆盖层：越往下越白，和下面的文案区无缝衔接 */
.bh-hero__veil {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.45) 55%,
        #ffffff 100%);
}

/* ---------------------------------------------- 二级页横幅（全站共用，勿搬到页面级样式） */
/* 带横幅的二级页 / 导航页：导航下半部压在图上并虚化，横幅下沿与内容之间留 18px。
   这段规则必须留在 home.css —— layout_home 与 layout_workbench 都会加载它，
   而 layout_workbench 不加载 site-content.css。放错文件会让「创作管理」的横幅
   虚化范围、与内容间距和其它二级页不一致。 */
.bh-hero--sub {
    margin-bottom: 0;
}

.bh-hero--sub .bh-hero__veil {
    height: 52%;
}

/* 横幅之后如果是页面标题区 / 列表 / 工作台 / 教程正文，直接贴上来，间距由这里统一给 */
.bh-hero--sub + .bh-list,
.bh-hero--sub + .bh-ex,
.bh-hero--sub + .bh-wb,
.bh-hero--sub + .bh-doc__wrap {
    padding-top: 18px;
}

/* 频道页标题区自带 10px 内边距，补 8px 即可对齐；底色接成纯白更自然 */
.bh-hero--sub + .bh-nv-hero {
    padding-top: 8px;
    background: #fff;
}

.bh-hero--sub + .bh-pagehead {
    padding-top: 18px;
    background: #fff;
}

/* 导航压横幅：重叠区域模糊 + 白色渐隐，保证导航文字可读 */
.bh-hero::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: calc(var(--bh-header-h) + 28px);
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, .92) 0%,
        rgba(255, 255, 255, .72) 42%,
        rgba(255, 255, 255, .28) 72%,
        rgba(255, 255, 255, 0) 100%);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}

/* 让 ::before 的定位基准落在横幅图片上（picture 用 display:contents 不参与布局） */
.bh-hero__banner {
    position: relative;
}

@media (max-width: 640px) {
    /* 手机端横幅只剩几十像素高、又没有文案，整块不显示；
       同时取消头部/分类条的负边距与渐变，回到干净的实心白 */
    .bh-hero {
        display: none;
    }

    .bh-header {
        background: #fff;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .bh-cats {
        margin-top: 0;
        background: #fff;
    }
}

/* ==========================================================================
   3. 分类导航条
   ========================================================================== */
.bh-cats {
    position: relative;
    z-index: 2;
    /* 下导航上移一半高度，压在横幅下沿；重叠处用白色渐变透出横幅 */
    margin-top: -38px;
    padding: 18px 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .82) 46%,
        #ffffff 64%);
    border-bottom: 1px solid var(--bh-border-light);
}

.bh-cats__inner {
    display: flex;
    align-items: center;
    gap: 26px;
}

/* ---- 左侧：四个彩色图标入口 ---- */
.bh-cats__quick {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 24px;
    border-right: 1px solid var(--bh-border);
    flex-shrink: 0;
}

.bh-quick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 64px;
    text-decoration: none;
    color: var(--bh-text-sub);
    font-size: var(--bh-fs-xs);
    transition: var(--bh-transition);
}

.bh-quick__icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--bh-transition);
}

.bh-quick__label {
    white-space: nowrap;
}

.bh-quick:hover {
    color: var(--bh-text);
}

.bh-quick:hover .bh-quick__icon {
    transform: translateY(-2px);
}

.bh-quick__icon svg {
    stroke-width: 2.1;
}

.bh-quick--home   .bh-quick__icon { background: #ffe6e6; color: #f5453f; }
.bh-quick--lifeline .bh-quick__icon { background: #efe9ff; color: #7b5bd6; }
.bh-quick--novel  .bh-quick__icon { background: #fdf0e6; color: #c98a4b; }
.bh-quick--chat   .bh-quick__icon { background: #e8f6f8; color: #2a9fb4; }
.bh-quick--rank   .bh-quick__icon { background: #ffedd8; color: #ef8b16; }
.bh-quick--create .bh-quick__icon { background: #e3edff; color: #3a78ef; }
.bh-quick--tools  .bh-quick__icon { background: #e2f8ec; color: #12a862; }

/* ---- 右侧：分类两行网格，名字 + 灰色计数胶囊 ---- */
.bh-cats__list {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px 10px;
    flex: 1;
    min-width: 0;
}

.bh-cats__label {
    display: flex;
    align-items: center;
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-placeholder);
    letter-spacing: .5px;
    white-space: nowrap;
}

.bh-cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 1px 0;
    text-decoration: none;
    font-size: var(--bh-fs-md);
    color: var(--bh-text);
    transition: var(--bh-transition);
}

.bh-cat__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bh-cat__num {
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--bh-bg-section);
    color: var(--bh-text-placeholder);
    font-size: 11px;
    line-height: 1.55;
}

.bh-cat:hover {
    color: var(--bh-primary);
}

.bh-cat:hover .bh-cat__num {
    background: var(--bh-primary-light);
    color: var(--bh-primary);
}

.bh-cat--more .bh-cat__num {
    background: transparent;
    padding: 0;
    color: var(--bh-text-placeholder);
}

/* ==========================================================================
   4. 编辑推荐（左侧站内活动图 + 右侧 3×2 随机推荐）
   --------------------------------------------------------------------------
   2026-12-04 改版：原「左大卡 470px + 4 小卡 + 96px 竖长换一换」与后面的
   编辑推荐区块内容重复，换一换又被拉伸成一整条竖框。现在合并为一块：
   左侧活动图（内含活动说明与入口），右侧六部随机编辑推荐，「换一换」变小。
   ========================================================================== */
.bh-feature {
    padding: 22px 0 6px;
}

.bh-feature__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.bh-feature__ops {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

/* 小号「换一换」：28px 高的胶囊，不再撑满一整列 */
.bh-refresh {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 12px;
    border: 1px solid var(--bh-border);
    border-radius: var(--bh-radius-pill);
    background: #fff;
    cursor: pointer;
    font-size: var(--bh-fs-xs);
    font-family: inherit;
    color: var(--bh-text-muted);
    transition: var(--bh-transition);
}

.bh-refresh__ico {
    font-size: 13px;
    line-height: 1;
    transition: transform 0.35s ease;
}

.bh-refresh:hover {
    border-color: var(--bh-primary);
    color: var(--bh-primary);
}

.bh-refresh:hover .bh-refresh__ico {
    transform: rotate(180deg);
}

.bh-feature__body {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, 122px);
    gap: 12px;
}

/* ---- 左侧站内活动卡：图上 + 文下，整幅等比显示，不裁不拉伸 ---- */
.bh-act {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--bh-radius);
    border: 1px solid #fde3ea;
    background: linear-gradient(160deg, #fff5f7 0%, #fdeef3 55%, #fff7ef 100%);
    text-decoration: none;
    transition: var(--bh-transition);
}

.bh-act:hover {
    border-color: #fbcdd8;
    box-shadow: 0 8px 24px rgba(255, 84, 83, 0.1);
}

.bh-act__img {
    display: block;
    width: 100%;
    height: auto;
    /* 横幅是 2400×333 的宽幅图，按 1100/353 的框铺满后
       从左侧对齐裁切，保证任何宽度都只裁不拉伸 */
    aspect-ratio: 1100 / 353;
    object-fit: cover;
    object-position: left center;
}

.bh-act__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 16px 14px;
    min-height: 0;
}

.bh-act__tag {
    align-self: flex-start;
    padding: 1px 8px;
    border-radius: var(--bh-radius-pill);
    background: rgba(255, 84, 83, 0.1);
    color: var(--bh-primary);
    font-size: 11px;
    letter-spacing: 0.5px;
}

.bh-act__title {
    margin: 0;
    font-size: var(--bh-fs-lg);
    font-weight: 700;
    color: var(--bh-text);
    letter-spacing: 0.5px;
}

.bh-act__desc {
    margin: 0;
    font-size: var(--bh-fs-xs);
    line-height: 1.7;
    color: var(--bh-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bh-act__cta {
    margin-top: auto;
    font-size: var(--bh-fs-xs);
    font-weight: 500;
    color: var(--bh-primary);
}

/* ---- 右侧六张推荐卡：封面铺满 + 角标 + 底部标题/人气 ---- */
.bh-feature__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, 122px);
    gap: 12px;
    grid-column: 2 / -1;
}

.bh-fcard {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--bh-radius-sm);
    text-decoration: none;
}

.bh-fcard img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.4s ease;
}

.bh-fcard:hover img {
    transform: scale(1.05);
}

.bh-fcard__ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 3px;
}

.bh-fcard__mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0) 34%,
        rgba(0, 0, 0, 0.74) 100%);
}

.bh-fcard__tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 1px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.92);
    color: #3d3d3d;
    font-size: 11px;
    line-height: 1.6;
}

.bh-fcard__foot {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #fff;
}

.bh-fcard__title {
    min-width: 0;
    font-size: var(--bh-fs-sm);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bh-fcard__views {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.86);
}

/* ==========================================================================
   4.1 二级页头部（我的收藏 / 最近在玩 等内页复用）
   --------------------------------------------------------------------------
   内页统一用「面包屑 + 标题 + 描述 + 切换页签」的结构，和首页同一套留白节奏：
   浅色渐变背景承接 hero 的柔性过渡，往下是纯白内容区。
   ========================================================================== */
.bh-pagehead {
    padding: 24px 0 0;
    background: linear-gradient(180deg, #fff8f9 0%, #ffffff 100%);
    border-bottom: 1px solid var(--bh-border-light);
}

.bh-crumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-placeholder);
}

.bh-crumb a {
    color: var(--bh-text-muted);
    text-decoration: none;
    transition: var(--bh-transition);
}

.bh-crumb a:hover {
    color: var(--bh-primary);
}

.bh-crumb__sep {
    color: var(--bh-border);
}

.bh-pagehead__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.bh-pagehead__title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--bh-text);
}

.bh-pagehead__desc {
    margin: 0;
    font-size: var(--bh-fs-sm);
    color: var(--bh-text-muted);
}

.bh-pagehead__count {
    flex-shrink: 0;
    padding-bottom: 4px;
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-placeholder);
}

.bh-pagehead__count b {
    font-size: var(--bh-fs-xl);
    font-weight: 700;
    color: var(--bh-primary);
    margin-right: 2px;
}

.bh-pagetabs {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-top: 18px;
}

.bh-pagetab {
    position: relative;
    padding: 8px 0 10px;
    font-size: var(--bh-fs-md);
    color: var(--bh-text-muted);
    text-decoration: none;
    transition: var(--bh-transition);
    white-space: nowrap;
}

.bh-pagetab:hover {
    color: var(--bh-primary);
}

.bh-pagetab.is-active {
    color: var(--bh-text);
    font-weight: 600;
}

.bh-pagetab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--bh-primary);
}

/* 空状态：不摆一张干瘪的「暂无数据」，给图标 + 解释 + 两个下一步 */
.bh-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 64px 24px 72px;
    border: 1px dashed var(--bh-border);
    border-radius: var(--bh-radius);
    background: linear-gradient(180deg, #fcfdff 0%, #ffffff 100%);
    text-align: center;
}

.bh-empty__ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--bh-primary-light);
    font-size: 22px;
    line-height: 1;
}

.bh-empty__title {
    margin: 4px 0 0;
    font-size: var(--bh-fs-lg);
    font-weight: 600;
    color: var(--bh-text);
}

.bh-empty__desc {
    margin: 0;
    font-size: var(--bh-fs-sm);
    color: var(--bh-text-muted);
}

.bh-empty__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

/* ==========================================================================
   5. 区块通用
   ========================================================================== */
.bh-block {
    padding: 26px 0 4px;
}

.bh-block--section {
    background: var(--bh-bg-section);
    padding: 30px 0;
    margin-top: 18px;
}

.bh-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.bh-block__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--bh-fs-xl);
    font-weight: 700;
    color: var(--bh-text);
    margin: 0;
}

.bh-block__icon {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    background: var(--bh-primary);
    flex-shrink: 0;
}

.bh-block__icon--blue { background: var(--bh-blue); }
.bh-block__icon--gold { background: var(--bh-gold); }
.bh-block__icon--green { background: #52c41a; }

.bh-block__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   6. 作品卡片网格（5 列）
   ========================================================================== */
.bh-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px 16px;
}

.bh-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.bh-card__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--bh-radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, #6b7280, #374151);
}

.bh-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.bh-card:hover .bh-card__cover img {
    transform: scale(1.04);
}

/* 无封面时的占位：低饱和渐变 + 细斜纹质感 + 首字 */
.bh-card__ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 4px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.035) 0,
        rgba(255, 255, 255, 0.035) 1px,
        transparent 1px,
        transparent 9px
    );
}

.bh-card__status {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 2px 7px;
    font-size: 11px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-top-left-radius: var(--bh-radius-xs);
}

.bh-card__status--done {
    background: rgba(255, 84, 83, 0.92);
}

.bh-card__status--ing {
    background: rgba(104, 160, 237, 0.92);
}

.bh-card__title {
    margin: 9px 0 4px;
    font-size: var(--bh-fs-base);
    color: var(--bh-text);
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bh-card:hover .bh-card__title {
    color: var(--bh-primary);
}

.bh-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-muted);
}

.bh-card__cat {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bh-card__num {
    flex-shrink: 0;
}

/* ==========================================================================
   7. 横幅 Banner
   ========================================================================== */
.bh-banner {
    margin: 34px auto;
    border-radius: var(--bh-radius);
    overflow: hidden;
    display: block;
    text-decoration: none;
    background: linear-gradient(120deg, #2b3540, #46545f);
    position: relative;
}

.bh-banner img {
    width: 100%;
    display: block;
    border-radius: var(--bh-radius);
}

.bh-banner__ph {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 24px;
    letter-spacing: 6px;
    font-weight: 300;
}

.bh-banner__tag {
    position: absolute;
    top: 0;
    left: 0;
    padding: 2px 8px;
    font-size: 11px;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border-bottom-right-radius: var(--bh-radius-sm);
}

/* ==========================================================================
   8. 作者专区
   ========================================================================== */
.bh-authors {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.bh-author {
    position: relative;
    height: 96px;
    border-radius: var(--bh-radius);
    padding: 22px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    overflow: hidden;
    transition: var(--bh-transition);
}

.bh-author:hover {
    transform: translateY(-2px);
    box-shadow: var(--bh-shadow-lg);
}

.bh-author__title {
    font-size: var(--bh-fs-xl);
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.bh-author__deco {
    position: absolute;
    right: -20px;
    bottom: -30px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.bh-author__deco::after {
    content: "";
    position: absolute;
    right: 24px;
    bottom: 30px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.26);
}

.bh-author--yellow { background: linear-gradient(135deg, #ffd75e, #ffca3a); }
.bh-author--pink   { background: linear-gradient(135deg, #fa9aa8, #f78494); }
.bh-author--blue   { background: linear-gradient(135deg, #6ad8f5, #4cc6ec); }
.bh-author--green  { background: linear-gradient(135deg, #85e98f, #5fd68a); }

/* ==========================================================================
   9. 页脚
   ========================================================================== */
.bh-footer {
    margin-top: 34px;
    padding: 32px 0 28px;
    background: var(--bh-bg-footer);
}

.bh-footer__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.bh-footer__left {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.bh-footer__links--nav a {
    color: var(--bh-text-sub);
    font-weight: 500;
}

.bh-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    font-size: var(--bh-fs-xs);
    color: #8b9099;
    max-width: 720px;
}

.bh-footer__links a {
    color: inherit;
    text-decoration: none;
}

.bh-qr__box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.bh-footer__links > a + a::before,
.bh-footer__links > span + a::before,
.bh-footer__links > span + span::before {
    content: "|";
    margin: 0 8px;
    color: #e2e4e9;
}

.bh-footer__links a:hover {
    color: var(--bh-primary);
}

.bh-footer__sep {
    color: #c5c9cf;
}

.bh-footer__copy {
    margin-top: 14px;
    font-size: var(--bh-fs-xs);
    color: #9aa0a8;
    line-height: 1.9;
    text-align: center;
}

.bh-footer__qr {
    display: flex;
    gap: 26px;
    flex-shrink: 0;
}

.bh-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.bh-qr__box {
    width: 88px;
    height: 88px;
    border-radius: var(--bh-radius-sm);
    border: 1px solid #e3e7ec;
    /* 二维码样式的视觉占位，接入真实图片后替换此背景即可 */
    background-color: #fff;
    background-image:
        repeating-conic-gradient(#e6ebf1 0% 25%, transparent 0% 50%),
        repeating-conic-gradient(#e6ebf1 0% 25%, transparent 0% 50%);
    background-size: 14px 14px, 14px 14px;
    background-position: 0 0, 7px 7px;
    box-shadow: inset 0 0 0 7px #fff;
}

.bh-qr__label {
    font-size: var(--bh-fs-xs);
    color: #8b9099;
}

/* ==========================================================================
   10. 空态
   ========================================================================== */
.bh-empty {
    padding: 44px 0;
    text-align: center;
    color: var(--bh-text-placeholder);
    font-size: var(--bh-fs-base);
    background: var(--bh-bg-section);
    border-radius: var(--bh-radius);
}

/* ==========================================================================
   11. 响应式（窄屏降级）
   ========================================================================== */
@media (max-width: 1240px) {
    .bh-container {
        max-width: calc(100% - 40px);
    }
    .bh-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .bh-feature__body {
        grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    /* 窄屏：导航不能消失，改为头部第二行横向滚动 */
    .bh-header {
        height: auto;
    }
    .bh-header__inner {
        flex-wrap: wrap;
        height: auto;
        padding: 9px 0 0;
        gap: 10px;
    }
    .bh-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        gap: 18px;
        padding: 0 0 9px;
        border-top: 1px solid var(--bh-border-light);
        padding-top: 9px;
        scrollbar-width: none;
    }
    .bh-nav::-webkit-scrollbar {
        display: none;
    }
    .bh-nav__item {
        font-size: 13px;
        flex-shrink: 0;
    }
    .bh-search {
        display: none;
    }
    .bh-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    /* 编辑推荐：活动图单独占一行，六张卡按 3 列铺两行 */
    .bh-feature__body {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: auto repeat(2, 118px);
    }
    .bh-act {
        grid-column: 1 / -1;
        grid-row: auto;
        flex-direction: row;
        align-items: center;
    }
    .bh-act__img {
        width: 46%;
        aspect-ratio: 1100 / 353;
        flex-shrink: 0;
    }
    .bh-act__body {
        padding: 12px 16px;
    }
    .bh-feature__grid {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: repeat(2, 118px);
    }
    .bh-cats__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .bh-cats__quick {
        border-right: none;
        padding-right: 0;
    }
    .bh-cats__list {
        width: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .bh-authors {
        grid-template-columns: repeat(2, 1fr);
    }
    .bh-footer__inner {
        flex-direction: column;
        align-items: center;
    }
}

/* ==========================================================================
   13. 数据榜单区块（时间维度分段控件 + 名次角标）
   --------------------------------------------------------------------------
   2026-12 首页改造：分类区块改为「人气/点赞/收藏/评论」四个数据榜单，
   每个区块右侧提供 今日/本周/本月/年度 的区间切换。
   ========================================================================== */
.bh-block__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bh-seg {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    background: var(--bh-bg-input);
    border-radius: var(--bh-radius-pill);
}

.bh-seg__item {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    border-radius: var(--bh-radius-pill);
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-sub);
    text-decoration: none;
    transition: var(--bh-transition);
    white-space: nowrap;
}

.bh-seg__item:hover {
    color: var(--bh-text);
}

.bh-seg__item.is-active {
    background: #fff;
    color: var(--bh-primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(31, 32, 35, 0.08);
}

/* 榜单名次角标（左上角） */
.bh-card__rank {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: rgba(31, 32, 35, 0.62);
    border-bottom-right-radius: var(--bh-radius-sm);
}

.bh-card__rank--top {
    background: var(--bh-primary);
}

@media (max-width: 980px) {
    .bh-block__head {
        flex-wrap: wrap;
        gap: 10px;
    }

    .bh-block__right {
        width: 100%;
        justify-content: space-between;
    }

    .bh-seg__item {
        padding: 0 10px;
    }
}

/* ==========================================================================
   14. 完整榜单页 /rank
   ========================================================================== */
.bh-rank {
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--bh-border-light);
    border-radius: var(--bh-radius-lg);
    overflow: hidden;
}

.bh-rank__row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-top: 1px solid var(--bh-border-light);
}

.bh-rank__row:first-child {
    border-top: none;
}

.bh-rank__row:hover {
    background: #fbfcff;
}

.bh-rank__no {
    flex: none;
    width: 28px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--bh-text-muted);
}

.bh-rank__no--top {
    color: var(--bh-primary);
}

.bh-rank__cover {
    position: relative;
    flex: none;
    width: 96px;
    aspect-ratio: 16 / 9;
    border-radius: var(--bh-radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, #8d9bb5, #5c6b85);
}

.bh-rank__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.bh-rank__ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
}

.bh-rank__main {
    flex: 1;
    min-width: 0;
}

.bh-rank__name {
    font-size: var(--bh-fs-md);
    font-weight: 600;
    color: var(--bh-text);
    text-decoration: none;
}

.bh-rank__name:hover {
    color: var(--bh-primary);
}

.bh-rank__desc {
    margin: 4px 0 6px;
    font-size: var(--bh-fs-sm);
    color: var(--bh-text-sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bh-rank__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-muted);
}

.bh-rank__score {
    flex: none;
    text-align: right;
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-muted);
}

.bh-rank__score b {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--bh-primary);
    line-height: 1.3;
}

@media (max-width: 640px) {
    /* 顶栏右侧：头像 + 退出 + 投稿，管理员文字入口让位给退出 */
    .bh-header__right {
        gap: 10px;
    }

    .bh-header__link {
        display: none;
    }

    .bh-header__logout {
        display: inline-block;
    }

    .bh-rank__row {
        gap: 12px;
        padding: 12px 14px;
    }

    .bh-rank__cover {
        width: 72px;
    }

    .bh-rank__desc {
        display: none;
    }

    .bh-rank__score b {
        font-size: 15px;
    }

    /* 快捷入口：四个 40px 图标 + 文字，320px 极窄屏也要放得下，不撑出横向滚动 */
    .bh-cats__quick {
        gap: 2px;
        width: 100%;
        justify-content: space-between;
    }

    .bh-quick {
        width: auto;
        min-width: 56px;
        flex: 1 1 0;
    }

    .bh-cats__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .bh-cat {
        font-size: var(--bh-fs-base);
    }

    /* 编辑推荐：头部保持一行（标题 + 换一换 + 更多），说明文字在窄屏隐藏 */
    .bh-feature__head {
        gap: 10px;
    }

    .bh-feature__head .bh-block__note {
        display: none;
    }

    .bh-pagehead {
        padding-top: 18px;
    }

    .bh-pagehead__title {
        font-size: 20px;
    }

    /* 手机端卡片网格两列，三列会让标题挤成两三个字 */
    .bh-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 12px;
    }

    .bh-pagetabs {
        gap: 18px;
        margin-top: 14px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .bh-pagetabs::-webkit-scrollbar {
        display: none;
    }

    .bh-empty {
        padding: 44px 18px 52px;
    }

    .bh-block__title {
        font-size: var(--bh-fs-lg);
    }

    .bh-feature__body {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto repeat(3, 112px);
    }

    .bh-act {
        flex-direction: column;
    }

    .bh-act__img {
        width: 100%;
    }

    .bh-act__desc {
        -webkit-line-clamp: 2;
    }

    .bh-feature__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(3, 112px);
    }
}

/* ==========================================================================
   15. 区块头部改版（2026-12-03）
   --------------------------------------------------------------------------
   时间维度（今日/本周/本月/年度）原来靠右贴在「更多」旁边，与标题离得远，
   视线要横跨整个 1180 才连起来。改为紧跟标题右侧，形成「标题 + 区间」一个整体，
   「更多」仍在最右侧做出口。
   ========================================================================== */
.bh-block__lead {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex-wrap: wrap;
}

.bh-block__note {
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-placeholder);
}

/* 时间维度：白底细边的胶囊组，选中态改用浅粉底 + 主红字，视觉更轻 */
.bh-seg {
    padding: 3px;
    gap: 2px;
    background: #fff;
    border: 1px solid var(--bh-border-light);
    box-shadow: var(--bh-shadow-sm);
}

.bh-seg__item {
    height: 26px;
    padding: 0 13px;
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-muted);
    border-radius: var(--bh-radius-pill);
}

.bh-seg__item:hover {
    color: var(--bh-text);
    background: var(--bh-bg-hover);
}

.bh-seg__item.is-active {
    background: var(--bh-primary-light);
    color: var(--bh-primary);
    font-weight: 600;
    box-shadow: none;
}

.bh-seg__item.is-active:hover {
    background: var(--bh-primary-soft);
    color: var(--bh-primary);
}

/* 「更多」出口：文字 + 箭头，弱化成次级操作 */
.bh-block__more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: none;
    height: 30px;
    padding: 0 10px 0 12px;
    border-radius: var(--bh-radius-pill);
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-muted);
    text-decoration: none;
    transition: var(--bh-transition);
}

.bh-block__more:hover {
    color: var(--bh-primary);
    background: var(--bh-primary-light);
}

.bh-block__more-arrow {
    font-size: 15px;
    line-height: 1;
    transform: translateY(-1px);
}

@media (max-width: 980px) {
    .bh-block__head {
        flex-wrap: nowrap;
        align-items: flex-start;
    }

    .bh-block__lead {
        gap: 10px;
    }

    .bh-seg__item {
        padding: 0 9px;
    }

    .bh-block__note {
        display: none;
    }
}

@media (max-width: 560px) {
    .bh-block__head {
        flex-wrap: wrap;
    }

    .bh-block__lead {
        width: 100%;
    }

    .bh-block__more {
        position: absolute;
        right: 0;
        top: 0;
    }

    .bh-block__head {
        position: relative;
        padding-right: 60px;
    }
}

/* ==========================================================================
   16. 完整榜单页：一行三列 × 五行
   --------------------------------------------------------------------------
   原来是竖向单列长列表（40 条一路滚到底），信息密度低、也没有翻页。
   改为三列卡片网格，每页 15 部（3×5），超出走分页。
   ========================================================================== */
.bh-rankgrid {
    display: grid;
    /* 排行榜固定一行两列 × 十行 = 每页 20 部 */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.bh-rcard {
    /* 三段等宽：封面 1/3 · 标题+简介 1/3 · 状态字数作者时间 1/3 */
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 12px;
    background: var(--bh-bg);
    border: 1px solid var(--bh-border-light);
    border-radius: var(--bh-radius);
    text-decoration: none;
    transition: var(--bh-transition);
}

.bh-rcard:hover {
    border-color: #f3d3d2;
    box-shadow: var(--bh-shadow);
    transform: translateY(-1px);
}

/* ---------- ① 封面 ---------- */
.bh-rcard__cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--bh-radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, #8d9bb5, #5c6b85);
}

.bh-rcard__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.bh-rcard__ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgba(255, 255, 255, .85);
}

/* 名次角标压在封面左上 */
.bh-rcard__no {
    position: absolute;
    left: 0;
    top: 0;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bh-radius-sm) 0 8px 0;
    background: rgba(28, 28, 34, .58);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.bh-rcard__no.is-top {
    background: var(--bh-primary);
}

/* 分数角标压在封面右下 */
.bh-rcard__score {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 2px 8px;
    border-radius: 8px 0 var(--bh-radius-sm) 0;
    background: rgba(28, 28, 34, .58);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    line-height: 1.4;
    white-space: nowrap;
}

.bh-rcard__score b {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.bh-rcard__score em {
    margin-left: 2px;
    font-style: normal;
    font-size: 10px;
    color: rgba(255, 255, 255, .74);
}

/* ---------- ② 标题 + 简介 ---------- */
.bh-rcard__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 2px 0;
}

.bh-rcard__name {
    font-size: var(--bh-fs-md);
    font-weight: 600;
    line-height: 1.4;
    color: var(--bh-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--bh-transition);
}

.bh-rcard:hover .bh-rcard__name {
    color: var(--bh-primary);
}

.bh-rcard__desc {
    font-size: var(--bh-fs-xs);
    line-height: 1.65;
    color: var(--bh-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- ③ 状态 / 字数 / 作者 / 创作时间 ---------- */
.bh-rcard__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    padding-left: 14px;
    border-left: 1px dashed var(--bh-border-light);
}

.bh-rcard__row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: var(--bh-fs-xs);
    line-height: 1.6;
}

.bh-rcard__row i {
    flex: none;
    width: 28px;
    font-style: normal;
    color: var(--bh-text-placeholder);
}

.bh-rcard__row b {
    min-width: 0;
    font-weight: 500;
    color: var(--bh-text-sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bh-rcard__state {
    padding: 0 7px;
    border-radius: 4px;
    background: #eafaf1;
    color: #23b26d !important;
    font-size: 11px;
    line-height: 1.7;
}

.bh-rcard__state.is-done {
    background: var(--bh-bg-section);
    color: var(--bh-text-muted) !important;
}

@media (max-width: 1180px) {
    .bh-rcard {
        gap: 12px;
    }

    .bh-rcard__desc {
        -webkit-line-clamp: 2;
    }
}

/* 分页省略号 */
.bh-pager__gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 34px;
    font-size: var(--bh-fs-sm);
    color: var(--bh-text-placeholder);
}

@media (max-width: 1080px) {
    .bh-rankgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .bh-rankgrid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    /* 手机端：封面 96px + 标题简介，信息区铺满第二行 */
    .bh-rcard {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 10px 12px;
        padding: 10px;
    }

    .bh-rcard__cover {
        aspect-ratio: 4 / 3;
    }

    .bh-rcard__info {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 16px;
        padding-left: 0;
        padding-top: 8px;
        border-left: none;
        border-top: 1px dashed var(--bh-border-light);
    }

    .bh-rcard__desc {
        -webkit-line-clamp: 2;
    }
}

/* ==========================================================================
   首页顶部改版（2026-12-04 晚）：窄屏兜底
   --------------------------------------------------------------------------
   横幅在 640 以下整块隐藏，此时不应再有「头部/分类条压住横幅」的负边距，
   否则分类条会跑到导航下面。这里写在文件末尾，确保覆盖前面的基础规则。
   ========================================================================== */
@media (max-width: 640px) {
    .bh-header {
        background: #fff;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .bh-cats {
        margin-top: 0;
        background: #fff;
    }
}

/* 滚动后头部恢复实心白（JS 加 .is-stuck） */
.bh-header.is-stuck {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* 榜单页：口径说明（区间内无事件时退回「全部时间」） */
.bh-list__note {
    margin: 0 0 14px;
    padding: 10px 14px;
    border: 1px solid #ffe3d6;
    border-radius: var(--bh-radius);
    background: #fff8f3;
    font-size: var(--bh-fs-xs);
    line-height: 1.7;
    color: #a8743f;
}

.bh-list__note b {
    color: #8a5a25;
}

/* ==========================================================================
   作品状态标签四色统一（2026-12-04）
   --------------------------------------------------------------------------
   编辑推荐 红 / 经典作品 金 / 已完结 蓝 / 更新中 绿
   首页卡片、榜单卡片、创作管理共用一套色值，避免同一状态不同页面两个颜色。
   ========================================================================== */

/* 首页卡片：右下角状态角标 */
.bh-card__status--done,
.bh-card__status--blue {
    background: rgba(74, 131, 214, .94);
}

.bh-card__status--ing,
.bh-card__status--green {
    background: rgba(63, 164, 91, .94);
}

/* 首页卡片：右上角荣誉标记 */
.bh-card__flags {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    max-width: calc(100% - 44px);
    pointer-events: none;
}

.bh-card__flag {
    padding: 1px 6px;
    border-radius: 4px;
    font-style: normal;
    font-size: 10px;
    line-height: 1.7;
    color: #fff;
    white-space: nowrap;
}

.bh-card__flag--reco {
    background: rgba(255, 84, 83, .94);
}

.bh-card__flag--classic {
    background: rgba(191, 143, 41, .94);
}

/* 榜单卡片：状态文字胶囊 */
.bh-rcard__state {
    background: #eaf8ee;
    color: #3fa45b !important;
}

.bh-rcard__state.is-done,
.bh-rcard__state--blue {
    background: var(--bh-blue-light);
    color: #4a83d6 !important;
}

.bh-rcard__state--green {
    background: #eaf8ee;
    color: #3fa45b !important;
}

/* 榜单卡片：封面右上角荣誉标记 */
.bh-rcard__flags {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    pointer-events: none;
}

.bh-rcard__flag {
    padding: 1px 6px;
    border-radius: 4px;
    font-style: normal;
    font-size: 10px;
    line-height: 1.7;
    color: #fff;
    white-space: nowrap;
}

.bh-rcard__flag--reco {
    background: rgba(255, 84, 83, .94);
}

.bh-rcard__flag--classic {
    background: rgba(191, 143, 41, .94);
}

/* 分类条左侧的「全部」入口：可点，悬停变主色 */
a.bh-cats__label {
    text-decoration: none;
    cursor: pointer;
    transition: var(--bh-transition);
}

a.bh-cats__label:hover {
    color: var(--bh-primary);
}

/* 分类条「全部」入口：位置与分类一致，字号加粗以区分入口与分类 */
.bh-cat--all .bh-cat__name {
    color: var(--bh-text);
    font-weight: 600;
}

.bh-cat--all:hover .bh-cat__name {
    color: var(--bh-primary);
}

/* --------------------------------------------------------------------------
   封面统一按「等比缩放 + 居中等比裁剪」显示，不拉伸
   object-fit: cover 默认就是居中（50% 50%），这里显式写出来便于维护
   -------------------------------------------------------------------------- */
.bh-card__cover img,
.bh-rcard__cover img {
    object-fit: cover;
    object-position: center center;
}

/* 默认封面（封面不见啦）与真实封面同一套规则：铺满 + 居中裁切，
   不再用 contain 留出白边 */
img.is-default-cover {
    object-fit: cover !important;
    object-position: center center !important;
    background: transparent !important;
}

/* 退出登录改成 POST 表单后，表单与按钮要长得和原来的文字链接一致 */
.bh-me__logout {
    margin: 0;
}

/* 和同级的 .bh-me__menu a 保持一致的行高内边距 */
.bh-me__logout button {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    font-family: inherit;
    font-size: var(--bh-fs-sm);
    line-height: 1.4;
    color: var(--bh-text-sub);
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--bh-transition);
}

.bh-me__logout button:hover {
    background: var(--bh-bg-hover);
    color: var(--bh-primary);
}

/* 用 display:contents 让按钮直接参与导航栏的 flex 布局：
   桌面端按钮本身 display:none，这时表单也不会占一个 flex 项（否则会多出一个 gap）。 */
.bh-header__logoutform {
    display: contents;
    margin: 0;
}

button.bh-header__logout {
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
}

/* ==========================================================================
   榜单筛选 · 无刷新状态（2026-12）
   --------------------------------------------------------------------------
   请求期间结果区半透明 + progress 光标；筛到空区间时给一块就地提示，
   避免「点了没反应」的错觉。样式只作用于带 data-rank-* 钩子的容器。
   ========================================================================== */

[data-rank-grid][aria-busy="true"],
#rankBody[aria-busy="true"] {
    opacity: .45;
    transition: opacity .18s ease;
}

[data-rank-grid][aria-busy="true"],
#rankBody[aria-busy="true"] {
    cursor: progress;
}

.bh-block__empty {
    margin: 0;
    padding: 30px 0;
    text-align: center;
    font-size: 13px;
    color: var(--bh-text-muted);
}

/* 已选中的筛选项不再有「可点」反馈，避免误以为可以再点一次 */
.bh-seg__item.is-active,
.bh-filter__item.is-active {
    cursor: default;
}

/* ==========================================================================
   二级页标题区节奏（以「图书馆」为基准）
   --------------------------------------------------------------------------
   创作管理 / 创作工具 / 导出下载 / 图书馆 共用同一套 .bh-pagehead：
     标题 26px，标题→说明 12px，说明→纸面底边 17px（行高 1.7 + 16px 下内边距）。
   这些覆盖值必须留在 home.css，否则 layout_workbench 不加载 site-content.css，
   标题与说明会挤成 6px、底边只剩 1px。
   ========================================================================== */
.bh-pagehead__title {
    margin-bottom: 12px;
}

.bh-pagehead__desc {
    line-height: 1.7;
}

.bh-pagehead__row {
    padding-bottom: 16px;
}

/* 标题区右侧的次要操作（如「返回创作管理」），与 .bh-pagehead__count 同一落点 */
.bh-pagehead__more {
    flex-shrink: 0;
    padding-bottom: 4px;
    font-size: var(--bh-fs-xs);
    color: var(--bh-text-muted);
    text-decoration: none;
}

.bh-pagehead__more:hover {
    color: var(--bh-primary);
}

/* 标题纸带之后的第一块内容：与图书馆的 .bh-lib__filter 一样留 18px */
.bh-pagehead + .bh-wb,
.bh-pagehead + .bh-ex {
    padding-top: 18px;
}

/* 标题纸带之后：列表 / 榜单 / 分类 / 频道三栏，统一 18px 起版 */
.bh-pagehead + .bh-list,
.bh-nv-hero + .bh-list__cols {
    padding-top: 18px;
}
