/* 天策AI 深色主题 v3（黑色分层，参考 ProdClub）2026-11-01
   只在 html.dark 下生效；浅色模式完全不受影响。
   个人中心/合伙人中心(.personal-workspace)保持浅色岛，避免白底浅字。
   撤销：删除 index.html 中对应 <link> 即可。 */

/* ---------- 1) 变量（覆盖 theme-v2 的浅色变量） ---------- */
html.dark body .vault-scope{
  --bg:#0a0a0b;--bg-warm:#0e0e10;--surface:#111113;--surface-2:#161618;
  --ink:#f1f1f3;--ink-2:#cfcfd5;--ink-3:#8b8b93;
  --border:rgba(255,255,255,.08);--border-strong:rgba(255,255,255,.16);
  --red:#2be07a;--red-strong:#22c768;--red-soft:rgba(43,224,122,.12);
  --gold:#e0b13c;--gold-strong:#f0c24e;--gold-soft:rgba(224,177,60,.12);
  --teal:#2be07a;--teal-strong:#22c768;--teal-soft:rgba(43,224,122,.12);
  --on-red:#03170c;--on-gold:#1c1300;--on-teal:#03170c;
  --success:#2be07a;--warning:#f5c451;--danger:#ff6b6b;
  --shadow-sm:0 8px 22px -14px rgba(0,0,0,.9);--shadow:0 16px 40px -22px rgba(0,0,0,.95);--shadow-lg:0 26px 60px -26px rgba(0,0,0,1);
  --ring:0 0 0 4px rgba(43,224,122,.2);
  --background:#0a0a0b;--foreground:#f1f1f3;--muted-foreground:#8b8b93;--card:#111113;
  background:radial-gradient(circle at 85% -8%,rgba(43,224,122,.08),transparent 34rem),#0a0a0b;
  --ui-accent:#2be07a;--ui-accent-hover:#22c768;--ui-accent-soft:rgba(43,224,122,.14);--ui-accent-warm:#e0b13c;--ui-accent-warm-hover:#f0c24e;--ui-accent-warm-soft:rgba(224,177,60,.14);
  --ui-bg-elevated:#111113;--ui-bg-muted:#161618;--ui-bg-overlay:color-mix(in srgb,#0a0a0b 80%,transparent);--ui-bg-overlay-strong:color-mix(in srgb,#0a0a0b 92%,transparent);--ui-bg-page:#0a0a0b;--ui-bg-soft:#141416;
  --ui-border:rgba(255,255,255,.08);--ui-border-strong:rgba(255,255,255,.16);--ui-danger:#ff6b6b;--ui-danger-soft:rgba(255,107,107,.14);--ui-focus-ring:0 0 0 4px rgba(43,224,122,.22);
  --ui-info:#64d2ff;--ui-info-soft:rgba(100,210,255,.14);--ui-price-original:#8b8b93;--ui-price-primary:#f1f1f3;--ui-price-promotion:#f87171;
  --ui-shadow-card:0 30px 70px -34px rgba(0,0,0,.9);--ui-shadow-soft:0 22px 46px -30px rgba(0,0,0,.8);
  --ui-success:#2be07a;--ui-success-soft:rgba(43,224,122,.14);--ui-text-muted:#8b8b93;--ui-text-on-accent:#03170c;--ui-text-primary:#f1f1f3;--ui-text-secondary:#cfcfd5;--ui-warning:#f5c451;--ui-warning-soft:rgba(245,196,81,.14);
  color:#f1f1f3;color-scheme:dark}
html.dark body{background:#0a0a0b}

/* ---------- 2) 头部 / 页脚 ---------- */
html.dark body .vault-scope header.sticky{background:rgba(10,10,11,.9)!important;border-bottom:1px solid rgba(255,255,255,.07);box-shadow:none}
html.dark body .vault-scope footer{background:#0a0a0b!important;border-top:1px solid rgba(255,255,255,.07)}
html.dark body .vault-scope header nav a{color:#a4a4ac}
html.dark body .vault-scope header nav a:hover{color:#2be07a}
html.dark body .vault-scope header button,html.dark body .vault-scope header .rounded-full[class*="h-10"]{color:#cfcfd5;background:#161618;border-color:rgba(255,255,255,.1)}
html.dark body .vault-scope header nav[class*="900px]:hidden"]{background:#161618;border:1px solid rgba(255,255,255,.07)}
html.dark body .vault-scope header nav[class*="900px]:hidden"] > a{color:#a4a4ac}
html.dark body .vault-scope header nav[class*="900px]:hidden"] > a:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
html.dark body .vault-scope header nav[class*="900px]:hidden"] > a[class*="amber"]{color:#3a2600!important}
html.dark body .vault-scope header img[src*="tiance-avatar"]{border-radius:8px}
html.dark body .vault-scope [class*="bg-black/"]{background-color:rgba(255,255,255,.04)}

/* ---------- 3) 通用卡片 / 面板 ---------- */
html.dark body .vault-scope .black-gold-panel{background:#111113;border:1px solid rgba(255,255,255,.08);box-shadow:var(--shadow)}
html.dark body .vault-scope .account-main,html.dark body .vault-scope .account-services{background:#111113!important;border:1px solid rgba(255,255,255,.08)!important}
html.dark body .vault-scope main a.group,html.dark body .vault-scope main section a.block.bg-card,html.dark body .vault-scope main a.black-gold-panel{background:#111113!important;border:1px solid rgba(255,255,255,.08)!important}
html.dark body .vault-scope main a.group.grid:hover{background:#161618!important}
html.dark body .vault-scope main a.group > span[data-tc-img]{background:#161618!important;border-color:rgba(255,255,255,.08)!important}
html.dark body .vault-scope main a.group.grid [class*="rounded-full"][class*="bg-white"]{background:#1c1c1f!important;color:#a4a4ac!important}
html.dark body .vault-scope main [class*="rounded-[22px]"][class*="bg-card"]{background:#111113!important;border:1px solid rgba(255,255,255,.08)!important}
html.dark body .vault-scope main [class*="rounded-[22px]"][class*="bg-card"] > div:first-child{background:#161618!important;color:#8b8b93!important}
html.dark body .vault-scope main [class*="bg-[linear-gradient"]:not(.border-b):not(.gold-button):not(.tc-banner){background-image:linear-gradient(135deg,#141416,#101012)!important;border-color:rgba(255,255,255,.1)!important}
html.dark body .vault-scope main [class*="bg-[radial-gradient"]:not(.border-b){background-image:radial-gradient(circle at 68% 22%,rgba(43,224,122,.10),transparent 42%)!important;border-color:rgba(255,255,255,.08)!important}
html.dark body .theme-prose{background:#111113!important;color:#cfcfd5}
html.dark body .theme-prose code{background:#1c1c1f}
html.dark body .vault-scope .progress-track>span{background:linear-gradient(90deg,#14b45f,#e0b13c)!important}
html.dark .tc-step{background:#111113;border-color:rgba(255,255,255,.08)}
html.dark .tc-tier{background:#111113;border-color:rgba(255,255,255,.08);box-shadow:none}
html.dark .tc-tier i{background:#26262a}
html.dark .tc-tier-table thead th{background:#161618}
html.dark .tc-tier-table tr.sec th{background:#131315;color:#2be07a}

html.dark body .vault-scope .gold-text{background:linear-gradient(92deg,#2be07a,#8dffbb 60%,#2be07a);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:#2be07a}
html.dark #tc-guest-hint{background:rgba(43,224,122,.1)!important;color:#2be07a!important}
html.dark #tc-guest-hint a{color:#2be07a!important}
html.dark #tc-invoice{background:rgba(224,177,60,.1)!important;border-color:rgba(224,177,60,.3)!important;color:#e0b13c!important}
html.dark #tc-refresh{background:#1c1c1f!important;border:1px solid rgba(255,255,255,.12)}

/* 输入框 / 表单（前台页面） */
html.dark body .vault-scope input:not([type=checkbox]):not([type=radio]),html.dark body .vault-scope textarea,html.dark body .vault-scope select{background-color:#0e0e10;color:#f1f1f3;border-color:rgba(255,255,255,.14)}
html.dark body .vault-scope input::placeholder,html.dark body .vault-scope textarea::placeholder{color:#6f6f77}

/* ---------- 4) 个人中心保持浅色岛（还原浅色变量） ---------- */
html.dark body .personal-workspace{
  --bg:#f3f6f5;--surface:#fff;--surface-2:#f6f9f8;--ink:#16221e;--ink-2:#3b4b45;--ink-3:#6b7a74;
  --border:rgba(22,34,30,.09);--border-strong:rgba(22,34,30,.16);--red:#0f7a55;--red-strong:#0b6a49;--red-soft:rgba(15,122,85,.10);
  --gold:#c98a14;--gold-strong:#a86f0a;--gold-soft:rgba(201,138,20,.12);--teal:#0f9d6b;--teal-strong:#0c8a5d;--teal-soft:rgba(15,157,107,.12);
  --background:#f3f6f5;--foreground:#16221e;--muted-foreground:#6b7a74;--card:#fff;--shadow:0 14px 34px -20px rgba(22,34,30,.28);
  --ui-accent:#0f7a55;--ui-accent-hover:#0b6a49;--ui-accent-soft:rgba(15,122,85,.10);--ui-accent-warm:#c98a14;--ui-accent-warm-hover:#a86f0a;--ui-accent-warm-soft:rgba(201,138,20,.12);
  --ui-bg-elevated:#fff;--ui-bg-muted:#eaf0ee;--ui-bg-overlay:color-mix(in srgb,#fff 80%,transparent);--ui-bg-overlay-strong:color-mix(in srgb,#fff 92%,transparent);--ui-bg-page:#f3f6f5;--ui-bg-soft:#f6f9f8;
  --ui-border:rgba(22,34,30,.09);--ui-border-strong:rgba(22,34,30,.16);--ui-danger:#c9342f;--ui-danger-soft:rgba(15,122,85,.10);--ui-focus-ring:0 0 0 4px rgba(15,122,85,.18);
  --ui-info:#0f9d6b;--ui-info-soft:rgba(15,157,107,.12);--ui-price-original:#8e8e93;--ui-price-primary:#16221e;--ui-price-promotion:#c9342f;
  --ui-shadow-card:0 24px 54px -26px rgba(22,34,30,.32);--ui-shadow-soft:0 14px 34px -20px rgba(22,34,30,.28);
  --ui-success:#0f9d6b;--ui-success-soft:rgba(15,157,107,.12);--ui-text-muted:#6b7a74;--ui-text-on-accent:#fff;--ui-text-primary:#16221e;--ui-text-secondary:#3b4b45;--ui-warning:#b06b00;--ui-warning-soft:rgba(201,138,20,.12);
  color:#16221e}

/* ---------- 5) 商品详情页重排 ---------- */
/* 外层两栏：左信息 / 右购买；左侧不再是一张巨大横幅 */
body.tc-pdp3 section.grid[class*="grid-cols-[minmax(0,1fr)_minmax(430px"]{grid-template-columns:minmax(0,1.5fr) minmax(400px,1fr);gap:20px;align-items:start}
body.tc-pdp3 section.grid[class*="grid-cols-[minmax(0,1fr)_minmax(430px"] > div:first-child{padding:26px 28px;display:flex;flex-direction:column}
body.tc-pdp3 section.grid[class*="grid-cols-[minmax(0,1fr)_minmax(430px"] > div:first-child > div[class*="min-h-[360px]"]{min-height:0!important;height:150px;border-radius:16px;order:2;margin-top:6px}
body.tc-pdp3 section.grid[class*="grid-cols-[minmax(0,1fr)_minmax(430px"] > div:first-child > div[class*="mt-4"][class*="grid"]{display:none}
body.tc-pdp3 section.grid[class*="grid-cols-[minmax(0,1fr)_minmax(430px"] > div:first-child > div[class*="inline-flex"]{order:1;align-self:flex-start}
body.tc-pdp3 #tc-pdp-info{order:3}
/* 右侧购买卡 */
body.tc-pdp3 section.grid[class*="grid-cols-[minmax(0,1fr)_minmax(430px"] > div:last-child{position:sticky;top:88px;padding:26px 26px}
body.tc-pdp3 section.grid[class*="grid-cols-[minmax(0,1fr)_minmax(430px"] > div:last-child h1{font-size:30px}
body.tc-pdp3 [class*="text-[44px]"]{font-size:40px!important}
body.tc-pdp3 section.grid > div:last-child > div.my-5 > div.flex.flex-wrap.gap-2\.5{display:grid;grid-template-columns:1fr;gap:8px}
body.tc-pdp3 section.grid > div:last-child > div.my-5 > div.flex.flex-wrap.gap-2\.5 > button{width:100%;min-width:0;flex-direction:row;flex-wrap:wrap;gap:4px 10px;align-items:center;justify-content:space-between;padding:10px 14px;font-size:13px;line-height:1.5;text-align:left}
body.tc-pdp3 .tc-hidden-chip{display:none!important}
body.tc-pdp3 section.grid > div:last-child p[class*="line-clamp"]{display:none}

/* 左侧新增信息块 */
#tc-pdp-info{margin-top:16px;display:flex;flex-direction:column;gap:14px}
#tc-pdp-info .pi-sec{display:flex;gap:22px}
#tc-pdp-info .pi-k{width:68px;flex:none;font-size:13px;color:var(--ink-3,#8b8b93);padding-top:2px}
#tc-pdp-info ul{list-style:none;margin:0;padding:0;flex:1}
#tc-pdp-info li{display:flex;gap:10px;font-size:14px;line-height:1.7;color:var(--ink-2,#cfcfd5);margin-bottom:8px}
#tc-pdp-info li i{flex:none;width:15px;height:15px;margin-top:5px;border-radius:50%;border:1.5px solid #2be07a}
#tc-pdp-info li.w{color:#f5c451}#tc-pdp-info li.w i{border-color:#f5c451}
#tc-pdp-info li b{color:var(--ink,#fff)}
#tc-pdp-info a{color:#2be07a}
#tc-pdp-info .pi-badges{display:flex;gap:10px;flex-wrap:wrap}
#tc-pdp-info .pi-badges span{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:var(--ink-2,#cfcfd5);background:var(--surface-2,#161618);border:1px solid var(--border,rgba(255,255,255,.08));border-radius:10px;padding:6px 12px;white-space:nowrap}
#tc-pdp-info .pi-badges b{color:var(--ink,#fff)}
#tc-pdp-info .pi-links{display:flex;gap:8px;flex-wrap:wrap}
#tc-pdp-info .pi-links a{font-size:12.5px;border:1px solid var(--border-strong,rgba(255,255,255,.16));border-radius:99px;padding:3px 12px;color:var(--ink-2,#cfcfd5)}
#tc-pdp-info .pi-steps{display:flex;align-items:center;gap:12px;background:var(--surface-2,#161618);border:1px solid var(--border,rgba(255,255,255,.08));border-radius:14px;padding:14px 18px;flex-wrap:wrap}
#tc-pdp-info .pi-steps .s{display:flex;align-items:center;gap:9px;font-size:14px;color:var(--ink,#e4e4e8);white-space:nowrap}
#tc-pdp-info .pi-steps .s i{width:26px;height:26px;border-radius:50%;border:1.5px solid #2be07a;color:#2be07a;font-style:normal;font-size:13px;text-align:center;line-height:23px;font-weight:700}
#tc-pdp-info .pi-steps .ln{flex:1;min-width:20px;height:1px;background:var(--border-strong,rgba(255,255,255,.14))}

@media(max-width:1000px){
  body.tc-pdp3 section.grid[class*="grid-cols-[minmax(0,1fr)_minmax(430px"]{grid-template-columns:1fr}
  body.tc-pdp3 section.grid[class*="grid-cols-[minmax(0,1fr)_minmax(430px"] > div:last-child{position:static;order:-1}
  #tc-pdp-info .pi-sec{flex-direction:column;gap:6px}#tc-pdp-info .pi-k{width:auto}
}

/* 自动生成：由 tiance-theme-v2.css 的浅色硬编码规则转换而来（深色版），请勿手改；用 gen_dark.py 重新生成 */
html.dark body .vault-scope{background:radial-gradient(circle at 80% -10%,rgba(15,122,85,.10),transparent 36rem),radial-gradient(circle at 10% 0%,rgba(201,138,20,.08),transparent 28rem),linear-gradient(180deg,#0a0a0b,#1c1c1f 60%,#0a0a0b)!important}
html.dark body .vault-scope .gold-text{color:#2be07a!important}
html.dark body .vault-scope .black-gold-panel{background:#111113!important}
html.dark body .vault-scope header.sticky{box-shadow:0 1px 0 rgba(0,0,0,0.7)!important}
html.dark body .vault-scope header nav a[class*="amber"]{color:#5a3a00!important}
html.dark body .vault-scope footer{background:#111113!important}
html.dark body .vault-scope main section.border-b a.gold-button{background:#111113!important;color:#2be07a!important}
html.dark body .vault-scope .account-main,html.dark body .vault-scope .account-services{background:#111113!important}
html.dark body .vault-scope main a.group{background:#111113!important}
html.dark body .vault-scope main section a.block.bg-card{background:#111113!important}
html.dark .tc-invite h2{color:var(--ink,#f1f1f3)!important}
html.dark .tc-step{background:#111113!important;border:1px solid rgba(255,255,255,0.08)!important;box-shadow:0 6px 18px -12px rgba(0,0,0,0.7)!important}
html.dark .tc-step strong{color:#f1f1f3!important}
html.dark .tc-step small{color:#8b8b93!important}
html.dark .tc-tier{background:#111113!important;border:1px solid rgba(255,255,255,0.08)!important;box-shadow:0 6px 18px -12px rgba(0,0,0,0.7)!important}
html.dark .tc-tier em{color:#2be07a!important}
html.dark .tc-tier strong{color:#f1f1f3!important}
html.dark .tc-tier small{color:#8b8b93!important}
html.dark .tc-tier i{background:#26262a!important}
html.dark body .vault-scope main section.border-b a.gold-button,html.dark body .vault-scope main section.border-b a.gold-button *{color:#2be07a!important}
html.dark body .vault-scope main [class*="bg-[linear-gradient"]:not(.border-b):not(.gold-button):not(.tc-banner),html.dark body .vault-scope main [class*="bg-[radial-gradient"]:not(.border-b){background-image:linear-gradient(135deg,#141416,#101012)!important;border-color:rgba(255,255,255,0.08)!important}
html.dark body .vault-scope main [class*="bg-[linear-gradient"] h2,html.dark body .vault-scope main [class*="bg-[linear-gradient"] h3{color:#f1f1f3!important}
html.dark body .vault-scope main [class*="bg-[linear-gradient"] .text-muted-foreground,html.dark body .vault-scope main [class*="bg-[linear-gradient"] p{color:#a4a4ac!important}
html.dark body .vault-scope main a.group > span[data-tc-img]{background:#111113!important;border:1px solid rgba(255,255,255,0.08)!important}
html.dark body .theme-prose,html.dark body .theme-prose :where(p,html.dark li,html.dark span,html.dark div,html.dark strong,html.dark b,html.dark em,html.dark i,html.dark h1,html.dark h2,html.dark h3,html.dark h4,html.dark h5,html.dark h6,html.dark td,html.dark th,html.dark small,html.dark label,html.dark code,html.dark blockquote){color:#f1f1f3!important;-webkit-text-fill-color:#f1f1f3!important}
html.dark body .theme-prose a,html.dark body .theme-prose a *{color:#2be07a!important;-webkit-text-fill-color:#2be07a!important}
html.dark body .theme-prose :where(small){color:#a4a4ac!important}
html.dark body .theme-prose code{background:#161618!important}
html.dark body .theme-prose{background:#111113!important}
html.dark body .vault-scope main a.group.grid{border-bottom:1px solid rgba(255,255,255,0.08)!important}
html.dark body .vault-scope main a.group.grid:hover{background:#161618!important}
html.dark body .vault-scope main a.group.grid > div:first-child > span:first-child{border:1px solid rgba(255,255,255,0.08)!important;background:#0a0a0b!important;box-shadow:0 6px 16px -10px rgba(0,0,0,0.7)!important}
html.dark body .vault-scope main a.group.grid h3{color:#f1f1f3!important}
html.dark body .vault-scope main a.group.grid p{color:#8b8b93!important}
html.dark body .vault-scope main a.group.grid [class*="rounded-full"][class*="bg-white"]{background:#0a0a0b!important;color:#a4a4ac!important}
html.dark body .vault-scope main a.group.grid [class*="gold-soft"]{color:#f0c24e!important}
html.dark body .vault-scope main [class*="rounded-[22px]"][class*="bg-card"]{background:#111113!important;border:1px solid rgba(255,255,255,0.08)!important;box-shadow:0 14px 34px -22px rgba(0,0,0,0.7)!important}
html.dark body .vault-scope main [class*="rounded-[22px]"][class*="bg-card"] > div:first-child{background:#161618!important;color:#8b8b93!important}
html.dark body .vault-scope main a.black-gold-panel > div:first-child > span:first-child{border:1px solid rgba(255,255,255,0.08)!important;background:#0a0a0b!important}
html.dark body .vault-scope main a.black-gold-panel{background:#111113!important}
html.dark body .vault-scope main a.black-gold-panel h3{color:#f1f1f3!important}
html.dark .tc-tier{background:#111113!important;border:1px solid rgba(255,255,255,0.08)!important;box-shadow:0 10px 28px -20px rgba(0,0,0,0.7)!important}
html.dark .tc-tier-head h2{color:#f1f1f3!important}
html.dark .tc-tier-head p{color:#8b8b93!important}
html.dark .tc-tier-table th,html.dark .tc-tier-table td{border-bottom:1px solid rgba(255,255,255,0.08)!important;color:#f1f1f3!important}
html.dark .tc-tier-table thead th{background:#161618!important}
html.dark .tc-tier-table tbody th{color:#cfcfd5!important}
html.dark .tc-tier-table small{color:#8b8b93!important}
html.dark .tc-tier-table td small{color:#2be07a!important}
html.dark .tc-tier-table tr.sec th{background:#131315!important;color:#2be07a!important}
html.dark .tc-tier-table thead th.hi{color:#22c768!important}
html.dark .tc-tier-table b.y{color:#2be07a!important}
html.dark .tc-tier-note{color:#8b8b93!important}
