.hf-ai-chat {
	--hf-ink: #122b3f;
	--hf-navy: #143d5a;
	--hf-accent: #087167;
	--hf-line: #cbd9df;
	position: fixed;
	z-index: 1000;
	bottom: max(16px, env(safe-area-inset-bottom));
	right: max(16px, env(safe-area-inset-right));
	color: var(--hf-ink);
	font: 400 15px/1.45 "Inter", system-ui, sans-serif;
}
.hf-ai-chat *, .hf-ai-chat *::before, .hf-ai-chat *::after { box-sizing: border-box; }
.hf-ai-chat .hf-chat-launch {
	display: block;
	margin-left: auto;
	width: fit-content;
	padding: .8rem 1.15rem;
	color: #fff;
	background: var(--hf-navy);
	border: 1px solid #fff;
	border-radius: 2rem;
	cursor: pointer;
	font-weight: 700;
	box-shadow: 0 5px 24px #122b3f33;
}
.hf-chat-launch::-webkit-details-marker { display: none; }
.hf-chat-launch::after { content: ' ＋'; }
.hf-ai-chat[open] .hf-chat-launch::after { content: ' −'; }
.hf-ai-chat .hf-chat-panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + .65rem);
	display: flex;
	flex-direction: column;
	width: min(24rem, calc(100vw - 32px));
	max-height: min(620px, calc(100dvh - 90px));
	overflow: auto;
	background: #fff;
	border: 1px solid var(--hf-line);
	border-radius: 1rem;
	box-shadow: 0 12px 42px #122b3f33;
}
.hf-ai-chat:not([open]) .hf-chat-panel { display: none; }
.hf-chat-header { background: var(--hf-navy); padding: .85rem 1rem; color: #fff; }
.hf-ai-chat .hf-chat-header h2 { color: #fff; margin: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.hf-ai-chat .hf-chat-header p { margin: .25rem 0 0; font-size: .82rem; }
.hf-chat-messages { min-height: 5rem; max-height: 18rem; overflow-y: auto; padding: .8rem; }
.hf-ai-chat .hf-chat-message { background: #edf4f6; margin: 0 0 .5rem; padding: .6rem .75rem; border-radius: .75rem; overflow-wrap: anywhere; }
.hf-chat-message p { white-space: pre-wrap; margin: 0; }
.hf-ai-chat .hf-chat-visitor { background: #dcf2eb; margin-left: 1rem; }
.hf-chat-message ul { margin: .45rem 0 0; padding-left: 1.15rem; }
.hf-ai-chat .hf-chat-note { padding: 0 .85rem; margin: .35rem 0; font-size: .78rem; }
.hf-ai-chat form { border-top: 1px solid var(--hf-line); padding: .65rem .85rem; margin: 0; }
.hf-ai-chat label { font-weight: 650; font-size: .83rem; }
.hf-chat-input { display: flex; gap: .45rem; margin-top: .3rem; }
.hf-ai-chat input {
	flex: 1;
	min-width: 0;
	width: auto;
	border: 1px solid #6b828e;
	border-radius: .4rem;
	padding: .55rem;
	font: inherit;
	color: var(--hf-ink);
	background: #fff;
}
.hf-ai-chat button { background: var(--hf-accent); color: #fff; border: 0; border-radius: .4rem; padding: .55rem .75rem; font: inherit; font-weight: 700; cursor: pointer; }
.hf-ai-chat button:disabled { opacity: .65; cursor: wait; }
.hf-ai-chat a { color: #075b54; text-decoration: underline; }
.hf-chat-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .5rem; border-top: 1px solid var(--hf-line); padding: .6rem .85rem; font-size: .8rem; }
.hf-ai-chat :focus-visible { outline: 2px solid #065e9b; outline-offset: 3px; }
