/* 游戏大厅：与顶栏 .kehua-header-inner 同宽 1350px */
body.kehua-gamehall-route .kehua-header-inner {
	max-width: 1350px;
}

body.kehua-gamehall-route .kehua-layout.kehua-layout-no-left {
	max-width: 1350px;
	width: 100%;
	box-sizing: border-box;
	padding: calc(var(--header-h) + var(--top-gap, 20px)) 20px 80px;
}

body.kehua-gamehall-route .kehua-layout .kehua-main {
	max-width: none;
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
}

body.kehua-gamehall-route .kehua-main,
body.kehua-gamehall-route .kehua-content {
	max-width: none;
}

/* 大话王：卡片堆叠可超出内容区，但不撑开整页，避免顶栏/底栏被横向溢出影响 */
html:has(#kehua_bluff_app),
body.kehua-gamehall-route:has(#kehua_bluff_app) {
	overflow-x: hidden;
}

body.kehua-gamehall-route:has(#kehua_bluff_app) .kehua-layout,
body.kehua-gamehall-route:has(#kehua_bluff_app) .kehua-main,
body.kehua-gamehall-route:has(#kehua_bluff_app) .kehua-content {
	max-width: 100%;
	overflow-x: hidden;
	box-sizing: border-box;
}

body.kehua-gamehall-route:has(#kehua_bluff_app) .kehua-header,
body.kehua-gamehall-route:has(#kehua_bluff_app) .kehua-mobile-tabbar {
	width: 100vw;
	max-width: 100%;
	left: 0;
	right: 0;
	box-sizing: border-box;
}

/* 连连看手机端：取消页面边距，游戏区铺满顶栏以下 */
@media (max-width: 860px) {
	body.kehua-gamehall-route:has(#kehua_llk_app) .kehua-layout.kehua-layout-no-left {
		padding: var(--header-h) 0 0;
		max-width: none;
	}

	body.kehua-gamehall-route:has(#kehua_llk_app) .kehua-main,
	body.kehua-gamehall-route:has(#kehua_llk_app) .kehua-content {
		max-width: none;
		width: 100%;
		padding: 0;
		margin: 0;
	}

	body.kehua-gamehall-route:has(#kehua_llk_app) .kehua-footer {
		display: none;
	}

	html:has(#kehua_llk_app),
	body.kehua-gamehall-route:has(#kehua_llk_app) {
		overflow-x: hidden;
	}
}

.kehua-gamehall {
	--kh-gh-ink: #1a1f1c;
	--kh-gh-muted: #6b7280;
	--kh-gh-line: rgba(26, 31, 28, 0.08);
	--kh-gh-accent: #34c759;
	--kh-gh-accent-deep: #28a745;
	--kh-gh-soft: #eaf8ee;
	--kh-gh-card: #ffffff;
	--kh-gh-page: #f3f5f4;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	color: var(--kh-gh-ink);
}

/* Hero */
.kehua-gh-hero {
	position: relative;
	overflow: hidden;
	border-radius: 22px;
	min-height: 200px;
	padding: 36px 40px 32px;
	background-color: #f4f6f5;
	background-repeat: no-repeat;
	background-position: right center;
	background-size: cover;
	border: none;
	box-shadow: none;
	margin-bottom: 18px;
}

.kehua-gh-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(247, 249, 248, 0.96) 0%, rgba(247, 249, 248, 0.78) 42%, rgba(247, 249, 248, 0.15) 72%, transparent 100%);
	pointer-events: none;
}

.kehua-gh-hero-content {
	position: relative;
	z-index: 1;
	max-width: 520px;
}

.kehua-gh-eyebrow {
	margin: 0 0 8px;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--kh-gh-accent-deep);
	font-weight: 700;
}

.kehua-gh-title {
	margin: 0;
	font-size: clamp(30px, 3.6vw, 42px);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--kh-gh-ink);
}

.kehua-gh-desc {
	margin: 10px 0 0;
	color: var(--kh-gh-muted);
	font-size: 15px;
}

.kehua-gh-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.kehua-gh-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	border: none;
	box-shadow: none;
	color: var(--kh-gh-ink);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.kehua-gh-chip i {
	color: var(--kh-gh-accent-deep);
	font-size: 15px;
}

.kehua-gh-chip--coin i {
	color: #e0a33a;
}

/* Resume */
.kehua-gh-resume {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	margin-bottom: 16px;
	background: #fff8e8;
	border: none;
	box-shadow: none;
	border-radius: 16px;
}

.kehua-gh-resume-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.kehua-gh-resume-text span {
	font-size: 13px;
	color: var(--kh-gh-muted);
}

/* Categories */
.kehua-gh-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 22px;
}

.kehua-gh-cat {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 16px;
	border-radius: 999px;
	border: none;
	background: #fff;
	color: #374151;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.kehua-gh-cat i {
	font-size: 16px;
	color: #6b7280;
}

.kehua-gh-cat:hover {
	background: #f7f8f7;
}

.kehua-gh-cat.is-active {
	background: var(--kh-gh-soft);
	color: var(--kh-gh-accent-deep);
}

.kehua-gh-cat.is-active i {
	color: var(--kh-gh-accent-deep);
}

/* Section */
.kehua-gh-section {
	margin-bottom: 22px;
}

.kehua-gh-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.kehua-gh-section-head h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 750;
	color: var(--kh-gh-ink);
}

.kehua-gh-section-more {
	font-size: 13px;
	color: var(--kh-gh-muted);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	white-space: nowrap;
}

a.kehua-gh-section-more:hover {
	color: var(--kh-gh-accent-deep);
	text-decoration: none;
}

/* Game cards */
.kehua-gh-games {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
}

.kehua-gh-card {
	background: var(--kh-gh-card);
	border-radius: 18px;
	border: none;
	box-shadow: none;
	padding: 18px 16px 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 320px;
	height: 100%;
	box-sizing: border-box;
	transition: transform 0.18s ease, background 0.18s ease;
}

/* display:flex 会盖过原生 [hidden]，分类筛选必须强制隐藏 */
.kehua-gh-card[hidden],
.kehua-gh-card.is-cat-hidden,
.kehua-gh-empty--filter[hidden] {
	display: none !important;
}

.kehua-gh-card:hover {
	transform: translateY(-2px);
	background: #fafbfa;
}

.kehua-gh-card-ico {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--gh-ico, #34c759) 16%, #fff);
	color: var(--gh-ico, #34c759);
	font-size: 28px;
	flex-shrink: 0;
	overflow: hidden;
}

.kehua-gh-card-ico--img {
	background: transparent;
	box-shadow: none;
	border: 0;
	border-radius: 0;
	padding: 0;
	overflow: visible;
	width: 64px;
	height: 64px;
}

.kehua-gh-card-ico--img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
	user-select: none;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

.kehua-gh-card-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	flex: 1;
}

.kehua-gh-card-title {
	margin: 0;
	font-size: 16px;
	font-weight: 750;
	color: var(--kh-gh-ink);
	line-height: 1.3;
}

.kehua-gh-card-desc {
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--kh-gh-muted);
	min-height: calc(1.45em * 2);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.kehua-gh-start-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	align-self: flex-start;
	margin-top: auto;
	min-height: 34px;
	padding: 0 14px;
	border-radius: 999px;
	border: none;
	background: var(--kh-gh-soft);
	color: var(--kh-gh-accent-deep);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	box-shadow: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.kehua-gh-start-btn i {
	font-size: 15px;
}

.kehua-gh-start-btn:hover:not(:disabled) {
	background: #dff5e6;
	color: var(--kh-gh-accent-deep);
	text-decoration: none;
}

.kehua-gh-start-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.kehua-gh-card-players {
	margin: 0;
	padding-top: 2px;
	font-size: 12px;
	color: #9ca3af;
}

.kehua-gh-empty {
	text-align: center;
	padding: 48px 16px;
	color: var(--kh-gh-muted);
	background: #fff;
	border: none;
	box-shadow: none;
	border-radius: 18px;
}

.kehua-gh-empty i {
	font-size: 36px;
	display: block;
	margin-bottom: 10px;
	color: #b0b8b3;
}

/* Bottom panels */
.kehua-gh-bottom {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-top: 8px;
}

.kehua-gh-panel {
	background: #fff;
	border: none;
	box-shadow: none;
	border-radius: 18px;
	padding: 18px 18px 12px;
}

.kehua-gh-panel-empty {
	padding: 28px 8px 20px;
	text-align: center;
	color: var(--kh-gh-muted);
	font-size: 13px;
}

.kehua-gh-rank {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kehua-gh-rank-item {
	display: grid;
	grid-template-columns: 28px 36px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border: none;
	box-shadow: none;
}

.kehua-gh-rank-no {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 800;
	color: #9ca3af;
	background: #f3f4f6;
}

.kehua-gh-rank-no--gold {
	color: #d4a017;
	background: #fff4cc;
	font-size: 16px;
}

.kehua-gh-rank-no--silver {
	color: #8e9aaa;
	background: #eef1f4;
	font-size: 16px;
}

.kehua-gh-rank-no--bronze {
	color: #c47a3a;
	background: #f8ebe0;
	font-size: 16px;
}

.kehua-gh-rank-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	background: #eef2f0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.kehua-gh-rank-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.kehua-gh-avatar-fallback {
	font-size: 13px;
	font-weight: 700;
	color: #6b7280;
}

.kehua-gh-rank-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--kh-gh-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kehua-gh-rank-score {
	font-size: 14px;
	font-weight: 750;
	color: var(--kh-gh-ink);
	font-variant-numeric: tabular-nums;
}

/* Tasks */
.kehua-gh-tasks {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kehua-gh-task {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	padding: 12px 0;
	border: none;
	box-shadow: none;
}

.kehua-gh-task-ico {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--kh-gh-soft);
	color: var(--kh-gh-accent-deep);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
}

.kehua-gh-task-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.kehua-gh-task-main strong {
	font-size: 14px;
	font-weight: 700;
	color: var(--kh-gh-ink);
}

.kehua-gh-task-main > span:first-of-type {
	font-size: 12px;
	color: var(--kh-gh-muted);
}

.kehua-gh-task-bar {
	display: block;
	height: 4px;
	margin-top: 6px;
	border-radius: 999px;
	background: #eef2f0;
	overflow: hidden;
}

.kehua-gh-task-bar i {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #34c759, #2fbf71);
	border-radius: inherit;
}

.kehua-gh-task-status {
	font-size: 12px;
	font-weight: 700;
	color: var(--kh-gh-muted);
	min-width: 52px;
	text-align: right;
}

.kehua-gh-task.is-done .kehua-gh-task-status em {
	font-style: normal;
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--kh-gh-soft);
	color: var(--kh-gh-accent-deep);
}

/* ========== 游戏大厅 · 夜间模式 ========== */
:is(html.kehua-dark, body.kehua-dark) .kehua-gamehall {
	--kh-gh-ink: #e4e6eb;
	--kh-gh-muted: #9ca3af;
	--kh-gh-line: rgba(255, 255, 255, 0.08);
	--kh-gh-accent: #3dd068;
	--kh-gh-accent-deep: #5ee08a;
	--kh-gh-soft: rgba(52, 199, 89, 0.18);
	--kh-gh-card: #1e2228;
	--kh-gh-page: #141619;
	color: var(--kh-gh-ink);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-hero {
	background-color: #1a1e24;
	box-shadow: none;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-hero::before {
	background: linear-gradient(
		90deg,
		rgba(26, 30, 36, 0.96) 0%,
		rgba(26, 30, 36, 0.82) 40%,
		rgba(26, 30, 36, 0.28) 70%,
		transparent 100%
	);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-eyebrow {
	color: #5ee08a;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-chip {
	background: rgba(255, 255, 255, 0.08);
	color: var(--kh-gh-ink);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-chip i {
	color: #5ee08a;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-chip--coin i {
	color: #f0c14b;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-resume {
	background: rgba(224, 163, 58, 0.14);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-resume-text strong {
	color: var(--kh-gh-ink);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-cat {
	background: #1e2228;
	color: #c4c9d1;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-cat i {
	color: #8b939e;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-cat:hover {
	background: #252a31;
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-cat.is-active {
	background: #34c759;
	color: #fff;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-cat.is-active i {
	color: #fff;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-card {
	background: #1e2228;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-card:hover {
	background: #252a31;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-card-ico {
	background: color-mix(in srgb, var(--gh-ico, #34c759) 24%, #1e2228);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-card-ico--img {
	background: transparent;
	box-shadow: none;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-card-ico--img img {
	filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-start-btn {
	background: var(--kh-gh-soft);
	color: #5ee08a;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-start-btn:hover:not(:disabled) {
	background: rgba(52, 199, 89, 0.3);
	color: #7aeba0;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-card-players {
	color: #6b7280;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-empty,
:is(html.kehua-dark, body.kehua-dark) .kehua-gh-panel {
	background: #1e2228;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-empty i {
	color: #6b7280;
}

:is(html.kehua-dark, body.kehua-dark) a.kehua-gh-section-more:hover {
	color: #5ee08a;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-rank-no {
	color: #9ca3af;
	background: rgba(255, 255, 255, 0.08);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-rank-no--gold {
	color: #f0c14b;
	background: rgba(212, 160, 23, 0.22);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-rank-no--silver {
	color: #c0c8d2;
	background: rgba(142, 154, 170, 0.22);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-rank-no--bronze {
	color: #e0a06a;
	background: rgba(196, 122, 58, 0.22);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-rank-avatar {
	background: rgba(255, 255, 255, 0.08);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-avatar-fallback {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-task-ico {
	background: var(--kh-gh-soft);
	color: #5ee08a;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-task-bar {
	background: rgba(255, 255, 255, 0.08);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gh-task.is-done .kehua-gh-task-status em {
	background: var(--kh-gh-soft);
	color: #5ee08a;
}

/* 游戏弹层夜景统一：与全站卡片色 --color-white(#1e2228) 一致 */
:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gk-modal-card,
:is(html.kehua-dark, body.kehua-dark) .kehua-gk-modal-card--result {
	background: #1e2228;
	color: #e4e6eb;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gk-modal-card h2,
:is(html.kehua-dark, body.kehua-dark) .kehua-gk-modal-card--result strong {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gk-modal-card--result p {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gk-modal-close {
	background: rgba(255, 255, 255, 0.08);
	color: #c4c9d1;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gk-modal-close:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gh-btn-primary,
:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gh-btn-ghost {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gh-btn-primary:hover,
:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gh-btn-ghost:hover {
	background: #f3f4f6;
	color: #111827;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gk-cta {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gk-cta:hover:not(:disabled) {
	filter: none;
	background: #f3f4f6;
	color: #111827;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gk-modal-back,
:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gk-start-foot {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-gomoku .kehua-gk-modal-back:hover {
	color: #e4e6eb;
}

/* 五子棋对局页 */
.kehua-gomoku {
	--kh-gh-ink: #1a1f1c;
	--kh-gh-muted: #6b7280;
	--kh-gh-line: rgba(26, 31, 28, 0.1);
	--kh-gh-accent: #34c759;
	--kh-gh-accent-deep: #28a745;
	--kh-gh-soft: #eaf8ee;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

body.kehua-gk-modal-open {
	overflow: hidden;
}

.kehua-gk-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.kehua-gk-status {
	flex: 1;
	font-weight: 700;
	color: var(--kh-gh-ink);
	font-size: 16px;
}

.kehua-gk-wallet {
	font-size: 13px;
	color: var(--kh-gh-muted);
	padding: 6px 12px;
	background: var(--kh-gh-soft);
	border-radius: 999px;
}

.kehua-gk-wallet strong {
	color: var(--kh-gh-ink);
	margin-left: 4px;
}

/* 对战头像条：与棋盘同宽 */
.kehua-gk-vs {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 8px 12px;
	width: 100%;
	max-width: 680px;
	margin: 0 auto 16px;
	padding: 10px 4px;
	box-sizing: border-box;
	background: transparent;
	border: none;
	box-shadow: none;
}

.kehua-gk-vs-side {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.kehua-gk-vs-side--you {
	justify-content: flex-start;
}

.kehua-gk-vs-side--ai {
	justify-content: flex-end;
}

.kehua-gk-vs-side.is-turn .kehua-gk-vs-avatar img,
.kehua-gk-vs-side.is-turn .kehua-gk-vs-fallback,
.kehua-gk-vs-side.is-turn .kehua-gk-vs-ai-face {
	animation: kehuaGkTurnPulse 1.35s ease-in-out infinite;
}

.kehua-gk-vs-side.is-turn .kehua-gk-vs-name {
	color: var(--kh-gh-accent-deep);
}

@keyframes kehuaGkTurnPulse {
	0%, 100% {
		box-shadow: 0 0 0 3px rgba(45, 122, 71, 0.28);
		transform: scale(1);
	}
	50% {
		box-shadow: 0 0 0 5px rgba(45, 122, 71, 0.48);
		transform: scale(1.05);
	}
}

.kehua-gk-vs-avatar {
	position: relative;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	flex-shrink: 0;
	overflow: visible;
}

.kehua-gk-vs-avatar img,
.kehua-gk-vs-fallback,
.kehua-gk-vs-ai-face {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: block;
	object-fit: cover;
}

.kehua-gk-vs-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e8eef0;
	color: #4b5563;
	font-weight: 800;
	font-size: 20px;
}

.kehua-gk-vs-avatar--you img,
.kehua-gk-vs-avatar--you .kehua-gk-vs-fallback {
	box-shadow: 0 0 0 3px rgba(26, 31, 28, 0.12);
}

.kehua-gk-vs-ai-face {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(145deg, #7ed9a2 0%, #34c759 55%, #28a745 100%);
	color: #fff;
	font-size: 28px;
	box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.2);
}

.kehua-gk-vs-stone {
	position: absolute;
	right: -2px;
	bottom: -2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	line-height: 1;
	background: #fff;
}

.kehua-gk-vs-stone--black {
	color: #111;
}

.kehua-gk-vs-stone--white {
	color: #bbb;
}

.kehua-gk-vs-meta {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.kehua-gk-vs-meta--ai {
	align-items: flex-end;
	text-align: right;
}

.kehua-gk-vs-name {
	font-size: 14px;
	font-weight: 750;
	color: var(--kh-gh-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 110px;
}

.kehua-gk-vs-tag {
	font-size: 12px;
	color: var(--kh-gh-muted);
	transition: color 0.2s ease;
}

.kehua-gk-vs-tag.is-turn {
	color: #2d7a47;
	font-weight: 750;
}

.kehua-gk-vs-center {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	min-width: 108px;
}

.kehua-gk-vs-badge {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: #fff;
	background: linear-gradient(145deg, #5b6570, #2f3640);
}

.kehua-gk-vs-stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px 10px;
	font-size: 12px;
	color: var(--kh-gh-muted);
}

.kehua-gk-vs-stat-sep {
	display: block;
	width: 1px;
	height: 11px;
	background: rgba(15, 23, 42, 0.12);
	flex-shrink: 0;
	margin: 0 2px;
}

.kehua-gk-vs-stats em {
	font-style: normal;
	margin-right: 4px;
	color: #9ca3af;
}

.kehua-gk-vs-stats strong {
	color: var(--kh-gh-ink);
	font-weight: 700;
}

.kehua-gk-vs-abort {
	margin-top: 2px;
	border: none;
	background: #eef1f0;
	color: #6b7280;
	font-size: 12px;
	font-weight: 600;
	padding: 5px 12px;
	border-radius: 999px;
	cursor: pointer;
}

.kehua-gk-vs-abort:hover {
	background: #e5e9e7;
	color: #374151;
}

.kehua-gk-board-wrap {
	background: transparent;
	border: none;
	box-shadow: none;
	border-radius: 0;
	padding: 0;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 680px;
}

#kehua_gk_canvas {
	width: 100%;
	max-width: 680px;
	height: auto;
	border-radius: 12px;
	cursor: default;
	box-shadow: none;
	touch-action: manipulation;
	display: block;
	-webkit-user-select: none;
	user-select: none;
}

.kehua-gk-rules {
	margin: 24px auto 8px;
	max-width: 680px;
	width: 100%;
	padding: 18px 4px 0;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
	box-sizing: border-box;
}

.kehua-gk-rules h3 {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 750;
	color: var(--kh-gh-ink);
	display: flex;
	align-items: center;
	gap: 6px;
}

.kehua-gk-rules h3 i {
	color: var(--kh-gh-accent-deep);
	font-size: 17px;
}

.kehua-gk-rules-body {
	font-size: 13px;
	line-height: 1.75;
	color: var(--kh-gh-muted);
}

/* 弹窗 */
.kehua-gk-modal {
	position: fixed;
	inset: 0;
	z-index: 12000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.kehua-gk-modal[hidden] {
	display: none !important;
}

.kehua-gk-modal-mask {
	position: absolute;
	inset: 0;
	background: rgba(20, 28, 24, 0.42);
	border: none;
}

.kehua-gk-modal-card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 400px;
	background: #fff;
	border-radius: 20px;
	border: none;
	box-shadow: none;
	padding: 28px 24px 20px;
	animation: kehuaGkModalIn 0.2s ease;
}

.kehua-gk-modal-card--start {
	max-width: 340px;
	padding: 26px 22px 18px;
	border-radius: 22px;
	box-shadow: 0 18px 48px rgba(20, 28, 24, 0.16);
	text-align: center;
}

@keyframes kehuaGkModalIn {
	from { opacity: 0; transform: translateY(10px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.kehua-gk-modal-card h2,
.kehua-gk-start-title {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 800;
	color: var(--kh-gh-ink);
	letter-spacing: 0.02em;
}

.kehua-gk-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 32px;
	height: 32px;
	border: none;
	background: #f3f5f4;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
}

.kehua-gk-start {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.kehua-gk-start-tags {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin-bottom: 12px;
}

.kehua-gk-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 650;
	line-height: 1.3;
	max-width: 100%;
}

.kehua-gk-tag--amber {
	color: #b45309;
	background: #fff7ed;
	border: 1px solid #fdba74;
}

.kehua-gk-tag--mint {
	color: #3f4a45;
	background: #f3f6f4;
	border: 1px solid transparent;
}

.kehua-gk-tag--danger {
	color: #b91c1c;
	background: #fef2f2;
	border: 1px solid #fca5a5;
}

.kehua-gk-start-sub {
	margin: 0 0 14px;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.5;
}

.kehua-gk-start-sub strong {
	color: var(--kh-gh-ink);
	font-weight: 750;
}

.kehua-gk-vip-tip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 16px;
	padding: 9px 14px;
	border-radius: 999px;
	background: #fffbeb;
	color: #92400e;
	font-size: 12px;
	font-weight: 650;
	text-decoration: none;
	transition: background 0.15s ease;
}

.kehua-gk-vip-tip i {
	font-size: 15px;
	color: #d97706;
}

.kehua-gk-vip-tip:hover {
	background: #fef3c7;
	color: #78350f;
	text-decoration: none;
}

.kehua-gk-vip-tip--on {
	background: #ecfdf5;
	color: #047857;
	cursor: default;
}

.kehua-gk-vip-tip--on i {
	color: #10b981;
}

.kehua-gk-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 48px;
	margin: 0 0 12px;
	padding: 12px 20px;
	border: none;
	border-radius: 999px;
	background: linear-gradient(135deg, #3d9b5c 0%, #2d7a47 100%);
	color: #fff;
	font-size: 16px;
	font-weight: 750;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 8px 20px rgba(45, 122, 71, 0.28);
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.kehua-gk-cta i {
	font-size: 20px;
}

.kehua-gk-cta em {
	font-style: normal;
	font-weight: 800;
	margin-right: 2px;
}

.kehua-gk-cta:hover:not(:disabled) {
	filter: brightness(1.04);
	box-shadow: 0 10px 24px rgba(45, 122, 71, 0.34);
	color: #fff;
	text-decoration: none;
}

.kehua-gk-cta:active:not(:disabled) {
	transform: scale(0.98);
}

.kehua-gk-cta:disabled {
	opacity: 0.6;
	cursor: wait;
	box-shadow: none;
}

.kehua-gk-cta--login {
	background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
	box-shadow: 0 8px 20px rgba(55, 65, 81, 0.22);
}

.kehua-gk-start-foot {
	margin: 0 0 6px;
	font-size: 12px;
	color: #9ca3af;
	line-height: 1.45;
}

.kehua-gk-pick-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	margin-bottom: 10px;
	text-align: left;
}

.kehua-gk-pick:not(.kehua-gk-cta) {
	width: 100%;
	text-align: left;
	border: 1px solid #e8ece9;
	box-shadow: none;
	background: #f7f9f8;
	border-radius: 14px;
	padding: 14px 16px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 4px;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.kehua-gk-pick:not(.kehua-gk-cta):hover:not(:disabled) {
	background: var(--kh-gh-soft);
	border-color: #c5d4cb;
}

.kehua-gk-pick:not(.kehua-gk-cta):disabled {
	opacity: 0.55;
	cursor: wait;
}

.kehua-gk-pick-name {
	font-weight: 750;
	font-size: 15px;
	color: var(--kh-gh-ink);
}

.kehua-gk-pick-meta {
	font-size: 12px;
	color: var(--kh-gh-muted);
}

.kehua-gk-modal-back {
	display: block;
	text-align: center;
	margin-top: 8px;
	font-size: 13px;
	color: var(--kh-gh-muted);
	text-decoration: none;
}

.kehua-gk-modal-back:hover {
	color: var(--kh-gh-accent-deep);
	text-decoration: none;
}

.kehua-gk-modal-card--result {
	text-align: center;
	padding-top: 32px;
}

.kehua-gk-modal-card--result strong {
	display: block;
	font-size: 22px;
	font-weight: 800;
	color: var(--kh-gh-ink);
	margin-bottom: 8px;
}

.kehua-gk-modal-card--result p {
	margin: 0 0 20px;
	color: var(--kh-gh-muted);
	font-size: 14px;
}

.kehua-gk-result-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.kehua-gh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 16px;
	border-radius: 10px;
	border: none;
	box-shadow: none;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.kehua-gh-btn-primary {
	background: var(--kh-gh-accent-deep);
	color: #fff;
}

.kehua-gh-btn-ghost {
	background: #f3f5f4;
	color: var(--kh-gh-ink);
}

@media (max-width: 860px) {
	body.kehua-gamehall-route .kehua-layout.kehua-layout-no-left {
		padding-left: calc(12px + env(safe-area-inset-left, 0px));
		padding-right: calc(12px + env(safe-area-inset-right, 0px));
	}

	.kehua-gh-hero {
		min-height: 180px;
		padding: 28px 20px 24px;
		background-position: 70% center;
	}

	.kehua-gh-hero::before {
		background: linear-gradient(180deg, rgba(247, 249, 248, 0.92) 0%, rgba(247, 249, 248, 0.72) 55%, rgba(247, 249, 248, 0.35) 100%);
	}

	.kehua-gh-card {
		max-width: none;
	}

	.kehua-gh-bottom {
		grid-template-columns: 1fr;
	}

	/* 手机端保持「用户 | VS | AI」同一行，避免竖向堆叠 */
	.kehua-gk-vs {
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
		align-items: center;
		gap: 4px 6px;
		padding: 6px 0 10px;
		margin-bottom: 12px;
	}

	.kehua-gk-vs-side {
		gap: 6px;
	}

	.kehua-gk-vs-side--you {
		justify-content: flex-start;
	}

	.kehua-gk-vs-side--ai {
		justify-content: flex-end;
		flex-direction: row;
	}

	.kehua-gk-vs-avatar,
	.kehua-gk-vs-avatar img,
	.kehua-gk-vs-fallback,
	.kehua-gk-vs-ai-face {
		width: 40px;
		height: 40px;
	}

	.kehua-gk-vs-fallback {
		font-size: 15px;
	}

	.kehua-gk-vs-ai-face {
		font-size: 20px;
	}

	.kehua-gk-vs-stone {
		width: 16px;
		height: 16px;
		font-size: 11px;
		right: -1px;
		bottom: -1px;
	}

	.kehua-gk-vs-meta {
		gap: 1px;
	}

	.kehua-gk-vs-meta--ai {
		align-items: flex-end;
		text-align: right;
	}

	.kehua-gk-vs-name {
		font-size: 12px;
		max-width: 72px;
	}

	.kehua-gk-vs-tag {
		font-size: 11px;
	}

	.kehua-gk-vs-center {
		min-width: 0;
		gap: 3px;
	}

	.kehua-gk-vs-badge {
		width: 32px;
		height: 32px;
		font-size: 11px;
	}

	.kehua-gk-vs-stats {
		flex-wrap: wrap;
		justify-content: center;
		gap: 2px 6px;
		font-size: 10px;
		max-width: 148px;
		line-height: 1.35;
	}

	.kehua-gk-vs-stats em {
		margin-right: 2px;
	}

	.kehua-gk-vs-stat-sep {
		display: none;
	}

	.kehua-gk-vs-abort {
		padding: 3px 10px;
		font-size: 11px;
	}

	.kehua-gh-resume {
		flex-direction: column;
		align-items: stretch;
	}

	.kehua-gh-cats {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
	}

	.kehua-gh-cat {
		flex: 0 0 auto;
	}
}

@media (max-width: 420px) {
	.kehua-gk-vs-meta {
		display: none;
	}

	.kehua-gk-vs-stats {
		max-width: 120px;
	}
}

@media (max-width: 720px) {
	.kehua-gh-games {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.kehua-gh-card {
		max-width: none;
		padding: 14px 12px 12px;
		gap: 10px;
		border-radius: 16px;
	}

	.kehua-gh-card-ico {
		width: 44px;
		height: 44px;
		border-radius: 12px;
		font-size: 22px;
	}

	.kehua-gh-card-ico--img {
		width: 52px;
		height: 52px;
		padding: 0;
		background: transparent;
		box-shadow: none;
	}

	.kehua-gh-card-body {
		gap: 6px;
	}

	.kehua-gh-card-title {
		font-size: 15px;
	}

	.kehua-gh-card-desc {
		font-size: 11px;
		line-height: 1.4;
		min-height: calc(1.4em * 2);
		-webkit-line-clamp: 2;
	}

	.kehua-gh-start-btn {
		align-self: stretch;
		width: 100%;
		margin-top: auto;
		min-height: 32px;
		padding: 0 10px;
		font-size: 12px;
		box-sizing: border-box;
	}

	.kehua-gh-card-players {
		font-size: 11px;
		padding-top: 2px;
	}
}

@media (max-width: 360px) {
	.kehua-gh-games {
		gap: 8px;
	}

	.kehua-gh-card {
		padding: 12px 10px 10px;
	}

	.kehua-gh-card-title {
		font-size: 14px;
	}
}

/* 大话王 */
.kehua-bluff {
	--kh-gh-ink: #1a1f1c;
	--kh-gh-muted: #6b7280;
	--kh-gh-line: rgba(26, 31, 28, 0.08);
	--kh-gh-accent: #34c759;
	--kh-gh-accent-deep: #28a745;
	--kh-gh-soft: #eaf8ee;
	--kh-gh-card: #ffffff;
	--kh-gh-page: #f3f5f4;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	color: var(--kh-gh-ink);
}

.kehua-bluff .kehua-gh-btn-primary {
	background: #2d7a47;
	color: #fff;
	box-shadow: 0 6px 16px rgba(45, 122, 71, 0.22);
}

.kehua-bluff .kehua-gh-btn-primary:hover {
	filter: brightness(1.05);
	color: #fff;
	text-decoration: none;
}

.kehua-bf-section {
	margin: 0 auto 8px;
	max-width: 400px;
}

.kehua-bf-deck {
	max-width: 400px;
	margin: 0 auto;
	perspective: 1200px;
}

.kehua-bf-deck-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4;
	max-height: min(68vh, 540px);
	/* 竖滑交给 JS 换牌，禁止浏览器在此区域滚动整页 */
	touch-action: none;
	overscroll-behavior: none;
	padding: 8px 18px 12px;
	box-sizing: border-box;
}

.kehua-bf-foot {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	margin-top: 18px;
	padding: 0 18px;
	box-sizing: border-box;
}

.kehua-bf-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 0 16px;
	border: none;
	border-radius: 14px;
	background: #1a1f1c;
	color: #fff;
	font-size: 15px;
	font-weight: 750;
	letter-spacing: 0.02em;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 10px 24px rgba(26, 31, 28, 0.16);
	transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.kehua-bf-cta:hover {
	background: #2a312c;
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 12px 28px rgba(26, 31, 28, 0.2);
}

.kehua-bf-cta:active {
	transform: translateY(0);
}

.kehua-bf-skip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	align-self: center;
	border: none;
	background: transparent;
	padding: 4px 8px;
	color: #9ca3af;
	font-size: 13px;
	font-weight: 650;
	cursor: pointer;
	transition: color 0.15s ease;
}

.kehua-bf-skip i {
	font-size: 15px;
}

.kehua-bf-skip:hover {
	color: #4b5563;
}

.kehua-bf-card {
	position: absolute;
	inset: 8px 18px 20px;
	background: #fff;
	border-radius: 22px;
	padding: 20px 18px 16px;
	border: 1px solid rgba(15, 23, 42, 0.07);
	box-shadow: 0 16px 40px rgba(20, 28, 24, 0.12);
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	overflow: hidden;
	transform-origin: 50% 90%;
	will-change: transform, opacity;
	transition: transform 0.32s cubic-bezier(0.22, 0.9, 0.3, 1), opacity 0.28s ease, box-shadow 0.28s ease;
	backface-visibility: hidden;
}

.kehua-bf-card.is-front {
	z-index: 5;
	transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
	opacity: 1;
	animation: kehuaBfFloat 3.6s ease-in-out infinite;
}

.kehua-bf-card.is-layer-1 {
	z-index: 3;
	transform: translate3d(14px, 14px, -40px) rotate(7deg) scale(0.94);
	opacity: 0.92;
	pointer-events: none;
	box-shadow: 0 10px 28px rgba(20, 28, 24, 0.1);
	filter: saturate(0.92);
}

.kehua-bf-card.is-layer-2 {
	z-index: 2;
	transform: translate3d(-16px, 22px, -80px) rotate(-9deg) scale(0.88);
	opacity: 0.78;
	pointer-events: none;
	box-shadow: 0 8px 22px rgba(20, 28, 24, 0.08);
	filter: saturate(0.85) brightness(0.98);
}

.kehua-bf-card.is-ghost {
	background: linear-gradient(165deg, #ffffff 0%, #f3f5f4 100%);
}

.kehua-bf-card.is-layer-1.is-rising {
	transform: translate3d(6px, 6px, -20px) rotate(3deg) scale(0.97);
	opacity: 0.96;
}

.kehua-bf-card.is-layer-2.is-rising {
	transform: translate3d(10px, 12px, -40px) rotate(5deg) scale(0.93);
	opacity: 0.88;
}

.kehua-bf-card.is-leave-up {
	animation: none;
	transform: translate3d(28px, -118%, 0) rotate(14deg) scale(0.94);
	opacity: 0;
	box-shadow: 0 24px 48px rgba(20, 28, 24, 0.16);
}

.kehua-bf-card.is-leave-down {
	animation: none;
	transform: translate3d(-28px, 118%, 0) rotate(-14deg) scale(0.94);
	opacity: 0;
	box-shadow: 0 24px 48px rgba(20, 28, 24, 0.16);
}

.kehua-bf-card.is-enter-up {
	animation: kehuaBfEnterUp 0.38s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

.kehua-bf-card.is-enter-down {
	animation: kehuaBfEnterDown 0.38s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

@keyframes kehuaBfFloat {
	0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
	50% { transform: translate3d(0, -4px, 0) rotate(0.4deg) scale(1); }
}

@keyframes kehuaBfEnterUp {
	from {
		transform: translate3d(14px, 18px, -40px) rotate(8deg) scale(0.94);
		opacity: 0.4;
	}
	to {
		transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
		opacity: 1;
	}
}

@keyframes kehuaBfEnterDown {
	from {
		transform: translate3d(-16px, -18px, -40px) rotate(-8deg) scale(0.94);
		opacity: 0.4;
	}
	to {
		transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kehua-bf-card.is-front {
		animation: none;
	}
}

.kehua-bf-card.is-mine {
	background: linear-gradient(180deg, #fcfdfc 0%, #f7faf8 100%);
	border-style: dashed;
}

.kehua-bf-card-top {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.kehua-bf-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	background: #eef1ef;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 750;
	color: #6b7280;
}

.kehua-bf-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.kehua-bf-user {
	min-width: 0;
	flex: 1;
	font-size: 15px;
	font-weight: 750;
	color: var(--kh-gh-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kehua-bf-amount {
	display: inline-flex;
	align-items: baseline;
	gap: 3px;
	flex-shrink: 0;
	margin-left: auto;
	padding: 5px 10px;
	border-radius: 999px;
	background: #fff7ed;
	color: #9a3412;
	font-size: 12px;
	font-weight: 650;
	line-height: 1.2;
}

.kehua-bf-amount b {
	font-size: 15px;
	font-weight: 800;
	color: #c2410c;
	letter-spacing: -0.02em;
}

.kehua-bf-q {
	margin: 0;
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px 8px;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.45;
	letter-spacing: -0.015em;
	text-align: center;
	color: var(--kh-gh-ink);
	overflow: hidden;
}

.kehua-bf-q span {
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.kehua-bf-deck-actions {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.kehua-bf-deck-actions .kehua-bf-pick {
	width: 100%;
	text-align: left;
	justify-content: flex-start;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: #f8faf9;
	color: var(--kh-gh-ink);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.kehua-bf-deck-actions .kehua-bf-pick:hover {
	background: #fff7ed;
	border-color: #fdba74;
	transform: translateY(-1px);
}

.kehua-bf-deck-actions .kehua-bf-pick:disabled {
	opacity: 0.6;
	cursor: wait;
}

.kehua-bf-deck-tip {
	margin: 2px 0 0;
	text-align: center;
	font-size: 12px;
	color: #9ca3af;
}

.kehua-bf-deck-login {
	justify-content: center;
	width: 100%;
}

.kehua-bf-cancel-link {
	border: none;
	background: #f3f5f4;
	color: #6b7280;
	font-size: 14px;
	font-weight: 650;
	padding: 12px 14px;
	border-radius: 12px;
	cursor: pointer;
}

.kehua-bf-cancel-link:hover {
	color: #b91c1c;
	background: #fef2f2;
}

.kehua-bf-empty {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 32px 16px;
	color: var(--kh-gh-muted);
	background: #fff;
	border-radius: 22px;
	border: 1px dashed rgba(15, 23, 42, 0.12);
	box-sizing: border-box;
}

.kehua-bf-empty i {
	font-size: 40px;
	color: #f59e0b;
	display: block;
	margin-bottom: 10px;
}

.kehua-bf-empty p {
	margin: 0;
}

@media (max-width: 520px) {
	.kehua-bf-section {
		max-width: none;
	}

	.kehua-bf-deck {
		max-width: none;
	}

	.kehua-bf-foot {
		margin-top: 22px;
		padding: 0 14px;
	}

	.kehua-bf-deck-stage {
		aspect-ratio: 3 / 4.2;
		max-height: 72vh;
		padding: 6px 14px 12px;
	}

	.kehua-bf-card {
		inset: 6px 14px 16px;
		padding: 16px 14px 14px;
		border-radius: 18px;
	}

	.kehua-bf-card.is-layer-1 {
		transform: translate3d(10px, 12px, -40px) rotate(5deg) scale(0.94);
	}

	.kehua-bf-card.is-layer-2 {
		transform: translate3d(-12px, 18px, -80px) rotate(-6deg) scale(0.88);
	}

	.kehua-bf-q {
		font-size: 19px;
		padding: 14px 4px;
	}
}

.kehua-bf-modal-card {
	width: 100%;
	max-width: 520px;
	max-height: min(88dvh, 680px);
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 22px 26px 18px;
	text-align: left;
	box-sizing: border-box;
}

@supports not (height: 1dvh) {
	.kehua-bf-modal-card {
		max-height: min(88vh, 680px);
	}
}

@media (max-width: 560px) {
	.kehua-gk-modal:has(> .kehua-bf-modal-card) {
		align-items: flex-start;
		justify-content: center;
		padding: max(10px, env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px));
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.kehua-bf-modal-card {
		max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
		margin: 0 auto;
		padding: 18px 16px 16px;
		border-radius: 18px;
	}

	@supports not (height: 1dvh) {
		.kehua-bf-modal-card {
			max-height: calc(100vh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
		}
	}
}

.kehua-bf-pub .kehua-gk-start-title,
.kehua-bf-play .kehua-gk-start-title {
	margin: 0 0 4px;
	font-size: 18px;
	text-align: left;
}

.kehua-bf-pub,
.kehua-bf-play {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.kehua-bf-play[hidden] {
	display: none !important;
}

.kehua-bf-field > label {
	display: block;
	font-size: 12px;
	font-weight: 650;
	color: #374151;
	margin-bottom: 4px;
}

.kehua-bf-label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 4px;
}

.kehua-bf-label-row label {
	margin: 0;
	font-size: 12px;
	font-weight: 650;
	color: #374151;
}

.kehua-bf-bal {
	font-size: 12px;
	font-weight: 600;
	color: #6b7280;
	white-space: nowrap;
}

.kehua-bf-bal strong {
	color: #b45309;
	font-weight: 750;
	margin-left: 2px;
}

.kehua-bf-field input[type="text"],
.kehua-bf-field input[type="number"],
.kehua-bf-field select {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 14px;
	line-height: 1.35;
	background: #fff;
	min-height: 38px;
}

.kehua-bf-hint {
	margin: 4px 0 0;
	font-size: 11px;
	color: #9ca3af;
	line-height: 1.4;
}

.kehua-bf-random-btn {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	border: none;
	background: #f3f5f4;
	color: #374151;
	font-size: 12px;
	font-weight: 650;
	padding: 4px 10px;
	border-radius: 999px;
	cursor: pointer;
	flex-shrink: 0;
	line-height: 1.2;
}

.kehua-bf-random-btn i {
	font-size: 14px;
	color: #2d7a47;
}

.kehua-bf-random-btn:hover {
	background: #eaf8ee;
	color: #1a1f1c;
}

.kehua-bf-answers {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.kehua-bf-correct {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	padding: 2px 0;
}

.kehua-bf-correct label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	margin: 0;
	cursor: pointer;
}

.kehua-bf-pub .kehua-gk-cta {
	margin: 2px 0 0;
	min-height: 44px;
	font-size: 15px;
}

.kehua-bf-modal-rules {
	margin-top: 2px;
	padding: 10px 12px;
	border-radius: 12px;
	background: #f8faf9;
	border: 1px solid rgba(15, 23, 42, 0.06);
	font-size: 11px;
	line-height: 1.55;
	color: #6b7280;
}

.kehua-bf-modal-rules strong {
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
	color: var(--kh-gh-ink);
}

.kehua-bf-play-meta {
	margin: 0;
	font-size: 13px;
	color: var(--kh-gh-muted);
}

.kehua-bf-play-q {
	margin: 0;
	font-size: 17px;
	font-weight: 750;
	line-height: 1.45;
}

.kehua-bf-result {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 12px 8px 4px;
	gap: 10px;
}

.kehua-bf-result[hidden] {
	display: none !important;
}

.kehua-bf-result-ico {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	line-height: 1;
}

.kehua-bf-result.is-lose .kehua-bf-result-ico {
	background: #fef2f2;
	color: #dc2626;
}

.kehua-bf-result.is-win .kehua-bf-result-ico {
	background: #ecfdf5;
	color: #059669;
}

.kehua-bf-result-title {
	font-size: 20px;
	font-weight: 800;
	color: var(--kh-gh-ink);
}

.kehua-bf-result.is-lose .kehua-bf-result-title {
	color: #b91c1c;
}

.kehua-bf-result.is-win .kehua-bf-result-title {
	color: #047857;
}

.kehua-bf-result-msg {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: #6b7280;
	max-width: 22em;
}

.kehua-bf-result .kehua-gk-cta {
	margin-top: 6px;
	max-width: 220px;
}

/* 黑色半透明轻提示（替代系统 alert） */
.kehua-bf-toast {
	position: fixed;
	left: 50%;
	top: 42%;
	z-index: 13050;
	transform: translate(-50%, -12px) scale(0.96);
	max-width: min(86vw, 320px);
	padding: 14px 22px;
	border-radius: 12px;
	background: rgba(20, 20, 22, 0.82);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	text-align: center;
	letter-spacing: 0.02em;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.kehua-bf-toast.is-show {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0) scale(1);
}

.kehua-bf-pick-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.kehua-bf-pick {
	width: 100%;
	text-align: left;
	border: 1px solid #e8ece9;
	background: #f7f9f8;
	border-radius: 14px;
	padding: 14px 16px;
	font-size: 15px;
	font-weight: 650;
	cursor: pointer;
	color: var(--kh-gh-ink);
	transition: background 0.15s ease, border-color 0.15s ease;
}

.kehua-bf-pick:hover:not(:disabled) {
	background: #fff7ed;
	border-color: #fdba74;
}

.kehua-bf-pick:disabled {
	opacity: 0.6;
	cursor: wait;
}

@media (max-width: 560px) {
	.kehua-bf-answers {
		grid-template-columns: 1fr;
	}
}

/* ========== 大话王 · 夜间模式 ========== */
:is(html.kehua-dark, body.kehua-dark) .kehua-bluff {
	--kh-gh-ink: #e4e6eb;
	--kh-gh-muted: #9ca3af;
	--kh-gh-line: rgba(255, 255, 255, 0.08);
	--kh-gh-accent: #3dd068;
	--kh-gh-accent-deep: #5ee08a;
	--kh-gh-soft: rgba(52, 199, 89, 0.18);
	--kh-gh-card: #1e2228;
	--kh-gh-page: #141619;
	color: var(--kh-gh-ink);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bluff .kehua-gh-btn-primary {
	background: #34c759;
	color: #fff;
	box-shadow: 0 6px 16px rgba(52, 199, 89, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-cta {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-cta:hover {
	background: #f3f4f6;
	color: #111827;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-skip {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-skip:hover {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-card {
	background: #1e2228;
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-card.is-layer-1 {
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
	filter: saturate(0.9) brightness(0.92);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-card.is-layer-2 {
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
	filter: saturate(0.82) brightness(0.86);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-card.is-ghost {
	background: linear-gradient(165deg, #252a31 0%, #1e2228 100%);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-card.is-mine {
	background: #1e2228;
	border-color: rgba(200, 205, 212, 0.55);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-avatar {
	background: rgba(255, 255, 255, 0.08);
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-amount {
	background: rgba(194, 65, 12, 0.2);
	color: #fdba74;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-amount b {
	color: #fb923c;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-deck-actions .kehua-bf-pick {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.1);
	color: var(--kh-gh-ink);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-deck-actions .kehua-bf-pick:hover {
	background: rgba(245, 158, 11, 0.16);
	border-color: rgba(251, 191, 36, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-deck-tip {
	color: #8b939e;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-cancel-link {
	background: rgba(255, 255, 255, 0.08);
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-cancel-link:hover {
	color: #f87171;
	background: rgba(185, 28, 28, 0.18);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-empty {
	background: #1e2228;
	border-color: rgba(255, 255, 255, 0.12);
	color: var(--kh-gh-muted);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bluff .kehua-gk-modal-card {
	background: #1e2228;
	color: var(--kh-gh-ink);
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bluff .kehua-gk-modal-close {
	background: rgba(255, 255, 255, 0.08);
	color: #c4c9d1;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bluff .kehua-gk-modal-close:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-field > label,
:is(html.kehua-dark, body.kehua-dark) .kehua-bf-label-row label {
	color: #c4c9d1;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-bal {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-bal strong {
	color: #fb923c;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-field input[type="text"],
:is(html.kehua-dark, body.kehua-dark) .kehua-bf-field input[type="number"],
:is(html.kehua-dark, body.kehua-dark) .kehua-bf-field select {
	background: #252a31;
	border-color: rgba(255, 255, 255, 0.12);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-field input[type="text"]::placeholder,
:is(html.kehua-dark, body.kehua-dark) .kehua-bf-field input[type="number"]::placeholder {
	color: #6b7280;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-field input[type="text"]:focus,
:is(html.kehua-dark, body.kehua-dark) .kehua-bf-field input[type="number"]:focus,
:is(html.kehua-dark, body.kehua-dark) .kehua-bf-field select:focus {
	border-color: rgba(52, 199, 89, 0.45);
	outline: none;
	box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.15);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-hint {
	color: #8b939e;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-random-btn {
	background: rgba(255, 255, 255, 0.08);
	color: #c4c9d1;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-random-btn i {
	color: #5ee08a;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-random-btn:hover {
	background: rgba(52, 199, 89, 0.16);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-correct label {
	color: #c4c9d1;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-modal-rules {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.08);
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-modal-rules strong {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-pick {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.1);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-pick:hover:not(:disabled) {
	background: rgba(245, 158, 11, 0.16);
	border-color: rgba(251, 191, 36, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-result {
	background: #1e2228;
	color: var(--kh-gh-ink);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-result.is-lose .kehua-bf-result-ico {
	background: rgba(220, 38, 38, 0.18);
	color: #f87171;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-result.is-win .kehua-bf-result-ico {
	background: rgba(5, 150, 105, 0.2);
	color: #5ee08a;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bf-toast {
	background: #252a31;
	color: #e4e6eb;
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bluff .kehua-gk-cta {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-bluff .kehua-gk-cta:hover:not(:disabled) {
	filter: none;
	background: #f3f4f6;
	color: #111827;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

/* ---------- 成语接龙（叠卡风格） ---------- */
.kehua-idiom {
	--kh-id-ink: #1a1f1c;
	--kh-id-muted: #8b9390;
	--kh-id-card: #ffffff;
	--kh-id-page: #f3f5f4;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	color: var(--kh-id-ink);
	padding: 8px 0 36px;
	overflow-x: hidden;
}

.kehua-idiom .kehua-gh-btn-primary {
	background: #1a1f1c;
	color: #fff;
	box-shadow: 0 6px 16px rgba(26, 31, 28, 0.18);
}

.kehua-idiom .kehua-gh-btn-primary:hover {
	filter: brightness(1.08);
	color: #fff;
	text-decoration: none;
}

.kehua-id-section {
	margin: 0 auto;
	max-width: 400px;
}

.kehua-id-section[hidden] {
	display: none !important;
}

/* 弹窗打开时隐藏叠卡层，避免刷新后卡牌顶边露在开局窗后面 */
body.kehua-gk-modal-open .kehua-id-section {
	visibility: hidden !important;
	pointer-events: none !important;
}

.kehua-id-deck {
	max-width: 400px;
	margin: 0 auto;
	perspective: 1200px;
}

.kehua-id-deck-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4;
	max-height: min(68vh, 540px);
	padding: 8px 18px 12px;
	box-sizing: border-box;
}

.kehua-id-card {
	position: absolute;
	inset: 8px 18px 20px;
	background: var(--kh-id-card);
	border-radius: 22px;
	padding: 16px 18px 18px;
	border: 1px solid rgba(15, 23, 42, 0.07);
	box-shadow: 0 16px 40px rgba(20, 28, 24, 0.12);
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	overflow: hidden;
	transform-origin: 50% 90%;
	will-change: transform, opacity;
	transition: transform 0.32s cubic-bezier(0.22, 0.9, 0.3, 1), opacity 0.28s ease, box-shadow 0.28s ease;
	backface-visibility: hidden;
}

.kehua-id-card.is-front {
	z-index: 5;
	transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
	opacity: 1;
	animation: kehuaIdFloat 3.6s ease-in-out infinite;
	background:
		radial-gradient(120% 70% at 50% -10%, rgba(45, 122, 71, 0.1), transparent 55%),
		linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
}

.kehua-id-card.is-front.is-pulse {
	animation: kehuaIdPulse 0.42s cubic-bezier(0.22, 0.9, 0.3, 1);
}

.kehua-id-card.is-layer-1 {
	z-index: 3;
	transform: translate3d(14px, 14px, -40px) rotate(7deg) scale(0.94);
	opacity: 0.92;
	pointer-events: none;
	box-shadow: 0 10px 28px rgba(20, 28, 24, 0.1);
	filter: saturate(0.92);
}

.kehua-id-card.is-layer-2 {
	z-index: 2;
	transform: translate3d(-16px, 22px, -80px) rotate(-9deg) scale(0.88);
	opacity: 0.78;
	pointer-events: none;
	box-shadow: 0 8px 22px rgba(20, 28, 24, 0.08);
	filter: saturate(0.85) brightness(0.98);
}

.kehua-id-card.is-ghost {
	background: linear-gradient(165deg, #ffffff 0%, #f3f5f4 100%);
}

@keyframes kehuaIdFloat {
	0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
	50% { transform: translate3d(0, -4px, 0) rotate(0.4deg) scale(1); }
}

@keyframes kehuaIdPulse {
	0% { transform: translate3d(0, 0, 0) scale(1); }
	40% { transform: translate3d(0, -6px, 0) scale(1.015); }
	100% { transform: translate3d(0, 0, 0) scale(1); }
}

.kehua-id-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
	flex-shrink: 0;
}

.kehua-id-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 12px;
	background: rgba(26, 31, 28, 0.05);
	color: var(--kh-id-ink);
	text-decoration: none;
	flex-shrink: 0;
	transition: background 0.15s ease;
}

.kehua-id-back:hover {
	background: rgba(26, 31, 28, 0.1);
	color: var(--kh-id-ink);
	text-decoration: none;
}

.kehua-id-back i {
	font-size: 22px;
	line-height: 1;
}

.kehua-id-meta {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 6px;
	min-width: 0;
}

.kehua-id-meta-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(26, 31, 28, 0.08);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.kehua-id-meta-pill--soft {
	background: rgba(45, 122, 71, 0.1);
	color: #2d7a47;
	font-weight: 650;
}

.kehua-id-meta-pill b {
	font-weight: 800;
}

.kehua-id-hero {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 0;
	padding: 4px 4px 10px;
}

.kehua-id-hero-label {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 650;
	letter-spacing: 0.28em;
	color: var(--kh-id-muted);
	text-indent: 0.28em;
}

.kehua-id-need {
	font-size: clamp(40px, 12vw, 64px);
	font-weight: 800;
	line-height: 1;
	color: var(--kh-id-ink);
	letter-spacing: 0.06em;
	text-indent: 0.06em;
}

.kehua-id-prev {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--kh-id-muted);
}

.kehua-id-prev strong {
	color: var(--kh-id-ink);
	font-weight: 700;
	letter-spacing: 0.08em;
}

.kehua-id-play-mid {
	position: relative;
	flex-shrink: 0;
	z-index: 2;
}

/* 悬浮在选字框上方空白处，不占高度、不挡大字 */
.kehua-id-tip {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 10px);
	z-index: 20;
	margin: 0;
	padding: 7px 14px;
	border-radius: 999px;
	background: rgba(26, 31, 28, 0.92);
	color: #fff;
	font-size: 13px;
	font-weight: 650;
	line-height: 1.35;
	letter-spacing: 0.02em;
	white-space: nowrap;
	opacity: 0;
	transform: translateX(-50%) translateY(6px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.kehua-id-tip.is-show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.kehua-id-tip[hidden] {
	display: none !important;
}

.kehua-id-slots {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin: 0 0 12px;
	flex-shrink: 0;
}

.kehua-id-slot {
	height: 48px;
	border-radius: 14px;
	border: 1.5px dashed rgba(26, 31, 28, 0.18);
	background: rgba(255, 255, 255, 0.7);
	font-size: 22px;
	font-weight: 750;
	color: var(--kh-id-ink);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.kehua-id-slot.is-active {
	border-color: rgba(45, 122, 71, 0.55);
	background: rgba(45, 122, 71, 0.06);
}

.kehua-id-slot.is-filled {
	border-style: solid;
	border-color: rgba(26, 31, 28, 0.12);
	background: #fff;
	box-shadow: 0 4px 12px rgba(20, 28, 24, 0.06);
}

.kehua-id-pool {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 8px;
	flex-shrink: 0;
	margin-top: auto;
}

.kehua-id-char {
	height: 44px;
	border-radius: 12px;
	border: 1px solid rgba(26, 31, 28, 0.1);
	background: #fff;
	font-size: 18px;
	font-weight: 700;
	color: var(--kh-id-ink);
	cursor: pointer;
	transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.kehua-id-char:hover:not(:disabled) {
	border-color: rgba(45, 122, 71, 0.45);
	background: rgba(45, 122, 71, 0.08);
	transform: translateY(-1px);
}

.kehua-id-char:active:not(:disabled) {
	transform: scale(0.96);
}

.kehua-id-char.is-used,
.kehua-id-char:disabled {
	opacity: 0.28;
	cursor: default;
	transform: none;
}

.kehua-id-pool-empty {
	grid-column: 1 / -1;
	margin: 0;
	text-align: center;
	font-size: 12px;
	color: #b0b7b3;
}

.kehua-id-foot {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	margin-top: 18px;
	padding: 0 18px;
	box-sizing: border-box;
}

.kehua-id-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 0 16px;
	border: none;
	border-radius: 14px;
	background: #1a1f1c;
	color: #fff;
	font-size: 15px;
	font-weight: 750;
	letter-spacing: 0.02em;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 10px 24px rgba(26, 31, 28, 0.16);
	transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.kehua-id-cta:hover {
	background: #2a312c;
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 12px 28px rgba(26, 31, 28, 0.2);
}

.kehua-id-cta:active {
	transform: translateY(0);
}

.kehua-id-leave-card {
	max-width: 320px;
	padding: 28px 22px 20px;
	border-radius: 22px;
	text-align: center;
	box-shadow: 0 18px 48px rgba(20, 28, 24, 0.18);
}

.kehua-id-leave-ico {
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(26, 31, 28, 0.06);
	color: #1a1f1c;
	font-size: 24px;
}

.kehua-id-leave-card strong {
	display: block;
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 800;
	color: #1a1f1c;
	letter-spacing: 0.02em;
}

.kehua-id-leave-card > p {
	margin: 0 0 20px;
	font-size: 13px;
	line-height: 1.65;
	color: #6b7280;
}

.kehua-id-leave-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.kehua-id-leave-stay,
.kehua-id-leave-go {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	padding: 0 16px;
	border: none;
	border-radius: 14px;
	font-size: 15px;
	font-weight: 750;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.kehua-id-leave-stay {
	background: #f3f5f4;
	color: #3f4a45;
}

.kehua-id-leave-stay:hover {
	background: #e8ece9;
}

.kehua-id-leave-go {
	background: #1a1f1c;
	color: #fff;
	box-shadow: 0 10px 24px rgba(26, 31, 28, 0.16);
}

.kehua-id-leave-go:hover {
	background: #2a312c;
	transform: translateY(-1px);
}

.kehua-id-leave-go:active,
.kehua-id-leave-stay:active {
	transform: translateY(0);
}

.kehua-id-abandon-tip {
	margin: 0 0 14px;
	padding: 8px 12px;
	border-radius: 10px;
	background: #fff7ed;
	color: #b45309;
	font-size: 12px;
	line-height: 1.5;
	font-weight: 650;
}

.kehua-id-toast,
.kehua-gk-toast {
	position: fixed;
	left: 50%;
	top: 42%;
	bottom: auto;
	transform: translate(-50%, -50%) translateY(10px);
	z-index: 13000;
	max-width: min(92vw, 420px);
	padding: 12px 20px;
	border-radius: 14px;
	background: rgba(26, 31, 28, 0.92);
	color: #fff;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
	word-break: keep-all;
	overflow-wrap: break-word;
	opacity: 0;
	pointer-events: none;
	box-shadow: 0 12px 32px rgba(20, 28, 24, 0.22);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.kehua-id-toast.is-show,
.kehua-gk-toast.is-show {
	opacity: 1;
	transform: translate(-50%, -50%) translateY(0);
}

.kehua-idiom .sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 560px) {
	.kehua-id-deck-stage {
		max-height: min(70vh, 560px);
		padding: 4px 12px 8px;
	}
	.kehua-id-card {
		inset: 6px 12px 16px;
		padding: 14px 14px 16px;
	}
	.kehua-id-card.is-layer-1 {
		transform: translate3d(10px, 12px, -40px) rotate(6deg) scale(0.94);
	}
	.kehua-id-card.is-layer-2 {
		transform: translate3d(-12px, 18px, -80px) rotate(-8deg) scale(0.88);
	}
	.kehua-id-char {
		height: 42px;
		font-size: 17px;
	}
	.kehua-id-foot {
		margin-top: 14px;
		padding: 0 12px;
	}
}

/* ========== 成语接龙 · 夜间模式 ========== */
:is(html.kehua-dark, body.kehua-dark) .kehua-idiom {
	--kh-id-ink: #e4e6eb;
	--kh-id-muted: #9ca3af;
	--kh-id-card: #1e2228;
	--kh-id-page: #141619;
	color: var(--kh-id-ink);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gh-btn-primary {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gh-btn-primary:hover {
	filter: none;
	background: #f3f4f6;
	color: #111827;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gh-btn-ghost {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gh-btn-ghost:hover {
	background: #f3f4f6;
	color: #111827;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-card {
	background: #1e2228;
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-card.is-front {
	background: #1e2228;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-card.is-layer-1 {
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
	filter: saturate(0.9) brightness(0.92);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-card.is-layer-2 {
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
	filter: saturate(0.82) brightness(0.86);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-card.is-ghost {
	background: #1e2228;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-back {
	background: rgba(255, 255, 255, 0.08);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-back:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-meta-pill {
	background: rgba(255, 255, 255, 0.1);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-meta-pill--soft {
	background: rgba(255, 255, 255, 0.1);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-slot {
	border-color: rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.05);
	color: var(--kh-id-ink);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-slot.is-active {
	border-color: rgba(180, 190, 200, 0.55);
	background: rgba(255, 255, 255, 0.1);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-slot.is-filled {
	border-color: rgba(255, 255, 255, 0.14);
	background: #252a31;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-char {
	border-color: rgba(255, 255, 255, 0.12);
	background: #252a31;
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-char:hover:not(:disabled) {
	border-color: rgba(180, 190, 200, 0.45);
	background: rgba(255, 255, 255, 0.1);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-pool-empty {
	color: #6b7280;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-cta {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-cta:hover {
	background: #f3f4f6;
	color: #111827;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gk-modal-card {
	background: #1e2228;
	color: var(--kh-id-ink);
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gk-modal-close {
	background: rgba(255, 255, 255, 0.08);
	color: #c4c9d1;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gk-modal-close:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gk-cta {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gk-cta:hover:not(:disabled) {
	filter: none;
	background: #f3f4f6;
	color: #111827;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gk-start-foot,
:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gk-modal-back {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gk-modal-back:hover {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-leave-card {
	background: #1e2228;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-leave-ico {
	background: rgba(255, 255, 255, 0.08);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-leave-card strong {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-leave-card > p {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-leave-stay {
	background: rgba(255, 255, 255, 0.1);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-leave-stay:hover {
	background: rgba(255, 255, 255, 0.16);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-leave-go {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-leave-go:hover {
	background: #f3f4f6;
	color: #111827;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-id-abandon-tip {
	background: rgba(180, 83, 9, 0.18);
	color: #fdba74;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gk-tag--amber {
	background: rgba(245, 158, 11, 0.18);
	color: #fbbf24;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-idiom .kehua-gk-tag--danger {
	background: rgba(239, 68, 68, 0.18);
	color: #f87171;
}

/* Fallback when color-mix unsupported */
@supports not (background: color-mix(in srgb, #34c759 16%, #fff)) {
	.kehua-gh-card-ico {
		background: #eaf8ee;
	}
}

/* ========== 连连看 ========== */
.kehua-llk {
	--llk-bg: #f3f5f8;
	--llk-card: #ffffff;
	--llk-accent: #8b5cf6;
	--llk-accent-rgb: 139, 92, 246;
	width: 100%;
	max-width: min(1100px, 100%);
	margin: 0 auto;
	padding: 8px 10px 20px;
	box-sizing: border-box;
}
.kehua-llk-stage {
	background: var(--llk-card);
	border-radius: 16px;
	padding: 10px 10px 14px;
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}
.kehua-llk-stage[hidden] {
	display: none !important;
}
.kehua-llk-top {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}
.kehua-llk-back {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #f1f5f9;
	color: #334155;
	font-size: 22px;
	text-decoration: none;
	flex-shrink: 0;
}
.kehua-llk-meta {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
}
.kehua-llk-sound-btn {
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 10px;
	background: #f1f5f9;
	color: #64748b;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 18px;
	padding: 0;
	flex-shrink: 0;
	transition: background 0.15s ease, color 0.15s ease;
}
.kehua-llk-sound-btn:hover {
	background: #e2e8f0;
	color: #0f172a;
}
.kehua-llk-sound-btn.is-on {
	color: #7c3aed;
	background: rgba(139, 92, 246, 0.12);
}
.kehua-llk-sound-btn .kehua-llk-sound-off {
	display: none;
}
.kehua-llk-sound-btn.is-off .kehua-llk-sound-on {
	display: none;
}
.kehua-llk-sound-btn.is-off .kehua-llk-sound-off {
	display: inline;
}
.kehua-llk-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(var(--llk-accent-rgb), 0.12);
	color: #5b21b6;
	font-size: 13px;
	font-weight: 600;
}
.kehua-llk-pill--soft {
	background: #f1f5f9;
	color: #475569;
	font-weight: 500;
}
.kehua-llk-pill b {
	font-weight: 700;
	color: #0f172a;
}
.kehua-llk-hint {
	margin: 0;
	text-align: center;
	color: #64748b;
	font-size: 12px;
	line-height: 1.35;
	min-width: 0;
}
.kehua-llk-board-wrap {
	position: relative;
	width: 100%;
	/* 尽量拉满可视高度，让格子更大 */
	max-height: min(78vh, 860px);
}
.kehua-llk-board {
	display: grid;
	grid-template-columns: var(--llk-cols-track, repeat(10, minmax(0, 1fr)));
	grid-template-rows: var(--llk-rows-track, repeat(8, minmax(0, 1fr)));
	gap: 6px;
	/* 外圈边轨压成 0 后，按内盘比例拉满宽度，并受视口高度限制 */
	width: min(100%, calc(min(78vh, 860px) * var(--llk-inner-cols, 8) / var(--llk-inner-rows, 6)));
	max-width: 100%;
	aspect-ratio: var(--llk-inner-cols, 8) / var(--llk-inner-rows, 6);
	max-height: min(78vh, 860px);
	margin: 0 auto;
	user-select: none;
	box-sizing: border-box;
}
.kehua-llk-cell {
	border: none;
	border-radius: 12px;
	padding: 0;
	margin: 0;
	background: transparent;
	min-width: 0;
	min-height: 0;
	width: 100%;
	height: 100%;
	position: relative;
}
.kehua-llk-cell.is-pad {
	visibility: hidden;
	pointer-events: none;
	overflow: hidden;
}
.kehua-llk-cell.is-empty {
	visibility: hidden;
	pointer-events: none;
}
.kehua-llk-cell.is-tile {
	background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
	box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.12);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
	overflow: visible;
}
.kehua-llk-cell.is-tile:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 14px rgba(139, 92, 246, 0.18);
}
.kehua-llk-cell.is-on {
	background: linear-gradient(180deg, #ede9fe 0%, #ddd6fe 100%);
	box-shadow: 0 0 0 2px #8b5cf6, 0 8px 18px rgba(139, 92, 246, 0.25);
	z-index: 2;
}
.kehua-llk-cell.is-match {
	z-index: 4;
	background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
	box-shadow: 0 0 0 2px #f59e0b, 0 0 18px rgba(245, 158, 11, 0.45);
	animation: kehua-llk-match-pulse 0.28s ease;
}
.kehua-llk-cell.is-pop {
	z-index: 6;
	pointer-events: none;
	animation: kehua-llk-pop 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.kehua-llk-cell.is-shake {
	animation: kehua-llk-shake 0.32s ease;
}
@keyframes kehua-llk-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}
@keyframes kehua-llk-match-pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.08); }
	100% { transform: scale(1); }
}
@keyframes kehua-llk-pop {
	0% {
		transform: scale(1) rotate(0deg);
		opacity: 1;
		filter: brightness(1);
	}
	35% {
		transform: scale(1.22) rotate(-4deg);
		opacity: 1;
		filter: brightness(1.15);
	}
	100% {
		transform: scale(0.15) rotate(12deg);
		opacity: 0;
		filter: brightness(1.4);
	}
}
.kehua-llk-spark {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 7px;
	height: 7px;
	margin: -3px 0 0 -3px;
	border-radius: 50%;
	background: radial-gradient(circle, #fde68a 0%, #f59e0b 55%, transparent 70%);
	pointer-events: none;
	animation: kehua-llk-spark-fly 0.42s ease-out forwards;
	animation-delay: var(--sd, 0s);
}
@keyframes kehua-llk-spark-fly {
	0% {
		opacity: 1;
		transform: translate(0, 0) scale(1);
	}
	100% {
		opacity: 0;
		transform: translate(var(--sx, 12px), var(--sy, -12px)) scale(0.2);
	}
}
.kehua-llk-ico {
	font-size: clamp(22px, 5.2vw, 42px);
	line-height: 1;
	pointer-events: none;
}
.kehua-llk-lines {
	position: absolute;
	left: 0;
	top: 0;
	pointer-events: none;
	overflow: visible;
	z-index: 5;
}
.kehua-llk-path {
	fill: none;
	stroke: #a78bfa;
	stroke-width: 4;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0.95;
	filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.55));
	transition: stroke-dashoffset 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.kehua-llk-path--glow {
	stroke: #fbbf24;
	stroke-width: 10;
	opacity: 0.35;
	filter: blur(1.5px) drop-shadow(0 0 8px rgba(251, 191, 36, 0.55));
	transition: stroke-dashoffset 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
.kehua-llk-path.is-draw {
	animation: kehua-llk-path-glow 0.45s ease;
}
.kehua-llk-path--glow.is-draw {
	animation: kehua-llk-path-glow-soft 0.45s ease;
}
@keyframes kehua-llk-path-glow {
	0% { stroke: #c4b5fd; }
	50% { stroke: #f59e0b; }
	100% { stroke: #a78bfa; }
}
@keyframes kehua-llk-path-glow-soft {
	0% { opacity: 0.15; }
	40% { opacity: 0.5; }
	100% { opacity: 0.2; }
}
.kehua-llk-path-dot {
	fill: #fbbf24;
	stroke: #fff;
	stroke-width: 1.5;
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
	animation: kehua-llk-dot-pop 0.35s ease forwards;
}
.kehua-llk-path-dot.is-end {
	animation-delay: 0.18s;
}
@keyframes kehua-llk-dot-pop {
	0% { opacity: 0; transform: scale(0.3); }
	40% { opacity: 1; transform: scale(1.35); }
	100% { opacity: 0.9; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
	.kehua-llk-path,
	.kehua-llk-path--glow {
		transition: none;
	}
	.kehua-llk-cell.is-pop,
	.kehua-llk-cell.is-match,
	.kehua-llk-spark,
	.kehua-llk-path-dot {
		animation: none !important;
	}
	.kehua-llk-cell.is-pop {
		opacity: 0;
	}
}
@media (max-width: 860px) {
	.kehua-llk {
		--llk-mobile-h: calc(100vh - var(--header-h) - env(safe-area-inset-bottom, 0px));
		--llk-mobile-h: calc(100dvh - var(--header-h) - env(safe-area-inset-bottom, 0px));
		padding: 0;
		max-width: none;
		width: 100%;
		min-height: var(--llk-mobile-h);
		display: flex;
		flex-direction: column;
	}
	/* 对局中固定铺满顶栏以下，避免大屏上下留白 */
	.kehua-llk.is-playing {
		position: fixed;
		left: 0;
		right: 0;
		top: var(--header-h);
		bottom: 0;
		z-index: 40;
		width: 100%;
		height: auto;
		min-height: 0;
		max-height: none;
		overflow: hidden;
		background: var(--llk-card, #ffffff);
	}
	.kehua-llk:has(.kehua-llk-stage:not([hidden])) {
		height: var(--llk-mobile-h);
		max-height: var(--llk-mobile-h);
		overflow: hidden;
	}
	.kehua-llk.is-playing:has(.kehua-llk-stage:not([hidden])) {
		height: auto;
		max-height: none;
	}
	.kehua-llk-stage {
		flex: 1 1 auto;
		display: flex;
		flex-direction: column;
		min-height: 0;
		height: 100%;
		padding: 6px 6px calc(4px + env(safe-area-inset-bottom, 0px));
		border-radius: 0;
		box-shadow: none;
		box-sizing: border-box;
	}
	.kehua-llk-top {
		display: flex;
		justify-content: space-between;
		flex-shrink: 0;
		margin-bottom: 2px;
	}
	.kehua-llk-hint {
		/* 对局中收起提示，把高度留给正方形棋盘 */
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
	.kehua-llk-board-wrap {
		flex: 1 1 auto;
		min-height: 0;
		max-height: none;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.kehua-llk-board {
		/* 宽高由 JS 按正方形格子精确计算 */
		width: auto;
		height: auto;
		max-width: 100%;
		max-height: 100%;
		aspect-ratio: auto;
		margin: 0;
		gap: 2px;
	}
	.kehua-llk-cell.is-tile {
		border-radius: 8px;
	}
	.kehua-llk-ico {
		font-size: clamp(18px, var(--llk-cell, 7vw), 42px);
		line-height: 1;
	}
}

@media (max-width: 560px) {
	.kehua-llk-stage {
		padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
	}
	.kehua-llk-board {
		gap: 2px;
	}
	.kehua-llk-pill {
		padding: 5px 8px;
		font-size: 12px;
	}
	.kehua-llk-back,
	.kehua-llk-sound-btn {
		width: 32px;
		height: 32px;
	}
}
@media (min-width: 900px) {
	.kehua-llk {
		padding: 12px 16px 28px;
	}
	.kehua-llk-stage {
		padding: 14px 16px 18px;
	}
	.kehua-llk-board {
		gap: 8px;
	}
	.kehua-llk-ico {
		font-size: clamp(28px, 3.6vw, 48px);
	}
}

/* 连连看 · 通关结果弹窗 */
.kehua-llk-result-modal .kehua-gk-modal-mask {
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}
.kehua-llk-result-card {
	position: relative;
	overflow: hidden;
	width: min(360px, calc(100vw - 32px));
	margin: 0 auto;
	padding: 28px 22px 22px;
	border-radius: 22px;
	text-align: center;
	background:
		radial-gradient(120% 80% at 50% -10%, rgba(251, 191, 36, 0.28) 0%, transparent 55%),
		linear-gradient(180deg, #fffaf0 0%, #ffffff 42%, #faf5ff 100%);
	box-shadow:
		0 24px 48px rgba(15, 23, 42, 0.22),
		0 0 0 1px rgba(139, 92, 246, 0.08);
	animation: kehua-llk-result-in 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.kehua-llk-result-glow {
	position: absolute;
	left: 50%;
	top: -40px;
	width: 180px;
	height: 180px;
	transform: translateX(-50%);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(250, 204, 21, 0.35) 0%, transparent 70%);
	pointer-events: none;
}
.kehua-llk-result-ico {
	position: relative;
	width: 72px;
	height: 72px;
	margin: 0 auto 14px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.kehua-llk-result-trophy {
	font-size: 52px;
	line-height: 1;
	filter: drop-shadow(0 8px 16px rgba(245, 158, 11, 0.35));
	animation: kehua-llk-trophy-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.kehua-llk-result-spark {
	position: absolute;
	font-size: 18px;
	line-height: 1;
	animation: kehua-llk-spark 1.4s ease-in-out infinite;
}
.kehua-llk-result-spark--1 {
	top: 2px;
	right: -2px;
	animation-delay: 0.1s;
}
.kehua-llk-result-spark--2 {
	bottom: 6px;
	left: -4px;
	animation-delay: 0.55s;
}
.kehua-llk-result-title {
	display: block;
	margin: 0 0 6px;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: #5b21b6;
	background: linear-gradient(90deg, #7c3aed 0%, #db2777 55%, #ea580c 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.kehua-llk-result-msg {
	margin: 0 0 16px;
	font-size: 14px;
	color: #64748b;
	line-height: 1.5;
}
.kehua-llk-result-reward {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0 auto 20px;
	padding: 12px 16px;
	max-width: 260px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(251, 191, 36, 0.18) 0%, rgba(249, 115, 22, 0.12) 100%);
	border: 1px solid rgba(245, 158, 11, 0.28);
}
.kehua-llk-result-reward[hidden] {
	display: none !important;
}
.kehua-llk-result-reward-label {
	font-size: 13px;
	color: #92400e;
	font-weight: 600;
}
.kehua-llk-result-reward-val {
	font-size: 22px;
	font-weight: 800;
	color: #c2410c;
	letter-spacing: 0.02em;
}
.kehua-llk-result-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.kehua-llk-result-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	padding: 0 16px;
	border-radius: 12px;
	border: none;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.kehua-llk-result-btn--primary {
	color: #2f6f5e;
	background: #e8f6f1;
	border: 1px solid #b8e4d4;
	box-shadow: none;
	font-weight: 650;
}
.kehua-llk-result-btn--primary:hover {
	transform: translateY(-1px);
	filter: none;
	color: #245a4c;
	background: #dff2eb;
	border-color: #9fd6c2;
	text-decoration: none;
}
.kehua-llk-result-btn--ghost {
	color: #64748b;
	background: #f7f8fa;
	border: 1px solid #e8ecf1;
	font-weight: 600;
}
.kehua-llk-result-btn--ghost:hover {
	background: #eef1f5;
	color: #334155;
	border-color: #dbe1e8;
	text-decoration: none;
}
@keyframes kehua-llk-result-in {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.94);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}
@keyframes kehua-llk-trophy-pop {
	0% { transform: scale(0.4) rotate(-12deg); opacity: 0; }
	60% { transform: scale(1.12) rotate(4deg); opacity: 1; }
	100% { transform: scale(1) rotate(0); }
}
@keyframes kehua-llk-spark {
	0%, 100% { opacity: 0.35; transform: scale(0.85); }
	50% { opacity: 1; transform: scale(1.15); }
}


/* ========== 翻牌配对 ========== */
.kehua-fc {
	/* 与连连看同级容器：顶栏间距、最大宽度一致 */
	width: 100%;
	max-width: min(1100px, 100%);
	margin: 0 auto;
	padding: 8px 10px 20px;
	box-sizing: border-box;
}
.kehua-fc-stage {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	background: #ffffff;
	border-radius: 16px;
	padding: 10px 10px 14px;
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
	box-sizing: border-box;
}
.kehua-fc-stage[hidden] { display: none !important; }
.kehua-fc-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}
.kehua-fc-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	color: #334155;
	background: #f1f5f9;
	text-decoration: none;
	font-size: 22px;
	flex-shrink: 0;
}
.kehua-fc-back:hover { background: #e2e8f0; color: #0f172a; text-decoration: none; }
.kehua-fc-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}
.kehua-fc-sound-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 10px;
	background: #f1f5f9;
	color: #64748b;
	cursor: pointer;
	font-size: 18px;
	padding: 0;
	flex-shrink: 0;
}
.kehua-fc-sound-btn .kehua-fc-sound-off { display: none; }
.kehua-fc-sound-btn.is-off .kehua-fc-sound-on { display: none; }
.kehua-fc-sound-btn.is-off .kehua-fc-sound-off { display: inline; }
.kehua-fc-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: #1e4d42;
	background: rgba(47, 111, 94, 0.12);
}
.kehua-fc-pill--soft {
	color: #475569;
	background: #f1f5f9;
	font-weight: 500;
}
.kehua-fc-pill b {
	font-weight: 700;
	color: #0f172a;
	margin-left: 2px;
}
.kehua-fc-hint {
	margin: 0 0 8px;
	text-align: center;
	font-size: 12px;
	color: #64748b;
}
.kehua-fc-board-wrap {
	position: relative;
	width: 100%;
	max-height: min(78vh, 860px);
	padding: 0;
	border: none;
	background: transparent;
	box-shadow: none;
	box-sizing: border-box;
}
.kehua-fc-board {
	display: grid;
	grid-template-columns: repeat(var(--fc-cols, 4), minmax(0, 1fr));
	grid-template-rows: repeat(var(--fc-rows, 4), minmax(0, 1fr));
	gap: 8px;
	/* 与连连看同量级：尽量拉满宽度，并受视口高度限制 */
	width: min(100%, min(78vh, 860px));
	max-width: 100%;
	aspect-ratio: 1 / 1;
	max-height: min(78vh, 860px);
	margin: 0 auto;
	perspective: 1200px;
	user-select: none;
	box-sizing: border-box;
}
.kehua-fc-board.is-previewing {
	pointer-events: none;
}
.kehua-fc-card {
	position: relative;
	min-width: 0;
	min-height: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	border-radius: 12px;
	-webkit-tap-highlight-color: transparent;
}
.kehua-fc-inner {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
	transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.kehua-fc-card.is-flipped .kehua-fc-inner,
.kehua-fc-card.is-matched .kehua-fc-inner {
	transform: rotateY(180deg);
}
.kehua-fc-face-side {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.kehua-fc-face-side--back {
	background: #1e4d42;
}
.kehua-fc-face-side--front {
	transform: rotateY(180deg);
	background: #fff;
	border: 1px solid #e2e8f0;
}
.kehua-fc-back-img,
.kehua-fc-face {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
	user-select: none;
}
.kehua-fc-back-fallback {
	width: 100%;
	height: 100%;
	background: linear-gradient(145deg, #2f6f5e, #1e4d42);
}
.kehua-fc-face-empty {
	width: 42%;
	height: 42%;
	border-radius: 50%;
	background: #e2e8f0;
}
.kehua-fc-card.is-matched {
	pointer-events: none;
}
.kehua-fc-card.is-matched .kehua-fc-face-side--front {
	animation: kehua-fc-match-pop 0.42s ease;
	box-shadow: 0 0 0 2px rgba(47, 111, 94, 0.35), 0 8px 18px rgba(47, 111, 94, 0.18);
}
.kehua-fc-card:not(.is-flipped):not(.is-matched):active .kehua-fc-inner {
	transform: scale(0.96);
}
@keyframes kehua-fc-match-pop {
	0% { transform: rotateY(180deg) scale(0.92); }
	55% { transform: rotateY(180deg) scale(1.06); }
	100% { transform: rotateY(180deg) scale(1); }
}
.kehua-fc-result-modal .kehua-fc-result-card {
	position: relative;
	overflow: hidden;
	text-align: center;
	padding: 28px 22px 22px;
	animation: kehua-llk-result-in 0.38s ease;
}
.kehua-fc-result-glow {
	position: absolute;
	inset: -40% -20% auto;
	height: 70%;
	background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.28), transparent 70%);
	pointer-events: none;
}
.kehua-fc-result-ico {
	position: relative;
	height: 64px;
	margin-bottom: 8px;
}
.kehua-fc-result-trophy {
	display: inline-block;
	font-size: 42px;
	animation: kehua-llk-trophy-pop 0.5s ease;
}
.kehua-fc-result-spark {
	position: absolute;
	font-size: 18px;
	animation: kehua-llk-spark 1.4s ease infinite;
}
.kehua-fc-result-spark--1 { left: calc(50% - 48px); top: 4px; }
.kehua-fc-result-spark--2 { right: calc(50% - 48px); top: 10px; animation-delay: 0.35s; }
.kehua-fc-result-title {
	display: block;
	font-size: 22px;
	font-weight: 800;
	color: #0f172a;
	margin-bottom: 6px;
}
.kehua-fc-result-msg {
	margin: 0 0 14px;
	font-size: 14px;
	color: #64748b;
}
.kehua-fc-result-reward {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	margin-bottom: 16px;
	border-radius: 12px;
	background: #fff7ed;
	border: 1px solid #fed7aa;
}
.kehua-fc-result-reward-label {
	font-size: 13px;
	color: #92400e;
	font-weight: 600;
}
.kehua-fc-result-reward-val {
	font-size: 22px;
	font-weight: 800;
	color: #c2410c;
}
.kehua-fc-result-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.kehua-fc-result-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	padding: 0 16px;
	border-radius: 12px;
	border: none;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
	transition: transform 0.15s ease, filter 0.15s ease;
}
.kehua-fc-result-btn--primary {
	color: #2f6f5e;
	background: #e8f6f1;
	border: 1px solid #b8e4d4;
	font-weight: 650;
}
.kehua-fc-result-btn--primary:hover {
	transform: translateY(-1px);
	color: #245a4c;
	background: #dff2eb;
	border-color: #9fd6c2;
	text-decoration: none;
}
.kehua-fc-result-btn--ghost {
	color: #64748b;
	background: #f7f8fa;
	border: 1px solid #e8ecf1;
	font-weight: 600;
}
.kehua-fc-result-btn--ghost:hover {
	background: #eef1f5;
	color: #334155;
	border-color: #dbe1e8;
	text-decoration: none;
}
@media (max-width: 560px) {
	.kehua-fc {
		padding: 4px 4px 16px;
	}
	.kehua-fc-stage {
		padding: 8px 6px 10px;
		border-radius: 12px;
	}
	.kehua-fc-board {
		gap: 4px;
		width: min(100%, min(72vh, 100vw - 16px));
		max-height: 72vh;
	}
	.kehua-fc-card,
	.kehua-fc-face-side {
		border-radius: 8px;
	}
	.kehua-fc-hint {
		font-size: 11px;
		margin-bottom: 6px;
	}
}
@media (min-width: 900px) {
	.kehua-fc {
		padding: 12px 16px 28px;
	}
	.kehua-fc-stage {
		padding: 14px 16px 18px;
	}
	.kehua-fc-board {
		gap: 10px;
	}
}

/* ========== 连连看 · 夜间模式 ========== */
:is(html.kehua-dark, body.kehua-dark) .kehua-llk {
	--llk-bg: #141619;
	--llk-card: #1e2228;
	--llk-accent: #94a3b8;
	--llk-accent-rgb: 148, 163, 184;
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-stage {
	background: #1e2228;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-back {
	background: rgba(255, 255, 255, 0.08);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-back:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-sound-btn {
	background: rgba(255, 255, 255, 0.08);
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-sound-btn:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-sound-btn.is-on {
	color: #e4e6eb;
	background: rgba(255, 255, 255, 0.14);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-pill {
	background: rgba(255, 255, 255, 0.12);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-pill--soft {
	background: rgba(255, 255, 255, 0.08);
	color: #c4c9d1;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-pill b {
	color: #f3f4f6;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-hint {
	color: #9ca3af;
}

/* 棋子：中深灰，夜景不刺眼且图案仍清晰 */
:is(html.kehua-dark, body.kehua-dark) .kehua-llk-cell.is-tile {
	background: linear-gradient(180deg, #3f4650 0%, #353b44 100%);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-cell.is-tile:hover {
	background: linear-gradient(180deg, #4a525c 0%, #3f4650 100%);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 14px rgba(0, 0, 0, 0.32);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-cell.is-on {
	background: linear-gradient(180deg, #555e6a 0%, #484f5a 100%);
	box-shadow: 0 0 0 2px #94a3b8, 0 8px 18px rgba(0, 0, 0, 0.35);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-cell.is-match {
	background: linear-gradient(180deg, #5a4e3c 0%, #4a4032 100%);
	box-shadow: 0 0 0 2px #c4a574, 0 0 18px rgba(196, 165, 116, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-path {
	stroke: #cbd5e1;
	filter: drop-shadow(0 0 6px rgba(148, 163, 184, 0.45));
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-path--glow {
	stroke: #fbbf24;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-modal-card {
	background: #1e2228;
	color: #e4e6eb;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-modal-close {
	background: rgba(255, 255, 255, 0.08);
	color: #c4c9d1;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-modal-close:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-cta {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-cta:hover:not(:disabled) {
	filter: none;
	background: #f3f4f6;
	color: #111827;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-start-title,
:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-start-foot,
:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-modal-back {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-start-foot,
:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-modal-back {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-modal-back:hover {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-tag--amber {
	background: rgba(245, 158, 11, 0.18);
	color: #fbbf24;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-gk-tag--danger {
	background: rgba(239, 68, 68, 0.18);
	color: #f87171;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-result-card {
	background: #1e2228;
	color: #e4e6eb;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-result-title {
	background: none;
	-webkit-background-clip: unset;
	background-clip: unset;
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-result-msg {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-result-reward {
	background: rgba(245, 158, 11, 0.14);
	border-color: rgba(245, 158, 11, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-result-reward-label {
	color: #fdba74;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-result-reward-val {
	color: #fb923c;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-result-btn--primary {
	color: #1a1f1c;
	background: #e8eaed;
	border-color: rgba(255, 255, 255, 0.12);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-result-btn--primary:hover {
	color: #111827;
	background: #f3f4f6;
	border-color: rgba(255, 255, 255, 0.18);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-result-btn--ghost {
	color: #1a1f1c;
	background: #e8eaed;
	border-color: rgba(255, 255, 255, 0.12);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk-result-btn--ghost:hover {
	background: #f3f4f6;
	color: #111827;
	border-color: rgba(255, 255, 255, 0.18);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-id-leave-card {
	background: #1e2228;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-id-leave-ico {
	background: rgba(255, 255, 255, 0.08);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-id-leave-card strong {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-id-leave-card > p {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-id-leave-stay {
	background: rgba(255, 255, 255, 0.1);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-id-leave-stay:hover {
	background: rgba(255, 255, 255, 0.16);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-id-leave-go {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-id-leave-go:hover {
	background: #f3f4f6;
	color: #111827;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-llk .kehua-id-abandon-tip {
	background: rgba(180, 83, 9, 0.18);
	color: #fdba74;
}

/* ========== 翻牌配对 · 夜间模式 ========== */
:is(html.kehua-dark, body.kehua-dark) .kehua-fc {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-stage {
	background: #1e2228;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-back {
	background: rgba(255, 255, 255, 0.08);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-back:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-sound-btn {
	background: rgba(255, 255, 255, 0.08);
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-pill {
	color: #c4c9d1;
	background: rgba(255, 255, 255, 0.1);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-pill--soft {
	color: #c4c9d1;
	background: rgba(255, 255, 255, 0.08);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-pill b {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-hint {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-face-side {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-face-side--back {
	background: #24352f;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-face-side--front {
	background: #252a31;
	border-color: rgba(255, 255, 255, 0.1);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-card.is-matched .kehua-fc-face-side--front {
	box-shadow: 0 0 0 2px rgba(180, 190, 200, 0.35), 0 8px 18px rgba(0, 0, 0, 0.3);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-gk-modal-card {
	background: #1e2228;
	color: #e4e6eb;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-gk-modal-close {
	background: rgba(255, 255, 255, 0.08);
	color: #c4c9d1;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-gk-modal-close:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-gk-cta {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-gk-cta:hover:not(:disabled) {
	filter: none;
	background: #f3f4f6;
	color: #111827;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-gk-start-title {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-gk-start-foot,
:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-gk-modal-back {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-gk-modal-back:hover {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-gk-tag--amber {
	background: rgba(245, 158, 11, 0.18);
	color: #fbbf24;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-gk-tag--danger {
	background: rgba(239, 68, 68, 0.18);
	color: #f87171;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-result-card {
	background: #1e2228;
	color: #e4e6eb;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-result-title {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-result-msg {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-result-reward {
	background: rgba(245, 158, 11, 0.14);
	border-color: rgba(245, 158, 11, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-result-reward-label {
	color: #fdba74;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-result-reward-val {
	color: #fb923c;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-result-btn--primary {
	color: #1a1f1c;
	background: #e8eaed;
	border-color: rgba(255, 255, 255, 0.12);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-result-btn--primary:hover {
	color: #111827;
	background: #f3f4f6;
	border-color: rgba(255, 255, 255, 0.18);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-result-btn--ghost {
	color: #1a1f1c;
	background: #e8eaed;
	border-color: rgba(255, 255, 255, 0.12);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc-result-btn--ghost:hover {
	background: #f3f4f6;
	color: #111827;
	border-color: rgba(255, 255, 255, 0.18);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-id-leave-card {
	background: #1e2228;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-id-leave-ico {
	background: rgba(255, 255, 255, 0.08);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-id-leave-card strong {
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-id-leave-card > p {
	color: #9ca3af;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-id-leave-stay {
	background: rgba(255, 255, 255, 0.1);
	color: #e4e6eb;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-id-leave-stay:hover {
	background: rgba(255, 255, 255, 0.16);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-id-leave-go {
	background: #e8eaed;
	color: #1a1f1c;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-id-leave-go:hover {
	background: #f3f4f6;
	color: #111827;
}

:is(html.kehua-dark, body.kehua-dark) .kehua-fc .kehua-id-abandon-tip {
	background: rgba(180, 83, 9, 0.18);
	color: #fdba74;
}
