/* D-Tech assistant: launcher button + chat panel, on every page (site/chat.js builds the markup) */
.chat-launch { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: 10px;
  background: var(--thread, #EFE3CC); color: var(--tobacco, #2A1D16); border: 0; border-radius: 999px; padding: 14px 20px 14px 16px;
  font: 600 15px/1 var(--sans, system-ui, sans-serif); cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.chat-launch svg { width: 22px; height: 22px; }
.chat-launch:focus-visible { outline: 2px solid var(--brass, #B8925A); outline-offset: 3px; }
.chat-panel { position: fixed; right: 20px; bottom: 84px; z-index: 60; width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100svh - 120px)); display: flex; flex-direction: column;
  background: #F6EEDF; color: #2A1D16; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.45);
  transform-origin: bottom right; transform: scale(.94) translateY(8px); opacity: 0; visibility: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.1,1), opacity .25s, visibility 0s .3s; font-family: var(--sans, system-ui, sans-serif); }
.chat-panel.open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.chat-top { padding: 16px 18px; background: var(--tobacco, #2A1D16); color: var(--thread, #EFE3CC); display: flex; justify-content: space-between; align-items: center; }
.chat-top b { font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: 20px; }
.chat-top small { display: block; color: var(--thread-dim, #C9B99E); font-size: 12px; }
.chat-top button { background: none; border: 0; color: var(--thread, #EFE3CC); font-size: 26px; cursor: pointer; line-height: 1; padding: 4px 8px; }
.chat-log { flex: 1; padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; }
.chat-log .msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere;
  opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.chat-log .msg.show { opacity: 1; transform: none; }
.chat-log .msg.bot { background: #fff; border-bottom-left-radius: 4px; }
.chat-log .msg.me { background: #8A4F28; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-log .msg.typing { color: #8a7a62; }
.chat-log .msg.typing::after { content: "…"; animation: chat-dots 1.2s steps(4) infinite; display: inline-block; width: 1em; overflow: hidden; vertical-align: bottom; }
@keyframes chat-dots { from { width: 0; } to { width: 1em; } }
.chat-log a { color: inherit; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e3d6bf; }
.chat-input input { flex: 1; min-width: 0; border: 1px solid #d9c9ad; border-radius: 999px; padding: 10px 14px; font: 16px var(--sans, system-ui, sans-serif); background: #fff; color: #2A1D16; }
.chat-input button { border: 0; background: var(--tobacco, #2A1D16); color: var(--thread, #EFE3CC); border-radius: 999px; padding: 0 16px; font: 600 14px var(--sans, system-ui, sans-serif); cursor: pointer; }
.chat-input button:disabled { opacity: .5; cursor: default; }
.chat-foot { font-size: 11px; color: #8a7a62; text-align: center; padding: 0 12px 10px; }
@media (max-width: 520px) { .chat-launch { right: 14px; bottom: 14px; padding: 12px 16px 12px 13px; } .chat-panel { right: 16px; bottom: 76px; } }
