/**
 * 首页 · 社区详情模块
 *
 * 模板：template-parts/home-community.php
 * 加载：is_front_page() 时由 inc/enqueue.php 注入
 *
 * 布局：
 *   .yk-hc__top     上半区（hero + 4 stats）
 *   .yk-hc-grid     下半区（3 列：最新帖子动态 / 活跃用户 / 热门话题）
 */

.yk-hc {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ============ 上半区 ============ */
.yk-hc__top {
	display: grid;
	grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
	gap: 16px;
}
@media (max-width: 1024px) {
	.yk-hc__top { grid-template-columns: 1fr; }
}

/* ----- Hero CTA（左侧深色卡 · 紧凑版） ----- */
.yk-hc-hero {
	position: relative;
	overflow: hidden;
	border-radius: 14px;
	background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
	color: #fff;
	display: flex;
}
/* 管理员上传自定义背景图时：用图片取代紫黑渐变，保留 __bg 作紫色蒙版保持可读 */
.yk-hc-hero--with-bg {
	background-image: var(--yk-hc-hero-bg);
	background-size: cover;
	background-position: center;
}
.yk-hc-hero__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		radial-gradient(circle at 80% 20%, rgba(167, 139, 250, .35), transparent 55%),
		radial-gradient(circle at 20% 100%, rgba(236, 72, 153, .25), transparent 55%),
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><circle cx='1' cy='1' r='1' fill='%23ffffff' opacity='0.06'/></svg>");
	background-size: auto, auto, 14px 14px;
}
/* 带自定义背景时：__bg 改为半透明紫色渐变蒙版（保证文字/按钮对比度） */
.yk-hc-hero--with-bg .yk-hc-hero__bg {
	background-image: linear-gradient(135deg, rgba(15, 23, 42, .65) 0%, rgba(91, 60, 224, .55) 55%, rgba(109, 74, 255, .5) 100%);
	background-size: cover;
}
.yk-hc-hero__content {
	position: relative;
	z-index: 1;
	flex: 1;
	padding: 10px 14px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}
.yk-hc-hero__title-row {
	display: flex;
	align-items: center;
	gap: 8px;
}
.yk-hc-hero__title {
	margin: 0;
	font-size: 15px;
	font-weight: 800;
	color: #fff;
	letter-spacing: -.01em;
	line-height: 1.2;
}
.yk-hc-hero__badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	background: rgba(167, 139, 250, .25);
	border: 1px solid rgba(167, 139, 250, .55);
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	color: #c4b5fd;
	letter-spacing: .03em;
}
.yk-hc-hero__subtitle {
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	color: rgba(255, 255, 255, .82);
	line-height: 1.4;
	letter-spacing: -.005em;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.yk-hc-hero__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 2px;
	flex-wrap: wrap;
}
.yk-hc-hero__cta {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 14px;
	background: #fff;
	color: #6d4aff;
	border-radius: 7px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .25), 0 0 0 1px rgba(255, 255, 255, .1);
	transition: background .15s, transform .1s, box-shadow .15s, color .15s;
	white-space: nowrap;
}
.yk-hc-hero__cta:hover {
	background: #f3f0ff;
	color: #5b3ce0;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.yk-hc-hero__cta:active { transform: translateY(1px); }
.yk-hc-hero__count-text {
	font-size: 11px;
	color: rgba(255, 255, 255, .72);
	font-weight: 500;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

/* ----- Boards grid（右侧 5 卡：4 彩色版块 + 1 更多圈子 CTA） ----- */
.yk-hc-boards {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
	/* 默认 align-items: stretch → 5 张卡片自动对齐到最高一张 */
}
@media (max-width: 1440px) { .yk-hc-boards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) { .yk-hc-boards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .yk-hc-boards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px)  { .yk-hc-boards { grid-template-columns: 1fr; } }

/* "更多圈子" CTA 跨 2 列填补不完整的末行
 *
 * 数据：固定 4 个版块 + 1 个 CTA = 5 张卡片（yk_cmt_get_categories(4) 上限 4 个）
 * 几何：5 % 3 ≠ 0，5 % 2 ≠ 0 → 中/小屏 grid 末行必有空格
 * 对策：让 CTA 横跨 2 列，刚好把空格吃掉
 *   - 3 列网格：[3 boards] / [1 board + CTA(span2)]
 *   - 2 列网格：[2] / [2] / [CTA(span2) 整行]
 *   - 5 列网格：CTA span 1（不触发本规则），5 卡片正好 1 行
 */
@media (max-width: 1440px) {
	.yk-hc-board--more { grid-column: span 2; }
}

.yk-hc-boards__empty {
	grid-column: 1 / -1;
	text-align: center;
	color: #94a3b8;
	font-size: 12px;
	padding: 32px 0;
}

/* 版块卡片（4 彩色） */
.yk-hc-board {
	position: relative;
	display: flex;
	align-items: center;
	padding: 14px 14px 14px 16px;
	background:
		linear-gradient(135deg, var(--tint, #f3e8ff) 0%, rgba(255, 255, 255, .55) 130%);
	border: 1px solid rgba(15, 23, 42, .04);
	border-radius: 14px;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	transition: transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s, border-color .2s;
}
.yk-hc-board:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 32px rgba(15, 23, 42, .14);
	border-color: rgba(15, 23, 42, .08);
}

/* 右下水印大图标 */
.yk-hc-board__watermark {
	position: absolute;
	right: -10px;
	bottom: -10px;
	color: var(--mark, #e9d5ff);
	opacity: .55;
	pointer-events: none;
	transition: transform .3s, opacity .3s;
}
.yk-hc-board:hover .yk-hc-board__watermark {
	opacity: .85;
	transform: rotate(6deg);
}

/* 顶部色带（全宽） */
.yk-hc-board__bar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--solid, #a855f7), var(--mark, #e9d5ff));
}

/* 左右布局：大头像 + 信息栈 */
.yk-hc-board__row {
	position: relative;
	z-index: 1;
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

/* 大号头像（彩色图标盒） */
.yk-hc-board__badge {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: var(--solid, #a855f7);
	border-radius: 12px;
	box-shadow:
		0 8px 18px -4px color-mix(in srgb, var(--solid, #a855f7) 55%, transparent),
		inset 0 1px 0 rgba(255, 255, 255, .28);
	transition: transform .25s cubic-bezier(.16, 1, .3, 1);
	flex-shrink: 0;
}
.yk-hc-board:hover .yk-hc-board__badge { transform: scale(1.08) rotate(-3deg); }

/* 右侧信息栈（名字 + 描述） */
.yk-hc-board__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

/* 帖子数胶囊（绝对定位右上角） */
.yk-hc-board__count {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	background: rgba(255, 255, 255, .85);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border: 1px solid rgba(15, 23, 42, .06);
	color: #475569;
	font-size: 10px;
	font-weight: 700;
	border-radius: 999px;
	font-variant-numeric: tabular-nums;
	line-height: 1.5;
}

/* 标题 */
.yk-hc-board__name {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -.005em;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* 描述 */
.yk-hc-board__desc {
	margin: 0;
	font-size: 11px;
	color: #64748b;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* 更多圈子 · 紫色 CTA 卡片 */
.yk-hc-board--more {
	background: linear-gradient(135deg, #7c5cff 0%, #5b3ce0 60%, #4338ca 100%);
	border: 0;
	box-shadow: 0 6px 18px rgba(15, 23, 42, .3);
}
.yk-hc-board--more:hover {
	box-shadow: 0 14px 32px rgba(15, 23, 42, .45);
}
.yk-hc-board--more .yk-hc-board__badge,
.yk-hc-board--more .yk-hc-board__badge--ghost {
	background: rgba(255, 255, 255, .18);
	border: 1px solid rgba(255, 255, 255, .25);
	backdrop-filter: blur(8px);
}
.yk-hc-board--more .yk-hc-board__name,
.yk-hc-board--more .yk-hc-board__desc {
	color: #fff;
}
.yk-hc-board--more .yk-hc-board__desc { color: rgba(255, 255, 255, .8); }

/* 粉色光晕（右上） */
.yk-hc-board__glow {
	position: absolute;
	top: -48px;
	right: -48px;
	width: 128px;
	height: 128px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(244, 114, 182, .3) 0%, transparent 70%);
	pointer-events: none;
}

/* ============ 下半区：3 列 ============ */
.yk-hc-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	/* 默认 align-items: stretch → 3 张卡同高 */
}
@media (max-width: 1024px) { .yk-hc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .yk-hc-grid { grid-template-columns: 1fr; } }

.yk-hc-card {
	background: #fff;
	border: 1px solid #f1f5f9;
	border-radius: 12px;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
}
.yk-hc-card__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
}
.yk-hc-card__title {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.yk-hc-card__more {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: 11px;
	color: #6d4aff;
	font-weight: 500;
	text-decoration: none;
	transition: color .15s;
}
.yk-hc-card__more:hover { color: #5b3ce0; }

.yk-hc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;                    /* 填满卡片剩余高度 */
	justify-content: space-evenly;  /* items 均匀分布，上下中间所有间距相同 */
}
.yk-hc-empty {
	text-align: center;
	color: #94a3b8;
	font-size: 12px;
	padding: 16px 0;
}

/* ----- 最新帖子动态 · 左封面 + 右内容（紧凑舒适版） ----- */
.yk-hc-list--posts { gap: 6px; }
.yk-hc-list--posts > li { list-style: none; }

.yk-hc-post {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	transition: background .15s;
}
.yk-hc-post:hover { background: #faf9fc; }

/* 左侧封面图（4:3 横向 64×48） */
.yk-hc-post__cover {
	flex-shrink: 0;
	width: 64px;
	height: 48px;
	border-radius: 8px;
	overflow: hidden;
	background: #f1f5f9;
	position: relative;
}
.yk-hc-post__cover img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	display: block;
	object-fit: cover;
	transition: transform .3s;
}
.yk-hc-post:hover .yk-hc-post__cover img { transform: scale(1.08); }

.yk-hc-post__cover--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #f8fafc, #f1f5f9);
	border: 1px solid #e5e7eb;
}

/* 右侧主内容（标题 + meta） */
.yk-hc-post__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* 标题 · 醒目放大 */
.yk-hc-post__title {
	margin: 0;
	font-size: 13.5px;
	font-weight: 600;
	color: #0f172a;
	line-height: 1.35;
	letter-spacing: -.005em;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .15s;
}
.yk-hc-post:hover .yk-hc-post__title { color: #6d4aff; }

/* meta 一行：分类 · 时间   评论 */
.yk-hc-post__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	color: #94a3b8;
	font-weight: 500;
}
.yk-hc-post__cat {
	font-weight: 600;
	white-space: nowrap;
}
.yk-hc-post__sep { color: #cbd5e1; }
.yk-hc-post__time { color: #94a3b8; }
.yk-hc-post__count {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: #94a3b8;
	font-variant-numeric: tabular-nums;
}

/* ----- 资源专区（社区里发的 mod / 存档 / 补丁） ----- */
.yk-hc-list--resources { gap: 6px; }
.yk-hc-list--resources > li { list-style: none; }

.yk-hc-resource {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	transition: background .15s;
}
.yk-hc-resource:hover { background: #faf9fc; }

/* 左侧网盘色块（48×48，色调由网盘类型决定） */
.yk-hc-resource__badge {
	flex-shrink: 0;
	position: relative;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: #64748b; /* fallback */
	box-shadow:
		0 4px 10px -2px rgba(15, 23, 42, .15),
		inset 0 1px 0 rgba(255, 255, 255, .25);
	transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
.yk-hc-resource:hover .yk-hc-resource__badge { transform: scale(1.06) rotate(-3deg); }

/* 资源个数小角标（右下，叠在色块外） */
.yk-hc-resource__count {
	position: absolute;
	bottom: -4px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	background: #fff;
	color: #0f172a;
	font-size: 10px;
	font-weight: 800;
	border-radius: 999px;
	border: 2px solid #fff;
	box-shadow: 0 2px 4px rgba(15, 23, 42, .15);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

/* 网盘色映射（与 yk_cmt_pan_label 13 种类型 + other 一一对应） */
.yk-hc-resource__badge--baidu     { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.yk-hc-resource__badge--aliyun    { background: linear-gradient(135deg, #fb923c, #f97316); }
.yk-hc-resource__badge--quark     { background: linear-gradient(135deg, #7c5cff, #6d4aff); }
.yk-hc-resource__badge--123       { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.yk-hc-resource__badge--189       { background: linear-gradient(135deg, #ef4444, #dc2626); }
.yk-hc-resource__badge--lanzou    { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.yk-hc-resource__badge--caiyun    { background: linear-gradient(135deg, #34d399, #10b981); }
.yk-hc-resource__badge--mega      { background: linear-gradient(135deg, #f87171, #ef4444); }
.yk-hc-resource__badge--google    { background: linear-gradient(135deg, #facc15, #eab308); }
.yk-hc-resource__badge--mediafire { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.yk-hc-resource__badge--github    { background: linear-gradient(135deg, #1f2937, #0f172a); }
.yk-hc-resource__badge--xunlei    { background: linear-gradient(135deg, #2563eb, #1e40af); }
.yk-hc-resource__badge--wenshushu { background: linear-gradient(135deg, #f472b6, #ec4899); }
.yk-hc-resource__badge--other     { background: linear-gradient(135deg, #94a3b8, #64748b); }

/* 右侧主内容（标题 + meta） */
.yk-hc-resource__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.yk-hc-resource__title {
	margin: 0;
	font-size: 13.5px;
	font-weight: 600;
	color: #0f172a;
	line-height: 1.35;
	letter-spacing: -.005em;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .15s;
}
.yk-hc-resource:hover .yk-hc-resource__title { color: #6d4aff; }

/* meta 一行：[网盘标签] +N · 时间   ↓下载数 */
.yk-hc-resource__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	color: #94a3b8;
	font-weight: 500;
	min-width: 0;
}

/* 网盘标签（小胶囊，色与 badge 一致但浅色版） */
.yk-hc-resource__pan {
	display: inline-flex;
	align-items: center;
	padding: 1px 7px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
	font-size: 10.5px;
	font-weight: 600;
	white-space: nowrap;
	flex-shrink: 0;
	border: 1px solid #e2e8f0;
	font-variant-numeric: tabular-nums;
}
.yk-hc-resource__pan--baidu     { color: #1d4ed8; background: #dbeafe; border-color: #bfdbfe; }
.yk-hc-resource__pan--aliyun    { color: #c2410c; background: #ffedd5; border-color: #fed7aa; }
.yk-hc-resource__pan--quark     { color: #5b3ce0; background: #ede9fe; border-color: #ddd6fe; }
.yk-hc-resource__pan--123       { color: #0e7490; background: #cffafe; border-color: #a5f3fc; }
.yk-hc-resource__pan--189       { color: #b91c1c; background: #fee2e2; border-color: #fecaca; }
.yk-hc-resource__pan--lanzou    { color: #0369a1; background: #e0f2fe; border-color: #bae6fd; }
.yk-hc-resource__pan--caiyun    { color: #047857; background: #d1fae5; border-color: #a7f3d0; }
.yk-hc-resource__pan--mega      { color: #b91c1c; background: #fee2e2; border-color: #fecaca; }
.yk-hc-resource__pan--google    { color: #a16207; background: #fef9c3; border-color: #fde68a; }
.yk-hc-resource__pan--mediafire { color: #1d4ed8; background: #dbeafe; border-color: #bfdbfe; }
.yk-hc-resource__pan--github    { color: #0f172a; background: #f1f5f9; border-color: #cbd5e1; }
.yk-hc-resource__pan--xunlei    { color: #1e40af; background: #dbeafe; border-color: #bfdbfe; }
.yk-hc-resource__pan--wenshushu { color: #be185d; background: #fce7f3; border-color: #fbcfe8; }
.yk-hc-resource__pan--other     { color: #475569; background: #f1f5f9; border-color: #e2e8f0; }

.yk-hc-resource__pan-extra {
	font-size: 10px;
	color: #94a3b8;
	font-weight: 700;
	flex-shrink: 0;
}

.yk-hc-resource__sep { color: #cbd5e1; flex-shrink: 0; }
.yk-hc-resource__time { color: #94a3b8; flex-shrink: 0; white-space: nowrap; }

/* 下载数（右对齐，含 ↓ 图标） */
.yk-hc-resource__dl {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: #94a3b8;
	font-variant-numeric: tabular-nums;
	flex-shrink: 0;
}

/* ----- 热门话题 ----- */
.yk-hc-topic {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}
.yk-hc-topic__title {
	font-size: 13px;
	font-weight: 600;
	color: #0f172a;
	text-decoration: none;
	transition: color .15s;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
	min-width: 0;
}
.yk-hc-topic__title:hover { color: #6d4aff; }
.yk-hc-topic__time {
	font-size: 11px;
	color: #94a3b8;
	font-weight: 500;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ============================================================
 * 移动端综合优化（覆盖前面分散的断点）
 *
 * 策略：
 *   1. 不让任何 grid 退化成 1 列（除了下半区 3 卡 → 1 卡的必要堆叠）
 *   2. 单列堆叠时收缩 padding，避免每张卡都占满屏幕
 *   3. 限制列表项数量（4 项），减少累计滚动距离
 *   4. CTA / Tap 区域做拇指友好处理（≥40px 高度）
 *   5. 资源 meta 行允许 wrap，极窄屏隐藏次要信息
 * ============================================================ */

/* ----- 中等手机 / 小平板（≤ 640px） ----- */
@media (max-width: 640px) {
	.yk-hc { gap: 12px; }
	.yk-hc__top { gap: 12px; }

	/* Hero：紧凑 + CTA 加高拇指友好 */
	.yk-hc-hero__content { padding: 12px 14px; gap: 6px; }
	.yk-hc-hero__subtitle { font-size: 12.5px; }
	.yk-hc-hero__cta {
		padding: 8px 16px;
		font-size: 13px;
		min-height: 36px;
	}
	.yk-hc-hero__count-text { font-size: 11.5px; }

	/* 版块卡片网格（5 张卡）紧凑些 */
	.yk-hc-boards { gap: 10px; }

	/* 下半区 3 张卡片堆叠时收缩 padding */
	.yk-hc-grid { gap: 12px; }
	.yk-hc-card { padding: 14px 14px; }
	.yk-hc-card__head { margin-bottom: 12px; }

	/* 列表项数量限制：每列最多 4 项（去掉最后 1-3 项），减少累计滚动 */
	.yk-hc-list--posts > li:nth-child(n+5),
	.yk-hc-list--resources > li:nth-child(n+5),
	.yk-hc-list--topics > li:nth-child(n+5) { display: none; }

	/* 资源专区 meta 行：允许 wrap 防溢出 */
	.yk-hc-resource__meta { flex-wrap: wrap; row-gap: 4px; }
}

/* ----- 极窄屏 / 老款手机（≤ 420px） ----- */
@media (max-width: 420px) {
	/* 强制 boards 保持 2 列，而不是退化成 1 列（防止 5 张卡纵向占满屏）*/
	.yk-hc-boards { grid-template-columns: repeat(2, 1fr); gap: 8px; }

	/* 卡片标题、列表项标题略缩 */
	.yk-hc-card__title { font-size: 13px; }
	.yk-hc-post__title,
	.yk-hc-resource__title,
	.yk-hc-topic__title { font-size: 13px; }

	/* 帖子封面与资源色块：缩小，留更多空间给标题 */
	.yk-hc-post__cover { width: 56px; height: 42px; }
	.yk-hc-resource__badge { width: 44px; height: 44px; border-radius: 9px; }

	/* 资源专区：极窄屏隐藏次要信息（保留主网盘 + 时间 + 下载数）*/
	.yk-hc-resource__pan-extra,
	.yk-hc-resource__sep { display: none; }
	.yk-hc-resource__meta { gap: 5px; }

	/* 板块卡片内边距收一点，防止 2 列时 badge + 文字挤碎 */
	.yk-hc-board { padding: 10px 10px 10px 12px; }
	.yk-hc-board__badge { width: 38px; height: 38px; border-radius: 10px; }
	.yk-hc-board__name { font-size: 13px; }
	.yk-hc-board__desc { font-size: 10.5px; }
	.yk-hc-board__count { padding: 1px 7px; font-size: 9.5px; }
}

/* ----- 超窄屏（≤ 360px，如 iPhone SE 第一代） ----- */
@media (max-width: 360px) {
	/* 资源 meta 进一步精简：只保留主网盘 + 时间，下载数移到时间后面 */
	.yk-hc-resource__dl { margin-left: 0; }
}
