/* ==========================================================================
   说说增强 · 样式
   目标：不影响主题其它部分，只在 .shuoshuo-item 内生效
   ========================================================================== */

/* ---------- 内容区：图片容器 ---------- */
/* 只对真正的正文配图生效，表情另有一套行内规则 */
.shuoshuo-item .shuoshuo-content img:not(.sse-emoji) {
	display: block;
	max-width: 100%;
}

/* ---------- 表情：跟随文字行内显示 ---------- */
.shuoshuo-content img.sse-emoji,
.shuoshuo-content .sse-emoji-wrap img {
	display: inline-block !important;
	width: auto !important;
	height: 1.4em !important;
	max-width: none !important;
	max-height: 1.4em !important;
	margin: 0 1px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: none !important;
	vertical-align: -.24em;
	object-fit: contain;
	cursor: default;
	transition: transform .15s ease;
}

.shuoshuo-content img.sse-emoji:hover {
	transform: scale(1.18);
}

.shuoshuo-content .sse-emoji-wrap {
	display: inline;
	line-height: 1;
	white-space: nowrap;
}

/* 九宫格 */
.sse-gallery {
	display: grid;
	gap: 6px;
	margin-top: 10px;
	grid-template-columns: repeat(3, 1fr);
}

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

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

.sse-gallery .sse-cell {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 1 / 1;
	background: rgba(0, 0, 0, .04);
	cursor: zoom-in;
	margin: 0;
}

.sse-gallery.sse-n2 .sse-cell {
	aspect-ratio: 4 / 3;
}

.sse-gallery .sse-cell img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover;
	margin: 0 !important;
	border-radius: 0 !important;
	transition: transform .35s ease;
}

.sse-gallery .sse-cell:hover img {
	transform: scale(1.04);
}

/* 单图大图 */
.sse-single {
	margin-top: 10px;
	border-radius: 10px;
	overflow: hidden;
	cursor: zoom-in;
	background: rgba(0, 0, 0, .04);
}

.sse-single img {
	width: 100% !important;
	max-height: 540px;
	object-fit: cover;
	margin: 0 !important;
	border-radius: 0 !important;
	display: block;
	transition: transform .35s ease;
}

.sse-single:hover img {
	transform: scale(1.01);
}

/* ---------- 互动栏（B 站动态风格） ---------- */
.sse-actions {
	display: flex;
	align-items: center;
	gap: 34px;
	margin: 12px 0 2px;
	padding: 0 2px;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.sse-actions .sse-act {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: 0;
	padding: 4px 0;
	margin: 0;
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
	color: #9499a0;
	transition: color .18s ease, transform .18s ease;
	box-shadow: none;
	font-family: inherit;
}

.sse-actions .sse-act:hover {
	color: #00aeec;
}

.sse-actions .sse-act:active {
	transform: scale(.94);
}

.sse-actions .sse-act svg {
	width: 18px;
	height: 18px;
	display: block;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.sse-actions .sse-act .sse-count {
	min-width: 12px;
	font-variant-numeric: tabular-nums;
}

.sse-actions .sse-act .sse-count.is-zero {
	opacity: .85;
}

/* 点赞激活态：B 站粉 */
.sse-actions .sse-like.is-liked {
	color: #ff6699;
}

.sse-actions .sse-like.is-liked svg {
	fill: #ff6699;
	stroke: #ff6699;
}

@keyframes sse-pop {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.28); }
	100% { transform: scale(1); }
}

.sse-actions .sse-like.sse-pop svg {
	animation: sse-pop .38s ease;
}

/* 评论按钮保持链接语义但外观一致 */
a.sse-act {
	text-decoration: none;
}

/* ---------- 灯箱 ---------- */
.sse-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, .86);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity .2s ease;
	padding: 4vh 4vw;
	box-sizing: border-box;
}

.sse-lightbox.sse-open {
	opacity: 1;
}

.sse-lightbox img {
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
	transform: scale(.96);
	transition: transform .2s ease;
	margin: 0 !important;
}

.sse-lightbox.sse-open img {
	transform: scale(1);
}

.sse-lb-btn {
	position: absolute;
	background: rgba(255, 255, 255, .14);
	border: 0;
	color: #fff;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .18s ease;
	backdrop-filter: blur(4px);
}

.sse-lb-btn:hover {
	background: rgba(255, 255, 255, .28);
}

.sse-lb-btn svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: #fff;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sse-lb-close { top: 18px; right: 18px; }
.sse-lb-prev  { left: 18px; top: 50%; transform: translateY(-50%); }
.sse-lb-next  { right: 18px; top: 50%; transform: translateY(-50%); }

.sse-lb-counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, .75);
	font-size: 13px;
	letter-spacing: .5px;
}

/* ---------- 轻提示 ---------- */
.sse-toast {
	position: fixed;
	left: 50%;
	bottom: 12vh;
	transform: translate(-50%, 12px);
	background: rgba(0, 0, 0, .82);
	color: #fff;
	font-size: 13px;
	padding: 9px 18px;
	border-radius: 999px;
	z-index: 1000000;
	opacity: 0;
	transition: opacity .22s ease, transform .22s ease;
	pointer-events: none;
	white-space: nowrap;
}

.sse-toast.sse-show {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ---------- 暗色模式 ---------- */
body.dark .sse-actions .sse-act {
	color: #8b8f96;
}

body.dark .sse-actions .sse-act:hover {
	color: #33c3f0;
}

body.dark .sse-actions .sse-like.is-liked {
	color: #ff7aa8;
}

body.dark .sse-gallery .sse-cell,
body.dark .sse-single {
	background: rgba(255, 255, 255, .06);
}

/* ---------- 小屏适配 ---------- */
@media (max-width: 600px) {
	.sse-actions {
		gap: 26px;
	}

	.sse-gallery {
		gap: 4px;
	}

	.sse-single img {
		max-height: 380px;
	}

	.sse-lb-prev,
	.sse-lb-next {
		width: 38px;
		height: 38px;
	}
}
