/* =====================================================================
   吉搭 NEO · DARK —「8pt 网格 / 渐变内发光 / 1.6px 线性图标 / Geist」
   全站可切换主题层。激活：<html data-neo-theme="dark">
   入口：?theme=dark  ·  localStorage.jida_theme='dark'  ·  NEODark.toggle()
   原则：只改写颜色 / 字体 / 字重 / 阴影 / 间距，不动宽高与定位。
   加载顺序：置于所有页面 <style> 之后（</head> 前）。
   ===================================================================== */

/* ---------- 04 字体：Geist 可变字重本地化（离线可用） ---------- */
@font-face{
  font-family:'Geist';
  src:url('fonts/Geist-Variable.woff2') format('woff2');
  font-weight:100 900; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'Geist Mono';
  src:url('fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight:100 900; font-style:normal; font-display:swap;
}

html[data-neo-theme="dark"]{
  /* ---------- 01 间距：唯一合法刻度 = 8pt 网格 ---------- */
  --grid:8px;
  --s1:8px; --s2:16px; --s3:24px; --s4:32px;
  --s5:40px; --s6:48px; --s7:56px; --s8:64px;
  --s-half:4px;                     /* 仅发丝 / 光学微调 */

  /* ---------- 02 色彩：深紫压到近黑，光晕只留在卡片边缘 ---------- */
  --nd-void:#060607;
  --nd-surface:#0D0B12;
  --nd-plum:#9B5DE5;               /* 梅紫 */
  --nd-cobalt:#4A6CFF;             /* 钴蓝 */
  --nd-ember:#FF7347;              /* 余烬 */
  --nd-glass:rgba(255,255,255,.075);   /* 7.5% 玻璃 */
  --nd-glass-2:rgba(255,255,255,.10);  /* 10% 玻璃 */
  --nd-hair:rgba(255,255,255,.09);
  --nd-text:#F4F2F7;
  --nd-text-2:rgba(244,242,247,.58);
  --nd-text-3:rgba(244,242,247,.34);

  /* 覆盖 app.css :root 语义令牌 —— 全站自动跟随 */
  --bg:#060607; --paper:#0D0B12;
  --ink:#F4F2F7;
  --ink2:rgba(244,242,247,.66);
  --ink3:rgba(244,242,247,.44);
  --ink4:rgba(244,242,247,.28);
  --green:#0D0B12; --green2:#151220;
  --red:#FF7347;
  --gold:#FFB37A; --gold-ink:#FF9A5C; --gold2:rgba(255,115,71,.20);
  --line:rgba(255,255,255,.085);
  --shadow:0 8px 24px rgba(0,0,0,.55);
  --shadow-lift:0 16px 40px rgba(0,0,0,.68);
  --r-card:16px; --r-btn:8px; --r-soft:8px;
  --serif:'Geist','Geist Sans','PingFang SC','Microsoft YaHei',sans-serif;

  /* 覆盖 NEO 浅色层令牌 —— 柔光变内发光 */
  --neo-shadow:0 8px 24px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04);
  --neo-shadow-s:0 4px 12px rgba(0,0,0,.48);
  --neo-shadow-l:0 24px 56px rgba(0,0,0,.72);
  --neo-hi:inset 0 1px 0 rgba(255,255,255,.085);
  --neo-ease:cubic-bezier(.22,.61,.36,1);
  --neo-spring:cubic-bezier(.34,1.56,.64,1);
}

/* ---------- 背景：#2E1065 压到 #060607（局部径向压暗，不做大面积线性渐变） ---------- */
html[data-neo-theme="dark"] body{
  background-color:#060607;
  background-image:
    radial-gradient(96% 46% at 14% -6%, rgba(46,16,101,.92) 0%, rgba(46,16,101,.34) 42%, rgba(6,6,7,0) 76%),
    radial-gradient(70% 32% at 100% 2%, rgba(74,108,255,.14) 0%, rgba(6,6,7,0) 72%),
    radial-gradient(60% 28% at 0% 100%, rgba(155,93,229,.09) 0%, rgba(6,6,7,0) 70%);
  background-repeat:no-repeat;
  background-attachment:fixed;
  color:var(--nd-text);
  font-family:'Geist','Geist Sans','PingFang SC','Microsoft YaHei',sans-serif;
  font-weight:400;
  letter-spacing:.005em;
  -webkit-font-smoothing:antialiased;
}
html[data-neo-theme="dark"] .wrap,
html[data-neo-theme="dark"] .page{ background:transparent; }
html[data-neo-theme="dark"] ::selection{ background:rgba(155,93,229,.38); color:#fff; }
html[data-neo-theme="dark"] input,
html[data-neo-theme="dark"] textarea,
html[data-neo-theme="dark"] [contenteditable]{ caret-color:var(--nd-plum); color:var(--nd-text); }
html[data-neo-theme="dark"] :focus-visible{ outline:1.6px solid var(--nd-plum); outline-offset:2px; }

/* ---------- 全站「表面」：7%~10% 玻璃 + 发丝边 + 内发光 ---------- */
html[data-neo-theme="dark"] .card,
html[data-neo-theme="dark"] .panel,
html[data-neo-theme="dark"] .sheet,
html[data-neo-theme="dark"] .box,
html[data-neo-theme="dark"] .neo-glass{
  background:var(--nd-glass);
  border:1px solid var(--nd-hair);
  border-radius:var(--r-card);
  box-shadow:var(--neo-hi, inset 0 1px 0 rgba(255,255,255,.085)), 0 16px 40px -24px rgba(0,0,0,.95),
             inset 0 0 32px -22px rgba(155,93,229,.5);
  -webkit-backdrop-filter:blur(18px) saturate(125%);
  backdrop-filter:blur(18px) saturate(125%);
  color:var(--nd-text);
}

/* ---------- 顶栏 / 头部 / 底栏：统一压暗玻璃 ---------- */
html[data-neo-theme="dark"] .topbar,
html[data-neo-theme="dark"] .fhead,
html[data-neo-theme="dark"] .mhead2,
html[data-neo-theme="dark"] .ghead,
html[data-neo-theme="dark"] .phead,
html[data-neo-theme="dark"] .ahead,
html[data-neo-theme="dark"] .shead,
html[data-neo-theme="dark"] .jv-bar,
html[data-neo-theme="dark"] .bbar,
html[data-neo-theme="dark"] .buybar,
html[data-neo-theme="dark"] .tabbar,
html[data-neo-theme="dark"] .navbar{
  background:rgba(9,8,13,.76);
  border-color:var(--nd-hair);
  color:var(--nd-text);
  -webkit-backdrop-filter:blur(22px) saturate(130%);
  backdrop-filter:blur(22px) saturate(130%);
  box-shadow:0 8px 32px -16px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.06);
}
html[data-neo-theme="dark"] .bbar,
html[data-neo-theme="dark"] .buybar{ border-radius:16px; }

/* ---------- 02 光晕：梅紫 / 钴蓝 / 余烬，只给边缘，杜绝大面积渐变 ---------- */
.neo-glow-plum{
  box-shadow:var(--neo-hi, inset 0 1px 0 rgba(255,255,255,.085)),
             inset 0 0 0 1px rgba(155,93,229,.22),
             inset 0 0 44px -20px rgba(155,93,229,.85),
             0 24px 56px -32px rgba(155,93,229,.65) !important;
}
.neo-glow-cobalt{
  box-shadow:var(--neo-hi, inset 0 1px 0 rgba(255,255,255,.085)),
             inset 0 0 0 1px rgba(74,108,255,.22),
             inset 0 0 44px -20px rgba(74,108,255,.85),
             0 24px 56px -32px rgba(74,108,255,.65) !important;
}
.neo-glow-ember{
  box-shadow:var(--neo-hi, inset 0 1px 0 rgba(255,255,255,.085)),
             inset 0 0 0 1px rgba(255,115,71,.22),
             inset 0 0 44px -20px rgba(255,115,71,.85),
             0 24px 56px -32px rgba(255,115,71,.65) !important;
}
/* 光晕自动分配：给容器加 .neo-glow-auto 即可，三色循环且不做渐变填充 */
.neo-glow-auto > *:nth-child(3n+1){ box-shadow:var(--neo-hi, inset 0 1px 0 rgba(255,255,255,.085)), inset 0 0 0 1px rgba(155,93,229,.18), inset 0 0 40px -22px rgba(155,93,229,.7); }
.neo-glow-auto > *:nth-child(3n+2){ box-shadow:var(--neo-hi, inset 0 1px 0 rgba(255,255,255,.085)), inset 0 0 0 1px rgba(74,108,255,.18), inset 0 0 40px -22px rgba(74,108,255,.7); }
.neo-glow-auto > *:nth-child(3n+3){ box-shadow:var(--neo-hi, inset 0 1px 0 rgba(255,255,255,.085)), inset 0 0 0 1px rgba(255,115,71,.18), inset 0 0 40px -22px rgba(255,115,71,.7); }

/* ---------- 按钮：纯色 + 内发光，不用渐变 ---------- */
html[data-neo-theme="dark"] .btn{
  background:var(--nd-glass-2);
  border:1px solid var(--nd-hair);
  color:var(--nd-text);
  border-radius:var(--r-btn);
  box-shadow:var(--neo-hi, inset 0 1px 0 rgba(255,255,255,.085)), 0 8px 24px -14px rgba(0,0,0,.9);
  font-family:'Geist','PingFang SC',sans-serif;
  font-weight:500;
}
html[data-neo-theme="dark"] .btn--dark,
html[data-neo-theme="dark"] .btn--gold,
html[data-neo-theme="dark"] .btn--primary,
html[data-neo-theme="dark"] .bbar-btn{
  background:rgba(255,115,71,.16);
  border-color:rgba(255,115,71,.38);
  color:#FFD9C8;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),
             inset 0 0 28px -14px rgba(255,115,71,.9),
             0 12px 32px -18px rgba(255,115,71,.7);
}
html[data-neo-theme="dark"] .btn.is-down{
  box-shadow:inset 0 3px 10px rgba(0,0,0,.55), inset 0 0 20px -10px rgba(155,93,229,.6);
}
html[data-neo-theme="dark"] .chip,
html[data-neo-theme="dark"] .tag{
  background:var(--nd-glass);
  border:1px solid var(--nd-hair);
  color:var(--nd-text-2);
  border-radius:8px;
}
html[data-neo-theme="dark"] .chip.on,
html[data-neo-theme="dark"] .chip.active{
  color:#E9D6FF;
  border-color:rgba(155,93,229,.45);
  box-shadow:inset 0 0 20px -10px rgba(155,93,229,.8);
}

/* ---------- 03 图标：统一 1.6px 描边线性图标 ---------- */
.neo-icon{
  width:24px; height:24px;
  display:inline-block; flex:0 0 auto;
  vertical-align:middle;
  fill:none; stroke:currentColor;
  stroke-width:1.6;
  stroke-linecap:round; stroke-linejoin:round;
  color:inherit;
}
.neo-icon--sm{ width:16px; height:16px; }
.neo-icon--lg{ width:32px; height:32px; }
html[data-neo-theme="dark"] .neo-ripple{ background:rgba(155,93,229,.35); }

/* ---------- 04 字阶：标题 30/500，数据 36/300，字重做轻，数字做主角 ---------- */
.neo-t-title{
  font-family:'Geist','PingFang SC',sans-serif;
  font-size:30px; font-weight:500; line-height:1.2;
  letter-spacing:-.025em; color:var(--nd-text);
  margin:0;
}
.neo-t-data{
  font-family:'Geist Mono','Geist',monospace;
  font-size:36px; font-weight:300; line-height:1;
  letter-spacing:-.045em;
  font-variant-numeric:tabular-nums lining-nums;
  color:var(--nd-text);
}
.neo-t-label{
  font-family:'Geist','PingFang SC',sans-serif;
  font-size:11px; font-weight:500; line-height:1.4;
  letter-spacing:.14em; text-transform:uppercase;
  color:var(--nd-text-3);
}
.neo-t-body{
  font-family:'Geist','PingFang SC',sans-serif;
  font-size:14px; font-weight:400; line-height:1.6;
  color:var(--nd-text-2);
}
/* 核心数字：点阵（由 jida-neo-dark.js 渲染成 5×7 SVG 点阵） */
.neo-dotnum{ display:inline-flex; align-items:center; gap:var(--s1); }
.neo-dotnum svg{
  display:block; height:1em;
  filter:drop-shadow(0 0 6px rgba(155,93,229,.55));
  overflow:visible;
}
.neo-dotnum .neo-dotnum-unit{
  font:500 12px/1 'Geist',sans-serif; letter-spacing:.12em;
  color:var(--nd-text-3); align-self:flex-end; padding-bottom:.35em;
}
/* 问候语信息化：不再是寒暄，而是身份 + 状态 + 数据 */
.neo-greeting{ display:flex; flex-direction:column; gap:var(--s-half); }
.neo-greeting .hi{ font:500 30px/1.2 'Geist',sans-serif; letter-spacing:-.025em; color:var(--nd-text); }
.neo-greeting .meta{
  font:400 12px/1.4 'Geist',sans-serif; letter-spacing:.08em;
  color:var(--nd-text-2); text-transform:uppercase;
}
.neo-greeting .meta b{ color:var(--nd-plum); font-weight:500; }

/* ---------- 01 网格工具类：所有间距只能取 8 的倍数 ---------- */
.neo-grid{ display:grid; gap:var(--s2); }
.neo-stack{ display:flex; flex-direction:column; gap:var(--s2); }
.neo-row{ display:flex; align-items:center; gap:var(--s2); }
.neo-p1{padding:var(--s1)} .neo-p2{padding:var(--s2)} .neo-p3{padding:var(--s3)}
.neo-p4{padding:var(--s4)} .neo-p5{padding:var(--s5)} .neo-p6{padding:var(--s6)}
.neo-p7{padding:var(--s7)} .neo-p8{padding:var(--s8)}
.neo-g1{gap:var(--s1)} .neo-g2{gap:var(--s2)} .neo-g3{gap:var(--s3)} .neo-g4{gap:var(--s4)}
.neo-mt1{margin-top:var(--s1)} .neo-mt2{margin-top:var(--s2)} .neo-mt3{margin-top:var(--s3)}
.neo-mt4{margin-top:var(--s4)} .neo-mt5{margin-top:var(--s5)} .neo-mt6{margin-top:var(--s6)}
.neo-mb1{margin-bottom:var(--s1)} .neo-mb2{margin-bottom:var(--s2)} .neo-mb3{margin-bottom:var(--s3)}
.neo-mb4{margin-bottom:var(--s4)} .neo-mb5{margin-bottom:var(--s5)} .neo-mb6{margin-bottom:var(--s6)}

/* 8pt 网格可视化标尺（预览页用） */
.neo-ruler{
  display:flex; align-items:flex-end; gap:var(--s1); height:40px;
}
.neo-ruler i{
  display:block; width:8px; background:rgba(155,93,229,.35);
  border-radius:2px 2px 0 0;
}
.neo-ruler i:nth-child(1){height:8px}   .neo-ruler i:nth-child(2){height:16px}
.neo-ruler i:nth-child(3){height:24px} .neo-ruler i:nth-child(4){height:32px}
.neo-ruler i:nth-child(5){height:40px} .neo-ruler i:nth-child(6){height:32px}
.neo-ruler i:nth-child(7){height:24px} .neo-ruler i:nth-child(8){height:16px}

/* ---------- 圆形扩散转场（主题切换时的揭幕，延续 NEO 交互 ⑥） ---------- */
.neo-reveal{
  position:fixed; z-index:99999; pointer-events:none;
  border-radius:50%; transform:translate(-50%,-50%) scale(0);
  background:radial-gradient(circle, rgba(155,93,229,.30), rgba(6,6,7,.96) 70%);
  animation:neo-reveal .72s var(--neo-ease, cubic-bezier(.22,.61,.36,1)) forwards;
}
@keyframes neo-reveal{ to{ transform:translate(-50%,-50%) scale(1); opacity:0; } }

/* ---------- 深色下 NEO 组件适配 ---------- */
html[data-neo-theme="dark"] .neo-feedback{ color:var(--nd-text); }
html[data-neo-theme="dark"] .neo-check,
html[data-neo-theme="dark"] .neo-stackcard,
html[data-neo-theme="dark"] .neo-sticky,
html[data-neo-theme="dark"] .neo-wheel{ color:var(--nd-text); }
html[data-neo-theme="dark"] .neo-wheel-card{
  background:var(--nd-glass); border:1px solid var(--nd-hair); color:var(--nd-text);
}

/* 尊重减少动效偏好 */
@media (prefers-reduced-motion:reduce){
  .neo-reveal{ animation-duration:.01s; }
  html[data-neo-theme="dark"] *{ transition-duration:.01s !important; }
}
