/* ===== 基础 ===== */
:root {
  --bg: #0b0e14;
  --bg-2: #0e131c;
  --card: #141822;
  --card-2: #1a2030;
  --border: #1f2430;
  --border-2: #2a3142;
  --text: #e6e8ee;
  --muted: #8b93a7;
  --muted-2: #5c6478;
  --accent: #2dd4bf;       /* 品牌 / 交互：主按钮、链接态、激活 Tab、排序态（不再兼任金额语义色） */
  --on-brand: #06231f;     /* 品牌色上的文字（深色；统一取代散落的 #06281f / #06251f） */
  --c-in: #34d399;         /* 语义 · 流入 / 正向（独立于品牌色，配 ▲） */
  --neg: #f87171;          /* 语义 · 流出 / 负向（配 ▼），兼危险色 */
  --link: #3b82f6;
  --platform: #a78bfa;
  --exchange: #fbbf24;
  --arkm: #2dd4bf;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --ff-body: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;   /* 全站字体栈；表单控件显式继承，禁止回落浏览器默认（Arial） */
  --ff-mono: var(--mono);  /* 数据 / 地址等宽栈别名 */
  --fs-title: 22px;        /* 页面标题 */
  --fs-h2: 16px;           /* 面板标题 */
  --fs-cell: 13px;         /* 表格数值 */
  --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-6: 24px;   /* 8pt 间距阶 */
  --r-md: 8px;             /* 控件圆角 */
  --r-lg: 12px;            /* 面板圆角 */
  --scrollbar-w: 10px;   /* 经典滚动条宽；须与全局 *::-webkit-scrollbar{width:10px} 保持一致 */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* 滚动条槽位常驻：内容高度变化（tab 切换/加载）引起滚动条出现/消失时，
   视口布局宽度恒定——否则居中容器整体横移，标题/边框跟着「跳动」 */
html { scrollbar-gutter: stable; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* 表单控件显式继承全站字体栈——按钮/输入框回落浏览器默认 UI 字体（Chrome 即 Arial）是实测的字体污染源 */
button, input, select, textarea { font-family: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { opacity: 0.85; }
.muted { color: var(--muted); }
.empty { padding: 18px 4px; }
/* 键盘焦点统一品牌色外环（指针点击不触发） */
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ===== 顶栏 ===== */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 0 28px; height: 56px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand {
  font-weight: 700; font-size: 16px; letter-spacing: .5px;
  display: flex; align-items: center; gap: 9px;
  color: var(--text); text-decoration: none;
  border-radius: 7px; transition: opacity .15s ease;
  white-space: nowrap; flex: 0 0 auto;
}
.brand:hover { opacity: .85; }   /* 点击 Logo 回首页 */
/* MOTA 渐变高亮：导航品牌与入口页一级标题同配色 */
.mota-grad {
  background: linear-gradient(100deg, #2dd4bf 10%, #5eead4 45%, #3b82f6 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.brand-mota { font-style: normal; font-weight: 900; letter-spacing: 1.5px; }
.nav { display: flex; gap: 4px; min-width: 0; }
.nav-link {
  color: var(--muted); padding: 6px 14px; border-radius: 7px;
  font-size: 14.5px; font-weight: 500; letter-spacing: .3px;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--card); }
.nav-link.on { color: var(--text); background: var(--card-2); font-weight: 650; }
.user-box { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-btn {
  font-size: 13px; font-weight: 600; padding: 6px 16px; border-radius: 7px;
  cursor: pointer; line-height: 1.4; white-space: nowrap;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis;
  background: var(--card); color: var(--text); border: 1px solid var(--border);
}
.user-btn:hover { border-color: var(--border-2); }
/* 登录按钮（B3）：用户图标 + 中性卡底，hover 亮青 */
.login-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; padding: 6px 14px 6px 11px; border-radius: 8px;
  cursor: pointer; line-height: 1.4; white-space: nowrap;
  background: var(--card-2); color: var(--text); border: 1px solid var(--border-2);
  transition: border-color .15s ease, color .15s ease;
  font-family: inherit;
}
.login-btn:hover { border-color: rgba(45, 212, 191, .5); color: var(--accent); }
.login-btn svg { color: var(--accent); }
.login-btn[hidden] { display: none; }   /* display:inline-flex 会盖过 UA 的 [hidden]，必须显式恢复 */
/* 窄屏汉堡按钮：默认隐藏，≤768px 才显示（见下方顶栏响应式） */
.nav-toggle {
  display: none;
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 8px;
  color: var(--muted); padding: 7px; cursor: pointer;
  place-items: center; flex: 0 0 auto; font-family: inherit;
}
.nav-toggle:hover { color: var(--text); border-color: var(--accent); }
.topbar.nav-open .nav-toggle { color: var(--accent); border-color: var(--accent); }

/* 用户下拉菜单（退出登录） */
.user-wrap { position: relative; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 120;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 10px;
  min-width: 168px; padding: 6px; box-shadow: 0 10px 32px rgba(0,0,0,0.45);
}
.user-menu[hidden] { display: none; }
/* 下拉首行：用户 UID（用户名只在按钮上显示一次，不重复）；点击复制 */
.user-menu-uid {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px 7px; border-bottom: 1px solid var(--border); margin-bottom: 6px;
  cursor: pointer; border-radius: 6px 6px 0 0;
}
.user-menu-uid .um-label { font-size: 10.5px; color: var(--muted-2); letter-spacing: .5px; }
.user-menu-uid .um-val { font-size: 12px; color: var(--text); max-width: 160px;
                         overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
                         user-select: all; }
.user-menu-uid:hover .um-val { color: var(--accent); }
.logout-btn {
  width: 100%; display: block; text-align: left; background: none; border: none;
  color: var(--neg); font-size: 13px; font-weight: 500; padding: 8px 10px;
  border-radius: 6px; cursor: pointer; font-family: inherit;
}
.logout-btn:hover { background: rgba(248,113,113,0.1); }
/* 个人中心入口（base.html 用户菜单；SPEC-20260921111753）——沿用菜单项
   布局，中性色与去链接下划线 */
a.profile-link { color: var(--fg, #374151); text-decoration: none; }
a.profile-link:hover { color: var(--accent, #2563eb); background: rgba(37,99,235,0.08); }
/* 充值弹窗遮罩：内联 display:flex 会压过 hidden 属性的 UA display:none，
   必须显式关闭（否则弹窗常开盖住整页，充值按钮不可点） */
#recharge-modal[hidden] { display: none !important; }

/* ===== 顶栏响应式：窄屏防挤压（品牌标题任何宽度都完整展示） ===== */
/* ≤1180px：压缩间距，管理员 8 项导航 + 完整标题仍可单行平铺 */
@media (max-width: 1180px) {
  .topbar { padding: 0 18px; gap: 14px; }
  .nav-link { padding: 6px 10px; }
}
/* 导航收入汉堡下拉面板（下拉样式与下方 ≤768px 块保持一致，两处需同步改）。
   收纳时机分角色：管理员 8 项导航与完整标题并存放不下，≤1080px 即收；普通用户 ≤768px 才收。
   topbar 为 sticky 定位元素，.nav 的 absolute 以其为包含块，top:100%+8px 即顶栏下方 8px */
@media (max-width: 1080px) {
  .topbar-admin .nav-toggle { display: grid; }
  .topbar-admin .nav {
    position: absolute; top: calc(100% + 8px); right: 18px; z-index: 120;
    flex-direction: column; align-items: stretch; gap: 2px;
    display: none; min-width: 152px; padding: 6px;
    background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 10px;
    box-shadow: 0 10px 32px rgba(0,0,0,0.45);
  }
  .topbar.nav-open .nav { display: flex; }
  .topbar-admin .nav-link { padding: 9px 12px; }
}
@media (max-width: 768px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute; top: calc(100% + 8px); right: 18px; z-index: 120;
    flex-direction: column; align-items: stretch; gap: 2px;
    display: none; min-width: 152px; padding: 6px;
    background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 10px;
    box-shadow: 0 10px 32px rgba(0,0,0,0.45);
  }
  .topbar.nav-open .nav { display: flex; }
  .nav-link { padding: 9px 12px; }
  .user-btn { max-width: 120px; }
  /* 极窄手机：标题优雅截断（省略号）而非换行/溢出 */
  .brand { flex: 0 1 auto; min-width: 0; }
  .brand-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* 三方登录提示模态框（M3 紧凑说明型；[hidden] 需显式覆盖 display:flex，否则属性不生效） */
.login-modal[hidden] { display: none; }
.login-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.login-modal-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 26px 28px; text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4); max-width: 360px; width: calc(100% - 48px);
}
.lm-ico {
  width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 14px;
  display: grid; place-items: center; color: var(--accent);
  background: rgba(45,212,191,.1); border: 1px solid rgba(45,212,191,.3);
}
.login-modal-title { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.login-modal-desc { font-size: 12.5px; color: var(--muted); margin: 0 0 18px; line-height: 1.7; }
.login-go-btn {
  display: block; width: 100%;
  background: var(--accent); color: var(--on-brand); border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; padding: 10px; border-radius: 8px;
  font-family: inherit;
}
.login-go-btn:hover { filter: brightness(1.08); }
.login-cancel-btn {
  display: block; width: 100%; margin-top: 10px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  color: var(--muted-2); font-size: 12.5px; padding: 4px;
}
.login-cancel-btn:hover { color: var(--muted); }

/* 轻提示（登录成功欢迎 / 复制反馈等；role=status，不打断焦点） */
.app-toast {
  position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
  z-index: 110; background: rgba(45,212,191,0.15); color: var(--accent);
  border: 1px solid rgba(45,212,191,0.35); border-radius: 8px;
  padding: 9px 20px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  animation: toast-in 0.25s ease; transition: opacity 0.4s ease;
}
.app-toast .t-ico { font-size: 13px; line-height: 1; }
.app-toast.out { opacity: 0; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 7px;
  border-radius: 5px; border: 1px solid transparent; line-height: 1.6;
  white-space: nowrap;
}
.badge.chain.on { background: rgba(45,212,191,0.12); color: var(--accent); border-color: rgba(45,212,191,0.3); }
.badge.chain.off { background: var(--card); color: var(--muted-2); border-color: var(--border); }
.badge.chain.tron { background: rgba(251,191,36,0.12); color: var(--exchange); border-color: rgba(251,191,36,0.3); }
.badge.dim { background: var(--card); color: var(--muted-2); border-color: var(--border-2); font-weight: 500; }
.mono { font-family: var(--mono); }
.badge.platform { background: rgba(167,139,250,0.12); color: var(--platform); border-color: rgba(167,139,250,0.3); }
.badge.exchange { background: rgba(251,191,36,0.12); color: var(--exchange); border-color: rgba(251,191,36,0.3); }
.badge.arkm     { background: rgba(45,212,191,0.12); color: var(--arkm); border-color: rgba(45,212,191,0.3); }
.badge.spite    { background: rgba(248,113,113,0.14); color: var(--neg); border-color: rgba(248,113,113,0.34); }
.badge.contract { background: rgba(129,140,248,0.14); color: #818cf8; border-color: rgba(129,140,248,0.34); }
.badge.manual   { background: rgba(244,114,182,0.14); color: #f472b6; border-color: rgba(244,114,182,0.34); }
.badge.cat      { background: rgba(251,146,60,0.14); color: #fb923c; border-color: rgba(251,146,60,0.34); }

/* ===== 容器 ===== */
.container { max-width: 1440px; margin: 0 auto; padding: 28px; }
.page-title { font-size: 22px; margin: 0 0 22px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.page-title .sub { font-size: 12px; color: var(--muted); font-weight: 400; background: var(--card); padding: 3px 9px; border-radius: 5px; }

/* ===== KPI 卡 ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; position: relative; overflow: hidden;
}
.kpi.kpi.accent { border-color: rgba(45,212,191,0.25); }
/* 可点击 KPI 卡（如「非标数据」）：整体可点 + 悬停品牌边框 + 箭头提示 */
.kpi.kpi-clickable { cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.kpi.kpi-clickable:hover { border-color: var(--accent); }
.kpi.kpi-clickable:hover .kpi-arr { transform: translateX(3px); color: var(--accent); }
.kpi-arr { display: inline-block; transition: transform .15s ease, color .15s ease; }
.kpi-label { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.kpi-value { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-value.up { color: var(--c-in); }
.kpi-value.down { color: var(--neg); }
.kpi-small { font-size: 14px; color: var(--muted); font-weight: 500; }
.kpi-sub { color: var(--muted); font-size: 12px; margin-top: 10px; }
.kpi-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.progress { height: 6px; background: var(--bg); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #5eead4); border-radius: 4px; transition: width .4s; }

/* ===== 标签覆盖 ===== */
.cov-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cov { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.cov-n { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cov-l { color: var(--muted); font-size: 12px; margin-top: 4px; }
.cov-p { color: var(--c-in); font-size: 12px; margin-top: 6px; font-weight: 600; }

/* ===== 面板 / 条形 ===== */
.panel {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 20px;
}
.panel-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.two-col > .panel { margin-bottom: 0; }

.bar-row { display: grid; grid-template-columns: 150px 1fr 90px; align-items: center; gap: 12px; padding: 5px 0; }
.bar-label { color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 8px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--link), var(--accent)); border-radius: 5px; min-width: 2px; }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.more { display: inline-block; margin-top: 12px; font-size: 13px; }

/* ===== 列表页布局 ===== */
.list-layout { display: grid; grid-template-columns: 248px 1fr; gap: 20px; align-items: start; }
.facets {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 16px; position: sticky; top: 72px;
  /* 面板高于视口时自身滚动；max-height 为 sticky 吸顶态（top 72px）的兜底，
     精确限高由 app.js 按面板流式位置动态设置（页面未滚动时也整个在视口内）。
     不用 overscroll-behavior:contain——面板底越出视口时需允许滚动链动到页面，避免困住底部按钮 */
  max-height: calc(100vh - 88px);
  max-height: calc(100dvh - 88px);
  overflow-y: auto;
}
.facet-group { padding: 10px 0 12px; border-bottom: 1px solid var(--border); }
.facet-group:last-of-type { border-bottom: none; }
.facet-title { font-size: 12px; color: var(--muted); margin-bottom: 9px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
/* 折叠组标题（<details><summary>）：计数 + 右缘 chevron；组内小标题（div.facet-title）不受影响 */
summary.facet-title {
  display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  margin-bottom: 0; padding: 2px 0; user-select: none;
}
summary.facet-title::-webkit-details-marker { display: none; }
summary.facet-title:hover { color: var(--text); }
details.facet-group[open] > summary.facet-title { margin-bottom: 9px; }
.fc-count { color: var(--muted-2); font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.fc-chev { margin-left: auto; color: var(--muted-2); font-size: 10px; transition: transform .15s ease; }
details.facet-group[open] > summary.facet-title .fc-chev { transform: rotate(90deg); }
.facets input[type=text], .facets input[type=number], .facets input[type=date], .facets select {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 7px; padding: 7px 9px; font-size: 13px; color-scheme: dark;
}
.facets .flow-range { display: flex; gap: 6px; }
.facets .flow-range input { flex: 1; min-width: 0; width: auto; }
/* USDT 统计三态单选（数据范围组）：行内排布 */
.facets .radio-row { display: flex; flex-wrap: wrap; gap: 0 16px; }
.facets label { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 13px; color: var(--text); cursor: pointer; }
.facets label .cnt { color: var(--muted-2); font-size: 11px; margin-left: auto; }
.facets input[type=checkbox], .facets input[type=radio] { accent-color: var(--accent); }
.facets .btns { display: flex; gap: 8px; margin-top: 14px; }
/* 抽屉关闭按钮：仅窄屏抽屉态可见（见 980px 响应式块） */
.facets-drawer-head { display: none; }
.facets-close {
  display: none; appearance: none; background: none; border: 1px solid var(--border-2); border-radius: 7px;
  color: var(--muted-2); cursor: pointer; padding: 5px; place-items: center;
}
.facets-close:hover { color: var(--text); border-color: var(--accent); }
.btn {
  flex: 1; text-align: center; border: none; border-radius: 7px; padding: 8px 10px;
  font-size: 13px; cursor: pointer; font-weight: 500;
}
.btn-primary { background: var(--accent); color: var(--on-brand); }
.btn-ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--border-2); }
.btn:disabled { color: var(--muted-2); opacity: .5; cursor: not-allowed; }

/* 「导入地址」模态弹窗（SPEC-20261009113500 v3，login-modal 同范式）：
   点遮罩不关闭（防误触丢表单），Esc/取消关闭；AJAX 结果/错误就地展示 */
.import-modal[hidden] { display: none; }
.import-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.import-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px 26px; width: 420px; max-width: calc(100% - 48px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.import-title { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.import-desc { font-size: 12px; line-height: 1.7; margin-bottom: 14px; }
.import-card form { display: flex; flex-direction: column; gap: 10px; }
.import-card input[type="file"] { font-size: 12px; color: var(--muted); }
.import-card input[type="text"] {
  background: var(--card-2); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 7px; padding: 8px 10px; font-size: 13px;
}
.import-card input[type="text"]:focus { border-color: var(--accent); outline: none; }
.import-err {
  font-size: 12.5px; color: #e07979; line-height: 1.6;
  background: rgba(224,121,121,.08); border: 1px solid rgba(224,121,121,.3);
  border-radius: 8px; padding: 8px 10px;
}
.import-actions { display: flex; gap: 8px; margin-top: 4px; }
.import-ok-title { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.import-ok-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.import-ok-tbl td { padding: 7px 8px; border-bottom: 1px solid var(--border); }
.import-ok-tbl td.num { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; white-space: nowrap; }

.list-main { min-width: 0; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.list-toolbar .count { color: var(--muted); font-size: 13px; }
.list-toolbar .count b { display: inline-block; color: var(--text); font-variant-numeric: tabular-nums; animation: count-in .22s ease; }
@keyframes count-in { from { opacity: .35; } to { opacity: 1; } }
.list-toolbar select { background: var(--card); color: var(--text); border: 1px solid var(--border-2); border-radius: 7px; padding: 6px 9px; font-size: 13px; }

/* 窄屏 facets 抽屉触发按钮（桌面隐藏） */
.facets-toggle {
  display: none; align-items: center; gap: 7px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--border-2); color: var(--text);
  border-radius: var(--r-md); padding: 8px 14px; font-size: 13px; cursor: pointer;
}
.facets-toggle .ft-ico { color: var(--accent); display: inline-flex; }
.facets-toggle .ft-n {
  min-width: 17px; padding: 0 5px; border-radius: 9px; text-align: center;
  background: rgba(45,212,191,.14); color: var(--accent); font-size: 11px; font-weight: 600; line-height: 17px;
}
.facets-toggle .ft-n[hidden] { display: none; }
.facets-overlay { display: none; }

/* 已选条件 chips：表格上方回显，逐个移除 + 清除全部 */
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.fchip {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--card-2); border: 1px solid var(--border-2); color: var(--text);
  border-radius: 999px; padding: 3px 7px 3px 11px; font-size: 12px; line-height: 1.6; max-width: 260px;
}
.fchip .fchip-k { color: var(--muted); margin-right: 4px; white-space: nowrap; }
.fchip .fchip-v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.fchip .fx {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; margin-left: 5px; border-radius: 50%;
  color: var(--muted-2); font-size: 12px; text-decoration: none; flex: 0 0 auto;
}
.fchip .fx:hover { color: var(--neg); background: rgba(248,113,113,.12); }
.fchip-clear { color: var(--muted); font-size: 12px; margin-left: 4px; white-space: nowrap; }
.fchip-clear:hover { color: var(--neg); }

/* 表格：数值一律 tabular-nums；表头 12px/500/字距 .05em 与数值列同侧右对齐；行高 40（12+16+12） */
.tbl-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-cell); font-variant-numeric: tabular-nums; }
thead th {
  text-align: left; padding: 12px 16px; color: var(--muted); font-weight: 500;
  font-size: 12px; letter-spacing: .05em; border-bottom: 1px solid var(--border); background: var(--bg-2);
  position: sticky; top: 0; white-space: nowrap;
}
thead th.num, thead th.num a { text-align: right; }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody td.empty-td { padding: 0; }   /* 空态占位单元格：padding 交给 .empty-state 自身 */
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--card-2); }
/* 窄屏横向滚动时关键列（地址）固定在左侧 */
th.sticky-col { position: sticky; left: 0; z-index: 2; background: var(--bg-2); }
td.sticky-col { position: sticky; left: 0; z-index: 1; background: var(--card); }
tbody tr:hover td.sticky-col { background: var(--card-2); }
/* 空值占位「—」统一弱化 */
.na { color: var(--muted-2); font-weight: 400; }
td.addr, .addr-cell { font-family: var(--ff-mono); font-size: 12.5px; }
.addr-cell a { color: var(--text); }
.addr-cell a:hover { color: var(--accent); }
.sort-th { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; letter-spacing: .05em; text-decoration: none; white-space: nowrap; }
.sort-th:hover { color: var(--text); }
.sort-th.on { color: var(--accent); }
.sort-th[role="button"] { cursor: pointer; color: var(--text); }   /* 客户端排序表头（无 href 的 a，如任务列表资沉量列）；提亮：深表头下 muted 不可见（发起人反馈） */
.sort-th[role="button"] .sort-arrow { font-size: 13px; color: var(--text); }
.sort-arrow { font-size: 10px; color: var(--muted-2); }
.sort-th.on .sort-arrow { color: var(--accent); }

/* ===== 研判池 ===== */
.triage-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.scope-tabs { display: flex; gap: 8px; }
.triage-counts { display: flex; gap: 8px; flex-wrap: wrap; }
.tc { background: var(--card); border: 1px solid var(--border-2); border-radius: 7px; padding: 6px 12px; font-size: 13px; color: var(--muted); text-decoration: none; }
.tc b { color: var(--text); margin-left: 4px; font-weight: 600; }
.tc.on { border-color: var(--accent); color: var(--accent); background: rgba(45,212,191,0.08); }
.triage-form { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.triage-q { flex: 1; min-width: 220px; background: var(--card); color: var(--text); border: 1px solid var(--border-2); border-radius: 7px; padding: 8px 11px; font-size: 13px; }
.triage-form select { background: var(--card); color: var(--text); border: 1px solid var(--border-2); border-radius: 7px; padding: 7px 9px; font-size: 13px; }
.triage-tbl td.grp { max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-cell { white-space: nowrap; }
.op-cell { white-space: nowrap; }
.op-cell .triage-sel { background: var(--card); color: var(--text); border: 1px solid var(--border-2); border-radius: 6px; padding: 5px 7px; font-size: 12px; }
.op-cell .btn { flex: none; padding: 5px 11px; font-size: 12px; margin-left: 4px; }
.badge.cat.manual { background: rgba(244,114,182,0.14); color: #f472b6; border-color: rgba(244,114,182,0.34); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.num.up { color: var(--c-in); }
.num.down { color: var(--neg); }
.td-badges { display: flex; flex-wrap: wrap; gap: 4px; max-width: 240px; }
.grp { color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 分页 */
.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; font-size: 13px; padding: 0 8px;
}
.pagination a { background: var(--card); border: 1px solid var(--border-2); color: var(--text); }
.pagination a:hover { background: var(--card-2); }
.pagination a.cur { background: var(--accent); color: var(--on-brand); border-color: var(--accent); font-weight: 600; }
.pagination a.dis { color: var(--muted-2); pointer-events: none; opacity: 0.5; }

/* ===== 详情页 ===== */
.detail-head { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; margin-bottom: 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.detail-head .addr-big { font-family: var(--mono); font-size: 18px; font-weight: 600; }
.copy-btn { background: var(--card-2); border: 1px solid var(--border-2); color: var(--muted); border-radius: 7px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.copy-btn:hover { color: var(--text); }
.detail-head .grp-tag { color: var(--muted); font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.arkm-grid { grid-template-columns: repeat(3, 1fr); }
/* 批量任务 - 状态面板表单 */
.tb-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.tb-field { display: flex; flex-direction: column; gap: 6px; }
.tb-field label { font-size: 12px; color: var(--muted); }
.tb-input {
  background: var(--bg); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 7px; padding: 7px 10px; font-size: 13px; width: 150px;
  font-variant-numeric: tabular-nums;
}
.tb-input:focus { outline: none; border-color: var(--accent); }
.tb-actions { display: flex; gap: 8px; margin-left: auto; }
.tb-btn { flex: none; min-width: 88px; }  /* 覆盖 .btn 的 flex:1，按钮不拉伸 */
.tb-error { margin-top: 10px; font-size: 12px; color: var(--neg); min-height: 16px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.stat-l { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.stat-v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-v.up { color: var(--c-in); }
.stat-v.down { color: var(--neg); }
/* 语义方向箭头：正向 ▲ / 负向 ▼，不只靠颜色（色弱兜底）；列表表格列名已含方向，不加 */
.stat-v.up::before, .kpi-value.up::before { content: "▲"; font-size: .58em; margin-right: 5px; vertical-align: 2px; opacity: .8; }
.stat-v.down::before, .kpi-value.down::before { content: "▼"; font-size: .58em; margin-right: 5px; vertical-align: 2px; opacity: .8; }
.stat-s { color: var(--muted-2); font-size: 11px; margin-top: 6px; }
.stat-wrap { margin-bottom: 20px; }
.stat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.stat-title { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .5px; }
.stat-refresh { color: var(--muted-2); font-size: 12px; cursor: pointer; user-select: none; }
.stat-refresh:hover { color: var(--accent); }
.stat-v.muted { color: var(--muted); font-weight: 600; font-size: 15px; }
.arkm-block { margin-top: 6px; padding-top: 6px; }
.arkm-sub { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .5px; }
.firstfund-block { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.ff-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ff-title { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .5px; }
.ff-body { font-size: 13px; line-height: 1.6; }
.addr-link { color: var(--accent); text-decoration: none; }
.addr-link:hover { text-decoration: underline; }

.label-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.label-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.label-row:last-child { border-bottom: none; }
.label-k { color: var(--muted); font-size: 13px; }
.label-v { font-variant-numeric: tabular-nums; font-size: 13px; }
.label-v.mono { font-family: var(--mono); }

/* 人工标签：详情页直接展开（可复制），不走 hover */
.manual-row { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; }
.manual-list .manual-item { display: flex; gap: 9px; align-items: baseline; padding: 2px 0; line-height: 1.6; flex-wrap: wrap; }
.manual-desc { color: var(--text); user-select: text; -webkit-user-select: text; word-break: break-word; }

.placeholder {
  background: repeating-linear-gradient(45deg, var(--card), var(--card) 10px, var(--bg-2) 10px, var(--bg-2) 20px);
  border: 1px dashed var(--border-2); border-radius: var(--r-lg); padding: 22px; text-align: center; color: var(--muted);
}
.placeholder .ph-title { font-size: 14px; color: var(--text); margin-bottom: 6px; font-weight: 600; }
.placeholder .ph-sub { font-size: 12px; }
.placeholder .ph-btn { margin-top: 12px; background: var(--card-2); color: var(--muted); border: 1px solid var(--border-2); border-radius: 7px; padding: 7px 14px; font-size: 12px; cursor: not-allowed; }
/* 「即将上线」品牌徽章：替代灰色 disabled 按钮（视觉上像已失效的问题） */
.ph-soon {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  color: var(--accent); background: rgba(45,212,191,.1); border: 1px solid rgba(45,212,191,.35);
  border-radius: 999px; padding: 5px 14px; font-size: 12px; font-weight: 600; letter-spacing: .5px;
}

/* 统一空态：插画 + 主文案 + 副文案（整表空/面板空共用） */
.empty-state { padding: 44px 20px 40px; text-align: center; }
.empty-state svg { display: block; margin: 0 auto 12px; opacity: .5; }
.empty-state .es-title { font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.empty-state .es-sub { font-size: 12px; color: var(--muted-2); }

/* 面包屑：详情页层级导航（价值分析池 / 地址详情） */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .bc-sep { color: var(--muted-2); opacity: .6; }
.breadcrumb .bc-cur { color: var(--text); font-weight: 500; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rel-tbl { width: 100%; font-size: 12.5px; }
.rel-tbl td { padding: 8px 10px; }

/* Swap 面板：panel-head 右侧的增量刷新按钮 */
.swap-panel .panel-head .copy-btn { margin-left: auto; }
/* Swap 面板：行内小操作（复制/浏览器跳转图标）与币种标签 */
.swap-act { display: inline-flex; align-items: center; margin-left: 5px; padding: 1px; border: none; background: none; color: var(--muted-2); cursor: pointer; vertical-align: middle; }
.swap-act:hover { color: var(--accent); }
.swap-tok { display: inline-block; margin-left: 5px; padding: 1px 6px; border: 1px solid var(--border-2); border-radius: 5px; font-size: 11px; color: var(--muted); font-weight: 500; vertical-align: 1px; }

/* ===== 页脚 ===== */
/* 页脚（F4 紧凑双行）：品牌 + 导航行 / 分割线 + 版权条 */
.footer {
  max-width: 1280px; margin: 0 auto; padding: 30px 28px 18px;
  display: flex; flex-direction: column;
}
.ft-main { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.ft-brand { font-size: 15px; font-weight: 700; letter-spacing: .3px; color: var(--text); }
.ft-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.ft-link { color: var(--muted); font-size: 13px; text-decoration: none; transition: color .15s ease; }
.ft-link:hover { color: var(--accent); }
.ft-bottom {
  margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--border);
  color: var(--muted-2); font-size: 12px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ===== Zone 分区（总览） ===== */
.zone { margin-bottom: 28px; }
.zone-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.zone-head h2 { margin: 0; font-size: 16px; font-weight: 600; }

/* 全量地址 eth/tron 占比条 */
.split-bar { display: flex; height: 8px; border-radius: 5px; overflow: hidden; margin-top: 12px; background: var(--bg); }
.split-bar .seg { color: transparent; font-size: 0; }
.split-bar .seg.eth { background: var(--accent); }
.split-bar .seg.tron { background: var(--exchange); }

/* 链 / bucket 切换 tabs */
.chain-tabs, .bucket-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.ctab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: 8px; font-size: 13px; font-weight: 500;
  background: var(--card); border: 1px solid var(--border-2); color: var(--muted);
}
.ctab:hover { color: var(--text); border-color: var(--border-2); }
.ctab.on { background: var(--card-2); color: var(--text); border-color: var(--accent); }
.ctab .cnt { color: var(--muted-2); font-size: 11px; }

/* ===== 深度研判页 ===== */
.research-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);   /* 展开时左右 3:2 */
  gap: 20px;
  align-items: start;
  transition: grid-template-columns .3s cubic-bezier(.4, 0, .2, 1), gap .3s cubic-bezier(.4, 0, .2, 1);
  position: relative;
}
.research-layout.collapsed { grid-template-columns: minmax(0, 1fr) 0fr; gap: 0; }   /* 折叠：右栏宽度与间距归零 */
.research-layout.collapsed .research-right { opacity: 0; transition: opacity .12s ease; }   /* 收起：立刻淡出再让列宽收缩；不用 display:none */

/* 顶部标题：研判目标地址 + 右上角侧栏开关 */
.research-title {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 20px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.research-title .rt-name { font-size: 16px; font-weight: 700; color: var(--text); }
.research-title .rt-addr { font-family: var(--mono); font-size: 14px; color: var(--muted); word-break: break-all; }
.research-title .copy-btn { margin-left: auto; }

/* 左：Agent 对话框 */
/* 左：Agent 对话框 —— 极简正文流（参照参考图：无气泡/无逐条头像/token chip/reasoning 卡） */
.research-chat {
  height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.chat-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.chat-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.chat-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.chat-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.chat-msgs { flex: 1 1 auto; overflow: auto; display: flex; flex-direction: column; gap: 22px; padding: 20px 2px 4px; position: relative; }

/* thinking 顶部细进度条（极克制的状态指示） */
.think-bar { position: absolute; top: 0; left: 0; right: 0; height: 2px; overflow: hidden; }
.think-bar::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: think 1.8s ease-in-out infinite;
}
@keyframes think { 0% { transform: translateX(-100%); } 100% { transform: translateX(360%); } }

/* 消息：均为正文，无气泡/无逐条头像；用户=弱化提示文本，agent=正文 */
.msg { display: flex; gap: 10px; }
.msg.user { justify-content: flex-end; }
.msg-bubble { max-width: 92%; word-break: break-word; }
.msg.user .msg-bubble { background: var(--card-2); border: 1px solid var(--border-2); color: var(--text); padding: 10px 14px; border-radius: 14px; border-bottom-right-radius: 5px; font-size: 14.5px; line-height: 1.65; max-width: 80%; }
.msg.agent { align-items: flex-start; }
.msg.agent .msg-bubble { background: transparent; border: none; padding: 0; color: var(--text); font-size: 15px; line-height: 1.8; }
.msg-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.cursor { animation: blink 1s steps(2) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }

/* 行内 token chip：地址/链/数值 */
.tok {
  display: inline-block; font-family: var(--mono); font-size: 12.5px; color: var(--text);
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 5px;
  padding: 0 6px; vertical-align: 1px;
}

/* reasoning 卡：独立块，比面板略浅；状态用 ✓ / 节拍点 */
.ev-card { background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.ev-head { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); }
.ev-ico { flex: 0 0 18px; text-align: center; font-size: 14px; line-height: 1; }
.ev-state { margin-left: auto; font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.ev-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); display: inline-block; }
.ev-state.done { color: var(--accent); }
.ev-state.done::before { content: "✓"; width: auto; height: auto; border-radius: 0; background: none; font-size: 10px; font-weight: 700; line-height: 1; }
.ev-state.run::before { background: var(--accent); animation: evdot 1.2s ease-in-out infinite; }
/* 工具调用卡：<details> 可折叠，展示工具结果（像思考过程一样可核对）；名称可点开对应右侧 tab */
.ev-card.ev-tool { padding: 0; background: transparent; border-color: transparent; }
.ev-card.ev-tool > .ev-head { list-style: none; cursor: pointer; padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.ev-card.ev-tool > summary.ev-head::-webkit-details-marker { display: none; }
.ev-chev { margin-left: 4px; color: var(--muted-2); font-size: 12px; font-weight: 700; opacity: 0; transition: opacity .15s ease, transform .15s ease; }
.ev-card.ev-tool .ev-chev { opacity: .8; }   /* 可折叠：chevron 始终可见，展开时旋转 */
details.ev-card.ev-tool[open] .ev-chev { transform: rotate(90deg); }
.tname-link { color: var(--text); cursor: pointer; }
.tname-link:hover { text-decoration: underline; }
.ev-card.ev-tool.done .ev-head, .ev-card.ev-tool.done .tname-link, .ev-card.ev-tool.done .ev-chev { color: var(--muted); }   /* 已完成工具：灰色，区别于对话正文 */
.ev-tool-state { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.ev-tool-state.run { color: var(--accent); }
.ev-tool-state.run::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; animation: evdot 1.2s ease-in-out infinite; }
.ev-tool-state.done::before { content: "✓"; font-size: 10px; font-weight: 700; color: var(--accent); }
details.ev-card.ev-tool .ev-body {
  margin: 0 12px 10px 30px; padding: 8px 12px; border-left: 2px solid var(--border-2);
  border-radius: 0 4px 4px 0; max-height: 280px; overflow-y: auto; white-space: pre-wrap;
  color: var(--muted); font-size: 12.5px; line-height: 1.65;
  font-family: var(--ff-mono);
}
/* 入参（完整地址等）：紧跟工具名、不省略、不被推到最右；状态图标同理紧随其后 */
.ev-card .tool-args { font-family: var(--ff-mono); font-size: 11.5px; color: var(--muted); word-break: break-all; min-width: 0; }

/* 报告块（聊天内）：标题 + 截断预览，点击右侧 tab 展开全量 markdown */
.report-block { background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; }
.report-block:hover { border-color: var(--border-2); }
.rb-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-bottom: 1px solid var(--border); }   /* left 12：📄 图标与 💭/🔧/💬 同列 */
.rb-ico { flex: 0 0 18px; text-align: center; font-size: 14px; line-height: 1; }
.rb-title { font-weight: 600; color: var(--text); font-size: 14px; }
.rb-foot { text-align: center; padding: 8px 16px 12px; }
.rb-btn {
  display: inline-block; background: rgba(45, 212, 191, .08); border: 1px solid var(--accent);
  color: var(--accent); border-radius: 999px; padding: 7px 20px; font-size: 13px; cursor: pointer;
}
.rb-btn:hover { background: rgba(45, 212, 191, .18); }
.rb-preview {
  padding: 10px 16px 10px 38px; max-height: 140px; overflow: hidden; font-size: 13px; line-height: 1.65; color: #a7b0c3;   /* left 38 = 标题首字(12+18+8)，正文与「研判报告」首字对齐 */
  overflow-anchor: none;   /* 流式期间整块 innerHTML 替换，无稳定锚点，参与滚动锚定只会抖动（INTENT-021） */
  -webkit-mask-image: linear-gradient(to bottom, #000 68%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 68%, transparent 100%);
}
.rb-preview h1, .rb-preview h2, .rb-preview h3 { color: var(--text); margin: 4px 0 8px; }
.rb-preview h1:first-child, .rb-preview h2:first-child, .rb-preview h3:first-child { margin-top: 0; }
.rb-preview h2 { font-size: 13px; } .rb-preview h3 { font-size: 12.5px; }
.rb-preview p { margin: 3px 0; } .rb-preview ul { margin: 3px 0; padding-left: 18px; }

/* 右侧「研判报告」tab：全量 markdown 渲染 */
.report-full { padding: 14px 16px; font-size: 13.5px; line-height: 1.75; color: var(--text); }
.report-full h1, .report-full h2, .report-full h3, .report-full h4 { color: var(--text); margin: 14px 0 6px; line-height: 1.3; }
.report-full h1 { font-size: 20px; margin: 20px 0 10px; font-weight: 700; }
.report-full h1:first-child { margin-top: 0; }
.report-full h2 { font-size: 15px; } .report-full h3 { font-size: 14px; }
.report-full p { margin: 6px 0; }
.report-full ul, .report-full ol { margin: 6px 0; padding-left: 20px; }
.report-full li { margin: 2px 0; }
.report-full strong { font-weight: 700; }
.report-full em { color: var(--muted); }
.report-full code { font-family: var(--mono); font-size: 12px; background: var(--bg-2); padding: 1px 5px; border-radius: 4px; }
.report-full hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
.rb-preview hr { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }
.report-full table.md-table, .rb-preview table.md-table {
  border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 12.5px; display: block; overflow-x: auto;
}
.report-full table.md-table th, .report-full table.md-table td,
.rb-preview table.md-table th, .rb-preview table.md-table td {
  border: 1px solid var(--border); padding: 6px 9px; text-align: left; white-space: normal; word-break: break-word;
}
.report-full table.md-table th, .rb-preview table.md-table th { background: var(--bg-2); color: var(--text); font-weight: 600; }
.report-full table.md-table td, .rb-preview table.md-table td { color: var(--muted); }
@keyframes evdot { 50% { opacity: .3; } }
.ev-body { color: var(--muted); margin: 6px 0 0; padding-left: 28px; }
.ev-action { color: var(--link); cursor: pointer; text-decoration: none; }
.ev-action:hover { text-decoration: underline; }
.chat-hint { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.8; }

/* 特殊地址（交易所大地址/合约地址）直判提示卡：服务端渲染，进页即见、常驻 */
.chat-notice {
  margin: 10px 2px 0; padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08);
  font-size: 12.5px; line-height: 1.8; color: var(--muted);
}
.chat-notice b { color: var(--exchange); font-weight: 600; }

/* 输入栏：圆角凸起 + 圆形 accent 发送 */
.chat-input-bar { flex: 0 0 auto; display: flex; gap: 10px; padding: 16px 0 2px; }
.chat-input-bar input {
  flex: 1; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 14px;
  color: var(--text); padding: 11px 14px; font-size: 13px; transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.chat-input-bar input:focus { outline: none; border-color: rgba(45, 212, 191, .5); }
.chat-input-bar input:disabled { color: var(--muted-2); cursor: not-allowed; }
.send-btn {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: none;
  background: var(--accent); color: var(--on-brand); cursor: pointer; display: grid; place-items: center;
}
.send-btn:disabled { background: var(--card-2); color: var(--muted-2); cursor: not-allowed; border: 1px solid var(--border-2); }
/* 生成中：发送键变停止键——始终可点击；红底白方块，区分发送态 */
.send-btn .ico-stop { display: none; }
.send-btn.is-stop { background: #ef4444; color: #fff; }
.send-btn.is-stop:hover { background: #dc2626; }
.send-btn.is-stop .ico-send { display: none; }
.send-btn.is-stop .ico-stop { display: block; }
.send-btn.is-stop:disabled { background: var(--card-2); color: var(--muted-2); border: 1px solid var(--border-2); }

/* 全局滚动条：贴合暗色主题（细、透明轨道、低调 thumb） */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #3a4258; background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }

/* 右：可收缩数据侧栏 */
.research-right {
  display: flex; flex-direction: column;
  max-height: calc(100vh - 92px); margin-bottom: 0;
  min-width: 0; overflow: hidden;            /* 过渡时裁剪内容到当前列宽，防止文字闪出页面 */
  transition: opacity .2s ease .15s;         /* 展开：等列宽(.3s)增长后再淡入，避免标题闪 */
}
.right-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -2px -2px 0; }
.rtab {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 10px 14px; font-size: 13px; cursor: pointer;
}
.rtab:hover { color: var(--text); }
.rtab.on { color: var(--accent); border-bottom-color: var(--accent); }
.right-body { overflow: auto; padding-top: 14px; }
.tab-pane { display: none; }
.tab-pane.on { display: block; }

/* ===== 会话监控面板（研判页右侧栏「监控」tab） ===== */
.pane-monitor { display: flex; flex-direction: column; gap: 14px; font-size: 12.5px; }
/* Token 统计卡：3 列网格 */
.mon-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.mon-stat {
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 10px;
  padding: 10px 12px 9px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.mon-stat em {
  font-style: normal; font-family: var(--mono); font-size: 15px; font-weight: 700;
  color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mon-stat span { font-size: 11px; color: var(--muted-2); }
.mon-cur { color: var(--muted); font-size: 12px; padding: 0 2px; }
.mon-cur-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 2px; }
/* 区块 */
.mon-sec {
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 12px;
  overflow: hidden;
}
.mon-sec-head {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.mon-sec-ico { flex: 0 0 auto; }
.mon-count {
  margin-left: auto; font-family: var(--mono); font-size: 11px;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 99px;
  padding: 1px 8px; color: var(--muted-2);
}
.mon-clear {
  margin-left: 8px; font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: none; border: 1px solid var(--border-2); color: var(--muted-2); cursor: pointer;
}
.mon-clear:hover { color: var(--text); border-color: var(--accent); }
/* 问题条目：warn / error 两级 */
.mon-issues { display: flex; flex-direction: column; }
.mon-issue { padding: 9px 12px; border-bottom: 1px solid var(--border); position: relative; }
.mon-issue:last-child { border-bottom: none; }
.mon-issue .mi-title { font-weight: 600; font-size: 12.5px; }
.mon-issue.is-warn .mi-title { color: var(--exchange); }
.mon-issue.is-error .mi-title { color: var(--neg); }
.mon-issue.is-info .mi-title { color: var(--accent); }
.mon-issue .mi-detail { color: var(--muted); font-size: 11.5px; margin-top: 3px; line-height: 1.55; word-break: break-all; }
.mon-issue .mi-time { position: absolute; top: 9px; right: 12px; font-size: 10.5px; color: var(--muted-2); }
.mon-empty { padding: 14px 12px; text-align: center; }
/* 模型 / 工具调用表 */
.mon-table-wrap { overflow-x: auto; }
.mon-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.mon-table th {
  text-align: left; font-weight: 600; color: var(--muted-2);
  padding: 7px 12px 5px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.mon-table td {
  padding: 6px 12px; color: var(--muted); border-bottom: 1px solid var(--border);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.mon-table tr:last-child td { border-bottom: none; }
.mon-table td.mono { font-family: var(--mono); }
.mon-table tr.is-err td { color: var(--neg); }
/* 事件日志：等宽滚动区 */
.mon-events {
  max-height: 260px; overflow-y: auto; padding: 8px 12px;
  font-family: var(--mono); font-size: 11px; line-height: 1.7; color: var(--muted);
}
.mon-ev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-ev.err { color: var(--neg); }
.mon-ev.turn { color: var(--accent); }
.mon-ev.mc { color: var(--platform); }
.mon-ev.conn { color: var(--link); }

/* 右上角侧栏开关（在 .research-title 末尾；折叠态 dim，展开态 accent） */
.right-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--card-2); border: 1px solid var(--border-2);
  color: var(--muted); cursor: pointer;
}
.right-toggle:hover { color: var(--text); border-color: var(--border-2); }
.right-toggle.on { color: var(--accent); border-color: rgba(45,212,191,.45); background: rgba(45,212,191,.1); }

/* 研判页右侧栏内的详情：窄列（~540px）适配，避免地址/表格硬塞换行。
   只在 .research-detail 作用域收缩，不影响 detail.html 宽页样式。 */
.research-detail .stat-grid { grid-template-columns: repeat(2, 1fr); }
.research-detail .two-col { grid-template-columns: 1fr; }
.research-detail .panel { margin-bottom: 16px; }
.research-detail .detail-head { padding: 14px 16px; gap: 10px; }       /* 收窄内边距/间距（原 20/24） */
.research-detail .detail-head .addr-big { font-size: 13px; }           /* 顶栏已展全地址；此处次要信息，缩到单行可容纳（原 18px 会撑爆窄栏） */
.research-detail .stat { padding: 12px 14px; }                          /* 2 列卡收缩内边距（原 16/18） */
.research-detail .stat-v { font-size: 18px; }                           /* 数值字号同步收一档（原 20px） */
.research-detail .rel-tbl { font-size: 11.5px; }                        /* 关联表 4 列在窄栏收缩，避免撑行 */
.research-detail .rel-tbl td { padding: 6px 6px; }                      /* 原 8/10 */

/* 详情头：深度研判入口——品牌实心按钮 CTA（升级自弱链接样式）+ 悬停箭头位移 */
.deep-link {
  margin-left: auto; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); border: 1px solid var(--accent); color: var(--on-brand);
  font-weight: 600; border-radius: var(--r-md); padding: 7px 14px; font-size: 13px;
  transition: filter .15s ease;
}
.deep-link:hover { filter: brightness(1.08); }
.deep-link .dl-arrow { font-weight: 700; transition: transform .15s ease; }
.deep-link:hover .dl-arrow { transform: translateX(2px); }

/* TG 上下文 */
.tg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tg-head #tgMeta { flex: 1; font-size: 12px; }
.tg-body { display: flex; flex-direction: column; gap: 8px; }
.tg-msg { background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.tg-msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12px; }
.tg-nick { color: var(--accent); font-weight: 600; }
.tg-time { color: var(--muted-2); margin-left: auto; }
.tg-reply { color: var(--link); background: rgba(59,130,246,.1); border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.tg-text { color: var(--text); font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.tg-file { color: var(--muted); font-size: 12px; margin-left: 6px; }

/* ===== 响应式 ===== */
@media (max-width: 980px) {
  .kpi-grid, .cov-grid, .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col, .label-grid { grid-template-columns: 1fr; }
  .list-layout { grid-template-columns: 1fr; }
  /* facets 抽屉化：窄屏默认收起为触发按钮，点开为左滑抽屉（Esc/遮罩关闭，app.js） */
  .facets { position: static; max-height: none; }
  .facets-toggle { display: inline-flex; }
  .facets-overlay {
    display: block; position: fixed; inset: 0; z-index: 94;
    background: rgba(4, 6, 10, .55); opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
  }
  .facets {
    transform: translateX(-102%); transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  }
  body.facets-open { overflow: hidden; }
  body.facets-open .facets-overlay { opacity: 1; pointer-events: auto; }
  body.facets-open .facets {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 95;
    width: min(320px, 88vw); border-radius: 0 14px 14px 0;
    overflow-y: auto; overscroll-behavior: contain; transform: none; box-shadow: 16px 0 44px rgba(0, 0, 0, .5);
  }
  .facets-drawer-head { display: flex; align-items: center; justify-content: space-between; }
  .facets-close { display: grid; }
  .research-layout { grid-template-columns: 1fr; }
  .research-chat { height: auto; max-height: 460px; }
  .research-right { max-height: none; }
}
@media (max-width: 560px) {
  .kpi-grid, .cov-grid, .stat-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 100px 1fr 70px; }
}

/* ===== 深度研判 Agent 对话（SSE 流式事件渲染） ===== */
/* 单轮 Agent 输出容器：思考卡 / 工具卡 / 分析 / 报告 按到达顺序排列 */
.turn-items { display: flex; flex-direction: column; gap: 12px; }

/* 报告 / 分析正文：保留换行与缩进，分析弱化为过程文本 */
.msg.agent .msg-bubble.report,
.msg.agent .msg-bubble.analysis { white-space: pre-wrap; }
/* 叙述(analysis)：无需图标，文字缩进到事件消息标题首字位置(38px = 图标12+宽18+gap8) */
.msg.agent .msg-bubble.analysis {
  color: var(--text); font-size: 14px; line-height: 1.7;
  padding: 2px 12px 2px 38px;
}

/* 进行中光标：全局唯一，仅 busy 时在聊天末尾、对齐图标列（不追块） */
.stream-cursor {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 12px;
  color: var(--accent); font-size: 14px; line-height: 1.7;
}
.stream-cursor .sc-ico { flex: 0 0 18px; text-align: center; font-size: 14px; opacity: .55; }
.stream-cursor .sc-bar { width: 7px; height: 15px; background: var(--accent); border-radius: 1px; animation: thinkpulse 1.1s ease-in-out infinite; }

/* 「↓ 新内容」浮窗：用户上滚查看历史时，流式新内容不再抢滚动，改为浮出此按钮供一键回底 */
.jump-bottom {
  position: absolute; right: 24px; bottom: 104px; z-index: 6;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 16px;
  border: 1px solid var(--border-2); background: var(--card-2); color: var(--text);
  font-size: 12px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.32);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.jump-bottom.show { opacity: 1; visibility: visible; transform: none; }
.jump-bottom:hover { border-color: var(--accent); color: var(--accent); }

/* 会话 ID chip（顶栏） */
.sid-chip {
  font-family: var(--mono); font-size: 11px; color: var(--muted-2);
  padding: 2px 7px; border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; user-select: none; transition: color .15s ease, border-color .15s ease;
}
.sid-chip:hover { color: var(--text); border-color: var(--border-2); }

/* 思考过程卡：凹陷容器 + chevron + 图标 + 标签 + 耗时徽标；muted 斜体可折叠正文（<details> 原生折叠） */
details.think-block { background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 0; }
details.think-block > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: var(--muted); font-size: 12.5px; font-weight: 500; }   /* gap 8：标题首字与 tool/report 统一在 38px */
details.think-block > summary::-webkit-details-marker { display: none; }
details.think-block .think-chev { margin-left: 6px; color: var(--muted-2); font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .15s ease; }
details.think-block:hover .think-chev { opacity: 1; }
details.think-block .think-ico { flex: 0 0 18px; text-align: center; font-size: 14px; line-height: 1; }
details.think-block .think-label { color: var(--muted); }   /* 已完成：灰色，区别于对话正文 */
details.think-block .think-label.think-loading { color: var(--accent); animation: thinkpulse 1.1s ease-in-out infinite; }
details.think-block .think-dur { margin-left: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
@keyframes thinkpulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
details.think-block .ev-body { margin: 4px 10px 10px 28px; padding: 10px 12px 10px 14px; border-left: 2px solid var(--border-2); border-radius: 0 4px 4px 0; max-height: 240px; overflow-y: auto; color: var(--muted-2); font-size: 12px; line-height: 1.65; font-style: italic; white-space: pre-wrap; }

/* 错误卡：红色左边框 */
.ev-card.ev-error { border-left: 3px solid #f87171; }
.ev-card.ev-error .ev-body { color: #fca5a5; }
.ev-card.ev-interrupt { border-left: 3px solid var(--exchange); }
.ev-card.ev-interrupt .ev-body { color: var(--muted); }

/* 生成中：状态点呼吸 */
.chat-status .dot.run { animation: evdot 1.2s ease-in-out infinite; }

/* ===== 深度研判：全屏布局（body.page-research） ===== */
/* 隐藏全局顶栏/页脚，容器撑满，禁止滚动；由 .rs-screen 固定铺满视口 */
body.page-research { overflow: hidden; background: var(--bg); }
body.page-research .topbar,
body.page-research .footer { display: none; }
body.page-research .container { max-width: none; margin: 0; padding: 0; }

.rs-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  background: var(--bg-2);   /* 比全局底色提亮一档，降低聊天区的沉闷感 */
  --rs-content: 860px;   /* 聊天正文 / 输入框的居中阅读宽度 */
}

/* 合并顶栏：返回 / 链标 / 研判 / 地址 / 复制  ··  Agent 状态 / 侧栏开关 */
.rs-topbar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--card);
}
.rs-topbar .rs-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.rs-topbar .rs-right-hd { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.rs-back { color: var(--muted); text-decoration: none; font-size: 22px; line-height: 1; padding: 0 2px; flex: 0 0 auto; }
.rs-back:hover { color: var(--accent); }
.rs-topbar .rt-name { font-size: 15px; font-weight: 700; color: var(--text); flex: 0 0 auto; }
.rs-topbar .rt-addr {
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rs-topbar .copy-btn { flex: 0 0 auto; }

/* 侧栏开关：收起时低亮、展开（.on）时 accent */
.rs-topbar .right-toggle {
  background: none; border: 1px solid var(--border-2); border-radius: 8px;
  color: var(--muted); padding: 6px; cursor: pointer; display: grid; place-items: center;
}
.rs-topbar .right-toggle:hover { color: var(--text); border-color: var(--accent); }
.rs-topbar .right-toggle.on { color: var(--accent); border-color: var(--accent); }

/* 主体：左聊天 + 右数据栏（内联分栏，右侧推入时挤压左侧，非浮层） */
.rs-body { flex: 1 1 auto; display: flex; min-height: 0; }
.rs-chat { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; position: relative; }
.rs-chat .chat-msgs {
  flex: 1 1 auto; overflow: auto;
  width: 100%;                /* 滚动容器撑满聊天列宽 → 滚动条贴近右侧边框 */
  scrollbar-gutter: stable;   /* 始终预留滚动条位，内容区宽度恒定 → 与下方输入框逐像素对齐 */
  padding: 22px 16px 150px;   /* 底部留白：最后一条消息能滚到悬浮输入框之上 */
}
/* 内容限宽居中（滚动条留在外侧边框，内容仍是阅读宽度）。
   ⚠️ 必须 width:100%：.chat-msgs 被全局规则(.chat-msgs{display:flex;flex-direction:column})
   做成了 flex 列，子项是弹性项——只给 max-width+margin:auto 会让弹性项按内容收缩并居中
   （用户消息会缩成一团停在正中）。给确定 width:100% 后被 max-width 收口为 860、auto 边距
   居中，.msg.user 的 justify-content:flex-end 才能把气泡顶到列右侧（与输入框右边对齐）。 */
.rs-chat .chat-msgs > * { width: 100%; max-width: var(--rs-content); margin-inline: auto; }

/* 消息列限宽刚性 + 长串断词（INTENT-022）：消息项是 flex 布局，子项默认
   min-width:auto 使最小宽=内容 min-content——长不可断串（地址链/hash/
   无空格长行，实测 283 字符≈1400px）把内层撑到 1484px 突破 860 限宽，
   消息区出现横向滚动。min-width:0 允许收缩 + anywhere 断词（参与
   min-content 计算；break-word 不参与、单用无效）双向解除。 */
.rs-chat .chat-msgs .msg.agent.turn .turn-items { min-width: 0; }
.rs-chat .chat-msgs :is(.ev-body, .msg-bubble, .rb-preview),
.report-full, .report-full td, .rb-preview td { overflow-wrap: anywhere; }

/* 右侧数据栏：flex 分栏项，占据空间挤压左侧；collapsed 时宽度归零收起 */
.rs-right {
  flex: 0 0 0; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--card); border-left: 0 solid var(--border);
  opacity: 0;
  transition: flex-basis .28s cubic-bezier(.4, 0, .2, 1),
              border-left-width .28s ease, opacity .18s ease;
}
.rs-screen:not(.collapsed) .rs-right {
  flex-basis: min(540px, 38vw);
  border-left-width: 1px; opacity: 1;
}
/* 内容固定宽度，随父容器收展裁剪，避免收起时文字被挤压换行 */
.rs-right .right-tabs { width: min(540px, 38vw); }
.rs-right .right-body {
  width: min(540px, 38vw); flex: 1 1 auto; overflow: auto;
  padding: 14px clamp(14px, 3vw, 24px);
}

/* 悬浮输入框：浮起的圆角卡片（无边框分隔），文本区 + 操作行，与底部留边 */
/* 悬浮输入框：绝对定位于左列底部，浮在消息流之上；随左列被右侧栏挤压 */
.rs-input {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px calc(16px + var(--scrollbar-w)) 16px 16px;  /* 右侧补滚动条等量内边距 → composer 与上方聊天内容列右沿逐像素对齐 */
  background: linear-gradient(to top, var(--bg-2) 62%, transparent);   /* 顶部渐变淡出，消息自然隐入（与 rs-screen 底色一致） */
  pointer-events: none;        /* 渐变区不挡滚动；仅 composer 捕获交互 */
}
.rs-input .composer { pointer-events: auto; }
/* Agent 研判流式进度阶段条：由 SSE 事件驱动（思考 → 工具调用(N) → 分析 → 报告），仅生成中显示 */
.rs-progress {
  display: none; justify-content: center; margin-bottom: 10px;
  pointer-events: none; max-width: var(--rs-content); margin-inline: auto;
}
.rs-progress.show { display: flex; }
.rs-prog-card {
  display: inline-flex; align-items: center;
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 999px;
  padding: 6px 6px 6px 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  font-size: 12px; max-width: 100%; overflow: hidden;
}
.rs-prog-step { display: inline-flex; align-items: center; gap: 5px; color: var(--muted-2); padding: 0 10px; white-space: nowrap; }
.rs-prog-step + .rs-prog-step { border-left: 1px solid var(--border-2); }
.rs-prog-step .ps-ico { font-size: 11px; line-height: 1; }
.rs-prog-step.done { color: var(--muted); }
.rs-prog-step.done .ps-ico { color: var(--c-in); }
.rs-prog-step.cur { color: var(--accent); font-weight: 600; }
.rs-prog-step.cur .ps-ico { animation: evdot 1.2s ease-in-out infinite; }
.rs-prog-time { font-family: var(--ff-mono); font-size: 11px; color: var(--muted-2); padding-left: 10px; white-space: nowrap; }
.composer {
  width: 100%; max-width: var(--rs-content); margin-inline: auto;
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  padding: 4px 6px 4px 14px;
  display: flex; flex-direction: column;
}
.composer textarea {
  width: 100%; resize: none; border: none; outline: none; background: transparent;
  color: var(--text); font-family: inherit; font-size: 13.5px; line-height: 1.6;
  min-height: 48px;            /* 容纳两行文字 */
  max-height: 160px;           /* 超长自动滚动，不自撑爆 */
  padding: 9px 0; overflow-y: auto;
}
.composer textarea::placeholder { color: var(--muted-2); }
.composer textarea:disabled { color: var(--muted-2); cursor: not-allowed; }
.composer-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  padding: 2px 0 4px;
}
.composer-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
}
.composer-actions .send-btn { width: 36px; height: 36px; }   /* 比独立发送键略小，贴右下 */

/* 研究模式折叠选择器（深度研判 / 线索挖掘）：左下角「图标+文字」按钮 + 上拉列表 */
.mode-fold { position: relative; }
.mode-fold-btn {
  appearance: none; border: none; background: transparent;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font: inherit; font-size: 12px; line-height: 1;
  padding: 6px 8px; border-radius: 8px; cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.mode-fold-btn:hover { color: var(--accent); background: rgba(45, 212, 191, .08); }
.mode-fold-btn .mf-ico { display: inline-flex; color: var(--accent); }
.mode-fold-btn .mf-ico svg { display: block; }
.mode-fold-btn .mf-caret { color: var(--muted-2); transition: transform .2s ease; }
.mode-fold.open .mf-caret { transform: rotate(180deg); }
.mode-fold.locked { opacity: .5; pointer-events: none; }   /* 生成中：置灰禁用 */

/* 上拉列表：自按钮上方弹出 */
.mode-list {
  position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 40;
  min-width: 280px; padding: 5px;
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .5);
  visibility: hidden; opacity: 0; transform: translateY(6px) scale(.98);
  transform-origin: bottom left;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.mode-fold.open .mode-list { visibility: visible; opacity: 1; transform: translateY(0) scale(1); }
.mode-btn {
  appearance: none; border: none; background: transparent; cursor: pointer;
  width: 100%; display: flex; align-items: center; gap: 10px;
  color: var(--muted); font: inherit; font-size: 13px; line-height: 1.4;
  padding: 8px 10px; border-radius: 9px; text-align: left;
  transition: background .15s ease, color .15s ease;
}
.mode-btn:hover { background: var(--card); color: var(--text); }
.mode-btn .mi-ico { flex: 0 0 auto; display: inline-flex; color: var(--muted-2); margin-top: 1px; }
.mode-btn .mi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mode-btn .mi-main b { font-weight: 600; color: var(--text); }
.mode-btn .mi-main em { font-style: normal; font-size: 11px; color: var(--muted-2); }
.mode-btn .mi-check { flex: 0 0 auto; color: var(--accent); opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease; }
.mode-btn.on { background: rgba(45, 212, 191, .1); }
.mode-btn.on .mi-ico { color: var(--accent); }
.mode-btn.on .mi-main b { color: var(--accent); }
.mode-btn.on .mi-check { opacity: 1; transform: scale(1); }

/* 模型折叠选择器（多模型管理）：复用 mode-fold 结构，条目为纯模型名（无副标题） */
.composer-foot .model-fold { flex: 0 0 auto; margin-left: auto; margin-right: 4px; }   /* 靠右贴发送键（与容器 gap 合计 12px 间隔），模式留在左侧 */
.model-fold .mode-list { min-width: 220px; }
.model-fold .mode-btn .mi-main.mm-name {
  flex: 1; min-width: 0;
  font-family: var(--ff-mono);
  font-size: 12.5px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.model-fold .mode-btn.on .mi-main.mm-name { color: var(--accent); }
.model-fold .mode-fold-btn .mf-label {
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--ff-mono);
}

/* 窄屏（≤980px）：右侧数据栏改为悬浮遮罩抽屉——绝对定位浮在聊天列之上，
   不再内联挤压聊天内容与输入框；遮罩盖住聊天列（两者不同时使用），点遮罩/Esc 收起（app.js） */
.rs-overlay { display: none; }   /* 宽屏：不参与渲染 */
@media (max-width: 980px) {
  .rs-body { position: relative; }
  /* 遮罩窄屏常驻渲染，用 opacity+visibility 控制显隐以获得与抽屉同步的淡入淡出；
     visibility 参与过渡：收起时到点才隐藏（期间可淡出），展开时立即可见 */
  .rs-overlay {
    display: block;
    position: absolute; inset: 0; z-index: 15;
    background: rgba(0, 0, 0, .5);
    opacity: 0; visibility: hidden;
    transition: opacity .28s ease, visibility .28s;
  }
  .rs-screen:not(.collapsed) .rs-overlay { opacity: 1; visibility: visible; }
  .rs-right {
    position: absolute; top: 0; right: 0; bottom: 0; z-index: 20;
    width: min(420px, 92vw);
    border-left: 1px solid var(--border-2);
    box-shadow: -16px 0 44px rgba(0, 0, 0, .5);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1), opacity .18s ease;
  }
  .rs-screen:not(.collapsed) .rs-right { transform: translateX(0); }
  .rs-right .right-tabs,
  .rs-right .right-body { width: 100%; }
  /* 窄面板放不下四个页签时横向滚动，页签不折行不压缩；
     flex:0 0 auto 必须保留——overflow 容器的自动最小高度为 0，列向 flex 会被
     .right-body 的长内容（如 TG 消息列表）把页签行垂直挤没 */
  .rs-right .right-tabs { overflow-x: auto; flex: 0 0 auto; }
  .rs-right .right-tabs .rtab { flex: 0 0 auto; white-space: nowrap; }
}
/* 减少动效偏好：抽屉滑入与遮罩淡入直接到位 */
@media (prefers-reduced-motion: reduce) {
  .rs-right, .rs-overlay { transition: none; }
}

/* 窄屏：顶栏隐藏长地址 */
@media (max-width: 720px) {
  .rs-topbar .rt-addr { display: none; }
}

/* ===== 追溯画布（研判页右侧「追溯画布」tab，vis-network / canvas.js） ===== */
/* 画布 tab 激活时侧栏内容区改为纵向 flex 全高布局：画布自身平移缩放，页面不再滚动 */
.rs-right .right-body.canvas-on {
  display: flex; flex-direction: column;
  padding-bottom: 14px; overflow: hidden;
}
/* 覆盖 .tab-pane.on 的 display:block——画布需要撑满侧栏高度的弹性列 */
#pane-canvas.on { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.cv-pane { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; }
.cv-head { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.cv-title { font-size: 13px; font-weight: 700; color: var(--text); flex: 0 0 auto; }
.cv-stats {
  flex: 1 1 auto; font-size: 11px; color: var(--muted-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cv-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.cv-btn {
  appearance: none; background: none; border: 1px solid var(--border-2); border-radius: 7px;
  color: var(--muted); font: inherit; font-size: 11.5px; padding: 3px 10px; cursor: pointer;
}
.cv-btn:hover { color: var(--accent); border-color: var(--accent); }
/* 专业画布跳转（差异化于普通幽灵按钮：accent 描边/文字/浅底 + 外链箭头，hover 实底） */
.cv-btn-jump {
  border-color: rgba(45, 212, 191, .55);
  color: var(--accent);
  background: rgba(45, 212, 191, .12);
  font-weight: 600;
}
.cv-btn-jump:hover:not(:disabled) {
  color: #08211e; background: var(--accent); border-color: var(--accent);
}
.cv-btn-jump:disabled { opacity: .55; cursor: default; }
/* 画布区包裹层：相对定位，承载 vis 容器 + 状态浮层（浮层不能放进 vis 容器——vis 构造时会清空它） */
.cv-canvas-box { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }
/* vis 画布容器：flex 链上的显式高度（flex:1 + min-height:0），否则 vis 量不到尺寸。
   浅色画布区对齐 fund-flow-canvas-demo.html：#f9f9f9 底 + 40px 方格网底线；外壳保持应用暗色 */
.cv-wrap {
  flex: 1 1 auto; min-height: 0;
  background-color: #f9f9f9;
  background-image:
    linear-gradient(90deg, #efefef 1px, transparent 1px),
    linear-gradient(#efefef 1px, transparent 1px);
  background-position: 40px 40px;
  background-size: 40px 40px;
  border: 1px solid #d9dfe8; border-radius: 12px;
  overflow: hidden;
}
/* 状态浮层：加载 / 空态 / 失败 / 数据服务未就绪，盖在画布上（同浅色系） */
.cv-msg {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  background: rgba(249, 249, 249, .92); border-radius: 12px;
}
.cv-msg[hidden] { display: none; }
.cv-msg-card {
  max-width: 380px; margin: 0 18px; padding: 18px 22px; text-align: center;
  font-size: 12.5px; color: #5b6472; line-height: 1.9;
  background: #fff; border: 1px solid #d9dfe8; border-radius: 12px;
}
.cv-msg-card b { color: #1f2937; }
/* 底部选中信息栏：节点地址 + 身份标签 / 边金额 + 类型 */
.cv-info {
  flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  min-height: 30px; padding: 5px 10px;
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 9px;
  font-size: 11.5px; color: var(--muted);
}
.cv-info b { color: var(--text); font-weight: 600; }
.cv-tag {
  font-size: 10.5px; color: var(--accent); background: rgba(45, 212, 191, .12);
  border-radius: 999px; padding: 1px 8px;
}
.cv-tag-self { color: var(--exchange); background: rgba(251, 191, 36, .12); }
.cv-hash { color: var(--muted-2); font-size: 10.5px; }

/* 右下角悬浮排序钮 + 菜单（demo .canvas-action/.sort-* 同款值，套 cv- 前缀；
   悬浮在浅色画布上，z 低于 .cv-msg(5)——空态/加载浮层展开时盖住它 */
.cv-float-actions { position: absolute; right: 10px; bottom: 10px; z-index: 4; }
.cv-sort-wrap { position: relative; }
.cv-sort-toggle {
  position: relative;
  display: grid; width: 30px; height: 30px; padding: 0; place-items: center;
  color: #0d0e0f; font: 500 21px/1 Arial, "Microsoft YaHei", sans-serif;
  background: #ffffff; border: 0; border-radius: 4px; cursor: pointer;
}
.cv-sort-toggle:hover,
.cv-sort-toggle[aria-expanded="true"] { background: #ebedf1; }
.cv-sort-toggle:focus-visible,
.cv-sort-item:focus-visible { outline: 2px solid #5b92e8; outline-offset: 1px; }
.cv-sort-toggle[data-tooltip]::after {
  position: absolute; right: 50%; bottom: calc(100% + 9px); z-index: 30;
  display: none; padding: 5px 8px;
  color: #ffffff; font-size: 12px; font-weight: 400; white-space: nowrap;
  content: attr(data-tooltip);
  background: #303133; border-radius: 4px; transform: translateX(50%);
  pointer-events: none;
}
.cv-sort-toggle[data-tooltip]:hover::after,
.cv-sort-toggle[data-tooltip]:focus-visible::after { display: block; }
.cv-sort-toggle[aria-expanded="true"]::after { display: none; }
.cv-sort-menu {
  position: absolute; right: 0; bottom: 42px; display: none;
  width: 178px; padding: 4px;
  background: #ffffff; border: 1px solid #e7e9ed; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.cv-sort-menu.open { display: block; }
.cv-sort-item {
  display: flex; align-items: center;
  width: 100%; min-height: 42px; padding: 6px 8px;
  color: #0d0e0f; text-align: left; font: inherit;
  background: #ffffff; border: 0; border-radius: 7px; cursor: pointer;
}
.cv-sort-item:hover:not(:disabled) { background: #f5f6f8; }
.cv-sort-item:disabled { color: #bac0ca; cursor: not-allowed; }
.cv-sort-glyph {
  display: grid; flex: 0 0 30px; width: 30px; place-items: center;
  font-size: 19px; line-height: 1;
}
.cv-sort-label { flex: 1; font-size: 14px; font-weight: 500; }
.cv-sort-help {
  display: grid; flex: 0 0 16px; width: 16px; height: 16px; place-items: center;
  color: #ffffff; font-size: 11px; font-weight: 500;
  background: #bac0ca; border-radius: 50%;
}
/* 右键圈选遮罩（demo .selection-mask 同款；由 canvas.js 挂 body，fixed 视口定位）。
   z 需高于 .rs-screen(100) 与画布全屏 .cv-full(300)，否则被不透明研判屏整层盖住 */
.cv-selection-mask {
  position: fixed; z-index: 400; display: none;
  background: rgba(64, 158, 255, .16); border: 1px solid #409eff;
  pointer-events: none;
}

/* 全屏：画布卡片覆盖整个研判屏（Esc / 还原退出），内部仍是同一套 flex 布局 */
.cv-pane.cv-full {
  position: fixed; inset: 0; z-index: 300;   /* 高于 .rs-screen(100) 与窄屏抽屉(20) */
  background: var(--bg-2); padding: 14px 18px 16px;
  box-shadow: 0 0 60px rgba(0, 0, 0, .5);
}

/* 画布 tab 激活时右栏加宽：图需要横向空间（窄屏抽屉模式不受影响，仍 min(420px,92vw)） */
@media (min-width: 981px) {
  .rs-screen.canvas-wide:not(.collapsed) .rs-right { flex-basis: min(700px, 48vw); }
  .rs-screen.canvas-wide .rs-right .right-tabs,
  .rs-screen.canvas-wide .rs-right .right-body { width: min(700px, 48vw); }
}

/* ===== 左侧会话抽屉（镜像右侧数据抽屉，独立 .sessions-open 开关） ===== */
.rs-sessions-toggle {
  background: none; border: 1px solid var(--border-2); border-radius: 8px;
  color: var(--muted); padding: 6px; cursor: pointer; display: grid; place-items: center; flex: 0 0 auto;
}
.rs-sessions-toggle:hover { color: var(--text); border-color: var(--accent); }
.rs-screen.sessions-open .rs-sessions-toggle { color: var(--accent); border-color: var(--accent); }

.rs-sessions {
  flex: 0 0 0; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--card); border-right: 1px solid var(--border);
  transition: flex-basis .3s cubic-bezier(.4, 0, .2, 1);
}
.rs-screen.sessions-open .rs-sessions { flex-basis: 288px; }
.rs-sessions-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.rs-sessions-tabs {
  display: flex; gap: 3px; background: var(--card-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 3px;
}
.rs-tab {
  appearance: none; border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: 12px; color: var(--muted-2); padding: 4px 9px; border-radius: 6px;
}
.rs-tab:hover { color: var(--text); }
.rs-tab.on { background: rgba(45, 212, 191, .14); color: var(--accent); }
.rs-sessions-new {
  background: none; border: 1px solid var(--border-2); color: var(--accent);
  border-radius: 7px; padding: 4px 9px; font-size: 12px; cursor: pointer;
}
.rs-sessions-new:hover { background: rgba(45, 212, 191, .1); border-color: var(--accent); }
.rs-sessions-list { flex: 1 1 auto; overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.session-item { position: relative; padding: 9px 32px 9px 11px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.session-item:hover { background: var(--card-2); }
.session-item.active { background: rgba(45, 212, 191, .1); border-color: rgba(45, 212, 191, .3); }
.si-title { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-item.active .si-title { color: var(--accent); }
.si-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.session-empty { padding: 18px 12px; text-align: center; font-size: 12px; }
.si-del {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 24px; height: 24px; padding: 0; border: none; border-radius: 6px;
  background: transparent; color: var(--muted-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s ease, background .15s ease, color .15s ease;
}
.session-item:hover .si-del { opacity: .55; }
.si-del:hover { opacity: 1 !important; background: var(--border-2); color: var(--text); }
.si-del:focus-visible { opacity: 1; outline: 2px solid var(--accent); outline-offset: 1px; }

/* ===== 产品首页三屏落地页 ===== */
/* 容器撑满；三屏各自占满一整屏（顶栏 56）。页脚只在页面最底部展示一次：
   第三屏高度收短 72px，翻到最后一屏时「价值屏 + 页脚」恰好占满一整屏 */
body.page-agent .container { max-width: none; margin: 0; padding: 0; }

/* 整屏对齐：无 JS / 触屏环境由 CSS snap 兜底；桌面滚轮由 app.js 翻页控制器接管 */
html:has(body.page-agent) { scroll-snap-type: y proximity; }
.agent-hero, .lp-section {
  scroll-snap-align: start; scroll-margin-top: 56px;
}

/* 第一屏 hero：居中 + 底部滚动提示 */
.agent-hero {
  position: relative;
  min-height: calc(100vh - 56px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 20px 88px;
  background:
    radial-gradient(900px 480px at 50% -8%, rgba(45, 212, 191, .10), transparent 70%);
}
/* 背景动效「星空穿越」（/bg-demo 方案 13 落地）：粒子自内容中心向四方飞散淡出，
   底层辅以静态星点与深蓝微光；粒子元素由 agent.html 循环生成，CSS 变量驱动
   各自方向/周期/相位；reduced-motion 时粒子静止不可见（见下方降级块） */
.hero-glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-glow::before {
  content: ""; position: absolute; inset: 0; background-repeat: no-repeat;
  background-image:
    radial-gradient(640px 420px at 50% 52%, rgba(59, 130, 246, .07), transparent 72%),
    radial-gradient(circle 1.2px at 18% 24%, rgba(230, 232, 238, .32), transparent 60%),
    radial-gradient(circle 1px at 72% 16%, rgba(230, 232, 238, .28), transparent 60%),
    radial-gradient(circle 1.2px at 84% 68%, rgba(230, 232, 238, .28), transparent 60%),
    radial-gradient(circle 1px at 10% 74%, rgba(230, 232, 238, .26), transparent 60%),
    radial-gradient(circle 1px at 42% 8%, rgba(230, 232, 238, .22), transparent 60%),
    radial-gradient(circle 1.1px at 60% 84%, rgba(230, 232, 238, .24), transparent 60%);
}
.hero-glow i {
  position: absolute; left: 50%; top: 52%;
  width: var(--s); height: var(--s); border-radius: 50%;
  opacity: 0;
  animation: hero-warp var(--d) cubic-bezier(.3, .55, .6, 1) infinite var(--dl);
  will-change: transform, opacity;
}
.hero-glow .t { background: rgba(94, 234, 212, .95); box-shadow: 0 0 6px rgba(45, 212, 191, .75); }
.hero-glow .b { background: rgba(96, 165, 250, .95); box-shadow: 0 0 6px rgba(59, 130, 246, .75); }
.hero-glow .c { background: rgba(230, 232, 238, .9); box-shadow: 0 0 5px rgba(180, 190, 210, .6); }
@keyframes hero-warp {
  0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; }
  14% { opacity: 1; }
  78% { opacity: .6; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.2); opacity: 0; }
}
.agent-hero-inner { width: 100%; max-width: 760px; text-align: center; position: relative; z-index: 1; }

/* 滚动提示（C1 组合）：圆形按钮 + 外圈虚线轨道旋转 × 内部双 V 依次下落 */
.scroll-hint {
  position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--accent); background: var(--card-2); border: 1px solid var(--border-2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.scroll-hint:hover { border-color: rgba(45, 212, 191, .55); box-shadow: 0 8px 24px rgba(45, 212, 191, .15); }
.sh-ring {
  position: absolute; inset: -7px; border-radius: 50%;
  border: 1.5px dashed rgba(45, 212, 191, .5);
  animation: sh-orbit 9s linear infinite;
}
@keyframes sh-orbit { to { transform: rotate(360deg); } }
.sh-vs { position: relative; width: 16px; height: 20px; display: block; }
.sh-vs svg { position: absolute; left: 0; animation: sh-drop 1.6s ease-in-out infinite; }
.sh-vs svg:nth-child(1) { top: 0; }
.sh-vs svg:nth-child(2) { top: 8px; animation-delay: .25s; }
@keyframes sh-drop {
  0% { opacity: 0; transform: translateY(-5px); }
  30%, 60% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(5px); }
}

/* 第二/三屏：核心能力 / 产品价值 */
.lp-section {
  position: relative;
  min-height: calc(100vh - 56px);
  display: flex; align-items: center; justify-content: center;
  padding: 72px 24px 88px;
  border-top: 1px solid var(--border);
}
.lp-section#value {
  min-height: calc(100vh - 56px - 127px);   /* 预留底部页脚高度（实测 127px） */
  padding-top: 36px; padding-bottom: 30px; /* 收窄内边距，确保内容不超 min-height */
  background: radial-gradient(800px 420px at 50% 108%, rgba(45, 212, 191, .07), transparent 70%);
}
.lp-section#value .lp-desc { margin-bottom: 26px; }
.lp-inner { width: 100%; max-width: 1080px; text-align: center; position: relative; z-index: 1; }
/* 二/三屏背景动效「粒子升腾」（/bg-demo 方案 8 落地）：微光粒子自屏底交错缓升，
   粒子由 agent.html 循环生成、CSS 变量驱动；reduced-motion 时静止隐藏（见下方降级块） */
.lp-glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lp-glow::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(560px 300px at 50% 108%, rgba(45, 212, 191, .05), transparent 70%);
}
.lp-glow i {
  position: absolute; bottom: -6px; left: var(--x);
  width: var(--s); height: var(--s); border-radius: 50%;
  opacity: 0;
  animation: lp-rise var(--d) linear infinite var(--dl);
  will-change: transform, opacity;
}
.lp-glow .t { background: rgba(94, 234, 212, .95); box-shadow: 0 0 6px rgba(45, 212, 191, .75); }
.lp-glow .b { background: rgba(96, 165, 250, .95); box-shadow: 0 0 6px rgba(59, 130, 246, .75); }
.lp-glow .c { background: rgba(230, 232, 238, .9); box-shadow: 0 0 5px rgba(180, 190, 210, .6); }
@keyframes lp-rise {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  12% { opacity: .9; }
  82% { opacity: .5; }
  100% { transform: translate3d(var(--sx, 8px), var(--ty, -80vh), 0); opacity: 0; }
}
.lp-title { margin: 0 0 10px; font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; letter-spacing: 1px; }
.lp-desc { margin: 0 0 40px; font-size: 14.5px; }
/* 第二屏 Bento 便当盒：主推能力 2×2 大卡 + 右列双卡 + 通栏宽卡 */
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(148px, auto); gap: 16px; text-align: left; }
.bento-card {
  position: relative; overflow: hidden;
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 16px;
  padding: 22px;
  transition: box-shadow .3s ease;
}
.bento-card:hover { box-shadow: 0 8px 20px rgba(45, 212, 191, .08); }   /* 薄泛光 */
.bento-card.big { grid-column: span 2; grid-row: span 2; }
.bento-card.big h3 { font-size: 19px; margin-top: 2px; }
.bento-card.wide { grid-column: 1 / -1; }
.bento-badge {
  display: inline-block; font: 600 11px/1 var(--mono); letter-spacing: 1.5px;
  color: var(--accent); border: 1px solid rgba(45, 212, 191, .4); border-radius: 999px;
  padding: 5px 10px; margin-bottom: 16px;
}
/* 旋转描边（mask 抠出 1.5px 边框环）：大卡默认选中常亮，其余卡 hover 时点亮 */
.bento-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--a), transparent 0 68%, var(--accent) 84%, #3b82f6 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.bento-card:hover::before { opacity: 1; animation: bento-spin 2.6s linear infinite; }
.bento-card.big::before { opacity: 1; animation: bento-spin 4.5s linear infinite; }
/* 让位机制：悬停其他卡片时，CORE 大卡描边暂停并淡出（聚光给当前卡）；hover 结束自动恢复 */
.bento-grid:has(.bento-card:not(.big):hover) .bento-card.big::before {
  animation-play-state: paused;
  opacity: 0;
}
@keyframes bento-spin { to { --a: 360deg; } }
.bento-card h3, .spot-card h3 { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.bento-card.big h3 { font-size: 20px; }
.bento-card p, .spot-card p { margin: 0; font-size: 14px; line-height: 1.8; }

/* 第三屏 不对称大 Bento：左 2 行高主卡 + 右双横卡；
   聚光灯卡片：光斑 + 3D 微倾跟随光标（坐标由 app.js 写入 CSS 变量） */
.value-bento { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: repeat(2, 216px); gap: 16px; text-align: left; }
.value-bento article.v-main { grid-row: span 2; }
.spot-card {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; overflow: hidden; height: 100%;
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 16px;
  padding: 26px;
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .18s ease-out, border-color .3s ease;
}
.spot-card:hover { border-color: rgba(45, 212, 191, .4); }
.spot-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(280px circle at var(--mx) var(--my), rgba(45, 212, 191, .16), transparent 62%);
  opacity: 0; transition: opacity .3s ease;
}
.spot-card:hover::after { opacity: 1; }
/* 渐变数据锚点（占位：10× / -60% / ∞，待真实数据替换）。
   右侧横卡数字统一等宽等高盒 + 垂直居中，保证 -60% 与 ∞ 视觉对齐；
   ∞ 字形偏矮，单独放大到 52px 做光学对齐 */
.value-stat {
  font: 800 42px/1.05 var(--mono); letter-spacing: -1px;
  background: linear-gradient(105deg, #2dd4bf 20%, #5eead4 50%, #3b82f6 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.spot-card.value-main { display: flex; flex-direction: column; padding: 34px; }
.value-main .value-stat { font-size: 74px; margin: 16px 0 4px; }
.value-cap { display: block; font-size: 12px; font-style: normal; color: var(--muted-2); letter-spacing: 1.5px; margin-bottom: 14px; }
.value-main p { margin-top: auto; max-width: 440px; }
.spot-card.value-sub { display: flex; align-items: center; gap: 22px; padding: 26px 28px; }
.value-sub .value-stat { display: flex; align-items: center; justify-content: center; min-width: 122px; height: 58px; }
/* 统计列统一 122px（含趋势图图标）：两张副卡文字列左缘同轴，标题/副标题对齐 */
.value-sub .stat-icon svg { display: block; }

/* 滚动入场：仅在 JS 可用时启用（html.js 由 app.js 标记），无 JS / 纯抓取环境内容直接可见；
   进入视口由 IntersectionObserver 加 .in 点亮（仅 transform/opacity，合成层动效） */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: translateY(0); }
.js .stagger .reveal:nth-child(2) { transition-delay: .1s; }
.js .stagger .reveal:nth-child(3) { transition-delay: .2s; }
.js .stagger .reveal:nth-child(4) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .sh-ring, .sh-vs svg { animation: none; }
  .agent-title, .agent-title-en, .agent-entry-card, .agent-tip { animation: none; }
  .agent-title { animation: none; background-position: 0 0; }   /* 流光降级为静态青色渐变 */
  .bento-card.big::before { animation: none; }                  /* 大卡描边静止常亮 */
  .type-cursor { animation: none; }
  .hero-glow i { animation: none; }                         /* 星空穿越粒子静止隐藏 */
  .lp-glow i { animation: none; }                           /* 粒子升腾静止隐藏 */
}
/* 与顶栏一致：≤1080px 起 Bento 降两列（981-1080 三列时每列不足 320px，卖点卡正文过窄） */
@media (max-width: 1080px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-card.big { grid-row: span 1; }
}
@media (max-width: 980px) {
  .value-bento { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: minmax(150px, auto); }
  .value-bento article.v-main { grid-row: auto; }
}
@media (max-width: 640px) {
  .bento-grid, .value-bento { grid-template-columns: 1fr; }
  .bento-card.big { grid-column: auto; }   /* 单列网格里 span 2 会挤出隐式第二列 */
  .value-stat { font-size: 34px; }
  .value-sub .value-stat { min-width: 96px; height: 46px; }
  .value-sub .stat-icon svg { width: 42px; height: 42px; }
  .value-main .value-stat { font-size: 54px; }
}

/* ===== 以下为第一屏 hero 细节 ===== */

/* 一级标题：站名整题应用「双向流光」字体内部渐变（效果 9：青主蓝辅，往返扫动）；
   MOTA 仅保留字距强调，颜色随整题流光 */
.agent-title {
  margin: 0 0 10px; font-size: clamp(30px, 5vw, 44px); font-weight: 800;
  letter-spacing: 1px; line-height: 1.2;
  background: linear-gradient(105deg, #2dd4bf 30%, #eafffb 46%, #5eead4 60%, #2dd4bf 72%, #29b0ad 84%, #3b82f6 102%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: title-flow 6s ease-in-out infinite;
}
@keyframes title-flow { 0%, 100% { background-position: 110% 0; } 50% { background-position: -110% 0; } }
.agent-title .mota { letter-spacing: 2px; margin-right: 6px; }

/* 英文副标题：循环打字机（打出→停顿→倒退删除）+ 闪烁光标 */
.agent-title-en {
  margin: 0 0 36px; font-size: 13.5px; color: var(--accent);
  letter-spacing: 2.5px; min-height: 20px; opacity: .85;
}
.type-cursor { animation: blink 1s step-end infinite; color: var(--accent); }

/* hero 入场：标题 → 英文副标题 → 输入卡 → 提示 依次上浮淡入
   （from 态写在 keyframes 内 + fill-mode backwards：延迟期间隐藏；若动画被禁用则保持可见） */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.agent-title-en, .agent-entry-card, .agent-tip {
  animation: rise-in .55s cubic-bezier(.2, .7, .3, 1) backwards;
}
/* 标题同时跑两个动画：入场上浮 + 流光渐变（属性不冲突：transform/opacity vs background-position） */
.agent-title {
  animation: rise-in .55s cubic-bezier(.2, .7, .3, 1) backwards,
             title-flow 6s ease-in-out infinite;
}
.agent-title-en { animation-delay: .12s; }
.agent-entry-card { animation-delay: .26s; }
.agent-tip { animation-delay: .4s; }

/* 居中输入卡：单行布局（模式折叠控件 + 输入框 + AI 图标提交按钮水平对齐） */
.agent-entry-card {
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  padding: 8px 10px;
  text-align: left;
}
.agent-input-row { display: flex; align-items: center; gap: 6px; }
.agent-input-row .mode-fold { flex: 0 0 auto; }   /* 模式控件与提交按钮同行水平对齐 */
.agent-input-row input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  color: var(--text); font-size: 15px; line-height: 1.6;
  font-family: var(--mono); padding: 13px 8px;
}
.agent-input-row input::placeholder {
  color: var(--muted-2); font-family: var(--ff-body);
}
.agent-input-row .send-btn { width: 42px; height: 42px; flex: 0 0 auto; }
.agent-tip { margin: 18px 0 0; font-size: 12.5px; transition: color .15s ease; }
.agent-tip.err { color: var(--neg); }

/* ===== 路线图页（/roadmap） ===== */

.rm-page { max-width: 1160px; margin: 0 auto; }

/* 页头 */
.rm-hero { padding: 22px 4px 26px; }
.rm-title { margin: 0 0 10px; font-size: clamp(26px, 3.6vw, 34px); font-weight: 800; letter-spacing: .5px; }
.rm-sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.rm-done-flag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--accent);
  background: rgba(45, 212, 191, .08); border: 1px solid rgba(45, 212, 191, .25);
  padding: 5px 13px; border-radius: 999px;
}
.rm-done-check { font-weight: 800; }

/* 里程碑时间轴：横线贯穿 + 节点打点 */
.rm-tl-wrap { margin-bottom: 34px; }
.rm-tl {
  list-style: none; margin: 0; padding: 26px 0 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px;
  position: relative;
}
.rm-tl::before {   /* 贯穿横线 */
  content: ""; position: absolute; top: 34px; left: 6%; right: 6%;
  height: 2px; background: linear-gradient(90deg, var(--accent), var(--link));
  opacity: .45; border-radius: 1px;
}
.rm-tl-item { position: relative; }
.rm-tl-dot {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-bottom: 10px;
  border-radius: 50%; font-size: 11px; font-weight: 800; color: var(--on-brand);
  background: var(--accent); box-shadow: 0 0 0 4px rgba(45, 212, 191, .15);
}
.rm-tl-name { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.rm-tl-desc { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.55; }
.rm-tl-desc code {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  background: rgba(45, 212, 191, .07); padding: 1px 4px; border-radius: 4px;
}

/* 三大板块 */
.rm-sec {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 22px; margin-bottom: 22px;
}
.rm-sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.rm-sec-idx {
  flex: 0 0 auto; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--accent), var(--link));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.rm-sec-title h2 { margin: 0 0 3px; font-size: 17px; font-weight: 700; }
.rm-sec-title p { margin: 0; font-size: 12.5px; color: var(--muted); }
.rm-badge-done {
  margin-left: auto; flex: 0 0 auto;
  font-size: 12px; font-weight: 650; color: var(--accent);
  background: rgba(45, 212, 191, .08); border: 1px solid rgba(45, 212, 191, .25);
  padding: 4px 12px; border-radius: 999px;
}

/* 步骤链条：卡片 + 箭头横向流动 */
.rm-steps { display: flex; align-items: stretch; gap: 10px; }
.rm-step {
  flex: 1 1 0; min-width: 0;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 15px;
}
.rm-step h4 { margin: 0 0 8px; font-size: 13.5px; font-weight: 700; color: var(--text); }
.rm-step ul { margin: 0; padding-left: 16px; }
.rm-step li { font-size: 12px; color: var(--muted); line-height: 1.65; margin-bottom: 5px; }
.rm-step li:last-child { margin-bottom: 0; }
.rm-arrow {
  flex: 0 0 auto; align-self: center; color: var(--accent);
  font-size: 15px; font-weight: 700; opacity: .7;
}

/* 下一步规划（占位） */
.rm-next {
  background: transparent; border: 1px dashed var(--border-2); border-radius: 12px;
  padding: 18px 22px; margin-bottom: 26px;
}
.rm-next-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rm-next-head h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--muted); }
.rm-badge-todo {
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  background: var(--card); border: 1px solid var(--border-2);
  padding: 3px 10px; border-radius: 999px;
}
.rm-next-placeholder { margin: 0; font-size: 12.5px; color: var(--muted-2); }
.rm-next-desc { margin: 0 0 16px; font-size: 12.5px; color: var(--muted); }

/* Agent 线索专家路线图：规划卡片网格（7 项，区分于已完成的实线板块） */
.rm-plan-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.rm-plan-card {
  background: var(--bg-2); border: 1px dashed var(--border-2); border-radius: 10px;
  padding: 14px 15px; min-width: 0;
}
.rm-plan-idx {
  display: inline-block; margin-bottom: 8px;
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--muted-2); letter-spacing: 1px;
}
.rm-plan-name { margin: 0 0 5px; font-size: 13.5px; font-weight: 700; color: var(--text); }
.rm-plan-desc { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* 响应式：窄屏时间轴纵向降级、步骤链条换行 */
@media (max-width: 980px) {
  .rm-tl { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .rm-tl::before { display: none; }
  .rm-steps { flex-wrap: wrap; }
  .rm-step { flex: 1 1 calc(50% - 15px); }
  .rm-arrow { display: none; }   /* 换行后箭头失去流向意义 */
  .rm-plan-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .rm-step { flex: 1 1 100%; }
  .rm-sec-head { flex-wrap: wrap; }
  .rm-badge-done { margin-left: 0; }
  .rm-plan-grid { grid-template-columns: 1fr; }
}

/* ===== 模型管理页（管理员 /models） ===== */

/* 清单表格 */
.mm-table-wrap { overflow-x: auto; }
.mm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mm-table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.mm-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.mm-table tr:last-child td { border-bottom: none; }
.mm-table tr.mm-sum td { font-weight: 600; border-top: 1px solid var(--border); background: var(--bg-2, transparent); }
.mm-table .mm-name { font-family: var(--ff-mono); font-weight: 600; }
.mm-table .mm-sub { font-size: 11px; color: var(--muted-2); margin-top: 3px;
                    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.mm-empty { padding: 18px 10px; font-size: 12.5px; }
.mm-msg { margin-top: 10px; font-size: 12px; min-height: 16px; color: var(--muted); }
.mm-msg.err { color: var(--neg); }
.mm-default-hint { font-size: 12px; }
.mm-head-add { flex: none; padding: 6px 14px; font-size: 12.5px; }   /* 覆盖 .btn 的 flex:1 */

/* 操作列：图标按钮组（弃用 .btn 文字按钮——flex:1 语义 + 5 枚挤列是错位根源） */
.mm-ops { display: inline-flex; align-items: center; gap: 6px; }
.mm-ibtn {
  appearance: none; border: 1px solid var(--border-2); background: var(--card-2);
  width: 28px; height: 28px; border-radius: 7px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.mm-ibtn:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.mm-ibtn:disabled { opacity: .35; cursor: default; }
.mm-ibtn-del:hover:not(:disabled) { color: var(--neg); border-color: var(--neg); }

/* 状态开关 */
.mm-switch { position: relative; display: inline-block; cursor: pointer; }
.mm-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mm-switch span {
  display: block; width: 34px; height: 19px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--border-2);
  transition: background .18s ease, border-color .18s ease;
}
.mm-switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--muted-2); transition: transform .18s ease, background .18s ease;
}
.mm-switch input:checked + span { background: rgba(45, 212, 191, .22); border-color: var(--accent); }
.mm-switch input:checked + span::after { transform: translateX(15px); background: var(--accent); }

/* ===== 添加/编辑模型弹窗：左栏预设目录 + 右栏接入配置 ===== */
.mm-modal[hidden] { display: none; }
.mm-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.mm-modal-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
  width: min(680px, calc(100% - 40px)); max-height: calc(100vh - 80px);
  display: flex; flex-direction: column;
}
.mm-modal-title { font-size: 15px; font-weight: 600; color: var(--text); padding: 18px 22px 14px; }
.mm-modal-body { display: grid; grid-template-columns: 208px 1fr; gap: 0; min-height: 0; flex: 1; overflow: hidden; }

/* 左栏：厂商选择（单选，选中仅预填接入建议） */
.mm-vendor-col {
  border-right: 1px solid var(--border); padding: 0 10px 14px 14px;
  display: flex; flex-direction: column; min-height: 0;
}
.mm-preset-head { font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 0 8px; }
.mm-vendor-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; max-height: 46vh; }
.mm-vendor-item {
  appearance: none; border: 1px solid transparent; background: none; cursor: pointer;
  display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px;
  text-align: left; font-family: inherit; color: var(--text);
  transition: background .15s ease, border-color .15s ease;
}
.mm-vendor-item:hover:not(:disabled) { background: var(--card); }
.mm-vendor-item.on { background: rgba(45, 212, 191, .1); border-color: rgba(45, 212, 191, .35); }
.mm-vendor-item:disabled { cursor: default; opacity: .75; }
.mmv-radio {
  flex: none; width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid var(--muted-2); position: relative;
}
.mm-vendor-item.on .mmv-radio { border-color: var(--accent); }
.mm-vendor-item.on .mmv-radio::after {
  content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--accent);
}
.mmv-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mmv-main b { font-size: 12.5px; font-weight: 600; }
.mmv-main em { font-style: normal; font-size: 10.5px; color: var(--muted-2);
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-vendor-hint { font-size: 11px; padding: 10px 4px 0; line-height: 1.5; }

/* 右栏：接入配置表单 */
.mm-form-col { padding: 0 22px 14px 18px; overflow-y: auto; max-height: 56vh; }
.mm-field { margin-bottom: 13px; }
.mm-field > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.mm-input {
  width: 100%; box-sizing: border-box;
  background: var(--bg); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 7px; padding: 7px 10px; font-size: 13px; font-family: inherit;
}
.mm-input:focus { outline: none; border-color: var(--accent); }
.mm-key-row { display: flex; align-items: center; gap: 8px; }
.mm-key-row .mm-input { flex: 1; }
.mm-key-clear {
  appearance: none; border: none; background: none; cursor: pointer;
  color: var(--muted-2); font-size: 11.5px; white-space: nowrap; font-family: inherit;
  padding: 4px 2px;
}
.mm-key-clear:hover { color: var(--neg); }
.mm-inline { display: flex; align-items: center; justify-content: space-between; }
.mm-inline > label { margin-bottom: 0; }

/* 计价档位行 */
.mm-tiers { display: flex; flex-direction: column; gap: 8px; }
.mm-tier { display: grid; grid-template-columns: 1fr 1fr 1fr 28px; gap: 8px; align-items: center; }
.mm-tier .mm-tier-in { padding: 6px 8px; font-size: 12.5px; }
.mm-tier-add {
  appearance: none; border: 1px dashed var(--border-2); background: none; cursor: pointer;
  color: var(--muted-2); font-size: 12px; border-radius: 7px; padding: 5px 10px;
  margin-top: 8px; font-family: inherit;
}
.mm-tier-add:hover { color: var(--accent); border-color: var(--accent); }

/* 弹窗底栏 */
.mm-modal-foot {
  display: flex; align-items: center; justify-content: flex-end;
  border-top: 1px solid var(--border); padding: 13px 22px; font-size: 12px;
}
.mm-modal-btns { display: flex; gap: 8px; }
.mm-modal-btns .btn { flex: none; padding: 7px 18px; }

@media (max-width: 640px) {
  .mm-modal-body { grid-template-columns: 1fr; overflow-y: auto; }
  .mm-vendor-col { border-right: none; border-bottom: 1px solid var(--border); }
  .mm-vendor-list { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .mm-form-col { max-height: none; }
}

/* 研判监控「模型汇总」小节头部提示 */
.mm-sum-hint { font-weight: 400; font-size: 11px; margin-left: 6px; }

/* ===== 会话监控页（/monitor） ===== */
.mo-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.mo-tabs button {
  appearance: none; background: none; border: none; cursor: pointer; font-family: inherit;
  color: var(--muted); font-size: 13.5px; padding: 8px 14px 9px; position: relative;
}
.mo-tabs button:hover { color: var(--text); }
.mo-tabs button.on { color: var(--accent); font-weight: 600; }
.mo-tabs button.on::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.mo-tab-badge {
  display: inline-block; min-width: 17px; padding: 0 5px; margin-left: 6px;
  border-radius: 9px; background: var(--neg); color: #fff; font-size: 11px;
  font-weight: 600; line-height: 17px; text-align: center; vertical-align: 1px;
}

/* 汇总卡片 */
.mo-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 16px; }
.mo-card { background: var(--card-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 12px 14px; }
.mo-card-v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mo-card-k { font-size: 11px; color: var(--muted-2); margin-top: 3px; }

/* 过滤行 */
.mo-filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.mo-filter-sel { width: 180px; flex: none; }
.mo-filter-q { flex: 1; min-width: 180px; }
.mo-filters .mo-refresh { flex: none; padding: 6px 14px; }

/* 前端指标（RUM）看板：按天趋势柱 + 超阈值数值标红 */
.mo-rum-trend { margin: 4px 0 16px; }
.mo-rum-trend-title { font-size: 11px; margin-bottom: 6px; }
.mo-rum-bars {
  display: flex; align-items: flex-end; gap: 6px; height: 96px;
  padding: 10px 12px 8px; background: var(--card-2);
  border: 1px solid var(--border-2); border-radius: 10px;
}
.mo-rum-bar { flex: 1; min-width: 0; height: 100%; display: flex;
  flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.mo-rum-bar i { width: 100%; max-width: 26px; min-height: 2px;
  background: linear-gradient(180deg, var(--accent), #1d8f7f); border-radius: 3px 3px 0 0; }
.mo-rum-bar span { font-size: 10px; color: var(--muted-2); white-space: nowrap; }
.mo-rum-bad { color: var(--neg); }

/* 通用小徽章（状态/类型） */
.mo-b {
  display: inline-block; padding: 1.5px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  border: 1px solid transparent;
}
.mo-b-red    { background: rgba(248,113,113,0.14); color: var(--neg); border-color: rgba(248,113,113,0.32); }
.mo-b-org    { background: rgba(251,191,36,0.12); color: var(--exchange); border-color: rgba(251,191,36,0.3); }
.mo-b-ok     { background: rgba(45,212,191,0.12); color: var(--accent); border-color: rgba(45,212,191,0.3); }
.mo-b-dim    { background: var(--card); color: var(--muted-2); border-color: var(--border-2); }
.mo-b-manual { background: rgba(244,114,182,0.14); color: #f472b6; border-color: rgba(244,114,182,0.32); }

/* 表格交互行与单元格 */
tr.mo-click { cursor: pointer; }
tr.mo-click:hover td { background: rgba(45,212,191,0.045); }
.mo-user-cell > div:first-child { font-weight: 600; }
.mo-ses-title { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mo-reason { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.mo-cost-un { color: var(--exchange); font-weight: 700; cursor: help; }
.mo-row-ops { display: flex; gap: 6px; }
.mo-row-ops .btn { padding: 4px 12px; font-size: 12px; }
.mo-handled-col { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 详情抽屉（右侧滑入） */
.mo-drawer[hidden] { display: none; }
.mo-drawer {
  position: fixed; inset: 0; z-index: 60; background: rgba(4, 6, 10, 0.55);
  display: flex; justify-content: flex-end; backdrop-filter: blur(2px);
}
.mo-drawer-card {
  width: min(760px, 94vw); height: 100%; background: var(--bg-2);
  border-left: 1px solid var(--border-2); display: flex; flex-direction: column;
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.45);
}
.mo-drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--border); flex: none;
}
.mo-drawer-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-drawer-body { padding: 6px 22px 28px; overflow-y: auto; }
.mo-dr-sec { margin-top: 16px; }
.mo-dr-h { font-size: 13px; font-weight: 600; margin-bottom: 10px; }

/* 时间线（中断/异常 + 上报记录） */
.mo-tl-item { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.mo-tl-item:last-child { border-bottom: none; }
.mo-tl-reason { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 处理弹窗 */
.mo-modal[hidden] { display: none; }
.mo-modal {
  position: fixed; inset: 0; z-index: 70; background: rgba(4, 6, 10, 0.6);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.mo-modal-card {
  width: 480px; max-width: 100%; background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: 12px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px;
}
.mo-modal-title { font-size: 15px; font-weight: 600; }
.mo-modal-title .mono { color: var(--muted-2); font-size: 12.5px; margin-left: 4px; }
.mo-modal-sum {
  font-size: 12.5px; color: var(--muted); background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; display: flex; align-items: center; gap: 8px;
}
.mo-modal-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.mo-hm-note { resize: vertical; font-family: inherit; min-height: 76px; }
.mo-modal-btns { display: flex; justify-content: flex-end; gap: 8px; }

.app-toast.mo-toast-err { background: #3d1418; color: #fda4af; border: 1px solid rgba(248,113,113,0.4); }

@media (max-width: 640px) {
  .mo-card-v { font-size: 15px; }
  .mo-ses-title { max-width: 180px; }
  .mo-reason { max-width: 180px; }
  .mo-drawer-card { width: 100vw; }
}

/* ===== 会话抽屉：全部历史 tab 的检索工具与地址行 ===== */
.rs-sessions-tools {
  flex: 0 0 auto; padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.rs-sessions-search {
  width: 100%; box-sizing: border-box; background: var(--card-2);
  border: 1px solid var(--border-2); border-radius: 8px; color: var(--text);
  font-size: 12.5px; padding: 7px 10px; font-family: inherit;
}
.rs-sessions-search:focus { outline: none; border-color: var(--accent); }
.si-addr {
  font-size: 11px; color: var(--accent); opacity: .85; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== 首页：研判历史左缘把手 + 左滑面板 ===== */
.hp-handle {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--card); color: var(--muted);
  border: 1px solid var(--border); border-left: none; border-radius: 0 10px 10px 0;
  padding: 14px 8px; cursor: pointer; font-family: inherit;
  transition: color .2s ease, border-color .2s ease;
}
.hp-handle:hover, .hp-handle.open { color: var(--accent); border-color: rgba(45, 212, 191, .45); }
.hp-handle-label { writing-mode: vertical-rl; letter-spacing: 3px; font-size: 12px; font-weight: 600; }
.hp-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(4, 14, 22, .55);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.hp-overlay.open { opacity: 1; pointer-events: auto; }
.hp-panel {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 95; width: min(340px, 88vw);
  display: flex; flex-direction: column;
  background: var(--card); border-right: 1px solid var(--border);
  transform: translateX(-102%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.hp-panel.open { transform: none; }
.hp-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.hp-title { font-size: 14px; font-weight: 700; color: var(--text); }
.hp-close {
  appearance: none; background: none; border: 1px solid var(--border-2); border-radius: 7px;
  color: var(--muted-2); cursor: pointer; padding: 5px; display: grid; place-items: center;
}
.hp-close:hover { color: var(--text); border-color: var(--accent); }
.hp-tools { flex: 0 0 auto; padding: 12px 14px 8px; }
.hp-search {
  width: 100%; box-sizing: border-box; background: var(--card-2);
  border: 1px solid var(--border-2); border-radius: 8px; color: var(--text);
  font-size: 13px; padding: 8px 11px; font-family: inherit;
}
.hp-search:focus { outline: none; border-color: var(--accent); }
.hp-body {
  flex: 1 1 auto; overflow: auto; padding: 8px 10px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.hp-item { padding: 10px 12px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.hp-item:hover { background: var(--card-2); }
/* 未绑定地址的旧会话：视觉禁用态（点击无动作，悬浮提示说明） */
.hp-item.no-addr { opacity: .55; cursor: default; }
.hp-item.no-addr:hover { background: none; }
.hp-item-addr {
  font-size: 11px; color: var(--accent); opacity: .9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hp-item-title {
  font-size: 13px; color: var(--text); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hp-item-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.hp-empty { padding: 18px 12px; text-align: center; font-size: 12px; }
.hp-login {
  align-self: center; margin-top: 10px; appearance: none; cursor: pointer; font-family: inherit;
  background: rgba(45, 212, 191, .12); color: var(--accent);
  border: 1px solid rgba(45, 212, 191, .4); border-radius: 8px; padding: 8px 16px; font-size: 12.5px;
}
.hp-login:hover { background: rgba(45, 212, 191, .2); }

/* ===== 线索查询卡片体系（研判页右侧栏「线索」页签消费；首页抽屉已随 INTENT-016 C1 撤除） ===== */
.lq-search {
  width: 100%; box-sizing: border-box; background: var(--card-2);
  border: 1px solid var(--border-2); border-radius: 8px; color: var(--text);
  font-size: 13px; padding: 8px 11px; font-family: inherit;
}
.lq-search:focus { outline: none; border-color: var(--accent); }
.lq-item { padding: 10px 12px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.lq-item:hover { background: var(--card-2); }
.lq-item-addr {
  font-size: 11px; color: var(--accent); opacity: .9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lq-item-title {
  font-size: 13px; color: var(--text); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lq-item-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.lq-empty { padding: 18px 12px; text-align: center; font-size: 12px; }
.lq-back {
  appearance: none; background: none; border: none; color: var(--accent); cursor: pointer;
  font-family: inherit; font-size: 12.5px; padding: 2px 4px; align-self: flex-start;
}
.lq-back:hover { text-decoration: underline; }
.lq-meta { padding: 2px 4px 8px; font-size: 12px; color: var(--muted); display: grid; gap: 3px; }
.lq-meta b { color: var(--text); font-weight: 600; }
.lq-stats { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 10px; }
.lq-stat {
  font-size: 12px; color: var(--muted); background: var(--card-2);
  border: 1px solid var(--border-2); border-radius: 999px; padding: 3px 10px;
}
.lq-stat b { color: var(--text); font-weight: 600; }
.lq-card {
  border: 1px solid var(--border-2); border-radius: 10px; padding: 10px 12px;
  cursor: pointer; transition: border-color .15s ease;
}
.lq-card:hover { border-color: rgba(45, 212, 191, .45); }
.lq-card-top { font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 4px; }
.lq-card-top .ld-copy { flex: 0 0 auto; }
.lq-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.lq-card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px;
  margin-top: 8px; font-size: 11.5px;
}
.lq-card-grid span { display: block; color: var(--muted-2); margin-bottom: 1px; }
.lq-card-grid b { color: var(--text); font-weight: 600; word-break: break-all; }
.lq-card-sub {
  margin-top: 8px; border-top: 1px dashed var(--border-2); padding-top: 8px;
  font-size: 11.5px; color: var(--muted); display: grid; gap: 5px;
}
/* display:grid 会压过 UA 对 [hidden] 的默认隐藏，须显式收回（归因明细默认折叠） */
.lq-card-sub[hidden] { display: none; }
.lq-card-sub b { color: var(--text); font-weight: 600; word-break: break-all; }
.lq-evi { line-height: 1.6; word-break: break-all; }
.lq-foot { padding: 10px 4px 4px; display: flex; justify-content: center; }
.lq-skel { display: grid; gap: 10px; padding: 8px 4px; }
.lq-skel-row {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--card-2) 25%, var(--bg-2) 50%, var(--card-2) 75%);
  background-size: 200% 100%; animation: lq-skel-wave 1.2s ease infinite;
}
@keyframes lq-skel-wave { to { background-position: -200% 0; } }

/* ===== 研判页右侧栏「线索」页签（复用 lq-* 卡片/统计/骨架体系） ===== */
.rl-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 4px;
}
.rl-title { font-size: 13px; font-weight: 600; color: var(--text); }
.rl-tools { padding: 0 12px 8px; }
.rl-body {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0 10px 16px;
}

/* ===== 跨页平滑过渡（MPA 两端配合）：离开页淡出下沉，研判页进入上浮淡入 ===== */
@keyframes page-leave { to { opacity: 0; transform: translateY(10px); } }
main.container.page-leaving { animation: page-leave .22s ease both; pointer-events: none; }
/* 带 ID 抬高优先级，压过下方 rs-enter（同一元素上先入后出，不并存） */
body.page-research #researchLayout.page-leaving {
  animation: page-leave .22s ease both; pointer-events: none;
}
@keyframes rs-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
body.page-research #researchLayout { animation: rs-enter .3s cubic-bezier(.2, .7, .3, 1) both; }

@media (max-width: 640px) {
  .hp-handle { padding: 10px 6px; }
  .hp-handle-label { font-size: 11px; letter-spacing: 2px; }
  .lq-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  main.container.page-leaving, body.page-research #researchLayout.page-leaving,
  body.page-research #researchLayout { animation: none; }
  .hp-panel, .hp-overlay { transition: none; }
  .lq-skel-row { animation: none; }
  .app-toast { animation: none; }
  .cursor, .type-cursor { animation: none; }
  .think-block .think-label.think-loading { animation: none; }
  .ev-state.run::before, .ev-tool-state.run::before,
  .chat-status .dot.run { animation: none; }
  .facets, .facets-overlay { transition: none; }
  .rs-prog-step.cur .ps-ico { animation: none; }
  tbody tr:hover { transition: none; }
}

/* ===== 线索管理页（/leads）：筛选栏 / 线索表 / 详情弹窗 ===== */
.ld-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.ld-filters input[type=text] {
  background: var(--card); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 7px; padding: 7px 10px; font-size: 13px; min-width: 230px;
}
.ld-filters select {
  background: var(--card); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 7px; padding: 7px 9px; font-size: 13px;
}
.ld-filters .btn { flex: none; }   /* 覆盖全局 .btn 的 flex:1，查询/重置不拉伸 */
.ld-addr { font-size: 12.5px; word-break: break-all; user-select: all; }
.ld-copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-left: 4px; padding: 0;
  border: none; border-radius: 5px; background: transparent;
  color: var(--muted-2); cursor: pointer; vertical-align: middle;
}
.ld-copy:hover { color: var(--accent); background: var(--bg-2); }
.ld-copy svg { width: 12px; height: 12px; display: block; }
.breadcrumb .bc-cur#ldDTarget { max-width: none; }   /* 线索详情研判目标全量展示，不省略 */
.ld-ops { display: flex; gap: 6px; }
.ld-btn { padding: 4px 10px; font-size: 12px; flex: none; white-space: nowrap; }
/* 表格行内操作列（复用 .ld-ops 的 flex+gap）：td 变 flex 后不折行、按内容需求
   撑列宽——修「会话/分享/TG」三按钮被挤成两行紧贴的问题 */
td.ld-ops { align-items: center; white-space: nowrap; }
/* 任务列表状态/进度两列（第 3/4 列）短文案不折行（「已完成」「8 / 10」被硬切） */
#ldPaneTasks td:nth-child(3), #ldPaneTasks td:nth-child(4) { white-space: nowrap; }
.ld-conf-high { color: var(--text); font-weight: 650; }
.ld-conf-medium { color: var(--muted); }
.ld-conf-low { color: var(--muted-2); }
.ld-pager { display: flex; align-items: center; gap: 12px; justify-content: flex-end; padding-top: 12px; }
.ld-pager .btn { flex: none; }
.ld-evi { line-height: 1.7; user-select: text; -webkit-user-select: text; }
.ld-modal[hidden] { display: none; }
.ld-modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ld-modal-card {
  background: var(--bg); border: 1px solid var(--border-2); border-radius: 14px;
  max-width: 720px; width: 100%; max-height: 84vh; display: flex; flex-direction: column;
}
.ld-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.ld-modal-title { font-size: 15px; font-weight: 600; }
.ld-modal-close {
  background: none; border: none; color: var(--muted); font-size: 20px;
  line-height: 1; cursor: pointer; padding: 2px 6px;
}
.ld-modal-close:hover { color: var(--text); }
.ld-modal-body { padding: 4px 20px 12px; overflow-y: auto; }
.ld-modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 12px 20px 16px; border-top: 1px solid var(--border);
}
@media (max-width: 640px) {
  .ld-filters input[type=text] { min-width: 0; width: 100%; }
  .ld-report-card { max-width: 100%; }
}
.ld-modal-sec { font-size: 13px; font-weight: 600; margin: 14px 0 8px; }
.ld-sub-row td { background: var(--bg-2); font-size: 12.5px; }
.ld-sub-grid { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); margin-bottom: 6px; }
.ld-sub-grid b { color: var(--text); font-weight: 600; }
.ld-report {
  max-height: 380px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; background: var(--card); font-size: 13px; line-height: 1.75;
  user-select: text; -webkit-user-select: text;
}
.ld-report h1 { font-size: 17px; margin: 0 0 10px; }
.ld-report h2 { font-size: 14px; margin: 14px 0 8px; }
.ld-report h3 { font-size: 13px; margin: 12px 0 6px; }
.ld-report p { margin: 6px 0; }
.ld-report ul { margin: 6px 0; padding-left: 20px; }
.ld-report table.md-table { width: 100%; margin: 8px 0; }
.ld-report table.md-table th, .ld-report table.md-table td { border: 1px solid var(--border); padding: 6px 8px; }
.ld-report code { background: var(--bg-2); border-radius: 4px; padding: 1px 5px; font-family: var(--mono); font-size: 12px; }

/* ===== 线索页 tab（会话池 ↔ 线索详情）与详情头部 / 报告弹窗 ===== */
.ld-tabbar { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.ld-tabbar[hidden] { display: none; }   /* display:flex 会盖过 UA 的 [hidden]，模式切换隐藏另一套 tab 栏必须显式恢复 */
.ld-tab {
  background: none; border: none; cursor: pointer; padding: 9px 16px; font-size: 13px;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ld-tab:hover { color: var(--text); }
.ld-tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.ld-pane { display: none; }
.ld-pane.on { display: block; }
.ld-detail-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.ld-detail-title { flex: 1 1 260px; min-width: 0; }
.ld-detail-title .ld-addr { font-size: 14px; }
.ld-detail-meta { margin-top: 6px; font-size: 12.5px; }
.ld-detail-meta b { color: var(--text); font-weight: 600; }
.ld-detail-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.ld-stat {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; font-size: 12.5px; color: var(--muted);
}
.ld-stat b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.ld-report-card { max-width: 860px; }
.ld-report-card .ld-modal-body { max-height: 74vh; }
.ld-report-sub { margin-top: 3px; }

/* ===== 任务分享弹窗（管理员；被分享人清单 + 用户搜索复选） ===== */
.ld-share-card { max-width: 480px; }
.ld-share-card #ldShQ { width: 100%; margin-top: 2px; }
.ld-sh-rows { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.ld-sh-list { margin-top: 8px; }
.ld-sh-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
}
.ld-sh-row input[type="checkbox"] { margin: 0; }
.ld-sh-row .ld-sh-name { font-weight: 600; white-space: nowrap; }
.ld-sh-row.muted-hint { border-style: dashed; color: var(--muted); }

/* ===== 线索详情：归因展开标题行 / 类别 hover 归因卡 ===== */
.ld-sec-head { display: flex; align-items: center; justify-content: space-between; }
.ld-sec-head .ld-modal-sec { margin-bottom: 8px; }
.ld-sec-ops { display: flex; gap: 8px; align-items: center; }
.ld-sec-ops select { max-width: 200px; }
.ld-cat { cursor: help; }
.ld-cat .badge { cursor: inherit; }
/* 归属交易所徽章（exchange_user/fee_tx_hash 类别旁；platform_id 命中图标库时带 OSS 小图标） */
.ld-plat img { width: 14px; height: 14px; border-radius: 3px; margin-right: 4px;
  vertical-align: -2px; background: rgba(255, 255, 255, .06); }
.ld-cat-tip {
  position: fixed; z-index: 300; max-width: 270px;
  background: var(--card-2); border: 1px solid var(--border-2); border-radius: 10px;
  padding: 10px 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  font-size: 12.5px; color: var(--muted); pointer-events: none;
}
.ld-cat-tip[hidden] { display: none; }
.ld-cat-tip .ld-ct-title { font-weight: 650; color: var(--text); margin-bottom: 6px; }
.ld-cat-tip .ld-ct-row { display: flex; gap: 10px; align-items: baseline; padding: 2px 0; }
.ld-cat-tip .ld-ct-row > span { flex: none; color: var(--muted-2); }
.ld-cat-tip .ld-ct-row b { color: var(--text); font-weight: 500; word-break: break-all; }
.ld-cat-tip .ld-ct-row i { font-style: normal; font-size: 11px; color: var(--muted); }
.ld-loading { padding: 64px 0; text-align: center; font-size: 13px; }
.ld-detail-main { flex: 1 1 260px; min-width: 0; }
/* ===== 线索详情骨架屏（结构与内容区对齐，减少加载→渲染的高度落差） ===== */
.ld-skel { padding: 4px 0; }
.ld-skel-row {
  height: 16px; border-radius: 6px; margin-bottom: 12px;
  background: linear-gradient(100deg, var(--card) 40%, var(--card-2) 50%, var(--card) 60%);
  background-size: 200% 100%; animation: ld-skel-shimmer 1.4s ease infinite;
}
.ld-skel-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ld-skel-chip {
  width: 96px; height: 30px; border-radius: 8px;
  background: linear-gradient(100deg, var(--card) 40%, var(--card-2) 50%, var(--card) 60%);
  background-size: 200% 100%; animation: ld-skel-shimmer 1.4s ease infinite;
}
.ld-skel-table {
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px;
  background: var(--card);
}
.ld-skel-table .ld-skel-row { height: 40px; margin-bottom: 8px; }
.ld-skel-table .ld-skel-row:last-child { margin-bottom: 0; }
@keyframes ld-skel-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .ld-skel-row, .ld-skel-chip { animation: none; }
}

/* ===== 线索反馈（人工标记/撤销/评论：主行按钮 + 归因下方反馈区 + 聚合列） ===== */
.ld-fb { display: inline-flex; gap: 4px; white-space: nowrap; align-items: center; }
/* 与 .btn.ld-btn 同语言：无边框透明底轻量按钮（同「详情」等行内操作按钮），
   语义色只上在 hover/激活态；nowrap+flex:none 防列挤压时按钮文字断行 */
.ld-fb-btn {
  background: none; border: none; color: var(--muted);
  border-radius: 7px; padding: 4px 10px; font-size: 12px; line-height: 1.4;
  cursor: pointer; white-space: nowrap; flex: none; font-weight: 500;
}
.ld-fb-btn:hover { color: var(--text); background: var(--card-2); }
.ld-fb-btn.good:hover { color: var(--c-in); background: rgba(52,211,153,.10); }
.ld-fb-btn.bad:hover { color: var(--neg); background: rgba(248,113,113,.10); }
.ld-fb-btn.on-good {
  background: rgba(52,211,153,.13); color: var(--c-in); font-weight: 650;
}
.ld-fb-btn.on-bad {
  background: rgba(248,113,113,.13); color: var(--neg); font-weight: 650;
}
/* 主行评论数徽标：不展开也能看到该线索有反馈动态 */
.ld-fb-cnt { font-size: 11px; color: var(--muted-2); margin-left: 4px; }
/* 详情统计 chips 的反馈计数着色 */
.ld-stat b.ld-fb-num-good { color: var(--c-in); }
.ld-stat b.ld-fb-num-bad { color: var(--neg); }
/* 归因展开行内：反馈区（当前标记 + 反馈记录时间线 + 评论输入） */
.ld-fb-zone {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-2);
  max-width: 780px;
}
.ld-fb-cur { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.ld-fb-cur b.good { color: var(--c-in); font-weight: 600; }
.ld-fb-cur b.bad { color: var(--neg); font-weight: 600; }
.ld-fb-log-title { font-size: 12px; color: var(--muted-2); margin-bottom: 8px; }
.ld-fb-log {
  list-style: none; margin: 0 0 12px; padding: 0 0 0 16px;
  border-left: 2px solid var(--border-2);
  display: flex; flex-direction: column; gap: 9px;
}
.ld-fb-log li { position: relative; font-size: 12.5px; }
.ld-fb-log li::before {
  content: ""; position: absolute; left: -21px; top: 5px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2);
}
.ld-fb-log li.confirm::before { background: var(--c-in); }
.ld-fb-log li.reject::before { background: var(--neg); }
.ld-fb-log li .who { color: var(--text); font-weight: 600; }
.ld-fb-log li .at { color: var(--muted-2); font-size: 11.5px; margin-left: 6px; }
.ld-fb-log li .txt { color: var(--muted); margin: 2px 0 0; line-height: 1.6; }
.ld-fb-empty { font-size: 12px; color: var(--muted-2); margin-bottom: 12px; }
.ld-fb-new { display: flex; gap: 8px; }
.ld-fb-new input {
  flex: 1; background: var(--card); border: 1px solid var(--border-2);
  border-radius: 6px; color: var(--text); font-size: 12.5px; padding: 5px 9px;
}
.ld-fb-new input::placeholder { color: var(--muted-2); }
.ld-fb-new .btn { flex: none; padding: 5px 12px; font-size: 12px; }
/* 会话/任务列表「反馈」聚合列：✓有效 ✗有误 计数，0 灰显 */
.ld-fb-agg { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ld-fb-agg .good { color: var(--c-in); font-weight: 600; }
.ld-fb-agg .bad { color: var(--neg); font-weight: 600; }
.ld-fb-agg .zero { color: var(--muted-2); }

/* ==================== 充值 / 充值地址池（bl- 前缀） ==================== */
.bl-chain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.bl-balance-panel { margin-bottom: 0; }
.bl-chain-card .panel-head h2 { font-size: 15px; }
.bl-addr-area { padding: 6px 0 2px; min-height: 96px; }
.bl-addr-empty { font-size: 13px; padding: 28px 0; text-align: center; }
.bl-addr-body {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  padding: 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card-2);
}
.bl-qr-box { width: 116px; height: 116px; flex: none; background: #fff; border-radius: 8px; padding: 6px; }
.bl-qr-box svg { width: 100%; height: 100%; display: block; }
.bl-addr-info { flex: 1; min-width: 220px; }
.bl-addr-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.bl-addr-text {
  font-size: 13px; word-break: break-all; color: var(--text);
  padding: 8px 10px; border: 1px dashed var(--border-2); border-radius: 8px;
  margin-bottom: 8px; user-select: all;
}
.bl-copy-btn { font-size: 12px; padding: 5px 12px; }
.bl-addr-tip { font-size: 12px; margin-top: 8px; }
.bl-addr-actions { margin-top: 10px; padding-bottom: 6px; }
.bl-cfg-line { display: flex; gap: 10px; align-items: center; min-height: 34px; }
.bl-order-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.bl-order-filters .bl-filter { font-size: 12px; padding: 4px 12px; }
.bl-order-filters .bl-filter.on {
  border-color: rgba(45, 212, 191, 0.4); color: var(--accent);
}
.bl-mini-btn { font-size: 12px; padding: 4px 10px; }
.bl-unit { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }

/* ---- 微信支付充值（wx- 前缀） ---- */
.wx-tip { font-size: 12px; margin-bottom: 10px; }
.wx-pkg-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.wx-pkg-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 128px; padding: 12px 18px;
}
.wx-pkg-btn b { font-size: 18px; }
.wx-pkg-btn span { font-size: 12px; }
.wx-pkg-btn.selected { border-color: rgba(45, 212, 191, 0.4); color: var(--accent); }
.wx-custom-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.wx-custom-input { max-width: 220px; }
.wx-go-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
/* 全局 .btn 的 flex:1 会把按钮拉满整行，局部还原为内容宽 */
.wx-custom-row .btn, .wx-go-row .btn, .wx-pay-actions .btn { flex: none; }
.wx-go-row .btn { min-width: 168px; }
/* display:flex 会盖过 hidden 属性（同 .mo-drawer[hidden] 守卫），未选中/未下单时必须整体隐藏 */
.wx-go-row[hidden], .wx-pay-area[hidden], .bl-addr-body[hidden] { display: none; }
.wx-pay-area {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  padding: 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card-2);
}
.wx-pay-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.wx-pay-amount { font-size: 24px; font-weight: 700; }
.wx-pay-points { font-size: 13px; }
.wx-pay-points b { color: var(--accent); }
.wx-pay-order { font-size: 12px; color: var(--muted); }
.wx-pay-status { min-height: 22px; }
.wx-pay-actions { display: flex; gap: 10px; align-items: center; }
/* ---- 微信订单管理区（deposit_pool） ---- */
.wx-stats-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.wx-stat {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card-2); font-size: 12px;
}
.wx-stat b { font-size: 16px; display: block; margin-top: 2px; }

/* ============================== pricing 服务与定价（对外公开页） ============================== */
/* 页面不加载 app.js：锚点导航不依赖 JS 折叠，窄屏换行；仅复用全局变量与既有类。
   版式自包含（模板不继承 base.html），顶栏/页脚为本页局部形态。 */
body.page-pricing .topbar { flex-wrap: wrap; height: auto; min-height: 56px;
  padding-top: 8px; padding-bottom: 8px; }
.pricing-nav { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; margin-left: 8px; }
.pricing-enter { margin-left: auto; flex: none; }
.pricing-main { max-width: 1080px; display: flex; flex-direction: column; gap: 46px; }
.pricing-hero { text-align: center; padding: 40px 0 6px; }
.pricing-kicker { margin: 0 0 10px; font-size: 12px; letter-spacing: 3px;
  color: var(--accent); font-weight: 700; }
.pricing-hero h1 { margin: 0 0 10px; font-size: 32px; line-height: 1.25; }
.pricing-sub { margin: 0 0 8px; font-size: 17px; color: var(--text); }
.pricing-desc { margin: 0 auto; max-width: 640px; color: var(--muted); }
.pricing-section { scroll-margin-top: 80px; }   /* sticky 顶栏锚点落点补偿 */
.pricing-section h2 { margin: 0 0 4px; font-size: var(--fs-title); }
.pricing-section-desc { margin: 0 0 18px; color: var(--muted); }
.pricing-grid { display: grid; gap: 14px; }
.pricing-grid-4 { grid-template-columns: repeat(4, 1fr); }
.pricing-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pricing-card { padding: 18px; }
.pricing-card h3 { margin: 10px 0 6px; font-size: 15px; }
.pricing-card p { margin: 0; color: var(--muted); font-size: 13px; }
.pricing-num { font-family: var(--ff-mono); font-size: 12px; color: var(--accent); }
/* ---- 套餐卡 ---- */
.pricing-plan { position: relative; padding: 24px 20px 20px; text-align: center;
  display: flex; flex-direction: column; gap: 6px; }
.pricing-plan-hot { border-color: var(--accent); }   /* 推荐档：品牌色描边 */
.pricing-plan-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  margin: 0; padding: 2px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--accent); color: var(--on-brand); }
.pricing-plan-name { margin: 0; font-size: 15px; font-weight: 700; }
.pricing-amt { margin: 4px 0 0; font-size: 34px; font-weight: 800;
  font-family: var(--ff-mono); color: var(--text); }
.pricing-plan-points { margin: 0; font-size: 13px; color: var(--accent); font-weight: 600; }
.pricing-feats { margin: 10px 0 0; padding: 0; list-style: none; text-align: left;
  display: flex; flex-direction: column; gap: 6px; }
.pricing-feats li { position: relative; padding-left: 18px;
  font-size: 13px; color: var(--muted); }
.pricing-feats li::before { content: "✓"; position: absolute; left: 0;
  color: var(--accent); font-weight: 700; }
.pricing-plan-fit { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted-2); }
/* ---- 计费说明 ---- */
.pricing-notes { margin: 14px 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 6px; }
.pricing-notes li { position: relative; padding-left: 16px;
  font-size: 13px; color: var(--muted); }
.pricing-notes li::before { content: "·"; position: absolute; left: 4px; font-weight: 700; }
/* ---- 购买流程 ---- */
.pricing-steps { margin: 0; padding: 0; list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pricing-steps li { counter-increment: step; padding: 16px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card);
  display: flex; flex-direction: column; gap: 4px; }
.pricing-steps li::before { content: counter(step, decimal-leading-zero);
  font-family: var(--ff-mono); font-size: 12px; color: var(--accent); }
.pricing-steps b { font-size: 14px; }
.pricing-steps span { font-size: 12px; color: var(--muted); }
/* ---- 服务规则 + CTA ---- */
.pricing-rules { margin: 0; padding: 18px 20px; list-style: none;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card);
  display: flex; flex-direction: column; gap: 10px; }
.pricing-rules li { font-size: 13px; color: var(--muted); }
.pricing-rules b { color: var(--text); }
.pricing-cta { margin-top: 26px; text-align: center; }
.pricing-cta .btn { flex: none; min-width: 200px; }
/* ---- 窄屏（审核常在手机内打开）：网格单列堆叠 ---- */
@media (max-width: 980px) {
  .pricing-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid-3 { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; width: 100%; }
  .pricing-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .pricing-main { padding: 20px 16px; gap: 34px; }
  .pricing-hero h1 { font-size: 26px; }
  .pricing-grid-4 { grid-template-columns: 1fr; }
  .pricing-grid-3 { max-width: none; }
  .pricing-steps { grid-template-columns: 1fr; }
}

/* ===== MA 子会话视图（链2）：右侧「支线研判」页签 ===== */
#pane-subagent{display:none;flex-direction:column;min-height:0}
#pane-subagent.on{display:flex}
.sub-chips{display:flex;flex-wrap:wrap;gap:6px;padding:10px 12px;border-bottom:1px dashed var(--line,#2a3240)}
.sub-chips-empty{font-size:12px}
.sub-chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;padding:4px 10px;border-radius:99px;border:1px solid var(--line,#2a3240);background:transparent;color:var(--muted,#8b96a5);cursor:pointer}
.sub-chip .sc-target{font-family:var(--mono,monospace);font-size:11px;opacity:.8}
.sub-chip .sc-state{font-size:11px}
.sub-chip.on{color:var(--accent,#4da3ff);border-color:#2a4a6e;background:rgba(77,163,255,.08)}
.sub-chip.run .sc-state{color:var(--accent,#4da3ff)}
.sub-chip.run .sc-state::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor;margin-right:4px;animation:subPulse 1.2s infinite}
.sub-chip.done .sc-state{color:var(--ok,#3fb950)}
.sub-chip.fail .sc-state{color:var(--err,#f85149)}
@keyframes subPulse{0%,100%{opacity:1}50%{opacity:.25}}
.sub-conv{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:10px}
.sub-turn{display:flex;flex-direction:column;gap:10px}
.sub-turn .msg-bubble.analysis{max-width:100%}
