/* 实况照片（安卓 Motion Photo / Live Photo 静态降级） */
.publication-image.live-photo-wrap {
	position: relative;
}

.publication-image.live-photo-wrap .live-photo {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease-in;
	z-index: 2;
	pointer-events: none;
	background: transparent;
}

.publication-image.live-photo-wrap .live-photo.is-live-playing {
	opacity: 1;
	visibility: visible;
}

.publication-image.live-photo-wrap .live-photo.is-live-failed {
	display: none;
}

.live-photo-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px 4px 8px;
	border-radius: 20px;
	background: rgba(0, 0, 0, 0.5);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	font-size: 12px;
	line-height: 16px;
	font-weight: 500;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	pointer-events: none;
	-webkit-user-select: none;
	user-select: none;
}

.live-photo-badge::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #34d75f;
	box-shadow: 0 0 0 3px rgba(52, 215, 95, 0.22), 0 0 8px rgba(52, 215, 95, 0.7);
}

@media (prefers-reduced-motion: reduce) {
	.publication-image.live-photo-wrap .live-photo {
		display: none;
	}
}

/* 发帖预览区：右上角是删除按钮，标记放左下角 */
.pubbox-images__list-item .live-photo-badge {
	top: auto;
	right: auto;
	bottom: 8px;
	left: 8px;
}


/* 实况照片点开大图(fancybox)：在静态大图上叠加静音循环视频，观感=一张会动的图片 */
/* [FIX 2026-11-21] 去掉 position:relative !important——它破坏了 fancybox 图片弹窗的
   absolute+transform 定位机制（图片偏右、不能正常展示）。实况视频 overlay 的 absolute
   定位基准不需要父级是 relative（absolute 父级同样是定位上下文）。 */
.fancybox-content {
	position: relative;
}
.fancybox-content video.fancybox-live-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	z-index: 2;
	background: transparent;
	pointer-events: none;
}
.fancybox-content .fancybox-live-badge {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 13px 6px 10px;
	border-radius: 22px;
	background: linear-gradient(135deg, rgba(28, 28, 30, 0.72), rgba(12, 12, 14, 0.6));
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	backdrop-filter: blur(14px) saturate(160%);
	border: 1px solid rgba(255, 255, 255, 0.16);
	color: #f5f5f7;
	font-size: 12px;
	font-weight: 600;
	line-height: 16px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
	pointer-events: none;
	-webkit-user-select: none;
	user-select: none;
}

.fancybox-content .fancybox-live-badge::before {
	content: "";
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #7dffa0, #1ecb53 60%, #0e9f3d);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 10px 1px rgba(46, 222, 99, 0.85);
}
