.nsfc-root {
	--nsfc-navy: #293652;
	--nsfc-navy-2: #365f8e;
	--nsfc-accent: #d99a3e;
	--nsfc-green: #65cf72;
	--nsfc-text: #263548;
	--nsfc-muted: #8c97a3;
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 2147482000;
	color: var(--nsfc-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	box-sizing: border-box;
}

.nsfc-root *,
.nsfc-root *::before,
.nsfc-root *::after {
	box-sizing: border-box;
}

.nsfc-root [hidden] {
	display: none !important;
}

.nsfc-launcher {
	position: absolute;
	right: 0;
	bottom: 0;
	display: grid;
	place-items: center;
	width: 62px;
	height: 62px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--nsfc-navy-2), var(--nsfc-navy));
	color: #fff;
	box-shadow: 0 14px 34px rgba(25, 47, 73, .32);
	cursor: pointer;
	transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
}

.nsfc-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 17px 38px rgba(25, 47, 73, .4);
}

.nsfc-is-open .nsfc-launcher {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

.nsfc-launcher:focus-visible,
.nsfc-root button:focus-visible,
.nsfc-root textarea:focus-visible {
	outline: 3px solid rgba(217, 154, 62, .44);
	outline-offset: 2px;
}

.nsfc-launcher-icon svg {
	width: 29px;
	height: 29px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.nsfc-unread {
	position: absolute;
	top: -4px;
	right: -3px;
	min-width: 22px;
	height: 22px;
	padding: 2px 6px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: #dc3b3b;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
}

.nsfc-teaser {
	position: absolute;
	right: 0;
	bottom: 78px;
	width: 330px;
	padding: 18px 20px 17px;
	overflow: hidden;
	border: 1px solid rgba(41, 54, 82, .1);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 18px 46px rgba(27, 47, 68, .19);
	animation: nsfc-rise .25s ease-out;
}

.nsfc-teaser::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 5px;
	height: 100%;
	background: var(--nsfc-green);
	content: "";
}

.nsfc-teaser::after {
	position: absolute;
	right: 24px;
	bottom: -8px;
	width: 16px;
	height: 16px;
	background: #fff;
	content: "";
	transform: rotate(45deg);
}

.nsfc-teaser strong {
	display: block;
	margin-bottom: 7px;
	color: var(--nsfc-navy);
	font-size: 16px;
}

.nsfc-teaser p {
	display: -webkit-box;
	overflow: hidden;
	margin: 0 25px 13px 0;
	color: #465466;
	font-size: 14px;
	line-height: 1.45;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
}

.nsfc-teaser-close {
	position: absolute;
	top: 8px;
	right: 9px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #86909b;
	font-size: 24px;
	line-height: 24px;
	cursor: pointer;
}

.nsfc-teaser-action {
	position: relative;
	z-index: 1;
	padding: 9px 15px;
	border: 1px solid var(--nsfc-navy-2);
	border-radius: 999px;
	background: #fff;
	color: var(--nsfc-navy-2);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.nsfc-panel {
	position: absolute;
	right: 0;
	bottom: 0;
	display: flex;
	visibility: hidden;
	flex-direction: column;
	width: 396px;
	height: min(640px, calc(100dvh - 48px));
	min-height: 440px;
	padding: 0 !important;
	overflow: hidden;
	border: 1px solid rgba(32, 48, 73, .13);
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 24px 65px rgba(25, 48, 75, .28);
	opacity: 0;
	transform: translateY(14px) scale(.98);
	transform-origin: bottom right;
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.nsfc-panel.is-open {
	visibility: visible;
	opacity: 1;
	transform: translateY(0) scale(1);
}

.nsfc-header {
	position: relative;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	min-height: 94px;
	padding: 17px 19px;
	overflow: hidden;
	background-color: var(--nsfc-navy);
	background-image:
		radial-gradient(circle at 22px 21px, rgba(255, 255, 255, .045) 0 3px, transparent 4px),
		linear-gradient(135deg, rgba(255, 255, 255, .015), rgba(0, 0, 0, .08));
	background-size: 46px 46px, auto;
	color: #fff;
}

.nsfc-header::after {
	position: absolute;
	top: -44px;
	right: -44px;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: #61c957;
	content: "";
}

.nsfc-avatar {
	position: relative;
	z-index: 1;
	display: grid;
	flex: 0 0 56px;
	place-items: center;
	width: 56px;
	height: 56px;
	margin-right: 14px;
	border: 2px solid rgba(255, 255, 255, .38);
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 24px;
	font-weight: 800;
	overflow: hidden;
}

.nsfc-avatar-photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nsfc-header-copy {
	position: relative;
	z-index: 1;
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	text-align: left !important;
}

.nsfc-header-copy strong {
	overflow: hidden;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: .1px;
	text-align: left !important;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nsfc-header-copy small {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	color: rgba(255, 255, 255, .84);
	font-size: 13px;
	text-align: left !important;
}

.nsfc-header-copy i {
	width: 9px;
	height: 9px;
	margin-right: 7px;
	border-radius: 50%;
	background: var(--nsfc-green);
	box-shadow: 0 0 0 4px rgba(101, 207, 114, .17);
}

.nsfc-minimize {
	position: relative;
	z-index: 2;
	display: grid;
	flex: 0 0 42px;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0 0 5px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 29px;
	line-height: 1;
	cursor: pointer;
}

.nsfc-messages {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 13px;
	min-height: 0;
	overflow-y: auto;
	padding: 24px 18px 18px;
	background: #fff;
	scroll-behavior: smooth;
	overscroll-behavior: contain;
}

.nsfc-message {
	display: flex;
	max-width: 84%;
}

.nsfc-bubble {
	padding: 12px 15px;
	border-radius: 17px;
	font-size: 14.5px;
	line-height: 1.5;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	box-shadow: 0 3px 10px rgba(31, 49, 70, .08);
}

.nsfc-operator {
	align-self: flex-start;
}

.nsfc-operator .nsfc-bubble {
	border-bottom-left-radius: 5px;
	background: #f0f2f4;
	color: #273445;
}

.nsfc-visitor {
	align-self: flex-end;
}

.nsfc-visitor .nsfc-bubble {
	border-bottom-right-radius: 5px;
	background: var(--nsfc-navy-2);
	color: #fff;
}

.nsfc-message-pending .nsfc-bubble {
	opacity: .78;
}

.nsfc-message-failed .nsfc-bubble {
	background: #6f7884;
}

.nsfc-send-status {
	display: block;
	margin-top: 5px;
	color: rgba(255, 255, 255, .8);
	font-size: 10.5px;
	font-weight: 500;
	line-height: 1.2;
	text-align: right;
}

.nsfc-system {
	align-self: center;
	max-width: 100%;
}

.nsfc-system .nsfc-bubble {
	padding: 7px 11px;
	background: #f1f3f5;
	color: #6f7a85;
	font-size: 12px;
	box-shadow: none;
}

.nsfc-quick {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 16px 9px;
	border-top: 1px solid #edf0f3;
	background: #fff;
}

.nsfc-quick button {
	flex: 0 1 auto;
	padding: 8px 14px;
	border: 1px solid #5dbb5f;
	border-radius: 999px;
	background: #fff;
	color: #399844;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	cursor: pointer;
}

.nsfc-quick button:hover {
	background: #f1fbf2;
}

.nsfc-messengers {
	flex: 0 0 auto;
	margin: 0;
	padding: 13px 14px 14px;
	border-top: 1px solid #edf0f3;
	background: #f8fafc;
}

.nsfc-messengers p {
	margin: 0 0 10px;
	color: #536173;
	font-size: 13px;
	line-height: 1.45;
	text-align: left;
}

.nsfc-messenger-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 7px;
}

.nsfc-messenger-link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 7px 8px;
	border: 1px solid #d8e0e8;
	border-radius: 10px;
	background: #fff;
	color: #273445;
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none !important;
	transition: transform .15s ease, box-shadow .15s ease;
}

.nsfc-messenger-link:hover {
	transform: translateY(-1px);
	box-shadow: 0 5px 14px rgba(31, 49, 70, .12);
}

.nsfc-messenger-telegram { color: #2587c8; }
.nsfc-messenger-whatsapp { color: #239b56; }
.nsfc-messenger-max { color: #6d4ee8; }
.nsfc-messenger-vk { color: #2877f0; }

.nsfc-error {
	flex: 0 0 auto;
	padding: 8px 15px;
	background: #fff4df;
	color: #805a16;
	font-size: 12px;
	line-height: 1.35;
}

.nsfc-form {
	display: flex;
	flex: 0 0 auto;
	align-items: flex-end;
	gap: 10px;
	padding: 10px 14px 6px;
	border-top: 1px solid #e4e8ed;
	background: #fff;
}

.nsfc-form textarea {
	flex: 1;
	min-width: 0;
	min-height: 46px;
	max-height: 112px;
	resize: none;
	padding: 12px 16px;
	border: 1px solid #d3dbe4;
	border-radius: 23px;
	background: #fff;
	color: var(--nsfc-text);
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
}

.nsfc-form textarea::placeholder {
	color: #959faa;
}

.nsfc-form button {
	display: grid;
	flex: 0 0 46px;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--nsfc-accent);
	color: #fff;
	cursor: pointer;
}

.nsfc-form button:disabled {
	cursor: wait;
	opacity: .55;
}

.nsfc-form button svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.9;
}

.nsfc-note {
	flex: 0 0 auto;
	padding: 1px 12px 10px;
	background: #fff;
	color: var(--nsfc-muted);
	font-size: 11px;
	text-align: center;
}

@keyframes nsfc-rise {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 640px) {
	html.nsfc-chat-open,
	body.nsfc-chat-open {
		overflow: hidden !important;
		overscroll-behavior: none;
	}

	.nsfc-root {
		right: 12px;
		bottom: calc(96px + env(safe-area-inset-bottom));
	}

	.nsfc-launcher {
		width: 58px;
		height: 58px;
	}

	.nsfc-teaser {
		right: 0;
		bottom: 72px;
		width: min(330px, calc(100vw - 24px));
	}

	.nsfc-panel {
		position: fixed;
		top: var(--nsfc-mobile-top, 0);
		right: auto;
		bottom: auto;
		left: 0;
		width: 100vw;
		height: min(var(--nsfc-mobile-height, 100dvh), 100dvh);
		min-height: 0;
		max-height: 100dvh;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		transform: translateY(18px);
		transform-origin: bottom center;
	}

	.nsfc-panel.is-open {
		transform: translateY(0);
	}

	.nsfc-header {
		min-height: calc(84px + env(safe-area-inset-top));
		padding: calc(13px + env(safe-area-inset-top)) 16px 13px;
	}

	.nsfc-avatar {
		flex-basis: 52px;
		width: 52px;
		height: 52px;
		margin-right: 13px;
		font-size: 22px;
	}

	.nsfc-header-copy {
		gap: 4px;
	}

	.nsfc-header-copy strong {
		font-size: 18px;
	}

	.nsfc-messages {
		padding: 20px 16px 15px;
	}

	.nsfc-message {
		max-width: 88%;
	}

	.nsfc-bubble {
		font-size: 15px;
		line-height: 1.5;
	}

	.nsfc-quick {
		padding: 9px 14px 8px;
	}

	.nsfc-quick button {
		padding: 9px 14px;
		font-size: 14px;
	}

	.nsfc-form {
		padding: 9px 12px 5px;
	}

	.nsfc-form textarea {
		min-height: 46px;
		padding: 11px 15px;
		font-size: 16px;
	}

	.nsfc-note {
		padding-bottom: calc(8px + env(safe-area-inset-bottom));
	}

	.nsfc-messengers {
		padding: 11px 12px 12px;
	}
}

@media (min-width: 641px) and (max-width: 900px) and (min-height: 521px) {
	.nsfc-root {
		right: 20px;
		bottom: 20px;
	}

	.nsfc-panel {
		width: 420px;
		height: min(680px, calc(100dvh - 40px));
	}
}

@media (max-width: 640px) and (max-height: 520px) {
	.nsfc-header {
		min-height: 66px;
		padding-top: 8px;
		padding-bottom: 8px;
	}

	.nsfc-avatar {
		flex-basis: 44px;
		width: 44px;
		height: 44px;
		font-size: 19px;
	}

	.nsfc-quick,
	.nsfc-note {
		display: none;
	}

	.nsfc-messengers p {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nsfc-panel,
	.nsfc-launcher,
	.nsfc-teaser {
		animation: none;
		transition: none;
	}
}

/* 0.1.22: isolate typography from the theme and fit short viewports. */
.nsfc-root { text-align: left; }
.nsfc-bubble { text-align: left; }
.nsfc-message { flex-shrink: 0; }
.nsfc-panel { min-height: 0; }
.nsfc-header-copy strong { white-space: normal; line-height: 1.2; }
.nsfc-header-copy i { display: none; }
.nsfc-restart { margin: 8px 14px; padding: 10px; border: 1px solid #365f8e; border-radius: 12px; background: white; color: #365f8e; cursor: pointer; flex-shrink: 0; }
@media (min-width: 641px) and (max-height: 520px) {
 .nsfc-header { min-height: 64px; padding: 8px 14px; }
 .nsfc-avatar { width: 40px; height: 40px; flex-basis: 40px; }
 .nsfc-quick, .nsfc-note { display: none; }
 .nsfc-messengers { padding: 8px 10px 9px; }
 .nsfc-messengers p { display: none; }
 .nsfc-messenger-link { min-height: 34px; padding: 5px 7px; }
}

@media (max-width: 380px) {
	.nsfc-header {
		min-height: calc(78px + env(safe-area-inset-top));
		padding-right: 12px;
		padding-left: 12px;
	}

	.nsfc-avatar {
		flex-basis: 44px;
		width: 44px;
		height: 44px;
		margin-right: 10px;
		font-size: 19px;
	}

	.nsfc-header-copy strong {
		font-size: 16px;
		white-space: nowrap;
	}

	.nsfc-header-copy small {
		font-size: 12px;
	}

	.nsfc-minimize {
		flex-basis: 38px;
		width: 38px;
		height: 38px;
	}
}
