:root {
  --bg: #0a0a0b;
  --ink: #f2f2f0;
  --ink-2: rgba(242, 242, 240, .62);
  --ink-3: rgba(242, 242, 240, .36);
  --hair: rgba(255, 255, 255, .09);
  --font: "Inter", "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 400; overflow: hidden; -webkit-font-smoothing: antialiased; }
body::after { /* 极轻的暗角，让视线聚焦中心 */
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,.55));
}
canvas#net { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
canvas#net:active { cursor: grabbing; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }

/* ---------- 顶栏 ---------- */
.top { position: fixed; top: max(28px, env(safe-area-inset-top)); left: 36px; right: 36px; display: flex; align-items: baseline; gap: 28px; z-index: 5; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { font-size: 13px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; display: flex; align-items: center; gap: 12px; }
.brand.big { font-size: 13px; justify-content: center; margin-bottom: 18px; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); animation: beat 3.2s var(--ease) infinite; }
@keyframes beat { 50% { opacity: .25; } }
.stats { color: var(--ink-3); font: 400 11px/1 var(--mono); letter-spacing: .06em; flex: 1; }
.icon { margin-left: auto; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-2); transition: color .3s; }
.icon:hover { color: var(--ink); }
.glass-chip { padding: 0; }
.legend { position: fixed; top: 64px; right: 36px; padding: 18px 22px; z-index: 6; max-height: 60vh; overflow: auto; font-size: 12.5px; min-width: 180px; }
.legend div { display: flex; align-items: center; gap: 12px; padding: 7px 0; cursor: pointer; color: var(--ink-2); transition: color .25s, opacity .25s; }
.legend div:hover { color: var(--ink); }
.legend div.off { opacity: .3; }
.legend i { width: 4px; height: 4px; border-radius: 50%; display: inline-block; box-shadow: none !important; }

/* ---------- 面板：深色哑光玻璃 + 发丝边 ---------- */
.glass {
  background: rgba(18, 18, 20, .62);
  backdrop-filter: blur(28px) saturate(120%); -webkit-backdrop-filter: blur(28px) saturate(120%);
  border: .5px solid var(--hair); border-radius: 16px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
}
.panel { position: fixed; top: 76px; left: 36px; width: min(360px, calc(100vw - 48px)); max-height: calc(100vh - 190px); overflow: auto; padding: 28px 28px 22px; z-index: 6; animation: rise .5s var(--ease); scrollbar-width: none; }
.panel::-webkit-scrollbar { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.cat { font: 400 10.5px/1 var(--mono); color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; }
.panel h2 { margin: 14px 0 14px; font-size: 22px; font-weight: 400; line-height: 1.35; letter-spacing: -.01em; }
.panel h3 { font: 400 10.5px/1 var(--mono); color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase; margin: 28px 0 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.tags span { font-size: 12px; color: var(--ink-2); }
.tags span::before { content: "#"; color: var(--ink-3); margin-right: 2px; }
.summary { color: var(--ink-2); line-height: 1.75; font-size: 13.5px; margin: 16px 0 20px; }
.actions { display: flex; gap: 22px; padding-top: 16px; border-top: .5px solid var(--hair); }
.actions a, .actions button { font-size: 12px; letter-spacing: .08em; color: var(--ink); text-decoration: none; position: relative; padding-bottom: 3px; }
.actions a::after, .actions button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: .5px; background: currentColor; transform: scaleX(.3); transform-origin: left; transition: transform .4s var(--ease); }
.actions a:hover::after, .actions button:hover::after { transform: scaleX(1); }
.preview { margin-top: 20px; max-height: 240px; overflow: auto; font: 400 11.5px/1.7 var(--mono); white-space: pre-wrap; color: var(--ink-2); scrollbar-width: none; }
.preview:not(:empty) { padding: 14px 0 0; border-top: .5px solid var(--hair); }
.preview img { max-width: 100%; border-radius: 6px; display: block; }
.related { list-style: none; padding: 0; margin: 0; }
.related li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: .5px solid var(--hair); cursor: pointer; font-size: 13px; color: var(--ink-2); transition: color .25s, padding .35s var(--ease); }
.related li:hover { color: var(--ink); padding-left: 4px; }
.related li b { margin-left: auto; font: 400 11px var(--mono); color: var(--ink-3); }
.related i { width: 3px; height: 3px; border-radius: 50%; flex: none; box-shadow: none !important; }
.close { position: absolute; top: 20px; right: 22px; font-size: 18px; font-weight: 300; color: var(--ink-3); transition: color .2s, transform .4s var(--ease); }
.close:hover { color: var(--ink); transform: rotate(90deg); }

/* ---------- 液态玻璃输入框（中性、低调） ---------- */
.dock { position: fixed; left: 50%; bottom: calc(34px + var(--safe-b)); transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); z-index: 10; }
.liquid { position: relative; border-radius: 999px; isolation: isolate; overflow: hidden; transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  box-shadow: 0 20px 50px -12px rgba(0,0,0,.7), 0 0 0 .5px rgba(255,255,255,.12); }
.liquid:focus-within { transform: translateY(-2px); box-shadow: 0 26px 60px -12px rgba(0,0,0,.8), 0 0 0 .5px rgba(255,255,255,.22); }
.liquid-refract { position: absolute; inset: 0; z-index: 0; border-radius: inherit;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
@supports (backdrop-filter: url(#liquid)) { .liquid-refract { backdrop-filter: url(#liquid) blur(6px) saturate(140%); } }
.liquid-tint { position: absolute; inset: 0; z-index: 1; border-radius: inherit; background: rgba(255,255,255,.045); }
.liquid-shine { position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 .5px 0 rgba(255,255,255,.35), inset 0 -.5px 0 rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.07), transparent 55%); }
.liquid-content { position: relative; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 8px; }
.liquid-content.col { flex-direction: column; align-items: stretch; gap: 14px; padding: 40px 34px 34px; }
.liquid input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--ink); font: 300 15px var(--font); letter-spacing: .01em; padding: 11px 8px; }
.liquid input::placeholder { color: var(--ink-3); }
.mode { font: 400 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding: 10px 12px; border-radius: 999px; transition: color .25s, background .25s; }
.mode:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.mode.search { color: var(--ink); }
.send { width: 38px; height: 38px; border-radius: 50%; font-size: 15px; color: #0a0a0b; background: var(--ink); display: grid; place-items: center; transition: transform .4s var(--ease), opacity .3s; }
.send:hover { transform: scale(1.06); }
.send:active { transform: scale(.94); }
.send.busy { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; transform: scale(.88); } }

.login { position: fixed; inset: 0; display: grid; place-items: center; z-index: 20; background: rgba(10,10,11,.5); }
.login .card { border-radius: 22px; width: min(360px, calc(100vw - 40px)); }
.login input { border-bottom: .5px solid var(--hair); border-radius: 0; padding: 12px 2px; text-align: center; }
.login button { margin-top: 10px; padding: 13px; border-radius: 999px; background: var(--ink); color: #0a0a0b; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }

/* ---------- 回答 ---------- */
.answer { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(104px + var(--safe-b)); width: min(560px, calc(100vw - 32px)); max-height: 46vh; overflow: auto; padding: 26px 30px 24px; z-index: 9; animation: rise .5s var(--ease); scrollbar-width: none; }
.answer .q { font: 400 10.5px/1.5 var(--mono); color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; padding-right: 24px; }
.answer .a { line-height: 1.85; font-size: 14px; font-weight: 300; white-space: pre-wrap; color: var(--ink); }
.answer .a code { font: 400 12px var(--mono); color: var(--ink); border-bottom: .5px solid var(--ink-3); cursor: pointer; padding: 0 1px; transition: border-color .2s; }
.answer .a code:hover { border-color: var(--ink); }
.answer .thinking { display: inline-flex; gap: 6px; margin-right: 10px; vertical-align: middle; }
.answer .thinking i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink); animation: beat 1.2s infinite; }
.answer .thinking i:nth-child(2) { animation-delay: .2s } .answer .thinking i:nth-child(3) { animation-delay: .4s }

@media (max-width: 640px) {
  .top { left: 22px; right: 22px; }
  .panel { top: auto; bottom: calc(96px + var(--safe-b)); left: 12px; right: 12px; width: auto; max-height: 58vh; }
  .legend { right: 22px; }
  .stats { display: none; }
}

/* =====================================================================
   iPad 端（body.pad）：左侧索引栏 · 中间神经网络 · 右侧详情栏
   ===================================================================== */
.side, .side-toggle { display: none; }
.liquid input { font-size: 16px; } /* iOS 小于 16px 会自动放大页面 */

body.pad { --side: 300px; --detail: 384px; --l: 0px; --r: 0px; }
body.pad:not(.side-off) { --l: var(--side); }
body.pad.panel-on { --r: calc(var(--detail) + 14px); }
@media (min-width: 1000px) { body.pad.panel-on { --r: var(--detail); } }

/* 侧栏 */
body.pad .side {
  display: flex; flex-direction: column; position: fixed; z-index: 8; top: 0; bottom: 0; left: 0; width: var(--side);
  padding: max(26px, env(safe-area-inset-top)) 0 max(18px, env(safe-area-inset-bottom)) max(0px, env(safe-area-inset-left));
  background: rgba(14, 14, 15, .72); backdrop-filter: blur(30px) saturate(120%); -webkit-backdrop-filter: blur(30px) saturate(120%);
  border-right: .5px solid var(--hair); transition: transform .55s var(--ease);
}
body.pad.side-off .side { transform: translateX(-100%); }
.side-h { padding: 4px 28px 22px 72px; min-height: 62px; }
.side-stats { margin-top: 10px; font: 400 10.5px var(--mono); color: var(--ink-3); letter-spacing: .08em; }
.side-search { margin: 0 20px 10px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.045); color: var(--ink-3); transition: background .25s; }
.side-search:focus-within { background: rgba(255,255,255,.08); color: var(--ink-2); }
.side-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 300 16px var(--font); }
.side-search input::placeholder { color: var(--ink-3); }
.side-list { flex: 1; overflow: auto; padding: 6px 12px 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.side-list::-webkit-scrollbar { display: none; }
.side-list .empty { color: var(--ink-3); font-size: 13px; padding: 20px 16px; line-height: 1.7; }
.grp-h { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 16px; border-radius: 10px; font-size: 14px; color: var(--ink-2); text-align: left; transition: background .2s, color .2s; }
.grp-h:active { background: rgba(255,255,255,.05); }
.grp-h i { width: 4px; height: 4px; border-radius: 50%; flex: none; }
.grp-h span { flex: 1; }
.grp-h b { font: 400 10.5px var(--mono); color: var(--ink-3); }
.grp-h::after { content: ""; width: 6px; height: 6px; border-right: 1px solid var(--ink-3); border-bottom: 1px solid var(--ink-3); transform: rotate(-45deg); transition: transform .35s var(--ease); margin-left: 4px; }
.grp.open .grp-h { color: var(--ink); }
.grp.open .grp-h::after { transform: rotate(45deg) translate(-2px, -1px); }
.grp ul { list-style: none; margin: 0; padding: 0 0 6px; display: none; }
.grp.open ul { display: block; animation: rise .4s var(--ease); }
.grp li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 32px; border-radius: 10px; font-size: 13.5px; font-weight: 300; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s; }
.grp li em { margin-left: auto; font: normal 400 9.5px var(--mono); color: var(--ink-3); letter-spacing: .08em; }
.grp li:active { background: rgba(255,255,255,.05); }
.grp li.on { background: rgba(255,255,255,.08); color: var(--ink); }
.side-f { padding: 14px 28px 0; font: 400 10px var(--mono); color: var(--ink-3); letter-spacing: .06em; border-top: .5px solid var(--hair); }

/* 顶栏：切换按钮常驻，侧栏打开时品牌移入侧栏 */
body.pad .top { left: max(22px, env(safe-area-inset-left)); right: calc(var(--r) + 32px); top: max(26px, env(safe-area-inset-top)); align-items: center; transition: right .55s var(--ease); z-index: 9; }
body.pad .side-toggle { display: grid; place-items: center; width: 40px; height: 40px; margin: -10px -8px -10px -10px; border-radius: 10px; color: var(--ink-2); transition: color .2s, background .2s; }
body.pad .side-toggle:active { background: rgba(255,255,255,.06); }
body.pad:not(.side-off) .top .brand, body.pad:not(.side-off) .top .stats { opacity: 0; pointer-events: none; }
body.pad .top .brand, body.pad .top .stats { transition: opacity .35s; }
body.pad #btnLegend, body.pad .legend { display: none !important; }

/* 详情栏：横屏贴右侧全高；竖屏浮动卡片 */
body.pad .panel {
  top: 0; bottom: 0; right: 0; left: auto; width: var(--detail); max-height: none; border-radius: 0; border: 0; border-left: .5px solid var(--hair);
  padding: max(72px, calc(env(safe-area-inset-top) + 56px)) 34px 40px; animation: slideL .55s var(--ease); box-shadow: none;
  background: rgba(14, 14, 15, .78);
}
@keyframes slideL { from { transform: translateX(40px); opacity: 0; } }
@media (max-width: 999px) {
  body.pad .panel { top: 14px; bottom: 14px; right: 14px; border-radius: 18px; border: .5px solid var(--hair); padding-top: 56px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); }
}
body.pad.panel-on .top .stats { opacity: 0; }
body.pad .panel .close { top: max(24px, env(safe-area-inset-top)); right: 22px; width: 44px; height: 44px; display: grid; place-items: center; }
body.pad .panel h2 { font-size: 26px; }
body.pad .summary { font-size: 15px; }
body.pad .actions a, body.pad .actions button { font-size: 13px; padding: 12px 0 6px; }
body.pad .related li { min-height: 48px; font-size: 14px; }
body.pad .preview { max-height: 34vh; font-size: 12px; }

/* 输入框与回答：居中于中间可视区 */
body.pad .dock, body.pad .answer {
  left: calc(var(--l) + (100vw - var(--l) - var(--r)) / 2);
  width: min(600px, calc(100vw - var(--l) - var(--r) - 64px));
  transition: left .55s var(--ease), width .55s var(--ease);
}
body.pad .dock { bottom: calc(30px + var(--safe-b)); }
body.pad .answer { bottom: calc(108px + var(--safe-b)); max-height: 42vh; }
body.pad .liquid-content { padding: 7px 7px 7px 10px; }
body.pad .send { width: 44px; height: 44px; }
body.pad .mode { padding: 14px 14px; }
body.pad .answer .a { font-size: 15.5px; }

/* ---------- Codex 账号面板 ---------- */
.acct-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); margin-right: 8px; vertical-align: middle; transition: background .3s, box-shadow .3s; }
body.codex-on .acct-dot { background: #9fe3b8; box-shadow: 0 0 8px rgba(159,227,184,.6); }
body.codex-off .acct-dot { background: #e3b59f; }
.top { gap: 22px; }
#btnAccount { margin-left: auto; }
#btnLegend { margin-left: 0; }
.sheet-wrap { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(10,10,11,.45); animation: fade .35s var(--ease); padding: 16px; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; width: min(440px, 100%); padding: 32px 32px 28px; animation: rise .5s var(--ease); max-height: calc(100vh - 32px); overflow: auto; }
.sheet h2 { margin: 14px 0 10px; font-size: 22px; font-weight: 400; }
.sheet h3 { font: 400 10.5px/1 var(--mono); color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase; margin: 26px 0 12px; }
.muted { color: var(--ink-3); font-size: 13px; margin-top: 18px; }
.muted.small { font-size: 11.5px; line-height: 1.6; }
.wait { display: flex; align-items: center; gap: 10px; }
.thinking { display: inline-flex; gap: 6px; } .thinking i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink); animation: beat 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s } .thinking i:nth-child(3) { animation-delay: .4s }
.primary { width: 100%; margin-top: 6px; padding: 14px; border-radius: 999px; background: var(--ink); color: #0a0a0b; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; transition: transform .3s var(--ease); }
.primary:active { transform: scale(.98); }
.primary:disabled { opacity: .4; }
.code { margin: 22px 0 24px; font: 300 34px/1 var(--mono); letter-spacing: .18em; text-align: center; padding: 22px 0; border-top: .5px solid var(--hair); border-bottom: .5px solid var(--hair); user-select: all; }
.sheet .actions { border-top: 0; padding-top: 4px; flex-wrap: wrap; }
.limits .row { margin-bottom: 18px; }
.limits .lbl { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 9px; }
.limits .lbl b { font: 400 12px var(--mono); color: var(--ink); }
.limits .bar { height: 2px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.limits .bar i { display: block; height: 100%; background: var(--ink); border-radius: 2px; transition: width .8s var(--ease); }
.limits .bar i.hot { background: #e3b59f; }
.limits .rs { font: 400 10.5px var(--mono); color: var(--ink-3); margin-top: 7px; letter-spacing: .04em; }
.err { color: #e3b59f; font-size: 12.5px; line-height: 1.6; margin-top: 16px; }
.side-acct { font: 400 10.5px var(--mono); letter-spacing: .06em; color: var(--ink-2); padding: 0 0 10px; }

/* ---------- 多账号 / 分享 ---------- */
.login .card { width: min(380px, calc(100vw - 40px)); }
.login-hint { color: var(--ink-2); font-size: 12.5px; line-height: 1.7; text-align: center; margin: -6px 0 4px; }
.login-hint:empty { display: none; }
.login .err { text-align: center; margin: 0; }
.shared-by { font: 400 10.5px var(--mono); color: var(--ink-3); letter-spacing: .08em; margin-left: auto; }
#btnShare { margin-left: auto; }
body.role-owner #btnAccount, body.role-member #btnAccount { margin-left: 0; }
body.role-member .shared-by + #btnShare + #btnAccount { margin-left: 0; }
.empty-state { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; color: var(--ink-2); font-size: 15px; font-weight: 300; line-height: 2; pointer-events: none; z-index: 1; }
.empty-state span { color: var(--ink-3); font-size: 12.5px; }

.me-row { display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 20px; margin-bottom: 22px; border-bottom: .5px solid var(--hair); }
.me-name { font-size: 18px; margin-top: 10px; }
.text-btn { font-size: 12px; letter-spacing: .06em; color: var(--ink-2); padding: 6px 0; transition: color .2s; }
.text-btn:hover { color: var(--ink); }
.text-btn.danger:hover { color: #e3b59f; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px 0 11px; border-radius: 999px; border: .5px solid var(--hair); font-size: 12.5px; color: var(--ink-3); transition: all .3s var(--ease); }
.chip i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--ink-3); transition: all .3s var(--ease); }
.chip em { font-style: normal; font: 400 10px var(--mono); color: var(--ink-3); }
.chip:hover { color: var(--ink-2); border-color: rgba(255,255,255,.2); }
.chip.on { color: var(--ink); border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.06); }
.chip.on i { background: var(--ink); border-color: var(--ink); }
.chip.locked { opacity: .55; cursor: default; }
.hint { color: var(--ink-3); font-size: 11.5px; line-height: 1.6; margin: 10px 0 0; }
.share-box { margin-top: 4px; }

.sheet.wide { width: min(620px, 100%); }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: .5px solid var(--hair); }
.people li.empty { color: var(--ink-3); font-size: 13px; display: block; }
.people .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: .5px solid rgba(255,255,255,.25); font-size: 13px; flex: none; }
.people li > div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.people b { font-weight: 400; font-size: 14px; }
.people em { font-style: normal; font: 400 10.5px var(--mono); color: var(--ink-3); letter-spacing: .06em; }
.add-person { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.add-person input, .add-person select { flex: 1 1 120px; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: .5px solid var(--hair); background: rgba(255,255,255,.04); color: var(--ink); font: 300 16px var(--font); outline: 0; }
.add-person select { flex: 0 0 auto; appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.add-person input:focus, .add-person select:focus { border-color: rgba(255,255,255,.28); }
.primary.small { width: auto; padding: 12px 20px; margin: 0; }
.invite { margin-top: 16px; padding: 16px; border-radius: 12px; background: rgba(255,255,255,.04); border: .5px solid var(--hair); }
.invite pre { margin: 0 0 8px; font: 400 12px/1.7 var(--mono); color: var(--ink); white-space: pre-wrap; }
.matrix .mrow { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: .5px solid var(--hair); }
.matrix .mrow.d1 { padding-left: 18px; }
.matrix .mcat { flex: 0 0 150px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink); }
.matrix .mrow.d1 .mcat { color: var(--ink-2); font-size: 13px; }
.matrix .mcat i { width: 4px; height: 4px; border-radius: 50%; flex: none; }
.matrix .mcat b { margin-left: auto; font: 400 10.5px var(--mono); color: var(--ink-3); }
.matrix .chips { flex: 1; }
@media (max-width: 640px) {
  .matrix .mrow { flex-direction: column; align-items: stretch; gap: 10px; }
  .matrix .mcat { flex: none; }
  .shared-by { display: none; }
}

/* ---------- 开场加载：三道 > 依次点亮，光线流过 ---------- */
.boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(80% 70% at 50% 45%, #121214, var(--bg) 70%); transition: opacity 1s var(--ease), visibility 1s; }
.boot.out { opacity: 0; visibility: hidden; }
.boot.out .boot-inner { transform: scale(1.04); filter: blur(4px); }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 26px; transition: transform 1.1s var(--ease), filter 1.1s var(--ease); animation: bootIn 1.2s var(--ease) both; }
@keyframes bootIn { from { opacity: 0; transform: translateY(8px); } }
.chev { overflow: visible; }
.chev polyline { fill: none; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chev .c-base polyline { stroke: rgba(242,242,240,.10); }
/* 每一道依次亮起并轻轻前移 */
.chev .c-step polyline { stroke: rgba(242,242,240,.9); opacity: 0; animation: step 2.4s var(--ease) infinite; }
.chev .c-step polyline:nth-child(2) { animation-delay: .22s; }
.chev .c-step polyline:nth-child(3) { animation-delay: .44s; }
@keyframes step {
  0% { opacity: 0; transform: translateX(-4px); }
  18% { opacity: 1; transform: translateX(0); }
  46% { opacity: .9; transform: translateX(2px); }
  70%, 100% { opacity: 0; transform: translateX(6px); }
}
/* 一束光扫过三道箭头 */
.chev .c-lit polyline { stroke: #fff; stroke-width: 1.6; filter: drop-shadow(0 0 4px rgba(255,255,255,.55)); }
.chev .sheen-rect { animation: sheen 2.4s var(--ease) infinite; }
@keyframes sheen { 0% { transform: translateX(0); } 60%, 100% { transform: translateX(152px); } }
.boot-word { font: 500 11.5px/1 var(--font); letter-spacing: .62em; padding-left: .62em; color: rgba(242,242,240,.82); }
.boot-line { width: 120px; height: .5px; background: rgba(255,255,255,.08); overflow: hidden; }
.boot-line i { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: line 1.8s var(--ease) infinite; }
@keyframes line { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.boot-status { font: 400 9.5px var(--mono); letter-spacing: .3em; color: var(--ink-3); min-height: 1em; transition: opacity .4s; }
@media (prefers-reduced-motion: reduce) {
  .chev .c-step polyline, .chev .sheen-rect, .boot-line i { animation: none; }
  .chev .c-step polyline { opacity: .8; }
}
.login-hint b { color: var(--ink); font-weight: 500; }
.invites { margin-top: 12px; }
.invites .av { font-size: 12px; color: var(--ink-3); }
#invNew pre { word-break: break-all; }

/* ---------- 回答卡片：更大、更好读 ---------- */
.answer { width: min(780px, calc(100vw - 28px)); max-height: 62vh; padding: 34px 40px 32px; bottom: calc(108px + var(--safe-b)); transition: width .5s var(--ease), max-height .5s var(--ease), bottom .5s var(--ease), padding .5s var(--ease); }
.answer .q { font-size: 11.5px; margin-bottom: 18px; padding-right: 70px; }
.answer .a { font-size: 17px; line-height: 1.95; font-weight: 300; letter-spacing: .01em; }
.answer .a code { font-size: 14px; }
.answer .expand { position: absolute; top: 22px; right: 58px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink-3); border-radius: 8px; transition: color .2s, background .2s; }
.answer .expand:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.answer .close { top: 20px; right: 22px; }
/* 全屏阅读 */
.answer.full { width: min(980px, calc(100vw - 28px)); max-height: calc(100vh - 150px - var(--safe-b)); padding: 48px 56px 44px; }
.answer.full .a { font-size: 18.5px; line-height: 2; }
body.pad .answer { width: min(780px, calc(100vw - var(--l) - var(--r) - 48px)); max-height: 58vh; }
body.pad .answer.full { width: calc(100vw - var(--l) - var(--r) - 48px); max-height: calc(100vh - 150px); }
@media (max-width: 640px) {
  .answer { padding: 26px 24px 24px; max-height: 60vh; bottom: calc(96px + var(--safe-b)); }
  .answer .a { font-size: 16.5px; line-height: 1.9; }
  .answer.full { max-height: calc(100vh - 130px - var(--safe-b) - env(safe-area-inset-top)); padding: 30px 24px; }
  .answer.full .a { font-size: 17.5px; }
  .answer .expand { right: 52px; }
}
.answer.full { height: calc(100vh - 150px - var(--safe-b)); }
body.pad .answer.full { height: calc(100vh - 150px); }
.top .brand, .top .icon, .top .shared-by { white-space: nowrap; }
@media (max-width: 640px) {
  .answer.full { height: calc(100vh - 130px - var(--safe-b) - env(safe-area-inset-top)); }
  .top { gap: 16px; }
  .top .brand { letter-spacing: .22em; font-size: 12px; }
  .top .icon { letter-spacing: .14em; font-size: 10.5px; }
  .top #btnLegend { display: none; }
}

/* =====================================================================
   新布局：侧栏 + 首页（问候 / 大输入框 / 最近加入）+ 对话 + 知识网络
   ===================================================================== */
body.pad { --side: 284px; }
.serif { font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif; }

/* ---------- 侧栏 ---------- */
body.pad .side { padding-top: max(18px, env(safe-area-inset-top)); background: rgba(16,16,17,.86); }
.side-h { padding: 6px 22px 18px 68px; min-height: 50px; display: flex; align-items: center; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px 8px; }
.side-nav button { display: flex; align-items: center; gap: 13px; height: 40px; padding: 0 14px; border-radius: 10px; font-size: 14px; color: var(--ink-2); text-align: left; transition: background .2s, color .2s; }
.side-nav button:hover { background: rgba(255,255,255,.045); color: var(--ink); }
.side-nav button.on { background: rgba(255,255,255,.075); color: var(--ink); }
.side-nav svg, .tool svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; flex: none; }
.side-nav b { margin-left: auto; font: 400 10.5px var(--mono); color: var(--ink-3); }
.side-scroll { flex: 1; overflow: auto; padding: 4px 12px 16px; scrollbar-width: none; }
.side-scroll::-webkit-scrollbar { display: none; }
.sec-h { width: 100%; display: flex; align-items: center; gap: 8px; padding: 18px 14px 8px; font-size: 12px; color: var(--ink-3); text-align: left; }
.sec-h i { width: 5px; height: 5px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(-45deg); transition: transform .35s var(--ease); }
.side-sec.open .sec-h i { transform: rotate(45deg) translate(-1px, -1px); }
.lib { display: none; }
.side-sec.open .lib { display: block; animation: rise .4s var(--ease); }
.lib .side-search { margin: 4px 2px 8px; }
.lib .side-list { padding: 0; overflow: visible; }
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; font-weight: 300; color: var(--ink-2); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .2s, color .2s; }
.recent li span { overflow: hidden; text-overflow: ellipsis; }
.recent li:hover { background: rgba(255,255,255,.045); color: var(--ink); }
.recent li.on { background: rgba(255,255,255,.075); color: var(--ink); }
.recent li.empty { color: var(--ink-3); cursor: default; font-size: 12.5px; }
.recent li.empty:hover { background: none; }
.side-user { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 18px max(14px, env(safe-area-inset-bottom)); border-top: .5px solid var(--hair); text-align: left; transition: background .2s; }
.side-user:hover { background: rgba(255,255,255,.03); }
.side-user .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 13.5px; background: linear-gradient(140deg, rgba(255,255,255,.16), rgba(255,255,255,.04)); border: .5px solid rgba(255,255,255,.2); }
.side-user .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.side-user .who b { font-weight: 400; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who em { font-style: normal; font: 400 10px var(--mono); color: var(--ink-3); letter-spacing: .08em; }
.codex-pill { font: 400 10px var(--mono); letter-spacing: .1em; color: var(--ink-3); white-space: nowrap; }
.codex-pill .acct-dot { margin-right: 6px; }
.side-f { display: none; }

/* 顶栏：新布局下只保留侧栏开关 + 品牌（侧栏收起时） */
body.pad #btnShare, body.pad #btnAccount, body.pad #btnLegend, body.pad .shared-by, body.pad .top .stats { display: none !important; }

/* ---------- 视图切换 ---------- */
#net { transition: opacity .9s var(--ease); }
body.view-home #net { opacity: .2; pointer-events: none; }
body.view-chat #net { opacity: .07; pointer-events: none; }
body:not(.view-graph) .panel, body:not(.view-graph) .legend, .answer, body:not(.view-graph) .empty-state { display: none !important; }
body.view-home .dock-fixed { display: none; }

/* ---------- 首页 ---------- */
.home { position: fixed; top: 0; bottom: 0; right: 0; left: var(--l, 0px); overflow: auto; z-index: 3; display: grid; place-items: center; padding: 90px 24px 60px; transition: left .55s var(--ease); scrollbar-width: none; }
.home[hidden] { display: none; }
.home-inner { width: min(760px, 100%); }
.greet { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 2px; margin: 0 0 30px; font-size: 34px; font-weight: 600; letter-spacing: .01em; text-align: center; }
.greet em { font-style: normal; font-weight: 400; font-size: 36px; font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif; letter-spacing: 0; }
.greet-mark { width: 46px; height: 20px; margin-right: 16px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.greet-mark polyline { animation: step 3.2s var(--ease) infinite; opacity: .25; }
.greet-mark polyline:nth-child(2) { animation-delay: .25s; } .greet-mark polyline:nth-child(3) { animation-delay: .5s; }
.home-meta { display: flex; justify-content: space-between; padding: 14px 22px 0; }
.home-meta button { font: 400 11px var(--mono); letter-spacing: .08em; color: var(--ink-3); transition: color .2s; }
.home-meta button:hover { color: var(--ink); }
.home-meta .acct-dot { margin-right: 8px; }
.recent-h { display: flex; justify-content: space-between; align-items: baseline; margin: 64px 4px 14px; font-size: 13px; color: var(--ink-3); }
.recent-h button { font-size: 12.5px; color: var(--ink-3); } .recent-h button:hover { color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { text-align: left; padding: 18px 18px 16px; border-radius: 14px; border: .5px solid var(--hair); background: rgba(255,255,255,.025); display: flex; flex-direction: column; gap: 8px; min-height: 150px; transition: background .3s, border-color .3s, transform .4s var(--ease); }
.card:hover { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.16); transform: translateY(-2px); }
.card .c-cat { font: 400 10px var(--mono); letter-spacing: .1em; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.card .c-cat i { width: 4px; height: 4px; border-radius: 50%; }
.card .c-title { font-size: 15px; line-height: 1.45; color: var(--ink); }
.card .c-sum { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); font-weight: 300; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .c-time { margin-top: auto; font: 400 10px var(--mono); color: var(--ink-3); }
.cards .none { color: var(--ink-3); font-size: 13px; padding: 10px 4px; }

/* ---------- 输入框（Claude 式圆角大框，仍是液态玻璃） ---------- */
.dock .liquid { border-radius: 22px; }
.liquid-content.composer { flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 12px 10px 20px; }
.composer textarea { width: 100%; resize: none; background: transparent; border: 0; outline: 0; color: var(--ink); font: 300 16px/1.6 var(--font); padding: 4px 6px 6px 0; max-height: 36vh; min-height: 28px; scrollbar-width: thin; }
.composer textarea::placeholder { color: var(--ink-3); }
.composer .tools { display: flex; align-items: center; gap: 4px; }
.composer .tool { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); transition: background .2s, color .2s; margin-left: -8px; }
.composer .tool:hover { background: rgba(255,255,255,.07); color: var(--ink); }
.composer .tool + input + .mode { margin-left: 2px; }
.composer .tool-gap { flex: 1; }
.composer .hint-key { font: 400 10px var(--mono); color: var(--ink-3); letter-spacing: .04em; margin-right: 12px; opacity: 0; transition: opacity .3s; }
.composer:focus-within .hint-key { opacity: 1; }
.composer .mode:first-child { margin-left: -10px; }
.composer-slot .dock { position: relative; left: auto !important; bottom: auto !important; transform: none; width: 100% !important; transition: none; }
.composer-slot .composer textarea { min-height: 74px; font-size: 17px; }
.composer-slot .liquid:focus-within { transform: none; }
body.pad .dock-fixed { width: min(760px, calc(100vw - var(--l) - var(--r) - 48px)); }

/* ---------- 对话 ---------- */
.thread { position: fixed; top: 0; bottom: 0; right: 0; left: var(--l, 0px); overflow: auto; z-index: 3; padding: 86px 24px 230px; transition: left .55s var(--ease); scroll-behavior: smooth; }
.thread[hidden] { display: none; }
.thread-inner { width: min(760px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 34px; }
.msg.user { align-self: flex-end; max-width: 82%; padding: 13px 20px; border-radius: 20px 20px 6px 20px; background: rgba(255,255,255,.065); border: .5px solid var(--hair); font-size: 15.5px; line-height: 1.7; white-space: pre-wrap; animation: rise .45s var(--ease); }
.msg.ai { animation: rise .55s var(--ease); }
.msg.ai .a { font-size: 17px; line-height: 1.95; font-weight: 300; letter-spacing: .01em; }
.msg.ai .a code { font: 400 14px var(--mono); border-bottom: .5px solid var(--ink-3); cursor: pointer; }
.msg.ai .a code:hover { border-color: var(--ink); }
.msg.ai .cites { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.msg.ai .cites button { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; border: .5px solid var(--hair); font-size: 12px; color: var(--ink-2); transition: all .25s; }
.msg.ai .cites button:hover { color: var(--ink); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.04); }
.msg.ai .cites i { width: 4px; height: 4px; border-radius: 50%; }
.msg.ai .meta { display: flex; gap: 18px; margin-top: 14px; font: 400 10.5px var(--mono); color: var(--ink-3); letter-spacing: .06em; }
.msg.ai .meta button { color: var(--ink-3); } .msg.ai .meta button:hover { color: var(--ink); }
.msg.ai .think { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: 14px; }
.msg.ai .think svg { width: 34px; height: 14px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; }
.msg.ai .think polyline { animation: step 1.8s var(--ease) infinite; opacity: .2; }
.msg.ai .think polyline:nth-child(2) { animation-delay: .18s; } .msg.ai .think polyline:nth-child(3) { animation-delay: .36s; }
.msg.err .a { color: #e3b59f; font-size: 15px; }

/* ---------- 提示 ---------- */
.toast { position: fixed; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%); z-index: 50; padding: 12px 20px; border-radius: 999px; background: rgba(28,28,30,.92); border: .5px solid var(--hair); font-size: 13px; color: var(--ink); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); animation: rise .4s var(--ease); white-space: nowrap; }

/* ---------- 手机：侧栏变成抽屉，不挤占内容 ---------- */
@media (max-width: 767px) {
  body.pad { --l: 0px !important; }
  body.pad .side { width: min(86vw, 330px); box-shadow: 30px 0 80px rgba(0,0,0,.6); z-index: 40; }
  body.pad:not(.side-off)::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; }
  .greet { font-size: 26px; } .greet em { font-size: 28px; } .greet-mark { width: 34px; margin-right: 10px; }
  .home { padding: 80px 16px 40px; place-items: start center; }
  .home-inner { margin-top: 12vh; }
  .composer .hint-key { display: none; }
  .thread { padding: 76px 16px 200px; }
  .msg.ai .a { font-size: 16.5px; }
  body.pad .dock-fixed { width: calc(100vw - 24px); }
  body.pad .top { z-index: 41; }
}

/* ---------- 私密 ---------- */
.lock { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.1; flex: none; }
.priv-box { margin: 18px 0 0; }
.priv { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: .5px solid var(--hair); font-size: 12.5px; color: var(--ink-2); }
.priv > div { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.priv.on { color: #e3cf9f; }
.priv b { font-weight: 500; font-size: 13px; }
.priv em { font-style: normal; font: 400 10px var(--mono); color: var(--ink-3); letter-spacing: .04em; }
.priv .lock { width: 14px; height: 14px; }
.priv-tools { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.privs .av { color: #e3cf9f; } .privs .av .lock { width: 13px; height: 13px; }
.privs b { word-break: break-all; }
.chip.locked-priv { opacity: .3; pointer-events: none; }

/* ---------- AI 来源 ---------- */
.providers { display: flex; flex-direction: column; gap: 8px; }
.prov { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; border: .5px solid var(--hair); text-align: left; transition: all .25s; }
.prov:hover { border-color: rgba(255,255,255,.2); }
.prov.on { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.05); }
.prov i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--ink-3); flex: none; transition: all .25s; }
.prov.on i { border-color: var(--ink); box-shadow: inset 0 0 0 3px #161617, inset 0 0 0 6px var(--ink); }
.prov span { display: flex; flex-direction: column; gap: 3px; }
.prov b { font-weight: 400; font-size: 14px; }
.prov em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.ai-owner .field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; font-size: 12px; color: var(--ink-3); }
.ai-owner .field.inline { flex-direction: row; align-items: center; gap: 10px; }
.ai-owner input[type=password], .ai-owner input[type=number], .ai-owner select { height: 38px; padding: 0 12px; border-radius: 10px; border: .5px solid var(--hair); background: rgba(255,255,255,.04); color: var(--ink); font: 300 15px var(--font); outline: 0; }
.ai-owner input[type=number] { width: 80px; }
.ai-owner .row-btns { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.toggle input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; flex: none; cursor: pointer; transition: background .25s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform .3s var(--ease); }
.toggle input:checked { background: rgba(159,227,184,.55); }
.toggle input:checked::after { transform: translateX(14px); }
.warn { font-size: 11.5px; line-height: 1.6; color: #e3b59f; margin: -4px 0 6px 46px; }
#acctOut.dim { opacity: .55; }
.sheet-wrap { z-index: 60; }
.toast { z-index: 70; }
.ai-owner .row-btns .primary.small { padding: 10px 22px; font-size: 12px; }
.store-bar { display: flex; height: 6px; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.07); gap: 1px; }
.store-bar i { display: block; height: 100%; transition: width .8s var(--ease); }
.store-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 6px; font: 400 10.5px var(--mono); color: var(--ink-3); }
.store-legend span { display: inline-flex; align-items: center; gap: 6px; }
.store-legend i { width: 6px; height: 6px; border-radius: 50%; }
.store-legend .low { color: #e3b59f; }
.snaps .av { font-size: 11px; color: #e3cf9f; }

/* =====================================================================
   加载状态：任何按钮在等待服务器时都显示一圈细线动画，并暂时不能再点
   ===================================================================== */
.is-busy { pointer-events: none !important; cursor: progress !important; position: relative; }
/* 文字类按钮：在文字后面加一个小圆环 */
.is-busy:not(.send):not(.tool):not(.chip):not(.prov):not(.card):not(.primary)::after {
  content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 8px; vertical-align: -1px;
  border: 1px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; opacity: .8;
}
/* 主按钮（白底）：文字变淡，中间转圈 */
.primary.is-busy { color: transparent !important; }
.primary.is-busy::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border: 1.4px solid #0a0a0b; border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite;
}
.login button.is-busy { color: transparent; }
.login button.is-busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 1.4px solid #0a0a0b; border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; }
#lBtn { position: relative; }
/* 圆形图标按钮（+ 上传）：图标换成转圈 */
.tool.is-busy svg { opacity: 0; }
.tool.is-busy::after { content: ""; position: absolute; inset: 9px; border: 1.3px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; }
/* 小胶囊（分享给谁）：圆点变成转圈 */
.chip.is-busy i { border-color: var(--ink) !important; border-right-color: transparent !important; background: none !important; animation: spin .75s linear infinite; width: 8px; height: 8px; }
/* AI 来源选项 / 资料卡片：整块轻微呼吸 */
.prov.is-busy, .card.is-busy, .recent li.is-busy, .related li.is-busy { animation: pulse 1.1s ease-in-out infinite; }
.prov.is-busy i { border-color: var(--ink); border-right-color: transparent; box-shadow: none; animation: spin .75s linear infinite; }
@keyframes pulse { 50% { opacity: .55; } }
/* 开关 */
label.toggle.is-busy input { animation: pulse 1s ease-in-out infinite; }
/* 下拉框 / 输入框 */
select.is-busy, input.is-busy { opacity: .6; }
/* 发送按钮：已有呼吸动画；面板里内容加载中的占位 */
.loading-line { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font: 400 11px var(--mono); letter-spacing: .06em; }
.loading-line i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink); animation: beat 1.2s infinite; }
.loading-line i:nth-child(2) { animation-delay: .2s } .loading-line i:nth-child(3) { animation-delay: .4s; margin-right: 6px; }
@media (prefers-reduced-motion: reduce) { .is-busy::after, .chip.is-busy i, .prov.is-busy i { animation-duration: 2s; } }
.actions .danger { color: var(--ink-3); margin-left: auto; }
.actions .danger:hover { color: #e3b59f; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-act { font-size: 12.5px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.trash .av { font-size: 13px; color: var(--ink-3); }
/* 相关度图例（只在知识网络里显示） */
.graph-legend { position: fixed; left: calc(var(--l, 0px) + 28px); top: calc(26px + env(safe-area-inset-top, 0px)); z-index: 4; display: none; align-items: center; gap: 10px; font: 400 10px var(--mono); color: var(--ink-3); letter-spacing: .08em; pointer-events: none; transition: left .55s var(--ease); }
body.view-graph .graph-legend { display: flex; }
.graph-legend i { width: 90px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, rgba(150,158,175,.06), rgba(200,205,215,.4), rgba(255,250,235,.95)); box-shadow: 0 0 8px rgba(255,248,235,.15); }
.graph-legend em { font-style: normal; } .graph-legend em:first-of-type { order: 2; margin-left: -4px; } .graph-legend i { order: 3; } .graph-legend em:last-of-type { order: 4; }
@media (max-width: 767px) { .graph-legend { left: 64px; top: calc(22px + env(safe-area-inset-top, 0px)); } }
.graph-legend b { order: 5; font-weight: 400; margin-left: 14px; opacity: .7; }
@media (hover: none) { .graph-legend b .m { display: none; } } @media (hover: hover) { .graph-legend b .t { display: none; } }

/* ================= 设置窗口（大气两栏） ================= */
.settings-wrap { padding: clamp(12px, 3vw, 40px); background: rgba(6,6,7,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet.settings {
  width: min(1120px, 100%); height: min(820px, calc(100vh - 2 * clamp(12px, 3vw, 40px))); max-height: none;
  padding: 0; overflow: hidden; display: grid; grid-template-columns: minmax(300px, 360px) 1fr; border-radius: 28px;
}
.settings .close { top: 26px; right: 30px; z-index: 3; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; }
.settings .close:hover { background: rgba(255,255,255,.06); }
.set-side { display: flex; flex-direction: column; gap: 22px; padding: 34px 30px 26px; border-right: .5px solid var(--hair); background: rgba(255,255,255,.018); overflow: auto; }
.set-brand { display: flex; align-items: center; gap: 10px; font: 400 10.5px var(--mono); letter-spacing: .32em; color: var(--ink-3); }
.set-brand i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 10px rgba(255,255,255,.6); }
.settings .me-row { align-items: center; justify-content: flex-start; gap: 16px; padding: 0; margin: 4px 0 0; border: 0; }
.me-av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 300; border: .5px solid rgba(255,255,255,.28); background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.14), rgba(255,255,255,.02)); flex: none; }
.settings .me-name { font-size: 22px; font-weight: 400; margin: 0 0 6px; letter-spacing: .01em; }
.set-card { padding: 20px 20px 18px; border-radius: 18px; border: .5px solid var(--hair); background: rgba(255,255,255,.025); }
.set-card h2 { font-size: 19px; margin: 12px 0 10px; word-break: break-all; }
.set-card .summary { font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.set-card .limits { margin-top: 18px; }
.set-card .code { font-size: 26px; margin: 16px 0; }
.set-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.set-nav a { position: relative; padding: 11px 14px; border-radius: 12px; font-size: 14px; color: var(--ink-3); cursor: pointer; transition: color .25s, background .25s; }
.set-nav a:hover { color: var(--ink-2); background: rgba(255,255,255,.03); }
.set-nav a.on { color: var(--ink); background: rgba(255,255,255,.06); }
.set-nav a.on::before { content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 14px; margin-top: -7px; border-radius: 2px; background: var(--ink); }
.set-logout { margin-top: auto; align-self: flex-start; }
.set-main { overflow: auto; padding: 34px clamp(28px, 4vw, 56px) 60px; scroll-behavior: smooth; }
.set-sec { padding: 30px 0 34px; border-bottom: .5px solid var(--hair); }
.set-sec:first-child { padding-top: 6px; }
.set-sec:last-child { border-bottom: 0; }
.set-sec > header { margin-bottom: 22px; padding-right: 40px; }
.set-sec h4 { margin: 0 0 8px; font-size: 26px; font-weight: 300; letter-spacing: .01em; color: var(--ink); }
.set-sec header p { margin: 0; font-size: 13px; color: var(--ink-3); }
.settings .providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.settings .prov { padding: 18px 18px; border-radius: 16px; min-height: 76px; }
.settings .prov b { font-size: 15.5px; }
.settings .prov em { font-size: 12px; line-height: 1.5; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 18px; }
.settings .ai-owner .field { margin: 8px 0; font-size: 12.5px; }
.settings .ai-owner input[type=password], .settings .ai-owner input[type=number], .settings .ai-owner select { height: 46px; border-radius: 13px; font-size: 15px; padding: 0 14px; width: 100%; }
.settings .ai-owner select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }
.settings .ai-owner select option { background: #161617; color: var(--ink); }
.settings .row-btns { margin: 10px 0 18px; gap: 18px; }
.settings .row-btns .primary.small { width: auto; min-width: 120px; padding: 12px 26px; margin: 0; }
.set-rows { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; margin: 0 0 18px; border-radius: 16px; border: .5px solid var(--hair); background: rgba(255,255,255,.02); }
.set-rows .toggle { padding: 10px 0; font-size: 14px; }
.set-rows .toggle + .toggle { border-top: .5px solid var(--hair); }
.settings #storeBox .store-bar { height: 6px; border-radius: 6px; margin-bottom: 14px; }
.settings #storeBox h3 { margin-top: 34px; }
.settings .people li { padding: 15px 4px; }
.text-btn.outline { padding: 10px 18px; border-radius: 999px; border: .5px solid rgba(255,255,255,.22); }
.text-btn.outline:hover { border-color: rgba(255,255,255,.45); }
/* 深色滚动条 + 去掉浏览器自动填充的浅蓝底 */
.set-main, .set-side, .sheet { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.set-main::-webkit-scrollbar, .set-side::-webkit-scrollbar, .sheet::-webkit-scrollbar { width: 8px; }
.set-main::-webkit-scrollbar-thumb, .set-side::-webkit-scrollbar-thumb, .sheet::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.set-main::-webkit-scrollbar-track, .set-side::-webkit-scrollbar-track, .sheet::-webkit-scrollbar-track { background: transparent; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 100px #1a1a1c inset; caret-color: var(--ink); transition: background-color 9999s; }
@media (max-width: 860px) {
  .sheet.settings { grid-template-columns: 1fr; height: calc(100vh - 24px); overflow: auto; border-radius: 22px; }
  .set-side { border-right: 0; border-bottom: .5px solid var(--hair); overflow: visible; padding: 28px 22px 20px; }
  .set-nav { flex-direction: row; overflow-x: auto; gap: 6px; } .set-nav a { white-space: nowrap; padding: 9px 14px; }
  .set-nav a.on::before { display: none; }
  .set-logout { margin-top: 0; }
  .set-main { overflow: visible; padding: 10px 22px 40px; }
  .set-sec h4 { font-size: 22px; }
}
.set-sec { scroll-margin-top: 24px; }
.set-side, .set-main { min-width: 0; }
.set-sec .people li:last-child { border-bottom: 0; }
@media (max-width: 860px) { .sheet.settings { grid-template-columns: minmax(0, 1fr); } .set-side { gap: 18px; } }

/* 回答里的 Markdown */
.msg.ai .a > :first-child, #aBody > :first-child { margin-top: 0; }
.msg.ai .a p, #aBody p { margin: 0 0 .9em; }
.msg.ai .a h2, .msg.ai .a h3, .msg.ai .a h4, #aBody h2, #aBody h3, #aBody h4 { font-weight: 400; color: var(--ink); margin: 1.3em 0 .5em; line-height: 1.4; }
.msg.ai .a h2, #aBody h2 { font-size: 22px; } .msg.ai .a h3, #aBody h3 { font-size: 19px; } .msg.ai .a h4, #aBody h4 { font-size: 17px; }
.msg.ai .a strong, #aBody strong { font-weight: 500; color: var(--ink); }
.msg.ai .a ul, .msg.ai .a ol, #aBody ul, #aBody ol { margin: 0 0 1em; padding-left: 1.3em; }
.msg.ai .a li, #aBody li { margin: .25em 0; padding-left: .2em; }
.msg.ai .a ul li::marker, #aBody ul li::marker { content: "—  "; color: var(--ink-3); font-size: .8em; }
.msg.ai .a ol li::marker, #aBody ol li::marker { color: var(--ink-3); font: 400 .8em var(--mono); }
.msg.ai .a blockquote, #aBody blockquote { margin: 0 0 1em; padding: 2px 0 2px 16px; border-left: 1px solid var(--ink-3); color: var(--ink-2); }
.msg.ai .a hr, #aBody hr { border: 0; border-top: .5px solid var(--hair); margin: 1.4em 0; }
.msg.ai .a pre, #aBody pre { margin: 0 0 1em; padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,.04); border: .5px solid var(--hair); overflow-x: auto; font: 400 13px/1.7 var(--mono); white-space: pre; }
.msg.ai .a pre code, #aBody pre code { border: 0; cursor: text; font: inherit; }
.msg.ai .a code.ic, #aBody code.ic { border: 0; cursor: text; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.07); font-size: .85em; }
.msg.ai .a a, #aBody a { color: var(--ink); border-bottom: .5px solid var(--ink-3); }

/* ======================= 动效与过场 ======================= */
:root { --spring: cubic-bezier(.2, 1.25, .35, 1); --out: cubic-bezier(.16, 1, .3, 1); }

/* 视图切换的光幕：一道柔光从左向右掠过 */
#warp { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; overflow: hidden; }
#warp i { position: absolute; top: -10%; bottom: -10%; width: 38vw; left: -40vw; background: linear-gradient(90deg, transparent, rgba(255,255,255,.035) 35%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.035) 65%, transparent); transform: skewX(-12deg); filter: blur(6px); }
#warp.go { animation: warpVeil .8s var(--out); }
#warp.go i { animation: warpSweep .8s var(--out); }
@keyframes warpVeil { 0% { opacity: 1; background: rgba(8,8,9,.0); } 25% { background: rgba(8,8,9,.35); } 100% { opacity: 0; background: rgba(8,8,9,0); } }
@keyframes warpSweep { to { left: 110vw; } }

/* 新视图：从景深里浮现 */
.home.enter .home-inner, .thread.enter #threadInner { animation: viewIn .9s var(--out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(22px) scale(.985); filter: blur(10px); } }
#net { transition: opacity .9s var(--out), filter .9s var(--out); }
body.view-home #net, body.view-chat #net { filter: blur(1.5px); }
#net.zoom-in { animation: netIn 1.2s var(--out); }
@keyframes netIn { from { filter: blur(8px); opacity: 0; } }

/* 问候语逐字 */
.greet.type .ch { display: inline-block; animation: chIn .9s var(--out) both; animation-delay: calc(var(--i) * 70ms + 120ms); }
@keyframes chIn { from { opacity: 0; transform: translateY(.45em) rotateX(55deg); filter: blur(8px); } }
.greet.type .greet-mark { animation: markIn 1.1s var(--out) both; }
@keyframes markIn { from { opacity: 0; transform: translateX(-18px); } }
.greet.type em { display: inline-block; animation: chIn 1.1s var(--out) both; animation-delay: .45s; }
.greet.type ~ .composer-slot { animation: viewIn 1s var(--out) .25s both; }
.greet.type ~ .home-meta { animation: fadeUp .9s var(--out) .5s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

/* 卡片：依次升起 + 鼠标柔光 + 悬停上浮 */
.cards.stagger .card { animation: cardIn .85s var(--out) both; animation-delay: calc(var(--i, 0) * 70ms + 380ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.97); filter: blur(6px); } }
.card { position: relative; overflow: hidden; isolation: isolate; }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .45s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.085), transparent 60%); }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .45s; background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.35), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: .5px; }
.card:hover::before, .card:hover::after { opacity: 1; }
.card:hover { transform: translateY(-4px); }
.card:active { transform: translateY(-1px) scale(.99); }

/* 对话：提问从右侧滑入，回答按段落依次浮现 */
.msg.user.fresh { animation: userIn .7s var(--spring) both; }
@keyframes userIn { from { opacity: 0; transform: translateX(24px) scale(.96); filter: blur(4px); } }
.msg.ai.fresh { animation: none; }
.msg.ai.fresh .a > * { animation: lineIn .8s var(--out) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes lineIn { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }
.msg.ai.fresh .cites button { animation: popIn .6s var(--spring) both; animation-delay: .5s; }
.msg.ai.fresh .meta { animation: fadeUp .7s var(--out) .6s both; }
@keyframes popIn { from { opacity: 0; transform: scale(.85); } }
.msg.ai .think { animation: fadeUp .6s var(--out) both; }

/* 详情面板：滑入 + 内容逐行 */
.panel.enter { animation: panelIn .75s var(--out) both; }
@keyframes panelIn { from { opacity: 0; transform: translateX(-22px); filter: blur(8px); } }
body.pad .panel.enter { animation-name: panelInR; }
@keyframes panelInR { from { opacity: 0; transform: translateX(34px); filter: blur(8px); } }
.panel.enter > * { animation: fadeUp .7s var(--out) both; }
.panel.enter > *:nth-child(2) { animation-delay: .06s } .panel.enter > *:nth-child(3) { animation-delay: .12s } .panel.enter > *:nth-child(4) { animation-delay: .18s }
.panel.enter > *:nth-child(5) { animation-delay: .24s } .panel.enter > *:nth-child(6) { animation-delay: .3s } .panel.enter > *:nth-child(n+7) { animation-delay: .36s }

/* 弹窗：背景渐暗渐糊，窗口从景深推近；关闭时反向 */
.sheet-wrap:not([hidden]) { animation: wrapIn .45s var(--out) both; }
@keyframes wrapIn { from { background-color: rgba(6,6,7,0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); } }
.sheet-wrap:not([hidden]) > .sheet { animation: sheetIn .7s var(--out) both; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(18px) scale(.965); filter: blur(10px); } }
.sheet-wrap.leaving { animation: wrapOut .26s ease-in both; }
.sheet-wrap.leaving > .sheet { animation: sheetOut .26s ease-in both; }
@keyframes wrapOut { to { opacity: 0; } }
@keyframes sheetOut { to { opacity: 0; transform: translateY(10px) scale(.975); filter: blur(6px); } }
.settings .set-main > .set-sec { animation: fadeUp .8s var(--out) both; }
.settings .set-main > .set-sec:nth-child(2) { animation-delay: .08s } .settings .set-main > .set-sec:nth-child(3) { animation-delay: .16s } .settings .set-main > .set-sec:nth-child(4) { animation-delay: .24s }
.settings .set-side > * { animation: fadeUp .8s var(--out) both; }
.settings .set-side > *:nth-child(2) { animation-delay: .05s } .settings .set-side > *:nth-child(3) { animation-delay: .1s } .settings .set-side > *:nth-child(4) { animation-delay: .15s } .settings .set-side > *:nth-child(n+5) { animation-delay: .2s }

/* 进入应用：侧栏各项依次出现 */
body.entered .side-h, body.entered .side-nav > *, body.entered .side-sec, body.entered .side-user { animation: sideIn .8s var(--out) both; }
body.entered .side-nav > *:nth-child(1) { animation-delay: .08s } body.entered .side-nav > *:nth-child(2) { animation-delay: .14s }
body.entered .side-nav > *:nth-child(3) { animation-delay: .2s } body.entered .side-nav > *:nth-child(4) { animation-delay: .26s }
body.entered .side-sec { animation-delay: .32s } body.entered .side-user { animation-delay: .4s }
@keyframes sideIn { from { opacity: 0; transform: translateX(-14px); filter: blur(4px); } }
#recentList li, #sideList li { animation: fadeUp .55s var(--out) both; animation-delay: calc(min(var(--i, 0), 12) * 35ms); }

/* 侧栏导航：选中项的底色平滑滑动、悬停时图标轻移 */
.side-nav > * { transition: background .35s var(--out), color .35s var(--out), transform .35s var(--out); }
.side-nav > *:hover svg { transform: translateX(2px); }
.side-nav svg { transition: transform .35s var(--spring); }
.side-nav > *:active { transform: scale(.98); }

/* 发送按钮涟漪 + 按压回弹 */
#send { position: relative; transition: transform .35s var(--spring), background .3s; }
#send:hover { transform: scale(1.06); }
#send:active { transform: scale(.92); }
#send::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.6); opacity: 0; pointer-events: none; }
#send.ripple::after { animation: ripple .8s var(--out); }
@keyframes ripple { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(2.3); } }

/* 输入框聚焦：外沿一圈呼吸光 */
.dock { transition: box-shadow .6s var(--out), border-color .6s var(--out), left .55s var(--ease), width .55s var(--ease); }
.dock { border-radius: 22px; }
.dock:focus-within { box-shadow: 0 0 0 .5px rgba(255,255,255,.18), 0 20px 60px -20px rgba(255,255,255,.08), 0 30px 80px -30px rgba(0,0,0,.8); }

/* 通用按钮与选项的细节 */
.prov, .chip, .text-btn.outline, .primary { transition: transform .35s var(--spring), background .3s, border-color .3s, color .3s, opacity .3s; }
.prov:hover, .chip:hover { transform: translateY(-1px); }
.prov:active, .chip:active, .primary:active, .text-btn.outline:active { transform: scale(.97); }
.prov.on { animation: popIn .45s var(--spring); }
.toggle input::after { transition: transform .5s var(--spring), width .3s var(--out) !important; } .toggle input:active::after { width: 18px; }
#toast:not([hidden]) { animation: toastIn .6s var(--spring) both; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); filter: blur(4px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  #warp { display: none; }
}

/* ======================= SVG：转场 / 插画 ======================= */
#svgWarp { position: fixed; inset: 0; z-index: 45; pointer-events: none; opacity: 0; visibility: hidden; background: radial-gradient(ellipse at center, rgba(10,10,11,.72), rgba(10,10,11,.38) 70%); }
#svgWarp.on { visibility: visible; }
#svgWarp svg { width: 100%; height: 100%; }
#svgWarp .nerves path { fill: none; stroke: #f2f2f0; stroke-linecap: round; }
#svgWarp .sparks circle { fill: #fff; filter: drop-shadow(0 0 6px rgba(255,255,255,.9)); }
#svgWarp .chev polyline { fill: none; stroke: #f2f2f0; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 18px rgba(255,255,255,.35)); }
#svgWarp .chev polyline:nth-child(1) { opacity: .35 } #svgWarp .chev polyline:nth-child(2) { opacity: .65 }
#warp { display: none; }

.neuron-art { display: block; width: 100%; max-width: 260px; height: auto; margin: 0 auto; overflow: visible; }
.neuron-art .ln path { fill: none; stroke: rgba(242,242,240,.32); stroke-width: .8; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: artDraw 1.6s var(--out, ease-out) both; animation-delay: calc(var(--i) * 140ms + 150ms); }
@keyframes artDraw { to { stroke-dashoffset: 0; } }
.neuron-art .nd { fill: #f2f2f0; transform-box: fill-box; transform-origin: center; animation: ndIn .8s cubic-bezier(.2,1.4,.35,1) both, ndBreathe 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * 120ms), calc(var(--i) * 300ms + 1.2s); }
.neuron-art .halo { fill: none; stroke: rgba(242,242,240,.4); stroke-width: .6; transform-box: fill-box; transform-origin: center; opacity: 0; animation: halo 3.6s ease-out infinite; animation-delay: calc(var(--i) * 450ms + 1.4s); }
.neuron-art .sig { fill: #fff; filter: drop-shadow(0 0 3px #fff); opacity: .9; }
@keyframes ndIn { from { transform: scale(0); opacity: 0; } }
@keyframes ndBreathe { 50% { opacity: .45; } }
@keyframes halo { 0% { opacity: .7; transform: scale(.3); } 70%, 100% { opacity: 0; transform: scale(1.6); } }
.login-art { max-width: 220px; margin: -4px auto 8px; }
.empty-state .neuron-art.big { max-width: 300px; margin-bottom: 18px; }
.cards .none .neuron-art { max-width: 200px; margin: 6px 0 14px; }
li.empty .neuron-art.mini { max-width: 140px; margin: 4px 0 10px; opacity: .8; }
.cards .none { text-align: center; }
@media (prefers-reduced-motion: reduce) { #svgWarp { display: none; } .neuron-art .ln path { stroke-dashoffset: 0; } }

/* 窄屏：相关度图例挪到标题下方，操作提示隐藏，避免和左上角标志重叠 */
@media (max-width: 1000px) { .graph-legend { top: calc(70px + env(safe-area-inset-top, 0px)); } .graph-legend b { display: none; } }
body.pad:not(.side-off) .graph-legend { top: calc(26px + env(safe-area-inset-top, 0px)); }

/* ======================= 无缝转场（View Transitions） ======================= */
/* 固定元素各自独立：侧栏不动，输入框在首页与底部之间无缝滑行，详情面板/弹窗单独动画 */
html.vt-on #side { view-transition-name: side; }
html.vt-on #dock { view-transition-name: dock; }
html.vt-on #panel { view-transition-name: panel; }
html.vt-on .sheet-wrap:not([hidden]) > .sheet { view-transition-name: sheet; }
html.vt-on .graph-legend { view-transition-name: legend; }
/* 有了无缝转场就不再叠加旧的入场动画 */
html.vt-on .home.enter .home-inner, html.vt-on .thread.enter #threadInner, html.vt-on #net.zoom-in,
html.vt-on .panel.enter, html.vt-on .panel.enter > *, html.vt-on .sheet-wrap:not([hidden]), html.vt-on .sheet-wrap:not([hidden]) > .sheet,
html.vt-on .settings .set-main > .set-sec, html.vt-on .settings .set-side > * { animation: none; }
#svgWarp { display: none !important; }

::view-transition-group(*) { animation-duration: .72s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
::view-transition-old(*), ::view-transition-new(*) { animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
::view-transition-old(side), ::view-transition-new(side) { animation: none; }
::view-transition-group(dock) { animation-duration: .8s; }

/* 上升：首页 → 对话 */
html[data-vt="rise"]::view-transition-old(root) { animation: .55s cubic-bezier(.4,0,.2,1) both vtUpOut; }
html[data-vt="rise"]::view-transition-new(root) { animation: .8s cubic-bezier(.16,1,.3,1) .05s both vtUpIn; }
@keyframes vtUpOut { to { opacity: 0; transform: translateY(-48px); filter: blur(8px); } }
@keyframes vtUpIn { from { opacity: 0; transform: translateY(70px); } }
/* 下沉：对话 → 首页 */
html[data-vt="sink"]::view-transition-old(root) { animation: .55s cubic-bezier(.4,0,.2,1) both vtDownOut; }
html[data-vt="sink"]::view-transition-new(root) { animation: .85s cubic-bezier(.16,1,.3,1) .05s both vtDownIn; }
@keyframes vtDownOut { to { opacity: 0; transform: translateY(60px) scale(.98); } }
@keyframes vtDownIn { from { opacity: 0; transform: translateY(-36px) scale(1.02); filter: blur(6px); } }
/* 潜入：进入知识网络，旧画面迎面穿过，网络从远处推近 */
html[data-vt="dive"]::view-transition-old(root) { animation: .6s cubic-bezier(.4,0,.2,1) both vtDiveOut; }
html[data-vt="dive"]::view-transition-new(root) { animation: .95s cubic-bezier(.16,1,.3,1) both vtDiveIn; }
@keyframes vtDiveOut { to { opacity: 0; transform: scale(1.18); filter: blur(14px); } }
@keyframes vtDiveIn { from { opacity: 0; transform: scale(.86); filter: blur(4px); } }
/* 浮出：离开知识网络，网络退向远处，新页面从前方落下 */
html[data-vt="surface"]::view-transition-old(root) { animation: .6s cubic-bezier(.4,0,.2,1) both vtSurfOut; }
html[data-vt="surface"]::view-transition-new(root) { animation: .9s cubic-bezier(.16,1,.3,1) .04s both vtSurfIn; }
@keyframes vtSurfOut { to { opacity: 0; transform: scale(.82); filter: blur(6px); } }
@keyframes vtSurfIn { from { opacity: 0; transform: scale(1.1); filter: blur(10px); } }
/* 横滑：切换历史对话 */
html[data-vt="slide"]::view-transition-old(root) { animation: .5s cubic-bezier(.4,0,.2,1) both vtSlideOut; }
html[data-vt="slide"]::view-transition-new(root) { animation: .75s cubic-bezier(.16,1,.3,1) both vtSlideIn; }
@keyframes vtSlideOut { to { opacity: 0; transform: translateX(-80px); } }
@keyframes vtSlideIn { from { opacity: 0; transform: translateX(90px); } }
/* 展开 / 收回：设置与分享 */
html[data-vt="sheet-in"]::view-transition-old(root) { animation: .6s ease both vtDim; }
html[data-vt="sheet-in"]::view-transition-new(root) { animation: none; }
html[data-vt="sheet-in"]::view-transition-new(sheet) { animation: .75s cubic-bezier(.16,1,.3,1) both vtSheetIn; }
@keyframes vtDim { to { opacity: .35; filter: blur(6px); } }
@keyframes vtSheetIn { from { opacity: 0; clip-path: inset(46% 46% 46% 46% round 28px); transform: scale(.94); } to { clip-path: inset(0 0 0 0 round 28px); } }
html[data-vt="sheet-out"]::view-transition-old(sheet) { animation: .45s cubic-bezier(.4,0,.2,1) both vtSheetOut; }
html[data-vt="sheet-out"]::view-transition-new(root) { animation: .5s ease both vtUndim; }
html[data-vt="sheet-out"]::view-transition-old(root) { animation: none; opacity: 0; }
@keyframes vtSheetOut { to { opacity: 0; clip-path: inset(40% 30% 40% 30% round 28px); transform: scale(.96); } }
@keyframes vtUndim { from { opacity: .35; filter: blur(6px); } }
/* 详情面板：首次滑入、关闭滑出、换节点时原地变形 */
html[data-vt^="panel"]::view-transition-old(root), html[data-vt^="panel"]::view-transition-new(root),
html[data-vt="morph"]::view-transition-old(root), html[data-vt="morph"]::view-transition-new(root) { animation: none; }
html[data-vt="panel-in"]::view-transition-new(panel) { animation: .7s cubic-bezier(.16,1,.3,1) both vtPanelIn; }
html[data-vt="panel-out"]::view-transition-old(panel) { animation: .4s cubic-bezier(.4,0,.2,1) both vtPanelOut; }
@keyframes vtPanelIn { from { opacity: 0; transform: translateX(-30px); clip-path: inset(0 100% 0 0 round 18px); } to { clip-path: inset(0 0 0 0 round 18px); } }
@keyframes vtPanelOut { to { opacity: 0; transform: translateX(-24px); } }
body.pad html[data-vt="panel-in"]::view-transition-new(panel) { animation-name: vtPanelInR; }
@keyframes vtPanelInR { from { opacity: 0; transform: translateX(30px); } }
html[data-vt="morph"]::view-transition-old(panel) { animation: .35s ease both vtMorphOut; }
html[data-vt="morph"]::view-transition-new(panel) { animation: .6s cubic-bezier(.16,1,.3,1) .08s both vtMorphIn; }
@keyframes vtMorphOut { to { opacity: 0; transform: translateY(-10px); filter: blur(6px); } }
@keyframes vtMorphIn { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }

/* 输入框转场：只保留一张画面平滑变形，不出现重影 */
::view-transition-old(dock) { display: none; }
::view-transition-new(dock) { animation: none; }
/* 弹窗展开/收回时，侧栏也一起变暗/恢复 */
html[data-vt="sheet-in"]::view-transition-old(side) { animation: .6s ease both vtDim; }
html[data-vt="sheet-in"]::view-transition-new(side) { opacity: 0; }
html[data-vt="sheet-out"]::view-transition-old(side) { opacity: 0; }
html[data-vt="sheet-out"]::view-transition-new(side) { animation: .5s ease both vtUndim; }

/* 主页：纯黑背景，不显示后面的知识网络 */
body.view-home, html:has(body.view-home) { background: #000; }
body.view-home #net { opacity: 0 !important; }
body.view-home .home { background: #000; }

/* ===== 知识网络：编辑式数据标注 ===== */
.net-hud { position: fixed; left: calc(var(--l, 0px) + 30px); bottom: calc(150px + var(--safe-b)); z-index: 4; width: 260px; pointer-events: none; display: none; color: var(--ink); transition: left .55s var(--ease); }
body.view-graph .net-hud { display: block; animation: fadeUp 1s var(--out, ease) .3s both; }
.hud-title { font: 400 15px/1.15 "Noto Serif SC", "Source Han Serif SC", Georgia, serif; letter-spacing: .01em; margin-bottom: 14px; }
.hud-row { display: grid; grid-template-columns: 42px 44px 1fr; align-items: center; height: 24px; }
.hud-row b { font: 400 19px "Noto Serif SC", Georgia, serif; text-align: right; padding-right: 6px; }
.hud-row em { font: 400 9px var(--mono); font-style: normal; color: var(--ink-3); letter-spacing: .08em; line-height: 1.1; }
.hud-row .rule { position: relative; height: 1px; background: rgba(255,255,255,.12); }
.hud-row .rule i { position: absolute; left: 0; top: 0; height: 1px; width: calc(var(--p, .5) * 100%); background: rgba(255,255,255,.75); transition: width 1.2s var(--out, ease); }
.hud-row .rule i::after { content: ""; position: absolute; right: -7px; top: -7px; width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(255,255,255,.85); }
.hud-axis { display: flex; justify-content: space-between; margin: 12px 0 0 86px; font: 400 8.5px var(--mono); color: var(--ink-3); letter-spacing: .14em; }
@media (max-width: 900px) { .net-hud { display: none !important; } }

/* ======================= 渲染性能 ======================= */
/* 背景画布每帧都在动：压在它上面的“磨砂玻璃”每帧都要重新模糊，是卡顿的主要来源。
   这些固定层改成不透明的深色底，观感几乎一样，但 GPU 负担小得多 */
body.pad .side { background: #0d0d0e; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.view-graph .panel.glass, body.view-chat .panel.glass { background: rgba(15,15,17,.96); backdrop-filter: none; -webkit-backdrop-filter: none; }
body:not(.view-home) .dock .liquid-refract { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(17,17,19,.94); }
.liquid-refract { backdrop-filter: blur(16px) saturate(140%) !important; }   /* 不再使用 SVG 位移滤镜（极耗性能） */
body.view-home #net, body.view-chat #net { filter: none !important; }
.toast { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(28,28,30,.97); }
/* 画布独立成层，避免带动整页重绘 */
#net { will-change: transform; contain: strict; }
.home, .thread, body.pad .side { contain: layout paint; }
.home-inner, #threadInner { contain: layout; }
/* 转场里的模糊减轻（全屏模糊非常耗时） */
@keyframes vtDiveOut { to { opacity: 0; transform: scale(1.18); filter: blur(5px); } }
@keyframes vtSurfIn { from { opacity: 0; transform: scale(1.1); filter: blur(4px); } }
@keyframes vtUpOut { to { opacity: 0; transform: translateY(-48px); } }
@keyframes vtDownIn { from { opacity: 0; transform: translateY(-36px) scale(1.02); } }
@keyframes vtDim { to { opacity: .35; } }
@keyframes vtUndim { from { opacity: .35; } }
@keyframes viewIn { from { opacity: 0; transform: translateY(22px) scale(.985); } }

/* 分享：一键开放 */
.mrow.quick .mcat { font-weight: 400; color: var(--ink); }
.mrow.quick .mcat i.q { background: none; border: 1px solid var(--ink); }
.mrow.quick .mcat em { font-style: normal; font: 400 10px var(--mono); color: var(--ink-3); margin-left: 8px; letter-spacing: .04em; }
.matrix .mdiv { height: .5px; background: var(--hair); margin: 10px 0 14px; }
.mrow.quick .mcat { white-space: nowrap; flex-wrap: wrap; row-gap: 2px; }
.mrow.quick .mcat em { flex-basis: 100%; order: 5; margin: 2px 0 0 16px; white-space: nowrap; }

/* 网络通道 */
.settings #netBox h3 { margin: 6px 0 14px; }
.settings #netBox h3 ~ h3 { margin-top: 34px; }
.settings .net-modes { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 14px; }
.settings #netCustomRow { display: block; margin: 0 0 6px; } .settings #netCustomRow[hidden] { display: none; }
.settings #netCustomRow input { height: 46px; border-radius: 13px; font-size: 15px; padding: 0 14px; width: 100%; }
.lan-list .av { font-size: 13px; }
.lan-list b { font-family: var(--mono); font-weight: 400; letter-spacing: .02em; }
#netBox .row-btns { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 6px 0 14px; }

/* 流式回答：末尾一个呼吸的光标 */
.msg.ai.streaming .a .caret { display: inline-block; width: 7px; height: 1.05em; margin-left: 3px; vertical-align: -0.15em; background: var(--ink); border-radius: 1px; animation: caretBlink 1s steps(2) infinite; }
.msg.ai.streaming .a > :nth-last-child(2) { display: inline; }
@keyframes caretBlink { 50% { opacity: 0; } }

/* ======================= 主题：紙（浅色纸面 · 黑墨 · 构成线） ======================= */
/* 以下由夜间主题自动换算（白墨→黑墨、深色面→纸色），再在后面手工调整 */
body.paper::after { background:radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,0.121)) }
body.paper .glass { background:rgba(226,225,222,0.62); box-shadow:0 30px 80px -20px rgba(0,0,0,0.132) }
body.paper .liquid { box-shadow:0 20px 50px -12px rgba(0,0,0,0.154), 0 0 0 .5px rgba(14,14,14,0.12) }
body.paper .liquid:focus-within { box-shadow:0 26px 60px -12px rgba(0,0,0,0.176), 0 0 0 .5px rgba(14,14,14,0.22) }
body.paper .liquid-tint { background:rgba(14,14,14,0.045) }
body.paper .liquid-shine { box-shadow:inset 0 .5px 0 rgba(14,14,14,0.35), inset 0 -.5px 0 rgba(14,14,14,0.08); background:linear-gradient(180deg, rgba(14,14,14,0.07), transparent 55%) }
body.paper .mode:hover { background:rgba(14,14,14,0.05) }
body.paper .send { color:#e6e5e2 }
body.paper .login { background:rgba(230,229,226,0.5) }
body.paper .login button { color:#e6e5e2 }
body.paper.pad .side { background:rgba(228,227,224,0.72) }
body.paper .side-search { background:rgba(14,14,14,0.045) }
body.paper .side-search:focus-within { background:rgba(14,14,14,0.08) }
body.paper .grp-h:active { background:rgba(14,14,14,0.05) }
body.paper .grp li:active { background:rgba(14,14,14,0.05) }
body.paper .grp li.on { background:rgba(14,14,14,0.08) }
body.paper.pad .side-toggle:active { background:rgba(14,14,14,0.06) }
body.paper.pad .panel { background:rgba(228,227,224,0.78) }
@media (max-width: 999px) {
body.paper.pad .panel { box-shadow:0 30px 80px -20px rgba(0,0,0,0.154) }
}
body.paper .sheet-wrap { background:rgba(230,229,226,0.45) }
body.paper .primary { color:#e6e5e2 }
body.paper .limits .bar { background:rgba(14,14,14,0.08) }
body.paper .chip:hover { border-color:rgba(14,14,14,0.2) }
body.paper .chip.on { border-color:rgba(14,14,14,0.32); background:rgba(14,14,14,0.06) }
body.paper .people .av { border:.5px solid rgba(14,14,14,0.25) }
body.paper .add-person input, body.paper .add-person select { background:rgba(14,14,14,0.04) }
body.paper .add-person input:focus, body.paper .add-person select:focus { border-color:rgba(14,14,14,0.28) }
body.paper .invite { background:rgba(14,14,14,0.04) }
body.paper .boot { background:radial-gradient(80% 70% at 50% 45%, #e2e1de, var(--bg) 70%) }
body.paper .chev .c-base polyline { stroke:rgba(14,14,14,0.1) }
body.paper .chev .c-step polyline { stroke:rgba(14,14,14,0.9) }
body.paper .chev .c-lit polyline { stroke:#0e0e0e; filter:drop-shadow(0 0 4px rgba(14,14,14,0.55)) }
body.paper .boot-word { color:rgba(14,14,14,0.82) }
body.paper .boot-line { background:rgba(14,14,14,0.08) }
body.paper .boot-line i { background:linear-gradient(90deg, transparent, rgba(14,14,14,0.7), transparent) }
body.paper .answer .expand:hover { background:rgba(14,14,14,0.05) }
body.paper.pad .side { background:rgba(227,226,223,0.86) }
body.paper .side-nav button:hover { background:rgba(14,14,14,0.045) }
body.paper .side-nav button.on { background:rgba(14,14,14,0.075) }
body.paper .recent li:hover { background:rgba(14,14,14,0.045) }
body.paper .recent li.on { background:rgba(14,14,14,0.075) }
body.paper .side-user:hover { background:rgba(14,14,14,0.03) }
body.paper .side-user .av { background:linear-gradient(140deg, rgba(14,14,14,0.16), rgba(14,14,14,0.04)); border:.5px solid rgba(14,14,14,0.2) }
body.paper .card { background:rgba(14,14,14,0.025) }
body.paper .card:hover { background:rgba(14,14,14,0.05); border-color:rgba(14,14,14,0.16) }
body.paper .composer .tool:hover { background:rgba(14,14,14,0.07) }
body.paper .msg.user { background:rgba(14,14,14,0.065) }
body.paper .msg.ai .cites button:hover { border-color:rgba(14,14,14,0.25); background:rgba(14,14,14,0.04) }
body.paper .toast { background:rgba(220,219,216,0.92) }
@media (max-width: 767px) {
body.paper.pad .side { box-shadow:30px 0 80px rgba(0,0,0,0.132) }
body.paper.pad:not(.side-off)::after { background:rgba(0,0,0,0.099) }
}
body.paper .prov:hover { border-color:rgba(14,14,14,0.2) }
body.paper .prov.on { border-color:rgba(14,14,14,0.4); background:rgba(14,14,14,0.05) }
body.paper .prov.on i { box-shadow:inset 0 0 0 3px #e0dfdc, inset 0 0 0 6px var(--ink) }
body.paper .ai-owner input[type=password], body.paper .ai-owner input[type=number], body.paper .ai-owner select { background:rgba(14,14,14,0.04) }
body.paper .toggle input { background:rgba(14,14,14,0.12) }
body.paper .store-bar { background:rgba(14,14,14,0.07) }
body.paper .primary.is-busy::after { border:1.4px solid #e6e5e2 }
body.paper .login button.is-busy::after { border:1.4px solid #e6e5e2 }
body.paper .graph-legend i { background:linear-gradient(90deg, rgba(150,158,175,.06), rgba(14,14,14,0.4), rgba(14,14,14,0.95)); box-shadow:0 0 8px rgba(14,14,14,0.15) }
body.paper .settings-wrap { background:rgba(233,232,229,0.62) }
body.paper .settings .close:hover { background:rgba(14,14,14,0.06) }
body.paper .set-side { background:rgba(14,14,14,0.018) }
body.paper .set-brand i { box-shadow:0 0 10px rgba(14,14,14,0.6) }
body.paper .me-av { border:.5px solid rgba(14,14,14,0.28); background:radial-gradient(circle at 30% 25%, rgba(14,14,14,0.14), rgba(14,14,14,0.02)) }
body.paper .set-card { background:rgba(14,14,14,0.025) }
body.paper .set-nav a:hover { background:rgba(14,14,14,0.03) }
body.paper .set-nav a.on { background:rgba(14,14,14,0.06) }
body.paper .settings .ai-owner select option { background:#e0dfdc }
body.paper .set-rows { background:rgba(14,14,14,0.02) }
body.paper .text-btn.outline { border:.5px solid rgba(14,14,14,0.22) }
body.paper .text-btn.outline:hover { border-color:rgba(14,14,14,0.45) }
body.paper .set-main, body.paper .set-side, body.paper .sheet { scrollbar-color:rgba(14,14,14,0.16) transparent }
body.paper .set-main::-webkit-scrollbar-thumb, body.paper .set-side::-webkit-scrollbar-thumb, body.paper .sheet::-webkit-scrollbar-thumb { background:rgba(14,14,14,0.14) }
body.paper input:-webkit-autofill, body.paper input:-webkit-autofill:hover, body.paper input:-webkit-autofill:focus { -webkit-box-shadow:0 0 0 100px #dddcd9 inset }
body.paper .msg.ai .a pre, body.paper #aBody pre { background:rgba(14,14,14,0.04) }
body.paper .msg.ai .a code.ic, body.paper #aBody code.ic { background:rgba(14,14,14,0.07) }
body.paper #warp i { background:linear-gradient(90deg, transparent, rgba(14,14,14,0.035) 35%, rgba(14,14,14,0.09) 50%, rgba(14,14,14,0.035) 65%, transparent) }
body.paper .card::before { background:radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(14,14,14,0.085), transparent 60%) }
body.paper .card::after { background:radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(14,14,14,0.35), transparent 60%); -webkit-mask:linear-gradient(rgba(0,0,0,0.22) 0 0) content-box, linear-gradient(rgba(0,0,0,0.22) 0 0) }
body.paper #send::after { border:1px solid rgba(14,14,14,0.6) }
body.paper .dock:focus-within { box-shadow:0 0 0 .5px rgba(14,14,14,0.18), 0 20px 60px -20px rgba(14,14,14,0.08), 0 30px 80px -30px rgba(0,0,0,0.176) }
body.paper #svgWarp { background:radial-gradient(ellipse at center, rgba(230,229,226,0.72), rgba(230,229,226,0.38) 70%) }
body.paper #svgWarp .nerves path { stroke:#0e0e0e }
body.paper #svgWarp .sparks circle { fill:#0e0e0e; filter:drop-shadow(0 0 6px rgba(14,14,14,0.9)) }
body.paper #svgWarp .chev polyline { stroke:#0e0e0e; filter:drop-shadow(0 0 18px rgba(14,14,14,0.35)) }
body.paper .neuron-art .ln path { stroke:rgba(14,14,14,0.32) }
body.paper .neuron-art .nd { fill:#0e0e0e }
body.paper .neuron-art .halo { stroke:rgba(14,14,14,0.4) }
body.paper .neuron-art .sig { fill:#0e0e0e; filter:drop-shadow(0 0 3px #0e0e0e) }
body.paper.view-home, body.paper html:has(body.view-home) { background:rgba(0,0,0,0.22) }
body.paper.view-home .home { background:rgba(0,0,0,0.22) }
body.paper .hud-row .rule { background:rgba(14,14,14,0.12) }
body.paper .hud-row .rule i { background:rgba(14,14,14,0.75) }
body.paper .hud-row .rule i::after { border:1px solid rgba(14,14,14,0.85) }
body.paper.pad .side { background:#e5e4e1 }
body.paper.view-graph .panel.glass, body.paper.view-chat .panel.glass { background:rgba(227,226,223,0.96) }
body.paper:not(.view-home) .dock .liquid-refract { background:rgba(226,225,222,0.94) }
body.paper .toast { background:rgba(220,219,216,0.97) }

body.paper {
  --bg: #e6e5e1;
  --ink: #0e0e0e;
  --ink-2: rgba(14, 14, 14, .64);
  --ink-3: rgba(14, 14, 14, .42);
  --hair: rgba(14, 14, 14, .14);
  background: var(--bg);
}
html:has(body.paper) { background: #e6e5e1; }
body.paper.view-home, html:has(body.paper.view-home) { background: #e6e5e1; }
body.paper.view-home .home { background: transparent; }
/* 纸张颗粒：铺在最上层、乘法混合，像印刷品一样 */
body.paper::before {
  content: ""; position: fixed; inset: -50%; z-index: 80; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.paper::after { background: radial-gradient(120% 95% at 50% 40%, transparent 55%, rgba(0,0,0,.07)); }
/* 构成线：几条贯穿画面的发丝线和两个大圆，参考海报的版式网格 */
#guides { position: fixed; inset: 0; pointer-events: none; z-index: 1; display: none; }
body.paper #guides { display: block; }
#guides i { position: absolute; background: rgba(14,14,14,.16); }
#guides .v { top: 0; bottom: 0; width: .5px; } #guides .h { left: 0; right: 0; height: .5px; }
#guides .c { border-radius: 50%; background: none; border: .5px solid rgba(14,14,14,.18); }
body.paper.view-graph #guides { opacity: .7; }
body.paper.view-chat #guides { opacity: .45; }

/* 字体：粗黑、紧凑的无衬线，像海报标题 */
body.paper .greet { font-weight: 700; letter-spacing: -.035em; color: #0b0b0b; }
body.paper .greet em { font-family: var(--font); font-style: normal; font-weight: 300; letter-spacing: -.01em; color: var(--ink-2); }
body.paper .brand { font-weight: 700; letter-spacing: .28em; }
body.paper .set-sec h4, body.paper .settings .me-name { font-weight: 700; letter-spacing: -.02em; }
body.paper .hud-title, body.paper .hud-row b { font-family: var(--font); font-weight: 700; letter-spacing: -.02em; }

/* 卡片：黑色卡片 + 白色斜体粗标题（参考海报里的 “Pile up” 卡片） */
body.paper .card { --ink: #f1f0ec; --ink-2: rgba(241,240,236,.66); --ink-3: rgba(241,240,236,.42); --hair: rgba(255,255,255,.14);
  background: #0e0e0e; color: var(--ink); border-color: transparent; box-shadow: 0 18px 40px -22px rgba(0,0,0,.45); }
body.paper .card b, body.paper .card h3, body.paper .card .t { font-style: italic; font-weight: 700; letter-spacing: -.01em; }
body.paper .card::before { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.10), transparent 60%); }
body.paper .card::after { background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.45), transparent 60%); }
body.paper .card:hover { transform: translateY(-4px) rotate(-.6deg); }

/* 输入框：细黑边的胶囊，像海报里描边的 “Disorderly” */
body.paper .dock .liquid-refract, body.paper:not(.view-home) .dock .liquid-refract { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(236,235,231,.92) !important; }
body.paper .liquid { box-shadow: 0 0 0 1px #0e0e0e, 0 24px 50px -30px rgba(0,0,0,.35); }
body.paper .liquid:focus-within { box-shadow: 0 0 0 1.5px #0e0e0e, 0 28px 60px -30px rgba(0,0,0,.45); }
body.paper .dock:focus-within { box-shadow: none; }
body.paper #send { background: #0e0e0e; color: #ecebe7; }

/* 侧栏 / 面板 / 弹窗：纸色实底 + 细黑线 */
body.paper.pad .side { background: #e3e2de; border-right: .5px solid rgba(14,14,14,.18); }
body.paper .panel.glass, body.paper.pad .panel, body.paper.view-graph .panel.glass, body.paper.view-chat .panel.glass { background: #ebeae6; border: .5px solid rgba(14,14,14,.22); }
body.paper .sheet.glass { background: #ebeae6; border: .5px solid rgba(14,14,14,.24); box-shadow: 0 40px 100px -30px rgba(0,0,0,.35); }
body.paper .settings-wrap, body.paper .sheet-wrap { background: rgba(230,229,225,.55); }
body.paper .set-side { background: rgba(14,14,14,.025); }
body.paper .primary { background: #0e0e0e; color: #ecebe7; }
body.paper .prov.on { background: #0e0e0e; color: #ecebe7; --ink: #ecebe7; --ink-2: rgba(236,235,231,.7); --ink-3: rgba(236,235,231,.5); }
body.paper .chip.on { background: #0e0e0e; color: #ecebe7; border-color: #0e0e0e; }
body.paper input:-webkit-autofill { -webkit-text-fill-color: #0e0e0e; -webkit-box-shadow: 0 0 0 100px #ebeae6 inset; }
body.paper .settings .ai-owner select option { background: #ebeae6; color: #0e0e0e; }
body.paper .toast { background: #0e0e0e; color: #ecebe7; }
body.paper .msg.user { background: #0e0e0e; color: #ecebe7; }
body.paper .msg.ai .a pre, body.paper #aBody pre { background: rgba(14,14,14,.04); }
body.paper .graph-legend i { background: linear-gradient(90deg, rgba(14,14,14,.06), rgba(14,14,14,.35), rgba(14,14,14,.95)); box-shadow: none; }
body.paper .hud-row .rule { background: rgba(14,14,14,.14); } body.paper .hud-row .rule i { background: #0e0e0e; } body.paper .hud-row .rule i::after { border-color: #0e0e0e; }
body.paper .neuron-art .nd, body.paper .neuron-art .sig { fill: #0e0e0e; filter: none; }
body.paper .neuron-art .ln path { stroke: rgba(14,14,14,.4); } body.paper .neuron-art .halo { stroke: rgba(14,14,14,.4); }
body.paper .boot { background: #e6e5e1; }

/* 外观切换 */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.theme-pick button { position: relative; height: 120px; border-radius: 16px; overflow: hidden; text-align: left; padding: 14px 16px; border: .5px solid var(--hair); transition: transform .35s var(--spring, ease), box-shadow .3s; }
.theme-pick button b { position: relative; display: block; font-size: 15px; font-weight: 700; } .theme-pick button em { position: relative; font-style: normal; font: 400 10px var(--mono); letter-spacing: .1em; opacity: .6; }
.theme-pick .t-paper { background: #e6e5e1; color: #0e0e0e; }
.theme-pick .t-paper::before { content: ""; position: absolute; right: -20px; bottom: -30px; width: 130px; height: 130px; border-radius: 50%; border: .5px solid rgba(0,0,0,.4); }
.theme-pick .t-paper::after { content: ""; position: absolute; right: 34px; bottom: 28px; width: 64px; height: 16px; border-radius: 50%; background: #0e0e0e; transform: rotate(32deg); }
.theme-pick .t-night { background: #0a0a0b; color: #f2f2f0; }
.theme-pick .t-night::after { content: ""; position: absolute; right: 26px; bottom: 26px; width: 90px; height: 36px; background: radial-gradient(closest-side, rgba(255,255,255,.5), transparent); filter: blur(4px); }
.theme-pick button.on { box-shadow: 0 0 0 1.5px var(--ink); }
.theme-pick button:hover { transform: translateY(-2px); }

/* 切换主题：从点击处像墨水一样晕开 */
html[data-vt="theme"]::view-transition-old(root), html[data-vt="theme"]::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html[data-vt="theme"]::view-transition-new(root) { animation: themeIn .9s cubic-bezier(.16,1,.3,1) both; }
html[data-vt="theme"]::view-transition-old(side), html[data-vt="theme"]::view-transition-new(side), html[data-vt="theme"]::view-transition-old(dock), html[data-vt="theme"]::view-transition-new(dock), html[data-vt="theme"]::view-transition-new(sheet) { animation: none; }
@keyframes themeIn { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(150% at 50% 50%); } }

/* ======================= 明日方舟官网式动效 ======================= */
/* 侧栏：中文 + 英文小字（INDEX 首页 的做法反过来） */
.side-nav .nl { display: flex; flex-direction: column; line-height: 1.15; }
.side-nav .nl small { font: 500 8.5px var(--mono); letter-spacing: .22em; color: var(--ink-3); margin-top: 3px; transition: color .3s, letter-spacing .4s var(--out, ease); }
.side-nav > *:hover .nl small, .side-nav > .on .nl small { color: var(--ink-2); letter-spacing: .3em; }

/* 开场：十字发丝线 + 底部细进度条 + LOADING ~ 百分比 */
.boot .bk-h { position: absolute; left: 0; right: 0; top: 13.5%; height: 1px; background: rgba(255,255,255,.14); transform-origin: left; animation: bkLine 1.1s cubic-bezier(.7,0,.3,1) both; }
.boot .bk-v { position: absolute; top: 0; bottom: 0; right: 10%; width: 1px; background: rgba(255,255,255,.14); transform-origin: top; animation: bkLineV 1.1s cubic-bezier(.7,0,.3,1) .15s both; }
@keyframes bkLine { from { transform: scaleX(0); } } @keyframes bkLineV { from { transform: scaleY(0); } }
.boot .bk-bar { position: absolute; left: 33%; right: 10%; bottom: 29%; }
.boot .bk-track { position: relative; height: 3px; background: rgba(255,255,255,.12); }
.boot .bk-track::after { content: ""; position: absolute; right: -3px; top: -2px; width: 7px; height: 7px; background: rgba(255,255,255,.5); }
.boot .bk-track i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 12px rgba(255,255,255,.4); }
.boot .bk-meta { display: flex; justify-content: space-between; margin-top: 10px; font: 400 9px var(--mono); letter-spacing: .16em; color: var(--ink-3); }
.boot .bk-meta b { color: var(--ink); font-weight: 500; }
.boot .bk-copy { position: absolute; left: 6%; bottom: 29%; transform: translateY(6px); font: 600 9px var(--mono); letter-spacing: .14em; color: var(--ink-3); }
@media (max-width: 700px) { .boot .bk-bar { left: 10%; } .boot .bk-copy { display: none; } }

/* 右侧分区编号：01 / 04  HOME 首页 —— 切换时数字翻牌、文字从左展开 */
.hud-rail { position: fixed; right: 0; top: 0; bottom: 0; width: 64px; z-index: 6; pointer-events: none; display: none; }
@media (min-width: 1180px) { .hud-rail { display: block; } }
.hud-rail .hr-line { position: absolute; left: 0; top: 0; bottom: 0; width: .5px; background: var(--hair); }
.hud-rail .hr-num { position: absolute; top: 30%; right: 14px; text-align: right; overflow: hidden; }
.hud-rail .hr-num b { display: block; font: 700 30px/1 var(--font); letter-spacing: -.04em; color: var(--ink); }
.hud-rail .hr-num span { font: 400 9px var(--mono); color: var(--ink-3); letter-spacing: .1em; }
.hud-rail .hr-label { position: absolute; top: calc(30% + 52px); right: 14px; writing-mode: vertical-rl; font: 600 9px var(--mono); letter-spacing: .3em; color: var(--ink-2); }
.hud-rail .hr-label em { font-style: normal; font-family: var(--font); letter-spacing: .2em; margin-top: 8px; color: var(--ink-3); }
body.view-graph .hud-rail { opacity: .8; }
body:has(#panel:not([hidden])).view-graph .hud-rail { opacity: 0; transition: opacity .3s; }

/* 快门转场：一块面板带亮边扫过整个画面，中间写着要去的分区 */
.shutter { position: fixed; inset: 0; z-index: 55; pointer-events: none; display: none; background: #101012; }
.shutter.on { display: block; }
.shutter .sh-edge { position: absolute; background: var(--ink); box-shadow: 0 0 24px rgba(255,255,255,.5); }
.shutter.horz .sh-edge { top: 0; bottom: 0; right: -2px; width: 3px; } .shutter.horz.rev .sh-edge { right: auto; left: -2px; }
.shutter.vert .sh-edge { left: 0; right: 0; bottom: -2px; height: 3px; } .shutter.vert.rev .sh-edge { bottom: auto; top: -2px; }
.shutter .sh-text { position: absolute; left: 8%; bottom: 14%; color: var(--ink); }
.shutter .sh-text b { display: block; font: 700 clamp(64px, 11vw, 160px)/0.9 var(--font); letter-spacing: -.05em; }
.shutter .sh-text span { display: block; margin-top: 14px; font: 700 clamp(18px, 2.4vw, 34px) var(--font); letter-spacing: .12em; }
.shutter .sh-text em { display: block; margin-top: 6px; font: 400 12px var(--mono); font-style: normal; letter-spacing: .3em; color: rgba(242,242,240,.5); }
.shutter::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 4px); }
body.paper .shutter { background: #0e0e0e; }

/* 背景巨字：描边的超大英文，像官网的 “RHO” 一样缓慢横移 */
.marquee { position: fixed; left: 0; right: 0; bottom: -4vw; z-index: 0; pointer-events: none; overflow: hidden; opacity: .07; }
.marquee div { display: flex; width: max-content; animation: marq 60s linear infinite; }
.marquee span { font: 800 26vw/1 var(--font); letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px var(--ink); padding-right: 6vw; white-space: nowrap; }
@keyframes marq { to { transform: translateX(-50%); } }
body.view-graph .marquee { opacity: .035; }
body.paper .marquee { opacity: .09; }

/* 新分区内容：像官网一样分层淡入（1s ease），有先有后 */
.home.ak-in .greet, .home.ak-in .composer-slot, .home.ak-in .home-meta, .home.ak-in .sec-h, .home.ak-in #cards { animation: akIn 1s ease both; }
.home.ak-in .composer-slot { animation-delay: .08s } .home.ak-in .home-meta { animation-delay: .16s } .home.ak-in .sec-h { animation-delay: .22s } .home.ak-in #cards { animation-delay: .3s }
.thread.ak-in #threadInner > * { animation: akIn .9s ease both; }
.thread.ak-in #threadInner > *:nth-child(2) { animation-delay: .1s } .thread.ak-in #threadInner > *:nth-child(n+3) { animation-delay: .18s }
@keyframes akIn { from { opacity: 0; transform: translateX(-28px); } }
@media (prefers-reduced-motion: reduce) { .marquee div { animation: none; } .shutter { display: none !important; } }
body.view-home .home { background: transparent; }

/* ======================= 搜索面板 ======================= */
.finder-wrap { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: max(9vh, 40px) 20px 20px; background: rgba(6,6,7,.62); animation: wrapIn .35s ease both; }
.finder { width: min(760px, 100%); max-height: min(76vh, 760px); display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: #141416; border: .5px solid rgba(255,255,255,.12); box-shadow: 0 40px 120px -30px rgba(0,0,0,.85); animation: finderIn .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes finderIn { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
.finder-wrap.leaving { animation: wrapOut .22s ease-in both; } .finder-wrap.leaving .finder { animation: sheetOut .22s ease-in both; }
.f-top { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: .5px solid var(--hair); }
.f-top svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.3; flex: none; }
.f-top input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 300 21px var(--font); }
.f-top input::placeholder { color: var(--ink-3); }
.f-count { font: 400 10px var(--mono); color: var(--ink-3); letter-spacing: .06em; white-space: nowrap; }
.finder kbd { font: 400 9.5px var(--mono); color: var(--ink-3); border: .5px solid var(--hair); border-radius: 5px; padding: 2px 6px; }
.f-filters { display: flex; gap: 6px; padding: 12px 18px; border-bottom: .5px solid var(--hair); overflow-x: auto; }
.f-filters button { padding: 6px 13px; border-radius: 999px; font-size: 12.5px; color: var(--ink-3); border: .5px solid transparent; transition: all .25s; white-space: nowrap; }
.f-filters button:hover { color: var(--ink-2); }
.f-filters button.on { color: var(--ink); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.05); }
.f-body { flex: 1; overflow: auto; padding: 6px 10px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
.f-body h6 { display: flex; justify-content: space-between; margin: 14px 12px 6px; font: 500 9.5px var(--mono); letter-spacing: .2em; color: var(--ink-3); text-transform: uppercase; }
.f-body ul { list-style: none; margin: 0; padding: 0; }
.f-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 12px; border-radius: 13px; cursor: pointer; transition: background .15s; animation: fadeUp .4s var(--out, ease) both; }
.f-row.on { background: rgba(255,255,255,.06); }
.f-ico { flex: none; width: 30px; height: 30px; margin-top: 1px; border-radius: 9px; border: .5px solid rgba(255,255,255,.16); position: relative; }
.f-ico::after { content: ""; position: absolute; inset: 9px; border-radius: 2px; border: 1px solid var(--ink-2); }
.f-ico.k-project::after { border-radius: 2px; inset: 8px 7px; box-shadow: 0 -3px 0 -1px var(--ink-2); }
.f-ico.k-file::after { border-radius: 0 4px 0 0; }
.f-ico.k-chat::after { border-radius: 50% 50% 50% 2px; }
.f-main { flex: 1; min-width: 0; }
.f-main b { font-weight: 400; font-size: 14.5px; color: var(--ink); }
.f-main p { margin: 4px 0 5px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.f-main em { font: 400 10px var(--mono); font-style: normal; color: var(--ink-3); letter-spacing: .03em; }
.f-main mark { background: rgba(255,255,255,.14); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.f-priv { margin-left: 8px; font: 400 9px var(--mono); color: var(--ink-3); border: .5px solid var(--hair); border-radius: 4px; padding: 1px 5px; }
.f-go { opacity: 0; color: var(--ink-3); font-size: 13px; margin-top: 6px; transition: opacity .2s; } .f-row.on .f-go { opacity: 1; }
.f-empty { text-align: center; padding: 40px 20px 46px; color: var(--ink-3); } .f-empty p { color: var(--ink-2); margin: 12px 0 4px; } .f-empty span { font-size: 12px; }
.f-empty .neuron-art { max-width: 180px; }
.f-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: .5px solid var(--hair); font-size: 11.5px; color: var(--ink-3); flex-wrap: wrap; }
.f-acts { display: flex; gap: 14px; align-items: center; } .f-acts .primary.small { width: auto; margin: 0; padding: 9px 18px; font-size: 12.5px; }
@media (max-width: 640px) { .finder-wrap { padding: 12px; } .f-keys { display: none; } .f-top input { font-size: 17px; } }
body.paper .finder { background: #ebeae6; border-color: rgba(14,14,14,.2); box-shadow: 0 40px 100px -30px rgba(0,0,0,.35); }
body.paper .finder-wrap { background: rgba(230,229,225,.55); }
body.paper .f-row.on { background: rgba(14,14,14,.06); } body.paper .f-main mark { background: #0e0e0e; color: #ecebe7; }
body.paper .f-filters button.on { border-color: #0e0e0e; background: #0e0e0e; color: #ecebe7; }
body.paper .f-ico { border-color: rgba(14,14,14,.25); }
.f-top, .f-filters, .f-foot { flex: none; }
.f-filters button { flex: none; line-height: 1.3; }

/* ======================= PV 式转场 ======================= */
#pv { position: fixed; inset: 0; z-index: 58; pointer-events: none; display: none; overflow: hidden; }
#pv.on { display: block; }
#pv .pv-bands { position: absolute; inset: 0; }
#pv .pv-bands i { position: absolute; background: #0d0d0f; will-change: transform; }
#pv .pv-bands i:nth-child(3n+2) { background: #f2f2f0; }   /* 夹一条亮色带，PV 里黑白交替的快切感 */
#pv .pv-bands i:nth-child(3n+2)::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 2px, transparent 2px 10px); }
#pv .slice i { left: -2%; right: -2%; height: calc(100% / 9 + 1px); top: calc(var(--i) * 100% / 9); }
#pv .diag i { top: -20%; bottom: -20%; width: calc(100% / 4.2); left: calc(var(--i) * 100% / 4.8 - 12%); }
#pv .blind i { top: 0; bottom: 0; width: calc(100% / 10 + 1px); left: calc(var(--i) * 10%); transform-origin: left; }
#pv .split i { top: 0; bottom: 0; width: 50.5%; } #pv .split i:nth-child(2) { left: 49.5%; background: #0d0d0f; } #pv .split i:nth-child(1) { left: 0; }
#pv .split i:nth-child(2)::after { display: none; }
#pv .cross i { width: 50.5%; height: 50.5%; } #pv .cross i:nth-child(1) { left: 0; top: 0; } #pv .cross i:nth-child(2) { left: 49.5%; top: 0; background: #0d0d0f; } #pv .cross i:nth-child(3) { left: 0; top: 49.5%; background: #0d0d0f; } #pv .cross i:nth-child(4) { left: 49.5%; top: 49.5%; }
#pv .cross i:nth-child(2)::after, #pv .cross i:nth-child(3)::after { display: none; }
#pv .pv-flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
#pv .pv-title { position: absolute; left: 7%; bottom: 12%; color: #f2f2f0; mix-blend-mode: difference; }
#pv .pv-title b { display: block; font: 800 clamp(90px, 15vw, 220px)/.85 var(--font); letter-spacing: -.06em; }
#pv .pv-title span { display: block; margin-top: 10px; font: 700 clamp(22px, 3.2vw, 46px)/1 var(--mono); letter-spacing: .14em; }
#pv .pv-title em { display: block; margin-top: 10px; font: 500 13px var(--font); font-style: normal; letter-spacing: .5em; opacity: .7; }
#pv .pv-title.glitch b, #pv .pv-title.glitch span { text-shadow: -4px 0 rgba(255,0,60,.9), 4px 0 rgba(0,220,255,.9); animation: pvJit .26s steps(4) both; }
@keyframes pvJit { 25% { transform: translate(-8px, 2px) skewX(10deg); clip-path: inset(10% 0 55% 0); } 50% { transform: translate(6px, -1px); clip-path: inset(48% 0 12% 0); } 75% { transform: translate(-3px, 0) skewX(-6deg); clip-path: inset(0 0 0 0); } }
#pv .pv-hud { position: absolute; left: 7%; right: 7%; top: 9%; display: flex; align-items: center; gap: 18px; font: 500 10px var(--mono); letter-spacing: .22em; color: #f2f2f0; mix-blend-mode: difference; animation: pvBlink .5s steps(2) infinite; }
#pv .pv-bar { flex: 1; height: 6px; background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px, currentColor 5px 6px, transparent 6px 11px); opacity: .7; }
@keyframes pvBlink { 50% { opacity: .55; } }
/* 旧的快门不再使用 */
.shutter { display: none !important; }

/* ======================= 全屏：搜索 & 分享 ======================= */
.finder-wrap { padding: 0; background: rgba(8,8,9,.86); align-items: stretch; }
.finder { width: 100%; max-width: none; max-height: none; height: 100%; border-radius: 0; border: 0; box-shadow: none; background: transparent;
  padding: clamp(22px, 5vh, 56px) clamp(20px, 6vw, 96px) 0; animation: finderFull .55s cubic-bezier(.16,1,.3,1) both; }
@keyframes finderFull { from { opacity: 0; transform: translateY(-18px); } }
.finder .f-close { position: absolute; top: clamp(18px, 4vh, 40px); right: clamp(18px, 4vw, 56px); width: 40px; height: 40px; border-radius: 50%; font-size: 22px; color: var(--ink-2); display: grid; place-items: center; }
.finder .f-close:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.f-cat { font: 500 10px var(--mono); letter-spacing: .32em; color: var(--ink-3); margin-bottom: 18px; }
.finder .f-top { padding: 0 0 22px; border-bottom: 1px solid var(--hair); }
.finder .f-top svg { width: 28px; height: 28px; }
.finder .f-top input { font: 300 clamp(28px, 4vw, 52px)/1.2 var(--font); letter-spacing: -.01em; }
.finder .f-filters { padding: 16px 0; border-bottom: 0; }
.finder .f-filters button { padding: 8px 16px; font-size: 13.5px; }
.f-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 40%); gap: clamp(20px, 3vw, 48px); border-top: .5px solid var(--hair); }
.finder .f-body { padding: 8px 0 30px; }
.finder .f-row { padding: 16px 14px; }
.finder .f-main b { font-size: 17px; } .finder .f-main p { font-size: 13.5px; }
.f-prev { overflow: auto; padding: 26px 0 40px 32px; border-left: .5px solid var(--hair); scrollbar-width: thin; }
.f-prev:empty { display: block; }
.f-prev .fp-cat { font: 400 10px var(--mono); letter-spacing: .14em; color: var(--ink-3); }
.f-prev h3 { margin: 12px 0 12px; font: 400 clamp(22px, 2.4vw, 32px)/1.25 var(--font); letter-spacing: -.01em; color: var(--ink); }
.f-prev h3 mark, .f-prev pre mark { background: rgba(255,255,255,.16); color: var(--ink); border-radius: 3px; }
.fp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; } .fp-tags span { font: 400 11px var(--mono); color: var(--ink-3); }
.fp-sum { color: var(--ink-2); line-height: 1.8; font-size: 14px; margin: 0 0 16px; }
.fp-body pre { white-space: pre-wrap; word-break: break-word; font: 400 12.5px/1.75 var(--mono); color: var(--ink-2); background: rgba(255,255,255,.03); border: .5px solid var(--hair); border-radius: 14px; padding: 16px 18px; max-height: 46vh; overflow: auto; margin: 0 0 18px; animation: fadeUp .4s ease both; }
.fp-body.a { font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.fp-links h6 { font: 500 9.5px var(--mono); letter-spacing: .2em; color: var(--ink-3); margin: 6px 0 8px; text-transform: uppercase; }
.fp-links button { display: flex; justify-content: space-between; width: 100%; padding: 11px 0; border-bottom: .5px solid var(--hair); font-size: 13.5px; color: var(--ink-2); text-align: left; transition: color .2s, padding .3s; }
.fp-links button:hover { color: var(--ink); padding-left: 6px; } .fp-links em { font: 400 10px var(--mono); font-style: normal; color: var(--ink-3); }
.finder .f-foot { padding: 16px 0 calc(18px + var(--safe-b)); border-top: .5px solid var(--hair); }
@media (max-width: 1000px) { .f-split { grid-template-columns: 1fr; } .f-prev { display: none !important; } }
body.paper .finder-wrap { background: rgba(230,229,225,.94); } body.paper .finder { background: transparent; }
body.paper .f-prev h3 mark, body.paper .f-prev pre mark { background: #0e0e0e; color: #ecebe7; }

/* 分享：全屏两栏 */
.full-wrap { padding: 0 !important; background: rgba(8,8,9,.9); }
.sheet.share-full { width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; border: 0; box-shadow: none; overflow: auto;
  padding: clamp(26px, 6vh, 64px) clamp(20px, 6vw, 96px) 60px; background: #0c0c0d; }
.share-full .close { position: fixed; top: clamp(18px, 4vh, 40px); right: clamp(18px, 4vw, 56px); width: 40px; height: 40px; border-radius: 50%; font-size: 22px; display: grid; place-items: center; z-index: 2; }
.share-full .close:hover { background: rgba(255,255,255,.06); }
.sf-head { max-width: 900px; margin-bottom: clamp(26px, 5vh, 54px); }
.sf-head .cat { letter-spacing: .32em; }
.sf-head h2 { font: 300 clamp(36px, 5vw, 68px)/1.1 var(--font); letter-spacing: -.02em; margin: 14px 0 16px; }
.sf-head .summary { font-size: 14.5px; max-width: 640px; }
.sf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.sf-col { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 34px); min-width: 0; }
.sf-sec { padding: 26px 28px; border-radius: 22px; border: .5px solid var(--hair); background: rgba(255,255,255,.02); animation: fadeUp .7s var(--out, ease) both; }
.sf-col:nth-child(2) .sf-sec { animation-delay: .08s } .sf-sec + .sf-sec { animation-delay: .14s }
.sf-sec > h3:first-child { margin-top: 0; font: 500 11px var(--mono); letter-spacing: .26em; }
@media (max-width: 980px) { .sf-grid { grid-template-columns: 1fr; } .sf-sec { padding: 20px 18px; } }
body.paper .sheet.share-full { background: #e6e5e1; } body.paper .full-wrap { background: rgba(230,229,225,.94); }
body.paper .sf-sec { background: rgba(14,14,14,.025); border-color: rgba(14,14,14,.16); }
.finder-wrap { background: #0b0b0c; }
body.paper .finder-wrap { background: #e6e5e1; }

/* 02 搜索的切法：12 条细横线像扫描一样逐行亮起 */
#pv .scan i { left: 0; right: 0; height: calc(100% / 12 + 1px); top: calc(var(--i) * 100% / 12); transform-origin: center; }

/* ---- PV 转场性能：去掉逐帧混合/滤镜，图层独立 ---- */
#pv { contain: strict; }
#pv .pv-bands i { will-change: transform; backface-visibility: hidden; }
#pv .pv-bands i:nth-child(3n+2) { background: #e9e9e6; }
#pv .pv-bands i:nth-child(3n+2)::after { background: repeating-linear-gradient(90deg, rgba(0,0,0,.1) 0 2px, transparent 2px 10px); }
#pv .pv-hud { mix-blend-mode: normal; will-change: opacity; }
#pv .pv-title { mix-blend-mode: difference; will-change: transform, opacity; }   /* 只有标题这一小块做反色混合，黑底白字、白底黑字 */
#pv .pv-hud { color: #f2f2f0; text-shadow: 0 1px 0 #0d0d0f; }
#pv[data-phase="out"] .pv-hud { animation: none; opacity: 0; transition: opacity .2s; }
.marquee div { will-change: transform; }

/* ---- 平滑转场：不爆闪、不抖动，统一深色色带 + 柔和明暗层次 ---- */
#pv .pv-flash { display: none; }
#pv .pv-bands i, #pv .pv-bands i:nth-child(3n+2) { background: #0f0f11; }
#pv .pv-bands i:nth-child(2n) { background: #131315; }
#pv .pv-bands i::after, #pv .pv-bands i:nth-child(3n+2)::after { display: none; }
#pv .pv-bands i { box-shadow: 0 0 40px rgba(0,0,0,.35); }
#pv .pv-title { mix-blend-mode: normal; color: #f2f2f0; }
#pv .pv-title b { font-weight: 700; opacity: .92; }
#pv .pv-title span { font-family: var(--font); font-weight: 600; letter-spacing: .22em; }
#pv .pv-title.glitch b, #pv .pv-title.glitch span { animation: none; text-shadow: none; }
#pv .pv-hud { animation: none; opacity: .55; }
body.paper #pv .pv-bands i, body.paper #pv .pv-bands i:nth-child(3n+2) { background: #e3e2de; }
body.paper #pv .pv-bands i:nth-child(2n) { background: #dddcd7; }
body.paper #pv .pv-title, body.paper #pv .pv-hud { color: #0e0e0e; text-shadow: none; }
body.paper #pv .pv-bands i { box-shadow: 0 0 40px rgba(0,0,0,.08); }

/* 首页：十字检索线（两条线贯穿到边缘，自动巡检 / 跟随鼠标） */
.scan { position: absolute; inset: 0; pointer-events: none; z-index: 0; color: #fff; overflow: hidden; contain: strict; }
.home-inner { position: relative; z-index: 1; }
.scan .sx, .scan .sy { position: absolute; left: 0; top: 0; will-change: transform; }
.scan .sx { width: 100%; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.3) 50%, rgba(255,255,255,.08)); }
.scan .sy { height: 100%; width: 1px; background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.3) 50%, rgba(255,255,255,.08)); }
.scan .sx::before, .scan .sx::after, .scan .sy::before, .scan .sy::after { content: ""; position: absolute; background: currentColor; opacity: .55; }
.scan .sx::before, .scan .sx::after { width: 1px; height: 9px; top: -4px; } .scan .sx::before { left: 0; } .scan .sx::after { right: 0; }
.scan .sy::before, .scan .sy::after { height: 1px; width: 9px; left: -4px; } .scan .sy::before { top: 0; } .scan .sy::after { bottom: 0; }
.sc-ret { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.sc-ret::before { content: ""; position: absolute; width: 22px; height: 22px; left: -11px; top: -11px; border: 1px solid currentColor; opacity: .45; transition: width .35s var(--out, ease), height .35s var(--out, ease), left .35s var(--out, ease), top .35s var(--out, ease), opacity .35s; }
.sc-ret::after { content: ""; position: absolute; width: 3px; height: 3px; left: -1px; top: -1px; background: currentColor; opacity: .9; }
.scan.lock .sc-ret::before { width: 12px; height: 12px; left: -6px; top: -6px; opacity: .95; }
.sc-read { position: absolute; left: 16px; top: 10px; font: 400 10px var(--mono, ui-monospace, monospace); letter-spacing: .14em; opacity: .42; white-space: nowrap; }
.scan.lock .sc-read { opacity: .8; }
body.paper .scan { color: #111; }
body.paper .scan .sx { background: linear-gradient(90deg, rgba(0,0,0,.04), rgba(0,0,0,.18) 50%, rgba(0,0,0,.04)); }
body.paper .scan .sy { background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.18) 50%, rgba(0,0,0,.04)); }

/* 自定义鼠标：圆点 + 四角括号（悬停按钮时括号锁定到按钮边框） */
html.cur-on, html.cur-on * { cursor: none !important; }
#cur { position: fixed; left: 0; top: 0; z-index: 2147483000; pointer-events: none; mix-blend-mode: difference; color: #fff; opacity: 0; transition: opacity .2s; }
#cur.show { opacity: 1; }
#cur .c-dot { position: fixed; left: 0; top: 0; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: currentColor; will-change: transform; transition: width .18s, height .18s, margin .18s, border-radius .18s; }
#cur .c-ring { position: fixed; left: 0; top: 0; width: 20px; height: 20px; will-change: transform; transition: width .28s cubic-bezier(.2,.8,.2,1), height .28s cubic-bezier(.2,.8,.2,1), opacity .2s; }
#cur .c-ring i { position: absolute; width: 6px; height: 6px; border: 0 solid currentColor; transition: width .28s, height .28s; }
#cur .c-ring i:nth-child(1) { left: 0; top: 0; border-width: 1px 0 0 1px; }
#cur .c-ring i:nth-child(2) { right: 0; top: 0; border-width: 1px 1px 0 0; }
#cur .c-ring i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1px 1px; }
#cur .c-ring i:nth-child(4) { right: 0; bottom: 0; border-width: 0 1px 1px 0; }
#cur.lock .c-ring i { width: 8px; height: 8px; }
#cur.lock .c-dot { width: 2px; height: 2px; margin: -1px 0 0 -1px; }
#cur.text .c-ring { opacity: 0; }
#cur.text .c-dot { width: 2px; height: 20px; margin: -10px 0 0 -1px; }
#cur.down .c-ring i { width: 4px; height: 4px; }
#cur .c-tag { position: fixed; left: 0; top: 0; font: 400 9px var(--mono, ui-monospace, monospace); letter-spacing: .16em; opacity: 0; white-space: nowrap; transition: opacity .2s; will-change: transform; }
#cur .c-tag { display: none; }
