.chat-launcher{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));min-height:48px;z-index:10;box-shadow:0 5px 20px #2a173855}
.site-chat{box-sizing:border-box;width:min(430px,calc(100% - 24px));max-height:calc(100dvh - 32px);margin:auto 16px 16px auto;border:1px solid #dfc8e5;border-radius:20px;background:#fffaff;color:#28162f;padding:20px}
.site-chat::backdrop{background:#28162f40}
.site-chat-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.site-chat-heading h2{margin:0;font-size:1.5rem}.site-chat-heading button{padding:6px 13px}
.site-chat-topics,.site-chat form{display:flex;flex-wrap:wrap;gap:8px}.site-chat-topics button{padding:7px 12px;font-size:.9rem}.site-chat form input{flex:1 1 180px;width:auto;min-width:0}
.site-chat [role=log]{max-height:28dvh;overflow:auto;margin-block:12px}.site-chat [role=log] p{background:#f3e7f6;border-radius:12px;padding:10px 12px;margin:7px 0}.site-chat .muted{margin:8px 0}
body > footer{padding-bottom:88px}
.site-chat-heading h2{font-size:clamp(1.1rem,4vw,1.35rem);line-height:1.2}
.site-chat-heading button{flex:none}

.chat-ki { display: inline-block; font-weight: 900; }

@media (prefers-reduced-motion: no-preference) {
  .chat-launcher .chat-ki { animation: chat-ki-spin 10s ease-in-out 2s infinite; }
  @keyframes chat-ki-spin {
    0% { transform: rotate(0deg); }
    10%, 100% { transform: rotate(360deg); }
  }
}
