/* ============ 壁纸工具大厅 ============ */

.xh-page {
	/* 半透明三档，与图片处理工具 / AI 转 4K 的 --xe-* / --xu-* 数值一致 */
	--xh-fill: rgba(0, 0, 0, 0.045);
	--xh-fill-h: rgba(0, 0, 0, 0.085);
	--xh-fill-on: rgba(0, 0, 0, 0.18);
	--xh-line: rgba(0, 0, 0, 0.12);
}

html.dark .xh-page {
	--xh-fill: rgba(255, 255, 255, 0.08);
	--xh-fill-h: rgba(255, 255, 255, 0.15);
	--xh-fill-on: rgba(255, 255, 255, 0.3);
	--xh-line: rgba(255, 255, 255, 0.16);
}

/* 深色下热门卡：保持半透明白的风格，把不透明度比普通卡再提一档，
   同时文字（尤其副标题）提亮，靠"文字层次"保证清晰，而不是做实底。 */
html.dark .xh-card.is-hot {
	background: rgba(255, 255, 255, 0.16);
	box-shadow: inset 3px 0 0 var(--brand);
}

html.dark .xh-card.is-hot .xh-ico {
	background: rgba(255, 255, 255, 0.12);
}

html.dark .xh-card.is-hot:hover {
	background: rgba(255, 255, 255, 0.2);
	box-shadow: inset 3px 0 0 var(--brand);
}

.xh-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin: 0 0 26px;
}

/* 分组标题：把「息栈 · 理财工具」这类分组跟上面的壁纸工具区分开。
   顶部一条细分隔线 + 加粗标题，比纯文字更能划清边界。 */
.xh-section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 10px 0 16px;
	padding: 14px 2px 0;
	border-top: 1px solid var(--xh-line);
	font-size: 16px;
	font-weight: 700;
	color: var(--ink);
	line-height: 1.3;
}

.xh-section-title::before {
	content: '';
	width: 4px;
	height: 18px;
	border-radius: 2px;
	background: var(--brand);
	flex: 0 0 auto;
}

.xh-card {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	grid-template-areas:
		'ico name'
		'ico sub';
	align-content: center;
	column-gap: 14px;
	row-gap: 4px;
	padding: 20px 20px;
	border-radius: var(--radius);
	background: var(--xh-fill);
	color: var(--text);
	text-decoration: none;
	transition: background 0.18s var(--ease);
}

.xh-card:hover {
	background: var(--xh-fill-h);
	color: var(--text);
	text-decoration: none;
}

.xh-card:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

.xh-ico {
	grid-area: ico;
	align-self: center;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--xh-fill-h);
	color: var(--text);
}

.xh-ico svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.xh-body {
	grid-area: name / name / sub / sub;
	display: contents;
}

.xh-name {
	grid-area: name;
	align-self: end;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.xh-sub {
	grid-area: sub;
	align-self: start;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--muted);
}

html.dark .xh-sub {
	color: #b6b6bf;
}

.xh-hot {
	font-style: normal;
	font-size: 10.5px;
	font-weight: 600;
	line-height: 1;
	padding: 3px 7px;
	border-radius: 999px;
	background: var(--brand);
	color: #fff;
	flex: 0 0 auto;
}

html.dark .xh-hot {
	color: #111116;
}

/* 热门卡：用一条品牌色左边条 + 更实的底，跟普通卡拉开差距。
   只靠透明度差在深色背景图上会被冲淡，肉眼分不出来。 */
.xh-card.is-hot {
	background: var(--xh-fill-on);
	box-shadow: inset 3px 0 0 var(--brand);
}

.xh-card.is-hot .xh-ico {
	background: var(--xh-fill-on);
}

.xh-card.is-hot:hover {
	background: var(--xh-fill-h);
	box-shadow: inset 3px 0 0 var(--brand);
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
	.xh-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.xh-card {
		padding: 18px 18px;
	}
}

@media (max-width: 560px) {
	.xh-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.xh-card {
		padding: 16px 18px;
	}

	.xh-ico {
		width: 40px;
		height: 40px;
	}
}
