/* ===== 析问 · Wiki Ask — Monochrome Tech ===== */
:root {
  --bg: #060606;
  --panel: #0d0d0d;
  --panel2: #111214;
  --ink: #eaeaea;
  --dim: #8a8a8a;
  --faint: #555;
  --border: #212121;
  --border-hi: #3a3a3a;
  --mono: "JetBrains Mono", Consolas, monospace;
  --glow: 0 0 32px rgba(255, 255, 255, 0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "LXGW WenKai", "霞鹜文楷", serif;
  /* 注意：不要用 overflow-x: hidden + height:100% —— 会把 body 变成滚动容器，
     导致 window 不可滚动（整页截图插件无法自动滚动拼接）。
     overflow-x: clip 不创建滚动容器，overflow-y 保持 visible。 */
  overflow-x: clip;
}

/* ---- 背景：透视网格 + 光扫 + 噪点 ---- */
.bg-grid {
  position: fixed; inset: -50% -20% 0 -20%; z-index: -3;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(600px) rotateX(35deg) scale(1.6);
  transform-origin: top;
  animation: gridMove 14s linear infinite;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 75%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 75%, transparent);
}
@keyframes gridMove { to { background-position: 0 56px, 0 0; } }

.bg-sweep {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.035) 50%, transparent 60%);
  background-size: 250% 100%;
  animation: sweep 9s ease-in-out infinite;
}
@keyframes sweep { 0%,100% { background-position: 120% 0; } 50% { background-position: -20% 0; } }

.bg-noise {
  position: fixed; inset: 0; z-index: -1; opacity: .35; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.14'/%3E%3C/svg%3E");
}

.hidden { display: none !important; }

/* ---- 主页 ---- */
#landing {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 36px; padding: 24px;
  animation: fadeUp .7s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.archive-btn {
  position: absolute; top: 26px; right: 30px;
  background: none; border: 1px solid var(--border); color: var(--dim);
  font-family: var(--mono); font-size: 12px; letter-spacing: .2em;
  padding: 9px 18px; border-radius: 8px; cursor: pointer; transition: .25s;
}
.archive-btn:hover { color: #fff; border-color: var(--border-hi); box-shadow: var(--glow); }

.logo-wrap { text-align: center; user-select: none; }
.logo {
  font-size: clamp(64px, 12vw, 116px);
  font-weight: 700; letter-spacing: .14em;
  background: linear-gradient(180deg, #fff 20%, #9a9a9a 65%, #565656 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(255,255,255,.18));
  animation: logoPulse 5s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,100% { filter: drop-shadow(0 0 22px rgba(255,255,255,.14)); }
  50% { filter: drop-shadow(0 0 34px rgba(255,255,255,.26)); }
}
.logo-sub {
  margin-top: 12px; color: var(--faint);
  font-family: var(--mono); font-size: 12px; letter-spacing: .5em;
}

.search-box {
  display: flex; align-items: center;
  width: min(680px, 92vw);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 8px 8px 24px;
  backdrop-filter: blur(12px);
  transition: .3s;
}
.search-box:focus-within { border-color: var(--border-hi); box-shadow: var(--glow); }
.search-icon { color: var(--faint); font-size: 22px; margin-right: 12px; }
#mainInput, #topInput {
  flex: 1; background: none; border: none; outline: none;
  color: var(--ink); font-family: inherit; font-size: 18px;
}
.go-btn {
  border: 1px solid #444; cursor: pointer; font-family: var(--mono);
  background: #e8e8e8; color: #0a0a0a;
  font-size: 14px; letter-spacing: .25em;
  padding: 12px 28px; border-radius: 8px;
  transition: .22s;
}
.go-btn:hover { background: #fff; box-shadow: 0 0 24px rgba(255,255,255,.25); transform: translateY(-1px); }
.go-btn:active { transform: scale(.97); }

/* ---------- 知识库选择器 ---------- */
.kb-row {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-top: 14px;
}
.kb-label {
  color: var(--faint); font-family: var(--mono);
  font-size: 12px; letter-spacing: .2em;
}
.kb-select {
  appearance: none; -webkit-appearance: none;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--mono); font-size: 13px;
  padding: 7px 34px 7px 14px;
  cursor: pointer; transition: .22s;
  background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%),
                    linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.kb-select:hover { border-color: var(--border-hi); color: #fff; }
.kb-select:focus { outline: none; border-color: var(--border-hi); box-shadow: var(--glow); }
.kb-select option { background: #111; color: #e8e8e8; }
.top-kb { margin-left: 10px; padding-top: 5px; padding-bottom: 5px; }
body[data-theme="light"] .kb-select { background-color: rgba(0,0,0,.03); color: #222; }
body[data-theme="light"] .kb-select option { background: #fff; color: #222; }
body[data-theme="light"] .kb-select:hover { color: #111; }

.chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  width: min(680px, 92vw);
  justify-items: stretch;
}
.chips-label {
  grid-column: 1 / -1;
  justify-self: center;
  color: var(--faint); font-family: var(--mono); font-size: 12px; letter-spacing: .15em;
}
.kb-group {
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
}
.kb-group-title {
  color: var(--faint); font-family: var(--mono); font-size: 11px;
  letter-spacing: .2em; padding: 0 2px 2px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kb-group .chip { width: 100%; }
.chip {
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  color: var(--dim); border-radius: 8px; padding: 7px 14px;
  font-family: inherit; font-size: 14px; cursor: pointer; transition: .22s;
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 0; text-align: left;
}
.chip:hover { color: #fff; border-color: var(--border-hi); transform: translateY(-2px); box-shadow: var(--glow); }
.chip-kb-tag {
  color: var(--faint); font-size: 11px; letter-spacing: .05em;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 8px; white-space: nowrap;
  flex-shrink: 0;
}
.chip-text {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip-kb:hover .chip-kb-tag { color: #fff; border-color: var(--border-hi); }

.landing-foot {
  position: absolute; bottom: 26px;
  color: #3d3d3d; font-family: var(--mono); font-size: 11px; letter-spacing: .25em;
}

/* ---- 顶栏 ---- */
#topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 22px; margin-bottom: 30px;
  background: rgba(10,10,10,.8);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: 14px;
  animation: fadeUp .4s ease both;
}
#menuBtn {
  background: none; border: 1px solid var(--border); color: var(--ink);
  width: 38px; height: 38px; border-radius: 8px; cursor: pointer; font-size: 16px;
  transition: .2s;
}
#menuBtn:hover { border-color: var(--border-hi); box-shadow: var(--glow); }
.mini-logo {
  font-size: 21px; font-weight: 700; cursor: pointer; letter-spacing: .1em;
  background: linear-gradient(180deg, #fff, #888);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.top-search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  max-width: 560px; margin: 0 auto;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px 6px 4px 18px;
}
.top-search:focus-within { border-color: var(--border-hi); }
#topInput { font-size: 15px; }
#topGo { background: none; border: none; color: var(--dim); font-size: 19px; cursor: pointer; padding: 4px 12px; }
#topGo:hover { color: #fff; }

/* ---- 结果页 ---- */
#results { padding: 26px clamp(16px, 4vw, 56px) 80px; animation: fadeUp .5s ease both; }
.result-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px; max-width: 1240px; margin: 0 auto;
}
@media (max-width: 900px) { .result-grid { grid-template-columns: 1fr; } }

#qTitle {
  font-size: clamp(23px, 3.2vw, 32px); font-weight: 700;
  margin-bottom: 22px; line-height: 1.55;
  border-left: 3px solid #fff; padding-left: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 30px 34px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.markdown { font-size: 17px; line-height: 1.95; }
.markdown h2 {
  font-size: 18px; margin: 24px 0 12px; color: #fff;
  font-family: var(--mono); letter-spacing: .12em;
}
.markdown h2:first-child { margin-top: 0; }
.markdown p { margin: 12px 0; }
.markdown ul, .markdown ol { padding-left: 1.6em; margin: 10px 0; }
.markdown li { margin: 7px 0; }
.markdown strong { color: #fff; }
/* 代码/协议块：等宽、无底色（与 viewer 一致；知识库无真实代码需求） */
.markdown code { font-size: .92em; font-family: var(--mono); }
.markdown pre {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75;
  background: none; border: none; border-left: 2px solid var(--border);
  padding: 6px 0 6px 16px; margin: 14px 0; overflow-x: auto;
}
.markdown pre code { background: none; padding: 0; font-size: inherit; }

/* 正文中的 [[wikilink]] */
.wl {
  color: #9db4d0; text-decoration: none;
  border-bottom: 1px solid #445;
  font-size: .92em; padding: 0 1px;
  transition: .2s;
}
.wl:hover { color: #fff; border-bottom-color: #fff; }
.wl::after { content: " ↗"; font-size: .78em; opacity: .5; }
.wl-dead {
  color: #8a8a8a; font-size: .92em;
  border-bottom: 1px dashed #4a4a4a; padding-bottom: 1px;
}

.thinking { display: flex; align-items: center; gap: 8px; color: var(--dim); padding: 12px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #bbb; animation: bounce 1.2s infinite; }
.dot:nth-child(2) { animation-delay: .15s; }
.dot:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,60%,100% { transform: none; opacity: .4; } 30% { transform: translateY(-6px); opacity: 1; } }
.thinking-text { margin-left: 8px; letter-spacing: .12em; font-size: 14.5px; }

/* ---- 引用卡片 ---- */
.citations { margin-top: 26px; }
.cite-head {
  font-family: var(--mono); font-size: 12px; letter-spacing: .3em;
  color: var(--faint); margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.cite-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cite-card {
  display: block; text-decoration: none;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  transition: .22s; cursor: pointer;
}
.cite-card:hover { border-color: var(--border-hi); box-shadow: var(--glow); transform: translateY(-2px); }
.cite-name { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 6px; line-height: 1.4; }
.cite-path {
  font-family: var(--mono); font-size: 11.5px; color: #8a8a8a;
  word-break: break-all; letter-spacing: .02em;
}
.cite-desc { font-size: 13px; color: var(--dim); margin-top: 8px; line-height: 1.6; }
.cite-ext { color: var(--faint); font-size: 12px; float: right; }

.meta-line {
  margin-top: 18px; color: #4a4a4a;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
}

.version-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 0 16px; padding: 6px 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--faint);
}
.version-btn {
  background: none; border: 1px solid var(--border); color: var(--dim);
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  padding: 4px 12px; border-radius: 6px; cursor: pointer; transition: .2s;
}
.version-btn:hover:not(:disabled) { color: #fff; border-color: var(--border-hi); box-shadow: var(--glow); }
.version-btn:disabled { opacity: .35; cursor: default; }
body[data-theme="light"] .version-btn:hover:not(:disabled) { color: #111; }

.followup-box {
  margin-top: 16px; display: flex; align-items: center; gap: 10px;
  border-top: 1px dashed var(--border); padding-top: 16px;
}

/* 追问轮：链式追加在初始回答下方 */
.round {
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.round-q {
  font-family: var(--mono); font-size: 13px; letter-spacing: .12em;
  color: var(--dim); margin-bottom: 12px;
  padding-left: 12px; border-left: 2px solid var(--border-hi);
}
.round-answer { line-height: 1.75; }
.round-cites { margin-top: 18px; }
.round-cite-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px; margin-top: 12px;
}
/* 追问轮引用卡片复用主引用样式（.cite-card 等），保持视觉一致 */

/* 时间线追问分隔 */
.tl-sep {
  margin: 14px 0; padding: 6px 0;
  text-align: center; color: var(--faint);
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
}
body[data-theme="light"] .tl-sep { color: #9aa0ad; }
body[data-theme="light"] .round-q { color: #5a6070; }
.followup-box input {
  flex: 1; min-width: 0;
  background: #0d0d0f; border: 1px solid #333; border-radius: 8px;
  color: var(--ink); font-family: inherit; font-size: 15px;
  padding: 9px 14px; outline: none; transition: .22s;
}
.followup-box input:focus { border-color: var(--border-hi); box-shadow: var(--glow); }
.followup-box .go-btn { padding: 9px 18px; font-size: 14px; }
.followup-hint {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  color: #555; white-space: nowrap;
}
body[data-theme="light"] .followup-box input { background: #fff; border-color: #d0d4de; color: #1b1d23; }
body[data-theme="light"] .followup-hint { color: #9aa0ad; }

.regen-btn {
  margin-top: 16px;
  background: none; border: 1px solid var(--border); color: var(--dim);
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .15em;
  padding: 10px 22px; border-radius: 8px; cursor: pointer; transition: .22s;
}
.regen-btn:hover { color: #fff; border-color: var(--border-hi); box-shadow: var(--glow); }

.stale-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #2a1515; color: #ff9c9c; border-bottom: 1px solid #5a2a2a;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em;
  text-align: center; padding: 9px 16px;
}

/* ---- 过程时间线（Hermes 桌面端风格） ---- */
/* 不限制高度、无内嵌滚动条：随内容自然增长，页面整体滚动；
   align-self: start 防止被左列拉伸（工具结束后不留大片空白） */
.process-col {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
  align-self: start;
}
.proc-head {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .3em;
  color: var(--faint); margin-bottom: 18px; text-align: center;
}
.timeline { display: flex; flex-direction: column; gap: 10px; }

.tl-status {
  text-align: center; font-family: var(--mono); font-size: 11.5px;
  color: var(--faint); letter-spacing: .1em; padding: 2px 0;
  white-space: pre-line;  /* 支持 \n 换行（命中缓存提示等两行文案） */
  animation: fadeUp .3s ease both;
}
.tl-status.done { color: #ddd; }
.tl-status.error { color: #ff6b6b; }

/* 思考块：桌面端同款折叠 */
details.think {
  border: 1px dashed #2a2a2a; border-radius: 10px;
  background: rgba(255,255,255,.015);
  animation: fadeUp .3s ease both;
}
details.think summary {
  list-style: none; cursor: pointer; user-select: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em;
  color: #777; padding: 9px 13px;
}
details.think summary::before { content: "▸ "; color: #555; }
details.think[open] summary::before { content: "▾ "; }
details.think summary:hover { color: #aaa; }
.think-body {
  padding: 2px 14px 12px; font-size: 12.5px; line-height: 1.75;
  color: #6f6f6f; font-style: italic;
  border-top: 1px dashed #222; padding-top: 10px;
  word-break: break-word; white-space: pre-wrap;
}

/* 工具卡片 */
.tool-card {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel2);
  animation: fadeUp .3s ease both;
  overflow: hidden;
}
.tool-card.failed { border-color: rgba(255, 85, 85, .45); }
.tool-head {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 13px; user-select: none;
}
.tool-dot { width: 7px; height: 7px; border-radius: 50%; background: #666; flex: none; }
.tool-card.finished .tool-dot { background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.4); }
.tool-card.failed .tool-dot { background: #ff5555; box-shadow: 0 0 9px rgba(255,85,85,.6); }
.tool-name { font-family: var(--mono); font-size: 12.5px; color: #eee; letter-spacing: .05em; flex: none; }
.tool-args {
  font-family: var(--mono); font-size: 11.5px; color: #999;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.tool-result {
  border-top: 1px solid #1d1d1d;
  padding: 8px 13px; font-family: var(--mono); font-size: 11.5px;
  color: #777; line-height: 1.7; word-break: break-word; white-space: pre-wrap;
  max-height: 140px; overflow-y: auto;
}
.tool-card.failed .tool-result { color: #e08080; }

/* ---- 历史抽屉 ---- */
#drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 40;
  width: min(350px, 86vw);
  background: rgba(8,8,8,.94);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  transform: translateX(-102%);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column;
}
#drawer.open { transform: none; }
#drawerMask {
  position: fixed; inset: 0; z-index: 35;
  background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: .3s;
}
#drawerMask.open { opacity: 1; pointer-events: auto; }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px; border-bottom: 1px solid var(--border);
}
.drawer-title { font-family: var(--mono); letter-spacing: .18em; font-size: 12.5px; color: #bbb; }
.drawer-actions button {
  background: none; border: 1px solid var(--border); color: var(--dim);
  width: 32px; height: 32px; border-radius: 7px; cursor: pointer; margin-left: 8px;
}
.drawer-actions button:hover { color: #fff; border-color: var(--border-hi); }
#historyList { flex: 1; overflow-y: auto; padding: 14px; }
.hist-item {
  position: relative;
  padding: 13px 36px 13px 15px; margin-bottom: 10px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: .2s;
}
.hist-item:hover { border-color: var(--border-hi); transform: translateX(3px); }
.hist-q { font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hist-t { font-family: var(--mono); font-size: 11px; color: #4f4f4f; margin-top: 7px; letter-spacing: .06em; }
.hist-del {
  position: absolute; right: 8px; top: 8px;
  background: none; border: none; color: #444; cursor: pointer; font-size: 14px;
  opacity: 0; transition: .2s;
}
.hist-item:hover .hist-del { opacity: 1; }
.hist-del:hover { color: #ff6b6b; }
.hist-empty {
  text-align: center; color: #444; padding: 40px 10px;
  font-size: 13.5px; line-height: 2.1;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- 主题切换按钮 ---- */
.theme-btn {
  background: none; border: 1px solid var(--border); color: var(--dim);
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; transition: .25s;
  flex: none;
}
.theme-btn:hover { color: var(--ink); border-color: var(--border-hi); }
.top-left-actions {
  position: absolute; top: 26px; left: 30px;
  display: flex; gap: 8px; align-items: center;
}
.lang-btn {
  background: none; border: 1px solid var(--border); color: var(--dim);
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; transition: .25s;
  flex: none;
}
.lang-btn:hover { color: var(--ink); border-color: var(--border-hi); }

/* ---- 访问口令模态框 ---- */
.login-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, .6);
  display: flex; align-items: center; justify-content: center;
}
.login-modal.hidden { display: none; }
.login-box {
  position: relative;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 32px 32px 24px; width: 320px;
  box-shadow: var(--glow);
}
.login-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--faint); font-size: 14px; cursor: pointer;
}
.login-close:hover { color: var(--ink); }
.login-title { font-size: 16px; letter-spacing: .18em; color: var(--ink); margin-bottom: 6px; }
.login-sub { color: var(--faint); font-size: 12px; margin-bottom: 20px; font-family: var(--mono); letter-spacing: .08em; }
.login-box input {
  width: 100%; box-sizing: border-box;
  background: transparent; border: 1px solid var(--border);
  color: var(--ink); padding: 10px 12px; border-radius: 8px;
  font-size: 14px; margin-bottom: 14px; outline: none;
}
.login-box input:focus { border-color: var(--border-hi); }
#loginBtn {
  width: 100%; background: none; border: 1px solid var(--border-hi);
  color: var(--ink); padding: 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; letter-spacing: .3em; transition: .2s;
}
#loginBtn:hover { background: rgba(255,255,255,.06); }
.login-err { color: #ff6b6b; font-size: 12px; margin-top: 10px; min-height: 16px; font-family: var(--mono); }

/* ================= 明亮主题 ================= */
body[data-theme="light"] {
  --bg: #f3f4f7;
  --panel: #ffffff;
  --panel2: #f2f3f6;
  --ink: #1b1d23;
  --dim: #5f6470;
  --faint: #9aa0ad;
  --border: #e2e4ea;
  --border-hi: #c4c8d2;
  --glow: 0 0 32px rgba(0, 0, 0, 0.08);
}
body[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(0,0,0,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.05) 1px, transparent 1px);
}
body[data-theme="light"] .bg-sweep {
  background: linear-gradient(105deg, transparent 40%, rgba(0,0,0,.04) 50%, transparent 60%);
  background-size: 250% 100%;
}
body[data-theme="light"] .logo {
  background: linear-gradient(180deg, #111 20%, #555 65%, #999 100%);
  -webkit-background-clip: text; background-clip: text;
  animation: none; filter: drop-shadow(0 0 20px rgba(0,0,0,.12));
}
body[data-theme="light"] .mini-logo {
  background: linear-gradient(180deg, #111, #777);
  -webkit-background-clip: text; background-clip: text;
}
body[data-theme="light"] .go-btn {
  background: #e8e8e8; color: #1b1d23; border-color: #c4c8d2;
}
body[data-theme="light"] .go-btn:hover {
  background: #fff; box-shadow: 0 0 20px rgba(0,0,0,.15);
}
body[data-theme="light"] .search-box,
body[data-theme="light"] .top-search,
body[data-theme="light"] .chip,
body[data-theme="light"] details.think { background: rgba(0,0,0,.035); }
body[data-theme="light"] .card { box-shadow: 0 14px 40px rgba(0,0,0,.08); }
body[data-theme="light"] .markdown h2,
body[data-theme="light"] .markdown strong,
body[data-theme="light"] .cite-name { color: #111; }
body[data-theme="light"] .markdown pre { border-left-color: #c4c8d2; }
body[data-theme="light"] #qTitle { border-left-color: #111; }
body[data-theme="light"] .wl {
  color: #445; border-bottom-color: #9aa0ad;
}
body[data-theme="light"] .wl:hover { color: #111; border-bottom-color: #111; }
body[data-theme="light"] .wl-dead { color: #999; border-bottom-color: #bbb; }
body[data-theme="light"] .dot { background: #999; }
body[data-theme="light"] .tool-name { color: #1b1d23; }
body[data-theme="light"] .tool-args { color: #8a8f9a; }
body[data-theme="light"] .tool-card.finished .tool-dot { background: #1b1d23; box-shadow: 0 0 8px rgba(0,0,0,.3); }
body[data-theme="light"] .tool-result { border-top-color: #e2e4ea; color: #6a707c; }
body[data-theme="light"] details.think { border-color: #d8dae0; }
body[data-theme="light"] .tl-status.done { color: #333; }
body[data-theme="light"] #topbar { background: rgba(255,255,255,.85); }
body[data-theme="light"] #drawer { background: rgba(255,255,255,.96); }
body[data-theme="light"] .drawer-title { color: #555; }
body[data-theme="light"] .hist-t { color: #9aa0ad; }
body[data-theme="light"] .hist-empty { color: #9aa0ad; }
body[data-theme="light"] .hist-del { color: #bbb; }
body[data-theme="light"] .meta-line { color: #9aa0ad; }
body[data-theme="light"] .landing-foot { color: #7a7f8a; }
body[data-theme="light"] .logo-sub { color: #6a707c; }
body[data-theme="light"] .chip { color: #4a4f5a; border-color: #d0d3da; }
body[data-theme="light"] .chip:hover { color: #111; }
body[data-theme="light"] #mainInput::placeholder,
body[data-theme="light"] #topInput::placeholder { color: #8a8f9a; }
body[data-theme="light"] .cite-ext { color: #aaa; }
body[data-theme="light"] .cite-desc { color: #6a707c; }
body[data-theme="light"] ::-webkit-scrollbar-thumb { background: #ccc; }
