.trayce-chat-launcher { position:fixed; right:22px; bottom:22px; z-index:90; width:auto; min-height:60px; padding:9px 18px 9px 11px; border:1.5px solid #e6c368; border-radius:999px; display:flex; align-items:center; gap:11px; color:#fff; background:linear-gradient(125deg,#38331d,#50472b); box-shadow:0 8px 28px rgba(56,51,29,.24),0 0 0 4px rgba(169,217,207,.12); cursor:pointer; transition:box-shadow .2s,transform .2s; }
.trayce-chat-launcher:hover { transform:translateY(-2px); box-shadow:0 12px 30px rgba(56,51,29,.3),0 0 0 5px rgba(169,217,207,.22); }
.trayce-chat-launcher:focus-visible,.trayce-ai-invitation button:focus-visible { outline:3px solid #60b9ab; outline-offset:4px; }
.trayce-chat-launcher img { width:38px; height:38px; display:block; object-fit:contain; pointer-events:none; }
.trayce-ai-mark { position:relative; display:block; }
.trayce-ai-status { position:absolute; right:-1px; top:0; width:8px; height:8px; border:2px solid #38331d; border-radius:50%; background:#e6c368; }
.trayce-ai-label { font:600 13px/1.3 Arial,sans-serif; letter-spacing:.015em; white-space:nowrap; }
.trayce-ai-attention { animation:trayce-ai-glow 2.4s ease-out 1s 1; }
@keyframes trayce-ai-glow { 0%,100% { box-shadow:0 8px 28px rgba(56,51,29,.24),0 0 0 4px rgba(169,217,207,.12); } 45% { box-shadow:0 8px 34px rgba(0,90,100,.38),0 0 0 11px rgba(169,217,207,.35); } }
.trayce-ai-invitation { position:fixed; z-index:89; right:22px; bottom:96px; max-width:min(300px,calc(100vw - 28px)); display:flex; align-items:center; gap:4px; padding:6px; border:1px solid #c8e2db; border-radius:15px 15px 4px 15px; background:#fffdf7; box-shadow:0 8px 28px rgba(56,51,29,.14); }
.trayce-ai-invitation[hidden] { display:none; }
.trayce-ai-invitation button { border:0; background:transparent; color:#17444d; cursor:pointer; }
.trayce-ai-invite-open { padding:10px 8px 10px 12px; font:400 13px/1.5 Arial,sans-serif; text-align:left; }
.trayce-ai-invite-dismiss { align-self:flex-start; min-width:32px; min-height:32px; font:400 22px/1 Arial,sans-serif; }
@media (prefers-reduced-motion:reduce) { .trayce-ai-attention { animation:none; } .trayce-chat-launcher { transition:none; } .trayce-chat-launcher:hover { transform:none; } }
.trayce-chat-panel { position:fixed; right:22px; bottom:92px; z-index:90; width:min(390px,calc(100vw - 28px)); height:min(610px,calc(100vh - 120px)); display:none; grid-template-rows:auto 1fr auto; overflow:hidden; border:1px solid rgba(56,51,29,.12); border-radius:22px; background:#f8f6ee; box-shadow:0 24px 70px rgba(56,51,29,.25); }
.trayce-chat-panel.open { display:grid; }
.trayce-chat-head { padding:18px 20px; display:flex; align-items:center; gap:12px; color:#fff; background:#38331d; }
.trayce-chat-head img { width:34px; height:34px; object-fit:contain; }
.trayce-chat-head div { flex:1; }
.trayce-chat-head strong { display:block; font:500 17px Georgia,serif; }
.trayce-chat-head small { color:rgba(255,255,255,.65); font-size:10px; letter-spacing:.08em; text-transform:uppercase; }
.trayce-chat-close { border:0; color:#fff; background:transparent; font-size:24px; cursor:pointer; }
.trayce-chat-messages { padding:20px; overflow:auto; display:flex; flex-direction:column; gap:12px; }
.trayce-chat-message { max-width:90%; padding:14px 16px; border-radius:16px; font:400 14px/1.65 Arial,sans-serif; white-space:pre-line; overflow-wrap:break-word; }
.trayce-chat-message p { margin:0; font:inherit; color:inherit; }
.trayce-chat-message p + p { margin-top:12px; }
.trayce-chat-message.bot { align-self:flex-start; color:#17444d; background:#fff; border-bottom-left-radius:5px; }
.trayce-chat-message.user { align-self:flex-end; color:#fff; background:#9e9b48; border-bottom-right-radius:5px; }
.trayce-chat-quick { display:flex; flex-wrap:wrap; gap:7px; }
.trayce-chat-quick button { padding:8px 10px; border:1px solid rgba(56,51,29,.18); border-radius:999px; color:#005467; background:transparent; font-size:10px; cursor:pointer; }
.trayce-chat-form { padding:12px; display:grid; grid-template-columns:1fr 42px; gap:8px; border-top:1px solid rgba(56,51,29,.1); background:#fff; }
.trayce-chat-form input { min-width:0; padding:0 14px; border:1px solid rgba(56,51,29,.16); border-radius:999px; outline:none; font-size:13px; }
.trayce-chat-form input:focus { border-color:#9e9b48; }
.trayce-chat-form button { width:42px; height:42px; border:0; border-radius:50%; color:#fff; background:#38331d; cursor:pointer; }
.trayce-chat-note { padding:0 16px 12px; color:#668189; background:#fff; font:400 10px/1.5 Arial,sans-serif; text-align:center; }
@media (max-width:680px) {
  .trayce-chat-launcher { right:max(12px,env(safe-area-inset-right)); bottom:calc(12px + env(safe-area-inset-bottom)); width:auto; min-height:54px; padding:7px 15px 7px 9px; gap:9px; }
  .trayce-chat-launcher img { width:34px; height:34px; }
  .trayce-ai-label { font-size:12px; }
  .trayce-ai-invitation { right:max(12px,env(safe-area-inset-right)); bottom:calc(80px + env(safe-area-inset-bottom)); }
  .trayce-chat-panel {
    left:max(10px,env(safe-area-inset-left));
    right:max(10px,env(safe-area-inset-right));
    bottom:calc(74px + env(safe-area-inset-bottom));
    width:auto !important;
    max-width:none !important;
    height:min(72dvh,560px);
    max-height:calc(100dvh - 104px - env(safe-area-inset-bottom));
    margin:0 !important;
    transform:none !important;
    border-radius:18px;
    contain:layout paint;
    overflow:hidden;
  }
  .trayce-chat-head { padding:14px 16px; }
  .trayce-chat-head img { width:30px; height:30px; }
  .trayce-chat-head strong { font-size:16px; }
  .trayce-chat-head, .trayce-chat-messages, .trayce-chat-form, .trayce-chat-note { min-width:0; max-width:100%; }
  .trayce-chat-messages { padding:14px; gap:10px; overflow-x:hidden; }
  .trayce-chat-message { max-width:94%; padding:12px 14px; font-size:14px; overflow-wrap:anywhere; word-break:normal; }
  .trayce-chat-quick { max-width:100%; gap:6px; }
  .trayce-chat-quick button { max-width:100%; padding:8px 10px; font-size:11px; white-space:normal; }
  .trayce-chat-form { width:100%; grid-template-columns:minmax(0,1fr) 42px; }
  .trayce-chat-form input { width:100%; max-width:100%; font-size:16px; }
  .trayce-chat-note { padding-inline:10px; overflow-wrap:anywhere; }
}
