/* ========================================
   InkNav 主题 - 完全仿 nav.rss.ink (自由墨客/ZMark)
   设计规范：顶部导航 + 左侧边栏 + 主内容卡片网格
   主色 #4080ff / 中性低饱和灰 / 圆角 6-12px
   ======================================== */

:root {
	--primary: #3b82f6;
	--primary-hover: #2f6be8;
	--text-main: #1e293b;
	--text-sub: #64748b;
	--text-light: #94a3b8;
	--text-strong: #334155;
	--border: #f1f5f9;
	--bg-main: #f1f5f9;
	--bg-sidebar: #f8fafc;
	--bg-card: #ffffff;
	--bg-hover: #f1f1f5;
	--bg-input: #f8fafc;
	--bg-active: #eff6ff;
	--radius-sm: 6px;
	--radius-md: 8px;
	--radius-lg: 12px;
	--shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
	font-family: var(--font);
	background: var(--bg-main);
	color: var(--text-main);
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- 顶部导航栏 ---------- */
.topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 65px;
	background: #fff;
	border-bottom: 1px solid #e2e8f0;
	z-index: 100;
}

.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	padding: 0 16px 0 32px;
}

.topbar-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* 通用图标按钮（菜单/布局切换） */
.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #475569;
	cursor: pointer;
	transition: all 0.2s;
	flex-shrink: 0;
}

.icon-btn:hover {
	border-color: #cbd5e1;
	color: #1e293b;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.topbar-brand {
	display: flex;
	flex-direction: column;
	justify-content: center;
	line-height: 1.2;
}

.brand-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--text-main);
}

.brand-sub {
	font-size: 12px;
	color: var(--text-sub);
}

.topbar-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ---------- 搜索框（位于右侧操作区） ---------- */
.topbar-search-wrap {
	position: relative;
	width: 301px;
	min-width: 150px;
	flex-shrink: 1;
}

/* 搜索框容器（inknav 风格：浅灰背景、圆角、聚焦蓝色高亮） */
.search {
	display: flex;
	flex-flow: row nowrap;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 36px;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	background: var(--bg-input);
	box-shadow: none;
	overflow: hidden;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.search:focus-within,
.search.search_active {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
	background: #fff;
}

/* 搜索引擎切换按钮 */
.searchtypechangetip {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 65px;
	height: 100%;
	font-size: 0;
	color: var(--text-sub);
	border-right: 1px solid #f1f5f9;
	cursor: pointer;
	flex-shrink: 0;
}

/* 搜索输入框 */
.search input {
	width: auto;
	min-width: 0;
	height: 36px;
	flex-grow: 1;
	padding: 0 12px;
	border: 0;
	outline: none;
	font-size: 14px;
	font-family: var(--font);
	color: var(--text-main);
	background: transparent;
	line-height: normal;
}

.search input::placeholder { color: var(--text-light); }

/* 搜索按钮 */
.searchbtn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 36px;
	cursor: pointer;
	flex-shrink: 0;
}

.searchbtn img {
	width: 16px;
	opacity: 0.6;
}

.searchbtn:hover img { opacity: 1; }

/* 搜索引擎下拉面板 */
.searchtypebox {
	position: absolute;
	top: 42px;
	left: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	z-index: 2;
	overflow: hidden;
	visibility: hidden;
	padding: 4px;
	width: 100%;
}

/* 搜索引擎选项 */
.searchtype {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	padding: 0 4px;
	font-size: 13px;
	line-height: 1;
	color: var(--text-sub);
	text-decoration: none;
	cursor: pointer;
	border-radius: 8px;
	transition: background 0.15s, color 0.15s;
	white-space: nowrap;
	overflow: hidden;
}

.searchtype:hover {
	background: var(--bg-hover);
	color: var(--text-main);
}

.searchtype img {
	width: 16px;
	height: 16px;
	margin-right: 4px;
	border-radius: 50%;
}

.searchtype i.fa {
	font-size: 13px;
	line-height: 1;
	margin-right: 4px;
	color: var(--text-sub);
}

/* 已选搜索引擎高亮 */
.searchtype_active {
	background: var(--bg-active);
	color: var(--primary);
}

/* 下拉面板淡入淡出动画 */
.fade-enter-active, .fade-leave-active {
	transition: opacity 0.2s ease;
}
.fade-enter, .fade-leave-to {
	opacity: 0;
}

/* 登录/后台按钮（白底圆角图标按钮，与 icon-btn 同风格） */
.topbar-admin {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #475569;
	cursor: pointer;
	transition: all 0.2s;
	flex-shrink: 0;
	text-decoration: none;
}

.topbar-admin:hover {
	border-color: #cbd5e1;
	color: #1e293b;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ---------- 布局：侧边栏 + 主内容 ---------- */
.layout {
	display: flex;
	margin-top: 65px;
	min-height: calc(100vh - 65px);
	position: relative;
	padding-left: 272px;
}

/* 左侧边栏（固定定位，不随页面滚动） */
.sidebar {
	position: fixed;
	top: 65px;
	bottom: 0;
	left: 0;
	width: 272px;
	background: var(--bg-sidebar);
	padding: 16px 16px 8px 12px;
	overflow-y: auto;
	transition: width 0.2s, margin-left 0.2s;
	border-right: 1px solid #e2e8f0;
	z-index: 50;
	display: flex;
	flex-direction: column;
}

/* 侧边栏折叠按钮（悬于侧边栏右缘，固定定位） */
.sidebar-collapse {
	position: fixed;
	top: 50px;
	left: 258px;
	z-index: 100;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid #e2e8f0;
	background: #fff;
	color: #94a3b8;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	transition: all 0.2s;
}

.sidebar-collapse:hover {
	border-color: #cbd5e1;
	color: #475569;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ---------- 手机端侧边栏开关按钮（汉堡菜单） ---------- */
.sidebar-toggle {
	display: none;
}

/* 手机端抽屉关闭按钮：默认隐藏，仅手机端显示 */
.sidebar-close {
	display: none;
}

@media (max-width: 850px) {
	.sidebar-toggle {
		display: inline-flex;
		width: 36px;
		height: 36px;
	}
}

/* 折叠后：按钮移到左侧边缘，变为"展开"按钮 */
.layout.sidebar-hidden .sidebar-collapse {
	left: 0;
	border-radius: 0 50% 50% 0;
	border-left: none;
}

.layout.sidebar-hidden .sidebar-collapse svg {
	transform: rotate(180deg);
}

.sidebar-inner { display: flex; flex-direction: column; gap: 2px; }

.sidebar-item {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 48px;
	padding: 0 16px;
	border-radius: 10px;
	color: var(--text-strong);
	transition: all 0.2s;
	position: relative;
}

.sidebar-item .sidebar-icon {
	color: var(--text-sub);
	display: flex;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	background: #eef2f7;
	border-radius: 50%;
	transition: all 0.2s;
}
.sidebar-item .sidebar-icon i.fa { font-size: 14px; line-height: 1; }

.sidebar-item .sidebar-label { font-size: 14px; font-weight: 400; color: var(--text-main); }

.sidebar-item:hover {
	background: rgba(59, 130, 246, 0.06);
	color: var(--primary);
}

.sidebar-item.active {
	background: var(--bg-active);
	color: var(--text-main);
	font-weight: 500;
	box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.sidebar-item.active .sidebar-icon {
	color: var(--primary);
	background: #e0edff;
}

.sidebar-item:hover .sidebar-icon {
	background: #e2e8f0;
}

.sidebar-item.active:hover .sidebar-icon {
	background: #d8e8ff;
}

.sidebar-item.active::after {
	content: "";
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: 12px;
	height: 12px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* 折叠功能后：父分类右侧为折叠箭头，active 右箭头标记只用于无子分类的项与子分类项 */
.sidebar-parent-item.has-children.active::after { display: none; }

/* 主内容区（父容器已让出 272px 侧边栏；主区左右留 115px 边距、max-width 1408px，与参考站一致） */
.main-content {
	flex: 1;
	min-width: 0;
	padding: 32px 40px;
	margin: 0 115px;
	max-width: 1408px;
}

/* 侧边栏折叠时主内容扩展（父容器不再让位，主区铺满全屏） */
.layout.sidebar-hidden { padding-left: 0; }
.layout.sidebar-hidden .sidebar { display: none; }
.layout.sidebar-hidden .main-content { margin: 0; max-width: none; }
.layout.sidebar-hidden ~ .site-footer { margin-left: 0; }

/* ---------- 分类区块 ---------- */
.cat-block {
	margin-bottom: 32px;
}

.cat-title {
	font-size: 20px;
	font-weight: 600;
	color: var(--text-main);
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.cat-title i.fa { color: var(--primary); font-style: normal; font-size: 18px; }

.private-badge { color: var(--primary); display: inline-flex; }

/* 子分类 Tab 切换（仿参考：浅灰圆角容器 + 选中白底凸起） */
.sub-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	background: #eef1f5;
	border-radius: 12px;
/* 	padding: 4px;
	margin-top: 20px;	*/
}

/* 有直属链接时，Tab 栏与上方链接区隔开 */
.link-grid + .sub-tabs { margin-top: 24px; }

.sub-tab {
	border: none;
	background: transparent;
	color: #475569;
	font-size: 14px;
	font-family: inherit;
	padding: 8px 18px;
	border-radius: 9px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s;
	white-space: nowrap;
	line-height: 1.2;
}

.sub-tab:hover { color: var(--text-main); }

.sub-tab.active {
	background: #ffffff;
	color: #111827;
	font-weight: 500;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 子分类内容面板（Tab 对应） */
.sub-cat-pane { margin-top: 20px; }

/* 子分类空态提示 */
.sub-cat-empty {
	padding: 28px 0;
	text-align: center;
	color: var(--text-sub);
	font-size: 14px;
	border: 1px dashed #d1d5db;
	border-radius: 12px;
	background: #f8fafc;
}

/* 侧边栏子分类：缩进 + 略小字号 */
.sidebar-item.sidebar-sub-item {
	height: 42px;
	padding-left: 28px;
}

.sidebar-item.sidebar-sub-item .sidebar-label { font-size: 13px; color: var(--text-sub); }

.sidebar-item.sidebar-sub-item .sidebar-icon { width: 24px; height: 24px; background: transparent; }

.sidebar-item.sidebar-sub-item:hover .sidebar-icon,
.sidebar-item.sidebar-sub-item.active .sidebar-icon { background: #e0edff; }

.sidebar-item.sidebar-sub-item.active .sidebar-label { color: var(--text-main); }

/* ---------- 侧边栏父分类折叠 ---------- */
.sidebar-group { position: relative; }

/* 父分类右侧箭头（有子分类时显示） */
.sidebar-parent-item.has-children .sidebar-caret {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: auto;
	color: var(--text-sub);
	flex-shrink: 0;
	transition: transform 0.25s ease;
}

/* 展开时箭头旋转 180° */
.sidebar-group.open .sidebar-parent-item.has-children .sidebar-caret {
	transform: rotate(180deg);
}

/* 子分类折叠容器：默认隐藏，展开时显示 */
.sidebar-sub-list {
	display: none;
	margin-left: 6px;
	padding-left: 14px;
	border-left: 1px solid #e2e8f0;
	animation: sidebarSubIn 0.2s ease;
}

.sidebar-group.open .sidebar-sub-list {
	display: block;
}

@keyframes sidebarSubIn {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* 白色内容容器 */
.cat-panel {
	background: var(--bg-card);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	padding: 20px 24px;
}

/* 链接网格：每行 5 个 */
.link-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	column-gap: 24px;
	row-gap: 20px;
}

/* 链接项 */
.link-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: var(--radius-md);
	transition: background 0.2s;
	min-width: 0;
	overflow: hidden;
}

.link-item:hover { background: var(--bg-hover); }

.link-favicon {
	width: 32px;
	height: 32px;
	padding: 3px;
	flex-shrink: 0;
	background: #eef2f7;
	border-radius: 50%;
	object-fit: contain;
	transition: background 0.2s;
}

.link-item:hover .link-favicon { background: #e2e8f0; }

.link-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
	line-height: 1.2;
	overflow: hidden;
}

.link-title {
	font-size: 14px;
	font-weight: 500;
	color: var(--text-main);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.link-desc {
	font-size: 12px;
	color: var(--text-sub);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 2px;
}

/* ---------- 站内搜索过滤 ---------- */
.link-item.filtered { display: none; }
.cat-block.filter-hidden { display: none; }
.sub-cat-group.filter-hidden { display: none; }

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* Firefox */
* {
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}

/* ---------- Footer（与后台版权栏样式一致） ---------- */
.site-footer {
	margin-left: 272px;
	text-align: center;
	padding: 20px 20px 20px;
	font-size: 12px;
	color: var(--text-light);
	border-top: 1px solid #e2e8f0;
}

.site-footer a { color: var(--text-light); }
.site-footer a:hover { color: var(--primary); }

/* ---------- 返回顶部按钮 ---------- */
.back-to-top {
	position: fixed;
	right: 32px;
	bottom: 32px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 14px;
	background: #fff;
	color: var(--text-sub);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s, visibility 0.25s, transform 0.25s, box-shadow 0.25s;
	z-index: 9999;
}

.back-to-top.show {
	opacity: 1;
	visibility: visible;
}

.back-to-top:hover {
	color: var(--primary);
	border-color: var(--primary);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
	transform: translateY(-2px);
}

@media (max-width: 850px) {
	.back-to-top { right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 12px; }
}

/* ---------- 侧边栏添加链接按钮 ---------- */
.sidebar-inner { flex-direction: column; min-height: 100%; height: 100%; }

.sidebar-add {
	margin-top: auto;
	padding-top: 12px;
}

.sidebar-add-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	height: 40px;
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	background: transparent;
	color: var(--text-sub);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s;
}

.sidebar-add-btn:hover {
	border-color: var(--primary);
	color: var(--primary);
	background: rgba(59, 130, 246, 0.04);
}

.sidebar-add-btn svg { flex-shrink: 0; }

/* ---------- 添加链接弹层 ---------- */
.add-link-mask {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 200;
	display: none;
	align-items: center;
	justify-content: center;
}

.add-link-mask.show { display: flex; }

.add-link-modal {
	width: 420px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 64px);
	overflow-y: auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.add-link-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 0;
}

.add-link-title { font-size: 18px; font-weight: 600; color: var(--text-main); }

.add-link-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px; height: 32px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: var(--text-sub);
	cursor: pointer;
}

.add-link-close:hover { background: #f1f5f9; color: var(--text-main); }

.add-link-form { padding: 20px 24px 24px; }

.add-link-field { margin-bottom: 16px; }

.add-link-field > label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-strong);
	margin-bottom: 6px;
}

.add-link-label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.add-link-label-row label { margin-bottom: 0; }

.add-link-fetch {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	background: #f8fafc;
	color: var(--text-sub);
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s;
}

.add-link-fetch:hover {
	border-color: var(--primary);
	color: var(--primary);
	background: rgba(59, 130, 246, 0.04);
}

.add-link-fetch:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.add-link-field input[type="text"],
.add-link-field textarea,
.add-link-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 14px;
	color: var(--text-main);
	background: #f8fafc;
	outline: none;
	transition: border-color 0.2s, background 0.2s;
	box-sizing: border-box;
}

.add-link-field input[type="text"]:focus,
.add-link-field textarea:focus,
.add-link-field select:focus {
	border-color: var(--primary);
	background: #fff;
}

.add-link-field textarea { resize: vertical; min-height: 56px; font-family: inherit; }

.add-link-private label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--text-sub);
	cursor: pointer;
}

.add-link-private input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

.add-link-actions { display: flex; gap: 12px; justify-content: flex-end; }

.add-link-cancel,
.add-link-submit {
	padding: 8px 20px;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s;
	border: none;
}

.add-link-cancel { background: #f1f5f9; color: var(--text-sub); }
.add-link-cancel:hover { background: #e2e8f0; }

.add-link-submit { background: var(--primary); color: #fff; }
.add-link-submit:hover { background: #2563eb; }

.add-link-msg {
	margin-top: 12px;
	font-size: 13px;
	text-align: center;
	min-height: 18px;
}

.add-link-msg.success { color: #16a34a; }
.add-link-msg.error { color: #dc2626; }

@media (max-width: 850px) {
	.sidebar-add { display: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1400px) {
	.main-content { margin: 0 60px; }
}

@media (max-width: 1200px) {
	.link-grid { grid-template-columns: repeat(4, 1fr); }
	.topbar-search-wrap { width: 220px; }
	.main-content { margin: 0 40px; padding: 32px 24px; }
}

@media (max-width: 992px) {
	.link-grid { grid-template-columns: repeat(3, 1fr); }
	.main-content { margin: 0 24px; }
}

@media (max-width: 850px) {
	.sidebar { display: none; }
	.layout { padding-left: 0; }
	.main-content { margin: 0; padding: 24px 16px; max-width: none; }
	.site-footer { margin-left: 0; }
	.topbar-search-wrap { width: 160px; }
	.topbar-brand .brand-sub { display: none; }
	.topbar-brand .brand-title { display: none; }
	.topbar-inner { padding-left: 16px; }
	.topbar-search-wrap .searchbtn { width: 32px; }
	/* 手机端：搜索框容器允许子元素溢出可见 */
	.topbar-search-wrap .search { overflow: visible; }
	/* 手机端：搜索引擎切换按钮变为向下箭头图标 */
	.topbar-search-wrap .searchtypechangetip {
		width: 32px;
		font-size: 0;
		color: transparent;
		background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/14px no-repeat;
		position: relative;
		z-index: 10;
		flex-shrink: 0;
	}
	/* 手机端：搜索框容器确保不被标题覆盖 */
	.topbar-search-wrap { position: relative; z-index: 10; }
	/* 手机端：搜索引擎下拉菜单每排显示 2 个 */
	.searchtypebox { grid-template-columns: repeat(2, 1fr); }
	.link-grid { grid-template-columns: repeat(2, 1fr); }
	.sidebar-collapse { display: none; }

	/* 手机端：抽屉内分类字体保持原有样式（14px 常规字重，桌面端加粗） */
	.sidebar-item .sidebar-label { font-size: 14px; font-weight: 400; color: var(--text-strong); }

	/* 手机端：侧边栏抽屉化（从导航栏下方滑出 + 遮罩 + 高度自适应内容） */
	.sidebar {
		display: flex;
		position: fixed;
		top: 65px;
		bottom: auto;
		left: 0;
		width: 200px;
		max-width: 85vw;
		height: auto;
		/* 内容多时最多到屏幕底部（移动端用 100dvh 动态视口，避免地址栏导致溢出） */
		max-height: calc(100vh - 65px);
		max-height: calc(100dvh - 65px);
		z-index: 300;
		background: var(--bg-sidebar);
		border-right: 1px solid #e2e8f0;
		border-radius: 0 12px 12px 0;
		padding: 8px 16px 8px 12px;
		overflow-y: auto;
		overscroll-behavior: contain;
		transform: translateX(-100%);
		box-shadow: none;
	}
	/* 抽屉展开：transition 仅在交互时生效，避免缩放断点时触发动画闪烁 */
	.sidebar.mobile-open {
		transform: translateX(0);
		transition: transform 0.28s ease;
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
	}
	/* 抽屉关闭：添加 transition 实现收起动画 */
	.sidebar.mobile-closing {
		transform: translateX(-100%);
		transition: transform 0.28s ease;
	}

	/* 遮罩层（从导航栏下方开始，不覆盖导航栏） */
	.sidebar-mask {
		position: fixed;
		top: 65px;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(15, 23, 42, 0.45);
		z-index: 290;
		opacity: 0;
		visibility: hidden;
	}
	/* 遮罩显示/隐藏：transition 仅在交互时生效 */
	.sidebar-mask.show {
		opacity: 1;
		visibility: visible;
		transition: opacity 0.28s ease, visibility 0.28s ease;
	}
	.sidebar-mask.hiding {
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.28s ease, visibility 0.28s ease;
	}

	/* 手机端抽屉内：顶部关闭按钮（紧凑） */
	.sidebar-inner { padding-top: 0; }
	.sidebar-close {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		height: 28px;
		margin-bottom: 2px;
	}
	.sidebar-close button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 28px;
		height: 28px;
		border: none;
		border-radius: 6px;
		background: transparent;
		color: var(--text-sub);
		cursor: pointer;
	}
	.sidebar-close button:hover { background: #f1f5f9; color: var(--text-main); }
}