/* =====================================================================
   News Portal — 主样式（v0.0.1）
   变量：--accent / --np-grid-min 由 Customizer 注入；
        --accent-soft 由 CSS color-mix 自动推导（浅色底 / 深色半透明）
   主题切换：<html data-theme="light|dark">
   ===================================================================== */
:root {
	--accent: #2563eb;
	--accent-soft: #eaf1ff;
	--accent-strong: #1d4ed8;
	--ink: #0b1220;
	--ink-2: #1a2434;
	--muted: #5b6472;
	--line: #e5e9f0;
	--line-strong: #d7dde8;
	--bg: #f5f7fa;
	--bg-elev: #ffffff;
	--header-bg: rgba(255, 255, 255, 0.86);
	--scrim: linear-gradient(180deg, rgba(11, 18, 32, 0) 22%, rgba(11, 18, 32, 0.88) 100%);
	--shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
	--shadow-md: 0 10px 30px rgba(16, 24, 40, 0.10);
	--radius: 16px;
	--np-grid-min: 250px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

@supports (color: color-mix(in srgb, red 10%, white)) {
	:root { --accent-soft: color-mix(in srgb, var(--accent) 11%, #ffffff); }
	[data-theme="dark"] { --accent-soft: color-mix(in srgb, var(--accent) 22%, transparent); }
}

[data-theme="dark"] {
	--ink: #e7edf6;
	--ink-2: #cdd7e6;
	--muted: #93a0b4;
	--line: #1e2a41;
	--line-strong: #2a3a58;
	--bg: #0a1120;
	--bg-elev: #101a2e;
	--header-bg: rgba(10, 17, 32, 0.82);
	--scrim: linear-gradient(180deg, rgba(4, 8, 16, 0) 22%, rgba(4, 8, 16, 0.92) 100%);
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
	--shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* 无 JS / 未设置时跟随系统 */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) {
		--ink: #e7edf6; --ink-2: #cdd7e6; --muted: #93a0b4;
		--line: #1e2a41; --line-strong: #2a3a58;
		--bg: #0a1120; --bg-elev: #101a2e;
		--header-bg: rgba(10, 17, 32, 0.82);
		--scrim: linear-gradient(180deg, rgba(4, 8, 16, 0) 22%, rgba(4, 8, 16, 0.92) 100%);
		--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
		--shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
	}
}

/* 主题切换过渡 */
html.theme-animating,
html.theme-animating *,
html.theme-animating *::before,
html.theme-animating *::after {
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, fill 0.25s ease !important;
}

/* ===== 基础 ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	color: var(--ink);
	background: var(--bg);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	transition: background-color 0.25s ease, color 0.25s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
iframe, video, object, embed { max-width: 100%; }

/* 触屏与移动端优化 */
* { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; cursor: pointer; }
input[type="search"], input[type="text"], input[type="url"], input[type="number"],
input[type="email"], input[type="password"], textarea, select { font-size: 16px; } /* 防 iOS 聚焦缩放 */
.np-article-content iframe, .np-article-content video, .np-article-content .wp-video { border-radius: 12px; }
.np-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; margin: 18px 0; background: #000; }
.np-video-wrap iframe, .np-video-wrap video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.np-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 8px; top: 8px; background: var(--bg-elev); padding: 10px 16px; z-index: 9999; border-radius: 8px; box-shadow: var(--shadow-md); }

/* ===== 头部 ===== */
.np-site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--header-bg);
	backdrop-filter: saturate(1.4) blur(12px);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid var(--line);
	transition: box-shadow 0.2s ease, background-color 0.25s ease;
}
.np-site-header.np-scrolled { box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08); }
[data-theme="dark"] .np-site-header.np-scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }

.np-header-row { display: flex; align-items: center; gap: 20px; min-height: 66px; }
.np-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.np-brand .custom-logo { max-height: 46px; width: auto; }
.np-site-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.np-site-title:hover { color: var(--accent); }
.np-site-desc { font-size: 12px; color: var(--muted); white-space: nowrap; }

.np-nav { flex-shrink: 0; }
.np-nav-head { display: none; }
.np-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.np-menu > li { position: relative; }
.np-menu a { display: block; padding: 9px 13px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.np-menu a:hover { background: var(--accent-soft); color: var(--accent); }
.np-menu .current-menu-item > a, .np-menu .current_page_item > a { color: var(--accent); }
.np-menu .current-menu-item > a { background: var(--accent-soft); }

/* 下拉子菜单 */
.np-menu .menu-item-has-children > a::after { content: "▾"; margin-left: 6px; font-size: 10px; opacity: 0.7; }
.np-menu .sub-menu {
	position: absolute; top: calc(100% + 10px); left: 0; min-width: 220px;
	background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
	box-shadow: var(--shadow-md); padding: 8px; list-style: none; margin: 0;
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
	z-index: 60;
}
.np-menu li:hover > .sub-menu,
.np-menu li:focus-within > .sub-menu,
.np-menu li.open > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.np-menu .sub-menu a { padding: 9px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; white-space: nowrap; }
.np-menu .sub-menu .sub-menu { top: -8px; left: calc(100% + 6px); }

/* 头部工具 */
.np-nav-tools { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.np-icon-btn {
	border: 0; background: transparent; cursor: pointer;
	width: 40px; height: 40px; border-radius: 11px;
	display: inline-flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
	color: var(--ink); transition: background-color 0.15s ease, color 0.15s ease;
}
.np-icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.np-icon-btn svg { width: 19px; height: 19px; }
.np-menu-toggle { display: none; }
.np-bar { width: 20px; height: 2px; background: currentColor; border-radius: 2px; }

/* 明暗切换图标 */
.np-theme-toggle .np-icon-moon { display: none; }
[data-theme="dark"] .np-theme-toggle .np-icon-sun { display: none; }
[data-theme="dark"] .np-theme-toggle .np-icon-moon { display: block; }

.np-search-bar { background: var(--bg-elev); border-bottom: 1px solid var(--line); padding: 12px 0; }
.np-search-bar form { display: flex; gap: 8px; }
.np-search-bar input[type="search"] { flex: 1; padding: 11px 15px; border: 1px solid var(--line); border-radius: 11px; font-size: 15px; background: var(--bg); color: var(--ink); }
.np-search-bar button { padding: 11px 22px; background: var(--accent); color: #fff; border: 0; border-radius: 11px; cursor: pointer; font-weight: 600; }
.np-search-bar button:hover { background: var(--accent-strong); }

/* 顶部分类栏（Header 行内横排 + Others 溢出下拉） */
.np-catbar { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; border-left: 1px solid var(--line); padding-left: 14px; }
.np-catbar-list {
	display: flex; align-items: center; gap: 2px;
	list-style: none; margin: 0; padding: 0;
	flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap;
}
.np-catbar-item a {
	display: inline-block; padding: 7px 13px; border-radius: 999px;
	font-size: 13.5px; font-weight: 600; color: var(--ink-2);
	transition: background-color 0.15s ease, color 0.15s ease;
}
.np-catbar-item a:hover { background: var(--accent-soft); color: var(--accent); }
.np-catbar-item.np-catbar-current a { background: var(--accent); color: #fff; }
.np-catbar-more { position: relative; flex-shrink: 0; }
.np-catbar-more-btn {
	display: inline-flex; align-items: center; gap: 6px;
	height: 34px; padding: 0 13px;
	border: 1px solid var(--line); border-radius: 999px;
	background: transparent; color: var(--ink-2);
	font-size: 13.5px; font-weight: 600; cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.np-catbar-more-btn:hover { border-color: var(--accent); color: var(--accent); }
.np-catbar-more .np-cats-caret { transition: transform 0.18s ease; }
.np-catbar-more.open .np-cats-caret { transform: rotate(180deg); }
.np-catbar-more.open .np-catbar-more-btn { border-color: var(--accent); color: var(--accent); }
.np-catbar-more-panel {
	position: absolute; top: calc(100% + 8px); right: 0; z-index: 80;
	min-width: 220px; max-width: 80vw; max-height: 60vh; overflow-y: auto;
	background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
	box-shadow: var(--shadow-md); padding: 8px; display: none;
}
.np-catbar-more.open .np-catbar-more-panel { display: block; }
.np-cats-list { list-style: none; margin: 0; padding: 0; }
.np-cats-list li { border-bottom: 1px solid var(--line); }
.np-cats-list li:last-child { border-bottom: 0; }
.np-cats-list a {
	display: block; padding: 10px 12px; border-radius: 8px;
	font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.np-cats-list a:hover { background: var(--accent-soft); color: var(--accent); }

/* ===== 主体 ===== */
.np-main { padding: 28px 0 48px; }

/* 首页双栏布局 */
.np-home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; align-items: start; }
.np-home-main { min-width: 0; }
.np-sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 88px; }

/* ===== Hero（覆盖式头条） ===== */
.np-hero {
	position: relative; border-radius: var(--radius); overflow: hidden;
	border: 1px solid var(--line); background: var(--bg-elev); box-shadow: var(--shadow-sm);
	margin-bottom: 28px;
}
.np-hero-media { position: absolute; inset: 0; }
.np-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.np-hero-media.no-img {
	display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.7);
	background: linear-gradient(135deg, #1e3a8a, #0b1220); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
}
.np-hero::after { content: ""; position: absolute; inset: 0; background: var(--scrim); }
.np-hero-body {
	position: relative; z-index: 2; min-height: 440px;
	display: flex; flex-direction: column; justify-content: flex-end; gap: 13px;
	padding: 180px 36px 34px; max-width: 860px; color: #fff;
}
.np-hero .np-chip { background: var(--accent); color: #fff; }
.np-hero-title { font-size: 30px; line-height: 1.25; font-weight: 800; margin: 0; letter-spacing: -0.015em; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35); }
.np-hero-title a:hover { opacity: 0.9; }
.np-hero-excerpt { font-size: 15.5px; color: rgba(255, 255, 255, 0.88); margin: 0; max-width: 640px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3); }
.np-hero .np-meta { color: rgba(255, 255, 255, 0.75); }
.np-hero .np-source { border-color: rgba(255, 255, 255, 0.4); }
.np-read { color: #fff; font-weight: 700; margin-left: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.np-read:hover { gap: 10px; }
.np-read { transition: gap 0.15s ease; }

/* ===== 卡片网格 ===== */
.np-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(var(--np-grid-min), 1fr)); }
.np-card {
	background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.np-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--line-strong); }
.np-thumb { aspect-ratio: 16 / 9; background: var(--line); overflow: hidden; }
.np-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.np-card:hover .np-thumb img { transform: scale(1.05); }
.np-thumb.no-img { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; background: linear-gradient(135deg, var(--accent-soft), var(--line)); }
.np-body { padding: 15px 17px 17px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.np-title { font-size: 15.5px; line-height: 1.42; font-weight: 700; margin: 0; color: var(--ink-2); }
.np-card:hover .np-title a { color: var(--accent); }
.np-excerpt { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0; flex: 1; }

/* 分类标签 */
.np-chip {
	align-self: flex-start; display: inline-block;
	background: var(--accent-soft); color: var(--accent);
	font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
	text-transform: uppercase; letter-spacing: 0.05em;
}
.np-chip a { color: inherit; }

/* 元信息 */
.np-meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.np-source { padding-left: 10px; border-left: 1px solid var(--line); }

/* ===== 侧栏 / 小工具 ===== */
.np-widget {
	background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 20px; box-shadow: var(--shadow-sm);
}
.np-widget-title {
	font-size: 15px; font-weight: 800; margin: 0 0 8px;
	display: flex; align-items: center; gap: 10px; letter-spacing: -0.01em;
}
.np-widget-title::before { content: ""; width: 4px; height: 18px; border-radius: 3px; background: var(--accent); }

/* 热门榜单 */
.np-trending { list-style: none; margin: 0; padding: 0; }
.np-trending li { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.np-trending li:first-child { padding-top: 4px; }
.np-trending li:last-child { border-bottom: 0; padding-bottom: 2px; }
.np-rank {
	font-size: 26px; font-weight: 800; line-height: 1.1; min-width: 30px;
	color: transparent; -webkit-text-stroke: 1.5px var(--accent); font-variant-numeric: tabular-nums;
}
.np-trending li:first-child .np-rank { -webkit-text-stroke: 0; color: var(--accent); }
.np-trend-body { flex: 1; min-width: 0; }
.np-trend-title { font-weight: 650; font-size: 14px; line-height: 1.38; color: var(--ink-2); display: block; }
.np-trend-title:hover { color: var(--accent); }
.np-trend-thumb { width: 74px; height: 50px; border-radius: 9px; overflow: hidden; flex-shrink: 0; background: var(--line); }
.np-trend-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 侧栏小工具里的通用元素 */
.np-widget ul { list-style: none; margin: 0; padding: 0; }
.np-widget ul li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.np-widget ul li:last-child { border-bottom: 0; }
.np-widget ul a:hover { color: var(--accent); }
.np-widget .tag-cloud a { display: inline-block; margin: 0 4px 6px 0; padding: 4px 10px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-size: 12px; }

/* ===== 分页 ===== */
.np-pagination { margin: 30px 0 0; }
.np-pagination .page-numbers, .nav-links .page-numbers {
	display: inline-block; min-width: 40px; text-align: center;
	padding: 8px 13px; margin: 0 3px; border: 1px solid var(--line);
	border-radius: 10px; background: var(--bg-elev); font-size: 14px; color: var(--ink);
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.np-pagination .page-numbers.current, .nav-links .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.np-pagination .page-numbers:hover, .nav-links .page-numbers:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 文章页 ===== */
.np-article { max-width: 820px; margin: 0 auto; padding: 8px 20px 0; }
.np-article-header { padding: 18px 0 22px; }
.np-breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.np-breadcrumb a:hover { color: var(--accent); }
.np-article-title { font-size: 34px; line-height: 1.22; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.02em; }
.np-article-meta { margin-bottom: 6px; }
.np-article-thumb { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.np-article-content { font-size: 17px; line-height: 1.8; color: var(--ink-2); }
.np-article-content p { margin: 0 0 1.25em; }
.np-article-content img { border-radius: 12px; }
.np-article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.np-btn {
	display: inline-block; padding: 10px 20px; background: var(--accent); color: #fff;
	border-radius: 10px; font-weight: 600; font-size: 14px;
	transition: background-color 0.15s ease, transform 0.15s ease;
}
.np-btn:hover { background: var(--accent-strong); transform: translateY(-1px); }

.np-article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.np-article-tags a { font-size: 13px; color: var(--muted); background: var(--bg-elev); border: 1px solid var(--line); padding: 5px 13px; border-radius: 999px; transition: color 0.15s ease, border-color 0.15s ease; }
.np-article-tags a:hover { color: var(--accent); border-color: var(--accent); }

.np-post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 28px 0; font-size: 14px; }
.np-post-nav a { color: var(--accent); font-weight: 600; }
.np-next { text-align: right; margin-left: auto; }

/* 相关文章 */
.np-related { max-width: 1200px; margin: 44px auto 0; padding: 0 20px; }
.np-section-title { font-size: 20px; font-weight: 800; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.01em; }
.np-section-title::before { content: ""; width: 5px; height: 20px; border-radius: 3px; background: var(--accent); }

/* ===== 页面 / 归档 / 搜索 ===== */
.np-page { max-width: 820px; margin: 0 auto; padding: 30px 20px 0; }
.np-page-title { font-size: 30px; font-weight: 800; margin: 0 0 10px; }
.np-archive-header { padding: 18px 0; }
.np-archive-title { font-size: 26px; font-weight: 800; margin: 0; }
.np-archive-desc { color: var(--muted); margin-top: 6px; }
.np-search-inline { margin-bottom: 22px; }
.np-search-inline form { display: flex; gap: 8px; max-width: 540px; }
.np-search-inline input[type="search"] { flex: 1; padding: 11px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-elev); color: var(--ink); }
.np-search-inline button { padding: 11px 22px; background: var(--accent); color: #fff; border: 0; border-radius: 11px; cursor: pointer; font-weight: 600; }

.np-empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.np-empty h1 { font-size: 30px; color: var(--ink); margin: 0 0 10px; }
.np-404 h1 { font-size: 64px; letter-spacing: -0.03em; }

/* ===== 页脚 ===== */
.np-site-footer { background: #0b1220; color: #cbd5e1; margin-top: 40px; }
[data-theme="dark"] .np-site-footer { background: #060b16; }
.np-footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; padding: 40px 0 24px; }
.np-widget-title { color: var(--ink); }
.np-site-footer .np-widget-title { color: #fff; }
.np-site-footer .np-widget a { color: #cbd5e1; }
.np-site-footer .np-widget a:hover { color: #fff; }
.np-footer-bottom {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	padding: 20px 0 26px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px;
}
.np-footer-text { margin: 0; }
.np-footer-menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.np-footer-menu a:hover { color: #fff; }
.np-footer-legal { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.np-footer-legal a { color: #cbd5e1; }
.np-footer-legal a:hover { color: #fff; text-decoration: underline; }
.np-footer-legal-sep { opacity: 0.45; }

/* ===== 评论 ===== */
.comments-area { max-width: 820px; margin: 30px auto 0; padding: 0 20px; }
.comment-reply-title, .comments-title { font-size: 18px; font-weight: 800; }
.comment-list { list-style: none; padding: 0; }
.comment-body { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.comment-author .avatar { border-radius: 50%; float: left; margin-right: 10px; box-shadow: var(--shadow-sm); }
.comment-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.comment-content { font-size: 15px; color: var(--ink-2); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
	.np-home-layout { grid-template-columns: 1fr; }
	.np-sidebar { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
}
@media (max-width: 900px) {
	.np-container { padding: 0 16px; }
	.np-hero-body { min-height: 360px; padding: 110px 26px 28px; }
	.np-hero-title { font-size: 24px; }
	.np-article-title { font-size: 27px; }
	.np-article { padding: 4px 16px 0; }
	.np-related { padding: 0 16px; }
}
@media (max-width: 760px) {
	.np-header-row { min-height: 58px; gap: 10px; }
	.np-site-title { font-size: 18px; }
	.np-site-desc { display: none; }

	/* 分类栏：移动端收紧间距，其余靠 Others 溢出 */
	.np-catbar { gap: 4px; padding-left: 8px; }
	.np-catbar-item a { padding: 6px 11px; font-size: 13px; }
	.np-catbar-more-btn { height: 32px; padding: 0 11px; font-size: 13px; }

	/* 抽屉式菜单 */
	.np-menu-toggle { display: inline-flex; }
	.np-nav {
		display: block; position: fixed; top: 0; right: 0; bottom: 0;
		width: min(320px, 84vw); z-index: 120;
		background: var(--bg-elev); border-left: 1px solid var(--line);
		box-shadow: var(--shadow-md);
		padding: 0 0 20px; overflow-y: auto; overscroll-behavior: contain;
		transform: translateX(105%); transition: transform 0.28s ease;
	}
	.np-nav.open { transform: translateX(0); }
	.np-nav-head {
		display: flex; align-items: center; justify-content: space-between;
		padding: 13px 18px; border-bottom: 1px solid var(--line);
		position: sticky; top: 0; background: var(--bg-elev); z-index: 2;
	}
	.np-nav-head-title { font-weight: 800; font-size: 15px; }
	.np-menu { flex-direction: column; align-items: stretch; padding: 8px; }
	.np-menu > li { border-bottom: 1px solid var(--line); }
	.np-menu > li:last-child { border-bottom: 0; }
	.np-menu a { padding: 13px 12px; font-size: 15px; border-radius: 8px; }
	.np-menu .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; min-width: 0; padding: 0 0 0 16px; display: none;
	}
	.np-menu li.open > .sub-menu { display: block; }
	.np-menu .sub-menu a { padding: 11px 12px; font-size: 14px; }
	.np-menu .sub-menu > li { border-bottom: 1px solid var(--line); }

	/* 遮罩 + 锁滚动 */
	.np-overlay {
		position: fixed; inset: 0; background: rgba(2, 6, 16, 0.55); z-index: 110;
		opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
	}
	.np-overlay.show { opacity: 1; pointer-events: auto; }
	body.np-no-scroll { overflow: hidden; }

	/* hero */
	.np-hero-body { min-height: 300px; padding: 90px 18px 20px; gap: 10px; }
	.np-hero-title { font-size: 20px; }
	.np-hero-excerpt { font-size: 14px; }

	.np-main { padding: 18px 0 36px; }

	/* 网格单列 */
	.np-grid { grid-template-columns: 1fr; gap: 14px; }
	.np-sidebar { grid-template-columns: 1fr; }

	/* 文章页 */
	.np-article-title { font-size: 24px; }
	.np-article-content { font-size: 16.5px; }
	.np-post-nav { flex-direction: column; gap: 8px; }
	.np-next { text-align: left; margin-left: 0; }

	/* 分页 */
	.np-pagination .page-numbers, .nav-links .page-numbers { min-width: 36px; padding: 7px 10px; }

	/* 页脚 */
	.np-footer-widgets { grid-template-columns: 1fr; gap: 20px; padding: 28px 0 16px; }
	.np-footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
	.np-hero-body { min-height: 250px; }
	.np-hero-title { font-size: 18px; }
	.np-hero-excerpt { display: none; }
	.np-hero .np-meta { gap: 8px; }
	.np-article-title { font-size: 21px; }
	.np-page-title { font-size: 24px; }
	.np-archive-title { font-size: 22px; }
	.np-empty h1 { font-size: 24px; }
	.np-404 h1 { font-size: 48px; }
}

/* 触屏设备：禁用 hover 动效 */
@media (hover: none) {
	.np-card:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--line); }
	.np-card:hover .np-thumb img { transform: none; }
	.np-read:hover { gap: 6px; }
	.np-menu a:hover { background: transparent; color: inherit; }
}
