/* wangyan-5285 */
/* AI绘图平台 - Mobile First 响应式样式 */

/* ==========================================================================
   批次27：前台配色 1:1 移植 业主指定的前台版式基准（业主 2026-10-03 定案「完全照它·中性黑白」）
   --------------------------------------------------------------------------
   版式基准没有品牌色：主色就是近黑 #18181b（暗色翻成近白 #fafafa），强调全靠字重、
   留白和一条 1px 描边，整站找不到一处彩色渐变。业主原话「他这个站点有个好处，
   就是没有太多的 UI 美工进去，所以基本上都是文字排版相关或者图标」。

   移植手法分两层，目的是不动那 6198 行旧样式：
   1) 先把版式基准自己那套语义令牌**原名原值**搬进来（--background/--foreground/
      --card/--primary/--muted/--border/--radius/--shadow 系列/--nav-bg/--tool-accent…），
      新写的外壳 CSS 直接用版式基准的名字，日后拿它的样式表逐条对照能一一对上；
   2) 再把本站沿用已久的旧令牌名（--primary-fg / --gray-* / --surface / --grad-*）
      **指向新令牌**。旧名字一个不改，692 处 var() 引用自动跟着变成中性色。

   两处刻意与版式基准不同，都有原因：
   - --accent / --accent-rgb / --accent-fg：版式基准的 --accent 是浅灰 #f4f4f5，
     与本站旧 --accent（渐变副色）同名不同义。旧的 27 处 linear-gradient(
     var(--primary), var(--accent)) 若拿到浅灰会变成「黑到灰」的脏渐变，所以这里
     让 --accent = --primary，旧渐变一律压平成纯近黑（正是版式基准的观感）。
     需要版式基准那个浅灰时用 --muted，两者值本来也完全相同。
   - --ring：版式基准是实心 #18181b，但 Bootstrap 的 --bs-focus-ring-color 要的是
     半透明色（它直接当 box-shadow 的颜色用），实心会画成一圈死黑。这里存半透明版，
     外壳 CSS 里照版式基准写 color-mix(in srgb, var(--ring) 18%, transparent)。

   后台「主题色」面板自此不再改前台配色（业主明确选定），ThemeConfig::inlineCss() 已停用。
   ========================================================================== */
:root {
    /* --- 版式基准语义令牌（原名原值） --- */
    --background: #ffffff;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --popover: #ffffff;
    --popover-foreground: #0f172a;
    --primary: #18181b;
    --primary-foreground: #fafafa;
    --secondary: #f4f4f5;
    --secondary-foreground: #18181b;
    --muted: #f4f4f5;
    --muted-foreground: #64748b;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --border: #e4e4e7;
    --input: #e4e4e7;
    --brand: var(--primary);
    --brand-soft: var(--muted);
    --success: #16a34a;
    --warning: #d97706;
    --status-success: #15803d;
    --status-warning: #b45309;
    --status-destructive: #dc2626;
    --status-info: #2563eb;
    --status-neutral: #475569;
    /* 选中态是全站唯一保留的彩色（版式基准同款靛蓝），只用于「当前选中」的高亮，
       不当品牌色铺开——版式基准的导航选中、模板分类选中走的都是这一组 */
    --selection: #4f46e5;
    --selection-foreground: #3730a3;
    --selection-bg: #eef2ff;
    --selection-hover-bg: #f5f7ff;
    --selection-border: #a5b4fc;
    --radius: .625rem;
    /* --- 水滴玻璃模块家族（批次31-C，业主 10-04 夜死口径）---
       整站电脑版只许这一种模块皮肤：半透底 + 毛玻璃 + 大圆角 + 细描边。
       亮暗两套值都在这儿给，页面里一律 var() 取，不许再各写各的背景。 */
    --module-bg: rgba(255, 255, 255, .62);
    /* 悬停态专用：玻璃模块被指上去时只加一层薄白，不能退回 --muted 那种实底，
       否则一悬停就从「水滴」变回「白板」，正是业主说的左右不一致 */
    --module-bg-hover: rgba(255, 255, 255, .82);
    --module-border: rgba(15, 23, 42, .09);
    --module-radius: 1.1rem;
    --module-blur: blur(14px) saturate(1.35);
    --shadow-sm: 0 1px 2px #0f172a0d;
    --shadow-md: 0 8px 24px #0f172a14;
    --bg-color: #f5f7fb;
    --nav-bg: #ffffffe0;
    --card-bg: var(--card);
    --card-border: var(--border);
    --text-main: var(--foreground);
    --text-muted: var(--muted-foreground);
    --text-placeholder: var(--muted-foreground);
    --pill-bg: var(--muted);
    --pill-border: var(--border);
    --pill-text: var(--muted-foreground);
    --hover-bg: var(--muted);
    --shadow-intensity: #33415514;
    --tool-card-bg: var(--card);
    --accent-strong: var(--foreground);
    --accent-soft: var(--muted);
    --accent-foreground: var(--foreground);
    --image-tile-bg: #f1f5f9;
    --studio-soft: var(--muted);
    --control-bg: var(--background);
    --control-border: var(--input);

    /* --- 本站旧令牌名 → 新令牌（旧样式一行不用改） --- */
    --primary-rgb: 24, 24, 27;
    --primary-dark: #000000;
    --primary-dark-rgb: 0, 0, 0;
    --primary-light: var(--muted);
    --primary-border: var(--input);
    --primary-emphasis: #000000;
    --on-primary-soft: var(--foreground);
    --accent: var(--primary);
    --accent-rgb: 24, 24, 27;
    /* 整页底色：版式基准是一层平涂的 #f5f7fb，没有光晕也没有呼吸渐变。
       旧令牌留着名字，值压平成同一个色，批次23-B 那套氛围背景随之退场 */
    --bg-base: var(--bg-color);
    --bg-soft: var(--bg-color);
    /* 前景版一律落到 --foreground：版式基准没有彩色文字，强调靠字重不靠色相，
       全站 155 处 color:var(--primary-fg) 一次变成近黑（暗色近白） */
    --primary-fg: var(--foreground);
    --primary-dark-fg: var(--foreground);
    --accent-fg: var(--foreground);
    --grad-from: var(--primary);
    --grad-to: var(--primary);
    --grad-from-fg: var(--foreground);
    --grad-to-fg: var(--foreground);
    --ring: rgba(24, 24, 27, 0.22);

    --danger: var(--destructive);
    /* 状态浅底：亮色是各自的淡色块，暗色由 html[data-theme=dark] 翻成半透明色 */
    --danger-soft: #fef2f2;
    --success-soft: #ecfdf5;
    --warning-soft: #fef3c7;
    --amber-soft: #fffbeb;
    --pink-soft: #fdf2f8;
    /* 批次106：前台货币数字专用色（业主 10-16：「货币值这一块一定要用亮眼的颜色，
       白色暗色两种都要正常显示」）。亮色底用深琥珀 #A34A08——绝不用亮黄，
       批次39 的教训就是亮黄压白底=隐形文字。--money-bg 是淡金底块，托住数字更像"价签"。 */
    --money: #A34A08;
    --money-bg: #FEF3C7;
    --gray-50: var(--bg-color);
    --gray-100: var(--muted);
    --gray-200: var(--border);
    --gray-600: var(--muted-foreground);
    --gray-800: var(--foreground);
    /* 空态/装饰图标的极淡前景：亮色是浅灰，暗色翻半透明白。
       不能直接拿 gray-200 当前景——暗色下 gray-200 是深底色，图标会隐身 */
    --muted-icon: #e4e4e7;
    /* 卡片/面板/输入框/弹窗的白底统一走这个令牌，暗色模式由 html[data-theme=dark] 翻成深色面板 */
    --surface: var(--card);
    --navbar-height: 61px;
    /* 批次27：手机端底部标签条已随批次20 的排版重构删掉，但 .auth-page 的最小高度、
       两处吸底浮动钮的 bottom 还在减这个量，白留 60px 空隙。归零即可，
       四处引用一次修正，不用挨个改 calc() */
    --bottom-nav-height: 0px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================================================
   Bootstrap 主色收敛：全站只有一个主色
   --------------------------------------------------------------------------
   Bootstrap 自带的 .btn-primary / .text-primary / .bg-primary 用的是它自己的
   蓝 #0d6efd，而本站品牌色由 --primary 令牌决定（默认对齐 业主指定的版式基准 青色）。前台有 57 处这些类，不收敛的话
   同一个页面上会同时出现两种"主色"，按钮蓝、标题靛，一眼就不像商业站。

   这里必须分两层写，只改 --bs-primary 是不够的：
   1) 工具类（.text-primary / .bg-primary / .border-primary / .alert-primary /
      .link-*）都从 --bs-primary-rgb 和 --bs-primary-*-subtle 现算，改根变量即可；
   2) 组件类不行 —— Bootstrap 编译时已经把 #0d6efd 写死进了 --bs-btn-bg /
      --bs-btn-border-color / --bs-pagination-active-bg 这些组件级变量里，
      根变量改了它们纹丝不动，必须逐个组件覆盖。
   本文件在 bootstrap.min.css 之后加载，靠层叠顺序生效，不需要 !important。
   ========================================================================== */
:root {
    --bs-primary: var(--primary);
    --bs-primary-rgb: var(--primary-rgb);
    --bs-primary-text-emphasis: var(--primary-emphasis);
    --bs-primary-bg-subtle: var(--primary-light);
    --bs-primary-border-subtle: var(--primary-border);

    --bs-link-color: var(--primary-fg);
    --bs-link-color-rgb: var(--primary-rgb);
    --bs-link-hover-color: var(--primary-dark-fg);
    --bs-link-hover-color-rgb: var(--primary-dark-rgb);

    --bs-focus-ring-color: var(--ring);
}

.btn-primary {
    /* --bs-btn-color 必须一起给：Bootstrap 编译时把按钮文字写死成了 #fff，
       而本站暗色模式下 --primary 会翻成近白 #fafafa，只改底不改字就是白字白底、按钮直接隐身。
       --primary-foreground 跟着 --primary 一起翻（亮色近白 / 暗色近黑），两种模式都对 */
    --bs-btn-color: var(--primary-foreground);
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-color: var(--primary-foreground);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-color: var(--primary-foreground);
    --bs-btn-active-bg: var(--primary-emphasis);
    --bs-btn-active-border-color: var(--primary-emphasis);
    --bs-btn-disabled-color: var(--primary-foreground);
    --bs-btn-disabled-bg: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
    --bs-btn-focus-shadow-rgb: var(--primary-rgb);
}

.btn-outline-primary {
    --bs-btn-color: var(--primary-fg);
    --bs-btn-border-color: var(--primary-fg);
    --bs-btn-hover-color: var(--primary-foreground);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-active-color: var(--primary-foreground);
    --bs-btn-active-bg: var(--primary);
    --bs-btn-active-border-color: var(--primary);
    --bs-btn-disabled-color: var(--primary-fg);
    --bs-btn-disabled-border-color: var(--primary-fg);
    --bs-btn-focus-shadow-rgb: var(--primary-rgb);
}

/* ==========================================================================
   暗色模式（html[data-theme="dark"]，由前台布局按后台「外观模式」默认值输出，
   访客点右上角太阳/月亮后以 localStorage 为准）
   --------------------------------------------------------------------------
   批次27 起这一整块是版式基准 [data-theme=dark] 的原值照搬：主色翻成近白 #fafafa、
   面板 #0f0f12、页面底 #080a12、描边 #27272a、次要文字 #a1a1aa。
   版式基准暗色下主按钮是「白底黑字」，所以 --primary-foreground 必须跟着翻成 #18181b，
   否则白底配白字。旧令牌名（--gray-* / --surface / --primary-light…）在这里一并重指，
   135 处 var(--gray-*) 和 body 底色一次跟着翻，不用逐条改。
   Bootstrap 组件（表单/弹窗/下拉/表格）的暗色由布局同时输出的
   html[data-bs-theme="dark"] 交给 Bootstrap 自己处理。
   ========================================================================== */
html[data-theme="dark"] {
    /* --- 版式基准语义令牌（暗色原值） --- */
    --background: #09090b;
    --foreground: #fafafa;
    --card: #0f0f12;
    --card-foreground: #fafafa;
    --popover: #18181b;
    --popover-foreground: #fafafa;
    --primary: #fafafa;
    --primary-foreground: #18181b;
    --secondary: #27272a;
    --secondary-foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --border: #27272a;
    --input: #27272a;
    /* 水滴玻璃模块家族（暗色）：深底上改用一层薄白透底，毛玻璃把背景光晕揉进来 */
    --module-bg: rgba(255, 255, 255, .055);
    --module-bg-hover: rgba(255, 255, 255, .10);
    --module-border: rgba(255, 255, 255, .10);
    --module-radius: 1.1rem;
    --module-blur: blur(14px) saturate(1.35);
    --ring: rgba(212, 212, 216, 0.34);
    --status-success: #22c55e;
    /* 批次31-G：Bootstrap 的 .text-success 是 color: rgba(var(--bs-success-rgb), …)!important，
       默认值 25,135,84 那把深绿压在暗色玻璃 rgb(22,23,31) 上只有 3.94:1，「已绑定」「正常」这类
       13px 状态字要 4.5。在这里把 Bootstrap 的 rgb 三元组直接换成上面那颗 #22c55e = 7.8:1，
       一行解决全站所有 .text-success，不用去逐个类加 !important 跟 Bootstrap 打架。
       亮色不动：深绿压浅底本来就有 4.6:1。 */
    --bs-success-rgb: 34, 197, 94;
    --status-warning: #f59e0b;
    --status-destructive: #f87171;
    --status-info: #60a5fa;
    --status-neutral: #a1a1aa;
    --selection: #818cf8;
    --selection-foreground: #c7d2fe;
    --selection-bg: #6366f129;
    --selection-hover-bg: #6366f11a;
    --selection-border: #818cf894;
    --shadow-sm: 0 1px 2px #0000005c;
    --shadow-md: 0 8px 24px #0000006b;
    --shadow-intensity: #0000006b;
    --bg-color: #080a12;
    --nav-bg: #090c15d1;
    --image-tile-bg: #171e31;

    /* --- 本站旧令牌名重指 --- */
    --primary-rgb: 250, 250, 250;
    --primary-dark: #ffffff;
    --primary-dark-rgb: 255, 255, 255;
    --primary-emphasis: #ffffff;
    --primary-light: rgba(250, 250, 250, 0.10);
    --primary-border: rgba(250, 250, 250, 0.28);
    --accent-rgb: 250, 250, 250;
    --on-primary-soft: #18181b;

    --gray-50: var(--bg-color);
    --gray-100: #18181b;
    --gray-200: #27272a;
    --gray-600: #a1a1aa;
    --gray-800: #fafafa;
    --muted-icon: rgba(255, 255, 255, 0.22);
    --surface: var(--card);

    --danger-soft: rgba(239, 68, 68, 0.16);
    --success-soft: rgba(16, 185, 129, 0.16);
    --warning-soft: rgba(245, 158, 11, 0.18);
    --amber-soft: rgba(245, 158, 11, 0.14);
    --pink-soft: rgba(236, 72, 153, 0.16);
    /* 批次106：暗色下货币数字翻成亮金 #FFC53D（暗底上够亮够"值钱"），底块用 12% 金半透明。
       与亮色的深琥珀是同一色相的明暗两面，WCAG AA 对比度都 ≥4.5:1。 */
    --money: #FFC53D;
    --money-bg: rgba(255, 197, 61, 0.12);

    --bs-primary-text-emphasis: var(--primary-fg);
}

/* 暗色下这些状态文字原本是深饱和色（配亮色淡底），翻到半透明深底后会糊成一片，
   逐条换成同色相的亮调，保证在暗底上仍读得清。只动文字色，不动布局 */
html[data-theme="dark"] .st-pending,
html[data-theme="dark"] .pw-tips { color: #fcd34d; }
html[data-theme="dark"] .st-paid { color: #6ee7b7; }
html[data-theme="dark"] .st-rejected,
html[data-theme="dark"] .order-reject { color: #fca5a5; }
html[data-theme="dark"] .ag-ability-icon.i-pink { color: #f9a8d4; }
html[data-theme="dark"] .ag-ability-icon.i-amber { color: #fcd34d; }
html[data-theme="dark"] .wb-cost.is-over { border-color: rgba(239, 68, 68, 0.34); }
html[data-theme="dark"] .ntc-hero {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18) 0%, var(--surface) 52%, rgba(var(--primary-rgb), 0.10) 100%);
}

/* 批次76-B 第二轮（业主 10-12：「文字图标被虚线或者白色挡住了，根本看不清楚」）。
   病根同一个：底色用会翻面的令牌（--primary-dark / --primary-light / --danger-soft），
   字色写死 → 暗色下 fg≈bg。亮色下本来就是对的，所以只补暗色这一套、亮色一条不动。
   这三条的原规则在文件后头（4647 / 3762 / 5394），靠 html[data-theme] 带来的更高
   specificity 压过它们，与上面 .pw-tips 那批同一个套路。
   hover 态平时不显示，扫描器只看可见 DOM 会漏，所以逐条按规则名点修 */
html[data-theme="dark"] .hp-stuck-btn:hover { color: #18181b; }
html[data-theme="dark"] .ag-msg.user .ag-msg-text { color: #fafafa; }
html[data-theme="dark"] .member-sb-logout:hover { color: #fca5a5; }

/* 输入框聚焦：Bootstrap 把光圈色写死成了 rgba(13,110,253,.25) */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-border);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.18);
}

.form-check-input:focus {
    border-color: var(--primary-border);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.18);
}
/* 勾选框与 form-switch 开关的"打开"态共用这条 */
.form-check-input:checked {
    background-color: var(--primary-fg);
    border-color: var(--primary-fg);
}

.form-range::-webkit-slider-thumb { background-color: var(--primary-fg); }
.form-range::-moz-range-thumb { background-color: var(--primary-fg); }

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--primary);
    --bs-nav-pills-link-active-color: var(--primary-foreground);
}

.pagination {
    --bs-pagination-color: var(--primary-fg);
    --bs-pagination-hover-color: var(--primary-dark-fg);
    --bs-pagination-focus-color: var(--primary-dark-fg);
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.18);
    --bs-pagination-active-bg: var(--primary);
    --bs-pagination-active-color: var(--primary-foreground);
    --bs-pagination-active-border-color: var(--primary);
}

.dropdown-menu {
    --bs-dropdown-link-active-bg: var(--primary);
    --bs-dropdown-link-active-color: var(--primary-foreground);
}

.list-group {
    --bs-list-group-active-bg: var(--primary);
    --bs-list-group-active-color: var(--primary-foreground);
    --bs-list-group-active-border-color: var(--primary);
}

.progress { --bs-progress-bar-bg: var(--primary); }

.accordion {
    --bs-accordion-active-color: var(--bs-primary-text-emphasis);
    --bs-accordion-active-bg: var(--primary-light);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.18);
}

* { box-sizing: border-box; }

/* 横向溢出裁剪只放在 html 上；body 设 overflow-x:hidden 会在 iOS/微信
   中把 body 变成滚动容器，导致触屏无法滚动页面 */
html {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

body {
    /* 版式基准的字体栈打头是 Inter，本站没有它的本地副本、也不引境外 CDN（CDN 一断整站排版散架），
       所以 Inter 只是「装了就用」的第一顺位，后面接系统无衬线 + 中文黑体，观感与版式基准一致。
       字号 14px 也是照版式基准：它整站正文都是 text-sm，比 Bootstrap 默认的 16px 密一档，
       这一档密度正是它「看着专业、不花哨」的一部分。改的是 body 不是 html，
       rem 基准仍是 16px，所有用 rem 写的间距一点不受影响 */
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    background: var(--bg-color);
    color: var(--gray-800);
    /* 批次20：固定顶栏的让位改由 .app-shell 的 padding-top 承担（版式基准同款），
       底部标签条已移除，不再需要 body 让位 */
    padding-top: 0;
    padding-bottom: 0;
}

/* 批次27：整页底色改成版式基准那层平涂的 --bg-color（亮 #f5f7fb / 暗 #080a12）。
   批次23-B 那套「两团光晕 + 呼吸渐变 + 科技网格」整块退场——版式基准整站找不到一处
   彩色氛围底，业主定案「完全照它·中性黑白」，留着就是和版式基准对不上。
   --bg-base / --bg-soft 两个令牌名保留并指向 --bg-color，旧引用不会解析成空值。 */

/* 主内容区（批次20：通栏容器内的纯内容列，无侧栏无底栏） */
.app-main {
    min-width: 0;
}

/* 卡片样式 */
.card-custom {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    background: var(--surface);
}

/* ====== 创作工作台（文生图 / 图生图） ====== */
.wb-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wb-panel {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
}

.wb-head {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--gray-100);
}

.wb-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--primary-fg);
}

.wb-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 6px 0;
}

.wb-desc {
    font-size: 13px;
    line-height: 1.65;
    color: var(--gray-600);
    margin: 0;
}

.wb-mode-tabs {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.wb-mode {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    background: var(--surface);
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s;
}

.wb-mode:hover {
    border-color: var(--primary-fg);
    color: var(--primary-fg);
}

.wb-mode.active {
    background: var(--primary-light);
    border-color: var(--primary-fg);
    color: var(--primary-fg);
}

.wb-body {
    padding: 16px 20px;
    flex: 1 1 auto;
    min-height: 0;
}

.wb-card {
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}

.wb-card:last-child { margin-bottom: 0; }

.wb-card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.wb-card-title i { color: var(--primary-fg); }

.wb-required {
    font-size: 11px;
    font-weight: 600;
    color: var(--danger);
    background: var(--danger-soft);
    border-radius: 999px;
    padding: 2px 8px;
}

/* 卡片标题右侧的补充说明（如「最多 4 张 · 已选 2 张」）。
   窄屏时让它自己换到下一行，别把标题和必填标记挤成竖排 */
.wb-card-extra {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-600);
    text-align: right;
}

.wb-card-extra b { color: var(--primary-fg); font-weight: 700; }

@media (max-width: 400px) {
    .wb-card-title { flex-wrap: wrap; }
    .wb-card-extra { margin-left: 0; text-align: left; flex: 1 0 100%; }
}

.wb-field { margin-bottom: 12px; }

/* 参数区最后一组不该再拖出卡片底部留白（gen-params.php 是循环渲染，没法逐个加 mb-0） */
.wb-card > .wb-field:last-child { margin-bottom: 0; }

.wb-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.wb-label-tip {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-600);
}

.wb-input {
    border-radius: 10px;
    border: 1.5px solid var(--gray-200);
    padding: 10px 14px;
    font-size: 14px;
}

.wb-input:focus {
    border-color: var(--primary-fg);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.wb-hint {
    font-size: 12px;
    line-height: 1.6;
    color: var(--gray-600);
    margin-top: 8px;
}

/* 滑杆（左右拖动的进度条）：时长这类「从几秒到几秒」的参数一律用它，
   拉到几秒就是几秒，旁边实时印出当前值；不再用要用户自己敲数字的输入框。 */
.wb-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.wb-slider-tip {
    flex: 0 0 auto;
    min-width: 26px;
    text-align: center;
    font-size: 12px;
    color: var(--gray-600);
}

.wb-slider-val {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 10px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-fg);
    font-size: 12px;
    font-weight: 700;
}

.wb-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 24px;
    margin: 0;
    background: transparent;
    cursor: pointer;
}

/* --wb-fill 由脚本按当前值写进来：左侧已选段上主色，右侧未选段留灰 */
.wb-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-fg) var(--wb-fill, 0%), var(--gray-200) var(--wb-fill, 0%));
}

.wb-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -6px;
    border-radius: 50%;
    border: 2px solid var(--surface);
    background: var(--primary-fg);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.22);
}

.wb-slider::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: var(--gray-200);
}

.wb-slider::-moz-range-progress {
    height: 6px;
    border-radius: 999px;
    background: var(--primary-fg);
}

.wb-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--surface);
    background: var(--primary-fg);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.22);
}

.wb-slider:focus {
    outline: none;
}

.wb-slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2);
}

.wb-slider:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* 参数选项：单行胶囊，副标题（用途/加价）跟在主文案右侧。
   原来是主副文案上下叠两行，四组参数就把左栏顶到一屏装不下。 */
.wb-opts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.wb-opts.wb-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* 档位数量不固定（比例 6 档、数量最多 20 档）时改用流式换行，不写死列数 */
.wb-opts.wb-flow {
    display: flex;
    flex-wrap: wrap;
}

.wb-opts.wb-flow .wb-opt { flex: 0 1 auto; }

.wb-opt {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    padding: 7px 13px;
    border: 1.5px solid var(--gray-200);
    border-radius: 999px;
    background: var(--surface);
    cursor: pointer;
    transition: all 0.18s;
}

.wb-opt b {
    max-width: 100%;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-opt .wb-sub {
    flex-shrink: 0;
    font-size: 11px;
    line-height: 1.3;
    color: var(--gray-600);
    white-space: nowrap;
}

.wb-opt:hover { border-color: var(--primary-fg); }

.wb-opt.active {
    border-color: var(--primary-fg);
    background: var(--primary-light);
}

.wb-opt.active b,
.wb-opt.active .wb-sub { color: var(--primary-fg); }

.wb-opt.active .wb-sub { opacity: 0.78; }

/* 批次159（业主 10-23 死命令）：模型胶囊鼠标悬停显示这一款的优势。
   AI绘图 / AI视频 / AI数字人 三个工作台共用这一块，HTML 由 view/partial/model-tip.php 单一出处渲染。
   藏起来一律用 display:none，绝不用 opacity/visibility——那两种只是画不出来，
   盒子照样参与排版，最右那颗一悬停就把文档撑宽、凭空多一条横向滚动条（.hc-model-tip 踩过这个坑）。
   往上弹：模型行下面紧跟着参数行，往下弹会盖住用户正要点的档位格。 */
.wb-opt-tiphost { position: relative; }

.wb-opt-tip {
    position: absolute;
    left: 0;
    bottom: calc(100% + .5rem);
    z-index: 40;
    display: none;
    flex-direction: column;
    gap: .2rem;
    width: max-content;
    max-width: 19rem;
    padding: .55rem .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--popover);
    color: var(--popover-foreground);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    text-align: left;
    white-space: normal;
}

.wb-opt-tip em {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--primary-fg);
    white-space: nowrap;
}

.wb-opt-tip span {
    font-size: 12px;
    line-height: 1.55;
    font-weight: 500;
    color: var(--popover-foreground);
}

.wb-opt-tiphost:hover .wb-opt-tip,
.wb-opt-tiphost:focus-visible .wb-opt-tip {
    display: flex;
    animation: hcTipIn .15s ease;
}

/* 靠右那两颗改成右对齐：默认拿胶囊左沿当起点，卡片宽到 304px 时
   最后一颗一悬停就伸出视口，页面当场多一条横向滚动条。右对齐后往左展开，永远在视口里。 */
.wb-opt-tiphost:nth-last-child(-n+2) .wb-opt-tip {
    left: auto;
    right: 0;
}

/* 窄屏再兜一道：卡片不许宽过视口 */
@media (max-width: 991px) {
    .wb-opt-tip {
        max-width: min(19rem, calc(100vw - 2rem));
    }
}

/* 底部：预计消耗 + 生成按钮（手机端吸底，随时可点） */
.wb-foot {
    position: sticky;
    bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
    z-index: 20;
    padding: 14px 20px calc(14px + var(--safe-bottom));
    background: var(--surface);
    border-top: 1px solid var(--gray-100);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.wb-cost {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.wb-cost-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.wb-cost-label { font-size: 13px; color: var(--gray-600); }

.wb-cost-num {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-fg);
    font-variant-numeric: tabular-nums;
}

.wb-cost-unit { font-size: 12px; color: var(--gray-600); }

.wb-cost-balance {
    margin-left: auto;
    font-size: 12px;
    color: var(--gray-600);
}

.wb-cost-balance b { font-size: 13px; color: var(--gray-800); }

.wb-cost-formula {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 6px;
}

.wb-cost.is-over { background: var(--danger-soft); border-color: #fecaca; }
.wb-cost.is-over .wb-cost-num { color: var(--danger); }
.wb-cost.is-over .wb-cost-formula::after { content: ' · 积分不足'; color: var(--danger); }

.wb-submit { width: 100%; }

.wb-foot-tip {
    text-align: center;
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 10px;
}

/* 右侧：生成记录 */
.wb-main {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.wb-main-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wb-main-title {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
}

.wb-main-sub {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 4px;
}

.wb-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.wb-search {
    position: relative;
    flex: 1 1 100%;
    min-width: 0;
}

.wb-search > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--gray-600);
    pointer-events: none;
}

.wb-search input {
    width: 100%;
    padding: 8px 14px 8px 34px;
    font-size: 13px;
    border: 1.5px solid var(--gray-200);
    border-radius: 999px;
    background: var(--surface);
}

.wb-search input:focus {
    outline: none;
    border-color: var(--primary-fg);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.wb-tabs {
    display: flex;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 4px;
    background: var(--gray-100);
    border-radius: 999px;
    overflow-x: auto;
    scrollbar-width: none;
}

.wb-tabs::-webkit-scrollbar { display: none; }

.wb-tab {
    flex-shrink: 0;
    padding: 6px 14px;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-size: 13px;
    color: var(--gray-600);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.18s;
}

.wb-tab:hover { color: var(--gray-800); }

.wb-tab.active {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.3);
}

.wb-refresh {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 7px 14px;
    font-size: 13px;
    color: var(--gray-600);
    background: var(--surface);
    border: 1.5px solid var(--gray-200);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s;
}

.wb-refresh:hover { border-color: var(--primary-fg); color: var(--primary-fg); }

.wb-refresh i.spin { animation: wb-spin 0.8s linear infinite; }

@keyframes wb-spin { to { transform: rotate(360deg); } }

.wb-main-body {
    padding: 16px 20px 20px;
    flex: 1 1 auto;
    min-height: 0;
}

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

/* ====== 生成记录卡片 ====== */
.hcard {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.hcard:hover {
    transform: translateY(-1px);
    border-color: #d5dae3;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.hcard-media {
    position: relative;
    /* 出图有竖有横有方，统一收进 4:5 定框，避免图片把卡片和整个页面撑开。
       框内用 contain 而不是 cover：横图上下留白、竖图左右留白，整张图完整可见，
       不会像 cover 那样把横图裁得只剩中间一条 */
    aspect-ratio: 4 / 5;
    /* 定框底色跟主题走：暗色下若留死白 #f1f5f9，contain 的留白条和「生成中/失败」
       两层半透明罩都会垫在白底上，罩上的主题字色（暗色近白）直接隐形 */
    background: var(--image-tile-bg);
    overflow: hidden;
    cursor: pointer;
}

.hcard.is-running .hcard-media,
.hcard.is-failed .hcard-media { cursor: default; }

.hcard-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* AI 视频记录卡：内嵌播放器收进和图片同一个 4:5 定框，contain 保整段画面完整、
    controls 露在框内不被裁。background 跟定框底色，暗色下视频留白边不会垫死白 */
.hcard-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: var(--image-tile-bg);
}

.hcard-count {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
}

.hcard-mode {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    /* 底色是固定白，字色就不能跟主题翻：暗色下 --gray-800 是 #fafafa，白字压白底整枚隐形 */
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
}

.hcard-badge {
    position: absolute;
    right: 8px;
    top: 8px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    /* 角标一律「状态色实底 + --primary-foreground 字」：底色跟主题翻，字就是它的反色，两档都稳过 4.5。
       原来写死 #fff 压半透明色块，靶场实测亮色 2.39(已完成)/3.49(失败)、暗色 2.90/4.26，全在破线或擦边 */
    color: var(--primary-foreground);
    background: var(--status-neutral);
    border-radius: 999px;
}

.hcard.is-running .hcard-badge { background: var(--primary); color: var(--primary-foreground); }
.hcard.is-success .hcard-badge { background: var(--status-success); color: var(--primary-foreground); }
.hcard.is-failed .hcard-badge { background: var(--status-destructive); color: var(--primary-foreground); }

.hcard-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* 必须是不透明且跟主题翻的底色：原来的 #f8fafc 起手的渐变在暗色下是一整块白，
       垫在 --primary-fg（暗色近白）的字底下，「AI 绘制中/已用时」全隐形 */
    background: var(--image-tile-bg);
}

.hcard-loading .spinner-border { width: 32px; height: 32px; border-width: 3px; }

.hcard-loading-txt { font-size: 13px; font-weight: 600; color: var(--primary-fg); }

.hcard-timer {
    font-size: 12px;
    color: var(--gray-600);
    font-variant-numeric: tabular-nums;
}

.hcard-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--gray-200);
}

.hcard-progress > i {
    display: block;
    height: 100%;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 1s linear;
}

.hcard-failed {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    /* --danger 的 #ef4444 压在 --danger-soft 浅红底上只有 3.9:1，13px 字要 4.5；
       换状态令牌（亮 #dc2626 / 暗 #f87171），两档都过线 */
    color: var(--status-destructive);
    background: var(--danger-soft);
}

.hcard-failed i { font-size: 26px; }

.hcard-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.hcard-prompt {
    min-height: 40px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--gray-800);
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hcard-error {
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--status-destructive);
    background: var(--danger-soft);
    border-radius: 8px;
    word-break: break-word;
}

.hcard-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.hcard-tags span {
    padding: 3px 9px;
    font-size: 11px;
    color: var(--gray-600);
    background: var(--gray-100);
    border-radius: 999px;
}

.hcard-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
}

.hcard-date {
    font-size: 11px;
    color: var(--gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hcard-acts { display: flex; gap: 4px; flex-shrink: 0; }

.hcard-act {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--gray-600);
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s;
}

.hcard-act:hover {
    color: var(--primary-fg);
    border-color: var(--primary-fg);
    background: var(--primary-light);
}

.hcard-act.on {
    /* --success(#16a34a) 压 --success-soft 靶场实测亮色 2.8、暗色玻璃上 1.98＝基本看不见，
       换状态令牌：亮 #15803d / 暗 #22c55e，两档都在 4.6 以上 */
    color: var(--status-success);
    border-color: var(--status-success);
    background: var(--success-soft);
}

.hcard-act.danger:hover {
    color: var(--status-destructive);
    border-color: var(--status-destructive);
    background: var(--danger-soft);
}

/* 红字压浅红底（--status-destructive #dc2626 压 --danger-soft #fef2f2）靶场实测亮色 4.41，
   差 0.09 破 4.5 线；暗色那边是 #f87171 压半透明红底，5.1 有余量，不动。
   只把亮色这一档收到 #c81e1e（5.27），不去改 --danger-soft / --status-destructive 这两个
   共享令牌——后台一整批面板都在用，为了 0.09 刷它们不值当。 */
html:not([data-theme="dark"]) .hcard-failed,
html:not([data-theme="dark"]) .hcard-error,
html:not([data-theme="dark"]) .hcard-act.danger:hover { color: #c81e1e; }

/* 提示词输入框 */
.prompt-textarea {
    border-radius: 10px;
    border: 1.5px solid var(--gray-200);
    padding: 12px 16px;
    font-size: 15px;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
}

.prompt-textarea:focus {
    border-color: var(--primary-fg);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* 生成按钮 */
.btn-generate {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border: none;
    border-radius: 10px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-foreground);
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-generate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.4);
    /* 悬停字色跟令牌翻：暗色下底是白渐变，写死 #fff 会白字白底隐形 */
    color: var(--primary-foreground);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-generate:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* 灵感广场作品流
   原来用 CSS 多列（columns）做瀑布流：多列是「先竖着填满第一列再换下一列」，
   而且要均分列高（column-fill: balance）就得在排版时知道每一项的高度。
   卡片是 JS 动态追加的、图片又是 loading="lazy" 且没预留高度，
   排版那一刻每张图高度都是 0，浏览器拿一堆零高度的框去均分，
   结果全塞进左边一两列、右边整片空白；图片陆续加载完也不会重新均分。
   改成 Grid：按行从左到右填，图片有 4:5 定框提前占好高度，加载前后布局一致。 */
.waterfall {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.waterfall-item {
    position: relative;
    min-width: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.waterfall-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

/* 置顶角标，贴在卡片图片左上角。
   pointer-events: none 让点击穿透到卡片本身——点卡片是要打开详情弹窗的，
   角标盖在上面不能把这个点击吃掉 */
.wf-top {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--primary-foreground);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.35);
    pointer-events: none;
}

/* 出图有竖有横有方，统一收进 4:5 定框：网格每格等高、整体齐整，
   高度在图片加载前就占好位，不会等图加载完再跳一下。
   框内用 contain 而不是 cover：整张图完整可见，横图上下留白、竖图左右留白。
   原来这里是 cover，线上公开作品九成是 1024×1024，塞进 4:5 框上下各被切掉一成，
   在画廊里根本看不全，直接影响作品和站点的吸引力。
   口径和创作页 .hcard-media / .hcard-img 完全一致，全站作品图不再有两套行为。
   框内留白用浅灰底托住，看起来是刻意留白而不是图片没加载出来 */
.waterfall-item img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    display: block;
    background: #f1f5f9;
}

.waterfall-item .item-info {
    padding: 10px 12px;
}

.waterfall-item .item-prompt {
    font-size: 12px;
    color: var(--gray-600);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片内容标签（点一下就在灵感广场里筛同类作品）
   高度按「行」封顶而不是按个数：一行 chip 是 20px，行间距 4px。
   min-height 占住一行，保证没标签的作品和有标签的卡片底边对齐；
   max-height 放到三行，手机窄屏一行只塞得下两颗，5 颗标签要三行才装得完，
   超出部分整颗落到下一行被裁掉——flex 换行只发生在 chip 边界，不会切出半颗。
   这里不能复用 .hcard-tags：那套样式已经被创作页历史卡片的「生成参数徽章」占了，
   两边语义不同，共用一处以后改参数徽章必然连带改坏作品卡片 */
.wf-tags {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 4px;
    min-height: 20px;
    max-height: 68px;
    margin-top: 6px;
    overflow: hidden;
}

/* 宽屏一行能排下三颗，两行就够 5 颗，多留一行只会让卡片凭空高一截 */
@media (min-width: 992px) {
    .wf-tags {
        max-height: 44px;
    }
}

.wf-tag {
    /* 320px 窄屏两列时每张卡内容区只剩 ~126px，不限宽长中文标签会撑破卡片排版 */
    max-width: 100%;
    min-width: 0;
    padding: 2px 8px;
    font-size: 11px;
    line-height: 16px;
    color: var(--gray-600);
    background: var(--gray-100);
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.wf-tag:hover,
.wf-tag:focus {
    background: var(--primary-light);
    color: var(--primary-dark-fg);
}

/* 登录/注册页 */
.auth-page {
    min-height: calc(100vh - var(--navbar-height) - var(--bottom-nav-height) - 32px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.auth-card h2 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
}

/* ====== 登录 / 注册 / 找回密码的品牌区（view/partial/auth-head.php） ====== */
.auth-brand {
    text-align: center;
    margin-bottom: 18px;
}

/* 定高不定宽 + contain：后台传上来的 Logo 长宽比不可控，
   写死宽度会拉变形，不设上限会撑破这张 400px 的卡片 */
.auth-brand-logo {
    display: block;
    margin: 0 auto 10px;
    height: 52px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.auth-brand-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--gray-800);
    word-break: break-word;
}

.auth-brand-sub {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--gray-600);
}

/* 品牌区已经在上面占了视觉重量，紧跟其后的动作标题要收一点，
   否则两块标题叠在一起头重脚轻 */
.auth-brand + h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
}

@media (max-width: 575.98px) {
    .auth-card { padding: 24px 18px; }

    .auth-brand-logo { height: 44px; }

    .auth-brand-title { font-size: 17px; }
}

.auth-card .form-control {
    border-radius: 10px;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-200);
    font-size: 15px;
}

.auth-card .form-control:focus {
    border-color: var(--primary-fg);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* 三张认证卡片统一的收尾结构：主按钮 -> 次要链接行 -> 微信入口。
   以前登录页的链接行压在按钮上方、注册页那一行写在表单里面、
   找回密码页又是一套 text-center mt-3，同一个 auth-card 里三种间距，
   看起来就是「这边多一块、那边少一块」。现在三页共用这两条规则 */
.auth-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 20px;
    margin-top: 16px;
}

.auth-alt {
    text-align: center;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: #e2e8f0;
}

.btn-wechat {
    background: #07c160;
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 12px;
    width: 100%;
    font-size: 15px;
    font-weight: 500;
}

.btn-wechat:hover {
    background: #06ad56;
    color: #fff;
}

/* 找回密码方式切换 */
.forgot-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--gray-100);
    border-radius: 10px;
}

.forgot-tab {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    background: none;
    border-radius: 8px;
    padding: 8px 4px;
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s;
}

.forgot-tab.active {
    background: var(--surface);
    color: var(--primary-fg);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 个人中心 */
.profile-header {
    text-align: center;
    padding: 24px 0;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 28px;
    color: var(--primary-fg);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stat-card {
    text-align: center;
    padding: 16px;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-card .stat-num {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-fg);
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 4px;
}

/* 头像 + 相机角标 */
.avatar-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
}

.avatar-wrap .profile-avatar {
    width: 100%;
    height: 100%;
    margin: 0;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.avatar-cam {
    position: absolute;
    right: -4px;
    bottom: -2px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.avatar-cam:active {
    transform: scale(0.92);
}

/* 用户编号 */
.user-no-badge {
    background: var(--primary-light);
    color: var(--primary-fg);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-radius: 6px;
    padding: 4px 8px;
}

.user-no-badge-sm {
    font-family: "SFMono-Regular", Consolas, "Courier New", monospace;
    color: var(--primary-fg);
    font-weight: 600;
}

.btn-copy-no {
    border: none;
    background: none;
    color: var(--gray-600);
    font-size: 12px;
    padding: 2px 6px;
    cursor: pointer;
}

.btn-copy-no:active {
    color: var(--primary-fg);
}

/* 头像上传区：手机竖排，≥576px 横排 */
.avatar-uploader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.au-preview {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary-fg);
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.au-preview img {
    width: 100%;
    height: 100%;
    /* contain 而不是 cover：这是用户刚上传的参考图，裁掉就看不出自己传的是哪张了 */
    object-fit: contain;
    background: #f1f5f9;
}

.au-side {
    min-width: 0;
    text-align: center;
}

.au-tip {
    margin-top: 8px !important;
    font-size: 12px;
    line-height: 1.6;
    color: var(--gray-600);
    word-break: break-word;
}

@media (min-width: 576px) {
    .avatar-uploader {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }

    .au-side {
        text-align: left;
    }
}

/* 账号安全 / 账号信息行 */
.sec-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.sec-info {
    min-width: 0;
    flex: 1 1 auto;
}

.sec-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.sec-value {
    font-size: 12px;
    color: var(--gray-600);
    word-break: break-all;
}

.sec-panel {
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: var(--gray-50);
}

/* 分类标签 */
.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.category-tab.active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary-fg);
}

/* 当前生效的内容标签筛选条，挂在分类标签下方自己一行，
   不和搜索框挤在同一个 flex 里——搜索框是 flex:1 撑满的，插进去会被压窄 */
.tag-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
}

.tf-label {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--gray-600);
}

.tf-chip {
    /* inline-block 而不是 inline-flex：flex 布局下文本变成匿名 flex item，
       text-overflow: ellipsis 就不生效了，长标签会横向顶开清除按钮 */
    display: inline-block;
    max-width: 55vw;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--primary-foreground);
    background: var(--primary);
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.tf-clear {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    font-size: 10px;
    color: var(--gray-600);
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.tf-clear:hover {
    color: var(--danger);
    border-color: #fca5a5;
}

/* 详情弹窗里的内容标签：展示这件作品识别出的全部标签，点一下筛同类 */
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dt-tag {
    max-width: 100%;
    padding: 4px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--gray-600);
    background: var(--gray-100);
    border-radius: 999px;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: background 0.15s, color 0.15s;
}

.dt-tag:hover,
.dt-tag:focus {
    background: var(--primary-light);
    color: var(--primary-dark-fg);
}

/* 模态框 */
.modal-content {
    border-radius: 16px;
    border: none;
}

/* 参考图格子：最多 4 张，缩略图格 + 「添加」格流式排列。
   格子是固定宽高的正方形，图片用 cover 填满——这里是「已选文件」的确认视图，
   用户要一眼认出传的是哪张；和作品展示区（必须 contain 完整显示）不是一回事 */
.ref-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ref-tile {
    position: relative;
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    padding: 0;
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    background: #f1f5f9;
    overflow: hidden;
}

.ref-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-style: dashed;
    background: var(--surface);
    color: var(--gray-600);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.ref-add i { font-size: 22px; line-height: 1; color: var(--gray-600); }
.ref-add span { font-size: 12px; font-weight: 600; }

.ref-add small {
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
    padding: 0 6px;
    color: var(--gray-600);
}

.ref-add:hover,
.ref-add:focus-visible,
.ref-grid.dragover .ref-add {
    border-color: var(--primary-fg);
    background: var(--primary-light);
    color: var(--primary-dark-fg);
}

.ref-add:hover i,
.ref-grid.dragover .ref-add i { color: var(--primary-fg); }

/* 满 4 张就不该再留一个点下去只会报错的格子 */
.ref-grid.is-full .ref-add { display: none; }

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

.ref-index {
    position: absolute;
    left: 5px;
    bottom: 5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

.ref-remove {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.ref-remove:hover { background: var(--danger); }

.ref-tile.is-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    background: var(--surface);
}

@media (max-width: 575.98px) {
    .ref-grid { gap: 8px; }
    .ref-tile { width: 76px; height: 76px; }
    .ref-add i { font-size: 19px; }
    .ref-add span { font-size: 11px; }
    .ref-add small { font-size: 9px; padding: 0 4px; }
}

/* Toast 通知 */
.toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + 12px);
    right: 12px;
    z-index: 9999;
}

/* 微信浏览器修复 */
.wechat-fix {
    position: relative;
    overflow: hidden;
}

/* 加载动画 */
.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

.empty-state i {
    font-size: 48px;
    color: var(--muted-icon);
    margin-bottom: 16px;
}

/* ===== 图片灯箱：双指缩放 / 双击放大 / 拖动平移 / 多图滑动 ===== */
.lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10050;
    display: none;
    background: rgba(0, 0, 0, 0.94);
    -webkit-tap-highlight-color: transparent;
}

.lightbox.open { display: block; }

.lb-stage {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}

.lb-img {
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.22s ease-out;
    /* 这里不能常驻 will-change:transform —— 那会让浏览器按「适配尺寸」栅格化一张固定图层，
       之后放大只是把这张小位图摊开，源图有 2048 像素也照样糊。
       合成层由 app.js 在手指按下的那段时间里临时加上，静止时按当前倍数重新栅格化才清晰 */
    /* 微信「长按保存到相册 / 识别图中二维码」依赖系统默认行为，这里不能禁掉 */
    -webkit-touch-callout: default;
    -webkit-user-select: auto;
    user-select: auto;
}

.lb-bar {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    transition: opacity 0.2s;
}

.lb-bar-top {
    top: 0;
    justify-content: space-between;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.lb-bar-bottom {
    bottom: 0;
    padding-bottom: calc(12px + var(--safe-bottom));
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.lightbox.lb-min .lb-bar {
    opacity: 0;
    pointer-events: none;
}

.lb-count {
    /* 和右侧关闭按钮等宽：单图时张数是空的，不给最小宽度的话中间的百分比角标会偏左 */
    min-width: 40px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

/* 缩放百分比角标。100% 恒等于图片原始像素，适配状态下显示的是「缩到百分之几在看」 */
.lb-zoom {
    flex: 0 0 auto;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* 正好落在原始大小时高亮，用户不用猜「现在是不是真 100%」 */
.lb-zoom-exact {
    background: var(--bs-primary, var(--primary));
    color: var(--primary-foreground);
}

.lb-btn {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.lb-btn:hover { background: rgba(255, 255, 255, 0.26); color: #fff; }
.lb-btn:active { background: rgba(255, 255, 255, 0.34); }

.lb-hint {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 临时提示（例如「当前已是原始大小 100%」），两秒后 JS 会撤回常规那句 */
.lb-hint-flash {
    color: #fff;
    font-weight: 600;
}

/* 灯箱打开时锁住背景滚动；只在打开期间生效，不影响平时 body 的触屏滚动 */
html.lb-open,
html.lb-open body { overflow: hidden; }

/* ====== 小屏手机 (≤575px)：收窄内边距，保证三列参数按钮文字放得下 ====== */
@media (max-width: 575px) {
    .wb-head { padding: 16px 16px 14px; }
    .wb-body { padding: 14px 16px; }
    .wb-card { padding: 14px; }
    .wb-foot { padding: 12px 16px calc(12px + var(--safe-bottom)); }
    .wb-main-head { padding: 14px 16px; }
    .wb-main-body { padding: 14px 16px 16px; }
    .wb-title { font-size: 20px; }
    .wb-opt { padding: 9px 4px; }
}

/* ====== 手机横向 (≥576px) ====== */
@media (min-width: 576px) {
    /* 批次27：.app-main 不再自己加内边距，留白统一由外层 .app-shell 给
       （版式基准 main = max-w-7xl + px-3 py-6 / sm:px-6 sm:py-10），
       两处都留会变成双倍空白，页面左右比版式基准窄一圈 */

    .waterfall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

    .auth-card { padding: 40px 32px; }

    .wb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

    .wb-search { flex: 1 1 200px; }
}

/* ====== 平板 / 小电脑 (≥768px) ====== */
@media (min-width: 768px) {
    .wb-main-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .wb-toolbar { flex-wrap: nowrap; }
}

/* ====== 电脑 (≥992px) ====== */
@media (min-width: 992px) {
    /* 批次27：内容宽度和留白统一收到外层 .app-shell（max-w-7xl=1280px + px-3 py-6 /
       sm:px-6 sm:py-10，业主指定的前台版式基准 的 main 就这一层）。.app-main 只保留 min-width:0 防溢出，
       不再自己压 max-width / padding / min-height：
       · padding 会和 .app-shell 的叠成双倍空白；
       · min-height:calc(100vh - 60px) 是顶栏 fixed 那阵子用来撑满屏的，
         现在顶栏是 sticky 且计入文档流，再撑一次会让每页都凭空多出一屏滚动；
       · max-width 写死会盖掉 .app-shell 的 1280 上限，正是业主当年量出「人家 1400 我们 1320」的老坑。
       workbench / agent 两页各自另写了 max-width:none + padding:0，不受影响。 */
    .app-main {
        max-width: none;
    }

    .waterfall { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

    .wb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .wb-foot { bottom: 0; }

    .wb-title { font-size: 24px; }
}

/* ====== 宽屏：工作台双栏 (≥1200px) ======
   批次27-E：这一段原本还挂着 .app-shell { min-height: calc(100vh - var(--navbar-height)) }
   和整套左侧分组导航（.app-sidebar* / .side-*）。前者是顶栏 fixed 那阵子用来撑满一屏的，
   顶栏改 sticky 后它计入文档流，再撑一次会让每页凭空多出一屏滚动；后者对应的 DOM 节点
   批次20 起前台就没有了。两处死规则已删，本段只剩工作台双栏。 */
@media (min-width: 1200px) {
    /* 工作台：整页只有一个滚动条，左右两栏跟着页面一起滚。
       以前这里把 body 锁成 100vh、再让 .wb-body 和 .wb-main-body 各自 overflow-y:auto，
       结果就是「两个独立下拉框」——左边滚到底了右边还没动。
       手机端从来都是普通文档流 + 吸底按钮且已验证可用，桌面端照搬同一套。 */
    body.page-workbench .app-main {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    body.page-workbench .wb-shell {
        display: grid;
        grid-template-columns: minmax(430px, 500px) minmax(0, 1fr);
        /* 批次35：全出血后改回等高拉伸。以前 start 是因为两栏还套在圆角卡片里，
           矮栏拉出会拖一片空白卡底；现在两栏直接贴边铺满可视区，矮的那栏不拉齐
           就会在下方露出页面背景，像没做完的半成品。左栏 .wb-body / 右栏 .wb-main-body
           都是 flex:1，拉齐后多出来的高度由内容区吃掉，吸底按钮照样贴栏底 */
        align-items: stretch;
        gap: 0;
    }

    body.page-workbench .wb-panel {
        border: none;
        border-right: 1px solid var(--gray-200);
        border-radius: 0;
        box-shadow: none;
    }

    body.page-workbench .wb-main {
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    /* .wb-foot 继承基础样式的 position:sticky；≥992px 时 bottom 已经是 0，
       所以预计消耗和生成按钮会一直吸在视口底部，滚到哪都能点 */
    body.page-workbench .wb-foot {
        border-radius: 0;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    }

    body.page-workbench .wb-head { padding: 22px 24px 18px; }
    body.page-workbench .wb-body { padding: 18px 24px; }
    body.page-workbench .wb-foot { padding: 16px 24px; }
    body.page-workbench .wb-main-head { padding: 18px 24px; }
    body.page-workbench .wb-main-body { padding: 18px 24px 24px; }

    .wb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

}

/* ====== 大屏 (≥1400px) ====== */
@media (min-width: 1400px) {
    /* 批次23-B1：这里原本写着 .app-main { max-width: 1376px; } 和
       body.page-workbench .app-main { max-width: none; }。前一条正是「1376 − 28 − 28 = 1320」的来源，
       已按版式基准口径在 ≥992px 段统一改成 max-width: none（版式基准没有 .app-main 这层），
       后一条因此也成了空转规则，两条一起删掉——留着会让人误以为宽度是在这里定的。 */
    .waterfall { grid-template-columns: repeat(5, minmax(0, 1fr)); }

    body.page-workbench .wb-shell {
        grid-template-columns: minmax(460px, 560px) minmax(0, 1fr);
    }

    .wb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ====== 超大屏 (≥1880px) ====== */
@media (min-width: 1880px) {
    .wb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ====== 灵感广场作品流（首页与 /inspiration 共用 view/partial/feed.php） ====== */
.feed-head { margin-bottom: 14px; }

.feed-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--gray-800);
}

.feed-title i { color: var(--primary-fg); }

.feed-sub {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--gray-600);
}

/* 搜索框与下方作品网格同宽、左右边缘对齐。原来写死 max-width:420px，
   电脑端容器有 1256px，搜索框只占左边一小截，右边整片空白，看着像没排完 */
.feed-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

.feed-search .form-control {
    border-radius: 20px 0 0 20px;
    border-right: none;
}

.feed-search .btn { border-radius: 0 20px 20px 0; }

/* 详情弹窗大图：定框 + contain，横图左右留白、竖图上下留白，整张图完整可见。
   原来这些属性写在模板的 inline style 里，改一次要翻 PHP */
.detail-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 240px;
    max-height: 70vh;
    object-fit: contain;
    background: #f1f5f9;
    border-radius: 16px 0 0 16px;
    cursor: zoom-in;
}

/* 首页生成条提交后跳创作页，把那张卡片标出来，用户才知道任务落到哪了 */
.hcard-focus { animation: hcardFocus 2.6s ease-out; }

@keyframes hcardFocus {
    0%, 65% { outline: 3px solid rgba(var(--primary-rgb), 0.85); outline-offset: 2px; }
    100%    { outline: 3px solid rgba(var(--primary-rgb), 0); outline-offset: 2px; }
}

/* ====== 首页：Hero + 横向生成条 ====== */
.home-wrap { width: 100%; min-width: 0; }

.home-hero {
    text-align: center;
    padding: 14px 0 18px;
}

.home-title {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.5px;
    /* 先给实色兜底，不支持 background-clip:text 的老浏览器不会变成透明字 */
    color: var(--gray-800);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .home-title {
        background: linear-gradient(120deg, var(--primary-fg) 0%, var(--accent-fg) 55%, var(--primary-dark-fg) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.home-sub {
    margin: 0 auto;
    max-width: 640px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--gray-600);
}

/* ====== 首页补段（批次19-B，对齐 业主指定的版式基准 首页的轮播/能力卡/CTA 三段）======
   版式基准轮播是后台上传的广告图，本站用主题令牌渐变底：换主题色时三段一起跟着变，
   暗色模式也不用单独翻色（渐变本身是品牌色，中性色令牌不参与）。 */
.home-banner { margin: 2px 0 0; }
.home-banner .carousel-inner { border-radius: 14px; overflow: hidden; }
.home-banner-slide {
    min-height: 190px;
    display: flex;
    align-items: center;
    padding: 24px 28px;
    color: #fff;
}
/* 上面那条 display:flex 和 Bootstrap 的 .carousel-item{display:none} 特异性相同、位置又靠后，
   于是非当前帧也被摊开、三帧叠在同一个位置——最后一帧永远盖住前两帧，看起来就是「不滚动、
   左右按钮没反应」（active 类其实一直在换，只是画面上看不出来）。这里按 Bootstrap 自己的
   显隐名单补回 none：当前帧和过场中的 next/prev 帧保持可见，其余藏起来。特异性 0,5,0 稳压。 */
.home-banner .carousel-item:not(.active):not(.carousel-item-next):not(.carousel-item-prev) { display: none; }
/* 批次31-G：三帧渐变滑片的底色都走 --primary / --primary-dark 令牌，批次27-A 把主色改成中性黑白后，
   暗色主题下 --primary 翻成 #fafafa、--primary-dark 翻成 #ffffff，三帧全变成近白底，
   可 .home-banner-slide 的 color:#fff 是给「真图滑片 + 暗角遮罩」写的、不能动 ——
   结果暗色下渐变帧是白字压白底，整帧文字隐形。
   这里只给三帧渐变单独翻字色，并把渐变改成用 color-mix 从 --primary 往页面底色兑浅，
   保证三个色标始终和 --primary 同一侧，字色一个令牌就压得住（亮 5.9:1 / 暗 8:1，靶场实测）。
   真图帧（.home-banner-img）不受影响：它有 .home-banner-scrim 暗角，白字才对。 */
.home-banner-s1,
.home-banner-s2,
.home-banner-s3 { color: var(--primary-foreground); }
.home-banner-s1 { background: linear-gradient(120deg, var(--grad-from), var(--grad-to)); }
.home-banner-s2 { background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 82%, var(--bg-color)), var(--grad-from)); }
.home-banner-s3 { background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 62%, var(--bg-color)), var(--primary)); }
.home-banner-txt { max-width: 640px; }
.home-banner-eyebrow { font-size: 12px; letter-spacing: 2px; opacity: .85; margin-bottom: 6px; }
.home-banner-txt h2 { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.home-banner-txt p { font-size: 13px; line-height: 1.7; opacity: .92; margin: 0 0 14px; }
.home-banner .carousel-indicators { margin-bottom: 10px; }
/* 白点加一圈半透明黑边：暗色下渐变帧是近白底，纯白点会消失（批次31-G） */
.home-banner .carousel-indicators [data-bs-target] { background-color: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .32); }
/* Bootstrap 5.3 的暗色块会把轮播箭头 filter 成黑、指示点改成黑（它假设暗色=浅底轮播），
   压在本站的渐变/图片滑片上等于隐身。这里强制回白：选择器比它多一级 html，靠特异性赢 */
html[data-bs-theme="dark"] .home-banner .carousel-control-prev-icon,
html[data-bs-theme="dark"] .home-banner .carousel-control-next-icon { filter: none; }
html[data-bs-theme="dark"] .home-banner .carousel-indicators [data-bs-target] { background-color: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .32); }

/* 图片帧（批次22-C）：后台「站点装修 → 首页装修」上传的真图。
   高度按框给死、图 object-fit:cover 裁满，这样管理员传任意尺寸的图都不会把首页撑高或压扁；
   3:1 上下是照着版式基准首页那一帧量的。渐变帧不受影响，还是原来那套 min-height:190px */
.home-banner-img { display: block; min-height: 0; padding: 0; height: clamp(190px, 26vw, 400px); }
/* 整帧可点：图和文字都包在这一个元素里，不必再叠 z-index 去和箭头、指示点抢层级 */
.home-banner-fill { position: absolute; inset: 0; display: block; color: inherit; text-decoration: none; }
.home-banner-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* 只压左半边：白字落在暗区，图的主体留在右边不被糊掉 */
.home-banner-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(9, 12, 24, .66) 0%, rgba(9, 12, 24, .38) 42%, rgba(9, 12, 24, 0) 74%);
}
/* 必须是定位元素，否则会被同级那两个 absolute 的图和幕盖住 */
.home-banner-img .home-banner-txt { position: relative; padding: 24px 28px; }
.home-banner-img .home-banner-txt p { margin-bottom: 0; }

/* 图帧模式下箭头垫一层半透明底盘：上传的图可能是浅色的，白箭头直接压上去等于隐身。
   渐变帧不加，那三帧本身就是深色底，加了反而多两个灰点 */
.home-banner-photos .carousel-control-prev-icon,
.home-banner-photos .carousel-control-next-icon {
    width: 34px; height: 34px;
    background-color: rgba(9, 12, 24, .34);
    background-size: 18px 18px;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
}

@media (max-width: 575.98px) {
    /* 手机上 26vw 只剩一百来像素，图和字都挤不开：给一个够放两行字的固定高度，
       副标题最多两行截断，绝不让它把帧撑破 */
    .home-banner-img { height: 176px; }
    .home-banner-img .home-banner-txt { padding: 16px 18px; max-width: 82%; }
    .home-banner-img .home-banner-txt h2 { font-size: 18px; }
    .home-banner-img .home-banner-txt p {
        font-size: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.home-why { margin-top: 30px; }
.home-sec-title {
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    margin: 0 0 16px;
    color: var(--gray-800);
}
.home-why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.home-why-card {
    display: block;
    padding: 18px 14px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.home-why-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), .14);
    border-color: var(--primary-border);
}
.home-why-card i { display: block; font-size: 26px; color: var(--primary-fg); margin-bottom: 10px; }
.home-why-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; color: var(--gray-800); }
.home-why-card p { font-size: 12px; line-height: 1.6; color: var(--gray-600); margin: 0; }
@media (max-width: 991.98px) { .home-why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 419.98px) { .home-why-grid { grid-template-columns: 1fr; } }

.home-cta {
    margin: 34px 0 6px;
    padding: 34px 20px;
    border-radius: 16px;
    text-align: center;
    background: linear-gradient(120deg, var(--grad-from), var(--grad-to));
    color: var(--primary-foreground);
}
.home-cta h3 { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.home-cta p { font-size: 13px; opacity: .92; margin: 0 0 18px; }
.home-cta-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 浮动客服（对齐 业主指定的版式基准 右下角「联系客服」）。手机端底部有导航条，
   按钮必须抬到导航条之上，不然正好盖住「我的」那个格子 */
.app-float-service {
    position: fixed;
    right: 16px;
    z-index: 1030;
    bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 14px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--primary-fg);
    border: 1px solid var(--primary-border);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), .25);
    font-size: 12px;
    text-decoration: none;
}
.app-float-service i { font-size: 18px; }
@media (min-width: 992px) { .app-float-service { bottom: 24px; } }

/* 场景快捷入口（批次18-D，对齐 业主指定的版式基准 首页的场景芯片）。
   一排轻量芯片，和下方参数胶囊同一套视觉语言；统一用 var(--primary) 上色，
   将来整站换主色时这里自动跟着变，不用单独再改一遍。
   业主此前点名不要的是「四个 Agent 大卡」和「常用能力九宫格」那种重卡片，芯片不在此列。 */
.home-scenes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 16px;
}

.home-scene {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--surface);
    color: var(--gray-800);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}

.home-scene > i { color: var(--primary-fg); font-size: 15px; flex-shrink: 0; }

.home-scene:hover {
    border-color: var(--primary-fg);
    background: var(--primary-light);
    color: var(--primary-dark-fg);
    transform: translateY(-1px);
}

.home-scene:hover > i { color: var(--primary-dark-fg); }

.home-scene-more { border-style: dashed; }

.genbar {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
    padding: 12px;
}

.genbar-input {
    display: block;
    width: 100%;
    min-height: 88px;
    padding: 4px 2px;
    border: none;
    background: transparent;
    resize: vertical;
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray-800);
}

.genbar-input:focus { outline: none; }

.genbar-input::placeholder { color: #9ca3af; }

/* 参数胶囊：一行铺开，窄屏自动换行，不用 JS 判断宽度 */
.genbar-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed var(--gray-200);
}

.gchip { min-width: 0; }

.gchip-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--gray-50);
    color: var(--gray-800);
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s;
}

.gchip-btn::after { margin-left: 1px; }

.gchip-btn > i { color: var(--primary-fg); font-size: 14px; flex-shrink: 0; }

.gchip-key { color: var(--gray-600); flex-shrink: 0; }

.gchip-label {
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gchip-btn:hover:not(:disabled),
.gchip.show .gchip-btn {
    border-color: var(--primary-fg);
    background: var(--primary-light);
    color: var(--gray-800);
}

.gchip-menu {
    min-width: 230px;
    /* 手机上不能比屏幕还宽，否则一定横向溢出 */
    max-width: min(340px, calc(100vw - 28px));
    max-height: 320px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.gchip-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    font-size: 13px;
    color: var(--gray-800);
}

.gchip-opt:hover { background: var(--gray-100); }

.gchip-opt.active { background: var(--primary-light); color: var(--primary-dark-fg); }

.gchip-opt-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }

.gchip-opt-main b { font-weight: 600; }

.gchip-opt-main small { font-size: 11px; color: var(--gray-600); }

.gchip-opt.active .gchip-opt-main small { color: var(--primary-fg); }

.gchip-opt-sub { font-size: 11px; color: var(--gray-600); white-space: nowrap; flex-shrink: 0; }

.genbar-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.genbar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 12px;
    color: var(--gray-600);
}

.genbar-size { min-width: 0; }

.genbar-action { display: flex; flex-direction: column; gap: 10px; }

.genbar-cost {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
    color: var(--gray-600);
}

.genbar-cost-num {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-fg);
}

.genbar-balance { margin-left: auto; }

.genbar-formula { margin-top: 8px; font-size: 12px; color: var(--gray-600); }

.genbar-guest {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--primary-light);
    font-size: 12px;
    line-height: 1.6;
    color: var(--gray-600);
}

.home-feed { margin-top: 26px; }

/* ====== 首页响应式 ====== */
@media (max-width: 767.98px) {
    /* 弹窗在手机上是上下堆叠的，大图圆角要跟着换边，高度也要压一压别占满屏 */
    .detail-image {
        min-height: 200px;
        max-height: 44vh;
        border-radius: 16px 16px 0 0;
    }

    /* 场景芯片在窄屏收紧一点，换行成多行居中也不挤 */
    .home-scenes { gap: 7px; margin-bottom: 14px; }
    .home-scene { height: 34px; padding: 0 12px; font-size: 13px; }
}

@media (min-width: 576px) {
    .home-title { font-size: 32px; }

    .genbar { padding: 16px; }
}

@media (min-width: 768px) {
    .home-hero { padding: 26px 0 22px; }

    .home-title { font-size: 38px; }

    .home-sub { font-size: 15px; }

    .genbar { padding: 18px 20px; }

    .genbar-input { min-height: 96px; font-size: 16px; }

    /* 预计消耗和生成按钮横排，桌面端一眼看全 */
    .genbar-foot {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }

    .genbar-action {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        flex-shrink: 0;
    }

    .genbar-cost { flex-wrap: nowrap; }

    .genbar-submit { width: auto; min-width: 168px; padding: 12px 28px; }
}

@media (min-width: 1200px) {
    .home-title { font-size: 42px; }

    .home-feed { margin-top: 34px; }
}

/* ===================================================================
   个人中心（批次21-B2 起）：所有私有页都收进 /member 的标签页里，
   限宽由 .member-layout / .member-content 决定，不再需要单独的 .member-shell
   =================================================================== */

/* ===================================================================
   积分充值（view/member/tabs/credits.php + public/js/credits.js）
   手机 2 列套餐卡 -> 平板 3 列 -> 桌面 4 列，全部用 grid 自动等分，
   不写死卡片宽度，窄屏微信里也不会横向溢出。
   =================================================================== */

/* ---- 余额条 ---- */
/* 批次31-G：这块原来是一条深色渐变横幅（linear-gradient(--primary,--primary-dark) + 白字）。
   模板里它同时挂着 .card-custom（view/member/tabs/credits.php:12），而 .card-custom 在
   31-C 被收进了文末的水滴玻璃家族，同特异性、后者在文件末尾 → 渐变被整条压掉，
   只剩半透明白玻璃底，可白字还在：亮色主题下实测底色 rgb(254,254,254) 压 #fff = 1.01，
   「当前可用积分」和余额数字整块隐形。
   按业主死命令「所有模块都是水滴玻璃」，这里不去把渐变抢回来（那会变成一排水滴里夹一块黑板），
   而是让这块老老实实当玻璃模块：底色交给家族，字色改回跟主题走的 --foreground。
   下面那条 gradient 声明是死的，留着只会误导人，删掉。 */
.credits-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    margin-bottom: 20px;
    color: var(--foreground);
}

.credits-head-label {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 4px;
}

.credits-head-num {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.credits-head-side {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

/* 批次31-G：原来写死 rgba(255,255,255,.8) 是为了压在深色横幅上；横幅改玻璃后
   亮色主题下就是白字压 rgb(254,254,254)（实测 1.01，「充值流程」四个字看不见）。
   不用 --muted-foreground：它亮色是 #64748b，压在玻璃上只有 4.33:1，
   12px 小字要 4.5，差一点。改用 --foreground + opacity 调暗，亮色实测 6.5:1 过。
   !important 留着，是为了压过 Bootstrap 的 .text-muted。 */
.credits-head-side .text-muted { color: var(--foreground) !important; opacity: .78; }

.credits-steps {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.85;
    opacity: 0.82;
}

/* ---- 区块标题 ---- */
.credits-block { margin-bottom: 26px; }

.credits-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.credits-block-head h5 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--gray-800);
}

/* 标题和它的小提示必须贴在一起：以前提示靠 head 的 space-between 顶到整列最右边，
   960 宽的列里标题在左、提示飘在右，中间一大片空白，看着像错位的多余文字。
   现在提示跟在标题后面，窄屏放不下就换行到标题下方 */
.credits-block-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    min-width: 0;
}

.credits-block-head .small { font-size: 12px; }

/* ---- 套餐网格 ---- */
.pkg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* 骨架屏：加载时占住高度，避免卡片一出来把下面的订单列表顶得跳一下 */
.pkg-skeleton {
    height: 232px;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 37%, var(--gray-100) 63%);
    background-size: 400% 100%;
    animation: pkgShimmer 1.3s ease infinite;
}

@keyframes pkgShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.pkg-fail {
    grid-column: 1 / -1;
    text-align: center;
    padding: 36px 16px;
    color: var(--gray-600);
    font-size: 14px;
    background: var(--surface);
    border: 1px dashed var(--gray-200);
    border-radius: 14px;
}

.pkg-fail i { font-size: 30px; color: var(--muted-icon); }

.pkg-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 12px 14px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    text-align: center;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
    /* min-width:0 让卡片内容自己断行，长套餐名不会把网格撑宽导致横向溢出 */
    min-width: 0;
}

.pkg-card:hover {
    border-color: var(--primary-fg);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.12);
    transform: translateY(-2px);
}

.pkg-card-off { opacity: 0.62; }
.pkg-card-off:hover { border-color: var(--gray-200); box-shadow: none; transform: none; }

.pkg-badge {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 16px);
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

/* 图标定框：后台传上来的图长宽比不可控，contain 保证完整可见又不撑破卡片 */
.pkg-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

.pkg-icon img { width: 100%; height: 100%; object-fit: contain; }
.pkg-icon i { font-size: 26px; color: var(--primary-fg); }

.pkg-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 6px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pkg-credits {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--primary-fg);
}

.pkg-credits small { font-size: 12px; font-weight: 500; margin-left: 3px; color: var(--gray-600); }

.pkg-bonus {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    min-height: 18px;
}

.pkg-bonus-none { visibility: hidden; }

.pkg-price {
    margin-top: 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

.pkg-price small { font-size: 13px; font-weight: 600; margin-right: 1px; }

/* 单价对比行没内容时也要占住一行，否则各档卡片高度不齐，网格看着歪 */
.pkg-unit {
    margin-top: 2px;
    min-height: 16px;
    font-size: 11px;
    color: var(--gray-600);
    line-height: 16px;
    max-width: 100%;
    overflow: hidden;
}

.pkg-buy {
    width: 100%;
    margin-top: 12px;
    padding: 9px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-foreground);
    background: var(--primary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s;
}

.pkg-buy:hover { background: var(--primary-dark); }
.pkg-buy:disabled, .pkg-buy.disabled { background: var(--gray-200); color: var(--gray-600); cursor: not-allowed; }

/* ---- 充值订单 ---- */
.order-empty {
    padding: 26px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--gray-600);
    background: var(--surface);
    border: 1px dashed var(--gray-200);
    border-radius: 12px;
}

.order-item {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.order-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.order-pkg {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-status {
    flex-shrink: 0;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
}

.st-pending { background: var(--warning-soft); color: #92400e; }
.st-paid { background: var(--success-soft); color: #065f46; }
.st-rejected { background: var(--danger-soft); color: #991b1b; }
.st-cancelled { background: var(--gray-100); color: var(--gray-600); }

.order-item-mid {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 12px;
    color: var(--gray-600);
}

.order-no { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.order-amount { font-weight: 700; color: var(--gray-800); }
.order-credits { font-weight: 600; color: var(--primary-fg); }

.order-reject {
    margin-top: 8px;
    padding: 7px 10px;
    font-size: 12px;
    line-height: 1.6;
    color: #991b1b;
    background: var(--danger-soft);
    border-radius: 8px;
    word-break: break-word;
}

.order-item-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}

.order-time { font-size: 11px; color: var(--gray-600); }

.order-acts { display: flex; gap: 8px; flex-shrink: 0; }

.btn-order-proof, .btn-order-pay {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: var(--surface);
    color: var(--gray-600);
    cursor: pointer;
    white-space: nowrap;
}

.btn-order-pay { border-color: var(--primary-fg); color: var(--primary-fg); }
.btn-order-pay:hover { background: var(--primary); color: var(--primary-foreground); }
.btn-order-proof:hover { border-color: var(--gray-600); color: var(--gray-800); }

/* ---- 积分明细流水 ---- */
.log-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

.log-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
}

.log-icon.log-in { background: var(--success-soft); color: var(--success); }
.log-icon.log-out { background: var(--danger-soft); color: var(--danger); }

.log-body { flex: 1 1 auto; min-width: 0; }

.log-remark {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-time { font-size: 11px; color: var(--gray-600); margin-top: 2px; }

.log-num { flex-shrink: 0; text-align: right; }
.log-num b { display: block; font-size: 15px; }
.log-num small { display: block; font-size: 11px; color: var(--gray-600); margin-top: 1px; }
.log-num.log-in b { color: var(--success); }
.log-num.log-out b { color: var(--danger); }

/* ---- 付款弹窗 ---- */
.pay-modal .modal-body { padding: 16px; }

.pay-order-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.pay-order-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    padding: 3px 0;
}

.pay-order-row span { color: var(--gray-600); flex-shrink: 0; }
.pay-order-row b { text-align: right; word-break: break-all; color: var(--gray-800); }

.pay-order-no { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.pay-amount { font-size: 18px !important; color: var(--danger) !important; }

/* 收款码：一排最多 3 张（支付宝 / 微信 / 企业微信）。
   微信里要长按才识别得了，图上小屏根本按不准，所以卡片整块可点开灯箱放大；
   宽度用百分比算而不是写死，弹窗和页面两个容器宽度不同也能各自铺满不溢出 */
.pay-qr-box { text-align: center; margin-bottom: 14px; }

.pay-qr-list,
.pay-way-list {
    /* 间距提成变量：卡片的三等分 calc 要用它，断点里改一处两边才同步 */
    --qr-gap: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--qr-gap);
}

.pay-qr-card {
    /* 三张并排刚好占满一行；只配了一两张时靠 justify-content 居中，
       不会被 flex-grow 拉成一个空荡荡的大框 */
    flex: 0 1 calc((100% - var(--qr-gap) * 2) / 3);
    max-width: 150px;
    min-width: 82px;
    cursor: zoom-in;
    -webkit-tap-highlight-color: transparent;
}

.pay-qr-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 6px;
}

.pay-qr-card:hover img { border-color: var(--primary-border); }

.pay-qr-name {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--gray-600);
    /* 标签是后台可改的，写长了只能省略，撑宽卡片会把旁边那张挤出容器 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pay-qr-how { margin-top: 9px; font-size: 12px; color: var(--gray-600); }

.pay-qr-tip { margin-top: 4px; font-size: 13px; color: var(--gray-600); }
.pay-qr-tip b { color: var(--danger); font-size: 15px; }

/* 页面上的常驻「收款方式」：不夹在弹窗里，尺寸可以放开一点 */
.pay-way-list { --qr-gap: 12px; }
.pay-qr-card-lg { max-width: 190px; }

.pay-way-tip {
    margin-top: 12px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--gray-600);
}

.pay-way-tip b { color: var(--gray-800); }

.pay-contact-box {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--gray-800);
    background: var(--primary-light);
    border-radius: 10px;
    word-break: break-word;
}

.pay-contact-box i { color: var(--primary-fg); font-size: 16px; line-height: 1.5; }

.pay-proof-box {
    width: 78px;
    height: 78px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border: 1px dashed var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    padding: 4px;
    text-align: center;
}

.pay-proof-box img { width: 100%; height: 100%; object-fit: contain; }

.pay-modal .modal-footer {
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
}

/* ---- 断点 ---- */
@media (min-width: 576px) {
    .pkg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .pkg-icon { width: 58px; height: 58px; }
    .pkg-credits { font-size: 26px; }
    .pay-qr-card { max-width: 170px; }
    .pay-qr-card-lg { max-width: 210px; }
}

@media (min-width: 992px) {
    /* 出厂三档套餐（1/10/100 元），四列会在右边空一格；租客自己加到四档以上时自动换行 */
    .pkg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

    .credits-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        padding: 22px 26px;
    }

    .credits-head-side {
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.25);
        padding-top: 0;
        padding-left: 24px;
        flex-shrink: 0;
    }

    .credits-head-num { font-size: 40px; }
    .credits-steps { columns: 2; column-gap: 24px; }
}

@media (max-width: 575.98px) {
    .credits-head { padding: 16px; }
    .credits-head-num { font-size: 30px; }
    .pkg-card { padding: 16px 10px 12px; }
    .pkg-icon { width: 46px; height: 46px; border-radius: 12px; }
    .pkg-icon i { font-size: 22px; }
    .pkg-credits { font-size: 21px; }
    .pkg-price { font-size: 19px; }
    .pkg-name { font-size: 13px; }
    .pkg-skeleton { height: 216px; }
    .order-item-mid { font-size: 11px; gap: 4px 10px; }
    .pay-modal .modal-footer { flex-wrap: wrap; }
    .pay-modal .modal-footer .btn { flex: 1 1 auto; }
    /* 320px 窄屏上弹窗正文只剩 272px，3×82+20 刚好卡在临界，收紧一点确保三张不折行 */
    .pay-qr-list, .pay-way-list { --qr-gap: 8px; }
    .pay-qr-card { min-width: 76px; }
    .pay-qr-card img { padding: 4px; border-radius: 10px; }
    .pay-qr-name { font-size: 11px; margin-top: 4px; }
}

/* ==========================================================================
   AI Agent 对话式创作（/agent）
   --------------------------------------------------------------------------
   两个形态共用一套 DOM：
   1) 落地态 .ag-landing —— 居中 860px，徽章/大标题/快捷入口/输入卡/能力卡/历史会话；
   2) 会话态 .ag-room   —— 撑满视口高度的三行 flex（头 / 消息流内滚 / 输入卡）。
   输入卡 #agComposer 全站只渲染一份，由 JS 在 #agLandingSlot 和 #agRoomFoot
   之间搬移节点，所以它的 id 和事件绑定不会因为切形态而失效。
   右侧 .ag-params 只在 ≥1200px 且已进入会话态（.ag-shell.has-room）时出现，
   窄屏下参数直接在方案卡里改，不做第二个入口。
   ========================================================================== */
body.page-agent .app-main {
    max-width: none;
    margin: 0;
    padding: 0;
}

.ag-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0;
}

.ag-stage { min-width: 0; }

/* ---------- 落地态 ---------- */
.ag-landing {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 16px 44px;
}

.ag-closed {
    padding: 44px 20px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--gray-200);
    border-radius: 16px;
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.9;
}

.ag-hero { text-align: center; padding: 26px 0 6px; }

.ag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-fg);
    font-size: 12px;
    font-weight: 600;
}

.ag-title {
    margin: 14px 0 10px;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.ag-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary-fg) 0%, var(--accent-fg) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ag-sub {
    max-width: 520px;
    margin: 0 auto;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--gray-600);
}

.ag-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.ag-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--surface);
    font-size: 12px;
    color: var(--gray-600);
    text-decoration: none;
}

.ag-chip:hover {
    border-color: var(--primary-fg);
    color: var(--primary-fg);
}

.ag-composer-slot { margin-top: 22px; }

.ag-abilities { margin-top: 34px; }

.ag-abilities-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-800);
}

.ag-abilities-head i { color: var(--primary-fg); }

.ag-ability-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.ag-ability {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    text-align: left;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.ag-ability b { font-size: 14px; }

.ag-ability > span:not(.ag-ability-icon) {
    font-size: 12px;
    line-height: 1.65;
    color: var(--gray-600);
}

.ag-ability:hover {
    border-color: var(--primary-fg);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), .10);
    transform: translateY(-1px);
}

.ag-ability-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 16px;
}

.ag-ability-icon.i-blue   { background: var(--primary-light); color: var(--primary-fg); }
.ag-ability-icon.i-violet { background: var(--primary-light); color: var(--accent-fg); }
.ag-ability-icon.i-pink   { background: var(--pink-soft); color: #db2777; }
.ag-ability-icon.i-amber  { background: var(--amber-soft); color: #d97706; }

.ag-history { margin-top: 26px; }
.ag-history-list { display: flex; flex-direction: column; }

.ag-hist-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    font-size: 13px;
    color: var(--gray-800);
    text-align: left;
}

.ag-hist-row > i { color: var(--primary-fg); flex-shrink: 0; }
.ag-hist-row:hover { border-color: var(--primary-fg); }

.ag-hist-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ag-hist-time {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 11px;
    color: var(--gray-600);
}

.ag-history-menu { max-height: 320px; overflow-y: auto; }

/* 下拉里的历史项没有包裹 span，标题是裸文本节点，flex 下省略号会失效，
   所以这里用 overflow + float 的老办法让时间靠右、标题超长截断 */
.ag-hist-item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.ag-hist-item .ag-hist-time { float: right; margin-left: 10px; }

/* ---------- 输入卡片（两态共用） ---------- */
.ag-composer {
    padding: 10px 12px 8px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.ag-composer > textarea {
    display: block;
    width: 100%;
    max-height: 180px;
    padding: 4px 2px 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    line-height: 1.75;
    color: var(--gray-800);
    resize: none;
    outline: none;
}

/* 写死 #94a3b8 只在暗色玻璃上成立，亮色玻璃底 rgb(244) 上实测 2.53＝读不清；
   占位符本来就有令牌，两档都跟着翻 */
.ag-composer > textarea::placeholder { color: var(--text-placeholder); }

.ag-composer-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.ag-attach {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: var(--surface);
    color: var(--gray-600);
    font-size: 16px;
    flex-shrink: 0;
}

.ag-attach:hover:not(:disabled) { border-color: var(--primary-fg); color: var(--primary-fg); }
.ag-attach:disabled { opacity: .45; }

.ag-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--gray-600);
    white-space: nowrap;
}

.ag-send {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.ag-send:hover:not(:disabled) { background: var(--primary-dark); }
.ag-send:disabled { opacity: .45; cursor: not-allowed; }

.ag-refs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* 参考图缩略图沿用全站规范：4:5 定框 + contain + 浅灰底，不裁切 */
.ag-ref {
    position: relative;
    display: block;
    width: 56px;
    height: 70px;
    border: 1px solid var(--gray-200);
    border-radius: 9px;
    /* 跟主题翻：暗色下留死白会把 .ag-spin 的近白转弧垫没 */
    background: var(--image-tile-bg);
    overflow: hidden;
}

.ag-ref img { display: block; width: 100%; height: 100%; object-fit: contain; }

.ag-ref.uploading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ag-ref-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, .62);
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

/* ---------- 会话态 ---------- */
.ag-room {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--navbar-height) - var(--bottom-nav-height) - var(--safe-bottom));
    background: var(--surface);
    min-width: 0;
}

.ag-room-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--surface);
    flex-shrink: 0;
}

.ag-room-title {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 700;
}

.ag-room-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.ag-head-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--gray-200);
    border-radius: 9px;
    background: var(--surface);
    color: var(--gray-600);
    font-size: 12px;
    white-space: nowrap;
}

.ag-head-btn:hover { border-color: var(--primary-fg); color: var(--primary-fg); }
.ag-head-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

.ag-room-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 14px;
    background: var(--gray-50);
}

.ag-room-foot {
    flex-shrink: 0;
    padding: 10px 14px;
    border-top: 1px solid var(--gray-200);
    background: var(--surface);
}

/* ---------- 消息流 ---------- */
.ag-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}

.ag-msg:last-child { margin-bottom: 4px; }
.ag-msg.user { flex-direction: row-reverse; }

.ag-msg-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 15px;
    flex-shrink: 0;
}

.ag-msg-avatar.agent {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--primary-foreground);
}

.ag-msg-main {
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 auto;
}

.ag-msg.user .ag-msg-main { align-items: flex-end; }

.ag-msg-text {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.75;
    word-break: break-word;
    white-space: pre-wrap;
}

.ag-msg.user .ag-msg-text {
    background: var(--primary-light);
    color: var(--on-primary-soft);
    border-top-right-radius: 4px;
}

.ag-msg.agent .ag-msg-text {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-top-left-radius: 4px;
}

.ag-msg-refs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.ag-msg-refs img {
    display: block;
    width: 72px;
    height: 90px;
    object-fit: contain;
    background: #f1f5f9;
    border: 1px solid var(--gray-200);
    border-radius: 9px;
}

/* Agent 回复的轻量 markdown（只支持 ###、**、- 列表，见 agent.js md()） */
.ag-md {
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    border-top-left-radius: 4px;
    font-size: 14px;
    line-height: 1.85;
    color: var(--gray-800);
    max-width: 100%;
}

.ag-md-p { margin: 0 0 6px; word-break: break-word; }
.ag-md-p:last-child { margin-bottom: 0; }
.ag-md-h { margin: 10px 0 6px; font-weight: 700; }
.ag-md-gap { height: 6px; }
.ag-md-list { margin: 0 0 6px; padding-left: 18px; }
.ag-md-list li { margin-bottom: 3px; word-break: break-word; }

/* ---------- 卡片：创作方案 / 创作队列 ---------- */
.ag-card {
    width: 100%;
    margin-top: 10px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    overflow: hidden;
}

.ag-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
    font-size: 13px;
}

.ag-card-head b { font-size: 13.5px; }

.ag-card-sub {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--gray-600);
}

.ag-card-badge {
    flex-shrink: 0;
    margin-left: auto;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-fg);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.ag-plan.locked { background: var(--gray-50); }
.ag-plan.locked .ag-card-badge { background: var(--gray-200); color: var(--gray-600); }

.ag-plan-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
}

.ag-plan-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary-fg);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.ag-plan-body { flex: 1 1 auto; min-width: 0; }

.ag-plan-title { font-size: 14px; font-weight: 600; }

.ag-plan-prompt {
    margin-top: 5px;
    max-height: 96px;
    overflow-y: auto;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--gray-600);
    white-space: pre-wrap;
    word-break: break-word;
}

.ag-plan-edit {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--gray-800);
    resize: vertical;
}

.ag-plan-edit:focus {
    border-color: var(--primary-fg);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}

.ag-plan-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.ag-plan-chips span {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 11.5px;
    white-space: nowrap;
}

.ag-plan-editbtn {
    flex-shrink: 0;
    padding: 4px 10px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: var(--surface);
    color: var(--gray-600);
    font-size: 12px;
}

.ag-plan-editbtn:hover { border-color: var(--primary-fg); color: var(--primary-fg); }

.ag-card-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.ag-card-done {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--success);
}

.ag-btn-primary {
    flex: 1 1 auto;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 11px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 14px;
    font-weight: 600;
}

.ag-btn-primary:hover { background: var(--primary-dark); }
.ag-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.ag-queue-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
}

.ag-q-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--gray-600);
}

.ag-q-row.failed { color: var(--danger); }

.ag-q-imgs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.ag-q-img {
    width: 108px;
    height: 135px;
    padding: 0;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: #f1f5f9;
    overflow: hidden;
}

.ag-q-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ag-q-img:hover { border-color: var(--primary-fg); }

.ag-spin {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary-fg);
    border-radius: 50%;
    animation: ag-spin .8s linear infinite;
    flex-shrink: 0;
}

@keyframes ag-spin { to { transform: rotate(360deg); } }

/* ---------- 右侧创作参数面板 ---------- */
.ag-params { display: none; }

.ag-params-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 14px 16px 4px;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.ag-params-head i { color: var(--primary-fg); }

.ag-params-tip {
    display: block;
    width: 100%;
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 400;
    color: var(--gray-600);
}

.ag-params-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 16px 18px;
}

.ag-params-cost {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
}

.ag-params-cost-line {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-size: 12.5px;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.ag-params-cost-line b {
    margin-left: auto;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-fg);
}

.ag-params-cost-line.muted b { font-size: 14px; color: var(--gray-800); }

.ag-params-note {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--gray-200);
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--gray-600);
}

/* ---------- 平板 (≥576px) ---------- */
@media (min-width: 576px) {
    .ag-ability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ag-title { font-size: 32px; }
    .ag-room-body { padding: 20px 22px; }
    .ag-room-foot { padding: 12px 22px; }
    .ag-msg { gap: 12px; }
    .ag-card { max-width: 640px; }
    .ag-btn-primary { flex: 0 0 auto; margin-left: auto; min-width: 200px; }
}

/* ---------- 电脑 (≥992px)：没有底部导航，会话区吃满视口 ---------- */
@media (min-width: 992px) {
    .ag-room { height: calc(100vh - var(--navbar-height)); }
    .ag-landing { padding: 32px 28px 56px; }
}

/* ---------- 宽屏 (≥1200px)：会话态露出右侧创作参数 ---------- */
@media (min-width: 1200px) {
    .ag-shell.has-room { grid-template-columns: minmax(0, 1fr) 320px; }

    .ag-shell.has-room .ag-params {
        display: flex;
        flex-direction: column;
        position: sticky;
        top: var(--navbar-height);
        height: calc(100vh - var(--navbar-height));
        background: var(--surface);
        border-left: 1px solid var(--gray-200);
    }

    .ag-room-body { padding: 24px 32px; }
    .ag-room-foot { padding: 14px 32px; }
    .ag-room-head { padding: 12px 32px; }
    .ag-msg-main { max-width: 760px; }
    .ag-card { max-width: 720px; }
}

/* ---------- 极窄屏 (≤400px)：头部按钮只留图标 ---------- */
@media (max-width: 400px) {
    .ag-head-btn span { display: none; }
    .ag-head-btn { padding: 0 9px; }
    .ag-room-head { padding: 10px; gap: 6px; }
    .ag-room-body { padding: 14px 10px; }
    .ag-room-foot { padding: 8px 10px; }
    .ag-q-img { width: 92px; height: 115px; }
    .ag-send span { display: none; }
    .ag-send { padding: 0 12px; }
}

/* ==========================================================================
   提示词工坊 /prompt
   --------------------------------------------------------------------------
   一页两个能力（生成提示词 / 图片反解），用 tab 切；两块共用同一套卡片、
   结果块与按钮样式，所以类名统一走 pw- 前缀。
   手机端 .app-main 已经有 16px 内边距和底部导航避让，这里只限宽居中，
   不再自己加 padding-bottom，否则底部会多出一段空白。
   ========================================================================== */
/* 批次72（业主 10-12：「目前左边的所有栏目都改一样宽，不管是图片、文字还是什么内容，
   都统一排版」）：这一层原来把页面顶成 900px 的窄列，比首页内容（1920 屏实测 1649）窄一大截。
   页面级宽度全站只由本文件批次72 那一条规则决定，页面自己不许再限宽 —— 整条删掉。
   正文可读性靠段内的文字列宽（如 .home-sub/.hub-sub 的 640）保证，不靠把整页收窄。 */
.pw-shell { margin: 0 auto; }

.pw-head { text-align: center; padding: 22px 0 4px; }

.pw-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-fg);
    font-size: 12px;
    font-weight: 600;
}

.pw-title {
    margin: 14px 0 10px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.32;
}

.pw-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary-fg) 0%, var(--accent-fg) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pw-sub {
    max-width: 560px;
    margin: 0 auto;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--gray-600);
}

.pw-closed {
    margin-top: 22px;
    padding: 44px 20px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--gray-200);
    border-radius: 16px;
    color: var(--gray-600);
    font-size: 14px;
    line-height: 2.1;
}

.pw-closed i { font-size: 26px; display: block; margin-bottom: 6px; color: var(--primary-fg); }

/* ---------- tab ---------- */
.pw-tabs {
    display: flex;
    gap: 6px;
    margin: 20px auto 0;
    padding: 4px;
    max-width: 340px;
    background: var(--gray-100);
    border-radius: 999px;
}

.pw-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--gray-600);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.pw-tab.active { background: var(--surface); color: var(--primary-fg); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

.pw-panel { margin-top: 18px; }

/* ---------- 卡片与输入 ---------- */
.pw-card {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.pw-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-800);
}

.pw-card > textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-50);
    font-size: 14px;
    line-height: 1.75;
    color: var(--gray-800);
    resize: vertical;
}

.pw-card > textarea:focus {
    outline: none;
    border-color: var(--primary-fg);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}

.pw-card > textarea::placeholder { color: var(--text-placeholder); }

/* ---------- 模型开关 ---------- */
.pw-models {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.pw-models-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gray-600);
}

.pw-model {
    padding: 6px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--surface);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-600);
}

.pw-model:hover { border-color: var(--primary-fg); color: var(--primary-fg); }

.pw-model.active {
    border-color: var(--primary-fg);
    background: var(--primary-light);
    color: var(--primary-fg);
}

/* ---------- 示例与底部操作条 ---------- */
.pw-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.pw-chip {
    padding: 5px 12px;
    border: 1px dashed var(--gray-200);
    border-radius: 999px;
    background: var(--surface);
    font-size: 12px;
    color: var(--gray-600);
}

.pw-chip:hover { border-color: var(--primary-fg); border-style: solid; color: var(--primary-fg); }

.pw-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.pw-bar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* 这一批次要文字原来写死 #94a3b8：亮色玻璃底 rgb(244) 上实测 2.33~2.53，暗色 3.02，
   两档都破 4.5。换回 --gray-600（body.wg-anim 上已按视频最坏帧写死亮 #4b5563 / 暗 #c3c3c9） */
.pw-count, .pw-tip-sm { font-size: 12px; color: var(--gray-600); }

.pw-cost {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
}

.pw-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}

.pw-btn:hover:not(:disabled) { background: var(--primary-dark); }
.pw-btn:disabled { opacity: .45; cursor: not-allowed; }
.pw-btn.sm { padding: 8px 16px; font-size: 13px; }

.pw-btn.ghost {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.pw-btn.ghost:hover:not(:disabled) { border-color: var(--primary-fg); color: var(--primary-fg); background: var(--surface); }

.pw-btn.loading i { animation: pwSpin .9s linear infinite; }

@keyframes pwSpin { to { transform: rotate(360deg); } }

/* ---------- 图片拖拽区 ---------- */
.pw-drop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    padding: 14px;
    border: 1px dashed var(--gray-200);
    border-radius: 14px;
    background: var(--gray-50);
    cursor: pointer;
    text-align: center;
}

.pw-drop:hover, .pw-drop.over { border-color: var(--primary-fg); background: var(--primary-light); }

.pw-drop-empty { color: var(--gray-600); }
.pw-drop-empty i { font-size: 30px; color: var(--primary-fg); display: block; margin-bottom: 8px; }
.pw-drop-empty p { margin: 0 0 4px; font-size: 13.5px; font-weight: 600; }
.pw-drop-empty span { font-size: 12px; color: var(--gray-600); }

/* 图片一律 contain 显示在浅灰底里，不裁切：用户要确认 AI 看的是不是整张图 */
.pw-drop-img {
    max-width: 100%;
    max-height: 340px;
    border-radius: 10px;
    object-fit: contain;
    background: #f1f5f9;
}

.pw-drop.loading::after {
    content: '上传中…';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .78);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    /* 罩子是固定白透底，字色跟主题翻会在暗色下白压白；钉死深灰两档都读得清 */
    color: #334155;
}

/* ---------- 结果 ---------- */
.pw-result {
    margin-top: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
}

.pw-res-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.pw-res-head-l b { display: block; font-size: 15px; color: var(--gray-800); }

.pw-res-meta { font-size: 12px; color: var(--gray-600); }

.pw-mini {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--surface);
    font-size: 12px;
    color: var(--gray-600);
    white-space: nowrap;
}

.pw-mini:hover { border-color: var(--primary-fg); color: var(--primary-fg); }

.pw-block { margin-top: 14px; }

.pw-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.pw-block-head b { font-size: 13px; color: var(--gray-800); }

.pw-block-body {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--gray-800);
    white-space: pre-wrap;
    word-break: break-word;
}

.pw-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.pw-meta-item {
    padding: 10px 12px;
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    background: var(--gray-50);
}

.pw-meta-item > span { display: block; margin-bottom: 4px; font-size: 12px; color: var(--gray-600); }
.pw-meta-item b { font-size: 13px; color: var(--gray-800); }

.pw-kws { display: flex; flex-wrap: wrap; gap: 6px; }

.pw-kws em {
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-fg);
    font-size: 12px;
    font-style: normal;
}

.pw-tips {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--amber-soft);
    color: #92400e;
    font-size: 12.5px;
    line-height: 1.75;
}

.pw-tips i { margin-right: 5px; }

.pw-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.pw-subject {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary-fg);
    font-size: 13px;
    line-height: 1.7;
}

.pw-subject span { margin-right: 6px; font-weight: 700; }

.pw-ana-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.pw-ana {
    padding: 12px;
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    background: var(--gray-50);
}

.pw-ana > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary-fg);
}

.pw-ana p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--gray-600); }

/* ---------- 平板及以上 ---------- */
@media (min-width: 768px) {
    .pw-title { font-size: 31px; }
    .pw-card { padding: 20px; }
    .pw-result { padding: 20px; }
    .pw-drop { min-height: 230px; }
}

/* ---------- 极窄屏 (≤400px)：操作条改成竖排，按钮不会被挤成两行 ---------- */
@media (max-width: 400px) {
    .pw-head { padding-top: 14px; }
    .pw-title { font-size: 22px; }
    .pw-bar { flex-direction: column; align-items: stretch; }
    .pw-bar-right { margin-left: 0; justify-content: space-between; }
    .pw-btn { flex: 1; justify-content: center; }
}

/* ==========================================================================
   帮助中心 / 用户协议 / 隐私政策（hp-）
   --------------------------------------------------------------------------
   三个页面共用一套。法律文件是长文，排版的第一要求是「一行别太长」：
   桌面端把正文宽度压在合适范围，眼睛回扫下一行时才不会串行。
   手机端侧栏卡片挪到问答下面，而不是塞成两列把字挤成竖条。
   ========================================================================== */

/* 批次72：删掉 max-width:1120px —— 页面级宽度全站统一由批次72 那一条规则决定（见 .pw-shell 处说明） */
.hp-shell { width: 100%; margin: 0 auto; padding: 16px 12px 32px; }

.hp-head { margin-bottom: 18px; }

.hp-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: 999px;
    background: var(--primary-light); color: var(--primary-fg);
    font-size: 12px; font-weight: 600;
}

.hp-title { margin: 10px 0 6px; font-size: 23px; font-weight: 700; color: var(--gray-800); line-height: 1.35; }
.hp-sub { margin: 0; font-size: 13px; color: var(--gray-600); line-height: 1.7; }

.hp-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }

.hp-main { min-width: 0; }
.hp-side { min-width: 0; display: flex; flex-direction: column; gap: 12px; }

/* ---------- 常见问题 ---------- */
.hp-faq { list-style: none; margin: 0; padding: 0; }

.hp-faq-item {
    background: var(--surface); border: 1px solid var(--gray-200); border-radius: 12px;
    padding: 14px 15px; margin-bottom: 10px;
}

.hp-faq-q { display: flex; align-items: flex-start; gap: 9px; font-size: 15px; font-weight: 600; color: var(--gray-800); line-height: 1.55; }

.hp-faq-no {
    flex: 0 0 auto; width: 21px; height: 21px; margin-top: 1px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--primary); color: var(--primary-foreground);
    font-size: 12px; font-weight: 700; line-height: 1;
}

.hp-faq-a { margin-top: 7px; padding-left: 30px; font-size: 13.5px; color: var(--gray-600); line-height: 1.85; }

/* ---------- 「还没有解决？」 ---------- */
.hp-stuck {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--primary-light); border: 1px solid var(--primary-border); border-radius: 12px;
    padding: 15px 16px; margin-top: 4px;
}

.hp-stuck-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hp-stuck-txt strong { font-size: 14.5px; color: var(--gray-800); }
.hp-stuck-txt span { font-size: 12.5px; color: var(--gray-600); line-height: 1.65; }

.hp-stuck-btn {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 9px;
    background: var(--primary); color: var(--primary-foreground); font-size: 13.5px; font-weight: 600;
    text-decoration: none; white-space: nowrap;
}
.hp-stuck-btn:hover { background: var(--primary-dark); color: var(--primary-foreground); }

/* ---------- 侧栏卡片 ---------- */
.hp-card { background: var(--surface); border: 1px solid var(--gray-200); border-radius: 12px; padding: 15px; }

.hp-card-title {
    display: flex; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 700; color: var(--gray-800);
    padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--gray-100);
}
.hp-card-title i { color: var(--primary-fg); }

.hp-contact { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--gray-800); line-height: 1.8; word-break: break-all; }
.hp-tip { margin: 0; font-size: 12px; color: var(--gray-600); line-height: 1.7; }

.hp-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 11px; padding: 8px 12px; border-radius: 9px;
    background: var(--primary-light); color: var(--primary-fg);
    font-size: 13px; font-weight: 600; text-decoration: none;
}
.hp-btn:hover { background: var(--primary-light); color: var(--primary-dark-fg); }

.hp-link {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 2px; font-size: 13.5px; color: var(--gray-800); text-decoration: none;
    border-bottom: 1px solid var(--gray-100);
}
.hp-link:last-of-type { border-bottom: 0; }
.hp-link i { font-size: 12px; color: var(--gray-600); opacity: .55; }
.hp-link:hover { color: var(--primary-fg); }
.hp-link:hover i { color: var(--primary-fg); opacity: 1; }

.hp-empty { padding: 40px 16px; text-align: center; color: var(--gray-600); background: var(--surface); border: 1px dashed var(--gray-200); border-radius: 12px; }
.hp-empty i { font-size: 30px; opacity: .4; }
.hp-empty p { margin: 10px 0 0; font-size: 13.5px; }

/* ---------- 法律文件正文 ---------- */
.hp-doctabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

.hp-doctab {
    padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
    background: var(--surface); border: 1px solid var(--gray-200); color: var(--gray-600); text-decoration: none;
}
a.hp-doctab:hover { border-color: var(--primary-border); color: var(--primary-fg); }
.hp-doctab.active { background: var(--primary); border-color: var(--primary-fg); color: var(--primary-foreground); cursor: default; }

.hp-doc {
    background: var(--surface); border: 1px solid var(--gray-200); border-radius: 12px;
    padding: 20px 18px; font-size: 14px; line-height: 1.95; color: var(--gray-800);
}

/* 正文里的标签来自后台可编辑的 HTML，样式必须在这儿兜住：
   不写的话管理员存进去的 h2 会用浏览器默认字号，比页面标题还大 */
.hp-doc h2 { margin: 26px 0 10px; font-size: 17px; font-weight: 700; color: var(--gray-800); line-height: 1.5; }
.hp-doc h3 { margin: 18px 0 8px; font-size: 15px; font-weight: 700; color: var(--gray-800); line-height: 1.5; }
.hp-doc h4 { margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: var(--gray-800); }
.hp-doc h2:first-child, .hp-doc h3:first-child, .hp-doc p:first-child { margin-top: 0; }
.hp-doc p { margin: 0 0 12px; }
.hp-doc ul, .hp-doc ol { margin: 0 0 12px; padding-left: 22px; }
.hp-doc li { margin-bottom: 6px; }
.hp-doc strong { font-weight: 700; color: var(--gray-800); }
.hp-doc a { color: var(--primary-fg); text-decoration: underline; }
.hp-doc blockquote {
    margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--primary);
    background: var(--gray-50); border-radius: 0 8px 8px 0; color: var(--gray-600); font-size: 13.5px;
}
.hp-doc hr { margin: 22px 0; border: 0; border-top: 1px solid var(--gray-200); }

.hp-docfoot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-top: 14px; padding: 14px 16px; border-radius: 12px;
    background: var(--gray-50); border: 1px solid var(--gray-200);
    font-size: 12.5px; color: var(--gray-600);
}
.hp-docfoot a { color: var(--primary-fg); font-weight: 600; text-decoration: none; white-space: nowrap; }
.hp-docfoot a:hover { text-decoration: underline; }

/* ---------- 平板及以上 ---------- */
@media (min-width: 768px) {
    .hp-shell { padding: 24px 20px 40px; }
    .hp-title { font-size: 27px; }
    .hp-doc { padding: 28px 30px; font-size: 14.5px; }
    .hp-faq-item { padding: 17px 19px; }
}

/* ---------- 桌面：正文 + 侧栏两列 ---------- */
@media (min-width: 992px) {
    .hp-grid { grid-template-columns: minmax(0, 1fr) 296px; gap: 20px; }
    /* 侧栏跟着滚：问答很长时联系方式一直看得见 */
    .hp-side { position: sticky; top: calc(var(--navbar-height) + 16px); }
}

/* ---------- 极窄屏 (≤400px) ---------- */
@media (max-width: 400px) {
    .hp-shell { padding: 12px 9px 26px; }
    .hp-title { font-size: 20px; }
    .hp-faq-a { padding-left: 0; }
    .hp-doc { padding: 16px 14px; font-size: 13.5px; }
    .hp-doc ul, .hp-doc ol { padding-left: 18px; }
    /* 「还没有解决？」改成竖排，横排时按钮会把左边文字挤成三四行 */
    .hp-stuck { flex-direction: column; align-items: stretch; text-align: center; }
    .hp-stuck-btn { justify-content: center; }
    .hp-docfoot { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   站点公告弹窗（view/layout/main.php + public/js/app.js）
   排版照 051785 版式基准：顶部一条渐变色 hero + 图标托，下面徽标 / 标题 / 正文 / 按钮
   ========================================================================== */
.ntc-modal .modal-dialog { max-width: 520px; margin: 1rem auto; }

.ntc-panel {
    position: relative; border: 0; border-radius: 16px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
    /* Bootstrap 的 modal-dialog-scrollable 会把 .modal-content 卡在视口高度内，
       但它只让 .modal-body 滚动，而这个弹窗没有 .modal-body。
       不自己把滚动接上，长公告就会被上面的 overflow:hidden 拦腰裁掉：
       正文停在半句话上，「今天不再提示」按钮被顶到屏幕外，整个弹窗哪都滚不动 */
    display: flex; flex-direction: column;
    /* 面板底色必须自己给：Bootstrap 的 .modal-content 走 --bs-modal-bg → --bs-body-bg，
       两档主题都是 #fff，而 .ntc-title / .ntc-text 的字色跟着主题翻（暗色近白）。
       靶场实测暗色下标题 1.04、正文 1.75 —— 整块公告在白底上等于没印。
       跟 .tpl-modal .modal-content 同一个口径，用 --card 实底 + 配套前景色 */
    background: var(--card);
    color: var(--card-foreground);
}

.ntc-hero {
    height: 112px; display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 52%, #fffbeb 100%);
}

.ntc-hero-ico {
    width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
    /* hero 带是固定浅色渐变，图标字色不能跟主题翻成近白 */
    border-radius: 16px; background: rgba(255, 255, 255, .72); color: #18181b; font-size: 26px;
}

.ntc-close {
    position: absolute; right: 16px; top: 16px; z-index: 10;
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92);
    color: #475569; font-size: 14px; cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12); transition: background .15s, color .15s;
}
.ntc-close:hover { background: var(--surface); color: var(--gray-800); }

.ntc-inner {
    padding: 24px;
    /* min-height:0 是关键：flex 子项默认 min-height:auto，不肯缩到内容以下，
       少了这一句 .ntc-text 的 overflow 永远轮不到生效 */
    flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
}

.ntc-badge {
    display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px;
    padding: 4px 12px; border-radius: 999px; flex: 0 0 auto;
    /* .ntc-inner 变成纵向 flex 之后子项默认被拉满整行，
       不加这一句徽标药丸会从「包住文字」变成「横贯整个弹窗」 */
    align-self: flex-start;
    background: var(--primary-light); color: var(--primary-fg);
    font-size: 12px; font-weight: 600; line-height: 1.6;
}

.ntc-title {
    margin: 0; font-size: 20px; font-weight: 600; line-height: 1.45; flex: 0 0 auto;
    color: var(--gray-800); word-break: break-word;
}

/* 正文一行一个 <p>，服务端已经转义过，这里只管排版 */
.ntc-text {
    margin-top: 14px; font-size: 14px; line-height: 1.85; color: var(--gray-600);
    /* 只有正文滚：徽标、标题和下面的按钮都钉住，长公告也能一眼看到怎么关 */
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
}
.ntc-text .ntc-line { margin: 0 0 10px; word-break: break-word; }
.ntc-text .ntc-line:last-child { margin-bottom: 0; }

.ntc-actions {
    margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
    flex: 0 0 auto;
}
.ntc-ok { min-width: 132px; font-weight: 500; }

/* ---------- 手机 / 微信内 ---------- */
@media (max-width: 575.98px) {
    .ntc-modal .modal-dialog { margin: .5rem; }
    .ntc-panel { border-radius: 14px; }
    .ntc-hero { height: 88px; }
    .ntc-hero-ico { width: 46px; height: 46px; border-radius: 14px; font-size: 22px; }
    .ntc-close { right: 10px; top: 10px; width: 32px; height: 32px; font-size: 13px; }
    .ntc-inner { padding: 18px 16px 20px; }
    .ntc-title { font-size: 17px; }
    .ntc-text { margin-top: 12px; font-size: 13.5px; line-height: 1.8; }
    /* 按钮整行：拇指够得着，也不会和右上角关闭钮挤在一起 */
    .ntc-actions { margin-top: 18px; }
    .ntc-actions .btn { flex: 1 1 100%; }
    .ntc-ok { min-width: 0; }
}

/* ---------- 极窄屏 (≤400px) ---------- */
@media (max-width: 400px) {
    .ntc-hero { height: 74px; }
    .ntc-hero-ico { width: 42px; height: 42px; font-size: 20px; }
    .ntc-inner { padding: 16px 13px 18px; }
    .ntc-badge { margin-bottom: 10px; padding: 3px 10px; }
    .ntc-title { font-size: 16px; }
    .ntc-text { font-size: 13px; }
}

/* ==========================================================================
   自定义尺寸试算（批次18-B）
   --------------------------------------------------------------------------
   .wb-sizecalc 是参数面板里「画面比例」下方那个打开试算弹窗的小按钮；
   .sc-* 是试算弹窗本体。弹窗自己搭遮罩，不依赖 Bootstrap modal JS，
   和灯箱（.lightbox）一个路子：默认 display:none，加 .open 才显示。
   ========================================================================== */
.wb-sizecalc {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-fg);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s;
}
.wb-sizecalc:hover { background: var(--primary-light); color: var(--primary-dark-fg); }
.wb-sizecalc i { font-size: 13px; }

.sc-mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1080;
    padding: 16px;
    background: rgba(15, 23, 42, 0.55);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.sc-mask.open { display: block; }

.sc-dialog {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 6vh auto;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.sc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid var(--gray-100);
}
.sc-title { font-size: 15px; font-weight: 700; color: var(--gray-800); }
.sc-title i { color: var(--primary-fg); margin-right: 6px; }
.sc-close {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: var(--gray-100);
    border-radius: 50%; color: var(--gray-600);
    cursor: pointer; font-size: 13px;
}
.sc-close:hover { background: var(--gray-200); color: var(--gray-800); }

.sc-body { padding: 16px 18px 20px; }
.sc-lead { font-size: 12.5px; line-height: 1.7; color: var(--gray-600); margin: 0 0 14px; }

.sc-inputs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-field {
    display: flex; align-items: center; gap: 6px;
    flex: 1 1 120px; min-width: 0;
    padding: 7px 11px;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px; background: var(--surface);
}
.sc-field:focus-within { border-color: var(--primary-fg); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); }
.sc-field span { font-size: 12px; color: var(--gray-600); flex-shrink: 0; }
.sc-field input {
    width: 100%; min-width: 0; border: none; outline: none;
    font-size: 14px; font-weight: 600; color: var(--gray-800); background: transparent;
}
/* 去掉 number 输入框的上下箭头，手机端更干净 */
.sc-field input::-webkit-outer-spin-button,
.sc-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sc-field input[type=number] { -moz-appearance: textfield; }
.sc-field i { font-size: 11px; color: var(--gray-600); font-style: normal; flex-shrink: 0; }
.sc-x { color: var(--gray-600); font-size: 14px; flex-shrink: 0; }
.sc-go {
    flex: 0 0 auto;
    padding: 9px 18px; font-size: 13px; font-weight: 700;
    color: var(--primary-foreground); background: var(--primary);
    border: none; border-radius: 10px; cursor: pointer; transition: background 0.18s;
}
.sc-go:hover:not(:disabled) { background: var(--primary-dark); }
.sc-go:disabled { opacity: 0.6; cursor: default; }

.sc-result { margin-top: 16px; }
.sc-loading, .sc-empty { font-size: 13px; color: var(--gray-600); padding: 10px 0; }
.sc-empty { color: var(--danger); }

.sc-match { font-size: 13px; color: var(--gray-600); margin-bottom: 10px; }
.sc-match b { color: var(--primary-dark-fg); font-size: 14px; }
.sc-aspect { margin-left: 8px; color: var(--gray-600); font-size: 12px; }

.sc-presets { display: flex; flex-direction: column; gap: 8px; }
.sc-preset {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 13px;
    border: 1.5px solid var(--gray-200); border-radius: 12px; background: var(--surface);
}
.sc-preset.is-rec { border-color: var(--primary-fg); background: var(--primary-light); }
.sc-preset-main { min-width: 0; }
.sc-preset-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-preset-top b { font-size: 15px; color: var(--gray-800); }
.sc-preset-res { font-size: 11.5px; color: var(--gray-600); }
.sc-rec-badge {
    font-size: 10.5px; font-weight: 700; color: var(--primary-foreground);
    background: var(--primary); border-radius: 999px; padding: 1px 8px;
}
.sc-preset-sub { font-size: 11.5px; color: var(--gray-600); margin-top: 3px; }
.sc-crop { font-size: 11.5px; color: var(--warning); margin-top: 4px; }
.sc-crop i { margin-right: 3px; }
.sc-use {
    flex: 0 0 auto;
    padding: 7px 14px; font-size: 12.5px; font-weight: 700;
    color: var(--primary-fg); background: var(--surface);
    border: 1.5px solid var(--primary); border-radius: 999px; cursor: pointer; transition: all 0.18s;
}
.sc-use:hover { background: var(--primary); color: var(--primary-foreground); }
.sc-use-disabled { flex: 0 0 auto; font-size: 12px; color: var(--gray-600); }

/* 手机端：宽高输入和试算按钮各占一行，拇指够得着也不挤 */
@media (max-width: 480px) {
    .sc-dialog { margin: 3vh auto; }
    .sc-inputs { gap: 7px; }
    .sc-field { flex: 1 1 100%; }
    .sc-x { display: none; }
    .sc-go { flex: 1 1 100%; }
    .sc-preset { flex-direction: column; align-items: stretch; }
    .sc-use, .sc-use-disabled { align-self: flex-start; }
}

/* ==========================================================================
   提示词模板库（批次18-C）
   --------------------------------------------------------------------------
   复用尺寸试算那套 .sc-mask / .sc-dialog / .sc-head / .sc-title / .sc-close /
   .sc-body 外壳（自建遮罩、加 .open 显示，不依赖 Bootstrap modal JS），
   这里只补模板库特有的：更宽的弹窗、可滚动的卡片网格、标签页、分组筛选、
   卡片（提示词两行截断 + 建议档位小标签）、底部「存为我的模板」。
   ========================================================================== */
.tpl-dialog {
    max-width: 560px;
    margin: 5vh auto;
    display: flex;
    flex-direction: column;
    max-height: 88vh;
}
.tpl-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.tpl-tabs { display: flex; gap: 6px; padding: 12px 16px 0; }
.tpl-tab {
    padding: 7px 14px; font-size: 13px; font-weight: 600;
    color: var(--gray-600); background: var(--gray-100);
    border: none; border-radius: 999px; cursor: pointer; transition: all 0.18s;
}
.tpl-tab:hover { color: var(--gray-800); }
.tpl-tab.active { color: var(--primary-foreground); background: var(--primary); }
.tpl-tab-count {
    display: inline-block; margin-left: 5px; min-width: 16px; padding: 0 5px;
    font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center;
    color: var(--primary-fg); background: var(--surface); border-radius: 999px;
}
.tpl-tab-count:empty { display: none; }

.tpl-catbar { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px 0; }
.tpl-cat-chip {
    padding: 5px 12px; font-size: 12px; font-weight: 600;
    color: var(--gray-600); background: var(--surface);
    border: 1.5px solid var(--gray-200); border-radius: 999px; cursor: pointer; transition: all 0.18s;
}
.tpl-cat-chip:hover { border-color: var(--primary-border); color: var(--primary-fg); }
.tpl-cat-chip.active { color: var(--primary-foreground); background: var(--primary); border-color: var(--primary-fg); }

.tpl-list {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    padding: 12px 16px 16px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px; align-content: start;
}

.tpl-card {
    display: flex; flex-direction: column; gap: 8px;
    padding: 12px 13px;
    border: 1.5px solid var(--gray-200); border-radius: 12px; background: var(--surface);
    transition: border-color 0.18s, box-shadow 0.18s;
}
.tpl-card:hover { border-color: var(--primary-border); box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.08); }
.tpl-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tpl-card-title {
    font-size: 13.5px; font-weight: 700; color: var(--gray-800);
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tpl-card-cat {
    flex: 0 0 auto; font-size: 10.5px; font-weight: 600;
    color: var(--primary-fg); background: var(--primary-light);
    border-radius: 999px; padding: 1px 8px;
}
.tpl-card-prompt {
    font-size: 12px; line-height: 1.6; color: var(--gray-600);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 38px;
}
.tpl-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tpl-chip { font-size: 10.5px; color: var(--gray-600); background: var(--gray-100); border-radius: 6px; padding: 1px 7px; }
.tpl-card-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.tpl-apply {
    flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 7px 12px; font-size: 12.5px; font-weight: 700;
    color: var(--primary-foreground); background: var(--primary); border: none; border-radius: 9px; cursor: pointer; transition: background 0.18s;
}
.tpl-apply:hover { background: var(--primary-dark); }
.tpl-del {
    flex: 0 0 auto; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-600); background: var(--gray-100);
    border: none; border-radius: 9px; cursor: pointer; font-size: 13px; transition: all 0.18s;
}
.tpl-del:hover { color: #fff; background: var(--danger); }

.tpl-loading, .tpl-empty {
    grid-column: 1 / -1; text-align: center;
    color: var(--gray-600); font-size: 13px; padding: 30px 16px;
}
.tpl-empty i { font-size: 30px; color: var(--muted-icon); display: block; margin-bottom: 8px; }
.tpl-empty p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.7; color: var(--gray-600); }

.tpl-foot { padding: 12px 16px; border-top: 1px solid var(--gray-100); background: var(--surface); }
.tpl-save {
    width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 14px; font-size: 13px; font-weight: 700;
    color: var(--primary-fg); background: var(--primary-light);
    border: 1.5px solid var(--primary-border); border-radius: 10px; cursor: pointer; transition: all 0.18s;
}
.tpl-save:hover:not(:disabled) { background: var(--primary-light); color: var(--primary-dark-fg); }
.tpl-save:disabled { opacity: 0.55; cursor: default; }

@media (max-width: 480px) {
    .tpl-dialog { margin: 3vh auto; max-height: 90vh; }
    .tpl-list { grid-template-columns: 1fr; padding: 10px 13px 14px; }
    .tpl-tabs, .tpl-catbar { padding-left: 13px; padding-right: 13px; }
    .tpl-foot { padding: 10px 13px; }
}

/* 底部标签条移除后，浮动客服四端都贴右下角 24px */
.app-float-service { bottom: 24px; }

/* ==========================================================================
   批次21-A：精选案例页照 业主指定的版式基准 1:1
   （居中渐变标题 + 分类药丸条 + CSS 多列瀑布流 + 卡片悬停动作按钮 + 加载/收尾状态）
   颜色全部走主题令牌，后台换主色、暗色模式自动跟随
   ========================================================================== */
.article-hero { text-align: center; margin: 0 auto 14px; }
.article-hero-inner { display: flex; align-items: center; justify-content: center; }
.article-hero-text h1 {
    margin: 0 0 4px; font-size: 28px; font-weight: 850; letter-spacing: -0.5px; line-height: 1.2;
    background: linear-gradient(135deg, var(--grad-from-fg), var(--grad-to-fg));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.article-hero-text p { margin: 0; font-size: 14px; color: var(--gray-600); line-height: 1.6; }
.cases-filter-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 18px 0 20px; border-bottom: 1px solid var(--gray-200); margin-bottom: 24px; }
.article-categories-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.article-cat-pill { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px;
    border-radius: 24px; font-size: 14px; font-weight: 500; color: var(--gray-600);
    background: var(--gray-50); border: 1px solid transparent; cursor: pointer;
    transition: all 0.2s ease; white-space: nowrap; }
.article-cat-pill:hover { background: var(--surface); border-color: var(--gray-200); color: var(--gray-800); }
.article-cat-pill.active { color: var(--primary-foreground); border-color: transparent;
    background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.28); }
.cases-search { margin-left: auto; width: 240px; }
.cases-search .form-control { border-radius: 20px; padding-left: 16px; }
.cases-search .btn { border-radius: 0 20px 20px 0; }
/* 外层面板分两套，别再当成一套：
   资讯信息页（.article-panel）= 版式基准的 .card，半透明白面板；
   精选案例页 / 生成记录页（.cases-panel / .records-panel）= 版式基准明确刷成全透明的那两页。
   批次21 就是因为把这两套当一套抄，才给案例流多套了一圈灰边框（批次23-B3 修掉）。 */
/* 资讯信息页的外层面板：版式基准的 .card 是半透明白 + blur(12px) saturate(1.08)，边框 rgba(228,231,236,.72)、
   不带阴影，这里逐值对齐（此前边框写的是 var(--gray-200)=#e5e7eb 实色，版式基准那值是 72% 透明度，更轻）。 */
.article-panel { padding: 18px; border: 1px solid rgba(228,231,236,0.72); border-radius: 16px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(12px) saturate(1.08); -webkit-backdrop-filter: blur(12px) saturate(1.08); }
/* 批次31-D 删掉了 html[data-theme="dark"] .article-panel { background/border-color }：
   它是 (0,2,1) 优先级，会压过文末水滴玻璃家族的 (0,1,0)，暗色下这块面板就不是玻璃了。
   亮暗两态现在统一由 --module-* 令牌负责，不需要在这里各写一份。 */
/* 批次23-B3：精选案例页 / 生成记录页的外层面板，版式基准是**明确刷成全透明**的——它自己的注释就写着
   「cases / records 页面外层无背景无间距无阴影」，规则原文：
   body.page-cases .grid > .card, body.page-records .grid > .card
   { background: transparent !important; border: none !important; padding: 0 !important; box-shadow: none !important; }
   我批次21 时把它当成和资讯页同一套半透明面板按，抄反了，于是案例流外面凭空多出一圈灰边框 + 18px 留白，
   业主原话「同样是显示五行，你看人家没有边框线，看着多舒服，就像按钮模块一样」。这里按版式基准改回全透明。
   透明就是透明、不分亮暗，所以这条不再需要暗色变体。 */
.cases-panel,
.records-panel { padding: 0; border: none; border-radius: 16px;
    background: transparent; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none; }
.cases-grid-section { padding: 0; border-radius: 16px; }
/* 批次76-A：与 /records、首页两道墙同一套口径改行优先等高网格（业主 10-12「从左到右」+
   「既保证整个图片完全显示出来，又对齐」）。原来 column-count 是列优先＝从上到下 */
.cases-waterfall { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.waterfall-card { position: relative; margin-bottom: 0; background: var(--surface);
    border: none; box-shadow: none;
    border-radius: 16px; overflow: hidden;
    animation: case-fade-up 0.6s cubic-bezier(0.22,1,0.36,1);
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1); }
/* 这里原先有一条 html:not([data-theme="dark"]) .waterfall-card { background: rgba(255,255,255,.6) }，
   批次31-D 删掉：它是 (0,2,1) 优先级，会压过文末水滴玻璃家族的 (0,1,0)，卡片就成了唯一不透玻璃的模块。
   家族亮色值 rgba(255,255,255,.62) 与它本来就是同一个意思（版式基准的 60% 白），暗色走 --module-bg。 */
/* 起始透明度写在 keyframes 里而不是元素上：万一浏览器关了动画，卡片也只是不淡入，不会整张看不见 */
@keyframes case-fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.waterfall-card:hover { transform: translateY(-4px); z-index: 5; }
.waterfall-image { position: relative; overflow: hidden; background: var(--gray-100); cursor: pointer; line-height: 0;
    /* 批次76-A：1:1 定框，图片 contain 整张显示、留白由格子底色接住（暗色自动翻深） */
    aspect-ratio: 1 / 1; }
.waterfall-image::before { content: ''; display: block; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03) 0%, rgba(var(--primary-rgb), 0.06) 50%, rgba(var(--primary-rgb), 0.03) 100%);
    pointer-events: none; opacity: 0; transition: opacity 0.4s ease; }
.waterfall-card:hover .waterfall-image::before { opacity: 1; }
.waterfall-image img { width: 100%; height: 100%; object-fit: contain; display: block;
    transition: transform 0.7s cubic-bezier(0.22,1,0.36,1), filter 0.7s ease; filter: brightness(0.96); }
.waterfall-card:hover .waterfall-image img { transform: scale(1.06); filter: brightness(1); }
.waterfall-gradient { position: absolute; inset: auto 0 0 0; height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.15) 45%, transparent 100%);
    pointer-events: none; z-index: 2; opacity: 0; transition: opacity 0.4s ease; }
.waterfall-card:hover .waterfall-gradient { opacity: 1; }
.waterfall-accent { position: absolute; inset: auto 0 0 0; height: 3px;
    background: linear-gradient(90deg, var(--grad-from), var(--grad-to)); z-index: 3;
    transform: scaleX(0); transform-origin: left; transition: transform 0.45s cubic-bezier(0.22,1,0.36,1); }
.waterfall-card:hover .waterfall-accent { transform: scaleX(1); }
.waterfall-image-actions { position: absolute; bottom: 0; left: 0; right: 0; padding: 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.5)); display: flex;
    justify-content: center; gap: 6px; z-index: 4; }
/* 批次76-B：底色是写死的近白（两个主题都一样），字色却用了会翻面的 --primary-emphasis
   （暗色下 = #ffffff）→ 暗色下白底白字，1920 实测对比度 1.0，「复制」按钮整个看不见。
   固定浅底就必须配固定深字，成对写死，禁再用翻面令牌 */
.case-action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    padding: 6px 12px; border: none; border-radius: 14px; background: rgba(255,255,255,0.92);
    color: #18181b; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.25s ease;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.case-action-btn:hover { background: #fff; transform: scale(1.04); }
.case-action-btn:active { transform: scale(0.96); }
.case-action-btn-primary { background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
    color: var(--primary-foreground); box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2); }
.case-action-btn-primary:hover { box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.4); transform: translateY(-1px); }
.waterfall-body { padding: 14px 16px; }
.waterfall-prompt { font-size: 13px; line-height: 1.55; color: var(--gray-600); margin: 0 0 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.waterfall-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px;
    font-size: 12px; color: rgba(var(--primary-rgb), 0.55); margin-bottom: 6px; }
.waterfall-user { font-weight: 650; color: var(--gray-600); overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
.waterfall-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 置顶角标原本压在图片上（z-index:1），案例卡片的悬停遮罩是 2/3/4，不抬一层就被盖住看不见 */
.waterfall-image .wf-top { z-index: 5; }
.waterfall-loader { display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 28px 20px 40px; color: rgba(var(--primary-rgb), 0.6); font-size: 14px; font-weight: 600; }
.waterfall-spinner { width: 22px; height: 22px; border: 2.5px solid var(--gray-200);
    border-top-color: var(--primary-fg); border-radius: 50%; animation: wf-spin 0.7s linear infinite; }
@keyframes wf-spin { to { transform: rotate(360deg); } }
.waterfall-end { display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 32px 20px 48px; color: rgba(var(--primary-rgb), 0.55); }
.waterfall-end i { font-size: 34px; color: var(--muted-icon); }
.waterfall-end p { font-size: 14px; font-weight: 600; margin: 0; }
html[data-theme="dark"] .waterfall-end i { color: rgba(255,255,255,0.2); }
/* 搜索框跟着主题走：Bootstrap 默认白底灰边，暗色模式下就是页面上一块刺眼的白。
   首页的 .feed-search 和案例页的 .cases-search 是同一份 partial 出来的，一起管 */
.feed-search .form-control,
.cases-search .form-control { background: var(--surface); border-color: var(--gray-200); color: var(--gray-800); }
.feed-search .form-control::placeholder,
.cases-search .form-control::placeholder { color: var(--gray-600); }
@media (max-width: 1024px) { .cases-waterfall { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 720px) {
    .article-hero-text h1 { font-size: 22px; }
    .cases-filter-bar { padding: 12px 0 16px; margin-bottom: 16px; gap: 10px; }
    .cases-search { margin-left: 0; width: 100%; }
    .cases-waterfall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .cases-panel, .records-panel { padding: 12px; border-radius: 12px; }
    .waterfall-card { margin-bottom: 14px; border-radius: 12px; }
    .waterfall-body { padding: 10px 12px; }
    .waterfall-prompt { font-size: 12px; }
    .waterfall-image-actions { padding: 6px; }
    .case-action-btn { padding: 5px 10px; font-size: 11px; }
    .case-action-btn span { display: none; }
}

/* ==========================================================================
   批次21-B：生成记录页照 业主指定的版式基准 1:1
   （等高卡片网格：上图下文；桌面 5 列 → 1180 以下 3 列 → 720 以下一行一张的横卡）
   颜色全部走主题令牌，后台换主色、暗色模式自动跟随
   ========================================================================== */
/* align-items:start 让每张卡片按自身内容定高，不被同一行最高的卡拉伸 */
/* 批次76-A（业主 2026-10-12 逐字）：「/records 这个显示排序有问题，应该从左到右」
   「首页的图片排版应该从左到右，而不是从上到下」「既保证整个图片完全显示出来，又对齐」。
   批次35 当时把这里从网格换成 column-count 瀑布流，是为了消掉「一行里三块空洞」；
   但多列天生是**列优先**——一列排满才排下一列（1920 实测前四张卡 x 全等 233，第四张才换列），
   业主看到的就是「从上到下」。行优先 + 完整显示 + 对齐三个要求只有一个解：
   **等高网格**：grid 天生从左到右，图片区固定 1:1 方框 + object-fit:contain 一个字不裁，
   格子底色接住留白（--gray-100，暗色自动翻深）。空洞从「卡片下方一大块」变成「方框内四周留白」，
   换来的是每行整齐对齐。三处墙（/records、首页两道墙、/inspiration）同一套口径，不再各排各的 */
.history-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; padding-bottom: 4px; }
/* 图片行改 auto：卡片高度跟着图片原始比例走，和精选案例页(/inspiration)一样整张完整展示，
   不再用固定 128px + object-fit:cover 把竖图裁掉头脚。原来的 height:254px 等高网格一并去掉 */
.history-list .record-card { display: grid; grid-template-rows: auto minmax(0, 1fr);
    /* 间距由网格 gap 统一给，卡片自己不再留 margin-bottom（原来那 14px 是瀑布流列内间距） */
    margin-bottom: 0;
    overflow: hidden; border: none; border-radius: 10px; padding: 0; background: rgba(255,255,255,0.6);
    color: inherit; cursor: pointer; text-align: left; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.22s cubic-bezier(0.22,1,0.36,1), box-shadow 0.22s ease, background-color 0.22s ease; }
.history-list .record-card:hover { background: rgba(255,255,255,0.75); transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(16,24,40,0.08); }
.history-list .record-card:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
html[data-theme="dark"] .history-list .record-card { background: rgba(255,255,255,0.04); }
html[data-theme="dark"] .history-list .record-card:hover { background: rgba(255,255,255,0.07); }
.record-image { display: grid; place-content: center; overflow: hidden; position: relative;
    background: var(--gray-100); color: var(--gray-600); font-weight: 750; font-size: 13px; text-align: center; }
.record-image img { width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.42s cubic-bezier(0.22,1,0.36,1); }
/* /records 与会员中心记录页：图片按原始比例整张显示（height:auto、不裁切），对齐精选案例页；
   没出图的占位卡用 min-height 撑出一个和原来 128px 相近的框，居中的状态文字不会塌成一条。
   agent 落地页用的是 .ag-history-list，不在这里的选择器内，尺寸不受影响 */
.history-list .record-image { aspect-ratio: 1 / 1; min-height: 0; }
.history-list .record-image img { height: 100%; object-fit: contain; }
.history-list .record-card:hover .record-image img { transform: scale(1.035); }
/* 批次76-C（业主 10-12：「前台和后台应该留存原始要修复的照片，以及修复后的照片」）：
   图生图记录在成品右下角挂一颗「原图」小格。后台作品管理本来就有参考图列，前台之前只画成品。
   小格自己 cover 裁切（它只是缩略引子，整张原图在灯箱里看），白描边压在成品图上才分得开；
   ::after 那条「原图」字签走实底深雾，亮暗两套主题下都读得出 */
.record-ref { position: absolute; right: 6px; bottom: 6px; width: 34%; aspect-ratio: 1 / 1;
    border-radius: 8px; overflow: hidden; border: 2px solid rgba(255,255,255,.92);
    box-shadow: 0 2px 8px rgba(0,0,0,.25); background: #fff; cursor: zoom-in; }
.record-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.record-ref::after { content: '原图'; position: absolute; left: 0; right: 0; bottom: 0;
    font-size: 10px; font-weight: 800; line-height: 1.5; text-align: center;
    color: #fff; background: rgba(15,23,42,.62); }
/* 必须写显式列：grid 的隐式列按 max-content 定宽，320px 窄屏下会比卡片正文格宽出近 50px，
   把整页撑出横向滚动。定成 minmax(0,1fr) 后子项各自靠省略号收缩 */
.record-body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 7px; padding: 10px; }
.record-meta { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    color: var(--gray-600); font-size: 11px; font-weight: 750; }
.record-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-meta span:first-child { color: var(--primary-fg); font-weight: 850; flex-shrink: 0; }
.record-body p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin: 0; overflow: hidden;
    color: var(--gray-600); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.record-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.record-foot time { min-width: 0; overflow: hidden; color: var(--gray-600); font-size: 12px;
    text-overflow: ellipsis; white-space: nowrap; }
.record-foot-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.record-remix, .record-delete { display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    min-height: 28px; border-radius: 6px; padding: 0 9px; font-size: 12px; font-weight: 800;
    white-space: nowrap; cursor: pointer; }
.record-remix { border: none; background: linear-gradient(135deg, var(--grad-from), var(--grad-to)); color: var(--primary-foreground); }
.record-remix:hover { filter: brightness(1.06); }
/* 版式基准这条是 #fbd38d 的浅琥珀描边 + 红字，--danger 是固定色不跟主题走，
   所以描边直接按 danger 的 RGB 调透明度，视觉上同一档「弱化的危险操作」 */
.record-delete { border: 1px solid rgba(239, 68, 68, 0.32); background: var(--surface); color: var(--danger); }
.record-delete:hover { background: var(--danger-soft); }
/* 公开/私有是我们自己加的一档（版式基准没有）：只给图标不给文字，
   底行本来就窄，塞第三个文字按钮会把时间挤没 */
.record-public { display: inline-flex; align-items: center; justify-content: center; width: 28px; min-height: 28px;
    padding: 0; border: 1px solid var(--gray-200); border-radius: 6px; background: var(--surface);
    color: var(--gray-600); font-size: 13px; cursor: pointer; }
.record-public:hover { border-color: var(--primary-fg); color: var(--primary-fg); }
.record-public.is-public { border-color: var(--primary-border); background: var(--primary-light); color: var(--primary-fg); }
.history-empty-inline { grid-column: 1 / -1; min-height: 92px; display: grid; place-items: center;
    border: 1px dashed var(--gray-200); border-radius: 10px; color: var(--gray-600);
    background: var(--gray-50); font-weight: 750; }

@media (max-width: 1180px) {
    .history-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .history-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .history-list .record-card { height: 128px; min-height: 112px; grid-template-columns: 92px minmax(0, 1fr);
        grid-template-rows: 1fr; gap: 10px; padding: 8px; overflow: visible; }
    .history-list .record-image { width: 92px; height: 92px; min-height: 0; border-radius: 10px; }
    /* 手机横卡的缩略图仍限定在 92×92 方框内，但用 contain 整张显示不裁切（原来是 cover 会切） */
    .history-list .record-image img { height: 100%; object-fit: contain; }
    .history-list .record-body { align-content: center; padding: 0; }
    /* 横卡里底行只有两百来像素：按钮收成正方形图标，把宽度让给时间，
       和精选案例页 ≤720 隐藏按钮文字是同一套处理 */
    .record-remix, .record-delete { width: 28px; padding: 0; }
    .record-remix span, .record-delete span { display: none; }
}

/* ==========================================================================
   批次21-B2：会员中心照 业主指定的版式基准 1:1
   （左侧 240px 粘性卡片导航 + 右侧内容卡，?tab= 切换；900 以下侧栏摊平成横条）
   颜色全部走主题令牌，后台换主色、暗色模式自动跟随
   ========================================================================== */
.member-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px; align-items: start; }
.member-sidebar { position: sticky; top: 90px; }
.member-sidebar-card { overflow: hidden; border: 1px solid var(--gray-200); border-radius: 12px;
    background: var(--surface); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04); }
.member-sidebar-head { display: flex; align-items: center; gap: 10px; padding: 20px 16px;
    background: linear-gradient(135deg, var(--grad-from) 0%, var(--grad-to) 100%); color: var(--primary-foreground); }
.member-sb-avatar { display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 40px; height: 40px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 50%;
    background: rgba(255, 255, 255, 0.25); font-size: 17px; font-weight: 700; }
.member-sb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member-sb-meta { min-width: 0; }
.member-sb-name { overflow: hidden; font-size: 15px; font-weight: 700; line-height: 1.2;
    text-overflow: ellipsis; white-space: nowrap; }
.member-sb-credits { font-size: 12px; opacity: 0.85; }
.member-sb-credits strong { font-weight: 700; }
.member-sidebar-nav { padding: 8px 0; }
.member-sb-btn { display: inline-flex; align-items: center; gap: 7px; width: fit-content; margin: 5px 10px;
    padding: 10px 16px; border: 1px solid var(--gray-200); border-radius: 10px; background: var(--surface);
    color: var(--gray-600); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2;
    text-decoration: none; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: all 0.15s ease; }
.member-sb-btn:hover { border-color: var(--primary-fg); background: var(--primary-light); color: var(--primary-fg);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.1); transform: translateY(-1px); }
.member-sb-btn.active { border-color: var(--primary-fg); background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-fg); box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.12); }
.member-sb-btn i { flex-shrink: 0; }
/* 批次31-G：这颗按钮原来写死橙色渐变 #ff6b35→#ff8c42，注释还写着「整页都是青绿，这一颗要跳出来」。
   那是 业主指定的版式基准 时代的口径；10-03 起版式基准换成 业主指定的前台版式基准、青蓝 #00c5ef 已在批次27-F 退休，
   整套前台现在是中性黑白，强调靠字重不靠色相（本文件 112 行就是这个口径）。
   留着一颗橙色按钮既是「一排水滴里夹一块橙板」，实测白字压 rgb(255,140,66) 只有 2.31:1，
   13px 的字要 4.5，是全站最差的一处。改跟主色令牌走，亮暗两套自动对：
   亮 = 白字压 #18181b（16.2:1），暗 = #18181b 字压 #fafafa（17.4:1）。 */
.member-sb-btn-redeem { background: var(--primary); color: var(--primary-foreground);
    border-color: transparent; box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2); }
.member-sb-btn-redeem:hover, .member-sb-btn-redeem.active { background: var(--primary-dark);
    border-color: transparent; color: var(--primary-foreground); box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35); }
.member-sb-count { margin-left: auto; padding: 1px 6px; border-radius: 999px; background: var(--gray-100);
    color: var(--gray-600); font-size: 10px; font-weight: 600; }
.member-sb-btn.active .member-sb-count { background: rgba(var(--primary-rgb), 0.12); color: var(--primary-fg); }
/* 批次31-G：--danger 是 #ef4444，当**底色**配白字没问题，当**字色**压在浅色玻璃上只有 3.66:1，
   13px 的字要 4.5。这里给它一个专门当字色用的深红 #c22525（亮色实测 5.66:1），
   暗色那边在下面的深色块里翻成 #f87171（6.07:1）。--danger 本身不动：
   它还被当底色和描边用，改令牌会连坐一大片。 */
.member-sb-logout { display: flex; align-items: center; gap: 8px; margin: 8px 12px 12px; padding: 9px 12px;
    border-radius: 8px; color: #c22525; font-size: 13px; font-weight: 600; text-decoration: none;
    transition: all 0.12s ease; }
.member-sb-logout:hover { background: var(--danger-soft); color: #c22525; }
.member-content { min-width: 0; }
.member-content-card { padding: 24px 28px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 12px;
    background: rgba(255, 255, 255, 0.85); }
.member-content-card h2 { margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-100);
    color: var(--gray-800); font-size: 18px; font-weight: 700; }
.member-info-grid { display: grid; gap: 10px; }
.member-info-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.member-info-label { flex-shrink: 0; width: 72px; color: var(--gray-600); font-size: 13px; font-weight: 600; }
.member-info-value { min-width: 0; color: var(--gray-800); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.member-sub-head { margin: 22px 0 10px; color: var(--gray-800); font-size: 15px; font-weight: 700; }
.member-sub-head:first-child { margin-top: 0; }
.member-table-wrap { overflow-x: auto; }
.member-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.member-table-wrap th { padding: 8px 6px; border-bottom: 2px solid var(--gray-100); color: var(--gray-600);
    font-weight: 700; text-align: left; white-space: nowrap; }
.member-table-wrap td { padding: 8px 6px; border-bottom: 1px solid var(--gray-100); color: var(--gray-800); }
.member-tpl-prompt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    color: var(--gray-600); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.member-tpl-act { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
    border: 1px solid var(--gray-200); border-radius: 6px; background: var(--surface); color: var(--gray-600);
    font-family: inherit; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.member-tpl-act:hover { border-color: var(--primary-fg); color: var(--primary-fg); }
.member-tpl-act-del:hover { border-color: rgba(239, 68, 68, 0.32); background: var(--danger-soft); color: var(--danger); }
.member-pw-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.member-pw-field label { color: var(--gray-600); font-size: 13px; font-weight: 600; }
.member-pw-field input { height: 38px; padding: 0 12px; border: 1px solid var(--gray-200); border-radius: 8px;
    background: var(--surface); color: var(--gray-800); font-size: 14px; outline: none; }
.member-pw-field input:focus { border-color: var(--primary-fg); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); }
.member-pw-submit { height: 38px; padding: 0 20px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, var(--grad-from), var(--grad-to)); color: var(--primary-foreground);
    font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.member-pw-submit:hover { filter: brightness(1.06); }
.member-pw-submit:disabled { opacity: 0.6; cursor: default; }
.member-alert { margin-bottom: 14px; padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.member-alert-error { border: 1px solid rgba(239, 68, 68, 0.32); background: var(--danger-soft); color: var(--danger); }
.member-alert-success { border: 1px solid rgba(16, 185, 129, 0.32); background: var(--success-soft); color: var(--success); }
.member-filter-bar { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px;
    margin-bottom: 14px; }
.member-filter-bar select { width: auto; max-width: none; height: 32px; padding: 0 8px;
    border: 1px solid var(--gray-200); border-radius: 6px; background: var(--surface); color: var(--gray-800);
    font-size: 13px; outline: none; }
.member-filter-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
    border: 1px solid var(--primary-border); border-radius: 6px; text-decoration: none;
    background: var(--primary-light); color: var(--primary-fg); font-family: inherit; font-size: 12px;
    font-weight: 700; cursor: pointer; }
.member-filter-btn:hover { border-color: var(--primary-fg); }
.member-filter-btn-ghost { border-color: var(--gray-200); background: var(--surface); color: var(--gray-600); }
.member-filter-btn-ghost:hover { border-color: var(--gray-600); color: var(--gray-800); }
.member-tab-empty { padding: 28px 16px; border: 1px dashed var(--gray-200); border-radius: 10px;
    background: var(--gray-50); color: var(--gray-600); font-weight: 600; text-align: center; }

/* 暗色模式：版式基准的白底白边在这里会变成一片刺眼的白，统一压成半透明白。
   批次31-D 把 .member-sidebar-card / .member-content-card 从这两条里摘出去了：
   它们已经进了文末的水滴玻璃家族，而 html[data-theme="dark"] 前缀是 (0,2,1) 优先级，
   留在这儿会把家族的暗色玻璃底压成实底、把描边压成 --gray-200，等于这两个模块不做玻璃。
   按钮 .member-sb-btn 不是模块，照旧留在这里。 */
html[data-theme="dark"] .member-sb-btn { background: rgba(255, 255, 255, 0.04); }
/* 批次31-G：上面那条 .member-sb-btn 的特异性是 (0,2,1)，会压过 (0,1,0) 的 .member-sb-btn-redeem，
   所以「积分兑换」必须在深色块里再声明一次，否则暗色下它会被刷成一片透明底。
   值直接跟主色令牌走：暗色 --primary = #fafafa，字色 --primary-foreground = #18181b，
   hover 用 color-mix 往页面底色兑一点，才看得出按下去了（纯白换纯白是没有反馈的）。 */
html[data-theme="dark"] .member-sb-btn-redeem { border-color: transparent; background: var(--primary); }
html[data-theme="dark"] .member-sb-btn-redeem:hover,
html[data-theme="dark"] .member-sb-btn-redeem.active { border-color: transparent;
    background: color-mix(in srgb, var(--primary) 86%, var(--background)); }
/* 退出登录的红字要跟着翻面：#c22525 压在暗色玻璃上只有 2.4:1，深色下改用浅红 */
html[data-theme="dark"] .member-sb-logout,
html[data-theme="dark"] .member-sb-logout:hover { color: #f87171; }

@media (max-width: 900px) {
    .member-layout { grid-template-columns: 1fr; }
    /* 侧栏摊平成一排按钮条，别在手机上占掉半屏 */
    .member-sidebar { position: static; }
    .member-sidebar-card { display: flex; flex-wrap: wrap; align-items: center; }
    .member-sidebar-head { flex: 1 1 auto; padding: 14px 16px; }
    .member-sidebar-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 6px 8px; }
    .member-sb-btn { margin: 2px 4px; padding: 6px 10px; font-size: 12px; }
    .member-sb-logout { margin: 0 12px 8px auto; }
    .member-layout .history-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    /* 900 那条是两个类的权重，720 的「一行一张」必须同样写两个类才盖得住，
       否则横卡布局配三列会挤成一团 */
    .member-layout .history-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
    .member-content-card { padding: 16px; }
    .member-sb-btn { margin: 2px; padding: 6px 8px; font-size: 11px; }
    .member-info-row { flex-wrap: wrap; gap: 4px 12px; }
}

/* ==========================================================================
   批次21-C：资讯信息页照 业主指定的版式基准、/article_detail 1:1
   （分类药丸条 + 顶部大图卡片排 + 双列文字列表 + 分页；详情页左正文右两张卡）
   颜色全部走主题令牌，后台换主色、暗色模式自动跟随。
   面板本体复用上面批次21-A 的 .article-panel，这里不另写一份
   ========================================================================== */

/* 标题浮动 + 渐变流光。版式基准四个页面的 hero 都带这两段动画，之前只搬了静态渐变，
   补在这里对精选案例、生成记录、资讯信息三页同时生效（它们共用 .article-hero） */
.article-hero-text h1 { background-size: 300% 300%;
    animation: titleFloat 6s ease-in-out infinite, titleShimmer 8s ease-in-out infinite; }
.article-hero-text p { animation: subtitleFade 4s ease-in-out infinite; }
@keyframes titleFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes titleShimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes subtitleFade { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .article-hero-text h1, .article-hero-text p { animation: none; }
}

/* ---------- 分类药丸条 ---------- */
.article-categories-bar { display: flex; align-items: center; gap: 16px;
    padding: 24px 0 28px; border-bottom: 1px solid var(--gray-200); margin-bottom: 32px; }
/* 详情页那条压在标题上方，版式基准把上下留白砍掉、只留一条细线 */
.article-categories-bar-tight { padding: 0 0 16px; margin-bottom: 0; }
/* 批次31-G：这颗计数芯片只出现在 .active 药丸里（非 active 那条下一行单独给了皮肤）。
   药丸底色 31-G 起跟主题翻面（亮 #18181b / 暗 #fafafa），字色也跟着翻成 --primary-foreground，
   所以这层衬底不能再写死白：暗色下白衬白底，芯片就没了边界。
   改成拿当前字色调淡做衬底，两套主题都天然对得上（color-mix 本文件 5878 行起已在用）。 */
.article-cat-count { display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
    font-size: 12px; font-weight: 600;
    background: color-mix(in srgb, var(--primary-foreground) 22%, transparent); }
.article-cat-pill:not(.active) .article-cat-count { background: var(--gray-200); color: var(--gray-600); }

/* ---------- 顶部大图卡片排 ---------- */
.article-feature-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; margin-bottom: 36px; }
.article-feature-card { text-decoration: none; border-radius: 16px; overflow: hidden;
    background: var(--surface); display: flex; flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease; }
.article-feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.article-feature-card-cover { position: relative; width: 100%; aspect-ratio: 3 / 2;
    background: var(--gray-100); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.article-feature-card-cover img { display: block; max-width: 100%; max-height: 100%;
    width: auto; height: auto; transition: transform 0.4s ease; }
.article-feature-card:hover .article-feature-card-cover img { transform: scale(1.08); }
/* 批次31-G：「置顶」这块琥珀底是状态色，语义要留；但白字压 --warning(#d97706) 只有 3.19:1，
   11px 粗体也够不上「大字号」的 3:1 豁免线（要 18.66px 粗体）。改成深字压琥珀 = 5.52:1，
   暗色下 --warning 翻成更亮的 #f59e0b，深字反而更好（8.19:1），所以两套主题共用一个深字色。 */
.article-feature-badge { position: absolute; top: 12px; left: 12px; z-index: 1;
    padding: 4px 12px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 1.6;
    color: #1c1917; background: var(--warning); }
.article-feature-card-body { padding: 14px 16px 16px; flex: 1; }
.article-feature-card-cat { display: inline-block; vertical-align: middle; margin-right: 6px;
    padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600;
    color: var(--primary-dark-fg); background: var(--primary-light); }
.article-feature-card-title { font-size: 15px; font-weight: 600; color: var(--gray-800);
    margin: 0; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 双列文字列表 ---------- */
.article-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.article-item { display: flex; align-items: center; gap: 14px; padding: 14px 20px; min-width: 0;
    text-decoration: none; border-radius: 10px; transition: background 0.18s ease; }
.article-item:hover { background: var(--gray-50); }
.article-item:hover .article-item-arrow { opacity: 1; transform: translateX(0); color: var(--primary-fg); }
.article-item-body { flex: 1; min-width: 0; }
/* 标题要 ellipsis 就必须是块级：版式基准用的是 span，行内元素上 text-overflow 不生效 */
.article-item-title { display: block; font-size: 15px; font-weight: 500; color: var(--gray-800);
    line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-item-top { display: inline-flex; align-items: center; vertical-align: middle; flex-shrink: 0;
    margin-right: 6px; padding: 1px 7px; border-radius: 4px;
    /* 批次31-G：同 .article-feature-badge，白字压琥珀只有 3.19:1，改深字 5.52:1 */
    font-size: 10px; font-weight: 700; line-height: 1.7; color: #1c1917; background: var(--warning); }
.article-item-cat { display: inline-flex; align-items: center; vertical-align: middle; flex-shrink: 0;
    margin-right: 6px; padding: 1px 7px; border-radius: 4px;
    font-size: 10px; font-weight: 600; color: var(--primary-dark-fg); background: var(--primary-light); }
.article-item-arrow { flex-shrink: 0; display: flex; align-items: center;
    color: var(--muted-icon); opacity: 0.5; transform: translateX(-4px); transition: all 0.22s ease; }

/* ---------- 分页 ---------- */
.article-pagination { display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 6px; padding: 28px 0 8px; }
.article-page-btn { display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 1px solid var(--gray-200); border-radius: 8px;
    color: var(--gray-600); text-decoration: none; font-size: 14px; font-weight: 500;
    transition: all 0.2s ease; }
.article-page-btn:hover { border-color: var(--primary-fg); color: var(--primary-fg); background: var(--primary-light); }
.article-page-btn.active { border-color: var(--primary-fg); color: var(--primary-foreground); font-weight: 700;
    background: linear-gradient(135deg, var(--grad-from), var(--grad-to)); }
.article-page-ellipsis { display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; font-size: 13px; color: var(--gray-600); }
.article-page-info { font-size: 12px; color: var(--gray-600); margin-left: 8px; }

/* ---------- 一篇文章都没有时 ---------- */
.article-empty { padding: 60px 20px; text-align: center; font-size: 14px; color: var(--gray-600); }
.article-empty p { margin: 0; }
.article-empty p + p { margin-top: 8px; }

/* 文章打不开时的落地页（HTTP 404）：说明 + 回列表 + 最新几篇，别让人走到死胡同 */
.article-empty-missing { font-size: 16px; font-weight: 600; color: var(--gray-800); }
.article-empty-back { display: inline-block; margin-top: 18px; padding: 9px 24px; border-radius: 999px;
    font-size: 14px; color: var(--primary-foreground); background: linear-gradient(135deg, var(--grad-from), var(--grad-to)); }
.article-empty-back:hover { color: #fff; opacity: .9; }
.article-empty-latest { max-width: 520px; margin: 32px auto 0; text-align: left; }

/* ---------- 详情页：左正文右两张卡 ---------- */
.article-detail-layout { display: flex; gap: 24px; align-items: flex-start; }
.article-detail-main { flex: 1; min-width: 0; }
.article-detail-card { padding: 20px 40px 32px; }
.article-detail-sidebar { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; }
.article-detail-title { margin: 16px 0 20px; font-size: 24px; font-weight: 700; line-height: 1.45;
    text-align: center; color: var(--gray-800); word-break: break-word; }
.article-detail-rule { width: 100%; height: 1px; background: var(--gray-200); margin-bottom: 28px; }

.article-detail-content { font-size: 15px; color: var(--gray-600); line-height: 1.85; word-break: break-word; }
.article-detail-content h2 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; color: var(--gray-800); }
.article-detail-content h3 { font-size: 17px; font-weight: 600; margin: 24px 0 10px; color: var(--gray-800); }
.article-detail-content h4 { font-size: 15px; font-weight: 600; margin: 20px 0 8px; color: var(--gray-800); }
.article-detail-content p { margin: 0 0 14px; text-indent: 2em; }
.article-detail-content ul, .article-detail-content ol { margin: 0 0 14px; padding-left: 24px; }
.article-detail-content li { margin-bottom: 6px; }
.article-detail-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
.article-detail-content code { padding: 2px 6px; border-radius: 4px; font-size: 13px;
    color: var(--danger); background: var(--gray-100); }
.article-detail-content pre { padding: 16px 20px; border-radius: 8px; overflow-x: auto;
    font-size: 13px; line-height: 1.6; margin: 14px 0;
    color: var(--gray-100); background: var(--gray-800); }
.article-detail-content pre code { padding: 0; color: inherit; font-size: inherit; background: none; }
.article-detail-content blockquote { border-left: 3px solid var(--primary);
    padding: 4px 0 4px 16px; margin: 14px 0; color: var(--gray-600); }
/* 表格套 block + 横向滚动：管理员粘进来的宽表在手机上会把整页顶出横向滚动条 */
.article-detail-content table { width: 100%; border-collapse: collapse; margin: 14px 0;
    display: block; overflow-x: auto; }
.article-detail-content th, .article-detail-content td { border: 1px solid var(--gray-200);
    padding: 10px 14px; text-align: left; font-size: 14px; }
.article-detail-content th { font-weight: 600; color: var(--gray-600); background: var(--gray-50); }
.article-detail-content a { color: var(--primary-fg); }

.article-detail-foot { margin-top: 40px; padding-top: 24px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.article-detail-foot-left { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.article-nav-link { display: inline-flex; align-items: center; max-width: 100%;
    padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 400;
    color: var(--gray-800); background: var(--gray-50); text-decoration: none; word-break: break-all; }
.article-nav-link:hover { color: var(--primary-fg); }
.article-nav-muted { padding: 8px 14px; border-radius: 8px; font-size: 13px;
    color: var(--gray-600); background: var(--gray-50); }

/* ---------- 详情页侧栏条目 ----------
   另起一套类名而不复用列表页的 .article-item：版式基准列表页和详情页各带一份内联 style，
   同名类在两页上数值完全不同，我们全站只有一份 style.css，同名会互相盖 */
.article-side-head { min-height: 46px; display: flex; align-items: center; margin-bottom: 12px; }
.article-side-head h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--gray-800); }
.article-side-list { display: flex; flex-direction: column; }
.article-side-item { display: flex; align-items: center; gap: 12px; margin: 0 -4px;
    padding: 14px 8px; border-bottom: 1px solid var(--gray-100); border-radius: 8px;
    text-decoration: none; transition: background 0.15s ease; }
.article-side-item:last-child { border-bottom: none; }
.article-side-item:hover { background: var(--gray-50); }
.article-side-item:hover .article-side-chevron { opacity: 1; transform: translateX(0); }
.article-side-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px;
    background: var(--gray-100); color: var(--gray-600);
    display: flex; align-items: center; justify-content: center; }
.article-side-body { flex: 1; min-width: 0; }
.article-side-title { font-size: 14px; color: var(--gray-800); line-height: 1.5; word-break: break-all; }
.article-side-more { flex-shrink: 0; display: flex; align-items: center; color: var(--muted-icon); }
.article-side-chevron { opacity: 0.35; transform: translateX(-3px); transition: all 0.18s ease; }

/* ---------- 响应式 ----------
   断点沿用本项目已有的 1180/960/900/720，不另引入版式基准的 1200/680，
   免得同一套页面出现两组只差几十像素的手机断点 */
@media (max-width: 1180px) {
    .article-feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 960px) {
    .article-feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    /* align-items 必须跟着竖排改回 stretch，跟下面 900 档 .article-detail-layout 那条同一个病根：
       竖排下 flex-start 会让子项宽度按 max-content 走、不受父容器约束，
       .article-categories-pills 的 flex-wrap:wrap 就永远等不到「放不下」这个条件，
       6 颗分类胶囊排成一整行 435px，390px 手机上把整页顶出 126px 横向滚动
       （资讯列表页 /article、文章详情页 /article/detail 都中）。
       这条以前一直没人发现：靶场量测时站点公告弹窗正好开着，
       body.modal-open 带的 overflow:hidden 把溢出整个吃掉了，是假绿不是没病。 */
    .article-categories-bar { flex-direction: column; align-items: stretch; gap: 12px; }
    /* 光让整行收窄还不够：**单颗**胶囊自己也能超宽。分类名是后台自由填写的，
       靶场里就种了一颗「这是一个故意写得非常长的分类名称用来验证药丸会不会撑破容器」。
       .article-cat-pill 是 white-space:nowrap 的 inline-flex —— nowrap 之下它永不折行，
       flex 项的 min-width:auto 又让它缩不到内容宽度以下，于是单颗 435px 直接顶破 313px 的行。
       手机档放开折行 + 限死不超过整行宽度：名字长就多占两行，不再顶出横向滚动条。
       桌面档不动，1024px 以上一行放得下，胶囊保持单行才是设计的样子。 */
    .article-cat-pill { max-width: 100%; white-space: normal; }
    .article-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    /* 竖排时必须把 align-items 改回 stretch：基础规则那个 flex-start 是为了横排时侧栏别被拉高，
       可它在竖排下会让正文列变成「按内容收缩」，粘进来的代码块（white-space:pre，永不折行）
       就能把整页顶到自己那么宽，手机上出现横向滚动条 */
    .article-detail-layout { flex-direction: column; align-items: stretch; }
    .article-detail-sidebar { width: 100%; gap: 16px; }
    .article-detail-card { padding: 20px 16px 28px; }
}
@media (max-width: 720px) {
    .article-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
    .article-feature-card { border-radius: 12px; }
    .article-feature-card-body { padding: 10px 12px 14px; }
    .article-feature-card-title { font-size: 13px; }
    .article-categories-bar { padding: 16px 0 20px; margin-bottom: 20px; }
    .article-categories-pills { gap: 6px; }
    .article-cat-pill { padding: 7px 14px; border-radius: 20px; font-size: 13px; }
    .article-item { padding: 14px; gap: 12px; }
    .article-item-title { font-size: 14px; }
    .article-page-btn, .article-page-ellipsis { width: 32px; height: 32px; font-size: 13px; border-radius: 6px; }
    .article-detail-title { font-size: 20px; }
    .article-detail-content { font-size: 14px; }
    .article-detail-foot { margin-top: 28px; padding-top: 18px; }
    .article-nav-link, .article-nav-muted { flex: 1 1 100%; justify-content: center; }
}

/* ==========================================================================
   批次27：前台外壳 1:1 移植 业主指定的前台版式基准（顶栏 / 抽屉 / 页脚 / 账户区 / 组件类）
   --------------------------------------------------------------------------
   版式基准是 Nuxt3 + Tailwind4 + shadcn 语义令牌，本站是原生 PHP + Bootstrap5，
   所以这里不搬它的工具类，只搬它**编译后**的那套 class：类名、结构、数值逐条对照
   它线上样式表里 .glass-panel / .default-header__inner / .nav-link / .icon-btn /
   .text-btn / .ui-button* / .ui-card / .app-footer__* 的成品规则抄写，
   颜色一律走上面新加的语义令牌，亮暗两套自动跟着翻。

   整段放在文件最末尾：同特异性下靠源码顺序压过前面批次的旧外壳规则。
   断点也照版式基准：≤959px 导航收进抽屉、≤640px 桌面控件与页脚链接组隐藏。
   ========================================================================== */

/* --- 毛玻璃面板（版式基准 .glass-panel 原值） --- */
.glass-panel {
    border-color: var(--border);
    background: var(--nav-bg);
    box-shadow: 0 1px color-mix(in srgb, var(--border) 72%, transparent);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    transition: background .3s, border-color .3s, box-shadow .3s;
}

/* --- 顶栏：sticky 不 fixed，内容区不用再让位 --- */
.default-header {
    position: sticky;
    top: 0;
    z-index: 120;
    width: 100%;
    border-bottom: 1px solid var(--border);
    /* 顶栏高度锁死成 --navbar-height：登录态少了「注册」钮、多了头像，实测比访客态
       矮 2px，而 Toast 的 top、.hp-side 的 sticky 偏移、agent/workbench 的全屏高度
       全按这个令牌算，两种状态不一致就会差出一条缝。挂在 header 而不是 __inner：
       border-box 下这条 min-height 把 1px 底边也算进去，令牌值和实测高度才对得齐。
       只在内容更矮时补，不会把顶栏撑高 */
    min-height: var(--navbar-height);
}

.default-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 auto;
    padding: .85rem 1rem;
}

@media (min-width: 768px) {
    .default-header__inner { padding: 1rem 1.5rem; }
}

.header-brand {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
    /* 允许收缩：320px 下品牌区不让位的话会把右侧操作区整个顶出屏幕。
       收缩之后长站名由 .brand-name 的省略号收尾，宽 Logo 由 max-width 兜住 */
    flex: 0 1 auto;
}

a.header-brand { min-width: 0; color: var(--foreground); text-decoration: none; }

.brand-logo,
.header-logo {
    display: block;
    height: 1.75rem;
    width: auto;
    min-width: 0;
    max-width: 10rem;
    object-fit: contain;
}

/* 没配 Logo 时显示站名。版式基准只有图，但本站后台允许不传 Logo，
   不能因此让品牌区空掉，所以补一个同字重同色阶的文字位 */
.brand-name {
    min-width: 0;
    overflow: hidden;
    color: var(--foreground);
    font-size: 1.05rem;
    font-weight: 680;
    letter-spacing: -.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 三杠/助手/桌面控件这几条显隐一律挂两个类（.icon-btn.xxx）抬到 0,2,0 特异性：
   .icon-btn 的基础规则写在它们后面，同特异性的话 display:inline-flex 会把
   display:none 整条盖掉 —— 靶场实测过：桌面上三杠一直挂着、手机端的客服和
   换色钮也照样显示，顶栏在 320px 直接被撑出 64px 横向溢出 */
.icon-btn.header-menu-btn { display: inline-flex; }

@media (min-width: 960px) {
    .icon-btn.header-menu-btn { display: none; }
}

.nav-menu {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-width: 0;
    flex-wrap: nowrap;
}

@media (max-width: 959px) {
    .nav-menu { display: none; }
}

/* 导航项（版式基准 .nav-link 原值）。选中态用 .is-active 而不是版式基准的
   .router-link-exact-active —— 那是 Vue Router 自动挂的类，本站是服务端渲染，
   由布局模板按当前路径自己判定后挂上去，效果一致 */
.nav-link {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: .25rem;
    padding: .42rem 1rem;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    font-size: .84rem;
    font-weight: 560;
    line-height: 1.35;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s, color .18s;
}

.nav-link:hover { background: var(--hover-bg); color: var(--text-main); outline: none; }

.nav-link.is-active { background: var(--accent-soft); color: var(--accent-strong); }

.header-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex: 0 0 auto;
    min-width: 0;
}

.header-divider {
    width: 1px;
    height: 1.1rem;
    flex: none;
    margin: 0 .3rem;
    background: var(--border);
}

.icon-btn.header-mobile-chat { display: none; }

@media (max-width: 640px) {
    .icon-btn.header-desktop-control,
    .header-desktop-user,
    .header-divider { display: none; }

    .icon-btn.header-mobile-chat { display: inline-flex; }

    /* 注册钮在手机端收掉，只留「登录」（版式基准顶栏手机上也就一个登录）。
       320px 下品牌 + 三杠 + 助手 + 登录 + 注册五个件横排放不下。
       挂两个类抬到 0,2,0：注册钮本身是 .ui-button，而 .ui-button{display:inline-flex}
       写在本段后面，同特异性会把这条 display:none 整条盖掉（靶场实测过：
       320/391/640 三档注册钮都还在，和上面三杠那个坑一模一样） */
    .ui-button.header-register { display: none; }
}

/* --- 图标按钮 / 文字按钮（版式基准原值） --- */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: none;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted-foreground);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.icon-btn:hover { background: var(--hover-bg); color: var(--text-main); }

.icon-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 18%, transparent);
}

.icon-btn i { font-size: 20px; line-height: 1; }

@media (max-width: 640px) {
    .icon-btn { width: 2rem; height: 2rem; }

    .icon-btn i { font-size: 18px; }
}

/* 亮/暗切换钮里的两枚图标：谁亮谁灭只由 html[data-theme] 决定，不依赖 JS，
   脚本万一没跑起来图标和当前外观也仍然对得上（沿用批次23-B 的口径）。
   选择器挂 .js-theme-toggle 而不是 .icon-btn：抽屉底部那颗是 .ui-button，
   两处得共用同一条规则，否则手机上会两枚图标一起显示 */
.js-theme-toggle [data-ico="dark"] { display: none; }

html[data-theme="dark"] .js-theme-toggle [data-ico="light"] { display: none; }

html[data-theme="dark"] .js-theme-toggle [data-ico="dark"] { display: inline; }

/* 只给抽屉底部那颗（.ui-button）定字号；顶栏那颗走 .icon-btn i 的 20px，
   同特异性的话写在后面会把 20px 盖掉，所以这里多挂一个类抬高特异性 */
.ui-button.js-theme-toggle i { font-size: 1.05rem; line-height: 1; }

/* 手机端账户入口：桌面那套（头像+昵称+下拉）≤640px 已整块隐藏，
   这里补一枚纯图标钮，点了从底部升起 .acct-sheet */
.header-user-mobile { display: none; }

@media (max-width: 640px) {
    .header-user-mobile { display: inline-flex; }
}

.text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0 .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--secondary);
    color: var(--secondary-foreground);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}

.text-btn:hover {
    border-color: var(--border);
    background: var(--muted);
    color: var(--accent-foreground);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 12%, transparent);
    outline: none;
}

.text-btn:active { transform: scale(.97); }

@media (max-width: 640px) {
    .text-btn { min-height: 2rem; padding: 0 .7rem; font-size: .8rem; }
}

/* --- 通用按钮：六变体 + 四尺寸（版式基准 .ui-button 原值） --- */
.ui-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 2.35rem;
    padding: 0 .85rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--foreground);
    font-size: .84rem;
    font-weight: 520;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}

.ui-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 18%, transparent);
}

.ui-button:active { transform: scale(.98); }

.ui-button--default { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.ui-button--default:hover { background: color-mix(in srgb, var(--primary) 88%, var(--background)); }

.ui-button--secondary { background: var(--secondary); color: var(--secondary-foreground); }
.ui-button--secondary:hover { background: color-mix(in srgb, var(--secondary) 84%, var(--foreground)); }

.ui-button--outline { border-color: var(--border); background: var(--background); color: var(--foreground); }
.ui-button--outline:hover { background: var(--muted); color: var(--accent-foreground); }

.ui-button--ghost { background: transparent; color: var(--foreground); }
.ui-button--ghost:hover { background: var(--muted); }

.ui-button--destructive { background: var(--destructive); border-color: var(--destructive); color: var(--destructive-foreground); }
.ui-button--destructive:hover { background: color-mix(in srgb, var(--destructive) 86%, #000); }

.ui-button--link {
    min-height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--foreground);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ui-button--sm { min-height: 2.25rem; padding: 0 .7rem; font-size: .78rem; }
.ui-button--xs { min-height: 1.75rem; padding: 0 .45rem; font-size: .72rem; }
.ui-button--lg { min-height: 2.6rem; padding: 0 1rem; font-size: .9rem; }
.ui-button--icon { padding: 0; }
.ui-button--sm.ui-button--icon { width: 2.25rem; min-width: 2.25rem; }
.ui-button--xs.ui-button--icon { width: 1.75rem; min-width: 1.75rem; }

.ui-button:disabled,
.ui-button.is-disabled { cursor: not-allowed; opacity: .55; pointer-events: none; }

/* --- 卡片（版式基准 .ui-card 原值） --- */
.ui-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--card-foreground);
    box-shadow: var(--shadow-sm);
}

/* --- 工具卡：10 色强调（版式基准 .tool-card--accent-* 原值） ---
   整站唯一的彩色，且只出现在工具图标的底色/描边/字色上，面积很小，
   正是版式基准「基本没美工、靠一点色相区分类目」的做法 */
.tool-card--accent-slate  { --tool-accent: #475569; }
.tool-card--accent-indigo { --tool-accent: #4f46e5; }
.tool-card--accent-blue   { --tool-accent: #2563eb; }
.tool-card--accent-sky    { --tool-accent: #0284c7; }
.tool-card--accent-cyan   { --tool-accent: #0891b2; }
.tool-card--accent-violet { --tool-accent: #7c3aed; }
.tool-card--accent-rose   { --tool-accent: #e11d48; }
.tool-card--accent-amber  { --tool-accent: #d97706; }
.tool-card--accent-teal   { --tool-accent: #0d9488; }
.tool-card--accent-pink   { --tool-accent: #db2777; }

.tool-card--shadcn {
    /* flex 不是 block：卡里是「图标方块 + 文字块」两兄弟，block 下文字会掉到图标下面去 */
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    width: 100%;
    padding: .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: none;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.tool-card--shadcn:hover {
    transform: translateY(-1px);
    border-color: var(--border);
    background: color-mix(in srgb, var(--tool-accent) 5%, var(--card));
    box-shadow: var(--shadow-md);
}

.tool-card--shadcn:active { transform: translateY(0); }

.tool-card--shadcn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 14%, transparent), var(--shadow-sm);
}

.tool-card__icon--shadcn {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--tool-accent) 18%, var(--border));
    border-radius: calc(var(--radius) - .18rem);
    background: color-mix(in srgb, var(--tool-accent) 12%, var(--background));
    color: var(--tool-accent);
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.tool-card__icon--shadcn i { font-size: 1.15rem; line-height: 1; }

@media (min-width: 640px) {
    .tool-card__icon--shadcn { width: 2.5rem; height: 2.5rem; }

    .tool-card__icon--shadcn i { font-size: 1.3rem; }
}

.tool-card--shadcn:hover .tool-card__icon--shadcn {
    border-color: color-mix(in srgb, var(--tool-accent) 28%, var(--border));
    background: color-mix(in srgb, var(--tool-accent) 16%, var(--background));
    transform: scale(1.03);
}

.tool-card__body { min-width: 0; max-width: 100%; overflow: hidden; }

/* 批次33：这里必须显式 display:block。原来它是行内 span，而 overflow / text-overflow /
   white-space 这三个对**非替换行内盒根本不生效**（CSS 规范如此），等于三行白写：
   标题连同里面的 .soon-badge 会整条冲出 .tool-card__body，在 390px 档直接跑到屏幕右外
   （靶场实测 span.tool-card__title L296 R423，视口只有 375），再被 body 的 overflow:hidden
   悄悄裁掉——所以 documentElement.scrollWidth 一点没涨，横滚探针查不出来，
   只有「元素级 offender」这一路才点名到它。改成块级之后省略号才真的开始工作。 */
.tool-card__title {
    display: block;
    overflow: hidden;
    color: var(--foreground);
    font-size: .84rem;
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-card__desc {
    display: -webkit-box;
    overflow: hidden;
    margin-top: .18rem;
    color: var(--text-muted);
    font-size: .74rem;
    line-height: 1.5;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* 批次33：手机 3 列时每张卡只有 107px，图标方块(34px)+间距(10px)+左右内边距(22px)+边框
   吃掉之后文字块只剩 39px——就算上面的省略号生效，也只能看到「商品…」两个字，等于没修。
   所以 ≤639px 改成「图标在上、文字在下」居中堆叠：文字块拿到整张卡的宽度(~85px)，
   并且允许换行而不是截断，「商品详情图」五个字一行放得下，「即将上线」徽章自己换到第二行。
   ≥640px 一条不动，电脑版还是版式基准那套「图标在左、文字在右」。 */
@media (max-width: 639.98px) {
    .tool-card--shadcn { flex-direction: column; align-items: center; gap: .4rem; text-align: center; }

    .tool-card__title { white-space: normal; line-height: 1.35; }
}

/* 「即将上线」占位卡：版式基准没有的功能先照它的样子把图标和标题摆出来，
   业主 2026-10-03 定案「先把图标和文字标题复制过来，然后嵌入改为#，逐步开发」。
   点了不跳走，弹一句提示，避免用户以为链接坏了 */
.tool-card--soon { cursor: default; }

.tool-card--soon:hover {
    transform: none;
    background: var(--card);
    box-shadow: none;
}

.soon-badge {
    display: inline-flex;
    align-items: center;
    padding: .1rem .38rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--muted);
    color: var(--text-muted);
    font-size: .66rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

/* --- 手机端左侧抽屉导航 ---
   版式基准 ≤959px 把 .nav-menu 收起来，点左上角三杠从左侧滑出。
   面板常驻 DOM、靠 .is-open 控制显隐：不做「点了才插入节点」，
   否则脚本没跑起来时手机上就彻底没有导航了 */
.site-drawer__scrim {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(9, 9, 11, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}

.site-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1041;
    display: flex;
    flex-direction: column;
    width: min(84vw, 19rem);
    border-right: 1px solid var(--border);
    background: var(--background);
    box-shadow: var(--shadow-md);
    transform: translateX(-102%);
    transition: transform .24s cubic-bezier(.32, .72, 0, 1);
    overflow: hidden;
}

.site-drawer.is-open { transform: translateX(0); }

.site-drawer__scrim.is-open { opacity: 1; pointer-events: auto; }

.site-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex: none;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
}

.site-drawer__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: .6rem .6rem 1rem;
}

.site-drawer__group + .site-drawer__group { margin-top: 1rem; }

.site-drawer__title {
    margin: 0 0 .35rem;
    padding: 0 .55rem;
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 620;
    letter-spacing: .04em;
}

.site-drawer__nav { display: grid; gap: .12rem; }

.site-drawer__nav .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: .62rem .7rem;
    font-size: .9rem;
    font-weight: 540;
}

.site-drawer__foot {
    display: grid;
    gap: .5rem;
    flex: none;
    padding: .8rem 1rem calc(.9rem + var(--safe-bottom));
    border-top: 1px solid var(--border);
    background: var(--background);
}

/* 抽屉打开时锁住背景滚动。挂在 html 上而不是 body 上：
   body 设 overflow:hidden 会在 iOS 微信里把滚动位置弹回顶部 */
html.is-drawer-open { overflow: hidden; }

@media (min-width: 960px) {
    /* 桌面端导航本来就摊在顶栏上，抽屉整块退场，不留隐藏节点 */
    .site-drawer,
    .site-drawer__scrim { display: none; }
}

/* --- 账户区：桌面下拉 --- */
.header-user { position: relative; flex: 0 0 auto; }

.header-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    max-width: 11rem;
    min-height: 2.25rem;
    padding: 0 .55rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.header-avatar:hover { background: var(--hover-bg); border-color: var(--border); }

.header-avatar img {
    width: 1.75rem;
    height: 1.75rem;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    background: var(--muted);
}

.header-avatar__fallback {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    flex: none;
    border-radius: 50%;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: .78rem;
    font-weight: 650;
}

.header-avatar__name {
    min-width: 0;
    overflow: hidden;
    font-size: .84rem;
    font-weight: 560;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acct-pop {
    position: absolute;
    top: calc(100% + .55rem);
    right: 0;
    z-index: 130;
    width: 15rem;
    /* 马甲组切换项挂在「退出登录」上面，组里账号多时菜单会一路长下去顶出屏幕，
       这里给它一个上限，超出就在菜单内部滚，不影响顶栏和页面 */
    max-height: min(64vh, 26rem);
    overflow-y: auto;
    padding: .375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--popover);
    color: var(--popover-foreground);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.acct-pop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.acct-pop__head {
    display: grid;
    gap: .15rem;
    padding: .55rem .6rem .65rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: .35rem;
}

.acct-pop__name {
    overflow: hidden;
    font-size: .86rem;
    font-weight: 640;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acct-pop__credits { color: var(--text-muted); font-size: .76rem; }

.acct-pop__credits strong { color: var(--foreground); font-weight: 680; }

.acct-pop__item {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    padding: .5rem .6rem;
    border: 0;
    border-radius: calc(var(--radius) - .2rem);
    background: transparent;
    color: var(--popover-foreground);
    font-size: .84rem;
    font-weight: 520;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .14s, color .14s;
}

.acct-pop__item i { font-size: 1.05rem; color: var(--text-muted); flex: none; }

.acct-pop__item:hover { background: var(--hover-bg); color: var(--text-main); }

.acct-pop__item:hover i { color: var(--text-main); }

.acct-pop__item--danger { color: var(--status-destructive); }

.acct-pop__item--danger i { color: var(--status-destructive); }

.acct-pop__item--danger:hover {
    background: color-mix(in srgb, var(--destructive) 10%, transparent);
    color: var(--status-destructive);
}

.acct-pop__sep { height: 1px; margin: .35rem 0; background: var(--border); }

/* --- 账户区：马甲组免密切换 ---
   同组的其他账号列在「退出登录」上面，点一下就切过去。桌面下拉与手机底部 sheet 共用这一套类名，
   视觉口径完全跟着上面的 .acct-pop__item 走：不加新底色、不加新边框，只多一行小标题和一个头像位 */
.acct-pop__label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .4rem;
    padding: .3rem .6rem .25rem;
    font-size: .72rem;
    font-weight: 620;
    color: var(--text-muted);
}

.acct-pop__labelnote { font-size: .68rem; font-weight: 480; color: var(--text-muted); opacity: .82; }

.acct-pop__ava {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    object-fit: cover;
    background: var(--hover-bg);
    flex: none;
}

.acct-pop__ava--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* 写在 .acct-pop__item i 后面，才能把那条 1.05rem 压回来：头像位里的图标要是同样大就撑破圆圈了 */
.acct-pop__ava--empty i { font-size: .82rem; color: inherit; }

.acct-pop__switchname {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acct-pop__switchcredits {
    flex: none;
    font-size: .74rem;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* 请求在飞的时候先压暗并吃掉点击，免得网慢时连点两下切到别的账号去 */
.acct-pop__item.is-switching { opacity: .5; pointer-events: none; }

@media (max-width: 640px) {
    .acct-pop { display: none; }
}

/* --- 账户区：手机底部 sheet ---
   版式基准在 ≤640px 把账户菜单改成从底部升起的面板，拇指够得着。
   和抽屉一样常驻 DOM，靠 .is-open 抬起来 */
.acct-sheet__scrim {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(9, 9, 11, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}

.acct-sheet {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1041;
    max-height: min(78vh, 34rem);
    padding: .5rem .75rem calc(.9rem + var(--safe-bottom));
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 1rem 1rem 0 0;
    background: var(--background);
    box-shadow: var(--shadow-md);
    transform: translateY(102%);
    transition: transform .26s cubic-bezier(.32, .72, 0, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.acct-sheet.is-open { transform: translateY(0); }

.acct-sheet__scrim.is-open { opacity: 1; pointer-events: auto; }

.acct-sheet__grab {
    width: 2.4rem;
    height: .25rem;
    margin: .35rem auto .7rem;
    border-radius: 999px;
    background: var(--border);
}

html.is-sheet-open { overflow: hidden; }

@media (min-width: 641px) {
    .acct-sheet,
    .acct-sheet__scrim { display: none; }
}

/* --- 页脚：品牌列 + 四组链接（版式基准 .app-footer__* 原值） --- */
.app-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
    text-align: left;
}

.app-footer__inner {
    width: min(100%, 80rem);
    margin: 0 auto;
    padding: 3rem 1rem;
}

.app-footer__grid { display: grid; gap: 2rem; }

/* 品牌列和四组链接是同级子元素：版式基准用 display:contents 让 .app-footer__groups
   这个包裹层「消失」，五个孩子直接参与外层网格，这样 ≥768px 才能排成
   1.35fr + 4×1fr。≤640px 时整个 groups 层隐藏，只剩品牌列 */
.app-footer__groups { display: contents; }

@media (min-width: 768px) {
    .app-footer__grid { grid-template-columns: 1.35fr repeat(4, 1fr); }
}

@media (max-width: 640px) {
    .app-footer__groups { display: none; }

    .app-footer__inner { padding: 2rem 1rem; }
}

/* 品牌列（版式基准这一层是个无类名的 div，靠它把 logo / 标语 / 社交钮捆成一个网格孩子） */
.app-footer__brand { min-width: 0; }

.app-footer__logo { width: auto; height: 1.5rem; }

.app-footer__brand-name { color: var(--foreground); font-size: 1rem; font-weight: 680; }

.app-footer__tagline {
    max-width: 18rem;
    margin: .75rem 0 0;
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.8;
}

.app-footer__social { display: grid; justify-items: start; gap: .45rem; margin-top: 1rem; }

.app-footer__social-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    max-width: 100%;
    min-height: 1.75rem;
    padding: .05rem .15rem;
    border: 0;
    border-radius: calc(var(--radius) - .18rem);
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-size: .875rem;
    font-weight: 520;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s, transform .15s;
}

.app-footer__social-btn:hover,
.app-footer__social-btn:focus-visible {
    background: var(--accent-soft);
    color: var(--accent-strong);
    transform: translateY(-1px);
    outline: none;
}

.app-footer__social-icon {
    display: inline-grid;
    place-items: center;
    width: 1.2rem;
    min-width: 1.2rem;
    color: var(--text-muted);
    line-height: 1;
}

.app-footer__social-icon i { font-size: 1.05rem; }

.app-footer__social-text { min-width: 0; overflow-wrap: anywhere; }

.app-footer__title {
    margin: 0 0 1rem;
    color: var(--text-main);
    font-size: .875rem;
    font-weight: 600;
}

.app-footer__links { display: grid; gap: .75rem; color: var(--text-muted); font-size: .875rem; }

.app-footer__links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color .18s;
}

.app-footer__links a:hover { color: var(--accent-strong); outline: none; }

.app-footer__bottom { border-top: 1px solid var(--card-border); }

.app-footer__bottom-inner {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    width: min(100%, 80rem);
    margin: 0 auto;
    padding: 1.25rem 1rem;
    color: var(--text-muted);
    font-size: .75rem;
}

@media (min-width: 768px) {
    .app-footer__bottom-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.app-footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }

.app-footer__legal-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--text-muted);
    text-decoration: none;
}

.app-footer__bottom a { transition: color .18s; }

.app-footer__bottom a:hover { color: var(--accent-strong); outline: none; }

.app-footer__beian-icon {
    width: 1rem;
    height: 1rem;
    flex: none;
    object-fit: contain;
}

.app-footer__platform { flex: none; }

/* --- 内容容器：版式基准 main = max-w-7xl + px-3 py-6 / sm:px-6 sm:py-10 ---
   顶栏改成 sticky 之后不再需要给它让位，旧那套 padding-top:97px / 152px 一并作废 */
.app-shell {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem .75rem 2.5rem;
}

@media (min-width: 640px) {
    .app-shell { padding: 2.5rem 1.5rem 3rem; }
}

/* --- 顶栏实际高度 ---
   --navbar-height 现在只被几处用到：Toast 的 top、.hp-side 的 sticky top、
   agent/workbench 的全屏工作区高度。批次20 那套 fixed 顶栏的 66/96/54 已随
   .site-* 一起删掉，这里按 sticky 顶栏在靶场里逐档量出来的实际高度给
   （都含 .default-header 那 1px 底边，因为 min-height 挂在 header 上、border-box）：
   ≤640px 图标钮 2rem、客服/换色/注册全收掉 = 61px；
   641–767px 图标钮升到 2.25rem、客服与注册钮回来 = 67px；
   ≥768px 内边距升到 1rem = 72px。
   写在文件末尾：同特异性下压过前面 :root 里的 61px 基准值 */
@media (min-width: 641px) {
    :root { --navbar-height: 67px; }
}

@media (min-width: 768px) {
    :root { --navbar-height: 72px; }
}

/* --- 页脚微信客服二维码小窗（2026-10-03 业主给图）---
   版式基准品牌列下的社交钮我们接了第一枚：点「微信客服」在钮的正上方弹一张二维码。
   小窗走绝对定位挂在 .app-footer__social 上，不占文档流，弹收都不推页脚排版；
   手机上页脚是单列，8.25rem 的图宽在 320px 屏也放得下。
   点外面 / Esc 收起的交互在 app.js 批次27 段，和账户下拉同一套 */
.app-footer__social { position: relative; }

.app-footer__qr-pop {
    position: absolute;
    left: 0;
    bottom: calc(100% + .4rem);
    z-index: 60;
    display: none;
    padding: .5rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.app-footer__qr-pop.is-open { display: block; }

/* 二维码必须等比：压变形扫不出来。width 定死、height:auto 跟原图比例走 */
.app-footer__qr-pop img {
    display: block;
    width: 8.25rem;
    height: auto;
    border-radius: calc(var(--radius) - .35rem);
}

.app-footer__qr-cap {
    display: block;
    margin-top: .35rem;
    font-size: .75rem;
    color: var(--text-muted);
}

/* ===== 批次27-G：平台提示词保密（系统模板 / 首页场景起手词）===== */

/* 系统模板卡片上那句遮罩说明，替代原先直接摊开的提示词正文。
   和 .tpl-card-prompt 同时挂在同一个元素上，靠后出现的 display 覆盖掉 -webkit-box */
.tpl-card-secret {
    display: flex; align-items: flex-start; gap: 5px;
    color: var(--muted-foreground);
}
.tpl-card-secret > i { flex: 0 0 auto; margin-top: 2px; font-size: 12px; }
.tpl-card-secret > span { flex: 1 1 auto; min-width: 0; }

/* 选中平台内容后挂在描述框下方的那条小提示。
   正文不下发浏览器，用户总得看得见自己选了哪一条，
   否则点完按钮页面一个字没变，只会以为按钮是坏的 */
.tpl-applied {
    display: flex; align-items: center; gap: .5rem;
    margin-top: .5rem; padding: .45rem .6rem;
    font-size: 12px; line-height: 1.5;
    color: var(--selection-foreground);
    background: var(--selection-bg);
    border: 1px solid var(--selection-border);
    border-radius: calc(var(--radius) - .25rem);
}
.tpl-applied > i { flex: 0 0 auto; }
.tpl-applied > span { flex: 1 1 auto; min-width: 0; }
.tpl-applied-x {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; padding: 0; font-size: 10px; line-height: 1;
    color: inherit; background: transparent; border: 0; border-radius: 50%; cursor: pointer;
}
.tpl-applied-x:hover { background: var(--selection-hover-bg); }

/* 首页场景芯片的选中态：点一下就是选中，芯片得亮起来，
   走 --selection 令牌族，和模板库分类选中同一套口径。
   带 :hover 的那两条是为了盖掉上面的 .home-scene:hover，选中后悬停仍有反馈 */
.home-scene.is-active,
.home-scene.is-active:hover {
    color: var(--selection-foreground);
    background: var(--selection-bg);
    border-color: var(--selection-border);
}
.home-scene.is-active > i,
.home-scene.is-active:hover > i { color: var(--selection-foreground); }
.home-scene.is-active:hover { background: var(--selection-hover-bg); }

/* ==========================================================================
   批次28：首页四段 1:1 还原 业主指定的前台版式基准
   --------------------------------------------------------------------------
   ① 公告条 ② Hero + 生成卡 ③ 实用功能 ④ 创意模板，另加 /tools 全部工具页。
   颜色一律走批次27 的语义令牌，亮暗两套自动跟着翻，这段里不写死色值
   （工具卡图标的 8 色强调是批次27 定好的例外）。

   整段接在文件最末尾：同特异性下靠源码顺序压过前面批次的旧首页规则
   （.genbar* / .home-why* / .home-cta* / .home-scenes* 那些旧版式一行没删，
   只是新版面不再用它们，翻回旧模板就还有效）。
   ========================================================================== */

/* --- 入场动画：版式基准每张卡按 --motion-delay 依次浮出来 --- */
.motion-enter {
    opacity: 0;
    animation: motionIn .5s cubic-bezier(.22, .61, .36, 1) forwards;
    animation-delay: var(--motion-delay, 0ms);
}

.motion-enter--top { --motion-from-y: -10px; }

.motion-enter--card { --motion-from-y: 12px; }

@keyframes motionIn {
    from { opacity: 0; transform: translate3d(0, var(--motion-from-y, 10px), 0); }
    to { opacity: 1; transform: none; }
}

/* --- 打字机标题：宽度按「字数 × 每字宽」算，光标用右边框充当 ---
   steps() 的步数必须等于字数，否则最后一格会停在半截字上 */
.typewriter-text {
    display: inline-block;
    overflow: hidden;
    max-width: 100%;
    width: 0;
    white-space: nowrap;
    vertical-align: bottom;
    border-right: 2px solid currentColor;
    animation: typewriterIn var(--typewriter-duration, 2s) steps(var(--typewriter-steps, 20), end) forwards,
               typewriterCaret .9s step-end infinite;
}

@keyframes typewriterIn {
    from { width: 0; }
    to { width: var(--typewriter-width, 12em); }
}

@keyframes typewriterCaret {
    0%, 100% { border-right-color: currentColor; }
    50% { border-right-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .motion-enter { animation: none; opacity: 1; }

    .typewriter-text { width: auto; border-right: 0; animation: none; }
}

/* --- ① 公告条 --- */
.home-notice {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 44px;
    margin-bottom: 1rem;
    padding: .35rem .45rem .35rem .8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}

/* 批次31-E：这里原来写 var(--muted)（亮色 #f4f4f5、暗色 #27272a），是**实底**。
   .home-notice 已经进了文末的水滴玻璃家族，而 :hover 的特异性 (0,2,0) 压得过家族的 (0,1,0)，
   一悬停就从半透玻璃退回不透明色块——正是业主说的「不能左边是白色，右边是水滴的」。
   改成 --module-bg-hover：亮暗两套都只加一层薄白，玻璃质感和毛玻璃都保住。 */
.home-notice:hover { background: var(--module-bg-hover); }

.home-notice:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 18%, transparent);
}

.home-notice__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--muted);
    color: var(--foreground);
    font-size: .95rem;
}

.home-notice__text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: .84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-notice__close { flex: 0 0 auto; color: var(--muted-foreground); }

/* --- ② Hero + 生成卡 --- */
.home-hero2 { padding: 1.6rem 0 1.25rem; }

.home-hero2__title {
    display: block;
    margin: 0 0 1.1rem;
    /* 手机 5.6vw：9 字标题在 320px 屏上约 168px 宽，不会顶出横向滚动条 */
    font-size: clamp(1.15rem, 5.6vw, 2.1rem);
    font-weight: 680;
    line-height: 1.4;
    letter-spacing: -.01em;
    color: var(--foreground);
}

.home-hero2__guest {
    margin: .85rem 0 0;
    font-size: .8rem;
    color: var(--muted-foreground);
}

.home-composer { padding: .5rem; }

.home-composer__inner { display: flex; flex-direction: column; gap: .35rem; }

.home-composer__file { display: none; }

.home-composer__edit { position: relative; padding: .55rem .7rem 1.5rem; }

.prompt-editor {
    min-height: 5.2rem;
    max-height: 15rem;
    overflow-y: auto;
    font-size: .88rem;
    line-height: 1.75;
    color: var(--foreground);
    white-space: pre-wrap;
    word-break: break-word;
    outline: none;
}

.prompt-editor:focus-visible { outline: none; }

.prompt-editor-placeholder {
    position: absolute;
    top: .55rem;
    right: .7rem;
    left: .7rem;
    pointer-events: none;
    font-size: .88rem;
    line-height: 1.75;
    color: var(--text-placeholder);
}

/* 有字就把占位文案摘掉：CSS 兜一层，JS 没跑起来时也不会「字压在灰字上」 */
.home-composer__edit.is-filled .prompt-editor-placeholder { display: none; }

.home-composer__count {
    position: absolute;
    right: .7rem;
    bottom: .3rem;
    font-size: .7rem;
    color: var(--muted-foreground);
}

/* 参考图条：左「添加图片」+ 中间缩略图 + 右「AI 优化」 */
.home-reference-strip {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .15rem .25rem 0;
}

.home-reference-upload {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    flex: 0 0 auto;
    min-height: 1.9rem;
    padding: 0 .6rem;
    border: 1px dashed var(--border);
    border-radius: calc(var(--radius) - .15rem);
    background: transparent;
    color: var(--muted-foreground);
    font-size: .76rem;
    cursor: pointer;
    transition: border-color .15s, color .15s, background-color .15s;
}

.home-reference-upload:hover {
    border-color: var(--foreground);
    background: var(--muted);
    color: var(--foreground);
}

/* 满 5 张就收起上传钮：留着只会让人点了才被拒 */
.home-reference-strip.is-full .home-reference-upload { display: none; }

.home-reference-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    flex: 1 1 auto;
    min-width: 0;
}

.home-reference-tile {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--image-tile-bg);
}

.home-reference-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }

.home-reference-tile.is-uploading { display: grid; place-items: center; }

.home-reference-x {
    position: absolute;
    top: 2px;
    right: 2px;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(9, 9, 11, .62);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
}

.home-reference-x:hover { background: rgba(9, 9, 11, .82); }

.home-prompt-optimize { flex: 0 0 auto; margin-left: auto; }

/* 生成卡底部操作条 */
.home-composer__bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .2rem;
    padding: .5rem .25rem .15rem;
    border-top: 1px solid var(--border);
}

.home-composer-left-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    min-width: 0;
}

.home-composer__right {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-left: auto;
}

.home-composer__meta {
    font-size: .74rem;
    color: var(--muted-foreground);
    white-space: nowrap;
}

.home-composer__meta b { color: var(--foreground); font-weight: 640; }

.home-composer__meta a { color: var(--primary-fg); }

.home-composer-action { max-width: 100%; }

.home-composer-action--primary { flex: 0 0 auto; }

.hc-text {
    overflow: hidden;
    max-width: 8.5rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hc-caret { font-size: .95rem; opacity: .65; }

/* 参数格的面板沿用旧生成条的 .gchip-menu / .gchip-opt，这里只补首页这一份的宽度 */
.hc-menu { min-width: 240px; }

.hc-formula { font-size: .7rem; line-height: 1.55; }

/* --- ③ 实用功能 --- */
.home-tools { padding: .35rem 0 1.25rem; }

.home-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

.home-sec-head h2 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 650;
    color: var(--foreground);
}

.home-sec-more,
.home-template-section__more {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    flex: 0 0 auto;
    font-size: .8rem;
    color: var(--muted-foreground);
    text-decoration: none;
}

.home-sec-more:hover,
.home-template-section__more:hover { color: var(--foreground); }

.tools-section { margin-bottom: 1.6rem; }

.tools-section:last-child { margin-bottom: 0; }

.tools-section__head {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .7rem;
}

.tools-section__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 640;
    color: var(--foreground);
}

.ui-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    padding: 0 .5rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 520;
    line-height: 1;
    white-space: nowrap;
}

.ui-badge--outline {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted-foreground);
}

/* 手机 3 列 / ≥1024px 4 列；间距手机 6px、≥640px 16px（版式基准原值） */
.home-tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.tools-page { width: 100%; min-width: 0; }

/* 批次258：目录页正式页头（业主 11-08「排版再优化一下，高大上一点」）。
   颜色走全站令牌，亮暗两套自动翻面，不硬编码。 */
.tools-page__hero { padding: .5rem 0 1.4rem; }
.tools-page__title { margin: 0 0 .4rem; font-size: 1.6rem; font-weight: 750; color: var(--foreground); letter-spacing: .01em; }
.tools-page__lead { margin: 0 0 .8rem; font-size: .9rem; line-height: 1.7; color: var(--muted-foreground); max-width: 640px; }
.tools-page__count { min-height: 1.6rem; }
@media (max-width: 639px) {
    .tools-page__title { font-size: 1.35rem; }
}

.tools-page__body { padding: .35rem 0 2.5rem; }

/* 批次635：/tools 目录页搜索 + 类目筛选（193 张卡必须可搜；业主死命令）。
   颜色全走令牌，亮暗两套自动翻面；类目条手机横滑，不折成两行挤占首屏。 */
.tools-toolbar { display: flex; flex-direction: column; gap: .65rem; margin: 0 0 1.3rem; }
.tools-search { position: relative; display: flex; align-items: center; max-width: 560px; }
.tools-search__icon {
    position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
    font-size: 1.05rem; color: var(--muted-foreground); pointer-events: none;
}
.tools-search__input {
    width: 100%; height: 2.85rem; padding: 0 2.6rem 0 2.75rem;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--module-bg); color: var(--foreground);
    font-size: .92rem; outline: none;
    -webkit-backdrop-filter: var(--module-blur); backdrop-filter: var(--module-blur);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tools-search__input::placeholder { color: var(--muted-foreground); }
.tools-search__input:focus { border-color: var(--foreground); box-shadow: 0 0 0 3px var(--shadow-intensity); }
.tools-search__input::-webkit-search-cancel-button,
.tools-search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.tools-search__clear {
    position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
    width: 1.8rem; height: 1.8rem; border: 0; border-radius: 50%;
    background: var(--muted); color: var(--muted-foreground);
    font-size: 1.05rem; line-height: 1; cursor: pointer;
}
.tools-search__clear:hover { color: var(--foreground); }
.tools-cats {
    display: flex; gap: .45rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: .15rem; scrollbar-width: none;
}
.tools-cats::-webkit-scrollbar { display: none; }
.tools-cat-chip {
    display: inline-flex; align-items: center; gap: .35rem; flex: 0 0 auto;
    height: 2.1rem; padding: 0 .85rem;
    border: 1px solid var(--border); border-radius: 999px;
    background: transparent; color: var(--muted-foreground);
    font-size: .85rem; white-space: nowrap; cursor: pointer;
}
.tools-cat-chip:hover { color: var(--foreground); border-color: var(--foreground); }
.tools-cat-chip__n { font-size: .72rem; opacity: .7; }
.tools-cat-chip.is-active {
    border-color: var(--selection-border); background: var(--selection-bg);
    color: var(--selection-foreground); font-weight: 600;
}
.tools-result { margin: 0; font-size: .8rem; color: var(--muted-foreground); }
.tools-empty { padding: 2.2rem 0 1rem; text-align: center; }
.tools-empty__title { margin: 0 0 .35rem; font-size: 1rem; font-weight: 650; color: var(--foreground); }
.tools-empty__sub { margin: 0; font-size: .85rem; color: var(--muted-foreground); }
@media (max-width: 639px) {
    .tools-search { max-width: none; }
}

@media (min-width: 640px) {
    .home-tool-grid { gap: 16px; }
}

@media (min-width: 1024px) {
    .home-tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --- ④ 创意模板 --- */
.home-template-sections { padding: .35rem 0 2.5rem; }

.home-template-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

.home-template-section__head h2 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 650;
    color: var(--foreground);
}

.home-template-section__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.home-template-section__shuffle {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    min-height: 2rem;
    padding: 0 .65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    font-size: .78rem;
    cursor: pointer;
    transition: background-color .15s;
}

.home-template-section__shuffle:hover { background: var(--muted); }

.home-template-section__shuffle i { font-size: .9rem; }

.home-template-section__filters {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .85rem;
}

.home-template-section__filters button {
    min-height: 1.9rem;
    padding: 0 .8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--muted-foreground);
    font-size: .78rem;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}

.home-template-section__filters button:hover { background: var(--muted); color: var(--foreground); }

.home-template-section__filters button.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-foreground);
}

.home-template-section__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.home-template-section__empty {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1.4rem 1rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted-foreground);
    font-size: .84rem;
}

.home-template-card {
    position: relative;
    display: block;
    width: 100%;
    /* 批次76-D：封面统一 986×1232（4:5），框同比例 → contain 不留一条缝 */
    aspect-ratio: 4 / 5;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--image-tile-bg);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.home-template-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.home-template-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 18%, transparent);
}

/* 批次76-D（业主 10-12：「点进去制作页面，上面的图应该也是完整显示的，而不是部分显示」）：
   cover 会把参考图裁掉上下（3:4 框装 16:9 图尤其明显），改 contain 整张显示；
   留白由卡片自己的 --image-tile-bg 接住，看着是一个相框，不是破图 */
.home-template-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .3s ease;
}

.home-template-card:hover img { transform: scale(1.04); }

.home-template-card__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted-foreground);
    font-size: 1.6rem;
}

.home-template-card__scrim {
    position: absolute;
    inset: auto 0 0 0;
    height: 48%;
    background: linear-gradient(to top, rgba(9, 9, 11, .78), rgba(9, 9, 11, 0));
    pointer-events: none;
}

.home-template-card__text {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: .6rem .7rem;
    text-align: left;
    color: #fff;
    pointer-events: none;
}

.home-template-card__text strong {
    overflow: hidden;
    font-size: .84rem;
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-template-card__text small {
    overflow: hidden;
    font-size: .7rem;
    opacity: .84;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .home-template-section__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}

@media (min-width: 1024px) {
    .home-template-section__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
}

/* --- 模板详情弹窗（结构照版式基准；提示词按黑箱规矩不显示正文） --- */
.tpl-modal .modal-content {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--card-foreground);
    box-shadow: var(--shadow-md);
}

.tpl-modal .modal-header {
    position: relative;
    display: block;
    padding: 1.1rem 3rem .55rem 1.25rem;
    border-bottom: 0;
}

.tpl-modal__eyebrow { display: block; font-size: .72rem; color: var(--muted-foreground); }

.tpl-modal__title { margin: .15rem 0 0; font-size: 1.05rem; font-weight: 650; }

.tpl-modal__x {
    position: absolute;
    top: .8rem;
    right: .85rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted-foreground);
    font-size: .85rem;
    cursor: pointer;
}

.tpl-modal__x:hover { background: var(--muted); color: var(--foreground); }

.tpl-modal .modal-body { padding: .35rem 1.25rem 1rem; }

.tpl-modal__cover {
    display: none;
    /* 批次76-D：原来是 16:10 横框装竖封面，contain 之后左右空出一大半，像破图。
       改成按高度定框、4:5 同比例居中，参考图整张顶满相框 */
    margin: .25rem auto 0;
    height: min(48vh, 430px);
    width: auto;
    max-width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - .15rem);
    background: var(--image-tile-bg);
}

.tpl-modal__cover.is-on { display: block; }

/* 批次76-D：同首页卡片，cover 改 contain——参考图整张显示，留白由 --image-tile-bg 接住 */
.tpl-modal__cover img { display: block; width: 100%; height: 100%; object-fit: contain; }

.tpl-modal__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem .9rem;
    margin: .85rem 0 0;
    padding: 0;
    font-size: .8rem;
}

.tpl-modal__meta > div { display: flex; gap: .4rem; min-width: 0; }

.tpl-modal__meta dt { flex: 0 0 auto; color: var(--muted-foreground); }

.tpl-modal__meta dd {
    overflow: hidden;
    margin: 0;
    min-width: 0;
    font-weight: 560;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tpl-modal__secret {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin-top: .95rem;
    padding: .6rem .7rem;
    border: 1px solid var(--selection-border);
    border-radius: calc(var(--radius) - .25rem);
    background: var(--selection-bg);
    color: var(--selection-foreground);
    font-size: .78rem;
    line-height: 1.65;
}

.tpl-modal__secret > i { flex: 0 0 auto; margin-top: 2px; }

.tpl-modal__label {
    display: block;
    margin-top: .95rem;
    font-size: .78rem;
    color: var(--muted-foreground);
}

.tpl-modal__extra {
    width: 100%;
    margin-top: .3rem;
    padding: .5rem .65rem;
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) - .2rem);
    background: var(--background);
    color: var(--foreground);
    font-size: .84rem;
    line-height: 1.6;
    resize: vertical;
}

.tpl-modal__extra:focus { outline: none; border-color: var(--ring); }

.tpl-modal .modal-footer {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 1.25rem;
    border-top: 1px solid var(--border);
}

.tpl-modal__cost {
    margin-right: auto;
    font-size: .78rem;
    color: var(--muted-foreground);
}

.tpl-modal__cost b { color: var(--foreground); font-weight: 640; }

/* --- 手机端收口：操作条整行给「立即生成」，摘要别把按钮挤走 --- */
@media (max-width: 640px) {
    .home-hero2 { padding: 1.1rem 0 1rem; }

    .home-composer__right { width: 100%; margin-left: 0; }

    .home-composer__meta {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hc-text { max-width: 6.5rem; }

    .tpl-modal__meta { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 400px) {
    .home-composer-left-actions .home-composer-action { flex: 1 1 auto; }

    .hc-text { max-width: 5rem; }

    .home-template-section__grid { gap: 8px; }
}

/* --- 批次28 补充：编辑器里的「平台模板」芯片 + 超字数态 --- */
/* 芯片是 contenteditable="false" 的整块，必须 inline-flex 才不会被光标拆开；
   颜色全走令牌，暗色下自动翻面，不在这里写死色值 */
.prompt-chip {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    max-width: 100%;
    margin-right: .15rem;
    padding: .05rem .35rem .05rem .45rem;
    border: 1px solid var(--selection-border, var(--border));
    border-radius: 999px;
    background: var(--selection-bg, var(--muted));
    font-size: .78rem;
    line-height: 1.6;
    color: var(--selection-foreground, var(--foreground));
    vertical-align: baseline;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    cursor: default;
}

.prompt-chip > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prompt-chip .remix-icon { font-size: .82rem; line-height: 1; flex: 0 0 auto; }

.prompt-chip-x {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    opacity: .6;
    font-size: .58rem;
    line-height: 1;
    cursor: pointer;
    transition: opacity .15s ease, background-color .15s ease;
}

.prompt-chip-x:hover { opacity: 1; background: rgba(127, 127, 127, .22); }

.prompt-chip-x:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }

/* 超过 2000 字：数字变红，和创作页 .wb-cost.is-over 同一套口径 */
.home-composer__count.is-over { color: var(--danger); font-weight: 640; }

@media (max-width: 400px) {
    .prompt-chip { max-width: 8.5rem; font-size: .74rem; }
}

/* ===================== 批次29：首页生成卡「模型行 + 参数分格」 =====================
   业主 2026-10-04 口令：模型单独占一整行（横排卡片、悬停看厂商简介），
   其余参数一类占一格、一直往后延伸；换模型第二行跟着变——这一家上游不认的
   参数格直接不显示（.hc-hidden 由 home.js 按 GEN_FAMILY_GROUPS 打）。
   选中态沿用全站唯一保留的彩色 --selection，不额外铺品牌色，
   保持版式基准那套中性黑白的「整齐、正规、不粗糙」。 */

/* 用自家类而不是 Bootstrap 的 d-none：d-* 带 !important，JS 反复显隐会被工具类压住 */
.hc-hidden { display: none !important; }

.hc-models {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-top: .5rem;
    padding-top: .65rem;
    border-top: 1px solid var(--border);
}

.hc-models-label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding-top: .5rem;
    font-size: .72rem;
    font-weight: 620;
    letter-spacing: .04em;
    color: var(--muted-foreground);
    white-space: nowrap;
}

/* 不做横向滚动：滚动容器会把悬停简介卡裁掉（overflow-x:auto 会连带裁 y）。
   模型多了就换行排，卡片高度一致，看起来仍然整齐 */
.hc-models-track {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: stretch;
    gap: .45rem;
    min-width: 0;
}

.hc-model {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .38rem .7rem .38rem .45rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.hc-model:hover {
    border-color: var(--selection-border);
    background: var(--selection-hover-bg);
}

.hc-model:focus-visible {
    outline: 2px solid var(--selection-border);
    outline-offset: 1px;
}

.hc-model.active {
    border-color: var(--selection);
    background: var(--selection-bg);
    color: var(--selection-foreground);
    box-shadow: var(--shadow-sm);
}

.hc-model-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: .5rem;
    background: var(--muted);
    color: var(--foreground);
    font-size: 1rem;
}

.hc-model-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.hc-model.active .hc-model-badge {
    background: var(--card);
    color: var(--selection-foreground);
}

.hc-model-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    line-height: 1.3;
}

.hc-model-text b {
    overflow: hidden;
    max-width: 12rem;
    font-size: .8rem;
    font-weight: 640;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hc-model-text small {
    overflow: hidden;
    max-width: 12rem;
    font-size: .68rem;
    color: var(--muted-foreground);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 悬停简介卡：厂商 + 一句话来历 + 这家能调哪几组参数。往上弹，不盖住第二行的参数格 */
.hc-model-tip {
    position: absolute;
    left: 0;
    bottom: calc(100% + .5rem);
    z-index: 40;
    /* 藏起来必须用 display:none，不能用 opacity:0 + visibility:hidden：
       那两种只是画不出来，盒子照样参与排版。最右那颗模型的简介卡宽 291px，
       768 平板上会把文档撑到 863px，凭空多一条 110px 的横向滚动条。
       淡入改由 animation 承担，观感不变。 */
    display: none;
    flex-direction: column;
    gap: .28rem;
    width: max-content;
    max-width: 19rem;
    padding: .6rem .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--popover);
    color: var(--popover-foreground);
    box-shadow: var(--shadow-md);
    pointer-events: none;
}

.hc-model:hover .hc-model-tip,
.hc-model:focus-visible .hc-model-tip {
    display: flex;
    animation: hcTipIn .15s ease;
}

/* 靠右那两颗 chip 的简介卡改成右对齐：默认 left:0 是拿 chip 左沿当起点，
   卡片宽 291px，768 平板上最后一颗一悬停就伸到 863px，页面当场多一条横向滚动条。
   右对齐后卡片右沿贴 chip 右沿，往左展开，永远在视口里。
   只动末尾两颗，前面几颗照旧左对齐，不会顶出屏幕左边。 */
.hc-model:nth-last-child(-n+2) .hc-model-tip {
    left: auto;
    right: 0;
}

/* 窄屏再兜一道：卡片不许宽过视口，省得右对齐也放不下 */
@media (max-width: 991px) {
    .hc-model-tip {
        max-width: min(19rem, calc(100vw - 2rem));
    }
}

@keyframes hcTipIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hc-model-tip b {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 650;
}

.hc-model-tip .hc-model-badge {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: .35rem;
    font-size: .82rem;
}

.hc-model-tip span,
.hc-model-tip em {
    font-size: .73rem;
    line-height: 1.6;
    color: var(--muted-foreground);
}

.hc-model-tip em { font-style: normal; }

/* 第二行末尾那格「预计消耗」：不是下拉，是常显的算价，公式一并摊开给用户看 */
.hc-cost-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .34rem .6rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    font-size: .74rem;
    color: var(--muted-foreground);
    white-space: nowrap;
}

.hc-cost-chip b {
    font-size: .86rem;
    font-weight: 680;
    color: var(--foreground);
}

.hc-cost-chip .hc-formula {
    padding-left: .35rem;
    border-left: 1px solid var(--border);
}

@media (max-width: 900px) {
    .hc-cost-chip .hc-formula { display: none; }
}

@media (max-width: 640px) {
    .hc-models { flex-direction: column; gap: .4rem; }

    .hc-models-label { padding-top: 0; }

    /* 手机没有悬停，简介卡不出；厂商名已经在卡片副标题里。
       选择器必须把 .hc-model:hover / :focus-visible 那两条一起压掉：
       只写 .hc-model-tip 的话特异性低于悬停规则，触屏浏览器点一下触发粘性 :hover，
       简介卡照样弹出来，还会把 390 的页面撑宽 108px。 */
    .hc-model-tip,
    .hc-model:hover .hc-model-tip,
    .hc-model:focus-visible .hc-model-tip {
        display: none;
    }

    .hc-model { flex: 1 1 calc(50% - .45rem); }

    .hc-model-text b,
    .hc-model-text small { max-width: 9rem; }
}

/* ==========================================================================
   批次30：首页「深色炫耀舞台」（吸收 业主指定的深色舞台基准 的气质）
   --------------------------------------------------------------------------
   业主口径：要 业主指定的深色舞台基准 那种深色、华丽、往下拉很炫的效果，但我们已开发的功能
   一个不动，只是「换成他这种颜色融入进去」。

   所以做法不是重排结构，而是给首页套一个 .hx-stage 深色作用域：
   在这个作用域里把语义令牌整体翻成近黑 + 玻璃白，composer / 功能卡 /
   模型排 / 效果图墙这些已有组件读的都是同一批令牌，于是自动全部融入深色，
   一行旧结构都不用改。其他页面和后台不在这个作用域里，零影响。

   三条硬约束：
   1. 不给 .hx-hero 加 overflow:hidden。生成卡里模型的悬停简介卡是往上弹的
      绝对定位层，hero 一裁它就没了。裁剪只发生在 .hx-aurora 自己身上，
      光斑用负偏移定位在 aurora 内被裁掉，不会撑出横向滚动条。
   2. 滚动淡入靠 html.reveal-ready 门控。直接写 .reveal{opacity:0} 的话，
      JS 一旦没加载整页内容就永久隐形——那是事故不是动画。
   3. 半透明玻璃卡必须配 backdrop-filter，否则透出来的是脏底不是玻璃。

   整段是纯视觉，index.php 里 $homeStageOn 一个开关就能退回原样。
   ========================================================================== */

/* --- 深色舞台令牌：亮暗主题下首页都走这一套（业主指定的深色舞台基准 是强制深色） --- */
.hx-stage {
    --background: #0b0b0e;
    --bg-color: #0b0b0e;
    --card: rgba(255, 255, 255, .055);
    --card-bg: rgba(255, 255, 255, .055);
    --foreground: #f5f5f7;
    --text-main: #f5f5f7;
    --muted: rgba(255, 255, 255, .08);
    /* 次要文字统一 .66 起：首页可以挂背景视频，亮帧会把玻璃底抬到 rgb(70,70,70) 左右，
       .62 在那一档实测 4.47，差 0.03 就破线，不留这种擦边余量 */
    --muted-foreground: rgba(245, 245, 247, .66);
    --text-muted: rgba(245, 245, 247, .66);
    --text-placeholder: rgba(245, 245, 247, .58);
    /* --gray-600 也得跟着翻（146 处 color 用它，是全站次要文字的主力令牌）。
       它在 html 那层是深灰（亮色 #4b5563 / 暗色 #c3c3c9），首页不分亮暗都是深色舞台，
       亮色主题下不翻就是「深字压深底」——靶场 CSSOM 实测注入 .hx-stage 后拿到的正是 #4b5563。
       和上面 --text-muted 同一个值，口径一致。 */
    --gray-600: rgba(245, 245, 247, .66);
    --border: rgba(255, 255, 255, .11);
    --card-border: rgba(255, 255, 255, .11);
    --input: rgba(255, 255, 255, .14);
    --control-bg: rgba(255, 255, 255, .04);
    --control-border: rgba(255, 255, 255, .14);
    --hover-bg: rgba(255, 255, 255, .09);
    --pill-bg: rgba(255, 255, 255, .08);
    --pill-border: rgba(255, 255, 255, .12);
    --pill-text: rgba(245, 245, 247, .66);
    --image-tile-bg: rgba(255, 255, 255, .06);
    --studio-soft: rgba(255, 255, 255, .07);
    /* 选中态这一组必须跟着翻。亮色主题下 --selection-bg 是 #eef2ff 浅紫、
       --selection-foreground 是深靛蓝，深色舞台只翻了前景没翻这组的话，
       生成卡里选中的模型 chip 就变成「浅紫底 + 玻璃白字」，实测比值 1.02＝隐形。
       取值直接照搬 html[data-theme="dark"] 那一套，两处口径永远一致。 */
    --selection: #818cf8;
    --selection-foreground: #c7d2fe;
    --selection-bg: #6366f129;
    --selection-hover-bg: #6366f11a;
    --selection-border: #818cf894;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .42);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, .46);
    /* 批次31-D：水滴玻璃令牌必须跟着这套深色作用域一起翻。
       文件末尾的家族配方是无条件 `background: var(--module-bg)`，特异性只有 0,1,0，
       会盖过 `.hx-stage .ui-card` 那批只补 backdrop-filter 的规则；不翻的话亮色主题下
       首页生成卡变成 rgb(162,162,163) 的亮灰玻璃压在近黑舞台上（靶场实测）。
       取值和 html[data-theme="dark"] 那一套完全一致，两处口径永远同步。 */
    --module-bg: rgba(255, 255, 255, .055);
    --module-bg-hover: rgba(255, 255, 255, .10);
    --module-border: rgba(255, 255, 255, .10);
    /* 前景令牌也得跟着翻，而且必须在这个作用域里**重新声明**：
       `--primary-light: var(--muted)`、`--surface: var(--card)` 这种间接写法在 html 上
       就已经算成了亮色主题的值，子元素只继承那个算好的值，改 --muted / --card 是拉不动
       它的（批次30 给 --text-main 单独写死值就是同一个道理）。所以这里把「底色 + 底色上
       的字」成对补齐，缺一个就会出现深字压深底（隐形）或白字压白底。
       靶场 31-D 实测抓到的两处：.ui-card 里没自己设色的文字全是 #0f172a 压 rgb(24,24,27)
       = 比值 1.01 完全看不见；生成卡的「模式」chip 底色 --primary-light 还是浅色，
       字却跟着 --card-foreground 翻成了白色 = 白压 #f4f4f5，比值 1.01。 */
    --card-foreground: #f5f5f7;
    --accent-foreground: #f5f5f7;
    --primary-fg: #f5f5f7;
    --primary-dark-fg: #f5f5f7;
    --accent-fg: #f5f5f7;
    --grad-from-fg: #f5f5f7;
    --grad-to-fg: #f5f5f7;
    --primary-light: rgba(255, 255, 255, .08);
    --surface: rgba(255, 255, 255, .055);
    --gray-50: rgba(255, 255, 255, .05);
    --gray-100: rgba(255, 255, 255, .09);
    --gray-200: rgba(255, 255, 255, .14);
    --popover: #18181b;
    --popover-foreground: #fafafa;
    --secondary: #27272a;
    --secondary-foreground: #fafafa;
    background: var(--background);
    color: var(--foreground);
}

/* 玻璃组件统一补毛玻璃：半透明卡不 blur 就是脏底 */
.hx-stage .ui-card,
.hx-stage .ui-button,
.hx-stage .hc-drop-menu {
    backdrop-filter: blur(14px) saturate(1.35);
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
}

/* 未登录时生成卡右下角的「登录 / 注册」是裸文字，不是主按钮上的字。
   它读的 --primary-fg 在 :root 就被解析成亮色主题的深墨色（那值是给浅色主按钮配的），
   .hx-stage 只翻 --foreground 翻不到它，压在近黑舞台上实测 1.01＝完全看不见。
   这里单独给成玻璃白，不动 --primary-fg 本身，真按钮上的字照旧。 */
.hx-stage .home-composer__meta a {
    color: rgba(245, 245, 247, .82);
}

/* 生成卡里「模式」下拉的选中项 / 展开态 chip 底色读 --primary-light，副标题读 --gray-600。
   31-D 把 --primary-light 在舞台作用域里翻成了玻璃白之后，这块底变深，原来那档 #64748b
   的浅灰副标题压上去只剩 2.9，所以副标题跟着走舞台的次要文字口径（.66 白，实测 8.6）。 */
.hx-stage .gchip-opt-sub {
    color: rgba(245, 245, 247, .66);
}

/* --- Hero 舞台 --- */
.hx-hero {
    position: relative;
    isolation: isolate;
}

/* 光斑层：铺满 hero、压在内容下面、不吃鼠标、自己裁自己 */
.hx-aurora {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* --- 水滴：圆润有机轮廓 + 大半径模糊 + 缓慢游动 ---
   三团各走不同周期和负延迟，永远不会同步呼吸，看起来才是「活的」 */
.hx-drop {
    position: absolute;
    border-radius: 50%;
    filter: blur(58px);
    will-change: transform;
    animation: hxFloat 24s ease-in-out infinite;
}

.hx-drop--1 {
    width: 30rem;
    height: 30rem;
    left: -9rem;
    top: -11rem;
    opacity: .5;
    background: radial-gradient(circle at 36% 30%, rgba(99, 102, 241, .38), rgba(99, 102, 241, 0) 68%);
}

/* 这一团是真正的水滴形：四个半径各不相同，转出有机的水滴轮廓 */
.hx-drop--2 {
    width: 24rem;
    height: 24rem;
    right: -7rem;
    top: -6rem;
    opacity: .44;
    border-radius: 62% 38% 55% 45% / 45% 55% 38% 62%;
    background: radial-gradient(circle at 60% 38%, rgba(56, 189, 248, .32), rgba(56, 189, 248, 0) 70%);
    animation-duration: 30s;
    animation-delay: -7s;
}

.hx-drop--3 {
    width: 17rem;
    height: 17rem;
    left: 44%;
    bottom: -7rem;
    opacity: .36;
    border-radius: 44% 56% 62% 38% / 55% 42% 58% 45%;
    background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, .28), rgba(168, 85, 247, 0) 70%);
    animation-duration: 36s;
    animation-delay: -14s;
}

/* --- 左侧业务导航栏（排版照 fabricator.watestar.com 的宽分组栏）---
   业主 2026-10-04：不要 业主指定的深色舞台基准 的窄图标条（看不懂干嘛的），要这种分组带文字的，
   「让用户看到左边是干嘛用的，一目了然」。
   同夜补口径（业主发 业主指定的深色舞台基准 左栏截图 + 水滴玻璃模块截图）：信息架构不变（分组+文字保留），
   皮肤换进整站那一种「水滴玻璃」家族——毛玻璃深底、圆角丸条目、选中=白底黑字丸
   （照 业主指定的深色舞台基准 左栏「探索」的选中态）、组名小字宽字距、品牌标金色渐变块。
   ≥992px 固定左侧并取代桌面顶导航（一屏只留一个主导航）；
   <992px 整栏隐藏，手机继续用顶栏 + 抽屉——固定左栏在小屏没地方放。 */
.sn-bar {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1030;
    width: 13rem;
    flex-direction: column;
    background: rgba(11, 11, 14, .86);
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
    backdrop-filter: blur(14px) saturate(1.35);
    border-right: 1px solid rgba(255, 255, 255, .08);
}

@media (min-width: 992px) {
    .sn-bar { display: flex; }

    /* 顶栏/内容/页脚整体给左栏让位。顶栏是 sticky，margin-left 后照样吸顶。
       .default-header 自带 width:100%（style.css:5601），只给 margin-left 会让它
       整条往右溢出 13rem——被 body 的 overflow 裁掉后文档级 scrollWidth 看不出来，
       但右侧操作区实际已经被推出屏幕，所以这里必须同时把宽度减掉。
       .app-main/.app-footer 是 body 这个 flex 列的 stretch 项，width:auto，
       margin-left 会正常吃掉宽度，不用额外声明。 */
    body.has-sidenav .default-header { margin-left: 13rem; width: calc(100% - 13rem); }

    body.has-sidenav .app-main,
    body.has-sidenav .app-footer { margin-left: 13rem; }

    /* 桌面已有左栏当主导航，顶栏的 7 项导航收掉，只留品牌 + 右侧操作 */
    body.has-sidenav .nav-menu { display: none; }

    /* 批次72 把原来挂在这里的「内页加宽」两条规则整块挪到文件后面的 @media (min-width:1280px)
       里，并改成与首页同一条几何 —— 留在 992 这档会造成 992~1279 这一段内页比首页宽
       （首页的壳解锁是 hero31.css 的 ≥1280），正是业主「左右宽度不一致」的其中一段。 */
}

/* 批次72（业主 2026-10-12 第 N 次点名：「前台风格左右宽度一致的问题，我之前讲过很多次了，
   至今没有解决」）：前台内容页的左右宽度**全站只有一条几何**，就是首页那一条。
   业主原话「首页这个排版（左边栏目之外、右边显示内容）我感觉挺满意的」——基准是首页，
   不是「每页各自看着还行」。

   线上实测（1920 视口，同源 iframe 量）改前是三套宽度并存：
     · 首页         内容 232 → 1881，宽 1649（壳 max-width:none + main 只让位左栏 13rem）
     · /inspiration 内容 344 → 1784，宽 1440（批次34 给内页顶的 max-width:1440 + 计算式居中偏移）
     · /article     内容 337 → 1777，宽 1440（同上）
     · /style       内容 467 → 1647，宽 1180（上面那层 1440 之外，页内又套了 bootstrap .container）
   真凶是两层：批次34 那条 `:not(.page-home)` 把首页刻意排除在内页加宽之外（当年注释写
   「业主已满意，不动」），于是首页 1649、内页 1440；再叠上各页私有容器 → 1180。
   所以逐页微调永远修不完：改一页只是把它挪成第四种宽度。

   修法＝把首页那条几何写成**全部内容页共用的一条规则**：壳拉满 body、main 只减 13rem 让位、
   不设 max-width、左右各留壳的 24px 内衬。首页本来就是这个值（实测 main margin-left:208px
   = 13rem），所以首页一像素不动，是内页向首页对齐。
   阈值取 1280 与 hero31.css 的首页壳解锁同档：992~1279 这一段内外页都回到
   「壳 max-width:1280 居中 + main 让位 13rem」，两者优先级同源、边线数值相同。
   刻意排除 page-workbench / page-agent：那两页是全出血工作页，各自另有 .app-shell{padding:0}
   + .app-main{max-width:none}（批次35），不能被这里的 13rem 让位改口径。 */
@media (min-width: 1280px) {
    body.has-sidenav:not(.page-workbench):not(.page-agent) .app-shell {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }

    body.has-sidenav:not(.page-workbench):not(.page-agent) .app-main {
        max-width: none;
        margin-left: 13rem;
        margin-right: 0;
    }
}

/* 批次35：工作台在宽屏被挤成 1024px 且整体偏右。
   两段老规则叠出来的：.app-shell 保留 max-width:1280 + margin:0 auto 的居中框（上面那段
   刻意把 page-workbench 排除在放宽名单外），而 body.has-sidenav .app-main 的 margin-left:13rem
   源码顺序在 body.page-workbench .app-main{margin:0} 之后、同特异性所以赢——
   于是内容宽 = min(1280, 视口) − 48 内边距 − 208 让位，1920 屏实测左空 546 / 右空 352，
   右栏只剩 462px、记录卡 92px 宽，业主原话「所有排版必须左右宽度一致」。
   工作台本就是全出血工作页：解除居中框和外层留白，让位只留左边一条 13rem，
   左右两栏各用自己的 24px 内边距贴边，左栏右缘到右栏右缘铺满可视区。 */
@media (min-width: 1200px) {
    body.has-sidenav.page-workbench .app-shell {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    body.has-sidenav.page-workbench .app-main {
        max-width: none;
        margin-left: 13rem;
        margin-right: 0;
    }
}

.sn-head {
    flex: 0 0 auto;
    /* 批次40：左右内边距跟 .sn-scroll 的 .8rem 对齐，品牌行和 12 行胶囊共用同一条左右边线 */
    padding: 1rem .8rem .9rem;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.sn-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    /* 品牌位高度锁死：后台三档显示（Logo+文字/纯文字/纯Logo）切换时槽位不缩不涨，
       纯文字档靠这行撑到和 Logo 同高 */
    min-height: 1.7rem;
    color: #f5f5f7;
    text-decoration: none;
}

.sn-brand__logo {
    width: 1.7rem;
    height: 1.7rem;
    object-fit: contain;
    border-radius: .45rem;
}

.sn-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: .55rem;
    background: linear-gradient(140deg, #f7d9a0, #c9963f);
    color: #241a08;
    font-size: 1rem;
}

.sn-brand__name {
    font-size: .95rem;
    font-weight: 660;
    letter-spacing: .02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sn-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem .8rem 1.2rem;
    /* 业主两次点名禁左栏出现竖滚动条：条目比屏高多时仍要能滚，但滚动条必须隐形 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sn-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }

.sn-nav { display: flex; flex-direction: column; gap: .3rem; }

.sn-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .62rem .85rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: .8rem;
    background: rgba(255, 255, 255, .05);
    color: rgba(245, 245, 247, .72);
    font-size: .9rem;
    text-decoration: none;
    transition: background .16s ease, color .16s ease;
}

.sn-link i { font-size: 1.15rem; flex: 0 0 auto; }

.sn-link:hover { background: rgba(255, 255, 255, .08); color: #f5f5f7; }

/* 选中态=白底黑字丸（业主指定的深色舞台基准 左栏「探索」同款），深底上比描边醒目一个量级 */
.sn-link.is-active {
    background: #ffffff;
    color: #141416;
    font-weight: 600;
}

.sn-link.is-active:hover { background: #ffffff; color: #141416; }

/* 批次34：分组标题「创作 / 我的」按业主口径去掉，条目连着往下排；
   分组外壳只留语义，间距归零跟条目间距一致 */
.sn-group { margin-top: 0; }

.sn-foot {
    flex: 0 0 auto;
    /* 批次40：同 .sn-head，用户卡/底部三链接与导航胶囊同一条左右边线 */
    padding: .8rem .8rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.sn-foot__links {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .8rem;
    font-size: .72rem;
}

/* 深底上透明度低于 .55 的灰字实测掉到 4.5:1 以下，这一带的辅助文字统一守住 .55 起 */
.sn-foot__links a { color: rgba(245, 245, 247, .58); text-decoration: none; }

.sn-foot__links a:hover { color: rgba(245, 245, 247, .8); }

/* --- 批次34-seg9：登录/账户块搬进左栏底部（业主 3.png「把登录也放在左边」）---
   深底上沿用 .sn-link 那族 rgba 白，登录态=头像+昵称+积分，右侧退出图标；
   未登录=登录(描边)+注册(白底黑字主按钮)。手机 <992 整栏隐藏，顶栏账户块照常。 */
.sn-user {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .85rem;
    padding: .55rem .6rem;
    border-radius: .9rem;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .07);
}

.sn-user__main {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex: 1 1 auto;
    min-width: 0;
    text-decoration: none;
}

.sn-user__avatar {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, .12);
}

.sn-user__avatar--fb {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 600;
    color: #f5f5f7;
}

.sn-user__meta { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }

.sn-user__name {
    font-size: .84rem;
    font-weight: 600;
    color: #f5f5f7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sn-user__credits { font-size: .7rem; color: rgba(245, 245, 247, .58); }

.sn-user__credits strong { color: rgba(245, 245, 247, .85); font-weight: 600; }

.sn-user__logout {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: .6rem;
    color: rgba(245, 245, 247, .5);
    text-decoration: none;
    transition: background .16s ease, color .16s ease;
}

.sn-user__logout i { font-size: 1.1rem; }

.sn-user__logout:hover { background: rgba(255, 90, 90, .16); color: #ff8080; }

.sn-auth { display: flex; gap: .5rem; margin-bottom: .85rem; }

.sn-auth a {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem 0;
    border-radius: .8rem;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.sn-auth__login {
    color: rgba(245, 245, 247, .8);
    border: 1px solid rgba(255, 255, 255, .18);
}

.sn-auth__login:hover { background: rgba(255, 255, 255, .08); color: #f5f5f7; }

.sn-auth__reg { background: #ffffff; color: #141416; }

.sn-auth__reg:hover { background: rgba(255, 255, 255, .88); color: #141416; }

/* --- Hero 文案居中 + 宽字距（业主指定的深色舞台基准 那两行大标题的气质全在字距上）--- */
.hx-eyebrow {
    margin: 0 0 1.1rem;
    text-align: center;
    font-size: .74rem;
    letter-spacing: .42em;
    text-indent: .42em;
    color: rgba(245, 245, 247, .55);
}

.hx-hero .home-hero2__title {
    text-align: center;
    /* 宽字距 + 细一点的笔画：版式基准标题是细衬线感，我们没有衬线字体文件，
       靠字距和字重逼近，不引外部字体（服务器禁额外资源、首屏也不能等字体） */
    font-size: clamp(1.5rem, 6.2vw, 3.1rem);
    font-weight: 520;
    letter-spacing: .30em;
    text-indent: .30em;
    line-height: 1.55;
}

.hx-hero .home-hero2__guest { text-align: center; }

/* --- 四个玻璃功能卡：hero 底部一整排，排不下自动换行往下走 --- */
.hx-cards {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.6rem;
}

.hx-card {
    flex: 1 1 13rem;
    /* __sub 是 nowrap 单行省略，flex 项的自动最小尺寸会等于整句文字宽，
       窄屏时卡片被撑到只能一行一张。显式归零后 flex-basis 才算数，
       一行两张、副标题该省略就省略。 */
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .95rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: .9rem;
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(14px) saturate(1.35);
    -webkit-backdrop-filter: blur(14px) saturate(1.35);
    color: #f5f5f7;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.hx-card:hover {
    background: rgba(255, 255, 255, .10);
    border-color: rgba(255, 255, 255, .22);
    transform: translateY(-2px);
}

.hx-card__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .7rem;
    background: rgba(255, 255, 255, .10);
    font-size: 1.25rem;
}

.hx-card__body { display: flex; flex-direction: column; gap: .12rem; min-width: 0; }

.hx-card__no {
    font-size: .62rem;
    letter-spacing: .18em;
    /* .62 是给背景视频留的余量：视频碰上一帧亮画面时玻璃卡底色会被抬到 rgb(60,60,60) 附近，
       .55 在这一档只有 4.29，压不住 4.5:1 */
    color: rgba(245, 245, 247, .62);
}

.hx-card__title { font-size: .98rem; font-weight: 640; }

.hx-card__sub {
    font-size: .74rem;
    color: rgba(245, 245, 247, .58);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hx-card__arrow { margin-left: auto; flex: 0 0 auto; color: rgba(245, 245, 247, .5); }

/* --- 滚动提示：hero 底部居中的鼠标图标，缓慢上下浮 --- */
.hx-scroll-hint {
    display: flex;
    justify-content: center;
    margin-top: 1.8rem;
    font-size: 1.35rem;
    color: rgba(245, 245, 247, .5);
    animation: hxBob 2.2s ease-in-out infinite;
}

@keyframes hxBob {
    0%, 100% { transform: translateY(0); opacity: .5; }
    50% { transform: translateY(.4rem); opacity: .9; }
}

/* --- 段头：左标题 + 右说明/更多，整站深色舞台统一一套 --- */
.hx-sec-head {
    display: flex;
    align-items: baseline;
    gap: .9rem;
    margin: 0 0 1rem;
}

.hx-sec-head h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 660;
    letter-spacing: .04em;
    color: #f5f5f7;
}

/* 批次33：.hx-stage 那层实心底拆掉之后，这行小字直接压在背景视频上。
   原来 .5 透白压最坏一帧（纯白视频帧合成后 rgb(57,57,60)）只有 3.95:1，
   抬到 .62 = 5.16:1，字还是「次要说明」的灰度层级，不会跟大标题抢。 */
.hx-sec-sub { font-size: .78rem; color: rgba(245, 245, 247, .62); }

.hx-sec-more {
    margin-left: auto;
    font-size: .78rem;
    color: rgba(245, 245, 247, .6);
    text-decoration: none;
    white-space: nowrap;
}

.hx-sec-more:hover { color: #ffffff; }

/* --- 模型宣传横排：横向滚动。这一排没有往上弹的悬停层，overflow-x 安全 --- */
.hx-rail-section { margin-top: 2.6rem; }

.hx-rail {
    display: flex;
    gap: .8rem;
    overflow-x: auto;
    padding: .2rem .1rem .7rem;
    scrollbar-width: thin;
}

.hx-rail-card {
    position: relative;
    flex: 0 0 11.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1.5rem 1rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: .9rem;
    background: rgba(255, 255, 255, .045);
    text-align: center;
}

.hx-rail-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    font-size: 2rem;
    color: #f5f5f7;
}

.hx-rail-logo img { width: 100%; height: 100%; object-fit: contain; }

.hx-rail-name { font-size: .95rem; font-weight: 640; color: #f5f5f7; }

.hx-rail-intro {
    font-size: .72rem;
    line-height: 1.5;
    color: rgba(245, 245, 247, .55);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hx-rail-badge {
    position: absolute;
    top: .55rem;
    right: .55rem;
    padding: .12rem .45rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, .28);
    color: #c7d2fe;
    font-size: .62rem;
    letter-spacing: .06em;
}

/* --- 对外展示作品墙：多列瀑布流，作品整张显示，说明放在图下面 ---
   P0（业主 10-08）：原来是 grid + 卡片钉死 aspect-ratio:3/4 + 图片 object-fit:cover，
   线上实测——社区公开作品 12 张**全部被裁掉 25%**（原图多是 1:1 和 9:16），平台爆款 10 张里
   4 张被裁最多 28%；再叠上压在图上的说明渐变块（实测盖住图片高度 35%），
   客户实际只看得到作品的「中间偏上一小块」。业主原话「你既然是图片生成展示网站，
   你的东西都展示不全，很影响别人对你这个网站商业的兴趣……像生成记录里面一样，
   上下紧凑着来，一定要完全展示出来」。
   所以整段换成 /inspiration、/records 同一套口径：图片一个字都不裁、说明移到图片下方独立一块。
   批次76-A 再进一步（业主 2026-10-12 逐字）：「首页的图片排版应该从左到右，而不是从上到下」
   「既保证整个图片完全显示出来，又对齐」——column-count 是列优先（一列排满才排下一列），
   所以改成行优先的等高网格：格子 1:1 定框、图片 contain 整张显示、格子实底接住留白。 */
.hx-wall { margin-top: 2.6rem; }

.hx-wall__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .6rem;
}

/* 批次80：断点与创意模板墙（.home-template-section__grid ≥1024 五列）对齐。
   原来 1024–1199 这一段是四列，业主真机窗口正落在这段：10 格排成 4+4+2 三排，
   而同一屏的创意模板是 5+5 两排——「也 10 个 2 排」在他屏幕上就不成立。
   两段墙只被首页用（view/home/index.php 两处），改断点不波及别页。 */
@media (max-width: 1023px) { .hx-wall__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 719px)  { .hx-wall__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; } }

.hx-work {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    border-radius: .8rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .09);
    /* 实底深色相框，两套主题都一样。作品图是不透明的，卡片底色只会在图下方那条说明带露出来；
       说明带是白字，压视频/压亮色页面都必须有实底才读得出（白字实底对比 19.7:1、
       次级字 10.7:1）。这跟 .stx-cmp-box 同一档，是「不透明层扫描」的白名单项，不是漏改。 */
    background: #0b0b10;
    text-decoration: none;
}

/* 批次76-A：卡片间距统一由网格 gap 给（含 ≤719 的 .5rem），卡片自己不再挂 margin-bottom */

.hx-work__img {
    display: block;
    width: 100%;
    /* 批次76-A：1:1 定框 + contain —— 整张图完整显示，同时每行格子等高，行优先从左到右排。
       竖图左右留白、横图上下留白，留白处是卡片实底 #0b0b10（与说明带同色，看着是一个相框） */
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: contain;
    transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}

.hx-work:hover .hx-work__img { transform: scale(1.03); }

.hx-work__img--empty {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(245, 245, 247, .3);
    font-size: 1.6rem;
}

.hx-work__cap {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: .5rem .65rem .6rem;
}

.hx-work__cap b {
    font-size: .8rem;
    font-weight: 600;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hx-work__cap span {
    font-size: .68rem;
    color: rgba(245, 245, 247, .78);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hx-work__rank {
    position: absolute;
    top: .5rem;
    left: .5rem;
    padding: .14rem .5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    /* 批次33：原来是 #fff，白字压金色渐变实测只有 2.15:1（10px 小字要 4.5:1），
       线上看就是「金牌上一团糊白」。改深棕刻字：压金色端 8.3:1、压红色端 4.74:1，
       金牌本身的颜色一点没动，只是字从「贴白纸」变成「刻上去」。 */
    color: #241403;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .06em;
}

/* --- 滚动淡入：必须靠 html.reveal-ready 门控 ---
   JS 没跑起来时这个类不存在，.reveal 就是普通块，内容照常显示；
   直接写 .reveal{opacity:0} 的话弱网/被拦时整页内容永久隐形，那是事故不是动画 */
html.reveal-ready .reveal {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition: opacity .62s cubic-bezier(.22, .61, .36, 1), transform .62s cubic-bezier(.22, .61, .36, 1);
}

html.reveal-ready .reveal.is-in {
    opacity: 1;
    transform: none;
}

/* --- 降级：用户系统开了「减少动态」就全停，光斑/浮动/淡入一律静止 --- */
@media (prefers-reduced-motion: reduce) {
    .hx-drop,
    .hx-scroll-hint { animation: none; }

    html.reveal-ready .reveal { opacity: 1; transform: none; transition: none; }

    .hx-work:hover .hx-work__img { transform: none; }
}

/* --- 手机收口：玻璃卡两列、横排卡变窄、作品墙两列 --- */
@media (max-width: 640px) {
    .hx-cards { gap: .6rem; }

    .hx-card { flex: 1 1 calc(50% - .3rem); padding: .8rem .8rem; }

    .hx-card__sub { display: none; }

    .hx-rail-card { flex: 0 0 9.5rem; }

    html.reveal-ready .reveal { transform: translate3d(0, 14px, 0); }
}

/* ==========================================================================
   批次31-C —— 水滴玻璃模块家族（整站电脑版的唯一模块皮肤）
   业主 10-04 夜死口径：「所有的模块、所有相关部分都是做这种水滴玻璃模块，
   整套系统都是这样的，起码电脑版是这样」；AI 绘图要科技感，不能这边白那边玻璃、
   这边圆角那边尖角。所以这里把各页自己的面板类一次性收进同一家族：
   半透底 + 毛玻璃 + 1.1rem 大圆角 + 细描边，亮暗两套值走 --module-* 令牌。
   放在文件最末尾 = 压过各页早先写的实底皮肤，不用去逐个页面改。
   手机版不动：小屏先能用，后期再优化（业主原话）。
   ========================================================================== */
.ui-card,
.wb-card,
.wb-shell,
.editor-accordion-item,
.edit-tool-card,
.tool-card,
.tools-section,
.article-panel,
.records-panel,
/* 批次33：/style 的卡片原来在视图内联 <style> 里刷实底（加载在 style.css 之后会反杀家族），
   内联 background 删掉后在这里正式收进家族——它和 .waterfall-card 同级，是模块级容器 */
.stx-card,
.stx-panel,
.hp-card,
.member-sidebar-card,
.credits-block,
.tpl-card,
/* --- 批次31-D 补全：把前台剩下的模块级面板全收进来 ---
   业主死命令是「所有的模块、所有相关部分」，31-C 只收了 14 个类，
   逐页核下来还有一批实底面板漏在外面（工作台/创作页记录卡/灵感墙卡/会员套餐卡/
   订单/支付/Agent/提示词工坊/帮助中心/文章特写/尺寸试算弹窗/精选案例外层）。
   漏一个就是业主说的「左边是白色，右边是水滴的」。
   收录口径：只有**模块级容器**进这一组；按钮/芯片/标签/页签/输入框/图片框
   一律不进（图片框要按图底色走，见「contain 定框底色跟图底色」那条规矩），
   模块**里面**的次级小块走下面那组只继承圆角、不叠第二层玻璃。
   类名来源逐个核过：view/ 树里在用的 + public/js/ 里动态渲染的
   （hcard / waterfall-* / pkg-card / order-* / pay-qr-card / ag-card / sc-dialog /
   tpl-card 都是 JS 拼出来的，只 grep 视图会漏）。
   .cases-panel 原来在 5096 行被刷成全透明（批次24 对齐 业主指定的版式基准 的口径），
   现在按新死命令跟 .records-panel 统一成玻璃；那条透明规则在前面、同特异性，
   这里在文件末尾所以压得过，不用去改它。 */
.card-custom,
.wb-panel,
.wb-main,
.sec-panel,
.genbar,
.hcard,
.waterfall-item,
.waterfall-card,
.pkg-card,
.order-item,
.pay-qr-card,
.ag-room,
.ag-card,
.ag-composer,
.ag-ability,
.ag-closed,
.pw-card,
.pw-result,
.pw-closed,
.hp-faq-item,
.hp-doc,
.sc-dialog,
.article-feature-card,
.member-content-card,
/* --- 批次31-E 反向扫描补漏：家族清单是「我想到要加的」，这一组是「漏掉的」 ---
   靶场 __familyGap() 把整份 CSS 里所有「光杆单类名 + 不透明白底 + 不在家族三张清单里」
   的规则全翻出来（48 条嫌疑），逐条拿 view/ 和 public/js/ 核真实用法之后，
   只有下面三个是**模块级**漏网：
     .home-notice        首页顶部公告条，跟它上下的玻璃模块并排（view/home/index.php:373）
     .app-footer__qr-pop 页脚微信客服二维码弹层，浮在页脚上的一张小卡（view/layout/main.php:590）
     .pkg-fail           套餐不可用时整格顶替 .pkg-card 的占位（public/js/credits.js:40/96/102），
                         位置尺寸都和玻璃套餐卡同级，不做玻璃就是「一排水滴里夹一块白板」
   其余 45 条是按钮/药丸/页签/芯片/输入框/图片框/信息小格，按家族口径本来就不做玻璃。
   两条命中但刻意不改：.auth-card（31-C 已在文末单独给了深色玻璃，扫描命中的是它前面那条
   旧的 var(--surface)，同特异性后者胜出）、.tool-card--shadcn（元素同时挂着已进家族的
   .tool-card，家族在文件末尾所以压得过——靶场按复合类名实测过）。
   .home-why-card / .stat-card 也命中了，但 grep 全树只有 CSS、没有模板也没有 JS 引用，
   是死规则，不给死代码上皮肤。 */
.home-notice,
.app-footer__qr-pop,
.pkg-fail,
.hub-card,
.hub-closed,
.cases-panel {
    background: var(--module-bg);
    border: 1px solid var(--module-border);
    border-radius: var(--module-radius);
    -webkit-backdrop-filter: var(--module-blur);
    backdrop-filter: var(--module-blur);
}

/* .pkg-fail 的虚线描边是「这块现在没内容」的语义信号，上面那条 border 简写会把它刷成实线，
   这里只把线型改回来，颜色和宽度仍由 --module-border 统一管 */
.pkg-fail { border-style: dashed; }

/* 模块里的次级小块（行/头/内嵌提示框/空状态）只继承圆角语言，
   不叠第二层玻璃，避免糊成一团 */
.member-info-row,
.editor-input-row,
.pay-order-row,
.pay-order-box,
.pay-proof-box,
.pay-contact-box,
.pw-block-body,
.ag-card-head,
.ag-card-foot,
.ag-hist-row,
.hp-empty,
.hub-soon,
.order-empty,
.member-tab-empty,
.history-empty-inline {
    border-radius: calc(var(--module-radius) - .35rem);
}

/* 两个刻意排除的：
   .ag-md 是 Agent 聊天气泡，靠 border-top-left-radius: 4px 做出「尾巴」，
   套家族的 border-radius 简写会把尾巴抹平；.pw-mini 是 999px 全圆药丸。
   两者都不是模块，保持原样。 */

/* ==========================================================================
   批次31-C —— 登录/注册/找回密码三页进同一种水滴玻璃排面
   业主 10-04 夜：「登录页面使用 业主指定的深色舞台基准 点击登录过后出现的页面设置电脑版这一块」，
   即深色舞台 + 玻璃模块 + 衬线大标题那套排面。业主指定的深色舞台基准 没有手机版这一页，
   业主口径也是电脑版优先，所以这里不分亮暗主题：认证三页恒定深色舞台，
   和首页 hero 同一个底色家族，访客第一眼看的就是门面。
   只改皮肤：模板/表单/JS 一行没动，禁用告知块的红底白字刻意保留（警示色不参与换肤）。
   ========================================================================== */
.auth-page {
    --auth-fg: #f5f5f7;
    /* 批次33：暗壳从全不透明降到 .78/.72，视频从底下透出来（业主 10-04「壳降到半透明」）。
       .62 那一档在视频亮帧下实测不够：亮色主题背景层是白纱，最坏合成到 rgb(250)，
       壳 .62 只压到 rgb(103)，白字勉强、灰字破线。.78 压到 rgb(66)、.72 压到 rgb(56)，
       次要文字 .72 白在最坏那一档 = 5.47:1，登录卡内 = 8.47:1。
       这三页的文字是写死的白色系，所以壳必须始终是深色，不跟前台亮暗主题走。 */
    --auth-muted: rgba(245, 245, 247, .72);
    color-scheme: dark;
    background:
        radial-gradient(52rem 30rem at 18% -10%, rgba(99, 102, 241, .16), transparent 60%),
        radial-gradient(46rem 28rem at 88% 108%, rgba(56, 189, 248, .12), transparent 62%),
        linear-gradient(160deg, rgba(14, 14, 18, .78) 0%, rgba(11, 11, 15, .74) 62%, rgba(10, 10, 14, .72) 100%);
    color: var(--auth-fg);
}

.auth-card {
    /* 31-C 那套 .055 白玻璃是给不透明渐变底调的；壳降到半透明之后亮帧会把卡抬到 rgb(70) 左右，
       卡里的次要文字只剩 4.15。.70 深玻璃压到 rgb(27)~rgb(31) → 8.47:1 */
    background: rgba(16, 16, 20, .70);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--module-radius);
    -webkit-backdrop-filter: var(--module-blur);
    backdrop-filter: var(--module-blur);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
    color: var(--auth-fg);
}

.auth-card h2 {
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
    font-weight: 400;
    letter-spacing: .14em;
    text-indent: .14em;
    color: #ffffff;
}

.auth-page .form-label { color: var(--auth-muted); }

.auth-page .form-control {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .16);
    color: var(--auth-fg);
}

.auth-page .form-control:focus {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .38);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .10);
    color: #ffffff;
}

.auth-page .form-control::placeholder { color: rgba(245, 245, 247, .38); }

/* bootstrap 的 .text-muted / .text-primary 带 !important，这里只能同级压回去 */
.auth-page .text-muted { color: var(--auth-muted) !important; }

.auth-page .text-primary { color: #ffffff !important; }

.auth-page .auth-links a { text-decoration: none; }

.auth-page .auth-links a:hover { text-decoration: underline; }

/* 批次33 补漏：31-C 把这三页的壳定成「恒定深色舞台」，但只换了卡内那几样的字色，
   下面四处仍然跟着前台亮暗主题走 —— 亮色主题下它们是近黑字，
   压在 rgb(28,28,32) 的暗壳上实测 1.05:1，不是「偏淡」，是**完全看不见**：
     .auth-brand-title   站名（var(--gray-800)）
     .btn-outline-primary「获取验证码」描边按钮（--bs-btn-color: var(--primary-fg)）
     .form-text          注册页「填了邮箱就能用邮箱找回密码」（Bootstrap 默认 rgba(33,37,41,.75)）
     .auth-divider       分隔线中间那个「或」（#94a3b8 压卡内玻璃 3.03）
   壳既然不跟主题走，这四样也不能跟。靶场第一次把 login/register/forgot 纳入量测就抓到了，
   31-C 上线至今这三页的亮色主题一直是有问题的。 */
.auth-page .auth-brand-title { color: var(--auth-fg); }

.auth-page .auth-brand-sub { color: var(--auth-muted); }

.auth-page .form-text { color: var(--auth-muted); }

.auth-page .btn-outline-primary {
    --bs-btn-color: var(--auth-fg);
    --bs-btn-border-color: rgba(245, 245, 247, .38);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: rgba(245, 245, 247, .14);
    --bs-btn-hover-border-color: rgba(245, 245, 247, .6);
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: rgba(245, 245, 247, .2);
    --bs-btn-active-border-color: rgba(245, 245, 247, .7);
    --bs-btn-disabled-color: rgba(245, 245, 247, .5);
    --bs-btn-disabled-border-color: rgba(245, 245, 247, .2);
}

.auth-page .auth-divider { color: rgba(245, 245, 247, .82); }

/* 分隔线那两条横杠原来是 #e2e8f0（亮色主题的浅灰线），在深色卡上是一根刺眼的白线 */
.auth-page .auth-divider::before,
.auth-page .auth-divider::after { background: rgba(245, 245, 247, .22); }

/* 微信按钮：#07c160 是微信官方品牌色，一个字不改（改了用户就认不出是微信登录）；
   但白字压这个绿实测只有 2.38:1，是这三页里最差的一处。取舍是保品牌色、改字色为深墨绿
   —— #04301c 压 #07c160 = 10.4:1，比把绿底压深到 #037a3d（5.45:1）更认得出微信。
   .btn-wechat 全站只用在 view/partial/auth-wechat.php，而它只被登录/注册两页 include，
   所以挂 .auth-page 前缀等于全局，不会漏也不会误伤别的页。 */
.auth-page .btn-wechat,
.auth-page .btn-wechat:hover { color: #04301c; }

/* ==========================================================================
   批次32 —— 整站视频背景 + 左栏整条透明 + 内容一层层浮在动画上
   业主 2026-10-04 三句话定案：
     ① 整体背景 = 后台自定义的几条视频轮流播放（fixed 铺满视口，每一页都有）；
     ② 左侧栏目背景透明，浮在动画上，只有各栏目按钮自己是毛玻璃；
     ③ 页面内容一层层浮在动画上，hero 以下也全是视频背景。
   结构：view/layout/main.php 输出 <div class="wg-bg">（fixed，z-index:-1），
   body 挂 .wg-anim 把自己那层不透明底色让出来，否则背景层会被 body 整个盖住。
   所有遮罩/玻璃的透明度都是按「视频最亮一帧纯白」这个最坏情况算过对比度的，
   不是目测：暗色主题白字 ≥4.8:1，亮色主题深字 ≥6:1，左栏按钮两种主题都 ≥4.9:1。
   ========================================================================== */

/* body 让位：这一条必须在文件末尾——前面 376 行那条 body{background:var(--bg-color)}
   特异性只有 (0,0,1)，这里 (0,1,1) 压得过，不用去改它 */
body.wg-anim { background: transparent; }

/* --- 令牌改在 body.wg-anim 上、不改 :root ---
   style.css 是前台和租户后台**共用**的（admin/view/theme.php 也 link 了它），
   直接改 :root 里的 --module-bg 会把后台那一整套面板一起刷深。
   自定义属性会往下继承，挂在这批页面的 body 上就只影响挂了 .wg-anim 的前台页。
   两套值都是按「视频最亮一帧」算出来的，不是目测：
     暗色：模块底 rgba(16,16,20,.62) 压在遮罩最坏底色 rgb(57,57,60) 上 = rgb(32,32,35)，
           灰字 #c3c3c9 → 9.3:1，红字 #f87171 → 5.9:1，白字 → 15.7:1；
     亮色：模块底 rgba(255,255,255,.78) 压在白纱最坏底色 rgb(203,205,208) 上 = rgb(244)，
           灰字 #4b5563 → 7.2:1。
   原来的 --module-bg（暗 .055 薄白 / 亮 .62 白）是配**不透明页底**调的，
   页底一变视频，那点透明度就撑不住字了——靶场实测暗色整片掉到 3.0:1。

   --text-muted / --gray-600 必须在这里**重新写死**，不能只改 --muted-foreground：
   :root 上它们是 `--text-muted: var(--muted-foreground)` 这种间接写法（style.css:82、:133），
   var() 在 html 那一层就已经算成了 #64748b / #a1a1aa，子元素继承的是算好的值，
   在 body 上改 --muted-foreground 拉不动它们（批次30 给 --text-main 单独写死是同一个坑）。
   靶场实测就是这条：全站次要文字（.hp-sub / .member-info-label / .article-cat-count /
   .app-footer__tagline 共 148 处 var(--gray-600)）亮色最低 2.99:1、暗色 4.49:1。 */
body.wg-anim {
    --module-bg: rgba(255, 255, 255, .78);
    --module-bg-hover: rgba(255, 255, 255, .9);
    --module-border: rgba(15, 23, 42, .12);
    --muted-foreground: #4b5563;
    --text-muted: #4b5563;
    --gray-600: #4b5563;
}

html[data-theme="dark"] body.wg-anim {
    --module-bg: rgba(16, 16, 20, .62);
    --module-bg-hover: rgba(30, 30, 38, .74);
    --module-border: rgba(255, 255, 255, .14);
    --muted-foreground: #c3c3c9;
    --text-muted: #c3c3c9;
    --gray-600: #c3c3c9;
}

/* 亮色主题的 .text-success（「已绑定」「正常」）：Bootstrap 默认 rgb(25,135,84) 压在
   新的玻璃底 rgb(244,244,245) 上实测 4.12（批次31-G 那句「亮色本来就有 4.6」是拿旧页底
   rgb(245,247,251) 算的，玻璃底一换就掉了）。照 31-G 同一个办法改 --bs-success-rgb，
   换成 #15803d → 4.8:1。
   必须挂 html:not([data-theme="dark"])：暗色那边 html 上的 34,197,94（#22c55e）是 31-G
   特意调亮的，body 级的无条件声明离元素更近会把它压回深绿 = 暗色 3.94 回退。 */
html:not([data-theme="dark"]) body.wg-anim {
    --bs-success-rgb: 21, 128, 61;
}

.wg-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    /* 视频还在缓冲的那几百毫秒垫一层底色，不至于露白闪一下 */
    background: #0b0b0e;
}

.wg-bg video {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.1s ease;
}

.wg-bg video.is-active { opacity: 1; }

/* 压暗遮罩。批次34-2 起照 业主指定的深色舞台基准 线上 CSSOM 实测抄录：
   linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.25) 38%, rgba(0,0,0,.6))。
   中段只压 .25，视频在画面中部是亮的——业主 10-04：「它那个是纯亮的，
   你等于还有一层卡在当中」。原来「渐变+平涂」两层合成 .81 就是那层雾。
   文字可读性改靠 hero 文案的深色投影（hero31.css），不再靠整页压暗。 */
.wg-bg__scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(11, 11, 14, .55), rgba(11, 11, 14, .25) 38%, rgba(11, 11, 14, .60));
}

/* 亮色主题整站是深字，压暗遮罩会让深字掉进黑底里读不出来，所以遮罩翻成白纱。
   最坏情况是视频全黑那一帧：平涂 .66 + 渐变顶 .50 → 合成 .83，底色 rgb(205)，
   --muted-foreground(#4b5563) 压在上面 5.0:1。白纱再薄一档（.78）就掉到 4.6:1，
   没有余量了，所以这个数别再往下降。
   代价是亮色主题下动画只剩一点隐约的流动——暗色是默认外观，动画主要在那边看。 */
html:not([data-theme="dark"]) .wg-bg__scrim {
    background: linear-gradient(to bottom, rgba(245, 247, 251, .50), rgba(245, 247, 251, .74)), rgba(245, 247, 251, .66);
}

/* 批次34-wx-seamless：水滴光斑改成「常铺、盖最上层」垫底（z-index:3 > 遮罩2 > 视频1）。
   视频缓冲/切换的任何空档都露出光斑而不是黑；视频真播起来那一刻 app.js 给 .wg-bg 挂
   has-live → 光斑淡出（.8s）露出视频。后台一格视频都没填、或第三方手机端不输出视频时，
   has-live 永远不挂，光斑一直在——既是兜底动画，也保证整站任何时刻都不露黑/露白。 */
.wg-bg > .hx-aurora { z-index: 3; opacity: 1; transition: opacity .8s ease; }
.wg-bg.has-live > .hx-aurora { opacity: 0; }

/* 微信首次点击触发层：透明盖满整屏、置顶。app.js 在首次手势后立刻 remove，之后不存在。
   仅微信端渲染该节点。
   P0 修爆款同款「按键没反应」时改的一点：这层必须 pointer-events:none。它原来是默认 auto，
   等于整屏盖了一块吃点击的玻璃 —— 客户进页面第一次点任何东西都点在它上面，而 app.js 是在
   touchstart 捕获阶段把它删掉的，浏览器随后派发 click 时命中的已经不是原来那个元素，
   这一下就白点了（在爆款同款页表现为「点上传没反应、点一键生成没反应，刷新几次才好」）。
   起播视频靠的是 document 上的捕获监听（click + touchstart），跟点中谁无关，
   所以让这层不接点击之后，首次手势照样起播视频，同时那一下也照常落到真正的按钮上。 */
#wgTapGate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: transparent;
    pointer-events: none;
}

/* --- 左栏整条透明，只有条目按钮是毛玻璃 --- */
body.wg-anim .sn-bar {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-right-color: transparent;
}

/* 左栏不再有自己的深底，头部/底部那两条分隔线会变成浮在视频上的两根白丝，收掉 */
body.wg-anim .sn-head,
body.wg-anim .sn-foot { border-color: transparent; }

/* 手机版三条杠抽屉：原来是 var(--background) 实心黑板（业主 10-04：
   「点三条杠进去依然是黑色底板挡住」）。换成深玻璃，动画从抽屉底下透出来 */
body.wg-anim .site-drawer {
    background: rgba(12, 12, 16, .58);
    -webkit-backdrop-filter: blur(22px) saturate(1.25);
    backdrop-filter: blur(22px) saturate(1.25);
    border-right-color: rgba(255, 255, 255, .10);
}

/* 抽屉**内部**整套配色（10-18 线上实测补的洞）。
   上面那条把抽屉底钉成了常驻深玻璃，两套主题都是同一块深底，可是里面的字还在吃
   会翻面的主题令牌：亮色主题下 --text-muted 算成 #4b5563、--foreground 算成
   #0f172a，压在深玻璃上实测 1.29:1 / 1.83:1——整屉 42 处等于看不见（批次39 那一类）。
   电脑左栏那份 .sn-link 早在批次34 就改成固定浅色了，抽屉漏掉的原因是它那一面
   的类名是 .nav-link（main.php 调 $snRenderItems($snTop, 'nav-link')），压根没命中。
   所以这里照 .sn-link 逐条同款补一遍，值也一套：常驻淡玻璃胶囊 + 悬停/选中各亮一档。
   最坏底色按「亮色主题 + 抽屉背后整片纯白」算：白 → 遮罩 rgba(9,9,11,.45) → 抽屉底
   rgba(12,12,16,.58) = rgb(68,68,70)（与线上实测逐位相同），.82 浅字落上去 6.0:1。
   脚部 .site-drawer__foot 刻意不动：它自己是 var(--background) 实心底，
   里面的 --outline / --ghost 按钮压在自己的实心底上本来就看得清。
   二级 .sn-kid 那一份在本文末尾「左栏 / 抽屉的二级」那段，两处别只改一处。 */
body.wg-anim .site-drawer__head { border-bottom-color: rgba(255, 255, 255, .10); }

body.wg-anim .site-drawer__head .header-brand,
body.wg-anim .site-drawer__head .brand-name { color: #ffffff; }

body.wg-anim .site-drawer__head .icon-btn {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .10);
    color: rgba(245, 245, 247, .82);
}

body.wg-anim .site-drawer__head .icon-btn:hover {
    background: rgba(255, 255, 255, .14);
    color: #ffffff;
}

body.wg-anim .site-drawer__title { color: rgba(245, 245, 247, .64); }

body.wg-anim .site-drawer__nav .nav-link {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .10);
    color: rgba(245, 245, 247, .82);
}

body.wg-anim .site-drawer__nav .nav-link:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .18);
    color: #ffffff;
}

body.wg-anim .site-drawer__nav .nav-link.is-active,
body.wg-anim .site-drawer__nav .nav-link.is-active:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .22);
    color: #ffffff;
    font-weight: 600;
}

/* 「即将上线」那条共用 9401 行那份 .58，压在抽屉深玻璃上实测只有 4.24:1（差一点点）。
   只把抽屉这一面提到 .68 → 5.1:1；左栏那面压在深色舞台上，原值不动。
   底色/描边要在这里重写一遍：上面那条常驻胶囊 (0,3,1) 压得住共用那份 .is-soon (0,3,0)，
   不重写就等于「即将上线」也顶着一块和能点的行一样的底块，虚线降档的意图没了。 */
body.wg-anim .site-drawer__nav .nav-link.is-soon,
body.wg-anim .site-drawer__nav .nav-link.is-soon:hover {
    background: rgba(255, 255, 255, .03);
    border-style: dashed;
    border-color: rgba(255, 255, 255, .14);
    color: rgba(245, 245, 247, .68);
}

/* 批次34：左栏条目业主逐条圈了要透明——原来 .74 深玻璃丸压在亮色白纱上就是一块
   实心灰块，选中态白底丸也被圈成「挡住」。改成：未选中全透明、悬停薄玻璃、
   选中=亮一档薄玻璃+白字（不再是实底白丸）。批次34 起有背景视频时前台统一
   暗色外观，白字压在压暗视频上守住 4.5:1 */
body.wg-anim .sn-link {
    /* 批次40（业主 10-08 拍板「每行常驻淡玻璃胶囊」）：全部导航行常驻同款等宽底块
       （开关全开时 11 行：3+5+3），选中/悬停只是再亮一档——之前只有选中、悬停两行
       有底，裸字行长短不一，整列看着宽窄不齐。alpha 压到 .07：比批次34 前的 .74
       实心灰块淡一个量级，视频照样透得出来；常驻行不加 backdrop-filter
       （十几层模糊压着播放中的视频会拖帧），模糊只留给悬停/选中那一行 */
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .10);
    color: rgba(245, 245, 247, .82);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body.wg-anim .sn-link:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .18);
    color: #ffffff;
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
}

body.wg-anim .sn-link.is-active,
body.wg-anim .sn-link.is-active:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .22);
    color: #ffffff;
    font-weight: 600;
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
}

/* 组名和底部链接是裸字，直接压在视频上：暗色主题提亮到 .72 + 一道深色文字阴影，
   亮色主题翻成深字 + 白阴影，两边都守住 4.5:1 */
body.wg-anim .sn-foot__links a,
body.wg-anim .sn-brand {
    color: rgba(245, 245, 247, .72);
    text-shadow: 0 1px 8px rgba(0, 0, 0, .72);
}

html:not([data-theme="dark"]) body.wg-anim .sn-foot__links a,
html:not([data-theme="dark"]) body.wg-anim .sn-brand {
    color: rgba(17, 24, 39, .82);
    text-shadow: 0 1px 8px rgba(255, 255, 255, .6);
}

/* --- 内容层：外壳全部透明，模块自己走文末那套水滴玻璃配方 --- */
body.wg-anim .app-main,
body.wg-anim .app-shell { background: transparent; }

/* 批次34：业主要求「底部版权所有相关应该也是完全透明的」——玻璃带也是一层底，整块刮掉。
   文字可读性靠全站压暗纱（.wg-bg__scrim 合成 .81）；批次34 起有背景视频时前台
   统一暗色外观，浅字压压暗视频实测守住 4.5:1 */
body.wg-anim .app-footer {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-top-color: transparent;
}

body.wg-anim .app-footer__bottom { border-top-color: transparent; }

/* 首页那套 .hx-stage 深色令牌孤岛离模块更近，会把上面 body 级的 --module-* 盖回 .055 白玻璃
   （批次31-D 就是照 html[data-theme="dark"] 抄的）。首页不分亮暗都走深色舞台，
   所以这里按回深色配方，--card / --card-bg 一起抬到同一档：
   视频亮帧透过 .055 白玻璃只到 rgb(70) 上下，灰字 4.47 擦边；
   .62 深玻璃压在最坏底色 rgb(57) 上 = rgb(32)，#c3c3c9 → 9.3:1。 */
body.wg-anim .hx-stage {
    /* 批次33：这一条是首页「视频透不出来」的根因。.hx-stage 自己刷了
       background: var(--background) = #0b0b0e（上面令牌孤岛里定的），线上实测
       1024×3657 一整块实心近黑盖住整个首页内容区。令牌孤岛全部保留，
       只把它自己那层漆刮掉，视频就从底下透上来 */
    background: transparent;
    --module-bg: rgba(16, 16, 20, .62);
    --module-bg-hover: rgba(30, 30, 38, .74);
    --module-border: rgba(255, 255, 255, .14);
    --card: rgba(16, 16, 20, .62);
    --card-bg: rgba(16, 16, 20, .62);
}

/* 批次33：舞台刮成透明之后，**亮色主题**必须补一层自己的暗纱，否则首页整页白字看不见。
   整站背景层在亮色主题下是一层白纱（批次32 算过：合成 alpha .83），
   视频走到最亮那一帧时，底色能到 rgb(246)；而 .hx-stage 是深色孤岛，
   里面全是白字（--foreground 恒 #f5f5f7）——白字压 rgb(246) = 1.03:1，等于没字。
   靶场第一轮量首页亮色报了 75 条对比度不合格，根因就是这一层。
   暗色主题不用补：整站暗纱本来就有 .81，最亮也只到 rgb(57)，白字 11:1 起步。
   取 .78 是算出来的：视频最亮帧 → 11*.78+246*.22 = rgb(63)，
   首页最次要的那行灰字（.hx-sec-sub 的 .62 透白）压在它上面 = 4.84:1，过 4.5 线；
   同时留 22% 的视频透光，跟暗色主题下别的页面（透光 19%）是一个量级，
   不会变成业主说的「一整块实心黑盖住首页」。
   选择器必须写 :not([data-theme="dark"])：这套前台的主题口径是「暗色挂属性、亮色摘属性」
   （main.php:206/209 的防闪烁脚本 + app.js:778/781 的开关都是这么干的），
   html 上**永远不会**出现 data-theme="light"，写 [data-theme="light"] 就是一条永不命中的死规则
   ——第一轮就是这么写的，靶场量出来 .hx-stage 仍是 transparent、首页亮色 67 条白字看不清。 */
html:not([data-theme="dark"]) body.wg-anim .hx-stage {
    background: rgba(11, 11, 14, .78);
}

/* ==========================================================================
   批次33：拆掉还挡着背景视频的最后几层 + 桌面顶部去重
   业主 10-04 线上看完的原话：「视频画面是到最底层的，但是还有很多没有改成透明的，
   顶部还没有修改，上面还有多余的功能图层」。
   下面每条都对应一次线上实测（同源 iframe 按 1440 真渲染，量 alpha≥0.8 且面积≥4% 视口的元素）：
     /create 已经一层不透明都没有；/inspiration /article /tools /help 只剩顶栏；
     / 首页 .hx-stage 一整块 a=1.00（上面那条已修）；/login .auth-page a=1.00（已降到 .78）；
     /style .stx-card、/edit .editor-page 各自整页刷底（在 view/style/index.php 和 edit.css 里改）。
   全部挂 body.wg-anim（前台专属类，view/layout/main.php:338 写死），
   租户后台/平台后台共用这份 style.css 但 body 上没有这个类，一条都碰不到。
   ========================================================================== */

/* --- 顶栏：页面顶部整条透明，滚过阈值再上玻璃 ---
   原来走 .glass-panel 的 var(--nav-bg)（亮 #ffffffe0 / 暗 #090c15d1，style.css:78/:268）
   + blur(20px)，线上实测 rgba(9,12,21,.82)，是每一页上最后一条实心底。
   不能一直透明：顶栏是 sticky 的，往下滚正文会从它底下穿过去，全透明就是一片糊字。
   .is-stuck 由 public/js/app.js 末尾那段滚动状态切（passive 监听 + rAF 节流）。
   阈值分两种（批次34-seg8，业主截图圈顶栏那条玻璃带「整个主屏幕上面不要有磨砂」）：
   · 普通页 = 滚过 40px 就上玻璃；
   · 有整站背景视频的首页（body.wg-video-on）= hero 整块滚出视口才上玻璃，
     hero 还在屏时主屏幕是完整一屏动画、顶栏那排功能浮在动画上，中间不许有横带。
   特异性 0,2,1 > .glass-panel 的 0,1,0，压得住，不用 !important。
   顶栏里的图标按钮本来就是 background:transparent（.icon-btn / .header-avatar），
   透明之后不需要再补玻璃丸；字色走 --muted-foreground，批次32 已按最坏帧调过。 */
body.wg-anim .default-header {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body.wg-anim .default-header.is-stuck {
    background: var(--module-bg);
    border-bottom-color: var(--module-border);
    box-shadow: 0 1px color-mix(in srgb, var(--module-border) 72%, transparent);
    -webkit-backdrop-filter: var(--module-blur);
    backdrop-filter: var(--module-blur);
}

/* --- 桌面（≥992px）去重：一个功能只留一个入口 ---
   左栏 view/partial/side-nav.php 已经有品牌(:61)、个人中心(:25)、生成记录(:38)、
   积分充值(:39)、帮助中心(:90)；顶栏和右下浮标上的同款入口就是业主说的「多余的功能图层」：
   品牌 ×2、客服/帮助 ×3、个人中心 ×2、积分充值 ×2、我的作品/生成记录 ×2。
   一律用 CSS 收，PHP 的 $accountNav（main.php:74-78）和模板结构一行不动——
   <992px 没有左栏，这些入口在手机上必须原样留着。 */
@media (min-width: 992px) {
    body.has-sidenav .default-header .header-brand,
    body.has-sidenav .default-header a.header-desktop-control[href="/help"],
    body.has-sidenav .default-header .header-divider:first-of-type,
    body.has-sidenav .acct-pop__item:not(.acct-pop__item--danger),
    body.has-sidenav .acct-pop__sep,
    body.has-sidenav .app-float-service { display: none; }

    /* 批次34-seg9：登录/账户已搬进左栏底部（.sn-user 登录态 / .sn-auth 未登录），
       顶栏右侧的账户头像块、未登录的登录/注册钮在桌面一并收掉，避免两处重复。
       .header-register 是 .ui-button、.header-login 是 .text-btn，两者自带 display，
       用「body.has-sidenav .default-header .类.类」把特异性抬到 0,4,1 才压得住
       （同 style.css:5822 手机注册钮那个 .ui-button 反盖坑）。手机 <992 无左栏，不收。 */
    body.has-sidenav .default-header .header-desktop-user,
    body.has-sidenav .default-header .text-btn.header-login,
    body.has-sidenav .default-header .ui-button.header-register { display: none; }

    /* 品牌和 7 项导航（style.css:7898 早就收了）都隐藏之后，header 里只剩右侧操作区，
       space-between 会把它甩到最左边贴着左栏，这里按回右对齐 */
    body.has-sidenav .default-header__inner { justify-content: flex-end; }
}

/* --- 右下客服浮标：手机保留、桌面隐藏（上面那条），底色从全不透明换玻璃 ---
   原来是 var(--surface)，线上实测 rgb(15,15,18) 一块实心药丸浮在视频上。
   字色一起换成 --foreground：--primary-fg 在暗色下是白，亮色主题下会是深色字压深玻璃。 */
body.wg-anim .app-float-service {
    background: var(--module-bg);
    border-color: var(--module-border);
    color: var(--foreground);
    -webkit-backdrop-filter: var(--module-blur);
    backdrop-filter: var(--module-blur);
}

/* --- 首页 .hx-stage 一透明，这三个后代就露馅了 ---
   它们原来拿 var(--background)(#0b0b0e) / var(--popover) 当底色，
   舞台还是实心的时候看不出来，舞台一透明就变成三块实心黑浮在视频上。 */
body.wg-anim .home-template-section__shuffle {
    background: var(--module-bg);
    border-color: var(--module-border);
    -webkit-backdrop-filter: var(--module-blur);
    backdrop-filter: var(--module-blur);
}

body.wg-anim .home-template-section__shuffle:hover { background: var(--module-bg-hover); }

body.wg-anim .tpl-modal__extra { background: var(--control-bg); }

/* 模型行悬停简介：底色和字色必须成对换。它原来用 var(--popover) / var(--popover-foreground)，
   而这两个令牌 .hx-stage 孤岛里没翻——亮色主题下是「白底深字」自成一派，
   只换底不换字就变成深字压深玻璃（比值 1.0x 完全看不见）。--foreground 在孤岛里恒为 #f5f5f7。 */
body.wg-anim .hc-model-tip {
    background: var(--module-bg);
    border-color: var(--module-border);
    color: var(--foreground);
    -webkit-backdrop-filter: var(--module-blur);
    backdrop-filter: var(--module-blur);
}

/* --- 靶场逐页扫出来的三块漏网实底（批次33 第二轮）---
   判据：body.wg-anim 下 alpha≥0.8 且面积≥4 万平方像素的元素，逐个点名。
   线上那次只量了业主点到的几页，这三块是靶场 33 个页面 × 6 档宽度扫出来的。 */

/* 帮助中心底部那条联系客服横栏。亮色主题下 --primary-light = var(--muted)
   是实心底 rgb(244,244,245)（暗色主题那个令牌本来就是 .10 透白，所以只有亮色露馅）。
   字色 --gray-800 / --gray-600 都跟主题走，批次32 已按最坏帧调过，换底不用动字。 */
body.wg-anim .hp-stuck {
    background: var(--module-bg);
    border-color: var(--module-border);
    -webkit-backdrop-filter: var(--module-blur);
    backdrop-filter: var(--module-blur);
}

/* 会员中心「我的模板」空状态。它是玻璃卡 .member-content-card **里面**的一块，
   自己再刷一层 --gray-50 实底就是「玻璃里夹一块白板」，还把视频挡死。
   家族口径里模块内的次级小块不叠第二层玻璃，所以这里直接刮成透明，只留那圈虚线框。 */
body.wg-anim .member-tab-empty { background: transparent; }

/* 积分页顶部横幅在 992~1199px 这一档会被裁掉右边约 11px：
   ≥992px 那条给了 .credits-head-side { flex-shrink: 0 } + .credits-steps { columns: 2 }，
   加上左栏 208px，1024px 宽的窗口里两栏塞不下，右栏被祖先 overflow 硬裁。
   这一档只把右栏放回可收缩、步骤改单栏，≥1200px 的双栏原样不动。 */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .credits-head-side {
        flex-shrink: 1;
        min-width: 0;
        padding-left: 18px;
    }

    .credits-steps { columns: 1; }
}

/* ==========================================================================
   批次44 —— 前台 AI 栏目页（/ai/text AI 文字、/ai/video、/ai/music）
   （栏目名 2026-10-12 起全站统一叫「AI 文字」，原「AI 创作空间」只留在下面业主原话里）
   业主 10-08 夜：「从首页下边是 AI绘图 AI视频 AI音乐 AI文字？这个换个词儿高大上一点」。
   三个栏目共用这一张 view/ai/hub.php，皮肤走全站水滴玻璃家族：
   卡片直接挂进家族清单（见上文 .hub-card / .hub-closed / .hub-soon 三行），
   这里只管排版和悬停，不重复写底色令牌。
   视频/音乐两栏今晚只做目录展示（接口已在后台录好、生成流程等业主充值后再通），
   所以卡片是不可点的静态卡 + 一句诚实的「筹备中」，不做点了没反应的死按钮。
   ========================================================================== */
/* 批次72：删掉 max-width:1080px —— 左栏「AI 文字 / AI 视频 / AI 音乐」三个栏目共用这一层壳
   （view/ai/hub.php），原来比首页内容窄 569px，是业主「有些栏目还多少有点差距」的其中一处。
   页面级宽度全站统一由批次72 那一条规则决定（见 .pw-shell 处说明）。 */
.hub-shell { margin: 0 auto; padding: 30px 18px 60px; }

.hub-head { margin-bottom: 26px; text-align: center; }

.hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--pill-bg);
    color: var(--pill-text);
    font-size: 12px;
    letter-spacing: .08em;
}

.hub-title {
    margin: 14px 0 0;
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--foreground);
}

.hub-sub {
    max-width: 640px;
    margin: 10px auto 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.75;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 16px;
}

.hub-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 20px;
    min-height: 148px;
    color: inherit;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

a.hub-card:hover {
    background: var(--module-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .10);
    text-decoration: none;
    color: inherit;
}

.hub-card__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--pill-bg);
    color: var(--foreground);
    font-size: 20px;
}

.hub-card__name { font-size: 16px; font-weight: 600; color: var(--foreground); }

.hub-card__desc { font-size: 13px; line-height: 1.7; color: var(--text-muted); }

.hub-card__vendor { font-size: 12px; color: var(--text-muted); }

.hub-card__go {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--primary);
}

.hub-card--static { cursor: default; }

/* b460：视频/音乐老栏目页顶上的「去创作」真入口（开关关着时不渲染） */
.hub-card--go { border-color: var(--primary); }
.hub-card--go .hub-card__icon { color: var(--primary); }
.hub-card--go .hub-card__go { font-weight: 650; }

.hub-soon,
.hub-closed {
    margin-top: 18px;
    padding: 18px 16px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

.hub-closed { margin-top: 0; padding: 46px 18px; }

.hub-closed i { display: block; margin-bottom: 10px; font-size: 28px; color: var(--text-muted); }

@media (max-width: 767.98px) {
    .hub-shell { padding: 22px 14px 44px; }
    .hub-grid { grid-template-columns: 1fr; gap: 12px; }
    .hub-card { min-height: 0; padding: 16px; }
}

/* ==========================================================================
   批次68（业主 2026-10-12）：「还没开放」的栏目改灰态常驻，不再从导航里抹掉
   --------------------------------------------------------------------------
   业主逐字：「先把 AI文字 AI图片 AI视频 AI音乐 4 个栏目从上到下排列出来，让人家知道
   我后期会有什么功能。有些栏目点不进去，会有文字提示：近期即将上线」。
   原来的做法是后台一关开关、入口连影子都不剩，客户根本不知道后面还有东西。
   现在关着的那一档照印，只是降一档明度 + 虚线边 + 右侧「即将上线」小徽章，
   点了由 app.js 的 [data-soon] 弹一句「近期即将上线」（全站一句文案）。
   左栏与手机抽屉共用 side-nav.php 那份渲染函数，页脚另有一条，三处同一口径。

   明度不是随手挑的：左栏永远压在深色玻璃/背景视频上，.58 透白对 #141416 约 5.2:1、
   徽章 .62 约 6.6:1，都过 4.5:1——批次39 那次「固定浅底配翻面字色」白压白的账不再犯。
   ========================================================================== */
.sn-link.is-soon,
.site-drawer__nav .nav-link.is-soon {
    border-style: dashed;
    background: rgba(255, 255, 255, .03);
    color: rgba(245, 245, 247, .58);
}

.sn-link.is-soon:hover,
.site-drawer__nav .nav-link.is-soon:hover {
    background: rgba(255, 255, 255, .07);
    color: rgba(245, 245, 247, .74);
}

/* 徽章 margin-left:auto 顶到胶囊右边线，栏目名该多宽还多宽，不被挤到折行 */
.sn-soon {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 1px 6px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    font-size: 10px;
    font-style: normal;
    line-height: 1.55;
    letter-spacing: .02em;
    color: rgba(245, 245, 247, .62);
}

.app-footer__links a.is-soon { opacity: .6; }

/* ==========================================================================
   批次76-E：AI 文字栏目的「后期上线」模块卡（业主 2026-10-12「照单做」）
   与左栏 is-soon 同一个意思：虚线边 + 压暗一档 + 右上「后期上线」徽章，
   点了由 app.js 的 [data-soon] 弹一句「近期即将上线」，不做看着能点的死链。

   ⚠️ 颜色这里**必须走令牌、不能照抄左栏那套写死的近白**：左栏是常驻暗壳
   （压着背景视频），两套主题下底都是暗的，写死近白才成立；hub 卡是
   --module-bg 玻璃模块，亮色主题下是浅底，写死近白就又是「白压白」。
   批次76-B 刚清完两条这种账（.case-action-btn / .stx-check），不再犯。
   「压暗一档」用 opacity 而不是改字色，两套主题同样成立。
   ========================================================================== */
.hub-soon-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 30px 0 14px;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: .02em;
    color: var(--foreground);
}

.hub-soon-head i { font-size: 15px; color: var(--text-muted); }

.hub-card--soon { border-style: dashed; opacity: .78; }

.hub-card--soon:hover { opacity: 1; transform: translateY(-2px); }

.hub-soon-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 1px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: .02em;
    color: var(--text-muted);
}

/* 徽章占了右上角，卡片名别让到它底下去 */
.hub-card--soon .hub-card__name { padding-right: 58px; }

/* ==========================================================================
   批次106：前台货币数字统一皮肤（业主 10-16「货币值一定要亮眼，白/暗两种都要正常」）
   --------------------------------------------------------------------------
   颜色一律走 --money / --money-bg 两个令牌，亮色=深琥珀+淡金底、暗色=亮金+金半透明底，
   在 :root 与 html[data-theme=dark] 各自定义好，这里只消费不写死色值——
   改一处令牌全站货币色跟着变，禁再在任何组件里硬编码颜色（批次39 隐形文字的债根）。
   .money     = 纯文字货币数（余额、扣费提示、总账数字）
   .money-tag = 价签形态（范围徽章 0.378~0.4455/次、套餐价、单次预估），带淡金底块更跳眼
   tabular-nums 让多位小数竖排对齐，价目表不参差。
   ========================================================================== */
.money {
    color: var(--money);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.money-tag {
    display: inline-block;
    color: var(--money);
    background: var(--money-bg);
    border-radius: 8px;
    padding: 2px 9px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.55;
}


/* ==================================================================
   批次111-B：每模型独立参数
   ① .hc-param-zone —— 首页第二排格子的容器。换到「自己存过参数」的模型时
      home.js 把整排格子换成这一款自己的 HTML，容器必须自带一份和外层
      .home-composer-left-actions 同口径的 flex，否则四格会被包成一个大
      flex 项挤在一起。
   ② 已下线的档（own 面板刻意保留、置灰不删）：上游生命周期死命令要求
      照实说「官方已下线」，所以留原位但点不动。
   ================================================================== */
.hc-param-zone {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    min-width: 0;
}

@media (max-width: 400px) {
    .hc-param-zone { flex: 1 1 auto; }
}

.wb-opt.wb-opt-off,
.gchip-opt.gchip-opt-off {
    opacity: .45;
    cursor: not-allowed;
    border-style: dashed;
}

.wb-opt.wb-opt-off:hover { border-color: var(--gray-200); }

.gchip-opt.gchip-opt-off:hover { background: transparent; }

/* ==========================================================================
   批次117 —— 一模型一页（/m/{上游模型标识}）
   业主 2026-10-18 逐字：「一句话，就是一个模型一个选项，而不是在我们目前已经开发好的
   多个框架内选择模型」；版式照他发来的参考截图排：
     ① 抬头＝这一款的徽章 + 名字 + 厂商 + 一句靓丽简介
     ② 中间＝本次生成的时间线，刻意放在输入框**上方**，只显示最新这一批
     ③ 下面＝参考图 / 描述 / 这一款自己的参数 / 预计消耗 / 开始生成
   ②③ 复用的还是工作台那套 .wb-* 组件，这里只补①的皮肤、把双栏拆成单栏、
   并把 .wb-shell 的玻璃底退掉（否则玻璃里套三块玻璃，糊成一团）。
   放在文件最末尾＝压过前面 body.page-workbench 那几条同特异性规则。
   ========================================================================== */

/* 单栏居中：工作台那套 ≥1200px 的双栏 grid 在这一页不成立 */
body.page-model .wb-shell {
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px 48px;
    background: none;
    border: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

@media (min-width: 1200px) {
    body.page-model .wb-shell {
        display: flex;
        grid-template-columns: none;
        gap: 18px;
    }

    /* 双栏时代「两栏直接贴边铺满」才把边框圆角抹平，单栏要还原成一块块模块 */
    body.page-model .wb-panel,
    body.page-model .wb-main {
        border: 1px solid var(--module-border);
        border-radius: var(--module-radius);
        box-shadow: none;
    }

    /* 吸底按钮条在双栏里贴的是栏底，单栏里会浮在时间线上，改回普通文档流 */
    body.page-model .wb-foot {
        position: static;
        border-top: 1px solid var(--gray-100);
        border-radius: 0 0 calc(var(--module-radius) - 2px) calc(var(--module-radius) - 2px);
        box-shadow: none;
    }
}

/* ① 模型抬头 */
.mp-hero {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 24px;
    background: var(--module-bg);
    border: 1px solid var(--module-border);
    border-radius: var(--module-radius);
    -webkit-backdrop-filter: var(--module-blur);
    backdrop-filter: var(--module-blur);
}

.mp-hero__logo {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid var(--module-border);
    background: var(--module-bg-hover);
    color: var(--primary-fg);
    font-size: 30px;
    overflow: hidden;
}

/* 厂商徽章按原图完整显示（contain），底色跟模块底色走，不压扁不裁切 */
.mp-hero__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.mp-hero__text { flex: 1 1 auto; min-width: 0; }

.mp-hero__name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
}

.mp-hero__tag {
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    padding: 1px 9px;
    border-radius: 999px;
    border: 1px solid var(--module-border);
    color: var(--gray-600);
    white-space: nowrap;
}

.mp-hero__tag--soft { border-style: dashed; }

.mp-hero__intro {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--gray-600);
}

/* ② 本次生成：头改成一行（标题在左、去全部记录的入口在右） */
.mp-live__head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mp-live .wb-main-sub a { color: inherit; text-decoration: underline; }

a.mp-live__all { text-decoration: none; flex: 0 0 auto; }

/* 手机：抬头竖排，徽章缩到 48px，别让名字被挤到折三行 */
@media (max-width: 640px) {
    body.page-model .wb-shell { padding: 14px 12px 36px; }

    .mp-hero { gap: 12px; padding: 16px; }

    .mp-hero__logo { flex-basis: 48px; width: 48px; height: 48px; font-size: 22px; border-radius: 12px; }

    .mp-hero__name { font-size: 18px; }

    .mp-live__head { flex-direction: column; align-items: flex-start; }
}

/* ---- 左栏 / 抽屉的二级：一款模型一条 ----
   二级刻意比一级轻一档（无底、小字、缩进 + 左侧一道导线），
   否则十几条模型胶囊排下来会和四大类目抢视线，看不出谁是谁的子项。

   同一份 $snRenderItems 喂两个面：电脑左栏 .sn-bar（暗色玻璃舞台）和手机抽屉
   .site-drawer。抽屉那面**不是**跟着主题翻的：批次34 起 body.wg-anim 把抽屉底钉成
   常驻深玻璃 rgba(12,12,16,.58)（本文 9025 行），亮暗两套主题都是这一块深底。
   所以抽屉二级也必须用固定浅色，用会翻面的主题令牌就是批次39 那一类「隐形文字」
   事故——亮色主题下 var(--foreground) 算成 #0f172a，压在深玻璃上等于看不见
   （10-18 线上实测抓到的真缺陷）。不带 .wg-anim 的页面抽屉还是 var(--background)
   实心底，那一套留给上面这组主题令牌规则，所以两组都在、不互相替代。
   抽屉侧选择器给到 (0,2,0)，压得住前面的 .site-drawer__nav .nav-link。 */
.sn-kids {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    margin: .16rem 0 .4rem .85rem;
    padding-left: .62rem;
}

.sn-kid {
    padding: .38rem .6rem;
    border-color: transparent;
    background: transparent;
    font-size: .82rem;
}

.sn-kid i { font-size: .98rem; opacity: .85; }

.sn-kid span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 电脑左栏（暗色舞台） --- */
.sn-bar .sn-kids { border-left: 1px solid rgba(255, 255, 255, .14); }

.sn-bar .sn-kid { color: rgba(245, 245, 247, .6); }

.sn-bar .sn-kid:hover { background: rgba(255, 255, 255, .07); color: #f5f5f7; }

.sn-bar .sn-kid.is-active {
    background: #ffffff;
    color: #141416;
    font-weight: 600;
}

.sn-bar .sn-kid.is-active:hover { background: #ffffff; color: #141416; }

/* --- 手机抽屉：不带 .wg-anim 的页面（抽屉还是 var(--background) 实心底，跟主题翻） --- */
.site-drawer__nav .sn-kids { border-left: 1px solid var(--border); }

.site-drawer__nav .sn-kid { color: var(--text-muted); }

.site-drawer__nav .sn-kid:hover {
    background: var(--hover-bg);
    color: var(--text-main);
}

.site-drawer__nav .sn-kid.is-active {
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 600;
}

.site-drawer__nav .sn-kid.is-active:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

/* --- 手机抽屉：带 .wg-anim 的页面（抽屉底是常驻深玻璃，两套主题都一样） ---
   值照 body.wg-anim .sn-link 那一组（9036 行）同口径，只把二级压暗一档：
   一级 .82、二级 .68。alpha 不是目测的——最坏情况是亮色主题 + 抽屉背后整片纯白，
   先过遮罩 rgba(9,9,11,.45) 得 rgb(144)，再压抽屉底 rgba(12,12,16,.58) 得 rgb(68)，
   rgba(245,245,247,.68) 落在它上面算出 rgb(188) → 5.13:1；选中态 #fff 压
   rgba(255,255,255,.16) 后的 rgb(98) → 6.10:1，都过 4.5:1。 */
body.wg-anim .site-drawer__nav .sn-kids { border-left-color: rgba(255, 255, 255, .14); }

/* 底色和描边必须在这里显式清掉：抽屉里的二级同时带 .nav-link，
   上面那条常驻胶囊规则与这条同为 (0,3,1)，只靠「本条在后」赢颜色是不够的——
   基础那条 .sn-kid 把 background / border-color 清成 transparent 的写法只有 (0,1,0)，
   压不住。不清就等于二级也顶着一块和一级一样的底块，「二级轻一档」的版式没了。
   （本注释里刻意不写花括号：靶场按右花括号切规则，注释里带一个就会把切分带偏。） */
body.wg-anim .site-drawer__nav .sn-kid {
    background: transparent;
    border-color: transparent;
    color: rgba(245, 245, 247, .68);
}

body.wg-anim .site-drawer__nav .sn-kid:hover {
    background: rgba(255, 255, 255, .10);
    color: #ffffff;
}

body.wg-anim .site-drawer__nav .sn-kid.is-active,
body.wg-anim .site-drawer__nav .sn-kid.is-active:hover {
    background: rgba(255, 255, 255, .16);
    border-color: transparent;
    color: #ffffff;
    font-weight: 600;
}

/* ===== AI 视频「多镜头」分段编辑器（官方 multi_shot / multi_prompt）=====
   每段一张小卡：段号 + 这一段几秒 + 去掉这一段，下面一根秒数滑杆和一段画面描述。
   秒数只给滑杆、不给数字框（业主 2026-10-24 死命令：要用户自己敲数字的框很恶心，以后这类参数一律进度条）。
   官方要求各段秒数之和正好等于视频总时长，所以顶部那行「已分配 X / 一共 Y 秒」正常时永远相等；
   万一不等就在同一行右侧红字点名差几秒——绝不让用户带着一个上游会打回的组合去扣钱。
   卡片底色一律透明、只留描边：亮暗两套主题下都不会出现「浅底压浅字」的隐形文字。 */
#shotEditor { margin-top: 10px; }

.wb-shot-budget {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--muted-foreground, #6b7280);
}

.wb-shot-budget b { font-weight: 600; color: var(--foreground, #1f2937); }

.wb-shot-warn { margin-left: 6px; font-weight: 600; color: #dc2626; }

.wb-shot {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border, rgba(0, 0, 0, .10));
    border-radius: 12px;
    background: transparent;
}

.wb-shot-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.wb-shot-no { font-size: 13px; font-weight: 600; color: var(--foreground, #1f2937); }

.wb-shot-sec { font-size: 12px; color: var(--muted-foreground, #6b7280); }

.wb-shot-sec b { font-size: 14px; font-weight: 600; color: var(--primary, #2563eb); }

.wb-shot-del {
    margin-left: auto;
    padding: 4px 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted-foreground, #9ca3af);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.wb-shot-del:hover { background: rgba(220, 38, 38, .10); color: #dc2626; }

.wb-shot-slider { margin: 2px 0 8px; }

.wb-shot-prompt { min-height: 52px; font-size: 13px; resize: vertical; }

.wb-shot-count {
    margin-top: 2px;
    font-size: 11px;
    text-align: right;
    color: var(--muted-foreground, #9ca3af);
}

.wb-shot-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.wb-shot-tip { font-size: 12px; color: var(--muted-foreground, #6b7280); }

@media (max-width: 575.98px) {
    .wb-shot { padding: 8px 10px; border-radius: 10px; }
    .wb-shot-head { gap: 6px; }
    .wb-shot-actions { gap: 8px; }
}

/* 「再加一段」到顶时的样子：只做视觉提示，按钮仍然可点（点了就地说明为什么加不下） */
#shotAdd.is-capped{opacity:.55}

/* ===== AI 音乐记录卡（批次185-8）=====
   音乐没有画面，4:5 定框里放封面（上游给了才有）或一个大音符占位；
   播放器一律放在框**下面**的 .hcard-body 里——塞进定框会被 object-fit 那套规则压扁，
   而且 controls 在小格子里点不准（视频卡那条老教训同样适用）。
   颜色全部走令牌，暗色下不垫死白。 */
.hcard-musicicon {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--image-tile-bg);
}

.hcard-musicicon i { font-size: 46px; line-height: 1; color: var(--primary-fg); opacity: .45; }
.hcard-musicicon span { font-size: 12px; color: var(--gray-600); }

.hcard-cover { width: 100%; height: 100%; object-fit: contain; display: block; }

.hcard-songname {
    font-size: 13px;
    font-weight: 600;
    color: var(--foreground, #1f2937);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hcard-songs { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

.hcard-song {
    padding: 8px 10px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    background: var(--card, #fff);
}

.hcard-song-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.hcard-song-meta { font-size: 11px; color: var(--gray-600); white-space: nowrap; }

.hcard-song audio { width: 100%; height: 34px; display: block; }

/* 歌已做好、音频还在往本站保存：占住播放器那一格的高度，别让用户以为少了一首 */
.hcard-saving {
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px dashed rgba(120, 130, 150, .35);
    background: rgba(120, 130, 150, .08);
    font-size: 12px;
    color: var(--gray-600);
    text-align: center;
    padding: 0 8px;
}

.hcard-lyrics {
    margin-top: 6px;
    padding: 8px 10px;
    max-height: 180px;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--foreground, #1f2937);
    background: var(--image-tile-bg);
    border-radius: 8px;
}

/* 一次两首、两首词不一样：面板里一首一块，块头钉「第 N 首」序号章（业主 10-29） */
.hcard-lyr-block + .hcard-lyr-block {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(120, 130, 150, .3);
}

.hcard-lyr-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    min-width: 0;
}

.hcard-lyr-ord, .hcard-songord {
    flex: 0 0 auto;
    font-size: 10px;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 999px;
    white-space: nowrap;
    color: var(--primary-foreground, #fff);
    background: var(--primary);
}

.hcard-lyr-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--foreground, #1f2937);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hcard-lyr-text { white-space: pre-wrap; cursor: copy; }

/* 歌名左边那一组（序号章 + 歌名）要能一起缩，否则长歌名会把时长挤出卡片 */
.hcard-song-id {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.hcard-song-id .hcard-songname { flex: 1 1 auto; min-width: 0; }

/* ==========================================================================
   批次199 AI 音乐实验版 /create/music-lab
   业主 10-28：「左边是上下模块导航条，右边都是属于AI音乐的」
             「整体风格还保持毛玻璃视频在背景穿插，每个模块为半透明状态」
   规矩：一律用 --module-* 令牌，禁在这里刷实底（背景视频要透过来）；
        放在文件最末尾＝压得过前面 body.page-workbench 那几条同特异性规则。
   ========================================================================== */

body.page-music-lab .app-main {
    max-width: none;
    margin: 0;
    padding: 0;
}

.ml-shell {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 14px 12px 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 批次204：页顶那排便捷入口整条删掉（业主 10-29「这几个全部删掉不要了…因为你左边已经有了」）。
   模块导航的唯一住处是站点左栏「AI 音乐」底下的二级清单，一页同类元素只许一个。 */

@media (min-width: 1200px) {
    .ml-shell {
        padding: 18px 20px 48px;
    }
}

/* ---- 右：整片都归音乐 ---- */
.ml-stage { min-width: 0; }
.ml-mod { display: none; }
.ml-mod.is-active { display: block; }

/* 双栏时代把 .wb-panel/.wb-main 的卡片皮抹平了（两栏贴边铺满），
   这一页是一块块独立模块，皮要还原回来——照 body.page-model 那一段同一口径。
   批次200 业主 10-28：「把上下滚动条去掉，因为右边已经有一个了」——锁高与内滚一起撤，
   整页只留页面级一条滚动条；记录墙「滚到底续下一页」由 music.js 在容器不滚时
   改听 window 的 scroll，翻页不会因此死掉。 */
body.page-music-lab .wb-panel,
body.page-music-lab .wb-main {
    border: 1px solid var(--module-border);
    border-radius: var(--module-radius);
    box-shadow: none;
    height: auto;
    min-height: 0;
    max-height: none;
}

body.page-music-lab .wb-foot {
    border-radius: 0 0 var(--module-radius) var(--module-radius);
    position: static;
}

body.page-music-lab .wb-body,
body.page-music-lab .wb-main-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
}

/* ---- ③ 试听广场（批次204：整页 1:1 照参照站那个「试听广场」页签） ----
 * 业主 10-29 第四道令：「你就彻彻底底地复制他的，按照我说的哪些要去掉、哪些保留就行了」。
 * 去掉的：它顶上那两个页签（我们左栏已有二级清单）、它的「我的创作」输入区（?mod=work 已有）。
 * 保留的：一首一张横卡（方封面 + 歌名 + 模型 + 风格简介）自动一排排往下铺；
 *         右边常驻一栏大封面 + 歌词；底下一条播放条浮在内容上面。
 * 三块锁在同一屏：左栏自己滚、右栏歌词自己滚（业主：「我希望是单独上下滚动的，
 * 而不是把左边整个拉掉」），播放条永远是最后一行。外壳高度由 music-lab.js 的 fitPlaza()
 * 按视口实算写进行内 style；窄屏不锁高，交回页面级那一条滚动条（批次200 业主令）。
 * 参照站实测尺寸（1920 视口，2026-10-29 只读量取）：右栏 300、播放条高 72、
 * 卡内封面 140×140、卡 421×160、三列间距 24、标题 16/24 粗体、模型行 14/22、风格简介 14/21。
 * 封面一律写死高度不用 aspect-ratio（老 Safari / 老安卓不认）。 */
.ml-plaza-tip { margin-bottom: 14px; }

.ml-plaza-wrap {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ml-plaza-cols {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 16px;
    overflow: hidden;
}

.ml-plaza-main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

/* 一排几张由可用宽度自己算：宽了自动多一列，窄了自动少一列（业主：「自动一排一排下去」） */
.ml-plaza {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 14px;
    align-items: stretch;
}

/* 一张卡 = 一首歌。左边方封面（点它就播），右边歌名 / 模型 / 风格简介 / 作者 */
.ml-pcard {
    display: flex;
    align-items: stretch;
    gap: 13px;
    min-width: 0;
    min-height: 146px;
    padding: 9px;
    background: var(--module-bg);
    border: 1px solid var(--module-border);
    border-radius: calc(var(--module-radius) - .25rem);
    cursor: pointer;
    transition: border-color .18s, background .18s;
}

.ml-pcard:hover { border-color: var(--primary); }

.ml-pcard.is-on {
    border-color: var(--primary);
    background: var(--module-bg-hover);
}

/* 封面套一层是为了叠那个悬停才现身的播放角标：参照站点封面就能播（业主 10-29） */
.ml-pcard-coverwrap {
    position: relative;
    flex: 0 0 auto;
    width: 128px;
    height: 128px;
}

.ml-pcard-cover {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    background: var(--image-tile-bg);
    border: 1px solid var(--module-border);
}

.ml-pcard-coverplay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    line-height: 1;
    color: #fff;
    border-radius: 10px;
    background: rgba(0, 0, 0, .38);
    opacity: 0;
    transition: opacity .18s;
}

.ml-pcard:hover .ml-pcard-coverplay,
.ml-pcard.is-on .ml-pcard-coverplay { opacity: 1; }

.ml-pcard-meta {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.ml-pcard-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 22px;
    color: var(--foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 模型行：参照站这里印上游代号，我们印后台填的对外名；一次出两首时后面跟「第 N 首」 */
.ml-pcard-model {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    line-height: 19px;
    color: var(--foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ml-pcard-model i { margin-right: 4px; color: var(--primary); }

/* 风格简介（做这首歌时填的风格）：参照站印三行，我们栏窄印两行 */
.ml-pcard-style {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-top: 5px;
    font-size: 13px;
    line-height: 19px;
    color: var(--muted-foreground);
    overflow: hidden;
    word-break: break-word;
}

.ml-pcard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    margin-top: auto;
    padding-top: 7px;
}

.ml-pcard-by {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11px;
    color: var(--muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ml-pcard-by i { margin-right: 3px; }

.ml-pcard-act {
    flex: 0 0 auto;
    padding: 4px 10px;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid var(--module-border);
    background: var(--module-bg-hover);
    color: var(--primary);
    cursor: pointer;
}

.ml-pcard-act:hover { border-color: var(--primary); }

/* 右栏：大封面 + 歌名 + 整段词。词自己滚，封面和歌名钉在原地不动 */
.ml-plaza-rail {
    position: relative;
    flex: 0 0 268px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 12px;
    border: 1px solid var(--module-border);
    border-radius: calc(var(--module-radius) - .25rem);
    background: var(--module-bg);
    overflow: hidden;
}

.ml-rail-x {
    display: none;
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: var(--muted-foreground);
    cursor: pointer;
}

.ml-rail-empty {
    margin: auto 0;
    padding: 26px 6px;
    text-align: center;
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted-foreground);
}

.ml-rail-song {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.ml-rail-cover {
    display: block;
    flex: 0 1 auto;
    width: 100%;
    height: 244px;
    max-height: 46%;
    min-height: 88px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--image-tile-bg);
    border: 1px solid var(--module-border);
}

.ml-rail-title {
    display: block;
    flex: 0 0 auto;
    margin-top: 11px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ml-rail-sub {
    display: block;
    flex: 0 0 auto;
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ml-rail-lyr {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 10px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--module-border);
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.95;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--foreground);
    background: var(--image-tile-bg);
    cursor: copy;
}

.ml-rail-lyr--none { color: var(--muted-foreground); cursor: default; font-style: normal; }

/* 底播放条：这一屏的最后一行。内容区在上面自己滚，条压在底下不动，
   看着就是「浮在内容上面」（业主 10-29）；页面真被滚下去时靠 sticky 咬住视口底边。 */
.ml-plaza-bar {
    position: sticky;
    bottom: 0;
    z-index: 40;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    height: 72px;
    margin-top: 12px;
    padding: 0 12px;
    border: 1px solid var(--module-border);
    border-radius: calc(var(--module-radius) - .25rem);
    background: var(--module-bg);
    -webkit-backdrop-filter: var(--module-blur);
    backdrop-filter: var(--module-blur);
}

.ml-bar-song {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 250px;
    min-width: 0;
}

.ml-bar-cover {
    flex: 0 0 auto;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--image-tile-bg);
    border: 1px solid var(--module-border);
}

.ml-bar-meta { display: flex; flex-direction: column; min-width: 0; }

.ml-bar-now {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: var(--foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ml-bar-model {
    font-size: 12px;
    line-height: 17px;
    color: var(--muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ml-bar-ctrl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.ml-bar-btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--foreground);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.ml-bar-btn:hover { color: var(--primary); }

.ml-bar-btn--main {
    width: 40px;
    height: 40px;
    font-size: 20px;
    background: var(--primary);
    color: var(--primary-foreground, #fff);
}

.ml-bar-btn--main:hover { color: var(--primary-foreground, #fff); opacity: .88; }

.ml-bar-time {
    flex: 0 0 auto;
    min-width: 38px;
    text-align: center;
    font-size: 12px;
    color: var(--muted-foreground);
}

.ml-bar-seek {
    flex: 1 1 auto;
    min-width: 60px;
    max-width: 420px;
    height: 22px;
    margin: 0;
    background: transparent;
    accent-color: var(--primary);
    cursor: pointer;
}

.ml-bar-vol { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.ml-bar-volslider {
    width: 110px;
    height: 22px;
    margin: 0;
    background: transparent;
    accent-color: var(--primary);
    cursor: pointer;
}

.ml-plaza-bar audio { display: none; }

@media (min-width: 1200px) {
    .ml-plaza { gap: 16px; }
    .ml-plaza-rail { flex-basis: 284px; }
    .ml-rail-cover { height: 260px; }
}

@media (min-width: 1500px) {
    .ml-plaza { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
    .ml-plaza-rail { flex-basis: 300px; }
    .ml-rail-cover { height: 276px; }
    .ml-pcard { min-height: 158px; padding: 10px; gap: 14px; }
    .ml-pcard-coverwrap { width: 138px; height: 138px; }
    .ml-pcard-title { font-size: 16px; line-height: 24px; }
    .ml-pcard-model, .ml-pcard-style { font-size: 14px; line-height: 21px; }
}

@media (max-width: 1199.98px) {
    .ml-bar-vol { display: none; }
    .ml-bar-song { flex-basis: 190px; }
}

@media (max-width: 991.98px) {
    /* 窄屏不锁高：整页回到一条页面级滚动条；右栏收成吸在播放条上面的歌词板，
       选了歌才浮出来，不选不占地方 */
    .ml-plaza-cols { display: block; overflow: visible; }
    .ml-plaza-main { overflow: visible; padding-right: 0; }

    .ml-plaza-rail {
        display: none;
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 84px;
        top: auto;
        z-index: 60;
        flex-basis: auto;
        max-height: 54vh;
        overflow-y: auto;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    }

    .ml-plaza-rail.has-song { display: flex; }
    /* 切到别的模块时必须收起来：窄屏这块挂在 body 底下，不跟着广场一起隐藏 */
    .ml-plaza-rail.is-away { display: none; }
    .ml-rail-x { display: block; }
    .ml-rail-cover { height: 152px; max-height: none; }
    .ml-rail-lyr { flex: 0 0 auto; max-height: 26vh; }

    .ml-plaza-bar { bottom: 8px; height: auto; padding: 8px 10px; }
    .ml-bar-song { flex-basis: 140px; }
}

@media (max-width: 480px) {
    /* 窄到放不下 272px 最小列时改成单列铺满，禁让网格里溢出横向滚动条 */
    .ml-plaza { grid-template-columns: 1fr; }
    .ml-bar-time { display: none; }
    .ml-bar-cover { width: 38px; height: 38px; }
    .ml-bar-btn { width: 26px; height: 26px; font-size: 15px; }
    .ml-bar-btn--main { width: 34px; height: 34px; font-size: 17px; }
    .ml-bar-ctrl { gap: 8px; }
    .ml-pcard { min-height: 124px; }
    .ml-pcard-coverwrap { width: 104px; height: 104px; }
    .ml-pcard-coverplay { font-size: 24px; }
}

.ml-more { padding: 16px 0 4px; text-align: center; }

.ml-err {
    padding: 12px 14px;
    font-size: 13px;
    border-radius: 10px;
    color: var(--destructive);
    background: var(--module-bg);
    border: 1px solid var(--module-border);
}

/* ---- ④⑤⑥⑦ 通用小块 ---- */
.ml-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.ml-chip {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 999px;
    border: 1px solid var(--module-border);
    background: var(--module-bg-hover);
    color: var(--foreground);
    cursor: pointer;
}

.ml-chip:hover { border-color: var(--primary); color: var(--primary); }
/* 批次435：音乐工具箱「只写词/歌词翻译」弹窗私有件（ml- 前缀，主题令牌随亮暗翻面，只追加） */
.ml-chip.is-on { border-color: var(--primary); color: var(--primary); background: rgba(var(--primary-rgb, 0, 197, 239), .10); }
.ml-ly-models { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ml-ly-models:empty { display: none; }
.ml-ly-restitle { font-weight: 700; font-size: 1rem; margin: 14px 0 8px; color: var(--foreground, #1f2937); }
.ml-ly-resbody { border: 1px solid var(--module-border, #e5e7eb); border-radius: 10px; background: var(--card, #fff); padding: 12px 14px; font-size: .9rem; line-height: 1.7; max-height: 320px; overflow-y: auto; color: var(--foreground, #1f2937); }
.ml-ly, .ml-tr { max-width: 560px; }
.ml-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.ml-soon {
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    vertical-align: middle;
    border-radius: 999px;
    border: 1px dashed var(--module-border);
    background: var(--module-bg-hover);
    color: var(--muted-foreground);
}

.ml-stylegroup { margin-bottom: 18px; }

.ml-stylegroup-h {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--foreground);
}

.ml-stylegroup-h i { color: var(--primary); }

.ml-styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .ml-styles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .ml-styles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ml-style {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 11px 13px;
    text-align: left;
    border-radius: 12px;
    border: 1px solid var(--module-border);
    background: var(--module-bg);
    cursor: pointer;
    -webkit-backdrop-filter: var(--module-blur);
    backdrop-filter: var(--module-blur);
    transition: background .18s, border-color .18s;
}

.ml-style:hover { background: var(--module-bg-hover); border-color: var(--primary); }
.ml-style b { font-size: 13px; font-weight: 600; color: var(--foreground); }

.ml-style small {
    font-size: 11px;
    line-height: 1.5;
    color: var(--muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ml-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .ml-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .ml-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ml-tool {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 14px;
    text-align: left;
    border-radius: 12px;
    border: 1px solid var(--module-border);
    background: var(--module-bg);
}

button.ml-tool { cursor: pointer; transition: background .18s, border-color .18s; }
button.ml-tool:hover { background: var(--module-bg-hover); border-color: var(--primary); }
.ml-tool > i { font-size: 20px; color: var(--primary); }
.ml-tool b { font-size: 13px; font-weight: 600; color: var(--foreground); }
.ml-tool small { font-size: 11px; line-height: 1.6; color: var(--muted-foreground); }
.ml-tool-go { margin-top: 6px; font-size: 11px; color: var(--primary); }
.ml-tool-go i { margin-left: 3px; font-size: 11px; }
.ml-tool.is-soon { opacity: .74; }
.ml-tool.is-soon > i { color: var(--muted-foreground); }

.ml-tool.is-soon .ml-soon {
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
}

.ml-help p {
    margin: 0 0 9px;
    font-size: 13px;
    line-height: 1.85;
    color: var(--foreground);
}

.ml-help ol { margin: 0 0 4px; padding-left: 20px; }

.ml-help ol li {
    margin-bottom: 5px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--foreground);
}

.ml-help b { color: var(--primary); }


/* 320px 也要齐：外壳和内边距一起收，禁被内容顶出横向滚动 */
@media (max-width: 380px) {
    .ml-shell { padding: 12px 8px 32px; }
    .ml-style, .ml-tool { padding: 10px; }
}

/* ---------- 歌词海报（批次201）：弹窗 + canvas 预览 ---------- */

body.ml-poster-lock { overflow: hidden; }

.ml-poster-ov {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3050;
    background: rgba(8, 10, 24, 0.62);
    padding: 18px 14px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.ml-poster {
    max-width: 980px;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid var(--module-border);
    background: var(--module-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.ml-poster-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--module-border);
}

.ml-poster-head b { font-size: 15px; color: var(--foreground); }

.ml-poster-x {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--module-border);
    background: transparent;
    color: var(--foreground);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ml-poster-body {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    align-items: start;
}

.ml-poster-lb {
    display: block;
    margin: 10px 0 6px;
    font-size: 12px;
    color: var(--muted-foreground);
}

.ml-poster-lb:first-child { margin-top: 0; }

.ml-poster-in,
.ml-poster-ta {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--module-border);
    background: var(--input-bg, rgba(255, 255, 255, 0.06));
    color: var(--foreground);
    font-size: 13px;
    padding: 9px 11px;
}

.ml-poster-ta { resize: vertical; line-height: 1.7; min-height: 140px; }

.ml-poster-tpls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.ml-poster-tpl {
    position: relative;
    height: 56px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
}

.ml-poster-tpl.is-on { border-color: #fff; box-shadow: 0 0 0 2px var(--primary); }

.ml-poster-tpl span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3px 0;
    font-size: 11px;
    color: #fff;
    text-align: center;
    background: rgba(0, 0, 0, 0.35);
}

.ml-poster-dl {
    width: 100%;
    margin-top: 14px;
    padding: 11px 0;
    border-radius: 10px;
    border: 0;
    background: var(--primary);
    color: var(--primary-foreground, #fff);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ml-poster-prev { min-width: 0; text-align: center; }

.ml-poster-prev canvas {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* 手机版：表单在上、预览在下，一样办得完 */
@media (max-width: 767.98px) {
    .ml-poster-body { grid-template-columns: minmax(0, 1fr); }
    .ml-poster-ov { padding: 10px 8px; }
}

@media (max-width: 380px) {
    .ml-poster-tpls { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .ml-poster-body { padding: 12px; }
}

/* ---------- ⑥-C 铃声裁剪 ----------
 * 弹窗外壳直接借歌词海报那套 .ml-poster-*，这里只补它独有的几件。 */
.ml-ring-msg { min-height: 18px; margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--warning); }

.ml-ring-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.ml-ring-info { margin-top: 12px; font-size: 13px; color: var(--muted-foreground); }

.ml-ring-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.ml-ring-btns .ml-poster-dl { width: auto; flex: 1 1 150px; margin-top: 0; }

.ml-ring-play {
    flex: 1 1 150px;
    padding: 11px 0;
    border-radius: 10px;
    border: 1px solid var(--module-border);
    background: var(--input-bg, rgba(255, 255, 255, 0.06));
    color: var(--foreground);
    font-size: 14px;
    cursor: pointer;
}

.ml-ring-play[disabled],
.ml-poster-dl[disabled] { opacity: .45; cursor: not-allowed; }

.ml-ring-hint { margin-top: 12px; font-size: 12px; line-height: 1.7; color: var(--muted-foreground); }

.ml-ring-prev { min-width: 0; text-align: center; }

.ml-ring-prev canvas {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.ml-ring-tip { margin-top: 8px; font-size: 12px; color: var(--muted-foreground); }

/* 下拉在暗底上要看得清：选项底色跟着模块走 */
select.ml-poster-in option { background: var(--module-bg, #1b1f2e); color: var(--foreground, #fff); }

@media (max-width: 380px) {
    .ml-ring-nums { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- ⑥-F 人声伴奏分离 / MV 制作 ----------
 * 外壳仍借 .ml-poster-*，这里只补进度圈、成品播放器、下载按钮这几件独有的。 */
.ml-mt-prog { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--muted-foreground); }

.ml-mt-spin {
    width: 18px; height: 18px; flex: 0 0 18px;
    border: 2px solid var(--module-border, rgba(255, 255, 255, .25));
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: ml-mt-rot .8s linear infinite;
}

@keyframes ml-mt-rot { to { transform: rotate(360deg); } }

.ml-mt-res { margin-top: 14px; display: grid; gap: 14px; }

.ml-mt-item {
    border: 1px solid var(--module-border, #e5e7eb);
    border-radius: 12px;
    background: var(--card, rgba(255, 255, 255, .04));
    padding: 12px 14px;
}

.ml-mt-item-lb { font-size: 13px; font-weight: 600; color: var(--foreground); margin-bottom: 8px; }

.ml-mt-audio { width: 100%; height: 40px; }

.ml-mt-video { width: 100%; max-height: 360px; border-radius: 10px; background: #000; }

.ml-mt-dl { width: auto; flex: 0 0 auto; margin-top: 10px; padding: 9px 22px; }

@media (max-width: 380px) {
    .ml-mt-video { max-height: 240px; }
}

/* ---------- ⑥-D 变速变调 ----------
 * 一个滑杆就够，弹窗收成单列窄版；外壳照旧借 .ml-poster-*。 */
.ml-speed { max-width: 560px; }

.ml-speed .ml-poster-body { grid-template-columns: minmax(0, 1fr); }

.ml-speed-rng {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 26px;
    margin: 2px 0 0;
    background: transparent;
    accent-color: var(--primary);
    cursor: pointer;
}

.ml-speed-val { margin-top: 2px; font-size: 13px; line-height: 1.6; color: var(--foreground); }

/* ---------- ⑥-E 批量下载 ----------
 * 外壳照旧借 .ml-poster-*，只有中间那份歌单是新的。 */
.ml-zip { max-width: 560px; }

.ml-zip .ml-poster-body { grid-template-columns: minmax(0, 1fr); }

.ml-zip-all {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--muted-foreground);
    cursor: pointer;
}

.ml-zip-all input { accent-color: var(--primary); cursor: pointer; }

.ml-zip-list {
    max-height: 46vh;
    overflow-y: auto;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.ml-zip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 6px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
}

.ml-zip-item + .ml-zip-item { border-top: 1px solid var(--border); }

.ml-zip-item:hover { background: rgba(127, 127, 127, .12); }

.ml-zip-item input { flex: 0 0 auto; accent-color: var(--primary); cursor: pointer; }

.ml-zip-nm {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--foreground);
}

.ml-zip-tag { flex: 0 0 auto; font-size: 12px; color: var(--muted-foreground); }

.ml-zip-none { padding: 16px 8px; font-size: 13px; line-height: 1.7; color: var(--muted-foreground); }

.ml-zip #zipDl { margin-top: 14px; }

@media (max-width: 380px) {
    .ml-zip-tag { display: none; }
}

/* ==========================================================================
   批次205 段1（业主 10-29 批准的零成本四项之二/三/四）
   作用域锁死 body.page-music-lab + 桌面 ≥992，手机端沿用原有浮层行为一律不动。
   只追加覆盖，绝不改上面任何一条原规则（CSS 只追加死命令）。
   ①右栏上移吃掉顶部空白 ②播放条左右收窄 ③右栏封面不被长歌词挤扁
   ========================================================================== */
@media (min-width: 992px) {
    /* ① 顶部空白回收：广场上面叠了好几层留白（外壳顶距 + 页头 + 内容区顶距 + 提示行），
       逐层压掉，右栏大封面随之顶到最上，把原来那条空白带吃掉。 */
    body.page-music-lab .app-shell { padding-top: 0; }
    body.page-music-lab .ml-shell { padding-top: 6px; }
    body.page-music-lab .wb-main-head { padding-top: 10px; padding-bottom: 10px; }
    body.page-music-lab .wb-main-body { padding-top: 8px; }
    body.page-music-lab .ml-plaza-tip { margin-bottom: 8px; }

    /* ② 播放条左右对齐（业主 10-29 复验：左端贴内框架左边、右端刚好卡到歌词栏左边）：
       不再居中悬浮，左端与卡片列左端齐平，右端顶到歌词栏左边缘（右栏宽 268），
       和上面左卡片列、右歌词栏上下对成一条线。右栏宽随断点变，跟值见下面两个补充块。 */
    body.page-music-lab .ml-plaza-bar {
        width: auto;
        max-width: none;
        align-self: stretch;
        margin-left: 0;
        margin-right: 268px;
    }

    /* ③ 右栏封面不再被长歌词挤扁：原规则 flex:0 1 auto + max-height:46% + min-height:88px，
       歌词一长就把封面压到 88px 再被 object-fit:cover 裁掉。改成封面不缩（flex:0 0 auto、
       撤掉百分比上限），高度沿用上面各断点写死的 244/260/276；歌词区自己滚，并给它留
       一个最小高度，保证封面完整的同时歌词永远露得出来。 */
    body.page-music-lab .ml-rail-cover {
        flex: 0 0 auto;
        max-height: none;
        min-height: 0;
    }
    body.page-music-lab .ml-rail-lyr { min-height: 90px; }

    /* ⑤ 歌词整段展开态（业主 10-29：歌词还是没有完全显示出来）：外壳高度交给内容撑开
       （music-lab.js fitPlaza 展开支路写 height:auto + 至少一屏的底），这里只负责解夹——
       两列容器和右栏不再裁高度、歌词框不再内滚，整段词一次铺完，页面级滚动条接走。
       点「收起」摘掉这个类，回到一屏内滚的老样子。 */
    body.page-music-lab .ml-lyr-open .ml-plaza-cols { overflow: visible; align-items: flex-start; }
    body.page-music-lab .ml-lyr-open .ml-plaza-main { overflow: visible; }
    body.page-music-lab .ml-lyr-open .ml-plaza-rail { overflow: visible; }
    body.page-music-lab .ml-lyr-open .ml-rail-song { flex: 0 0 auto; }
    body.page-music-lab .ml-lyr-open .ml-rail-lyr { flex: 0 0 auto; overflow: visible; }
    /* 展开/收起开关只给电脑版：手机版右栏本是浮层自带滚动，再加一个开关只会迷惑 */
    body.page-music-lab .ml-rail-more { display: block; }
}

/* 批次205 段1补：播放条右端跟右栏宽走（1200 档右栏 284、1500 档 300），右端始终卡歌词栏左边 */
@media (min-width: 1200px) {
    body.page-music-lab .ml-plaza-bar { margin-right: 284px; }
}

@media (min-width: 1500px) {
    body.page-music-lab .ml-plaza-bar { margin-right: 300px; }
}

/* 右栏「收起/展开全文」小字开关：默认藏（手机版），电脑版上面那块点亮 */
.ml-rail-more {
    display: none;
    flex: 0 0 auto;
    align-self: flex-start;
    margin: 7px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted-foreground);
    cursor: pointer;
}

.ml-rail-more:hover { color: var(--foreground); }
/* ==========================================================================
   批次206 段3：/records 音乐页签改成「左边目录 + 右边当前歌」两栏
   （左边一条记录一张紧凑卡、每首歌一行；右边常驻封面+第几首切换+播放器+整段歌词）
   图片/视频页签不进 .is-music，下面这些规则一条都不会碰到它们
   ========================================================================== */
.records-split { display: block; min-width: 0; }

/* 音乐是「一条一条往下听」的清单，不是照片墙：任何宽度都一行一张 */
.records-split.is-music .history-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }

.records-split.is-music .history-list .record-card {
    height: auto;
    min-height: 0;
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-rows: 1fr;
    align-items: start;
    gap: 10px;
    padding: 10px;
    overflow: visible;
}

.records-split.is-music .history-list .record-image { width: 92px; height: 92px; aspect-ratio: auto; min-height: 0; border-radius: 10px; }
.records-split.is-music .history-list .record-image img { height: 100%; object-fit: contain; }
.records-split.is-music .history-list .record-body { align-content: start; gap: 6px; padding: 0; }

/* 卡里的歌单行：一行一首，点哪一行右边就换成那一首 */
.rec-songs { display: grid; gap: 6px; margin: 2px 0 0; }
.rec-song { display: flex; align-items: center; gap: 6px; min-width: 0; }

.rec-song-btn {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--gray-200);
    border-radius: 9px;
    background: rgba(120, 130, 150, 0.06);
    color: var(--foreground);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.rec-song-btn i { flex: 0 0 auto; font-size: 16px; color: var(--primary); }
.rec-song-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-song-btn em { flex: 0 0 auto; margin-left: auto; font-style: normal; font-size: 12px; font-weight: 650; color: var(--muted-foreground); }
.rec-song-btn:hover { background: rgba(120, 130, 150, 0.13); }
.rec-song-btn.is-sel { border-color: var(--primary); background: rgba(37, 99, 235, 0.10); color: var(--primary-fg); }

.rec-song-dl {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--gray-200);
    border-radius: 9px;
    background: rgba(120, 130, 150, 0.06);
    color: var(--muted-foreground);
    font-size: 14px;
}

.rec-song-dl:hover { border-color: var(--primary); color: var(--primary); }

.rec-song-wait {
    padding: 6px 10px;
    border: 1px dashed var(--gray-200);
    border-radius: 9px;
    color: var(--muted-foreground);
    font-size: 12px;
    font-weight: 650;
}

/* 窄屏没有右边那一栏，点一行就在卡里就地展开 */
.rec-song-inline { display: none; }
.rec-song-inline.is-open {
    display: grid;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: rgba(120, 130, 150, 0.06);
}

.rec-inline-lyr {
    max-height: 40vh;
    overflow: auto;
    color: var(--foreground);
    font-size: 12px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.rec-inline-none { color: var(--muted-foreground); font-size: 12px; }

/* 右边那一栏：只有电脑版才立起来 */
.rec-rail { display: none; }

@media (min-width: 992px) {
    .records-split.is-music { display: flex; align-items: flex-start; gap: 16px; }
    .records-split.is-music > .history-list { flex: 1 1 auto; min-width: 0; }

    .rec-rail {
        display: flex;
        flex: 0 0 340px;
        flex-direction: column;
        gap: 8px;
        align-self: flex-start;
        position: sticky;
        top: 84px;
        max-height: calc(100vh - 104px);
        padding: 12px;
        border: 1px solid var(--gray-200);
        border-radius: 14px;
        background: var(--surface);
        box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
    }
}

.rec-rail-cover {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    height: 200px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(120, 130, 150, 0.10);
    color: var(--primary);
    font-size: 40px;
}

.rec-rail-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rec-rail-title { flex: 0 0 auto; font-size: 15px; font-weight: 850; line-height: 1.4; color: var(--foreground); word-break: break-word; }
.rec-rail-sub { flex: 0 0 auto; font-size: 12px; color: var(--muted-foreground); }

.rec-rail-nav { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }

.rec-rail-nav button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: rgba(120, 130, 150, 0.06);
    color: var(--foreground);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.rec-rail-nav button:hover { border-color: var(--primary); color: var(--primary); }
.rec-rail-nav em { flex: 1 1 auto; min-width: 0; font-style: normal; text-align: center; font-size: 12px; color: var(--muted-foreground); }
.rec-rail-dl {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: rgba(120, 130, 150, 0.06);
    color: var(--foreground);
    font-size: 12px;
    font-weight: 700;
}

.rec-rail-dl:hover { border-color: var(--primary); color: var(--primary); }

/* 歌词占掉右栏剩下的全部高度：一屏能看几十行，长的在这一块里滚，右栏本身不会被顶出屏幕 */
.rec-rail-lyr {
    flex: 1 1 auto;
    min-height: 90px;
    overflow: auto;
    padding: 9px 10px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: rgba(120, 130, 150, 0.06);
    color: var(--foreground);
    font-size: 12.5px;
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-word;
}

.rec-rail-lyr.is-none { color: var(--muted-foreground); font-style: normal; }

@media (max-width: 991px) {
    /* 窄屏：卡里就地展开的那块把歌词放宽到多半屏，别只露一截 */
    .rec-inline-lyr { max-height: 60vh; }
}

/* 批次206 段3 补：靶场量出两处
   ① 播放器被竖排弹性盒压成 5px 高（默认 flex-shrink:1），钉死不缩
   ② 长歌词关在 594px 的小滚动框里只露一截——照试听广场同一套路加「展开全文」，
      展开后右栏不再限高、整段词铺开、页面跟着长高 */
.rec-rail audio { flex: 0 0 auto; }

.rec-rail-more {
    display: block;
    flex: 0 0 auto;
    align-self: flex-start;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted-foreground);
    font-size: 12px;
    line-height: 1.6;
    cursor: pointer;
}

.rec-rail-more:hover { color: var(--foreground); }

@media (min-width: 992px) {
    .rec-rail.is-open { position: static; max-height: none; }
    .rec-rail.is-open .rec-rail-lyr { flex: 0 0 auto; max-height: none; overflow: visible; }
}

/* 批次206 段3 补2：窄屏没有右边那一栏，歌词就地铺在卡里。
   卡左边那 92px 封面这时是白占地方（一行中文只剩八九个字），展开歌词就把封面收起来让位 */
@media (max-width: 991px) {
    .records-split.is-music .record-card.is-lyr-open { grid-template-columns: minmax(0, 1fr); height: auto; }
    .records-split.is-music .record-card.is-lyr-open .record-image { display: none; }
}

@media (max-width: 720px) {
    .history-list .record-card.is-lyr-open { grid-template-columns: minmax(0, 1fr); height: auto; }
    .history-list .record-card.is-lyr-open .record-image { display: none; }
}

/* ==========================================================================
   批次209（#238 业主排队项）：精选案例页手机版一行 3 个挤成 2 个
   业主原话是「手机版首页精选案例每行 3 个」，量下来首页两道墙（.hx-wall__grid）
   在 10-13 批次80 就已经是 ≥1024 五列 / ≤1023 三列 / ≤719 两列，每行 3 个的那道墙
   其实是 /inspiration 精选案例页的 .cases-waterfall —— 它自己另有一把尺子
   （≤1024 四列 / ≤720 三列），跟首页不同档，所以同一部手机上两页看起来不一样密。
   这里不删上面那两条老规则（CSS 只追加），只在文件末尾按首页那把尺子盖一层，
   两页从此同一档：≥1024 五列不动 / ≤1023 三列 / ≤719 两列。
   ========================================================================== */
@media (max-width: 1023px) {
    .cases-waterfall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
    .cases-waterfall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 上面第 5437 行那条老规则写的是 max-width:1024px 四列，正好卡在 1024 这一根像素上
   跟首页（1024 已经是五列）差一档。业主真机窗口常落在 1024–1199，这一根不能留缝。 */
@media (min-width: 1024px) {
    .cases-waterfall { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
}

/* ===== 微信里存不了片子的引导蒙层（批次246 · #416）=====
   微信内置浏览器不给网页存视频，这层只负责把「换个浏览器两步」讲清楚 + 一键复制地址。
   业主 11-08 选 B：「就在这儿看」按钮已删（跳全屏切不回去没有意义），现在只剩复制地址一颗按钮。
   颜色一律写死深色遮罩 + 白卡，不引主题令牌：它只在微信里出现，亮暗两套下都必须一眼看得清，
   引了令牌就会在暗色下变成白压白（批次39 那个病）。
   兼容口径按前台老内核那套来（禁 Chrome49+ 才有的写法）：不用 inset 简写、不用 flex gap，
   间距全靠 margin，否则老 X5 上遮罩盖不满屏。 */
.wxgate { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2000;
          background: rgba(0,0,0,.62); display: flex; align-items: center; justify-content: center; padding: 20px; }
.wxgate__box { position: relative; width: 100%; max-width: 380px; background: #fff; color: #1b1f27;
               border-radius: 14px; padding: 22px 18px 18px; box-shadow: 0 12px 40px rgba(0,0,0,.28);
               max-height: 86vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.wxgate__x { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; padding: 0; border: 0;
             background: none; color: #8a92a3; font-size: 24px; line-height: 34px; text-align: center; cursor: pointer; }
.wxgate__title { font-size: 17px; font-weight: 700; margin: 0 0 8px; padding-right: 30px; }
.wxgate__lead { font-size: 13px; line-height: 1.7; color: #5b6472; margin: 0 0 12px; }
.wxgate__step { display: flex; align-items: flex-start; font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.wxgate__step i { flex: 0 0 20px; width: 20px; height: 20px; margin: 1px 8px 0 0; border-radius: 50%;
                  background: #2563eb; color: #fff; font-style: normal; font-size: 12px; font-weight: 700;
                  text-align: center; line-height: 20px; }
.wxgate__urltip { font-size: 12px; color: #8a92a3; margin: 12px 0 6px; }
.wxgate__url { font-size: 12px; line-height: 1.6; color: #3b4251; background: #f3f5f9; border: 1px solid #e3e7ef;
               border-radius: 8px; padding: 8px 10px; word-break: break-all;
               -webkit-user-select: text; user-select: text; }
.wxgate__btns { display: flex; margin-top: 14px; }
.wxgate__btn { flex: 1 1 0; min-width: 0; border: 0; border-radius: 10px; padding: 12px 8px; margin-left: 8px;
               font-size: 14px; font-weight: 600; cursor: pointer; background: #eef1f6; color: #333c4a; }
.wxgate__btn:first-child { margin-left: 0; }
.wxgate__btn--main { background: #2563eb; color: #fff; }

/* 批次257（业主 11-08）：左栏/抽屉的二级清单默认收起，点父项一开一关。
   只有 app.js 真挂上 .sn-collapsible 才收；脚本没跑起来时照旧铺开，导航不会整个消失。
   用 display 切换而不是 max-height 动画：二级条数将来会增加，固定高度上限会把它裁掉一半。 */
.sn-kids.sn-collapsible { display: none; }
.sn-kids.sn-collapsible.is-open { display: block; }
button.sn-toggle { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.sn-caret { display: none; margin-left: auto; font-size: 1rem; opacity: .7; transition: transform .16s ease; }
.sn-toggle-ready .sn-caret { display: inline-block; }
.sn-toggle-ready.is-open .sn-caret { transform: rotate(180deg); }

/* ==========================================================================
   小红书种草笔记（/note，第二类商业模块第一块）
   外壳与输入件复用上面 pw- 家族，这里只补本页独有的 nt- 家族：
   表单三格的间距、三版笔记的结果卡。颜色一律走 pw- 同款成对令牌
   （--surface/--gray-*、--primary-light+--primary-fg），暗色是默认态，
   禁单独写死会随主题翻面的字色底色的组合。
   ========================================================================== */
.nt-field + .nt-field { margin-top: 14px; }
.nt-opt { margin-left: 4px; font-weight: 400; font-size: 12px; color: var(--gray-600); }

.nt-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-50);
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-800);
}
.nt-input:focus { outline: none; border-color: var(--primary-fg); background: var(--surface); }
.nt-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-50);
    font-size: 14px;
    line-height: 1.75;
    color: var(--gray-800);
    resize: vertical;
}
.nt-field textarea:focus { outline: none; border-color: var(--primary-fg); background: var(--surface); }
.nt-field + .pw-models { margin-top: 14px; }
.nt-field ~ .pw-bar { margin-top: 16px; }

/* 面向人群 5 档快选（点一下填进输入框，也可以自己写） */
.nt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.nt-chip {
    padding: 6px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--gray-50);
    font-size: 13px;
    color: var(--gray-700);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.nt-chip:hover { border-color: var(--primary-fg); color: var(--gray-900); }
.nt-chip.is-on {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), .10);
    color: var(--primary);
    font-weight: 600;
}

/* ---------- 三版笔记结果卡 ---------- */
.nt-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.nt-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.nt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.nt-ver {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-fg);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.nt-title { margin: 0 0 10px; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--gray-800); word-break: break-word; }
.nt-body {
    flex: 1;
    font-size: 13.5px;
    line-height: 1.95;
    color: var(--gray-700);
    white-space: pre-wrap;
    word-break: break-word;
}
.nt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.nt-tags em {
    font-style: normal;
    font-size: 12px;
    line-height: 1.5;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    word-break: break-word;
}

@media (max-width: 1199px) {
    .nt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .nt-cards { grid-template-columns: minmax(0, 1fr); }
}

/* 批次422（业主 11-09 点名闪跳）：二级清单从第一帧就收起，不等 body 末尾 app.js
   挂 .sn-collapsible——那段时差会先画一帧铺开态（点导航换页时的闪跳）。
   标记由 main.php head 第一行脚本挂到 html 上；脚本被禁就没有 sn-js，二级照旧铺开。
   收起 (0,2,1) 压得住基础 .sn-kids 的 flex；展开 (0,3,1) 与批次257 接管后的 block 同值，
   接管前后一模一样，不会二次跳。 */
html.sn-js .sn-kids { display: none; }
html.sn-js .sn-kids.is-open { display: block; }

/* ==========================================================================
   短视频口播脚本（/script，第二类商业模块第二块，批次423）
   外壳与输入件复用上面 pw- 家族，这里只补本页独有的 sp- 家族：
   表单三格与秒数 chips、分镜结果卡。颜色一律走 pw- 同款成对令牌
   ========================================================================== */
.sp-field { margin-bottom: .9rem; }
.sp-field:last-of-type { margin-bottom: .2rem; }
.sp-input {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-radius: .6rem;
    background: var(--bg-subtle, rgba(127, 127, 127, .06));
    color: var(--fg, inherit);
    font-size: .92rem;
}
.sp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft, rgba(99, 102, 241, .15));
}
.sp-opt { margin-left: .35rem; font-size: .78rem; opacity: .65; }
.sp-secs { display: flex; gap: .5rem; flex-wrap: wrap; }
.sp-sec {
    padding: .42rem 1.05rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font-size: .88rem;
    cursor: pointer;
}
.sp-sec.active {
    border-color: var(--primary);
    background: var(--primary-soft, rgba(99, 102, 241, .12));
    color: var(--primary);
    font-weight: 600;
}
.sp-scenes { display: flex; flex-direction: column; gap: .8rem; }
.sp-scene {
    border: 1px solid var(--border);
    border-radius: .8rem;
    padding: .8rem .95rem;
    background: var(--bg-subtle, rgba(127, 127, 127, .05));
}
.sp-scene-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .5rem;
}
.sp-sec-badge {
    padding: .18rem .6rem;
    border-radius: 999px;
    background: var(--primary-soft, rgba(99, 102, 241, .12));
    color: var(--primary);
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}
.sp-shot {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin-bottom: .45rem;
    font-size: .82rem;
    opacity: .75;
}
.sp-shot i { margin-top: .12rem; }
.sp-line {
    font-size: .95rem;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}
@media (max-width: 767px) {
    .sp-scene-head { flex-wrap: wrap; }
}

/* ==========================================================================
   电商详情页文案（/detail，第二类商业模块第三块，批次424）
   外壳与输入件复用上面 pw- 家族，这里只补本页独有的 dt- 家族：
   表单两格的间距、卖点清单、板块长文卡。颜色一律走 pw- 同款成对令牌
   ========================================================================== */
.dt-field { margin-bottom: .9rem; }
.dt-field:last-of-type { margin-bottom: .2rem; }
.dt-input {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-radius: .6rem;
    background: var(--bg-subtle, rgba(127, 127, 127, .06));
    color: var(--fg, inherit);
    font-size: .92rem;
}
.dt-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft, rgba(99, 102, 241, .15));
}
.dt-opt { margin-left: .35rem; font-size: .78rem; opacity: .65; }
.dt-points {
    border: 1px solid var(--border);
    border-radius: .8rem;
    padding: .8rem .95rem;
    margin-bottom: .8rem;
    background: var(--bg-subtle, rgba(127, 127, 127, .05));
}
.dt-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .5rem;
    font-weight: 600;
    font-size: .92rem;
}
.dt-points ul { margin: 0; padding-left: 1.2rem; }
.dt-points li { font-size: .92rem; line-height: 1.9; word-break: break-word; }
.dt-sections { display: flex; flex-direction: column; gap: .8rem; }
.dt-section {
    border: 1px solid var(--border);
    border-radius: .8rem;
    padding: .8rem .95rem;
    background: var(--bg-subtle, rgba(127, 127, 127, .05));
}
.dt-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .5rem;
}
.dt-section-head b { font-size: .95rem; }
.dt-body {
    font-size: .95rem;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}
@media (max-width: 767px) {
    .dt-section-head, .dt-block-head { flex-wrap: wrap; }
}

/* ==========================================================================
   朋友圈私域文案（/moments，第二类商业模块第四块，批次425）
   外壳与输入件复用上面 pw- 家族，这里只补本页独有的 mm- 家族：
   表单两格的间距、三条朋友圈结果卡。颜色一律走 pw- 同款成对令牌
   ========================================================================== */
.mm-field { margin-bottom: .9rem; }
.mm-field:last-of-type { margin-bottom: .2rem; }
.mm-input {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-radius: .6rem;
    background: var(--bg-subtle, rgba(127, 127, 127, .06));
    color: var(--fg, inherit);
    font-size: .92rem;
}
.mm-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft, rgba(99, 102, 241, .15));
}
.mm-opt { margin-left: .35rem; font-size: .78rem; opacity: .65; }
.mm-posts { display: flex; flex-direction: column; gap: .8rem; }
.mm-post {
    border: 1px solid var(--border);
    border-radius: .8rem;
    padding: .8rem .95rem;
    background: var(--bg-subtle, rgba(127, 127, 127, .05));
}
.mm-post-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .5rem;
}
.mm-no-badge {
    padding: .18rem .6rem;
    border-radius: 999px;
    background: var(--primary-soft, rgba(99, 102, 241, .12));
    color: var(--primary);
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}
.mm-text {
    font-size: .95rem;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}
.mm-extra {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin-top: .45rem;
    font-size: .82rem;
    opacity: .75;
}
.mm-extra i { margin-top: .12rem; }
@media (max-width: 767px) {
    .mm-post-head { flex-wrap: wrap; }
}

/* ==========================================================================
   直播话术（/live，第二类商业模块第五块，批次426）
   外壳与输入件复用上面 pw- 家族，这里只补本页独有的 lv- 家族：
   表单两格的间距、各段话术结果卡。颜色一律走 pw- 同款成对令牌
   ========================================================================== */
.lv-field { margin-bottom: .9rem; }
.lv-field:last-of-type { margin-bottom: .2rem; }
.lv-input {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-radius: .6rem;
    background: var(--bg-subtle, rgba(127, 127, 127, .06));
    color: var(--fg, inherit);
    font-size: .92rem;
}
.lv-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft, rgba(99, 102, 241, .15));
}
.lv-opt { margin-left: .35rem; font-size: .78rem; opacity: .65; }
.lv-segments { display: flex; flex-direction: column; gap: .8rem; }
.lv-seg {
    border: 1px solid var(--border);
    border-radius: .8rem;
    padding: .8rem .95rem;
    background: var(--bg-subtle, rgba(127, 127, 127, .05));
}
.lv-seg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .5rem;
}
.lv-stage-badge {
    padding: .18rem .6rem;
    border-radius: 999px;
    background: var(--primary-soft, rgba(99, 102, 241, .12));
    color: var(--primary);
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}
.lv-line {
    font-size: .95rem;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}
.lv-tip {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin-top: .45rem;
    font-size: .82rem;
    opacity: .75;
}
.lv-tip i { margin-top: .12rem; }
@media (max-width: 767px) {
    .lv-seg-head { flex-wrap: wrap; }
}

/* ==========================================================================
   公文与工作汇报（/report，第二类商业模块第六块，批次427）
   外壳与输入件复用上面 pw- 家族，这里只补本页独有的 rp- 家族：
   表单两格的间距、文种徽章、各段正文结果卡。颜色一律走 pw- 同款成对令牌
   ========================================================================== */
.rp-field { margin-bottom: .9rem; }
.rp-field:last-of-type { margin-bottom: .2rem; }
.rp-input {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-radius: .6rem;
    background: var(--bg-subtle, rgba(127, 127, 127, .06));
    color: var(--fg, inherit);
    font-size: .92rem;
}
.rp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft, rgba(99, 102, 241, .15));
}
.rp-opt { margin-left: .35rem; font-size: .78rem; opacity: .65; }
.rp-type-badge {
    display: inline-block;
    margin-left: .5rem;
    padding: .12rem .55rem;
    border-radius: 999px;
    background: var(--primary-soft, rgba(99, 102, 241, .12));
    color: var(--primary);
    font-size: .74rem;
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
}
.rp-sections { display: flex; flex-direction: column; gap: .8rem; }
.rp-sec {
    border: 1px solid var(--border);
    border-radius: .8rem;
    padding: .8rem .95rem;
    background: var(--bg-subtle, rgba(127, 127, 127, .05));
}
.rp-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .5rem;
}
.rp-head-label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--fg, inherit);
    word-break: break-word;
}
.rp-body {
    font-size: .95rem;
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-word;
}
@media (max-width: 767px) {
    .rp-sec-head { flex-wrap: wrap; }
}

/* ===== 简历优化与求职信 /resume (rs-) ===== */
.rs-field { margin-bottom: 18px; }
.rs-input {
    width: 100%; padding: 10px 14px; border-radius: 10px;
    border: 1px solid var(--border-color, rgba(255,255,255,.12));
    background: var(--card-bg, rgba(255,255,255,.04));
    color: var(--text-color, #e8e8e8); font-size: 15px;
}
.rs-input:focus { outline: none; border-color: var(--primary, #6c8cff); }
#rsExtra {
    width: 100%; padding: 12px 14px; border-radius: 10px; resize: vertical;
    border: 1px solid var(--border-color, rgba(255,255,255,.12));
    background: var(--card-bg, rgba(255,255,255,.04));
    color: var(--text-color, #e8e8e8); font-size: 14px; line-height: 1.7;
}
#rsExtra:focus { outline: none; border-color: var(--primary, #6c8cff); }
.rs-sections { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.rs-sec {
    border-radius: 12px; padding: 16px 18px;
    background: var(--card-bg, rgba(255,255,255,.04));
    border: 1px solid var(--border-color, rgba(255,255,255,.08));
}
.rs-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rs-head-label { font-weight: 600; font-size: 14px; color: var(--primary, #6c8cff); }
.rs-body { font-size: 14px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; color: var(--text-color, #e8e8e8); }
.rs-letter { border-left: 3px solid var(--primary, #6c8cff); }
/* 批次429 改写润色与翻译（/rewrite）：字段 wrapper + 原文框；结果区复用 rs- 家族 */
.rw-field { margin-bottom: 18px; }
#rwText {
    width: 100%; padding: 12px 14px; border-radius: 10px; resize: vertical;
    border: 1px solid var(--border-color, rgba(255,255,255,.12));
    background: var(--card-bg, rgba(255,255,255,.04));
    color: var(--text-color, #e8e8e8); font-size: 14px; line-height: 1.7;
}
#rwText:focus { outline: none; border-color: var(--primary, #6c8cff); }
@media (max-width: 767px) {
    .rs-sec-head { flex-wrap: wrap; }
}

/* ---------- 批次447：音乐工具箱九件改整页·全站同框架 ----------
 * 业主令：工具页与全站同一套底层框架（wb-main 页头 + wb-card 模块），不搞特殊壳。
 * 外壳 .ml-poster-ov 只负责铺满「除左导航外」的内容区并留出与正文一致的内边距；
 * 内盒由 mlStandardize() 换成标准 wb-main，模块外观全部继承全站 wb-* 规则。
 * 桌面(≥992px 且 has-sidenav)左缘让出 13rem 左导航；手机左导航收抽屉、整页铺满。 */
.ml-poster-ov {
    inset: 0;
    left: 0;
    padding: 16px 20px;
    background: var(--background, var(--surface));
}
.ml-toolpage {
    width: 100%;
    max-width: none;
    margin: 0;
    min-height: calc(100vh - 32px);
}
.ml-toolback {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: transparent;
    color: var(--text-color, #e8e8e8);
    font-size: 13px;
    cursor: pointer;
}
@media (min-width: 992px) {
    body.has-sidenav .ml-poster-ov { left: 13rem; }
}
@media (max-width: 767.98px) {
    .ml-poster-ov { padding: 10px 12px; }
    .ml-toolpage { min-height: calc(100vh - 20px); }
}

/* ==========================================================================
   批次642：工具收藏（星标）。目录页卡片右上角星标 + 工具页「收藏」按钮；
   数据只存本机浏览器（wy_tools_fav），不上传服务器。颜色走令牌，亮暗自动翻面。
   ========================================================================== */
.tool-cell { position: relative; display: flex; min-width: 0; }
.tool-cell > .tool-card { flex: 1 1 auto; }
.tool-cell .tool-card__title { padding-right: 1.3rem; }
.tool-fav-btn {
    position: absolute; top: .3rem; right: .3rem; z-index: 2;
    display: grid; place-items: center;
    width: 1.5rem; height: 1.5rem; padding: 0;
    border: 1px solid var(--border); border-radius: 50%;
    background: var(--card); color: var(--muted-foreground);
    font-size: .85rem; line-height: 1; cursor: pointer;
    opacity: 0; transition: opacity .15s ease, color .15s ease, border-color .15s ease;
}
.tool-cell:hover .tool-fav-btn,
.tool-fav-btn:focus-visible,
.tool-fav-btn.is-on { opacity: 1; }
.tool-fav-btn:hover { color: var(--foreground); border-color: var(--foreground); }
.tool-fav-btn.is-on { color: #d97706; border-color: rgba(217, 119, 6, .45); }
@media (hover: none) { .tool-fav-btn { opacity: 1; } }
.toolpage-hero__main .tool-fav-wrap { margin-left: auto; padding-left: .8rem; }
.stx-head .tool-fav-wrap { display: inline-block; margin-left: .6rem; vertical-align: middle; }
.tool-fav-toggle {
    display: inline-flex; align-items: center; gap: .35rem;
    height: 2.1rem; padding: 0 .85rem;
    border: 1px solid var(--border); border-radius: 999px;
    background: transparent; color: var(--muted-foreground);
    font-size: .82rem; white-space: nowrap; cursor: pointer;
}
.tool-fav-toggle:hover { color: var(--foreground); border-color: var(--foreground); }
.tool-fav-toggle.is-on { color: #d97706; border-color: rgba(217, 119, 6, .45); }

/* 批次643：/tools 搜索词高亮 + 键盘按 / 直达搜索框。
   mark 用琥珀底透色，亮暗两套都看得清；kbd 提示只在没有输入内容时露脸，
   手机（无实体键盘）由 script 侧不启用快捷键，也不碍事。 */
.tools-search__kbd {
    position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.4rem; height: 1.4rem; padding: 0 .3rem;
    border: 1px solid var(--border); border-radius: .35rem;
    background: var(--muted); color: var(--muted-foreground);
    font-family: inherit; font-size: .72rem; line-height: 1; pointer-events: none;
}
.tools-search:focus-within .tools-search__kbd { display: none; }
.tools-hl {
    background: rgba(217, 119, 6, .22);
    color: inherit; border-radius: .2rem; padding: 0 .05em;
}

/* 批次644：音乐工具页（/create/music-lab?mod=tools&tool=…）的「收藏」。
   页头是纵向 flex（返回按钮在上、标题在下），按钮直接追进去会掉到最下面，
   所以钉在页头右上角，和返回按钮同一行；手机上往内收一点，别顶出边。 */
.ml-toolpage .wb-main-head { position: relative; }
.ml-toolpage .ml-tool-fav {
    position: absolute; right: 20px; top: 14px; z-index: 2;
    margin: 0; padding: 0;
}
@media (max-width: 575.98px) {
    .ml-toolpage .ml-tool-fav { right: 14px; top: 10px; }
    .ml-toolpage .ml-tool-fav .tool-fav-toggle { height: 1.9rem; padding: 0 .6rem; font-size: .76rem; }
}

/* 批次648：AI文字 8 个直达页的目录家族标配——
   顶部面屑 + 收藏（与 /tools 单工具页同一套），底部「同类工具」。
   页面主壳 .pw-shell 本来就不限宽，这里只排这一行工具条，别去碰页宽。 */
.at-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: .8rem; flex-wrap: wrap;
    padding: 6px 0 2px;
}
.at-toolbar__crumb {
    display: flex; align-items: center; flex-wrap: wrap; gap: .3rem;
    min-width: 0;
    font-size: .82rem; line-height: 1.5;
    color: var(--muted-foreground);
}
.at-toolbar__crumb a { color: var(--muted-foreground); text-decoration: none; }
.at-toolbar__crumb a:hover { color: var(--foreground); }
.at-toolbar__crumb [aria-current="page"] { color: var(--foreground); font-weight: 600; }
.at-toolbar__sep { opacity: .6; }
.at-toolbar .tool-fav-toggle { height: 1.9rem; padding: 0 .7rem; font-size: .78rem; }
.tools-related-block { margin-top: 28px; }
@media (max-width: 575.98px) {
    .at-toolbar { gap: .5rem; }
}
