:root{
  --bg:#ffffff;
  --line:#ececec;
  --line-soft:#f2f2f2;
  --text:#1a1a1a;
  --text-2:#5f5f5f;
  --text-3:#8e8e93;
  --hover:#f5f5f6;
  --active:#f0f0f1;
  --brand:#0f7b5f;
  --brand-deep:#0b6349;
  --brand-soft:#e8f4ef;
  --brand-line:#bfe0d3;
  --sb:208px;

  /* 控件统一规格：实心按钮高度 / 边框 / 立体阴影 */
  --ctl-h:34px;
  --ctl-h-sm:30px;
  --ctl-bd:#e4e6e8;
  --ctl-bd-hover:#d6d9dc;
  /* 「结实感」来自三层：外描边 + 1px 内高光 + 极浅投影 */
  --shadow-1:0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.04);
  --shadow-2:0 2px 4px rgba(16,24,40,.06), 0 4px 12px rgba(16,24,40,.06);
  --shadow-3:0 6px 16px rgba(16,24,40,.10), 0 12px 34px rgba(16,24,40,.08);
  --ring:0 0 0 3px rgba(15,123,95,.16);
  --ring-dark:0 0 0 3px rgba(17,24,39,.10);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  background:var(--bg);color:var(--text);
  -webkit-font-smoothing:antialiased;
  overflow:hidden;
}
button{font-family:inherit;border:none;background:none;cursor:pointer;color:inherit}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:none;box-shadow:var(--ring);
}
input,textarea,select{font-family:inherit;outline:none}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:#dedede;border-radius:8px}
::-webkit-scrollbar-thumb:hover{background:#cfcfcf}
::-webkit-scrollbar-track{background:transparent}

/* ---------- 通用图标按钮 ---------- */
.tb-icon{
  width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;
  color:#4a4a4a;border:1px solid transparent;transition:background .14s,border-color .14s,color .14s;
}
.tb-icon:hover{background:#fff;border-color:var(--ctl-bd);color:#1a1a1a;box-shadow:var(--shadow-1)}
.tb-icon:active{background:#f7f7f8;box-shadow:none;transform:translateY(.5px)}
.tb-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.tb-icon.sm{width:26px;height:26px}
.tb-icon.sm svg{width:15px;height:15px}

/* ---------- 布局 ---------- */
.app{display:flex;height:100vh}

/* ---------- 侧栏 ---------- */
.sidebar{
  width:var(--sb);flex:0 0 var(--sb);border-right:1px solid var(--line);
  display:flex;flex-direction:column;padding:12px 10px 8px;background:#fff;
}
.brand{display:flex;align-items:center;gap:8px;padding:2px 6px 10px}
.brand-logo{width:26px;height:26px;flex:0 0 26px}
.brand-logo svg{width:100%;height:100%}
.brand-text{min-width:0}
.brand-name{font-size:13px;font-weight:600;letter-spacing:-.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-ver{font-size:10.5px;color:var(--text-3);margin-top:1px}
.brand-discover{
  margin-left:auto;display:flex;align-items:center;gap:3px;font-size:11.5px;color:var(--text-2);
  padding:4px 6px;border-radius:6px;white-space:nowrap;transition:background .12s;
}
.brand-discover:hover{background:var(--hover)}
.caret{width:12px!important;height:12px!important;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

.nav{display:flex;flex-direction:column;gap:2px}
.nav-item{
  display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:9px;font-size:13px;
  color:#3c3c3c;border:1px solid transparent;transition:background .14s,border-color .14s,box-shadow .14s;text-align:left;
}
.nav-item[hidden]{display:none}
.nav-item svg{width:16px;height:16px;flex:0 0 16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;opacity:.8}
.nav-item:hover{background:#fff;border-color:var(--ctl-bd);box-shadow:var(--shadow-1)}
.nav-item.active{background:#fff;border-color:#dfe3e6;font-weight:600;color:#111;box-shadow:var(--shadow-1)}
.nav-badge{
  margin-left:auto;font-size:10.5px;color:#6f6f74;background:#f1f2f3;border:1px solid #e7e8ea;
  border-radius:999px;padding:1px 7px;font-weight:500;
}
.nav-item.active .nav-badge{background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand)}

.side-lists{margin-top:12px;display:flex;flex-direction:column;gap:1px;overflow:auto;flex:1;min-height:0}
.side-row{
  display:flex;align-items:center;justify-content:space-between;padding:7px 10px;border-radius:9px;
  font-size:12.5px;color:var(--text-2);transition:all .14s;width:100%;font-weight:500;
}
.side-row:hover{background:#fff;box-shadow:var(--shadow-1)}
.side-row em{font-style:normal;color:var(--text-3)}
.side-row .caret{transition:transform .18s}
.side-row.open .caret{transform:rotate(90deg)}
.side-sub{display:none;flex-direction:column;gap:2px;padding:3px 0 5px 6px}
.side-sub.open{display:flex}
.sub-item{
  display:flex;align-items:center;gap:7px;padding:6px 8px;border-radius:8px;font-size:12.5px;
  color:#464b50;width:100%;text-align:left;transition:all .14s;
}
.sub-item:hover{background:#fff;box-shadow:var(--shadow-1)}
.sub-item.active{background:#fff;font-weight:600;color:#141618;box-shadow:var(--shadow-2)}
.sub-item .dot{width:17px;height:17px;flex:0 0 17px;border-radius:6px;color:#fff;font-size:9px;
  display:flex;align-items:center;justify-content:center;font-weight:600;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28), 0 1px 2px rgba(16,24,40,.14)}
.sub-item span{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sub-item .del{font-style:normal;color:#c0c3c6;padding:0 2px;font-size:13px;line-height:1;opacity:0;transition:all .14s}
.sub-item:hover .del{opacity:1}
.sub-item .del:hover{color:#c0392b}
.side-empty{font-size:12px;color:var(--text-3);padding:8px 10px 10px;line-height:1.65}

.side-foot{margin-top:auto;display:flex;align-items:center;gap:7px;padding:8px 6px 2px;border-top:1px solid var(--line-soft)}
.avatar-me{
  width:24px;height:24px;border-radius:50%;background:linear-gradient(140deg,#2fae7f,#0f7b5f);
  color:#fff;font-size:11px;display:flex;align-items:center;justify-content:center;font-weight:600;
}
.me-name{font-size:12.5px;color:#2c2c2c;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side-foot .tb-icon{color:#7a7a7a}

/* ---------- 主区 ---------- */
.main{flex:1;min-width:0;position:relative;overflow:hidden}
.view{display:none;height:100%}
.view.active{display:flex;flex-direction:column}

/* ---------- 首页 ---------- */
#view-home.active{align-items:center;overflow-y:auto}
.hero{padding-top:8vh;text-align:center;flex:0 0 auto}
.hero h1{font-size:30px;font-weight:600;letter-spacing:-.6px;color:#111}
.hero-tabs{display:flex;justify-content:center;gap:6px;margin-top:20px}
.ht{
  display:flex;align-items:center;gap:6px;padding:7px 15px;border-radius:999px;font-size:13px;
  color:#54595e;background:#f5f6f7;border:1px solid #eceef0;transition:all .15s;font-weight:500;
}
.ht svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.ht:hover{background:#fff;border-color:var(--ctl-bd-hover);color:#1a1a1a;box-shadow:var(--shadow-1)}
.ht:active{transform:translateY(1px)}
.ht.active{
  background:linear-gradient(180deg,#2b2b2b,#171717);color:#fff;border-color:#0d0d0d;font-weight:600;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16), 0 2px 8px rgba(0,0,0,.20);
}

.composer-wrap{width:min(640px,84vw);margin:24px 0 40px;flex:0 0 auto}
.domain-row{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 11px 3px}
.domain-item{
  display:flex;align-items:center;gap:7px;padding:7px 14px;border-radius:999px;font-size:12.5px;
  color:#3f4449;background:#fff;border:1px solid #e7e9eb;transition:all .15s;white-space:nowrap;
  box-shadow:0 1px 2px rgba(16,24,40,.04);font-weight:500;
}
.domain-item .di-dot{width:6px;height:6px;border-radius:50%;background:#d0d3d6;transition:background .15s}
.domain-item:hover{border-color:var(--brand-line);background:var(--brand-soft);color:var(--brand);box-shadow:var(--shadow-1)}
.domain-item:hover .di-dot{background:var(--brand)}
.domain-item:active{transform:translateY(1px)}
.domain-item.active{
  border-color:var(--brand-line);background:linear-gradient(180deg,#f4fbf8,#e6f3ee);color:var(--brand-deep);font-weight:600;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9), 0 1px 3px rgba(15,123,95,.16);
}
.domain-item.active .di-dot{background:var(--brand);box-shadow:0 0 0 3px rgba(15,123,95,.14)}
/* ---------- 输入区 ----------
   设计取向：不加边框。「大气」靠大圆角 + 大留白 + 呼吸感阴影，
   聚焦时才浮起一层柔和的绿光，而不是套一个框。                */
.composer{
  border:none;border-radius:22px;background:#fff;
  padding:2px;
  box-shadow:0 1px 2px rgba(16,24,40,.04), 0 4px 12px rgba(16,24,40,.05), 0 18px 46px rgba(16,24,40,.08);
  transition:box-shadow .26s cubic-bezier(.2,.8,.3,1);position:relative;
}
.composer:hover{box-shadow:0 1px 2px rgba(16,24,40,.045), 0 6px 16px rgba(16,24,40,.06), 0 22px 54px rgba(16,24,40,.095)}
.composer:focus-within{
  box-shadow:0 1px 2px rgba(16,24,40,.05), 0 8px 22px rgba(16,24,40,.07),
             0 26px 62px rgba(16,24,40,.11), 0 0 0 3px rgba(15,123,95,.10);
}
.composer-chips{display:flex;align-items:center;gap:6px;padding:14px 14px 0;overflow-x:auto;scrollbar-width:none}
.composer-chips:empty{display:none}
.composer-chips::-webkit-scrollbar{display:none}
.chip{
  flex:0 0 auto;padding:4px 10px;border-radius:999px;font-size:12px;color:#3f4347;
  background:#f5f6f7;border:1px solid #e8e9eb;transition:all .14s;white-space:nowrap;
}
.chip:hover{background:#eef0f1;border-color:#dcdee0}
.chip-more{padding:4px 8px;color:#8a8a8a}
.chip.summoned{
  background:var(--brand-soft);color:var(--brand);border-color:var(--brand-line);font-weight:500;
  display:flex;align-items:center;gap:5px;box-shadow:0 1px 2px rgba(15,123,95,.10);
}
.chip.summoned .x{font-size:13px;opacity:.55;line-height:1}
.chip.summoned .x:hover{opacity:1}
.mascot{position:absolute;right:14px;top:-8px;width:48px;height:48px;pointer-events:none;z-index:3}
.mascot svg{width:100%;height:100%;filter:drop-shadow(0 4px 9px rgba(0,0,0,.12))}
.composer-input{padding:20px 18px 0;position:relative}
.composer-chips:not(:empty)+.composer-input{padding-top:10px}
.composer-input textarea{
  width:100%;border:none;background:none;resize:none;font-size:14.5px;line-height:1.72;
  color:var(--text);min-height:78px;max-height:280px;letter-spacing:.1px;
}
.composer.compact .composer-input{padding:14px 16px 0}
.composer.compact .composer-input textarea{min-height:52px}
.composer-input textarea::placeholder{color:#a6abb0}
.composer-foot{display:flex;align-items:center;justify-content:space-between;padding:8px 12px 12px}
.foot-right{display:flex;align-items:center;gap:8px}
.foot-btn{
  width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;
  color:#4a4a4a;border:1px solid transparent;transition:background .14s,border-color .14s,box-shadow .14s;
}
.foot-btn:hover{background:#fff;border-color:var(--ctl-bd);color:#1a1a1a;box-shadow:var(--shadow-1)}
.foot-btn:active{transform:translateY(.5px);box-shadow:none}
.foot-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.foot-text{
  display:flex;align-items:center;gap:6px;height:30px;padding:0 10px;border-radius:9px;font-size:12.5px;
  color:#4a4a4a;border:1px solid transparent;transition:background .14s,border-color .14s,box-shadow .14s;white-space:nowrap;
}
.foot-text:hover{background:#fff;border-color:var(--ctl-bd);color:#1a1a1a;box-shadow:var(--shadow-1)}
.foot-text:active{transform:translateY(.5px);box-shadow:none}
.foot-text .ico-spark{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linejoin:round}

/* 通道标记未接通时整块隐藏（含它后面的分隔线由 CSS 兜底） */
.foot-text[hidden]{display:none}
.foot-text[hidden]+.foot-sep{display:none}

/* 分隔细线：左边是通道信息，右边是动作按钮，视觉上分两层 */
.foot-sep{width:1px;height:18px;background:#e8e9eb;flex:0 0 1px;margin:0 1px}

/* ---------- 召唤专家按钮（主色描边 + 立体感） ---------- */
.foot-call{
  display:flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:9px;
  font-size:12.5px;font-weight:600;letter-spacing:.1px;
  color:var(--brand);background:linear-gradient(180deg,#f4fbf8,#e9f5f0);
  border:1px solid var(--brand-line);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(15,123,95,.10);
  transition:all .14s;white-space:nowrap;
}
.foot-call svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.foot-call:hover{
  color:#fff;background:linear-gradient(180deg,#158766,var(--brand));border-color:var(--brand-deep);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 3px 8px rgba(15,123,95,.28);
}
.foot-call:active{transform:translateY(1px);box-shadow:inset 0 2px 5px rgba(0,0,0,.18)}

.send-btn{
  width:34px;height:34px;border-radius:50%;background:#e2e4e6;display:flex;align-items:center;
  justify-content:center;transition:all .16s;margin-left:2px;
  border:1px solid #d6d9db;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 1px 2px rgba(16,24,40,.06);
  cursor:not-allowed;
}
.send-btn svg{width:16px;height:16px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.send-btn:not(.enabled){background:#e6e8ea;border-color:#dcdfe2}
.send-btn:not(.enabled) svg{stroke:#a8adb2}
.send-btn.enabled{
  background:linear-gradient(180deg,#232323,#111);border-color:#0a0a0a;cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16), 0 2px 6px rgba(0,0,0,.22);
}
.send-btn.enabled:hover{
  background:linear-gradient(180deg,#333,#1a1a1a);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18), 0 4px 12px rgba(0,0,0,.28);
}
.send-btn.enabled:active{transform:translateY(1px);box-shadow:inset 0 2px 6px rgba(0,0,0,.35)}
.composer-meta{display:flex;gap:4px;margin-top:8px;padding-left:6px}
.meta-btn{
  display:flex;align-items:center;gap:5px;padding:4px 8px;border-radius:7px;font-size:12px;
  color:#6a6a6a;transition:background .12s;
}
.meta-btn:hover{background:#f4f4f4}
.meta-btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}

/* @ 提及弹层 */
.mention-pop{
  display:none;position:absolute;left:12px;bottom:calc(100% + 6px);width:330px;max-height:288px;overflow:auto;
  background:#fff;border:1px solid #e8e8e8;border-radius:12px;box-shadow:0 10px 34px rgba(0,0,0,.11);
  padding:6px;z-index:20;
}
.mention-pop.show{display:block}
.mp-head{font-size:11px;color:var(--text-3);padding:6px 8px 4px}
.mp-item{display:flex;align-items:center;gap:9px;padding:7px 8px;border-radius:8px;cursor:pointer}
.mp-item:hover,.mp-item.sel{background:var(--hover)}
.mp-item .dot{width:24px;height:24px;border-radius:7px;color:#fff;font-size:11px;display:flex;
  align-items:center;justify-content:center;font-weight:600;flex:0 0 24px}
.mp-item .txt{min-width:0;flex:1}
.mp-item .n{font-size:12.5px;font-weight:500}
.mp-item .d{font-size:11px;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}

/* ---------- 专家库 ---------- */
.expert-top{
  height:50px;flex:0 0 50px;display:flex;align-items:center;padding:0 18px;
  border-bottom:1px solid var(--line);gap:12px;
}
.expert-tabs{display:flex;gap:2px}
.et{
  display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:8px;font-size:13px;
  color:#8e8e93;transition:all .12s;
}
.et svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.et.active{color:#1a1a1a;font-weight:600;background:#f5f5f6}
.expert-top-right{margin-left:auto;display:flex;align-items:center;gap:8px}
.search-box{
  display:flex;align-items:center;gap:7px;height:34px;padding:0 11px;border:1px solid var(--ctl-bd);
  border-radius:9px;background:#fcfcfd;transition:all .15s;
}
.search-box:hover{border-color:var(--ctl-bd-hover);background:#fff}
.search-box:focus-within{background:#fff;border-color:var(--brand-line);box-shadow:var(--ring)}
.search-box svg{width:14px;height:14px;fill:none;stroke:#9a9a9a;stroke-width:1.6;stroke-linecap:round}
.search-box input{border:none;background:none;font-size:12.5px;width:186px;color:var(--text)}
.search-box input::placeholder{color:#a5a5a5}
.btn-ghost{
  height:34px;padding:0 13px;border:1px solid var(--ctl-bd);border-radius:9px;font-size:12.5px;
  color:#333;background:#fff;font-weight:500;transition:all .15s;box-shadow:var(--shadow-1);
}
.btn-ghost:hover{background:#fafbfb;border-color:var(--ctl-bd-hover);box-shadow:var(--shadow-2)}
.btn-ghost:active{transform:translateY(1px);box-shadow:none}
.btn-solid{
  height:34px;padding:0 14px;border-radius:9px;font-size:12.5px;font-weight:600;letter-spacing:.1px;
  color:#fff;background:linear-gradient(180deg,#2b2b2b,#171717);
  border:1px solid #0d0d0d;
  display:flex;align-items:center;gap:6px;transition:all .15s;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16), 0 1px 2px rgba(16,24,40,.14);
}
.btn-solid:hover{
  background:linear-gradient(180deg,#3a3a3a,#1d1d1d);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18), 0 4px 12px rgba(0,0,0,.24);
}
.btn-solid:active{transform:translateY(1px);box-shadow:inset 0 2px 5px rgba(0,0,0,.35)}
.btn-solid svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

.expert-scroll{flex:1;overflow-y:auto;padding:18px 20px 48px}
.sec-title{font-size:15px;font-weight:600;letter-spacing:-.2px;margin-bottom:12px}
.sec-head{display:flex;align-items:center;justify-content:space-between;margin-top:24px}
.sec-head .sec-title{margin-bottom:0}
.sort-tabs{display:flex;gap:14px}
.st{font-size:12.5px;color:#8e8e93;transition:color .12s}
.st:hover{color:#5f5f5f}
.st.active{color:#1a1a1a;font-weight:600}

.scene-row{display:flex;gap:12px;overflow-x:auto;padding-bottom:6px;scrollbar-width:none}
.scene-row::-webkit-scrollbar{display:none}
.scene-card{
  flex:0 0 184px;height:152px;border-radius:14px;padding:13px 13px 10px;position:relative;
  overflow:hidden;cursor:pointer;color:#fff;transition:transform .16s,box-shadow .16s;
}
.scene-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(0,0,0,.14)}
.scene-card::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.30),rgba(0,0,0,.58))}
.scene-card>*{position:relative;z-index:1}
.scene-card h3{font-size:13px;font-weight:600;margin-bottom:11px;letter-spacing:.2px}
.scene-item{display:flex;align-items:center;gap:7px;font-size:11px;color:rgba(255,255,255,.94);margin-top:8px;line-height:1.3}
.scene-item span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.scene-item .si-dot{
  width:14px;height:14px;flex:0 0 14px;border-radius:4px;background:rgba(255,255,255,.9);
  color:#333;font-size:8.5px;display:flex;align-items:center;justify-content:center;font-weight:700;
}

.cat-row{display:flex;gap:8px;overflow-x:auto;margin:14px 0 14px;padding-bottom:4px;scrollbar-width:none}
.cat-row::-webkit-scrollbar{display:none}
.cat{
  flex:0 0 auto;padding:6px 14px;border-radius:999px;font-size:12.5px;color:#3f4449;background:#f5f6f7;
  border:1px solid #eceef0;transition:all .15s;white-space:nowrap;font-weight:500;
}
.cat:hover{background:#fff;border-color:var(--ctl-bd-hover);color:#1a1a1a;box-shadow:var(--shadow-1)}
.cat:active{transform:translateY(1px)}
.cat.active{
  background:linear-gradient(180deg,#2b2b2b,#171717);color:#fff;border-color:#0d0d0d;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16), 0 1px 3px rgba(0,0,0,.18);
}

.expert-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(206px,1fr));gap:13px}
.expert-card{
  border:1px solid #e9ebed;border-radius:14px;padding:15px;background:#fff;position:relative;
  cursor:pointer;transition:border-color .16s,box-shadow .16s,transform .16s;display:flex;flex-direction:column;
  box-shadow:0 1px 2px rgba(16,24,40,.035);
}
.expert-card:hover{
  border-color:#dfe3e6;transform:translateY(-2px);
  box-shadow:0 2px 4px rgba(16,24,40,.05), 0 12px 28px rgba(16,24,40,.09);
}
.card-head{display:flex;align-items:center;gap:9px}
.card-logo{
  width:30px;height:30px;flex:0 0 30px;border-radius:10px;color:#fff;font-size:13px;font-weight:600;
  display:flex;align-items:center;justify-content:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.32), 0 1px 2px rgba(16,24,40,.16);
}
.card-name{font-size:13.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;letter-spacing:-.1px}
.card-tag{
  font-size:10.5px;color:#6f6f74;background:#f3f4f5;border:1px solid #e9eaec;border-radius:5px;padding:1px 6px;flex:0 0 auto;
  font-weight:500;
}
.card-tag.mine{background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand)}
.card-author{display:flex;align-items:center;gap:5px;font-size:11.5px;color:#9a9a9a;margin-top:10px}
.card-author i{width:13px;height:13px;border-radius:50%;background:#e6e6e6;display:block}
.card-desc{
  font-size:12px;color:#666b70;line-height:1.7;margin-top:8px;flex:1;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
.card-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.ctag{font-size:11px;color:#5f5f5f;background:#f5f6f7;border:1px solid #eceef0;border-radius:5px;padding:2px 6px}
.card-call{
  position:absolute;right:12px;top:12px;padding:5px 12px;border-radius:9px;font-size:12px;font-weight:600;
  color:#fff;background:linear-gradient(180deg,#158766,var(--brand));border:1px solid var(--brand-deep);
  opacity:0;transform:translateY(-2px);transition:all .16s;
  box-shadow:0 2px 6px rgba(15,123,95,.28);
}
.expert-card:hover .card-call{opacity:1;transform:none}
.card-call:hover{background:linear-gradient(180deg,#0f7b5f,#0a5540)}
.card-call:active{transform:translateY(1px)}
.grid-empty{grid-column:1/-1;text-align:center;color:var(--text-3);font-size:13px;padding:52px 0}

/* ---------- 任务对话 ---------- */
.task-top{
  height:50px;flex:0 0 50px;display:flex;align-items:center;gap:10px;padding:0 16px;
  border-bottom:1px solid var(--line);
}
.task-title{font-size:13.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46%}
.task-expert{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--brand);
  background:var(--brand-soft);border:1px solid var(--brand-line);border-radius:999px;padding:3px 10px;
}
.task-expert .dot{width:14px;height:14px;border-radius:4px;color:#fff;font-size:9px;display:flex;
  align-items:center;justify-content:center;font-weight:600}
.msg-scroll{flex:1;overflow-y:auto;padding:22px 24px 10px}
.msg{max-width:760px;margin:0 auto 20px;display:flex;gap:11px}
.msg.user{justify-content:flex-end}
.msg .msg-avatar{
  width:26px;height:26px;flex:0 0 26px;border-radius:8px;color:#fff;font-size:11px;font-weight:600;
  display:flex;align-items:center;justify-content:center;
}
.msg-body{font-size:13.5px;line-height:1.78;color:#1f1f1f;white-space:pre-wrap;word-break:break-word}
.msg-body strong{font-weight:600}
.msg.user .msg-body{
  background:#f2f2f3;border-radius:14px;padding:10px 15px;max-width:80%;color:#1a1a1a;
}
.msg .caret-blink{display:inline-block;width:6px;height:14px;background:#1a1a1a;margin-left:2px;
  vertical-align:-2px;animation:blink 1s steps(2) infinite;border-radius:1px}
@keyframes blink{0%,50%{opacity:1}51%,100%{opacity:0}}
.msg-sys{max-width:760px;margin:0 auto 16px;font-size:12px;color:#a06a00;background:#fff8e6;
  border:1px solid #f2e0b8;border-radius:8px;padding:7px 12px}
.task-composer{padding:6px 24px 18px;flex:0 0 auto}
.task-composer .composer{max-width:760px;margin:0 auto}
.typing{display:inline-flex;gap:3px;align-items:center;height:16px}
.typing i{width:5px;height:5px;border-radius:50%;background:#bdbdbd;animation:bounce 1.1s infinite}
.typing i:nth-child(2){animation-delay:.15s}
.typing i:nth-child(3){animation-delay:.3s}
@keyframes bounce{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}

/* ---------- 占位页 ---------- */
#view-blank.active{align-items:center;justify-content:center}
.blank-box{text-align:center;display:flex;flex-direction:column;gap:16px;align-items:center}
.blank-title{font-size:19px;font-weight:600;color:#2c2c2c}

/* ---------- 弹层 ---------- */
.modal-mask{
  position:fixed;inset:0;background:rgba(18,20,22,.38);backdrop-filter:blur(4px);
  display:none;align-items:center;justify-content:center;z-index:60;padding:32px;
}
.modal-mask.show{display:flex}
.modal{
  position:relative;
  width:min(660px,100%);max-height:88vh;overflow-y:auto;background:#fff;border-radius:18px;
  padding:26px;box-shadow:0 24px 70px rgba(0,0,0,.26), 0 2px 6px rgba(0,0,0,.08);
  border:1px solid rgba(255,255,255,.6);
  animation:pop .18s cubic-bezier(.2,.8,.3,1);
  overscroll-behavior:contain;
}
@keyframes pop{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
.modal-x{
  position:sticky;top:0;float:right;margin:-10px -10px 0 12px;
  width:30px;height:30px;border-radius:9px;border:1px solid transparent;background:transparent;
  display:flex;align-items:center;justify-content:center;color:#9a9ea3;cursor:pointer;
  transition:background .14s,color .14s,border-color .14s;z-index:2;
}
.modal-x:hover{background:#f1f2f3;color:#1f1f1f;border-color:rgba(15,20,26,.07)}
.modal-x:active{background:#e7e9eb;transform:scale(.94)}
.modal h2{font-size:16.5px;font-weight:600;margin-bottom:7px;letter-spacing:-.2px;padding-right:30px}
.modal .m-sub{font-size:12.5px;color:var(--text-2);line-height:1.7;margin-bottom:18px}
.modal .m-foot{display:flex;justify-content:flex-end;gap:9px;margin-top:22px;flex-wrap:wrap}
.btn-lg{
  height:36px;padding:0 17px;border-radius:10px;font-size:13px;font-weight:500;transition:all .15s;
  display:flex;align-items:center;justify-content:center;gap:6px;
}
.btn-lg.primary{
  background:linear-gradient(180deg,#2b2b2b,#171717);color:#fff;border:1px solid #0d0d0d;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16), 0 1px 2px rgba(16,24,40,.14);
}
.btn-lg.primary:hover{background:linear-gradient(180deg,#3a3a3a,#1d1d1d);box-shadow:inset 0 1px 0 rgba(255,255,255,.18), 0 4px 12px rgba(0,0,0,.24)}
.btn-lg.primary:active{transform:translateY(1px)}
.btn-lg.primary:disabled{background:#d3d6d9;border-color:#c9cdd1;color:#fff;cursor:not-allowed;box-shadow:none}
.btn-lg.plain{background:#fff;color:#333;border:1px solid var(--ctl-bd);box-shadow:var(--shadow-1)}
.btn-lg.plain:hover{background:#fafbfb;border-color:var(--ctl-bd-hover);box-shadow:var(--shadow-2)}
.btn-lg.plain:active{transform:translateY(1px);box-shadow:none}

.field{margin-bottom:15px}
.field label{display:block;font-size:12.5px;color:#333;font-weight:600;margin-bottom:7px;letter-spacing:-.1px}
.field input[type=text],.field input[type=password],.field textarea,.field select{
  width:100%;border:1px solid var(--ctl-bd);border-radius:10px;padding:10px 12px;font-size:13px;
  color:var(--text);background:#fcfcfd;transition:all .15s;box-shadow:inset 0 1px 2px rgba(16,24,40,.03);
}
.field input[type=text]:hover,.field input[type=password]:hover,.field textarea:hover,.field select:hover{border-color:var(--ctl-bd-hover)}
.field input[type=text]:focus,.field input[type=password]:focus,.field textarea:focus,.field select:focus{background:#fff;border-color:var(--brand-line);box-shadow:var(--ring)}
.field textarea{resize:vertical;line-height:1.68;font-size:12.5px}
.field .hint{font-size:11.5px;color:var(--text-3);margin-top:6px;line-height:1.55}
.row2{display:flex;gap:12px}
.row2 .field{flex:1}
.drop{
  border:1.5px dashed #d5d9dc;border-radius:12px;padding:24px;text-align:center;background:#fbfcfc;
  transition:all .16s;cursor:pointer;
}
.drop:hover,.drop.over{border-color:var(--brand);background:var(--brand-soft);border-style:solid}
.drop .d1{font-size:13px;color:#333;font-weight:600}
.drop .d2{font-size:11.5px;color:var(--text-3);margin-top:6px}
.picked{font-size:12px;color:var(--brand);margin-top:9px;font-weight:500}

.toast{
  position:fixed;left:50%;bottom:36px;transform:translateX(-50%) translateY(12px);
  background:rgba(23,25,27,.94);color:#fff;font-size:13px;padding:10px 19px;border-radius:11px;
  opacity:0;pointer-events:none;transition:all .22s cubic-bezier(.2,.8,.3,1);z-index:90;
  box-shadow:0 8px 26px rgba(0,0,0,.26);backdrop-filter:blur(6px);
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

@media (max-width:820px){
  .sidebar{position:absolute;left:0;top:0;bottom:0;z-index:40;box-shadow:0 0 30px rgba(0,0,0,.1)}
  .search-box input{width:120px}
}

/* ══════════════════════════════════════════════════════════════
   v2 追加样式：来源标签、来源筛选、版本列表、引擎标记、消息气泡微调
   ══════════════════════════════════════════════════════════════ */

/* ---------- 专家来源标签 ---------- */
.card-tag.sc-system{background:#f0f0f1;color:#6a6a6a}
.card-tag.sc-tenant{background:#eaf1fb;color:#2e5aac}
.card-tag.sc-user{background:var(--brand-soft);color:var(--brand)}

/* ---------- 专家库：分类行 + 来源筛选并排 ---------- */
.expert-filter{display:flex;align-items:center;gap:14px;margin:14px 0}
.expert-filter .cat-row{margin:0;flex:1;min-width:0}
.scope-tabs{display:flex;gap:2px;flex:0 0 auto;background:#f2f3f4;border:1px solid #e8e9eb;border-radius:999px;padding:3px}
.sc{
  padding:5px 14px;border-radius:999px;font-size:12.5px;color:#5f5f5f;transition:all .14s;white-space:nowrap;font-weight:500;
}
.sc:hover{color:#1a1a1a}
.sc.active{
  background:#fff;color:#111;font-weight:600;
  box-shadow:0 1px 2px rgba(16,24,40,.10), 0 0 0 1px rgba(16,24,40,.04);
}

/* ---------- 召唤标签里的小圆点 ---------- */
.chip.summoned .ci-dot{
  width:14px;height:14px;flex:0 0 14px;border-radius:4px;color:#fff;font-size:8.5px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}

/* ---------- 任务头：未召唤时的灰字 ---------- */
.task-expert .th-none{
  color:#8b9095;background:#f4f5f6;border-color:#e9eaec;font-weight:500;
}
.task-expert em[data-chipsx]{font-style:normal;cursor:pointer;opacity:.55;margin-left:2px}
.task-expert em[data-chipsx]:hover{opacity:1}
.task-expert{box-shadow:0 1px 2px rgba(15,123,95,.10);border-width:1px}

/* ---------- 消息底部引擎标记 ---------- */
.msg-engine{
  margin-top:8px;font-size:10.5px;color:#b3b8bd;letter-spacing:.2px;
  padding-top:6px;border-top:1px dashed #f0f1f2;
}

/* ---------- 专家详情：简介 / 引用块 / 底部元信息 ---------- */
.detail-desc{font-size:13px;color:#333;line-height:1.78;margin-bottom:15px}
.detail-quote{
  font-size:12.5px;color:#4f5459;line-height:1.82;background:#fbfcfc;
  border:1px solid #eceef0;border-left:3px solid var(--brand-line);border-radius:9px;padding:12px 14px;
}
.detail-meta{font-size:11.5px;color:var(--text-3);margin-top:4px}

/* ---------- 版本列表 ---------- */
.ver-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:11px 13px;border:1px solid #eceef0;border-radius:10px;margin-bottom:7px;background:#fcfcfd;
  transition:border-color .14s,box-shadow .14s;
}
.ver-row:hover{border-color:#dfe3e6;box-shadow:var(--shadow-1);background:#fff}
.ver-l{display:flex;align-items:center;gap:9px;min-width:0}
.ver-l b{font-size:12.5px;color:#111;flex:0 0 auto;font-weight:600}
.ver-l span{font-size:12px;color:#666b70;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ver-r{display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--text-3);flex:0 0 auto}
.btn-mini{
  padding:4px 10px;border-radius:7px;font-size:11.5px;font-weight:500;
  background:#fff;color:#333;border:1px solid var(--ctl-bd);transition:all .14s;box-shadow:var(--shadow-1);
}
.btn-mini:hover{background:linear-gradient(180deg,#2b2b2b,#171717);color:#fff;border-color:#0d0d0d}

/* ---------- 侧栏底部用户名 ---------- */
.me-name{font-size:12.5px;color:#2c2c2c;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.avatar-me{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28), 0 1px 2px rgba(15,123,95,.22);
}

/* ══════════════════════════════════════════════════════════════
   召唤专家选择器
   ══════════════════════════════════════════════════════════════ */
.sp-search{
  display:flex;align-items:center;gap:8px;height:38px;padding:0 13px;margin-bottom:12px;
  border:1px solid var(--ctl-bd);border-radius:10px;background:#fcfcfd;transition:all .15s;
  box-shadow:inset 0 1px 2px rgba(16,24,40,.03);
}
.sp-search:hover{border-color:var(--ctl-bd-hover)}
.sp-search:focus-within{background:#fff;border-color:var(--brand-line);box-shadow:var(--ring)}
.sp-search svg{width:15px;height:15px;fill:none;stroke:#9a9a9a;stroke-width:1.7;stroke-linecap:round}
.sp-search input{border:none;background:none;font-size:13px;flex:1;color:var(--text);min-width:0}
.sp-search input::placeholder{color:#a5a5a5}
.sp-list{
  display:flex;flex-direction:column;gap:6px;max-height:360px;overflow-y:auto;
  margin:0 -4px;padding:2px 4px;
}
.sp-item{
  display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:11px;text-align:left;
  border:1px solid #eceef0;background:#fff;transition:all .15s;width:100%;
  box-shadow:0 1px 2px rgba(16,24,40,.03);
}
.sp-item:hover{border-color:var(--brand-line);background:var(--brand-soft);box-shadow:var(--shadow-2);transform:translateY(-1px)}
.sp-item.on{border-color:var(--brand);background:var(--brand-soft)}
.sp-logo{
  width:34px;height:34px;flex:0 0 34px;border-radius:10px;color:#fff;font-size:13px;font-weight:600;
  display:flex;align-items:center;justify-content:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.32), 0 1px 3px rgba(16,24,40,.18);
}
.sp-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.sp-n{
  display:flex;align-items:center;gap:7px;font-size:13px;font-weight:600;color:#141618;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.sp-d{font-size:11.5px;color:#8b9095;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp-go{
  flex:0 0 auto;padding:5px 13px;border-radius:9px;font-size:12px;font-weight:600;color:#fff;
  background:linear-gradient(180deg,#158766,var(--brand));border:1px solid var(--brand-deep);
  box-shadow:0 1px 3px rgba(15,123,95,.24);opacity:.9;transition:all .15s;
}
.sp-item:hover .sp-go{opacity:1;box-shadow:0 3px 9px rgba(15,123,95,.3)}
.sp-empty{text-align:center;color:var(--text-3);font-size:12.5px;padding:34px 0}

@media (max-width:820px){
  .sp-list{max-height:300px}
  .sp-go{display:none}
}

/* ══════════════════════════════════════════════════════════════
   登录 / 注册
   ══════════════════════════════════════════════════════════════ */
.auth{
  position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;
  background:
    radial-gradient(1000px 520px at 18% -10%, #e9f5f0 0%, rgba(233,245,240,0) 62%),
    radial-gradient(820px 480px at 88% 108%, #eef1f7 0%, rgba(238,241,247,0) 60%),
    #fbfbfc;
  padding:28px;
}
.auth[hidden]{display:none}
.auth-card{
  width:min(400px,100%);background:#fff;border-radius:22px;padding:32px 30px 28px;
  box-shadow:0 1px 2px rgba(16,24,40,.05), 0 12px 32px rgba(16,24,40,.08), 0 34px 80px rgba(16,24,40,.10);
  animation:authIn .3s cubic-bezier(.2,.8,.3,1);
}
@keyframes authIn{from{opacity:0;transform:translateY(14px) scale(.985)}to{opacity:1;transform:none}}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:24px}
.brand-logo.lg{width:42px;height:42px;flex:0 0 42px;filter:drop-shadow(0 4px 10px rgba(15,123,95,.26))}
.brand-logo.lg svg{width:100%;height:100%}
.auth-title{font-size:18px;font-weight:600;letter-spacing:-.3px;color:#141618}
.auth-sub{font-size:12.5px;color:var(--text-3);margin-top:3px}
.auth-tabs{
  display:flex;gap:3px;background:#f3f4f5;border:1px solid #e9eaec;border-radius:11px;padding:3px;margin-bottom:22px;
}
.at{
  flex:1;padding:8px 0;border-radius:9px;font-size:13px;font-weight:500;color:#5f646a;transition:all .16s;
}
.at:hover{color:#141618}
.at.active{background:#fff;color:#141618;font-weight:600;box-shadow:0 1px 2px rgba(16,24,40,.10), 0 0 0 1px rgba(16,24,40,.04)}
.btn-auth{
  width:100%;height:42px;margin-top:6px;border-radius:12px;font-size:14px;font-weight:600;letter-spacing:.2px;
  color:#fff;background:linear-gradient(180deg,#2b2b2b,#171717);border:1px solid #0d0d0d;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16), 0 2px 6px rgba(0,0,0,.18);
  transition:all .16s;
}
.btn-auth:hover{background:linear-gradient(180deg,#3a3a3a,#1d1d1d);box-shadow:inset 0 1px 0 rgba(255,255,255,.18), 0 5px 16px rgba(0,0,0,.24)}
.btn-auth:active{transform:translateY(1px);box-shadow:inset 0 2px 6px rgba(0,0,0,.32)}
.btn-auth:disabled{background:#d3d6d9;border-color:#c9cdd1;cursor:not-allowed;box-shadow:none}
.auth-msg{font-size:12.5px;color:#c0392b;margin-top:12px;min-height:17px;line-height:1.5}
.auth-msg.ok{color:var(--brand)}

/* ══════════════════════════════════════════════════════════════
   成员管理（管理员开账号）
   ══════════════════════════════════════════════════════════════ */
.signup-tip{
  font-size:11.5px;color:#8a9098;background:#f5f6f7;border:1px solid #e9eaec;
  border-radius:999px;padding:5px 11px;white-space:nowrap;
}
.signup-tip.on{color:var(--brand);background:var(--brand-soft);border-color:var(--brand-line)}
.mbr-note{
  font-size:12.5px;color:#5f646a;line-height:1.75;background:#fbfcfc;border:1px solid #eceef0;
  border-left:3px solid var(--brand-line);border-radius:9px;padding:12px 14px;margin-bottom:18px;max-width:760px;
}
.mbr-list{display:flex;flex-direction:column;gap:8px;max-width:760px}
.mbr-row{
  display:flex;align-items:center;gap:12px;padding:13px 15px;border:1px solid #eceef0;border-radius:12px;
  background:#fff;transition:all .16s;box-shadow:0 1px 2px rgba(16,24,40,.035);
}
.mbr-row:hover{border-color:#dfe3e6;box-shadow:var(--shadow-2);transform:translateY(-1px)}
.mbr-row.me{border-color:var(--brand-line);background:linear-gradient(180deg,#fbfefd,#f5fbf8)}
.mbr-avatar{
  width:34px;height:34px;flex:0 0 34px;border-radius:11px;color:#fff;font-size:13px;font-weight:600;
  display:flex;align-items:center;justify-content:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3), 0 1px 3px rgba(16,24,40,.16);
}
.mbr-main{flex:1;min-width:0}
.mbr-name{font-size:13.5px;font-weight:600;color:#141618;display:flex;align-items:center;gap:7px}
.mbr-mail{font-size:11.5px;color:#8b9095;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mbr-tag{
  font-size:10.5px;font-weight:500;border-radius:5px;padding:1px 6px;border:1px solid #e9eaec;
  background:#f3f4f5;color:#6f6f74;
}
.mbr-tag.owner{background:#1f1f1f;border-color:#111;color:#fff}
.mbr-tag.admin{background:#eaf1fb;border-color:#d3e0f5;color:#2e5aac}
.mbr-tag.off{background:#fdecec;border-color:#f7d8d8;color:#b23c3c}
.mbr-stats{font-size:11.5px;color:var(--text-3);flex:0 0 auto;text-align:right;line-height:1.6}
.mbr-acts{display:flex;gap:6px;flex:0 0 auto}
.mbr-list .grid-empty{text-align:center;color:var(--text-3);font-size:13px;padding:40px 0}

.auth-foot{
  margin-top:16px;text-align:center;font-size:12px;color:#9aa0a6;line-height:1.6;
  padding-top:15px;border-top:1px solid #f1f2f3;
}
.auth-foot a{color:var(--brand);text-decoration:none;font-weight:500}
