#pola-chat-root {
  --pola-terra: #B96F57;
  --pola-terra-dark: #9F5E49;
  --pola-cream: #fffaf4;
  --pola-text: #3f302b;
  position: fixed;
  right: 22px;
  bottom: 105px;
  z-index: 2147483000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
}
#pola-chat-root *, #pola-chat-root *::before, #pola-chat-root *::after { box-sizing: border-box; }
#pola-chat-toggle {
  min-width: 94px;
  height: 48px;
  padding: 0 16px 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--pola-terra);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(50, 33, 27, .22);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
#pola-chat-toggle:hover { background: var(--pola-terra-dark); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(50,33,27,.28); }
#pola-chat-toggle:focus-visible, #pola-chat-close:focus-visible, #pola-chat-send:focus-visible, #pola-chat-input:focus-visible { outline: 3px solid rgba(185,111,87,.28); outline-offset: 2px; }
.pola-dog { font-size: 24px; line-height: 1; }
#pola-chat-panel {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: min(340px, calc(100vw - 28px));
  height: min(470px, calc(100vh - 190px));
  min-height: 330px;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(63,48,43,.10);
  box-shadow: 0 18px 55px rgba(38,28,24,.22);
}
#pola-chat-panel[hidden] { display: none !important; }
.pola-chat-header {
  height: 58px;
  padding: 0 14px;
  background: var(--pola-terra);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pola-chat-header strong { display: block; font-size: 17px; line-height: 1.1; }
.pola-chat-header small { display: block; margin-top: 2px; opacity: .9; font-size: 11px; }
#pola-chat-close {
  border: 0;
  background: transparent;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
#pola-chat-close:hover { background: rgba(255,255,255,.14); }
.pola-chat-messages {
  height: calc(100% - 122px);
  padding: 12px;
  overflow-y: auto;
  background: var(--pola-cream);
  overscroll-behavior: contain;
}
.pola-msg { display: flex; margin: 8px 0; }
.pola-msg-user { justify-content: flex-end; }
.pola-msg-bot { justify-content: flex-start; }
.pola-bubble {
  max-width: 84%;
  padding: 9px 11px;
  border-radius: 14px;
  word-break: break-word;
  white-space: normal;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
.pola-msg-bot .pola-bubble { background: #fff; color: var(--pola-text); border-bottom-left-radius: 5px; }
.pola-msg-user .pola-bubble { background: #e8d7cf; color: #332621; border-bottom-right-radius: 5px; }
.pola-waiting .pola-bubble { opacity: .7; font-style: italic; }
.pola-chat-form {
  height: 64px;
  padding: 8px;
  display: flex;
  gap: 7px;
  align-items: center;
  background: #fff;
  border-top: 1px solid rgba(63,48,43,.08);
}
#pola-chat-input {
  flex: 1;
  min-width: 0;
  height: 43px;
  padding: 0 12px;
  border: 1px solid #d9d0ca;
  border-radius: 12px;
  background: #fff;
  color: var(--pola-text);
  font-size: 14px;
  box-shadow: none;
}
#pola-chat-input::placeholder { color: #9b8e87; }
#pola-chat-send {
  height: 43px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--pola-terra);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
#pola-chat-send:hover { background: var(--pola-terra-dark); }
#pola-chat-send:disabled { opacity: .55; cursor: wait; }
@media (max-width: 520px) {
  #pola-chat-root { right: 12px; bottom: 94px; }
  #pola-chat-panel { width: calc(100vw - 24px); height: min(440px, calc(100vh - 180px)); }
  #pola-chat-toggle { min-width: 86px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  #pola-chat-toggle { transition: none; }
}
