/* ===== koishi 增强组件：返回顶部 / 图片灯箱 ===== */
.to-top {
	position: fixed;
	right: 24px;
	bottom: 28px;
	z-index: 90;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
	color: var(--ink);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	padding: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.to-top:hover {
	color: var(--accent);
	border-color: var(--accent);
}

.to-top svg {
	width: 18px;
	height: 18px;
	display: block;
}

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vh 4vw;
	background: rgba(0, 0, 0, 0.82);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.22s var(--ease), visibility 0.22s;
}

.lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.lightbox img {
	max-width: 100%;
	max-height: 92vh;
	border-radius: var(--radius-sm);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	transform: scale(0.96);
	transition: transform 0.22s var(--ease);
}

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

.article-content img {
	cursor: zoom-in;
}

@media (max-width: 720px) {
	.to-top {
		right: 14px;
		bottom: 18px;
		width: 38px;
		height: 38px;
	}
}

.article-like {
	margin: 28px 0 8px;
	display: flex;
	justify-content: center;
}

.like-btn {
	min-width: 96px;
	padding: 9px 20px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	color: var(--ink-soft);
	font-size: 14px;
	cursor: pointer;
	transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.like-btn:hover,
.like-btn.is-liked {
	color: var(--accent);
	border-color: var(--accent);
	background: var(--accent-soft);
}

.article-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin-top: 0;
	padding-top: 14px;
	border-top: 1px dashed var(--line);
}

.share-btn {
	display: inline-flex;
	align-items: center;
	height: 28px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--ink-soft);
	font-size: 12px;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.share-btn:hover {
	color: var(--accent);
	border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
	.to-top,
	.lightbox,
	.lightbox img,
	.like-btn,
	.share-btn {
		transition: none;
	}
}
