/**
 * /vip/ 支付卡 + 左侧文案卡（templates/vip.php）
 *
 * 支付卡按 Pencil「二创方案｜暖橙动态玻璃」568×765 画布锁比例。
 * 桌面固定尺寸，不跟视口一起缩小；矮窗 / 窄窗往下滚继续看。
 * 字号除主价外走设计 token；主价是装饰大数字例外（同类 404）。
 * 中文 / 数字用站内 MiSans，不另引 Geist / Noto。
 */

.mytheme-membership-vip {
	--vip-reveal: 1;
	--vip-card-nudge: 0px;
	--vip-gap: 20px;
	--vip-admin-offset: 0px;
	--vip-card-scale: 0.8;
	--vip-card-w-extra: 0.94;
	--vip-card-w: calc(35.5rem * var(--vip-card-scale) * var(--vip-card-w-extra));
	--vip-u: calc(35.5rem * var(--vip-card-scale) / 568);
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column-reverse;
	align-items: stretch;
	gap: 1.5rem;
	width: var(--vip-card-w);
}

body.admin-bar .mytheme-membership-vip {
	--vip-admin-offset: 32px;
}

.mytheme-membership-vip__plan {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.mytheme-membership-vip__story {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 0;
	width: 100%;
	padding: 2.15rem 1.35rem 0;
	border-radius: 1.5rem;
	background-image: linear-gradient(-90deg, #ffffffb0 0%, #ffffff78 65%, #ffffff26 100%);
	outline: 1px solid #ffffff8a;
	outline-offset: -1px;
	box-shadow: 0 20px 56px #8a321f20;
	-webkit-backdrop-filter: blur(11px);
	backdrop-filter: blur(11px);
	box-sizing: border-box;
}

.mytheme-membership-vip__story-title {
	margin: 0;
	font-size: 24px;
	line-height: 1.3;
	font-weight: 600;
	color: #222;
	letter-spacing: -0.02em;
}

.mytheme-membership-vip__story-copy {
	flex-shrink: 0;
}

.mytheme-membership-vip__story-lead {
	margin: 0.5rem 0 0;
	font-size: 14px;
	line-height: 1.5;
	font-weight: 330;
	color: #666;
}

.mytheme-membership-vip__story-rule {
	flex-shrink: 0;
	width: 100%;
	height: 1px;
	margin: 0.75rem 0 0;
	border: 0;
	background: rgba(34, 34, 34, 0.12);
}

.mytheme-membership-vip__story-points {
	flex: 1 1 auto;
	margin: 0;
	padding: 1.25rem 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 1.25rem;
}

.mytheme-membership-vip__story-point {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0;
}

.mytheme-membership-vip__story-index {
	flex: 0 0 auto;
	min-width: 2rem;
	font-size: 24px;
	line-height: 1.3;
	font-weight: 400;
	font-style: italic;
	color: rgba(224, 48, 48, 0.28);
	letter-spacing: -0.04em;
}

.mytheme-membership-vip__story-point-title {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	font-weight: 500;
	color: #222;
}

.mytheme-membership-vip__story-point-text {
	margin: 0.25rem 0 0;
	font-size: 14px;
	line-height: 1.5;
	font-weight: 330;
	color: #666;
}

.mytheme-membership-vip__card {
	position: relative;
	width: 100%;
	border-radius: calc(var(--vip-u) * 28);
	background-image: linear-gradient(180deg, #ffffffb8 0%, #ffffff7a 48%, #ffffff69 100%);
	outline: 1px solid #ffffffb5;
	outline-offset: -0.5px;
	box-shadow: 0 24px 68px #8a321f38;
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	box-sizing: border-box;
	animation: mytheme-membership-vip-pop-in 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.mytheme-membership-vip__card:not(.is-active) {
	height: calc(var(--vip-u) * 765);
}

@keyframes mytheme-membership-vip-pop-in {
	from {
		opacity: 0;
		transform: translateY(40px) scale(0.95);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.mytheme-membership-vip__canvas {
	position: relative;
	width: 100%;
	height: 100%;
}

.mytheme-membership-vip__brand {
	display: flex;
	align-items: center;
	justify-content: center;
}

.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__brand {
	position: absolute;
	top: 5.17%;
	left: 50%;
	width: 41.79%;
	height: 8.32%;
	margin: 0;
	transform: translateX(-50%);
}

.mytheme-membership-vip__brand a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	max-height: 100%;
	text-decoration: none;
}

.mytheme-membership-vip__brand img {
	/* WHY: 覆盖 mytheme_get_logo_html() 的 inline height，对上稿里 237×64 字标区 */
	height: calc(var(--vip-u) * 63.64) !important;
	width: auto;
	max-width: 100%;
	object-fit: contain;
}

.mytheme-membership-vip__rule {
	border: 0;
	background: #ffffff80;
}

.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__rule {
	position: absolute;
	left: 7.27%;
	width: 85.39%;
	height: 1px;
	margin: 0;
}

.mytheme-membership-vip__rule--brand {
	/* WHY: 稿里这条线落在 237×64 字标框里，站内 Logo 会被白线切开 */
	display: none;
}

.mytheme-membership-vip__rule--price {
	top: 40.02%;
}

.mytheme-membership-vip__rule--pay {
	top: 78.69%;
}

.mytheme-membership-vip__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: calc(var(--vip-u) * 6.88);
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 15px;
	line-height: 1.5;
	font-weight: 400;
	color: #666;
	box-sizing: border-box;
}

.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__badge {
	position: absolute;
	/* WHY: 「年度会员」卡在 Logo 底（5.17+8.32）和 ¥299 字顶（价格行中线扣字高 80/765）正中 */
	top: calc((13.49% + 20.01% + (15.74% - 10.4575%) / 2) / 2);
	left: 50%;
	width: auto;
	height: auto;
	transform: translate(-50%, -50%);
}

.mytheme-membership-vip__badge-dot {
	width: calc(var(--vip-u) * 6.88);
	height: calc(var(--vip-u) * 6.88);
	min-width: 6px;
	min-height: 6px;
	border-radius: 50%;
	background: #e03030;
	flex-shrink: 0;
}

.mytheme-membership-vip__price-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: calc(var(--vip-u) * 7.74);
	margin: 0;
}

.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__price-row {
	position: absolute;
	top: 20.01%;
	left: 50%;
	width: 78%;
	height: 15.74%;
	transform: translateX(-50%);
}

.mytheme-membership-vip__currency,
.mytheme-membership-vip__price {
	/* WHY: 支付卡主价是装饰大数字（同类 404），合法档 40px 撑不起 568 画布主视觉 */
	font-size: calc(var(--vip-u) * 80);
	line-height: 1;
	font-weight: 400;
	letter-spacing: calc(var(--vip-u) * -5.16);
	color: #222;
}

.mytheme-membership-vip__currency {
	letter-spacing: 0;
}

.mytheme-membership-vip__plan-meta {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	font-weight: 400;
	color: #999;
	text-align: center;
}

.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__plan-meta {
	position: absolute;
	top: 34.85%;
	left: 50%;
	width: 60.56%;
	transform: translateX(-50%);
}

.mytheme-membership-vip__benefits {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: calc(var(--vip-u) * 7.74);
	box-sizing: border-box;
}

.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__benefits {
	position: absolute;
	top: 45.19%;
	left: 13.63%;
	width: 72.68%;
	height: 29%;
}

.mytheme-membership-vip__benefit {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	gap: calc(var(--vip-u) * 12.04);
	height: calc(var(--vip-u) * 37.84);
}

.mytheme-membership-vip__benefit-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--vip-u) * 20.64);
	height: calc(var(--vip-u) * 20.64);
	border-radius: calc(var(--vip-u) * 10.32);
	background: #ffffffd9;
	color: #17191c;
}

.mytheme-membership-vip__benefit-icon svg {
	display: block;
	width: 0.8em;
	height: 0.8em;
	min-width: 12px;
	min-height: 12px;
}

.mytheme-membership-vip__benefit span {
	font-size: 16px;
	line-height: 1.5;
	font-weight: 330;
	color: #222;
}

/* 稿里是墨色大按钮；站内红 .btn-primary / .btn-cta 对不上，只挂在本页 */
.mytheme-membership-vip__pay {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: calc(var(--vip-u) * 11.18);
	margin: 0;
	padding: 0 1.25rem;
	border: 0;
	border-radius: calc(var(--vip-u) * 15.48);
	background: #111214;
	box-shadow: 0 14px 30px #4a110f40, 0 1px 1px #ffffff22;
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	appearance: none;
	box-sizing: border-box;
	transition: transform 0.18s cubic-bezier(0.32, 0.72, 0, 1), background-color 0.18s ease;
}

.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__pay {
	position: absolute;
	top: 82.07%;
	left: 10.6%;
	width: 78.73%;
	height: calc(var(--vip-u) * 65.36);
}

.mytheme-membership-vip__pay:hover {
	background: #000;
	transform: translateY(-1px);
}

.mytheme-membership-vip__pay:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.mytheme-membership-vip__pay svg {
	flex-shrink: 0;
	width: calc(var(--vip-u) * 17.2);
	height: calc(var(--vip-u) * 17.2);
}

.mytheme-membership-vip__secure {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	font-weight: 400;
	color: #999;
}

.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__secure {
	position: absolute;
	top: 93.31%;
	left: 50%;
	width: 42.39%;
	height: 2.47%;
	transform: translateX(-50%);
}

.mytheme-membership-vip__secure svg {
	flex-shrink: 0;
	width: 13px;
	height: 13px;
}

.mytheme-membership-vip__card.is-active {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: calc(var(--vip-u) * 765);
	padding: calc(var(--vip-u) * 40) calc(var(--vip-u) * 41) calc(var(--vip-u) * 32);
}

.mytheme-membership-vip__card.is-active .mytheme-membership-vip__brand {
	min-height: calc(var(--vip-u) * 64);
	margin: 0 0 calc(var(--vip-u) * 12);
}

.mytheme-membership-vip__card.is-active .mytheme-membership-vip__rule {
	width: 100%;
	height: 1px;
	margin: 0 0 calc(var(--vip-u) * 24);
}

.mytheme-membership-vip__card.is-active .mytheme-membership-vip__badge {
	width: auto;
	padding: 0;
	margin: 0 0 calc(var(--vip-u) * 16);
	height: auto;
}

.mytheme-membership-vip__member-title {
	margin: 0;
	font-size: 24px;
	line-height: 1.3;
	font-weight: 600;
	color: #222;
	text-align: center;
}

.mytheme-membership-vip__card.is-active .mytheme-membership-vip__plan-meta {
	margin: 0.5rem 0 1.5rem;
}

.mytheme-membership-vip__card.is-active .mytheme-membership-vip__pay {
	width: 100%;
	height: max(2.75rem, calc(var(--vip-u) * 65.36));
	margin-top: auto;
}

@media (max-width: 639px) {
	.mytheme-membership-vip {
		width: min(var(--vip-card-w), calc(100vw - 2rem));
	}

	.mytheme-membership-vip__card:not(.is-active) {
		height: auto;
	}

	.mytheme-membership-vip__canvas {
		display: flex;
		flex-direction: column;
		align-items: center;
		height: auto;
		padding: 2rem 1.25rem 1.15rem;
		box-sizing: border-box;
	}

	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__brand,
	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__rule,
	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__badge,
	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__price-row,
	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__plan-meta,
	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__benefits,
	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__pay,
	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__secure {
		position: static;
		top: auto;
		left: auto;
		width: 100%;
		height: auto;
		transform: none;
	}

	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__brand {
		width: 70%;
		height: auto;
		margin: 0 0 0.75rem;
	}

	.mytheme-membership-vip__brand img {
		height: 40px !important;
	}

	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__rule {
		width: 100%;
		height: 1px;
		margin: 0 0 0.75rem;
	}

	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__badge {
		width: auto;
		min-width: 0;
		height: auto;
		padding: 0;
		/* WHY: 跟 Logo 下空同一档，窄屏也让「年度会员」夹在字标和价格正中 */
		margin: 0 0 0.75rem;
	}

	.mytheme-membership-vip__currency,
	.mytheme-membership-vip__price {
		/* WHY: 窄屏不再锁 568 画布，主价仍走装饰大数字，不落到 40px */
		font-size: 44px;
		letter-spacing: -0.04em;
	}

	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__plan-meta {
		margin: 0.35rem 0 0.85rem;
	}

	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__benefits {
		width: 100%;
		max-width: 18rem;
		margin: 0 0 0.85rem;
	}

	.mytheme-membership-vip__benefit {
		height: 2.375rem;
		gap: 0.75rem;
	}

	.mytheme-membership-vip__benefit-icon {
		width: 1.25rem;
		height: 1.25rem;
		border-radius: 0.625rem;
	}

	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__pay {
		width: 100%;
		min-height: 2.75rem;
		height: 2.75rem;
		margin: 0 0 0.55rem;
		border-radius: 0.875rem;
	}

	.mytheme-membership-vip__pay svg {
		width: 18px;
		height: 18px;
	}

	.mytheme-membership-vip__card:not(.is-active) .mytheme-membership-vip__secure {
		width: auto;
	}
}

@media (min-width: 640px) {
	.mytheme-membership-vip__story {
		padding: 2.65rem 1.85rem 0;
	}

	.mytheme-membership-vip__story-title {
		font-size: 32px;
		line-height: 1.25;
		font-weight: 630;
	}
}

@media (min-width: 1024px) {
	.mytheme-membership-vip {
		flex-direction: row;
		align-items: stretch;
		width: auto;
		max-width: calc(100vw - 3rem);
		transform: none;
	}

	.mytheme-membership-vip__plan {
		width: var(--vip-card-w);
		flex: 0 0 var(--vip-card-w);
	}

	.mytheme-membership-vip__story {
		position: relative;
		top: auto;
		right: auto;
		width: min(625px, calc(100vw - var(--vip-card-w) - var(--vip-gap, 20px) - 4rem));
		flex: 0 0 auto;
		height: var(--vip-card-height, auto);
		opacity: 1;
		overflow: hidden;
		pointer-events: auto;
	}

	.mytheme-membership-vip__story-points {
		justify-content: space-evenly;
		gap: 0;
		padding: 0;
		min-height: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mytheme-membership-vip {
		--vip-reveal: 1;
	}

	.mytheme-membership-vip__story {
		opacity: 1;
		pointer-events: auto;
	}

	.mytheme-membership-vip__card {
		animation: none;
	}

	.mytheme-membership-vip__pay {
		transition: none;
	}

	.mytheme-membership-vip__pay:hover {
		transform: none;
	}
}
