.dtc-fc {
	--dtc-fc-blue: #2563eb;
	--dtc-fc-blue-dark: #1d4ed8;
	--dtc-fc-blue-soft: #eff6ff;
	--dtc-fc-border: #dbe4f0;
	--dtc-fc-text: #0f172a;
	--dtc-fc-muted: #64748b;
	color: var(--dtc-fc-text);
	font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Arial, sans-serif;
	line-height: 1.5;
	position: fixed;
	right: 22px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 90;
}

.dtc-fc,
.dtc-fc *,
.dtc-fc *::before,
.dtc-fc *::after {
	box-sizing: border-box;
}

.dtc-fc__rail {
	align-items: center;
	background: #fff;
	border: 1px solid var(--dtc-fc-border);
	border-radius: 16px;
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.13);
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 6px;
}

.dtc-fc__item {
	position: relative;
}

.dtc-fc__action,
.dtc-fc__toggle {
	align-items: center;
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 12px;
	color: var(--dtc-fc-blue);
	cursor: pointer;
	display: inline-flex;
	height: 48px;
	justify-content: center;
	margin: 0;
	padding: 0;
	position: relative;
	transition: background-color 170ms ease, color 170ms ease, transform 170ms ease;
	width: 48px;
}

.dtc-fc__action:hover,
.dtc-fc__action:focus-visible,
.dtc-fc__toggle:hover,
.dtc-fc__toggle:focus-visible {
	background: var(--dtc-fc-blue-soft);
	color: var(--dtc-fc-blue-dark);
}

.dtc-fc__action:focus-visible,
.dtc-fc__toggle:focus-visible,
.dtc-fc__close:focus-visible,
.dtc-fc__account button:focus-visible,
.dtc-fc__primary-link:focus-visible {
	outline: 2px solid var(--dtc-fc-blue);
	outline-offset: 2px;
}

.dtc-fc__action img,
.dtc-fc__action svg {
	display: block;
	height: 24px;
	object-fit: contain;
	width: 24px;
}

.dtc-fc__action--wechat {
	color: #07c160;
}

.dtc-fc__action--qq {
	color: #12b7f5;
}

.dtc-fc__action--email {
	color: var(--dtc-fc-blue);
}

.dtc-fc__tip {
	background: var(--dtc-fc-blue-soft);
	border: 1px solid #bfdbfe;
	border-radius: 8px;
	color: #1e3a8a;
	font-size: 12px;
	font-weight: 600;
	opacity: 0;
	padding: 6px 10px;
	pointer-events: none;
	position: absolute;
	right: calc(100% + 10px);
	top: 50%;
	transform: translate(4px, -50%);
	transition: opacity 160ms ease, transform 160ms ease;
	white-space: nowrap;
}

.dtc-fc__action:hover .dtc-fc__tip,
.dtc-fc__action:focus-visible .dtc-fc__tip {
	opacity: 1;
	transform: translate(0, -50%);
}

.dtc-fc__item.is-open .dtc-fc__tip {
	opacity: 0;
}

.dtc-fc__popover {
	background: #fff;
	border: 1px solid var(--dtc-fc-border);
	border-radius: 16px;
	box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
	max-height: min(620px, calc(100vh - 48px));
	overflow-y: auto;
	padding: 18px;
	position: absolute;
	right: calc(100% + 14px);
	top: 50%;
	transform: translate(4px, -50%);
	width: 280px;
	z-index: 2;
}

.dtc-fc__popover.is-open {
	animation: dtc-fc-enter 170ms ease both;
}

@keyframes dtc-fc-enter {
	from {
		opacity: 0;
		transform: translate(8px, -50%);
	}
	to {
		opacity: 1;
		transform: translate(0, -50%);
	}
}

.dtc-fc__popover[hidden] {
	display: none;
}

.dtc-fc__close {
	align-items: center;
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: var(--dtc-fc-muted);
	cursor: pointer;
	display: inline-flex;
	font-size: 22px;
	height: 32px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: 8px;
	top: 8px;
	width: 32px;
}

.dtc-fc__close:hover {
	background: var(--dtc-fc-blue-soft);
	color: var(--dtc-fc-blue-dark);
}

.dtc-fc__kicker {
	color: var(--dtc-fc-blue);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	margin: 0 34px 3px 0;
}

.dtc-fc__popover h2 {
	color: var(--dtc-fc-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 10px;
}

.dtc-fc__qr {
	background: #fff;
	border: 1px solid var(--dtc-fc-border);
	border-radius: 12px;
	display: block;
	height: auto;
	margin: 4px auto 12px;
	max-width: 220px;
	width: 100%;
}

.dtc-fc__copy {
	color: var(--dtc-fc-muted);
	font-size: 13px;
	line-height: 1.6;
	margin: 0 0 12px;
}

.dtc-fc__account {
	align-items: center;
	background: #f8fafc;
	border: 1px solid #e8eef6;
	border-radius: 10px;
	display: grid;
	gap: 4px 8px;
	grid-template-columns: minmax(0, 1fr) auto;
	margin: 0 0 12px;
	padding: 10px 12px;
}

.dtc-fc__account span {
	color: var(--dtc-fc-muted);
	font-size: 11px;
	grid-column: 1 / -1;
}

.dtc-fc__account strong {
	color: var(--dtc-fc-text);
	font-size: 14px;
	font-weight: 600;
	min-width: 0;
	overflow-wrap: anywhere;
}

.dtc-fc__account button {
	appearance: none;
	background: #fff;
	border: 1px solid #bfdbfe;
	border-radius: 7px;
	color: var(--dtc-fc-blue);
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	min-height: 32px;
	padding: 4px 9px;
}

.dtc-fc__account button:hover {
	background: var(--dtc-fc-blue-soft);
}

.dtc-fc__primary-link {
	align-items: center;
	background: var(--dtc-fc-blue);
	border-radius: 8px;
	color: #fff !important;
	display: flex;
	font-size: 14px;
	font-weight: 600;
	justify-content: center;
	min-height: 40px;
	padding: 8px 12px;
	text-decoration: none !important;
	transition: background-color 170ms ease;
}

.dtc-fc__primary-link:hover {
	background: var(--dtc-fc-blue-dark);
	color: #fff !important;
}

.dtc-fc__toggle {
	background: #fff;
	border: 1px solid var(--dtc-fc-border);
	border-radius: 50%;
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
	display: none;
}

.dtc-fc.is-open .dtc-fc__toggle {
	background: var(--dtc-fc-blue-soft);
}

@media (hover: hover) and (pointer: fine) {
	.dtc-fc__action:hover {
		background: var(--dtc-fc-blue-soft);
	}
}

@media (max-width: 1365px) {
	.dtc-fc {
		align-items: flex-end;
		bottom: max(18px, calc(12px + env(safe-area-inset-bottom)));
		display: flex;
		flex-direction: column;
		right: 16px;
		top: auto;
		transform: none;
	}

	.dtc-fc__toggle {
		display: inline-flex;
	}

	.dtc-fc__rail {
		bottom: calc(100% + 10px);
		pointer-events: none;
		position: absolute;
		right: 0;
		transform: translateY(8px);
		transition: opacity 170ms ease, transform 170ms ease, visibility 170ms ease;
		visibility: hidden;
	}

	.dtc-fc.is-open .dtc-fc__rail {
		pointer-events: auto;
		transform: translateY(0);
		visibility: visible;
	}

	.dtc-fc.is-panel-open .dtc-fc__rail {
		transform: none;
	}

	.dtc-fc__tip {
		display: none;
	}

	.dtc-fc__popover {
		bottom: calc(80px + env(safe-area-inset-bottom));
		max-height: calc(100dvh - 116px - env(safe-area-inset-bottom));
		position: fixed;
		right: 16px;
		top: auto;
		transform: none;
		visibility: visible;
		width: min(320px, calc(100vw - 32px));
		pointer-events: auto;
	}

	.dtc-fc__popover.is-open {
		animation: dtc-fc-mobile-enter 170ms ease both;
	}

	body:has(.ui-mobile-buy) .dtc-fc {
		bottom: calc(82px + env(safe-area-inset-bottom));
	}

	body:has(.ui-mobile-buy) .dtc-fc__popover {
		bottom: calc(144px + env(safe-area-inset-bottom));
	}
}

@keyframes dtc-fc-mobile-enter {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.dtc-fc *,
	.dtc-fc *::before,
	.dtc-fc *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
