/* ======= 绝顶加闻 · 在线助理小闻 (bottom-right chat widget) ======= */
.tcn-fab{
  position:fixed;right:20px;bottom:20px;z-index:9998;
  width:64px;height:64px;border-radius:50%;border:2px solid #d9ae4a;
  padding:0;cursor:pointer;background:#16181d;
  box-shadow:0 6px 24px rgba(0,0,0,.45);
  overflow:visible;
}
.tcn-fab img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.tcn-fab .dot{
  position:absolute;right:2px;bottom:2px;width:14px;height:14px;border-radius:50%;
  background:#2fbf5f;border:2px solid #16181d;
}
.tcn-fab:hover{transform:scale(1.05)}
.tcn-fab:active{transform:scale(.97)}
.tcn-fab.waving{animation:tcn-wave 1s ease-in-out 3}
@keyframes tcn-wave{0%,100%{transform:translateX(0) rotate(0)}25%{transform:translateX(-6px) rotate(-10deg)}75%{transform:translateX(6px) rotate(10deg)}}

.tcn-panel{
  position:fixed;right:20px;bottom:96px;z-index:9999;
  width:min(380px,calc(100vw - 32px));
  height:min(560px,calc(100dvh - 140px));
  display:none;flex-direction:column;overflow:hidden;
  background:#16181d;color:#f2ede3;
  border:1px solid rgba(217,174,74,.5);border-radius:14px;
  box-shadow:0 18px 50px rgba(0,0,0,.55);
  font-family:inherit;
}
.tcn-panel.open{display:flex}
.tcn-panel .tcn-head{
  display:flex;align-items:center;gap:10px;
  padding:12px 14px;background:#1e2127;
  border-bottom:1px solid rgba(255,255,255,.1);
}
.tcn-panel .tcn-head img{width:42px;height:42px;border-radius:50%;object-fit:cover;border:2px solid #d9ae4a;flex:none}
.tcn-panel .tcn-head .nm{font-size:16px;font-weight:700;line-height:1.3}
.tcn-panel .tcn-head .st{font-size:12px;color:#8fce9f}
.tcn-panel .tcn-head .sp{flex:1}
.tcn-panel .tcn-close{
  background:none;border:none;color:#a49c8a;font-size:24px;line-height:1;
  cursor:pointer;padding:4px 6px;border-radius:6px;
}
.tcn-panel .tcn-close:hover{color:#fff;background:rgba(255,255,255,.08)}
.tcn-msgs{
  flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;
  font-size:15px;line-height:1.6;
}
.tcn-msg{max-width:86%;padding:9px 12px;border-radius:12px;white-space:pre-wrap;word-break:break-word}
.tcn-msg.bot{align-self:flex-start;background:#23262c;border:1px solid rgba(255,255,255,.08);border-bottom-left-radius:4px}
.tcn-msg.user{align-self:flex-end;background:#b01124;color:#fff;border-bottom-right-radius:4px}
.tcn-msg a{color:#ffd9dd;text-decoration:underline;text-underline-offset:3px}
.tcn-msg.bot a{color:#ffd166}
.tcn-msg .tcn-link{display:block;margin-top:6px;font-size:14px}
.tcn-typing{display:inline-flex;gap:4px;padding:4px 2px}
.tcn-typing i{width:7px;height:7px;border-radius:50%;background:#a49c8a;animation:tcn-blink 1s infinite}
.tcn-typing i:nth-child(2){animation-delay:.2s}
.tcn-typing i:nth-child(3){animation-delay:.4s}
@keyframes tcn-blink{0%,100%{opacity:.3}50%{opacity:1}}
.tcn-chips{
  display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 10px;
}
.tcn-chips button{
  font:inherit;font-size:13px;color:#ffd166;background:rgba(217,174,74,.12);
  border:1px solid rgba(217,174,74,.45);border-radius:999px;
  padding:5px 11px;cursor:pointer;
}
.tcn-chips button:hover{background:rgba(217,174,74,.25)}
.tcn-input{
  display:flex;gap:8px;padding:10px 12px;border-top:1px solid rgba(255,255,255,.1);
  background:#1e2127;
}
.tcn-input input{
  flex:1;min-width:0;font:inherit;font-size:15px;color:#f2ede3;
  background:#121419;border:1px solid rgba(255,255,255,.16);border-radius:8px;
  padding:9px 12px;outline:none;
}
.tcn-input input:focus{border-color:#d9ae4a}
.tcn-input button{
  font:inherit;font-size:15px;font-weight:700;color:#fff;background:#b01124;
  border:none;border-radius:8px;padding:0 16px;cursor:pointer;
}
.tcn-input button:hover{background:#8f0d1d}
@media (max-width:480px){
  .tcn-fab{right:14px;bottom:14px;width:58px;height:58px}
  .tcn-panel{right:14px;bottom:84px}
}
