.langyu-gallery-header {
	margin-bottom: 20px;
}

.langyu-gallery-header-meta {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.langyu-gallery-avatar-link {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
}

.langyu-gallery-avatar-link img {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 50%;
}

.langyu-gallery-author-info {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	min-width: 0;
}

.langyu-gallery-author-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.langyu-gallery-author-row .author-link {
	font-size: 13px;
	font-weight: 600;
	color: var(--langyu-text, #222);
	line-height: 1.4;
	text-decoration: none;
}

.langyu-gallery-author-row .author-link:hover {
	color: var(--langyu-primary, #3273f0);
}

.langyu-gallery-author-row .langyu-post-time {
	font-size: 12px;
	color: var(--langyu-secondary, #999);
	white-space: nowrap;
}

.langyu-gallery-author-info .langyu-single-title {
	font-size: 20px;
	line-height: 1.35;
	margin: 4px 0 0;
}

.langyu-gallery-grid {
	display: grid;
	gap: 6px;
	margin-bottom: 20px;
	margin-left: 56px;
	border-radius: 4px;
	overflow: hidden;
}

.langyu-gallery-grid-four {
	grid-template-columns: repeat(2, 1fr);
}

.langyu-gallery-grid-nine {
	grid-template-columns: repeat(3, 1fr);
}

.langyu-gallery-grid-item {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	cursor: pointer;
	background: #f0f0f1;
}

.langyu-gallery-grid-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.langyu-gallery-grid-item:hover img {
	transform: scale(1.05);
}

.langyu-gallery-slider {
	margin-bottom: 20px;
}

.langyu-gallery-slider-counter {
	position: absolute;
	bottom: 10px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	padding: 2px 10px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	font-size: 12px;
	white-space: nowrap;
}

.langyu-gallery-slider-main {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	background: #f0f0f1;
	margin-bottom: 10px;
}

.langyu-gallery-slider-view {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
}

.langyu-gallery-slide {
	display: none;
	width: 100%;
}

.langyu-gallery-slide:first-child {
	display: block;
}

.langyu-gallery-slider-img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 600px;
	object-fit: contain;
}

.langyu-gallery-slider-prev,
.langyu-gallery-slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	background: rgba(0, 0, 0, 0.35);
	border: none;
	color: #fff;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.langyu-gallery-slider-prev:hover,
.langyu-gallery-slider-next:hover {
	background: rgba(0, 0, 0, 0.55);
}

.langyu-gallery-slider-prev {
	left: 8px;
}

.langyu-gallery-slider-next {
	right: 8px;
}

.langyu-gallery-slider-thumbs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 4px;
}

.langyu-gallery-slider-thumbs::-webkit-scrollbar {
	display: none;
}

.langyu-gallery-slider-thumb {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	padding: 0;
	cursor: pointer;
	background: none;
	opacity: 0.55;
	transition: opacity 0.2s, border-color 0.2s;
}

.langyu-gallery-slider-thumb:hover {
	opacity: 0.85;
}

.langyu-gallery-slider-thumb.is-active {
	opacity: 1;
	border-color: var(--langyu-primary, #3273f0);
}

.langyu-gallery-slider-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 860px) {
	.langyu-gallery-slider-img {
		max-height: 400px;
	}

	.langyu-gallery-slider-prev,
	.langyu-gallery-slider-next {
		width: 32px;
		height: 32px;
	}

	.langyu-gallery-slider-thumbs {
		gap: 6px;
	}

	.langyu-gallery-slider-thumb {
		width: 48px;
		height: 48px;
	}

	.langyu-gallery-grid {
		gap: 4px;
	}
}

/* =========================
 * 图文列表 — 三栏布局
 * ========================= */

body.post-type-archive-lyp_gallery {
	background-color: #f7f7f9;
}

.langyu-gallery-archive-wrap {
	margin: 100px auto 40px;
	padding: 0 20px;
}

.langyu-gallery-archive-layout {
	display: grid;
	grid-template-columns: 164px 520px 164px;
	gap: 20px;
	justify-content: space-between;
	width: 100%;
	align-items: start;
}

.langyu-gallery-archive-left-placeholder {
	width: 164px;
}

.langyu-gallery-archive-left {
	position: fixed;
	top: 80px;
	display: flex;
	flex-direction: column;
	width: 164px;
	height: calc(100vh - 100px);
	z-index: 10;
}

.langyu-gallery-archive-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 6px 0;
}

.langyu-gallery-archive-nav-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 6px;
	font-size: 15px;
	color: var(--langyu-text, #222);
	text-decoration: none;
	transition: background 0.2s;
}

.langyu-gallery-archive-nav-item:hover {
	background: var(--langyu-bg, #f5f6fa);
}

.langyu-gallery-archive-nav-item.is-active {
	color: var(--langyu-primary, #3273f0);
	font-weight: 600;
}

.langyu-gallery-archive-main {
	min-width: 0;
}

.langyu-gallery-archive-list {
	display: flex;
	flex-direction: column;
	background: var(--langyu-surface, #fff);
	border-radius: 10px;
	overflow: hidden;
}

.langyu-gallery-archive-card {
	background: var(--langyu-surface, #fff);
	padding: 32px 24px 32px;
}

.langyu-gallery-archive-card-header {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 10px;
}

.langyu-gallery-archive-author-avatar {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
}

.langyu-gallery-archive-author-avatar img {
	display: block;
	width: 36px;
	height: 36px;
	border-radius: 50%;
}

.langyu-gallery-archive-author-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.langyu-gallery-archive-author-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.langyu-gallery-archive-author-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--langyu-text, #222);
	text-decoration: none;
}

.langyu-gallery-archive-author-name:hover {
	color: var(--langyu-primary, #3273f0);
}

.langyu-gallery-archive-time {
	font-size: 12px;
	color: var(--langyu-secondary, #999);
}

.langyu-gallery-archive-card-title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	margin: 4px 0 0;
}

.langyu-gallery-archive-card-title a {
	color: var(--langyu-text, #222);
	text-decoration: none;
}

.langyu-gallery-archive-card-title a:hover {
	color: var(--langyu-primary, #3273f0);
}

.langyu-gallery-archive-excerpt {
	margin-left: 46px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--langyu-secondary, #666);
	margin-bottom: 10px;
}

.langyu-gallery-archive-images {
	margin-left: 46px;
	display: flex;
	gap: 6px;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
	max-width: none;
	cursor: grab;
	padding-bottom: 2px;
}

.langyu-gallery-archive-images::-webkit-scrollbar {
	display: none;
}

.langyu-gallery-archive-images.is-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
}

.langyu-gallery-archive-images-four,
.langyu-gallery-archive-images-nine {
	grid-template-columns: none;
}

.langyu-gallery-archive-image-item {
	position: relative;
	flex-shrink: 0;
	max-height: 350px;
	height: 350px;
	overflow: hidden;
	border-radius: 6px;
	background: #f0f0f1;
	user-select: none;
	-webkit-user-drag: none;
}

.langyu-gallery-archive-image-item img {
	display: block;
	width: auto;
	height: 100%;
	max-width: none;
	object-fit: contain;
	pointer-events: none;
}

.langyu-gallery-archive-image-more {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	pointer-events: none;
}

.langyu-gallery-archive-card-actions {
	display: flex;
	gap: 4px;
	margin-top: 12px;
	padding-left: 46px;
}

.langyu-gallery-archive-card-actions .interaction-icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: var(--langyu-secondary, #999);
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.langyu-gallery-archive-card-actions .interaction-icon-btn:hover {
	background: rgba(0, 0, 0, 0.05);
	color: var(--langyu-text, #222);
}

.langyu-gallery-archive-divider {
	border: none;
	border-top: 1px solid #F0F0F3;
	margin: 0;
}

.langyu-gallery-archive-right {
	width: 164px;
	position: sticky;
	top: 100px;
	align-self: start;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.langyu-gallery-archive-right-section {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.langyu-gallery-archive-right-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--langyu-secondary, #999);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.langyu-gallery-archive-sort-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.langyu-gallery-archive-sort-btn {
	display: block;
	padding: 6px 10px;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: var(--langyu-secondary, #666);
	font-size: 14px;
	text-align: left;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.langyu-gallery-archive-sort-btn:hover {
	background: rgba(0, 0, 0, 0.04);
}

.langyu-gallery-archive-sort-btn.is-active {
	color: var(--langyu-primary, #3273f0);
	font-weight: 600;
}

.langyu-gallery-archive-empty {
	background: var(--langyu-surface, #fff);
	border-radius: 10px;
	padding: 40px 20px;
	text-align: center;
	color: var(--langyu-secondary, #999);
}

.langyu-gallery-skeleton {
	display: none;
}

.langyu-gallery-skeleton.is-visible {
	display: block;
}

.langyu-gallery-skeleton-card {
	display: flex;
	gap: 12px;
	padding: 16px;
	background: var(--langyu-surface, #fff);
	border-radius: 10px;
	margin-bottom: 1px;
}

.langyu-gallery-skeleton-avatar {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #e8e8ec;
	animation: langyu-skeleton-pulse 1.5s ease-in-out infinite;
}

.langyu-gallery-skeleton-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.langyu-gallery-skeleton-line {
	height: 14px;
	border-radius: 6px;
	background: #e8e8ec;
	animation: langyu-skeleton-pulse 1.5s ease-in-out infinite;
}

.langyu-gallery-skeleton-line.is-short {
	width: 50%;
}

.langyu-gallery-skeleton-line.is-medium {
	width: 75%;
}

.langyu-gallery-skeleton-images {
	display: flex;
	gap: 6px;
	margin-top: 4px;
}

.langyu-gallery-skeleton-img {
	flex-shrink: 0;
	width: 100px;
	height: 100px;
	border-radius: 6px;
	background: #e8e8ec;
	animation: langyu-skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes langyu-skeleton-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}

html.is-dark-mode .langyu-gallery-skeleton-card {
	background: #1f1f22;
}

html.is-dark-mode .langyu-gallery-skeleton-avatar,
html.is-dark-mode .langyu-gallery-skeleton-line,
html.is-dark-mode .langyu-gallery-skeleton-img {
	background: #2a2a30;
}

body.single-lyp_gallery {
	background-color: #F7F7F9;
}

body.single-lyp_gallery .langyu-main {
	max-width: 520px;
}

body.single-lyp_gallery .langyu-gallery-article {
	background: #fff;
	padding: 20px;
	border-radius: 8px;
}

body.single-lyp_gallery .langyu-gallery-article > p,
body.single-lyp_gallery .langyu-gallery-article > div[class*="wp-block-"],
body.single-lyp_gallery .langyu-post-actions-right {
	margin-left: 56px;
	margin-bottom: 12px;
}

body.single-lyp_gallery .comments-area {
	background: #fff;
	padding: 20px;
	border-radius: 8px;
	margin-top: 20px;
}

/* =========================
 * 暗黑模式
 * ========================= */
html.is-dark-mode body.post-type-archive-lyp_gallery {
	background-color: #121316;
}

html.is-dark-mode body.single-lyp_gallery {
	background-color: #121316;
}

html.is-dark-mode .langyu-gallery-grid-item {
	background: #1a1a1e;
}

html.is-dark-mode .langyu-gallery-archive-image-item {
	background: #1a1a1e;
}

html.is-dark-mode .langyu-gallery-slider-main {
	background: #1a1a1e;
}

html.is-dark-mode .langyu-gallery-archive-list {
	background: #1f1f22;
}

html.is-dark-mode .langyu-gallery-archive-card {
	background: #1f1f22;
}

html.is-dark-mode .langyu-gallery-archive-image-item {
	background: #1a1a1e;
}

html.is-dark-mode .langyu-gallery-archive-divider {
	border-top-color: #2a2a2e;
}

html.is-dark-mode .langyu-gallery-archive-nav-item:hover {
	background: #222228;
}

html.is-dark-mode .langyu-gallery-archive-sort-btn:hover {
	background: rgba(255, 255, 255, 0.06);
}

html.is-dark-mode .langyu-gallery-archive-empty {
	background: #1f1f22;
}

html.is-dark-mode body.single-lyp_gallery .langyu-gallery-article {
	background: #1f1f22;
}

html.is-dark-mode body.single-lyp_gallery .comments-area {
	background: #1f1f22;
}
