@charset "utf-8";
/* ==========================================================================
   刻画主题 —— 图片增强样式（灯箱 / 懒加载 / 图集短代码）
   与 style.css 中 .img_box 的白色卡片风格保持一致，不改变原有排版。
   ========================================================================== */

/* ---------- 光标：只有开启灯箱时图片才显示放大镜 ---------- */
.post-content img {
	cursor: default;
}

body.book-no-lightbox .post-content .img_box img,
body.book-no-lightbox .post-content .book-gallery img {
	cursor: default;
}

body.book-has-lightbox .post-content .img_box img,
body.book-has-lightbox .post-content .book-gallery img {
	cursor: zoom-in;
}

/* ---------- 懒加载占位 ---------- */
.post-content img[data-original] {
	background-color: #ece7db;
}

/* ---------- 图集短代码 [gallery] ---------- */
.post-content .book-gallery {
	display: grid;
	gap: 14px;
	margin: 24px 0;
	padding: 0;
	text-indent: 0;
	list-style: none;
}

.post-content .book-gallery-1 {
	grid-template-columns: minmax(0, 1fr);
}

.post-content .book-gallery-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-content .book-gallery-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-content .book-gallery-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.post-content .book-gallery .book-gallery-item {
	display: block;
	margin: 0;
	padding: 10px;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 1px 2px rgba(47, 43, 36, .06), 0 8px 22px rgba(47, 43, 36, .1);
	line-height: 0;
	box-sizing: border-box;
	transition: box-shadow .2s ease;
}

.post-content .book-gallery .book-gallery-item:hover {
	box-shadow: 0 2px 6px rgba(47, 43, 36, .08), 0 12px 28px rgba(47, 43, 36, .12);
}

.post-content .book-gallery img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #ece7db;
	box-shadow: 0 0 0 1px rgba(47, 43, 36, .06);
	box-sizing: border-box;
}

.post-content .book-gallery figcaption {
	display: block;
	padding: 10px 6px 2px;
	text-align: center;
	font-size: 12px;
	line-height: 1.5;
	color: #8b857a;
	letter-spacing: .02em;
	text-indent: 0;
}

@media screen and (max-width: 900px) {
	.post-content .book-gallery-3,
	.post-content .book-gallery-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 480px) {
	.post-content .book-gallery {
		gap: 10px;
		margin: 18px 0;
	}

	.post-content .book-gallery .book-gallery-item {
		padding: 8px;
	}
}

/* ---------- LivePhoto / Motion Photo ---------- */
.post-content .book-livephoto {
	display: block;
	margin: 24px 0;
	padding: 10px;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 1px 2px rgba(47, 43, 36, .06), 0 8px 22px rgba(47, 43, 36, .1);
	text-indent: 0;
	line-height: 0;
	box-sizing: border-box;
	transition: box-shadow .2s ease;
}

.post-content .book-livephoto:hover {
	box-shadow: 0 2px 6px rgba(47, 43, 36, .08), 0 12px 28px rgba(47, 43, 36, .12);
}

.post-content .book-gallery .book-livephoto {
	margin: 0;
}

.post-content .book-livephoto__frame {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	overflow: hidden;
	background: #ece7db;
	border-radius: 2px;
	line-height: 0;
}

.post-content .book-livephoto__img,
.post-content .book-livephoto__video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: #ece7db;
	object-fit: cover;
	box-sizing: border-box;
}

.post-content .book-livephoto__video {
	opacity: 0;
	transition: opacity .25s ease;
	pointer-events: none;
	z-index: 1;
}

.post-content .book-livephoto.is-playing .book-livephoto__video {
	opacity: 1;
}

/* LIVE 角标 */
.post-content .book-livephoto__badge {
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 7px;
	border-radius: 999px;
	background: rgba(26, 22, 17, .55);
	color: #fff;
	font-size: 10px;
	line-height: 1;
	letter-spacing: .08em;
	font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
	text-indent: 0;
	cursor: pointer;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	transition: background .2s ease;
}

.post-content .book-livephoto__badge:hover {
	background: rgba(26, 22, 17, .75);
}

.post-content .book-livephoto__badge i {
	display: block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ffd166;
	box-shadow: 0 0 0 0 rgba(255, 209, 102, .7);
	animation: bookLivePulse 2s infinite;
}

@keyframes bookLivePulse {
	0% {
		box-shadow: 0 0 0 0 rgba(255, 209, 102, .6);
	}

	70% {
		box-shadow: 0 0 0 5px rgba(255, 209, 102, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(255, 209, 102, 0);
	}
}

.post-content .book-livephoto figcaption {
	display: block;
	padding: 8px 2px 0;
	text-align: center;
	font-size: 12px;
	line-height: 1.5;
	color: #8b857a;
	letter-spacing: .02em;
	text-indent: 0;
}

/* Motion Photo（只有静态图）：按普通图片卡片显示 */
.post-content .book-gallery .book-livephoto__frame {
	border-radius: 4px;
}

@media screen and (prefers-reduced-motion: reduce) {
	.post-content .book-livephoto__badge i {
		animation: none;
	}
}

/* ---------- Fancybox 细节微调：与本主题的字体、圆角统一 ---------- */
.fancybox-container .fancybox-caption {
	font-family: inherit;
	font-size: 13px;
}

.fancybox-container .fancybox-thumbs {
	background: rgba(26, 22, 17, .92);
}

.fancybox-container .fancybox-thumbs__list a:before {
	border-color: var(--book-accent, #009999);
}
