#advisor-chat { position: fixed; right: 20px; bottom: 20px; z-index: 1040; width: min(370px, calc(100vw - 24px)); font-size: 14px; }
#advisor-chat [hidden] { display: none !important; }
.advisor-chat-panel { display: flex; flex-direction: column; max-height: min(580px, calc(100dvh - 40px)); border: 1px solid #ddd0eb; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 10px 36px rgba(35, 18, 55, .22); }
.advisor-chat-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; background: #6f32b5; color: #fff; }
.advisor-chat-heading h2 { margin: 0; color: inherit; font-size: 16px; line-height: 1.4; }
.advisor-chat-tools { display: flex; flex: 0 0 auto; gap: 4px; }
.advisor-chat-heading button { border: 0; background: transparent; color: #fff; font-size: 24px; min-width: 36px; min-height: 36px; padding: 0 6px; cursor: pointer; }
.advisor-chat-launcher { width: 100%; background: #6f32b5; color: #fff; border: 0; padding: 14px 20px; border-radius: 24px; box-shadow: 0 5px 20px rgba(35, 18, 55, .2); cursor: pointer; font-weight: 700; }
.advisor-chat-intro { font-size: 12px; line-height: 1.5; margin: 0; padding: 12px 16px; color: #555; border-bottom: 1px solid #eee; }
.advisor-chat-log { flex: 1 1 auto; min-height: 120px; max-height: 290px; overflow-y: auto; overflow-anchor: none; overscroll-behavior: contain; padding: 16px; background: #faf8fc; }
#advisor-chat.advisor-chat-large { width: min(1100px, calc(100vw - 40px)); }
.advisor-chat-large .advisor-chat-panel { height: calc(100dvh - 40px); max-height: none; }
.advisor-chat-large .advisor-chat-log { min-height: 0; max-height: none; }
.advisor-chat-large .advisor-chat-heading, .advisor-chat-large .advisor-chat-intro { flex: 0 0 auto; }
.advisor-chat-message { border-radius: 10px; margin-bottom: 12px; padding: 10px 12px; overflow-wrap: anywhere; }
.advisor-chat-message p { margin: 4px 0 0; white-space: pre-wrap; line-height: 1.55; }
.advisor-chat-message strong { font-size: 11px; }
.advisor-chat-user { background: #eee4f8; margin-left: 22px; }
.advisor-chat-answer { background: #fff; border: 1px solid #e7e1ed; margin-right: 12px; }
.advisor-chat-empty, .advisor-chat-turn-error { font-size: 12px; color: #666; }
.advisor-chat-status, .advisor-chat-error { padding: 0 16px; margin: 8px 0; font-size: 12px; }
.advisor-chat-status { color: #57228f; }
.advisor-chat-error, .advisor-chat-turn-error { color: #9a3b20; }
.advisor-chat-status:empty, .advisor-chat-error:empty { display: none; }
.advisor-chat-form { flex: 0 0 auto; padding: 12px 16px 16px; border-top: 1px solid #eee; }
.advisor-chat-form label { display: block; font-size: 12px; margin-bottom: 6px; }
.advisor-chat-form textarea { width: 100%; resize: vertical; min-height: 60px; max-height: 130px; border: 1px solid #cfc3dc; border-radius: 8px; padding: 8px 10px; font: inherit; }
.advisor-chat-form button { margin-top: 8px; background: #6f32b5; border-color: #6f32b5; padding: 8px 18px; }
#advisor-chat :focus-visible { outline: 2px solid #6f32b5; outline-offset: 3px; }
.advisor-chat-heading button:focus-visible { outline-color: #fff !important; }
@media (max-width: 480px) {
	#advisor-chat { right: 12px; bottom: 12px; }
	.advisor-chat-panel { max-height: calc(100dvh - 24px); }
	.advisor-chat-log { max-height: 240px; }
	#advisor-chat.advisor-chat-large { width: calc(100vw - 24px); }
	.advisor-chat-large .advisor-chat-panel { height: calc(100dvh - 24px); }
	.advisor-chat-large .advisor-chat-log { max-height: none; }
}
@media (max-height: 480px) {
	.advisor-chat-intro { display: none; }
	.advisor-chat-log { min-height: 40px; }
	.advisor-chat-form { padding: 8px 16px; }
	.advisor-chat-form textarea { max-height: 80px; }
}
