/* ==========================================================================
   檐下成影 结构层（ya-base.css）
   --------------------------------------------------------------------------
   职责：设计令牌 + 通用组件 + 全站双栏骨架
   不含：页面专属骨架（在 ya-theme.css，yx- 命名空间）
   不含：主题身份的最终覆写（在 ya-theme.css 的 :root）

   【线条纪律 · 本模板的核心设计约束】
   反面教材：ember / slate（slate.css 有 177 条方向性边线、134 处 1px solid）
   本模板规则：
     ① 内容行之间禁止 border-top / border-bottom 分割线 —— 用间距 + hover 面变色区分
     ② 板块标题禁止 2px 下划线 —— 用字号/字重/字色建立层级
     ③ 禁止发丝线栅格（gap:1px + 容器背景色那种手法）
     ④ border 只允许出现在「可交互控件」上（按钮 / 输入框 / 分页 / 选中态）
     ⑤ 层级一律用三层手段建立：面色调（surface 1→2→3）→ 柔和投影 → 圆角
   计数基线：border 声明 ≤ 60 条（现网最干净的 vesper 为 104 条）
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌（26 条基准 + 扩展）
   注意：--ya-gap-block 在本层与 ya-theme.css 主题层【两层都定义】（房规要求）
   -------------------------------------------------------------------------- */
:root {
    /* 面：坯纸暖白 —— 带瓦灰冷调的纸面，不是奶油暖白 */
    --ya-bg: #f2f1ea;
    --ya-bg-deep: #e9e8df;
    --ya-surface-1: #ffffff;
    --ya-surface-2: #f7f6f0;
    --ya-surface-3: #ecebe2;

    /* 线：仅用于可交互控件，不用于内容分割 */
    --ya-line: #c9cdc7;
    --ya-line-soft: #dcded8;

    /* 字：玄墨偏青 */
    --ya-text: #24282b;
    --ya-text-soft: #4e545a;
    --ya-text-muted: #878d92;

    /* 强调：瓦青（檐柱青灰）为主；朱门红只做点睛（评分章 / 悬停点亮 / 门环），不大面积铺 */
    --ya-accent: #4f626b;
    --ya-accent-strong: #3a4b53;
    --ya-accent-ink: #ffffff;
    --ya-accent-soft: rgba(79, 98, 107, .1);
    --ya-accent-soft-strong: rgba(79, 98, 107, .2);
    --ya-zhu: #b2422c;
    --ya-zhu-strong: #8e2f1c;
    /* 匾额衬线：品牌章 / 板块题字专用，正文不换衬线 */
    --ya-plaque: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;

    /* 语义 */
    --ya-success: #3d7a5c;
    --ya-warning: #b0741a;
    --ya-danger: #c2413a;

    /* 容器 */
    --ya-shell: 1460px;
    --ya-gutter: clamp(12px, 2.6vw, 36px);

    /* 圆角：建筑构件感，比基线整体收小一号 */
    --ya-radius-sm: 6px;
    --ya-radius-md: 10px;
    --ya-radius-lg: 14px;
    --ya-radius-xl: 22px;

    /* 投影：本模板用来「代替线条」的核心手段，必须成套使用 */
    --ya-shadow-sm: 0 1px 2px rgba(36, 40, 43, .04), 0 2px 8px rgba(36, 40, 43, .05);
    --ya-shadow-md: 0 2px 4px rgba(36, 40, 43, .04), 0 10px 26px rgba(36, 40, 43, .07);
    --ya-shadow-lg: 0 4px 10px rgba(36, 40, 43, .05), 0 26px 60px rgba(36, 40, 43, .11);

    /* 字体 */
    --ya-display: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
    --ya-body: var(--ya-display);

    /* 缓动 */
    --ya-ease: cubic-bezier(.22, .61, .36, 1);

    /* 间距主轴（两层都定义，见 ya-theme.css :root 的同名覆写） */
    --ya-gap-block: clamp(16px, 1.7vw, 24px);
    --ya-gap-inline: clamp(12px, 1.3vw, 18px);

    /* 布局尺寸 */
    --ya-header-h: 62px;
    /* 播放器高度（≥1024 生效；≤1023.98 播放器走 16:9 比例，本值不生效）
       ⚠️ 必须做成令牌而不是写死在 .ya-player-box 上：
          播放页的「左播放器 / 右速览」要严格等高，靠的是
          .yx-play__top 的 grid-template-rows 引用【同一个值】。
          两处各写一遍 clamp(...) 迟早会改一处忘一处 —— 等高就悄悄失效了（不报错、无日志）。 */
    --ya-player-h: clamp(460px, 36vw, 560px);

    /* 页内锚点补偿：顶栏是 sticky 的，跳转目标要落到它【下方】而不是被它盖住。
       值 = 顶栏高度 + 呼吸位；所有 scroll-margin-top 一律引用本令牌（禁止再写裸值） */
    --ya-anchor-offset: calc(var(--ya-header-h) + 16px);
}

@media (max-width: 767.98px) {
    :root {
        --ya-gap-block: 14px;
        --ya-gap-inline: 10px;
        --ya-radius-lg: 12px;
        --ya-radius-xl: 18px;
        /* 移动端顶栏是两行制（见第 5 节媒体查询）：
           总高 = --ya-header-h(62) + row-gap(10) + 搜索行(44) + padding-bottom(12) = 128，
           再 + 16 呼吸位。四个数字与顶栏块一一对应，改那边必须同步这里，
           否则 #ya-episodes / 简介锚点跳转会藏到吸顶顶栏后面（不报错、肉眼才会发现） */
        --ya-anchor-offset: calc(var(--ya-header-h) + 10px + 44px + 12px + 16px);
    }
}

/* --------------------------------------------------------------------------
   2. 基础排版与页面底色
   （图标尺寸类见本节末：.ya-ico / .ya-ico--sm / .ya-ico--lg）
   -------------------------------------------------------------------------- */
body {
    min-height: 100vh;
    background: var(--ya-bg);
    color: var(--ya-text);
    font-family: var(--ya-body);
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    /* 移动端抽屉开启时的滚动锁（JS 切 html.ya-lock） */
}

/* 页内锚点（详情页/播放页的「选集 · 简介」）平滑滚动。
   必须写在 html 上：写在 body 或滚动容器上对 window 滚动无效。
   ⚠️ 顶栏是 sticky 的 → 光有平滑滚动还不够，目标元素本身要带 scroll-margin-top
      （见令牌 --ya-anchor-offset 与 .ya-episodes / .yx-*-story 的登记处） */
html { scroll-behavior: smooth; }

html.ya-lock,
html.ya-lock body {
    overflow: hidden;
    overscroll-behavior: contain;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .18s var(--ya-ease), background-color .18s var(--ya-ease);
}

h1, h2, h3, h4 {
    font-family: var(--ya-display);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
}

/* 正文阅读块（.ya-copy）的唯一定义在第 13 节「面板」里 ——
   此处原本还有一份 .ya-copy（max-width:76ch + 14.5px），与那份字号/行高互相覆盖，
   两份并存的净效果是「宽 76ch、字号 14px」：播放页/详情页的剧情简介只占半栏。
   已合并到第 13 节，宽度限制取消（需求方明确要求简介铺满面板）。 */

.ya-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

:focus-visible {
    outline: 2px solid var(--ya-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* 图标尺寸（替代写内联 style="width:16px;height:16px;fill:currentColor"）
   ⚠️ 模板里一律不写内联样式 —— 尺寸也走类 */
.ya-ico { width: 16px; height: 16px; flex: 0 0 auto; fill: currentColor; }
.ya-ico--sm { width: 15px; height: 15px; }

/* --------------------------------------------------------------------------
   3. 容器
   标准写法：min(calc(100% - gutter*2), shell)，不用视口百分比（noir 的教训）
   -------------------------------------------------------------------------- */
.ya-shell {
    width: min(calc(100% - (var(--ya-gutter) * 2)), var(--ya-shell));
    margin-inline: auto;
}

@media (max-width: 767.98px) {
    .ya-shell {
        width: min(calc(100% - 24px), var(--ya-shell));
    }
}

/* --------------------------------------------------------------------------
   4. 页面纵向节奏
   ⚠️ 首页/栏目页/详情页/播放页的根元素都只包一层 .ya-shell，
      板块间距必须落在 .ya-shell 上（写在 yx- 根上只有一个子元素 = 等于没写）。
      具体规则见 ya-theme.css 第 3.0b 节（那一份是唯一定义处，这里只留指针）。
   ⚠️ 2026-09-15 起首页【不再有左侧常驻频道栏】：频道菜单上移到顶栏
      （全站导航，见 widget/channel_nav.html），正文随之变成通栏单列。
      原先的 .ya-layout / .ya-layout__side / --ya-rail-w 三件套已整体删除 ——
      留着会诱导后来者把某页改回双栏，而菜单已经不在那里了。
   -------------------------------------------------------------------------- */


/* --------------------------------------------------------------------------
   5. 顶部栏
   ⚠️ 不含 border-bottom：用投影 + 底色差与内容分层
   -------------------------------------------------------------------------- */
.ya-header {
    position: sticky;
    top: 0;
    z-index: 40;
    /* 不用 color-mix()：兼容性不稳（房规）。用 rgba 叠暖白底 */
    background: rgba(250, 248, 244, .9);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: var(--ya-shadow-sm);
    transition: box-shadow .24s var(--ya-ease);
}
/* 吸附态：JS 只切 .is-stuck；视觉全在 CSS（房规第 ① 条）
   已吸附时加一档投影 —— 用阴影而非 border-bottom（线条纪律） */
.ya-header.is-stuck { box-shadow: var(--ya-shadow-md); }

.ya-header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--ya-header-h);
}

.ya-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-height: 44px;
}
.ya-brand__logo { height: 30px; width: auto; }

/* 品牌 logo 兜底：<img> 加载失败时由 ya-main.js 摘掉 [hidden]，改显文字标识
   —— 替代内联 onerror + style="display:none"（本模板零内联样式/事件）
   ⚠️ 必须显式写 [hidden]：这些类自带 display，会盖掉 UA 的 [hidden]{display:none} */
.ya-brand__logo[hidden],
.ya-brand__fallback[hidden],
.ya-auth__logo[hidden],
.ya-auth__fallback[hidden],
.ya-footer__logo[hidden],
.ya-footer__fallback[hidden] { display: none; }
.ya-brand__fallback { display: inline-flex; align-items: center; gap: 9px; }
.ya-brand__mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--ya-zhu), var(--ya-zhu-strong));
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5);
    color: #fff;
    font-family: var(--ya-plaque);
    font-size: 15px;
    font-weight: 700;
}
.ya-brand__copy { display: grid; line-height: 1.25; }
.ya-brand__copy strong { font-size: 15px; font-weight: 700; }
.ya-brand__copy small { color: var(--ya-text-muted); font-size: 11px; }

/* 搜索（控件，允许描边）
   ⚠️ 尺寸口径 = 右侧动作组内的「定宽 + 可收缩」，不是 flex:1。
      顶栏信息架构是「左品牌 / 右（搜索 + 账号）」：搜索框能贴到用户图标左边，
      靠的是定宽 + 动作组自身的 margin-left:auto。
      一旦改回 flex:1 1 auto，它会重新吃满品牌与动作组之间的空白 → 视觉上又贴回 logo。 */
.ya-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    width: min(340px, 32vw);
    padding: 0 6px 0 12px;
    min-height: 42px;
    border: 1px solid var(--ya-line);
    border-radius: 999px;
    background: var(--ya-surface-1);
    transition: border-color .18s var(--ya-ease), box-shadow .18s var(--ya-ease);
}
.ya-search:focus-within {
    border-color: var(--ya-accent);
    box-shadow: 0 0 0 3px var(--ya-accent-soft);
}
.ya-search svg { width: 17px; height: 17px; flex: 0 0 auto; stroke: var(--ya-text-muted); fill: none; stroke-width: 2; }
.ya-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: none;
    color: var(--ya-text);
    font-size: 13.5px;
    min-height: 40px;
}
.ya-search input:focus { outline: none; }
.ya-search input::placeholder { color: var(--ya-text-muted); }
.ya-search button {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--ya-accent);
    color: var(--ya-accent-ink);
    font-size: 13px;
    cursor: pointer;
}
.ya-search button:hover { background: var(--ya-accent-strong); }

/* 顶栏主菜单挂载点
   ≥1024：展开成横排菜单（见第 6 节的桌面形态）
   <1024：频道菜单整棵被 ya-main.js 搬进抽屉 —— 这里随之收起，
          否则空盒子仍会占用 .ya-header__inner 的 flex gap，把品牌与搜索推到两边 */
.ya-header__nav { display: none; }

.ya-header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.ya-icon-action {
    display: inline-grid;
    place-items: center;
    /* ⚠️ 不可收缩：动作组里只有搜索框该让宽，图标被压扁会变成一条 19px 的细条 */
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    /* ⚠️ 抽屉按钮是 <button>，不清 UA 默认样式会漏出灰色硬底 + 描边
       （旁边的图标都是 <a> 没这个问题，于是只有菜单按钮「长毛边」） */
    border: 0;
    appearance: none;
    background: none;
    border-radius: 12px;
    color: var(--ya-text-soft);
    cursor: pointer;
    transition: background-color .18s var(--ya-ease), color .18s var(--ya-ease), transform .12s var(--ya-ease);
}
.ya-icon-action:hover { background: var(--ya-surface-2); color: var(--ya-text); }
.ya-icon-action:active { transform: scale(.94); }
.ya-icon-action svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; }

/* 抽屉触发按钮：升一档做「小卡片」—— 白底 + 柔和投影（模板的分层手段），
   不加 border（线条纪律）。它是移动端唯一常驻的菜单入口，值得比普通图标醒目 */
.ya-header [data-ya-drawer-open] {
    background: var(--ya-surface-1);
    box-shadow: var(--ya-shadow-sm);
}
.ya-header [data-ya-drawer-open]:hover { background: var(--ya-surface-2); }

/* 窄屏搜索入口（默认不显示，见下方断点）
   ⚠️ 必须写在 .ya-icon-action 之后：同为单类选择器，靠源码顺序决定 display 归属 */
.ya-header__searchlink { display: none; }

@media (max-width: 1279.98px) and (min-width: 1024px) {
    /* 1024~1279.98：顶栏要同时塞下「品牌 + 横排频道菜单 + 动作组」，
       完整搜索框（340px）会溢出 → 该区间退化成搜索图标入口。
       ⚠️ 区间两端都要写：≥1280 恢复完整搜索框；≤1023.98 顶栏没有横排菜单、
          中间反而放得下输入框（保持原有形态，不要顺手改成「≤1279.98 全隐藏」） */
    .ya-search { display: none; }
    .ya-header__searchlink { display: inline-grid; }
}
@media (max-width: 767.98px) {
    /* ≤767.98：顶栏两行制 —— 第 1 行「品牌 + 用户 + 抽屉」，第 2 行通栏搜索框。
       手机不再退化为图标入口：搜索是高频动作，真输入框常驻比跳搜索页少一步
       （1024~1279.98 的图标入口不变，那个区间是「放不下」，不是「不需要」）。
       做法：actions 用 display:contents 解散，图标与搜索框各自成为网格项；
       第 2 列留 1fr 空轨把图标推到右缘（display:contents 后 actions 的
       margin-left:auto 随盒子一起消失，不能再靠它右对齐）。
       ⚠️ 用户图标是条件渲染（user.status）：用 nth-last-child 从右往左定位 ——
          它在不在，抽屉按钮都贴右缘（col 4），不会空出一列错位。
       ⚠️ 搜索框规则必须带 .ya-header 前缀：.ya-search 同时是搜索页表单的类，
          那边的宽度/高度由 .yx-search__form 自己管，不能被顶栏规则波及。
       ⚠️ 本块的高度数字（row-gap 10 + 搜索行 44 + padding-bottom 12）与上方
          --ya-anchor-offset 的移动端覆写一一对应，改这里必须同步令牌。 */
    .ya-header__inner {
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        grid-template-rows: var(--ya-header-h) auto;
        align-items: center;
        gap: 10px 8px;
        padding-bottom: 12px;
    }
    .ya-header__actions { display: contents; }
    .ya-brand { grid-row: 1; grid-column: 1; }
    .ya-header .ya-icon-action { grid-row: 1; }
    .ya-header .ya-header__searchlink { display: none; }
    .ya-header .ya-icon-action:nth-last-child(2) { grid-column: 3; }
    .ya-header .ya-icon-action:last-child { grid-column: 4; }
    .ya-header .ya-search {
        grid-row: 2;
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
    }
    /* <16px 的输入框在 iOS 聚焦时会触发整页自动放大 */
    .ya-header .ya-search input { font-size: 16px; }
    .ya-brand__copy small { display: none; }
}
@media (min-width: 1024px) {
    /* 桌面端频道菜单常驻顶栏，抽屉按钮冗余 → 隐藏（与 JS 的 1024 断点严格配对） */
    .ya-header [data-ya-drawer-open] { display: none; }
}

/* --------------------------------------------------------------------------
   6. 频道菜单（顶栏主菜单 / 抽屉频道树 —— 同一个组件的两种形态）
   --------------------------------------------------------------------------
   形态全部由 CSS 决定，JS 只做两件事：把菜单「搬进/搬出抽屉」、切 data-open：
     · 本节基础规则 = 竖排折叠形态 → <1024px 的移动端抽屉（菜单被 JS 搬进去）
     · 本节末的 ≥1024px 媒体查询 = 顶栏横排 + 悬停下拉浮层
   两种形态共用同一份 DOM，子分类只写一次，不存在「顶栏一份、抽屉一份」的数据漂移。
   ⚠️ .ya-nav / .ya-header__nav 及其所有祖先【禁止 overflow: hidden / auto / scroll】：
      桌面形态的浮层是 .ya-nav__item 的绝对定位子元素，祖先一裁切浮层就被切掉
      （不报错、无日志，只能在浏览器里肉眼发现）。
   -------------------------------------------------------------------------- */
.ya-nav { display: grid; gap: 2px; }

.ya-nav__list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }

/* 同理不要给 __item 加 overflow：桌面浮层挂在它下面 */
.ya-nav__item { display: grid; }

.ya-nav__row { display: flex; align-items: center; }

.ya-nav__link {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    border-radius: var(--ya-radius-sm);
    font-size: 14px;
    color: var(--ya-text-soft);
}
.ya-nav__link:hover { background: var(--ya-surface-2); color: var(--ya-text); }
.ya-nav__link.is-active {
    background: var(--ya-accent-soft);
    color: var(--ya-accent-strong);
    font-weight: 600;
}

/* 子分类（竖排形态）：CSS 负责 grid-template-rows 过渡，JS 只切 data-open */
.ya-nav__sub {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .26s var(--ya-ease);
}
.ya-nav__item[data-open="1"] .ya-nav__sub { grid-template-rows: 1fr; }
.ya-nav__panel { min-height: 0; overflow: hidden; }
.ya-nav__panel nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px 10px 26px;
}
.ya-nav__panel nav a {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--ya-surface-2);
    color: var(--ya-text-soft);
    font-size: 12.5px;
}
.ya-nav__panel nav a:hover,
.ya-nav__panel nav a.is-active { background: var(--ya-accent-soft); color: var(--ya-accent-strong); }

.ya-nav__toggle {
    display: inline-grid;
    place-items: center;
    /* ⚠️ 不可收缩：flex 行里少了这条，caret 会被压成比图标还窄的一条细线 */
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin-left: 2px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--ya-text-muted);
    cursor: pointer;
}
.ya-nav__toggle:hover { background: var(--ya-surface-2); color: var(--ya-text); }
.ya-nav__toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; transition: transform .26s var(--ya-ease); }
.ya-nav__item[data-open="1"] .ya-nav__toggle svg { transform: rotate(90deg); }

/* 桌面形态：常驻顶栏，一级条目横排；子分类从折叠条改成下拉浮层 */
@media (min-width: 1024px) {
    .ya-header__nav {
        display: flex;
        align-items: center;
        flex: 0 1 auto;
        min-width: 0;
    }
    .ya-nav { display: flex; align-items: center; }
    .ya-nav__list { display: flex; align-items: center; gap: 2px; }
    /* ⚠️ 条目必须自建定位上下文：
       浮层是绝对定位的，若条目没有 position，它就会去找最近的已定位祖先 ——
       最终落到 .ya-header（sticky 也算已定位）上 → left:50% 变成「顶栏正中」，
       浮层跑到页面中间去，跟触发它的那个频道完全错位（实测浮层中心 529px vs 条目中心 218px）。
       height 取满顶栏高度，是为了让 top:100% 正好等于顶栏下沿，
       否则 top:100% = 条目下沿（38px 高、垂直居中 → 50px），浮层会压进顶栏里。 */
    .ya-nav__item { position: relative; height: var(--ya-header-h); }
    .ya-nav__link {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 0 11px;
        border-radius: 999px;
        white-space: nowrap;
    }
    .ya-nav__toggle { width: 22px; height: 22px; margin-left: -4px; border-radius: 6px; }

    /* 浮层：条目正下方居中。
       ⚠️ 这里的 padding-top 既是视觉间距、也是「hover 桥」——鼠标从条目移到卡片要经过这段，
          若改成 top: calc(100% + 8px)，指针在缝隙里会丢掉 :hover，浮层还没到手就关了。
          卡片外观放在 .ya-nav__panel 上，桥自身保持透明。 */
    .ya-nav__sub {
        position: absolute;
        top: 100%;
        left: 50%;
        display: block;
        /* ⚠️ 必须显式给宽度：绝对定位元素的默认宽度是「收缩到可用空间」，
           而这里的包含块已经变成一级条目本身（宽约 80px）→ 浮层被压成 ~34px 宽，
           里面的 3 列网格跟着塌掉，文字全挤成一竖条。
           max-width 兜住「子分类特别多 / 视口特别窄」时的横向溢出。 */
        width: max-content;
        max-width: min(520px, calc(100vw - 24px));
        grid-template-rows: none;
        padding-top: 10px;
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, 6px);
        transition: opacity .18s var(--ya-ease), transform .18s var(--ya-ease), visibility .18s;
    }
    /* 三种触发：悬停 / 键盘聚焦 / 点击 caret。
       ⚠️ aria-expanded 只跟随「点击」那条路径（CSS 悬停写不进 aria）——
          这是悬停下拉菜单的固有取舍，别为了对齐 aria 把悬停删掉。 */
    .ya-nav__item:hover > .ya-nav__sub,
    .ya-nav__item:focus-within > .ya-nav__sub,
    .ya-nav__item[data-open="1"] > .ya-nav__sub {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
    }
    .ya-nav__panel {
        overflow: visible;
        padding: 10px;
        border-radius: var(--ya-radius-md);
        background: var(--ya-surface-1);
        box-shadow: var(--ya-shadow-md);
    }
    .ya-nav__panel nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
        padding: 0;
    }
    .ya-nav__panel nav a { text-align: center; white-space: nowrap; }

    /* 箭头：顶栏常显「向下」（基座图标是右向 chevron → +90°），展开时翻成向上 */
    .ya-nav__toggle svg { transform: rotate(90deg); }
    .ya-nav__item:hover .ya-nav__toggle svg,
    .ya-nav__item:focus-within .ya-nav__toggle svg,
    .ya-nav__item[data-open="1"] .ya-nav__toggle svg { transform: rotate(-90deg); }
}

/* --------------------------------------------------------------------------
   7. 板块（section）
   ⚠️ 无 border-top 分隔 —— 靠 --ya-gap-block 的留白分层
   -------------------------------------------------------------------------- */
.ya-section { display: grid; gap: 14px; }

.ya-section__head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 32px;
}
.ya-section__head h2,
.ya-section__head h3 {
    font-size: 18px;
    font-weight: 700;
}
.ya-section__head em {
    font-style: normal;
    font-size: 12.5px;
    color: var(--ya-text-muted);
}
.ya-section__head .ya-section__more {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ya-accent-strong);
    white-space: nowrap;
}
.ya-section__head .ya-section__more:hover { gap: 8px; }

/* 板块头可选的小色块（替代线条的层级手段） */
.ya-section__dot {
    flex: 0 0 auto;
    width: 4px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--ya-accent), var(--ya-accent-strong));
}

/* --------------------------------------------------------------------------
   8. 影片卡片 · 雨幕卡
   ⚠️ 卡片本体不加 border，悬停【无位移无缩放】（基线的 translateY 旧签名已废弃）：
      签名 = 顶部瓦当带 + 悬停雨帘落定 + 檐灯转朱 + 门钉朱点
   -------------------------------------------------------------------------- */
.ya-vod-card {
    position: relative;
    min-width: 0;
    border-radius: var(--ya-radius-md);
    background: var(--ya-surface-1);
    box-shadow: var(--ya-shadow-sm);
    transition: box-shadow .22s var(--ya-ease);
}
.ya-vod-card:hover { box-shadow: var(--ya-shadow-md); }

/* 瓦当带：卡顶一排筒瓦圆头（半圆 repeat-x 挂在带沿下），默认瓦青、悬停转朱 */
.ya-vod-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    border-radius: var(--ya-radius-md) var(--ya-radius-md) 0 0;
    background:
        radial-gradient(circle 4px at 5.5px 3.5px, var(--ya-accent-strong) 97%, transparent 100%),
        linear-gradient(90deg, var(--ya-accent), var(--ya-accent-strong));
    background-size: 11px 8px, 100% 3.5px;
    background-repeat: repeat-x, no-repeat;
}
/* 檐灯点亮：悬停朱带 + 朱圆头淡入盖在默认带上 */
.ya-vod-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    border-radius: var(--ya-radius-md) var(--ya-radius-md) 0 0;
    background:
        radial-gradient(circle 4px at 5.5px 3.5px, var(--ya-zhu-strong) 97%, transparent 100%),
        linear-gradient(90deg, var(--ya-zhu), var(--ya-zhu-strong));
    background-size: 11px 8px, 100% 3.5px;
    background-repeat: repeat-x, no-repeat;
    opacity: 0;
    transition: opacity .25s var(--ya-ease);
    pointer-events: none;
}
.ya-vod-card:hover::after { opacity: 1; }
.ya-vod-card > a { display: block; padding: 9px 8px 8px; }

.ya-vod-card__pic {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: calc(var(--ya-radius-md) - 5px);
    background: var(--ya-surface-3);
    aspect-ratio: 2 / 3;
}
.ya-vod-card__pic img { width: 100%; height: 100%; object-fit: cover; transition: filter .25s var(--ya-ease); }
.ya-vod-card:hover .ya-vod-card__pic img { filter: brightness(1.05); }

/* 雨帘：斜切细线层，悬停自檐口落下定位（纯 opacity/transform） */
.ya-vod-card__pic::after {
    content: "";
    position: absolute;
    inset: -10% -14%;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(90deg, rgba(240, 244, 243, .16) 0 1px, transparent 1px 7px);
    transform: skewX(-7deg) translateY(-16px);
    opacity: 0;
    transition: transform .38s var(--ya-ease), opacity .38s var(--ya-ease);
}
.ya-vod-card:hover .ya-vod-card__pic::after {
    transform: skewX(-7deg) translateY(0);
    opacity: 1;
}

/* 封面角标只允许两种：左下「楼牌」+ 右上「瓦当章」。
   ⚠️ 曾经的第三个角标 .ya-vod-card__serial（左上序号）已被需求方否决并删除 ——
      编号是纯装饰、翻页就变，且在 6 列网格里跟另外两个角标挤同一块画面。
      不要再加回第三个角标（比如"更新至N集"），空间不够时优先动文案而不是加角标。 */
.ya-vod-card__note,
.ya-vod-card__score {
    position: absolute;
    z-index: 2;
    font-size: 11.5px;
    line-height: 1;
    backdrop-filter: blur(6px);
}
.ya-vod-card__note {
    left: 6px;
    bottom: 6px;
    max-width: calc(100% - 12px);
    padding: 4px 7px;
    border-radius: 3px;
    background: rgba(30, 34, 38, .66);
    color: #eef0ee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ya-vod-card__score {
    right: 6px;
    top: 7px;
    min-width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 50%;
    background: var(--ya-zhu);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55);
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ya-vod-card__body { display: grid; gap: 3px; padding: 9px 4px 5px; }
.ya-vod-card__body h3 {
    font-size: 13.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 门钉朱点：悬停在题名前亮起 */
.ya-vod-card__body h3::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 0;
    border-radius: 50%;
    background: var(--ya-zhu);
    vertical-align: 2px;
    opacity: 0;
    transform: scale(.4);
    transition: opacity .22s var(--ya-ease), transform .22s var(--ya-ease), margin-right .22s var(--ya-ease);
}
.ya-vod-card:hover .ya-vod-card__body h3::before {
    opacity: 1;
    transform: scale(1);
    margin-right: 5px;
}
.ya-vod-card:hover .ya-vod-card__body h3 { color: var(--ya-zhu-strong); }
.ya-vod-card__body p {
    font-size: 12px;
    color: var(--ya-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   9. 按钮 / 操作
   可交互控件允许描边（线条纪律第 ④ 条）
   -------------------------------------------------------------------------- */
.ya-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--ya-accent);
    color: var(--ya-accent-ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .18s var(--ya-ease), transform .18s var(--ya-ease);
}
.ya-action:hover { background: var(--ya-accent-strong); }
.ya-action:active { transform: scale(.985); }

.ya-action--ghost {
    background: var(--ya-surface-1);
    color: var(--ya-text);
    border: 1px solid var(--ya-line);
}
.ya-action--ghost:hover { background: var(--ya-surface-2); border-color: var(--ya-text-muted); }

.ya-action--soft { background: var(--ya-accent-soft); color: var(--ya-accent-strong); }
.ya-action--soft:hover { background: var(--ya-accent-soft-strong); }

/* 通用横向排布（按钮组 / 标签组 / 并排卡片） */
.ya-cluster { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ya-cluster--top { align-items: flex-start; }

/* --------------------------------------------------------------------------
   10. 徽标 / 胶囊
   -------------------------------------------------------------------------- */
.ya-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--ya-surface-2);
    color: var(--ya-text-soft);
    font-size: 12.5px;
}
.ya-chip:hover { background: var(--ya-accent-soft); color: var(--ya-accent-strong); }
.ya-chip--solid { background: var(--ya-accent); color: var(--ya-accent-ink); }
.ya-chip--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--ya-line); }

.ya-taglist { display: flex; flex-wrap: wrap; gap: 6px; }

/* --------------------------------------------------------------------------
   11. 表单（控件，允许描边）
   -------------------------------------------------------------------------- */
.ya-form { display: grid; gap: 14px; }
.ya-field { display: grid; gap: 6px; }
.ya-field > label,
.ya-field > span.ya-field__label { font-size: 12.5px; color: var(--ya-text-soft); }
.ya-field input[type="text"],
.ya-field input[type="password"],
.ya-field input[type="email"],
.ya-field input[type="tel"],
.ya-field input[type="number"],
.ya-field input[type="search"],
.ya-field textarea,
.ya-field select {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--ya-line);
    border-radius: var(--ya-radius-sm);
    background: var(--ya-surface-1);
    color: var(--ya-text);
    font-size: 14px;
    transition: border-color .18s var(--ya-ease), box-shadow .18s var(--ya-ease);
}
.ya-field textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.ya-field input:focus,
.ya-field textarea:focus,
.ya-field select:focus {
    outline: none;
    border-color: var(--ya-accent);
    box-shadow: 0 0 0 3px var(--ya-accent-soft);
}
/* --------------------------------------------------------------------------
   12. 分页（控件）
   -------------------------------------------------------------------------- */
.ya-pagination { display: grid; gap: 10px; }
.ya-pagination__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ya-pagination__row a,
.ya-pagination__row span.ya-pagination__meta {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--ya-line);
    border-radius: 12px;
    background: var(--ya-surface-1);
    font-size: 13px;
}
.ya-pagination__row a:hover { border-color: var(--ya-accent); color: var(--ya-accent-strong); }
.ya-pagination__row a.active {
    border-color: var(--ya-accent);
    background: var(--ya-accent);
    color: var(--ya-accent-ink);
    font-weight: 600;
}
.ya-pagination__meta { color: var(--ya-text-muted); border-style: dashed !important; }
.ya-pagination__compact { min-width: 110px !important; }
/* 桌面/移动两套 DOM 并存（房规：改样式要两边一起） */
.ya-pagination__mobile { display: none; }

@media (max-width: 767.98px) {
    .ya-pagination__desktop { display: none; }
    .ya-pagination__mobile { display: flex; }
}

/* --------------------------------------------------------------------------
   13. 面板（内容容器）
   -------------------------------------------------------------------------- */
.ya-panel {
    display: grid;          /* 面板内部自己管纵向节奏，调用方不用写 margin */
    gap: 12px;
    align-content: start;
    padding: clamp(14px, 1.5vw, 18px);
    border-radius: var(--ya-radius-lg);
    background: var(--ya-surface-1);
    box-shadow: var(--ya-shadow-sm);
}
.ya-panel--plain { background: var(--ya-surface-2); box-shadow: none; }

/* 正文阅读块：详情页与播放页共用（两页描述必须渲染成完全相同的 DOM）
   ⚠️ 不设 max-width —— 宽度由所在面板决定，铺满即可。
      旧版曾收敛到 76ch，在整幅面板里表现为「简介只占一半版面」（需求方已否决）。
      需要收窄的场合请在【调用方容器】上加宽度，不要回到这里加 max-width：
      否则播放页/详情页/资讯页会各自被裁一次，长短不一。 */
.ya-copy { font-size: 14px; line-height: 1.9; color: var(--ya-text-soft); overflow-wrap: anywhere; }
.ya-copy p + p { margin-top: 10px; }
.ya-copy img { max-width: 100%; height: auto; border-radius: var(--ya-radius-sm); }

/* --------------------------------------------------------------------------
   14. 空态
   -------------------------------------------------------------------------- */
.ya-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    padding: clamp(40px, 6vw, 72px) 20px;
    border-radius: var(--ya-radius-lg);
    background: var(--ya-surface-2);
    text-align: center;
}
.ya-empty h2 { font-size: 16px; }
.ya-empty p { color: var(--ya-text-muted); font-size: 13.5px; }

/* --------------------------------------------------------------------------
   15. 紧凑页头 + 面包屑（项目级硬约定，见 skill §4.3）
   12.5px 字号 / 42px 条高 / 总占位 56px；禁止大字 Hero
   -------------------------------------------------------------------------- */
.ya-pagehead { padding-top: 4px; }

.ya-pagebar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: var(--ya-radius-md);
    background: var(--ya-surface-1);
    box-shadow: var(--ya-shadow-sm);
}

.ya-pagebar__crumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--ya-text-muted);
    min-width: 0;
}
.ya-pagebar__crumb a { color: var(--ya-text-soft); }
.ya-pagebar__crumb a:hover { color: var(--ya-accent-strong); }
.ya-pagebar__crumb svg { width: 13px; height: 13px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2.2; opacity: .5; }
.ya-pagebar__crumb span[aria-current] {
    color: var(--ya-text);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ya-pagebar__side {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    min-width: 0;
}
.ya-pagebar__hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--ya-text-muted);
}
.ya-pagebar__hint b { color: var(--ya-text-soft); font-weight: 600; }
.ya-pagebar__hint i { font-style: normal; opacity: .45; }

/* 页头内的行内控件压到 28px */
.ya-pagebar__tabs { display: flex; gap: 4px; }
.ya-pagebar__tabs a {
    display: inline-grid;
    place-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--ya-surface-2);
    font-size: 12.5px;
    color: var(--ya-text-soft);
}
.ya-pagebar__tabs a.is-active { background: var(--ya-accent); color: var(--ya-accent-ink); font-weight: 600; }

/* 页头紧贴正文：后继元素不固定（板块 / 网格 / 筛选面板 / 榜单都可能），
   一律给 4px 而不是逐个枚举 —— 枚举会漏，漏掉的那个就会多出一段空白 */
.ya-pagehead + * { padding-top: 4px; }

@media (max-width: 767.98px) {
    /* ⚠️ 必须允许换行：__side 的 flex:1 1 100% 只有在 wrap 容器里才真的换到第二行。
       默认 nowrap 时它只在同一行里跟面包屑抢宽 —— 「首页 › 短剧 › 筛选」会被挤成竖排三行，
       而右侧状态字反而占了大半行（筛选页/频道页都中招）。换行后加回纵向内边距，两行才不贴边。 */
    .ya-pagebar { flex-wrap: wrap; gap: 6px 12px; min-height: 38px; padding: 6px 11px; font-size: 12px; }
    .ya-pagebar__crumb { font-size: 12px; }
    .ya-pagebar__side { flex: 1 1 100%; margin-left: 0; }
}

/* --------------------------------------------------------------------------
   15b. 不可用 / 门槛页（错误页、暂未开放栏目、未登录会员页共用）
   ⚠️ 无边框无线条：靠「大号数字 + 面卡片 + 大留白」建立层级
   -------------------------------------------------------------------------- */
.ya-unavailable { display: grid; place-items: center; padding: clamp(48px, 10vw, 120px) 20px; }
.ya-unavailable__box { display: grid; gap: 12px; justify-items: center; text-align: center; }
.ya-unavailable__code {
    font-size: clamp(52px, 9vw, 92px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
    color: var(--ya-accent-soft-strong);
}
.ya-unavailable__box h1 { font-size: clamp(19px, 2.4vw, 26px); }
.ya-unavailable__box p { color: var(--ya-text-muted); font-size: 13.5px; max-width: 46ch; line-height: 1.75; }

.ya-gate { display: grid; place-items: center; padding: clamp(32px, 6vw, 72px) 20px; }
.ya-gate__box {
    display: grid;
    gap: 14px;
    justify-items: center;
    width: min(100%, 480px);
    padding: clamp(24px, 3vw, 38px);
    border-radius: var(--ya-radius-lg);
    background: var(--ya-surface-1);
    box-shadow: var(--ya-shadow-md);
    text-align: center;
}
.ya-gate__box h1 { font-size: clamp(19px, 2.2vw, 24px); }
.ya-gate__box p { color: var(--ya-text-muted); font-size: 13.5px; line-height: 1.75; }
.ya-gate__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* --------------------------------------------------------------------------
   15c. 加载态（public/loading.html）
   ⚠️ 无边框：三个圆点做错峰缩放，只用 transform/opacity → 不触发重排
   -------------------------------------------------------------------------- */
.ya-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 26px 0;
}
.ya-loading__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ya-accent);
    opacity: .35;
    animation: ya-loading-pulse 1.05s var(--ya-ease) infinite;
}
.ya-loading__dot:nth-child(2) { animation-delay: .14s; }
.ya-loading__dot:nth-child(3) { animation-delay: .28s; }
@keyframes ya-loading-pulse {
    0%, 100% { opacity: .3; transform: scale(.82); }
    50%      { opacity: 1;  transform: scale(1); }
}

/* --------------------------------------------------------------------------
   16. 文字行列表（严禁 border-bottom 分隔 —— 线条纪律第 ① 条）
   用「间距 + hover 面变色 + 序号色块」建立行列感
   -------------------------------------------------------------------------- */
.ya-rows { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }

.ya-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 8px 12px;
    border-radius: var(--ya-radius-sm);
    transition: background-color .18s var(--ya-ease);
}
.ya-row:hover { background: var(--ya-surface-2); }

.ya-row__no {
    flex: 0 0 auto;
    width: 26px;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ya-text-muted);
    text-align: center;
}
.ya-rows > li:nth-child(-n + 3) .ya-row__no { color: var(--ya-accent); }

.ya-row__tt { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.ya-row__tt b {
    font-size: 13.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ya-row__tt em {
    font-style: normal;
    font-size: 12px;
    color: var(--ya-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ya-row__sc {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 700;
    color: var(--ya-accent-strong);
    font-variant-numeric: tabular-nums;
}
/* 无评分态：破折号用弱化色 —— 沿用强调绿会让「—」看起来像个可点的数据
   （子站大部分频道没有评分数据，这态是常态而不是异常） */
.ya-row__sc--none { color: var(--ya-text-muted); font-weight: 400; }

/* 站内埋点占位（MacCMS 原生 .mac_hits 触发器）
   ⚠️ 不要写成 style="display:none"：模板里一律不写内联样式，统一走这个类 */
.ya-hits { display: none; }

/* --------------------------------------------------------------------------
   17. 横向滚动条带（移动端与「胶片带」板块共用）
   -------------------------------------------------------------------------- */
.ya-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.ya-rail::-webkit-scrollbar { display: none; }
.ya-rail > * { flex: 0 0 auto; scroll-snap-align: start; }

/* --------------------------------------------------------------------------
   18. 移动端抽屉（导航与频道树共用）
   -------------------------------------------------------------------------- */
.ya-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 60;
    width: min(86vw, 340px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background: var(--ya-surface-1);
    box-shadow: var(--ya-shadow-lg);
    transform: translateX(102%);
    transition: transform .28s var(--ya-ease);
    visibility: hidden;
}
.ya-drawer[data-open="1"] { transform: translateX(0); visibility: visible; }

.ya-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
}
.ya-drawer__head strong { font-size: 14px; }
.ya-drawer__head button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: var(--ya-surface-2);
    color: var(--ya-text-soft);
    cursor: pointer;
}
.ya-drawer__head button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.ya-drawer__body {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 12px calc(16px + env(safe-area-inset-bottom));
}
/* ⚠️ 抽屉里的 .ya-nav 不需要任何覆写：频道菜单的基础形态就是「扁平竖排」
   （卡片底色/阴影只出现在桌面形态的浮层 .ya-nav__panel 上）。
   曾有一条 .ya-drawer__body .ya-channelrail { background:none; box-shadow:none } —— 
   在旧的「侧栏卡片」版本里是必须的，形态改扁平后就成了永远打不过别人的死规则。 */

.ya-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    border: 0;
    padding: 0;
    background: rgba(22, 27, 23, .44);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s var(--ya-ease), visibility .28s var(--ya-ease);
    cursor: pointer;
}
.ya-backdrop[data-open="1"] { opacity: 1; visibility: visible; }

/* --------------------------------------------------------------------------
   19. 页脚 · 檐廊影壁
   ⚠️ 无 border-top：檐口瓦当行 + 夜瓦底色差分层
   -------------------------------------------------------------------------- */
.ya-footer {
    margin-top: clamp(32px, 4vw, 56px);
    background:
        radial-gradient(900px 420px at 88% -6%, rgba(178, 66, 44, .16), transparent 62%),
        linear-gradient(180deg, #2a3036 0%, #20262b 46%, #171c20 100%);
    color: #ccd3d6;
}
/* 檐口瓦当行：整幅宽度的一排筒瓦圆头，压在深色页脚顶缘（替代 border-top） */
.ya-footer__eave {
    height: 8px;
    background:
        radial-gradient(circle 4px at 6px 3.5px, var(--ya-zhu-strong) 97%, transparent 100%),
        linear-gradient(90deg, #45525a, #303a41);
    background-size: 12px 8px, 100% 3.5px;
    background-repeat: repeat-x, no-repeat;
}
.ya-footer__wall {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
    gap: clamp(22px, 3vw, 44px);
    padding-block: clamp(56px, 4.6vw, 72px) clamp(28px, 3.2vw, 44px);
}
.ya-footer strong { display: block; margin-bottom: 10px; font-size: 13.5px; color: #eef1f2; }
/* 页脚品牌 logo：白 logo（深底），限宽限高防超宽横版 logo 撑破 1.5fr 栏；
   兜底块保持原来的纵向堆叠（成章一行 + 站名一行） */
.ya-footer__logo {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 200px);
    max-height: 52px;
    margin-bottom: 12px;
}
.ya-footer__fallback { display: block; }
.ya-footer__brand .ya-footer__mark {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
    border-radius: var(--ya-radius-sm);
    background: linear-gradient(135deg, var(--ya-zhu), var(--ya-zhu-strong));
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5);
    color: #fff;
    font-family: var(--ya-plaque);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}
.ya-footer__brand > strong { font-size: 16px; }
.ya-footer__brand p { margin-top: 8px; color: #9aa4a9; font-size: 13px; max-width: 44ch; }
.ya-footer a { color: #b7c0c4; }
.ya-footer__links a,
.ya-footer__meta a { display: block; font-size: 13px; line-height: 2.1; transition: color .18s var(--ya-ease); }
.ya-footer a:hover { color: #e29a7f; }
.ya-footer__meta span { display: block; color: #9aa4a9; font-size: 12.5px; line-height: 1.9; }

/* 门牌频道：方牌短胶囊（区别于顶栏的圆胶囊） */
.ya-footer__channels { min-width: 0; }
.ya-footer__pills { display: flex; flex-wrap: wrap; gap: 7px; }
.ya-footer__pills a {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .07);
    font-size: 12.5px;
    transition: background .18s var(--ya-ease), color .18s var(--ya-ease);
}
.ya-footer__pills a:hover { background: var(--ya-zhu); color: #fff; }

/* 朱门环回顶钮：悬停微旋如叩门 */
.ya-footer__top {
    position: absolute;
    top: 24px;
    right: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .26);
    color: #ccd3d6;
    transition: background .2s var(--ya-ease), box-shadow .2s var(--ya-ease), color .2s var(--ya-ease), transform .2s var(--ya-ease);
}
.ya-footer__top svg { width: 18px; height: 18px; }
.ya-footer__top:hover {
    background: var(--ya-zhu);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5);
    color: #fff;
    transform: rotate(-8deg);
}

/* 片尾字条 */
.ya-footer__strip { padding-block: 14px 18px; background: rgba(0, 0, 0, .22); }
.ya-footer__strip-in {
    font-size: 12.5px;
    letter-spacing: .1em;
    color: #879197;
}

@media (max-width: 1023.98px) {
    .ya-footer__wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ya-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
    .ya-footer__wall { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 64px; }
    .ya-footer__top { top: 14px; }
}

/* --------------------------------------------------------------------------
   20. 认证页（独立沉浸版式，不 include public/head）
   -------------------------------------------------------------------------- */
.ya-auth {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: 24px 16px;
    background:
        radial-gradient(1000px 520px at 12% -8%, var(--ya-accent-soft), transparent 68%),
        var(--ya-bg);
}
.ya-auth__shell {
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    gap: clamp(20px, 3vw, 44px);
    width: min(100%, 1000px);
    padding: clamp(20px, 2.6vw, 38px);
    border-radius: var(--ya-radius-xl);
    background: var(--ya-surface-1);
    box-shadow: var(--ya-shadow-lg);
}
.ya-auth__stage { display: grid; align-content: start; gap: 16px; }
.ya-auth__brand { display: flex; align-items: center; gap: 10px; }
.ya-auth__copy h1 { font-size: clamp(20px, 2.4vw, 27px); }
.ya-auth__copy p { margin-top: 8px; color: var(--ya-text-muted); font-size: 13.5px; }
.ya-auth__features { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ya-auth__features li {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--ya-radius-md);
    background: var(--ya-surface-2);
}
.ya-auth__features i { flex: 0 0 auto; color: var(--ya-accent); font-style: normal; font-weight: 700; }
.ya-auth__features b { display: block; font-size: 13.5px; }
.ya-auth__features em { font-style: normal; font-size: 12.5px; color: var(--ya-text-muted); }
.ya-auth__panel { display: grid; align-content: start; gap: 16px; }
.ya-auth__panel h2 { font-size: 19px; }
.ya-auth__links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.ya-auth__links a { color: var(--ya-accent-strong); }

/* 品牌（认证页不引 public/head，所以品牌层要自带一份） */
.ya-auth__logo { height: 32px; width: auto; }
.ya-auth__fallback { display: inline-flex; align-items: center; gap: 9px; }
.ya-auth__mark {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--ya-zhu), var(--ya-zhu-strong));
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5);
    color: #fff;
    font-family: var(--ya-plaque);
    font-size: 15px;
    font-weight: 700;
}
.ya-auth__fallback b { font-size: 15px; }
.ya-auth__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--ya-accent-soft);
    color: var(--ya-accent-strong);
    font-size: 12px;
    font-weight: 600;
    justify-self: start;
}
.ya-auth__note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 11px 13px;
    border-radius: var(--ya-radius-md);
    background: var(--ya-surface-2);
    color: var(--ya-text-muted);
    font-size: 12.5px;
    line-height: 1.6;
}
.ya-auth__note svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; fill: none; stroke: var(--ya-accent); stroke-width: 1.9; }

/* 表单 */
.ya-auth__form { display: grid; gap: 14px; }
.ya-auth__field { display: grid; gap: 6px; }
.ya-auth__field > span { font-size: 12.5px; color: var(--ya-text-soft); }
.ya-auth__field input {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--ya-line);
    border-radius: var(--ya-radius-md);
    background: var(--ya-bg);
    color: var(--ya-text);
    font-size: 14px;
    transition: border-color .18s var(--ya-ease), box-shadow .18s var(--ya-ease);
}
.ya-auth__field input:focus {
    outline: none;
    border-color: var(--ya-accent);
    box-shadow: 0 0 0 3px var(--ya-accent-soft);
}
.ya-auth__field--inline { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
/* 短信/邮箱验证码行：输入框 + 发送按钮并排（按钮与输入框同高，避免 46px 基线错位） */
.ya-auth__field--send { align-items: end; }
.ya-auth__send {
    height: 46px;
    padding: 0 16px;
    border: 1px solid var(--ya-accent);
    border-radius: var(--ya-radius-md);
    background: var(--ya-accent-soft);
    color: var(--ya-accent-strong);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s var(--ya-ease), color .18s var(--ya-ease);
}
.ya-auth__send:hover { background: var(--ya-accent-soft-strong); }
.ya-auth__send[disabled] { opacity: .55; cursor: default; }
.ya-auth__field--inline label { display: grid; gap: 6px; }
.ya-auth__verify {
    height: 46px;
    width: 112px;
    border-radius: var(--ya-radius-md);
    object-fit: cover;
    cursor: pointer;
    background: var(--ya-surface-2);
}
.ya-auth__steps { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ya-auth__step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    background: var(--ya-surface-2);
    color: var(--ya-text-muted);
    font-size: 12.5px;
}
.ya-auth__step i {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ya-surface-3);
    font-style: normal;
    font-size: 11.5px;
    font-weight: 700;
}
.ya-auth__step.is-active { background: var(--ya-accent-soft); color: var(--ya-accent-strong); font-weight: 600; }
.ya-auth__step.is-active i { background: var(--ya-accent); color: var(--ya-accent-ink); }

/* 多步表单：未激活的一步整块收起（JS 只切 no-show 这一个类） */
.no-show { display: none; }

.ya-auth__error {
    display: none;
    padding: 9px 12px;
    border-radius: var(--ya-radius-sm);
    background: var(--ya-surface-2);
    color: var(--ya-danger);
    font-size: 12.5px;
}
.ya-auth__submit { width: 100%; }
.ya-auth__oauth { display: grid; gap: 10px; }
.ya-auth__oauth h3 { font-size: 12.5px; color: var(--ya-text-muted); font-weight: 500; }
.ya-auth__oauth-list { display: flex; gap: 10px; }
.ya-auth__oauth-item {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--ya-radius-md);
    background: var(--ya-surface-2);
    color: var(--ya-text-soft);
}
.ya-auth__oauth-item:hover { background: var(--ya-accent-soft); color: var(--ya-accent-strong); }
.ya-auth__oauth-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* 分享行的前置小标签（无边框，纯字重区分） */
.ya-chiplabel { font-size: 12.5px; color: var(--ya-text-muted); }

@media (max-width: 767.98px) {
    .ya-auth { place-items: start center; padding: 12px; }
    .ya-auth__shell { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px 16px; }
    .ya-auth__features { display: none; }
}

/* --------------------------------------------------------------------------
   21. 详情 / 播放共用：信息事实表
   ⚠️ 无行分割线，用 dt 字色 + dd 字重建立层级
   -------------------------------------------------------------------------- */
.ya-facts { display: grid; gap: 2px; }
.ya-facts > div {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
}
.ya-facts dt { color: var(--ya-text-muted); font-size: 12.5px; }
.ya-facts dd { font-size: 13.5px; overflow-wrap: anywhere; }
.ya-facts dd.ya-facts__links { display: flex; flex-wrap: wrap; gap: 5px; }
.ya-facts dd.ya-facts__links a {
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--ya-surface-2);
    font-size: 12.5px;
}
.ya-facts dd.ya-facts__links a:hover { background: var(--ya-accent-soft); color: var(--ya-accent-strong); }
/* 与海报并排时让事实表吃掉剩余宽度 */
.ya-facts--grow { flex: 1 1 260px; }

/* --------------------------------------------------------------------------
   22. 选集抽屉（播放页 / 详情页共用）
   整块一张卡片；展开态只在展开时给 padding-bottom（否则 0fr 收不干净）
   -------------------------------------------------------------------------- */
.ya-episodes {
    border-radius: var(--ya-radius-lg);
    background: var(--ya-surface-1);
    box-shadow: var(--ya-shadow-sm);
    overflow: hidden;
    /* 详情页/播放页都有 href="#ya-episodes" 的内链 → 必须补偿吸顶顶栏 */
    scroll-margin-top: var(--ya-anchor-offset);
}
.ya-episodes__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 18px;
    cursor: pointer;
}
.ya-episodes__bar-info { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.ya-episodes__bar-info strong { font-size: 15px; }
.ya-episodes__bar-info span { font-size: 12.5px; color: var(--ya-text-muted); }
.ya-episodes__bar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    font-size: 12.5px;
    color: var(--ya-accent-strong);
}
.ya-episodes__bar-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; transition: transform .26s var(--ya-ease); }
.ya-episodes[data-open="1"] .ya-episodes__bar-toggle svg { transform: rotate(180deg); }

.ya-episodes__wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .28s var(--ya-ease);
}
.ya-episodes[data-open="1"] .ya-episodes__wrap { grid-template-rows: 1fr; }
.ya-episodes__inner {
    min-height: 0;
    overflow: hidden;
    display: grid;
    gap: 16px;
    padding: 0 18px;
}
.ya-episodes[data-open="1"] .ya-episodes__inner {
    padding-bottom: 18px;
    /* 【必查项】展开态必须给高度上限 + 内滚。
       多线路 × 40 集不设上限会把页面撑到 4~5 屏，把下面的简介/推荐全挤走。
       家族口径：cine 的 .cb-episode-panel__body 是 max-height:46vh（移动 360px），
       这里统一成 min(46vh, 560px)，矮屏不溢出、高屏不浪费。 */
    max-height: min(46vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
/* 细滚动条（避免默认滚动条打断「无线条」观感） */
.ya-episodes__inner::-webkit-scrollbar { width: 8px; }
.ya-episodes__inner::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
    background-color: var(--ya-line);
}
.ya-episodes__inner::-webkit-scrollbar-thumb:hover { background-color: var(--ya-accent); }
@media (max-width: 767.98px) {
    .ya-episodes[data-open="1"] .ya-episodes__inner { max-height: 340px; }
}

.ya-source { display: grid; gap: 10px; }
.ya-source__head { display: flex; align-items: center; gap: 8px; }
.ya-source__head h3 { font-size: 14px; }
.ya-source__head i {
    font-style: normal;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ya-accent-soft);
    color: var(--ya-accent-strong);
    font-size: 11.5px;
}
.ya-source__list { display: flex; flex-wrap: wrap; gap: 7px; }
.ya-source__list a {
    display: inline-grid;
    place-items: center;
    min-width: 48px;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 10px;
    background: var(--ya-surface-2);
    font-size: 13px;
    color: var(--ya-text-soft);
}
.ya-source__list a:hover { background: var(--ya-accent-soft); color: var(--ya-accent-strong); }
.ya-source__list a.is-active { background: var(--ya-accent); color: var(--ya-accent-ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   23. 播放器舱体
   -------------------------------------------------------------------------- */
.ya-player-box {
    position: relative;
    border-radius: var(--ya-radius-lg);
    background: #10160f;
    box-shadow: var(--ya-shadow-lg);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.ya-player-box .MacPlayer,
.ya-player-box iframe,
.ya-player-box video { width: 100%; height: 100%; }

@media (min-width: 1024px) {
    .ya-player-box { aspect-ratio: auto; height: var(--ya-player-h); }
}

/* --------------------------------------------------------------------------
   24. 第三方播放入口面板
   -------------------------------------------------------------------------- */
.ya-thirdparty {
    position: relative;
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 260px;
    overflow: hidden;
    background: #0f1512;
}
.ya-thirdparty__poster {
    position: absolute;
    inset: 0;
    /* 海报走 <img> 而非 background-image：模板里因此不需要写任何内联样式，
       还能吃到 loading="lazy" / decoding="async" 的原生优化 */
    overflow: hidden;
    background: var(--ya-surface-3);
    /* 只用两档：blur(80px+) + opacity ≤ .45（中等模糊会把暗部色带放大成「脏」） */
    filter: blur(90px) saturate(1.3);
    opacity: .42;
    transform: scale(1.15);
}
.ya-thirdparty__poster img { width: 100%; height: 100%; object-fit: cover; }
.ya-thirdparty__scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(120% 90% at 50% 110%, rgba(8, 20, 15, .82), rgba(8, 16, 12, .58));
}
.ya-thirdparty__hit { position: absolute; inset: 0; z-index: 6; }
.ya-thirdparty__hud {
    position: relative;
    z-index: 4;
    display: grid;
    gap: 14px;
    place-items: center;
    padding: 24px;
    pointer-events: none;
    text-align: center;
    color: #eef3ef;
}
.ya-thirdparty__brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: 12.5px;
}
.ya-thirdparty__brand i { width: 7px; height: 7px; border-radius: 50%; background: var(--ya-accent); }
.ya-thirdparty__name { font-size: clamp(17px, 2vw, 23px); font-weight: 700; }
.ya-thirdparty__ep { font-size: 13px; opacity: .8; }
.ya-thirdparty__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--ya-accent);
    color: var(--ya-accent-ink);
    font-weight: 600;
}
.ya-thirdparty__hint { font-size: 12px; opacity: .62; }
/* 焦点环画在可见按钮上；同时保留热区自身 :focus-visible 作为 :has() 不支持时的回退 */
.ya-thirdparty__hit:focus-visible { outline: 2px solid rgba(255, 255, 255, .9); outline-offset: -4px; }
.ya-thirdparty:has(.ya-thirdparty__hit:focus-visible) .ya-thirdparty__cta {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   25. 动效与无障碍
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (hover: none) {
    .ya-vod-card:hover { box-shadow: var(--ya-shadow-sm); }
    .ya-vod-card::after,
    .ya-vod-card__pic::after { display: none; }
    .ya-vod-card:hover .ya-vod-card__pic img { filter: none; }
}

/* 横向安全区（全站现状 0 命中，本模板补齐四边） */
.ya-header__inner,
.ya-footer__wall {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
}

/* --------------------------------------------------------------------------
   26. 筛选器（module/filter 专用）
   ⚠️ 无行分割线：靠分组间距 + 胶囊选中态区分
   -------------------------------------------------------------------------- */
.ya-filter {
    display: grid;
    gap: 0;
    padding: clamp(14px, 1.6vw, 18px);
    border-radius: var(--ya-radius-lg);
    background: var(--ya-surface-1);
    box-shadow: var(--ya-shadow-sm);
}
.ya-filter__mobile-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--ya-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.ya-filter__mobile-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.ya-filter__body { display: grid; gap: 14px; }

.ya-filter__row { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; }
.ya-filter__row > strong {
    padding-top: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ya-text-muted);
}
.ya-filter__items { display: flex; flex-wrap: wrap; gap: 5px; }
.ya-filter__items a {
    display: inline-grid;
    place-items: center;
    /* ⚠️ 不可收缩：胶囊按内容取宽（max-content）。
       不写这条时 flex-shrink 会把「全部」「福建话」压到比文字还窄 → 文字折成两行竖排；
       窄屏那条「nowrap + overflow-x:auto」的横滚兜底也就永远触发不了（先被压扁，轮不到溢出）。 */
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 13px;
    border-radius: 999px;
    background: var(--ya-surface-2);
    color: var(--ya-text-soft);
    font-size: 12.5px;
}
.ya-filter__items a:hover { background: var(--ya-accent-soft); color: var(--ya-accent-strong); }
.ya-filter__items a.active {
    background: var(--ya-accent);
    color: var(--ya-accent-ink);
    font-weight: 600;
}

/* 「展开更多筛选」：内层折叠，契约 [data-ya-extra][data-open]
   ⚠️ 与外层 `.ya-filter[data-ya-fold]`（仅窄屏生效）是两个独立契约，钩子名不可复用 */
.ya-filter__extra { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .26s var(--ya-ease); }
.ya-filter__extra[data-open="1"] { grid-template-rows: 1fr; }
.ya-filter__extra > div { min-height: 0; overflow: hidden; display: grid; gap: 14px; }
.ya-filter__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--ya-line);
    border-radius: 999px;
    background: var(--ya-surface-1);
    color: var(--ya-text-soft);
    font-size: 12.5px;
    cursor: pointer;
}
.ya-filter__toggle:hover { border-color: var(--ya-accent); color: var(--ya-accent-strong); }
.ya-filter__toggle svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform .22s var(--ya-ease);
}
.ya-filter__extra[data-open="1"] ~ .ya-filter__actions .ya-filter__toggle svg { transform: rotate(180deg); }
/* 左对齐（原为居中）：筛选面板在筛选页是整幅宽容器，居中的胶囊会飘在面板正中，
   与上方「标签在左、胶囊在右」的行结构对不齐；贴左与行首对齐更像面板自身的控件 */
.ya-filter__actions { display: flex; justify-content: flex-start; }

@media (max-width: 1023.98px) {
    /* 移动端：筛选器整体折叠为一条胶囊按钮 */
    .ya-filter__mobile-toggle { display: flex; }
    .ya-filter__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .26s var(--ya-ease); }
    .ya-filter[data-open="1"] .ya-filter__body { grid-template-rows: 1fr; }
    .ya-filter__body > div { min-height: 0; overflow: hidden; }
    .ya-filter[data-open="1"] .ya-filter__body > div { padding-top: 12px; }
    .ya-filter__row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .ya-filter__row > strong { padding-top: 0; }
    /* 横滚兜底：选项过多时不撑破布局 */
    .ya-filter__items { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
    .ya-filter__items::-webkit-scrollbar { display: none; }
    /* 窄屏：外层「筛选条件」已承担展开语义，内层 extra 不再二次折叠，
       否则用户要连点两次才看得到年份/语言/排序 —— 按钮一并隐藏，避免两个折叠入口打架 */
    .ya-filter__actions { display: none; }
    .ya-filter__extra { grid-template-rows: 1fr; }
}

