/* Home widget rules, with kit variables resolved to self-contained values. */
  .chat { position: fixed; right: 24px; bottom: 24px; z-index: 21; width: 380px; max-width: calc(100vw - 24px); max-height: min(620px, calc(100svh - 48px)); display: flex; flex-direction: column; overflow: hidden; background: #ffffff; color: #111111; border: 1px solid #d9d9d9; border-radius: 16px; box-shadow: 0 24px 64px -24px rgb(0 0 0 / .45); font: 400 15px/1.45 "Onest", system-ui, sans-serif; letter-spacing: 0; }
  .chat[hidden] { display: none; }
  .chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #e6e6e6; }
  .chat-x { padding: 0; width: 44px; height: 44px; margin: -10px -10px -10px 0; border: 0; background: none; color: #111111; font-size: 24px; line-height: 1; cursor: pointer; }
  .chat-log { flex: 1; min-height: 140px; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; background: #f4f4f4; }
  .msg { max-width: 86%; padding: 8px 12px; border-radius: 12px; background: #ffffff; border: 1px solid #e6e6e6; align-self: flex-start; }
  .msg.me { align-self: flex-end; background: #1a4be0; border-color: #1a4be0; color: #ffffff; }
  .msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
  .msg time { display: block; margin-top: 3px; font-size: 12px; opacity: .7; }
  .chat-hint { margin: 0; padding: 8px 16px 0; font-size: 13px; color: #6b6b6b; overflow-wrap: anywhere; }
  .chat-err { margin: 0; padding: 6px 16px 0; font-size: 13px; color: #a11b12; }
  .chat-form { display: flex; gap: 8px; padding: 12px 16px 16px; align-items: flex-end; }
  .chat-form textarea { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #cfcfcf; border-radius: 10px; font: inherit; resize: none; }
  .chat-form button { height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: #1a4be0; color: #ffffff; font: 500 15px/1 "Onest", system-ui, sans-serif; cursor: pointer; }
  @media (max-width: 639px) { .chat { right: 12px; bottom: 12px; } }

/* Standalone conversation and internal conversation reader. */
.chat.full { position: static; width: 100%; max-width: none; max-height: none; margin-top: 24px; box-shadow: none; }
.chat.full .chat-log { min-height: 260px; max-height: 55vh; }
.chat-page h1 { color: #111111; }
.chat-fab { position: fixed; right: 24px; bottom: 24px; z-index: 20; min-height: 44px; padding: 0 24px; border: 0; border-radius: 8px; background: #1a4be0; color: #ffffff; font: 500 15px/1 "Onest", system-ui, sans-serif; cursor: pointer; }
.chat-x:hover { background: #f4f4f4; }
.chat-form textarea { min-height: 44px; }
.chat :focus-visible { outline: 3px solid #1a4be0; outline-offset: 2px; }
@media print { .chat, .chat-fab { display: none !important; } }
