/*!
 * 公众号关注解锁全文 — 前台样式
 * 设计基调：微信品牌绿为唯一强调色，其余保持安静、贴近阅读场景。
 */

.ax-gate {
	--ax-ink: #1f2328;
	--ax-muted: #5f6672;
	--ax-green: #07c160;
	--ax-green-deep: #06ad56;
	--ax-green-wash: #f0faf4;
	--ax-line: #e7e9ec;
	--ax-fade-end: #ffffff;
	--ax-motion: 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- 截断遮罩 ---- */

.ax-gate .ax-fade {
	height: 120px;
	margin-top: -120px;
	position: relative;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--ax-fade-end));
}

/* ---- 展开按钮 ---- */

.ax-gate .ax-action {
	display: flex;
	justify-content: center;
	margin: 20px 0 32px;
}

.ax-gate .ax-expand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 36px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	color: var(--ax-green);
	background: transparent;
	border: 1px solid var(--ax-green);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color var(--ax-motion), color var(--ax-motion), transform var(--ax-motion);
}

.ax-gate .ax-expand:hover,
.ax-gate .ax-expand:focus-visible {
	background: var(--ax-green);
	color: #fff;
}

.ax-gate .ax-expand:focus-visible {
	outline: 2px solid var(--ax-green);
	outline-offset: 3px;
}

.ax-gate .ax-expand:active {
	transform: scale(0.97);
}

.ax-gate .ax-expand__chevron {
	transition: transform var(--ax-motion);
}

.ax-gate .ax-expand:hover .ax-expand__chevron {
	transform: translateY(2px);
}

/* ---- 展开后的正文 ---- */

.ax-gate .ax-rest[hidden] {
	display: none;
}

/* =========================================================
 * 弹窗
 * ====================================================== */

.ax-modal {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.ax-modal[hidden] {
	display: none;
}

.ax-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 28, 0.55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.ax-modal__card {
	position: relative;
	width: 100%;
	max-width: 380px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 32px 28px 24px;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22), 0 4px 16px rgba(15, 23, 42, 0.08);
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
		"Microsoft YaHei", "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
}

.ax-modal.is-open .ax-modal__backdrop {
	animation: ax-fade-in 200ms ease both;
}

.ax-modal.is-open .ax-modal__card {
	animation: ax-pop-in 260ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.ax-modal.is-closing .ax-modal__backdrop {
	animation: ax-fade-out 180ms ease both;
}

.ax-modal.is-closing .ax-modal__card {
	animation: ax-pop-out 180ms ease both;
}

@keyframes ax-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ax-fade-out { from { opacity: 1; } to { opacity: 0; } }

@keyframes ax-pop-in {
	from { opacity: 0; transform: translateY(12px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ax-pop-out {
	from { opacity: 1; transform: translateY(0) scale(1); }
	to   { opacity: 0; transform: translateY(8px) scale(0.97); }
}

/* ---- 关闭按钮 ---- */

.ax-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	color: #9aa0a8;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color var(--ax-motion, 240ms), color var(--ax-motion, 240ms);
}

.ax-modal__close:hover,
.ax-modal__close:focus-visible {
	color: var(--ax-ink, #1f2328);
	background: #f2f3f5;
}

.ax-modal__close:focus-visible {
	outline: 2px solid var(--ax-green, #07c160);
	outline-offset: 2px;
}

/* ---- 文案 ---- */

.ax-modal__title {
	margin: 0 0 10px;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--ax-ink, #1f2328);
}

.ax-modal__notice {
	margin: 0 auto 20px;
	max-width: 30em;
	font-size: 14px;
	line-height: 1.7;
	color: var(--ax-muted, #5f6672);
}

/* ---- 二维码 ---- */

.ax-modal__qr {
	display: inline-flex;
	padding: 10px;
	background: var(--ax-green-wash, #f0faf4);
	border: 1px solid var(--ax-line, #e7e9ec);
	border-radius: 14px;
}

.ax-modal__qr img {
	display: block;
	width: 168px;
	height: 168px;
	object-fit: contain;
	border-radius: 6px;
	background: #fff;
}

.ax-modal__qr-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 168px;
	height: 168px;
	font-size: 13px;
	color: #9aa0a8;
	background: #fff;
	border: 1px dashed #d5d9de;
	border-radius: 6px;
}

/* ---- 扫码后提示 + 按钮 ---- */

.ax-modal__after {
	margin: 16px 0 20px;
	font-size: 13px;
	color: #9aa0a8;
}

.ax-modal__continue {
	display: block;
	width: 100%;
	padding: 14px 20px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	color: #fff;
	background: var(--ax-green, #07c160);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color var(--ax-motion, 240ms), transform var(--ax-motion, 240ms);
}

.ax-modal__continue:hover,
.ax-modal__continue:focus-visible {
	background: var(--ax-green-deep, #06ad56);
}

.ax-modal__continue:focus-visible {
	outline: 2px solid var(--ax-green-deep, #06ad56);
	outline-offset: 3px;
}

.ax-modal__continue:active {
	transform: scale(0.98);
}

.ax-modal__skip {
	display: inline-block;
	margin-top: 14px;
	padding: 4px 8px;
	font-size: 13px;
	color: #9aa0a8;
	background: transparent;
	border: 0;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color var(--ax-motion, 240ms);
}

.ax-modal__skip:hover,
.ax-modal__skip:focus-visible {
	color: var(--ax-muted, #5f6672);
}

.ax-modal__skip:focus-visible {
	outline: 2px solid var(--ax-green, #07c160);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ---- 无障碍：减少动效 ---- */

@media (prefers-reduced-motion: reduce) {
	.ax-gate *,
	.ax-modal,
	.ax-modal * {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
