/* پنجره‌ی گفتگو با دستیار: روی گوشی نوارِ «بپرس» و برگه‌ای از پایین؛ روی دسکتاپ ستونِ همیشه‌بازِ کنار —
   کاربر همان اول می‌بیند که کسی برای جواب هست. */
.abar{position:fixed;left:50%;transform:translateX(-50%);bottom:16px;width:min(688px,calc(100% - 28px));z-index:30;
  display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:99px;
  padding:7px 7px 7px 14px;box-shadow:0 12px 30px rgba(60,40,20,.14);cursor:text}
.abar .hint{flex:1;font-size:13.5px;color:var(--faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.abar .go{width:38px;height:38px;border-radius:50%;background:var(--ink);display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.abar .go svg,.cb-send svg{width:17px;height:17px;stroke:#fff;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.abar .av,.cb-head .av{border-radius:50%;overflow:hidden;background:var(--acc-s);color:var(--acc-d);display:flex;
  align-items:center;justify-content:center;font-weight:900;flex:0 0 auto}
.abar .av{width:34px;height:34px}
.cb-head .av{width:38px;height:38px}
.abar .av img,.cb-head .av img{width:100%;height:100%;object-fit:cover}
.chat-mask{position:fixed;inset:0;background:rgba(20,14,8,.4);z-index:70;opacity:0;pointer-events:none;transition:opacity .2s}
.chat{position:fixed;z-index:71;background:var(--cream);display:flex;flex-direction:column;left:0;right:0;bottom:0;height:88vh;
  border-radius:24px 24px 0 0;transform:translateY(100%);transition:transform .28s cubic-bezier(.2,.8,.2,1)}
.chat-open .chat{transform:none}
.chat-open .chat-mask{opacity:1;pointer-events:auto}
.chat-open .abar{display:none}
@media(min-width:1000px){
  .chat{left:auto;right:0;top:0;bottom:0;height:auto;width:400px;border-radius:0;border-left:1px solid var(--line);transform:none;transition:none}
  .chat-mask,.abar,.cb-x{display:none!important}
  body{padding-right:400px}
}
.cb-head{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line)}
.cb-head b{display:block;font-size:14.5px}.cb-head small{display:block;font-size:11.5px;color:var(--muted)}
.cb-x{margin-right:auto;width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:#fff;font-size:18px;cursor:pointer;color:var(--ink)}
.cb-list{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.msg{max-width:86%;padding:10px 14px;border-radius:18px;font-size:14.5px;line-height:1.95;white-space:pre-line;overflow-wrap:anywhere}
.msg.u{align-self:flex-start;background:var(--acc-s);color:#4a2412;border-bottom-right-radius:6px}
.msg.b{align-self:flex-end;background:#fff;border:1px solid var(--line);border-bottom-left-radius:6px}
.msg.b.intro{color:var(--muted);font-size:13.5px}
.msg.typing{color:var(--faint)}
.msg-src{font-size:11.5px;color:var(--muted);margin-top:5px;white-space:normal}
.cb-list .vote{align-self:flex-end;max-width:86%;margin-top:-4px}
.cb-foot{padding:10px 12px 14px;border-top:1px solid var(--line)}
.cb-in{display:flex;align-items:flex-end;gap:8px;background:#fff;border:1px solid var(--line);border-radius:22px;padding:6px 6px 6px 12px}
.cb-in:focus-within{border-color:var(--orange)}
.cb-in textarea{flex:1;border:0;outline:0;resize:none;font:inherit;font-size:14.5px;line-height:1.8;max-height:120px;background:transparent;padding:4px 2px}
.cb-send{width:38px;height:38px;border-radius:50%;background:var(--ink);border:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex:0 0 auto}
.cb-send:disabled{opacity:.4;cursor:default}
.cb-note{font-size:11px;color:var(--faint);text-align:center;margin-top:7px}
