/* ============================================================
   站点地图（2026-10 重做）
   宽版双栏：左侧栏目 + 资源列表，右侧标签/页面/订阅
   ============================================================ */
.ymw-sitemap {
	max-width: 1120px;
	margin: 0 auto;
	padding: 22px 0 56px;
}

.ymw-sitemap__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--classA);
}

.ymw-sitemap__head>div {
	min-width: 0;
}

.ymw-sitemap__kicker {
	margin: 0 0 8px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .18em;
	color: var(--theme);
}

.ymw-sitemap__head h1 {
	margin: 0 0 8px;
	font-size: 34px;
	font-weight: 750;
	line-height: 1.25;
	letter-spacing: -.02em;
	color: var(--main);
}

.ymw-sitemap__lead {
	max-width: 660px;
	margin: 0;
	font-size: 13px;
	line-height: 1.85;
	color: var(--minor);
}

.ymw-sitemap__stats {
	display: flex;
	flex: none;
	gap: 30px;
	margin: 0;
}

.ymw-sitemap__stats div {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ymw-sitemap__stats dt {
	font-size: 10px;
	letter-spacing: .06em;
	color: var(--seat);
}

.ymw-sitemap__stats dd {
	margin: 0;
	font-size: 25px;
	font-weight: 750;
	line-height: 1;
	color: var(--main);
}

/* —— 双栏 —— */
.ymw-sitemap__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	align-items: start;
	gap: 44px;
	margin-top: 34px;
}

.ymw-sitemap__main {
	min-width: 0;
}

.ymw-sitemap__block+.ymw-sitemap__block {
	margin-top: 38px;
}

.ymw-sitemap__block-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--classA);
}

.ymw-sitemap__block-head h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 650;
	color: var(--main);
}

.ymw-sitemap__block-head span {
	font-size: 11px;
	color: var(--seat);
}

/* —— 栏目卡 —— */
.ymw-sitemap__cats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 14px;
}

.ymw-sitemap__cat {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 14px;
	background: var(--background);
	border: 1px solid var(--classA);
	color: inherit;
	text-decoration: none;
	transition: border-color .15s;
}

.ymw-sitemap__cat:hover {
	border-color: var(--theme);
	text-decoration: none;
}

.ymw-sitemap__cat-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	font-size: 13px;
	font-weight: 600;
	color: var(--main);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ymw-sitemap__cat-count {
	flex: none;
	font-size: 11px;
	color: var(--minor);
}

.ymw-sitemap__cat-arrow {
	flex: none;
	font-size: 12px;
	color: var(--theme);
}

.ymw-sitemap__cat.is-empty {
	opacity: .55;
}

/* —— 资源列表 —— */
.ymw-sitemap__posts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 34px;
	margin-top: 2px;
}

.ymw-sitemap__post {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--classA);
	color: inherit;
	text-decoration: none;
}

.ymw-sitemap__post:hover {
	text-decoration: none;
}

.ymw-sitemap__post:hover .ymw-sitemap__post-title {
	color: var(--theme);
}

.ymw-sitemap__post-title {
	overflow: hidden;
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--routine);
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color .15s;
}

.ymw-sitemap__post time {
	flex: none;
	font-size: 10px;
	color: var(--seat);
	font-variant-numeric: tabular-nums;
}

/* —— 右栏 —— */
.ymw-sitemap__aside {
	position: sticky;
	top: 88px;
}

.ymw-sitemap__side-block+.ymw-sitemap__side-block {
	margin-top: 30px;
	padding-top: 24px;
	border-top: 1px solid var(--classA);
}

.ymw-sitemap__side-block h2 {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 650;
	color: var(--main);
}

.ymw-sitemap__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.ymw-sitemap__tags a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 8px;
	font-size: 11px;
	line-height: 1.5;
	color: var(--routine);
	background: var(--background);
	border: 1px solid var(--classA);
	text-decoration: none;
	transition: border-color .15s, color .15s;
}

.ymw-sitemap__tags a:hover {
	border-color: var(--theme);
	color: var(--theme);
	text-decoration: none;
}

.ymw-sitemap__tags b {
	font-size: 9px;
	font-weight: 500;
	color: var(--seat);
}

.ymw-sitemap__pages {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ymw-sitemap__pages li+li {
	border-top: 1px solid var(--classA);
}

.ymw-sitemap__pages a {
	display: block;
	padding: 8px 0;
	font-size: 12px;
	color: var(--routine);
	text-decoration: none;
}

.ymw-sitemap__pages a:hover {
	color: var(--theme);
	text-decoration: none;
}

.ymw-sitemap__subs {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ymw-sitemap__subs a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 9px 11px;
	font-size: 11px;
	color: var(--routine);
	background: var(--body-bg-color);
	border: 1px solid var(--classA);
	text-decoration: none;
	transition: border-color .15s, color .15s;
}

.ymw-sitemap__subs a:hover {
	border-color: var(--theme);
	color: var(--theme);
	text-decoration: none;
}

.ymw-sitemap__subs span {
	color: var(--theme);
}

.ymw-sitemap__muted {
	margin: 0;
	font-size: 12px;
	color: var(--minor);
}

@media (max-width: 1000px) {
	.ymw-sitemap__layout {
		grid-template-columns: 1fr;
		gap: 34px;
	}

	.ymw-sitemap__aside {
		position: static;
	}

	.ymw-sitemap__stats {
		gap: 22px;
	}
}

@media (max-width: 760px) {
	.ymw-sitemap {
		padding-top: 14px;
	}

	.ymw-sitemap__head {
		align-items: flex-start;
		flex-direction: column;
		gap: 20px;
		padding-bottom: 18px;
	}

	.ymw-sitemap__head h1 {
		font-size: 28px;
	}

	.ymw-sitemap__stats {
		width: 100%;
		justify-content: space-between;
	}

	.ymw-sitemap__cats,
	.ymw-sitemap__posts {
		grid-template-columns: 1fr;
	}

	.ymw-sitemap__block-head {
		align-items: flex-start;
		flex-direction: column;
		gap: 3px;
	}

	/* 手机上「标题 + 右对齐日期」这一行只剩 300px，
	   12.5px 的标题被省略号切掉半句。日期挪到第二行，
	   标题就能用满整行、最多两行。 */
	.ymw-sitemap__post {
		display: block;
		padding: 11px 0;
	}

	.ymw-sitemap__post-title {
		display: -webkit-box;
		font-size: 14px;
		line-height: 1.55;
		white-space: normal;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.ymw-sitemap__post time {
		display: block;
		margin-top: 3px;
		font-size: 11.5px;
	}

	.ymw-sitemap__cat {
		padding: 13px 14px;
	}

	.ymw-sitemap__cat-name {
		font-size: 14px;
	}
}

/* 和友链页一致：贴住固定头部，不留 20px 空档 */
body:has(.ymw-sitemap) {
	padding-top: 68px;
}

@media (max-width: 900px) {
	body:has(.ymw-sitemap) {
		padding-top: 52px;
	}
}
