/* ============================================================
 * 影视页 v2 (css/tv-v2.css) —— 影院式版式
 * ------------------------------------------------------------
 * 只在 TV.html 里、tv.css 之后引入。别的页面不加载这个文件。
 *
 * 【为什么单独一个文件，而不是改 tv.css】
 * tv.css 1248 行、tv.js 1585 行，就地改的话一旦要回滚就得 git revert。
 * 这里的做法是：
 *   · 旧类名（.tv-card / .tv-poster / .tv-name …）一个都不删、不改语义，
 *     只在必要时覆盖；
 *   · 新版块全部用新类名（.tvh- / .tvr- / .tvf- / .tvl- / .tvc- / .tvd-）；
 *   · JS 侧的新渲染函数都判断「容器存不存在」，容器不在就整段不跑。
 * 于是：把 TV.html 里那几个新容器删掉 = 立刻回到旧版，不需要 git revert。
 *
 * 【配色原则】
 * 参考稿（Saintstream）是深色的，本站是浅粉的。这里不抄它的深色，
 * 只抄它的**层级**：hero / banner 这类"媒体面"用深粉棕 --tv-deep 制造影院纵深，
 * 页面本体仍是浅粉，跟侧边栏 / 樱花 / Live2D 的浅色调统一。
 * 所以强调色仍然是站点粉 #fb7299，绿色一个都不用。
 * ============================================================ */

:root {
    /* 媒体深面：不是纯黑，是深粉棕，跟粉色主题同族 */
    --tv-deep: #2a1620;
    --tv-deep-2: #43243a;
    --tv-on-deep: #fff8fb;
    --tv-on-deep-sub: rgba(255, 248, 251, .72);

    /* 深面上的强调色要比浅底上的亮一档，否则糊在背景里 */
    --tv-accent-on-deep: #ff9dbb;

    /* 浅粉底上做正文级链接色：#e35d85 在白底只有约 3.5:1，不够 */
    --tv-accent-ink-2: #c2185b;

    /* 评分星。参考稿用金黄，跟粉不冲突，保留 */
    --tv-star: #ffb020;

    /* 圆角：参考稿卡片是 12~16，比现在的 6 更有"流媒体"味 */
    --tv-radius-2: 14px;
    --tv-radius-card: 18px;
    --tv-radius-hero: 22px;

    /* 阴影统一走暖色，不要中性灰 */
    --tv-sh-1: 0 4px 14px rgba(161, 69, 99, .10);
    --tv-sh-2: 0 10px 26px rgba(161, 69, 99, .16);
    --tv-sh-3: 0 18px 44px rgba(42, 22, 32, .28);
}

/* ============================================================
 * 一、Hero 影厅
 * ------------------------------------------------------------
 * 结构：
 *   .tv-hero
 *     .tvh-bg        背板（海报放大虚化）
 *     .tvh-scrim     深粉棕遮罩，保证文字对比度
 *     .tvh-body      左栏：角标 / 片名 / meta / 简介 / 按钮
 *     .tvh-poster    右栏：海报卡（参考稿 Featured 区那种叠法）
 *     .tvh-dots      圆点指示器
 * ============================================================ */

.tv-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 30px;
    align-items: center;
    min-height: 268px;
    padding: 34px 34px 40px;
    margin: 0 0 26px;
    border-radius: var(--tv-radius-hero);
    background: var(--tv-deep);
    color: var(--tv-on-deep);
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--tv-sh-3);
}

.tv-hero[hidden] { display: none; }

.tvh-bg {
    position: absolute;
    inset: -10%;
    z-index: 0;
    background-position: center;
    background-size: cover;
    filter: blur(26px) saturate(1.25);
    opacity: .55;
    transform: scale(1.06);
}

.tv-hide-bg .tvh-bg { display: none; }

.tv-hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(100deg,
            rgba(42, 22, 32, .97) 0%,
            rgba(42, 22, 32, .90) 38%,
            rgba(42, 22, 32, .52) 72%,
            rgba(42, 22, 32, .34) 100%),
        linear-gradient(0deg, rgba(42, 22, 32, .78) 0%, rgba(42, 22, 32, 0) 62%);
}

.tv-hero > .tvh-body,
.tv-hero > .tvh-poster,
.tv-hero > .tvh-dots { position: relative; z-index: 2; }

.tvh-body { min-width: 0; }

.tvh-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    margin-bottom: 13px;
    border: 1px solid rgba(255, 157, 187, .5);
    border-radius: 999px;
    background: rgba(255, 157, 187, .14);
    color: var(--tv-accent-on-deep);
    font-size: .74rem;
    letter-spacing: .3px;
    white-space: nowrap;
}

.tv-hide-tag .tvh-tag { display: none; }

.tvh-title {
    margin: 0 0 10px;
    color: var(--tv-on-deep);
    font-family: 'Noto Serif SC', serif;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -.4px;
    /* 片名最多两行，超出省略，避免把 hero 撑高 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tv-hide-title .tvh-title { display: none; }

.tv-hero .tvh-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-bottom: 12px;
    color: var(--tv-on-deep-sub);
    font-size: .84rem;
}

.tvh-meta b { color: var(--tv-star); font-weight: 600; }

.tv-hide-meta .tvh-meta { display: none; }

.tv-hide-blurb .tvh-blurb { display: none; }

.tv-hide-acts .tvh-acts { display: none; }

.tv-hide-dots .tvh-dots { display: none; }

.tv-hide-poster .tvh-poster { display: none; }

.tv-hero.tv-no-poster { grid-template-columns: minmax(0, 1fr); }

.tvh-blurb {
    max-width: 62ch;
    margin: 0 0 20px;
    color: var(--tv-on-deep-sub);
    font-size: .88rem;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tv-hide-poster .tvh-blurb { max-width: 78ch; }

.tvh-acts { display: flex; flex-wrap: wrap; gap: 10px; }

.tv-hero .tvh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1px solid rgba(255, 248, 251, .34);
    border-radius: 999px;
    background: rgba(255, 248, 251, .10);
    color: var(--tv-on-deep);
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background .18s, border-color .18s, transform .18s, color .18s;
}

.tv-hero .tvh-btn:hover {
    background: rgba(255, 248, 251, .2);
    border-color: rgba(255, 248, 251, .55);
    transform: translateY(-1px);
}

.tv-hero .tvh-btn i { font-size: .9rem; }

.tv-hero .tvh-btn-main {
    border-color: var(--tv-accent);
    background: var(--tv-accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(251, 114, 153, .4);
}

.tv-hero .tvh-btn-main:hover {
    border-color: var(--tv-accent-on-deep);
    background: var(--tv-accent-on-deep);
    color: var(--tv-deep);
}

.tv-hero .tvh-btn.is-on {
    border-color: var(--tv-accent-on-deep);
    background: rgba(255, 157, 187, .2);
    color: var(--tv-accent-on-deep);
}

/* 右栏海报卡：跟 hero 同高，参考稿 Featured 区就是"海报叠在背板上" */
.tv-hero .tvh-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: var(--tv-radius-2);
    background: rgba(255, 248, 251, .08);
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .42);
}

.tvh-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tvh-poster.is-empty::after {
    content: '🎬';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2rem;
    opacity: .6;
}

.tv-hero .tvh-dots {
    position: absolute;
    left: 34px;
    bottom: 16px;
    z-index: 3;
    display: flex;
    gap: 7px;
}

.tv-hero .tvh-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 248, 251, .35);
    cursor: pointer;
    transition: background .2s, width .2s;
}

.tv-hero .tvh-dot.is-on {
    width: 20px;
    border-radius: 999px;
    background: var(--tv-accent);
}

/* ============================================================
 * 二、排行榜（本周热门）
 * ------------------------------------------------------------
 * 参考稿 "Popular of the week"：大号数字 + 小海报 + 片名 + meta。
 * 数字用描边字（-webkit-text-stroke），不用实心，避免抢片名。
 * ============================================================ */

.tv-rank {
    margin: 0 0 26px;
    padding: 20px 22px 22px;
    border: 1px solid var(--tv-line);
    border-radius: var(--tv-radius-card);
    background: linear-gradient(180deg, #fff 0%, #fff7fa 100%);
}

.tv-rank[hidden] { display: none; }

.tvr-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.tvr-head b {
    color: var(--tv-text);
    font-size: 1.06rem;
    font-weight: 700;
}

.tvr-head span { color: var(--tv-sub); font-size: .78rem; }

.tvr-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tvr-item {
    display: grid;
    grid-template-columns: auto 46px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 8px;
    border: 0;
    border-radius: var(--tv-radius-2);
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background .18s, transform .18s;
}

.tvr-item:hover { background: var(--tv-accent-soft); transform: translateY(-2px); }

.tvr-no {
    color: transparent;
    font-family: 'Noto Serif SC', serif;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    -webkit-text-stroke: 1.4px var(--tv-accent);
    min-width: 1.1em;
    text-align: center;
}

.tvr-item:nth-child(1) .tvr-no { -webkit-text-stroke-color: var(--tv-accent-ink-2); }

.tvr-poster {
    display: block;
    width: 46px;
    aspect-ratio: 2 / 3;
    border-radius: 7px;
    background: var(--tv-accent-soft);
    overflow: hidden;
}

.tvr-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }

.tvr-poster.is-empty::after {
    content: '🎬';
    display: grid;
    place-items: center;
    height: 100%;
    font-size: .95rem;
    opacity: .7;
}

.tvr-body { min-width: 0; }

.tvr-name {
    display: block;
    color: var(--tv-text);
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tvr-meta {
    display: block;
    margin-top: 3px;
    color: var(--tv-sub);
    font-size: .74rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tvr-meta b { color: var(--tv-star); font-weight: 600; }

/* ============================================================
 * 三、筛选条 + 排序
 * ------------------------------------------------------------
 * 参考稿：左边一排类型胶囊，右边一个排序下拉。
 * 这里把现有的「片源 / 分类」两行 chips 收进同一条，右边补排序。
 *
 * 注意 position:sticky —— 祖先若有 transform 会建包含块。
 * .main-card 被 anim.js 加了 .an-lift，但 .an-lift 用的是 translate
 * 且静止态为 none，实测 sticky 正常（见开发时的截图验证）。
 * ============================================================ */

.tv-filter {
    position: sticky;
    /* 偏移由 js/tv.js 的 syncFilterTop() 量出来写进 --tvf-top。
       桌面没有别的吸顶条，这个变量不存在，回落到 0。
       为什么不写死：移动端 .tv-search 自己就是吸顶的（tv.css:796），
       筛选条要叠在它正下方，而它的 top 是 calc(--appbar-h + --sat)、
       高度又随 flex-wrap 折行变 —— 两种环境量出来不一样。 */
    top: var(--tvf-top, 0px);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 10px 2px;
    /* 浅粉底 + 模糊，滚到网格上时字不会跟海报糊在一起 */
    background: rgba(255, 250, 252, .88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--tv-line);
}

/* .tv-filter 自己设了 display:flex，会把 [hidden] 的 display:none 压掉，
   所以这条必须显式写（.tvf-sort 没设 display，不需要） */
.tv-filter[hidden] { display: none; }

/* ⚠ 选择器必须写成 #tvCats.tvf-chips（1 个 id + 1 个 class），
   去对撞 tv.css 里的 `#tvCats.hub-chips { margin-bottom: 20px }`（同为 1-1-0）。
   tv-v2.css 在 tv.css 之后加载，同权重时后者赢，这样那 20px 才不会
   顶在吸顶条里面。写成 .tv-filter .tvf-chips（0-2-0）是压不住的。 */
#tvCats.tvf-chips {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

/* 排序下拉 */
.tvf-sort { position: relative; flex: 0 0 auto; }

.tvf-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--tv-border);
    border-radius: 999px;
    background: #fff;
    color: var(--tv-accent-ink-2);
    font: inherit;
    font-size: .84rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .18s, background .18s;
}

.tvf-sort-btn:hover { border-color: var(--tv-accent); background: var(--tv-accent-soft); }

.tvf-sort-btn i { font-size: .7rem; opacity: .75; transition: transform .2s; }

.tvf-sort.is-open .tvf-sort-btn { border-color: var(--tv-accent); background: var(--tv-accent-soft); }

.tvf-sort.is-open .tvf-sort-btn i { transform: rotate(180deg); }

.tvf-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 7px);
    z-index: 8;
    min-width: 156px;
    padding: 6px;
    border: 1px solid var(--tv-border);
    border-radius: var(--tv-radius-2);
    background: #fff;
    box-shadow: var(--tv-sh-2);
}

.tvf-menu[hidden] { display: none; }

.tvf-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 11px;
    border: 0;
    border-radius: 9px;
    background: none;
    color: var(--tv-text);
    font: inherit;
    font-size: .85rem;
    text-align: left;
    cursor: pointer;
}

.tvf-menu button:hover { background: var(--tv-accent-soft); color: var(--tv-accent-ink-2); }

.tvf-menu button.is-on { color: var(--tv-accent-ink-2); font-weight: 600; }

.tvf-menu button i { font-size: .75rem; opacity: 0; }

.tvf-menu button.is-on i { opacity: 1; }

/* ============================================================
 * 四、卡片升级
 * ------------------------------------------------------------
 * 旧结构：.tv-poster(角标) + .tv-name
 * 新结构：.tv-poster(角标) + .tv-name + .tvc-meta
 * .tvc-meta 是 JS 增量加的，不加也不影响旧卡片。
 * ============================================================ */

.tv-grid { gap: 22px 18px; }

.tv-card {
    border-radius: var(--tv-radius-2);
    transition: transform .2s ease, box-shadow .2s ease;
}

.tv-card:hover { box-shadow: var(--tv-sh-2); }

/* 参考稿角标在左下，不是右下 */
.tv-poster .tv-badge {
    padding: 24px 9px 7px;
    text-align: left;
    background: linear-gradient(180deg, transparent, rgba(42, 22, 32, .82));
    letter-spacing: .2px;
}

/* 悬停时海报上浮出一枚播放圆钮（纯 CSS，不需要 JS）。
   ⚠ 必须用 ::before，不能用 ::after —— tv.css 里「海报拉不动」的降级占位
   .tv-poster.is-empty::after 已经占了 ::after（content:'🎬'）。
   两者撞在一起会叠成「粉圈里套个场记板」，实测截图里能看到。
   放正中间还有个好处：不用 :has() 去躲左下角的角标。 */
.tv-poster::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    background: var(--tv-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9 6.2 19 12l-10 5.8Z'/%3E%3C/svg%3E") center/17px 17px no-repeat;
    box-shadow: 0 4px 14px rgba(42, 22, 32, .4);
    opacity: 0;
    transform: scale(.7);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}

.tv-card:hover .tv-poster::before,
.tv-card:focus-visible .tv-poster::before { opacity: 1; transform: scale(1); }

/* 片名下的副信息行：★8.5 · 2024 · 电影 */
.tvc-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 0 6px 10px;
    color: var(--tv-sub);
    font-size: .73rem;
    line-height: 1.4;
    overflow: hidden;
}

.tvc-meta > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 分隔点用伪元素，比多插一个 span 干净 */
.tvc-meta > span + span::before {
    content: '·';
    margin-right: 6px;
    color: var(--tv-border);
}

.tvc-meta .tvc-star { color: var(--tv-star); font-weight: 600; }

.tvc-meta .tvc-star::before { content: none; }

/* ⚠ 这里【不能】把 .tv-name 改成 height:auto。
   tv.css 的 .tv-name 是定死 58px（两行 20px + 上下内边距），
   js/tv.js 的 fillGrid() 靠 `n.scrollHeight > n.clientHeight` 逐字往回删来压两行。
   height 一旦变成 auto，clientHeight 就等于内容高，那个判断**永远为假**，
   长片名（体育那种「9月15日25-26赛季亚冠…」）就会一路长到三四行、把卡片撑变形。
   所以副信息行是**加在下面**，片名高度保持不动。 */

/* ============================================================
 * 五、横向轨道（rail）
 * ------------------------------------------------------------
 * 参考稿每个分区都是"标题 + See all + 一排横滑海报"。
 * 这里给「继续观看 / 我的追剧」和详情页的「相关推荐」共用。
 * ============================================================ */

.tvl {
    margin: 0 0 26px;
}

.tvl[hidden] { display: none; }

.tvl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.tvl-head b {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tv-text);
    font-size: 1.06rem;
    font-weight: 700;
}

.tvl-head b i { color: var(--tv-accent); font-size: .95rem; }

.tvl-head span { color: var(--tv-sub); font-size: .78rem; }

.tvl-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid var(--tv-border);
    border-radius: 999px;
    background: #fff;
    color: var(--tv-accent-ink-2);
    font: inherit;
    font-size: .78rem;
    cursor: pointer;
    transition: background .18s, border-color .18s;
}

.tvl-more:hover { background: var(--tv-accent-soft); border-color: var(--tv-accent); }

.tvl-more i { font-size: .68rem; }

.tvl-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--tv-border) transparent;
}

.tvl-row > * { flex: 0 0 auto; scroll-snap-align: start; }

.tvl-row::-webkit-scrollbar { height: 6px; }

.tvl-row::-webkit-scrollbar-thumb { background: var(--tv-border); border-radius: 999px; }

.tvl-row::-webkit-scrollbar-track { background: transparent; }

/* rail 里的卡片比网格里窄一点。片名高度同样不碰（见上面那段说明） */
.tvl-row .tv-card { width: 152px; }

/* ============================================================
 * 六、详情页
 * ------------------------------------------------------------
 * 参考稿详情页：backdrop hero（片名 + ★·年·类型 + CTA）→ 剧情简介
 * → 演职员头像行 → 标签页 → 剧集卡 → 相关推荐。
 * 现有 DOM 结构（.tv-info / .tv-aside）保持不变，只加装饰性块。
 * ============================================================ */

/* 详情页 hero：用海报做背板，比列表页 hero 矮一些 */
.tvd-hero {
    position: relative;
    margin: 0 0 18px;
    padding: 26px 26px 24px;
    border-radius: var(--tv-radius-hero);
    background: var(--tv-deep);
    color: var(--tv-on-deep);
    overflow: hidden;
    isolation: isolate;
}

.tvd-hero[hidden] { display: none; }

.tvd-hero .tvd-bg {
    position: absolute;
    inset: -12%;
    z-index: 0;
    background-position: center;
    background-size: cover;
    filter: blur(28px) saturate(1.2);
    opacity: .5;
}

.tvd-hero .tvd-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(42, 22, 32, .55) 0%, rgba(42, 22, 32, .95) 78%, var(--tv-deep) 100%);
}

.tvd-hero > * { position: relative; z-index: 2; }

.tvd-title {
    margin: 0 0 9px;
    color: var(--tv-on-deep);
    font-family: 'Noto Serif SC', serif;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.28;
}

.tvd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-bottom: 16px;
    color: var(--tv-on-deep-sub);
    font-size: .84rem;
}

.tvd-meta b { color: var(--tv-star); font-weight: 600; }

.tvd-chip {
    padding: 2px 9px;
    border: 1px solid rgba(255, 248, 251, .3);
    border-radius: 999px;
    font-size: .72rem;
    line-height: 1.6;
}

/* 演职员头像行 */
.tvd-cast {
    margin: 0 0 20px;
}

.tvd-cast[hidden] { display: none; }

.tvd-cast-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.tvd-cast-head b { color: var(--tv-text); font-size: 1.02rem; font-weight: 700; }

.tvd-cast-head span { color: var(--tv-sub); font-size: .76rem; }

.tvd-cast-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.tvd-cast-row::-webkit-scrollbar { height: 6px; }

.tvd-cast-row::-webkit-scrollbar-thumb { background: var(--tv-border); border-radius: 999px; }

.tvd-person {
    flex: 0 0 auto;
    width: 78px;
    text-align: center;
}

.tvd-face {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 7px;
    border: 2px solid var(--tv-border);
    border-radius: 50%;
    background: linear-gradient(145deg, var(--tv-accent-soft), #ffd9e7);
    color: var(--tv-accent-ink-2);
    font-size: 1.15rem;
    font-weight: 600;
    overflow: hidden;
}

.tvd-face img { width: 100%; height: 100%; object-fit: cover; }

.tvd-pname {
    display: block;
    color: var(--tv-text);
    font-size: .76rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 剧情简介 */
.tvd-story {
    margin: 0 0 20px;
    padding: 16px 18px;
    border: 1px solid var(--tv-line);
    border-radius: var(--tv-radius-card);
    background: #fff;
}

.tvd-story[hidden] { display: none; }

.tvd-story h3 {
    margin: 0 0 8px;
    color: var(--tv-text);
    font-size: 1rem;
    font-weight: 700;
}

.tvd-story p {
    margin: 0;
    color: #5c4650;
    font-size: .87rem;
    line-height: 1.8;
}

.tvd-story p.is-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tvd-story-more {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--tv-accent-ink-2);
    font: inherit;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
}

.tvd-story-more:hover { text-decoration: underline; }

/* ============================================================
 * 七、移动端
 * ------------------------------------------------------------
 * tv.css 里已有 768px / 992px 两档断点，这里只补新版块的。
 * 注意：不要用 !important 去压 tv.css —— 那边已经因为 !important
 * 吃过一次亏（见 style.css 里 button.tv-ep 的注释）。
 * ============================================================ */

@media (max-width: 992px) {
    .tv-hero { grid-template-columns: minmax(0, 1fr) 168px; gap: 22px; padding: 26px 26px 34px; }
    .tvh-title { font-size: 1.6rem; }
    .tvr-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    /* hero 收到 62vw，标题降一档，右栏海报藏掉——手机上留着会把文字挤成一条 */
    .tv-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        min-height: 0;
        padding: 20px 18px 30px;
        border-radius: var(--tv-radius-card);
        margin-bottom: 18px;
    }
    .tv-hero .tvh-poster { display: none; }
    .tvh-title { font-size: 1.28rem; margin-bottom: 8px; }
    .tvh-tag { margin-bottom: 10px; font-size: .7rem; }
    .tvh-blurb { font-size: .82rem; -webkit-line-clamp: 2; margin-bottom: 16px; }
    .tv-hero .tvh-btn { padding: 9px 17px; font-size: .84rem; }
    .tv-hero .tvh-dots { left: 18px; bottom: 13px; }

    .tv-rank { padding: 16px 14px 16px; margin-bottom: 18px; }
    .tvr-head { margin-bottom: 12px; }
    .tvr-row {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 6px;
        scroll-snap-type: x proximity;
    }
    .tvr-item { flex: 0 0 auto; width: 210px; scroll-snap-align: start; }
    .tvr-no { font-size: 1.7rem; }

    /* 筛选条：胶囊横滑，排序钉在右边不滚走 */
    .tv-filter {
        gap: 8px;
        padding: 8px 0;
        margin-bottom: 14px;
        /* 手机上【也吸顶】，叠在吸顶搜索栏的正下方（B 站手机端就是这个模式）。
           偏移走 --tvf-top，由 js/tv.js 的 syncFilterTop() 运行时量出来：
           .tv-search 的 top 是 calc(--appbar-h + --sat)，有没有 html.has-appbar
           会差 48px+；它又是 flex-wrap:wrap，窄屏折行后高度还会变。
           所以这里只负责「吸顶」这件事，偏移量一个数字都不写死。
           底色要够实：吸顶后会压在滚动的海报上。 */
        top: var(--tvf-top, 0px);
        background: rgba(255, 250, 252, .95);
        border-bottom: 1px solid var(--tv-line);
    }
    .tv-filter #tvCats.tvf-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }
    .tv-filter #tvCats.tvf-chips::-webkit-scrollbar { display: none; }
    .tv-filter #tvCats.tvf-chips > * { flex: 0 0 auto; scroll-snap-align: start; }
    .tvf-sort-btn { padding: 7px 12px; font-size: .8rem; }
    .tvf-menu { min-width: 140px; }

    .tv-grid { gap: 16px 10px; }
    .tvc-meta { font-size: .7rem; padding-bottom: 8px; }

    .tvl-row .tv-card { width: 124px; }
    .tvl-head b { font-size: 1rem; }

    .tvd-hero { padding: 20px 16px 18px; border-radius: var(--tv-radius-card); }
    .tvd-title { font-size: 1.24rem; }
    .tvd-cast-row { gap: 12px; }
    .tvd-person { width: 66px; }
    .tvd-face { width: 54px; height: 54px; font-size: 1rem; }
    .tvd-story { padding: 14px 14px; }
}

/* 手机横屏：hero 压得更扁，别占掉半屏 */
@media (max-width: 992px) and (orientation: landscape) {
    .tv-hero { min-height: 200px; padding-block: 20px 26px; }
    .tvh-title { font-size: 1.35rem; }
    .tvh-blurb { -webkit-line-clamp: 2; }
}

/* ============================================================
 * 八、无障碍 / 降级
 * ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .tv-hero .tvh-btn,
    .tvr-item,
    .tvl-more,
    .tvf-sort-btn,
    .tv-card,
    .tv-poster::after {
        transition: none;
    }
    .tv-card:hover { transform: none; }
    .tvr-item:hover { transform: none; }
    .tv-card:hover .tv-poster img { transform: none; }
    .tvh-dot { transition: none; }
}

/* 深面上的焦点环要看得见（默认的浅色描边在深粉棕上会消失） */
.tv-hero .tvh-btn:focus-visible,
.tvd-hero button:focus-visible {
    outline: 2px solid var(--tv-accent-on-deep);
    outline-offset: 2px;
}

.tvf-sort-btn:focus-visible,
.tvl-more:focus-visible,
.tvf-menu button:focus-visible {
    outline: 2px solid var(--tv-accent);
    outline-offset: 2px;
}
