/* AI 客服 · 全站组件（2026-11-27 崔崔要求）
 * 由 serveStatic 注入到每个 HTML 页面。右下角入口，避开：
 *   .trash-fab（right18/bottom18）、.wb-task-wait（right20/bottom104）、AI 导师球。
 * 组件自身用主题变量，跟随 light/dark/green 三套皮肤，不写死颜色。
 */
.wb-support-fab{
  position:fixed; right:18px; bottom:170px; z-index:9993;
  height:44px; padding:0 .8rem 0 .55rem; border-radius:99px; border:1px solid var(--border);
  background:var(--panel); color:var(--accent-fg); cursor:pointer;
  box-shadow:var(--shadow-md); display:flex; align-items:center; justify-content:center; gap:.35rem;
  transition:transform .15s, box-shadow .15s;
}
.wb-support-fab:hover{ transform:translateY(-2px); box-shadow:var(--shadow-lg); }
.wb-support-fab .wb-su-ico{ font-size:1.25rem; line-height:1; }
.wb-support-fab .wb-su-txt{ font-size:.78rem; font-weight:700; white-space:nowrap; }
.wb-support-fab .wb-support-dot{
  position:absolute; top:2px; right:2px; width:9px; height:9px; border-radius:50%;
  background:#2E7D32; border:2px solid var(--panel);
}

.wb-support-panel{
  position:fixed; right:18px; bottom:224px; z-index:9994;
  width:min(380px, calc(100vw - 32px)); height:min(540px, calc(100vh - 260px));
  display:none; flex-direction:column; overflow:hidden;
  background:var(--panel); border:1px solid var(--border); border-radius:1rem;
  box-shadow:var(--shadow-lg);
}
.wb-support-panel.open{ display:flex; }

.wb-support-head{
  display:flex; align-items:center; gap:.55rem; padding:.8rem .9rem;
  border-bottom:1px solid var(--border-soft); background:var(--panel-2); flex:none;
}
.wb-support-head .wb-su-avatar{
  width:32px; height:32px; border-radius:50%; background:var(--accent-fg); color:var(--accent-ink);
  display:flex; align-items:center; justify-content:center; font-size:1rem; flex:none;
}
.wb-support-head b{ font-size:.9rem; color:var(--text-strong); flex:1; }
.wb-support-head .wb-su-sub{ display:block; font-size:.72rem; color:var(--muted); font-weight:400; margin-top:.1rem; }
.wb-support-head .wb-su-close{
  appearance:none; border:0; background:transparent; color:var(--muted);
  font-size:1.3rem; line-height:1; cursor:pointer; padding:.15rem .3rem;
}
.wb-support-head .wb-su-close:hover{ color:var(--text-strong); }

.wb-support-msgs{ flex:1; overflow:auto; padding:.85rem .8rem; display:flex; flex-direction:column; gap:.65rem; }
.wb-su-msg{ max-width:88%; font-size:.86rem; line-height:1.7; padding:.6rem .75rem; border-radius:.8rem; white-space:pre-wrap; word-break:break-word; }
.wb-su-msg.me{ align-self:flex-end; background:var(--accent-soft); color:var(--text-strong); border-bottom-right-radius:.2rem; }
.wb-su-msg.ai{ align-self:flex-start; background:var(--panel-2); color:var(--text); border:1px solid var(--border-soft); border-bottom-left-radius:.2rem; }
.wb-su-msg.sys{ align-self:center; font-size:.78rem; color:var(--muted); background:transparent; padding:.2rem; }
.wb-su-quick{ display:flex; flex-wrap:wrap; gap:.4rem; padding:0 .8rem .5rem; }
.wb-su-quick button{
  appearance:none; border:1px solid var(--border); background:var(--panel); color:var(--accent-fg);
  font-family:inherit; font-size:.75rem; padding:.35rem .6rem; border-radius:99px; cursor:pointer;
}
.wb-su-quick button:hover{ border-color:var(--accent-fg); background:var(--accent-soft); }
.wb-support-input{ display:flex; gap:.45rem; padding:.65rem .8rem; border-top:1px solid var(--border-soft); flex:none; }
.wb-support-input textarea{
  flex:1; resize:none; height:40px; border:1px solid var(--border); border-radius:.55rem;
  background:var(--panel-2); color:var(--text); font-family:inherit; font-size:.86rem;
  padding:.5rem .6rem; line-height:1.5;
}
.wb-support-input button{
  appearance:none; border:0; border-radius:.55rem; background:var(--accent-fg); color:var(--accent-ink);
  font-family:inherit; font-size:.82rem; font-weight:700; padding:0 .9rem; cursor:pointer;
}
.wb-support-input button:disabled{ opacity:.55; cursor:default; }

@media (max-width:820px){
  .wb-support-fab{ right:12px; bottom:88px; height:40px; padding:0 .65rem 0 .45rem; }
  .wb-support-fab .wb-su-ico{ font-size:1.1rem; }
  .wb-support-fab .wb-su-txt{ font-size:.72rem; }
  .wb-support-panel{ right:8px; left:8px; width:auto; bottom:136px; height:min(60vh,520px); }
}
