/* ==========================================================================
   RV-VERCEL r51 —— Vercel 风格全局精修层（来源：VoltAgent/awesome-design-md
   收录的 design-md/vercel/DESIGN.md，MIT 许可）。
   --------------------------------------------------------------------------
   定位：只重定义 ds.css 的 `--ds-*` 令牌 + 少量排版/组件精修，业务零改动。
   机制：vercel.css 在 sunum.css 的 @import 链中排在 ds.css 之后，
   同为 `:root:root` (0,2,0) 特异性、后加载者胜 —— 令牌映射（--bg/--acc…）
   由 ds.css 既有 var() 引用自动生效，无需改任何页面。

   Vercel 设计语言要点（摘自 DESIGN.md）：
     · 墨色 #171717 / 纯白画布 / #fafafa 页面底 / #ebebeb 发丝线（浅色）
     · 深色模式：纯黑 #000 页面底 / #0a0a0a 面板 / #ededed 主文字
     · 主 CTA = 墨色（浅）/ 白（深），单一强调即转换目标
     · 字体 Geist（600 为显示上限）+ Geist Mono（技术标签专用）
     · 叠层小偏移阴影 + 发丝内描边，从不用单个重投影
     · 多色 mesh 渐变是唯一装饰，只出现在 hero 尺度
     · Do: 负字距标题、mono 眉题；Don't: 700+ 字重、大写标题、彩色卡片边

   本文件整块摘除 = 删除 sunum.css 中对应 @import 行即可，无遗留依赖。
   ========================================================================== */

/* ---------- 字体：自托管 Geist 变量字体（vercel/geist-font, SIL OFL） ----------
   Latin/数字走 Geist（Vercel 质感核心）；维吾尔文/中文不含于 Geist，
   自动回落 Alkatip / PingFang / 雅黑，不破坏双语排版。 */
@font-face {
  font-family: "Geist";
  src: url("/static/fonts/GeistVF.woff2") format("woff2"),
       url("/static/fonts/GeistVF.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- §V1 令牌重定义 · 深色（站点默认主题，对应 Vercel 深色面板） ---------- */
:root:root {
  /* 背景四级：页面 #000 → 画布 #0a0a0a → 卡片 #111 → 抬升 #17171a */
  --ds-bg-deep:   #000000;
  --ds-bg-canvas: #0a0a0a;
  --ds-bg-card:   #111112;
  --ds-bg-elev:   #17171a;
  --ds-bg-sunken: #0d0d0f;

  /* 文字三级：Geist 深色灰阶 #ededed / #a1a1a1 / #707078 */
  --ds-txt-1: #ededed;
  --ds-txt-2: #a1a1a1;
  --ds-txt-3: #707078;

  /* 发丝线 */
  --ds-line:   rgba(255, 255, 255, .10);
  --ds-line-2: rgba(255, 255, 255, .18);

  /* 主 CTA：深色下主按钮 = 白底黑字（Vercel 深色规范） */
  --ds-accent:      #ededed;
  --ds-accent-ink:  #000000;
  --ds-accent-soft: rgba(255, 255, 255, .14);

  /* 语义状态（仅状态用）：Geist 深色红/琥珀/蓝 */
  --ds-ok:   #45d07f; --ds-ok-soft:   rgba(69, 208, 127, .13);
  --ds-warn: #f5a623; --ds-warn-soft: rgba(245, 166, 35, .13);
  --ds-err:  #ff6259; --ds-err-soft:  rgba(255, 98, 89, .13);
  --ds-info: #3291ff; --ds-info-soft: rgba(50, 145, 255, .13);

  /* 交互面 */
  --ds-hover:   rgba(255, 255, 255, .06);
  --ds-hover-2: rgba(255, 255, 255, .10);
  --ds-sel:     rgba(255, 255, 255, .10);

  /* 叠层阴影（Vercel：多个小偏移，从不用单重投影） */
  --ds-shadow-sm: 0 1px 2px rgba(0, 0, 0, .55);
  --ds-shadow:    0 1px 2px rgba(0, 0, 0, .55), 0 12px 32px rgba(0, 0, 0, .45);
  --ds-shadow-lg: 0 2px 4px rgba(0, 0, 0, .55), 0 24px 56px rgba(0, 0, 0, .5);
}

/* ---------- §V2 令牌重定义 · 浅色（严格对齐 DESIGN.md 色板） ---------- */
:root:root[data-theme="light"] {
  --ds-bg-deep:   #fafafa;   /* canvas-soft：默认页面底 */
  --ds-bg-canvas: #fafafa;
  --ds-bg-card:   #ffffff;   /* canvas：纯白卡片面 */
  --ds-bg-elev:   #ffffff;
  --ds-bg-sunken: #f5f5f5;   /* canvas-soft-2：内凹面 */

  --ds-txt-1: #171717;       /* ink */
  --ds-txt-2: #4d4d4d;       /* body */
  --ds-txt-3: #888888;       /* mute */

  --ds-line:   #ebebeb;      /* hairline */
  --ds-line-2: rgba(23, 23, 23, .17);

  --ds-accent:      #171717; /* primary：墨色即转换目标 */
  --ds-accent-ink:  #ffffff;
  --ds-accent-soft: rgba(23, 23, 23, .10);

  /* DESIGN.md 语义色：success=蓝（Vercel 传统）、error #ee0000、warning-deep */
  --ds-ok:   #0070f3; --ds-ok-soft:   rgba(0, 112, 243, .10);
  --ds-warn: #ab570a; --ds-warn-soft: rgba(245, 166, 35, .14);
  --ds-err:  #ee0000; --ds-err-soft:  rgba(238, 0, 0, .08);
  --ds-info: #0070f3; --ds-info-soft: rgba(0, 112, 243, .10);

  --ds-hover:   rgba(0, 0, 0, .045);
  --ds-hover-2: rgba(0, 0, 0, .075);
  --ds-sel:     rgba(23, 23, 23, .08);

  --ds-shadow-sm: 0 1px 1px rgba(0, 0, 0, .02), 0 2px 4px rgba(0, 0, 0, .03);
  --ds-shadow:    0 1px 1px rgba(0, 0, 0, .02), 0 4px 8px -2px rgba(0, 0, 0, .05), 0 12px 24px -6px rgba(0, 0, 0, .05);
  --ds-shadow-lg: 0 1px 1px rgba(0, 0, 0, .02), 0 8px 16px -4px rgba(0, 0, 0, .06), 0 24px 48px -8px rgba(0, 0, 0, .08);
}

/* ---------- §V3 排版精修（Vercel 声音：负字距 + 600 字重上限 + mono 眉题） ---------- */
/* 标题：600 显示上限、激进负字距（ARABIC 脚本不做负字距，保护维文连写） */
body h1, body h2, body h3 { font-weight: 640; }
html:not([dir="rtl"]) h1, html:not([dir="rtl"]) h2, html:not([dir="rtl"]) h3 {
  letter-spacing: -.022em;
}
/* 品牌/大字：收敛到 Vercel 显示层级（原 850 超出 600 上限） */
.ha-title, .ha-stat .n { font-weight: 650; letter-spacing: -.03em; }

/* 眉题：mono 化（DESIGN.md「技术层用 mono」），字号/间距保持原布局 */
.ha-tag {
  font-family: ui-monospace, "Geist Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 500;
  letter-spacing: .12em;
}

/* 基础字体栈：Latin/数字优先 Geist（@font-face 自托管），其余回落原栈 */
body {
  font-family: "Geist", "Alkatip Kitab Tom", "Segoe UI", "PingFang SC",
               "Microsoft YaHei", system-ui, sans-serif;
}

/* ---------- §V4 组件精修 ---------- */
/* 控件圆角：Vercel --geist-radius 6px（应用内按钮/输入档） */
.ds-btn { border-radius: 6px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea, select { border-radius: 6px; }

/* 选区：浅色 = 墨底白字，深色 = 反转（DESIGN.md selection 令牌） */
html[data-theme="light"] ::selection { background: #171717; color: #f2f2f2; }
html:not([data-theme="light"]) ::selection { background: #ededed; color: #000000; }

/* 首页「关于秀能」氛围层：Vercel 标志性多色 mesh 渐变（hero 尺度、唯一装饰）。
   覆盖 index.html 内联的 ::before（单色 radial）——双写类名提特异性。 */
.home-about.home-about::before {
  width: auto; height: 480px; top: -220px; inset-inline: 0; margin: 0 auto;
  background:
    radial-gradient(460px 340px at 24% 12%, rgba(0, 124, 240, .17), transparent 66%),
    radial-gradient(480px 360px at 70% 6%,  rgba(121, 40, 202, .15), transparent 68%),
    radial-gradient(400px 300px at 50% 26%, rgba(255, 0, 128, .10),  transparent 70%),
    radial-gradient(360px 280px at 80% 30%, rgba(249, 203, 40, .09), transparent 72%);
  /* r51h/r52d：容器 overflow:hidden（同 hero clip），层宽=盒宽，
     蒙版盒内 28%/72% 渐隐至零，无裁切边。 */
  /* r52d：单张椭圆径向蒙版（理由同 hero）。 */
  -webkit-mask-image: radial-gradient(62% 92% at 50% 30%, #000 32%, transparent 75%);
          mask-image: radial-gradient(62% 92% at 50% 30%, #000 32%, transparent 75%);
}
/* 深色下渐变提亮一档，保住「氛围光」而不发灰 */
html:not([data-theme="light"]) .home-about.home-about::before { opacity: .95; }

/* ==========================================================================
   §V5 冲击版（r51b）—— Vercel 招牌视觉全量拉满
   --------------------------------------------------------------------------
   反馈「感知不强」后的加强层：动态 mesh 渐变 hero、点阵网格、
   渐变大标题、玻璃拟态输入卡、卡片悬浮、细滚动条。
   全部走双写类名提特异性，压过各页内联 <style>。
   ========================================================================== */

/* —— 5.1 首页 hero：动态多色 mesh 渐变（Vercel 的整个装饰系统） ——
   覆盖 index 内联的 .hero::before；蓝色 develop 对 + 紫→粉 preview 对
   + 青/琥珀点缀，重 blur 成大气层，缓慢漂移。 */
.hero.hero::before {
  content: ""; position: absolute; pointer-events: none;
  inset: -180px 0 auto; height: 560px;
  z-index: 0;
  background:
    radial-gradient(460px 330px at 24% 38%, rgba(0, 124, 240, .34), transparent 68%),
    radial-gradient(500px 350px at 44% 22%, rgba(0, 223, 216, .24), transparent 70%),
    radial-gradient(470px 330px at 62% 40%, rgba(121, 40, 202, .32), transparent 68%),
    radial-gradient(420px 310px at 78% 28%, rgba(255, 0, 128, .23), transparent 70%),
    radial-gradient(330px 240px at 34% 62%, rgba(249, 203, 40, .13), transparent 72%);
  /* r52d：不加 blur——blur 会把已蒙版隐去的光晕重新晕出元素边界，
     被 hero 的 overflow-x:clip（R42 防横滚）裁出竖边；径向渐变自身已柔和。 */
  /* r52d：hero 有 overflow-x:clip（R42 防横滚），层再宽也会被切出竖边。
     故层宽=hero 盒宽（inset 左右 0），蒙版在盒内 30%/70% 渐隐至全透明，
     光晕到达边缘前已衰为零——裁切线处无任何可见内容。 */
  /* r52d：单张椭圆径向蒙版——四向自然渐隐（双 mask 的 composite 在
     Chromium 按加合处理，水平渐隐会被垂直蒙版抵消，勿回退双写）。 */
  -webkit-mask-image: radial-gradient(58% 92% at 50% 34%, #000 30%, transparent 72%);
          mask-image: radial-gradient(58% 92% at 50% 34%, #000 30%, transparent 72%);
  animation: rv-mesh-drift 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes rv-mesh-drift {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
  50%  { transform: translate3d(3%, 3%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 4%, 0) scale(1.04); }
}
/* 深色下更透亮（黑底吃色），浅色收敛防脏 */
html:not([data-theme="light"]) .hero.hero::before { opacity: .62; }
html[data-theme="light"] .hero.hero::before { opacity: .40; }

/* —— 5.2 hero 点阵网格（Vercel 深色 hero 常配的工程纹理） —— */
.hero.hero::after {
  content: ""; position: absolute; pointer-events: none; z-index: 0;
  inset: 0 0 auto; height: 480px;
  background-image: radial-gradient(rgba(128, 128, 140, .5) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(560px 300px at 50% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(560px 300px at 50% 0%, #000 30%, transparent 78%);
}
html[data-theme="light"] .hero.hero::after { opacity: .30; }
html:not([data-theme="light"]) .hero.hero::after { opacity: .16; }

/* —— 5.3 大标题：Vercel 动态渐变字（develop 蓝→青 对 + preview 紫粉 对） —— */
.hero .hero .hello,
.hello.hello {
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 650; line-height: 1.16;
  background: linear-gradient(100deg,
    #007cf0 0%, #00dfd8 22%, #7928ca 45%, #ff0080 62%, #007cf0 88%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: rv-gtext 9s ease-in-out infinite alternate;
}
@keyframes rv-gtext {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
html[dir="rtl"] .hello.hello {
  background: none; -webkit-text-fill-color: currentColor; color: var(--txt);
  animation: none;   /* 维文标题不渐变不做负字距 */
}

/* —— 5.4 创作输入卡：玻璃拟态 + 悬浮渐变描边 —— */
.hero-card.hero-card {
  background: color-mix(in srgb, var(--ds-bg-card) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
          backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: var(--ds-shadow), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  transition: border-color .2s var(--es), box-shadow .2s var(--es), transform .2s var(--es);
}
.hero-card.hero-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--ds-shadow-lg);
}
.hero-card.hero-card:not(.on):hover { border-color: var(--ds-line-2); }

/* —— 5.5 首页功能卡悬浮生命感 —— */
.mode-card.mode-card:hover,
.ha-stat.ha-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--ds-shadow);
  border-color: var(--ds-line-2);
  transition: transform .18s var(--es), box-shadow .18s var(--es), border-color .18s var(--es);
}

/* —— 5.6 细滚动条（全站） —— */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ds-line-2); border-radius: 8px;
  border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--ds-txt-3); background-clip: padding-box; }

/* —— 5.7 动效降级 —— */
@media (prefers-reduced-motion: reduce) {
  .hero.hero::before, .hello.hello { animation: none !important; }
}

/* ==========================================================================
   §V6 全站扩展（r51c）—— 把 Vercel 视觉语言带到所有页面
   ========================================================================== */

/* —— 6.1 顶栏渐变发丝线（全站签名细节：蓝→紫→粉，两端渐隐） —— */
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent,
    rgba(0, 124, 240, .55) 16%, rgba(121, 40, 202, .55) 50%,
    rgba(255, 0, 128, .45) 84%, transparent);
}
html[data-theme="light"] .topbar::after { opacity: .55; }

/* —— 6.2 全站 h1 渐变字（签名语言贯穿所有内容页；RTL 豁免） ——
   覆盖 _page_bg.html 的 h1 text-shadow（渐变字不能带投影）。 */
html:not([dir="rtl"]) body h1 {
  font-weight: 650; letter-spacing: -.022em; text-shadow: none;
  background: linear-gradient(100deg,
    #007cf0 0%, #00dfd8 24%, #7928ca 52%, #ff0080 76%, #007cf0 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: rv-gtext 9s ease-in-out infinite alternate;
}
html:not([dir="rtl"]) body h1 small,
html:not([dir="rtl"]) body h1 .nog {   /* h1 内小字/徽标可标 .nog 退出渐变 */
  -webkit-text-fill-color: currentColor; background: none; -webkit-background-clip: initial; background-clip: initial;
}

/* —— 6.3 内容页环境光：无 hero 的页面 .wrap 顶部加弱化 mesh（:has 排除首页） —— */
body:not(:has(.hello)) .wrap { position: relative; }
body:not(:has(.hello)) .wrap::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -140px; left: 50%; transform: translateX(-50%);
  width: min(900px, 96%); height: 380px;
  background:
    radial-gradient(380px 260px at 30% 40%, rgba(0, 124, 240, .30), transparent 66%),
    radial-gradient(400px 280px at 70% 34%, rgba(121, 40, 202, .26), transparent 68%),
    radial-gradient(300px 200px at 52% 58%, rgba(255, 0, 128, .16), transparent 70%);
  filter: blur(52px) saturate(1.2);
  /* r52d：同款双侧渐隐蒙版，防 900px 限宽裁切硬边 */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 74%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 74%, transparent 100%);
}
html[data-theme="light"] body:not(:has(.hello)) .wrap::before { opacity: .5; }

/* —— 6.4 工具箱页：入口卡悬浮 + 箭头滑动 —— */
.tool-entry { transition: transform .16s var(--es), border-color .16s var(--es), background .16s var(--es); }
.tool-entry:hover { transform: translateY(-2px); border-color: var(--ds-line-2); background: var(--ds-hover); }
.tool-entry .arr { transition: transform .16s var(--es), color .16s var(--es); }
.tool-entry:hover .arr { transform: translateX(3px); color: var(--ds-txt-1); }

/* —— 6.5 会员页：featured 档金色光晕（polarity 强调，不改品牌金） —— */
.plan.featured {
  box-shadow: 0 0 0 1px color-mix(in srgb, #f5a623 28%, transparent),
              0 12px 40px -10px rgba(245, 166, 35, .30),
              var(--ds-shadow);
}

/* —— 6.6 主按钮顶部高光（增加「实体感」，Vercel 式克制立体） —— */
.ds-btn-pri, .ha-btn.solid, .top-right a.solid {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), var(--ds-shadow-sm);
}

/* —— 6.7 404/500 等错误页大数字渐变 —— */
html:not([dir="rtl"]) body h1:only-child,
html:not([dir="rtl"]) .err-code { animation-duration: 7s; }

/* ==========================================================================
   §V7 全站巡检精修（r51e）
   ========================================================================== */

/* —— 7.1 _page_bg 彩色模糊底收敛：降饱和压亮度，去掉「脏色团」 ——
   html 前缀提特异性，压过页面内联 _page_bg 样式（同为 body::before）。 */
html body::before {
  filter: blur(90px) saturate(1.12) brightness(.88);
  opacity: .5;
}
html[data-theme="light"] body::before {
  filter: blur(90px) saturate(1.05) brightness(1.1);
  opacity: .34;
}
/* 压暗层同步微调，深色更纯净 */
html:not([data-theme="light"]) body::after {
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .5) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, .58) 100%);
}

/* —— 7.2 404/500 错误页大数字接入渐变签名 —— */
html body .err-code {
  font-weight: 650; letter-spacing: -.03em;
  background: linear-gradient(100deg,
    #007cf0 0%, #00dfd8 24%, #7928ca 52%, #ff0080 76%, #007cf0 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: rv-gtext 7s ease-in-out infinite alternate;
}
html body .err-ico {
  box-shadow: 0 0 0 1px var(--ds-line), 0 0 24px -6px rgba(0, 124, 240, .35);
}

/* —— 7.3 玻璃卡片顶部内嵌高光统一（_page_bg 已有，补齐其它页 .panel） —— */
.panel.panel { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 1px 2px rgba(0, 0, 0, .3); }

/* —— 7.4 工具工作台主操作按钮悬浮微抬升（生成/上传类主 CTA） —— */
.btn-pri.btn-pri:not(:disabled):hover { transform: translateY(-1px); }
.btn-pri.btn-pri:not(:disabled) { transition: transform .15s var(--es), box-shadow .15s var(--es), filter .15s var(--es); }
.btn-pri.btn-pri:not(:disabled):active { transform: translateY(0); }

/* —— 7.5 聊天页空态氛围光（.dock 仅 chat.html 使用，安全定位） ——
   聊天页不含 _page_bg，body::before 空闲，直接铺一层弱化中心光。 */
html body:has(.dock)::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(460px 320px at 50% 16%, rgba(0, 124, 240, .16), transparent 70%),
    radial-gradient(400px 280px at 60% 32%, rgba(121, 40, 202, .12), transparent 72%),
    radial-gradient(300px 200px at 42% 30%, rgba(255, 0, 128, .07), transparent 74%);
  filter: blur(34px) saturate(1.1);
}
html[data-theme="light"] body:has(.dock)::before { opacity: .6; }

/* ==========================================================================
   §V8 优秀开源方案细节移植（r51f）
   参考：shadcn/ui（空态容器、kbd 键帽）、Linear（悬浮渐变描边）、
        OpenProps/Geist（tabular-nums 等宽数字）
   ========================================================================== */

/* —— 8.1 空态 shadcn 化：虚线发丝容器 + 图标圆片 ——
   站点已有统一 .empty/.sui-empty（sunum.css §14），这里只做视觉升级。 */
html .empty, html .sui-empty {
  border: 1px dashed var(--ds-line);
  border-radius: 14px;
  background:
    radial-gradient(340px 160px at 50% 0%, color-mix(in srgb, var(--ds-accent) 7%, transparent), transparent 75%);
}
html .empty .ec, html .sui-empty .sui-eico {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--ds-bg-elev);
  box-shadow: 0 0 0 1px var(--ds-line), inset 0 1px 0 rgba(255, 255, 255, .05);
  opacity: 1;
}

/* —— 8.2 Linear 签名：卡片悬浮渐变描边 ——
   border-box/padding-box 双背景法，悬浮时边框变蓝→紫→粉渐变。 */
html .mode-card.mode-card:hover,
html .tool-entry.tool-entry:hover,
html .plan.plan:hover {
  border-color: transparent;
  background:
    linear-gradient(var(--ds-bg-card), var(--ds-bg-card)) padding-box,
    linear-gradient(120deg,
      rgba(0, 124, 240, .55), rgba(121, 40, 202, .45) 50%,
      rgba(255, 0, 128, .35)) border-box;
}
/* 年卡 featured 保持金色描边身份 */
html .plan.featured.plan:hover {
  background:
    linear-gradient(var(--ds-bg-card), var(--ds-bg-card)) padding-box,
    linear-gradient(120deg, rgba(245, 166, 35, .65), rgba(255, 0, 128, .35) 60%, rgba(245, 166, 35, .3)) border-box;
}

/* —— 8.3 kbd 键帽（GitHub/shadcn 风）：发丝边 + 底部加厚 —— */
html kbd {
  padding: 2px 6px;
  border: 1px solid var(--ds-line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--ds-bg-elev);
  font-size: .85em;
  line-height: 1.4;
}

/* —— 8.4 等宽数字（Geist tnum）：价格/统计/计数对齐不跳动 —— */
html .ha-stat, html .plan, html .price,
html [class*="price"], html [class*="stat"], html [class*="count"] {
  font-variant-numeric: tabular-nums;
}

/* —— 8.5 平滑锚点滚动（尊重 reduced-motion） —— */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ==========================================================================
   §V9 收尾优化（r51g）—— Toast 玻璃化 + Linear 式深色微暖底
   ========================================================================== */

/* —— 9.1 深色底从纯黑 #000 调为 Linear 式 #08090a（微冷、不死黑） ——
   页面底/画布底各深半档，卡片 #111 层次不变， OLED 屏不再有割裂感。 */
:root:root {
  --ds-bg-deep:   #08090a;
  --ds-bg-canvas: #0c0d10;
}

/* —— 9.2 Toast 玻璃化（替换 3px 彩色左边条这一 impeccable 反模式） ——
   彩条退场，类型色改由「图标 + 同色柔光」传达；毛玻璃 + 发丝边。 */
html .sui-toast {
  background: color-mix(in srgb, var(--ds-bg-elev) 76%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
          backdrop-filter: blur(16px) saturate(1.35);
  border: 1px solid var(--ds-line);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, .42),
    0 0 28px -10px color-mix(in srgb, var(--sui-c, #6f6f77) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}
html .sui-toast::before { display: none; }

/* —— 9.3 mcp 页独立 mc-toast 同步玻璃化（样式与主 toast 对齐） —— */
html .mc-toast {
  background: color-mix(in srgb, #17171a 78%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
          backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--ds-line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .06);
  border-radius: 12px;
}

/* ==========================================================================
   §V10 未来感精雕（r52）—— 顶栏/图标/菜单/交互逐项打磨
   ⚠ 流程：先本地验证，用户确认后再部署上线。
   ========================================================================== */

/* —— 10.1 顶栏菜单 —— */
/* 当前页指示：accent 胶囊底 + 三色渐变底线（_topbar.html 已标 aria-current） */
html .top-right a { position: relative; }
html .top-right a:hover { background: var(--ds-hover); color: var(--ds-txt-1); }
html .top-right a[aria-current="page"] {
  background: color-mix(in srgb, var(--ds-accent) 14%, transparent);
  color: var(--ds-txt-1);
}
html .top-right a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #007cf0, #7928ca, #ff0080);
}
/* 品牌悬浮：logo 轻抬 + 蓝色光晕 */
html .brand .brand-logo { transition: transform .25s var(--es), filter .25s var(--es); }
html .brand:hover .brand-logo {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 12px rgba(0, 124, 240, .45));
}
/* 语言/主题按钮：图标微动效 */
html .lang-switch button .ti, html .theme-switch button .ti { transition: transform .28s var(--es); }
html .theme-switch button:hover .ti-sun { transform: rotate(40deg); }
html .theme-switch button:hover .ti-moon { transform: rotate(-24deg); }
html .lang-switch button:hover .ti-lang { transform: translateY(-1.5px); }

/* —— 10.2 账户三件套 —— */
/* 积分胶囊：渐变描边 + 等宽数字（须排在 .top-right a:hover 后压住其背景） */
html a.cred-pill {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--ds-bg-elev), var(--ds-bg-elev)) padding-box,
    linear-gradient(120deg, rgba(0, 124, 240, .5), rgba(121, 40, 202, .4), rgba(255, 0, 128, .3)) border-box;
  font-variant-numeric: tabular-nums;
  transition: background .18s var(--es), transform .18s var(--es);
}
html a.cred-pill:hover {
  background:
    linear-gradient(var(--ds-hover), var(--ds-hover)) padding-box,
    linear-gradient(120deg, rgba(0, 124, 240, .7), rgba(121, 40, 202, .6), rgba(255, 0, 128, .5)) border-box;
  transform: translateY(-1px);
}
/* 用户头像：极光 conic 渐变环（字母/图片通用） */
html .user-btn .user-av {
  background: conic-gradient(from 210deg, #007cf0, #00dfd8, #7928ca, #ff0080, #007cf0);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 0 12px -3px rgba(121, 40, 202, .65);
  transition: box-shadow .2s var(--es), transform .2s var(--es);
}
html .user-btn:hover .user-av { transform: scale(1.06); box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 18px -3px rgba(121, 40, 202, .85); }

/* —— 10.3 图标系统统一精修 —— */
/* 线宽 1.5→1.6（CSS 压过 SVG presentation attribute），深底更挺拔 */
html [data-ico] svg, html svg.ti { stroke-width: 1.6; }
/* 图标微动效：悬停容器时轻浮/放大 */
html [data-ico] svg { transition: transform .22s var(--es); }
html a:hover > [data-ico] svg,
html button:hover > [data-ico] svg,
html .acct-item:hover [data-ico] svg { transform: translateY(-1px); }
html .mode-card:hover [data-ico] svg,
html .tool-entry:hover [data-ico] svg { transform: scale(1.1); }

/* —— 10.4 账户中心侧栏菜单 —— */
html .acct-side .acct-item {
  border-radius: 10px;
  transition: background .15s var(--es), color .15s var(--es);
  position: relative;
}
html .acct-side .acct-item:hover { background: var(--ds-hover); }
html .acct-side .acct-item.on {
  background: color-mix(in srgb, var(--ds-accent) 13%, transparent);
}
html .acct-side .acct-item.on::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 20%; bottom: 20%;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, #007cf0, #7928ca, #ff0080);
}

/* —— 10.5 主 CTA 光晕（未来感点睛） —— */
html .ds-btn-pri:hover, html .ha-btn.solid:hover,
html .top-right a.solid:hover, html .acct-btn.pri:hover {
  box-shadow: 0 0 26px -8px color-mix(in srgb, var(--ds-accent) 60%, transparent);
}

/* ==========================================================================
   §V11 未来感交互（r52b，RV-FX 配套；JS 失效时本节无副作用）
   ========================================================================== */

/* —— 11.1 滚动渐入（fx.js 打标 .fx-reveal → 进入视口加 .fx-in） —— */
html .fx-reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s var(--es), transform .6s var(--es);
  transition-delay: var(--fx-d, 0ms);
}
html .fx-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html .fx-reveal { opacity: 1; transform: none; transition: none; } }

/* —— 11.2 3D 倾斜卡（fx.js 驱动 transform，这里只给离开时的回弹） —— */
html .fx-tilt { transition: transform .45s var(--es), box-shadow .45s var(--es); will-change: transform; }
html .fx-tilt:hover { transition-duration: .1s; }  /* 跟手要快，离开回弹要缓 */

/* —— 11.3 主按钮光泽扫过（模式：Magical-Button-Hover-Effect，纯 CSS） —— */
html .ds-btn-pri, html .ha-btn.solid, html .acct-btn.pri {
  position: relative; overflow: hidden;
}
html .ds-btn-pri::after, html .ha-btn.solid::after, html .acct-btn.pri::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 50%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
html .ds-btn-pri:hover::after, html .ha-btn.solid:hover::after, html .acct-btn.pri:hover::after {
  animation: fx-shine .7s var(--es);
}
@keyframes fx-shine { to { left: 130%; } }

/* ==========================================================================
   §V12 弹窗与表单精修（r52c）—— 模态磨砂、入场动效、原生控件主题化
   注意：.acct-mask 的 [hidden] 显示机制不动（2026-10-11 踩过 display 覆盖坑）。
   ========================================================================== */

/* —— 12.1 遮罩统一：加深 + 磨砂（html 前缀压过模板内联样式） —— */
html .acct-mask,
html .vg-lib-mask,
html [class*="modal-mask"] {
  background: rgba(4, 5, 8, .62);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
          backdrop-filter: blur(10px) saturate(1.15);
}

/* —— 12.2 弹窗容器：统一入场动效 + 发丝高光 ——
   canvas 的 rv-modal 已自带 rvPop，不重复；这里覆盖 acct-panel / vg-lib / pl-modal。 */
@keyframes fx-pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
html .acct-panel,
html .vg-lib,
html .pl-modal {
  animation: fx-pop .22s cubic-bezier(.2, .9, .3, 1.2);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .05);
}
@media (prefers-reduced-motion: reduce) {
  html .acct-panel, html .vg-lib, html .pl-modal { animation: none; }
}

/* —— 12.3 原生控件主题化（浏览器原生面最后一角） —— */
html input[type="checkbox"], html input[type="radio"],
html input[type="range"], html progress {
  accent-color: var(--ds-accent);
}
/* 深色下原生勾选框仍刺白 → 微调尺寸外的观感交给 accent-color 即可 */

/* —— 12.4 输入框 focus 环强调色化（原 --ring 为中性灰，聚焦感弱） —— */
html input:focus, html textarea:focus, html select:focus {
  border-color: color-mix(in srgb, var(--ds-accent) 55%, var(--ds-line-2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-accent) 22%, transparent);
}

/* —— 12.5 下拉选项原生面板跟随主题（Chromium 121+） —— */
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

/* ==========================================================================
   §V13 全站控件终打磨（r53）—— 开源方案第二轮移植（按钮/菜单/选择栏/交互）
   参考：Aceternity Spotlight（卡片跟随光）、Magic UI BorderBeam（边框流光）、
        shadcn/ui Select（原生下拉定制）、GitHub Primer（按压/焦点反馈）
   流程：先本地验证，用户确认后再部署上线。
   ========================================================================== */

/* —— 13.1 原生 select 定制化（shadcn/ui Select 移植）——
   全站 15+ 页面在用 <select>，原生外观是「最后一角未统一」的控件：
   去浏览器默认箭头 → 自绘发丝 chevron + 逻辑内边距（RTL 自动镜像）。
   ⚠ 各页面存在 .wk-sel 类样式与内联 style 的 background/padding，
   故箭头四属性必须 !important 才能全局统一（其余属性保持可覆盖）。 */
html select {
  -webkit-appearance: none !important;
          appearance: none !important;
  padding-inline-end: 2.1em !important;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23808088'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m6%209%206%206%206-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right .75em center !important;
  background-size: 12px 12px !important;
  cursor: pointer;
  transition: border-color .15s var(--es), background-color .15s var(--es);
}
html[dir="rtl"] select { background-position: left .75em center !important; }
html[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23555560'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m6%209%206%206%206-6'/%3E%3C/svg%3E") !important;
}
/* 悬停第三态（uikit 只给了边框变亮，这里补一层底色微浮） */
html select:hover:not(:focus):not(:disabled) { background-color: color-mix(in srgb, var(--ds-hover) 55%, transparent); }

/* —— 13.2 按压与键盘焦点反馈（GitHub Primer 模式）——
   全部可点元素：按下微缩（物理反馈）+ Tab 键焦点环（accent 化，鼠标点击不触发）。 */
html button:not(:disabled):active { transform: scale(.98); }
html :is(a, button, [tabindex]):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ds-accent) 65%, transparent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* —— 13.3 Spotlight 卡（Aceternity Spotlight 移植）——
   fx.js 在指针移动时写入 --sx/--sy（百分比），悬停时跟随光浮现。
   纯增强：JS 失效时 --sx/--sy 保持默认 50%，无任何破相。 */
html .mode-card, html .tool-entry, html .plan { position: relative; }
html .mode-card::after, html .tool-entry::after, html .plan::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(240px circle at var(--sx, 50%) var(--sy, 50%),
    rgba(0, 124, 240, .10), rgba(121, 40, 202, .05) 45%, transparent 68%);
  opacity: 0; transition: opacity .35s var(--es);
  pointer-events: none;
}
html .mode-card:hover::after, html .tool-entry:hover::after, html .plan:hover::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html .mode-card::after, html .tool-entry::after, html .plan::after { display: none; }
}

/* —— 13.4 边框流光（Magic UI BorderBeam 移植）——
   仅 featured 年卡：一道金色光束沿发丝边框匀速巡游，未来感点睛。
   ring 用 content-box/border-box xor 蒙版；角度用 @property 注册才能参与动画。 */
@property --beam-a { syntax: "<angle>"; inherits: false; initial-value: 0turn; }
@keyframes beam-spin { to { --beam-a: 1turn; } }
/* 注意：这里不能加 overflow:hidden —— featured 卡的「最高人气」标签悬出上缘，
   会被裁切；流光本身由 ring 蒙版约束在 1px 边框内，无需 overflow。 */
html .plan.featured::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--beam-a),
    transparent 0turn .86turn, rgba(245, 166, 35, .95) .95turn, rgba(255, 0, 128, .4) .985turn, transparent 1turn);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: beam-spin 4.8s linear infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { html .plan.featured::before { animation: none; opacity: 0; } }

/* —— 13.5 上传按钮主色化（file-selector 原生面收编）—— */
html input[type=file]::file-selector-button {
  border: 1px solid var(--ds-line-2);
  border-radius: 8px;
  background: var(--ds-bg-elev);
  color: var(--ds-txt-1);
  transition: background .15s var(--es), border-color .15s var(--es);
}
html input[type=file]::file-selector-button:hover {
  border-color: color-mix(in srgb, var(--ds-accent) 40%, var(--ds-line-2));
  background: var(--ds-hover);
}

/* —— 13.6 文本选区 accent 化（sunum.css 用 --acc 实色，这里换柔光玻璃感）—— */
html ::selection {
  background: color-mix(in srgb, var(--ds-accent) 26%, transparent);
  color: inherit;
}

/* —— 13.7 hero 下拉菜单层级修复（r53b，用户实测反馈）——
   根因：.hero-card 因 fx-tilt 的 will-change:transform 成为堆叠上下文（z auto），
   窄屏下 .hero-chips 又因 mask-image 成为堆叠上下文且 DOM 靠后 →
   后者整体盖过 hero-card，其内部 z-40 的 .hc-menu 也被压住。
   修复：hero-card 自身 z-index 提到兄弟上下文之上（它本就 position:relative）。 */
html .hero .hero-card { z-index: 2; }
