/* ==========================================================================
   Prism 结构层（rb-base.css）
   --------------------------------------------------------------------------
   职责：设计令牌 + 通用组件 + 全站双栏骨架
   不含：页面专属骨架（在 rb-theme.css，yt- 命名空间）
   不含：主题身份的最终覆写（在 rb-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 条基准 + 扩展）
   注意：--rb-gap-block 在本层与 rb-theme.css 主题层【两层都定义】（房规要求）
   -------------------------------------------------------------------------- */
:root {
    /* 面：月霜丁香白 —— 冷调微紫的白，长时浏览不刺眼，也与兔毛的冷白呼应 */
    --rb-bg: #f4f2fa;
    --rb-bg-deep: #e9e5f4;
    --rb-surface-1: #fffefe;
    --rb-surface-2: #f7f5fc;
    --rb-surface-3: #eee9f8;

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

    /* 字：墨紫灰 */
    --rb-text: #241f31;
    --rb-text-soft: #524a68;
    --rb-text-muted: #8b83a1;

    /* 强调：胡萝卜橙 */
    --rb-accent: #e2762c;
    --rb-accent-strong: #bd5a15;
    --rb-accent-ink: #fffaf4;
    --rb-accent-soft: rgba(226, 118, 44, .12);
    --rb-accent-soft-strong: rgba(226, 118, 44, .22);

    /* 辅色：苔青绿（菜园叶色）/ 莓果红（评分·危险）/ 月石紫（页脚·装饰） */
    --rb-leaf: #3f8a63;
    --rb-leaf-strong: #2f6b4c;
    --rb-leaf-soft: rgba(63, 138, 99, .12);
    --rb-berry: #b8456a;
    --rb-berry-soft: rgba(184, 69, 106, .12);
    --rb-moon: #6a6390;
    --rb-moon-deep: #2a2340;

    /* 语义 */
    --rb-success: #3f8a63;
    --rb-warning: #c08a1e;
    --rb-danger: #c2415a;

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

    /* 圆角：兔耳拱门语言 —— 顶大底小的拱形，长圆胶囊作「兔耳」 */
    --rb-radius-sm: 6px;
    --rb-radius-md: 12px;
    --rb-radius-lg: 22px;
    --rb-radius-xl: 30px;
    --rb-arch: 22px 22px 10px 10px;
    --rb-arch-sm: 16px 16px 7px 7px;
    --rb-ear: 999px;

    /* 投影：丁香冷调柔影，用来「代替线条」，必须成套使用 */
    --rb-shadow-sm: 0 1px 2px rgba(58, 44, 92, .05), 0 3px 10px rgba(58, 44, 92, .06);
    --rb-shadow-md: 0 2px 4px rgba(58, 44, 92, .05), 0 12px 28px rgba(58, 44, 92, .09);
    --rb-shadow-lg: 0 4px 12px rgba(58, 44, 92, .06), 0 28px 64px rgba(58, 44, 92, .13);

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

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

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

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

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

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

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

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

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

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

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

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

.rb-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(--rb-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

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


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

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

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

/* 品牌 logo 兜底：<img> 加载失败时由 rb-main.js 摘掉 [hidden]，改显文字标识
   —— 替代内联 onerror + style="display:none"（本模板零内联样式/事件）
   ⚠️ 必须显式写 [hidden]：这两个类自带 display，会盖掉 UA 的 [hidden]{display:none} */
.rb-brand__logo[hidden],
.rb-brand__fallback[hidden],
.rb-auth__logo[hidden],
.rb-auth__fallback[hidden],
.rb-footer__logo[hidden],
.rb-footer__fallback[hidden] { display: none; }
.rb-brand__fallback { display: inline-flex; align-items: center; gap: 9px; }
.rb-brand__mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    /* 兔窝拱门小章：顶大底小，与卡片 --rb-arch 同一套几何语言 */
    border-radius: 14px 14px 6px 6px;
    background: radial-gradient(120% 120% at 30% 18%, #f0954c, var(--rb-accent) 48%, var(--rb-accent-strong));
    color: var(--rb-accent-ink);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(255, 253, 250, .7), 0 2px 8px rgba(189, 90, 21, .26);
}
.rb-brand__copy { display: grid; line-height: 1.25; }
.rb-brand__copy strong { font-size: 15px; font-weight: 700; }
.rb-brand__copy small { color: var(--rb-text-muted); font-size: 11px; }

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

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

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

.rb-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(--rb-text-soft);
    cursor: pointer;
    transition: background-color .18s var(--rb-ease), color .18s var(--rb-ease), transform .12s var(--rb-ease);
}
.rb-icon-action:hover { background: var(--rb-surface-2); color: var(--rb-text); }
.rb-icon-action:active { transform: scale(.94); }
.rb-icon-action svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; }

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

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

@media (max-width: 1279.98px) and (min-width: 1024px) {
    /* 1024~1279.98：顶栏要同时塞下「品牌 + 横排频道菜单 + 动作组」，
       完整搜索框（340px）会溢出 → 该区间退化成搜索图标入口。
       ⚠️ 区间两端都要写：≥1280 恢复完整搜索框；≤1023.98 顶栏没有横排菜单、
          中间反而放得下输入框（保持原有形态，不要顺手改成「≤1279.98 全隐藏」） */
    .rb-search { display: none; }
    .rb-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），不会空出一列错位。
       ⚠️ 搜索框规则必须带 .rb-header 前缀：.rb-search 同时是搜索页表单的类，
          那边的宽度/高度由 .yt-search__form 自己管，不能被顶栏规则波及。
       ⚠️ 本块的高度数字（row-gap 10 + 搜索行 44 + padding-bottom 12）与上方
          --rb-anchor-offset 的移动端覆写一一对应，改这里必须同步令牌。 */
    .rb-header__inner {
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        grid-template-rows: var(--rb-header-h) auto;
        align-items: center;
        gap: 10px 8px;
        padding-bottom: 12px;
    }
    .rb-header__actions { display: contents; }
    .rb-brand { grid-row: 1; grid-column: 1; }
    .rb-header .rb-icon-action { grid-row: 1; }
    .rb-header .rb-header__searchlink { display: none; }
    .rb-header .rb-icon-action:nth-last-child(2) { grid-column: 3; }
    .rb-header .rb-icon-action:last-child { grid-column: 4; }
    .rb-header .rb-search {
        grid-row: 2;
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
    }
    /* <16px 的输入框在 iOS 聚焦时会触发整页自动放大 */
    .rb-header .rb-search input { font-size: 16px; }
    .rb-brand__copy small { display: none; }
}
@media (min-width: 1024px) {
    /* 桌面端频道菜单常驻顶栏，抽屉按钮冗余 → 隐藏（与 JS 的 1024 断点严格配对） */
    .rb-header [data-rb-drawer-open] { display: none; }
}

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

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

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

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

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

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

.rb-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(--rb-text-muted);
    cursor: pointer;
}
.rb-nav__toggle:hover { background: var(--rb-surface-2); color: var(--rb-text); }
.rb-nav__toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; transition: transform .26s var(--rb-ease); }
.rb-nav__item[data-open="1"] .rb-nav__toggle svg { transform: rotate(90deg); }

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

    /* 浮层：条目正下方居中。
       ⚠️ 这里的 padding-top 既是视觉间距、也是「hover 桥」——鼠标从条目移到卡片要经过这段，
          若改成 top: calc(100% + 8px)，指针在缝隙里会丢掉 :hover，浮层还没到手就关了。
          卡片外观放在 .rb-nav__panel 上，桥自身保持透明。 */
    .rb-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(--rb-ease), transform .18s var(--rb-ease), visibility .18s;
    }
    /* 三种触发：悬停 / 键盘聚焦 / 点击 caret。
       ⚠️ aria-expanded 只跟随「点击」那条路径（CSS 悬停写不进 aria）——
          这是悬停下拉菜单的固有取舍，别为了对齐 aria 把悬停删掉。 */
    .rb-nav__item:hover > .rb-nav__sub,
    .rb-nav__item:focus-within > .rb-nav__sub,
    .rb-nav__item[data-open="1"] > .rb-nav__sub {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
    }
    .rb-nav__panel {
        overflow: visible;
        padding: 10px;
        border-radius: var(--rb-radius-md);
        background: var(--rb-surface-1);
        box-shadow: var(--rb-shadow-md);
    }
    .rb-nav__panel nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
        padding: 0;
    }
    .rb-nav__panel nav a { text-align: center; white-space: nowrap; }

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

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

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

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

/* --------------------------------------------------------------------------
   8. 影片卡片 —— 「月兔拱卡」（Xiaotu-001 签名组件）
   几何：顶大底小的兔窝拱门圆角（--rb-arch），海报再套一层 --rb-arch-sm 内拱，
        卡框与海报之间留 8px 雪白相框边。
   悬停签名 =「兔耳竖起 + 月晕」：海报顶缘垂下两只圆头长耳（scaleY 自顶展开），
        同时一层暖月晕自上方漫开，图片只做 filter 提亮，**本体不位移不缩放**
        （6 列网格里 translateY 会带着整行一起抖，需求方偏好已明确）。
   ⚠️ 本版允许卡框描边：卡片本体是 <a> 包裹的可交互控件（线条纪律第 ④ 条），
      描边只用于建立拱门轮廓，不用于内容分割。
   -------------------------------------------------------------------------- */
.rb-vod-card {
    position: relative;
    min-width: 0;
    border: 1px solid var(--rb-line-soft);
    border-radius: var(--rb-arch);
    background: linear-gradient(178deg, var(--rb-surface-1), var(--rb-surface-2) 64%, var(--rb-surface-1));
    box-shadow: var(--rb-shadow-sm);
    transition: border-color .26s var(--rb-ease), box-shadow .26s var(--rb-ease);
}
.rb-vod-card:hover,
.rb-vod-card:focus-within {
    border-color: rgba(226, 118, 44, .42);
    box-shadow: var(--rb-shadow-md);
}
.rb-vod-card > a { display: block; padding: 8px 8px 6px; }

.rb-vod-card__pic {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--rb-arch-sm);
    background: var(--rb-surface-3);
    aspect-ratio: 2 / 3;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55);
}
.rb-vod-card__pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter .34s var(--rb-ease);
}
.rb-vod-card:hover .rb-vod-card__pic img { filter: saturate(1.08) brightness(1.04); }

/* 悬停签名①：月晕 —— 暖白 radial 自海报上方漫开，只动 opacity，不动几何 */
.rb-vod-card__pic::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(82% 54% at 50% 6%, rgba(255, 243, 222, .36), rgba(255, 243, 222, 0) 64%);
    opacity: 0;
    transition: opacity .3s var(--rb-ease);
    pointer-events: none;
}
.rb-vod-card:hover .rb-vod-card__pic::after,
.rb-vod-card:focus-within .rb-vod-card__pic::after { opacity: 1; }

/* 悬停签名②：双兔耳 —— 一只用元素本体，另一只用 box-shadow 偏移复制，
   transform-origin: top 让耳朵是「竖起来」而不是滑进来。
   ⚠️ z-index 必须低于两个角标（角标 z-index:2），否则耳朵会压住评分章。 */
.rb-vod-card__pic::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(50% - 17px);
    z-index: 1;
    width: 11px;
    height: 44px;
    border-radius: var(--rb-ear);
    background: linear-gradient(180deg, rgba(255, 251, 246, .94), rgba(226, 118, 44, .26));
    box-shadow:
        0 0 0 1px rgba(226, 118, 44, .3),
        23px 0 0 0 rgba(255, 251, 246, .8),
        23px 0 0 1px rgba(226, 118, 44, .3);
    opacity: 0;
    transform: scaleY(.22);
    transform-origin: top center;
    transition: opacity .26s var(--rb-ease), transform .36s var(--rb-ease);
    pointer-events: none;
}
.rb-vod-card:hover .rb-vod-card__pic::before,
.rb-vod-card:focus-within .rb-vod-card__pic::before { opacity: 1; transform: scaleY(1); }

/* 封面角标只允许两种：左下「更新至N集」+ 右上评分。
   ⚠️ 曾经的第三个角标 .rb-vod-card__serial（左上序号）已被需求方否决并删除 ——
      编号是纯装饰、翻页就变，且在 6 列网格里跟另外两个角标挤同一块画面。
      不要再加回第三个角标，空间不够时优先动文案而不是加角标。 */
.rb-vod-card__note,
.rb-vod-card__score {
    position: absolute;
    z-index: 2;
    font-size: 11.5px;
    line-height: 1;
    border-radius: var(--rb-ear);
    backdrop-filter: blur(6px);
}
/* 更新状态签：雪白半透底 + 苔青描边 + 一颗胡萝卜橙「兔眼」圆点 */
.rb-vod-card__note {
    left: 7px;
    bottom: 7px;
    max-width: calc(100% - 14px);
    padding: 4px 9px;
    border: 1px solid rgba(63, 138, 99, .34);
    background: rgba(252, 250, 255, .84);
    color: var(--rb-leaf-strong);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rb-vod-card__note::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 5px;
    vertical-align: 1px;
    border-radius: var(--rb-ear);
    background: var(--rb-accent);
}
/* 评分：萝卜章 —— 橙色 radial 章面 + 雪白双环 + 顶缘两撇苔青萝卜叶 */
.rb-vod-card__score {
    right: 7px;
    top: 9px;
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    background: radial-gradient(124% 124% at 30% 20%, #f0954c, var(--rb-accent) 46%, var(--rb-accent-strong));
    color: var(--rb-accent-ink);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(255, 253, 250, .82), 0 3px 9px rgba(189, 90, 21, .3);
}
.rb-vod-card__score::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -6px;
    border-radius: var(--rb-ear);
    background: var(--rb-leaf);
    box-shadow: 8px 0 0 -1px var(--rb-leaf);
    transform: rotate(-13deg);
}
.rb-vod-card__body { display: grid; gap: 4px; padding: 10px 4px 6px; }
.rb-vod-card__body h3 {
    position: relative;
    padding-bottom: 5px;
    font-size: 13.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .24s var(--rb-ease);
}
/* 标题揭示线：橙→苔青渐隐短拱线，自左向右展开（不是分割线，末端透明） */
.rb-vod-card__body h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    border-radius: var(--rb-ear);
    background: linear-gradient(90deg, var(--rb-accent), var(--rb-leaf) 72%, rgba(63, 138, 99, 0));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .32s var(--rb-ease);
}
.rb-vod-card:hover .rb-vod-card__body h3,
.rb-vod-card:focus-within .rb-vod-card__body h3 { color: var(--rb-accent-strong); }
.rb-vod-card:hover .rb-vod-card__body h3::after,
.rb-vod-card:focus-within .rb-vod-card__body h3::after { transform: scaleX(1); }
.rb-vod-card__body p {
    font-size: 12px;
    color: var(--rb-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   9. 按钮 / 操作
   可交互控件允许描边（线条纪律第 ④ 条）
   -------------------------------------------------------------------------- */
.rb-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(--rb-accent);
    color: var(--rb-accent-ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .18s var(--rb-ease), transform .18s var(--rb-ease);
}
.rb-action:hover { background: var(--rb-accent-strong); }
.rb-action:active { transform: scale(.985); }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* --------------------------------------------------------------------------
   18. 移动端抽屉（导航与频道树共用）
   -------------------------------------------------------------------------- */
.rb-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(--rb-surface-1);
    box-shadow: var(--rb-shadow-lg);
    transform: translateX(102%);
    transition: transform .28s var(--rb-ease);
    visibility: hidden;
}
.rb-drawer[data-open="1"] { transform: translateX(0); visibility: visible; }

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

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

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

/* --------------------------------------------------------------------------
   19. 页脚 —— 「兔窝栅栏」（Xiaotu-001 签名页脚）
   结构：洞口栅栏带（一排半圆拱 + 月光渐隐）
        → 四栏内页（月轮品牌 / 频道窝胶囊 / 快速入口 / 站点信息）
        → 底栏（标语 + 回顶胶囊）→ 右下巨型落款水印
   明暗：全站唯一的深色区块（墨紫夜底），与丁香霜白正文形成「入夜」收束。
   ⚠️ 无 border-top：分层靠顶部栅栏带 + 底色差（线条纪律）
   -------------------------------------------------------------------------- */
.rb-footer {
    position: relative;
    margin-top: clamp(32px, 4vw, 56px);
    padding-block: clamp(34px, 3.8vw, 52px) clamp(20px, 2.2vw, 28px);
    overflow: hidden;
    background:
        radial-gradient(118% 82% at 50% -12%, rgba(226, 118, 44, .17), rgba(226, 118, 44, 0) 58%),
        linear-gradient(178deg, #2a2340, #1b1630 62%, #15112a);
    color: #cfcae4;
}

/* 洞口栅栏：一排半圆拱（兔窝入口）+ 底缘一条橙→苔青的月光渐隐线 */
.rb-footer__fence {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background:
        radial-gradient(circle 9px at 50% 0, rgba(247, 244, 253, .15) 98%, rgba(247, 244, 253, 0) 100%) 0 0 / 22px 20px repeat-x,
        linear-gradient(90deg, rgba(226, 118, 44, 0), rgba(226, 118, 44, .58) 20%, rgba(226, 118, 44, .26) 46%, rgba(63, 138, 99, .5) 74%, rgba(226, 118, 44, 0)) 0 100% / 100% 2px no-repeat;
}

.rb-footer__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.4fr) minmax(0, .9fr) minmax(0, 1.15fr);
    gap: clamp(20px, 2.6vw, 40px);
}

/* 品牌：月轮托站点 logo，无 logo 时由 rb-main.js 回退到「兔」字圆章 */
.rb-footer__brand { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.rb-footer__moon {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: var(--rb-ear);
    background: radial-gradient(122% 122% at 32% 24%, #4a4170, #2b2444 62%, #211b36);
    box-shadow:
        inset 0 0 0 1px rgba(247, 244, 253, .18),
        0 0 0 4px rgba(226, 118, 44, .12),
        0 8px 22px rgba(0, 0, 0, .34);
}
/* 月轮外圈的草编握纹：随页脚 hover 缓转，只动 transform */
.rb-footer__moon::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: var(--rb-ear);
    background: repeating-conic-gradient(from 0deg, rgba(247, 244, 253, .17) 0deg 6deg, rgba(247, 244, 253, 0) 6deg 14deg);
    -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%);
    mask: radial-gradient(circle, transparent 62%, #000 63%);
    opacity: .55;
    transition: transform .55s var(--rb-ease);
}
.rb-footer:hover .rb-footer__moon::after { transform: rotate(28deg); }
.rb-footer__logo { position: relative; z-index: 1; width: 34px; height: 34px; object-fit: contain; }
.rb-footer__fallback { position: relative; z-index: 1; display: grid; place-items: center; }
.rb-footer__fallback b {
    font-size: 24px;
    font-weight: 700;
    color: #f7f4fd;
    text-shadow: 0 2px 10px rgba(226, 118, 44, .5);
}
.rb-footer__id { display: grid; gap: 5px; min-width: 0; }
.rb-footer__id strong { font-size: 17px; font-weight: 700; color: #f7f4fd; letter-spacing: .3px; }
.rb-footer__id em {
    font-style: normal;
    font-size: 10.5px;
    letter-spacing: 1.7px;
    text-transform: uppercase;
    color: #f0954c;
}
.rb-footer__id p { font-size: 12.5px; line-height: 1.85; color: #a49dc0; max-width: 46ch; }

.rb-footer__col { display: grid; align-content: start; gap: 10px; min-width: 0; }
.rb-footer__col > strong {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #f7f4fd;
}
/* 栏目标题前的「双兔耳」小标记（第二只耳朵用 box-shadow 复制） */
.rb-footer__col > strong::before {
    content: "";
    flex: 0 0 auto;
    width: 5px;
    height: 13px;
    margin-right: 15px;
    border-radius: var(--rb-ear);
    background: linear-gradient(180deg, #f0954c, #bd5a15);
    box-shadow: 8px 0 0 0 rgba(63, 138, 99, .85);
}

/* 频道窝：胶囊云，悬停填成胡萝卜橙实底（近白字，禁黑字） */
.rb-footer__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-footer__chips a {
    display: inline-grid;
    place-items: center;
    min-height: 30px;
    padding: 0 13px;
    border: 1px solid rgba(247, 244, 253, .16);
    border-radius: var(--rb-ear);
    background: rgba(247, 244, 253, .05);
    color: #cfcae4;
    font-size: 12.5px;
    transition: border-color .22s var(--rb-ease), background-color .22s var(--rb-ease), color .22s var(--rb-ease);
}
.rb-footer__chips a:hover {
    border-color: rgba(226, 118, 44, .6);
    background: linear-gradient(180deg, #f0954c, #e2762c 58%, #bd5a15);
    color: #fffaf4;
    font-weight: 600;
}

.rb-footer__quick a,
.rb-footer__meta a,
.rb-footer__meta span {
    display: block;
    font-size: 12.5px;
    line-height: 2.05;
    color: #a49dc0;
}
.rb-footer__quick a { position: relative; padding-left: 15px; }
/* 快速入口前的苔青圆点，悬停转橙并微微胀大 */
.rb-footer__quick a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: var(--rb-ear);
    background: rgba(63, 138, 99, .85);
    transition: background-color .22s var(--rb-ease), transform .22s var(--rb-ease);
}
.rb-footer__quick a:hover { color: #f7f4fd; }
.rb-footer__quick a:hover::before { background: #f0954c; transform: scale(1.4); }
.rb-footer__meta a:hover { color: #f0954c; }

/* 底栏：上缘一条橙→苔青→月白的渐隐发光线（装饰，非分割线） */
.rb-footer__base {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: clamp(22px, 2.6vw, 34px);
    padding-top: clamp(15px, 1.7vw, 21px);
}
.rb-footer__base::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(226, 118, 44, 0), rgba(226, 118, 44, .5) 24%, rgba(63, 138, 99, .42) 56%, rgba(247, 244, 253, .18) 82%, rgba(247, 244, 253, 0));
}
.rb-footer__motto {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    letter-spacing: .4px;
    color: #a49dc0;
}
.rb-footer__motto i {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: var(--rb-ear);
    background: radial-gradient(circle at 34% 30%, #f7f4fd, #c9c2e2 58%, #8f87b2);
    box-shadow: 0 0 10px rgba(247, 244, 253, .45);
}
.rb-footer__top {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid rgba(226, 118, 44, .42);
    border-radius: var(--rb-ear);
    background: rgba(226, 118, 44, .12);
    color: #f7c79a;
    font-size: 12.5px;
    font-weight: 600;
    transition: border-color .24s var(--rb-ease), background-color .24s var(--rb-ease), color .24s var(--rb-ease);
}
.rb-footer__top svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.rb-footer__top:hover {
    border-color: rgba(226, 118, 44, .8);
    background: linear-gradient(180deg, #f0954c, #e2762c 58%, #bd5a15);
    color: #fffaf4;
}

/* 右下落款水印：装饰字，压在栅格之下（z-index 0），窄屏隐藏避免压字 */
.rb-footer__wm {
    position: absolute;
    right: clamp(8px, 2.6vw, 40px);
    bottom: clamp(72px, 9vw, 116px);
    z-index: 0;
    font-size: clamp(120px, 16vw, 200px);
    line-height: .8;
    font-weight: 700;
    color: rgba(247, 244, 253, .038);
    pointer-events: none;
    user-select: none;
}

@media (max-width: 1179.98px) {
    .rb-footer__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px 30px; }
    .rb-footer__brand { grid-column: 1 / -1; }
    /* 频道窝最多 12 枚胶囊：半宽会挤成三四行，通栏一行放下、
       剩下「快速入口 + 站点信息」正好凑满下一行（否则末行只剩一格空一半） */
    .rb-footer__channels { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
    .rb-footer__inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .rb-footer__base { flex-direction: column; align-items: stretch; gap: 12px; }
    .rb-footer__top { justify-content: center; }
    .rb-footer__wm { display: none; }
}

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

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

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

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

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

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

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

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

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

.rb-episodes__wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .28s var(--rb-ease);
}
.rb-episodes[data-open="1"] .rb-episodes__wrap { grid-template-rows: 1fr; }
.rb-episodes__inner {
    min-height: 0;
    overflow: hidden;
    display: grid;
    gap: 16px;
    padding: 0 18px;
}
.rb-episodes[data-open="1"] .rb-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;
}
/* 细滚动条（避免默认滚动条打断「无线条」观感） */
.rb-episodes__inner::-webkit-scrollbar { width: 8px; }
.rb-episodes__inner::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
    background-color: var(--rb-line);
}
.rb-episodes__inner::-webkit-scrollbar-thumb:hover { background-color: var(--rb-accent); }
@media (max-width: 767.98px) {
    .rb-episodes[data-open="1"] .rb-episodes__inner { max-height: 340px; }
}

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

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

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

/* --------------------------------------------------------------------------
   24. 第三方播放入口面板
   -------------------------------------------------------------------------- */
.rb-thirdparty {
    position: relative;
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 260px;
    overflow: hidden;
    background: #140f25;
}
.rb-thirdparty__poster {
    position: absolute;
    inset: 0;
    /* 海报走 <img> 而非 background-image：模板里因此不需要写任何内联样式，
       还能吃到 loading="lazy" / decoding="async" 的原生优化 */
    overflow: hidden;
    background: var(--rb-surface-3);
    /* 只用两档：blur(80px+) + opacity ≤ .45（中等模糊会把暗部色带放大成「脏」） */
    filter: blur(90px) saturate(1.3);
    opacity: .42;
    transform: scale(1.15);
}
.rb-thirdparty__poster img { width: 100%; height: 100%; object-fit: cover; }
.rb-thirdparty__scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(120% 90% at 50% 110%, rgba(16, 11, 32, .84), rgba(12, 8, 26, .6));
}
.rb-thirdparty__hit { position: absolute; inset: 0; z-index: 6; }
.rb-thirdparty__hud {
    position: relative;
    z-index: 4;
    display: grid;
    gap: 14px;
    place-items: center;
    padding: 24px;
    pointer-events: none;
    text-align: center;
    color: #f0ecfa;
}
.rb-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;
}
.rb-thirdparty__brand i { width: 7px; height: 7px; border-radius: 50%; background: var(--rb-accent); }
.rb-thirdparty__name { font-size: clamp(17px, 2vw, 23px); font-weight: 700; }
.rb-thirdparty__ep { font-size: 13px; opacity: .8; }
.rb-thirdparty__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--rb-accent);
    color: var(--rb-accent-ink);
    font-weight: 600;
}
.rb-thirdparty__hint { font-size: 12px; opacity: .62; }
/* 焦点环画在可见按钮上；同时保留热区自身 :focus-visible 作为 :has() 不支持时的回退 */
.rb-thirdparty__hit:focus-visible { outline: 2px solid rgba(255, 255, 255, .9); outline-offset: -4px; }
.rb-thirdparty:has(.rb-thirdparty__hit:focus-visible) .rb-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) {
    /* 触屏没有 hover：把「兔耳 + 月晕 + 描边点亮」三件签名一并还原，
       否则点按会留下粘滞的悬停态（tap 后 :hover 不释放）。 */
    .rb-vod-card:hover { border-color: var(--rb-line-soft); box-shadow: var(--rb-shadow-sm); }
    .rb-vod-card:hover .rb-vod-card__pic::before { opacity: 0; transform: scaleY(.22); }
    .rb-vod-card:hover .rb-vod-card__pic::after { opacity: 0; }
    .rb-vod-card:hover .rb-vod-card__pic img { filter: none; }
    .rb-vod-card:hover .rb-vod-card__body h3 { color: inherit; }
    .rb-vod-card:hover .rb-vod-card__body h3::after { transform: scaleX(0); }
}

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

/* --------------------------------------------------------------------------
   26. 筛选器（module/filter 专用）
   ⚠️ 无行分割线：靠分组间距 + 胶囊选中态区分
   -------------------------------------------------------------------------- */
.rb-filter {
    display: grid;
    gap: 0;
    padding: clamp(14px, 1.6vw, 18px);
    border-radius: var(--rb-radius-lg);
    background: var(--rb-surface-1);
    box-shadow: var(--rb-shadow-sm);
}
.rb-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(--rb-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.rb-filter__mobile-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

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

.rb-filter__row { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; }
.rb-filter__row > strong {
    padding-top: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--rb-text-muted);
}
.rb-filter__items { display: flex; flex-wrap: wrap; gap: 5px; }
.rb-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(--rb-surface-2);
    color: var(--rb-text-soft);
    font-size: 12.5px;
}
.rb-filter__items a:hover { background: var(--rb-accent-soft); color: var(--rb-accent-strong); }
.rb-filter__items a.active {
    background: var(--rb-accent);
    color: var(--rb-accent-ink);
    font-weight: 600;
}

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

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

