.fpschat-root {
	--fpschat-orange: #ff4d1c;
	--fpschat-orange-2: #ff7a3d;
	--fpschat-ink: #1c1917;
	--fpschat-muted: #78716c;
	--fpschat-line: rgba(28, 25, 23, 0.08);
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99990;
	font-family: "Manrope", "Segoe UI", sans-serif;
	color: var(--fpschat-ink);
	line-height: 1.45;
}

.fpschat-launch {
	position: relative;
	width: 64px;
	height: 64px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	color: #fff;
	background: linear-gradient(160deg, var(--fpschat-orange-2), var(--fpschat-orange) 55%, #e23100);
	box-shadow: 0 12px 28px rgba(255, 77, 28, 0.38);
	display: grid;
	place-items: center;
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.fpschat-launch::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid rgba(255, 77, 28, 0.45);
	animation: fpschat-ring 2.4s ease-out infinite;
	pointer-events: none;
}

.fpschat-launch:hover {
	transform: translateY(-2px) scale(1.05);
	box-shadow: 0 16px 34px rgba(255, 77, 28, 0.46);
}

.fpschat-launch svg {
	width: 28px;
	height: 28px;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.fpschat-root.is-open .fpschat-launch svg {
	transform: rotate(90deg) scale(0.86);
}

.fpschat-root.is-open .fpschat-launch::after {
	animation: none;
	opacity: 0;
}

.fpschat-panel {
	position: absolute;
	right: 0;
	bottom: 78px;
	width: min(380px, calc(100vw - 32px));
	height: min(600px, calc(100vh - 150px));
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 26px;
	overflow: hidden;
	box-shadow: 0 24px 70px rgba(28, 20, 14, 0.22), 0 2px 8px rgba(28, 20, 14, 0.06);
	transform-origin: right bottom;
	opacity: 0;
	pointer-events: none;
	transform: translate3d(10px, 42px, 0) scale(0.16, 0.05);
	transition: transform 0.62s cubic-bezier(0.22, 0.85, 0.2, 1), opacity 0.45s ease;
}

.fpschat-root.is-open .fpschat-panel {
	opacity: 1;
	pointer-events: auto;
	transform: none;
}

.fpschat-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 18px 16px;
	color: #fff;
	background:
		radial-gradient(120px 80px at 12% 120%, rgba(255, 255, 255, 0.18), transparent 70%),
		radial-gradient(160px 90px at 90% -20%, rgba(255, 255, 255, 0.22), transparent 70%),
		linear-gradient(135deg, #ff7a3d, #ff4d1c 48%, #f03a00);
}

.fpschat-head::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: repeating-linear-gradient(-18deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 14px);
	opacity: 0.45;
	pointer-events: none;
}

.fpschat-mark,
.fpschat-close,
.fpschat-send {
	position: relative;
	z-index: 1;
}

.fpschat-mark {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(8px);
	flex: none;
}

.fpschat-mark svg {
	width: 22px;
	height: 22px;
}

.fpschat-titles {
	position: relative;
	z-index: 1;
	min-width: 0;
	flex: 1;
}

.fpschat-titles strong {
	display: block;
	font-size: 16px;
	letter-spacing: 0.04em;
}

.fpschat-status {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.88);
}

.fpschat-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #b6f5c6;
	box-shadow: 0 0 0 0 rgba(182, 245, 198, 0.8);
	animation: fpschat-dot 1.8s ease-out infinite;
}

.fpschat-close {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
}

.fpschat-close:hover {
	background: rgba(255, 255, 255, 0.28);
}

.fpschat-log {
	flex: 1;
	overflow: auto;
	padding: 18px 16px 8px;
	background:
		radial-gradient(circle at 0 0, rgba(255, 77, 28, 0.05), transparent 32%),
		#f7f4f1;
}

.fpschat-row {
	display: flex;
	margin-bottom: 10px;
	animation: fpschat-msg 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.fpschat-row.me {
	justify-content: flex-end;
}

.fpschat-bubble {
	max-width: 84%;
	padding: 10px 13px 8px;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(28, 20, 14, 0.05);
}

.fpschat-row.me .fpschat-bubble {
	color: #fff;
	background: linear-gradient(160deg, #ff7a3d, #ff4d1c);
	border-bottom-right-radius: 6px;
}

.fpschat-row.op .fpschat-bubble {
	border-bottom-left-radius: 6px;
}

.fpschat-who {
	display: block;
	margin-bottom: 2px;
	font-size: 12px;
	font-weight: 700;
	color: var(--fpschat-orange);
}

.fpschat-row.me .fpschat-who {
	color: rgba(255, 255, 255, 0.82);
}

.fpschat-text {
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 14.5px;
}

.fpschat-text a {
	color: var(--fpschat-orange);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.fpschat-time {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	text-align: right;
	color: var(--fpschat-muted);
}

.fpschat-row.me .fpschat-time {
	color: rgba(255, 255, 255, 0.75);
}

.fpschat-form {
	display: flex;
	gap: 8px;
	align-items: flex-end;
	padding: 12px;
	background: #fff;
	border-top: 1px solid var(--fpschat-line);
}

.fpschat-form textarea {
	flex: 1;
	resize: none;
	max-height: 120px;
	border: 1px solid transparent;
	border-radius: 16px;
	padding: 12px 14px;
	background: #f6f3f0;
	color: inherit;
	font: inherit;
	font-size: 14.5px;
	outline: none;
}

.fpschat-form textarea:focus {
	border-color: rgba(255, 77, 28, 0.45);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(255, 77, 28, 0.12);
}

.fpschat-send {
	width: 46px;
	height: 46px;
	flex: none;
	border: 0;
	border-radius: 16px;
	cursor: pointer;
	color: #fff;
	background: linear-gradient(160deg, var(--fpschat-orange-2), var(--fpschat-orange));
	display: grid;
	place-items: center;
	transition: transform 0.2s ease;
}

.fpschat-send:hover {
	transform: translateY(-1px) scale(1.04);
}

.fpschat-send svg {
	width: 20px;
	height: 20px;
}

@keyframes fpschat-ring {
	0% { transform: scale(0.92); opacity: 0.7; }
	100% { transform: scale(1.18); opacity: 0; }
}

@keyframes fpschat-dot {
	0% { box-shadow: 0 0 0 0 rgba(182, 245, 198, 0.7); }
	100% { box-shadow: 0 0 0 8px rgba(182, 245, 198, 0); }
}

@keyframes fpschat-msg {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
	.fpschat-root {
		right: 14px;
		bottom: 16px;
	}
	.fpschat-panel {
		position: fixed;
		left: 10px;
		right: 10px;
		bottom: 88px;
		width: auto;
		height: min(640px, calc(100dvh - 112px));
		max-height: calc(100dvh - 112px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.fpschat-launch,
	.fpschat-launch::after,
	.fpschat-panel,
	.fpschat-row,
	.fpschat-dot,
	.fpschat-send {
		animation: none;
		transition: none;
	}
}
.fpschat-mark {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	padding: 0;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.fpschat-mark img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fpschat-lead {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 6px;
	padding: 8px 12px 0;
	background: #fff;
}

.fpschat-lead input {
	width: 100%;
	min-width: 0;
	border: 1px solid rgba(28, 25, 23, 0.08);
	border-radius: 12px;
	padding: 8px 10px;
	background: #f6f3f0;
	color: inherit;
	font: inherit;
	font-size: 13px;
	outline: none;
}

.fpschat-lead input:focus {
	border-color: rgba(255, 77, 28, 0.45);
	background: #fff;
}

@media (max-width: 420px) {
	.fpschat-lead {
		grid-template-columns: 1fr;
	}
}

.fpschat-log{min-height:0;}

.fpschat-head,
.fpschat-lead,
.fpschat-form {
	flex-shrink: 0;
}
.fpschat-form textarea {
	height: 46px;
	min-height: 46px;
}


.fpschat-lead {
	display: none;
}
.fpschat-lead.is-on {
	display: grid;
	animation: fpschat-msg 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.fpschat-lead-title {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 13px;
	color: var(--fpschat-muted);
}

.fpschat-log {
	display: flex;
	flex-direction: column;
}
.fpschat-log::before {
	content: "";
	flex: 1 0 auto;
}


.fpschat-bubble .fpschat-lead.is-on {
	grid-template-columns: 1fr;
	padding: 2px 0 0;
	background: transparent;
	gap: 8px;
	animation: none;
}
.fpschat-lead-row .fpschat-bubble {
	width: min(100%, 280px);
}
.fpschat-lead input.bad {
	border-color: #e11d48;
	background: #fff5f5;
}
.fpschat-lead-err {
	margin: 0;
	min-height: 0;
	font-size: 12px;
	line-height: 1.3;
	color: #e11d48;
}
.fpschat-lead-err:empty {
	display: none;
}
.fpschat-lead button {
	border: 0;
	border-radius: 12px;
	background: #ff4d1c;
	color: #fff;
	padding: 9px 12px;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}
