/* ============================================================
   lab-chat.css · 对话式主界面（统一对话风格）
   深色底 + 品牌青，消息流 + 顶部能力切换 + 底部输入区
   ============================================================ */

/* ---------- 容器 ---------- */
.lc-root{
  display:flex;flex-direction:column;
  height:auto;
  min-height:360px;
  margin:-4px -2px 0;
}
.lc-scroll{
  flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;touch-action:pan-y;
  padding:12px 2px 18px;
  scrollbar-width:thin;
}
.lc-scroll::-webkit-scrollbar{width:4px}
.lc-scroll::-webkit-scrollbar-thumb{background:rgba(18,22,28,.12);border-radius:2px}

/* ---------- 空态 ---------- */
.lc-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:18px 8px 4px}
.lc-orb{
  width:54px;height:54px;border-radius:17px;flex:none;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(145deg,rgba(14,154,167,.12),rgba(8,127,140,.05));
  border:1px solid rgba(14,154,167,.26);
  box-shadow:0 6px 18px -10px rgba(14,154,167,.35), inset 0 0 14px rgba(14,154,167,.05);
  margin-bottom:11px;
}
.lc-orb svg{width:26px;height:26px;stroke:var(--brand);stroke-width:1.7;fill:none}
.lc-empty h2{font-size:16.5px;font-weight:700;margin:0 0 5px;letter-spacing:-.2px}
.lc-empty p{font-size:12px;color:var(--muted);line-height:1.62;margin:0;max-width:320px}
.lc-ex{margin-top:13px;width:100%;max-width:420px;display:flex;flex-direction:column;gap:7px}
.lc-ex-label{font-size:11px;color:var(--muted);letter-spacing:.06em;text-align:left;margin-bottom:0}
.lc-ex-item{
  text-align:left;width:100%;cursor:pointer;
  border:1px solid var(--line);background:rgba(18,22,28,.035);
  border-radius:11px;padding:9px 12px;
  color:var(--text);font-size:12.5px;line-height:1.5;
  display:flex;align-items:center;gap:9px;
  transition:.15s;
}
.lc-ex-item:active{background:rgba(14,154,167,.08);border-color:var(--brand-line)}
.lc-ex-item i{
  flex:none;width:24px;height:24px;border-radius:7px;
  background:var(--brand-tint);display:flex;align-items:center;justify-content:center;
}
.lc-ex-item i svg{width:13px;height:13px;stroke:var(--brand);stroke-width:2;fill:none}
.lc-ex-item span{flex:1;min-width:0}

/* ---------- 消息 ---------- */
.lc-msg{display:flex;gap:9px;margin-bottom:16px;align-items:flex-start}
.lc-msg.me{flex-direction:row-reverse}
.lc-av{
  flex:none;width:28px;height:28px;border-radius:9px;margin-top:2px;
  display:flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:700;
}
.lc-msg.ai .lc-av{
  background:linear-gradient(145deg,rgba(14,154,167,.2),rgba(20,168,160,.08));
  border:1px solid rgba(14,154,167,.26);color:var(--brand);
}
.lc-msg.me .lc-av{background:rgba(18,22,28,.07);border:1px solid var(--line);color:var(--muted)}
.lc-bd{min-width:0;max-width:calc(100% - 46px)}
.lc-name{font-size:11px;color:var(--muted);margin:0 0 5px 2px;display:flex;align-items:center;gap:6px}
.lc-msg.me .lc-name{justify-content:flex-end;margin-right:2px}
.lc-bubble{
  border-radius:14px;padding:11px 13px;
  font-size:13.5px;line-height:1.72;word-break:break-word;
  white-space:pre-wrap;
}
.lc-msg.ai .lc-bubble{
  background:rgba(18,22,28,.045);border:1px solid var(--line);
  border-top-left-radius:5px;
}
.lc-msg.me .lc-bubble{
  background:linear-gradient(135deg,rgba(14,154,167,.13),rgba(8,127,140,.07));
  border:1px solid rgba(14,154,167,.26);
  border-top-right-radius:5px;
}
.lc-bubble.lc-welcome{
  border-left:3px solid var(--brand);
  background:rgba(14,154,167,.06);
}
.lc-bubble b,.lc-bubble strong{color:var(--brand);font-weight:650}
.lc-bubble code{
  font-family:ui-monospace,Menlo,monospace;font-size:12.5px;
  background:rgba(18,22,28,.06);padding:1px 5px;border-radius:5px;
}

/* 跑题拦截卡片 */
.lc-bubble.blocked{
  background:rgba(240,180,60,.07)!important;
  border-color:rgba(240,180,60,.32)!important;
  color:#8A5A00;font-weight:600;letter-spacing:.02em;
}

/* 操作条 */
.lc-ops{display:flex;gap:6px;margin-top:7px;opacity:.9}
.lc-op{
  border:1px solid var(--line);background:transparent;
  border-radius:8px;padding:4px 9px;font-size:11.5px;color:var(--muted);
  cursor:pointer;display:inline-flex;align-items:center;gap:4px;
}
.lc-op:active{color:var(--brand);border-color:var(--brand-line)}
.lc-op svg{width:12px;height:12px;stroke:currentColor;stroke-width:2;fill:none}

/* 思考中 */
.lc-think{display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:rgba(18,22,28,.03);font-size:12.5px;color:var(--muted)}
.lc-dots{display:inline-flex;gap:4px}
.lc-dots i{width:5px;height:5px;border-radius:50%;background:var(--brand);opacity:.35;animation:lc-bounce 1.1s infinite}
.lc-dots i:nth-child(2){animation-delay:.18s}
.lc-dots i:nth-child(3){animation-delay:.36s}
@keyframes lc-bounce{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.lc-elapsed{font-variant-numeric:tabular-nums;font-family:ui-monospace,Menlo,monospace;font-size:11.5px}
.lc-cancel{margin-left:auto;border:1px solid var(--line);background:transparent;border-radius:7px;padding:3px 8px;font-size:11.5px;color:var(--muted);cursor:pointer}

/* ---------- 底部输入区 ---------- */
.lc-dock{
  flex:none;position:relative;z-index:5;
  padding:8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  background:var(--bg);
}
.lc-dock::before{
  content:"";position:absolute;left:0;right:0;top:-22px;height:22px;pointer-events:none;
  background:linear-gradient(180deg,rgba(246,247,249,0),var(--bg));
}
.lc-modes{
  display:flex;gap:6px;overflow-x:auto;padding:2px 1px 8px;
  scrollbar-width:none;-ms-overflow-style:none;
}
.lc-modes::-webkit-scrollbar{display:none}
.lc-mode{
  flex:none;border:1px solid var(--line);background:rgba(18,22,28,.045);
  border-radius:999px;min-height:32px;padding:0 13px;
  font-size:12.5px;color:var(--muted);cursor:pointer;
  display:inline-flex;align-items:center;gap:5px;white-space:nowrap;
  transition:.15s;
}
.lc-mode svg{width:13px;height:13px;stroke:currentColor;stroke-width:1.9;fill:none;opacity:.85}
.lc-mode.on{
  border-color:rgba(14,154,167,.4);color:var(--brand);
  background:rgba(14,154,167,.1);font-weight:650;
  box-shadow:0 0 0 3px rgba(14,154,167,.06);
}
.lc-field{
  display:flex;align-items:flex-end;gap:8px;
  border:1px solid var(--line);border-radius:16px;
  background:rgba(18,22,28,.055);
  padding:8px 8px 8px 12px;
  transition:.18s;
}
.lc-field.focus{border-color:rgba(14,154,167,.42);background:rgba(14,154,167,.045);box-shadow:0 0 0 3px rgba(14,154,167,.07)}
.lc-input{
  flex:1;min-width:0;border:0;background:transparent;outline:none;
  color:var(--text);font-size:13.5px;line-height:1.6;
  resize:none;max-height:132px;min-height:40px;
  font-family:inherit;padding:6px 0;
}
.lc-input::placeholder{color:rgba(18,22,28,.42)}
.lc-send{
  flex:none;width:38px;height:38px;border-radius:11px;border:0;cursor:pointer;
  background:linear-gradient(145deg,#12A5B2,#087F8C);
  display:flex;align-items:center;justify-content:center;
  transition:.15s;
}
.lc-send svg{width:17px;height:17px;stroke:#FFFFFF;stroke-width:2;fill:none}
.lc-send:disabled{opacity:.35;cursor:not-allowed;background:rgba(18,22,28,.12)}
.lc-send:disabled svg{stroke:var(--muted)}
.lc-foot{
  display:flex;align-items:center;justify-content:space-between;
  margin-top:7px;font-size:11px;color:rgba(18,22,28,.45);
}
.lc-clear{background:none;border:0;color:rgba(18,22,28,.5);font-size:11px;cursor:pointer;padding:2px 0}
.lc-scope{
  display:inline-flex;align-items:center;gap:5px;
  color:rgba(14,154,167,.62);font-size:11px;
}
.lc-scope svg{width:11px;height:11px;stroke:currentColor;stroke-width:2;fill:none}

/* ---- 功能说明条：选中功能后告诉用户怎么填（无说明条时不影响布局） ---- */
.lc-hint{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:2px 0 8px;font-size:11.5px;line-height:1.5}
.lc-hint:empty{display:none}
.lc-hint-t{display:inline-flex;align-items:flex-start;gap:5px;color:rgba(14,154,167,.9);max-width:100%}
.lc-hint-t svg{width:12px;height:12px;flex:none;margin-top:1px;stroke:currentColor;stroke-width:2;fill:none}
.lc-hint-ex{
  flex:none;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  border:1px solid rgba(14,154,167,.28);background:rgba(14,154,167,.07);
  color:rgba(8,127,140,.95);border-radius:999px;padding:3px 9px;
  font-size:11px;font-family:inherit;cursor:pointer;transition:.15s;
}
.lc-hint-ex:hover{background:rgba(14,154,167,.14);border-color:rgba(14,154,167,.45)}
.lc-hint-ex:active{transform:scale(.98)}

/* ---- 拒答/拦截后的补救引导 ---- */
.lc-help{margin-top:8px;display:flex;flex-direction:column;gap:6px}
.lc-help .lc-ex-label{font-size:11px;color:rgba(18,22,28,.5)}