/* ================= AI快享 站点样式 ================= */
:root {
  --brand: #5b5bd6;
  --brand-2: #9b5cf6;
  --brand-3: #f25c8a;
  --grad: linear-gradient(120deg, #6366f1 0%, #8b5cf6 48%, #d946ef 100%);
  --grad-soft: linear-gradient(120deg, rgba(99,102,241,.12), rgba(217,70,239,.12));
  /* ---------------- v1.80 会员炫彩色 ----------------
     左侧「会员标识」、套餐卡、订单里的套餐名共用这一组 —— 客户要求
     「开通会员要和会员标识一个效果」，所以只留一套色，改色改这里。
     c* = 胶囊/彩边（亮）；t* = 文字渐变（浅色主题下压深一档，白底可读） */
  --vip-c1: #ffb020; --vip-c2: #ff4d6d; --vip-c3: #c026d3; --vip-c4: #6d28d9;
  --vip-t1: #d97706; --vip-t2: #e11d48; --vip-t3: #a21caf; --vip-t4: #6d28d9;
  --ink: #0d1424;
  --ink-2: #2b3446;
  --muted: #6b7688;
  --line: #e7e9f3;
  --line-2: #d9ddee;
  --bg: #f6f7fc;
  --bg-soft: #fbfbfe;
  --card: #ffffff;
  --chip: #f1f2f8;
  --chip-on: #eef0ff;
  --ok: #12a150;
  --warn: #d97706;
  --danger: #e11d48;
  /* ---------------- v1.17 语义色 ----------------
     原先三端有大量硬编码色（#4f46e5 / #1e2340 / #fff1f2 …），
     深色模式下背景变深而这些颜色不变 → 白底浅字、深底深字，直接看不见。
     统一收口成变量：浅色下取值与原值完全一致（浅色零变化），深色下自动提亮。 */
  --brand-ink: #4f46e5;        /* 品牌色文字（链接、高亮、选中态） */
  --brand-ink-2: #4338ca;      /* 品牌色文字，深一档（金额、强调数字） */
  --ink-strong: #1e2340;       /* 小号加粗正文（原 #1e2340 / #1e293b / #1e2432） */
  --field: #f5f6fb;            /* 浅灰块底（输入框、代码块、分段控件） */
  --field-2: #f1f2f8;
  --tint-brand: #eef0ff;       --tint-brand-fg: #4f46e5;
  --tint-rose: #fff1f2;        --tint-rose-fg: #e11d48;
  --tint-amber: #fff7ed;       --tint-amber-fg: #ea580c;
  --tint-yellow: #fef3c7;      --tint-yellow-fg: #b45309;
  --tint-emerald: #ecfdf5;     --tint-emerald-fg: #059669;
  --tint-green: #e8f7ee;       --tint-green-fg: #0f7a45;
  --tint-pink: #fdf2f8;        --tint-pink-fg: #be185d;
  /* v1.41 修复深色白边：下面四个变量此前只写在 var(--x, 浅色) 的 fallback 里，
     :root 从未真正定义 → 深色模式下一直取浅色 fallback，卡片就成了白边白底。 */
  --tint-brand-soft: #f4f3ff;  /* 品牌浅染底（模板要求区、轻提示块） */
  --surface-2: #f6f7fb;        /* 二级面（参考表、说明块、多选标签） */
  --ink-1: #111827;            /* 一级正文色（旧别名） */
  --ink-3: #6b7488;            /* 三级弱化文字 */
  /* v1.25 查重卡片：达标状态是核心信息，小字统一加深到对比度 ≥ 4.5（原 -fg 只有 3.3~3.6） */
  --plag-ok-fg: #047857;       /* on --tint-emerald = 5.21 */
  --plag-warn-fg: #c2410c;     /* on --tint-amber   = 4.88 */
  --plag-bad-fg: #be123c;      /* on --tint-rose    = 5.72 */
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.04), 0 4px 12px rgba(16,24,40,.05);
  --shadow: 0 12px 32px rgba(23,29,64,.10);
  --shadow-lg: 0 24px 60px rgba(23,29,64,.16);
  color-scheme: light;
}

/* ---------------- 深色模式（v1.12）：只覆盖变量 + 少量补丁，浅色零影响 ---------------- */
[data-theme="dark"] {
  --brand: #8b8bf5;
  --brand-2: #b98bf8;
  --brand-3: #f47ba3;
  --grad: linear-gradient(120deg, #6366f1 0%, #8b5cf6 48%, #d946ef 100%);
  --grad-soft: linear-gradient(120deg, rgba(99,102,241,.22), rgba(217,70,239,.18));
  /* v1.80 深色下文字渐变要提亮，否则深紫/深红在暗底上糊成一团 */
  --vip-t1: #fbbf24; --vip-t2: #fb7185; --vip-t3: #e879f9; --vip-t4: #a78bfa;
  --ink: #e8ecf7;
  --ink-2: #c2cade;
  --muted: #939db2;
  --line: #2a3245;
  --line-2: #3a445c;
  --bg: #0d1120;
  --bg-soft: #151b2b;
  --card: #151b2b;
  --chip: #232b3e;
  --chip-on: #262f4a;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  /* v1.17 语义色深色版：文字统一提亮到对比度 ≥ 8，底色改成同色系暗色玻璃 */
  --brand-ink: #a5b4fc;
  --brand-ink-2: #c4b5fd;
  --ink-strong: #e8ecf7;
  --field: #101627;
  --field-2: #1b2234;
  --tint-brand: rgba(99,102,241,.22);   --tint-brand-fg: #a5b4fc;
  --tint-rose: rgba(244,63,94,.20);     --tint-rose-fg: #fda4af;
  --tint-amber: rgba(245,158,11,.20);   --tint-amber-fg: #fcd34d;
  --tint-yellow: rgba(245,158,11,.22);  --tint-yellow-fg: #fcd34d;
  --tint-emerald: rgba(16,185,129,.20); --tint-emerald-fg: #6ee7b7;
  --tint-green: rgba(18,161,80,.22);    --tint-green-fg: #4ade80;
  --tint-pink: rgba(236,72,153,.20);    --tint-pink-fg: #f9a8d4;
  /* v1.41：与上面四个变量对应的深色取值，光靠 fallback 会一直是浅色 */
  --tint-brand-soft: rgba(99,102,241,.16);
  --surface-2: #101728;
  --ink-1: #e8ecf7;
  --ink-3: #8591a8;
  /* v1.25 查重卡片：深色底上原 -fg 已是浅色高对比，保持不动 */
  --plag-ok-fg: #6ee7b7;
  --plag-warn-fg: #fcd34d;
  --plag-bad-fg: #fda4af;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35), 0 4px 12px rgba(0,0,0,.28);
  --shadow: 0 12px 32px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
/* 顶栏 / 页脚在深色下略提亮，制造层次 */
[data-theme="dark"] .nav { background: rgba(17,23,38,.95); border-bottom-color: var(--line); }
[data-theme="dark"] footer { background: #111726; }
/* 卡片内部微光，避免大片纯黑 */
[data-theme="dark"] .card,
[data-theme="dark"] .side,
[data-theme="dark"] .stat,
[data-theme="dark"] .step,
[data-theme="dark"] .price-card,
[data-theme="dark"] .tpl-card,
[data-theme="dark"] .notice-card,
[data-theme="dark"] .paper-prog,
[data-theme="dark"] .result { background: var(--card); }
[data-theme="dark"] .demo-body { background: #101627; }
[data-theme="dark"] .hero { background: radial-gradient(900px 500px at 15% -10%, rgba(99,102,241,.28), transparent 62%), radial-gradient(800px 460px at 88% 8%, rgba(217,70,239,.2), transparent 60%), #0b0f1b; }
/* 标签类浅底在深色下换成半透明彩底，保证对比度 */
[data-theme="dark"] .pill.ok { background: rgba(18,161,80,.2); color: #4ade80; }
[data-theme="dark"] .pill.info { background: rgba(99,102,241,.22); color: var(--brand-ink); }
[data-theme="dark"] .pill.off { background: #2a3245; color: var(--muted); }
[data-theme="dark"] .pill.warn,
[data-theme="dark"] .pill.wait { background: rgba(217,119,6,.22); color: #fbbf24; }
[data-theme="dark"] .hr-tag.t-新 { background: rgba(99,102,241,.22); color: var(--brand-ink); }
[data-theme="dark"] .hr-tag.t-热 { background: rgba(225,29,72,.2); color: #fb7185; }
[data-theme="dark"] .hr-tag.t-爆 { background: rgba(234,88,12,.2); color: #fb923c; }
[data-theme="dark"] .hr-tag.t-荐 { background: rgba(5,150,105,.2); color: #34d399; }
[data-theme="dark"] .vip-tag.on { background: linear-gradient(120deg, rgba(245,158,11,.24), rgba(236,72,153,.2)); color: #fbbf24; }
[data-theme="dark"] .vip-tag.off { background: var(--chip); color: var(--muted); }
[data-theme="dark"] .notice-card.pinned { background: linear-gradient(180deg, rgba(254,252,232,.1), var(--card) 62%); }
[data-theme="dark"] .paper-quote,
[data-theme="dark"] .len-hint { background: var(--bg-soft); }
[data-theme="dark"] .paper-row:hover,
[data-theme="dark"] .hot-row:hover { background: rgba(255,255,255,.045); }
[data-theme="dark"] .side-nav button:hover { background: rgba(255,255,255,.05); }
[data-theme="dark"] .btn.ghost:hover { background: rgba(255,255,255,.06); }
[data-theme="dark"] .btn.ghost { background: transparent; color: var(--ink-2); }
[data-theme="dark"] .input { background: #101627; border-color: var(--line); color: var(--ink); }
[data-theme="dark"] .input:focus,
[data-theme="dark"] textarea.input:focus { background: #0d1322; }
[data-theme="dark"] .input[readonly] { background: var(--chip); color: var(--muted); }
[data-theme="dark"] .hot-tab.on { color: var(--brand-ink); }
[data-theme="dark"] .tabs { background: #101627; }
[data-theme="dark"] .tabs button.on { background: var(--card); }
[data-theme="dark"] .order-no code,
[data-theme="dark"] .pay-steps,
[data-theme="dark"] .sec-q { background: var(--chip); }
[data-theme="dark"] .cta-box { background: linear-gradient(120deg, #4f46e5, #7c3aed); }
[data-theme="dark"] .btn.dark { background: #0b0f1b; }
/* 主题切换按钮 */
.theme-toggle {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); display: grid; place-items: center;
  font-size: 15px; line-height: 1; cursor: pointer; transition: .18s; flex: 0 0 auto;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.theme-toggle .th-sun { display: none; }
[data-theme="dark"] .theme-toggle .th-sun { display: block; }
[data-theme="dark"] .theme-toggle .th-moon { display: none; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 78px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px;
  padding: 11px 20px; font-size: 15px; font-weight: 600;
  transition: .2s ease; white-space: nowrap; background: var(--card); color: var(--ink);
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(99,102,241,.28); }
.btn.primary:hover { box-shadow: 0 12px 26px rgba(99,102,241,.36); transform: translateY(-1px); }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--line-2); background: var(--bg-soft); }
.btn.dark { background: #11182b; color: #fff; }
/* v1.39：危险操作（一键清空公告等）用红色系，避免和普通 ghost 按钮混淆 */
.btn.danger { background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.35); color: #dc2626; }
.btn.danger:hover { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.55); }
[data-theme="dark"] .btn.danger { background: rgba(239,68,68,.16); color: #fca5a5; border-color: rgba(239,68,68,.4); }
.btn.sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn.lg { padding: 14px 28px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn.link { background: none; color: var(--brand); padding: 4px 6px; font-weight: 600; }

/* ---------- 导航 ---------- */
/* v1.47.1：去掉了这里的 backdrop-filter。
   原因：navigator 吸顶 + 全宽背景模糊 + 顶部时钟每秒改文字，会让浏览器每帧重新采样
   背后整页内容；在部分 Windows 显卡驱动和移动端 WebView 上会整片刷黑一下
   （用户反馈的「内容整体消失、露出黑背景」就是这一类）。改成高不透明度纯色后
   视觉几乎无差，但不会再让整页参与重采样。 */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(231,233,243,.9);
}
.nav-inner { height: 66px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.2px; }
.logo {
  width: 32px; height: 32px; border-radius: 10px; background: var(--grad);
  color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 800;
  box-shadow: 0 6px 14px rgba(99,102,241,.35);
  /* v1.53.1：logo 不许被压缩。320px 上实测被挤成 17.7px（22px 的 80%）——
     它就是「挤压」的来源之一，品牌方块变形比站名少两个字更难看。 */
  flex: 0 0 auto;
}
/* v1.61.5：后台把 site_logo 换成自己的图片时，图片等比铺满这个方块。
   皮肤的边框 / 切角(clip-path) / 发光都让位——它们是给「KX 文字方块」设计的装饰，
   套在客户自己的 logo 上会裁掉圆角或糊成一圈光。 */
.logo.logo-img {
  background: none !important;
  box-shadow: none !important;
  clip-path: none !important;
  border: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}
.logo > img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: inherit; }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-recharge { flex: 0 0 auto; white-space: nowrap; }
.nav-user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }

/* 导航实时时钟 */
/* v1.70.4：后台「系统设置 → 顶部时间」关掉时，服务端给 <html> 挂 data-kxclock="0"，
   这里直接不画。走 CSS 而不是等 JS 再隐藏，是为了首帧就没有 —— 否则会先闪一下再消失。
   带 html[...] 前缀是为了压过下面 ≤430 与皮肤里的 .nav-clock 规则（不用 !important）。 */
html[data-kxclock="0"] .nav-clock { display: none; }
.nav-clock {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  background: linear-gradient(120deg, rgba(99,102,241,.09), rgba(217,70,239,.09));
  border: 1px solid rgba(99,102,241,.16);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;   /* 任何宽度下都不允许折行/被压扁 */
  flex: 0 0 auto;
}
.clock-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.15);
  animation: dotPulse 2s ease-in-out infinite;
  flex: 0 0 auto;
}
@keyframes dotPulse { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .55; transform: scale(.82) } }
.clock-date { font-size: 12.5px; color: var(--muted); }
/* 时间必须用实色：此前用 background-clip:text + color:transparent 做渐变字，
   在微信/部分国产浏览器或关闭硬件加速时会整段文字消失，改成实色保证一定能看到。
   v1.18：实色也必须是变量，原来写死 #4f46e5，深色 / 商务风 / 科技风下
   就成了深字压深底（实测对比度 2.76）。浅色下 --brand-ink 仍等于 #4f46e5，无变化。 */
.clock-time {
  font-size: 14px; font-weight: 800; letter-spacing: .4px;
  color: var(--brand-ink);
  -webkit-text-fill-color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
/* 粒子层：只做背景装饰，绝不拦截鼠标/触摸，屏幕阅读器忽略 */
.hero-particles {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; z-index: 0; opacity: .95;
}
.hero > .wrap { position: relative; z-index: 1; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 620px;
  background:
    radial-gradient(600px 320px at 18% 10%, rgba(99,102,241,.20), transparent 60%),
    radial-gradient(520px 300px at 82% 0%, rgba(217,70,239,.16), transparent 62%);
  z-index: 0;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.06fr .94fr; gap: 48px; align-items: center; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--brand-ink); background: rgba(99,102,241,.09); border: 1px solid rgba(99,102,241,.18);
  padding: 6px 12px; border-radius: 999px;
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.16); }
h1.hero-title {
  font-size: clamp(34px, 4.4vw, 54px); line-height: 1.14; margin: 18px 0 16px;
  letter-spacing: -1.2px; font-weight: 800;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 17.5px; color: var(--muted); max-width: 520px; margin: 0 0 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 26px; margin-top: 26px; }
.hero-meta div strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.hero-meta div span { font-size: 13px; color: var(--muted); }

/* 展示卡 */
.demo-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-lg); padding: 20px; position: relative;
}
.demo-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.traffic { display: flex; gap: 6px; }
.traffic i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: block; }
.demo-title { font-size: 12.5px; color: var(--muted); margin-left: 6px; }
.demo-chip { display: inline-block; padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; }
/* v1.79：演示卡从「永远在转圈」升级成「真的在写」。
   骨架 .demo-skel 只在后台关掉演示 / 没配正文 / 访客开了减少动效时出现；
   .demo-live 是后台那条示例稿，逐字打出来，打完右上角亮一个「已生成」。
   这里用**固定高度**（不是 min-height）：打字过程中文字一行行长出来，
   只要高度交给内容决定，首屏下面所有东西都会被顶着往下走 —— 这是最容易被骂的抖动。
   骨架和成品共用这个高度，所以「骨架 → 打字 → 打完」全程卡片纹丝不动。 */
.demo-body { background: var(--bg-soft); border: 1px solid var(--chip); border-radius: 14px; padding: 16px; height: 264px; overflow: hidden; }
.demo-chips { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.demo-done { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--ok); background: rgba(18,161,80,.1); padding: 2px 9px; border-radius: 999px; }
.demo-live-head { font-size: 14.5px; font-weight: 700; line-height: 1.5; letter-spacing: -.2px; color: var(--ink-strong); margin-bottom: 8px; }
.demo-live-text { font-size: 12.8px; line-height: 1.8; color: var(--muted); white-space: pre-wrap; word-break: break-word;
  height: 202px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 22px), transparent); }
.demo-live-text.typing::after { content: '▍'; margin-left: 1px; color: var(--brand); animation: demoCaret 1.05s steps(1) infinite; }
@keyframes demoCaret { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }
.demo-line { height: 10px; border-radius: 6px; background: var(--line-2); margin-bottom: 10px; }
.demo-line.w80 { width: 80%; } .demo-line.w60 { width: 60%; } .demo-line.w90 { width: 90%; }
.demo-line.shine { background: linear-gradient(90deg,var(--line-2) 20%,#f5f7fd 40%,var(--line-2) 60%); background-size: 200% 100%; animation: shine 1.6s linear infinite; }
@keyframes shine { to { background-position: -200% 0; } }
.demo-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.demo-tags span { font-size: 11.5px; color: #6d5bd0; background: rgba(99,102,241,.09); padding: 4px 8px; border-radius: 7px; }
.float-tag {
  position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 13px; font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow); display: flex; gap: 7px; align-items: center;
}
.float-tag.t1 { right: -14px; top: 64px; animation: float 5s ease-in-out infinite; }
.float-tag.t2 { left: -22px; bottom: 66px; animation: float 6s ease-in-out infinite .8s; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }

/* ---------- 入场揭示（渐进显示，JS 加 .rv 后才生效，禁用 JS 时内容照常可见） ---------- */
/* v1.47.1：去掉了这里的 will-change: opacity, transform。
   入场揭示一次会同时点亮十几块区域（hero / 卡片 / 价格表 / 热搜条），
   每块都被提升成独立合成层会把显存顶满，低端 GPU 与移动端 WebView 会整片掉层刷黑。
   opacity/transform 的过渡本身不需要 will-change 也能走合成动画。 */
.rv { opacity: 0; transform: translate3d(0, 18px, 0);
  transition: opacity .62s ease, transform .62s cubic-bezier(.22,.9,.28,1); transition-delay: var(--d, 0s); }
.rv.rv-in { opacity: 1; transform: none; }

/* ---------- 热点条 ---------- */
.hot-bar { margin: 26px 0 8px; }
.hot-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hot-head h3 { font-size: 14px; margin: 0; font-weight: 700; }
.hot-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.hot-scroll::-webkit-scrollbar { height: 6px; }
.hot-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
.hot-chip {
  flex: 0 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
  display: flex; align-items: center; gap: 8px; transition: .18s;
}
.hot-chip:hover { border-color: #c9cdf0; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.hot-chip b { font-size: 11px; color: #fff; background: var(--grad); border-radius: 5px; padding: 1px 5px; }
.hot-chip .heat { color: #98a1b3; font-size: 11.5px; }
.hot-chip .hot-no { font-size: 11px; color: #98a1b3; font-variant-numeric: tabular-nums; min-width: 14px; text-align: center; }
/* 「展开全部」只在手机竖排时出现（桌面端本来就是横向滚动，不需要） */
.hot-more {
  display: none; width: 100%; padding: 9px 12px; font-size: 12.5px; font-weight: 600;
  color: var(--brand); background: transparent; border: 1px dashed var(--line-2);
  border-radius: 12px; cursor: pointer; transition: .18s;
}
.hot-more:hover { border-color: var(--brand); background: var(--grad-soft); }

/* ---------- 工作台：多平台热榜 ---------- */
.hot-panel { padding: 0; overflow: hidden; }
.hot-panel-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 12px; flex-wrap: wrap; }
.hot-panel-head h3 { margin: 0; font-size: 15px; }
.hot-panel-head .hint { font-size: 12.5px; color: var(--muted); }
.hot-meta { margin-left: auto; font-size: 12px; color: #98a1b3; font-variant-numeric: tabular-nums; }
.hot-refresh { font-size: 12.5px; }

.hot-tabs { display: flex; gap: 8px; padding: 0 20px 12px; overflow-x: auto; scrollbar-width: none; }
.hot-tabs::-webkit-scrollbar { display: none; }
.hot-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1px solid transparent; border-radius: 10px;
  padding: 7px 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: .16s;
}
.hot-tab:hover { background: var(--chip); }
.hot-tab.on { background: var(--card); border-color: var(--line-2); color: var(--brand-ink); box-shadow: 0 2px 10px rgba(99,102,241,.12); font-weight: 600; }
.hot-tab b { font-size: 11px; font-weight: 600; color: #98a1b3; background: var(--chip); border-radius: 6px; padding: 1px 5px; }
.hot-tab.on b { color: var(--brand-ink); background: var(--chip-on); }
.ht-ico { font-size: 13px; }

.hot-list { max-height: 430px; overflow-y: auto; border-top: 1px solid var(--line); }
.hot-list::-webkit-scrollbar { width: 8px; }
.hot-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
.hot-list::-webkit-scrollbar-thumb:hover { background: var(--line-2); }

.hot-row {
  width: 100%; display: grid; align-items: center; gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr) auto auto 44px auto;
  padding: 10px 20px; background: none; border: 0; border-bottom: 1px solid var(--line);
  text-align: left; cursor: pointer; transition: background .14s;
}
.hot-row:last-child { border-bottom: 0; }
.hot-row:hover { background: var(--bg-soft); }
.hot-row.on { background: var(--chip-on); box-shadow: inset 3px 0 0 #6366f1; }

.hr-pos { font-size: 13px; font-weight: 700; color: #b6bdcf; font-variant-numeric: tabular-nums; text-align: center; }
.hr-pos.hot1 { color: #ef4444; }
.hr-pos.hot2 { color: #f97316; }
.hr-pos.hot3 { color: #eab308; }

.hr-main { min-width: 0; display: flex; align-items: center; gap: 6px; }
.hr-title { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hot-row.on .hr-title { font-weight: 600; color: var(--brand-ink-2); }
.hr-tag { flex: 0 0 auto; font-style: normal; font-size: 10.5px; line-height: 16px; padding: 0 4px; border-radius: 4px; }
.hr-tag.t-新 { background: var(--chip-on); color: var(--brand-ink); }
.hr-tag.t-热 { background: var(--tint-rose); color: var(--tint-rose-fg); }
.hr-tag.t-爆 { background: var(--tint-amber); color: var(--tint-amber-fg); }
.hr-tag.t-荐 { background: var(--tint-emerald); color: var(--tint-emerald-fg); }

.hr-plat { font-size: 11.5px; color: #98a1b3; white-space: nowrap; }
.hr-heat { font-size: 12px; color: #8b94a8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hr-trend { font-size: 11.5px; text-align: right; font-variant-numeric: tabular-nums; color: #b6bdcf; }
.hr-trend.up { color: #ef4444; }
.hr-trend.down { color: var(--ok); }
.hr-trend.new { color: var(--brand-ink); font-weight: 600; }
.hr-use { font-size: 11px; color: #b6bdcf; white-space: nowrap; }

.hot-empty { padding: 34px 20px; text-align: center; color: #98a1b3; font-size: 13px; }
.hot-foot { padding: 10px 20px 14px; font-size: 11.5px; color: #a8b0c2; border-top: 1px solid var(--line); }

@media (max-width: 560px) {
  .hot-panel-head { padding: 14px 14px 10px; }
  .hot-tabs { padding: 0 14px 10px; }
  .hot-row { grid-template-columns: 26px minmax(0, 1fr) auto auto; grid-column-gap: 8px; padding: 9px 14px; }
  .hr-plat, .hr-use, .hot-meta { display: none; }
  .hot-foot { padding: 9px 14px 12px; }
}

/* ---------- 通用区块 ---------- */
section.block { padding: 68px 0; }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.sec-head .kicker { font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--brand); text-transform: uppercase; }
.sec-head h2 { font-size: clamp(26px, 3vw, 36px); margin: 10px 0 10px; letter-spacing: -.8px; font-weight: 800; }
.sec-head p { color: var(--muted); margin: 0; font-size: 15.5px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
/* 卡片 hover：只动 transform / box-shadow / border-color，保证合成层动画，不改布局 */
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  transition: transform .26s cubic-bezier(.2,.9,.3,1), box-shadow .26s ease, border-color .26s ease;
  /* v1.47.1：常态 will-change 改为只在 hover 时挂（见下方 .feature:hover）。
     常态挂 will-change 等于让整页每张卡片常驻一个合成层，滚动/重绘时会整片掉层发黑。 */
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #d9dcf2; will-change: transform; }
.feature:hover .ico { transform: translateY(-2px) scale(1.06); }
.feature .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--brand); margin-bottom: 14px;
  transition: transform .32s cubic-bezier(.2,.9,.3,1.4);
}
.feature h3 { font-size: 16.5px; margin: 0 0 6px; font-weight: 700; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; position: relative;
  transition: transform .26s cubic-bezier(.2,.9,.3,1), box-shadow .26s ease, border-color .26s ease; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: #d9dcf2; }
.step::before {
  counter-increment: s; content: "0" counter(s);
  font-size: 13px; font-weight: 800; color: #c7cbe6; letter-spacing: 1px;
}
.step h3 { margin: 10px 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* 模板（炫动效果） */
.tpl-section { position: relative; overflow: hidden; }
.tpl-section > .wrap { position: relative; z-index: 1; }
.tpl-aurora { position: absolute; border-radius: 50%; pointer-events: none; opacity: .6; }
.tpl-aurora.a1 {
  width: 520px; height: 520px; left: -170px; top: -200px;
  background: radial-gradient(circle at 35% 35%, rgba(99,102,241,.32), transparent 62%);
  animation: auroraA 17s ease-in-out infinite;
}
.tpl-aurora.a2 {
  width: 460px; height: 460px; right: -150px; bottom: -210px;
  background: radial-gradient(circle at 60% 40%, rgba(217,70,239,.28), transparent 62%);
  animation: auroraB 21s ease-in-out infinite;
}
@keyframes auroraA { 0%,100% { transform: translate(0,0) scale(1) } 50% { transform: translate(70px,50px) scale(1.14) } }
@keyframes auroraB { 0%,100% { transform: translate(0,0) scale(1) } 50% { transform: translate(-60px,-46px) scale(1.12) } }

.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; perspective: 1000px; }
.tpl {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  display: flex; gap: 14px; align-items: flex-start;
  transform: perspective(820px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: opacity .55s ease, translate .55s cubic-bezier(.2,.9,.3,1),
    transform .18s ease, box-shadow .28s ease, border-color .28s ease;
  transition-delay: var(--d, 0s), var(--d, 0s), 0s, 0s, 0s;
}
.anim-ready .tpl { opacity: 0; translate: 0 22px; }
.tpl.in { opacity: 1; translate: 0 0; }
.tpl::before {
  content: ""; position: absolute; inset: -40% -70%;
  background: linear-gradient(100deg, transparent 38%, rgba(139,92,246,.18) 47%, rgba(217,70,239,.20) 53%, transparent 63%);
  transform: translateX(-75%) rotate(7deg); opacity: 0;
  transition: transform .85s ease, opacity .35s ease;
  pointer-events: none;
}
.tpl:hover::before { transform: translateX(75%) rotate(7deg); opacity: 1; }
.tpl:hover {
  border-color: var(--line-2);
  box-shadow: 0 20px 44px rgba(99,102,241,.20);
  transform: perspective(820px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) scale(1.014);
}
.tpl .em {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 19px;
  background: var(--grad-soft); flex: 0 0 auto;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.5), box-shadow .35s ease;
  animation: emBob 5.5s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * .37s);
}
.tpl:hover .em { transform: scale(1.16) rotate(-8deg); box-shadow: 0 10px 22px rgba(139,92,246,.30); }
@keyframes emBob { 0%,100% { translate: 0 0 } 50% { translate: 0 -4px } }
.tpl-glow {
  position: absolute; width: 130px; height: 130px; right: -42px; bottom: -52px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.24), transparent 70%);
  opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.tpl:hover .tpl-glow { opacity: 1; }
.tpl h4 { margin: 0 0 4px; font-size: 15px; position: relative; }
.tpl p { margin: 0; font-size: 13px; color: var(--muted); position: relative; }

/* 尊重系统「减少动态效果」：所有新增动画（粒子 / 入场 / hover / 标记浮动）降级为静态 */
@media (prefers-reduced-motion: reduce) {
  .tpl, .tpl .em, .tpl-aurora, .clock-dot { animation: none !important; transition: none !important; }
  /* 必须连 .anim-ready .tpl 一起写、并且带 !important：
     .anim-ready .tpl 的权重是 0,2,0，单写 .tpl（0,1,0）会被它压住，
     结果是「开了减少动效反而看不到卡片」——手机上开省电模式 / 减弱动态效果就会命中。 */
  .anim-ready .tpl, .tpl { opacity: 1 !important; translate: none !important; }
  .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  /* 减少动效时不再隐藏粒子层，只保留一帧静态星图（脚本绘制后即停） */
  .hero-particles { display: block; }
  .float-tag { animation: none !important; }
  .feature, .step, .price-card, .price-amount .val, .feature .ico, .tpl:hover {
    transition: none !important; transform: none !important;
  }
  html { scroll-behavior: auto; }
  .demo-line.shine { animation: none; }
  /* v1.79：减少动效时不打字（JS 直接输出成品稿），光标也停 */
  .demo-live-text.typing::after { animation: none; }
}

/* 价格 */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.price-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px 26px;
  position: relative; transition: transform .26s cubic-bezier(.2,.9,.3,1), box-shadow .26s ease, border-color .26s ease;
  /* v1.47.1：同 .feature，常态 will-change 已移到 hover 状态 */
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #d9dcf2; will-change: transform; }
.price-card:hover .price-amount .val { transform: scale(1.03); }
.price-amount .val { transition: transform .3s cubic-bezier(.2,.9,.3,1.4); transform-origin: left bottom; }
.price-card.pop { border-color: transparent; box-shadow: 0 18px 44px rgba(99,102,241,.20); }
.price-card.pop::after {
  content: ""; position: absolute; inset: -1.5px; border-radius: 21px; background: var(--grad); z-index: -1;
}
.price-card .badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 6px 14px rgba(139,92,246,.35);
}
.price-name { font-size: 16px; font-weight: 700; }
.price-amount { display: flex; align-items: flex-end; gap: 6px; margin: 12px 0 4px; }
.price-amount .cur { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.price-amount .val { font-size: 42px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.price-amount .unit { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.price-origin { color: #a3aab9; font-size: 13px; text-decoration: line-through; }
.price-feats { list-style: none; padding: 18px 0 0; margin: 16px 0 0; border-top: 1px dashed var(--line); }
.price-feats li { display: flex; gap: 9px; font-size: 14px; color: var(--ink-2); padding: 6px 0; }
.price-feats li svg { flex: 0 0 auto; margin-top: 5px; color: var(--ok); }

/* 套餐周期次数 + 加油包（v1.3） */
.price-quota {
  font-size: 13px; color: var(--ink-2); background: var(--bg-soft); border-radius: 10px;
  padding: 8px 12px; margin-top: 12px;
}
.price-quota b { color: var(--brand); font-size: 15px; font-weight: 800; }
.pack-block { grid-column: 1 / -1; margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 22px; }
.pack-block-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pack-block-head h4 { margin: 0; font-size: 15.5px; letter-spacing: -.2px; }
.pack-block-head span { font-size: 12.5px; color: var(--muted); }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.price-card.pack { padding: 20px; background: linear-gradient(180deg, var(--card), var(--bg-soft)); }
.price-card.pack .price-amount .val { font-size: 32px; letter-spacing: -1px; }
.price-card.pack .price-quota { margin-top: 10px; }

.quota-bar { height: 8px; border-radius: 999px; background: var(--chip); margin-top: 18px; overflow: hidden; }
.quota-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad); transition: width .4s; }
.quota-bar-note { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* 加油包到期小字：整段不折行，空间不够时整体换到下一行 */
.bonus-exp {
  display: inline-block; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--muted);
  margin-left: 5px;
}
.bonus-exp.soon { color: var(--warn); }

/* 加油包券明细：每笔单独算有效期 */
.pack-rows { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pack-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 10px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 12.5px;
}
.pack-row b { font-size: 13px; color: var(--ink); }
.pack-row span { color: var(--warn); font-weight: 600; }
.pack-row span.forever { color: var(--muted); font-weight: 500; }

.exhaust-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.exhaust { text-align: left; }
.exhaust-desc { color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.exhaust-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px;
}
.faq summary { font-weight: 600; font-size: 15.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 700; font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); font-size: 14.5px; margin: 12px 0 2px; }

/* CTA */
.cta-box {
  background: var(--grad); border-radius: 26px; padding: 54px 40px; text-align: center; color: #fff;
  box-shadow: 0 24px 60px rgba(99,102,241,.30); position: relative; overflow: hidden;
}
.cta-box::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 200px at 20% 0%, rgba(255,255,255,.28), transparent 60%);
}
.cta-box h2 { font-size: clamp(24px, 3vw, 34px); margin: 0 0 10px; position: relative; z-index: 1; }
.cta-box p { margin: 0 0 24px; opacity: .92; position: relative; z-index: 1; }
.cta-box .btn { background: var(--card); color: var(--brand-ink); position: relative; z-index: 1; }

/* footer */
footer { border-top: 1px solid var(--line); background: var(--card); padding: 40px 0 30px; margin-top: 60px; }
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); font-size: 14px; }
.foot-copy { color: #98a1b3; font-size: 13px; margin-top: 22px; }

/* 工作台模式下收起营销导航 */
body.in-app .nav-links { display: none; }
body.in-app #btnEnter { display: none; }

/* ---------- v1.68：手机端顶部导航随滚动自动收起 ---------- */
/* 手机上吸顶的导航是两行（约 117px），客户滑到正文中间时它就纯属挡路。
   现在往下滚滑走、往回滚立刻回来、停在顶部始终可见。
   只动 transform，不改 position 与高度 —— 正文不会因此重排跳动；
   隐藏时 pointer-events:none，手指划过去不会点到看不见的按钮。
   宽屏不参与（屏幕够大，常驻更符合预期），所以整段都在媒体查询里，
   万一 resize 时类名残留也不会把桌面导航弄丢。
   用 #kxNav 而不是 .nav：motion.css 里的 `html.mo-on .nav` 特异性比 `.nav` 高，
   会把 transition 整条覆盖掉 —— 那样类加了、位置也对，但它是「瞬间消失」的，没有滑走感。
   id 选择器稳定压过它，不依赖样式表加载顺序。 */
@media (max-width: 980px) {
  #kxNav {
    transition: transform .26s cubic-bezier(.4, 0, .2, 1),
                box-shadow .3s ease, background-color .3s ease;
  }
  #kxNav.nav-away { transform: translateY(-100%); pointer-events: none; }
}
/* 系统开了「减少动态效果」：照样收起，但不要滑动过程 */
@media (max-width: 980px) and (prefers-reduced-motion: reduce) {
  #kxNav { transition: none; }
}

/* ---------- 弹窗 ---------- */
/* v1.47.1：遮罩同样去掉 backdrop-filter —— 它是全屏 fixed 元素，
   一旦参与背景采样，低端 GPU / 移动端 WebView 会把整块遮罩渲染成纯黑。 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(13,20,36,.58);
  display: grid; place-items: center; z-index: 100; padding: 20px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: var(--card); border-radius: 20px; width: min(440px, 100%); padding: 30px 28px;
  box-shadow: var(--shadow-lg); position: relative; animation: pop .22s cubic-bezier(.2,.9,.3,1.3);
  max-height: 92vh; overflow: auto;
}
.modal.wide { width: min(560px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0 } }
.modal h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.4px; }
.modal .sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.modal-close {
  position: absolute; right: 14px; top: 12px; border: 0; background: none; font-size: 22px;
  color: #a3aab9; line-height: 1; padding: 6px;
}
.tabs { display: flex; background: var(--chip); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.tabs button {
  flex: 1; border: 0; background: none; padding: 9px; border-radius: 9px; font-weight: 600;
  font-size: 14px; color: var(--muted); transition: .18s;
}
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; border: 1px solid var(--line); background: var(--bg-soft); border-radius: 11px;
  padding: 11px 13px; font-size: 14.5px; color: var(--ink); outline: none; transition: .18s;
  font-family: inherit;
}
.input:focus, textarea.input:focus { border-color: #a5a8f0; background: var(--card); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.6; }
.form-tip { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.form-err { color: var(--danger); font-size: 13px; margin: 4px 0 10px; min-height: 18px; }

/* 支付弹窗 */
.pay-amount { text-align: center; margin: 4px 0 18px; }
.pay-amount .v { font-size: 34px; font-weight: 800; letter-spacing: -1px; color: var(--brand); }
.qr-wrap { display: flex; gap: 18px; justify-content: center; margin: 6px 0 16px; }
.qr-item { text-align: center; }
.qr-item .box {
  width: 150px; height: 150px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft);
  display: grid; place-items: center; overflow: hidden;
}
.qr-item img { width: 100%; height: 100%; object-fit: contain; }
.qr-item span { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; }
.pay-steps { background: var(--bg-soft); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; color: var(--ink-2); }
.pay-steps li { margin: 4px 0; }
.order-no { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.order-no code { background: var(--chip); padding: 3px 8px; border-radius: 6px; color: var(--ink-2); }

/* toast */
#toast { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: #11182b; color: #fff; padding: 11px 18px; border-radius: 11px; font-size: 14px;
  box-shadow: var(--shadow-lg); animation: toastIn .22s ease; max-width: 90vw;
}
.toast.err { background: #b91c3c; }
.toast.ok { background: #0f7a45; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) } }

/* ---------- 工作台 ---------- */
/* v1.64：侧栏宽度走变量 —— 收起态 / 竖屏模式只改这一个值，
   grid 列宽跟着走，不需要在每处重复写 236px。 */
.app { --side-w: 236px; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); gap: 24px; padding: 26px 0 60px; align-items: start; }
.side { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; position: sticky; top: 86px; }
.side-user { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.avatar {
  width: 42px; height: 42px; border-radius: 13px; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: 0 0 auto;
  position: relative; overflow: hidden; user-select: none;
}
/* 头像图片：统一裁剪 + 首字母兜底 */
.avatar .av-img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--chip); }
.avatar .av-txt { line-height: 1; }
.avatar.sm { width: 26px; height: 26px; border-radius: 9px; font-size: 12.5px; }
.avatar.lg { width: 88px; height: 88px; border-radius: 22px; font-size: 30px; }
.nav-user .avatar.sm { box-shadow: 0 3px 8px rgba(99,102,241,.28); }

/* 账户安全 · 个人头像 */
.av-row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.av-card .avatar.lg { box-shadow: var(--shadow-sm); flex: 0 0 auto; }
.av-side { min-width: 0; flex: 1 1 240px; }
.av-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.av-pick { white-space: nowrap; cursor: pointer; position: relative; }
.av-pick input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.av-state { font-size: 13px; color: var(--muted); margin: 10px 0 0; min-height: 20px; }
.av-state.ok { color: var(--ok); font-weight: 600; }
.av-state.err { color: var(--danger); font-weight: 600; }
.av-state.loading { color: var(--muted); }
.side-user .u-name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.vip-tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.vip-tag.on { background: linear-gradient(120deg,#fff1d6,#ffe0f0); color: var(--tint-yellow-fg); }
.vip-tag.off { background: var(--chip); color: var(--muted); }
.side-nav { padding: 12px 0 0; display: grid; gap: 4px; }
.side-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none;
  padding: 10px 12px; border-radius: 10px; font-size: 14.5px; color: var(--ink-2); font-weight: 500; transition: .16s;
}
.side-nav button:hover { background: var(--bg); }
.side-nav button.on { background: var(--grad-soft); color: var(--brand-ink); font-weight: 700; }
.side-nav .ico { width: 18px; display: grid; place-items: center; }
/* v1.63：栏目文字单独一个节点（后台改名字只动它）。
   min-width:0 + 省略号 = 客户把名字改得比侧边栏还宽时不会把布局撑破。 */
.side-nav .nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 后台关掉的栏目：整个按钮不占位。用 !important 是因为手机端 .side-nav 是 flex，
   按钮会拿到 display 相关声明，普通 display:none 可能被覆盖。 */
.side-nav button.nav-hidden { display: none !important; }

/* ==================================================================
   v1.66 左侧栏目：副文案 + 炫彩流光
   ------------------------------------------------------------------
   1) 文字层从「一行 nav-label」变成「nav-txt > label + desc」：
      客户想写话术（「每天 3 次免费」）时不必挤进 12 个字的栏目名里。
      desc 留空时 :empty 收起，视觉与 v1.65 完全一致（老站升级零变化）。
   2) 炫彩层只加「光」，不加结构：选中项文字七彩流动、条目左侧一道
      渐变竖条、列表顶部一条呼吸光带、悬停一圈淡彩描边。
      所有动效都是 background-position / height / opacity，走合成层，
      不碰 box-shadow 的逐帧重绘（首页闪黑的教训）。
   3) 由 settings.side_nav_fx 控制，关掉后这一整段一条都不生效。
   ================================================================== */
/* v1.66：grid 的隐式列默认按 max-content 排 —— 副文案写长了整列会超出侧栏
   （实测右边界 337 > 侧栏 231）。必须显式 minmax(0,1fr) 把列压在容器内，
   min-width:0 才轮得到 .nav-desc 的省略号生效。 */
.side-nav .nav-txt { min-width: 0; flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; justify-items: start; }
/* v1.66：标题必须「贴着文字」量宽，否则渐变图是按整列宽度算的 ——
   3 个字的栏目只铺到图的 1/6，七彩会退化成纯蓝紫（像素实测就是这么发现的）。
   justify-self:start 让盒子收缩到文字宽，max-width 保证长名字照旧省略号。 */
.side-nav .nav-label { justify-self: start; max-width: 100%; }
/* 副文案要占满整列（只靠省略号收尾），所以单独覆盖回 stretch */
.side-nav .nav-desc { justify-self: stretch; max-width: 100%; min-width: 0; }
.side-nav .nav-desc {
  font-size: 11px; font-weight: 500; line-height: 1.35; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 副文案留空 → 不占位、不留空隙 */
.side-nav .nav-desc:empty { display: none; }
/* 选中项里副文案跟着提亮一点，但不用渐变（渐变只给主标题，避免抢焦点） */
.side-nav button.on .nav-desc { color: var(--brand-ink); opacity: .78; }

/* 侧栏小标题：后台可填的一句话（留空整块不显示） */
.side-cap {
  font-size: 10.5px; font-weight: 800; letter-spacing: .16em;
  color: var(--muted); text-transform: uppercase;
  padding: 2px 12px 4px; user-select: none;
}
.side-cap[hidden] { display: none; }

@keyframes navFxLine { from { background-position: 0% 50% } to { background-position: 300% 50% } }
/* 文字渐变位移量：background-size:200% 时位移 = (100%-200%)×p = -W×p，
   要「无缝循环」必须正好移过一张图（2W）→ p = 200%。
   顺便说明为什么是 200% 而不是 280%：栏目文字只有 3~5 个字，图放大到 2.8 倍后
   一帧里只能看到 1/3 张图（不到两个色标），实测像素全是同一个蓝紫色相，
   看着像「纯色」而不是「七彩」；200% 时一帧能看到三个色标，才真的流光溢彩。 */
@keyframes navFxText { from { background-position: 0% 50% } to { background-position: 200% 50% } }

/* 列表顶部的呼吸光带 */
.app[data-navfx="1"] .side-nav::before {
  content: ""; display: block; height: 2px; border-radius: 2px; margin: 0 2px 8px;
  background-image: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #f59e0b, #22c55e, #6366f1);
  background-size: 300% 100%;
  animation: navFxLine 9s linear infinite;
  opacity: .9;
}

/* 选中项的渐变文字：双写 color / -webkit-text-fill-color，且必须有 @supports 兜底 */
.app[data-navfx="1"] .side-nav button.on .nav-label {
  background-image: linear-gradient(100deg, #6366f1, #a855f7, #ec4899, #f59e0b, #6366f1);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: navFxText 5s linear infinite;
  font-weight: 800; letter-spacing: .2px;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .app[data-navfx="1"] .side-nav button.on .nav-label {
    background-image: none; animation: none;
    color: var(--brand-ink); -webkit-text-fill-color: currentColor;
  }
}

/* 选中项左侧的渐变竖条（高度从 0 长出来，不用 scale 以免糊字） */
.app[data-navfx="1"] .side-nav button { position: relative; }
.app[data-navfx="1"] .side-nav button::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0;
  border-radius: 0 3px 3px 0; transform: translateY(-50%);
  background-image: linear-gradient(180deg, #6366f1, #ec4899, #f59e0b);
  opacity: 0; transition: height .22s ease, opacity .22s ease;
}
.app[data-navfx="1"] .side-nav button.on::before { height: 58%; opacity: 1; }

/* 悬停：一圈淡彩描边，不做位移（位移会让整列抖动） */
.app[data-navfx="1"] .side-nav button:not(.on):hover {
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .22);
  background: linear-gradient(100deg, rgba(99,102,241,.07), rgba(236,72,153,.05));
}
/* 深色底换更亮的色板（深色下 #6366f1 偏暗，流光会看不出来） */
[data-theme="dark"] .app[data-navfx="1"] .side-nav::before,
[data-theme="dark"] .app[data-navfx="1"] .side-nav button.on .nav-label {
  background-image: linear-gradient(100deg, #8b9bff, #c084fc, #f472b6, #fbbf24, #8b9bff);
}
[data-theme="dark"] .app[data-navfx="1"] .side-nav button.on::before {
  background-image: linear-gradient(180deg, #8b9bff, #f472b6, #fbbf24);
}
/* 用户系统开了「减少动态效果」就静止：颜色还在，只是不流动 */
@media (prefers-reduced-motion: reduce) {
  .app[data-navfx="1"] .side-nav::before,
  .app[data-navfx="1"] .side-nav button.on .nav-label { animation: none; }
  .app[data-navfx="1"] .side-nav button::before { transition: none; }
}

/* 收起成图标列（68px）：文字层整体不渲染，炫彩只剩「选中图标的一点彩光」 */
.app[data-side="min"] .side-cap { display: none; }
.app[data-side="min"] .side-nav .nav-txt { display: none; }
.app[data-side="min"][data-navfx="1"] .side-nav::before { margin: 2px 0 6px; }
.app[data-side="min"][data-navfx="1"] .side-nav button::before { left: 1px; }
.app[data-side="min"][data-navfx="1"] .side-nav button.on .ico { filter: drop-shadow(0 0 7px rgba(236, 72, 153, .55)); }
.side-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ==================================================================
   v1.64 侧栏：始终在左侧，可收起成图标列；窄屏改成左侧抽屉
   ------------------------------------------------------------------
   以前 ≤980px 和「竖屏」布局都把栏目横排到内容上方，一屏之内要
   先扫过一长条才能看到正文。现在一律留在左侧：宽屏常驻可收起，
   窄屏默认自动隐藏、点左边缘把手滑出，选完栏目自动收回。
   ================================================================== */
.side-min {
  display: flex; align-items: center; gap: 4px;
  margin: 8px 0 0 auto; padding: 3px 7px;
  border: 0; background: none; color: var(--muted);
  font-size: 11.5px; border-radius: 7px; cursor: pointer; transition: .16s;
}
.side-min:hover { background: var(--bg); color: var(--ink-2); }
.side-min .sm-ico { font-size: 12px; line-height: 1; }

/* 收起态：只留一列图标，鼠标悬停有 title 提示（后台改过的名字也照样带出来） */
.app[data-side="min"] { --side-w: 68px; }
.app[data-side="min"] .side { padding: 14px 9px; }
.app[data-side="min"] .side-user { justify-content: center; padding-bottom: 10px; }
.app[data-side="min"] .side-user > div { display: none; }
.app[data-side="min"] .side-user .avatar { width: 34px; height: 34px; border-radius: 11px; font-size: 14px; }
.app[data-side="min"] .side-min { margin: 8px auto 0; }
.app[data-side="min"] .side-min .sm-txt { display: none; }
.app[data-side="min"] .side-min .sm-ico { transform: scaleX(-1); }
.app[data-side="min"] .side-nav button { justify-content: center; padding: 11px 0; position: relative; }
.app[data-side="min"] .side-nav .nav-label { display: none; }
.app[data-side="min"] .side-nav .ico { font-size: 16px; }
/* 收起后角标缩成一个点：侧栏只有 50px 内容宽，数字放不下会溢出去 */
.app[data-side="min"] .side-nav .nav-badge {
  position: absolute; top: 6px; right: 9px; margin: 0;
  min-width: 8px; height: 8px; padding: 0; font-size: 0; line-height: 8px;
}
.app[data-side="min"] .side-foot .view-switch { display: none; }
.app[data-side="min"] .side-foot #btnLogout { padding: 9px 0; font-size: 0; }
.app[data-side="min"] .side-foot #btnLogout::before { content: "⏻"; font-size: 15px; line-height: 1; }

/* 左边缘把手（只在窄屏出现）：贴在中线，随时点开。
   v1.67：25px/灰字太像「页面的一条缝」，手机上几乎找不到 —— 加宽到 30px、
   文字提到 11.5px 且用品牌色；开了炫彩开关再走下面的彩虹态。
   overflow:hidden 是为了把流光层和高光扫过裁在这条圆角里（box-shadow 不受影响）。 */
.side-handle {
  display: none; position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  z-index: 60; width: 28px; padding: 15px 0;
  flex-direction: column; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-left: 0; border-radius: 0 12px 12px 0;
  background: var(--card); color: var(--brand-ink); cursor: pointer;
  box-shadow: 2px 6px 20px rgba(16,24,40,.16);
  overflow: hidden;
}
.side-handle:active { transform: translateY(-50%) scale(.96); }
.side-handle .sh-ico { font-size: 14px; line-height: 1; color: var(--brand); }
.side-handle .sh-txt {
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: 12px; letter-spacing: 2px; line-height: 1.1;
  color: var(--brand-ink); font-weight: 800;
}
/* 竖排下这两个字必须是 inline：设成 block 会按块轴（横向）排成两列 */
.side-handle .sh-txt i { font-style: normal; }

/* ---- v1.67 炫彩态：满底彩虹在流 + 白字逐字发亮 + 高光扫过 + 呼吸光晕 ----
   三个动画各管一套属性（background-position / box-shadow / opacity），互不打架；
   transform 留给居中的 translateY(-50%)，动画不碰，否则把手会掉到屏幕下半截。 */
/* 一屏 1/2 张图 → 同时看得到 3 个色标（indigo→紫→粉）；1/3 张图时一帧只剩蓝紫两色，
   看着像「蓝色渐变条」而不是彩虹。位移正好一整张图 → 循环无缝。 */
@keyframes shFlow { from { background-position: 0% 0% } to { background-position: 0% -200% } }
@keyframes shHalo {
  0%, 100% { box-shadow: 0 4px 16px rgba(124,58,237,.40), 0 0 0 0 rgba(236,72,153,0); }
  50% { box-shadow: 0 6px 28px rgba(236,72,153,.58), 0 0 0 4px rgba(236,72,153,.18); }
}
/* 逐字发亮：不要靠降 opacity 做「变暗」—— 白字叠在紫底上会变成浅紫白，反而更模糊。
   这里 opacity 只压到 .92（几乎不透明），明暗对比全靠 text-shadow 的光晕半径。 */
@keyframes shChar {
  0%, 100% { opacity: .92; text-shadow: 0 1px 3px rgba(16,24,40,.62), 0 0 2px rgba(255,255,255,.25); }
  42% { opacity: 1; text-shadow: 0 1px 3px rgba(16,24,40,.62), 0 0 12px rgba(255,255,255,.95), 0 0 22px rgba(255,255,255,.45); }
}
/* 高光条：从上方扫下来。用 transform 走合成层，不触发重排重绘 */
@keyframes shGlint {
  0%, 56% { transform: rotate(18deg) translateY(-190%); }
  86%, 100% { transform: rotate(18deg) translateY(430%); }
}

.app[data-navfx="1"] .side-handle {
  color: #fff; border-color: transparent;
  background-color: #7c3aed; /* @supports 之外的兜底纯色 */
  background-image: linear-gradient(170deg, #6366f1, #a855f7, #ec4899, #f59e0b, #22c55e, #6366f1);
  background-size: 100% 200%; /* 竖直 2 张图，-200% 正好移过一整张 → 循环无缝 */
  box-shadow: 0 6px 22px rgba(124,58,237,.45);
  animation: shFlow 12s linear infinite, shHalo 3.6s ease-in-out infinite;
}
/* 暗层衬底：彩虹流到黄/绿段时底色很亮，白字会糊。压 20% 的深色进去，
   彩度还在、白字对比度立刻拉开。::before 画在背景之上、文字之下，不吃点击。 */
.app[data-navfx="1"] .side-handle::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(16, 24, 40, .14);
  pointer-events: none;
}
.app[data-navfx="1"] .side-handle .sh-ico {
  color: #fff; text-shadow: 0 1px 3px rgba(16,24,40,.55), 0 0 8px rgba(255,255,255,.65);
}
.app[data-navfx="1"] .side-handle .sh-txt { color: #fff; }
.app[data-navfx="1"] .side-handle .sh-txt i {
  animation: shChar 2.4s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * .3s);
}
.app[data-navfx="1"] .side-handle::after {
  content: ""; position: absolute; left: -60%; top: 0; width: 220%; height: 46%;
  background: linear-gradient(115deg, rgba(255,255,255,0), rgba(255,255,255,.85) 50%, rgba(255,255,255,0));
  transform: rotate(18deg) translateY(-190%);
  animation: shGlint 4.2s ease-in-out infinite;
  pointer-events: none;
}
/* 抽屉已经打开时把把手藏起来（遮罩下面再露一条边很难看，也点不到）；
   顺手把动画挂起 —— 看不见了还每帧画彩虹是白烧电。 */
.app.side-open .side-handle { opacity: 0; pointer-events: none; }
.app.side-open .side-handle,
.app.side-open .side-handle::after,
.app.side-open .side-handle .sh-txt i { animation-play-state: paused; }
.side-handle { transition: opacity .2s ease; }

/* 系统开了「减少动态效果」：彩虹底保留（它本身是醒目的），动画全部静止 */
@media (prefers-reduced-motion: reduce) {
  .app[data-navfx="1"] .side-handle,
  .app[data-navfx="1"] .side-handle::after,
  .app[data-navfx="1"] .side-handle .sh-txt i { animation: none; }
  .app[data-navfx="1"] .side-handle::after { display: none; }
}
/* 抽屉遮罩：压暗正文，点一下收回 */
.side-mask { position: fixed; inset: 0; z-index: 88; background: rgba(16,24,40,.42); }
/* 抽屉开着时锁正文滚动（否则手指一划整页跟着动、抽屉不动，像卡住了） */
body.side-lock { overflow: hidden; }

.panel { min-height: 60vh; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 22px; letter-spacing: -.5px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card + .card { margin-top: 18px; }
.card h3 { margin: 0 0 14px; font-size: 15.5px; }
.card h3 .hint { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 8px; }

.opt-row { display: flex; gap: 9px; flex-wrap: wrap; }
.opt {
  border: 1px solid var(--line); background: var(--bg-soft); border-radius: 11px; padding: 9px 14px;
  font-size: 13.5px; color: var(--ink-2); font-weight: 500; transition: .16s;
}
.opt:hover { border-color: #c7cbef; }
.opt.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(99,102,241,.26); }
/* v1.39：表达风格扩到 20 个，按钮多时收紧一点，避免把卡片撑得太高（移动端更明显） */
.opt-row.many { gap: 7px; }
.opt-row.many .opt { padding: 7px 11px; font-size: 12.5px; border-radius: 10px; }

/* ---------------------------------------------------------------
   v1.65：自定义表达风格
     预设 150 种总有对不上的，客户自己写一句「我要什么写法」。
     放在「3. 表达风格」这张卡里（风格大类目内），不另开一张卡：
     客户改的是同一样东西，分成两块会让人以为要各选一次。
     选中后整块变成品牌色实线 + 「已启用」角标 —— 光靠按钮高亮不够，
     因为预设按钮此刻全是非选中态，客户会怀疑「我选的跑哪去了」。
   --------------------------------------------------------------- */
.style-diy {
  margin-top: 13px; padding: 11px 12px;
  border: 1px dashed var(--line); border-radius: 12px;
  background: var(--bg-soft);
  transition: border-color .16s, background .16s;
}
.style-diy.on { border-style: solid; border-color: var(--brand); background: var(--tint-brand); }
.style-diy-head {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-2);
}
.style-diy-head .diy-ico { font-size: 13px; line-height: 1; }
.style-diy-head b { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.style-diy-head .diy-sub { font-size: 12px; color: var(--muted); }
.diy-on-tag {
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
  padding: 2px 9px; border-radius: 99px;
  color: #fff; background: var(--grad);
}
.diy-on-tag.hidden { display: none !important; }
.style-diy-row { display: flex; align-items: stretch; gap: 8px; margin-top: 9px; }
.style-diy-row .input { flex: 1 1 auto; min-width: 0; }
.style-diy-row .btn { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 0 16px; }
.style-diy.on .style-diy-row .input { background: var(--card); }

/* ---------------------------------------------------------------
   v1.52：表达风格默认只露 12 个，其余折叠
   v1.53.5：风格到 150 个，折叠区改成「固定高度的可滚动面板」
     —— 原来用 display:contents 让按钮直接回流到 .opt-row，138 个按钮会把手机上的
        卡片撑到一千多像素，比不折叠还难看。现在收在一个 380px 的滚动框里，
        分组标题仍是整行独占，拇指滚动只在这个框内生效（overscroll-behavior 防串页）。
   --------------------------------------------------------------- */
.opt-row .style-fold {
  flex: 0 0 100%;
  display: flex; flex-wrap: wrap; gap: 7px;
  max-height: min(52vh, 380px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px 4px 6px 0;
  margin-top: 2px;
  scrollbar-width: thin;
}
.opt-row .style-fold.hidden { display: none; }
.opt-row .style-fold::-webkit-scrollbar { width: 6px; }
.opt-row .style-fold::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.opt-row .style-fold::-webkit-scrollbar-track { background: transparent; }
.opt-row .style-grp {
  flex: 0 0 100%;
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 -2px;
  font-size: 12px; color: var(--muted); letter-spacing: .02em;
}
.opt-row .style-grp::after {
  content: ''; flex: 1 1 auto; height: 1px; background: var(--line);
}
.opt-row .style-grp-t { font-weight: 600; color: var(--ink-2); }
.opt-row .style-grp-n {
  min-width: 18px; text-align: center; padding: 0 6px; border-radius: 9px;
  background: var(--chip); font-size: 11px; line-height: 17px;
}
.opt-row .style-toggle { flex: 0 0 100%; justify-content: flex-start; margin-top: 6px; padding-left: 0; }

@media (max-width: 430px) {
  /* 手机上 12 个推荐按钮刚好 3~4 行；展开按钮居中一点更好点 */
  .opt-row .style-toggle { justify-content: center; padding-left: 0; text-align: center; }
  .opt-row .style-grp { margin: 6px 0 0; }
  /* 展开区的滚动高度按视口收一档，别让卡片比屏幕还高 */
  .opt-row .style-fold { max-height: 46vh; padding-right: 2px; }
}

.gen-bar { display: flex; gap: 12px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.gen-bar .btn { min-width: 150px; }
.gen-left { font-size: 13px; color: var(--muted); }

.result { margin-top: 18px; scroll-margin-top: 84px; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.result-head .t { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.result-body {
  background: var(--bg-soft); border: 1px solid var(--chip); border-radius: 14px; padding: 20px;
  font-size: 15px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; color: var(--ink-2);
  max-height: 640px; overflow: auto;
}
.result-body.empty { color: #98a1b3; text-align: center; padding: 60px 20px; }
.typing::after { content: "▌"; color: var(--brand); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0 } }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat strong { display: block; font-size: 20px; letter-spacing: -.4px; margin-top: 2px; }

.orders-table, .table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 8px; border-bottom: 1px solid var(--chip); color: var(--ink-2); }
.table tr:last-child td { border-bottom: 0; }
.pill { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.pill.ok { background: var(--tint-green); color: var(--tint-green-fg); }
.pill.wait { background: var(--tint-amber); color: var(--tint-yellow-fg); }
.pill.off { background: var(--chip); color: var(--muted); }
.pill.info { background: var(--chip-on); color: var(--brand-ink); }

.empty-tip { text-align: center; color: #98a1b3; padding: 44px 10px; font-size: 14px; }

/* ---------- 微信扫码 · 同步平台额度 ---------- */
.sync-card { background: linear-gradient(160deg, var(--card) 0%, var(--bg-soft) 100%); }
.sync-grid { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: start; }
.sync-qr {
  width: 150px; height: 150px; border: 1px dashed var(--line-2); border-radius: 14px; background: var(--card);
  display: grid; place-items: center; overflow: hidden;
}
.sync-qr img { width: 100%; height: 100%; object-fit: contain; }
.sync-qr-empty { font-size: 12.5px; color: #98a1b3; text-align: center; padding: 0 12px; }
.sync-body { min-width: 0; }
.sync-desc { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); }
.sync-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 26px; font-weight: 800; letter-spacing: 4px; text-align: center; color: var(--brand-ink);
  background: linear-gradient(120deg, rgba(99,102,241,.08), rgba(217,70,239,.08));
  border: 1px dashed rgba(99,102,241,.30); border-radius: 12px; padding: 12px; margin-bottom: 12px;
  transition: .25s;
}
.sync-code.ok { color: var(--ok); border-color: rgba(18,161,80,.35); background: rgba(18,161,80,.07); }
@media (max-width: 520px) { .sync-grid { grid-template-columns: 1fr; } .sync-qr { margin: 0 auto; } }

/* ---------- 密保 ---------- */
.sec-block { background: var(--bg-soft); border: 1px dashed #e2e5f5; border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.sec-block-title { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.sec-block-title span { font-weight: 400; color: var(--muted); }
.sec-q { background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--ink-2); min-height: 42px; }
.sec-q.empty { color: #98a1b3; }

/* 移动端 */
.tabbar { display: none; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .demo-card { order: 0; max-width: 560px; }
  .feature-grid, .tpl-grid, .price-grid, .steps { grid-template-columns: 1fr 1fr; }
  /* v1.64：≤980 单列。侧栏不再横排到正文上方，而是变成左侧抽屉，
     默认自动收起（不占一像素正文宽度），点左边缘把手滑出，选完自动收回。 */
  .app { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 90;
    width: 78vw; max-width: 290px; padding: 18px 16px 20px;
    border-radius: 0 18px 18px 0; border-left: 0;
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(-104%); visibility: hidden;
    transition: transform .26s cubic-bezier(.4, 0, .2, 1), visibility 0s .26s;
    box-shadow: 0 12px 44px rgba(16,24,40,.24);
  }
  .app.side-open .side { transform: none; visibility: visible; transition: transform .26s cubic-bezier(.4, 0, .2, 1), visibility 0s 0s; }
  .side-handle { display: flex; }
  /* 抽屉里一律恢复成完整列表：桌面收起态（data-side=min）在窄屏不生效 */
  .side-min { display: none; }
  .side-nav { display: grid; gap: 4px; overflow: visible; padding: 12px 0 0; }
  .side-nav button { width: 100%; white-space: normal; padding: 11px 12px; }
  .side-user { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .side-foot { display: block; }
  .app[data-side="min"] .side { padding: 18px 16px 20px; }
  .app[data-side="min"] .side-user { justify-content: flex-start; }

  .nav-links { display: none; }
  /* v1.53.1：≤980 原来写的是 `.nav-user span:first-child{display:none}` —— 而 setUser() 渲染的
     是「头像 span + 用户名 span + 会员徽标 button」，first-child 命中的其实是**头像**，
     留下的是最宽的那个用户名（上限 90px）+ 徽标。窄屏上这 90px 全是从站名身上抢的。
     改成「留头像（26px，认得出是谁）、藏用户名（侧边栏里就有）、徽标在 ≤400 再藏」。 */
  .nav-user .nu-name { display: none; }
  .clock-date { display: none; }
  .nav-clock { padding: 6px 9px; gap: 5px; }
  .clock-time { font-size: 13px; }
  /* v1.51：手机端顶部固定「一行横排」，不再折行。
     原来这里给 .nav-inner 与 .nav-right 都写了 flex-wrap: wrap —— 线上实测 390 / 375 这类
     常见宽度下，品牌（客户站名 108px）+ 按钮组（258px）+ 间距（10px）= 376px，
     超过 390px 屏的 362px 容器 → 折成「品牌一行、按钮一行」，导航高 122px。
     改法：容器与按钮组都 nowrap，让品牌名自适应截断（#brandName 打省略号），
     按钮组 flex: 0 0 auto 永不被压缩；320px 窄屏也还在一行里。 */
  .nav-inner { height: 62px; min-height: 0; flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; gap: 10px; }
  .nav-right { min-width: 0; flex: 0 0 auto; flex-wrap: nowrap; justify-content: flex-end; gap: 8px; }
  .nav-recharge.btn.sm { padding: 8px 11px; font-size: 13px; }
  .brand { white-space: nowrap; flex: 1 1 auto; min-width: 0; font-size: 16px; }
  /* v1.53：站名永远不许消失。v1.51 在 ≤370 写了一句 `.brand span{display:none}`，
     而 360px（很常见的安卓宽度）正落在那一档 —— 客户看到的就是「顶部只有按钮、没有站名」。
     现在的做法是让站名自己吃剩余宽度：flex:1 1 auto 占满按钮组之外的空白，
     min-width 保证再挤也留得下开头两三个字 + 省略号，max-width:100% 防止它把按钮组顶走。 */
  .brand > span:not(.logo) {
    display: block; flex: 1 1 auto; min-width: 2.6em; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .nav-actions .btn.sm { padding: 8px 11px; font-size: 13px; }
}
@media (max-width: 680px) {
  .float-tag.t2 { left: 0; bottom: 8px; }
  .float-tag.t1 { right: 0; top: 40px; }
  .wrap { width: calc(100% - 28px); }
  .feature-grid, .tpl-grid, .price-grid, .steps { grid-template-columns: 1fr; }
  /* 手机上的热点条：原来是一条横向滚动，chip 里标题是 nowrap，
     长标题会把单个 chip 撑到接近整屏宽 → 一屏只能看见 1 条，
     又没有滚动条提示，看起来就像「今日热点选题下面没了」。
     改成竖排、标题可换行，一屏能看 6 条。 */
  .hot-scroll { display: grid; grid-template-columns: 1fr; gap: 8px; overflow: visible; padding-bottom: 0; }
  .hot-chip { width: 100%; white-space: normal; text-align: left; padding: 9px 12px; line-height: 1.45; }
  .hot-chip > span:not(.heat):not(.hot-no) { flex: 1 1 auto; min-width: 0; }
  .hot-chip .heat { margin-left: auto; flex: 0 0 auto; }
  /* 手机上只列 6 条，剩下的去工作台的完整榜单看，避免首页被热点撑得过长 */
  .hot-scroll:not(.expanded) > .hot-chip:nth-child(n+7) { display: none; }
  .hot-more { display: block; }
  .hero { padding: 36px 0 20px; }
  /* 移动端：卡片 hover 位移收益低，关掉避免滚动时的视觉抖动 */
  .feature:hover, .step:hover, .price-card:hover { transform: none; }
  .av-row { gap: 14px; }
  .av-card .avatar.lg { width: 72px; height: 72px; border-radius: 20px; font-size: 26px; }
  section.block { padding: 44px 0; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .modal { padding: 24px 20px; }
  .qr-wrap { flex-direction: column; align-items: center; }

  /* v1.53.2：手机端顶部**改回两行**（客户要求）。
     v1.51 把它压成一行，代价是让站名不停让位：藏用户名 → 藏会员徽标 → 缩按钮文案 →
     缩字号（最低 11px）。宽度是挤出来了，但客户看到的是「前面的内容显示不全」——
     字号被压、图标变小、徽标消失，整体像被夹住。
     两行之后：第一行只有「图标 + 站名」，整行宽度都给站名，一个字都不会少；
     第二行是功能条（时钟 / 主题 / 皮肤 / 充值 / 头像 / 进入工作台），回到正常按钮尺寸。
     行数固定 2、不靠 flex 随机折行：宽度变化时只影响留白，不会一会儿一行一会儿三行。 */
  .nav-inner {
    height: auto; min-height: 0;
    flex-wrap: wrap;
    align-content: center;
    padding: 8px 0;
    row-gap: 6px;
    column-gap: 0;
  }
  .brand { flex: 1 1 100%; font-size: 17px; }
  /* 站名独占第一行：宽度不再是抢来的，省略号只作为「站名长到超过整屏」的兜底 */
  .brand > span:not(.logo) {
    flex: 0 1 auto; min-width: 0; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis;
  }
  .nav-right {
    flex: 1 1 100%; width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    gap: 8px;
  }
}
/* v1.53.2：顶部恢复两行后导航变高（手机约 117px），锚点落点要跟着下移。
   不然点「功能 / 模板 / 价格 / 常见问题」跳过去，标题正好被吸顶的导航盖住一截。
   （原来 78px 是按「单行 62 + 统计条 32」估的，本身就偏小。） */
@media (max-width: 980px) {
  section[id] { scroll-margin-top: 96px; }
  .result { scroll-margin-top: 100px; }
  .emo-result { scroll-margin-top: 100px; }
}
@media (max-width: 680px) {
  section[id] { scroll-margin-top: 124px; }
  .result { scroll-margin-top: 128px; }
  .emo-result { scroll-margin-top: 128px; }
  /* v1.65：自定义风格在手机上换行 —— 输入框独占一行，两个按钮均分下一行。
     挤在一行时输入框只剩 200px 左右，客户看不到自己写的是什么，
     而这里最怕的就是「写了但不知道写了啥」。 */
  .style-diy-row { flex-wrap: wrap; }
  .style-diy-row .input { flex: 1 1 100%; }
  .style-diy-row .btn { flex: 1 1 0; justify-content: center; padding: 10px 14px; }
  .style-diy-head .diy-sub { flex: 1 1 100%; }
}


/* 窄屏（≤430px）：两行布局下按钮**回到正常尺寸**。
   v1.53.1 那一整套「缩按钮 padding / 藏会员徽标 / 把『进入工作台』砍成『工作台』」
   都是为了在单行里给站名腾 20~90px；现在宽度是整行让出来的，不必再牺牲可读性与可点面积。
   只有 320~370 这一档（第二行本身也放不下 5 个控件）才继续收一档，见 ≤370。 */
@media (max-width: 430px) {
  .nav-clock { display: none; }
  .nav-inner { min-width: 0; }
  .nav-right { min-width: 0; gap: 6px; }
  .nav-actions { gap: 6px; }
  .brand { gap: 8px; }
  .brand .logo { width: 28px; height: 28px; border-radius: 9px; font-size: 13px; }
  .nav-user .avatar.sm { width: 26px; height: 26px; font-size: 11px; }
}
@media (max-width: 370px) {
  .brand { font-size: 15px; gap: 6px; }
  .brand .logo { width: 24px; height: 24px; border-radius: 8px; font-size: 11.5px; }
  .nav-right { gap: 5px; }
  .nav-actions { gap: 5px; }
  .theme-toggle { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
  .nav-actions .btn.sm, .nav-recharge.btn.sm { padding: 7px 9px; font-size: 12.5px; }
  /* 320px：第二行塞不下「会员徽标 + 进入工作台」两组文字（实测要 321px、容器只有 292px），
     徽标这一档让位 —— 剩余天数在会员中心和点头像的信息浮窗里都看得到。 */
  .nav-user .vip-plan { display: none; }
}

/* ---------- 炫动增强（v1.6.1）：渐变流光 / 按钮扫光 / 卡片悬浮 ---------- */
.grad-text {
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #d946ef, #6366f1);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradFlow 7s linear infinite;
}
@keyframes gradFlow { to { background-position: 260% 0; } }

.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.42), transparent);
  transform: skewX(-18deg); animation: btnSheen 4.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes btnSheen { 0%, 62% { left: -60%; } 84%, 100% { left: 130%; } }

/* ---------- v1.63.1 模板库自动套用提示（炫彩流光） ----------
   模板库规则对客户隐藏，但套餐里确实含这一项。不给点反馈，客户会以为白买了。
   底色用极低饱和的紫粉蓝叠加，不抢「一键生成」的注意力；
   文字用 background-clip:text 做流光，必须配 @supports 兜底 ——
   一旦浏览器不认，字会整块消失（不是变色，是没了）。 */
.tpl-auto-tip {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 2px; padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, .24);
  background:
    linear-gradient(102deg,
      rgba(99, 102, 241, .10) 0%,
      rgba(168, 85, 247, .10) 38%,
      rgba(236, 72, 153, .09) 68%,
      rgba(56, 189, 248, .10) 100%);
  font-size: 13px; line-height: 1.45;
  animation: tplTipBreath 5.2s ease-in-out infinite;
}
@keyframes tplTipBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
  50% { box-shadow: 0 0 18px -6px rgba(139, 92, 246, .55); }
}
.tpl-auto-tip .tpl-auto-ico,
.tpl-auto-tip .tpl-auto-txt {
  background-image: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #f59e0b, #6366f1);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  /* Safari 只认 text-fill-color：光写 color:transparent 会看到一块实色 */
  -webkit-text-fill-color: transparent;
  animation: tplTipFlow 5.4s linear infinite;
}
.tpl-auto-tip .tpl-auto-ico { font-size: 12px; flex: 0 0 auto; transform: translateY(.5px); }
.tpl-auto-tip .tpl-auto-txt { font-weight: 700; letter-spacing: .2px; }
@keyframes tplTipFlow { to { background-position: 300% 0; } }
/* 深色底上原色板偏暗，换一组更亮的（否则流光在深底上像褪色） */
html[data-theme="dark"] .tpl-auto-tip { border-color: rgba(196, 181, 253, .30); }
html[data-theme="dark"] .tpl-auto-tip .tpl-auto-ico,
html[data-theme="dark"] .tpl-auto-tip .tpl-auto-txt {
  background-image: linear-gradient(90deg, #818cf8, #c084fc, #f472b6, #fbbf24, #818cf8);
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .tpl-auto-tip .tpl-auto-ico,
  .tpl-auto-tip .tpl-auto-txt {
    background-image: none; background: none; animation: none;
    color: #7c3aed; -webkit-text-fill-color: currentColor;
  }
  html[data-theme="dark"] .tpl-auto-tip .tpl-auto-txt,
  html[data-theme="dark"] .tpl-auto-tip .tpl-auto-ico { color: #c4b5fd; }
}

/* v1.47.1：这里原本是 `.feature, .price-card, .tpl, .demo-card { will-change: transform }`。
   模板库一页几十张 .tpl，每条都常驻合成层 = 显存直接吃光，这正是「内容整体消失、露出黑背景」
   的典型成因（掉层后整块渲染成底色）。transform 过渡本身就是合成动画，不需要 will-change 加持。 */
.feature:hover, .price-card:hover, .demo-card:hover { transform: translateY(-4px); }
.demo-card { transition: transform .3s ease, box-shadow .3s ease; }
.demo-card:hover { box-shadow: var(--shadow-lg); }
.badge-pill .dot-live { animation: dotPulse 1.8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .grad-text, .btn.primary::after, .badge-pill .dot-live,
  .tpl-auto-tip, .tpl-auto-tip .tpl-auto-ico, .tpl-auto-tip .tpl-auto-txt { animation: none !important; }
}

/* ==================================================================
   v1.8 前台增强：顶部统计条 / 公告 / AI 开关 / 登录信息浮窗 / 点击特效
   ================================================================== */

/* ---------- 1. 顶部「今日访问 / 点击」统计条 ---------- */
.stat-strip {
  /* v1.41：原先是写死的 rgba(231,233,243,.9)，深色模式下顶部会留一条浅色横线（白边）。
     改成变量后浅色取值与原值等价（--line = #e7e9f3），深色自动跟着变深。 */
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(99,102,241,.06), rgba(217,70,239,.06) 55%, rgba(99,102,241,.06));
  overflow: hidden;
}
[data-theme="dark"] .stat-strip {
  background: linear-gradient(90deg, rgba(99,102,241,.14), rgba(217,70,239,.12) 55%, rgba(99,102,241,.14));
}
.stat-inner {
  display: flex; align-items: center; gap: 14px;
  height: 34px; font-size: 12.5px; color: var(--ink-2);
  white-space: nowrap;
}
.stat-i { display: inline-flex; align-items: center; gap: 5px; }
.stat-i .stat-ico { font-size: 12px; filter: saturate(1.2); }
.stat-i b {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 13.5px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block; min-width: 1ch;
}
/* 数字跳动时的小弹一下（JS 在数值变化时加 .pop） */
.stat-i b.pop { animation: statPop .42s cubic-bezier(.22,1.4,.4,1); }
@keyframes statPop {
  0% { transform: scale(1); }
  38% { transform: scale(1.28); }
  100% { transform: scale(1); }
}
.stat-dot { width: 3px; height: 3px; border-radius: 50%; background: #c7cde0; flex: 0 0 auto; }
.stat-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--ok); font-weight: 600;
}
.stat-live i {
  width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.16);
  animation: dotPulse 2s ease-in-out infinite;
}

/* ---------- 2. AI 开关 ---------- */
.ai-switch {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 15px; margin-bottom: 14px;
  border: 1px solid rgba(99,102,241,.2);
  border-radius: 13px;
  background: linear-gradient(120deg, rgba(99,102,241,.07), rgba(217,70,239,.07));
}
.ai-switch-main { min-width: 0; flex: 1 1 auto; }
.ai-switch-main b { display: block; font-size: 14px; letter-spacing: -.1px; }
.ai-switch-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.switch {
  flex: 0 0 auto; width: 50px; height: 28px; border-radius: 999px; border: 0;
  background: #d7dbe8; padding: 0; position: relative;
  transition: background .26s ease, box-shadow .26s ease;
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--card); box-shadow: 0 2px 6px rgba(16,24,40,.22);
  transition: transform .26s cubic-bezier(.34,1.4,.5,1);
}
.switch[aria-checked="true"] { background: var(--grad); box-shadow: 0 6px 16px rgba(99,102,241,.34); }
.switch[aria-checked="true"] .knob { transform: translateX(22px); }
.switch:disabled { opacity: .55; cursor: not-allowed; }
.switch:focus-visible { outline: 2px solid rgba(99,102,241,.55); outline-offset: 3px; }
.ai-switch-state { font-size: 12.5px; margin: -6px 0 12px; min-height: 18px; color: var(--muted); }
.ai-switch-state.on { color: var(--ok); font-weight: 600; }
.ai-switch-state.off { color: var(--warn); font-weight: 600; }
/* 关闭开关时，下面三个输入框视觉变灰，提示「当前不生效」 */
.ai-form-dim .field:not(.keep-on) { opacity: .55; }

/* ---------- 3. 公告 ---------- */
/* v1.84：这里的 `.notice-bar` 横幅（v1.8~v1.83）已下线，改成登录后弹窗，见下方 3.1 */
.nav-badge {
  margin-left: 6px; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 999px; background: var(--brand-3); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  display: inline-block;
}

.notice-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
  transition: box-shadow .22s ease, transform .22s ease;
}
.notice-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.notice-card.pinned { border-color: rgba(245,158,11,.4); background: linear-gradient(180deg, rgba(254,252,232,.85), var(--card) 60%); }
.nc-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 6px; }
.nc-head h3 { margin: 0; font-size: 15.5px; letter-spacing: -.2px; }
.nc-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 600;
  background: var(--chip-on); color: var(--brand-ink);
}
.nc-tag.agent { background: var(--tint-pink); color: var(--tint-rose-fg); }
.nc-tag.pin { background: var(--tint-yellow); color: var(--tint-yellow-fg); }
.nc-time { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nc-body { font-size: 14px; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; line-height: 1.75; }
.notice-empty { color: var(--muted); font-size: 13.5px; text-align: center; padding: 40px 0; }

/* ---------- 3.1 平台公告弹窗（v1.84） ----------
   公告从「创作台顶部横幅」改成「登录成功后弹一次」的弹窗。
   原来那条横幅很容易被当成提示条一眼扫过去，客户要求改成必须看见的弹窗。 */
.modal.notice-modal { width: min(560px, 100%); padding: 26px 26px 22px; }
.nm-head { display: flex; gap: 12px; align-items: flex-start; padding-right: 26px; margin-bottom: 16px; }
.nm-ico {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px;
  display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(120deg, rgba(251,191,36,.22), rgba(249,115,22,.12));
}
.nm-head-txt { min-width: 0; flex: 1 1 auto; }
.nm-head h3 { margin: 0 0 5px; font-size: 19px; line-height: 1.4; letter-spacing: -.3px; word-break: break-word; }
.nm-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.nm-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 600;
  background: var(--chip-on); color: var(--brand-ink);
}
.nm-tag.agent { background: var(--tint-pink); color: var(--tint-rose-fg); }
.nm-body {
  font-size: 14.5px; line-height: 1.8; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; max-height: min(44vh, 360px); overflow: auto; overscroll-behavior: contain;
}
.nm-body.empty { color: var(--muted); text-align: center; }
.nm-more { margin-top: 12px; text-align: right; }
.modal.notice-modal #noticeModalOk { margin-top: 16px; }
@media (max-width: 680px) {
  .modal.notice-modal { padding: 22px 18px 18px; }
  .nm-head h3 { font-size: 17.5px; }
  .nm-body { font-size: 14px; padding: 12px 13px; max-height: 40vh; }
}

/* ---------- 4. 全局点击特效 ---------- */
.kx-fx {
  position: fixed; pointer-events: none; z-index: 9999;
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  border: 2px solid rgba(99,102,241,.75);
  animation: kxRipple .62s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes kxRipple {
  0% { transform: scale(.35); opacity: .9; }
  70% { opacity: .35; }
  100% { transform: scale(3.4); opacity: 0; }
}
.kx-spark {
  position: fixed; pointer-events: none; z-index: 9999;
  width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  animation: kxSpark .66s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes kxSpark {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; }
}

/* ---------- 5. 手机端优化（访问统计 / 公告 / 触控） ---------- */
@media (max-width: 980px) {
  .stat-inner { gap: 10px; font-size: 12px; height: 32px; }
  .stat-i .stat-ico { display: none; }            /* 小屏去掉图标，省宽度 */
}
@media (max-width: 680px) {
  /* 顶部只留「访问 / 点击」，浏览数在手机上信息价值低且挤 */
  .stat-inner { gap: 8px; font-size: 11.5px; height: 30px; overflow-x: auto; }
  .stat-inner::-webkit-scrollbar { display: none; }
  .stat-idx-pv { display: none; }
  .stat-dot.pv { display: none; }
  .stat-live { margin-left: auto; }
  .notice-card { padding: 14px; border-radius: 13px; }
  .nc-head h3 { font-size: 14.5px; }
  .nc-time { width: 100%; margin-left: 0; }
  /* 手机上点击特效稍小，避免糊住内容 */
  .kx-fx { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
  /* 触控反馈：让可点元素有更明显的按下反馈（不改布局，仅视觉） */
  .btn:active, .opt:active, .tpl:active, .hot-item:active, .side-nav button:active { transform: scale(.97); }
}
@media (max-width: 400px) {
  .stat-live { display: none; }
}

/* 尊重系统「减少动态效果」 */
@media (prefers-reduced-motion: reduce) {
  .stat-i b.pop { animation: none !important; }
  .kx-fx, .kx-spark { display: none !important; }
  .switch .knob { transition: none !important; }
}

/* ================= v1.9：代理激活结果卡片 ================= */
.agent-done {
  border-radius: 14px; padding: 14px 16px;
  background: linear-gradient(120deg, rgba(99,102,241,.08), rgba(217,70,239,.06));
  border: 1px solid rgba(99,102,241,.18);
}
.agent-done .ad-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; }
.agent-done .ad-line span { color: var(--muted); }
.agent-done .ad-line b { color: var(--brand-ink-2); }
.agent-done .btn.primary { margin-top: 10px; display: inline-flex; }

/* ================= v1.10：创作台管控 / 字数提示 ================= */
.gen-closed {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 14px; border-radius: 14px;
  background: linear-gradient(120deg, #fff7ed, #fef2f2);
  border: 1px solid #fed7aa; color: #9a3412; font-size: 13.5px;
}
.gen-closed b { font-size: 14px; }
.gen-closed span { color: var(--tint-yellow-fg); }

/* 字数解析提示 */
.len-hint {
  display: none; align-items: center; gap: 6px; margin-top: 7px;
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
}
.len-hint.on { display: flex; }
.len-hint .lh-ico { flex: 0 0 auto; }
.len-hint b { color: var(--brand-ink-2); font-weight: 800; font-variant-numeric: tabular-nums; }
.len-hint.warn { color: var(--tint-yellow-fg); }
.len-hint.warn b { color: var(--tint-yellow-fg); }

/* 结果区字数徽标 */
.result-meta {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 8px;
  font-size: 12px; font-weight: 500; color: var(--muted);
}
.result-meta .rm-badge {
  padding: 1px 7px; border-radius: 8px; font-size: 11.5px; font-weight: 700;
  background: var(--chip-on); color: var(--brand-ink); font-variant-numeric: tabular-nums;
}
.result-meta .rm-badge.trim { background: var(--tint-amber); color: var(--tint-yellow-fg); }
/* v1.85：词语管控命中提示（灰蓝，不用红色 —— 不是错误，只是「已经替你处理过了」） */
.result-meta .rm-badge.guard { background: var(--chip-on); color: var(--muted); font-weight: 600; }

/* 选项区空态 */
.opt-empty {
  font-size: 13px; color: var(--muted); padding: 10px 2px;
}

/* 被管理员关掉自由输入时的只读态 */
.input[readonly] { background: var(--bg-soft); color: var(--muted); cursor: not-allowed; }

@media (max-width: 560px) {
  .gen-closed { padding: 10px 12px; font-size: 12.5px; }
  .result-meta { display: flex; margin-left: 0; margin-top: 4px; }
}

/* ================= v1.11 写论文 ================= */
.paper-wallet {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px 10px 6px 14px; box-shadow: var(--shadow-sm);
}
.paper-wallet span { font-size: 12.5px; color: var(--muted); }
.paper-wallet b { font-size: 16px; letter-spacing: -.2px; }

.paper-lock {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(120deg, #fff8ef, var(--card));
  border: 1px solid #f6e0c4; border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 16px;
}
.paper-lock .pl-ico { font-size: 22px; }
.paper-lock .pl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.paper-lock .pl-body b { font-size: 14.5px; }
.paper-lock .pl-body span { font-size: 13px; color: var(--muted); }

.paper-cat-desc { margin-top: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* ---------------------------------------------------------------
   v1.54：论文分类从 5 个变成 500 多个
     结构是「学科门类标签页 → 专业类分组 → 具体课程按钮」，
     外加一个搜索框（命中大类 / 小类 / 名称 / 说明）。
     按钮复用 .opt，只把字号和内边距收紧，500 条也不会把卡片撑爆。
   --------------------------------------------------------------- */
.paper-cat-search { display: flex; gap: 8px; margin-bottom: 10px; }
.paper-cat-search .input { flex: 1 1 auto; min-width: 0; }
.cat-tabs { gap: 7px; margin-bottom: 4px; }
.cat-tabs .opt { padding: 7px 11px; font-size: 12.8px; border-radius: 10px; }
.cat-tabs .opt .cat-n {
  font-style: normal; font-size: 11px; opacity: .62; margin-left: 5px;
}
.cat-tabs .opt.on .cat-n { opacity: .9; }
#paperCats .opt-row.many { gap: 7px; }
#paperCats .opt-row.many .opt { padding: 7px 11px; font-size: 12.5px; border-radius: 10px; }
#paperCats .opt .cat-n {
  font-style: normal; font-size: 10.5px; opacity: .6; margin-left: 5px;
}
#paperCats .opt.on .cat-n { opacity: .88; }
.cat-sub { margin-top: 12px; }
/* 小类标题整行独占，右侧一条细线，让「大类—小类」的层级在视觉上分得开 */
.cat-sub-t {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 8px;
}
.cat-sub-t::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--line); }
.cat-sub-t i {
  font-style: normal; font-weight: 400; color: var(--muted);
  padding: 0 6px; border-radius: 8px; background: var(--bg-soft); font-size: 11px;
}
.cat-more { margin-top: 10px; font-size: 12px; color: var(--muted); }
.paper-words { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.paper-words .opt { min-width: 78px; }

.paper-quote {
  margin-top: 16px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-soft), var(--card)); overflow: hidden;
}
.pq-rows { padding: 12px 16px 6px; }
.pq-line {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; color: var(--muted); padding: 5px 0;
}
.pq-line b { color: var(--ink-2); font-weight: 600; }
.pq-total {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-top: 1px dashed var(--line); flex-wrap: wrap;
}
.pq-total > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.pq-total span { font-size: 13px; color: var(--muted); }
.pq-total b { font-size: 24px; letter-spacing: -.6px; color: var(--brand); }
.pq-balance { font-size: 12.5px; padding: 4px 10px; border-radius: 8px; }
.pq-balance.ok { background: var(--tint-green); color: var(--tint-green-fg); }
.pq-balance.warn { background: var(--tint-amber); color: var(--tint-yellow-fg); }
.paper-tip { margin-top: 12px; font-size: 12px; color: #98a1b3; line-height: 1.6; }

/* 生成进度 */
.paper-prog { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.pp-bar { height: 8px; background: var(--chip); border-radius: 99px; overflow: hidden; }
.pp-bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .5s ease; }
.pp-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.pp-meta b { color: var(--brand); font-size: 15px; }
.pp-chapters { margin-top: 14px; }
.pp-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.pp-dots i { width: 22px; height: 6px; border-radius: 99px; background: var(--chip); }
.pp-dots i.on { background: var(--grad); }
.pp-count { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.pp-count b { color: var(--ink-2); }
.pp-note { margin-top: 12px; font-size: 12px; color: #98a1b3; }

/* 论文正文 */
.paper-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.paper-doc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 40px; box-shadow: var(--shadow-sm);
  max-height: 720px; overflow: auto;
}
.paper-doc .pd-title {
  font-size: 22px; text-align: center; margin: 0 0 22px; line-height: 1.5;
  font-family: "Songti SC", "SimSun", Georgia, serif; letter-spacing: .5px;
}
.paper-doc .pd-h1 { font-size: 17px; margin: 26px 0 12px; padding-left: 10px; border-left: 3px solid var(--brand); }
.paper-doc .pd-h2 { font-size: 15px; margin: 18px 0 8px; color: var(--ink-2); }

/* ================= v1.25 论文查重报告 ================= */
.plag-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.plag-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.plag-score {
  flex: 0 0 auto; min-width: 92px; text-align: center;
  padding: 8px 12px; border-radius: 14px;
  background: var(--tint-emerald); color: var(--plag-ok-fg);
}
.plag-score.warn { background: var(--tint-amber); color: var(--plag-warn-fg); }
.plag-score.bad { background: var(--tint-rose); color: var(--plag-bad-fg); }
.plag-score b { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.plag-score em { font-style: normal; font-size: 13px; font-weight: 700; margin-left: 1px; }
.plag-score span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.plag-score.ok span { color: var(--plag-ok-fg); opacity: .8; }
.plag-sum { flex: 1 1 260px; min-width: 200px; }
.plag-badge {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 99px;
  background: var(--tint-emerald); color: var(--plag-ok-fg);
}
.plag-badge.warn { background: var(--tint-amber); color: var(--plag-warn-fg); }
.plag-badge.bad { background: var(--tint-rose); color: var(--plag-bad-fg); }
.plag-sub { font-size: 12px; color: var(--muted); margin: 7px 0 9px; line-height: 1.6; }
.plag-bar {
  position: relative; height: 7px; border-radius: 99px;
  background: var(--chip); overflow: hidden;
}
.plag-bar i { display: block; height: 100%; border-radius: 99px; background: var(--ok); transition: width .5s ease; }
.plag-bar i.warn { background: var(--warn); }
.plag-bar i.bad { background: var(--danger); }
.plag-goal {
  position: absolute; top: -3px; width: 2px; height: 13px;
  background: var(--ink-2); opacity: .45; border-radius: 2px;
}
.plag-acts { flex: 0 0 auto; display: flex; gap: 8px; }
.plag-list { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.plag-list summary {
  cursor: pointer; font-size: 12.5px; color: var(--brand-ink);
  list-style: none; user-select: none;
}
.plag-list summary::-webkit-details-marker { display: none; }
.plag-list summary::before { content: '▸ '; display: inline-block; transition: transform .2s; }
.plag-list[open] summary::before { transform: rotate(90deg); }
.plag-items { display: grid; gap: 8px; margin-top: 10px; max-height: 320px; overflow: auto; }
.plag-item {
  background: var(--field); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px;
}
.pi-head { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.pi-head .pi-ch { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-head b { color: var(--danger); font-size: 11.5px; }
.pi-tag {
  padding: 1px 7px; border-radius: 99px; background: var(--tint-brand); color: var(--tint-brand-fg);
  font-size: 11px; font-weight: 700;
}
.pi-tag.tpl { background: var(--tint-amber); color: var(--plag-warn-fg); }
.pi-tag.self { background: var(--tint-yellow); color: var(--tint-yellow-fg); }
.pi-text { font-size: 12.5px; line-height: 1.7; color: var(--ink-2); margin-top: 5px; word-break: break-word; }
.pi-src { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.plag-note { font-size: 11.5px; color: var(--muted); margin-top: 11px; line-height: 1.6; }
.rm-badge.plag.ok { background: var(--tint-emerald); color: var(--plag-ok-fg); }
.rm-badge.plag.warn { background: var(--tint-amber); color: var(--plag-warn-fg); }
.paper-plag-tip {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 10px; padding: 10px 12px;
  background: var(--tint-brand); border-radius: 12px;
  font-size: 12.5px; line-height: 1.65; color: var(--tint-brand-fg);
}
.paper-plag-tip .ppt-ico { flex: 0 0 auto; font-size: 14px; }

.paper-doc .pd-p {
  margin: 0 0 12px; font-size: 15px; line-height: 1.95; color: var(--ink-strong);
  text-align: justify; text-indent: 2em;
}
.paper-doc .pd-meta { margin: 0 0 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.85; }
.paper-doc .pd-ref { margin: 0 0 6px; font-size: 13px; color: var(--muted); line-height: 1.8; padding-left: 6px; }

/* 历史列表 */
.paper-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; text-align: left;
  transition: .18s ease;
}
.paper-row:hover { border-color: #c7cbef; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.paper-row .pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.paper-row .pr-main b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper-row .pr-sub { font-size: 12.5px; color: var(--muted); }
.paper-row .pr-time { font-size: 12px; color: #98a1b3; white-space: nowrap; }

/* 余额 */
.bal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.bal-num { display: flex; align-items: baseline; gap: 4px; }
.bal-num span { font-size: 18px; color: var(--muted); }
.bal-num b { font-size: 32px; letter-spacing: -1px; }
.bal-acts { display: flex; gap: 8px; }
.bal-logs { margin-top: 14px; max-height: 320px; overflow: auto; }
.bal-table { font-size: 12.5px; }
.bal-table th { font-size: 12px; }
.bal-table .amt-in { color: var(--ok); font-weight: 600; }
.bal-table .amt-out { color: var(--danger); font-weight: 600; }

/* 充值弹窗 */
.bal-amts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bal-amt {
  border: 1px solid var(--line); background: var(--card); border-radius: 12px;
  padding: 12px 6px; font-size: 15px; color: var(--ink-2); transition: .18s ease;
}
.bal-amt:hover { border-color: #c7cbef; }
.bal-amt.on { background: var(--grad-soft); border-color: #a5b4fc; color: var(--brand); }
.bal-amt b { font-weight: 700; }
.bal-preview {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px 14px; font-size: 13px; color: var(--muted);
}
.bal-preview b { font-size: 22px; color: var(--brand); letter-spacing: -.5px; }

@media (max-width: 760px) {
  .paper-wallet { width: 100%; justify-content: space-between; }
  .paper-doc { padding: 22px 18px; max-height: 60vh; }
  .paper-doc .pd-title { font-size: 18px; }
  .paper-doc .pd-p { font-size: 14.5px; }
  .paper-lock { flex-wrap: wrap; }
  .bal-amts { grid-template-columns: repeat(2, 1fr); }
  .pq-total b { font-size: 21px; }
}

/* ==================================================================
   v1.12 —— 工作台布局（宽屏 / 适中 / 竖屏）、板块拖拽排序、历史弹窗
   ================================================================== */

/* 布局切换：默认宽屏铺满，侧栏 + 内容自适应 */
.wrap.app { transition: max-width .24s ease, width .24s ease; }
.app[data-layout="wide"]    { width: calc(100% - 28px); max-width: 1760px; }
.app[data-layout="comfort"] { width: min(1320px, calc(100% - 36px)); }
/* v1.64：竖屏模式不再把侧栏搬到正文上方（原来栏目会挤成一长条横排在最上面）。
   栏目仍然在左侧，只是整体收窄、侧栏窄一档，读起来更专注。 */
.app[data-layout="narrow"]  { width: min(900px, calc(100% - 28px)); --side-w: 208px; }
.app[data-layout="narrow"][data-side="min"] { --side-w: 68px; }

/* 布局切换按钮（侧栏底部） */
.view-switch {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  background: var(--chip); border-radius: 10px; padding: 3px; margin-bottom: 10px;
}
.view-switch button {
  border: 0; background: none; color: var(--muted); font-size: 11.5px; line-height: 1.2;
  padding: 6px 0; border-radius: 8px; transition: .16s; white-space: nowrap;
}
.view-switch button:hover { color: var(--ink-2); }
.view-switch button.on { background: var(--card); color: var(--brand); font-weight: 700; box-shadow: var(--shadow-sm); }

/* 宽屏下创作台铺成两列：热点/结果通栏，类型·风格·选题并排，消灭两侧大片空白 */
@media (min-width: 1060px) {
  .app[data-layout="wide"] #view-create,
  .app[data-layout="comfort"] #view-create {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px; align-items: start;
  }
  .app[data-layout="wide"] #view-create > .panel-head,
  .app[data-layout="comfort"] #view-create > .panel-head,
  .app[data-layout="wide"] #view-create > .gen-closed,
  .app[data-layout="comfort"] #view-create > .gen-closed,
  .app[data-layout="wide"] #view-create > .hot-panel,
  .app[data-layout="comfort"] #view-create > .hot-panel,
  .app[data-layout="wide"] #view-create > .c-topic,
  .app[data-layout="comfort"] #view-create > .c-topic,
  .app[data-layout="wide"] #view-create > .result,
  .app[data-layout="comfort"] #view-create > .result { grid-column: 1 / -1; }

  /* 宽屏下热点列表更紧凑，两列时一屏能看更多条 */
  .app[data-layout="wide"] .hot-list { max-height: 340px; }

  /* 结果区通栏后，正文限宽居中，长句不横跨整屏 */
  .app[data-layout="wide"] .result-body { max-width: 960px; }

  /* 拖拽时卡片高度不一，视觉更整齐 */
  .app[data-layout="wide"] #view-create > .card { height: 100%; }
}

/* 拖拽排序 */
.sortable { position: relative; }
.sortable .drag-handle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-right: 6px; border-radius: 5px;
  color: var(--muted); font-size: 13px; letter-spacing: -1px; cursor: grab;
  opacity: .5; vertical-align: 1px; user-select: none; transition: .15s;
}
.sortable .drag-handle:hover { opacity: 1; color: var(--brand); background: var(--chip); }
.sortable .drag-handle:active { cursor: grabbing; }
.sortable.dragging { opacity: .45; outline: 2px dashed var(--brand); outline-offset: 3px; }
.sortable.drop-before { box-shadow: 0 -3px 0 0 var(--brand); }
.sortable.drop-after { box-shadow: 0 3px 0 0 var(--brand); }
.app[data-layout="narrow"] .sortable .drag-handle { display: none; }
@media (max-width: 760px) { .sortable .drag-handle { display: none; } }

/* 历史记录：整卡可点，弹窗看全文 */
.hist-card { cursor: pointer; transition: .18s; }
.hist-card:hover { border-color: #b9bdf0; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .hist-card:hover { border-color: var(--brand); }
.hist-snippet { color: var(--muted); font-size: 13.5px; line-height: 1.75; max-height: 76px; overflow: hidden; white-space: pre-wrap; }
.hist-card:hover .hist-snippet { color: var(--ink-2); }
.modal.hist-modal { width: min(820px, 100%); }
.hist-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 2px 0 12px; }
.hist-meta .hm-time { color: var(--muted); font-size: 12.5px; }
.hist-body {
  white-space: pre-wrap; word-break: break-word; line-height: 1.85; font-size: 14.5px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; max-height: min(58vh, 560px); overflow: auto;
}
.hist-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .hist-body { padding: 13px 14px; font-size: 14px; max-height: 62vh; }
  .hist-foot { position: sticky; bottom: 0; background: var(--card); padding-top: 10px; }
}

/* 历史卡片底部「查看全文」提示 */
.hist-more { margin-top: 8px; font-size: 12.5px; color: var(--brand); font-weight: 600; opacity: .75; transition: .16s; }
.hist-card:hover .hist-more { opacity: 1; }
.hist-more b { font-weight: 700; }

/* 窄屏 / 手机端：grid 子项默认 min-width:auto 会被内容撑破，这里兜住 */
.app > * { min-width: 0; }
/* v1.64：这里原来还有一条 `.app[data-layout="narrow"] .side { max-width:100%; overflow:hidden }`，
   是给「侧栏搬去顶部」兜底的。现在 narrow 下侧栏是左侧竖栏（窄屏时是 fixed 抽屉），
   再留着会把抽屉的 290px 上限压成 100%、并掐掉滚动。 */
.app[data-layout="narrow"] .side-nav { width: 100%; min-width: 0; }
.app[data-layout="narrow"] .panel { min-width: 0; }
.app[data-layout="narrow"] .side-user { min-width: 0; }
.app[data-layout="narrow"] .side-user > div { min-width: 0; }
.app[data-layout="narrow"] .side-user .u-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= 拉新活动 + 抽奖（v1.14） ================= */
.nav-badge.hidden { display: none; }

.invite-top {
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  margin-bottom: 16px;
}
.invite-top .card { margin: 0; }

.invite-code-card h3, .draw-card h3 { margin: 0 0 14px; }
.inv-code-row { display: flex; align-items: center; gap: 10px; }
.inv-code {
  flex: 1 1 auto; min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 26px; font-weight: 800; letter-spacing: 3px;
  padding: 10px 16px; border-radius: 12px;
  background: var(--grad-soft); color: var(--brand);
  border: 1px dashed var(--line-2);
  text-align: center; overflow: hidden; text-overflow: ellipsis;
}
.inv-link-row { display: flex; gap: 8px; margin-top: 12px; }
.inv-link-row .input { flex: 1 1 auto; min-width: 0; font-size: 13px; }
.inv-link-row .btn { flex: 0 0 auto; }
/* v1.19.4 自定义邀请码 */
.inv-code-edit { display: flex; gap: 8px; margin-top: 10px; }
.inv-code-edit .input { flex: 1 1 auto; min-width: 0; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.inv-code-edit .btn { flex: 0 0 auto; }

.inv-stats { display: flex; gap: 10px; margin-top: 16px; }
.inv-stat {
  flex: 1 1 0; min-width: 0; text-align: center;
  padding: 12px 6px; border-radius: 12px;
  background: var(--chip); border: 1px solid var(--line);
}
.inv-stat b { display: block; font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.inv-stat span { font-size: 12px; color: var(--muted); }

/* -------- v1.47 邀请二维码 + 海报 -------- */
.inv-share { display: flex; gap: 16px; align-items: flex-start; }
.inv-share-col { flex: 1 1 auto; min-width: 0; }
.inv-qr-col { flex: 0 0 auto; text-align: center; }
.inv-qr-box {
  position: relative; width: 132px; height: 132px;
  border-radius: 14px; padding: 6px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: grid; place-items: center; overflow: hidden;
}
.inv-qr-box canvas { display: block; width: 118px; height: 118px; }
.inv-qr-ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center;
  background: var(--bg-soft);
}
.inv-qr-tip { display: block; margin-top: 7px; font-size: 12px; color: var(--muted); }
.inv-share-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.inv-share-btns .btn { flex: 0 0 auto; }

/* 海报弹窗：竖长图，不能撑破屏幕 */
.poster-modal { width: min(420px, 100%); }
.poster-stage {
  margin: 4px 0 14px; border-radius: 14px; overflow: auto;
  max-height: min(58vh, 520px); background: var(--bg-soft);
  border: 1px solid var(--line);
  display: grid; place-items: center; padding: 10px;
}
.poster-stage img { display: block; width: 100%; max-width: 360px; height: auto; border-radius: 10px; }
.poster-loading { color: var(--muted); font-size: 13.5px; padding: 40px 0; }
.poster-actions { text-align: center; }
.poster-actions .form-tip { margin-top: 8px; text-align: center; }

@media (max-width: 720px) {
  .inv-share { flex-direction: column-reverse; align-items: stretch; }
  .inv-qr-col { align-self: center; }
  .inv-qr-box { width: 148px; height: 148px; }
  .inv-qr-box canvas { width: 132px; height: 132px; }
  .inv-share-btns .btn { flex: 1 1 0; }
}

/* -------- 抽奖转盘 -------- */
.draw-card { display: flex; flex-direction: column; }
.draw-wheel {
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 6px 0 16px;
}
.dw-inner {
  width: 100%; max-width: 230px; aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 18px;
  background: radial-gradient(circle at 50% 30%, rgba(99,102,241,.20), rgba(217,70,239,.10) 60%, transparent 72%), var(--bg-soft);
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 6px rgba(99,102,241,.10), var(--shadow-sm);
  transition: box-shadow .25s ease, border-color .25s ease;
}
.dw-prize { font-size: 44px; line-height: 1; }
.dw-label { font-size: 13px; font-weight: 600; color: var(--ink-2); max-width: 170px; }
.dw-inner.spinning { animation: dwSpin .55s linear infinite; border-color: var(--brand-2); }
.dw-inner.won {
  border-color: var(--ok);
  box-shadow: 0 0 0 8px rgba(18,161,80,.16), var(--shadow);
  animation: dwPop .45s ease;
}
@keyframes dwSpin {
  0% { transform: rotate(0deg) scale(.97); }
  50% { transform: rotate(180deg) scale(1.03); }
  100% { transform: rotate(360deg) scale(.97); }
}
@keyframes dwPop {
  0% { transform: scale(.9); }
  55% { transform: scale(1.07); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .dw-inner.spinning { animation: dwPulse .9s ease-in-out infinite; }
  @keyframes dwPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
}

.draw-prizes { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.dp-title { font-size: 12px; color: var(--muted); }
.dp-item {
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: var(--chip); color: var(--ink-2); border: 1px solid var(--line);
}
.dp-item.bal { background: rgba(18,161,80,.10); border-color: rgba(18,161,80,.26); color: var(--ok); }

/* -------- 中奖 / 邀请 记录 -------- */
.draw-records, .inv-list { display: flex; flex-direction: column; gap: 8px; }
.dr-row, .inv-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 13px;
}
.dr-ico { font-size: 17px; flex: 0 0 auto; }
.dr-name { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-amt { flex: 0 0 auto; font-weight: 700; color: var(--brand); }
.dr-st { flex: 0 0 auto; font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.dr-st.ok { background: rgba(18,161,80,.12); color: var(--ok); }
.dr-st.off { background: rgba(217,119,6,.14); color: var(--warn); }
.dr-time, .ir-time { flex: 0 0 auto; font-size: 12px; color: var(--muted); }

.ir-name { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ir-ok { flex: 0 0 auto; font-size: 12px; color: var(--ok); }
.ir-ch { flex: 0 0 auto; font-size: 12px; color: var(--brand); font-weight: 600; }

.inv-from-link {
  margin-top: 10px; padding: 8px 12px; border-radius: 10px; font-size: 13px;
  background: rgba(99,102,241,.10); border: 1px solid rgba(99,102,241,.26); color: var(--brand);
}

/* ================= 支付方式选择弹窗（v1.14） ================= */
.pm-balance { text-align: center; font-size: 13px; color: var(--muted); margin: -8px 0 16px; }
.pm-balance b { color: var(--ink); font-size: 15px; }
.pm-ok { color: var(--ok); margin-left: 6px; font-size: 12px; }
.pm-no { color: var(--danger); margin-left: 6px; font-size: 12px; }

.pm-options { display: flex; flex-direction: column; gap: 10px; }
.pm-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 14px; border-radius: 13px; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.pm-opt:hover:not(:disabled) { border-color: var(--brand); background: var(--chip-on); transform: translateY(-1px); }
.pm-opt .pm-ico { font-size: 20px; flex: 0 0 auto; }
.pm-opt .pm-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-opt .pm-main b { font-size: 14px; color: var(--ink); }
.pm-opt .pm-main i { font-style: normal; font-size: 12px; color: var(--muted); }
.pm-opt .pm-arrow { flex: 0 0 auto; color: var(--muted); font-size: 15px; }
.pm-opt.recommend { border-color: var(--brand); background: var(--grad-soft); }
.pm-opt.disabled, .pm-opt:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 860px) {
  .invite-top { grid-template-columns: 1fr; }
  .inv-code { font-size: 22px; letter-spacing: 2px; }
  .dr-time, .ir-time { display: none; }
}

/* ================= v1.15：友情链接（首页顶部） ================= */
.friend-bar {
  position: relative; z-index: 3;
  background: linear-gradient(90deg, rgba(99,102,241,.10), rgba(217,70,239,.09) 55%, rgba(56,189,248,.10));
  border-bottom: 1px solid var(--line);
}
.friend-bar.hidden { display: none; }
.friend-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 0; min-height: 38px;
}
.friend-label {
  flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--muted);
  letter-spacing: .3px; white-space: nowrap;
}
.friend-list {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  mask-image: linear-gradient(90deg, #000 92%, transparent);
  padding: 2px 6px 2px 0;
}
.friend-list::-webkit-scrollbar { display: none; }
.friend-item {
  flex: 0 0 auto;
  font-size: 12.5px; line-height: 1;
  padding: 6px 11px; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
  background: var(--card); border: 1px solid var(--line);
  transition: color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.friend-item:hover {
  color: var(--brand); border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99,102,241,.16);
}
.friend-item:active { transform: translateY(0) scale(.98); }

/* ================= v1.15：客服悬浮按钮 + 面板（v1.19.2：可拖动） ================= */
.cs-wrap {
  position: fixed; right: 18px; bottom: 40px; z-index: 70;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  touch-action: none;               /* 拖动按钮时不连带滚动页面（手机端必须） */
  -webkit-user-select: none; user-select: none;
}
.cs-wrap.hidden { display: none; }
/* 松手吸附回边缘时的过渡，只在 JS 加上 .settled 的那一小段时间生效 */
.cs-wrap.settled { transition: left .24s cubic-bezier(.22,1,.36,1), top .24s cubic-bezier(.22,1,.36,1); }
.cs-wrap.dragging { z-index: 72; }
.cs-btn {
  position: relative; width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: grab;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #d946ef);
  color: #fff; font-size: 24px; line-height: 1;
  box-shadow: 0 10px 26px rgba(99,102,241,.42), 0 2px 6px rgba(23,29,64,.18);
  /* v1.69：收起时要变形成窄条，宽高/圆角都参与过渡 */
  transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s ease,
              width .28s cubic-bezier(.22,1,.36,1), height .28s cubic-bezier(.22,1,.36,1),
              border-radius .28s cubic-bezier(.22,1,.36,1);
}
.cs-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 32px rgba(99,102,241,.5); }
.cs-btn:active { transform: scale(.95); }
.cs-wrap.dragging .cs-btn {
  cursor: grabbing;
  transform: scale(1.08);
  box-shadow: 0 18px 40px rgba(99,102,241,.55), 0 4px 10px rgba(23,29,64,.2);
}
.cs-wrap.dragging .cs-btn:hover { transform: scale(1.08); }
.cs-wrap.dragging .cs-label { opacity: .55; }
.cs-wrap.dragging .cs-ring { animation: none; opacity: 0; }
/* 只有按钮真的停在右下角、和「登录信息」浮窗重叠时，才给它让位（drag 走后不再白让一块） */
.cs-ico { position: relative; z-index: 2; display: grid; place-items: center; }
/* v1.57：默认图标改成内联 SVG。原来用 emoji 💬，在没装彩色 emoji 字体的
   Windows 精简版 / 部分 Linux 上会渲染成「空方框」，看起来就是图标坏了。 */
.cs-ico svg { width: 26px; height: 26px; display: block; }
.cs-ico img { width: 26px; height: 26px; display: block; border-radius: 50%; object-fit: cover; }
.cs-ring {
  position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid rgba(139,92,246,.55);
  animation: csPulse 2.2s ease-out infinite;
}
@keyframes csPulse {
  0% { transform: scale(.92); opacity: .85; }
  70% { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1.22); opacity: 0; }
}
.cs-label {
  font-size: 11px; color: var(--muted); background: var(--card);
  padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line);
  white-space: nowrap;
}

/* ================= v1.69：客服按钮「3 秒后自动收起到右侧」 =================
   客户反馈：右下角那个圆球一直亮着，挡正文也挡「本次登录」浮窗。
   现在首次出现亮 3 秒（够看清），随后缩成贴屏幕右边缘的一条竖排「客服」窄条；
   点一下窄条就恢复成大圆球，恢复后不再自动收起（不然刚点开又缩回去，等于点不到）。
   · 收起一律往右 —— 不管客户把球拖到左边还是右边，缩起来都在右边，位置可预期
   · 只改外观与贴边，不碰 left/top 的坐标值 —— 展开时原样回到客户拖到的位置
   · 窄条仍可点（width 24px × height 52px，手指也够按），不误触正文
   · 系统「减少动态效果」：直接切换形态，不做宽高过渡 */
.cs-mini { display: none; }
.cs-wrap.cs-away {
  left: auto !important; right: 0 !important;
  gap: 0;
}
.cs-wrap.cs-away .cs-btn {
  width: 24px; height: 52px; border-radius: 13px 0 0 13px;
  cursor: pointer;
  box-shadow: -3px 4px 16px rgba(99,102,241,.38), 0 1px 4px rgba(23,29,64,.16);
}
.cs-wrap.cs-away .cs-ico,
.cs-wrap.cs-away .cs-ring,
.cs-wrap.cs-away .cs-label { display: none; }
.cs-wrap.cs-away .cs-mini {
  display: block;
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; line-height: 1;
  color: #fff; text-shadow: 0 1px 2px rgba(23,29,64,.35);
}
.cs-wrap.cs-away .cs-btn:hover { transform: none; box-shadow: -4px 4px 20px rgba(99,102,241,.5); }
@media (prefers-reduced-motion: reduce) {
  .cs-btn { transition: box-shadow .2s ease, transform .2s ease; }
}

.cs-panel {
  position: fixed; right: 18px; bottom: 104px; z-index: 71;
  width: 320px; max-width: calc(100vw - 24px);
  border-radius: 16px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(23,29,64,.22);
  animation: csIn .26s cubic-bezier(.22,1,.36,1) both;
}
.cs-panel.hidden { display: none; }
@keyframes csIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.cs-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  background: linear-gradient(120deg, rgba(99,102,241,.12), rgba(217,70,239,.10));
  border-bottom: 1px solid var(--line);
}
.cs-title { font-weight: 700; font-size: 14px; }
.cs-close {
  border: 0; background: transparent; cursor: pointer; font-size: 20px; line-height: 1;
  color: var(--muted); padding: 0 2px;
}
.cs-close:hover { color: var(--ink); }
.cs-body { padding: 14px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.cs-body img { max-width: 100%; display: block; margin: 0 auto 8px; border-radius: 12px; }
.cs-body a { color: var(--brand); }
.cs-tip {
  padding: 9px 14px; font-size: 12px; color: var(--muted);
  border-top: 1px dashed var(--line); background: var(--bg-soft);
}
.cs-tip.hidden { display: none; }
.cs-body.hidden { display: none; }

/* v1.50 客服链接模式：面板里现画的客服二维码（后台只填了链接、没填面板内容时用） */
.cs-qr { text-align: center; }
.cs-qr canvas {
  display: block; margin: 0 auto 8px;
  border-radius: 10px; background: #fff; padding: 6px; box-sizing: content-box;
}
.cs-qr-tip { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.cs-qr-copy {
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-2);
  font: inherit; font-size: 12.5px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.cs-qr-copy:hover { color: var(--brand); border-color: var(--brand); }

/* ================= v1.30.2 登录信息浮窗（右下角） =================
   位置在客服按钮（bottom 40 / 高 54）上方，不和按钮抢地方；
   客服面板打开时整块隐藏，免得两个面板叠在一起看不清。
   颜色全部走语义变量，深浅色自动适配（v1.8 那版是硬编码白底，深色下会发白）。 */
.li-panel {
  position: fixed; right: 18px; bottom: 124px; z-index: 68;
  width: 236px; border-radius: 14px; overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 14px 38px rgba(23,29,64,.16);
  animation: liIn .42s cubic-bezier(.22,1,.36,1) both;
  font-size: 12.5px;
  color: var(--ink-2);
}
.li-panel.hidden { display: none; }
@keyframes liIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.li-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; cursor: pointer; user-select: none;
  background: var(--grad-soft);
  border-bottom: 1px solid var(--line);
}
.li-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; color: var(--ink); }
.li-shield {
  width: 15px; height: 15px; border-radius: 50%; background: var(--ok); color: #fff;
  font-size: 9.5px; font-style: normal; display: grid; place-items: center; font-weight: 800;
}
.li-acts { display: inline-flex; align-items: center; gap: 8px; }
.li-toggle { color: var(--muted); font-size: 11.5px; }
.li-x {
  color: var(--muted); font-size: 15px; line-height: 1; padding: 0 2px; border-radius: 6px;
  cursor: pointer; transition: color .15s ease, background .15s ease;
}
.li-x:hover, .li-x:focus-visible { color: var(--ink); background: var(--chip); }
.li-body { padding: 9px 12px 11px; transition: max-height .28s ease, opacity .2s ease, padding .2s ease; max-height: 260px; }
.li-panel.collapsed .li-body { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
.li-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 3px 0; color: var(--muted);
}
.li-row b {
  color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right;
}
.li-ping.good { color: var(--ok); }
.li-ping.mid { color: var(--warn); }
.li-ping.bad { color: var(--danger); }
/* 4 格信号条：延迟越低亮的格越多 */
.li-bars { display: flex; gap: 3px; align-items: flex-end; height: 18px; margin: 7px 0 4px; }
.li-bars i {
  flex: 1 1 0; height: 25%; border-radius: 3px; background: var(--line-2);
  transition: background .3s ease, height .3s ease;
}
.li-bars i:nth-child(2) { height: 50%; }
.li-bars i:nth-child(3) { height: 75%; }
.li-bars i:nth-child(4) { height: 100%; }
.li-bars[data-lv="1"] i:nth-child(1),
.li-bars[data-lv="2"] i:nth-child(-n+2),
.li-bars[data-lv="3"] i:nth-child(-n+3),
.li-bars[data-lv="4"] i:nth-child(-n+4) { background: linear-gradient(180deg, #34d399, #12a150); }
.li-bars[data-lv="1"] i:nth-child(1) { background: linear-gradient(180deg, #fca5a5, #e11d48); }
.li-bars[data-lv="2"] i:nth-child(-n+2) { background: linear-gradient(180deg, #fcd34d, #d97706); }
.li-foot {
  display: flex; align-items: center; gap: 6px; margin-top: 6px; padding-top: 7px;
  border-top: 1px dashed var(--line); color: var(--muted); font-size: 11.5px;
}
.li-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; animation: dotPulse 2s ease-in-out infinite; }
.li-panel.offline .li-dot { background: var(--line-2); animation: none; }
.li-panel.offline .li-shield { background: var(--muted); }
/* 客服面板打开时让位（两者都在右下角，叠起来会互相挡） */
body.cs-open .li-panel { display: none; }
@media (max-width: 900px) {
  .li-panel { width: 214px; right: 12px; bottom: 120px; }
}
@media (max-width: 560px) {
  .li-panel { width: calc(100% - 24px); max-width: 300px; right: 12px; bottom: 114px; }
  .li-body { max-height: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  .li-panel { animation: none !important; }
  .li-dot { animation: none; }
}

@media (max-width: 560px) {
  .cs-wrap { right: 12px; bottom: 38px; }
  .cs-btn { width: 48px; height: 48px; font-size: 21px; }
  .cs-ico svg, .cs-ico img { width: 22px; height: 22px; }
  .cs-panel { width: auto; }        /* 具体 left/top/宽度由 JS 按按钮位置算 */
  .friend-inner { padding: 8px 0; gap: 10px; }
  .friend-label { font-size: 12px; }
  .friend-item { font-size: 12px; padding: 5px 10px; }
}

/* ================= v1.19.5 情绪价值 =================
   全部走语义变量，深色模式下不用另写一套。
   场景卡片做成网格而不是 radio，是因为用户是「凭感觉挑」，
   一屏看到 11 个场景比下拉框快得多。 */

.emo-scenes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

/* 一级分组（恋爱情绪 / 社交通用）：场景从 11 个涨到 21 个，
   不分组的网格一屏放不下，用户也分不清「女朋友不开心」和「想拒绝」是不是一类 */
.emo-groups { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.emo-groups button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--bg-soft);
  font-size: 13px; font-weight: 600; color: var(--ink-2); transition: .16s;
}
.emo-groups button:hover { border-color: var(--line-2); background: var(--card); }
.emo-groups button.on {
  background: var(--tint-brand); color: var(--tint-brand-fg); border-color: transparent;
}
.emo-groups .eg-n { font-size: 11.5px; font-weight: 500; opacity: .7; }

/* 二级小类（v1.19.9）：场景到 40 个，一级分组还不够，再拆一层，
   视觉上要比一级轻——一眼看出「这是同一组里的细类」，不抢主标签的注意力 */
.emo-subs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: -2px 0 14px; padding: 2px 0 0 2px;
}
.emo-subs button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 9px;
  border: 1px dashed var(--line);
  background: transparent;
  font-size: 12.5px; font-weight: 500; color: var(--muted); transition: .15s;
}
.emo-subs button:hover { border-color: var(--line-2); color: var(--ink-2); background: var(--bg-soft); }
.emo-subs button.on {
  border-style: solid; border-color: var(--brand);
  color: var(--brand); background: var(--tint-brand); font-weight: 600;
}
.emo-subs .es-n { font-size: 10.5px; opacity: .65; }

.emo-scene {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px; text-align: left;
  border: 1px solid var(--line); background: var(--bg-soft);
  border-radius: 13px; transition: .16s; min-width: 0;
}
.emo-scene:hover { border-color: var(--line-2); background: var(--card); transform: translateY(-1px); }
.emo-scene.on {
  background: var(--grad); border-color: transparent;
  box-shadow: 0 8px 20px rgba(99,102,241,.24);
}
.emo-scene.on .es-body b,
.emo-scene.on .es-body i { color: #fff; }
.emo-scene.on .es-body i { opacity: .82; }

.es-ico { font-size: 19px; line-height: 1; flex: 0 0 auto; }
.es-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.es-body b { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-body i {
  font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.emo-result { margin-top: 18px; scroll-margin-top: 84px; }
.emo-result-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.emo-result-head .t { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.emo-sub { font-weight: 400; font-size: 12.5px; color: var(--muted); }

.emo-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px 16px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm); transition: .16s;
}
.emo-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.emo-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.emo-idx {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--chip); color: var(--muted); font-size: 11.5px; font-weight: 700;
}
.emo-kind {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
}
.emo-kind.msg { background: var(--tint-brand); color: var(--tint-brand-fg); }
.emo-kind.moments { background: var(--tint-pink); color: var(--tint-pink-fg); }
.emo-kind.group { background: var(--tint-emerald); color: var(--tint-emerald-fg); }
.emo-title {
  flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.emo-card-head .btn { flex: 0 0 auto; }
.emo-text {
  font-size: 15px; line-height: 1.85; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}

.emo-empty {
  background: var(--bg-soft); border: 1px dashed var(--line-2);
  border-radius: 14px; padding: 38px 20px; text-align: center;
}
.emo-empty-ico { font-size: 30px; margin-bottom: 10px; opacity: .85; }
.emo-empty p { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin: 0 0 12px; }
.emo-empty p:last-child { margin-bottom: 0; }
.emo-loading {
  background: var(--bg-soft); border: 1px dashed var(--line-2);
  border-radius: 14px; padding: 40px 20px; text-align: center;
  font-size: 13.5px; color: var(--muted);
}

@media (max-width: 900px) {
  .emo-scenes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .emo-scenes { gap: 8px; }
  .emo-scene { padding: 10px; gap: 8px; }
  .es-ico { font-size: 17px; }
  .es-body b { font-size: 13px; }
  .es-body i { font-size: 11px; }
  .emo-text { font-size: 14.5px; }
  .emo-card { padding: 13px 14px 15px; }
}

/* ---------- AI 配置 · 常用配置参考（v1.20 后台可配） ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.ai-ref-name { font-size: 13px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.ai-ref-url, .ai-ref-model {
  font-size: 12.5px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.ai-ref-model { color: var(--ink-2); }
.ai-ref-fill {
  border: 1px solid var(--line-2); background: var(--card);
  color: var(--brand-ink); font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.ai-ref-fill:hover { border-color: var(--brand); background: var(--tint-brand); }
.ai-ref-fill[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) {
  #aiRefsCard .table th, #aiRefsCard .table td { padding: 9px 6px; }
  .ai-ref-url { max-width: 140px; }
}

/* v1.30 套餐：未开通的板块在导航上挂锁（点进去仍有完整说明） */
.side-nav button.nav-locked { opacity: .55; }
.side-nav button.nav-locked::after {
  content: '🔒';
  margin-left: 5px;
  font-size: 11px;
  opacity: .9;
}

/* v1.31 套餐：未开通的板块整块换成说明卡（DOM 保留，只是隐藏其它子节点，
   这样开通后不刷新页面直接切回来也能立刻渲染出真实内容） */
.lic-locked > *:not(.lic-lock) { display: none !important; }
.lic-lock {
  padding: 34px 22px;
  border-radius: var(--radius, 14px);
  border: 1px dashed var(--line, #ddd);
  background: var(--card, #fff);
  text-align: center;
}
.lic-lock .lk-ico { font-size: 34px; line-height: 1.2; }
.lic-lock h3 { margin: 10px 0 6px; font-size: 16px; }
.lic-lock p { margin: 0; color: var(--muted, #888); font-size: 13px; line-height: 1.7; }
.lic-lock p b { color: var(--brand, #6c5ce7); }

/* v1.37 模板库：创作台「选题与要求」卡片里的模板要求区 */
.tpl-req {
  margin-top: 14px;
  padding: 14px 16px 12px;
  border-radius: 14px;
  border: 1px solid var(--line, #e5e7eb);
  background: linear-gradient(120deg, var(--tint-brand-soft, #f4f3ff), var(--card, #fff));
  animation: tplReqIn .28s ease-out;
}
@keyframes tplReqIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.tpl-req-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.tpl-req-head b { font-size: 14px; color: var(--ink-1, #111); }
.tpl-req-head .hint { font-size: 12px; color: var(--muted, #888); }
.tpl-req-acts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tpl-req .field { margin-bottom: 10px; }
.tpl-req .field label {
  display: block; font-size: 12.5px; font-weight: 700;
  color: var(--brand-ink-2, #6c5ce7); margin-bottom: 5px;
}
.tpl-req textarea.input {
  width: 100%; font-size: 12.5px; line-height: 1.6;
  resize: vertical; min-height: 44px;
}
.tpl-req .form-tip { margin-top: 2px; }

/* v1.43 模板库锁定卡：套餐不含模板库时替代三段区（全部用变量，深色自动跟随） */
.tpl-lock {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed var(--line-2, #d7dbe7);
  background: var(--surface-2, #f7f8fc);
  animation: tplReqIn .28s ease-out;
}
.tpl-lock-ico {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--tint-brand-soft, #f1f0ff);
  font-size: 16px;
}
.tpl-lock-main { min-width: 0; }
.tpl-lock-main b { display: block; font-size: 14px; color: var(--ink-1, #111); }
.tpl-lock-main p {
  margin: 5px 0 10px;
  font-size: 12.5px; line-height: 1.7;
  color: var(--muted, #888);
}
.tpl-lock .btn { font-size: 12.5px; padding: 6px 14px; }
@media (max-width: 560px) {
  .tpl-lock { padding: 12px; }
}
@media (max-width: 560px) {
  .tpl-req { padding: 12px 12px 10px; }
}

/* ==================================================================
   v1.41 深色模式白边收口
   ------------------------------------------------------------------
   下面这些规则在浅色下是对的，所以不动原规则，只补一条深色覆盖：
   浅色零变化，深色不再出现浅色描边 / 浅色底块。
   （.stat-strip / .tpl-req 已在各自规则处改成变量，这里不再重复）
   ================================================================== */
[data-theme="dark"] .feature:hover,
[data-theme="dark"] .step:hover,
[data-theme="dark"] .price-card:hover { border-color: var(--line-2); }

[data-theme="dark"] .sec-block { border-color: var(--line-2); }

[data-theme="dark"] .switch { background: var(--chip); }
[data-theme="dark"] .switch .knob { background: #e8ecf7; box-shadow: 0 2px 6px rgba(0,0,0,.45); }

[data-theme="dark"] .gen-closed {
  background: linear-gradient(120deg, rgba(245,158,11,.16), rgba(244,63,94,.10));
  border-color: rgba(245,158,11,.38);
  color: #fcd34d;
}

[data-theme="dark"] .paper-lock {
  background: linear-gradient(120deg, rgba(245,158,11,.12), var(--card));
  border-color: rgba(245,158,11,.32);
}

[data-theme="dark"] .demo-line.shine {
  background: linear-gradient(90deg, var(--line-2) 20%, var(--field) 40%, var(--line-2) 60%);
  background-size: 200% 100%;
}

/* ================= v1.42 右上角会员标识（动态显示套餐名） =================
   需求：开通会员后直接显示套餐名称，要「动」起来，看起来大气。
   实现：胶囊 + 流光扫过 + 呼吸光点；套餐名过长自动省略，不挤歪导航。
   只在未开通时显示「免费版」，点一下直接进会员中心。 */
.vip-plan {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 27px; padding: 0 10px 0 9px; border: 0; border-radius: 999px;
  font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .2px;
  cursor: pointer; overflow: hidden; white-space: nowrap; isolation: isolate;
  transition: transform .18s ease, box-shadow .22s ease;
}
.vip-plan:hover { transform: translateY(-1px); }
/* v1.80.3：开通后不再回退成「浅金粉底」——客户要的是「炫彩效果不变」，
   所以直接吃「开通会员」那一套五色流动，再叠一层金光：
   金环描边（0 0 0 1px）+ 金色外发光 + 内部金雾呼吸（.vp-gold）+ 金色扫光。 */
.vip-plan.on {
  color: #fff;
  background-image: linear-gradient(100deg,
    var(--vip-c1), var(--vip-c2) 32%, var(--vip-c3) 64%, var(--vip-c4) 86%, var(--vip-c1));
  background-size: 300% 100%;
  text-shadow: 0 1px 2px rgba(80, 10, 45, .34);
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 200, .55),
    0 0 0 1px rgba(255, 214, 120, .92),
    0 2px 12px rgba(224, 60, 110, .32),
    0 0 18px rgba(255, 196, 92, .52);
  animation: vipFlow 8s linear infinite;
}
.vip-plan.on:hover {
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 220, .7),
    0 0 0 1px rgba(255, 224, 140, 1),
    0 6px 20px rgba(224, 60, 110, .42),
    0 0 28px rgba(255, 200, 96, .72);
}
/* 快到期只换金环的色温（偏红），背景继续走炫彩 —— 以前整块盖成玫红底，
   跟「开通会员」那版断档了 */
.vip-plan.on.soon {
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 200, .55),
    0 0 0 1px rgba(255, 150, 120, .95),
    0 2px 12px rgba(244, 63, 94, .4),
    0 0 18px rgba(255, 150, 90, .55);
}
.vip-plan.on .vp-dot { background: #ffe08a; color: #ffe08a; }
.vip-plan.on.soon .vp-dot { background: #ff8f8f; color: #ff8f8f; }
/* v1.80.1：未开通时的入口。客户原话「开通会员要炫彩的」——
   原来是 chip 灰底 + 灰字，在深色导航里几乎看不见；现在直接吃会员那套五色流动渐变，
   与左侧会员标识 / 套餐卡同一个色系，一眼是「可以点的东西」。 */
.vip-plan.off {
  color: #fff;
  background-image: linear-gradient(100deg,
    var(--vip-c1), var(--vip-c2) 32%, var(--vip-c3) 64%, var(--vip-c4) 86%, var(--vip-c1));
  background-size: 300% 100%;
  box-shadow: 0 2px 10px rgba(224, 60, 110, .3), inset 0 0 0 1px rgba(255, 255, 255, .28);
  text-shadow: 0 1px 2px rgba(80, 10, 45, .3);
  animation: vipFlow 7s linear infinite;
}
.vip-plan.off:hover {
  box-shadow: 0 6px 18px rgba(224, 60, 110, .4), inset 0 0 0 1px rgba(255, 255, 255, .44);
}
/* 扫光用白色，压在彩底上才看得见（.on 那版是压浅底的 .8 白，这里要更亮） */
.vip-plan.off .vp-shine {
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .62) 46%, transparent 62%);
  animation-duration: 4.4s;
}
/* v1.80.3：会员态的扫光换成金色（白+暖金双峰），这就是「金光扫过」那一层 */
.vip-plan.on .vp-shine {
  background: linear-gradient(100deg,
    transparent 18%, rgba(255, 224, 138, .55) 36%, rgba(255, 250, 232, .95) 47%,
    rgba(255, 214, 110, .82) 56%, transparent 76%);
  animation-duration: 3.6s;
}
.vip-plan .vp-txt { max-width: 104px; overflow: hidden; text-overflow: ellipsis; }
.vip-plan .vp-day { font-size: 11px; font-weight: 700; opacity: .72; }
.vp-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto;
  box-shadow: 0 0 0 0 currentColor; animation: vpPulse 1.9s ease-in-out infinite;
}
.vp-shine {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, .8) 46%, transparent 64%);
  transform: translateX(-130%); animation: vpShine 3.8s ease-in-out infinite;
}
@keyframes vpPulse {
  0%, 100% { transform: scale(1); opacity: .95; }
  50% { transform: scale(1.5); opacity: .5; }
}
@keyframes vpShine {
  0%, 52% { transform: translateX(-130%); }
  86%, 100% { transform: translateX(130%); }
}
/* v1.80.3 金光层：两团暖金在胶囊里左右游走 + 呼吸。
   动的是 opacity 与 transform（合成层属性），不动 box-shadow —— 小胶囊也不逐帧重绘。 */
.vp-gold {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background:
    radial-gradient(58% 120% at 20% 50%, rgba(255, 232, 160, .88), rgba(255, 200, 80, 0) 66%),
    radial-gradient(50% 112% at 78% 46%, rgba(255, 210, 110, .72), rgba(255, 170, 40, 0) 68%);
  will-change: opacity, transform;
  animation: vpGold 3.4s ease-in-out infinite;
}
@keyframes vpGold {
  /* 只往**左**走：右移 + scale 会把 scrollWidth 撑大（小胶囊被挤出 8px 的滚动区），
     左侧溢出不计入可滚动区，视觉一样是「金雾在游走」 */
  0%, 100% { opacity: .38; transform: translate3d(0, 0, 0); }
  50% { opacity: .9; transform: translate3d(-12%, 0, 0); }
}
/* 侧栏也复用同一个标识 */
.vip-tag.on .vp-dot { width: 5px; height: 5px; margin-right: 5px; }
.vip-tag .vp-day { margin-left: 5px; opacity: .7; font-weight: 700; }

/* 深色下同一套渐变即可（本身就是高饱和色），只把光晕加强一点，避免糊在深底上 */
[data-theme="dark"] .vip-plan.off {
  box-shadow: 0 2px 14px rgba(255, 77, 109, .34), inset 0 0 0 1px rgba(255, 255, 255, .32);
}
/* v1.80.3：会员态在深色下**保持炫彩**（原来这里会把浅金粉底盖回来），只把金光提亮 */
[data-theme="dark"] .vip-plan.on {
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 200, .5),
    0 0 0 1px rgba(255, 214, 120, .85),
    0 2px 14px rgba(255, 77, 109, .34),
    0 0 22px rgba(255, 196, 92, .6);
}
[data-theme="dark"] .vip-plan.on.soon {
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 200, .5),
    0 0 0 1px rgba(255, 150, 120, .9),
    0 2px 14px rgba(244, 63, 94, .42),
    0 0 22px rgba(255, 150, 90, .6);
}
[data-theme="dark"] .vp-shine { background: linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, .22) 46%, transparent 64%); }

@media (max-width: 720px) {
  .vip-plan { height: 25px; padding: 0 8px; font-size: 11.5px; }
  .vip-plan .vp-txt { max-width: 74px; }
  .vip-plan .vp-day { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vp-dot, .vp-shine, .vp-gold { animation: none; }
  .vp-shine { display: none; }
  /* 金光不闪了，但颜色留着（.38 那档是动画起点，静止时最柔和） */
  .vp-gold { opacity: .38; }
  /* 减少动效：流动停掉，但「开通会员」/ 套餐名那两块仍然是彩色的 */
  .vip-plan.off, .vip-plan.on { animation: none; }
}

/* ==================================================================
   v1.44 套餐展示增强
   ------------------------------------------------------------------
   目标：客户在会员中心 / 价格区能直接看清「这档能用什么」，
   付费入口做成炫彩醒目（渐变数字 + 呼吸光晕 + 扫光），但不抢内容。
   全部颜色走主题变量或纯渐变，深色模式自动生效，无白边风险。
   ================================================================== */

/* ---------- 1. 卡片骨架 ---------- */
.price-card.plan-card { display: flex; flex-direction: column; padding: 26px 24px 22px; }
.price-card.plan-card .price-name { font-size: 17px; letter-spacing: -.2px; padding-right: 64px; }
.price-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
/* 「当前套餐」角标：贴在右上，和徽标（居中）不打架。
   v1.80：从绿色小牌换成会员炫彩胶囊（和左侧会员标识同族，一眼认出「这就是我在用的」） */
.cur-tag {
  position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px; color: #fff; letter-spacing: .3px;
  background: linear-gradient(100deg, #c2410c, #be123c 42%, #a21caf 78%, #7c3aed);
  background-size: 200% 100%;
  box-shadow: 0 2px 10px rgba(190, 18, 60, .28), inset 0 0 0 1px rgba(255, 255, 255, .22);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .22);
  animation: vipFlow 8s linear infinite;
}

/* ---------- 2. 价格：炫彩渐变数字（付费第一眼） ---------- */
/* v1.80：从冷调 indigo→粉 换成会员炫彩色（金→玫→品→紫），与左侧会员标识同族 */
.price-card .price-amount .val {
  background-image: linear-gradient(92deg,
    var(--vip-t1), var(--vip-t2) 34%, var(--vip-t3) 60%, var(--vip-t4) 82%, var(--vip-t1));
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* Safari 只认 text-fill-color，光写 color:transparent 会看不到数字 */
  -webkit-text-fill-color: transparent;
  animation: payFlow 7s linear infinite;
  filter: drop-shadow(0 2px 10px rgba(244, 63, 94, .24));
}
@keyframes payFlow { to { background-position: 260% 0; } }
.price-card.pop .price-amount .val { filter: drop-shadow(0 4px 16px rgba(217, 70, 239, .40)); }
/* 划线原价 + 折扣标 */
.price-off {
  margin-left: auto; align-self: flex-start; font-size: 12px; font-weight: 800;
  color: #fff; padding: 3px 9px; border-radius: 999px; letter-spacing: .3px;
  background: linear-gradient(120deg, #f43f5e, #f59e0b);
  box-shadow: 0 4px 12px rgba(244, 63, 94, .32);
  transform: translateY(2px);
}
.price-card .price-origin { margin-top: 2px; }
.price-quota i { font-style: normal; color: var(--muted); }

/* ---------- 3. 权益清单：✓ 绿 / ✕ 灰，两行结构 ---------- */
.plan-perks { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 9px; }
.plan-perks li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; line-height: 1.45; }
.plan-perks li > i {
  flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 11px; font-weight: 800;
}
.plan-perks li.ok > i { background: var(--tint-green); color: var(--tint-green-fg); }
.plan-perks li.ok b { color: var(--ink); font-weight: 700; }
.plan-perks li.ok span { color: var(--ink-2); }
.plan-perks li.no > i { background: var(--chip); color: var(--muted); }
.plan-perks li.no b { color: var(--muted); font-weight: 600; }
.plan-perks li.no span { color: var(--muted); opacity: .85; }
.plan-perks li div { min-width: 0; }
.plan-perks li span { display: block; font-size: 12.5px; margin-top: 1px; }
.plan-perks.sm { gap: 6px; padding-top: 12px; margin-top: 12px; }
.plan-perks.sm li { font-size: 12.5px; }

/* ---------- 4. 后台填的套餐说明（原样全显示） ---------- */
.plan-note {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); line-height: 1.55;
}
.plan-note b { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .4px; margin-bottom: 4px; }
.plan-note ul { margin: 0; padding-left: 15px; }
.plan-note li { margin: 2px 0; }

/* ---------- 5. 开通按钮：炫彩流转 + 呼吸光晕 + 扫光 ---------- */
.btn.btn-pay {
  margin-top: auto; position: relative; overflow: hidden;
  padding-top: 13px; padding-bottom: 13px; font-weight: 800; letter-spacing: .6px;
  background: linear-gradient(100deg, #6366f1, #8b5cf6 30%, #d946ef 58%, #f43f5e 82%, #6366f1);
  background-size: 300% 100%;
  animation: payFlow 6s linear infinite, payGlow 2.8s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, .18);
}
.plan-card .btn.btn-pay { margin-top: 16px; }
@keyframes payGlow {
  0%, 100% { box-shadow: 0 8px 22px rgba(99, 102, 241, .34); }
  50% { box-shadow: 0 16px 38px rgba(217, 70, 239, .55); }
}
.btn.btn-pay:hover { transform: translateY(-2px) scale(1.012); }

/* ---------- 6. 推荐档：流动光边 + 呼吸光晕 ---------- */
.price-card.pop { animation: popGlow 4.6s ease-in-out infinite; }
@keyframes popGlow {
  0%, 100% { box-shadow: 0 16px 42px rgba(99, 102, 241, .22); }
  50% { box-shadow: 0 22px 62px rgba(217, 70, 239, .40); }
}
.price-card.pop::after {
  background: linear-gradient(120deg, #6366f1, #a855f7, #ec4899, #f59e0b, #06b6d4, #6366f1);
  background-size: 320% 320%;
  animation: payBorder 9s linear infinite;
}
@keyframes payBorder { to { background-position: 320% 320%; } }

/* ---------- 6b. 全档炫彩特效（v1.53，后台「会员套餐」可开关） ----------
   用户需求：首页第二张（推荐档）那个特效好看，要「所有套餐都用这个特效」，并且后台能自己关。
   做法：把原来只挂在 .pop 上的两件事拆成 .fx 修饰类 ——
     ① 流动彩边（六色线性渐变，background-position 跑 9s 循环）
     ② 呼吸光晕（原来用 box-shadow 动画，那会每帧重绘整张卡的阴影；改成 opacity + transform 动画，
        走合成层，三张卡一起跑也不掉帧）
   ⚠️ 为什么用真实子元素（.fx-ring / .fx-glow）而不是 ::before / ::after：
     套餐卡会被 motion.js 挂上 .mo-spot，而 motion.css 在触屏 / 窄屏下写了
     `html.mo-on .mo-spot::before, ::after { display: none }` —— 用伪元素会在手机上
     被那条规则连同 display 一起干掉（v1.53 第一版就是这么翻的：真 Chrome 一量，
     手机上 ::before 的 display 是 none，光效整个没了）。子元素的 display 不受牵连。
   只有「在视口内」才播（.fx-live，由 site.js 的 IntersectionObserver 加）：
   首页价格区在折叠线以下，三张卡常年空转纯属浪费。 */
.price-card.fx { border-color: transparent; }
/* v1.80：彩边换成会员炫彩色（金→玫→品→紫），比原来的冷调六色更「亮」；
   圆角跟着卡片走（原来写死 21px，会员中心卡片是 16px，四个角会露出来一点点） */
.price-card.fx > .fx-ring {
  position: absolute; display: block; pointer-events: none;
  inset: -2px; border-radius: inherit; z-index: -1;
  background: linear-gradient(115deg,
    var(--vip-c1), var(--vip-c2) 24%, var(--vip-c3) 52%, var(--vip-c4) 76%, var(--vip-c1));
  background-size: 320% 320%;
}
.price-card.fx > .fx-glow {
  position: absolute; display: block; pointer-events: none;
  inset: -8px; border-radius: 28px; z-index: -2;
  background: radial-gradient(58% 58% at 50% 42%, rgba(255, 77, 109, .34), rgba(192, 38, 211, .18) 56%, rgba(109, 40, 217, 0) 76%);
  opacity: .45; transform: scale(.99);
}
.price-card.fx.fx-live > .fx-ring { animation: payBorder 9s linear infinite; }
.price-card.fx.fx-live > .fx-glow { animation: fxBreath 4.6s ease-in-out infinite; }
@keyframes fxBreath {
  0%, 100% { opacity: .45; transform: scale(.99); }
  50% { opacity: .95; transform: scale(1.025); }
}
/* 特效卡不再叠加推荐档那套：推荐档自己的 ::after 彩边 + box-shadow 呼吸整条关掉，
   否则同一圈会有两条不同配色的边、两套光晕一起闪（看着发脏，还多一次整卡重绘）。
   推荐档的「好看」由 .fx-ring 统一提供，三张卡从此长得一样。 */
.price-card.fx.pop { animation: none; box-shadow: 0 18px 44px rgba(99, 102, 241, .20); }
.price-card.fx.pop::after { display: none; }

/* ---------- 6c. v1.80 会员炫彩文字（套餐名 / 当前套餐 / 订单里的套餐） ----------
   来源：客户「开通会员的显示效果要炫彩，和左侧会员标识一个效果」。
   做法：和左侧标识共用 --vip-* 一套色，只在**文字**上做渐变流动，
        不加背景块、不改卡片结构 —— 套餐名多长都不会挤坏价格行。
   三个坑：
     ① background-clip:text 必须双写 -webkit-text-fill-color（Safari 只认后者）；
     ② 不支持裁剪时要退回实色，否则整行字会「消失」（不是变透明，是干脆不画）；
     ③ 每张卡只有 3 个动画（文字流动 / 彩边 / 光晕），全部只动
        background-position、opacity、transform，不进 box-shadow 逐帧重绘。 */
@keyframes vipFlow { to { background-position: 300% 0; } }

.price-card .price-name,
.order-plan,
.vip-name,
.plan-compare .cmp-name {
  background-image: linear-gradient(100deg,
    var(--vip-t1), var(--vip-t2) 26%, var(--vip-t3) 54%, var(--vip-t4) 78%, var(--vip-t1));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: var(--vip-t2);                 /* 兜底色：真不支持裁剪时看到的是它 */
  -webkit-text-fill-color: transparent;
  animation: vipFlow 9s linear infinite;
}
.price-card .price-name { font-weight: 800; filter: drop-shadow(0 1px 8px rgba(255, 77, 109, .16)); }
.order-plan { font-weight: 800; animation-duration: 12s; }
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .price-card .price-name,
  .order-plan,
  .vip-name,
  .plan-compare .cmp-name { -webkit-text-fill-color: currentColor; animation: none; }
}
[data-theme="dark"] .price-card .price-name { filter: drop-shadow(0 1px 10px rgba(232, 121, 249, .26)); }
[data-theme="dark"] .price-card .price-amount .val { filter: drop-shadow(0 4px 16px rgba(232, 121, 249, .34)); }

/* 左侧会员标识：底色不动（琥珀底深字，对比度本来就够），只补一道扫光 ——
   它「动」起来之后，和套餐卡上的流动才是同一套节奏 */
.vip-tag { position: relative; overflow: hidden; cursor: pointer; }
/* v1.80.2：它现在是可点的会员入口，键盘也要能用 */
.vip-tag:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.vip-tag.on::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .72) 50%, transparent 68%);
  transform: translateX(-130%);
  animation: vpShine 4.6s ease-in-out infinite;
}
[data-theme="dark"] .vip-tag.on::after {
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .26) 50%, transparent 68%);
}

@media (prefers-reduced-motion: reduce) {
  .price-card .price-name,
  .order-plan,
  .vip-name,
  .plan-compare .cmp-name,
  .cur-tag { animation: none; }
  .vip-tag.on::after { animation: none; display: none; }
}

/* ---------- 7. 权益对比表 ---------- */
.plan-compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; }
.plan-compare {
  width: 100%; min-width: 520px; border-collapse: separate; border-spacing: 0;
  font-size: 13.5px; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.plan-compare thead th {
  padding: 13px 14px; font-size: 13.5px; font-weight: 800; color: var(--ink);
  background: var(--surface-2); text-align: center; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.plan-compare thead th.row-h { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.plan-compare tbody th {
  padding: 11px 14px; text-align: left; font-weight: 600; color: var(--ink-2);
  background: var(--bg-soft); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.plan-compare tbody td { padding: 11px 14px; text-align: center; border-bottom: 1px solid var(--line); }
.plan-compare tbody tr:last-child th, .plan-compare tbody tr:last-child td { border-bottom: 0; }
.plan-compare tbody th:first-child { border-bottom-left-radius: 15px; }
.plan-compare tbody tr:last-child th:first-child { border-bottom-left-radius: 15px; }
.plan-compare .col-hi { background: var(--tint-brand-soft); }
.plan-compare tbody tr:hover td, .plan-compare tbody tr:hover th { background: var(--chip-on); }
.plan-compare tbody tr:hover .col-hi { background: linear-gradient(180deg, var(--tint-brand-soft), var(--chip-on)); }
.plan-compare .cmp-yes { color: var(--tint-green-fg); font-weight: 700; }
.plan-compare .cmp-no { color: var(--muted); }
.plan-compare .cmp-strong { color: var(--tint-rose-fg); font-weight: 800; }
.plan-compare s { color: var(--muted); font-weight: 400; font-size: 12px; }
.plan-compare .cmp-hot {
  display: block; font-size: 10.5px; font-weight: 800; color: #fff; letter-spacing: .6px;
  background: linear-gradient(120deg, #8b5cf6, #d946ef);
  border-radius: 999px; padding: 1px 0; margin: -2px auto 4px; width: 44px;
}
.plan-compare .cmp-cur { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--tint-green-fg); margin-left: 4px; }
.plan-compare-tip { font-size: 12px; color: var(--muted); margin: 10px 2px 0; line-height: 1.6; }
.plan-card + .pack-block { grid-column: 1 / -1; }

/* ---------- 8. 会员中心：卡片更紧凑一些（三列在窄屏会自动折） ---------- */
#vipPkgs .price-card { border-radius: 16px; }
#vipPkgs .price-amount .val { font-size: 36px; }

@media (max-width: 980px) {
  .price-card.plan-card { padding: 22px 18px 18px; }
  #vipPkgs .price-amount .val { font-size: 32px; }
  /* v1.53：手机上关掉「彩边流动」（background-position 每帧重绘一张卡的面积 ×3 张），
     只留静态彩边 + 呼吸光晕（opacity / transform 是合成动画，基本不花钱）。 */
  .price-card.fx.fx-live > .fx-ring { animation: none; }
  /* v1.80：手机上摘掉套餐名的 drop-shadow —— 文字渐变本身要逐帧重绘，
     再叠一层 filter 在中低端机上会明显掉帧（彩也是彩，但别用耗电换） */
  .price-card .price-name { filter: none; }
}

/* ---------- 9. 降低动效偏好：全部静态，信息一点不少 ---------- */
@media (prefers-reduced-motion: reduce) {
  .price-card .price-amount .val,
  .btn.btn-pay,
  .price-card.pop,
  .price-card.pop::after,
  .price-card.fx.fx-live > .fx-glow,
  .price-card.fx.fx-live > .fx-ring { animation: none !important; }
  .btn.btn-pay { box-shadow: 0 8px 22px rgba(99, 102, 241, .34); }
}

/* 卡片等高：三档并排时底部按钮齐平，价格区看起来才整齐（原 align-items:start） */
.price-grid { align-items: stretch; }

/* 弹性占位：把「立即开通」压到卡片底部，三档按钮齐平 */
.plan-grow { flex: 1 1 auto; min-height: 0; }

/* 首页价格区：对比表与卡片间距（会员中心在 card 内，自带留白） */
#priceCompare { margin-top: 26px; }
#vipCompare { margin-bottom: 2px; }

/* ==================================================================
   v1.45 情绪价值模板库（100 条 · 三段式引导）
   设计取舍：
   - 全部走语义变量，深色模式零硬编码（铁律 31）；
   - 「当前套用」单独一行置顶，是因为模板会真的改变输出，用户必须看得见；
   - 推荐卡只给 3 条：100 条平铺等于没推荐，选择成本比不选还高。
   ================================================================== */

/* ---------- 1. 字数要求 ---------- */
.emo-words-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.emo-words-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.emo-words-row .opt-row { flex: 1 1 auto; margin: 0; }
.emo-words-input {
  width: 110px; flex: 0 0 auto; padding: 7px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--field); color: var(--ink);
  font-size: 13px; text-align: center;
}
.emo-words-input:focus { outline: none; border-color: var(--brand); background: var(--card); }
.emo-words-input::placeholder { color: var(--muted); }

/* ---------- 2. 模板库卡片 ---------- */
.tpl-intro {
  font-size: 12.5px; line-height: 1.75; color: var(--muted);
  background: var(--surface-2); border-radius: 10px;
  padding: 10px 12px; margin: 0 0 12px;
}
.tpl-intro b { color: var(--ink-2); }

.tpl-current {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 10px;
  background: var(--tint-brand-soft); border: 1px solid transparent;
  font-size: 13px; margin-bottom: 12px;
}
.tpl-cur-label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tpl-cur-name { font-weight: 700; color: var(--ink); }
.tpl-cur-name.off { color: var(--muted); font-weight: 600; }
.tpl-cur-tip { font-size: 11.5px; color: var(--muted); }

/* v1.48：换对象后的一句解释（有专属模板 / 没有专属模板）。
   没有这句，客户换对象看到同样的卡片，会以为功能没刷新。 */
.tpl-hint {
  font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
  background: var(--surface-2); border-left: 3px solid var(--brand);
  border-radius: 8px; padding: 8px 11px; margin: 0 0 12px;
}
.tpl-hint.hidden { display: none; }

/* 换对象重新拉数据的那一小段，给个明确的状态，别让客户以为没反应 */
.tpl-reco.is-loading { opacity: .5; transition: opacity .12s ease; }
.tpl-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 99px;
  background: var(--chip); color: var(--muted); font-style: normal;
}
.tpl-tag.on { background: var(--tint-brand); color: var(--tint-brand-fg); }

/* 推荐三条 */
.tpl-reco { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tpl-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  padding: 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card);
  transition: border-color .16s, box-shadow .16s, transform .16s;
  min-width: 0;
}
.tpl-card:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.tpl-card.on {
  border-color: var(--brand); background: var(--tint-brand-soft);
  box-shadow: 0 0 0 2px var(--tint-brand) inset;
}
.tpl-card-top { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.tpl-card-top b { font-size: 13px; color: var(--ink); line-height: 1.45; }
.tpl-badge {
  flex: 0 0 auto; font-style: normal; font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 99px;
  background: var(--tint-brand); color: var(--tint-brand-fg);
}
.tpl-card-desc {
  font-size: 12px; line-height: 1.6; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tpl-card-meta { font-size: 11px; color: var(--muted); opacity: .85; }

.tpl-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- 3. 全部模板面板 ---------- */
.tpl-panel { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.tpl-filter { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.tpl-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tpl-tab {
  padding: 5px 11px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-soft);
  font-size: 12px; color: var(--ink-2); font-weight: 600; transition: .16s;
}
.tpl-tab:hover { border-color: var(--line-2); background: var(--card); }
.tpl-tab.on { background: var(--tint-brand); color: var(--tint-brand-fg); border-color: transparent; }
#emoTplSearch { flex: 1 1 200px; min-width: 160px; padding: 8px 12px; font-size: 13px; }

.tpl-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  max-height: 420px; overflow-y: auto; padding-right: 4px;
}
.tpl-row {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card);
  transition: border-color .16s, background .16s; min-width: 0;
}
.tpl-row:hover { border-color: var(--line-2); background: var(--bg-soft); }
.tpl-row.on { border-color: var(--brand); background: var(--tint-brand-soft); }
.tpl-row-name { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.tpl-row-desc {
  font-size: 11.5px; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tpl-row-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.tpl-row-tags i {
  font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 99px;
  background: var(--chip); color: var(--muted);
}

/* ---------- 4. 三段要求预览 ---------- */
.tpl-preview {
  margin-top: 12px; border-radius: 12px; padding: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.tpl-prev-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 4px; }
.tpl-prev-head b { font-size: 13.5px; color: var(--ink); }
.tpl-prev-act { font-size: 11px; color: var(--muted); }
.tpl-prev-topic { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.tpl-prev-lock {
  font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
  background: var(--card); border-radius: 8px; padding: 10px 12px;
}
.tpl-sec { display: flex; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); }
.tpl-sec:first-of-type { border-top: 0; }
.tpl-sec-k {
  flex: 0 0 40px; font-size: 11.5px; font-weight: 700; color: var(--tint-brand-fg);
  padding-top: 1px;
}
.tpl-sec p { margin: 0; font-size: 12.5px; line-height: 1.78; color: var(--ink-2); }
.tpl-prev-words {
  margin-top: 8px; padding-top: 9px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); line-height: 1.6;
}
.tpl-prev-words b { color: var(--tint-brand-fg); }

/* ---------- 5. 结果头：这次套了哪条 ---------- */
.emo-result-tpl {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -4px 0 12px; padding: 8px 12px; border-radius: 10px;
  background: var(--surface-2); font-size: 12px; color: var(--muted);
}
.emo-result-tpl b { color: var(--ink-2); }

/* ---------- 6. 响应式 ---------- */
@media (max-width: 760px) {
  .tpl-reco { grid-template-columns: 1fr; }
  .tpl-list { grid-template-columns: 1fr; max-height: 360px; }
  .emo-words-row { flex-direction: column; align-items: stretch; }
  .emo-words-input { width: 100%; }
  .tpl-sec { flex-direction: column; gap: 2px; }
  .tpl-sec-k { flex: none; }
}

/* ---------- v1.61.9 动效旁路（诊断「整屏黑一帧」用，见 site.js 顶部 KX_FX） ----------
   ?fx=noparticle 只摘粒子画布；?fx=off 连所有 CSS 动画/过渡一起停。
   目的是把「合成层每帧重绘」这一集体条件整块去掉 —— 浏览器/显卡层面的现象
   只有去掉那层活才能定性，光看页面代码是查不出来的。 */
html.kx-fx-noparticle .hero-particles { display: none !important; }
html.kx-fx-off .hero-particles { display: none !important; }
html.kx-fx-off *,
html.kx-fx-off *::before,
html.kx-fx-off *::after {
  animation: none !important;
  transition: none !important;
}
/* 停了动效后，入场隐藏类必须立刻显形，否则整屏空白 */
html.kx-fx-off .rv,
html.kx-fx-off .anim-ready .tpl,
html.kx-fx-off .tpl {
  opacity: 1 !important;
  transform: none !important;
  translate: none !important;
}

/* ================= v1.70：生成结果下方的回复框 =================
   场景：AI 在正文里建议「换个方向」、或直接说这类内容不好写时，客户没有地方回话
   —— 上面的「选题与要求」早滚出屏幕了。这里在结果下面补一个「接着说」的入口。
   设计要点：
     · 只在自己那一行里伸出 1 行高，输入后随内容长高，最多 132px（不再长，免得顶掉正文）；
     · 手机端字号 16px —— 低于 16px 时 iOS 聚焦输入框会自动放大整页，客户以为页面坏了；
     · 按钮跟输入框底部对齐（flex-end），多行输入时不会飞到中间去。 */
.reply-box {
  margin-top: 14px; padding: 12px 14px 10px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.reply-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px; flex-wrap: wrap;
}
.reply-hint { font-size: 12.5px; color: var(--muted); }
.reply-round {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 700; letter-spacing: .2px;
  padding: 2px 8px; border-radius: 6px;
  background: var(--tint-brand); color: var(--tint-brand-fg);
}
.reply-row { display: flex; gap: 8px; align-items: flex-end; }
/* 必须用 textarea.reply-input 这一级选择器：基础样式里 `textarea.input` 带着
   width:100% / min-height:84px / resize:vertical，单写 .reply-input（0,1,0）压不过它，
   结果是「输入框占满整行、按钮被挤出去」，而且一开始就有 84px 高。 */
textarea.reply-input {
  flex: 1 1 auto; width: auto; min-width: 0;
  height: 42px; min-height: 42px; max-height: 132px;
  padding: 10px 12px; line-height: 1.55; resize: none; overflow-y: auto;
  font-size: 15px;
}
.reply-send { flex: 0 0 auto; min-width: 76px; height: 42px; }
.reply-tip { margin-top: 7px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
/* v1.94：每篇第一次重写免费 —— 用彩色滚动渐变字写给客户看。
   灰字放在回复框下面等于没写（客户根本没往下看），但也不能弹窗打断改稿动作，
   所以做成一行会流动的彩色字：显眼、但仍在原位。

   两个细节：
     · 渐变文字必须双写 color + -webkit-text-fill-color：只写后者，
       不支持 background-clip:text 的浏览器会渲染成透明（看起来像文字丢了）；
     · 容器 inline-block（收缩到文字宽）：块级会把渐变拉到整行宽，
       两个色标之间被摊平，流动起来就不明显了。 */
.reply-tip .tip-free {
  display: inline-block; margin-right: 8px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .2px;
  color: #e0266b;
  background-image: linear-gradient(90deg, #e0266b, #f97316, #14b8a6, #3b82f6, #a855f7, #e0266b);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: kx-tip-flow 3.6s linear infinite;
}
.reply-tip .tip-sub { font-size: 11.5px; color: var(--muted); }
@keyframes kx-tip-flow {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .reply-tip .tip-free { animation: none; }
}
/* 「本次免费」徽标：和「已规避」同尺寸，玫红染底（不是警告，是账目） */
.result-meta .rm-badge.free { background: var(--tint-pink); color: var(--tint-pink-fg); font-weight: 800; }
/* 生成中：整块压暗并禁点，避免客户重复提交（额度是按次扣的） */
.reply-box.is-busy { opacity: .62; pointer-events: none; }

@media (max-width: 680px) {
  textarea.reply-input { font-size: 16px; }   /* 防 iOS 聚焦自动放大 */
  .reply-send { min-width: 66px; }
  .reply-hint { font-size: 12px; }
}

/* ================= v1.92 发布前自检 / v1.93 改动明细（平台违规词） =================
   放在结果正文下面、不是弹窗：客户复制完正文就看得到，不用多点一步。
   v1.93 起这里同时是「改动账单」：改了的显示「原词 → 新词」（绿色），
   改不动的标「需手动」（橙色）。正文默认是改好的版本，右上角「看原文」一键切回去。
   颜色全走变量，深色模式不需要额外覆盖。 */
.pv-card {
  margin-top: 14px; padding: 13px 15px 11px;
  border: 1px solid var(--line); border-left: 3px solid var(--tint-amber-fg);
  border-radius: 0 14px 14px 0;
  background: var(--tint-amber);
}
.pv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-head b { font-size: 14px; color: var(--tint-amber-fg); }
.pv-count {
  font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(234, 88, 12, .13); color: var(--tint-amber-fg);
  margin-right: auto;   /* 把右边两个按钮顶到行尾（count 可能是空的） */
}
.pv-toggle {
  border: 0; background: transparent; cursor: pointer;
  font-size: 12px; color: var(--tint-amber-fg); opacity: .82; padding: 2px 4px;
}
.pv-toggle:hover { opacity: 1; text-decoration: underline; }
/* 「看原文 / 看改好的」切换：两边都能选，所以做成描边小按钮，比纯文字更像「可以点」 */
.pv-swap {
  font-weight: 700; opacity: 1; padding: 3px 9px; border-radius: 999px;
  border: 1px solid rgba(234, 88, 12, .38);
}
.pv-card.is-orig .pv-swap { background: rgba(234, 88, 12, .14); }
.pv-lead { margin: 8px 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.pv-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pv-list li {
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
  font-size: 13px; line-height: 1.65; color: var(--ink-2);
}
.pv-cat {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px;
  background: rgba(234, 88, 12, .14); color: var(--tint-amber-fg);
}
/* 高风险（金融 / 医疗 / 赌博 / 低俗 / 违规）用玫红：这一档是「可能直接封号」，不是限流 */
.pv-cat.high { background: var(--tint-rose); color: var(--tint-rose-fg); }
.pv-word { font-weight: 700; color: var(--ink); }
.pv-arrow { color: var(--muted); }
.pv-advice { color: var(--ink-2); }
/* 已经替客户改掉的：新词用绿色，一眼能看出「这处不用管了」 */
.pv-advice.pv-new { color: var(--tint-emerald-fg); font-weight: 700; }
/* 改不动的（没有稳妥替词）：必须显眼，否则客户以为全处理完了 */
.pv-manual {
  font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 4px;
  background: var(--tint-rose); color: var(--tint-rose-fg);
}
.pv-foot { margin: 9px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
/* 收起状态只留标题行：客户不想看的时候别占屏 */
.pv-card.is-fold .pv-lead,
.pv-card.is-fold .pv-list,
.pv-card.is-fold .pv-foot { display: none; }
@media (max-width: 680px) {
  .pv-card { padding: 12px 13px 10px; }
  .pv-list li { font-size: 12.5px; }
}

/* ================= 文章改写（v1.71） =================
   设计取向：整条链路只有「粘原文 → 选主题 → 开始创作 → 复制」四步，
   所以不放侧栏、不做多列卡片墙，所有内容走单列，手机上也不改结构。
   颜色一律用 :root 变量，深色模式不需要额外覆盖。 */
.rw-head { align-items: flex-start; }
.rw-quota {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--tint-brand);
  color: var(--tint-brand-fg);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.rw-quota.off { background: var(--field); color: var(--muted); }
.rw-quota.retry { cursor: pointer; text-decoration: underline dotted; }

/* 子类目：四个平级页签，横向可滚（窄屏也不会挤成两行） */
.rw-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  margin: 4px 0 18px;
  background: var(--field);
  border-radius: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rw-tabs::-webkit-scrollbar { display: none; }
.rw-tabs button {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.rw-tabs button:hover { color: var(--ink-2); }
.rw-tabs button.on {
  background: var(--card);
  color: var(--brand-ink);
  box-shadow: var(--shadow-sm);
}

/* 步骤卡 */
.rw-step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.rw-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.rw-step-head b {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.rw-step-head span { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.rw-step-head em { margin-left: auto; font-style: normal; font-size: 12.5px; color: var(--muted); }

textarea.rw-src {
  min-height: 170px;
  line-height: 1.75;
  resize: vertical;
}
.rw-src-row { display: flex; gap: 6px; margin-top: 6px; }
/* 认领灵感后带过来的选题：粘原文之前先告诉客户「这次写什么」 */
.rw-topic {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--tint-brand-soft);
  border: 1px solid var(--tint-brand);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}
.rw-topic b { color: var(--brand-ink); font-weight: 700; }
.rw-topic-x {
  flex: 0 0 auto;
  margin-left: auto;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.rw-topic-x:hover { background: var(--field); color: var(--ink); }
/* v1.76：素材平台 → 目标平台。放在选题条里，客户改平台时立刻跟着变 */
.rw-topic-src {
  flex: 0 0 auto;
  align-self: center;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--tint-brand);
  background: var(--card);
  color: var(--brand-ink);
  font-style: normal;
  font-size: 12px;
  line-height: 1.7;
  white-space: nowrap;
}
.rw-topic-src.hidden { display: none; }

.rw-opts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.rw-field { margin-bottom: 0; }
.rw-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: var(--field);
  border-radius: 12px;
}
.rw-seg button {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, color .16s;
}
.rw-seg button.on {
  background: var(--card);
  color: var(--brand-ink);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.rw-more { margin-top: 14px; }
.rw-more summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-ink);
  list-style: none;
}
.rw-more summary::-webkit-details-marker { display: none; }
.rw-more summary::before { content: '＋ '; }
.rw-more[open] summary::before { content: '－ '; }
.rw-more .input { margin-top: 10px; }

.rw-go {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 18px;
  flex-wrap: wrap;
}
.rw-go-tip { font-size: 13px; color: var(--muted); }
/* v1.76：「开始创作」下面的流光轮播提示（后台 rw_go_tips，一行一条）
   只动 background-position 和 transform，不碰滤镜大面积重绘；
   深色模式用 --brand-ink 提亮，渐变本身两端都有足够对比度。 */
.rw-go-mq {
  position: relative;
  margin: -10px 0 18px;
  min-height: 21px;
  overflow: hidden;
}
.rw-go-mq.hidden { display: none; }
.rw-go-mq span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 21px;
  letter-spacing: .2px;
  background-image: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--brand-ink);
  -webkit-text-fill-color: transparent;
  animation: rwMqFlow 7s linear infinite, rwMqIn .45s ease both;
}
@keyframes rwMqFlow {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}
@keyframes rwMqIn {
  from { opacity: 0; transform: translateY(60%); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
  /* 手机上提示语会折成两行，给足高度，别裁掉半个字 */
  .rw-go-mq { min-height: 40px; }
  .rw-go-mq span { line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) {
  .rw-go-mq span {
    animation: none;
    color: var(--brand-ink);
    -webkit-text-fill-color: var(--brand-ink);
  }
}
/* v1.75 生成失败的常驻提示：只说一次错误，不让客户对着没反应的按钮猜 */
.rw-err {
  margin: -8px 0 18px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--danger, #c0392b);
  background: var(--tint-rose, rgba(220, 60, 80, .08));
  border: 1px solid rgba(220, 60, 80, .22);
  word-break: break-word;
}
.rw-err.hidden { display: none; }
/* 认领后闪一下：告诉客户「下一步点这里」，1.8 秒后自动收 */
#rwGo.rw-go-flash {
  animation: rwGoFlash 1.8s ease;
  box-shadow: 0 0 0 0 var(--tint-rose);
}
@keyframes rwGoFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
  35% { box-shadow: 0 0 0 6px var(--tint-rose); }
}

/* 结果区：标题 + 正文 + 重复度，正文保持可整段选中的纯文本 */
.rw-result {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  animation: rwIn .28s ease;
}
@keyframes rwIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rw-result-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.rw-result-title { min-width: 0; }
.rw-result-title b {
  display: block;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
}
.rw-result-title span { font-size: 12.5px; color: var(--muted); }
.rw-result-acts { display: flex; gap: 8px; flex: 0 0 auto; }
.rw-sim {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.rw-sim.ok { background: var(--tint-emerald); color: var(--plag-ok-fg); }
.rw-sim.warn { background: var(--tint-amber); color: var(--plag-warn-fg); }
.rw-out {
  margin-top: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.9;
  font-size: 15px;
  color: var(--ink-2);
}

/* 灵感中心 */
.rw-ideas-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.rw-hint { font-size: 12.5px; color: var(--muted); }
.rw-idea-list { display: grid; gap: 10px; }
.rw-idea {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color .16s, transform .16s;
}
.rw-idea:hover { border-color: var(--line-2); transform: translateY(-1px); }
.rw-idea-idx {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--field);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.rw-idea:first-child .rw-idea-idx { background: var(--tint-rose); color: var(--tint-rose-fg); }
.rw-idea-body { flex: 1 1 auto; min-width: 0; }
.rw-idea-body b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink);
}
.rw-idea-meta {
  margin-top: 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.rw-idea-meta .hot { color: var(--tint-rose-fg); font-weight: 600; }
.rw-idea-acts { display: flex; gap: 6px; flex: 0 0 auto; align-items: center; }
/* 列表摘要：两行截断，让客户不点开也知道这条讲什么 */
.rw-idea-brief {
  margin: 6px 0 0; font-size: 13px; line-height: 1.65; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 认领热榜（v1.73） ---------- */
.rw-rank-wrap {
  margin-bottom: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 15px 11px;
}
.rw-rank-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.rw-rank-head b { font-size: 14.5px; color: var(--ink); }
.rw-rank-list { display: grid; gap: 4px; }
.rw-rank-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 9px; border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}
.rw-rank-item:hover { background: var(--bg-soft); border-color: var(--line); }
.rw-rank-no {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  background: var(--field); color: var(--muted);
}
.rw-rank-item.top1 .rw-rank-no { background: var(--tint-rose); color: var(--tint-rose-fg); }
.rw-rank-item.top2 .rw-rank-no,
.rw-rank-item.top3 .rw-rank-no { background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line-2); }
.rw-rank-item b {
  flex: 1 1 auto; min-width: 0;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rw-rank-item .rn {
  flex: 0 0 auto; font-size: 12px; color: var(--muted);
  display: flex; gap: 8px;
}
.rw-rank-item .rn .hot { color: var(--tint-rose-fg); font-weight: 600; }
.rw-rank-empty { font-size: 12.5px; color: var(--muted); padding: 6px 2px 2px; }
.rw-idea-meta .claim { color: var(--tint-emerald-fg); font-weight: 600; }

/* 灵感原文阅读弹层（v1.71.4） */
.modal.rw-read-modal { width: min(820px, 100%); }
.rw-read-meta {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin: 2px 0 12px; font-size: 12.5px; color: var(--muted);
}
.rw-read-meta .src { color: var(--tint-emerald-fg); font-weight: 600; }
.rw-read-body {
  white-space: pre-wrap; word-break: break-word; line-height: 1.9; font-size: 14.5px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; max-height: min(58vh, 560px); overflow: auto;
  color: var(--ink-2);
}
.rw-read-body.loading, .rw-read-body.empty { color: var(--muted); text-align: center; padding: 34px 18px; }
.rw-read-body.empty .btn { margin-top: 12px; }
.rw-read-foot {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  margin-top: 16px; flex-wrap: wrap;
}
.rw-read-note { font-size: 12px; color: var(--muted); }
.rw-read-btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .rw-read-body { padding: 13px 14px; font-size: 14px; max-height: 56vh; }
  .rw-read-foot { position: sticky; bottom: 0; background: var(--card); padding-top: 10px; }
  .rw-read-btns { flex: 1 1 100%; }
  .rw-read-btns .btn { flex: 1 1 auto; }
  .rw-idea-brief { -webkit-line-clamp: 3; }
}

/* 创意改写 */
.rw-link-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.rw-link-row { display: flex; gap: 10px; }
.rw-link-row .input { flex: 1 1 auto; min-width: 0; }
.rw-link-row .btn { flex: 0 0 auto; }
.rw-link-res {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.rw-link-res b { display: block; font-size: 15px; color: var(--ink); line-height: 1.5; }
.rw-link-res span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.rw-link-res p {
  margin: 10px 0 14px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 我的作品 */
.rw-works-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.rw-work-list { display: grid; gap: 12px; }
.rw-work {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.rw-work-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
}
.rw-work-head b {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rw-work-meta { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.rw-work-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.rw-work-body {
  display: none;
  padding: 14px 16px 16px;
  border-top: 1px dashed var(--line);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.85;
  font-size: 14.5px;
  color: var(--ink-2);
}
.rw-work.open .rw-work-body { display: block; }

@media (max-width: 760px) {
  /* 四个子类目在手机上必须一眼全看见：原来是一行 nowrap + 横向滚动，
     375 宽度下第 4 个「我的作品」落在屏外（实测右边界 432 > 375），
     客户会以为只有三个。改成 2×2 两行铺满，不靠滑动发现。 */
  .rw-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .rw-tabs button {
    flex: 1 1 calc(50% - 3px);
    padding: 9px 8px;
    text-align: center;
    white-space: normal;
  }
  .rw-opts { grid-template-columns: 1fr; }
  .rw-step { padding: 15px; }
  .rw-go { align-items: stretch; flex-direction: column; gap: 8px; }
  .rw-go .btn { width: 100%; }
  .rw-result-acts { width: 100%; }
  .rw-result-acts .btn { flex: 1 1 auto; }
  .rw-link-row { flex-direction: column; }
  .rw-link-row .btn { width: 100%; }
  .rw-idea { padding: 12px 13px; gap: 9px; }
  .rw-idea-acts { flex-direction: column; align-items: stretch; }
  .rw-work-head { flex-wrap: wrap; }
  .rw-work-head b { flex: 1 1 100%; order: -1; white-space: normal; }
  textarea.rw-src { font-size: 16px; }   /* 防 iOS 聚焦自动放大 */
}
