/* ==========================================================================
   明暗主题切换按钮（跟随头部导航，电脑显示图标 + 文字，手机仅图标）
   ========================================================================== */
.nm-theme-toggle {
	align-items: center;
	background: var(--nm-bg-ffffff-03);
	border: 1px solid var(--nm-border);
	border-radius: 999px;
	color: var(--nm-muted-strong);
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	font-family: inherit;
	font-size: var(--nm-fs-xs);
	font-weight: 600;
	gap: 6px;
	height: 38px;
	line-height: 1;
	padding: 0 14px;
	transition: background-color var(--nm-dur) var(--nm-ease), border-color var(--nm-dur) var(--nm-ease), color var(--nm-dur) var(--nm-ease);
	white-space: nowrap;
}

.nm-theme-toggle:hover {
	background: rgba(0, 229, 255, 0.08);
	border-color: var(--nm-border-strong);
	color: var(--nm-cyan);
}

.nm-theme-toggle:focus-visible {
	outline: 2px solid var(--nm-cyan);
	outline-offset: 2px;
}

.nm-theme-toggle__face {
	align-items: center;
	display: inline-flex;
	gap: 6px;
}

.nm-theme-toggle__face--light {
	display: none;
}

[data-theme="light"] .nm-theme-toggle__face--dark {
	display: none;
}

[data-theme="light"] .nm-theme-toggle__face--light {
	display: inline-flex;
}

.nm-theme-toggle__icon {
	font-size: 14px;
	line-height: 1;
}

/* 861–980px：导航仍是横排，切换按钮收为图标，避免挤换行 */
@media (max-width: 980px) {
	.nm-theme-toggle {
		justify-content: center;
		padding: 0;
		width: 38px;
	}

	.nm-theme-toggle__face {
		gap: 0;
	}

	.nm-theme-toggle__text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

@media (max-width: 860px) {
	.nm-header__actions {
		gap: 6px;
		min-width: 0;
	}

	.nm-theme-toggle {
		justify-content: center;
		padding: 0;
		width: 38px;
	}

	.nm-theme-toggle__face {
		gap: 0;
	}

	.nm-theme-toggle__text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}
