/*
Theme Name: xhs-blog
Theme URI: https://example.com/xhs-blog
Author: xhs-blog
Author URI: https://example.com
Description: 小红书风格的图片博客主题：双列瀑布流首页、沉浸式图文详情页、话题标签体系。
Version: 1.0.6
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: xhs-blog
Tags: blog, one-column, custom-logo, custom-menu, featured-images, responsive-layout, translation-ready
*/

/* ============================================================
   1. 基础与变量
   ============================================================ */
:root {
	--xhs-red: #ff2442;
	--xhs-red-light: #fff0f2;
	--xhs-bg: #ffffff;
	--xhs-page-bg: #f5f6f7;
	--xhs-text: #333333;
	--xhs-text-sub: #999999;
	--xhs-text-faint: #bbbbbb;
	--xhs-line: #f0f0f0;
	--xhs-gray-bg: #f6f6f6;
	--xhs-radius-card: 8px;
	--xhs-radius-panel: 16px;
	--xhs-header-h: 60px;
}

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: var(--xhs-text);
	background: var(--xhs-page-bg);
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-weight: 600;
}

p {
	margin: 0 0 12px;
}

button {
	font-family: inherit;
	cursor: pointer;
}

::selection {
	background: var(--xhs-red-light);
	color: var(--xhs-red);
}

/* ============================================================
   2. 顶部导航
   ============================================================ */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--xhs-bg);
	border-bottom: 1px solid var(--xhs-line);
}

.header-inner {
	max-width: 1200px;
	margin: 0 auto;
	height: var(--xhs-header-h);
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 12px;
}

.header-left {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.site-title {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: var(--xhs-text);
}

.custom-logo-link img {
	max-height: 40px;
	width: auto;
}

.menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--xhs-text);
}

@media (min-width: 768px) {
	.menu-toggle {
		display: none;
	}
}

.menu-toggle:hover {
	background: var(--xhs-gray-bg);
}

.header-center {
	flex: 1;
	display: flex;
	justify-content: center;
	min-width: 0;
}

/* 搜索框 */
.xhs-search-form {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 400px;
	height: 38px;
	background: var(--xhs-gray-bg);
	border-radius: 19px;
	overflow: hidden;
	padding: 0 4px 0 16px;
}

.xhs-search-form .search-input {
	flex: 1;
	min-width: 0;
	border: none;
	outline: none;
	background: transparent;
	font-size: 14px;
	color: var(--xhs-text);
}

.xhs-search-form .search-input::placeholder {
	color: var(--xhs-text-faint);
}

.xhs-search-form .search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--xhs-text-sub);
	flex-shrink: 0;
}

.xhs-search-form .search-submit:hover {
	color: var(--xhs-red);
}

.header-right {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

/* 桌面导航 */
.primary-nav {
	display: none;
}

@media (min-width: 768px) {
	.primary-nav {
		display: block;
	}
}

.nav-menu {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-menu a {
	display: block;
	padding: 6px 12px;
	border-radius: 16px;
	font-size: 15px;
	color: var(--xhs-text);
	transition: background 0.2s, color 0.2s;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
	background: var(--xhs-red-light);
	color: var(--xhs-red);
}

/* 发布按钮 */
.publish-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 34px;
	padding: 0 16px;
	border-radius: 17px;
	background: var(--xhs-red);
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	transition: opacity 0.2s;
}

.publish-btn:hover {
	opacity: 0.88;
}

/* ============================================================
   3. 移动端抽屉
   ============================================================ */
.mobile-drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 200;
	width: 280px;
	max-width: 80vw;
	background: var(--xhs-bg);
	transform: translateX(-100%);
	transition: transform 0.28s ease;
	overflow-y: auto;
}

.mobile-drawer.is-open {
	transform: translateX(0);
}

.drawer-mask {
	position: fixed;
	inset: 0;
	z-index: 190;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	transition: opacity 0.28s ease;
}

.drawer-mask.is-visible {
	opacity: 1;
}

.drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	border-bottom: 1px solid var(--xhs-line);
}

.drawer-title {
	font-size: 16px;
	font-weight: 700;
}

.drawer-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--xhs-text-sub);
}

.drawer-body {
	padding: 8px 0;
}

.drawer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.drawer-menu a {
	display: block;
	padding: 12px 20px;
	font-size: 15px;
}

.drawer-menu a:hover,
.drawer-menu .current-menu-item > a {
	color: var(--xhs-red);
	background: var(--xhs-red-light);
}

.drawer-menu .sub-menu a {
	padding-left: 36px;
	font-size: 14px;
	color: var(--xhs-text-sub);
}

/* ============================================================
   4. 瀑布流列表
   ============================================================ */
.site-main {
	min-height: 60vh;
}

.feed-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px;
}

.masonry-feed {
	columns: 2;
	column-gap: 10px;
}

@media (min-width: 768px) {
	.masonry-feed {
		columns: 3;
		column-gap: 12px;
	}
}

@media (min-width: 1100px) {
	.masonry-feed {
		columns: 4;
		column-gap: 14px;
	}
}

/* 话题 / 归档横幅 */
.topic-banner {
	padding: 12px 4px 16px;
}

.topic-banner-title {
	font-size: 22px;
	font-weight: 700;
	color: var(--xhs-red);
	word-break: break-all;
}

.search-result-title {
	color: var(--xhs-text);
	font-size: 18px;
}

.topic-banner-meta {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--xhs-text-sub);
}

.topic-banner-desc {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--xhs-text-sub);
}

@media (min-width: 768px) {
	.topic-banner {
		padding: 16px 8px 20px;
	}

	.topic-banner-title {
		font-size: 28px;
	}
}

/* 笔记卡片 */
.note-card {
	break-inside: avoid;
	margin: 0 0 10px;
	background: var(--xhs-bg);
	border-radius: var(--xhs-radius-card);
	overflow: hidden;
	transition: box-shadow 0.2s, transform 0.2s;
}

@media (min-width: 768px) {
	.note-card {
		margin-bottom: 12px;
	}
}

.note-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.note-cover-link {
	display: block;
	cursor: pointer;
}

.note-cover {
	position: relative;
	aspect-ratio: 3 / 4;
	background: var(--xhs-gray-bg);
	overflow: hidden;
}

.note-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.note-cover.no-image img {
	object-fit: contain;
	padding: 18%;
}

/* 图集数量角标 */
.cover-count {
	position: absolute;
	right: 8px;
	top: 8px;
	padding: 1px 8px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.4);
	color: #ffffff;
	font-size: 12px;
	line-height: 18px;
	backdrop-filter: blur(4px);
}

.note-body {
	padding: 8px 10px 10px;
}

.note-title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-all;
}

.note-title a:hover {
	color: var(--xhs-red);
}

.note-topics {
	margin: 4px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	overflow: hidden;
	max-height: 24px;
}

.topic-tag {
	color: #13386c;
	font-size: 13px;
	white-space: nowrap;
}

a.topic-tag:hover {
	text-decoration: none;
}

.note-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 8px;
}

.note-author {
	display: flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
}

.author-avatar,
.author-avatar img,
.comment-avatar-img,
.author-avatar-lg,
.author-avatar-lg img {
	border-radius: 50%;
	width: 20px;
	height: 20px;
	object-fit: cover;
}

.author-avatar-lg,
.author-avatar-lg img {
	width: 40px;
	height: 40px;
}

.note-author .author-name {
	font-size: 12px;
	color: var(--xhs-text-sub);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 90px;
}

.note-author:hover .author-name {
	color: var(--xhs-red);
}

.note-like {
	display: inline-flex;
	align-items: center;
	color: var(--xhs-text-sub);
}

/* 分页 */
.note-pagination {
	padding: 20px 0 8px;
}

.pagination-list {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.pagination-list li {
	list-style: none;
}

.pagination-list a,
.pagination-list span.current,
.pagination-list .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	border-radius: 17px;
	background: var(--xhs-bg);
	color: var(--xhs-text);
	font-size: 14px;
	transition: background 0.2s, color 0.2s;
}

.pagination-list a:hover {
	background: var(--xhs-red-light);
	color: var(--xhs-red);
}

.pagination-list span.current {
	background: var(--xhs-red);
	color: #ffffff;
}

.pagination-list .page-numbers.dots {
	background: transparent;
	color: var(--xhs-text-faint);
}

/* 空状态 */
.empty-state {
	text-align: center;
	padding: 70px 20px;
	color: var(--xhs-text-faint);
}

.empty-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: var(--xhs-bg);
	color: var(--xhs-text-faint);
}

.empty-title {
	margin-top: 16px;
	font-size: 16px;
	color: var(--xhs-text-sub);
}

.empty-desc {
	margin: 6px 0 20px;
	font-size: 13px;
	color: var(--xhs-text-faint);
}

.empty-action {
	display: inline-block;
	padding: 8px 28px;
	border-radius: 18px;
	background: var(--xhs-red);
	color: #ffffff;
	font-size: 14px;
}

.empty-action:hover {
	opacity: 0.88;
}

/* ============================================================
   5. 文章详情页
   ============================================================ */
.note-detail {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 0 24px;
}

.detail-card {
	background: var(--xhs-bg);
	display: flex;
	flex-direction: column;
}

@media (min-width: 1024px) {
	.note-detail {
		padding: 20px 20px 40px;
	}

	.detail-card {
		flex-direction: row;
		align-items: flex-start;
		border-radius: var(--xhs-radius-panel);
		box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
		min-height: 620px;
	}
}

/* 左栏轮播 */
.detail-gallery {
	position: relative;
	background: #1a1a1a;
	flex-shrink: 0;
}

@media (min-width: 1024px) {
	.detail-gallery {
		position: sticky;
		top: calc(var(--xhs-header-h) + 16px);
		width: 55%;
		height: calc(100vh - var(--xhs-header-h) - 48px);
		max-height: 860px;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: var(--xhs-radius-panel) 0 0 var(--xhs-radius-panel);
		overflow: hidden;
	}
}

.carousel {
	position: relative;
	overflow: hidden;
	touch-action: pan-y;
	user-select: none;
}

@media (min-width: 1024px) {
	.carousel {
		width: 100%;
		height: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.carousel-slide img {
		max-height: calc(100vh - var(--xhs-header-h) - 64px);
	}
}

.carousel-track {
	display: flex;
	width: 100%;
	transition: transform 0.32s ease;
	will-change: transform;
	/* 横向手势交给轮播，竖向留给页面滚动 */
	touch-action: pan-y;
	cursor: grab;
}

.carousel-track:active {
	cursor: grabbing;
}

.carousel-slide img {
	-webkit-user-drag: none;
	user-select: none;
}

.carousel-track.is-dragging {
	transition: none;
}

.carousel-slide {
	flex: 0 0 100%;
	min-width: 100%;
	cursor: zoom-in;
	display: flex;
	align-items: center;
	justify-content: center;
}

.carousel-slide img {
	width: 100%;
	height: auto;
	max-height: 70vh;
	object-fit: contain;
	pointer-events: none;
}

@media (max-width: 1023.98px) {
	.carousel-slide {
		background: #1a1a1a;
	}

	.carousel-slide img {
		max-height: 78vw;
	}
}

/* 轮播箭头 */
.carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: var(--xhs-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s;
}

@media (max-width: 1023.98px) {
	.carousel-arrow {
		display: none;
	}
}

.carousel:hover .carousel-arrow,
.carousel-arrow:focus-visible {
	opacity: 1;
}

.carousel-prev {
	left: 12px;
}

.carousel-next {
	right: 12px;
}

.carousel-arrow:hover {
	background: #ffffff;
}

/* 轮播计数与圆点 */
.carousel-counter {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
	padding: 2px 10px;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.45);
	color: #ffffff;
	font-size: 12px;
	backdrop-filter: blur(4px);
}

.carousel-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	z-index: 5;
	display: flex;
	justify-content: center;
	gap: 6px;
}

.carousel-dot {
	width: 6px;
	height: 6px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	transition: width 0.2s, background 0.2s, border-radius 0.2s;
}

.carousel-dot.is-active {
	width: 16px;
	border-radius: 3px;
	background: #ffffff;
}

.gallery-fallback {
	width: 100%;
	object-fit: contain;
}

.gallery-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	background: var(--xhs-gray-bg);
	padding: 40px;
}

/* 右栏 */
.detail-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

@media (min-width: 1024px) {
	.detail-content {
		border-radius: 0 var(--xhs-radius-panel) var(--xhs-radius-panel) 0;
		min-height: calc(100vh - var(--xhs-header-h) - 48px);
	}
}

.detail-scroll {
	padding: 20px 20px 0;
}

.detail-header {
	padding-bottom: 12px;
}

.detail-title {
	font-size: 20px;
	line-height: 1.4;
	word-break: break-all;
}

@media (min-width: 1024px) {
	.detail-title {
		font-size: 24px;
	}
}

.detail-topics {
	margin: 8px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.detail-date {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--xhs-text-sub);
}

.detail-body {
	font-size: 15px;
	line-height: 1.75;
	word-break: break-word;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--xhs-line);
}

.detail-body img {
	border-radius: var(--xhs-radius-card);
	margin: 8px 0;
}

.detail-body h2, .detail-body h3 {
	margin: 20px 0 10px;
}

.detail-body ul, .detail-body ol {
	padding-left: 22px;
}

.detail-body blockquote {
	margin: 12px 0;
	padding: 10px 14px;
	border-left: 3px solid var(--xhs-red);
	background: var(--xhs-gray-bg);
	border-radius: 0 var(--xhs-radius-card) var(--xhs-radius-card) 0;
	color: var(--xhs-text-sub);
}

.detail-body pre, .detail-body code {
	background: var(--xhs-gray-bg);
	border-radius: 6px;
	font-size: 13px;
}

.detail-body pre {
	padding: 12px;
	overflow-x: auto;
}

.detail-body code {
	padding: 2px 6px;
}

/* 作者栏 */
.detail-author {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 0;
}

.author-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.author-name-lg {
	font-size: 15px;
	font-weight: 600;
}

.author-name-lg:hover {
	color: var(--xhs-red);
}

.author-bio {
	font-size: 12px;
	color: var(--xhs-text-sub);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.follow-btn {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	height: 32px;
	padding: 0 16px;
	border: 1px solid var(--xhs-red);
	border-radius: 16px;
	color: var(--xhs-red);
	font-size: 13px;
	font-weight: 600;
	transition: background 0.2s, color 0.2s;
	flex-shrink: 0;
}

.follow-btn:hover {
	background: var(--xhs-red);
	color: #ffffff;
}

/* 评论区容器（桌面端固定于右栏底部） */
.detail-comments {
	flex-shrink: 0;
	border-top: 1px solid var(--xhs-line);
	background: var(--xhs-bg);
}

@media (min-width: 1024px) {
	.detail-comments {
		padding: 0 20px;
	}
}

@media (max-width: 1023.98px) {
	.detail-comments {
		padding: 0 16px;
	}
}

/* 上一篇/下一篇 */
.detail-nav {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	padding: 0 12px;
	flex-wrap: wrap;
}

.detail-nav-link {
	flex: 1;
	min-width: 240px;
	background: var(--xhs-bg);
	border-radius: var(--xhs-radius-card);
	padding: 12px 16px;
	transition: box-shadow 0.2s;
}

.detail-nav-link:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.detail-nav-link.next {
	text-align: right;
}

.nav-label {
	display: block;
	font-size: 12px;
	color: var(--xhs-text-sub);
}

.nav-title {
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
	font-weight: 600;
	margin-top: 2px;
}

/* ============================================================
   6. 评论区
   ============================================================ */
.comments-area {
	padding: 16px 0;
}

.comments-title,
.comment-reply-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--xhs-text-sub);
	margin: 0 0 12px;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-item {
	margin-bottom: 16px;
}

.comment-item .children {
	list-style: none;
	margin: 12px 0 0;
	padding: 0 0 0 40px;
}

@media (max-width: 600px) {
	.comment-item .children {
		padding-left: 24px;
	}
}

.comment-body {
	display: flex;
	gap: 10px;
}

.comment-main {
	flex: 1;
	min-width: 0;
}

.comment-head {
	display: flex;
	align-items: center;
	gap: 8px;
}

.comment-author-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--xhs-text-sub);
}

.comment-author-name a:hover {
	color: var(--xhs-red);
}

.comment-pending-tip {
	font-size: 11px;
	color: #e6a23c;
	background: #fdf6ec;
	border-radius: 4px;
	padding: 0 6px;
}

.comment-text {
	margin-top: 2px;
	font-size: 14px;
	word-break: break-word;
}

.comment-text p {
	margin: 0 0 4px;
}

.comment-foot {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
}

.comment-time {
	font-size: 12px;
	color: var(--xhs-text-faint);
}

.comment-reply-wrap .comment-reply-link,
.comment-reply-link {
	font-size: 12px;
	color: var(--xhs-text-sub);
}

.comment-reply-link:hover {
	color: var(--xhs-red);
}

.bypostauthor > .comment-body .comment-author-name::after {
	content: "作者";
	margin-left: 6px;
	font-size: 10px;
	font-weight: 400;
	color: var(--xhs-red);
	background: var(--xhs-red-light);
	border-radius: 4px;
	padding: 1px 5px;
}

.comments-closed {
	font-size: 13px;
	color: var(--xhs-text-faint);
	text-align: center;
	padding: 8px 0;
}

/* 评论表单 */
.comment-form {
	padding-top: 4px;
}

.comment-form p {
	margin: 0 0 10px;
}

.comment-field-input,
.comment-field-textarea {
	width: 100%;
	border: none;
	outline: none;
	background: var(--xhs-gray-bg);
	border-radius: 18px;
	padding: 10px 16px;
	font-size: 14px;
	font-family: inherit;
	color: var(--xhs-text);
	resize: none;
	transition: box-shadow 0.2s;
}

.comment-field-textarea {
	border-radius: 12px;
	min-height: 66px;
	line-height: 1.6;
}

.comment-field-input:focus,
.comment-field-textarea:focus {
	box-shadow: 0 0 0 1.5px var(--xhs-red);
	background: #ffffff;
}

.comment-form .comment-form-field {
	display: inline-block;
	width: calc(33.33% - 7px);
	margin-right: 8px;
}

.comment-form .comment-form-field:last-of-type {
	margin-right: 0;
}

@media (max-width: 600px) {
	.comment-form .comment-form-field {
		display: block;
		width: 100%;
		margin-right: 0;
	}
}

.comment-notes-skip {
	font-size: 12px;
	color: var(--xhs-text-faint);
}

.submit-comment {
	display: inline-block;
	border: none;
	padding: 10px 32px;
	border-radius: 19px;
	background: var(--xhs-red);
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s;
}

.submit-comment:hover {
	opacity: 0.88;
}

.cancel-comment-reply-link {
	margin-left: 12px;
	font-size: 13px;
	color: var(--xhs-text-sub);
}

/* 评论分页 */
.comment-navigation {
	margin-bottom: 12px;
}

.comment-navigation .nav-links {
	display: flex;
	gap: 6px;
}

.comment-navigation .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	border-radius: 14px;
	background: var(--xhs-gray-bg);
	font-size: 13px;
}

.comment-navigation .page-numbers.current {
	background: var(--xhs-red);
	color: #ffffff;
}

/* ============================================================
   7. 单页 & 相关笔记
   ============================================================ */
.page-container {
	max-width: 800px;
	margin: 12px auto;
	padding: 0 12px;
}

.page-article {
	background: var(--xhs-bg);
	border-radius: var(--xhs-radius-panel);
	padding: 24px 20px;
}

@media (min-width: 768px) {
	.page-article {
		padding: 32px 40px;
	}
}

.page-title {
	font-size: 22px;
	margin-bottom: 16px;
}

.page-content {
	line-height: 1.8;
	word-break: break-word;
}

.related-notes {
	margin-top: 24px;
}

.related-title {
	font-size: 17px;
	margin: 0 4px 12px;
}

/* ============================================================
   8. 页脚
   ============================================================ */
.site-footer {
	background: var(--xhs-bg);
	border-top: 1px solid var(--xhs-line);
	margin-top: 24px;
}

.footer-widgets {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

.footer-widget {
	flex: 1;
	min-width: 200px;
}

.footer-widget-title {
	font-size: 14px;
	margin-bottom: 8px;
}

.footer-bottom {
	padding: 20px 16px;
	text-align: center;
	font-size: 12px;
	color: var(--xhs-text-sub);
}

.footer-bottom p {
	margin: 0 0 4px;
}

.footer-bottom a:hover {
	color: var(--xhs-red);
}

.footer-sep {
	margin: 0 6px;
	color: var(--xhs-line);
}

.footer-powered {
	color: var(--xhs-text-faint);
}

/* ============================================================
   9. 全屏图片弹层
   ============================================================ */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 300;
	background: rgba(0, 0, 0, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox[hidden] {
	display: none;
}

.lightbox-figure {
	margin: 0;
	max-width: 90vw;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.lightbox-image {
	max-width: 90vw;
	max-height: 82vh;
	object-fit: contain;
	border-radius: 4px;
}

.lightbox-counter {
	margin-top: 10px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
}

.lightbox-close {
	position: absolute;
	top: 16px;
	right: 20px;
	z-index: 5;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.lightbox-close:hover {
	background: rgba(255, 255, 255, 0.25);
}

.lightbox-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.lightbox-arrow:hover {
	background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
	left: 20px;
}

.lightbox-next {
	right: 20px;
}

@media (max-width: 600px) {
	.lightbox-arrow {
		display: none;
	}
}

body.lightbox-open,
body.drawer-open {
	overflow: hidden;
}

/* ============================================================
   10. 通用杂项
   ============================================================ */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	overflow: hidden;
	word-wrap: normal !important;
}

.page-links {
	margin: 16px 0;
}

.sticky {}

.alignleft {
	float: left;
	margin: 0 16px 16px 0;
}

.alignright {
	float: right;
	margin: 0 0 16px 16px;
}

.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.wp-block-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0;
}

.wp-block-gallery .blocks-gallery-item {
	flex: 1 1 30%;
	margin: 0;
}
