/*
 * 无界默认主题 —— 零售站版式骨架（移动优先，断点 768 / 1200）。
 *
 * 四条自律，改这个文件前先看：
 *  1. **不引外部资源**：没有 CDN 字体、没有 normalize.css、没有图标库。
 *     全站一套字体走 `--font`（系统 UI 栈：Windows 命中 Segoe UI、macOS 苹方、Linux 各自的界面字体，
 *     中文按 思源黑体 → 微软雅黑 排，后面 Arial 兜底）；只有代码块保留等宽栈。
 *     观感仍靠 font-weight 800 与负字距做（参考站用的是商用字体，不能带）。
 *  2. **颜色一律走令牌，规则里不写字面量**。分三层，按顺序读：
 *       :root 的「令牌（零）」 —— 后台注入的 --wj-*（空声明，见那段注释）
 *       :root 的「令牌（一）～（三）」 —— 中性层级、主色、强调色族 / 色板槽位 / 阴影
 *     组件层（按钮 / 标签 / 选项卡）只认这些名字；新增颜色先加令牌，再引用。
 *     现在这个文件里除了令牌定义与数据 URI 里的 SVG，已经没有 #rrggbb 了。
 *  3. **通用零件进组件层**，不再"一个按钮一个类"：按钮 .btn（尺寸 --sm/--xs，色调
 *     --primary/--ghost/--soft/--accent/--accent-ghost/--off）、标签 .tag（--md/--pill + 色族）、
 *     选项卡 .tabs/.tab（--md）、导航 .nav（皮肤变量 --nav-*）。
 *     模板里写成 `class="btn btn--xs btn--ghost 业务钩子"`：业务钩子只留位置与 JS 钩子，
 *     外观全部来自组件类 —— 改一次全站跟着改。
 *  4. **没有内联样式**：模板里不出现 style 属性，需要动态的东西（封面图）用 <img> + 定位类名解决。
 */

:root {
    /*
     * 主题令牌（零）：运行时注入变量的「空声明」。
     *
     * 这一组 --wj-* **不是**主题自己算出来的，是 CmsSiteRenderer#cssVars 在 <head> 里
     * 以 `<style>:root{…}</style>` 注入的（位置在本文件之后），值来自后台「样式配置」。
     * 本文件只读它们、不定义它们 —— 于是编辑器（IDEA / WebStorm 的 CSS 检查）看不到
     * 注入点，满屏「无法解析 '--wj-wrap' 自定义属性」标黄：改样式时真正的错误会被
     * 这堆噪声盖住，而且没人能从标黄处判断"这是运行时变量还是我漏写了"。
     *
     * 所以在这里补一份**与各处 var() 回落完全相同**的声明，纯粹为了让工具认得出这个名字。
     * 观感一点不变，理由如下：
     *   1. 注入的那段 <style> 排在后面、选择器同为 :root，同权重按文档顺序，注入值照样覆盖这里；
     *   2. 没注入时（关掉自定义样式）取到的就是这里的值，和原来 var(--wj-primary, #111111)
     *      的回落是同一个数 —— 「关掉 = 还原主题原样」这条依然成立。
     * ⚠️ 改这里的值必须同步改对应 var() 里的回落（反之亦然），两处必须一致；
     *    这是唯一的重复，留着是因为回落值同时也是"关掉自定义样式后的样子"的说明书。
     */
    --wj-primary: #111111;
    --wj-primary-soft: #f2f2f3;
    --wj-primary-line: #e2e2e4;
    --wj-secondary: #d23b12;
    --wj-secondary-soft: #fdf0ec;
    --wj-neutral: #111;
    --wj-base: #fff;
    --wj-body: #2e2e30;
    --wj-muted: #707072;
    --wj-line: #e5e5e5;
    --wj-soft: #f6f6f7;
    --wj-soft-strong: #ececef;
    --wj-page: #f6f7f9;
    --wj-error: #d23b12;
    --wj-success: #0a7a4b;
    --wj-info: #00b6ff;
    --wj-radius: 12px;
    --wj-radius-sm: 8px;
    --wj-wrap: 1440px;
    --wj-logo-size: 24px;
    /* 下面五个目前**没有**注入端（后台还没做这几项设置），只是给将来留的口子：
       声明出来是为了让"读它"的地方在工具里也有个确定的来源。 */
    --wj-btn-radius: 999px;
    --wj-card-pad: 12px;
    --wj-card-pad-wide: 14px;
    --wj-card-pad-lg: 16px;
    --wj-block-gap: 16px;
    --wj-cols-gap: 16px;

    /*
     * 主题令牌（一）：后台「样式配置」启用自定义样式变量时，CmsSiteRenderer#cssVars 会往
     * :root 注入一组 --wj-*；没启用时这些 --wj-* 根本不存在，于是整组回落到右边的默认值。
     * 这就是"关掉自定义样式 = 还原主题原样"的实现方式 —— 不是把一套没启用的颜色偷偷印上去。
     *
     * --brand 是**主色**，按钮、当前导航、链接强调、序号、组件标题条、标签底全读它。
     * 以前这些位置写死的是 #111，改主色只有零星两处变蓝 —— 这正是"样式配置没生效"的根因。
     */
    --brand: var(--wj-primary, #111111);
    --brand-soft: var(--wj-primary-soft, #f2f2f3);
    --brand-line: var(--wj-primary-line, #e2e2e4);
    --brand-2: var(--wj-secondary, #d23b12);
    --brand-2-soft: var(--wj-secondary-soft, #fdf0ec);

    /* 主题令牌（二）：正文层级与灰度。中性色一改，文字、分隔线、浅底一起走。 */
    --ink: var(--wj-neutral, #111);
    --body: var(--wj-body, #2e2e30);
    --muted: var(--wj-muted, #707072);
    --line: var(--wj-line, #e5e5e5);
    --soft: var(--wj-soft, #f6f6f7);
    --soft-strong: var(--wj-soft-strong, #ececef);
    /* 详情页/列表页的页面底色：比卡片白再退一层，卡片才有"浮起来"的层次 */
    --page: var(--wj-page, #f6f7f9);
    --hot: var(--wj-error, #d23b12);
    --sale: var(--wj-success, #0a7a4b);

    /*
     * 主题令牌（三）：语义强调色板 —— 组件层（文件末尾）唯一的取色口。
     *
     * 以前这些值是直接写进各条规则的：rgba(255, 46, 99, .35) 的粉色描边、#c26a00 的橙字、
     * #2563eb 的蓝底……同一个粉在关注键、勋章、热门标里各写一遍，连深浅与透明度都各写各的。
     * 想统一调一次色得全文搜索，还搜不全（.10 与 .14 的同一色会被当成两种）。
     *
     * 现在按「色族 × 三档」收在这里，一档一个变量：
     *   --h-<色>        色本身：实心底、描边、图标
     *   --h-<色>-ink    压在同色浅底上的文字（已压深，保证 4.5:1）
     *   --h-<色>-soft   10%~16% 透明度的浅底
     * 组件层只认这三个名字，不再出现 #ff2e63 这种字面量；换配色改这一组就够。
     */
    --on-brand: #fff;                 /* 主色 / 强调色实心底上的文字 */
    --accent: #ff2e63;                /* 品牌强调：关注那颗心、热门标、点赞 */
    --accent-ink: #d9006c;
    --accent-soft: rgba(255, 46, 99, .10);
    --accent-line: rgba(255, 46, 99, .35);

    --h-pink: var(--accent);
    --h-pink-ink: var(--accent-ink);
    --h-pink-soft: var(--accent-soft);

    --h-blue: #2563eb;
    --h-blue-ink: #1d4ed8;
    --h-blue-soft: rgba(37, 99, 235, .10);

    --h-orange: #ff9f43;
    --h-orange-ink: #c26a00;
    --h-orange-soft: rgba(255, 159, 67, .14);

    --h-green: #2bc48a;
    --h-green-ink: #14855c;
    --h-green-soft: rgba(43, 196, 138, .14);

    --h-violet: #9b6dff;
    --h-violet-ink: #6c3fd6;
    --h-violet-soft: rgba(155, 109, 255, .14);

    --h-cyan: #00b6ff;
    --h-cyan-ink: #0079ad;
    --h-cyan-soft: rgba(0, 182, 255, .14);

    --h-amber: #ffb300;
    --h-amber-ink: #9a6a00;
    --h-amber-soft: rgba(255, 179, 0, .16);

    --h-teal: #10b981;
    --h-teal-ink: #0b7a58;
    --h-teal-soft: rgba(16, 185, 129, .14);

    --h-gray: #6b7280;
    --h-gray-ink: #4b5563;
    --h-gray-soft: rgba(107, 114, 128, .12);

    /* 「按位置轮着换色」的那一圈（标签云、右栏序号块）：只读 --tone1…--tone8，
       想换顺序或整组换色改这 24 行，不用去动 nth-child。
       命名刻意避开 --c1/--c2 —— 那两个是头像渐变的槽位（由 site.js 按昵称算），
       名字撞上的话，凡是有 --c1 的地方都会跟着变成粉色。 */
    --tone1: var(--h-pink);
    --tone1-ink: var(--h-pink-ink);
    --tone1-soft: var(--h-pink-soft);
    --tone2: var(--h-orange);
    --tone2-ink: var(--h-orange-ink);
    --tone2-soft: var(--h-orange-soft);
    --tone3: var(--h-green);
    --tone3-ink: var(--h-green-ink);
    --tone3-soft: var(--h-green-soft);
    --tone4: var(--h-violet);
    --tone4-ink: var(--h-violet-ink);
    --tone4-soft: var(--h-violet-soft);
    --tone5: var(--h-cyan);
    --tone5-ink: var(--h-cyan-ink);
    --tone5-soft: var(--h-cyan-soft);
    --tone6: var(--h-amber);
    --tone6-ink: var(--h-amber-ink);
    --tone6-soft: var(--h-amber-soft);
    --tone7: var(--h-teal);
    --tone7-ink: var(--h-teal-ink);
    --tone7-soft: var(--h-teal-soft);
    --tone8: var(--h-gray);
    --tone8-ink: var(--h-gray-ink);
    --tone8-soft: var(--h-gray-soft);

    /* 名次牌（TOP1/2/3）：金银铜 + 冠军那档橙。跟上面的色族分开 ——
       名次不能因为"标签云换了个配色"就连带变绿。 */
    --medal-1: #ff8f00;
    --medal-2: #90a4ae;
    --medal-3: #ff5e62;

    /* 第三方平台认色：微信 / QQ / 微博 / 小红书。**故意不跟主题走** ——
       这几块是"认平台"的，主色换成蓝的站点上，微信那颗也该是微信绿。 */
    --plat-wechat: #07c160;
    --plat-qq: #12b7f5;
    --plat-weibo: #e6162d;
    --plat-xhs: #ff2e4d;

    /* 浅底占位渐变（没配封面时按名次轮换的三档） */
    --grad-blue-a: #dbeafe;
    --grad-blue-b: #93c5fd;
    --grad-sand-a: #fde8d3;
    --grad-sand-b: #f8b878;
    --grad-mint-a: #d8f3e5;
    --grad-mint-b: #86d8b4;

    /* 阴影 / 遮罩的统一色。写成 R G B 三段而不是 rgba()，好在各处自由配透明度：
       rgb(var(--shade-rgb) / .12)。以前是十几处 rgb(var(--shade-rgb) / .xx) 手抄。 */
    --shade-rgb: 16 24 40;
    /* 深色面板（首屏 hero 渐变收口、横幅上的白字底） */
    --panel-dark: #0b1220;
    --panel-ink: #0f172a;

    /* 导航条高度：吸在它下面的工具条、目录、过期提示都按这个数算，别各写各的 57px。
       窄屏那档在 @media (max-width:899px) 里改成 60px。 */
    --nav-h: 72px;

    --wrap: var(--wj-wrap, 1440px);
    --max-wrap: 1920px;
    --pad: 48px;
    --radius: var(--wj-radius, 12px);
    /* 缩略图、序号、药丸这类小元件的圆角：跟大卡分开一档，但同样是变量 */
    --radius-sm: var(--wj-radius-sm, 8px);
    --pill: 999px;

    /* 卡片内距与模块缝：以前每个组件各写 16px / 18px / 20px，改一处漏三处，
       而且后台「样式配置 → 卡片圆角」改了 --wj-radius 后，那些写死 16px 的卡纹丝不动。
       现在圆角一律走 --radius（它本身读 --wj-radius），内距与缝隙走这组令牌；
       --wj-card-pad / --wj-block-gap 是给将来后台配置留的口子，没注入时回落到默认值。 */
    /* 收紧：卡片内距 12px，模块缝 16px（参考站那种紧凑比例） */
    --pad-card: var(--wj-card-pad, 12px);
    --pad-card-wide: var(--wj-card-pad-wide, 14px);
    --pad-card-lg: var(--wj-card-pad-lg, 16px);
    --gap-block: var(--wj-block-gap, 16px);
    --gap-cols: var(--wj-cols-gap, 16px);

    /* 全站唯一的字体栈 —— 与后台 wujies-admin 的 body 是同一条，改一处要改两处。
       前半段是系统 UI 栈：Windows 落到 Segoe UI，macOS 落到 San Francisco，Linux 顺自己的界面字体。
       浏览器逐字符往下找：拉丁被 Segoe UI 接走，它没有汉字，才继续往后 —— 所以中文字体必须显式排在
       sans-serif 前面，否则汉字落进通用关键字，由浏览器的「无衬线字体」设置决定，换浏览器就可能变宋体。
       Noto Sans SC / 思源黑体 CN 排在雅黑之前：这是参考站那套字（全站用思源黑体），
       本机装了才命中、不下载任何字体文件，没装的顺到雅黑 —— 不带 webfont 是因为中文子集动辄 MB 级，全站首屏付不起。
       代码块与 404 的别名不用它，那边另有等宽栈（等宽是"看得清每个字符"，不是品牌字）。 */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans",
        "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "思源黑体 CN",
        "Microsoft YaHei", "微软雅黑", Arial, sans-serif;

    /* 动效只有两个旋钮：时长与缓动。缓动那条是参考站（商品列表「收起筛选」）实测下来的
       cubic-bezier(.7,.3,.1,1) —— 起步慢、收尾快，所以面板不是"匀速滑走"，而是先迟疑一下再甩出去。
       收起筛选、展开搜索、通知轮播、账号下拉都复用它，一处改动全站同步。 */
    --dur: .3s;
    --motion: cubic-bezier(.7, .3, .1, 1);

    /* 卡片「没有封面 / 封面加载失败」那一档占位的三个色与一枚线稿图标。
       三种卡共用同一套伪元素（见下面「封面：铺满与占位」），增量主题只要改这四个变量
       就能把占位一起换到深色底上，不必复制那套规则。图标是内联 data-URI SVG：
       主题不引外部资源、也不多一个会被缓存卡住的请求（theme.css 文件头自律第 1 条）。 */
    --ph-top: #fff;
    --ph-bottom: #ececef;
    --ph-ink: var(--muted);
    --ph-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23707072' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='9' width='38' height='30' rx='4'/%3E%3Ccircle cx='17' cy='21' r='3.5'/%3E%3Cpath d='M10 34l10-9 7 6 6-5 6 7'/%3E%3C/svg%3E");
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    /* 基础色（base-100）：样式配置启用后由 --wj-base 注入，关掉即 #fff */
    background: var(--wj-base, #fff);
    color: var(--body);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

h1, h2, h3, p, figure {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
}

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--pad);
}
.max-wrap {
    max-width: var(--max-wrap);
    margin: 0 auto;
    padding: 0 var(--pad);
}

/* 文章列表「横版 / 轮播」的规则统一放在文件末尾「列表排版」那一节。
   为什么不在这个位置：`.grid` 与它的三条媒体查询（2/3/4 列）在这一行**之后**才定义，
   同样是单类选择器、后者胜出 —— 放在这里 `display:flex` 会被 `.grid{display:grid}` 盖掉，
   页面上看到的就是"选了横版还是两列竖卡，正文被挤成竖排"。见文件末尾的同名小节。 */

/* -------------------------------------------------------- 通知条（头部第一行） */

/* 版式照参考站那一行：左站点、中间轮播、右帮助，一行高 34px。
   三块内容都是配置位（cms.regionName / cms.noticeOne / cms.noticeTwo / cms.helpName），
   空的那一块由模板整块不渲染，所以这里三块都可能缺席 —— flex 两端对齐、中间吃掉剩余宽度。
   浅灰底：主导航重写成白底之后，上面再压一条纯黑横幅会把一条头部切成两截。 */
/* 通知条：黑底白字（还原初版样式） */
.notice {
    background: var(--panel-dark);
    color: var(--on-brand);
    border-bottom: 1px solid var(--panel-dark);
    font-size: 14px;
    line-height: 1.4;
}

.notice__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 40px;
}

.notice__region {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
    white-space: nowrap;
}

.notice__globe {
    width: 14px;
    height: 14px;
    flex: none;
}

.notice__help {
    flex: none;
    white-space: nowrap;
}

/* 可点的那三段一律带下划线：浅底深字里，下划线是最稳的"这里能点"线索，
   而这一条不需要脚本就成立。纯文本那种（没配地址）不进这条规则 —— 加了就是骗人点。 */
.notice__region:hover,
.notice__help:hover,
.notice__line:hover {
    opacity: .78;
}

a.notice__region,
a.notice__help {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 公告那一整条也<b>能</b>点，但只有末尾那颗「立即前往」画下划线：
   一句话里每个字都挂线，读起来像三个链接叠在一起，反而没人点。
   整条仍是同一个 <a>（点哪儿都到同一个地址），下划线只标在动作那两个字上。 */
a.notice__line {
    text-decoration: none;
}

.notice__cta {
    margin-left: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

/* 轮播那一格：左右两颗切换键夹着中间那叠公告。
   flex: 1 1 auto + min-width:0 挂在这一层（原先在 .notice__slides 上）——
   加了键之后要吃掉剩余宽度的还是这一整块，而公告那一格只能收缩到键之外的宽度。 */
.notice__rotator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.notice__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: none;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: inherit;
    opacity: .72;
    cursor: pointer;
}

.notice__arrow svg {
    width: 12px;
    height: 12px;
}

.notice__arrow:hover {
    opacity: 1;
    background: rgb(17 24 39 / 7%);
}

/* 中间那一格：两条公告叠在同一格上轮播。
   grid 而不是 absolute —— 高度与宽度仍由内容撑开，不必手写行高，
   而 min-width:0 是必须的：不给它，长的那条公告会把左右两块挤出容器。 */
.notice__slides {
    display: grid;
    min-width: 0;
}

/* 这一条 min-width:0 同样不能省：grid 子项的 min-width 默认是 auto，
   它会按**内容**的宽度撑开轨道 —— 外层 .notice__slides 就算写了 min-width:0，
   只要子项自己不收缩，那条"不换行 + 省略号"的长公告仍然能把整页撑出横向滚动条（390 宽时就是这样）。 */
.notice__slide {
    grid-area: 1 / 1;
    width: 100%;
    min-width: 0;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    /* 收起时 visibility 要等动画走完再切，否则元素在淡出的第一帧就消失了 */
    transition: opacity var(--dur) var(--motion), transform var(--dur) var(--motion),
        visibility 0s linear var(--dur);
}

.notice__slide--on {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s, 0s, 0s;
}

.notice__line {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ------------------------------------------------------------------ 主导航 */

/* 粘得住的前提是"父级够高"：sticky 只在父元素的内容盒里粘，所以这两行是 body 的兄弟
   而不是同一个 <header> 的孩子（见 modules/header.html 里那条 ⚠️）。
   通知条 34px 先滚走，导航条停在顶上 —— 参考站也是这一条顺序。 */
.nav {
    /* 这四个值就是这一条导航的"皮肤"：换主题只改它们，不必动下面的版式 */
    --nav-brand: var(--wj-primary, var(--h-blue));
    --nav-text: #4b5563;
    --nav-active-bg: var(--soft);
    --nav-active-ink: #111827;

    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--wj-base, #fff);
    border-bottom: 1px solid var(--line);
}

.nav__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 72px;
}

/* 字标：一个颜色、大字号，和后面那排灰字拉开层次（参考站那一行的做法） */
.nav__brand {
    flex: none;
    margin-right: 34px;
    font-size: var(--wj-logo-size, 24px);
    font-weight: 800;
    letter-spacing: -.045em;
    /* 品牌字标改回近黑（不再跟随主色），颜色读上面 --nav-* 那组皮肤里的深色；
       字号默认 24px，由「主题 → 全局 → 顶部 Logo 大小」控制 */
    color: var(--nav-active-ink);
    white-space: nowrap;
}

/* 「主题 → 全局」选图片 Logo 时走这一条：高度跟着 Logo 大小滑块，宽度自适应 */
.nav__brand img {
    display: block;
    height: var(--wj-logo-size, 24px);
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.nav__brand:hover {
    opacity: .82;
}

/* 导航项多时不换行（换行会把整页顶下去）。
   刻意**不设 overflow-x: auto**：二级下拉是绝对定位的，滚动容器会把面板一起裁掉，
   而那正是"菜单在后台配好了、页面上点不出来"这种最难归类的现象。
   菜单紧跟品牌，右侧工具靠 margin-left:auto 贴右端 —— 不把菜单做 left:50% 绝对居中，
   那样它一宽就压到工具区上，而且不参与这一行的高度计算。 */
.nav__menu {
    display: none;
    align-items: center;
    align-self: stretch;
    gap: 2px;
}

/* 拉满这一行的 72px：下拉的 top:100% 才正好落在导航条下沿，而不是浮在半行高。
   .nav__item 自己不拉满（它是居中一块圆角底），由 align-items:center 垂直居中。 */
.nav__node {
    position: relative;
    display: flex;
    align-items: center;
    align-self: stretch;
}

/* 一级项：常态是灰字，hover 与"当前页"都是一块浅灰圆角底（参考站选中项那样）。
   按钮与 a 共用这一套：分组父级是 button，普通项是 a，视觉上不该看得出区别。
   没有下划线、没有 uppercase —— 这一行的克制全靠字色与那块底。 */
.nav__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 14px;
    border: 0;
    border-radius: 6px;
    background: none;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--nav-text);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s var(--motion), color .18s var(--motion);
}

/* 菜单项图标（迁移 18- 的 cms_menu_item.icon，三种形态：图片 / 内联 SVG / 表情文字）。
   尺寸与行高同一档，不参与布局：没有配图标的项与配了的项，行高必须一样，
   否则一排导航会因为"某人加了一颗图标"而高低不齐。
   颜色用 currentColor：内联 SVG 的描边跟着 .nav__item 的字色走，hover / is-active 自动跟随。 */
.nav__ico {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: currentColor;
}

.nav__ico > svg {
    width: 100%;
    height: 100%;
    display: block;
}

.nav__ico--text {
    width: auto;
    min-width: 16px;
    font-size: 14px;
    line-height: 1;
}

.nav__drop-item .nav__ico {
    width: 15px;
    height: 15px;
    margin-right: 2px;
    vertical-align: -3px;
}

.nav__item:hover {
    background: var(--page);
    color: var(--nav-active-ink);
}


.nav__item.is-active {
    background: var(--nav-active-bg);
    color: var(--wj-primary, var(--nav-active-ink));
    font-weight: 600;
}

.nav__caret {
    width: 12px;
    height: 12px;
    flex: none;
    transition: transform .18s var(--motion);
}

.nav__node.is-open .nav__caret {
    transform: rotate(180deg);
}

/* 有链接的父项旁边那颗独立的展开键：只管展开，不抢 a 的跳转 */
.nav__caret-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 34px;
    margin-left: -12px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: inherit;
    cursor: pointer;
}

.nav__caret-btn:hover {
    background: var(--page);
}

/* 窄屏才出现的汉堡键（无脚本时菜单整条隐藏，这颗键也不出现，见 html.js 那条约定） */
.nav__mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--nav-text);
    cursor: pointer;
}

.nav__mobile-toggle:hover {
    background: var(--nav-active-bg);
}

.nav__mobile-toggle svg {
    width: 20px;
    height: 20px;
}

/* 二级（子菜单）。这里同时修掉"鼠标往下移菜单就没了"：
   1. 面板贴着父项下沿（top:100%），不留 8px 空隙；那块距离由 ::before 的**透明桥**补上，
      桥属于面板、面板属于 .nav__node，鼠标经过它时父项的 :hover 一直是成立的。
   2. 用 opacity/visibility 而不是 display:none 收起 —— 键盘 Tab 能进到面板里，
      :focus-within 才有意义；display:none 的面板永远拿不到焦点。
   3. site.js 那边还有一层 hover-intent：鼠标短暂离开时延迟 200ms 才撤 .is-open，
      斜着往下移（先脱离父项、再落到面板）也不会闪一下。 */
.nav__drop {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 30;
    min-width: 192px;
    padding: 8px;
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 16px 36px rgb(16 24 40 / 12%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity .16s var(--motion), transform .16s var(--motion),
        visibility 0s linear .16s;
}

.nav__drop::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

/* 没有脚本时（html.js 是 site.js 一开头加的）hover / 键盘聚焦照样能展开；
   脚本在场时**只认 .is-open**：否则"点一下想收起，鼠标还停在父项上又被 :hover 打开"，
   以及鼠标斜着往下移经过接缝时的闪烁，脚本根本压不住。开合交给 wireNav() 一处管。 */
html:not(.js) .nav__node:hover > .nav__drop,
html:not(.js) .nav__node:focus-within > .nav__drop,
html.js .nav__node.is-open > .nav__drop {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition-delay: 0s, 0s, 0s;
}

.nav__drop-item {
    display: block;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--nav-text);
    white-space: nowrap;
}

.nav__drop-item:hover {
    background: var(--page);
    color: var(--nav-active-ink);
}

.nav__drop-item.is-active {
    background: var(--nav-active-bg);
    color: var(--nav-active-ink);
    font-weight: 600;
}

/* 右边那一组：搜索图标 + 登录/注册 + 账号区。整条导航只有这一组贴右端 */
.nav__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav__link {
    font-size: 14px;
    font-weight: 500;
    color: var(--nav-text);
    white-space: nowrap;
}

.nav__link:hover {
    color: var(--nav-active-ink);
}

/* 登录 / 注册：这一行上仅有的两个跨站入口，下划线常带（不只 hover） */
.nav__link--cta {
    padding: 7px 10px;
    border-radius: 9px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nav__link--cta:hover {
    background: var(--nav-active-bg);
}

.nav__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--nav-text);
    cursor: pointer;
}

.nav__icon-btn:hover {
    background: var(--nav-active-bg);
    color: var(--nav-active-ink);
}

.nav__icon {
    width: 20px;
    height: 20px;
}

/* 点开放下来的搜索栏：绝对定位挂在 .nav 的下沿（.nav 是 sticky，所以它就是定位父级），
   因此这一条能铺满整屏宽，而不是被 .nav__tools 那半行宽度框住。
   收起用 translateY(-8px) + 淡出，用的还是 --motion 那一条缓动。 */
.nav__search {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 25;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    background: var(--wj-base, #fff);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 30px rgb(var(--shade-rgb) / .10);
    transition: opacity var(--dur) var(--motion), transform var(--dur) var(--motion),
        visibility 0s linear var(--dur);
}

.nav__search.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s, 0s, 0s;
}

/* 账号区（一个入口，点开是一组动作）。
   默认不显示，body.is-logged-in 之后出（登录态由 site.js 补，见文件末尾那一节）。
   开合是「点击」（site.js 切 .is-open），不用 hover：下拉项在收起时是 display:none、
   根本拿不到焦点，靠 :focus-within 打开等于键盘永远进不去这个菜单。 */
.nav__account {
    position: relative;
    display: none;
    align-items: center;
}

body.is-logged-in .nav__account {
    display: flex;
}

.nav__account-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 8px 4px 4px;
    border: 0;
    border-radius: 999px;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.nav__account-btn:hover {
    background: var(--nav-active-bg);
}

.nav__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--nav-active-bg);
}

.nav__account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    display: none;
    min-width: 148px;
    padding: 6px;
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgb(var(--shade-rgb) / 8%);
}

.nav__account.is-open .nav__account-menu {
    display: block;
}

.nav__account-item {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 6px;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--body);
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.nav__account-item:hover {
    background: var(--nav-active-bg);
    color: var(--nav-active-ink);
}

/* 宽屏：横排菜单，汉堡键收起。断点取 900 而不是 768 —— 七八个中文菜单项加右侧工具，
   768 宽时两边已经贴到咬在一起了。 */
@media (min-width: 900px) {
    .nav__menu {
        display: flex;
    }

    .nav__mobile-toggle {
        display: none;
    }
}

/* 窄屏：菜单收成盖在导航条下面的一块竖排面板。
   这一档**只用点击展开**：触屏没有 hover，鼠标 hover 展开的下拉在手机上会一直关不掉。 */
@media (max-width: 899px) {
    :root {
        --nav-h: 60px;
    }

    .nav__inner {
        min-height: 60px;
    }

    .nav__brand {
        margin-right: 0;
        font-size: 22px;
    }

    .nav__menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        align-self: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 8px 16px 14px;
        background: var(--wj-base, #fff);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 14px 24px rgb(16 24 40 / 10%);
    }

    .nav__menu.is-open {
        display: flex;
    }

    .nav__node {
        flex-direction: column;
        align-items: stretch;
    }

    .nav__item {
        padding: 11px 12px;
    }

    .nav__caret-btn {
        position: absolute;
        right: 6px;
        top: 6px;
        margin-left: 0;
    }

    .nav__drop {
        position: static;
        display: none;
        min-width: 0;
        padding: 2px 0 6px 14px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        transition: none;
    }

    .nav__drop::before {
        display: none;
    }

    .nav__node.is-open > .nav__drop {
        display: block;
    }

    .nav__tools {
        gap: 4px;
        margin-left: auto;
    }

    /* 没脚本时菜单不能再靠那颗键展开：改成静态摊在导航条下面（不是浮层，不遮内容），
       子项随 hover 展开，页面照样看得全 —— 那颗键也就没有存在的理由了（点了不动比没有更糟） */
    html:not(.js) .nav__mobile-toggle {
        display: none;
    }

    html:not(.js) .nav__inner {
        flex-wrap: wrap;
    }

    html:not(.js) .nav__menu {
        display: flex;
        position: static;
        padding: 0 16px 12px;
        border-bottom: 0;
        box-shadow: none;
    }

    html:not(.js) .nav__node:hover > .nav__drop,
    html:not(.js) .nav__node:focus-within > .nav__drop {
        display: block;
    }
}

/* -------------------------------------------------------------------- Hero */

.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 420px;
    overflow: hidden;
    background: var(--soft);
}

.hero__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 压一层从下往上的 scrim：没图时它是纯装饰，有图时它保证左下的白字可读 */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(var(--shade-rgb) / .05) 0%, rgb(var(--shade-rgb) / .55) 100%);
}

.hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: 88px;
    padding-bottom: 48px;
    color: var(--on-brand);
}

.hero__title {
    font-size: clamp(44px, 11vw, 116px);
    font-weight: 800;
    line-height: .92;
    letter-spacing: -.035em;
}

.hero__sub {
    margin-top: 16px;
    max-width: 22em;
    font-size: 16px;
    color: rgba(255, 255, 255, .88);
}

.hero__cta {
    display: inline-block;
    margin-top: 28px;
    padding: 13px 26px;
    border-radius: var(--pill);
    background: var(--wj-base, #fff);
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
}

/* 首屏轮播（「主题 → 首页配置 → 首屏轮播图」配置后启用） */
.hero__rotator {
    position: absolute;
    inset: 0;
}

.hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease, visibility .6s ease;
}

.hero__slide--on {
    opacity: 1;
    visibility: visible;
}

.hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgb(var(--shade-rgb) / .35);
    color: var(--on-brand);
    cursor: pointer;
}

.hero__arrow svg {
    width: 14px;
    height: 14px;
}

.hero__arrow:hover {
    background: rgb(var(--shade-rgb) / .55);
}

.hero__arrow--prev {
    left: 16px;
}

.hero__arrow--next {
    right: 16px;
}

.hero__dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 8px;
}

.hero__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    cursor: pointer;
}

.hero__dot--on {
    background: var(--wj-base, #fff);
}

/* -------------------------------------------------------------- 分区与栅格 */

.section {
    padding: 56px 0 8px;
}

.section__title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}

.section__index {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: .08em;
}

.section__empty {
    padding: 40px 0 56px;
    color: var(--muted);
    font-size: 15px;
}

/* 紧跟在页头（.band，自带底色与内边距）后面的那一块内容：用户主页、关注/粉丝页。
   普通分区让出的是「上一屏与下一屏之间」的呼吸位，页头底下不需要这一份 ——
   768px 上 80px 的天窗把 tab 栏推到首屏之外，第一眼只剩头像与空白。 */
.section--page {
    padding: 24px 0 8px;
}

/* 分区末尾的跳转文字（首页「去商城逛逛」用） */
.section__more {
    padding: 20px 0;
    font-size: 14px;
    font-weight: 700;
}

.section__more a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.grid--loose {
    gap: 8px 8px;
}

.grid__item {
    min-width: 0;
}

/*
 * 列表里「还在屏幕外」的卡片先不排版、不绘制。
 *
 * 一页二三十张卡时，浏览器原本要把每一张的图、文字、作者行都算一遍布局，
 * 首屏其实只用得上前两张。content-visibility: auto 让跳过的那部分完全不进渲染流水线，
 * 滚动到跟前再补 —— 长列表的滚动与首屏可交互时间都直接受益。
 *
 * contain-intrinsic-size 的 auto 关键字会记住"上次渲染出来的高度"，
 * 所以滚动条长度稳定、不会因为「还没算」而一路缩水；真不支持这条规则的浏览器
 * （Safari 17 之前）两个属性一起忽略，版式回到原样，不会留坑。
 */
@supports (content-visibility: auto) {
    .grid > .grid__item {
        content-visibility: auto;
        contain-intrinsic-size: auto 380px;
    }
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .section {
        padding: 80px 0 8px;
    }

    /* 页头底下那一块仍旧收紧（写在 .section 之后才盖得住它） */
    .section--page {
        padding: 32px 0 8px;
    }

    .section__title {
        font-size: 32px;
    }
}

@media (min-width: 1200px) {
    .grid,
    .grid--loose {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

/* ---------------------------------------------------------------------- 卡 */

.card {
    height: 100%;
    background: var(--soft);
    border-radius: var(--radius);
}

.card__link {
    display: block;
}

/* 脚本生成的四档卡片（图片 / 收藏夹 / 点赞）：整张卡就是一个链接，没有作者行要另起 */
a.card--link {
    display: block;
    color: inherit;
}

.card__media {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--soft);
}

/* ------------------------------------------------- 封面：铺满 / 无图占位 */
/*
 * 三种卡（文章 .card__media、商品 .pcard__media、活动 .acard__media）共用这一条契约，
 * 各卡自己的那段只留比例与圆角，不要再写一遍 img：
 *
 *  1. 容器 position: relative + 钉死比例；img 绝对定位 inset:0 铺满，object-fit: cover。
 *     以前商品卡的 img 是 `width:100%; height:auto` —— 横长图只占容器上面一条，下面留一块灰；
 *     `object-fit: cover` 写在 `height:auto` 上根本不起作用（图没有可裁的多余高度）。
 *     这就是「长的比例时图在上面、下面是空的」的根因：容器已经改成 4/4，图却还按自身比例躺在上沿。
 *     cover 会等比放大并居中裁掉多余的两侧，竖图 / 方图 / 超宽图在栅格里都是同一块满图，
 *     而且绝对定位让 `height:100%` 有一个确定的参照，不再依赖 aspect-ratio 算出来的高度能否传给子元素。
 *  2. 没有封面（服务端 hasCover() 为 false）或图 404（site.js 的 wireCoverFallback 摘掉 <img>
 *     并挂上 --blank）时，改画一块**有内容的占位**：浅渐变 + 线稿图标 + 一行说明，
 *     读起来是「这张卡没有封面」，不是「这一段没渲染」。
 *     占位与有封面**同一个比例**：以前 --blank 单独换成 4/3，一排卡里有图的 4/5、没图的 4/3，
 *     栅格高低不齐，看着像还没加载完。
 *  3. 占位全是伪元素，模板与脚本都不用多插节点，只认容器上那个 --blank 类；
 *     所以 JS 后造出来的卡（用户主页四档）与服务端直出的卡长得一模一样。
 */
.card__media,
.pcard__media,
.acard__media {
    position: relative;
}

.card__media img,
.pcard__media img,
.acard__media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .35s ease;
}

.card:hover .card__media img,
.pcard:hover .pcard__media img,
.acard:hover .acard__media img {
    transform: scale(1.04);
}

.card__media--blank,
.pcard__media--blank,
.acard__media--blank {
    background:
        radial-gradient(120% 100% at 50% 0%, var(--ph-top) 0%, transparent 72%),
        linear-gradient(135deg, var(--ph-top) 0%, var(--ph-bottom) 100%);
}

/* 万一脚本没跑、那个 404 的 <img> 还在，别让破图图标压在占位上 */
.card__media--blank img,
.pcard__media--blank img,
.acard__media--blank img {
    display: none;
}

.card__media--blank::before,
.pcard__media--blank::before,
.acard__media--blank::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    margin: -42px 0 0 -27px;
    background: var(--ph-icon) center / contain no-repeat;
    opacity: .55;
}

.card__media--blank::after,
.pcard__media--blank::after,
.acard__media--blank::after {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% + 20px);
    text-align: center;
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--ph-ink);
}

.card__media--blank::after {
    content: "暂无封面";
}

.pcard__media--blank::after,
.acard__media--blank::after {
    content: "暂无图片";
}

.card__body {
    padding: 14px 12px 22px;
    text-align: center;
}

.card__term {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.card__title {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__meta {
    margin-top: 6px;
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
}

.card__title-link {
    color: inherit;
}

/* 作者行：整卡是一个链接，作者另起一条（<a> 不能嵌套），居中排在元信息下面 */
.card__author {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
}

.card__author img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--soft-strong);
}

a.card__author:hover {
    color: var(--ink);
}
.d-flex{
    display: flex;
}
.jc-center{
    justify-content: center;
}
/* ---------------------------------------------------------- 商品卡与筛选 */

/*
 * 商品卡对齐 参考站商品列表的那张卡（product-card__info 那一坨）：
 * 灰底整图 + 左对齐四行 —— 橙色标签 / 标题 / 灰色副标题 / 价格（现价 + 划线原价 + 绿色「省 ¥X」）。
 * 刻意**不**复用 .card 再叠 modifier：卡片是主题的契约元件，
 * 把两种卡混在一个类上，改内容卡就会顺手改坏商品卡。
 * 封面钉 1:1 并 cover 铺满：商品图是混着传的（模特竖构图、平铺方图、横幅长图都有），
 * 按自身比例出会让一排卡高低不齐，横长图更只占上沿一条。img 与 hover 的规则在上面
 * 「封面：铺满 / 无图占位」那一段，三种卡共用，这里不写第二份。
 */
.pcard {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent;
}

.pcard__link {
    display: block;
}

.pcard__media {
    aspect-ratio: 4 / 4;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--soft);
}

/* 信息区：参考站是左对齐，居中会把「新品上市」那行橙字推成一个孤零零的点 */
.pcard__info {
    padding: 12px 2px 0;
    text-align: left;
}

.pcard__tag {
    font-size: 13px;
    font-weight: 500;
    color: var(--hot);
}

.pcard__title {
    margin-top: 4px;
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pcard__sub {
    margin-top: 2px;
    font-size: 14px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 价格行：三段的字号一致，靠颜色与那道线分角色（判断都在 CmsMallCard，模板只印） */
.pcard__price {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.pcard__now {
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
}

.pcard__was {
    font-size: 14px;
    color: var(--muted);
    text-decoration: line-through;
}

.pcard__off {
    font-size: 14px;
    color: var(--sale);
}

/* 动作排：参考站 的列表卡上没有按钮，但「立即购买」那条深链是结算页的唯一入口，
   所以留成一行小字链接而不是两颗胶囊 —— 版式让给参考图，功能一个不丢。
   margin-top:auto 让一长一短两张卡的这一行对齐。 */
.pcard__actions {
    margin-top: auto;
    display: flex;
    gap: 14px;
    padding: 8px 2px 0;
    font-size: 13px;
}

.pcard__cta {
    color: var(--ink);
    font-weight: 500;
}

.pcard__cta:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 后台地址没配时的「暂未开放购买」：同一格、同一行，只是不可点 */
.pcard__cta--off,
.pcard__cta--off:hover {
    color: var(--muted);
    cursor: default;
    text-decoration: none;
}

.pcard__ghost {
    color: var(--muted);
}

.pcard__ghost:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ------------------------------------------------- 目录页布局（通栏工具条 + 左筛选 + 右网格） */

/* 工具条 + 左筛选 + 右网格（版式照参考站商品列表页）。
   窄屏先摊平：工具条一条、筛选一条、商品一条；只有**带脚本**时筛选才变成底部抽屉（见下面 html.js），
   没 JS 的访客看到的就是筛选摊在商品上面 —— 一个关不掉的抽屉比没有抽屉更糟。

   ⚠️ 这一套 {@code .shop__*} 类与 {@code data-cms-shop} 钩子<b>名字带 shop 是历史原因</b>：
      它先给商城目录页用，现在图床广场、企业查询、考试安排、在线询价那四屏也用同一套
      （各应用自己的模板里写这些类名，主题只出一份动效与版式）。
      共用而不是另起一套 {@code .plp__*}，是因为"收起筛选"那两个 bug（工具条换行、左列独立滚动）
      只修在这套类上；改名等于把 bug 的修复面复制一遍，而收益只是名字好看。 */

/* 开合状态记在这一层（脚本找的是 [data-cms-shop]，往下选）。
   工具条 sticky 的包含块也是这一层：它只在这屏商品的范围内粘，滚过网格末尾就跟着走。 */
.shop-page {
    /* 这一屏顶上那条大空隙：.band 底下留 8px，.section 又给 56px，工具条于是离「商店」
       有一屏那么远。这一页的标题栏只要 12px —— 工具条自己会吸住，不需要靠留白找位置。 */
    padding-top: 12px;
    padding-bottom: 8px;
}

/* 通栏工具条只有 46px 高、上下各一道描边，它下面就是内容；这一层 .wrap 只给了左右，
   纵向一点没留 —— 商品卡的上沿于是几乎压在工具条那道下边线上。留 24px 把两列推开。 */
.shop {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 24px;
}

/* 通栏工具条：底色与上下描边铺满视口，内容跟着 .wrap 对齐（参考站那条 plp-actions-bar 就是这个关系）。
   它排在 .shop **外面**，这是修好的那个 bug：原先它是 .shop 那个 flex 容器里的
   `flex: 0 0 100%` 子项，收起筛选时 column-gap 归零 → 100% 不再强制换行 →
   左右两列挤上它那一行、可用宽度是 0 → 整个商品网格消失。
   吸在导航条下面：--nav-h 是导航条的内容高度，再加 1px 下描边。 */
.shop__bar {
    position: sticky;
    top: calc(var(--nav-h) + 1px);
    z-index: 14;
    background: var(--wj-base, #fff);
    border-bottom: 1px solid var(--line);
}

.shop__bar-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 46px;
}

.shop__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 4px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
}

.shop__toggle:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.shop__toggle-icon {
    width: 16px;
    height: 16px;
    flex: none;
}

/* 三个标签位：窄屏写「筛选」（它是开抽屉的按钮），宽屏在「收起筛选 / 展开筛选」之间换。
   谁显示由 CSS 说，脚本只切 .shop 上的一个状态类 —— 文案不用拼字符串，也不会出现两行同时可见。 */
.shop__label {
    display: none;
}

.shop__label--sheet {
    display: inline;
}

.shop__count {
    margin: 0 0 0 auto;
    flex: none;
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
}

/* 已选条件那一排（参考站的 breadcrumb-refinement）：一颗一个条件，点它只去掉自己那一项。
   两颗之间的间距比筛选列紧（6px）—— 这一排是"读"的，不是"点哪一行"的。 */
.shop__refine {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.shop__refine-label {
    flex: none;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.shop__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

.shop__chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 240px;
    padding: 4px 11px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    background: var(--wj-base, #fff);
    font-size: 12px;
    color: var(--ink);
}

/* 关键词是访客自己填的原文，可能很长：省略号给这一层（那颗胶囊的宽度由 max-width 定）。 */
.shop__chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop__chip svg {
    width: 11px;
    height: 11px;
    flex: none;
}

.shop__chip:hover {
    border-color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.shop__aside {
    /* 两个旋钮放在基础规则上（不是媒体查询里）：窄屏那一块抽屉也读得到。
       216 是**内容**宽，18 是右边那条滚动条要走的通道（原生细条实测 10px + 8px 空气）。 */
    --shop-aside-w: 216px;
    --shop-aside-bar: 18px;
    min-width: 0;
}

.shop__aside-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.shop__aside-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

/* 关闭按钮只在抽屉那一侧出现（宽屏收起靠工具条上那颗，不在栏顶再摆一颗） */
.shop__aside-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: -6px -8px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--ink);
    cursor: pointer;
}

.shop__aside-close svg {
    width: 16px;
    height: 16px;
}

/* 一组 = 一块折叠面板（el-collapse 那个样子）：整行标题可点，右边一个人字箭头，
   展开朝下、收起朝右，组与组之间一道分隔线。收起哪一组都不影响别组，也不影响地址 ——
   组里每一条本来就是链接，收起只是把它们挪出视线。
   上下各 14px 都记在标题这一层，所以收起之后这一行的高度和展开时标题那一行完全一样，
   点下去不会把下面的组顶得一跳。 */
.shop__group + .shop__group {
    border-top: 1px solid var(--line);
}

.shop__group-title {
    /* summary 一旦不再是 list-item，那颗浏览器自带的三角就没了；
       它的方向跟着系统语言走（中文环境上是个朝右的三角），所以整颗自己画（见下面 ::after） */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 14px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}

.shop__group-title::-webkit-details-marker {
    display: none;
}

.shop__group-title:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.shop__group-title:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* 人字箭头：两条边拼一个 V，比原来那一横 −/+ 显眼得多（实测没人看出标题能点）。
   用 transform 转而不是换两张图：开合时是同一颗在转，动效由 --dur 那对旋钮管。 */
.shop__group-title::after {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform var(--dur) var(--motion);
}

.shop__group:not([open]) > .shop__group-title::after {
    transform: translateX(-2px) rotate(-45deg);
}

/* 内容自己带下缘留白，收起时这份留白跟着 <details> 一起消失，不用补偿。
   原先这里还并写着 `.shop__group > .shop__price`（同一个值），2026-11-01 拆去 mall.css —— 只有商城用价格那一格。 */
.shop__group > .shop__list {
    padding-bottom: 10px;
}

.shop__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.shop__filter {
    display: block;
    padding: 7px 0;
    font-size: 14px;
    color: var(--body);
}

.shop__filter:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.shop__filter--on {
    color: var(--ink);
    font-weight: 700;
}

/* 价格区间那一格（.shop__price 一族，含 `.shop__group > .shop__price`）2026-11-01 搬去 wujies-mall-plugin 的
   site-styles/mall/mall.css —— .shop__* 这一整列是四个应用都在借的目录页骨架，所以留在主题，
   但"两个数框 + 一颗确定"这套只有商城的目录页在用：整族只有一个使用者的，跟着插件走。
   判据见本仓库 README「守住的五条」第 5 条。 */


.shop__main {
    min-width: 0;
}

@media (min-width: 992px) {
    /* 换 flex 而不是继续用 grid：收起筛选要动的是"一列的宽度"，
       flex-basis 与 width 的补间在所有浏览器上都成立，grid 的列宽插值还不是通用能力。
       column-gap 一起归零，否则 0 宽的这一列还会被 48px 间距顶在中间。
       这里不再有 flex-wrap：工具条已经不在这一层，两列之外没有第三个子项，
       换行只会制造"两列挤成一行"的余地。 */
    .shop {
        display: flex;
        align-items: flex-start;
        gap: 20px 48px;
        transition: column-gap var(--dur) var(--motion);
    }

    /* 状态类记在 [data-cms-shop]（.shop-page）那一层，要改宽度的是它里面的两列 */
    .shop-page.is-filters-off .shop {
        column-gap: 0;
    }

    .shop__bar-inner {
        flex-wrap: nowrap;
    }

    .shop__aside {
        position: sticky;
        /* 停在通栏工具条下面：导航条 --nav-h + 1px 描边，再加工厂条 48px（46 高 + 上下各 1px 描边）。
           右边那一列会一直往下长（商品几十上百个），左边这一列跟着整页滚的话，
           滚到第 8 排就再也回不到筛选 —— 所以它钉住，并且**自己滚自己那一段**。 */
        top: calc(var(--nav-h) + 49px);
        flex: 0 0 calc(var(--shop-aside-w) + var(--shop-aside-bar));
        width: calc(var(--shop-aside-w) + var(--shop-aside-bar));
        /* 溢出隐藏是给"宽度正在收"那 0.3 秒用的：里面那一层宽度固定，
           所以面板是整块滑出去，而不是被压扁成一堆断行文字。
           列宽 = 内容 216 + 右边 18 的滚动条通道：里面那一层是写死的 216px（收起动效靠它），
           所以这条通道只能由外层让出来 —— 不让，细滚动条就正好压在标题那颗人字箭头上。 */
        max-height: calc(100vh - var(--nav-h) - 65px);
        overflow: hidden auto;
        /* 鼠标停在左列里滚，就只滚左列：滚到底不再把整页接着往下带。
           这条是"滚左边=滚左边"的全部含义，没有它两条滚动条会互相抢。 */
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: var(--line) transparent;
        transition: flex-basis var(--dur) var(--motion), width var(--dur) var(--motion),
            opacity var(--dur) var(--motion), transform var(--dur) var(--motion);
    }

    /* 这一列内容只有 216px，浏览器默认那根 15px 的条会吃掉一成多，所以让它变细。
       现代浏览器走上面的 scrollbar-width: thin（实测 10px，它会盖掉这里的 8px），
       这两条只给还不认 thin 的旧 Safari/Chrome 兜底。无论走哪条，外层都留了 18px 通道，
       最窄也还剩 8px 空气，内容不会被压住。 */
    .shop__aside::-webkit-scrollbar {
        width: 8px;
    }

    .shop__aside::-webkit-scrollbar-thumb {
        border-radius: 4px;
        background: var(--line);
    }

    .shop__aside::-webkit-scrollbar-track {
        background: transparent;
    }

    .shop__aside-inner {
        width: var(--shop-aside-w);
    }

    .shop__main {
        flex: 1 1 0;
    }

    .shop-page.is-filters-off .shop__aside {
        flex-basis: 0;
        width: 0;
        opacity: 0;
        transform: translateX(-16px);
    }

    .shop__label--sheet {
        display: none;
    }

    .shop__label--collapse {
        display: inline;
    }

    .shop-page.is-filters-off .shop__label--collapse {
        display: none;
    }

    .shop-page.is-filters-off .shop__label--expand {
        display: inline;
    }
}

/* 窄屏抽屉（只在有脚本时）：从屏幕底部滑上来，收回去还是那条 --motion 缓动 ——
   参考站实测 hidden 态是 translateY(100%) + opacity:0 + visibility:hidden，一条都没改。 */
@media (max-width: 991px) {
    html.js .shop__aside {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        height: 86vh;
        padding: 8px var(--pad) 32px;
        overflow-y: auto;
        background: var(--wj-base, #fff);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -18px 44px rgb(var(--shade-rgb) / 20%);
        transform: translateY(100%);
        opacity: 0;
        visibility: hidden;
        transition: transform var(--dur) var(--motion), opacity var(--dur) var(--motion),
            visibility 0s linear var(--dur);
    }

    html.js .shop__aside.is-open {
        transform: none;
        opacity: 1;
        visibility: visible;
        transition-delay: 0s, 0s, 0s;
    }

    html.js .shop__aside-close {
        display: inline-flex;
    }

    /* 抽屉里的这一层不再固定 216px（那是宽屏那列的宽度），跟着屏宽走 */
    html.js .shop__aside-inner {
        width: auto;
    }

    html.js body.is-sheet-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 55;
        background: rgb(var(--shade-rgb) / 45%);
    }
}

/* 分类筛选那一排（商城目录页）：当前项反色，靠 .filter__chip--on */
.filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter__chip {
    padding: 7px 15px;
    border-radius: var(--pill);
    border: 1px solid var(--line);
    background: var(--wj-base, #fff);
    color: var(--body);
    font-size: 13px;
    font-weight: 600;
}

.filter__chip:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.filter__chip--on {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--on-brand);
}

/* 搜索框：GET 表单，没有 JS 也能用（回车即提交） */
.search {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}

.search__input {
    flex: 1 1 240px;
    max-width: 360px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    font: inherit;
    font-size: 14px;
    color: var(--body);
    background: var(--wj-base, #fff);
}

.search__btn {
    /* 不给缩：表单整体宽度由输入框撑，按钮一被挤就竖排成两个字的"圆点"（图床广场踩过）。 */
    flex-shrink: 0;
    padding: 10px 20px;
    border: 1px solid var(--ink);
    border-radius: var(--pill);
    background: var(--ink);
    color: var(--on-brand);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* 导航条下面展开的那一条：横排、输入框吃掉宽度。
   面板的底边与阴影在 .nav__search 上，这里只管这一行自己的呼吸。 */
.search--bar {
    margin-bottom: 0;
    padding: 16px 0;
}

.search--bar .search__input {
    flex: 1 1 auto;
    max-width: none;
}

/* ------------------------ 商城那一屏（工具条 / 分类入口 / 店铺 / 专场 / 商品详情）已搬走
   2026-11-01 整族搬进 wujies-mall-plugin 的 site-styles/mall/mall.css，由它自己的端点
   /site/apps/mall/mall.css 发，<link> 走主题 head 的 appStyles 口子。
   留在下面的那句 .filter--tight 是唯一的例外：它是共享件 .filter 的一个变体
   （.filter__chip 图床、企业、询价、内容中心自己的模板都在用），变体跟着共享件留在主题。
   判据与踩过的坑见本仓库 README「守住的五条」第 5 条。 */


/* 已经在工具条里时不留底边 —— 那一段的间距由 mall.css 的 `.toolbar__count` 一侧负责。
   这句留在主题只因为 .filter--tight 是共享件 .filter 的变体；用它的是商城目录页。 */
.filter--tight {
    margin-bottom: 0;
}


/* ---- 活动卡：一张商品卡 + 它所属活动那几行 */

/*
 * 与 .pcard 同一条骨架（灰底整图 + 左对齐几行字），但<b>不复用它的类</b>：
 * 商品卡没有徽章、没有状态词、没有倒计时，把两种卡叠在同一组类上，改活动卡就会顺手改坏目录页。
 * 价格那三段（现价 / 划线原价 / 省多少）的字号与颜色照抄商品卡 ——
 * 专场页和目录页给同一个商品两种字形，看上去就像两个站点。
 * 历史档那一格没有价格行（拍不到的价格不印），版式上就少一行，不做占位。
 */
.acard {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.acard__link {
    display: block;
}

/* 与商品卡同为 4:3 的一块封面，img 的铺满 / hover / 无图占位都走上面那段统一契约。
   这里原来是 object-fit: contain：横图上下各留一条灰边，和商品列表同一件商品却看着不是同一张图。 */
.acard__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--soft);
}

/* 徽章压在图左下角：参考站把促销标签放在信息区第一行，但这里第一行要给活动名 */
.acard__badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 10px;
    border-radius: var(--pill);
    background: var(--hot);
    color: var(--on-brand);
    font-size: 12px;
    font-weight: 700;
}

.acard__info {
    padding: 12px 2px 0;
    text-align: left;
}

.acard__activity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.acard__state {
    color: var(--sale);
    font-weight: 700;
}

.acard__activity-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.acard__title {
    margin-top: 4px;
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.acard__price {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.acard__now {
    font-size: 16px;
    font-weight: 500;
    color: var(--hot);
}

.acard__was {
    font-size: 14px;
    color: var(--muted);
    text-decoration: line-through;
}

.acard__off {
    font-size: 14px;
    color: var(--sale);
}

/* 已售 / 库存 / 限购：三行合成一行小字，谁缺哪一个由 CmsActivityCard 决定 */
.acard__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

/* 那句倒计时：数字部分会被 site.js 换掉（换的是 [data-cms-countdown] 这一个节点的文本） */
.acard__cd {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
}

/* 「距结束」/「距开抢」这一截服务端印、脚本不碰，所以数字得跟它留出一点距离 */
.cd__label {
    margin-right: 4px;
}

.acard__window {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.acard__actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 2px 0;
    font-size: 13px;
}

.acard__cta {
    color: var(--ink);
    font-weight: 700;
}

.acard__cta:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 后台地址没配时的「暂未开放购买」：与「去下单」同尺寸，只是不可点 */
.acard__cta--off,
.acard__cta--off:hover {
    color: var(--muted);
    cursor: default;
    text-decoration: none;
}

.acard__ghost {
    color: var(--muted);
}

.acard__ghost:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 「平台活动 / 商家活动」顶到行尾：它是背景信息，不该跟两颗动作抢位置 */
.acard__scene {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted);
}


.ccard {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--wj-base, #fff);
}

/* 左栏面额：券的脸。用 --hot 与商品卡的「新品上市」同色 —— 都是"这行值得先看" */
.ccard__value {
    flex: none;
    width: 108px;
    text-align: center;
}

.ccard__amount {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--hot);
}

.ccard__threshold {
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

.ccard__body {
    flex: 1 1 auto;
    min-width: 0;
}

.ccard__title {
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
}

.ccard__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.ccard__chip {
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--soft);
    color: var(--muted);
    font-size: 12px;
}

.ccard__valid {
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
}

.ccard__cap,
.ccard__meta {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.ccard__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.ccard__cd {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
}

.ccard__desc {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ccard__side {
    flex: none;
    margin-left: auto;
}

/* 「立即领取」是出站链接，样式与商品卡那颗深链同级：胶囊是给"在这儿就能办完"的动作留的 */
.ccard__cta {
    display: inline-block;
    padding: 9px 18px;
    border-radius: var(--pill);
    background: var(--ink);
    color: var(--on-brand);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ccard__state {
    padding: 9px 18px;
    border-radius: var(--pill);
    background: var(--soft);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 620px) {
    /* 窄屏把面额挪到右上角：那一栏比说明更短，横着摆会把文字挤成一列一个字 */
    .ccard {
        flex-wrap: wrap;
        gap: 10px 14px;
    }

    .ccard__value {
        order: -1;
        width: auto;
        text-align: left;
    }

    .ccard__body {
        flex: 1 1 100%;
        order: 2;
    }

    .ccard__side {
        order: 1;
    }
}


/* ------------------------------ 翻页 .pager：四个应用的列表页都在用，留在主题
   数字行 .facts / .fact（2026-11-01 起只剩图床一处在用 —— 企业与企业考试详情用的是 .row-facts，
   不是这一族）已搬去 wujies-gallery-plugin 的 site-styles/gallery/gallery.css。 */


/* 翻页：只有上一页/下一页两枚 + 中间那句"第几页、共几张"。
   没有一排页码 —— 这一屏的用法是一直往下翻，而一排页码等于给搜索引擎一排抓取入口。 */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 28px 0 8px;
}

.pager__link {
    padding: 10px 22px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.pager__link:hover {
    border-color: var(--ink);
    background: var(--soft);
}

.pager__summary {
    font-size: 13px;
    color: var(--muted);
}


/*
 * 就地提交的那一台询价单（报价目录页，2026-10-31）。
 *
 * 与上面那台 .upload 恰好相反：那一台没脚本就整块不出（登录后的动作），这一台<b>没有脚本也要能
 * 走完全程</b> —— 加行是链接、提交是原生表单、回执写在地址里，询价单是要人回电话的线索，
 * 一条都收不到才是这一页最大的故障。
 * 它只在已经选进行时出现（模板那句 th:if）：一行都没选的时候这一屏是目录，不该先摆一叠空框。
 */
.apply {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: var(--soft);
}

.apply__title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.apply__lines {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

/* 一行一条：名称吃掉宽度，数量与"移出"贴右 —— 与下面目录那十条线同一个读法。 */
.apply__line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--ink);
}

.apply__name {
    flex: 1 1 auto;
    min-width: 0;
}

.apply__qty {
    flex: none;
    width: 76px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 13px;
    text-align: right;
    color: var(--ink);
    background: var(--wj-base, #fff);
}

.apply__qty:focus {
    outline: 2px solid var(--ink);
    outline-offset: 1px;
}

.apply__remove {
    flex: none;
    font-size: 13px;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.apply__remove:hover {
    color: var(--ink);
}

/* 称呼 / 联系人 / 电话三栏并排，需求说明独占一行（.apply__field--wide）。 */
.apply__fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.apply__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.apply__field--wide {
    grid-column: 1 / -1;
}

.apply__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

.apply__input {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 14px;
    color: var(--body);
    background: var(--wj-base, #fff);
}

.apply__input:focus {
    outline: 2px solid var(--ink);
    outline-offset: 1px;
}

.apply__area {
    min-height: 68px;
    resize: vertical;
}

/* .btn 是给 <a> 写的（没有 cursor 与 font:inherit），这里补上让它能当提交键用。 */
.apply__submit {
    font: inherit;
    cursor: pointer;
}

.apply__hint {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.apply__hint a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 工作台那颗链接点不成时的回执（多半是"当前就是超管"）：跟在链接后面，空着就不占行高。 */
.apply__wb-hint {
    margin-left: 6px;
    font-size: 12px;
    color: var(--hot);
}

.apply__wb-hint:empty {
    display: none;
}

/*
 * 蜜罐那一栏：人看不见、tab 也进不去（里面那个输入框自己写了 tabindex="-1"），
 * 只有不问版式的脚本会填它。用移出屏幕而不是 display:none —— 有些脚本会跳过压根不渲染的字段，
 * 那这一栏就白留了。
 */
.apply__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* 提交回执：成功那一句与四种没成都走这里，那句话由服务端拼好，模板不判代码。 */
.apply__notice {
    margin: 18px 0;
    padding: 12px 14px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--ink);
    background: var(--wj-base, #fff);
}


/* ------------------------------------ 行式列表（2026-10-31）：企业查询与考试安排共用 */

/*
 * 两个应用的公开列表是同一个形状：一行一条 + 名称 + 几枚胶囊 + 一叠「标签：值」+ 行尾一枚按钮。
 * 先按企业一个前缀（co-）写过，第二个应用来的时候没有再抄一份 —— 类名因此不带应用名。
 * 改这一叠等于同时改两屏（下一屏大概率是报价），别只在自己那一页上调。
 *
 * 为什么是"一行一条"而不是卡片网格：名称长短差三倍（六个字到二十个字），三列网格会把短名
 * 那几格拉出大片空白，而这一屏要读的是名称 + 几条事实，一行一条最省眼睛。
 * 分隔只用一条细线，不给每行加边框 —— 一屏十条，十个框比十条线吵。
 */
.row-list {
    border-top: 1px solid var(--line);
}

.row-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

/* 没有"字头"那一格的应用（考试）走这一档：不留一条空列。 */
.row-list--plain .row-item {
    grid-template-columns: minmax(0, 1fr) auto;
}

/* 企业没有 logo，也不去抓 favicon：取名称首字当字头，与 C 端那一屏同一个做法。 */
.row-item__logo,
.row-head__logo {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
}

.row-item__body {
    min-width: 0;
}

.row-item__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.row-item__title a {
    color: var(--ink);
}

.row-item__title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.row-item__tags,
.row-head__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 0;
}

/* 「查看详情」放在行尾而不是标题上：整行都可点会跟字头、胶囊抢点击。 */
.row-item__cta {
    align-self: center;
    padding: 8px 16px;
    border: 1px solid var(--ink);
    border-radius: var(--pill);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

.row-item__cta:hover {
    background: var(--ink);
    color: var(--on-brand);
}

/* 已经加进上面那台询价单的行：位置不动，把按钮换成一枚不能再点的状态（再点只是回同一个地址）。 */
.row-item__cta--on {
    background: var(--ink);
    color: var(--on-brand);
    cursor: default;
}

/*
 * 事实行：dt 是标签、dd 是值。列表那一屏排成一行（拿不到的字段整条不出现，
 * 所以条数会随数据变，用 flex + gap 而不是等分栅格），详情那一屏排成两列。
 */
.row-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 28px;
    margin: 12px 0 0;
}

.row-facts--stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 40px;
    margin: 28px 0 0;
}

.row-fact {
    display: flex;
    gap: 8px;
    min-width: 0;
    padding: 9px 0;
    font-size: 14px;
}

.row-facts--stack .row-fact {
    border-bottom: 1px solid var(--line);
}

.row-fact__label {
    flex: 0 0 96px;
    color: var(--muted);
    font-weight: 400;
}

.row-fact__value {
    margin: 0;
    min-width: 0;
    color: var(--ink);
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* 详情页那一屏的头：标题 + 胶囊在左，行动按钮在右（考试有，企业没有）。 */
.row-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.row-head__main {
    min-width: 0;
}

.row-head__title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
}

.row-block {
    margin-top: 40px;
}

.row-block__title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
}

.row-block__text {
    margin: 0;
    color: var(--body);
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    /* 窄屏把「查看详情」那一列收掉：整行标题本来就可点，行尾那枚胶囊换不来点击。 */
    .row-item {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .row-list--plain .row-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .row-item__logo {
        width: 40px;
        height: 40px;
    }

    .row-item__cta {
        display: none;
    }

    .row-facts--stack {
        grid-template-columns: minmax(0, 1fr);
    }

    .row-head {
        flex-direction: column;
    }
}

@media (min-width: 992px) {
    .row-fact__label {
        flex-basis: 120px;
    }
}

/* ------------------------------------------------------------------ 会员块 */

.member {
    margin: 72px 0 0;
    padding: 72px 0;
    background: var(--ink);
    color: var(--on-brand);
    text-align: center;
}

.member__title {
    font-size: clamp(28px, 6vw, 56px);
    font-weight: 800;
    letter-spacing: -.03em;
}

.member__sub {
    margin: 12px auto 0;
    max-width: 30em;
    color: rgba(255, 255, 255, .75);
}

.member__cta {
    display: inline-block;
    margin-top: 28px;
    padding: 13px 28px;
    border-radius: var(--pill);
    background: var(--wj-base, #fff);
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
}

/* CTA 下面那行次级文字链接（"已是会员？进入个人中心"）：比按钮低一级，不能抢按钮 */
.member__link {
    margin: 16px auto 0;
    font-size: 14px;
    color: rgba(255, 255, 255, .65);
}

.member__link a {
    color: var(--on-brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ------------------------------------------------------------------ 列表页 */

/* 每一屏的最上面那一块：面包屑在上、标题居中。
   标题居中是因为这一屏下面紧跟的就是通栏工具条与内容，左对齐的大标题会让这一屏
   看起来"缺一块左边的东西"；面包屑解决的是"我这是在哪个页面"。
   顶部留白从 40px 收到 24px：这块只是报个页名，不是一屏海报。 */
.band {
    padding: 24px 0 8px;
    text-align: center;
}

/* 复用详情页那套 .crumb 的样式，只把这一份摆到中间 */
.band__crumb {
    justify-content: center;
    margin-bottom: 10px;
}

.band__title {
    margin: 0;
    font-size: clamp(30px, 7vw, 64px);
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--ink);
}

.band__sub {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

/* ------------------------------------------------------------------ 详情页 */

/*
 * 正文 + 右栏。两列一起撑满 .wrap —— 与首页、列表页是同一条宽度口径（--wj-wrap，
 * 后台「样式配置 → 页面宽度」给 1440px / 1920px）。旧版把正文钉死 780px 再整体居中，
 * 1140 屏上内容只占中间 1096px，比首页窄一圈，改 1440/1920 也看不出区别。
 *
 * 右栏固定 300px 贴右边；正文吃掉剩下的宽度，上限 1000px 是阅读行长的克制
 * （再宽一行中文就太长了），多出来的空隙留在两列之间，不影响两边与首页对齐。
 * flex 只按**实际存在**的元素排：右栏没渲染（窄屏 / 关掉目录且无组件）时正文自己居中。
 */
.article-shell {
    display: flex;
    align-items: flex-start;
    gap: var(--gap-cols);
}

.article {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 28px;
}

/* 点目录跳到标题时，标题要落在吸顶导航下面一点，不然被导航条压住半行 */
.article__body h1,
.article__body h2,
.article__body h3,
.article__body h4 {
    scroll-margin-top: 88px;
}

/* 右栏整列：几格组件 + 目录，各自成块、**跟着页面一起滚**。
   这一列以前是「sticky + max-height + overflow-y:auto」，等于在右栏里又开了一个滚动区：
   鼠标停在右栏时滚轮只滚这一列，页面不动，读者会以为页面卡住了；
   而且它自己先吸顶、滚到底再放开，和左边正文的节奏对不上。
   现在整列交给文档流，滚动只有一个（文档那个）。
   align-self: stretch 是给目录的 sticky 留出「钉住」的活动范围：
   这一列必须和正文一样高，里面的 sticky 才有地方停。 */
.article-aside {
    display: none;
    flex: 0 0 300px;
    align-self: stretch;
    padding: 20px 0 20px 4px;
    font-size: 13px;
}

.article-aside > * + * {
    margin-top: 16px;
}

/* 目录：右栏里唯一吸顶的一块。
   长文读到中段时，人往往已经滚过目录几百屏，钉住才有用；其余组件是"顺便看看"，跟着滚就行。
   top 让开吸顶导航（60px）再加一点缝，跳转锚点时也不会被导航压住。
   背景由页面级那条规则给（body.page-detail .toc 是白卡），否则钉住后正文会从下面透出来。 */
.toc {
    position: sticky;
    top: 76px;
    z-index: 2;
    padding-left: 16px;
    border-left: 1px solid var(--line);
}

.toc__title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 16px;
    margin: 0 0 10px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--ink);
}

.toc__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc__item + .toc__item {
    margin-top: 6px;
}

/* 层级缩进：h2 顶格，h3/h4 进一格并用左侧细竖线连成树状（参考站那种目录树） */
.toc__item {
    position: relative;
}

.toc__item--h3 {
    margin-left: 5px;
    padding-left: 11px;
    border-left: 1px solid var(--line);
}

.toc__item--h4 {
    margin-left: 5px;
    padding-left: 23px;
    border-left: 1px solid var(--line);
}

/* 带子级的 h2：右侧一颗 chevron，点它收起 / 展开（默认展开） */
.toc__item--parent > .toc__link {
    padding-right: 18px;
}

.toc__toggle {
    position: absolute;
    top: 3px;
    right: 0;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s var(--motion), color .15s var(--motion);
}

.toc__toggle:hover {
    color: var(--brand);
}

.toc__toggle svg {
    width: 12px;
    height: 12px;
}

.toc__item--parent.is-collapsed > .toc__toggle {
    transform: rotate(-90deg);
}

.toc__link {
    display: block;
    color: var(--muted);
    text-decoration: none;
    line-height: 1.5;
}

.toc__link:hover {
    color: var(--ink);
    text-decoration: underline;
}

/* 当前所在小节：由 toc.js 在滚动时加 class，脚本没跑就是全灰，目录照样可用 */
.toc__link.is-active {
    color: var(--ink);
    font-weight: 700;
}

/* 991 以下才收起右栏：平板横放（992~1140）仍留得下 300px 侧栏 + 正文，
   以前 1140 就收，白白浪费了一整档宽度。窄于此值时正文自己占满 .wrap 并居中。 */
@media (min-width: 991px) {
    .article-aside {
        display: block;
    }
}

@media (max-width: 990px) {
    .article {
        margin-left: auto;
        margin-right: auto;
    }
}

/* -------------------------------------------------------------- 右栏组件
   五格共用这一层皮：一格标题 + 一条内容。分隔线画在标题下面而不是整块外面 ——
   整块加边框时，五格叠起来会把右栏切成五张卡片，比不画更吵。 */
.widget__title {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--ink);
}

/* 文末那一份作者卡片不要标题下面那条线（它上面就是"THE END"，两块线会打架） */
.article .widget {
    margin-top: 44px;
}

.article .widget__title {
    border-bottom: 0;
    padding-bottom: 0;
}

/* 网站统计：两列小格，最后一项（总阅读）占满一行 */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stat-grid__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--page);
}

.stat-grid__item--wide {
    grid-column: 1 / -1;
}

.stat-grid__num {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.stat-grid__label {
    font-size: 12px;
    color: var(--muted);
}

/* 排行榜：序号 + 标题（最多两行）+ 阅读数 */
/* 猜你喜欢 / 相关推荐（窄条）：左图右文，图是 4:3 —— 右栏只有 300px，方图会把文字挤成两行 */
.mini-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 猜你喜欢：相邻项之间用虚线分隔（见下方另一条规则），不再额外加 margin-top */
.mini-item__link {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    text-decoration: none;
}

.mini-item__media {
    flex: none;
    width: 64px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--soft-strong);
}

.mini-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 无封面：渐变底 + 一枚浅色圆点，与卡片的占位同一句法（不印破图） */
.mini-item__media--blank {
    background: linear-gradient(135deg, var(--soft-strong), var(--line));
}

.mini-item__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mini-item__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink);
}

.mini-item__link:hover .mini-item__title {
    text-decoration: underline;
}

.mini-item__meta {
    font-size: 11px;
    color: var(--muted);
}

/* 标签云：字号分三档，计数是上标 */
/* 标签云的样式在文件后半段「标签云」一节（.tagcloud__item 那条）。
   这里原来还有一套"描边药丸"的旧版式，两套同名规则叠着 —— 后一套把它整条盖住，
   前一版只会在读代码时误导人（改了没反应），所以删掉。 */

/* 上一篇 / 下一篇：两半各占一半；缺一半时另一半自动占满 */
.post-nav {
    display: flex;
    gap: 12px;
    margin-top: 44px;
}

.post-nav__link {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color .18s var(--motion), background .18s var(--motion);
}

.post-nav__link:hover {
    border-color: var(--ink);
    background: var(--soft);
}

.post-nav__link--next {
    text-align: right;
    align-items: flex-end;
}

.post-nav__label {
    font-size: 12px;
    color: var(--muted);
}

.post-nav__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 相关推荐：横排三张，窄屏自动折成一列 */
.related {
    margin-top: 44px;
}

.related__title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 720px) {
    .related__grid {
        grid-template-columns: 1fr;
    }
}

.related__card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    background: var(--wj-base, #fff);
    transition: border-color .18s var(--motion), transform .18s var(--motion);
}

.related__card:hover {
    border-color: var(--ink);
    transform: translateY(-2px);
}

.related__media {
    aspect-ratio: 16 / 9;
    background: var(--soft-strong);
}

.related__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related__media--blank {
    background: linear-gradient(135deg, var(--soft-strong), var(--line));
}

.related__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
}

.related__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ink);
}

.related__meta {
    font-size: 12px;
    color: var(--muted);
}

.crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
    margin-top: 8px;
}

.crumb a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.crumb__sep {
    color: var(--line);
}

.article__head {
    margin-top: 20px;
}

.article__title {
    font-size: clamp(30px, 6vw, 52px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.03em;
    color: var(--ink);
}

.article__meta {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
}

.article__excerpt {
    margin-top: 16px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--body);
}

/* 作者块：头像 + 名字 + 关注 / 私信。窄屏时按钮换到下一行，提示永远独占一行 */
.article__author {
    margin-top: 28px;
    padding: 14px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.article__author-avatar {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    background: var(--soft);
}

.article__author-avatar--blank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--muted);
}

.article__author-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.article__author-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.article__author-name:hover {
    text-decoration: underline;
}

.article__author-label {
    font-size: 12px;
    color: var(--muted);
}

.article__author-actions {
    display: flex;
    gap: 8px;
}

.article__author-actions .btn {
    padding: 9px 18px;
    font-size: 13px;
}

/* 已关注：退成次要那颗的样子，点下去才是取消 */
.article__author-actions [aria-pressed="true"] {
    background: var(--soft);
    border-color: var(--line);
    color: var(--muted);
}

.article__author-hint {
    flex-basis: 100%;
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.article__author-hint:empty {
    display: none;
}

.article__cover {
    margin-top: 28px;
}

.article__cover img {
    width: 100%;
    border-radius: var(--radius);
}

/* 正文排版：这一段的类名是主题的契约，编辑器产出的 HTML 只有 h2/p/pre/ul/ol/blockquote 这些标签 */
.article__body {
    margin-top: 28px;
    font-size: 17px;
    line-height: 1.85;
    color: var(--body);
}

/* 正文如今在自己的卡里，它是卡片的第一个子元素（有封面时第二个）：
   上面那 28px 原是"离标题远一点"，现在卡缝已经把这件事做了，再留就是一段空白。 */
.article__panel > .article__body:first-child {
    margin-top: 0;
}

/* 正文里第一个标题同样不留上边距 —— 那 40px 是给"两段之间"的，
   放在卡片顶端会把整篇往下压一截。 */
.article__body > :first-child {
    margin-top: 0;
}

.article__body h2 {
    margin: 40px 0 12px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}

.article__body h3 {
    margin: 32px 0 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
}

.article__body p {
    margin: 0 0 18px;
}

.article__body a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article__body ul,
.article__body ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.article__body li {
    margin-bottom: 6px;
}

.article__body img {
    border-radius: var(--radius);
    margin: 8px 0 18px;
}

/* 正文里的图被脚本包成「看原图」的链接（site.js 的 wireArticleImages）：
   指针要变成放大镜，不能继承正文链接那条下划线（图上画一条线比不画更糟） */
.article__body a[data-cms-lightbox] {
    text-decoration: none;
    cursor: zoom-in;
}

.article__body pre {
    margin: 0 0 18px;
    padding: var(--pad-card);
    overflow-x: auto;
    background: var(--soft);
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.6;
}

.article__body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.article__body blockquote {
    margin: 0 0 18px;
    padding-left: 16px;
    border-left: 3px solid var(--line);
    color: var(--muted);
}

.chips {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 6px 14px;
    border-radius: var(--pill);
    background: var(--soft);
    color: var(--body);
    font-size: 13px;
}

/* 标签是入口：点是去那一页（/site/tag/{别名}），所以要长得像能点的。
   底色与字的颜色不换（它还是那颗标签），只把下划线去掉、加个手指。 */
.chip:link,
.chip:visited {
    color: var(--body);
    text-decoration: none;
}

.chip:hover,
.chip:focus-visible {
    background: var(--ink);
    color: var(--on-brand);
}

.chip:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ 互动条 */

/* 点赞 / 分享 / 收藏 那一条。版式在这里，行为在 site.js（wireInteractions）：
   主题只印出三个键与两个空的数位，数与「我点过没有」由社交应用那边问回来。
   没有脚本时那两个数位是空的 —— 不编一个假数出来。 */
.interactions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.interactions__hint {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.interactions__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 44px;
}

.interactions__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--body);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    cursor: pointer;
}

.interactions__btn:hover {
    color: var(--hot);
}

.interactions__icon {
    width: 20px;
    height: 20px;
    flex: none;
}

/* 数与标签并排：标签在前，数是它后面那一小截灰字 */
.interactions__text {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}

.interactions__count {
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

/* 已经点过的那颗：颜色换成强调色，键自身不换形状（换形状会让人以为换了功能） */
.interactions__btn.is-on {
    color: var(--hot);
}

.interactions__btn.is-on .interactions__count {
    color: var(--hot);
}

.interactions__msg {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}

/* 这一句是"你刚点的那一下怎么样"：成了、没成都得有颜色区分的落点，
   否则一行灰字跟"喜欢就支持以下吧"那句静态说明分不开，等于没提示。 */
.interactions__msg.is-ok {
    color: var(--sale);
    font-weight: 500;
}

.interactions__msg.is-error {
    color: var(--hot);
    font-weight: 500;
}

.article__end {
    margin: 48px 0 72px;
}

/* --------------------------------------------------------------- 版权声明 */

/* 文章末尾那段声明（后台编辑里填的那句）。版式照参考图：一枚 ⓘ 加四个字一行，
   声明正文在下一行，两行都退到次要色 —— 它是页脚的一块说明，不与正文抢注意力。
   留空时整块不渲染，所以这里没有「空状态」的样式。 */
.copyright {
    margin-top: 36px;
}

.copyright__label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
}

.copyright__icon {
    font-size: 13px;
    line-height: 1;
}

.copyright__text {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

/* THE END：正文的收尾水线，字骑在线上居中。
   线是 ::before 画的整条，字自己带一块与页面同色的底把线断开。 */
.article__theend {
    position: relative;
    margin: 28px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .14em;
}

.article__theend::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1px solid var(--line);
}

.article__theend span {
    position: relative;
    padding: 0 12px;
    background: var(--wj-base, #fff);
}

/* ------------------------------------------------------------------ 评论区 */

/* 那一块由 @wujies/components 的 KCommentSection 画，产物就是主题目录里的
   comment-widget.js / comment-widget.css（构建：wujies-ui/packages/components 里 `pnpm run build:widget`）。
   主题只给它两样东西：一条和正文分开的水线，加上 --k-cw-* 这一组配色变量。
   版式（行距、间距、圆角、头像尺寸）留在组件里，换主题不必碰组件。

   ⚠️ 这些变量必须设在 .comments 这一层（组件的**外层**）：组件内部把它们接成自己的
   --cw-*，只在这一层没有同名变量时才回落 Element Plus 的那套 —— 而前台这一页没有 Element Plus，
   回落值（#111 / #ebeef5）就是最终色。同名写到组件根节点上会被它自己那条声明盖住。 */
.comments {
    --k-cw-primary-color: var(--ink);
    --k-cw-text-color: var(--body);
    --k-cw-muted-color: var(--muted);
    --k-cw-border-color: var(--line);
    --k-cw-fill-color: var(--soft);
    --k-cw-surface-color: var(--on-brand);
    --k-cw-radius: 8px;

    margin-top: 40px;
    border-top: 1px solid var(--line);
}

/* 没有 JavaScript 时页面留下的那一句（组件一挂载就把它整块换掉） */
.comments__note {
    padding: 24px 0;
    font-size: 14px;
    color: var(--muted);
}

/* --------------------------------------------------------------------- 404 */

/* 404 是"这一页没有内容"，所以整块居中收在页面中间：
   用 flex 列 + 居中而不是给每个子元素加 margin，换行/长别名也不会跑偏。 */
.missing {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 88px var(--pad) 96px;
}

.missing__code {
    font-size: clamp(72px, 18vw, 180px);
    font-weight: 800;
    line-height: .85;
    letter-spacing: -.05em;
    color: var(--line);
}

.missing__title {
    margin-top: 16px;
    font-size: clamp(26px, 5vw, 40px);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}

.missing__sub {
    margin-top: 12px;
    color: var(--muted);
}

.missing__sub code {
    padding: 2px 6px;
    background: var(--soft);
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.missing .btn {
    margin-top: 28px;
}

/* ==================================================================== 组件层 */
/*
 * 按钮 .btn / 标签 .tag / 选项卡 .tabs —— 全站的通用零件；导航 .nav 也是组件，
 * 但它的皮肤就是「主导航」一节里那四个 --nav-* 变量（位置在文件前半段，不必重复）。
 *
 * 为什么要有这一层：以前每加一个按钮就新造一个类（.article__author-follow、
 * .hp-prompt__btn、.rcard__follow、.me-card__btn…），每个都自己写一遍 padding、
 * 圆角、字号、hover 与 aria-pressed 的切换，于是同是"小一号的次要按钮"，
 * 有的 5px 14px、有的 6px 14px、有的 8px 14px；换一次视觉规范要改十几处。
 *
 * 现在的约定：
 *   1. 结构类只描述"这里是什么"（.article__author-follow 这类钩子给 JS / 版式用），
 *      **外观一律来自组件类**；钩子类里只允许写位置、宽度、flex 这类布局。
 *   2. 颜色只读 :root 里的令牌（--brand / --accent / --h-* / --on-brand），
 *      组件层不出现任何 #rrggbb。
 *   3. 按钮尺寸只有两档：--sm（卡片里那种，13px）/ --xs（贴着 12~13px 小字的行内键）；
 *      标签另有两档 --md / --lg —— 都是"一处定义、四处复用"，别再各写一个 padding。
 *
 * 用 <button> 还是 <a> 由行为决定：会改状态的用 <button>（能按空格、能 aria-pressed），
 * 只是跳转的用 <a>。两者的外观由同一套 .btn 给，不会一个高一个矮。
 */

/* -------------------------------------------------------------------- 按钮 */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 13px 26px;
    /* 「主题 → 样式配置 → 按钮圆角」，没启用时保持全圆角 */
    border: 1px solid transparent;
    border-radius: var(--wj-btn-radius, var(--pill));
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s var(--motion), border-color .15s var(--motion),
        color .15s var(--motion), filter .15s var(--motion);
}

/* 主按钮：整页唯一那颗"下一步" */
.btn--primary,
.btn--dark {
    background: var(--brand);
    color: var(--on-brand);
    border-color: transparent;
}

.btn--primary:hover,
.btn--dark:hover {
    background: var(--brand);
    filter: brightness(.9);
}

/* 次要按钮：描边 + 主色字，hover 上主色浅底 */
.btn--ghost {
    border-color: var(--brand-line);
    color: var(--brand);
    background: var(--wj-base, var(--on-brand));
}

.btn--ghost:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand);
}

/* 弱化按钮：浅底无描边，用于"取消 / 再看看" */
.btn--soft {
    background: var(--soft);
    color: var(--body);
}

.btn--soft:hover {
    background: var(--soft-strong);
}

/* 强调按钮：粉底白字。只给"关注"这类情感动作，一屏最多一颗 */
.btn--accent {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-brand);
}

.btn--accent:hover {
    filter: brightness(.94);
}

/* 强调描边：粉字粉框白底（文章页那颗心）。已关注 / 已点赞时褪成灰 ——
   语义同时靠颜色与 ::before 的 ✓ 表达，不单靠颜色。 */
.btn--accent-ghost {
    border-color: var(--accent-line);
    background: var(--wj-base, var(--on-brand));
    color: var(--accent);
}

.btn--accent-ghost:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-brand);
}

.btn--accent-ghost[aria-pressed="true"] {
    border-color: var(--line);
    background: var(--wj-base, var(--on-brand));
    color: var(--muted);
}

/* 后台地址没配时的「暂未开放购买」：保持按钮占地，不进 hover 的深色 */
.btn--off {
    background: var(--soft);
    color: var(--muted);
    cursor: default;
}

/* 尺寸两档。--sm 用在卡片里（我的卡、关系卡），--xs 贴着 12~13px 的小字用 */
.btn--sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn--xs {
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.6;
}

/* 撑满一行（我的卡那两颗并排的登录 / 注册） */
.btn--block {
    flex: 1 1 0;
    padding-left: 0;
    padding-right: 0;
}

.btn--icon {
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* [hidden] 必须显式压回去：上面的 display:inline-flex 是类选择器，
   比浏览器给 [hidden] 的 display:none 权重高 —— 不写这条，加了 hidden 的按钮
   照样在页面上（这块早年踩过一次，卡片里冒出一颗不该出现的空按钮）。 */
.btn[hidden] {
    display: none;
}

/* -------------------------------------------------------------------- 标签 */
/*
 * 两种形状，都由 .tag 起手：
 *   默认  —— 7px 圆角的小方块（标签云、签到状态、"作者"标）：方一点，跟卡片同为直角系
 *   --pill —— 全圆角药丸，只在"一格里挤很多个"的元信息行上用
 * 颜色走色族：--info(蓝) / --warn(橙) / --ok(绿) / --accent(粉) / --violet / --mute(灰)。
 */

.tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    border-radius: 7px;
    background: var(--soft);
    color: var(--body);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    vertical-align: middle;
}

.tag--md {
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 400;
}

.tag--lg {
    padding: 7px 13px;
    font-size: 14px;
}

.tag--pill {
    padding: 3px 10px;
    border-radius: var(--pill);
    font-weight: 600;
}

.tag--info {
    background: var(--h-blue-soft);
    color: var(--h-blue-ink);
}

.tag--warn {
    background: var(--h-orange-soft);
    color: var(--h-orange-ink);
}

.tag--ok {
    background: var(--h-teal-soft);
    color: var(--h-teal-ink);
}

.tag--accent {
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.tag--violet {
    background: var(--h-violet-soft);
    color: var(--h-violet-ink);
}

.tag--mute {
    background: var(--soft);
    color: var(--muted);
}

.tag__ico {
    width: 12px;
    height: 12px;
    flex: none;
}

/* 同 .btn[hidden]：.tag 的 display 会盖掉 [hidden] 的默认 display:none */
.tag[hidden] {
    display: none;
}

/* ------------------------------------------------------------------ 选项卡 */
/*
 * .tabs 是容器（只管排布与那条底边），.tab 是每一格。
 * 当前项一律是 .is-on（脚本切），不用 aria-selected 出样式 —— 免得 JS 只改一半。
 * 底部的 2px 指示条用 ::after 压在容器底边上：改字号、改 padding 都不会把它顶歪。
 */

.tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 4px 20px;
    border-bottom: 1px solid var(--line);
}

.tab {
    position: relative;
    padding: 4px 0 9px;
    border: 0;
    background: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: color .15s var(--motion);
}

.tab:hover {
    color: var(--ink);
}

.tab.is-on {
    color: var(--ink);
    font-weight: 800;
}

.tab.is-on::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}

/* 大一号：用户主页那排"文章 / 图片 / 收藏夹 / 点赞"（一屏只有它一处 tab 时用） */
.tab--md {
    padding: 8px 0 11px;
    font-size: 16px;
    font-weight: 400;
}

.tab--md:hover,
.tab--md.is-on {
    font-weight: 700;
}

/* 后面的计数（「文章 12」里的 12）：不是标题的一部分，压小压灰 */
.tab__count {
    margin-left: 2px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}


/* -------------------------------------------------- 局部刷新的那一块（list-live.js） */

/* 排序 / 筛选点下去后，脚本只换 [data-live] 这一块（页头、导航、右栏都不动）。
   取片段的那一小段时间里整块淡一档 —— 既说明"正在换"，也让访客看得出
   变的只是下面这一片；pointer-events 顺手挡掉连点，少一次无谓的往返。
   淡出是过渡而不是留白：高度不变，页面不会跳。 */
[data-live] {
    transition: opacity var(--dur) var(--motion);
}

[data-live].is-live-loading {
    opacity: .55;
    pointer-events: none;
}


/* -------------------------------------------------------------------- 页脚 */

.site-foot {
    margin-top: 72px;
    padding: 56px 0 40px;
    border-top: 1px solid var(--line);
}

.foot__cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

/* 配了联系方式就是三列；手机上仍是两列，第三列换到第二行 —— 与原来的两列版式一致 */
.foot__cols--contact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 767px) {
    .foot__cols--contact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.foot__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.foot__list {
    margin-top: 14px;
}

.foot__list a {
    font-size: 13px;
    color: var(--body);
}

.foot__list li + li {
    margin-top: 8px;
}

.foot__list a:hover {
    color: var(--ink);
    text-decoration: underline;
}

/* 分组（空菜单）在页脚是小标题，下面那几项才是链接：不给它印没有 href 的 <a> */
.foot__group {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.foot__sub {
    margin-top: 6px;
    padding-left: 10px;
    border-left: 1px solid var(--line);
}

.foot__sub li + li {
    margin-top: 6px;
}

/* 联系方式：左侧标签淡一档、右侧值等宽换行不撑破列（邮箱/微信号可能挺长） */
.foot__contact li {
    display: flex;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.foot__contact-key {
    flex: none;
    color: var(--muted);
}

.foot__contact li > a,
.foot__contact li > span + span {
    min-width: 0;
    word-break: break-all;
}

.foot__slogan {
    margin-top: 48px;
    font-size: clamp(30px, 8vw, 76px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: .95;
    color: var(--ink);
}

/* 「主题 → 页脚配置」的社交媒体与二维码：没配就整块不渲染，不摆空盒子 */
.foot__extra {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.foot__social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 13px;
}

.foot__social a {
    color: var(--body);
}

.foot__social a:hover {
    color: var(--wj-primary, var(--ink));
    text-decoration: underline;
}

.foot__qrcode {
    width: 84px;
    height: 84px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--wj-base, #fff);
}

.foot__legal {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--muted);
}

.foot__legal a:hover {
    color: var(--ink);
    text-decoration: underline;
}

/* 公网安备图标是 15px 的小国徽：按原尺寸排，跟文字垂直居中对齐，不跟着行高拉伸 */
.foot__police {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.foot__police img {
    display: block;
    width: 15px;
    height: 15px;
}

/* -------------------------------------------------------- 登录态（site.js 补） */

/* 前台是后端直出、平台关掉 cookie 鉴权，服务端读不到"你是谁"，所以 HTML 一律按**未登录**印；
   脚本确认后台在同源存过 token 后给 body 挂 is-logged-in，这一组规则把出入口换过来。
   恢复显示时写回元素自己的 display，别用 initial/revert —— 那会把 .member__cta 的
   inline-block 一起抹掉，按钮变成一段普通文字。 */
[data-cms-user] {
    display: none;
}

body.is-logged-in [data-cms-guest] {
    display: none;
}

body.is-logged-in a[data-cms-user] {
    display: inline-block;
}

/* ------------------------------------------------------ 导航下面那一句提示 */

/* 一句需要访客看见、但不必他此刻处理的告知（目前只有 site.js 的「登录已过期，请重新登录」）。
   节点是脚本现插的，服务端不印，所以这里没有"没有脚本时的那一份"可言 —— 插不出来就什么都没少。
   <b>插在导航之后、跟着文档流走，滚动时才吸住</b>，不写 {@code position: fixed}：fixed 得把
   "导航下沿在哪"写成一个数，而导航上面那条公告条只有 min-height（长文案会折行），一写死就盖住导航。
   sticky 在流里时不必对齐，滚起来时再停在 --nav-h + 1px —— 那正是 .nav（sticky top:0）的下沿。
   z-index 排在导航（20）与搜索栏（25）之上、窄屏抽屉（60）与灯箱（80）之下 ——
   它要在人滚动时仍然看得见，但不该盖住访客自己打开的那一层。
   几秒后脚本自己把它摘掉，旁边那颗 × 随时能点掉；不做遮罩、不做对话框。 */
.site-notice {
    position: sticky;
    top: calc(var(--nav-h) + 1px);
    z-index: 40;
    background: var(--ink);
    color: var(--on-brand);
    box-shadow: 0 14px 30px rgb(var(--shade-rgb) / .10);
}

.site-notice__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 46px;
    font-size: 14px;
    font-weight: 600;
}

/* 「去登录」：这一条上唯一会把人带走的那一段 —— 与导航上那两颗 CTA 同一口径，下划线常带 */
.site-notice__link {
    color: var(--on-brand);
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

/* 点掉：圆形描边那一颗，与灯箱工具条上那几颗同一画法（主题不引图标库） */
.site-notice__close {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 45%);
    border-radius: var(--pill);
    background: transparent;
    color: var(--on-brand);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--dur) var(--motion);
}

.site-notice__close:hover {
    background: rgb(255 255 255 / 16%);
}

.site-notice__close:focus-visible {
    outline: 2px solid var(--wj-base, #fff);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .site-notice__inner {
        gap: 10px;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ---------------------------------------------------------------- 原图灯箱 */

/*
 * 铺满一屏：背景是<b>当前这一张图</b>放大糊开的（.lightbox__bg），上面压一层半透明暗底
 * （.lightbox__scrim），中间那张图与工具条都在暗底之上。
 * z-index 80 压在窄屏筛选抽屉（60）之上 —— 灯箱是最后打开的那一层。
 *
 * 这一族留在<b>主题</b>里：看大图是读内容这件事本身的一部分，文章正文里的图与
 * 图床详情页那一张要的是同一套浮层（脚本在 themes/default/lightbox.js）。
 * 触发约定仍是那四样 data-cms-lightbox 属性与 wujies:lightbox 事件（site.js 的
 * wireLightbox）：别的应用将来要自己的查看器，接同一个事件画自己的浮层即可，不必改主题。
 *
 * 三个旋钮都在这一条里，脚本一个内联样式都不写：
 *  --lightbox-blur      糊到什么程度（越大越不抢正文那张图）
 *  --lightbox-bg-scale  背景放大多少：模糊会把边缘羽化掉大约一个 blur 半径，
 *                       不放大就露出羽化那圈的空白；这里留的余量按窄屏那一边也够
 *  --lightbox-scrim     暗底压多深：图是亮的（白底商品图不少），只糊不压暗的话
 *                       白按钮与正文那张图就没有对比度了
 */
.lightbox {
    --lightbox-blur: 28px;
    --lightbox-bg-scale: 1.35;
    --lightbox-scrim: rgb(var(--shade-rgb) / 68%);

    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    /* 实底（--ink 就是主题那一档墨色）：背景那张图没加载出来时（脚本挂了 onerror 把它收掉）
       就退回这一层，浮层照样是能读的一屏 */
    background: var(--ink);
    color: var(--on-brand);
}

/* 背景那一层：就是当前这张原图（同一个地址，浏览器复用上面那张的缓存，不多一次请求）。
   object-fit: cover 把它铺满，糊完再放大一点把羽化的边缘裁到屏幕外。 */
.lightbox__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(var(--lightbox-blur));
    transform: scale(var(--lightbox-bg-scale));
}

/* 加载不出来的那一种：整层收掉，只留 .lightbox 那层墨底（display 会被上面那条盖掉，要单独写） */
.lightbox__bg[hidden] {
    display: none;
}

/* 压在背景上的那层暗底：只管对比度，不接受点击（点空白处关浮层那件事归 .lightbox__stage） */
.lightbox__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--lightbox-scrim);
    pointer-events: none;
}

body.is-lightbox-open {
    overflow: hidden;
}

/* 中间那一块：图在这里。上下留出工具条与说明的位置，左右留出翻页键的位置。
   z-index 2 —— 必须压在背景与暗底之上。 */
.lightbox__stage {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 64px 72px 56px;
}

.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: var(--radius);
    user-select: none;
    -webkit-user-drag: none;
    transition: transform var(--dur) var(--motion);
}

/* 放大之后可以拖着看细节：光标先变"抓手"，拖动时变"抓住" */
.lightbox__img.is-zoomed {
    cursor: grab;
}

.lightbox__img.is-dragging {
    cursor: grabbing;
    /* 拖动时不再过渡：0.3 秒的缓动会让手跟不上 */
    transition: none;
}

/* 工具条：右上角那一排圆形按钮（缩小 / 放大 / 还原 / 旋转 / 下载 / 关闭） */
.lightbox__tools {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.lightbox__btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 45%);
    border-radius: var(--pill);
    background: transparent;
    color: var(--on-brand);
    cursor: pointer;
    transition: background var(--dur) var(--motion);
}

.lightbox__btn:hover {
    background: rgb(255 255 255 / 16%);
}

.lightbox__btn:focus-visible {
    outline: 2px solid var(--wj-base, #fff);
    outline-offset: 2px;
}

.lightbox__btn svg {
    width: 18px;
    height: 18px;
}

/* 翻页：左右两颗，只在还有上一张 / 下一张时出现 */
.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 45%);
    border-radius: var(--pill);
    background: transparent;
    color: var(--on-brand);
    cursor: pointer;
    transition: background var(--dur) var(--motion);
}

.lightbox__nav:hover {
    background: rgb(255 255 255 / 16%);
}

.lightbox__nav svg {
    width: 22px;
    height: 22px;
}

.lightbox__nav--prev {
    left: 18px;
}

.lightbox__nav--next {
    right: 18px;
}

/* 到头时脚本把那颗键收起来：display 会被上面那条类选择器盖掉，所以要单独写一条 */
.lightbox__nav[hidden] {
    display: none;
}

/* 底下那行说明：图名与「第几张 / 共几张」。同样压在暗底之上，别跟着背景一起糊掉。 */
.lightbox__caption {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px var(--pad);
    font-size: 13px;
    color: var(--on-brand);
}

.lightbox__name {
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox__count {
    opacity: .6;
}

/* 窄屏：七颗键要收一号才排得下，翻页键也要让开图 */
@media (max-width: 560px) {
    .lightbox__stage {
        padding: 56px 48px 48px;
    }

    .lightbox__tools {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    .lightbox__btn {
        width: 34px;
        height: 34px;
    }

    .lightbox__btn svg {
        width: 16px;
        height: 16px;
    }

    .lightbox__nav {
        width: 36px;
        height: 36px;
    }

    .lightbox__nav--prev {
        left: 8px;
    }

    .lightbox__nav--next {
        right: 8px;
    }
}


/* --------------------------------------------------------- 转发海报弹窗 */

/* 转发那颗键点开的浮层：一张当场画出来的海报（.share-sheet__canvas），
   海报下面一排"去哪儿分享"，再下面两颗动作键。整块由 site.js 现插，
   没有脚本时页面里根本不存在这一层 —— 所以这里不需要写"禁用 JS"的那种兜底。 */
.share-sheet {
    position: fixed;
    inset: 0;
    /* 压在图片查看器（80）之上：转发时不该被另一层浮层盖住 */
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.share-sheet[hidden] {
    display: none;
}

/* 遮罩只管压暗与接住"点空白处关闭"，点击由 site.js 挂在 [data-share-close] 上 */
.share-sheet__scrim {
    position: absolute;
    inset: 0;
    background: rgb(var(--shade-rgb) / 46%);
}

.share-sheet__card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(460px, 100%);
    max-height: calc(100vh - 48px);
    padding: 26px 22px 22px;
    overflow-y: auto;
    border-radius: 18px;
    background: var(--wj-base, #fff);
    box-shadow: 0 24px 64px rgb(var(--shade-rgb) / 22%);
}

.share-sheet__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.share-sheet__close:hover {
    background: var(--soft);
    color: var(--ink);
}

/* 海报那一格：浅底 + 内边距，图上自带白底，放在这里像是"摆出来的一张照片" */
.share-sheet__poster {
    display: flex;
    justify-content: center;
    padding: 12px;
    border-radius: 14px;
}

/* 画布按宽度铺满、按高度收住：竖图在窄屏上会顶出屏幕，所以由 max-height 说了算 */
.share-sheet__canvas {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 52vh;
    height: auto;
    border-radius: 10px;
    background: var(--wj-base, #fff);
    box-shadow: 0 6px 18px rgb(var(--shade-rgb) / 8%);
}

.share-sheet__tip {
    min-height: 21px;
    margin: 12px 2px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

/* 四个平台一格：圆底一个字 + 名字，扫一眼就知道点哪个 */
.share-sheet__targets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.share-sheet__target {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 4px 12px;
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: var(--body);
    font-family: inherit;
    cursor: pointer;
    transition: background-color var(--dur) var(--motion);
}

.share-sheet__target:hover {
    background: var(--soft);
}

.share-sheet__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--on-brand);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}

/* 四家各自那一枚底色（认色认平台，比画四个 logo 稳妥，也不引入外部图） */
.share-sheet__badge--wechat {
    background: var(--plat-wechat);
}

.share-sheet__badge--qq {
    background: var(--plat-qq);
}

.share-sheet__badge--weibo {
    background: var(--plat-weibo);
}

.share-sheet__badge--xhs {
    background: var(--plat-xhs);
}

.share-sheet__name {
    color: var(--muted);
    font-size: 13px;
    line-height: 1;
}

.share-sheet__actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.share-sheet__action {
    flex: 1;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    background: var(--wj-base, #fff);
    color: var(--body);
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    transition: background-color var(--dur) var(--motion), color var(--dur) var(--motion);
}

.share-sheet__action:hover {
    border-color: var(--ink);
}

.share-sheet__action--main {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--on-brand);
}

.share-sheet__action--main:hover {
    background: var(--panel-dark);
}

/* 海报那一格点下去看大图：光标先说"这一下是放大"，查看器用的是主题共用的那份
   （lightbox.js，图床页也在用），所以这里只需要一个光标和一层临时的层叠调整。 */
.share-sheet__canvas {
    cursor: zoom-in;
}

/* 转发弹窗盖在查看器（80）之上；点海报看大图时查看器得反过来盖住弹窗，
   所以打开期间把查看器抬到 100（关掉由 lightbox 发事件，site.js 摘掉这枚标记）。 */
body.is-lightbox-over-sheet .lightbox {
    z-index: 100;
}

/* 弹窗开着的时候，后面那一页不跟着滚（关掉时由 site.js 摘掉这个类） */
body.is-share-open,
html.is-share-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .share-sheet {
        padding: 14px;
    }

    .share-sheet__card {
        padding: 22px 14px 16px;
        border-radius: var(--radius);
    }

    .share-sheet__canvas {
        max-height: 46vh;
    }

    .share-sheet__badge {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
}

/* ------------------------------------------------------------------ 用户主页 */

/* 页头：头像在左，昵称与统计在中间，关注/私信在右；窄屏时按钮掉到下一行。
   页头仍归 .band（面包屑 + 页名那一块），这里只覆盖对齐方式 —— 这一屏不是列表标题，居中会与头像打架。 */
.band--profile {
    padding-top: 32px;
    text-align: left;
}

.profile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    margin-top: 18px;
    text-align: left;
}

.profile__avatar {
    flex: 0 0 auto;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--soft);
}

.profile__avatar--blank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--muted);
}

.profile__meta {
    flex: 1 1 220px;
    min-width: 0;
}

.profile__name {
    margin: 0;
    font-size: clamp(26px, 4.4vw, 40px);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
    overflow-wrap: anywhere;
}

/* 一行讲完这个人是谁：昵称 + 等级 + 勋章（+「N」）。签名在其下一行（.profile__bio），
   地区 / 关注 / 粉丝再下一行（.profile__facts）。 */
.profile__headline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* 签名：一行就够，长了截断（完整内容在 title 里）—— 主页的主角仍是下面的作品列表，
   一句自我介绍不该把第一屏顶下去。 */
.profile__bio {
    margin: 6px 0 0;
    color: var(--body);
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow-wrap: anywhere;
}

.profile__facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.profile__level {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--pill);
    background: var(--ink);
    color: var(--on-brand);
    font-size: 12px;
    font-weight: 700;
}

/* 有等级图时胶囊就是那张图本身，不再铺底色与内边距 */
.profile__level--image {
    padding: 0;
    background: none;
    overflow: hidden;
}

.profile__level img {
    display: block;
    height: 22px;
    width: auto;
}

/* IP 归属地：一枚浅色描边胶囊，与等级 / 徽章同一行、不抢墨色 */
.profile__place {
    padding: 2px 10px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    color: var(--muted);
    font-size: 12px;
}

.profile__place[hidden] {
    display: none;
}

.profile__fact b {
    margin-right: 2px;
    color: var(--ink);
    font-size: 15px;
}

/* 两个数字是链到关系页的路：整颗可点，hover 描黑，数字仍是墨色 */
a.profile__fact:hover {
    color: var(--ink);
}

/* 勋章一排：图是会员应用给的 URL，没图时印名字前两字（与评论区那一排同一条）。
   最多 3 枚，「+N」点开看全部（与首页人卡、文章页作者卡同一把尺子）。 */
.profile__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.profile__badges[hidden] {
    display: none;
}

.profile__badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--soft);
}

.profile__badge img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile__badge span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--muted);
    font-size: 10px;
}

/* 累计签到：方块标签 + 日历图标 + 天数（与首页人卡、文章页作者卡、标签云同一个形状） */
/* 累计签到：组件层的 .tag.tag--mute（模板：class="tag tag--mute profile__checkin"）。
   与首页人卡、我的卡、签到标签同一个形状与同一组令牌，这里只加等宽数字。 */
.profile__checkin b { font-weight: 800; font-variant-numeric: tabular-nums; }
.profile__checkin-ico { width: 12px; height: 12px; flex: none; }

/* 页头那颗「+N」与首页人卡共用 .hp-badges-more，只把字号对齐这一带的 12px */
.profile__badges .hp-badges-more { padding: 0 7px; font-size: 11px; }

.profile__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
}

.profile__hint {
    flex: 1 1 100%;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.profile__hint:empty {
    display: none;
}

/* 四档 tab：外观全部来自组件层的 .tabs / .tab--md（模板上 class="ptabs tabs"），
   这里只剩"这一排比右栏那排更宽松一点"的版式差量。
   按钮是 <button>，脚本没接管时只有"文章"那一档可见，不出现一颗按了没反应的键
   （切换逻辑全在 site.js，它认的钩子是 .ptab / .is-on，类名不能动）。 */
.ptabs {
    gap: 4px 24px;
    margin-bottom: 24px;
    /* 原来这里还有 padding-bottom:10px + .ptab.is-on::after{bottom:-11px} 那一对：
       10px 内距是为了把那条下划线推到容器底边上。.tab--md 的底部内距本身就是 11px，
       指示条按 bottom:-1px 落在盒子底边 —— 容器再留 10px 就会把它顶起来悬在半空。
       两套补偿只留一套，删掉这一条。 */
}

.ppanel[hidden] {
    display: none;
}

.ppanel__state {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.ppanel__state:empty {
    display: none;
}

.ppanel__state a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 四档 tab 的卡片直接复用首页 .grid / .card（site.js 里 makeUserCard 产的是同一副结构），
   这里只留收藏夹那排小键。 */
.pfolders {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.pfolder-chip {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.pfolder-chip:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.pfolder-chip.is-on {
    border-color: var(--ink);
    color: var(--ink);
    font-weight: 600;
}

/* 选中那个夹的一句说明（夹子为空时整行收起）：小字，不抢上面的小键 */
.pfolder-meta {
    flex: 1 1 100%;
    color: var(--muted);
    font-size: 12px;
}

.pfolder-meta[hidden] {
    display: none;
}

/* ------------------------------------- 关注 / 粉丝页（/site/user/{id}/relations） */

/* 回主页的小行：头像 + 昵称，与页头同一形状、小一号 */
.relations-back {
    margin-top: 14px;
}

.relations-back__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.relations-back__link:hover .relations-back__name {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.relations-back__avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--soft);
}

.relations-back__avatar--blank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.relations-back__name {
    font-size: 15px;
    font-weight: 700;
}

/* 两档 tab 居中摆：选中项一条短下划线（不是通栏那条），与 .ptab 同一套字 */
.rtabs {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 28px;
}

.rtab {
    position: relative;
    padding: 8px 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 17px;
    cursor: pointer;
}

.rtab:hover {
    color: var(--ink);
}

.rtab.is-on {
    color: var(--ink);
    font-weight: 700;
}

.rtab.is-on::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 28px;
    height: 2px;
    transform: translateX(-50%);
    background: var(--ink);
}

.rtab__count {
    margin-left: 2px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

/* 三等宽列，间距跟 .grid 的档走（8/12/16）；窄屏一列，卡片里那三样才摆得下 */
.rgrid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

/* 用户卡：与现有卡同一份边框 / 圆角 / 白底，没有阴影没有渐变 */
.rcard {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--wj-base, #fff);
}

.rcard:hover {
    border-color: var(--ink);
}

.rcard__avatar {
    flex: 0 0 auto;
    display: block;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--soft);
}

.rcard__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 没头像印昵称首字：与 profile__avatar--blank 同一形状，小一号 */
.rcard__avatar--blank {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 18px;
    font-weight: 700;
}

.rcard__body {
    flex: 1;
    min-width: 0;
}

.rcard__top {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.rcard__name {
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rcard__name:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 等级小 pill：与 profile__level 同一形状；有图印图、去掉底色 */
.rcard__level {
    flex: 0 0 auto;
    padding: 1px 8px;
    border-radius: var(--pill);
    background: var(--ink);
    color: var(--on-brand);
    font-size: 11px;
    font-weight: 700;
}

.rcard__level[hidden] {
    display: none;
}

.rcard__level--img {
    padding: 0;
    background: none;
}

.rcard__level img {
    display: block;
    height: 16px;
    width: auto;
}

.rcard__badges {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
}

.rcard__badges[hidden] {
    display: none;
}

.rcard__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--soft);
    color: var(--muted);
    font-size: 8px;
}

.rcard__badge img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 副行：系统没有签名档，只印粉丝数，长了截断 */
.rcard__sub {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 关注键：btn--ghost 的形状小一号；「已关注」收着点，不跟昵称抢注意力 */
/* 关注键（关系卡）：外观是组件层的 .btn.btn--sm.btn--ghost（site.js 生成时就带上这三个类），
   这里只剩"别被昵称挤扁"这一条布局。以前那两行 padding / font-size 与 --sm 一模一样，
   两处同时改才不出偏差 —— 已删。 */
.rcard__follow {
    flex: 0 0 auto;
}

.rcard__follow[aria-pressed="true"] {
    border-color: var(--line);
    color: var(--muted);
}

/* 失败那句 msg：与 profile__hint 同形（小字、空则整行收起），在卡里折到下一行 */
.rcard__hint {
    flex: 1 1 100%;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.rcard__hint:empty {
    display: none;
}

/* 「加载更多」摆在底部居中；没有了就整颗藏掉 */
.rmore {
    padding-top: 28px;
    text-align: center;
}

.rmore [hidden] {
    display: none;
}

@media (min-width: 768px) {
    .rgrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (min-width: 1200px) {
    .rgrid {
        gap: 16px;
    }
}

@media (max-width: 620px) {
    .profile {
        align-items: flex-start;
    }

    .profile__avatar {
        width: 64px;
        height: 64px;
    }

    .profile__actions {
        flex: 1 1 100%;
    }

    .ptabs {
        gap: 4px 16px;
    }

    .ptab {
        font-size: 15px;
    }
}

/* ---------------------------------------------------------------------------
   主题选项（后台按 themes/<code>/theme.json 的 settings 自动生成表单）
   变量由 head.html 里的 <style> 注入，只在这里消费 —— 换主题时不必改这段约定。
   --------------------------------------------------------------------------- */
.wrap {
    max-width: var(--wrap);
}

.hero__cta,
.member__cta {
    /* 「主题 → 样式配置 → 主色」：统一读 --brand（= var(--wj-primary, 近黑)）。
       原来这里还套了一层旧键 --wj-accent，但注入端只要输出 --wj-primary 就一定同时输出它，
       所以那一层永远轮不到 —— 留着只会让人以为改旧键还能生效。 */
    background: var(--brand);
    color: var(--on-brand);
}

.section__index {
    color: var(--brand);
}

.grid__item > * {
    border-radius: var(--radius);
}

/* 编排新增的「文字板块」区块 */
.section--text {
    text-align: center;
    padding: 76px 0;
}

.section--text.section--left {
    text-align: left;
}

.section__title--plain {
    font-size: 34px;
    letter-spacing: -0.02em;
}

.section__lead {
    max-width: 680px;
    margin: 14px auto 0;
    font-size: 17px;
    line-height: 1.8;
    opacity: 0.72;
}

.section--left .section__lead {
    margin-left: 0;
}

/* ===========================================================================
   以下三层是「主题令牌 + 版式升级」层，统一追加在文件末尾。
   为什么追加而不是就地改：这一层要覆盖前面的 .grid / .card / .widget 等定义，
   同权重时"后者胜出"是最稳的覆盖方式；就地改要把 5000 行里散落的几十处一起动，
   改漏一处的结果就是"某屏还是老样子"，而没人能从 CSS 里看出漏了哪处。
   =========================================================================== */

/* ---------------------------------------------------------------------------
   一、列表排版：横版 / 轮播
   ---------------------------------------------------------------------------
   横版 = 一行两条、每张图左文右；轮播 = 一行并排、可横滑。
   横版以前是 flex-column 的一行一条，占满整行却只放一篇文章，
   与「竖版网格」相比只是把卡片躺平，没有换来信息密度。
   两者都带 .grid 类，所以选择器写成 `.grid.grid--horizontal`（两个类）——
   只有这样才能压过前面 `.grid` 与它的 2/3/4 列媒体查询（那些是单类）。
   上一版写的是 `.grid--horizontal`，权重与 `.grid` 相同、位置又在前，
   display:flex 被后面的 display:grid 盖掉：页面上就是"选了横版还是两列竖卡，
   卡片正文被 260px 的固定图宽挤成一列竖排字"。
*/

.grid.grid--horizontal {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap-block);
}

.grid.grid--horizontal .grid__item {
    width: auto;
    min-width: 0;
}

.grid.grid--horizontal .card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .2s var(--motion), box-shadow .2s var(--motion);
}

.grid.grid--horizontal .card:hover {
    border-color: var(--brand-line);
    box-shadow: 0 8px 24px -16px rgb(var(--shade-rgb) / .35);
}

.grid.grid--horizontal .card__link {
    flex: none;
    width: 38%;
    max-width: 240px;
}

.grid.grid--horizontal .card__media {
    aspect-ratio: 16 / 10;
    height: 100%;
    border-radius: 0;
}

.grid.grid--horizontal .card__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 6px;
    padding: var(--pad-card) var(--pad-card-lg);
}

.grid.grid--horizontal .card__term {
    margin: 0;
}

.grid.grid--horizontal .card__title {
    font-size: 17px;
    line-height: 1.45;
}

.grid.grid--horizontal .card__title-link {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid.grid--horizontal .card__meta {
    margin: 0;
}

@media (max-width: 767px) {
    .grid.grid--horizontal {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid.grid--horizontal .card {
        flex-direction: column;
    }

    .grid.grid--horizontal .card__link {
        width: 100%;
        max-width: none;
    }

    .grid.grid--horizontal .card__media {
        aspect-ratio: 16 / 9;
    }

    .grid.grid--horizontal .card__body {
        padding: 14px 16px 16px;
    }

    .grid.grid--horizontal .card__title {
        font-size: 17px;
    }
}

/* 轮播：一行并排 + 横滑 + 吸附。不加脚本，键盘 Tab 也能走到每一张。 */
.grid.grid--carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding: 2px 2px 14px;
    scrollbar-width: thin;
}

.grid.grid--carousel .grid__item {
    flex: 0 0 280px;
    max-width: 280px;
    scroll-snap-align: start;
}

/* ---------------------------------------------------------------------------
   二、品牌色应用层：主色一处改，按钮 / 字标 / 链接 / 当前项 / 强调全跟着走
   ---------------------------------------------------------------------------
   这一层只做"把已有规则的颜色换成令牌"，不改任何尺寸与布局。
   令牌缺失时（后台没启用自定义样式）--brand 回落到近黑，与升级前完全一致。
*/

/* 按钮的主色 / 描边两种态已经并进「组件层」的 .btn 里（那边直接读 --brand），
   这一段原来把同样四条规则又抄了一遍 —— 抄出来的两份只要有一边改了另一边就落后，
   所以删掉，按钮的样子只剩文件中间那一处定义。 */

/* 品牌字标：默认近黑（#111111），启用自定义样式后跟随主色 */
.nav__brand {
    color: var(--brand);
}

/* 主导航当前项：底色用主色的浅调，字与图标跟随主色 */
.nav__item.is-active {
    color: var(--brand);
    background: var(--brand-soft);
}

.nav__item:hover {
    color: var(--brand);
}

/* 区块编号与会员块的行动按钮跟随主色。
   ⚠️ 首屏那颗按钮**不跟**：它压在深色首屏上，白底黑字才有对比；
   换成主色底之后，默认主色近黑 —— 黑按钮压黑底，等于按钮消失。 */
.section__index,
.member__cta {
    color: var(--brand);
}

.member__cta {
    background: var(--brand);
    color: var(--on-brand);
}

/* 正文里的链接：主色字 + 主色下划线（排版上比纯黑更好认） */
.article__body a {
    color: var(--brand);
    text-decoration-color: var(--brand-line);
    text-underline-offset: 3px;
}

.article__body a:hover {
    text-decoration-color: var(--brand);
}

/* 分页当前页 */
.pager__link.is-active,
.pager__link[aria-current="page"] {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--on-brand);
}

/* ---------------------------------------------------------------------------
   三、页面底色与详情页的模块卡
   ---------------------------------------------------------------------------
   层次是"浅灰页面 → 一张张白卡"：以前详情页是整列一张大白卡，所有分隔都靠 1px 灰线，
   组件之间没有边界、看起来像一张长文档；现在改成平铺分块（见 .article__panel），
   块与块之间直接露出页面底色。类名开关（page-detail / page-list）只影响这两类页，
   首页与商城页保持原样。
*/

body.page-detail,
body.page-list {
    background: var(--page);
}

/* 正文列自己**不再是**一张白卡：整页平铺，每一块内容各占一张卡（.article__panel）。
   以前是「一张 780px 的大白卡装下标题、正文、作者、推荐、评论」，
   滚起来是一根没有段落的长条，读者也分不清哪一块结束了。
   这里用 flex + gap 管模块之间的缝 —— 子元素各自的 margin 会被 gap 叠加成
   "有的缝宽有的缝窄"，所以下面那条把它们统一清零。 */
body.page-detail .article {
    display: flex;
    flex-direction: column;
    gap: var(--gap-block);
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-top: 20px;
}

body.page-detail .article > * {
    margin-top: 0;
    margin-bottom: 0;
}

/* 一块 = 一张白卡。哪些内容合成一块是内容的事（见 post.html 的注释），
   这里只管皮：白底、1px 灰边、圆角与内距一律读令牌（--radius / --pad-card），
   后台改「卡片圆角」时这一批卡会一起跟着变，不再各自写死一个 12px / 16px。 */
.article__panel {
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--pad-card);
    box-shadow: 0 1px 3px rgb(var(--shade-rgb) / .05), 0 16px 36px -32px rgb(var(--shade-rgb) / .55);
}

/* 卡片顶端不叠外边距：题图/正文的 margin-top 是"接在标题下面"的距离，
   现在卡缝已经隔开了，再留就是一段莫名其妙的空白。 */
.article__panel > :first-child {
    margin-top: 0;
}

/* 文末那颗「回到内容」：不装卡，但要和最后一卡留出呼吸，并给页脚让位 */
body.page-detail .article > .article__end {
    margin: 6px 0 44px;
}

@media (max-width: 899px) {
    .article__panel {
        padding: var(--pad-card);
    }
}

/* 右栏：页面底色之上，组件各自成卡 */
body.page-detail .article-aside {
    padding: 20px 0 40px;
}

body.page-detail .toc {
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--pad-card) var(--pad-card-wide);
}

/* ---------------------------------------------------------------------------
   四、右栏组件：一层卡皮 + 各自的版式
   ---------------------------------------------------------------------------
   标题统一成"主色小竖条 + 黑字"（参考站那种"图标/色条 + 粗标题"），
   五个组件共用，标题文字仍是各片段自己给的。
*/

.widget {
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--pad-card);
    box-shadow: 0 1px 2px rgb(var(--shade-rgb) / .04);
}

/* 文末那一份（作者 / 上下篇 / 相关推荐）不需要卡片底：它们已经在白卡正文里了 */
.article .widget {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.widget__title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
    color: var(--ink);
}

/* 组件标题图标（目录 / 排行榜 / 标签云 / 统计 / 我的 等）：主色线性图标 */
.widget__ico,
.toc__ico,
.cat-nav__ico {
    flex: none;
    width: 17px;
    height: 17px;
    color: var(--brand);
}

/* 统计：两列小方块 + 最后一格通栏 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.stat-grid__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--soft);
}

.stat-grid__item--wide {
    grid-column: 1 / -1;
}

.stat-grid__num {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.stat-grid__label {
    font-size: 12px;
    color: var(--muted);
}

/* 排行榜：TOP1 通栏大图，其余是缩略图小行。
   与 mini-list 那套「彩色序号 + 单行标题」的区别：这里每篇都占图位，
   榜单是"先看图再点"；没封面也用渐变占位，不会塌成一列文字。 */
.rank-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item + .rank-item {
    margin-top: 12px;
}

.rank-item__link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
}

.rank-item__media {
    position: relative;
    flex: none;
    width: 96px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--soft);
}

.rank-item__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 没配封面：按名次循环换一档渐变，再压一枚图片图标 —— 一眼能读出"这是占位" */
.rank-item__media--blank {
    background-image: var(--ph-icon), linear-gradient(135deg, var(--brand-soft), var(--soft-strong));
    background-repeat: no-repeat, no-repeat;
    background-position: center, center;
    background-size: 22px 22px, cover;
}

.rank-item:nth-child(3n+2) .rank-item__media--blank {
    background-image: var(--ph-icon), linear-gradient(135deg, var(--grad-blue-a), var(--grad-blue-b));
}

.rank-item:nth-child(3n+3) .rank-item__media--blank {
    background-image: var(--ph-icon), linear-gradient(135deg, var(--grad-sand-a), var(--grad-sand-b));
}

.rank-item:nth-child(3n+4) .rank-item__media--blank {
    background-image: var(--ph-icon), linear-gradient(135deg, var(--grad-mint-a), var(--grad-mint-b));
}

/* 角标压在图上：第一名用主色里的"热"色，其余一律深灰，不抢标题 */
.rank-item__no {
    position: absolute;
    top: 0;
    left: 0;
    padding: 2px 8px;
    border-bottom-right-radius: var(--radius-sm);
    background: rgb(var(--shade-rgb) / .72);
    color: var(--on-brand);
    font-size: 10px;
    letter-spacing: .04em;
}

.rank-item:first-child .rank-item__no {
    padding: 3px 10px;
    background: var(--hot);
    font-size: 12px;
}

.rank-item__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rank-item__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--body);
}

.rank-item__title:hover {
    color: var(--brand-2);
}

.rank-item__link:hover .rank-item__title {
    color: var(--brand);
}

.rank-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
}

/* 第一名：整块通栏大图，标题与阅读数压在深色渐变上。
   圆角必须挂在 __link 上，不能只挂 __media：绝对定位的 __body（底部那层黑渐变）
   是 __link 的子元素、不是 __media 的子元素，只裁 __media 的话下面两个角照样是直角。
   挂 __link + overflow:hidden 之后，图与压图文字一起被裁成同一张圆角。 */
.rank-item--first .rank-item__link {
    display: block;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.rank-item--first .rank-item__media {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
}

.rank-item--first .rank-item__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 34px 12px 10px;
    background: linear-gradient(to bottom, rgb(var(--shade-rgb) / 0), rgb(var(--shade-rgb) / .72));
}

.rank-item--first .rank-item__title {
    font-size: 17px;
    font-weight: 800;
    color: var(--on-brand);
}

.rank-item--first .rank-item__meta {
    color: rgba(255, 255, 255, .85);
}

.rank-item--first .rank-item__link:hover .rank-item__title {
    color: var(--on-brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 猜你喜欢：彩色序号 + 单行标题（参考站那种"1 标题…"的紧凑榜单） */
.mini-list {
    display: flex;
    flex-direction: column;
}

.mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.mini-item + .mini-item {
    border-top: 1px dashed var(--line);
}

.mini-item__link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.mini-item__no {
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: var(--wj-info, #00b6ff);
    color: var(--on-brand);
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    font-style: normal;
}

/* 八色循环：序号自带色彩，一眼能看出"这是一组推荐"而不是编号列表 */
.mini-item:nth-child(8n+1) .mini-item__no { background: var(--tone1); }
.mini-item:nth-child(8n+2) .mini-item__no { background: var(--tone2); }
.mini-item:nth-child(8n+3) .mini-item__no { background: var(--tone4); }
.mini-item:nth-child(8n+4) .mini-item__no { background: var(--tone3); }
.mini-item:nth-child(8n+5) .mini-item__no { background: var(--tone5); }
.mini-item:nth-child(8n+6) .mini-item__no { background: var(--tone1); }
.mini-item:nth-child(8n+7) .mini-item__no { background: var(--tone6); }
.mini-item:nth-child(8n+8) .mini-item__no { background: var(--tone8); }

.mini-item__media {
    display: none;
}

.mini-item__body {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.mini-item__title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    color: var(--body);
}

.mini-item__meta {
    flex: none;
    font-size: 11px;
    color: var(--muted);
}

.mini-item__link:hover .mini-item__title {
    color: var(--brand);
}

/* 标签云：彩色药丸（八色循环），比之前"灰底 + 字号分档"更接近参考站 */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 每个标签就是组件层的 .tag--md（模板上 class="tag tag--md tagcloud__item"）：
   方块形状、内距、字号、浅底都来自那边，这里只剩两件本地的事 ——
   hover 的位移和「按位置轮着上色」。 */
.tagcloud__item {
    transition: transform .15s var(--motion), filter .15s var(--motion);
}

.tagcloud__item:hover {
    transform: translateY(-1px);
    filter: brightness(.96);
}

/* 八色轮转。以前这 16 个色值（底色 + 文字色）是手抄在这里的，
   跟头像渐变、勋章、状态标签各抄一遍；现在只读色板槽位 --tone*。
   注意 :nth-child 的权重比 .tag--md 高一档，所以底色与字色在这里能压过组件默认值。 */
.tagcloud__item:nth-child(8n+1) { background: var(--tone1-soft); color: var(--tone1-ink); }
.tagcloud__item:nth-child(8n+2) { background: var(--tone2-soft); color: var(--tone2-ink); }
.tagcloud__item:nth-child(8n+3) { background: var(--tone3-soft); color: var(--tone3-ink); }
.tagcloud__item:nth-child(8n+4) { background: var(--tone4-soft); color: var(--tone4-ink); }
.tagcloud__item:nth-child(8n+5) { background: var(--tone5-soft); color: var(--tone5-ink); }
.tagcloud__item:nth-child(8n+6) { background: var(--tone6-soft); color: var(--tone6-ink); }
.tagcloud__item:nth-child(8n+7) { background: var(--tone7-soft); color: var(--tone7-ink); }
.tagcloud__item:nth-child(8n+8) { background: var(--tone8-soft); color: var(--tone8-ink); }

/* 字号分档保留（篇数多的标签重一点），但不改变色系 */
.tagcloud__item.is-md { font-size: 14px; }
.tagcloud__item.is-lg { font-size: 15px; }

.tagcloud__count {
    font-size: 10px;
    opacity: .65;
    font-variant-numeric: tabular-nums;
}

/* 上一篇 / 下一篇：两张小卡，箭头方向即阅读方向 */
.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    /* 两张卡之间的缝与模块之间的灰缝同宽，整页看起来才是一套栅格 */
    gap: 18px;
    margin: 36px 0 8px;
}

.post-nav__link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--pad-card) var(--pad-card-wide);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    /* 和正文那几张模块卡同一张皮：上下篇现在是并排的两块独立模块，
       底色不一致时，它看起来像从别处复制来的一段。 */
    background: var(--wj-base, #fff);
    box-shadow: 0 1px 3px rgb(var(--shade-rgb) / .05), 0 16px 36px -32px rgb(var(--shade-rgb) / .55);
    transition: border-color .2s var(--motion), background .2s var(--motion);
}

.post-nav__link:hover {
    border-color: var(--brand-line);
    background: var(--brand-soft);
}

.post-nav__link--next {
    text-align: right;
}

.post-nav__label {
    font-size: 12px;
    color: var(--muted);
}

.post-nav__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 相关推荐：文末三卡（有封面出图，没有就留一块浅底） */
.related {
    margin: 40px 0 8px;
}

.related__title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
}

.related__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 767px) {
    .related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.related__card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: var(--radius);
    overflow: hidden;
}

.related__media {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    background: var(--soft);
}

.related__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.related__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related__card:hover .related__name {
    color: var(--brand);
}

.related__meta {
    font-size: 12px;
    color: var(--muted);
}

/* ---------------------------------------------------------------------------
   五、组件内的分组页签（右栏「猜你喜欢 / 热门推荐 / 最新更新」）
   ---------------------------------------------------------------------------
   纯 CSS 出样式，切换靠 site.js 的 wireTabs 加 is-on。脚本没跑时，
   带 is-on 的那一页照样完整可见 —— 三个页签都空掉的观感比"少了两个页签"糟得多。
*/

/*
   外观来自组件层的 .tabs / .tab（模板上 class="wj-tabs__bar tabs"），
   这里只留右栏这一格需要的收紧（负的上缝把小标题与页签拉近）与面板显隐。

   纯 CSS 出样式，切换靠 site.js 的 wireTabs 加 is-on。脚本没跑时，
   带 is-on 的那一页照样完整可见 —— 三个页签都空掉的观感比"少了两个页签"糟得多。
*/

.wj-tabs__bar {
    gap: 16px;
    margin: -2px 0 12px;
}

.wj-tabs__pane {
    display: none;
}

.wj-tabs__pane.is-on {
    display: block;
}

/* ---------------------------------------------------------------------------
   六、列表页两列（列表 + 侧栏）
   ---------------------------------------------------------------------------
   列表本体仍是一个 .grid（2/3/4 列随宽度变），侧栏固定 300px。
   窄屏（<1140px）侧栏整列不渲染 —— 手机上一列卡片已经够长，再往底下塞侧栏只是把内容推远。
   用 flex 而不是 grid：侧栏被媒体查询藏掉时，列表自己占满，不会留一条空轨道。
*/

.list-shell {
    display: flex;
    align-items: flex-start;
    gap: var(--gap-cols);
}

.list-main {
    flex: 1 1 auto;
    min-width: 0;
}

.list-aside {
    display: none;
    flex: 0 0 300px;
}

.list-aside > * + * {
    margin-top: var(--gap-block);
}

@media (min-width: 991px) {
    .list-aside {
        display: block;
        position: sticky;
        top: 88px;
    }
}

/* 分类/标签页左栏文章：三张一行（列数由 .grid--3 统一管，<768px 收两张），
   横版排版仍然一行一张 —— 横版卡是图文左右排，一行两张会把标题挤成两行。 */
@media (min-width: 991px) {
    .page-list .grid--loose {
        gap: var(--gap-block) var(--gap-cols);
    }

    .page-list .grid.grid--horizontal {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------------------------------------------------------------------------
   七、文章卡片：从"零售货架"改成"内容卡"
   ---------------------------------------------------------------------------
   原来的卡片是 4:5 竖图 + 居中文字 + 无边框的浅灰底（照商品卡来的）。
   文章没有封面时，那一块 4:5 的灰色占位比正文还高，一排卡看下去全是空框 ——
   我们种子文章基本都没封面，于是首页第一眼就是"整页灰块"。

   改三件事：
     1. 比例 4:5 → 16:10：横向缩略图，没封面时占位也不至于比标题高太多；
     2. 卡面白底 + 1px 描边 + 圆角，浮在浅灰页面上（与右栏组件同一套皮）；
     3. 文字左对齐、分类做成主色小标签、hover 抬 2px 且标题变主色。
*/

.card {
    overflow: hidden;
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .2s var(--motion), box-shadow .2s var(--motion), border-color .2s var(--motion);
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-line);
    box-shadow: 0 12px 28px -20px rgb(var(--shade-rgb) / .45);
}

.card__media,
.grid__item .card__media {
    aspect-ratio: 16 / 10;
    border-radius: 0;
    background: var(--soft);
}

.card__body {
    padding: 12px 16px 16px;
    text-align: left;
}

.card__term {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: none;
}

.card__title {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--ink);
}

.card__title-link:hover {
    color: var(--brand);
}

.card__meta {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.card__author {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
}

.card__author img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

/* 无封面占位：底色调成极浅的主色，图标与「暂无封面」压小一号，
   让它在视觉上退到标题后面 —— 之前它是整张卡里最亮的一块。 */
.card__media--blank {
    background:
        radial-gradient(120% 100% at 50% 0%, var(--wj-base, #fff) 0%, transparent 70%),
        linear-gradient(135deg, var(--brand-soft) 0%, var(--soft) 100%);
}

.card__media--blank::before {
    width: 40px;
    height: 40px;
    margin: -32px 0 0 -20px;
    opacity: .38;
}

.card__media--blank::after {
    top: calc(50% + 12px);
    font-size: 11px;
    color: var(--brand);
    opacity: .5;
}

/* ---------------------------------------------------------------------------
   八、首屏：没有配轮播图时，也得像"有设计"，而不是一块灰
   ---------------------------------------------------------------------------
   旧版首屏底色是 --soft（浅灰）+ 一层黑色 scrim，没图时就是一块灰色渐变，
   白字压在上面像"图片没加载出来"。现在底色直接用主色到深墨的斜向渐变：
   默认主色近黑 → 一块克制的深色首屏；主色选蓝 → 蓝到深蓝。
   配了轮播图时 .hero__media 会盖住底色，所以这一段对轮播模式没有任何影响。

   标题从 clamp(44px,11vw,116px) 收到 64px 上限：参考站的首屏标题是"大而不占满"，
   116px 的汉字在 1440 宽下会横跨半屏，压得副标题和按钮没地方站。
*/

.hero {
    background:
        radial-gradient(90% 120% at 82% 8%, rgba(255, 255, 255, .18) 0%, transparent 58%),
        linear-gradient(128deg, var(--brand) 0%, var(--panel-dark) 76%);
}

.hero__title {
    font-size: clamp(34px, 5.4vw, 64px);
    letter-spacing: -.02em;
}

.hero__sub {
    margin-top: 12px;
    font-size: 15px;
}

.hero__cta {
    background: var(--wj-base, #fff);
    color: var(--ink);
}

.hero__cta:hover {
    background: var(--brand-soft);
}

/* 列表页页头：原来是居中 220px 高的大标题带，分类名 + "N 篇内容" 占掉首屏三分之一。
   参考站的列表页头是一条紧凑的标题行，内容才是主角。 */
body.page-list .band {
    padding: 18px 0 6px;
    text-align: left;
}

body.page-list .band__crumb {
    justify-content: flex-start;
    margin-bottom: 8px;
}

body.page-list .band__title {
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

/* 上一篇 / 下一篇只剩一篇时：占满一行，且不要因为 --next 的右对齐而把文字顶到中间 */
.post-nav__link:only-child {
    grid-column: 1 / -1;
    text-align: left;
}

/* 列表页空态：给一块能站住的提示卡，而不是左对齐一行小字漂在空白里 */
.section__empty {
    padding: 48px 24px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--wj-base, #fff);
    text-align: center;
    color: var(--muted);
}

/* ---------------------------------------------------------------------------
   九、几处收口（相关推荐 / 上下篇 / 正文卡阴影）
   ---------------------------------------------------------------------------
   都是"上一版看着别扭"的具体点，逐条写清为什么：

   1. 相关推荐只有一条时，卡片只有 1/3 宽、内容悬在左上，像没对齐。
      给卡自己一圈淡描边 + 内边距，一条也算"一张卡"，两三条并排时是本来的样子。
   2. 上下篇只剩一篇时（模板给了 .post-nav--single），文字回到左边 ——
      「下一篇」原本带右对齐，单独出现会把字顶到卡片最右边。
   3. 正文白卡压在浅灰页面上没有边界感，补一层极淡的阴影。
*/

.related__card {
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--wj-base, #fff);
    border-radius: var(--radius);
    transition: border-color .2s var(--motion), box-shadow .2s var(--motion);
}

.related__card:hover {
    border-color: var(--brand-line);
    box-shadow: 0 10px 24px -20px rgb(var(--shade-rgb) / .4);
}

.related__media {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-sm);
}

.related__body {
    padding: 2px 4px 4px;
}

.post-nav--single {
    grid-template-columns: minmax(0, 1fr);
}

.post-nav--single .post-nav__link {
    /* flex 方向是 column：只写 text-align 盖不住 align-items: flex-end，
       字还是会被顶到右边（下一篇那条规则带的）。两个都要改。 */
    align-items: flex-start;
    text-align: left;
}

/* ---------------------------------------------------------------------------
   十、作者（顶部一条 + 文末一张）
   ---------------------------------------------------------------------------
   一篇文章里的"作者"拆成两处，各答一个问题：

   - 标题下面那条**只交代"谁写的"**：小头像、名字、作者标、最近更新，
     右边两颗键（关注 / 私信）。平铺一行，没有底色没有边框，像正文前面的一行落款。
     读者看完标题正要决定读不读，这里给多一个"要不要关注他"的落点就够了。
   - 正文读完、互动条之后那张**才是名片**：大头像、作品/阅读/标签三枚药丸、
     TA 的其它文章。读到文末的人才关心"这人还写过什么"。

   以前两处都是这张大卡（标题下、文末各一次），一屏里同样的信息出现两遍，
   读者会觉得页面重了影；右栏再放一张就是第三遍。
*/

/* ---- 顶部那一条 ---- */
.article__author {
    display: block;
    margin: 22px 0 0;
    padding: 0 0 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.article__author-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article__author-avatar-wrap {
    position: relative;
    flex: none;
    line-height: 0;
}

.article__author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--wj-base, #fff);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .95), 0 1px 4px rgb(var(--shade-rgb) / .12);
}

.article__author-avatar--blank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--brand);
    background: var(--brand-soft);
    line-height: 1;
}

/* 头像角上的小铜牌：只表达"本文作者"，不是认证也不是等级 */
.article__author-badge {
    position: absolute;
    right: -3px;
    bottom: -3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--brand);
    color: var(--on-brand);
    box-shadow: 0 0 0 2px var(--wj-base, #fff);
    line-height: 0;
}

.article__author-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* 一行讲完这个人：昵称 / 作者标 / 等级 / 勋章 / 累计签到。
   窄屏一行放不下就换行（flex-wrap），不让任何一格被压成省略号 —— 这几格都是短标签。 */
.article__author-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.article__author-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}

/* 「作者」是身份说明，不是资历：用中性灰底，别跟旁边那个主色的等级胶囊抢同一眼。
   （以前两枚都是 --brand-soft / --brand，挨在一起像两个等级） */
.article__author-label {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
}

.article__author-actions {
    display: flex;
    flex: none;
    gap: 8px;
    margin-left: auto;
}

/* 作者条如今在 <header class="article__head"> 里（不是 .article__panel 的直接子项），
   下面那条 1px 线正好把「作者」与「日期 / 摘要」分开，是这一版结构里要留的分隔。
   以前那条 `.article__panel > .article__author { border-bottom: 0 }` 已经匹配不到节点，
   留着只会让人以为线被去掉了 —— 删掉它，别让注释和代码各说各话。 */

/* 关注键：粉色的"心"，是参考站上最容易被记住的一处。
   外观来自组件层的 .btn--xs.btn--accent-ghost（模板：class="btn btn--xs btn--accent-ghost
   article__author-follow"），"已关注褪成灰"也由那边的 [aria-pressed="true"] 统一处理 ——
   本页只留这颗心：♥ / ✓ 放在 ::before 里，因为 site.js 切换文案时用的是 textContent，
   写在按钮文字里会被抹掉。 */
.article__author-follow::before {
    content: "\2665";
    font-size: 11px;
    line-height: 1;
}

.article__author-follow[aria-pressed="true"]::before {
    content: "\2713";
}

/* 私信：与关注键同高同宽，只是次要一级（btn--xs + btn--ghost 就是"白底灰描边"）。
   以前这里又写了一遍 padding / 圆角 / 字号，两颗键的圆角一个是 999px、一个是 var(--pill)，
   数值一样但来源不同 —— 现在都从组件来，改只改一处。 */

/* 数据药丸：三个数各占一档颜色（蓝=作品、橙=阅读、绿=标签）。
   与标签云那套八色循环同一族色值，放在一起不打架。 */
.author-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.author-fact {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.5;
}

.author-fact b {
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.author-fact span {
    font-weight: 600;
    opacity: .78;
}

.author-fact--post { background: var(--h-blue-soft); color: var(--h-blue-ink); }
.author-fact--view { background: var(--h-orange-soft); color: var(--h-orange-ink); }
.author-fact--tag  { background: var(--h-green-soft); color: var(--h-green-ink); }

/* ---- 文末那张名片（和别的模块一样是一张白卡，只是内容多） ---- */
.article__author--full {
    margin: 0;
    padding: var(--pad-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--wj-base, #fff);
    box-shadow: 0 1px 3px rgb(var(--shade-rgb) / .05), 0 16px 36px -32px rgb(var(--shade-rgb) / .55);
}

/* 这张卡里没有第二排按钮，头部回到"头像 + 文字 + 一个出口"，所以垂直居中对齐 */
.article__author--full .article__author-head {
    align-items: center;
    gap: 14px;
}

.article__author--full .article__author-avatar {
    width: 56px;
    height: 56px;
    font-size: 21px;
}

.article__author--full .article__author-name {
    font-size: 17px;
}

.article__author--full .article__author-label {
    padding: 1px 8px;
    font-size: 10.5px;
}

.article__author--full .author-facts {
    margin-top: 14px;
}

/* 「TA 的主页」是这张卡唯一的出口，放在头部右侧，不另占一行 */
.article__author-home {
    flex: none;
    margin-left: auto;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12.5px;
}

.article__author-note {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.article__author-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted);
}

/* 名片下半：TA 的最新文章
   为什么是"竖着排的行"而不是"并排的三张小卡"：大多数站点一位作者只有两三篇，
   三列网格里只放一条时，那张 16:10 的白块会占掉卡片一半的高度、看着像图没加载出来；
   行式排布一条也是一行、三条也是一行行，宽度再窄也不会塌。 */
.article__author-more {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}

/* 作者卡的第二行：只留「最近更新于」—— 等级 / 勋章 / 累计签到已经上移到昵称那一行
   （与首页人卡、我的卡同一条读法）。为一行字也保留 flex，日后加东西不另起一份版式。 */
.article__author-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.article__author-tags .article__author-note { margin: 0; }

.article__author-level {
    flex: none;
    padding: 1px 8px;
    border-radius: var(--pill);
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
}
.article__author-level-img { flex: none; height: 17px; width: auto; }
.article__author-badges { display: inline-flex; align-items: center; gap: 3px; }
.article__author-badges img { width: 16px; height: 16px; object-fit: contain; }
/* 「+N」复用首页人卡那颗按钮（.hp-badges-more，见下方），只把字放大半号对齐 16px 的勋章图 */
.article__author-badges .hp-badges-more { font-size: 11px; padding: 0 6px; }

/* 累计签到 = 组件层的 .tag.tag--mute（模板：class="tag tag--mute article__author-checkin"）。
   与等级胶囊的区别靠"有图标 + 中性灰"两件事 —— 一眼就分得清哪个是资历。
   这已经是全站第 4 处"方块标签 + 日历 + 天数"了（首页人卡、我的卡、用户主页、这里），
   所以它们现在共用同一个 .tag：改一次内距，四处一起动。 */
.article__author-checkin {
    flex: none;
    font-variant-numeric: tabular-nums;
}
.article__author-checkin b { font-weight: 800; }
.article__author-checkin-ico { width: 12px; height: 12px; flex: none; }

/* 两个页签（最近发布 / 读得最多）紧跟标题：条上留一点下距，别贴着列表 */
.author-tabs .wj-tabs__bar { margin-bottom: 8px; }

/* 列表限高 + 内部滚动：作者写几十篇时，这一块不该把整页拉到无穷长。
   264px 大约是三行半（每行 46px 图 + 上下内距），露出半行是刻意的 ——
   让访客看得出"下面还有"。 */
.author-mini--scroll {
    max-height: 264px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
}
.author-mini--scroll::-webkit-scrollbar { width: 6px; }
.author-mini--scroll::-webkit-scrollbar-thumb {
    background: var(--soft-strong);
    border-radius: 3px;
}
.author-mini--scroll::-webkit-scrollbar-track { background: transparent; }

.article__author-more-title {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.author-mini {
    display: flex;
    flex-direction: column;
}

.author-mini__item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 6px;
    margin: 0 -6px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background .15s var(--motion);
}

.author-mini__item:hover {
    background: rgba(255, 255, 255, .72);
}

.author-mini__media {
    flex: none;
    display: block;
    width: 64px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: var(--wj-base, #fff);
}

.author-mini__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 没封面：主色浅调 + 一枚极淡的图片图标，明确是"没有图"，而不是破图。
   64x46 的小格里纯色块会被读成"加载失败"，一枚线性图标就把它变回"占位"。 */
.author-mini__media--blank {
    background-image:
        url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9bec7' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='M3.5 15.5l4.8-3.8 3.7 2.8 3.2-2.2 5.3 3.6'/%3E%3Ccircle cx='9' cy='9.6' r='1.1'/%3E%3C/svg%3E"),
        linear-gradient(135deg, var(--brand-soft) 0%, var(--wj-base, #fff) 78%);
    background-repeat: no-repeat, no-repeat;
    background-position: center, center;
    background-size: 18px 18px, cover;
}

.author-mini__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.author-mini__name {
    font-size: 13px;
    line-height: 1.5;
    color: var(--body);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.author-mini__meta {
    display: flex;
    gap: 8px;
    font-size: 11.5px;
    color: var(--muted);
}

.author-mini__item:hover .author-mini__name {
    color: var(--brand);
}

@media (max-width: 640px) {
    .article__author {
        padding: 0 0 14px;
    }

    .article__author--full {
        padding: var(--pad-card);
        border-radius: 14px;
    }

    .article__author--full .article__author-avatar {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .article__author-home {
        padding: 4px 12px;
    }
}

/* 窄到放不下「头像 + 名字 + 两颗键」一行时，把键换到第二行 —— 硬挤会把名字压成两个字 */
@media (max-width: 560px) {
    .article__author-head {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .article__author-actions {
        margin-left: 0;
    }

    .article__author--full .article__author-home {
        margin-left: 0;
    }
}

/* ---------------------------------------------------------------------------
   十一、右栏「我的」卡
   ---------------------------------------------------------------------------
   这一格是访客自己，不是文章作者（理由见 modules/widgets.html 那段注释）。
   两种形态靠 body.is-logged-in 切：游客态是登录入口，登录后是自己的名片。
   用 body 上的类而不是脚本改 DOM 显隐，是因为 site.js 里这个类本来就跟着登录态走，
   而且它是幂等的 —— 脚本重跑几次都不会把 DOM 弄成两半。
*/
body:not(.is-logged-in) .me-card__user {
    display: none;
}

body.is-logged-in .me-card__guest {
    display: none;
}

.me-card__text {
    margin: 0 0 12px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--muted);
}

.me-card__actions {
    display: flex;
    gap: 8px;
}

/* 登录 / 注册两颗：外观是 .btn--primary / .btn--ghost + .btn--xs（模板里已带），
   这里只剩"各占一半宽"。 */
.me-card__btn {
    flex: 1 1 0;
}

/* 头像居中（登录态，参考站 #1） */
.me-card__avatar-center {
    display: flex;
    justify-content: center;
    margin: 2px 0 8px;
}
.me-card__avatar-wrap { position: relative; display: inline-flex; }
.me-card__avatar {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--soft);
    box-shadow: 0 0 0 3px var(--wj-base, #fff), 0 4px 14px var(--accent-line);
}
.me-card__avatar--blank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    font-size: 22px;
    font-weight: 700;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--wj-base, #fff), 0 4px 14px rgb(var(--shade-rgb) / .12);
}

/* img / span 上都带着 hidden：inline-flex 会把 hidden 的默认 display:none 盖掉，得显式说一次 */
.me-card__avatar[hidden],
.me-card__avatar--blank[hidden],
.me-card__link[hidden] {
    display: none;
}

/* 昵称 + 等级 + 勋章，居中一行（勋章跟着昵称走，不再单独占一行 ——
   一个人有 0 枚牌时那一行不会留下 20px 的空档） */
.me-card__name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
}
.me-card__name {
    min-width: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
/* 等级：文字胶囊；会员后台配了等级图时脚本换成图（.me-card__level--image） */
.me-card__level {
    flex: none;
    padding: 1px 7px;
    border-radius: var(--pill);
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.6;
    white-space: nowrap;
}
.me-card__level[hidden] { display: none; }
.me-card__level--image {
    padding: 0;
    background: none;
    line-height: 1;
}
.me-card__level--image img { display: block; height: 18px; width: auto; }

/* 勋章：跟着昵称那行走，最多 3 枚 + 一颗「+N」（点开看全部）。
   以前是单独一行居中，空着的时候会留一段莫名的空白。 */
.me-card__badges {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.me-card__badges[hidden] { display: none; }
.me-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 6px;
    background: var(--soft);
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}
.me-card__badge img { width: 16px; height: 16px; object-fit: contain; }
/* 「+N」在这张卡上比人卡里大一号：这里只有一行字，10px 的按钮会被当成脚注 */
.me-card__badges .hp-badges-more { padding: 0 6px; font-size: 10px; }

/* 四项数据胶囊：横向居中一排（后端暂无这几项，先印 0） */
.me-card__stats {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}
.me-stat {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 7px 2px;
    background: var(--soft);
    border-radius: var(--radius-sm);
    min-width: 0;
}
/* 取不到数据源的那一颗（接口回 null）会被脚本挂 hidden：
   .me-stat 自己写了 display:flex，UA 的 [hidden]{display:none} 压不住，得明说一次 */
.me-stat[hidden] { display: none; }
.me-stat__ico { display: inline-flex; color: var(--brand); opacity: .8; }
.me-stat__ico svg { width: 15px; height: 15px; }
.me-stat__num { font-size: 14px; font-weight: 800;}
.me-stat__label { font-size: 11px; color: var(--muted); }

/* 累计签到：方块标签（与标签云同一种形状：7px 圆角 + 浅底），图标 + 一句话。
   一天没签过时脚本让它保持 hidden，不印「累计 0 天」—— 0 在这张卡上读起来像"你没资格"。 */
/* 累计签到：组件层的 .tag.tag--mute（模板：class="tag tag--mute me-card__checkin"），
   此处只留"卡片里居中一行"的位置与图标尺寸。
   ⚠️ display 必须改回 flex：.tag 是 inline-flex，行内盒的 auto 外边距不会居中，
   而这一格是要单独占一行的。卡里的父容器是普通块（不是 flex 列），所以靠 auto 外边距居中。 */
.me-card__checkin {
    display: flex;
    width: fit-content;
    margin: 0 auto 12px;
}
.me-card__checkin svg { width: 13px; height: 13px; flex: none; }
.me-card__checkin[hidden] { display: none; }

/* 签名（会员资料里的「个人简介」）：昵称下面那一行，最多两行就截断 ——
   有人会写满 120 个字，把它整段铺开，四颗数据胶囊会被挤到卡片外面 */
.me-card__bio {
    margin: 0 0 10px;
    text-align: center;
    font-size: 12px;
    line-height: 1.55;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.me-card__links {
    display: flex;
    gap: 8px;
}
/* 两颗键 = 组件层的 .btn.btn--xs（模板里已带），这里只剩"各占一半 + 圆角用 8px 那档"
   —— 这一排跟上面登录那排不一样，刻意不用全圆角。内距、字号、过渡都在 .btn 里。 */
.me-card__link {
    flex: 1 1 0;
    border-color: var(--line);
    border-radius: var(--radius-sm);
    color: var(--body);
}
.me-card__link:hover { border-color: var(--brand-line); color: var(--brand); }
/* 主键：本站主题色实心。次键（.me-card__link 裸类）是浅底描边 ——
   两颗键的主次靠深浅分，不靠金/绿那两套借来的颜色。 */
/* 主键的实心底来自 .btn--primary（= --brand），这里只加一点投影把它抬起来；
   border-color 必须写回 transparent —— 上面 .me-card__link 给两颗键都上了灰描边。 */
.me-card__link--primary {
    border-color: transparent;
    box-shadow: 0 2px 8px rgb(var(--shade-rgb) / .18);
    color: var(--on-brand);
}
/* 悬停不提亮、不换色：主色是后台配的，写死一个"更深的主色"在换主题时就会跳色。
   压一点亮度是唯一不依赖具体色值的做法。 */
.me-card__link--primary:hover {
    color: var(--on-brand);
    filter: brightness(.94);
}

/* 登录后的「我的」卡：浅色科技横幅，呼应参考站 #1 */
body.is-logged-in .me-card {
    background: linear-gradient(180deg, var(--brand-soft) 0%, var(--wj-base, #fff) 52%);
    border-color: var(--brand-line, var(--line));
}

/* ---------------------------------------------------------------------------
   十二、编排里的小组件（我的 / 猜你喜欢 / 标签云 / 网站统计 / 排行榜）
   ---------------------------------------------------------------------------
   这几格本来是详情页 300px 右栏里的窄卡，后台把它们也放进了「页面编排」的可选清单。
   主内容区是整行宽，直接铺开会拉成一条又长又空的白卡，所以套一层栅格：
   每列最宽 340px，多个区块自动排多列，只有一个也不会被拉满。
*/
.widget-deck {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 340px));
    gap: var(--gap-block);
    align-items: start;
}

/* 编排区块被塞进详情页正文列时，片段自带的 .wrap 不能再套一层 1440 的居中宽度，
   否则正文列里又出现一条"居中的窄列"。所有 section 一视同仁，不只是小组件那几格。 */
body.page-detail .section .wrap {
    max-width: none;
    padding: 0;
}

body.page-detail .section {
    padding: 0;
}

/* ---------------------------------------------------------------------------
   十三、分类目录（总览 / 左侧导航详情 / 列表页头大卡）
   ---------------------------------------------------------------------------
   三处共用一套「有图铺图、没图渲染文字」的口径：分类配了封面就整块铺图并压深色渐变，
   没配就渲染分类名首字的大色块 + 文字。coverUrl 由服务层换好（私有桶签名地址），
   模板里不出现 ossId。
*/
body.page-categories,
body.page-category-directory {
    background: var(--page);
}

.cat-hero {
    padding: 56px 0 34px;
    text-align: center;
}

.cat-hero__eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    color: var(--brand);
}

.cat-hero__title {
    margin: 0;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}

.cat-hero__desc {
    margin: 10px 0 20px;
    font-size: 14px;
    color: var(--muted);
}

.cat-hero__search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    background: var(--wj-base, #fff);
    color: var(--muted);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: border-color .15s var(--motion), color .15s var(--motion);
}

.cat-hero__search:hover {
    border-color: var(--brand-line);
    color: var(--brand);
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap-block);
    padding-bottom: 64px;
}

@media (max-width: 1023px) {
    .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .cat-grid { grid-template-columns: minmax(0, 1fr); }
    .cat-hero__title { font-size: 30px; }
    .cat-hero__search { min-width: 0; width: 100%; }
}

.cat-card,
.cat-nav,
.cat-posts,
.cat-banner {
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgb(var(--shade-rgb) / .05);
}

/* 分类卡（参考 Halo 知识库那一排）：
   卡头 = 图标 + 名字 + 篇数 + 箭头（整条可点），中间是一列"标题目录"，底部一句「查看全部 N 篇 →」。
   卡片本身不裁内容，hover 时只抬边框与投影 —— 参考站那种"整张卡浮起一点"的手感。 */
.cat-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    transition: border-color .18s var(--motion), box-shadow .18s var(--motion), transform .18s var(--motion);
}

.cat-card:hover {
    border-color: var(--brand-line);
    box-shadow: 0 8px 24px rgb(var(--shade-rgb) / .08);
    transform: translateY(-2px);
}

.cat-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 12px;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

.cat-card__cover {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    object-fit: cover;
}

.cat-card__cover--text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 18px;
    font-weight: 800;
}

/* 图标底色按序换一换：一排同名同色的方块看起来像占位图，不像图标 */
.cat-card:nth-child(4n + 2) .cat-card__cover--text { background: var(--h-amber-soft); color: var(--h-amber-ink); }
.cat-card:nth-child(4n + 3) .cat-card__cover--text { background: var(--h-teal-soft); color: var(--h-teal-ink); }
.cat-card:nth-child(4n + 4) .cat-card__cover--text { background: var(--h-blue-soft); color: var(--h-blue-ink); }

.cat-card__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.cat-card__name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cat-card:hover .cat-card__name { color: var(--brand); }

.cat-card__count,
.cat-card__desc {
    font-size: 12px;
    color: var(--muted);
}

.cat-card__chev {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--muted);
    transition: transform .18s var(--motion), color .18s var(--motion);
}

.cat-card:hover .cat-card__chev {
    color: var(--brand);
    transform: translateX(3px);
}

.cat-card__desc {
    margin: 6px 20px 6px 20px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 目录：一条一行，行与行之间不画线（参考站就是靠留白分行）；
   鼠标扫过整行浅底 + 主题色，行是圆角块而不是整条高亮到卡片边缘。 */
.cat-card__posts {
    margin: 2px 0 0;
    padding: 0 10px;
    list-style: none;
}

.cat-card__posts li { min-width: 0; }

.cat-card__posts a {
    display: block;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--body);
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: background .15s var(--motion), color .15s var(--motion);
}

.cat-card__posts a:hover {
    background: var(--soft);
    color: var(--brand);
}

.cat-card__empty {
    margin: 6px 18px 12px;
    font-size: 13px;
    color: var(--muted);
}

.cat-card__more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 7px 20px 17px 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
}

.cat-card__more:hover { text-decoration: underline; text-underline-offset: 3px; }

.cat-empty {
    padding: 32px 0 64px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

/* ---- 详情页：左侧分类导航 + 右侧行式清单 ---- */
.cat-detail {
    padding: 24px 0 64px;
}

.cat-detail__shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-top: 16px;
}

@media (max-width: 767px) {
    .cat-detail__shell { grid-template-columns: minmax(0, 1fr); }
    .cat-nav { position: static; }
}

.cat-nav {
    position: sticky;
    top: 76px;
    padding: var(--pad-card);
}

.cat-nav__title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.cat-nav__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--body);
    font-size: 13px;
    text-decoration: none;
}

.cat-nav__item:hover { background: var(--soft); }

.cat-nav__item.is-on {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 700;
}

.cat-nav__item i {
    font-style: normal;
    font-size: 11px;
    color: var(--muted);
}

.cat-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 160px;
    margin-bottom: 20px;
    padding: 24px;
    overflow: hidden;
}

.cat-banner.has-cover { min-height: 230px; align-items: flex-end; }

.cat-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-banner.has-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(var(--shade-rgb) / .7), rgb(var(--shade-rgb) / .12));
}

.cat-banner__initial {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: var(--radius);
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 38px;
    font-weight: 800;
}

.cat-banner__body { position: relative; z-index: 1; min-width: 0; }

.cat-banner.has-cover .cat-banner__body { color: var(--on-brand); }

.cat-banner.has-cover .cat-banner__desc,
.cat-banner.has-cover .cat-banner__count { color: rgba(255, 255, 255, .86); }

.cat-banner__title {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    color: var(--ink);
}

.cat-banner.has-cover .cat-banner__title { color: var(--on-brand); }

.cat-banner__desc {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--body);
}

.cat-banner__count { font-size: 12px; color: var(--muted); }

.cat-posts { margin: 0; padding: 8px 20px; list-style: none; }

.cat-post {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.cat-post:last-child { border-bottom: 0; }

.cat-post__title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
}

.cat-post__title:hover { color: var(--brand); }

.cat-post__date {
    flex: none;
    font-size: 12px;
    color: var(--muted);
}

.cat-detail__all { margin-top: 18px; }

/* ---- /site/category/{slug} 的页头大卡 ---- */
.band-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 150px;
    margin: 16px 0 4px;
    padding: 24px;
    overflow: hidden;
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgb(var(--shade-rgb) / .05);
}

.band-card.has-cover { min-height: 420px; align-items: flex-end; }

.band-card__cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.band-card.has-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(var(--shade-rgb) / .7), rgb(var(--shade-rgb) / .12));
}

/* 没配封面：渐变占位底 + 一枚图片图标（不是大字首字母，那一块看起像坏图） */
.band-card:not(.has-cover) {
    background:
        radial-gradient(130% 130% at 100% 0%, var(--brand-soft), rgba(255, 255, 255, 0) 58%),
        linear-gradient(135deg, var(--grad-page-a), var(--grad-page-b));
}

.band-card__ph {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .7);
    color: var(--brand);
}

.band-card__ph svg {
    width: 34px;
    height: 34px;
}

.band-card__body { position: relative; z-index: 1; min-width: 0; }

.band-card.has-cover .band-card__body { color: var(--on-brand); }

.band-card.has-cover .band-card__label,
.band-card.has-cover .band-card__sub,
.band-card.has-cover .band-card__desc { color: rgba(255, 255, 255, .86); }

.band-card.has-cover .band-card__title { color: var(--on-brand); }

.band-card__label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--muted);
}

.band-card__title {
    margin: 4px 0;
    font-size: 30px;
    font-weight: 800;
    color: var(--ink);
}

.band-card__desc {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--body);
}

.band-card__sub { margin: 0; font-size: 12px; color: var(--muted); }

@media (max-width: 640px) {
    .band-card { padding: 18px; gap: 14px; }
    .band-card__ph { width: 60px; height: 60px; }
    .band-card__ph svg { width: 26px; height: 26px; }
    .band-card__title { font-size: 24px; }
}

/* ---------------------------------------------------------------------------
   十四、全站搜索弹窗
   ---------------------------------------------------------------------------
   盖在整页之上的居中浮层：遮罩 + 输入框 + 即时结果 + 键盘提示。
   z-index 高于吸顶导航（20）与评论/分享浮层，弹窗开着时页面不跟着滚。
*/
body.is-search-open {
    overflow: hidden;
}

.search-modal[hidden] {
    display: none;
}

.search-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
}

.search-modal__scrim {
    position: absolute;
    inset: 0;
    background: rgb(var(--shade-rgb) / .46);
    backdrop-filter: blur(2px);
}

.search-modal__panel {
    position: relative;
    width: min(560px, 100%);
    max-height: 76vh;
    display: flex;
    flex-direction: column;
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 24px 64px -24px rgb(var(--shade-rgb) / .55);
    overflow: hidden;
}

.search-modal__field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.search-modal__icon {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--muted);
}

.search-modal__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
}

.search-modal__input::placeholder { color: var(--muted); }

.search-modal__esc {
    flex: none;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--soft);
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
}

.search-modal__results {
    flex: 1 1 auto;
    min-height: 120px;
    max-height: 52vh;
    overflow-y: auto;
    padding: 8px;
}

.search-modal__hint {
    margin: 0;
    padding: 36px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.search-modal__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.search-modal__item:hover,
.search-modal__item.is-active {
    background: var(--soft);
}

.search-modal__item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.search-modal__item.is-active .search-modal__item-title {
    color: var(--brand);
}

.search-modal__item-desc {
    font-size: 12px;
    color: var(--muted);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.search-modal__foot {
    display: flex;
    gap: 16px;
    padding: 9px 16px;
    border-top: 1px solid var(--line);
    background: var(--soft);
    font-size: 11px;
    color: var(--muted);
}

.search-modal__foot kbd {
    display: inline-block;
    min-width: 18px;
    margin-right: 2px;
    padding: 1px 4px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--wj-base, #fff);
    font-family: inherit;
    font-size: 10px;
    text-align: center;
}

@media (max-width: 640px) {
    .search-modal { padding-top: 8vh; }
    .search-modal__foot { gap: 10px; }
}

/* ---------------------------------------------------------------------------
   十五、手机档（<767px）
   ---------------------------------------------------------------------------
   左右边距从 48px 收到 10px，整站换成手机版骨架：居中品牌 + 左侧抽屉 + 底部导航。
   --pad 是所有 .wrap 共用的令牌，改这一处，通知条/导航/正文/页脚一起收，
   不用给每个模块各写一条 10px。
*/
@media (max-width: 767px) {
    :root {
        --pad: 10px;
    }
}

/* ---------------------------------------------------------------------------
   十六、手机档骨架：左侧抽屉 / 底部导航 / 站内「我的」页
   ---------------------------------------------------------------------------
   宽屏时这三组元素整块不显示；<767 时导航换成「品牌在左、汉堡与搜索并排在右」，
   菜单推成左侧抽屉（含文章目录与我的），页面底部让出 58px 给固定栏。
*/
.nav__drawer-head,
.nav__drawer-block,
.nav__scrim,
.tabbar {
    display: none;
}

#comments {
    scroll-margin-top: 76px;
}

/* ---- 站内「我的」页（宽屏也能打开，手机档跟着 --pad 收紧） ---- */
body.page-member { background: var(--page); }

.member {
    max-width: 720px;
    padding: 24px 0 64px;
}

.member__hero {
    padding: 26px 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand-soft), var(--grad-brand-a) 70%, var(--grad-brand-b));
}

.member__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border: 3px solid var(--wj-base, #fff);
    border-radius: 50%;
    background: var(--wj-base, #fff);
    color: var(--brand);
    font-size: 26px;
    font-weight: 800;
    box-shadow: 0 2px 10px rgb(var(--shade-rgb) / .12);
}

.member__name {
    margin: 12px 0 4px;
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
}

.member__note { margin: 0; font-size: 13px; color: var(--body); }

.member__hero-actions { display: flex; gap: 10px; margin-top: 16px; }

body.is-logged-in .member__hero-actions { display: none; }

.member__card {
    margin-top: var(--gap-block);
    padding: var(--pad-card);
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgb(var(--shade-rgb) / .05);
}

.member__group-title {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.member__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.member__entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--body);
    font-family: inherit;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
}

.member__entry:hover { background: var(--soft); }

.member__entry[hidden] { display: none; }

.member__entry-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    font-size: 19px;
    line-height: 1;
}

.member__entry-icon--brand { background: var(--brand-soft); color: var(--brand); }
/* 会员入口那四颗图标：色族直接读令牌，跟标签云、勋章、状态标签同一套 */
.member__entry-icon--blue { background: var(--h-blue-soft); color: var(--h-blue); }
.member__entry-icon--green { background: var(--h-green-soft); color: var(--h-green-ink); }
.member__entry-icon--orange { background: var(--h-orange-soft); color: var(--h-orange-ink); }
.member__entry-icon--pink { background: var(--accent-soft); color: var(--accent); }

.member__links { display: flex; flex-wrap: wrap; gap: 16px; }
.member__links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.member__links a:hover { color: var(--brand); }

@media (max-width: 767px) {
    /* 页面底部让出固定栏的位置；抽屉打开时禁止背景滚动 */
    body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
    body.is-nav-open { overflow: hidden; }

    /* 顶栏三块：品牌靠左，工具组（汉堡 + 搜索）靠右。
       以前品牌是 left:50% 绝对居中的，汉堡键单独挂在品牌后面 —— 结果是一颗键在最左、
       一颗键在最右，中间隔着整条屏宽，拇指来回够。现在两颗键都在 .nav__tools 里（见 header.html），
       品牌退回普通流，靠 .nav__tools 的 margin-left:auto 把它顶到右边。 */
    .nav__inner { position: relative; justify-content: space-between; }
    .nav__brand {
        margin: 0;
        font-size: 19px;
    }
    .nav__tools { gap: 2px; margin-left: auto; }
    /* 登录/注册/账号下拉在手机上收进抽屉，顶栏只留「汉堡 + 搜索」两颗键。
       ⚠️ body.is-logged-in .nav__account 那条（文件前半段，登录后把账号区放出来）
       比 .nav__tools .nav__account 多一个元素，不显式压一次的话，一登录账号区就又回到顶栏，
       把两颗图标挤到左边去。 */
    .nav__tools .nav__link--cta,
    .nav__tools .nav__account,
    body.is-logged-in .nav__tools .nav__account { display: none; }

    /* 抽屉：盖在整页之上，从左侧推入 */
    .nav__menu {
        display: flex;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: min(320px, 86vw);
        z-index: 270;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        overflow-y: auto;
        background: var(--wj-base, #fff);
        border-bottom: 0;
        border-right: 1px solid var(--line);
        box-shadow: 0 0 40px rgb(var(--shade-rgb) / .22);
        transform: translateX(-102%);
        visibility: hidden;
        transition: transform .25s var(--motion), visibility 0s linear .25s;
    }
    .nav__menu.is-open {
        transform: none;
        visibility: visible;
        transition-delay: 0s;
    }
    .nav__scrim {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 260;
        background: rgb(var(--shade-rgb) / .5);
    }
    body.is-nav-open .nav__scrim { display: block; }

    .nav__drawer-head {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 2;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border-bottom: 1px solid var(--line);
        background: var(--wj-base, #fff);
    }
    .nav__drawer-brand { font-size: 17px; font-weight: 800; color: var(--ink); text-decoration: none; }
    .nav__drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: 0;
        border-radius: 50%;
        background: var(--soft);
        color: var(--body);
        cursor: pointer;
    }
    .nav__drawer-close svg { width: 18px; height: 18px; }

    .nav__drawer-block {
        display: block;
        padding: 14px 16px 18px;
        border-top: 8px solid var(--page);
    }
    .nav__drawer-label { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
    .nav__drawer-toc {
        display: block;
        padding: 7px 0 7px 12px;
        border-left: 2px solid var(--line);
        color: var(--body);
        font-size: 13px;
        text-decoration: none;
    }
    .nav__drawer-toc:hover { color: var(--brand); border-left-color: var(--brand); }
    .nav__drawer-toc.is-h3 { margin-left: 12px; }
    .nav__drawer-toc.is-h4 { margin-left: 24px; }

    /* 「我的」这一格直接复用右栏那张卡的主体（modules/widgets :: meBody），
       只去掉外壳与背景：.widget / .me-card 都没套进来，抽屉本身已经是白底，
       再套一层就是"卡里还有一张卡"（一圈边框 + 圆角 + 投影）。
       游客态 / 登录态也一并复用 —— body.is-logged-in 那一对规则对两处卡都成立。 */
    .nav__drawer-block--me {
        /* 分组靠一条细线，不再用 8px 的 --page 色块：那一块在白抽屉里看着像一条断层 */
        border-top: 1px solid var(--line);
    }
    /* 抽屉比右栏窄（min(320px, 86vw)）：头像缩一档，四颗数据胶囊才不会挤成豆腐块 */
    .nav__drawer-block--me .me-card__avatar,
    .nav__drawer-block--me .me-card__avatar--blank {
        width: 48px;
        height: 48px;
        font-size: 19px;
    }
    .nav__drawer-block--me .me-stat { padding: 6px 2px; }
    /* 抽屉里那两颗键（我的主页 / 投稿资源）跟上面的菜单项一样是"整行点得到" */
    .nav__drawer-block--me .me-card__link { padding-top: 8px; padding-bottom: 8px; }

    /* ---- 底部固定栏 ---- */
    .tabbar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
        height: calc(58px + env(safe-area-inset-bottom, 0px));
        align-items: stretch;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--wj-base, #fff);
        border-top: 1px solid var(--line);
        box-shadow: 0 -4px 18px rgb(var(--shade-rgb) / .08);
    }
    .tabbar__item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        border: 0;
        background: none;
        color: var(--muted);
        font-family: inherit;
        font-size: 10px;
        text-decoration: none;
        cursor: pointer;
    }
    .tabbar__item.is-on { color: var(--brand); }
    .tabbar__item--main { position: relative; }
    .tabbar__main-circle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        margin-top: -20px;
        border-radius: 50%;
        background: var(--brand);
        color: var(--on-brand);
        box-shadow: 0 6px 14px -6px rgb(var(--shade-rgb) / .6);
    }
    .tabbar__item--main > span:last-child { margin-top: -2px; }

    /* 文章页：左边写评论，右边三颗互动键 */
    .tabbar--article { align-items: center; gap: 12px; padding: 0 12px; }
    .tabbar__comment {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        border: 1px solid var(--line);
        border-radius: var(--pill);
        background: var(--soft);
        color: var(--muted);
        font-size: 12px;
        text-decoration: none;
    }
    .tabbar__acts { display: flex; gap: 2px; }
    .tabbar__act {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 0;
        background: none;
        color: var(--muted);
        cursor: pointer;
    }
    .tabbar__act.is-on { color: var(--hot); }
}

/* ======================================================================
   首页重构：主区（筛选 + 列表 + 右栏我的卡）/ 下方 widgets 行 / 商店 + 最新
   ====================================================================== */

.home-main { padding: var(--gap-block) 0 0; }

.home-main__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--gap-cols);
    align-items: start;
}

.home-main__aside {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: var(--gap-block);
    min-width: 0;
}

/* 主区左列（筛选条 + 列表）。min-width:0 是网格里的老规矩：不加的话
   里面的长标题会把这一列顶宽，右栏那 320px 就会被挤掉。 */
.home-main__primary { min-width: 0; }

/* 筛选条搬进主区左列之后，它的下边距就是「筛选条 → 第一行卡片」的缝 */
.home-main__primary .home-filterbar { margin-bottom: 14px; }
.home-list { margin: 0; }
.home-empty { padding: 28px 0; color: var(--muted); font-size: 14px; }

/* 分页条（首页 / 分类页 / 标签页共用，见 modules/pagination.html）。
   跟着主题的按钮基调走：白底细边、当前页实心；省略号不带边框。 */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}
.pager__link {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    font-size: 14px;
    color: var(--ink, #374151);
    background: #fff;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.pager__link:hover { border-color: var(--brand, #111); color: var(--brand, #111); }
.pager__link.is-current {
    background: var(--brand, #111);
    border-color: var(--brand, #111);
    color: #fff;
    cursor: default;
}
.pager__link.is-disabled { opacity: .45; pointer-events: none; }
.pager__dots { color: var(--muted, #9ca3af); padding: 0 2px; font-size: 14px; }
.pager__meta { margin-left: 12px; color: var(--muted, #9ca3af); font-size: 13px; }
.pager__meta b { color: var(--ink, #374151); font-weight: 600; }
/* 页码区单独一层 flex：外层的 .pager 还要装「每页 N 篇」，页码自己得能换行 */
.pager__pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
/* 每页条数：一排小胶囊，比页码小一号，不去抢"当前在第几页"的视觉重心。
   选中的那个实心，和页码的 is-current 同一套观感。 */
.pager__sizes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted, #9ca3af);
    font-size: 13px;
}
.pager__sizeslabel { margin-right: 2px; }
.pager__sizesunit { margin-left: 2px; }
.pager__sizeitem {
    min-width: 30px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    font-size: 13px;
    color: var(--ink, #374151);
    background: #fff;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.pager__sizeitem:hover { border-color: var(--brand, #111); color: var(--brand, #111); }
.pager__sizeitem.is-current {
    background: var(--brand, #111);
    border-color: var(--brand, #111);
    color: #fff;
    cursor: default;
}
@media (max-width: 640px) {
    .pager__meta { display: none; }
}
.home-filterbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    margin-bottom: 22px;
}
.home-filterbar__cats { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.is-on { background: var(--ink); color: var(--on-brand); }
.home-filterbar__sort {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.home-filterbar__sortlabel {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin-right: 4px;
}
.home-filterbar__sortitem {
    padding: 5px 12px;
    border-radius: var(--pill);
    font-size: 13px;
    color: var(--body);
    text-decoration: none;
    transition: background .15s var(--motion), color .15s var(--motion);
}
.home-filterbar__sortitem:hover { background: var(--soft); color: var(--ink); }
.home-filterbar__sortitem.is-on { background: var(--brand); color: var(--on-brand); }
/* 方向切换：和字段按钮拉开一点，做成描边小胶囊，看起来像「开关」而不是第四个字段 */
.home-filterbar__dir {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    padding: 5px 11px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    font-size: 12.5px;
    color: var(--body);
    text-decoration: none;
    transition: border-color .15s var(--motion), color .15s var(--motion);
}
.home-filterbar__dir:hover { border-color: var(--brand-line); color: var(--brand); }
/* ---------------------------------------------------------------------------
   首页整宽下半段：商品区与图片区，各由「一条横幅 + 一排内容」组成
   ---------------------------------------------------------------------------
   横幅不是装饰：它替掉原来那种 20px 的小标题，把"下面这一整排是什么"讲清楚
   （参考站那种整条渐变横幅 —— 标题是标语，副标题才是这一区的说明）。
   颜色只用主色系的两个变量，换主题时跟着走，不另外引一套配色。
*/

.home-store { padding: var(--gap-block) 0 0; }

/* 图片区（横幅 + 图片墙）：与上面商品区隔开一个大缝。
   整块默认 hidden，脚本拉到图床的公开图之后才显形 —— 没有图的横幅比没有横幅更糟。 */
.home-gallery { padding-top: var(--gap-block); }
.home-gallery .section__more { margin-top: 6px; }

.home-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 132px;
    margin-bottom: var(--gap-block);
    padding: 24px var(--pad-card-lg);
    border-radius: var(--radius);
    background-color: var(--brand);
    /* 斜纹 + 径向高光 + 右下压暗：纯 CSS 的"科技感"底，不额外引图。
       压暗用黑色半透明而不是第二个颜色值，是为了跟着 --brand 走 ——
       后台把主色改掉，这条横幅还是同一族颜色，不会变成"蓝到橙"的撞色。 */
    background-image:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 2px, rgba(255, 255, 255, 0) 2px 26px),
        radial-gradient(120% 160% at 18% 0%, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0) 62%),
        linear-gradient(120deg, rgb(var(--shade-rgb) / 0) 0%, rgb(var(--shade-rgb) / .3) 100%);
    color: var(--on-brand);
    text-align: center;
    text-decoration: none;
    overflow: hidden;
}

.home-banner--image {
    background-color: var(--panel-dark);
    background-image:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 2px, rgba(255, 255, 255, 0) 2px 26px),
        radial-gradient(120% 160% at 82% 0%, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 62%),
        linear-gradient(120deg, rgb(var(--shade-rgb) / 0) 0%, rgb(var(--shade-rgb) / .32) 100%);
}

a.home-banner { transition: filter .2s var(--motion); }
a.home-banner:hover { filter: brightness(1.06); }

.home-banner__title {
    font-size: clamp(20px, 2.4vw, 30px);
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.2;
    color: var(--on-brand);
    text-shadow: 0 2px 12px rgb(var(--shade-rgb) / .18);
}

.home-banner__sub {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .92);
}

/* ---------------------------------------------------------------------------
   图片墙：直接搬图床广场那一套（.wall / .wall__item / .gcard*）
   ---------------------------------------------------------------------------
   类名一字不改地照搬 plugins/wujies-gallery-plugin 的 site-styles/gallery/gallery.css：
   两处若各写一套，同一张图在首页与广场会长成两个样（圆角、行距、hover 各不相同）。
   搬一份的原因也简单 —— 图床那份样式挂在它自己的端点上（/site/gallery/...），
   内容中心的页面引不到；将来这份若能抽成共享样式表，这里整块删掉即可。

   栅格：2 列起，≥768 三列，≥1200 四列（与广场同口径）。用显式断点而不是 auto-fill，
   是因为"这一行几张"要有定数 —— 图高矮不一时 auto-fill 会让每行的个数看起来在跳。
*/
.wall {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}
.wall__item {
    position: relative;
    min-width: 0;
}
@media (min-width: 768px) {
    .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 1200px) {
    .wall { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}

.gcard { display: block; overflow: hidden; }
.gcard__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    background: var(--soft);
}
.gcard__info { display: block; padding: 10px 12px 14px; }
.gcard__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}
.gcard__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}
.gcard:hover .gcard__name { text-decoration: underline; text-underline-offset: 3px; }

/* 标题右侧的「N 篇」，说明这一屏是按当前排序取的前 N 条 */
.section__count {
    margin-left: 8px;
    font-size: 12.5px;
    font-style: normal;
    font-weight: 500;
    color: var(--muted);
}

/* 列表页（分类 / 标签）的排序条：与首页筛选条**同款**（无标签、无下边框）。
   原来这里有一条 border-bottom + 「排序」二字，首页那条没有 —— 同一个排序两种长相，
   看起来像两套逻辑。现在两处只靠 chip 的 is-on 表示当前口径。 */
.list-sort {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px;
}
.list-sort__item {
    padding: 5px 12px;
    border-radius: var(--pill);
    font-size: 13px;
    color: var(--body);
    text-decoration: none;
    transition: background .15s var(--motion), color .15s var(--motion);
}
.list-sort__item:hover { background: var(--soft); color: var(--ink); }
.list-sort__item.is-on { background: var(--brand); color: var(--on-brand); }
.list-sort__dir {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 5px 11px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    font-size: 12.5px;
    color: var(--body);
    text-decoration: none;
    transition: border-color .15s var(--motion), color .15s var(--motion);
}
.list-sort__dir:hover { border-color: var(--brand-line); color: var(--brand); }

/* 首页小组件通用皮（独立的首页卡，替代 .widget） */
.hp {
    background: var(--wj-base, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--pad-card);
    box-shadow: 0 1px 3px rgb(var(--shade-rgb) / .05);
}
.hp__title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
}
.hp__ico { flex: none; width: 17px; height: 17px; color: var(--brand); }
.hp__note { margin: 12px 0 0; font-size: 13px; color: var(--body); }
.hp__more { display: block; margin-top: 12px; font-size: 13px; font-weight: 700; }
.hp__more a { color: var(--ink); text-decoration: none; }
.hp__more a:hover { color: var(--brand); }

/* 一排人（新伙伴 / 签到排行共用）：头像 + 昵称 + 等级 + 勋章 + 累计签到
   两处用同一份结构，所以也只有一份样式 —— 分开写迟早会长出不一样的间距。
   右栏只有 340px，这一行要在一个 38px 头像旁边塞下昵称、等级、三枚勋章和一句天数，
   所以等级与勋章都走 10~14px 的小尺码，天数用 11px 的灰字靠右。 */
.hp-person-list { list-style: none; margin: 0; padding: 0; }
.hp-person { border-top: 1px dashed var(--line); }
.hp-person:first-child { border-top: 0; }
.hp-person__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    text-decoration: none;
}
.hp-person__ava-wrap { position: relative; flex: none; width: 38px; height: 38px; }
.hp-person__ava {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--soft);
    box-shadow: 0 2px 6px rgb(var(--shade-rgb) / .14);
}
.hp-person__ava--blank {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--c1, var(--h-blue)), var(--c2, var(--h-violet-ink)));
    color: var(--on-brand);
    font-size: 14px;
    font-weight: 700;
}
/* TOP 角标：压在头像左下角。前三名才有（模板块里按 withRank 判），
   三块奖牌色沿用名次色，第四名往后不挂 —— 榜尾挂个 TOP4 只会显得啰嗦。 */
.hp-person__top {
    position: absolute;
    left: -5px;
    bottom: -3px;
    padding: 1px 5px;
    border-radius: var(--pill);
    border: 1px solid var(--on-brand);
    background: var(--medal-2);
    color: var(--on-brand);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: .2px;
    box-shadow: 0 1px 4px rgb(var(--shade-rgb) / .25);
}
.hp-person__top--1 { background: var(--medal-1); }
.hp-person__top--2 { background: var(--medal-2); }
.hp-person__top--3 { background: var(--medal-3); }

.hp-person__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
/* 第一行：昵称 + 等级 + 勋章。挤不下时先省略昵称 —— 等级与勋章是这个人的"身份"，
   裁掉它们比裁掉半个名字更难认。 */
.hp-person__head {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}
.hp-person__name {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.hp-person__link:hover .hp-person__name { color: var(--brand); }
/* 第二行：签名。固定一行高 —— 右边那颗"累计签到"标签要跟头像对齐，
   让签名换行会把整行撑到三行，右栏一排人立刻变得参差。 */
.hp-person__bio {
    min-width: 0;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--muted);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.hp-person__level {
    flex: none;
    padding: 1px 6px;
    border-radius: var(--pill);
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}
.hp-person__level-img { flex: none; height: 15px; width: auto; }
.hp-person__badges { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.hp-person__badges img { width: 14px; height: 14px; object-fit: contain; }
.hp-person__badges i {
    font-style: normal;
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
}
/* 「+N」：一枚小方块按钮，点开是一层列出全部徽章（浮层见 .wj-badge-pop）。
   做成按钮而不是 <i>：它要能聚焦、能按回车，读屏才念得出来"查看全部徽章"。 */
/* 「+N」= 组件层的 .tag.tag--mute 当按钮用（模板：class="tag tag--mute hp-badges-more"）：
   形状、浅底、字号都来自 .tag，这里只补"它是可点的"和 hover。
   以前这一颗自己又写了一遍圆角 6px、字号 10px、行高 1.7 —— 与标签云的 7px/11px 差半口气。 */
.hp-badges-more {
    flex: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s var(--motion), color .15s var(--motion);
}
.hp-badges-more:hover { background: var(--brand-soft); color: var(--brand); }
/* 累计签到：方块标签（7px 圆角，与标签云同一种形状）+ 日历图标 + 天数。
   以前这里是一句「累计 12 天」的灰字：既占宽，又看不出是签到还是注册天数。 */
/* 累计签到（终身）：组件层的 .tag.tag--mute + 日历图标 + 天数。
   模板：class="tag tag--mute hp-person__days"。这里只留"别被昵称挤走"和等宽数字 ——
   内距、圆角、字号、浅底与标签云同源，一处改全站跟着改。 */
.hp-person__days {
    flex: none;
    font-variant-numeric: tabular-nums;
}
.hp-person__days b { font-weight: 800; }
.hp-person__days-ico { width: 12px; height: 12px; flex: none; }

/* 这几张卡的行由 site.js 克隆 <template> 后填值：一块骨架里同时躺着"图"和"首字"两个头像位、
   等级图与等级文字两个位，一次只露一个。它们的 display 被上面的类写死了（block / flex），
   hidden 属性本身压不住 —— 得显式写一条，否则空 img 会占出 38px 的灰圆。
   整卡也一样：取不到数据时 .hp 保持 hidden，不能让它以空壳形式露出来。 */
.hp[hidden],
.hp-person__ava[hidden],
.hp-signin__ava[hidden],
.hp-person__level-img[hidden],
.hp-person__level[hidden],
.hp-person__badges[hidden],
.hp-person__top[hidden],
.hp-person__days[hidden],
.hp-person__bio[hidden],
.hp-signin__bio[hidden],
.hp-signin__tag[hidden],
.hp-signin__tag-ico[hidden] {
    display: none;
}

/* 签到（深色横幅） */
.hp--signin { padding: 0; overflow: hidden; }
.hp-signin__banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px var(--pad-card);
    background: var(--ink);
    color: var(--on-brand);
}
.hp-signin__hello { margin: 0; font-size: 17px; font-weight: 800; }
.hp-signin__sub { margin: 3px 0 0; font-size: 12px; color: rgba(255, 255, 255, .7); }
.hp-signin__cta {
    flex: none;
    padding: 8px 16px;
    border: 0;
    border-radius: var(--pill);
    background: var(--wj-base, #fff);
    color: var(--panel-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s var(--motion), opacity .15s var(--motion);
}
.hp-signin__cta:hover { transform: translateY(-1px); }
/* 打完卡之后这颗按钮是 disabled 的：别再给它悬停反馈，也别让它看起来还能点 */
.hp-signin__cta:disabled { opacity: .72; cursor: default; transform: none; }
.hp-signin__tabs { padding: var(--pad-card) var(--pad-card) 0; }
.hp-signin__list { list-style: none; margin: 4px 0 0; padding: 0; }
.hp-signin__row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    font-size: 13px;
    color: var(--body);
    border-top: 1px dashed var(--line);
}
.hp-signin__row:first-child { border-top: 0; }
.hp-signin__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; }
.hp--signin .hp__more { padding: 0 var(--pad-card) var(--pad-card); margin-top: 10px; }

/* 签到卡：图标 / 提示语 / 列表行（头像 + 昵称时间 + 标签） */
.hp-signin__ico {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--on-brand);
}
.hp-signin__ico svg { width: 34px; height: 34px; }
.hp-signin__banner-text { flex: 1 1 auto; min-width: 0; }
.hp-signin__tip {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 10px var(--pad-card);
    font-size: 12.5px;
    color: var(--brand);
    background: var(--brand-soft);
}
.hp-signin__tip svg { width: 15px; height: 15px; flex: none; }
/* 签到卡里的头像：真头像圆形，没有时退回首字渐变块（与"一排人"同一套读法，
   只是这里小一号 —— 一行里还要塞时间与「今日已签」标签）。 */
.hp-signin__ava-wrap { flex: none; width: 32px; height: 32px; }
.hp-signin__ava {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--soft);
}
.hp-signin__ava--blank {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--c1, var(--h-blue)), var(--c2, var(--h-violet-ink)));
    color: var(--on-brand);
    font-size: 13px;
    font-weight: 700;
}
/* 一行里第二列：第一行昵称 + 等级 + 勋章，第二行时间与签名 */
.hp-signin__who {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3;
}
.hp-signin__head { display: flex; align-items: center; gap: 5px; min-width: 0; }
.hp-signin__name {
    min-width: 0;
    font-weight: 700;
    color: var(--ink);
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.hp-signin__sub {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: 11px;
    color: var(--muted);
}
.hp-signin__time { flex: none; font-variant-numeric: tabular-nums; }
.hp-signin__bio { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* 状态标签：方块（7px 圆角，与标签云同一种形状）+ 图标 + 两个字。
   以前是药丸 + 日期（「11-13 已签」）：同一行的左边已经在讲"什么时候"，右边又说一遍，
   而且那颗标签因此被撑到 80px 宽，昵称那列只剩半个名字。 */
/* 状态标签 = 组件层的 .tag.tag--info（模板：class="tag tag--info hp-signin__tag"），
   本页只补一件"这一格不许被昵称挤走"的布局。原来的方块、内距、字号、浅底都并进 .tag 了。 */
.hp-signin__tag { flex: none; }
.hp-signin__tag b { font-weight: 700; }
.hp-signin__tag-ico { width: 12px; height: 12px; flex: none; }
/* 连续签到那一档换成暖色（.tag--warn 的同族色，这里直接读令牌，免得两处各写一个橙） */
.hp-signin__tag--streak { background: var(--h-orange-soft); color: var(--h-orange-ink); }
.hp-signin__empty { margin: 0; padding: 14px 0; font-size: 13px; color: var(--muted); text-align: center; }

/* 徽章浮层：「+N」点开的那一层，把这个人身上的牌全部列出来（图 + 名字）。
   挂在 body 末尾、position:fixed，坐标由 site.js 按触发点算 ——
   卡片有 overflow:hidden，放在行里的浮层会被裁掉；行本身又是 <a>，点它还会跟着跳走。 */
.wj-badge-pop {
    position: fixed;
    z-index: 900;
    width: 210px;
    max-height: 46vh;
    overflow: auto;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--wj-base, #fff);
    box-shadow: 0 12px 32px rgb(var(--shade-rgb) / .18);
}
.wj-badge-pop__title { margin: 0 0 8px; font-size: 11px; font-weight: 700; color: var(--muted); }
.wj-badge-pop__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wj-badge-pop__item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--body);
}
.wj-badge-pop__item img { flex: none; width: 18px; height: 18px; object-fit: contain; }

/* 签到排行：行式版式已并入 .hp-person（头像 + 等级 + 勋章 + 累计签到），
   原来那套「圆形名次徽章 + 名字 + 连续天数」的规则整段删掉 ——
   留着两套只会让下一个人不知道改哪一套才生效。 */

/* 签到提示（游客） */
.hp--prompt { display: flex; align-items: center; gap: 12px; }
.hp-prompt__ico {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
}
.hp-prompt__ico svg { width: 20px; height: 20px; }
.hp-prompt__text { flex: 1; margin: 0; font-size: 13px; color: var(--body); }
/* 「去签到」= 组件层的 .btn.btn--sm.btn--primary（模板：class="btn btn--sm hp-prompt__btn"），
   这里只保留"别被提示语挤扁"。原来那几个 padding / 圆角 / 字号与 --sm 完全重合。 */
.hp-prompt__btn { flex: none; }

/* 首页窄屏：主区两列收成一列（右栏整宽竖排成一束） */
@media (max-width: 991px) {
    .home-main__grid { grid-template-columns: minmax(0, 1fr); }
    .home-main__aside { position: static; }
    .home-filterbar { flex-direction: column; align-items: flex-start; }
}

/* ======================================================================
   列表页的列表区（分类 / 标签）：不用 .section，只要一条模块缝
   ======================================================================
   .section 的上内距是 80px（首页那种整块大标题带的尺寸），套到列表页上
   就是「页头卡片 → 排序条」之间一坨空白。这里单开一个类，只留 16px。 */
.list-section {
    padding: var(--gap-block) 0 0;
}

/* ======================================================================
   三列网格：首页文章列表 / 商品列表 / 分类页文章列表共用
   ======================================================================
   为什么要单独一个修饰类，而不是改 .grid：.grid 是全局栅格（详情页、活动区、
   商城页都在用），桌面段是 4 列；这三处一排 4 张卡会窄到标题要折三行。
   放文件末尾是为了压过上面 @media (min-width:1200px) 里 .grid 的 4 列
   （媒体查询不加权重，同权重时靠源码顺序）。 */
.grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-cols); }
}

/* ======================================================================
   四列网格：首页商品那一排
   ======================================================================
   商品卡是竖版（图 + 标题 + 价格），四张一行在 1440 的版心里每张约 330px，够用。
   768 以下两列、768–1079 三列：再窄下去价格会被挤到第二行。 */
.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
    .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-cols); }
}
