@charset "utf-8";
/*
 * 首页（index.php）专属样式
 * ============================================================
 * 设计语言完全复刻 template/css/torrents.css，让首页与种子列表页
 * 视觉无缝衔接：磨砂玻璃卡片、暖焦糖文字、米色软胶囊、16px 大圆角、
 * 冷灰蓝柔和投影。
 *
 * 所有规则都用 body.page-index 前缀限定作用域，不会污染其它页面，
 * 也不会触碰：
 *   - 顶部 banner   (.site-head--with-banner / .site-hero-banner*)
 *   - 顶部主菜单    (#mainmenu / .menu / .ddlevelsmenu*)
 *   - 个人信息栏    (.userdetails / 头像/积分行)
 *   - SQL 调试面板  (#sql_debug / Redis key 列表)
 *
 * 同时也兼容 stdhead() 注入的 :root --site-shell-max-width / --site-content-inline-gap。
 */

/* ===================================================================
 * 1. 板块卡片（替代旧式 <h2> 橙色横条 + <table border="1"> 直角实线）
 * =================================================================== */
body.page-index .index-card {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    padding: 14px 18px 16px;
    margin: 0 0 16px 0;
    border: 1px solid rgba(220, 227, 236, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 8px 20px rgba(49, 66, 96, 0.045),
                0 2px 6px rgba(49, 66, 96, 0.025);
    box-sizing: border-box;
}

body.page-index .index-home-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
/* index-home-sections 内部用 gap:16px 分隔各板块，但它结束后紧跟的
 * 投票/趣味盒等行是它的兄弟节点（margin-top:0），会与 TMDB 推荐贴在一起。
 * 补一条相邻兄弟规则，让其延续同样的 16px 纵向节奏。
 * 注意：.index-grid 自带 margin:0 0 16px（会把 margin-top 归零），
 * 故这里需显式列出 .index-grid 以提高优先级，否则被覆盖。 */
body.page-index .index-home-sections + .index-grid,
body.page-index .index-home-sections + * {
    margin-top: 16px;
}
body.page-index .index-home-section {
    display: block;
}
body.page-index .index-home-sections > .index-card,
body.page-index .index-home-section > .index-card {
    margin-bottom: 0;
}

/* 首页整体必须完整展示，不能让内部横滑列表把 mainouter / outer 撑出整页横滚。
 * 横向滚动只允许发生在资源卡片列表自身。 */
body.page-index,
body.page-index .site-mainouter.site-mainouter--with-banner,
body.page-index table.mainouter,
body.page-index .site-mainouter.site-mainouter--with-banner > tbody,
body.page-index table.mainouter > tbody,
body.page-index .site-mainouter.site-mainouter--with-banner > tbody > tr,
body.page-index table.mainouter > tbody > tr,
body.page-index .site-mainouter.site-mainouter--with-banner > tbody > tr > td,
body.page-index table.mainouter > tbody > tr > td {
    max-width: 100%;
    min-width: 0 !important;
    box-sizing: border-box;
}

body.page-index .site-mainouter.site-mainouter--with-banner > tbody > tr > td#outer,
body.page-index table.mainouter > tbody > tr > td#outer {
    overflow-x: visible;
    overflow-wrap: anywhere;
}

body.page-index .index-card:last-child {
    margin-bottom: 0;
}

body.page-index .index-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 12px 0;
    padding: 0 0 11px 0;
    border-bottom: 1px solid rgba(210, 221, 234, 0.72);
}

body.page-index .index-card__title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 700;
    color: #5f4e3e;
    letter-spacing: 0.02em;
    line-height: 1.45;
    background: transparent;
    border: none;
}
body.page-index .index-card__title::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 999px;
    background: rgba(157, 129, 96, .48);
}

body.page-index .index-card__title-aux {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #978878;
    letter-spacing: 0.04em;
}

body.page-index .index-card__actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* 米色软胶囊：与 torrents.css 的 .torrent-front-filter-result 同族 */
body.page-index .index-card__action-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    color: #8a5518 !important;
    text-decoration: none !important;
    background: rgba(255, 247, 235, 0.9);
    border: 1px solid rgba(229, 214, 191, 0.75);
    border-radius: 999px;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

body.page-index .index-card__action-link:hover,
body.page-index .index-card__action-link:focus {
    color: #7a572d !important;
    background: #fff7eb;
    border-color: rgba(208, 186, 152, 0.92);
    outline: none;
}

body.page-index .index-card__body {
    max-width: 100%;
    min-width: 0;
    color: #4d4030;
    font-size: 13px;
    line-height: 1.6;
}

/* -------------------------------------------------------------------
 * 1.1 迷你卡片（空数据占位用，单行小高度）
 *     用于"近期热门影视/动漫"等没有内容时的轻量提示，避免空数据卡片
 *     占据近 110px 的首屏黄金位置。
 * ------------------------------------------------------------------- */
body.page-index .index-card.index-card--mini {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin: 0 0 10px 0;
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.7);
    border: 1px dashed rgba(220, 207, 184, 0.7);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    font-size: 11px;
    line-height: 1.4;
}
body.page-index .index-card.index-card--mini .index-card--mini__label {
    font-weight: 600;
    color: #8a5518;
    letter-spacing: 0.02em;
}
body.page-index .index-card.index-card--mini .index-card--mini__sep {
    color: #cf994e;
    font-weight: 700;
}
body.page-index .index-card.index-card--mini .index-card--mini__hint {
    color: #978878;
}

/* ===================================================================
 * 2. 网格布局（自适应宽度：足够宽时 2/3 列，窄时自动折回单列）
 * =================================================================== */
body.page-index .index-grid {
    display: grid;
    gap: 16px;
    margin: 0 0 16px 0;
    align-items: start;
}

/* 双列：左 65% / 右 35%（场景：信息密集左 + 信息稀疏右） */
body.page-index .index-grid--two {
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 0.95fr);
}
@media (max-width: 1100px) {
    body.page-index .index-grid--two {
        grid-template-columns: 1fr;
    }
}

/* 等分双列：左 50% / 右 50%（场景：投票 + 趣味盒，重要性相当） */
body.page-index .index-grid--two-equal {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 980px) {
    body.page-index .index-grid--two-equal {
        grid-template-columns: 1fr;
    }
}

/* 三列：自适应（趣味盒 + 投票 + 关键统计） */
body.page-index .index-grid--three {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* 让卡片在网格中撑满高度，对齐边缘 */
body.page-index .index-grid > .index-card {
    margin-bottom: 0;
    height: 100%;
}

/* ===================================================================
 * 3. 空状态
 * =================================================================== */
body.page-index .index-empty {
    text-align: center;
    color: #b6aa9b;
    padding: 28px 12px;
    font-size: 12px;
    line-height: 1.6;
}
body.page-index .index-empty a {
    color: #cf994e;
    text-decoration: underline;
}
body.page-index .index-empty a:hover {
    color: #7a572d;
}

/* ===================================================================
 * 4. 最近新闻 .index-news
 * =================================================================== */
body.page-index .index-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.page-index .index-news-item {
    padding: 10px 0;
    border-bottom: 1px dashed rgba(220, 227, 236, 0.6);
}
body.page-index .index-news-item:first-child { padding-top: 0; }
body.page-index .index-news-item:last-child  { border-bottom: 0; padding-bottom: 0; }
body.page-index .index-news-item:has(.index-news-item__title a > img.minus) {
    padding-bottom: 12px;
    border-bottom-color: rgba(214, 222, 233, 0.86);
}

body.page-index .index-news-item__head {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 8px 10px;
    margin: 0 0 6px 0;
}
body.page-index .index-news-item__date {
    font-size: 11px;
    color: #978878;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-align: right;
}
body.page-index .index-news-item__title {
    min-width: 0;
}
body.page-index .index-news-item__title a {
    color: #4d4030 !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.16s ease;
}
body.page-index .index-news-item__title a:hover { color: #7a572d !important; }

body.page-index .index-news-item__title a {
    font-size: 12.5px;
}

body.page-index .index-news-item__title-icon {
    display: inline-block;
    width: 0;
    height: 0;
    margin: 0 5px 1px 1px;
    border: 4px solid transparent;
    vertical-align: middle;
    border-left-color: #b99a73;
    transform: rotate(0);
    transition: transform 0.16s ease;
}
body.page-index .index-news-item__title a > img.minus + .index-news-item__title-icon {
    transform: rotate(90deg);
}

body.page-index .index-news-item__body {
    color: #625649;
    font-size: 12.5px;
    line-height: 1.68;
    margin: 6px 0 0 0;
    padding: 8px 12px 9px 16px;
    background: linear-gradient(90deg, rgba(255, 250, 243, .64), rgba(255, 250, 243, .32));
    border: 1px solid rgba(226, 214, 198, .30);
    border-radius: 7px;
}
body.page-index .index-news-item__body p { margin: 4px 0; }

body.page-index .index-news-item__manage {
    display: inline-flex;
    gap: 6px;
    margin-left: 0;
}
body.page-index .index-news-item__manage a {
    font-size: 10px;
    color: #978878 !important;
    text-decoration: none !important;
    padding: 1px 6px;
    border-radius: 4px;
    transition: color 0.16s ease, background 0.16s ease;
}
body.page-index .index-news-item__manage a:hover {
    color: #7a572d !important;
    background: rgba(255, 247, 235, 0.9);
}

/* ===================================================================
 * 5. 热门影视 / 动画资源卡
 *
 * 布局：横向滚动条，所有卡片在同一行，超出可左右滑（原来是 grid 自动换行多行）。
 *      - 滚动条样式细瘦 + 米色调，融入卡片整体设计
 *      - scroll-snap-type: x mandatory 让用户拖动后自动对齐到下一张卡的边缘
 *      - overscroll-behavior-x: contain 阻止 swipe 触发浏览器返回前一页
 *      - touch / 触控板原生横滑均可工作，无需额外 JS
 * =================================================================== */
body.page-index .index-hot-resource-grid,
body.page-index .index-latest-resource-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    /* 上 6px：留给卡片 hover 时的 translateY(-1px) + 顶部箭头/光晕；
     * 下方留出滚动条空间；左右不再用负 margin，避免把内容推出首页外框。 */
    padding: 6px 4px 12px;
    margin: 0;
    /* 鼠标滚轮是连续小步滚动，启用 snap 会在滚轮停下后把卡片吸回去；
     * 触控设备在下方 media 中再打开吸附。 */
    scroll-snap-type: none;
    scroll-padding-inline: 4px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    /* 原生滚动条始终隐藏，避免 hover 时浏览器为滚动条重新分配布局空间。 */
    scrollbar-width: none;
}

/* 方案2 后海报满幅露出、相邻封面实色边缘直接相贴，12px 偏挤；
 * 海报墙单独放宽到 16px（≈海报宽 9%），更接近主流影视墙的留白。
 * 仍能一行放下同样数量的卡片。横向宽卡（latest）维持 12px 不变。 */
body.page-index .index-hot-resource-grid {
    gap: 16px;
}

body.page-index .index-hot-resource-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: auto;
    padding: 2px;
    border: 1px solid rgba(220, 207, 184, .64);
    border-radius: 999px;
    background: rgba(255, 252, 247, .68);
}

body.page-index .index-hot-resource-tabs__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #9b8b78;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

body.page-index .index-hot-resource-tabs__button em {
    font-style: normal;
    color: #b7aa9a;
    font-size: 10px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

body.page-index .index-hot-resource-tabs__button:hover,
body.page-index .index-hot-resource-tabs__button:focus-visible {
    color: #7a572d;
    background: rgba(255, 247, 235, .72);
    outline: none;
}

body.page-index .index-hot-resource-tabs__button.is-active {
    color: #7a572d;
    background: rgba(255, 247, 235, .96);
    box-shadow: 0 1px 3px rgba(49, 66, 96, .08);
}

body.page-index .index-hot-resource-tabs__button.is-active em {
    color: #a9804f;
}

body.page-index .index-card--douban-recommend .index-hot-resource-tabs,
body.page-index .index-card--tmdb-recommend .index-hot-resource-tabs {
    flex-wrap: wrap;
    border-radius: 12px;
}

body.page-index .index-card--douban-recommend .index-hot-resource-tabs__button,
body.page-index .index-card--tmdb-recommend .index-hot-resource-tabs__button {
    padding-inline: 8px;
}

body.page-index .index-hot-resource-panel[hidden] {
    display: none !important;
}

body.page-index .index-hot-resource-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 210px;
    padding: 16px;
    border: 1px dashed rgba(220, 207, 184, .68);
    border-radius: 12px;
    color: #b6aa9b;
    background: rgba(255, 252, 247, .38);
    font-size: 12px;
}

body.page-index .index-hot-resource-grid::-webkit-scrollbar,
body.page-index .index-latest-resource-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
@media (hover: hover) and (pointer: fine) {
    body.page-index .index-hot-resource-grid,
    body.page-index .index-latest-resource-grid {
        cursor: grab;
        scrollbar-width: none;
    }
    body.page-index .index-card--has-scroll:hover .index-hot-resource-grid,
    body.page-index .index-card--has-scroll:hover .index-latest-resource-grid,
    body.page-index .index-card--has-scroll:focus-within .index-hot-resource-grid,
    body.page-index .index-card--has-scroll:focus-within .index-latest-resource-grid {
        scrollbar-width: none;
    }
    body.page-index .index-hot-resource-grid::-webkit-scrollbar,
    body.page-index .index-latest-resource-grid::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
    body.page-index .index-hot-resource-grid::-webkit-scrollbar-thumb:hover,
    body.page-index .index-latest-resource-grid::-webkit-scrollbar-thumb:hover {
        background: rgba(184, 122, 58, 0.54);
    }
    body.page-index .index-hot-resource-grid a,
    body.page-index .index-latest-resource-grid a {
        cursor: pointer;
    }
    body.page-index .index-hot-resource-grid.is-dragging,
    body.page-index .index-latest-resource-grid.is-dragging,
    body.page-index .index-hot-resource-grid.is-wheel-scrolling,
    body.page-index .index-latest-resource-grid.is-wheel-scrolling {
        cursor: grabbing;
        scroll-snap-type: none;
        user-select: none;
    }
    body.page-index .index-hot-resource-grid.is-dragging *,
    body.page-index .index-latest-resource-grid.is-dragging * {
        cursor: grabbing !important;
        user-select: none;
    }
}

@media (hover: none) {
    body.page-index .index-hot-resource-grid,
    body.page-index .index-latest-resource-grid {
        scroll-snap-type: x proximity;
    }
}

/* —— 横向滚动 卡片 + 左右按钮 + 边缘渐隐 ——
 *
 * 关键：把按钮挂在 .index-card（section 自身）下面，而不是 .index-card__body 里。
 * 原因：.index-card__body 的子级里包含 display:flex; overflow-x:auto 的 grid，
 *      在 grid 父级 / flex 父级 / 普通块级父级里都会触发"min-content 撑大"
 *      （browsers compute parent box width 包括 grid scrollWidth 的副作用），
 *      导致 right:-2px 的按钮被推到 1500px+ 的屏幕外。
 *      .index-card 是已确定 position:relative + 已被 .container 锁定宽度的元素，
 *      把按钮挂这里位置就 100% 稳定。
 *
 * mask-image 仍只放在 .index-hot/-latest-resource-grid 上，按钮不被淡化。 */
body.page-index .index-latest-resource-grid {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}

/* 近期热门 / 豆瓣 · TMDB 推荐：去掉最左侧虚化，仅保留最右侧渐隐，
 * 让首张海报左边缘完整清晰，右边缘仍提示"可横向滚动"。 */
body.page-index .index-hot-resource-grid {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 14px), transparent 100%);
            mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 14px), transparent 100%);
}

body.page-index .index-card--has-scroll .index-card__body {
    position: relative;
}

body.page-index .index-card--has-scroll .index-card__body::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 56px;
    pointer-events: none;
    z-index: 8;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0),
        rgba(255, 252, 247, 0.5) 58%,
        rgba(255, 252, 247, 0.78)
    );
}

body.page-index .index-scroll-progress {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: -4px;
    height: 3px;
    pointer-events: none;
    z-index: 9;
    border-radius: 999px;
    background: rgba(184, 122, 58, 0.10);
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.18s ease;
}

body.page-index .index-scroll-progress__thumb {
    display: block;
    width: 28px;
    height: 100%;
    border-radius: inherit;
    background: rgba(184, 122, 58, 0.46);
    transition: transform 0.12s ease-out, width 0.12s ease-out;
}

body.page-index .index-card--has-scroll:hover .index-scroll-progress:not([data-disabled]),
body.page-index .index-card--has-scroll:focus-within .index-scroll-progress:not([data-disabled]) {
    opacity: 1;
}

body.page-index .index-scroll-nav {
    /* 相对 .index-card 定位：
     *   top  按 grid 行高度估算，居中对齐到第一行卡片中段（约 head 高 50px + 卡片
     *        110px 一半 = ~95px）。具体值 100px 是肉眼校准后写死的，跟卡片高度
     *        变化（如响应式）保持手感一致；如要精确居中可换 transform 方案。 */
    position: absolute;
    top: 148px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(220, 227, 236, 0.85);
    border-radius: 50%;
    background: rgba(255, 252, 247, 0.96);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(49, 66, 96, 0.18), 0 1px 4px rgba(49, 66, 96, 0.08);
    color: #7a572d;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    /* z-index 必须高于 NexusPHP 主表 layout 的 td（td 在 stacking context 顶层覆盖按钮，
     * 导致 click 被 intercepted by td）。给一个大值彻底压过表格层。 */
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, background 0.16s ease, transform 0.16s ease;
}
body.page-index .index-scroll-nav--prev { left: 4px; }
body.page-index .index-scroll-nav--next { right: 4px; }

/* 鼠标进入横滑卡片区域时才显示左右按钮；键盘聚焦时也显示，避免不可达。 */
body.page-index .index-card--has-scroll:hover .index-scroll-nav:not([data-disabled]),
body.page-index .index-card--has-scroll:focus-within .index-scroll-nav:not([data-disabled]) {
    opacity: 1;
    pointer-events: auto;
}
body.page-index .index-scroll-nav:hover {
    background: #fff7eb;
    transform: scale(1.06);
}
body.page-index .index-scroll-nav:active {
    transform: scale(0.96);
}

/* 边界禁用：到达左/右尽头时该侧按钮彻底隐藏（JS 加 [data-disabled] 触发） */
body.page-index .index-scroll-nav[data-disabled] {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 移动端（无 hover）：按钮常驻 70% 不透明 + 缩小一档，方便手指点 */
@media (hover: none) {
    body.page-index .index-scroll-nav:not([data-disabled]) {
        opacity: 0.7;
        pointer-events: auto;
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
}

body.page-index .index-hot-resource {
    --index-hot-poster-width: 140px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "poster"
        "content";
    row-gap: 9px;
    justify-items: stretch;
    /* 当 flex 行被某张视口外占位卡（content-visibility 占位尺寸）撑高时，默认
     * align-content:stretch 会把多余空间均摊到 grid 行，让 poster→title 之间出现
     * 一截肉眼可见的空白；align-content:start 让两行始终贴顶，多余空间留到卡片
     * 底部（不影响视觉节奏）。 */
    align-content: start;
    /* 竖版豆瓣条目卡：海报是主视觉，文案下沉到海报下方，横滑时一屏可露出更多条目。 */
    flex: 0 0 190px;
    min-width: 0;
    padding: 13px;
    /* 横向 scroll 列表中每板块 20-30 张卡，一屏只露 6-8 张，其余在视口右侧。
     * content-visibility:auto 让浏览器跳过视口外卡片的样式/布局/绘制；
     * contain-intrinsic-size 提供占位尺寸（auto 让首次渲染后缓存真实尺寸），
     * 避免横向滚动时滚动条跳变。
     * box-sizing 默认 content-box，下面给的是"内容区"高度（不含 padding/border）：
     *   海报(140×412/296≈195) + row-gap(9) + 标题(≈18) + content gap(2)
     *   + meta(line-height 20) ≈ 247px → 外框 ≈ 247 + padding 26 + border 2 = 275
     * 这样占位卡片与已渲染卡片高度一致，flex 行不会被某张占位卡片拉高。
     * 早先误用 290 / 256 时，flex 行被多余 30+ px 撑高，align-content:stretch 把
     * 这部分摊到 poster→title 之间，肉眼可见地把豆瓣推荐卡片缝隙拉大；现已加上
     * align-content:start 兜底，但占位尺寸仍尽量贴近真实高度，避免滚动条跳变。 */
    content-visibility: auto;
    /* 2:3 海报：140 → 210，内容区 ≈ 210 + row-gap 9 + 评分行 ~22 + 标题 18 + gap 2 + meta 20 ≈ 281 */
    contain-intrinsic-size: auto 190px auto 281px;
    border: 1px solid rgba(214, 222, 233, 0.72);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 250, 242, 0.68)),
        rgba(255, 252, 247, 0.74);
    box-shadow: 0 10px 26px rgba(49, 66, 96, 0.055), 0 2px 8px rgba(49, 66, 96, 0.035);
    transition: border-color 0.24s ease, background-color 0.24s ease, box-shadow 0.28s ease, transform 0.32s cubic-bezier(.22, .61, .36, 1);
    scroll-snap-align: start;
    color: inherit;
    text-decoration: none !important;
    cursor: pointer;
}

body.page-index .index-hot-resource > .index-hot-resource__poster   { grid-area: poster; }
body.page-index .index-hot-resource > .index-hot-resource__content  { grid-area: content; }

body.page-index .index-hot-resource:hover {
    border-color: rgba(203, 180, 146, 0.94);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 235, 0.82)),
        rgba(255, 247, 235, 0.86);
    box-shadow: 0 16px 34px rgba(49, 66, 96, 0.10), 0 5px 14px rgba(184, 122, 58, 0.08);
    transform: translateY(-2px);
}

body.page-index .index-hot-resource__poster {
    position: relative;
    display: block;
    justify-self: center;
    width: var(--index-hot-poster-width);
    /* 海报统一为主流影视墙的 2:3 竖版比例（与 TMDB / Netflix 一致），用 object-fit:cover
     * 裁掉源图 296:412 多出的少量两侧，换取整排海报顶/底对齐的整齐网格。
     * 不再单独写 height，由 aspect-ratio 反推（140 → 210px / 170 → 255px）。 */
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(244, 247, 251, 0.7);
    border: 1px solid rgba(126, 103, 74, 0.16);
    box-shadow: 0 8px 18px rgba(49, 66, 96, 0.16), 0 2px 6px rgba(49, 66, 96, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

/* 只覆盖海报"直接子"的 img（真海报本体），避免被 .index-card-promo 内
 * 的 sprite 小图（pro_free / pro_2up 等 36×11）继承到 100% × 100% 撑爆。 */
body.page-index .index-hot-resource__poster > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.035) saturate(1.025);
    transition: transform 0.34s cubic-bezier(.22, .61, .36, 1), filter 0.34s ease;
}

body.page-index .index-hot-resource:hover .index-hot-resource__poster > img {
    filter: contrast(1.055) saturate(1.06);
    transform: scale(1.025);
}

body.page-index .index-hot-resource__poster-year {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 1px 5px;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 6px;
    background: rgba(58, 45, 31, .34);
    -webkit-backdrop-filter: blur(3px) saturate(1);
            backdrop-filter: blur(3px) saturate(1);
    box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
    color: rgba(255, 248, 237, .82);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: .01em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
    font-variant-numeric: tabular-nums;
}

/* —— 海报右上角合并角标 ——
 * 把"电影 / 剧集"与年份合并到一颗胶囊（"电影 · 2026"），放在右上角（沿用原年份角标位置）：
 *   - 海报左上角常被标题 / logo / 主角脸部占据，右上角通常是天空 / 渐变 / 背景，
 *     放右上角不撞海报主视觉
 *   - 与原年份徽章定位一致，老用户视觉记忆延续
 *   - pointer-events:none → grid click 兜底走 elementFromPoint 时穿透到 <a>
 *   - z-index:3 与促销 pill 同层
 *
 * 覆盖：
 *   - 热门 / 豆瓣 / TMDB 推荐  → .index-hot-resource__poster
 *   - 最新上传              → .index-latest-resource__poster（无年份，仍只显示类型）
 */
body.page-index .index-card__media-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 5px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 4px;
    -webkit-backdrop-filter: blur(3px) saturate(1);
            backdrop-filter: blur(3px) saturate(1);
    box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
    color: rgba(255, 248, 237, .9);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
    background: rgba(40, 32, 28, .42);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* 电影 → 偏暖（红褐）；剧集 → 偏冷（藏青）。
 * 透明度都压在 .4 附近，仅作色相区分，不增加视觉重量。 */
body.page-index .index-card__media-badge--movie {
    background: rgba(120, 50, 38, .42);
    border-color: rgba(255, 200, 180, .28);
}
body.page-index .index-card__media-badge--tv {
    background: rgba(36, 58, 96, .42);
    border-color: rgba(180, 200, 240, .28);
}
/* 仅年份的兜底胶囊（type 拿不到时）：用与年份角标一致的中性配色，不带冷暖色 */
body.page-index .index-card__media-badge--year-only {
    background: rgba(58, 45, 31, .34);
    border-color: rgba(255, 255, 255, .38);
}

body.page-index .index-hot-resource__content {
    width: var(--index-hot-poster-width);
    min-width: 0;
    justify-self: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

body.page-index .index-hot-resource__title {
    display: block;
    min-width: 0;
    color: #2f2517 !important;
    text-decoration: none !important;
}

body.page-index .index-hot-resource:hover .index-hot-resource__title-head,
body.page-index .index-hot-resource__title:hover .index-hot-resource__title-head {
    color: #7a572d;
}

body.page-index .index-hot-resource__media-meta {
    color: #6f6256;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .02em;
    line-height: 1.5;
    -webkit-line-clamp: 1;
            line-clamp: 1;
}

body.page-index .index-hot-resource__subtitle-line,
body.page-index .index-latest-resource__subtitle-line {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
            line-clamp: 4;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    line-height: 20px;
    overflow-wrap: anywhere;
}

body.page-index .index-hot-resource__subtitle-line.index-hot-resource__media-meta {
    -webkit-line-clamp: 1;
            line-clamp: 1;
}

body.page-index .index-hot-resource__descr,
body.page-index .index-latest-resource__descr {
    display: inline;
    padding: 2px;
    color: #1f120a;
    font-size: 12px;
    line-height: 20px;
    white-space: normal;
}

body.page-index .index-hot-resource__tags,
body.page-index .index-latest-resource__tags {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px 4px;
    min-width: 0;
    max-width: 100%;
    margin-right: 4px;
    vertical-align: baseline;
}

/* 卡片内 tag 缩小并弱化一档：字号 / 字重 / 色彩都低于标题，避免抢走主信息焦点。
 * 仅覆写首页热门/最新卡片内的 .tags，torrents.php / details.php / 论坛等其他位置
 * 的 .tags 仍保持原 11px 标准尺寸，不会被殃及。 */
body.page-index .index-hot-resource__tags span.tags,
body.page-index .index-latest-resource__tags span.tags {
    margin: 0;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0 4px;
    min-height: 13px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: .2px;
    border-radius: 3px;
    opacity: .86;
    box-shadow: none;
    /* —— 卡内 tag 二次降饱和 ——
     * 全站 custom.css 已对 span.tags 叠了 filter: saturate(0.5) brightness(1.07) contrast(1.05)，
     * 但卡片是"主标题 + 海报"为主角的高密度信息单元，0.5 仍然让 粤语(#f66) / 中字(#9c0) / 应求(#f90)
     * 等暖色相在卡里"跳"，把视觉焦点从标题拽走。
     *
     * 这里在卡内（也只在卡内）再压一档：
     *   - saturate 0.5 → 0.20：色相继续后退，所有 tag 只保留轻量分类提示
     *   - brightness 1.07 → 1.04：低饱和后略补亮，避免色块显脏
     *   - contrast 1.05 → 0.98：降低边界锐度，让 tag 融入副标题行
     *
     * filter 不会与外层规则合并（CSS 规则：同属性新值整体替换），所以必须把全套写完整。
     * 选择器特异度 (0,3,2) 高过全站 span.tags:hover (0,2,1)，hover 也会沿用此值；
     * 卡内 tag 不需要单独 hover 反馈（用户实际 hover 的是整张卡链接），故不再单独写 :hover。 */
    filter: saturate(0.20) brightness(1.04) contrast(0.98);
}

/* ===================================================================
 * 5.5 卡片共享：评分行 + 统计行
 *      .index-card-ratings / .index-card-stats 两段卡片（热门 + 最新）共用，
 *      由 helper index_card_ratings() / index_card_stats() 渲染产出。
 *      改一处，热门和最新同步生效。
 * =================================================================== */

/* —— 评分行：每个评分一个圆角小胶囊 ——
 * 胶囊紧凑化（小 logo + 小字号 + 小 padding），保证 4 项（豆瓣/IMDb/RT/MC）能在 footer
 * 一行内并列展示而不换行；空间真不够时（极窄屏）才允许 wrap。
 * 配色按 source 分：豆瓣=绿 / IMDb=金 / RT=红 / MC=紫，一眼可识别 source。 */
body.page-index .index-card-ratings {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 4px;
    min-width: 0;
}
body.page-index .index-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 5px 1px 4px;
    border-radius: 4px;
    background: rgba(122, 87, 45, .08); /* 中性 fallback：未识别 source 时仍是米色调胶囊 */
    color: #6b5743;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .1px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
body.page-index .index-card-rating img {
    display: block;
    flex-shrink: 0;
}

/* 4 种评分来源各自的色相（淡底 + 同色相高饱和文字） */
body.page-index .index-card-rating--douban { background: rgba( 46, 139,  87, .12); color: #2e8b57; }
body.page-index .index-card-rating--imdb   { background: rgba(217, 165,  12, .14); color: #b08410; }
body.page-index .index-card-rating--rt     { background: rgba(217,  60,  30, .12); color: #c63b1f; }
body.page-index .index-card-rating--mc     { background: rgba(106,  27, 154, .12); color: #6a1b9a; }
body.page-index .index-card-rating--tmdb   { background: rgba(  1, 180, 228, .14); color: #007da3; }

/* —— 方案2：评分下移到海报下方的卡片正文（浅色 chip 行）——
 * 评分块改由 PHP 渲染进 .index-hot-resource__content 的首位（海报与标题之间），
 * 复用 §5.5 的浅底彩字 chip 基样，不再压在海报上。单行排布 + 收紧 chip，
 * 让 4 项评分在 170px 卡宽下也能一行放下，保持同排卡片标题基线对齐。 */
body.page-index .index-card__body-ratings {
    margin: 1px 0 4px;
    min-width: 0;
    /* 始终占位一行评分高度（即便该卡无评分），让同排卡片的标题基线对齐 */
    min-height: 19px;
}
body.page-index .index-card__body-ratings .index-card-ratings {
    flex-wrap: nowrap;
    gap: 6px;
    overflow: hidden;
}
/* 去掉底色框：评分来源已由 logo 色标 + 彩色数字（§5.5 各 source 的 color）承担识别，
 * 不再叠淡色胶囊底 + 描边。仅覆盖 background/border（color 保留），用 gap 控制项间距，
 * 整行更轻、降噪，与海报/标题不抢视觉。 */
body.page-index .index-card__body-ratings .index-card-rating {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

/* 单位（目前只有 RT 的 "%"）：作为"角标"处理而非主信息。
 * - font-size .7em：字号比数字小一档（约 7px @10px 父级）
 * - transform: scaleX(.8) 水平压扁 20%，让 % 字符宽度再缩，整体更"角标化"
 * - inline-block + transform-origin: left 让缩放从左侧锚定，不会跟数字之间额外留白
 * - 渲染后占位 inline-block 的逻辑宽度仍按未缩放算，多余的视觉空白用 margin-right 负值抵消
 * - opacity .85 进一步弱化，主次清晰 */
body.page-index .index-card-rating__unit {
    display: inline-block;
    font-size: .7em;
    font-weight: 600;
    margin-left: 0;
    margin-right: -0.14em;     /* ≈ scaleX(.8) 缩掉的视觉宽度 (.7em × .2)，避免后随空白 */
    transform: scaleX(0.8);
    transform-origin: left center;
    opacity: .85;
}

/* —— 统计行：分两组 ——
 *   .is-meta（时间 / 大小）= 灰色细文字 + · 分隔，无图标，作为弱化的基础元数据
 *   .is-flow（做种 / 下载 / 完成）= 图标 + 绿/红/中性，作为强化的流量数据 */
body.page-index .index-card-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    min-width: 0;
    color: #6b5743;
    font-size: 11px;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

/* —— stats-line：标签下方的紧凑统计行（替代旧的独立 footer） ——
 * 灰字 / 小字号 / 紧凑 gap，与上方标签视觉分层；右侧 mask 渐隐避免溢出难看。
 * 整张卡现在是单一 2 列 grid（poster | content），所有内容堆在 content 列里，
 * 不再跨行；海报视觉与文本流自然贴合，卡片高度也不再被 footer 撑高。 */
body.page-index .index-card-stats-line {
    display: flex;
    align-items: center;
    min-width: 0;
    margin-top: auto;     /* 在 content (display:flex column) 中下沉到底部 */
    /* padding-top 4 → 2px：column gap 已从 6 压到 4，
     * 这里再省 2px"段标"留白，避免与 column gap 叠加出隐形 8px 缝隙。
     * 留 2px 而非 0，是因为 stats 行字号(10.8) 比 subtitle(12) 小，
     * 完全贴上去 baseline 跳得明显，2px 给一个"差几像素的缓冲"刚好不刺眼。
     *
     * padding-bottom 2px：flow 字号从 10.8 → 12 后整行长高 ~2px，
     * 视觉上 stats 数字开始"踩到"卡片下边线；2px 对称留白把 baseline 抬一点，
     * 跟 padding-top 形成上下等距，stats 行落在卡片底部时不再贴边。 */
    padding-top: 2px;
    padding-bottom: 2px;
}
body.page-index .index-card-stats-line .index-card-stats {
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 3px 5px;          /* stat 之间略收紧；流量组降权后不再需要强分隔 */
    color: #6f6256;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.45;
    flex-wrap: nowrap;     /* 单行显示；分组对齐后总宽 ~199px < 可用 206px，正常不会溢出 */
    overflow: hidden;      /* 极端长数据（>206px）兜底硬截断，不再用 mask 渐隐
                              （旧 mask 会让最右流量项 ✓890 的末尾 8px 被淡化、反而更难读） */
}
body.page-index .index-card-stats-line .index-card-stat {
    flex: 0 0 auto;
    gap: 2px;
}
/* —— 分组对齐：元数据组（is-meta）贴左 / 流量组（is-flow）贴右 ——
 * stats 顺序固定为 [meta...meta][flow...flow]，所以"紧跟 is-meta 之后第一个 is-flow"就是
 * 流量组的入口点；给它一个 margin-left: auto 即可把整组推到 flex 容器右端，
 * 形成 "时间 · 大小 ⟶ 空白 ⟵ ↑405 ↓22 ✓890" 的二元对照。
 * 完全 CSS-only，PHP 端 stats 顺序不动；若未来加入第三组类型再扩展。
 *
 * 不再加竖线分隔：flow 组字号(12px) / 字重(700) / 彩色 已经与 meta 组(10.8px / 500 / 灰)
 * 有非常强的对比，再加竖线属于过度设计；margin-left:auto 推开的空白已是足够清晰的分组信号。 */
body.page-index .index-card-stats-line .index-card-stat.is-meta + .index-card-stat.is-flow {
    margin-left: auto;
}

/* —— 流量组（is-flow）轻量化 ——
 * 热门与最新上传共用同一套卡片结构；做种/下载/完成只保留轻微色相差，
 * 避免红绿数字抢走海报、标题和上传时间的第一视觉焦点。 */
body.page-index .index-card-stats-line .index-card-stat.is-flow {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .05px;
    color: #6f6256;
}
body.page-index .index-card-stats-line .index-card-stat.is-flow .index-card-stat__val {
    font-weight: 600;
}
body.page-index .index-card-stats-line .index-card-stat.is-flow .index-card-stat__icon {
    width: 9px;
    height: 11px;
    opacity: .82;
}

/* 中低饱和流量色只给图标；数字统一暖灰，减少一排彩色数字的噪点。 */
body.page-index .index-card-stats-line .index-card-stat.is-seeder .index-card-stat__icon    { color: #4c9f68; }
body.page-index .index-card-stats-line .index-card-stat.is-leecher .index-card-stat__icon   { color: #c06455; }
body.page-index .index-card-stats-line .index-card-stat.is-completed .index-card-stat__icon { color: #6388a5; }

/* —— 海报促销 overlay：右上角小贴纸 ——
 * 与底部评分 overlay 错开：促销 = 右上角实色胶囊（白字 + 实色背景 + 投影），
 * 评分 = 底部渐隐条上的白字。下载按钮 .__poster-dl 默认隐藏，hover 时从底部右侧
 * （评分上方）淡入，与右上角 promo 在 y 轴上完全错开，不会撞角。
 *
 * 设计取舍：
 *   - 用 absolute top:6px right:6px 而非 top-left：左上角通常被海报主体（人脸 / 标题）占据，
 *     右上角更"边缘安全"，不易盖到关键画面元素。
 *   - 内部 .index-card-promo-pill 在 white-bg（标题元信息行）下用淡彩底深字；在海报上
 *     反向：实色背景 + 白字 + 1px 阴影，确保任意亮度的海报上都能读清楚。
 *   - pointer-events: none 让点击穿透到 <a> 海报链接，与现有评分 overlay 行为一致。
 */
body.page-index .index-card__poster-promo {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    /* 多个 pill 暂不会出现（一张种子 sp_state 单值），但留 wrap 防御未来扩展 */
    flex-wrap: wrap;
    gap: 4px;
    max-width: calc(100% - 12px);
}

/* —— 海报底部右侧下载覆盖层（hover 渐进披露） ——
 * 默认完全透明 + pointer-events:none，hover 海报时从评分上方淡入，
 * 不抢"促销 pill (右上)"和"评分 overlay (底部)"两个常驻视觉的注意力。
 * 灵感：Netflix / B 站卡片的"hover 才出操作位"，让首屏静态形态保持简洁。
 *
 * 定位策略：必须作为 poster <a> 的 sibling（anchor 不能嵌套），由 PHP 在 article 内
 * 紧跟 poster <a> 之后插入。article 是 grid，通过 grid-area: poster + align-self:end +
 * justify-self:end 把按钮压到海报单元格的"底部右侧"；margin-bottom 32px 让出
 * 评分 overlay 的视觉范围（4 项评分 ≈ 30px、≤2 项 ≈ 26px），确保按钮始终"压"在
 * 评分上方而不与之叠字。
 *
 * 与 promo / ratings 不同，本元素是交互入口（href = download.php?id=X）：
 *   - 默认 pointer-events: none → 不挡海报点击（点击穿透到 <a> 跳详情页）
 *   - hover 整张 article（海报或文案任一区）即切到 pointer-events: auto
 *     → 鼠标从海报滑到按钮的过程中始终 clickable，不会因 hover 主体切换出现真空帧
 *   - z-index: 3 浮在 poster overlay (z-index 2) 与 poster <a> 之上，按钮 24×24 内捕获事件
 *
 * a11y：:focus-visible 触发同一显示规则，键盘 Tab 也能访问到下载入口。
 * 触屏：@media (hover: none) 兜底常驻，避免无 hover 设备完全丢失功能。
 */
body.page-index .index-card__poster-dl {
    grid-area: poster;          /* 与 .__poster <a> 同单元格，自然叠在海报之上 */
    align-self: end;            /* 底部对齐 */
    justify-self: end;          /* 右侧对齐 */
    /* margin-right:6 = 与评分 overlay 的左右 padding (5/6) 视觉对齐；
     * margin-bottom:32 = 让出评分 overlay 视觉范围（30px）+ 2px 视觉间距，
     *                    使按钮恰好"在评分上面一行"。 */
    margin: 0 6px 32px 0;
    z-index: 3;                 /* 高于 poster overlay (z-index 2) 与 poster <a> 自身 */
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    color: #fff;                /* 图标继承色 */
    /* 默认隐藏：opacity 0 + pointer-events none，不抢点击不占视觉。
     * opacity 用 .18s 比颜色/缩放(.14s)略长，渐显比 hover 反馈更"温柔"。 */
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, background-color .14s ease, transform .14s ease;
}

/* 显示触发：整张 article（海报 + 文案 + 按钮自身）被 hover 或按钮键盘 focus 时淡入。
 *
 * 为何用 article:hover descendant 而非 .__poster:hover ~ sibling：
 *   早期方案是 .__poster:hover ~ .__poster-dl，poster <a> 与 button <a> 平级时
 *   sibling combinator 在 hover 远程激活上是可行的，但存在指针落到按钮瞬间的
 *   "状态翻转 + hit-test"竞态：cursor 由 poster 滑入 button 那一帧，
 *     1) poster :hover 失活（hit-test 命中按钮）→ .__poster:hover ~ 规则不再匹配
 *     2) 同帧 .__poster-dl:hover 应当接力（按钮被自己 hover）
 *   两条规则并集理论上覆盖切换，但浏览器在 :hover 状态机切换 + 重新 hit-test
 *   的同一帧里，可能先把 pointer-events 短暂回落到 none，导致点击事件落到
 *   下层 poster <a>（href=details.php），用户感知"点了下载图标没反应、却跳到了详情"。
 *   改用 article 容器的 :hover 后，cursor 在 article 任意位置都让按钮保持
 *   pointer-events:auto，不存在 hover 主体切换的真空窗口。
 *
 * 同时保留 .__poster-dl:focus-visible 给键盘 Tab 用户兜底激活。 */
body.page-index .index-hot-resource:hover .index-card__poster-dl,
body.page-index .index-latest-resource:hover .index-card__poster-dl,
body.page-index .index-card__poster-dl:hover,
body.page-index .index-card__poster-dl:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

body.page-index .index-card__poster-dl:hover,
body.page-index .index-card__poster-dl:focus-visible {
    background: rgba(0, 0, 0, .78);
    transform: scale(1.08);     /* 微放大，强化"按下"反馈 */
    color: #fff;
    outline: none;
}
body.page-index .index-card__poster-dl .torrent-row-action-icon {
    /* 默认 16×16 → 13×13：圆形按钮 24×24 内留 5-6px 留白，图标视觉权重适中。 */
    width: 13px;
    height: 13px;
    font-size: 13px;
    color: inherit;             /* 跟随 .__poster-dl 的 #fff，不走全局 #9b958e */
    opacity: 1;                 /* 海报暗色背景下不能透明，否则在浅色海报区域几乎看不见 */
}
body.page-index .index-card__poster-dl:hover .torrent-row-action-icon,
body.page-index .index-card__poster-dl:focus-visible .torrent-row-action-icon {
    /* 中和 styles/custom.css 的全局 :hover { transform: translateY(-1px) scale(1.08) }：
     * 上层 .__poster-dl 自己已 scale(1.08)，再叠图标 transform 会双倍放大。 */
    transform: none;
    color: inherit;
}

/* 触屏设备：无 hover 概念，常驻显示避免功能不可达。
 * 仍保留半透明深色底，移动端用户可以一眼识别为可点。 */
@media (hover: none) {
    body.page-index .index-card__poster-dl {
        opacity: 1;
        pointer-events: auto;
    }
}

/* 移动端窄海报：92px / 78px 卡片下，24×24 按钮显得过大；按比例缩到 22 / 20。
 * 评分 overlay 在窄屏下高度也微缩，margin-bottom 同步收到 28 / 26，避免按钮浮太高。 */
@media (max-width: 1023px) {
    body.page-index .index-card__poster-dl {
        width: 22px;
        height: 22px;
        margin: 0 5px 28px 0;
    }
    body.page-index .index-card__poster-dl .torrent-row-action-icon {
        width: 12px;
        height: 12px;
        font-size: 12px;
    }
}
@media (max-width: 599px) {
    body.page-index .index-card__poster-dl {
        width: 20px;
        height: 20px;
        margin: 0 4px 26px 0;
    }
    body.page-index .index-card__poster-dl .torrent-row-action-icon {
        width: 11px;
        height: 11px;
        font-size: 11px;
    }
}

/* overlay 模式下的促销胶囊：把"白底 + 彩字"翻成"彩底 + 白字"，
 * 注意：只覆盖海报 overlay 上下文里的 pill，保留 white-bg 模式下原有配色（如未来标题行还要用）。
 *
 * 视觉调校（v2，针对全站统一促销时"一片色块"的反馈）：
 *   - 字号 10.5 → 10px、padding 2/7 → 1/6 → 贴纸尺寸缩 ~20%，让贴纸更"小标签"而不是"大徽章"
 *   - 实色背景 → 半透明 .85 + backdrop-filter blur(4px)：海报色透出一点点，
 *     得到"磨砂玻璃"质感，多张卡并排时不再像"一排彩色色块"那么密集
 *   - 去掉内描边（box-shadow inset white），半透明背景上 1px 白线显得脏
 *   - text-shadow 减弱到 1px，避免小字号下"双层重影"
 * 这里的 6 套色相与原 pill 文字色保持一致，色彩语言与列表/详情页 Free/2X/50% 一脉相承。 */
body.page-index .index-card__poster-promo .index-card-promo-pill {
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .25px;
    border: 1px solid rgba(255, 255, 255, .54);
    border-radius: 5px;
    text-shadow: none;
    box-shadow: 0 1px 3px rgba(49, 66, 96, .16);
    /* 浅色磨砂底 + 彩色字：比实色白字贴纸更轻，也避免多张海报并排时形成一排色块。 */
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
}

/* 海报促销标：统一浅底，靠文字色和淡描边区分促销类型。 */
body.page-index .index-card__poster-promo .index-card-promo-pill--free {
    color: #2f7d53;
    background: rgba(237, 247, 241, .9);
    border-color: rgba(92, 150, 113, .34);
}
body.page-index .index-card__poster-promo .index-card-promo-pill--2up {
    color: #a9583f;
    background: rgba(255, 242, 234, .9);
    border-color: rgba(184, 89, 59, .3);
}
body.page-index .index-card__poster-promo .index-card-promo-pill--free2up {
    color: #7a3ba0;
    background: rgba(248, 238, 252, .9);
    border-color: rgba(122, 59, 160, .3);
}
body.page-index .index-card__poster-promo .index-card-promo-pill--halfdown {
    color: #a45e13;
    background: rgba(255, 246, 231, .9);
    border-color: rgba(180, 99, 25, .3);
}
body.page-index .index-card__poster-promo .index-card-promo-pill--halfdown2up {
    color: #b45f25;
    background: rgba(255, 241, 230, .9);
    border-color: rgba(206, 91, 24, .3);
}
body.page-index .index-card__poster-promo .index-card-promo-pill--thirtypct {
    color: #9a5a21;
    background: rgba(255, 246, 234, .9);
    border-color: rgba(173, 78, 10, .28);
}

/* —— 海报评分 overlay：渐隐条 + 白字 ——
 * 海报底部 ~24-36px 区域叠一层暗色渐变（透明 → rgba(0,0,0,.82)），评分以白字 + logo + 阴影
 * 横排于其上；评分多于 2 项时允许在 92px 窄海报内 wrap 成两行。
 * 整层 pointer-events:none，确保点击穿透到外层 <a href="details.php?…"> 的海报跳转。 */
/* —— 方案1：海报底部「玻璃评分条」 ——
 * 把原先的大块黑渐变换成贴底的毛玻璃条：半透明深底 + backdrop blur，
 * 顶部一道内描白细线与海报图分隔；各评分项之间用 1px 短竖线分隔，像计分板。
 * logo 统一漂白成单色（见 §3070 img 规则），只让「数字」保留来源色 → 色彩从
 * 4 个 logo 收敛到 4 个数字一处，消掉「霓虹拼条」感的同时仍保留来源识别。 */
body.page-index .index-card__poster-ratings {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 4px 6px;
    background: rgba(16, 12, 9, .5);
    -webkit-backdrop-filter: blur(8px) saturate(1.15);
            backdrop-filter: blur(8px) saturate(1.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
    pointer-events: none;
    z-index: 2;
}
body.page-index .index-card__poster-ratings .index-card-ratings {
    display: contents;  /* 让内部 .index-card-rating 直接成为玻璃条的 flex 子元素 */
}

/* 评分项：透明胶囊（底色由玻璃条统一提供）+ 白 logo + 来源色数字 */
body.page-index .index-card__poster-ratings .index-card-rating {
    position: relative;
    flex: 0 0 auto;
    justify-content: center;
    background: transparent;
    color: #fff;
    padding: 1px 8px;
    border-radius: 0;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .7);
    gap: 2px;
    white-space: nowrap;
}

/* 4 项时空间最紧：四等分铺满 + 缩小项内边距/字号，保证单行不溢出 */
body.page-index .index-card__poster-ratings:has(.index-card-ratings--cnt-4) .index-card-rating {
    flex: 1 1 0;
    min-width: 0;
    padding: 1px 2px;
    font-size: 10px;
    gap: 1.5px;
}

/* 项间 1px 短竖线分隔（计分板感）：::before 绝对定位、仅取中段高度 */
body.page-index .index-card__poster-ratings .index-card-rating + .index-card-rating::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 11px;
    background: rgba(255, 255, 255, .22);
}

/* 数字按来源着色（深色玻璃上用提亮版色，保证对比度）；logo 统一漂白见 §3070 */
body.page-index .index-card__poster-ratings .index-card-rating--douban .index-card-rating__value { color: #63d29a; }
body.page-index .index-card__poster-ratings .index-card-rating--imdb   .index-card-rating__value { color: #f5c518; }
body.page-index .index-card__poster-ratings .index-card-rating--rt     .index-card-rating__value { color: #ff8164; }
body.page-index .index-card__poster-ratings .index-card-rating--mc     .index-card-rating__value { color: #c79cec; }
body.page-index .index-card__poster-ratings .index-card-rating--tmdb   .index-card-rating__value { color: #3fd0ee; }

body.page-index .index-card__poster-ratings .index-card-rating img {
    width: 9px;
    height: 9px;
}

body.page-index .index-card-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6b5743;
    font-weight: 500;
}
body.page-index .index-card-stat__icon {
    flex-shrink: 0;
    color: #978878; /* 默认中性灰，被 is-seeder / is-leecher 覆盖 */
    opacity: .78;
}

/* —— is-meta（时间 / 大小）：弱化为细灰文字，去图标，相邻两项间用 · 分隔 —— */
body.page-index .index-card-stat.is-meta {
    gap: 0;
    color: #6f6256;
    /* 字重从 600 降到 500：在 10.8px / 同色相的小字行里，
     * 仅靠颜色无法把"基础元数据 (time/size)"和"流量主信息 (↑↓✓)"分层；
     * 把 meta 字重压到 500 后，meta 显著变"轻"，flow 600 变"重"，
     * hierarchy 不再只靠颜色撑，整行更像一段 well-typeset 的脚注。 */
    font-weight: 600;
}
body.page-index .index-card-stat.is-meta .index-card-stat__icon {
    display: none;
}
body.page-index .index-card-stat.is-meta + .index-card-stat.is-meta::before {
    content: '·';
    margin: 0 6px 0 -4px;
    color: #b7aa99;
    font-weight: 400;
}
/* meta 内部的数值也同步降到 500，避免 .index-card-stat__val 的 700 把 meta 又拉回粗体。
 * flow 项不受影响（CSS 选择器特异性：is-meta 的 __val 比通用 __val 更具体） */
body.page-index .index-card-stat.is-meta .index-card-stat__val,
body.page-index .index-card-stat.is-meta > span[title] {
    font-weight: 600;
}
body.page-index .index-card-stat__val {
    color: inherit;
    font-weight: 600;
}
/* gettime 返回 <span title="...">17时</span>，未带额外类，统一继承父色 */
body.page-index .index-card-stat > span[title] {
    color: inherit;
    font-weight: 600;
}

/* 做种 / 下载只让图标带色，数字继承统计行的暖灰。 */
body.page-index .index-card-stat.is-seeder .index-card-stat__icon {
    color: #4c9f68;
}
body.page-index .index-card-stat.is-leecher .index-card-stat__icon {
    color: #c06455;
}

/* ===================================================================
 * 6. 最新种子卡片（与第 5 节热门资源卡风格一致）
 * 与 .index-hot-resource* 共享视觉语言：同样的 92×128 海报、米色描边、
 * 12px 圆角卡片；差异仅在网格用 auto-fit（让最后一行不残缺）和 stats
 * 内容（大小 / 时间 / 做种 / 下载，而非热度）。
 * =================================================================== */
/* .index-latest-resource-grid 的 flex/overflow/scrollbar 样式已与 .index-hot-resource-grid
 * 合并在第 5 节顶部联合选择器里，此处只保留卡片自身样式。 */
body.page-index .index-latest-resource {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    grid-template-areas: "poster content";
    align-items: stretch;
    column-gap: 14px;
    flex: 0 0 380px;
    min-width: 0;
    /* 与 .index-hot-resource 同步：海报本身已是高度下限，不再额外 min-height 制造留白 */
    padding: 16px;
    border: 1px solid rgba(220, 227, 236, 0.58);
    border-radius: 14px;
    background: rgba(255, 252, 247, 0.58);
    box-shadow: 0 4px 12px rgba(49, 66, 96, 0.025);
    /* 与 .index-hot-resource 同策略：30 张卡横向 scroll，一屏只露 3-4 张。
     * content-visibility:auto 跳过视口外卡片的渲染开销；占位尺寸 380 × 210（auto 缓存）。
     * 注意：前 4 张「LCP 候选」由于在初始视口内总是触发渲染，不会被本规则误伤。 */
    content-visibility: auto;
    contain-intrinsic-size: auto 380px auto 210px;
    transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
    scroll-snap-align: start;
}

body.page-index .index-latest-resource > .index-latest-resource__poster   { grid-area: poster; }
body.page-index .index-latest-resource > .index-latest-resource__content  { grid-area: content; }

body.page-index .index-latest-resource:hover {
    border-color: rgba(208, 186, 152, 0.92);
    background: rgba(255, 247, 235, 0.78);
    transform: translateY(-1px);
}

body.page-index .index-latest-resource__poster {
    position: relative;
    display: block;
    width: 128px;
    /* 海报比例锁死为源图 296:412（1:1.39），即使后续只调卡片宽度也不会被误改。
     * 不再单独写 height，由 aspect-ratio 反推（128 → ~178.2px）。 */
    aspect-ratio: 296 / 412;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(244, 247, 251, 0.7);
    border: 1px solid rgba(126, 103, 74, 0.18);
    box-shadow: 0 2px 7px rgba(49, 66, 96, 0.11), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* 只覆盖海报"直接子"的 img（真海报本体），避免被 .index-card-promo 内
 * 的 sprite 小图（pro_free / pro_2up 等 36×11）继承到 100% × 100% 撑爆。 */
body.page-index .index-latest-resource__poster > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.035) saturate(1.025);
}

/* 没有海报时（音乐 / 软件 / 未抓到豆瓣的种子）用分类图标居中占位
 * 注意 return_category_image 返回的是 1×1 透明 gif + background-image，
 * 必须显式覆盖宽高 + background-size，否则原始 sprite 会撑出原尺寸 */
body.page-index .index-latest-resource__poster-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(244, 230, 200, 0.55), rgba(220, 200, 168, 0.35));
}
body.page-index .index-latest-resource__poster-placeholder img,
body.page-index .index-latest-resource__poster-placeholder a img {
    width: 48px !important;
    height: 48px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    display: block;
}

body.page-index .index-latest-resource__content {
    min-width: 0;
    height: 100%;
    align-self: stretch;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* 与 .index-hot-resource__content 统一为 7px：title↔subtitle 留段落停顿，
     * subtitle↔stats 因 stats margin-top:auto 而被自动吸收（不可见），
     * 视觉上只有顶部那条缝感受到这个值。 */
    gap: 7px;
}

body.page-index .index-latest-resource__title {
    display: block;
    min-width: 0;
    color: #2f2517 !important;
    text-decoration: none !important;
}

body.page-index .index-latest-resource__title:hover .index-latest-resource__title-head {
    color: #7a572d;
}

/* —— 卡片标题：头/尾分离（共用规则） ——
 * head：发布名主体，2 行夹断
 * tail：发布组 / 发布组@站点，常驻显示，避免被省略号吞掉
 */
body.page-index .index-hot-resource__title-head,
body.page-index .index-latest-resource__title-head {
    display: inline;
    color: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-word;
}

body.page-index .index-hot-resource__title-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    font-size: 13px;
    overflow: hidden;
}

body.page-index .index-hot-resource__title-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-index .index-hot-resource__title-type {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #9b8b78;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: .02em;
    white-space: nowrap;
}

body.page-index .index-hot-resource__title-type::before {
    content: "·";
    color: rgba(151, 136, 120, .72);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

body.page-index .index-hot-resource__title-tail,
body.page-index .index-latest-resource__title-tail {
    display: inline-block;
    max-width: 100%;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(122, 87, 45, .1);
    color: #7a572d;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* —— 标题元信息行：发布组徽标（DIY@Audies / AnimeF@ADE 等） ——
 * 历史：促销 pill (Free/2X/50%) 已迁出到 .index-card__poster-promo（海报右上角），
 * 下载按钮也已迁到 stats-line 末尾。这里目前只承载 tail 徽标，
 * 但保留 inline-flex + gap 结构以便未来再挂内联非交互元素（必须为 <span>，
 * 因为外层 <a __title> 不允许嵌套 <a>）。
 */
body.page-index .index-hot-resource__title-meta,
body.page-index .index-latest-resource__title-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px 5px;
    max-width: 100%;
    min-width: 0;
    margin-left: 5px;
    vertical-align: baseline;
    line-height: 1;
}

/* —— 促销 pill：圆角胶囊文本徽标 ——
 * 文案：英文短串 Free / 2X / 2X Free / 50% / 2X 50% / 30%（与 torrents.php sprite 印字一致）
 * 形状：与组徽标 .__title-tail 同款（圆角 / padding / 字号 / 字重对齐），并排时高度齐
 * 配色：按 sp_state 走 6 套淡底深字色相，每种促销一种色，与组徽标米褐色明显错开
 */
body.page-index .index-card-promo-pill {
    display: inline-block;
    max-width: 100%;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

/* 6 种促销类型配色：bg 用 14% 透明淡彩、文字用同色相高饱和，
 * 整体仍偏暖 / 中性，与卡片米色基调和谐。 */
body.page-index .index-card-promo-pill--free        { background: rgba( 46, 139,  87, .14); color: #2e8b57; }
body.page-index .index-card-promo-pill--2up         { background: rgba(184,  89,  59, .14); color: #b8593b; }
body.page-index .index-card-promo-pill--free2up     { background: rgba(106,  27, 154, .14); color: #6a1b9a; }
body.page-index .index-card-promo-pill--halfdown    { background: rgba(217, 119,   6, .15); color: #b45309; }
body.page-index .index-card-promo-pill--halfdown2up { background: rgba(206,  91,  24, .15); color: #ce5b18; }
body.page-index .index-card-promo-pill--thirtypct   { background: rgba(173,  78,  10, .15); color: #ad4e0a; }

/* 副标题行 / tags 内部样式覆写已在 5 节"热门段"联合选择器里统一处理（含
 * .index-latest-resource__subtitle-line / __descr / __tags），无需此处重复。 */

/* stats / ratings 行复用 5.5 节的 .index-card-stats / .index-card-ratings，无需重复声明 */

/* ===================================================================
 * 5.1 D: 群聊区按钮焦糖化（与卡片米色调统一）
 *      覆盖默认 .btn 灰底，所有按钮均改用焦糖色软胶囊。
 *      "我喊"作为主操作用焦糖填充背景；其余次要按钮用米色描边胶囊。
 * =================================================================== */
body.page-index .index-card--shoutbox .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: #8a5518;
    background: rgba(255, 247, 235, 0.9);
    background-image: none;
    border: 1px solid rgba(229, 214, 191, 0.85);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, transform 0.08s ease;
    box-shadow: none;
    text-shadow: none;
    height: auto;
    min-height: 0;
}
body.page-index .index-card--shoutbox .btn:hover,
body.page-index .index-card--shoutbox .btn:focus {
    color: #7a572d;
    background: #fff7eb;
    border-color: rgba(208, 186, 152, 1);
    outline: none;
}
body.page-index .index-card--shoutbox .btn:active {
    transform: translateY(1px);
}

/* "我喊"主操作：保留主按钮身份，但降低视觉重量。 */
body.page-index .index-card--shoutbox .shoutbox-submit {
    color: #9a6424 !important;
    background: rgba(255, 247, 235, .82) !important;
    border-color: rgba(216, 160, 92, .42) !important;
    box-shadow: none;
    text-shadow: none;
    font-weight: 600;
}
body.page-index .index-card--shoutbox .shoutbox-submit:hover,
body.page-index .index-card--shoutbox .shoutbox-submit:focus {
    color: #8a5518 !important;
    background: #fff3df !important;
    border-color: rgba(216, 160, 92, .68) !important;
    box-shadow: 0 0 0 2px rgba(216, 160, 92, .1);
}

/* "对客"次要主操作 - 焦糖描边 + 浅填充 */
body.page-index .index-card--shoutbox .shoutbox-to-guest {
    color: #b87a3a !important;
    background: #fff;
    border-color: rgba(208, 186, 152, 0.95);
}

/* 表情切换按钮收一下 padding（这个按钮 label 中文短，否则太宽） */
body.page-index .index-card--shoutbox .shoutbox-smilies-toggle {
    padding: 4px 10px;
}

/* "刷新" 标题区按钮（靠右上角） */
body.page-index .index-card--shoutbox .shoutbox-refresh-btn {
    margin-left: 0;
    padding: 2px 0;
    font-size: 11px;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
    transition: max-width .14s ease, padding .14s ease, opacity .14s ease;
}
body.page-index .index-card--shoutbox .shoutbox-refresh:hover .shoutbox-refresh-btn,
body.page-index .index-card--shoutbox .shoutbox-refresh:focus-within .shoutbox-refresh-btn {
    margin-left: 6px;
    padding: 2px 10px;
    max-width: 48px;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* "加载更多" 放在列表下方，弱化成历史消息入口。 */
body.page-index .index-card--shoutbox .shoutbox-toolbar {
    justify-content: center;
    margin: 5px 0 0;
}
body.page-index .index-card--shoutbox .shoutbox-load-more {
    padding: 1px 8px;
    color: #b4a392;
    background: transparent;
    border-color: transparent;
    font-size: 11px;
    font-weight: 500;
}
body.page-index .index-card--shoutbox .shoutbox-load-more:hover,
body.page-index .index-card--shoutbox .shoutbox-load-more:focus {
    color: #8a5518;
    background: rgba(255, 247, 235, .48);
    border-color: rgba(229, 214, 191, .42);
}

body.page-index .index-card--shoutbox .shoutbox-new-notice {
    display: block;
    width: 100%;
    margin: 0 0 6px;
    padding: 4px 10px;
    color: #8a5518;
    background: rgba(255, 247, 235, .86);
    border: 1px solid rgba(229, 214, 191, .7);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}
body.page-index .index-card--shoutbox .shoutbox-new-notice:hover,
body.page-index .index-card--shoutbox .shoutbox-new-notice:focus {
    background: #fff7eb;
    border-color: rgba(208, 186, 152, .86);
    outline: none;
}
body.page-index .index-card--shoutbox .shoutbox-new-notice[hidden] {
    display: none;
}

/* 输入框右侧的 "x" 清空按钮：保持小巧灰白，不抢戏 */
body.page-index .index-card--shoutbox .shoutbox-input-clear {
    color: #b6aa9b;
    background: transparent;
    border: none;
    padding: 0 6px;
    font-size: 13px;
    cursor: pointer;
}
body.page-index .index-card--shoutbox .shoutbox-input-clear:hover {
    color: #7a572d;
}

/* 群聊区细节优化：系统提示、刷新状态、发送栏和新消息反馈。 */
body.page-index .index-card--shoutbox .shoutbox-refresh {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #b8c0cb;
    font-size: 10px;
    font-weight: 400;
}
body.page-index .index-card--shoutbox .shoutbox-refresh-label {
    color: #b8c0cb;
}
body.page-index .index-card--shoutbox .shoutbox-refresh-count {
    min-width: 20px;
    color: #aeb7c3;
    font-weight: 500;
    text-align: right;
}
body.page-index .index-card--shoutbox .shoutbox-refresh-count.is-urgent {
    color: #8f9baa;
    font-weight: 600;
}
body.page-index .index-card--shoutbox .shoutbox-status {
    color: #8f7b66;
    background: rgba(255, 247, 235, .86);
    border: 1px solid rgba(229, 214, 191, .7);
    border-radius: 999px;
    padding: 2px 8px;
}

body.page-index .index-card--shoutbox .shoutbox-message.is-new {
    animation: index-shoutbox-new 1.8s ease-out;
}
@keyframes index-shoutbox-new {
    0% {
        background: rgba(255, 247, 224, .98);
        box-shadow: inset 3px 0 0 rgba(216, 160, 92, .7);
    }
    100% {
        background: transparent;
        box-shadow: inset 3px 0 0 rgba(216, 160, 92, 0);
    }
}

body.page-index .index-card--shoutbox .shoutbox-message.shoutrow-system {
    position: relative;
    z-index: 2;
    display: block;
    margin: 0;
    padding: 5px 34px 5px 2px;
    border: 0;
    border-bottom: 1px solid rgba(39, 52, 67, .06);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow-system[hidden] {
    display: none !important;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow-system .shoutbox-message-avatar {
    display: none;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow-system .shoutbox-message-main {
    min-width: 0;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow-system .shoutbox-message-line {
    display: block;
    min-width: 0;
    line-height: 1.45;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow-system .shoutbox-message-user {
    display: none;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow-system .shoutbox-message-badge {
    display: inline-block;
    margin: 0 6px 0 0;
    padding: 0 4px;
    color: #a59483;
    background: rgba(165, 148, 131, .09);
    border: 0;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.45;
    vertical-align: baseline;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow-system .shoutbox-message-body {
    min-width: 0;
    color: #6b7280;
    font-size: 11.5px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow-system .shoutrow-date {
    display: inline;
    margin-left: 8px;
    color: #c3c9d1;
    font-size: 10px;
    white-space: nowrap;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow-system .shoutbox-message-actions {
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
}
body.page-index .index-card--shoutbox .shoutbox-system-toggle {
    display: inline-block;
    width: auto;
    margin: 0 0 0 8px;
    padding: 0;
    color: #c0b3a5;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 10px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
}
body.page-index .index-card--shoutbox .shoutbox-system-toggle:hover,
body.page-index .index-card--shoutbox .shoutbox-system-toggle:focus {
    color: #8a5518;
    background: transparent;
    text-decoration: underline;
    outline: none;
}
body.page-index .index-card--shoutbox .shoutbox-message-line .shoutrow-date {
    margin-left: 12px;
    color: #bac2cc;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow:not(.shoutrow-system) {
    align-items: center;
    transition: none;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow:not(.shoutrow-system):hover {
    background: rgba(247, 248, 250, .9);
    transition: none;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow:not(.shoutrow-system) .shoutbox-message-avatar {
    align-self: center;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow:not(.shoutrow-system) .shoutbox-message-main {
    display: block;
    min-height: 0;
}
body.page-index .index-card--shoutbox .shoutbox-message.shoutrow:not(.shoutrow-system) .shoutbox-message-line {
    align-items: center;
}
body.page-index .index-card--shoutbox .shoutbox-message-actions {
    opacity: 0;
    transition: none;
}
body.page-index .index-card--shoutbox .shoutbox-message:hover .shoutbox-message-actions,
body.page-index .index-card--shoutbox .shoutbox-message:focus-within .shoutbox-message-actions {
    opacity: 1;
}
body.page-index .index-card--shoutbox .shoutbox-delete {
    color: #b8a997;
    border-color: rgba(229, 214, 191, .42);
    background: rgba(255, 255, 255, .68);
}
body.page-index .index-card--shoutbox .shoutbox-delete:hover,
body.page-index .index-card--shoutbox .shoutbox-delete:focus {
    color: #8a5518;
    border-color: rgba(208, 186, 152, .82);
    background: #fff7eb;
}

body.page-index .index-card--shoutbox .shoutbox-compose {
    margin-top: 9px;
    padding: 9px;
    border: 1px solid rgba(229, 214, 191, .42);
    border-radius: 10px;
    background: rgba(255, 250, 243, .42);
}
body.page-index .index-card--shoutbox .shoutbox-input-row {
    align-items: center;
    gap: 7px;
}
body.page-index .index-card--shoutbox .shoutbox-label {
    color: #8f7b66;
    font-weight: 600;
}
body.page-index .index-card--shoutbox .shoutbox-input {
    box-sizing: border-box;
    height: 34px;
    min-height: 34px;
    padding: 6px 28px 6px 8px;
    border-color: rgba(214, 188, 152, .62);
    border-radius: 8px;
    background: #fff;
    line-height: 20px;
    resize: none;
}
body.page-index .index-card--shoutbox .shoutbox-input:focus {
    border-color: rgba(216, 160, 92, .76);
    box-shadow: 0 0 0 3px rgba(216, 160, 92, .12);
}

@media (max-width: 720px) {
    body.page-index .index-card--shoutbox .shoutbox-refresh {
        justify-content: flex-end;
        width: 100%;
    }
    body.page-index .index-card--shoutbox .shoutbox-input-row {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: stretch;
    }
    body.page-index .index-card--shoutbox .shoutbox-label,
    body.page-index .index-card--shoutbox .shoutbox-input-wrap {
        flex: 1 0 100%;
        width: 100%;
    }
    body.page-index .index-card--shoutbox .shoutbox-smilies-toggle {
        flex: 0 0 44px;
        width: 44px;
        min-width: 44px;
    }
    body.page-index .index-card--shoutbox .shoutbox-submit,
    body.page-index .index-card--shoutbox .shoutbox-to-guest {
        flex: 1 1 72px;
        width: auto;
        min-width: 72px;
        min-height: 34px;
        box-sizing: border-box;
        white-space: nowrap;
    }
    body.page-index .index-card--shoutbox .shoutbox-message-actions {
        opacity: 1;
    }
}

/* ===================================================================
 * 6. 投票（现代进度条结果）
 * =================================================================== */
body.page-index .index-poll {
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
}
body.page-index .index-poll__question {
    font-size: 14px;
    font-weight: 700;
    color: #2f3a46;
    text-align: center;
    margin: 0 0 16px 0;
}
body.page-index .index-poll__status {
    display: table;
    margin: -4px auto 12px;
    padding: 3px 10px;
    color: #7d654b;
    font-size: 11px;
    font-weight: 600;
    background: rgba(250, 248, 244, .9);
    border: 1px solid rgba(210, 194, 174, .62);
    border-radius: 999px;
}
body.page-index .index-poll__option-row {
    display: grid;
    grid-template-columns: minmax(8em, 1.15fr) minmax(90px, 1.7fr) 3.5em 4.2em;
    align-items: center;
    gap: 9px;
    margin: 7px 0;
    padding: 5px 7px;
    border-radius: 8px;
    font-size: 12px;
}
body.page-index .index-poll__option-row--winner {
    background: rgba(250, 248, 244, .72);
}
body.page-index .index-poll__option-label {
    color: #3f4b59;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.page-index .index-poll__option-bar {
    position: relative;
    height: 8px;
    min-width: 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(39, 52, 67, .08);
}
body.page-index .index-poll__option-fill {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(157, 129, 96, .34), rgba(157, 129, 96, .62));
}
body.page-index .index-poll__option-row--winner .index-poll__option-fill {
    background: linear-gradient(90deg, #aa875f, #80684f);
}
body.page-index .index-poll__option-pct {
    text-align: right;
    color: #6d5b48;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
body.page-index .index-poll__option-votes {
    color: #8b98a8;
    text-align: right;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
body.page-index .index-poll__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 11px;
    color: #8b98a8;
    margin: 14px 0 0 0;
}
body.page-index .index-poll__meta a {
    color: #5f7188;
    text-decoration: none;
}
body.page-index .index-poll__meta a:hover {
    text-decoration: underline;
}
body.page-index .index-poll__choice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 7px 0;
    padding: 8px 10px;
    cursor: pointer;
    color: #3f4b59;
    background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(220, 227, 236, .72);
    border-radius: 10px;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}
body.page-index .index-poll__choice:hover,
body.page-index .index-poll__choice:focus-within {
    color: #4f3f2f;
    background: rgba(250, 248, 244, .88);
    border-color: rgba(190, 166, 136, .58);
}
body.page-index .index-poll__choice input {
    flex: 0 0 auto;
}
body.page-index .index-poll__choice span {
    min-width: 0;
    overflow-wrap: anywhere;
}
body.page-index .index-poll__choice--muted {
    color: #7d8b9c;
    background: rgba(250, 252, 255, .62);
}
body.page-index .index-poll__submit-row {
    text-align: center;
    margin-top: 14px;
}
body.page-index .index-card--poll .index-card__action-link,
body.page-index .index-card--funbox .index-card__action-link {
    color: #75614b !important;
    background: rgba(250, 248, 244, .86);
    border-color: rgba(210, 194, 174, .64);
}
body.page-index .index-card--poll .index-card__action-link:hover,
body.page-index .index-card--poll .index-card__action-link:focus,
body.page-index .index-card--funbox .index-card__action-link:hover,
body.page-index .index-card--funbox .index-card__action-link:focus {
    color: #4f3f2f !important;
    background: #fbf6ef;
    border-color: rgba(190, 166, 136, .78);
}

/* ===================================================================
 * 7. 趣味盒、统计、负载等次要板块
 * =================================================================== */
body.page-index .index-funbox .index-card__body {
    display: flex;
    flex-direction: column;
}
body.page-index .index-funbox__item {
    min-height: 190px;
    padding: 12px 14px;
    border: 1px solid rgba(220, 227, 236, .72);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(248, 250, 253, .78), rgba(255, 255, 255, .94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}
body.page-index .index-funbox__title {
    margin: 0 0 6px;
    color: #2f3a46;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}
body.page-index .index-funbox__meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 10px;
    color: #8b98a8;
    font-size: 11px;
}
body.page-index .index-funbox__content {
    color: #3f4b59;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
body.page-index .index-funbox__vote {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 30px;
    margin-top: 8px;
    color: #7d8b9c;
    font-size: 11px;
}
body.page-index .index-funbox__summary {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
    line-height: 1.8;
}
body.page-index .index-funbox__summary b {
    color: #7d654b;
    font-size: 13px;
}
body.page-index .index-funbox__prompt {
    color: #80684f;
    font-weight: 600;
}
body.page-index .index-funbox__btn {
    padding: 2px 9px;
    color: #75614b !important;
    background: rgba(250, 248, 244, .88) !important;
    border-color: rgba(210, 194, 174, .64) !important;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: none;
}
body.page-index .index-funbox__btn:hover,
body.page-index .index-funbox__btn:focus {
    color: #4f3f2f !important;
    background: #fbf6ef !important;
    border-color: rgba(190, 166, 136, .78) !important;
}
body.page-index .index-funbox__btn--muted {
    color: #7d8b9c !important;
    background: #fff !important;
    border-color: rgba(220, 227, 236, .82) !important;
}
body.page-index .index-funbox__btn:disabled {
    opacity: .58;
    cursor: wait;
}
body.page-index .index-funbox__accepted,
body.page-index .index-funbox__voted {
    color: #5f8a43;
    font-weight: 600;
}
body.page-index .index-funbox__error {
    color: #b4533f;
    font-weight: 600;
}

body.page-index .index-stats-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}
body.page-index .index-stats-mini__cell {
    text-align: center;
    padding: 10px 6px;
    border: 1px solid rgba(220, 227, 236, 0.55);
    border-radius: 12px;
    background: rgba(248, 250, 253, 0.65);
}
body.page-index .index-stats-mini__num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #7d654b;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
body.page-index .index-stats-mini__label {
    display: block;
    font-size: 11px;
    color: #8b98a8;
    margin-top: 4px;
}

body.page-index .index-stats-dashboard {
    padding: 12px;
    border: 1px solid rgba(220, 227, 236, .72);
    border-radius: 16px;
    background:
        radial-gradient(circle at 0 0, rgba(128, 145, 166, .08), transparent 30%),
        linear-gradient(180deg, rgba(248, 250, 253, .94), rgba(255, 255, 255, .86));
}
body.page-index .index-stats-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
body.page-index .index-stats-chart-grid--torrent-focus {
    grid-template-columns: minmax(180px, .56fr) minmax(0, 1.44fr);
}
body.page-index .index-stats-chart-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(220, 227, 236, .68);
    border-radius: 14px;
    background: rgba(255, 255, 255, .82);
}
body.page-index .index-stats-chart-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px;
    color: #4f5f72;
    font-size: 13px;
    font-weight: 700;
}
body.page-index .index-stats-chart-title::before {
    content: "";
    width: 3px;
    height: 13px;
    border-radius: 999px;
    background: rgba(157, 129, 96, .56);
}
body.page-index .index-stats-chart {
    height: 142px;
}
body.page-index .index-stats-chart--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b98a8;
    background: rgba(248, 250, 253, .62);
    border: 1px dashed rgba(166, 181, 201, .52);
    border-radius: 12px;
    font-size: 12px;
}
body.page-index .index-stats-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 12px;
    padding: 0 2px 8px;
    border-bottom: 1px solid rgba(220, 227, 236, .7);
    color: #4f5f72;
    font-size: 12px;
    font-weight: 700;
}
body.page-index .index-stats-section-head__meta {
    margin-left: auto;
    color: #9aa6b5;
    font-size: 10px;
    font-weight: 500;
}
body.page-index .index-stats-section-head::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #aa875f;
    box-shadow: 0 0 0 4px rgba(157, 129, 96, .12);
}
body.page-index .index-stats-group-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
}
body.page-index .index-stats-group {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(220, 227, 236, .68);
    border-radius: 14px;
    background: rgba(255, 255, 255, .82);
}
body.page-index .index-stats-group:last-child {
    grid-column: 1 / -1;
}
body.page-index .index-stats-group__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 10px;
    color: #4f5f72;
    font-size: 13px;
    font-weight: 700;
}
body.page-index .index-stats-group__title::before {
    content: "";
    width: 3px;
    height: 13px;
    border-radius: 999px;
    background: rgba(157, 129, 96, .56);
}
body.page-index .index-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
body.page-index .index-stats-group:last-child .index-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
    gap: 8px;
}
body.page-index .index-stats-metric {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid rgba(220, 227, 236, .58);
    border-radius: 11px;
    background: rgba(248, 250, 253, .46);
}
body.page-index .index-stats-metric--primary {
    border-color: rgba(210, 194, 174, .5);
    background: linear-gradient(180deg, rgba(250, 248, 244, .88), rgba(255, 255, 255, .86));
    box-shadow: inset 3px 0 0 rgba(157, 129, 96, .42);
}
body.page-index .index-stats-metric__label {
    display: block;
    color: #7d8b9c;
    font-size: 11px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.page-index .index-stats-metric__value {
    display: block;
    margin-top: 5px;
    color: #2f3a46;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
body.page-index .index-stats-metric--primary .index-stats-metric__value {
    color: #7d654b;
    font-size: 16px;
}
body.page-index .index-stats-metric__note {
    display: block;
    margin-top: 2px;
    color: #8b98a8;
    font-size: 10px;
    line-height: 1.35;
}
body.page-index .index-stats-group__meta {
    color: #9aa6b5;
    font-size: 10px;
    font-weight: 500;
}
body.page-index .index-stats-group__hint {
    color: #9aa6b5;
    font-size: 10px;
    font-weight: 500;
}
body.page-index .index-stats-group:last-child .index-stats-metric {
    text-align: center;
}
body.page-index .index-stats-group:last-child .index-stats-metric__label,
body.page-index .index-stats-group:last-child .index-stats-metric__value {
    text-align: center;
}
body.page-index .index-stats-group:last-child .index-stats-metric__value {
    margin-top: 4px;
    color: #4f5f72;
    font-size: 11px;
}

body.page-index .index-server-load {
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #4f5f72;
    font-size: 13px;
}

/* 折叠：管理员才看到的次要板块（完整统计/服务器负载/免责/友情链接） */
body.page-index .index-collapse {
    margin: 16px 0 0 0;
    border-radius: 16px;
    border: 1px solid rgba(220, 227, 236, 0.82);
    background: rgba(255, 255, 255, 0.74);
    overflow: hidden;
}
body.page-index .index-collapse > summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    cursor: pointer;
    padding: 14px 18px 10px;
    border-bottom: 1px solid rgba(220, 227, 236, 0.55);
    color: #6b5743;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.45;
    list-style: none;
    user-select: none;
    background: transparent;
    transition: background 0.16s ease;
}
body.page-index .index-collapse > summary::-webkit-details-marker { display: none; }
body.page-index .index-collapse > summary::before {
    content: "▸";
    display: inline-block;
    color: #978878;
    font-size: 11px;
    transition: transform 0.16s ease;
}
body.page-index .index-collapse[open] > summary::before {
    transform: rotate(90deg);
}
body.page-index .index-collapse > summary:hover {
    background: rgba(248, 250, 253, 0.48);
}
body.page-index .index-collapse > .index-collapse__body {
    padding: 14px 18px 16px;
    background: rgba(255, 255, 255, 0.72);
}

body.page-index .index-disclaimer-text {
    padding: 14px 16px;
    border: 1px solid rgba(220, 227, 236, .68);
    border-radius: 14px;
    color: #637186;
    background: rgba(248, 250, 253, .52);
    font-size: 12px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

body.page-index .index-links-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

body.page-index .index-links-list__item {
    display: block;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(220, 227, 236, .68);
    border-radius: 13px;
    color: #4f5f72;
    background: rgba(248, 250, 253, .52);
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

body.page-index .index-links-list__item:hover {
    border-color: rgba(157, 129, 96, .36);
    background: rgba(250, 248, 244, .72);
    transform: translateY(-1px);
}

body.page-index .index-links-list__name {
    display: block;
    color: #3f4d5d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-index .index-links-list__title {
    display: block;
    margin-top: 4px;
    color: #8b98a8;
    font-size: 11px;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 折叠区里嵌套的旧式表格做一些视觉淡化（统计/负载/免责沿用原逻辑） */
body.page-index .index-collapse__body table.main {
    border: none;
    background: transparent;
}
body.page-index .index-collapse__body td {
    border-color: rgba(220, 227, 236, 0.55);
}

/* 调试/统计区可能输出很长的 SQL、Redis key 或旧式表格。
 * 首页不允许它们撑出整页；文本换行，表格按容器宽度布局。 */
body.page-index #outer pre,
body.page-index #outer code,
body.page-index #outer tt,
body.page-index #outer table {
    max-width: 100%;
}
body.page-index #outer pre,
body.page-index #outer code,
body.page-index #outer tt {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
body.page-index #outer table {
    table-layout: fixed;
}
body.page-index #outer td,
body.page-index #outer th {
    overflow-wrap: anywhere;
}

/* ===================================================================
 * 8. BBCode 列表容器
 * functions.php 把 [list]/[/list] 替换为 <div class="bbcode-list">；
 * 原有 [*] 仍渲染为 <img class="listicon listitem"> + 文本，故只给容器
 * 留出适当的左缩进与上下间距。CSS 不限定 page-index，让论坛/详情页等
 * 也享受同样的效果。
 * =================================================================== */
.bbcode-list {
    margin: 6px 0;
    padding-left: 4px;
}
.bbcode-list .listicon {
    margin-right: 6px;
}

/* ===================================================================
 * 9. 响应式断点（仅作用首页主区，不触碰顶部 banner/菜单/个人信息栏）
 * =================================================================== */
@media (max-width: 1200px) {
    body.page-index .index-stats-group-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body.page-index .index-card {
        padding: 12px 14px 14px;
        border-radius: 14px;
    }
    /* 横滑模式下，窄屏卡片宽度收窄一档，让一屏可见约 1.3 张卡 */
    body.page-index .index-latest-resource {
        flex: 0 0 300px;
        grid-template-columns: 92px minmax(0, 1fr);
        column-gap: 12px;
    }
    body.page-index .index-latest-resource__poster {
        width: 92px;
        /* height 由父级 aspect-ratio: 296/412 反推（≈128px），保证比例与桌面端一致 */
    }
    body.page-index .index-hot-resource {
        --index-hot-poster-width: 122px;
        flex: 0 0 166px;
        padding: 11px;
        row-gap: 8px;
        /* 同步基类：2:3 海报(122→183) + row-gap 8 + 评分行 ~22 + 标题 18 + content gap 2 + meta 20 ≈ 253 */
        contain-intrinsic-size: auto 166px auto 253px;
    }
    body.page-index .index-card__head {
        gap: 6px;
    }
    body.page-index .index-card__title {
        font-size: 13px;
    }
    body.page-index .index-hot-resource__title-meta,
    body.page-index .index-latest-resource__title-meta {
        max-width: 100%;
    }
    body.page-index .index-news-item__head {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }
    body.page-index .index-news-item__date {
        text-align: left;
    }
    body.page-index .index-stats-chart-grid {
        grid-template-columns: 1fr;
    }
    body.page-index .index-stats-chart {
        height: 180px;
    }
    body.page-index .index-stats-group-layout {
        grid-template-columns: 1fr;
    }
    body.page-index .index-stats-group:last-child {
        grid-column: auto;
    }
    body.page-index .index-stats-grid,
    body.page-index .index-stats-group:last-child .index-stats-grid {
        grid-template-columns: 1fr;
    }
    body.page-index .index-stats-group__meta {
        text-align: left;
    }
    body.page-index .index-poll__option-row {
        grid-template-columns: minmax(0, 1fr) 3.5em;
        gap: 5px 8px;
    }
    body.page-index .index-poll__option-label {
        grid-column: 1 / -1;
        text-align: left;
    }
    body.page-index .index-poll__option-bar {
        grid-column: 1;
    }
    body.page-index .index-poll__option-pct {
        grid-column: 2;
    }
    body.page-index .index-poll__option-votes {
        grid-column: 1 / -1;
        text-align: left;
    }
}

@media (max-width: 640px) {
    body.page-index {
        --site-shell-side-gap: 2px;
    }

    body.page-index #outer > table.main {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.page-index #outer > table.main > tbody > tr > td.embedded {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.page-index .index-card {
        padding-left: 10px;
        padding-right: 10px;
        border-radius: 13px;
    }
}

@media (max-width: 480px) {
    body.page-index #outer {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }

    body.page-index .index-card {
        padding-left: 9px;
        padding-right: 9px;
    }
}

@media (max-width: 480px) {
    /* 移动端：最新上传卡片宽度再收窄到 220px，海报缩到 78×110，标题区相对更宽，
     * 一屏正好可见 ~1.2 张卡，引导用户横滑 */
    body.page-index .index-latest-resource {
        flex: 0 0 250px;
        grid-template-columns: 78px minmax(0, 1fr);
        column-gap: 10px;
    }
    body.page-index .index-latest-resource__poster {
        width: 78px;
        /* height 由父级 aspect-ratio: 296/412 反推（≈108.6px），保证比例与桌面端一致 */
    }
    body.page-index .index-hot-resource {
        --index-hot-poster-width: 108px;
        flex: 0 0 150px;
        padding: 10px;
        /* 同步基类：2:3 海报(108→162) + row-gap 8 + 评分行 ~22 + 标题 18 + content gap 2 + meta 20 ≈ 232 */
        contain-intrinsic-size: auto 150px auto 232px;
    }
    body.page-index .index-card__action-link {
        font-size: 10px;
        padding: 1px 8px;
    }
}

/* ===================================================================
 * 10. 近期热门 / 推荐 区域视觉现代化
 *     仅作用于四个横滑卡片块（热门影视 / 热门动画 / 豆瓣推荐 / TMDB推荐，
 *     均以 .index-hot-resource 渲染单卡，外层 .index-card--hot-movies /
 *     --hot-anim / --douban-recommend / --tmdb-recommend）。
 *     不触碰"最新上传"(.index-latest-resource) / 投票 / 趣味盒 / 统计等卡片。
 *
 *     本节实现四项改造：
 *       #2 海报信息层次 / hover 交互：海报抬升 + 放大 + 阴影加深 + 渐变遮罩浮出
 *       #3 去框感：去掉每张小卡的边框/底色/投影，让海报本身成为主视觉
 *       #4 区块标题与筛选 tab：标题加大加重 + segmented 主题色激活态 + 计数上标弱化
 *       #6 细节统一：统一圆角/阴影 token + 海报骨架占位（懒加载未到位前的 shimmer）
 *
 *     放在文件末尾、所有移动端断点之后；本节"全局规则"只改这些断点未涉及的
 *     视觉属性（边框/阴影/圆角/底色/tab/遮罩），故对移动端只做同款视觉增强、
 *     不改尺寸；"结构调整"（卡宽 / 内距 / 海报铺满 / 占位高度 / 标题字号）一律
 *     包进 @media (min-width: 769px)，与移动端 (max-width:768) 互斥，
 *     已调好的窄屏断点完全不受影响。
 * =================================================================== */

/* —— 统一设计 token（#6）—— */
body.page-index {
    --idx-poster-radius: 13px;
    --idx-poster-shadow: 0 4px 12px rgba(49, 66, 96, .14), 0 1px 3px rgba(49, 66, 96, .10);
    --idx-poster-shadow-hover: 0 14px 30px rgba(49, 66, 96, .22), 0 6px 14px rgba(184, 122, 58, .16);
    --idx-accent: #bd8a45;
    --idx-accent-strong: #9a6526;
}

/* —— 外层板块面板：上下内距略收，让海报区更聚焦（仅四个热门/推荐块）—— */
body.page-index .index-card--hot-movies,
body.page-index .index-card--hot-anim,
body.page-index .index-card--douban-recommend,
body.page-index .index-card--tmdb-recommend {
    padding-top: 12px;
    padding-bottom: 10px;
}

/* —— #3 去框感：单卡不再画边框/底色/投影，posters 直接浮在板块面板上 —— */
body.page-index .index-hot-resource {
    border: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

/* —— 标题/文案左对齐：贴近主流影视墙（Netflix / TMDB）—— */
body.page-index .index-hot-resource__content {
    text-align: left;
}
/* hover 不再恢复旧卡框，只整卡轻微上抬（阴影改由海报承载） */
body.page-index .index-hot-resource:hover {
    background: none;
    border-color: transparent;
    box-shadow: none;
    transform: translateY(-4px);
}

/* —— #6 海报：统一圆角/阴影 + 骨架占位 shimmer —— */
body.page-index .index-hot-resource__poster {
    border: 0;
    border-radius: var(--idx-poster-radius);
    box-shadow: var(--idx-poster-shadow);
    /* 懒加载海报未到位前的骨架：浅灰底 + 缓慢扫光；图片加载后铺满覆盖 */
    background-color: #eef1f6;
    background-image: linear-gradient(100deg,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, .55) 50%,
        rgba(255, 255, 255, 0) 80%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    animation: idxPosterShimmer 1.5s ease-in-out infinite;
    transition: box-shadow .3s ease, transform .32s cubic-bezier(.22, .61, .36, 1);
}
@keyframes idxPosterShimmer {
    0%   { background-position: 150% 0; }
    100% { background-position: -50% 0; }
}

/* —— #2 hover 交互：海报阴影加深 + 海报内图放大 + 底部渐变遮罩浮出 —— */
body.page-index .index-hot-resource:hover .index-hot-resource__poster {
    box-shadow: var(--idx-poster-shadow-hover);
}
body.page-index .index-hot-resource:hover .index-hot-resource__poster > img {
    transform: scale(1.06);
    filter: contrast(1.05) saturate(1.06) brightness(.9);
}
/* —— #E 海报顶部常驻渐变 scrim ——
 * 右上角的"类型 · 年份"角标是白字，压在浅色海报上会发虚。这里给海报顶部叠一层
 * 很淡的常驻渐变（top→透明），保证角标在任何海报上都清晰，同时带来影视墙的纵深感。
 * z-index:1 位于海报图之上、评分 overlay(z2) 与角标(z3) 之下，不遮挡既有信息。 */
body.page-index .index-hot-resource__poster::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 38%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .32), rgba(0, 0, 0, 0));
    border-radius: var(--idx-poster-radius) var(--idx-poster-radius) 0 0;
    pointer-events: none;
    z-index: 1;
}

/* —— #F hover 浮现「搜索资源」图标 ——
 * 默认隐藏，hover 时居中柔和淡入并轻微回弹放大，给"可点击进入"的明确反馈。
 * 卡片点击实际跳转站内资源搜索（torrents.php?search=...），故用放大镜图标而非
 * 播放三角，避免"播放视频"的误导，与真实动作保持一致。
 * 视觉：去掉圆形磨砂底，只留一枚干净的白色描边放大镜；靠 drop-shadow 投影保证在
 * 任意底色海报（含浅色海报）上都清晰可读，更轻盈通透。
 * 过渡：opacity/transform 时长拉长并统一缓动，配合海报放大+压暗，让"图标 + 海报"
 * 作为一段连贯动作浮现，消除原先几段快动作拼接的生硬感。
 * z-index:2 与评分浮层同层、位于角标(z3)之下；pointer-events:none 让点击穿透到 <a>。 */
body.page-index .index-hot-resource__poster::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -46%) scale(.62);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M21 21l-5.3-5.3'/%3E%3C/svg%3E") 50% 50% / contain no-repeat;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .55)) drop-shadow(0 0 1px rgba(0, 0, 0, .65));
    opacity: 0;
    transition: opacity .26s ease, transform .36s cubic-bezier(.34, 1.32, .56, 1);
    pointer-events: none;
    z-index: 2;
}
body.page-index .index-hot-resource:hover .index-hot-resource__poster::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition-delay: .04s;
}

/* —— #4 筛选 tab：segmented 控件 + 主题色激活态 + 计数上标弱化 —— */
body.page-index .index-hot-resource-tabs {
    gap: 2px;
    padding: 3px;
    border-color: transparent;
    background: rgba(150, 120, 84, .10);
}
body.page-index .index-hot-resource-tabs__button {
    padding: 3px 12px;
    color: #8c7d6b;
    border-radius: 999px;
    letter-spacing: .02em;
}
body.page-index .index-hot-resource-tabs__button em {
    margin-left: 3px;
    font-size: 9px;
    font-weight: 700;
    vertical-align: 2px;   /* 计数"上标化"，弱化为辅助信息 */
    opacity: .62;
}
body.page-index .index-hot-resource-tabs__button:hover:not(.is-active),
body.page-index .index-hot-resource-tabs__button:focus-visible:not(.is-active) {
    color: #7a4f20;
    background: rgba(255, 247, 235, .7);
}
body.page-index .index-hot-resource-tabs__button.is-active {
    color: #fff;
    background: linear-gradient(180deg, var(--idx-accent), var(--idx-accent-strong));
    box-shadow: 0 2px 7px rgba(160, 106, 38, .30);
}
body.page-index .index-hot-resource-tabs__button.is-active em {
    color: rgba(255, 255, 255, .9);
    opacity: 1;
}

/* —— 降低动效：尊重 prefers-reduced-motion —— */
@media (prefers-reduced-motion: reduce) {
    body.page-index .index-hot-resource__poster {
        animation: none;
    }
    body.page-index .index-hot-resource,
    body.page-index .index-hot-resource__poster,
    body.page-index .index-hot-resource__poster > img,
    body.page-index .index-hot-resource__poster::after {
        transition: none;
    }
}

/* —— 桌面端结构调整（#3 海报铺满卡宽 / #4 标题加大）——
 *     与移动端 (max-width:768) 互斥，窄屏断点保持原有调校不受影响。 */
@media (min-width: 769px) {
    /* 卡片收窄并贴合海报，去掉内边距让海报成为卡片主体；
     * 海报放大一档（170px），占位高度按新高度重算，避免横滑滚动条跳变：
     *   海报(170×412/296≈237) + row-gap 8 + 标题 ~18 + meta ~16 ≈ 279 */
    body.page-index .index-hot-resource {
        flex-basis: 170px;
        padding: 0 0 2px;
        row-gap: 8px;
        /* 2:3 海报(170→255) + row-gap 8 + 评分行 ~22 + 标题 ~18 + meta ~16 ≈ 319 */
        contain-intrinsic-size: auto 170px auto 319px;
    }
    body.page-index .index-hot-resource__poster,
    body.page-index .index-hot-resource__content {
        width: 100%;
    }

    /* 区块标题：仅四个热门/推荐块加大加重，并把竖条换成主题色渐变（#4）。
     * 选择器特异度高于全站 .index-card__title，不影响其它卡片。 */
    body.page-index .index-card--hot-movies .index-card__title,
    body.page-index .index-card--hot-anim .index-card__title,
    body.page-index .index-card--douban-recommend .index-card__title,
    body.page-index .index-card--tmdb-recommend .index-card__title {
        font-size: 15px;
    }
    body.page-index .index-card--hot-movies .index-card__title::before,
    body.page-index .index-card--hot-anim .index-card__title::before,
    body.page-index .index-card--douban-recommend .index-card__title::before,
    body.page-index .index-card--tmdb-recommend .index-card__title::before {
        width: 4px;
        height: 15px;
        background: linear-gradient(180deg, var(--idx-accent), var(--idx-accent-strong));
    }
}

/* ===================================================================
 * 11. P1/P2 续：标题对齐统一 + 区块差异化 + 评分浮层收敛
 * =================================================================== */

/* —— P1：标题与下方"国家 · 类型"同左基线 ——
 *     #2 现代化时已把 .index-hot-resource__content 设为左对齐，但 title-head
 *     仍残留 justify-content:center，导致"标题居中、meta 靠左"的错位。这里统一为
 *     左对齐，让 海报 / 标题 / meta 三者共用同一条左基线（主流影视墙做法）。 */
body.page-index .index-hot-resource__title-head {
    justify-content: flex-start;
}

/* —— P2(a)：四个区块各自的主题色 ——
 *     仅覆写 --idx-accent / --idx-accent-strong，标题竖条渐变(::before)、
 *     激活态 tab、来源标识胶囊都会继承，形成区块色彩节奏：
 *       站内热门=暖金 / 动画=玫瑰 / 豆瓣=豆瓣绿 / TMDB=青蓝 */
body.page-index .index-card--hot-movies {
    --idx-accent: #c2913f;
    --idx-accent-strong: #99661f;
}
body.page-index .index-card--hot-anim {
    --idx-accent: #c46f93;
    --idx-accent-strong: #9a4569;
}
body.page-index .index-card--douban-recommend {
    --idx-accent: #3f9d5d;
    --idx-accent-strong: #2c7644;
}
body.page-index .index-card--tmdb-recommend {
    --idx-accent: #3a9fb2;
    --idx-accent-strong: #1f7888;
}

/* —— P2(b)：来源标识 —— 把标题旁的 aux 文本做成跟随区块主题色的轻量胶囊。
 *     bg/border 用各自 RGBA 显式写出（不依赖 color-mix，老浏览器也稳）。 */
body.page-index .index-card--hot-movies .index-card__title-aux,
body.page-index .index-card--hot-anim .index-card__title-aux,
body.page-index .index-card--douban-recommend .index-card__title-aux,
body.page-index .index-card--tmdb-recommend .index-card__title-aux {
    margin-left: 0;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.5;
    color: var(--idx-accent-strong);
    background: rgba(150, 120, 84, .10);
    border: 1px solid rgba(150, 120, 84, .24);
    border-radius: 999px;
}
body.page-index .index-card--hot-anim .index-card__title-aux {
    background: rgba(196, 111, 147, .12);
    border-color: rgba(196, 111, 147, .30);
}
body.page-index .index-card--douban-recommend .index-card__title-aux {
    background: rgba(63, 157, 93, .12);
    border-color: rgba(63, 157, 93, .30);
}
body.page-index .index-card--tmdb-recommend .index-card__title-aux {
    background: rgba(58, 159, 178, .12);
    border-color: rgba(58, 159, 178, .30);
}

/* —— 方案1：玻璃评分条上的 logo 统一漂白成单色 ——
 * brightness(0) 先把 logo 压成纯黑，再 invert(1) 翻成纯白 → 任意品牌色 logo 都变白，
 * 色彩噪点从 4 个 logo 收敛到数字一处；drop-shadow 保证白 logo 在亮海报上仍有边界。 */
body.page-index .index-card__poster-ratings .index-card-rating img {
    filter: brightness(0) invert(1) drop-shadow(0 1px 1.5px rgba(0, 0, 0, .55));
}
