:root {
	--yf-ink: #17202a;
	--yf-muted: #68737d;
	--yf-line: #e2e7eb;
	--yf-green: #08a65b;
	--yf-green-dark: #087844;
	--yf-blue: #1769ff;
}

.yf-checkout-shell {
	box-sizing: border-box;
	display: grid;
	min-height: 72vh;
	padding: 56px 20px;
	place-items: center;
	background:
		linear-gradient(90deg, rgba(23, 32, 42, .035) 1px, transparent 1px),
		linear-gradient(rgba(23, 32, 42, .035) 1px, transparent 1px),
		#f5f7f8;
	background-size: 28px 28px;
	color: var(--yf-ink);
	font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.yf-checkout-card {
	box-sizing: border-box;
	width: min(100%, 520px);
	padding: 42px;
	border: 1px solid rgba(23, 32, 42, .1);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(24, 34, 43, .12);
	text-align: center;
}

.yf-lang-switch {
	display: inline-flex;
	gap: 4px;
	margin: 0 auto 24px;
	padding: 4px;
	border: 1px solid var(--yf-line);
	border-radius: 8px;
	background: #f8fafb;
}

.yf-lang-switch a {
	min-width: 46px;
	padding: 7px 10px;
	border-radius: 6px;
	color: var(--yf-muted);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0;
	text-align: center;
	text-decoration: none;
}

.yf-lang-switch a.is-active {
	background: #fff;
	color: var(--yf-ink);
	box-shadow: 0 2px 8px rgba(23, 32, 42, .08);
}

.yf-product-hero {
	margin-bottom: 12px;
}

.yf-product-logo {
	display: block;
	max-width: 120px;
	width: 100%;
	height: auto;
	margin: 0 auto;
	object-fit: contain;
}

.yf-product-mark {
	margin-bottom: 0;
}

.yf-checkout-mark {
	display: grid;
	width: 48px;
	height: 48px;
	margin: 0 auto 22px;
	border-radius: 8px;
	background: var(--yf-ink);
	color: #fff;
	font-weight: 800;
	letter-spacing: 0;
	place-items: center;
}

.yf-checkout-kicker {
	margin: 0 0 8px;
	color: var(--yf-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.yf-checkout-card h1,
.yf-checkout-card h2 {
	margin: 0;
	color: var(--yf-ink);
	font-size: 30px;
	line-height: 1.25;
	letter-spacing: 0;
}

.yf-product-title {
	margin-top: 10px;
	font-size: 34px;
	font-weight: 800;
}

.yf-product-subtitle {
	margin: 10px auto 0;
	max-width: 36ch;
	color: #7a8590;
	font-size: 15px;
	line-height: 1.7;
}

.yf-checkout-price {
	margin: 22px 0 18px;
	color: var(--yf-ink);
	font-size: 54px;
	font-weight: 750;
	line-height: 1;
}

.yf-checkout-price span {
	margin-right: 4px;
	font-size: 24px;
	vertical-align: 16px;
}

.yf-checkout-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 32px;
}

.yf-checkout-meta span {
	padding: 6px 10px;
	border: 1px solid var(--yf-line);
	border-radius: 5px;
	color: #44515d;
	font-size: 12px;
}

.yf-checkout-benefits {
	display: grid;
	gap: 8px;
	margin: -14px 0 26px;
	color: var(--yf-muted);
	font-size: 12px;
	line-height: 1.5;
}

.yf-checkout-benefits span::before {
	content: "✓";
	margin-right: 6px;
	color: var(--yf-green);
	font-weight: 800;
}

.yf-checkout-form label,
.yf-checkout-form fieldset {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	text-align: left;
}

.yf-checkout-form label > span,
.yf-checkout-form legend {
	display: block;
	margin-bottom: 8px;
	color: #34414c;
	font-size: 13px;
	font-weight: 700;
}

.yf-checkout-form input {
	box-sizing: border-box;
	width: 100%;
	height: 48px;
	margin-bottom: 22px;
	padding: 0 14px;
	border: 1px solid #ccd4da;
	border-radius: 6px;
	background: #fff;
	color: var(--yf-ink);
	font: inherit;
	outline: none;
}

.yf-checkout-form input:focus {
	border-color: var(--yf-blue);
	box-shadow: 0 0 0 3px rgba(23, 105, 255, .12);
}

.yf-gateways {
	display: grid;
	gap: 10px;
}

.yf-pay-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	padding: 10px 16px;
	border: 0;
	border-radius: 6px;
	background: var(--yf-ink);
	color: #fff;
	cursor: pointer;
	font: 700 15px/1.2 "Avenir Next", "PingFang SC", sans-serif;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.yf-pay-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(23, 32, 42, .18);
}

.yf-pay-wechat,
.yf-pay-test {
	background: var(--yf-green);
}

.yf-pay-wechat:hover,
.yf-pay-test:hover {
	background: var(--yf-green-dark);
}

.yf-pay-icon {
	display: grid;
	width: 24px;
	height: 24px;
	margin-right: 9px;
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: 50%;
	font-size: 12px;
	place-items: center;
}

.yf-payment-state,
.yf-success {
	padding-top: 12px;
}

.yf-payment-state p,
.yf-success p,
.yf-secure-note {
	color: var(--yf-muted);
	line-height: 1.7;
}

.yf-spinner {
	width: 32px;
	height: 32px;
	margin: 8px auto 22px;
	border: 3px solid #dfe5e9;
	border-top-color: var(--yf-blue);
	border-radius: 50%;
	animation: yf-spin .8s linear infinite;
}

.yf-qr {
	display: grid;
	justify-items: center;
	gap: 12px;
	margin: 18px 0;
	padding: 16px;
	border: 1px solid var(--yf-line);
	border-radius: 6px;
	background: #fff;
	overflow-wrap: anywhere;
}

.yf-qr canvas {
	width: 224px;
	max-width: 100%;
	height: auto;
	border: 8px solid #fff;
	box-shadow: 0 10px 24px rgba(16, 24, 32, .12);
}

.yf-qr code {
	max-width: 100%;
	color: var(--yf-muted);
	font: 12px/1.5 monospace;
}

.yf-success-check {
	display: grid;
	width: 52px;
	height: 52px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: var(--yf-green);
	color: #fff;
	font-size: 28px;
	place-items: center;
}

.yf-license-key {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	margin: 20px 0;
	border: 1px solid #bdc8d0;
	border-radius: 6px;
	background: #f6f8f9;
	overflow: hidden;
}

.yf-license-key code {
	padding: 16px;
	color: #101820;
	font-size: 14px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.yf-license-key button {
	padding: 0 16px;
	border: 0;
	border-left: 1px solid #bdc8d0;
	background: #fff;
	color: var(--yf-blue);
	cursor: pointer;
	font-weight: 700;
}

.yf-secure-note {
	margin: 28px 0 0;
	font-size: 11px;
}

.yf-portal-card {
	width: min(100%, 760px);
	text-align: left;
}

.yf-portal-card .yf-checkout-mark,
.yf-portal-card .yf-checkout-kicker,
.yf-portal-card h1 {
	text-align: center;
}

.yf-portal-login {
	max-width: 460px;
	margin: 28px auto 0;
}

.yf-portal-message {
	min-height: 22px;
	margin: 18px 0;
	color: var(--yf-muted);
	font-size: 13px;
	text-align: center;
}

.yf-portal-message.is-error {
	color: #b42318;
}

.yf-portal-dashboard h2 {
	margin: 28px 0 12px;
	color: var(--yf-ink);
	font-size: 20px;
	letter-spacing: 0;
}

.yf-portal-list {
	display: grid;
	gap: 10px;
}

.yf-portal-item {
	display: grid;
	gap: 8px;
	padding: 14px;
	border: 1px solid var(--yf-line);
	border-radius: 8px;
	background: #fbfcfd;
}

.yf-portal-item strong {
	color: var(--yf-ink);
}

.yf-portal-item span {
	color: var(--yf-muted);
	font-size: 13px;
	line-height: 1.5;
}

.yf-mini-button {
	justify-self: start;
	min-height: 34px;
	padding: 6px 12px;
	border: 1px solid #bdc8d0;
	border-radius: 6px;
	background: #fff;
	color: var(--yf-blue);
	cursor: pointer;
	font-weight: 700;
}

.yf-mini-button:disabled {
	color: var(--yf-muted);
	cursor: not-allowed;
	opacity: .7;
}

@keyframes yf-spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
	.yf-checkout-shell { padding: 24px 12px; }
	.yf-checkout-card { padding: 30px 20px; }
	.yf-checkout-card h1, .yf-checkout-card h2 { font-size: 25px; }
	.yf-product-title { font-size: 28px; }
	.yf-product-subtitle { font-size: 14px; }
	.yf-checkout-price { font-size: 46px; }
	.yf-license-key { grid-template-columns: 1fr; }
	.yf-license-key button {
		min-height: 42px;
		border-top: 1px solid #bdc8d0;
		border-left: 0;
	}
}
