/* ===== 变量：亮色/暗色模式自动切换 + data-theme 手动覆盖 ===== */
:root {
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --bg-soft: #f0f2f5;
  --text: #1f2329;
  --text-soft: #55595f;
  --border: #e5e6eb;
  --primary: #2b7fff;
  --primary-hover: #1a6ef0;
  --accent: #2b7fff;
  --code-bg: #f6f8fa;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-hover: 0 6px 20px rgba(0,0,0,.12);
  --radius: 8px;
  --max-width: 1080px;
  --sidebar-width: 280px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-elev: #1a1d23;
    --bg-soft: #20242c;
    --text: #e6e8eb;
    --text-soft: #9aa4b2;
    --border: #2a2f38;
    --primary: #4d94ff;
    --primary-hover: #6aa6ff;
    --accent: #4d94ff;
    --code-bg: #161a20;
    --shadow: 0 2px 8px rgba(0,0,0,.4);
    --shadow-hover: 0 6px 20px rgba(0,0,0,.55);
  }
}
[data-theme="light"] {
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --bg-soft: #f0f2f5;
  --text: #1f2329;
  --text-soft: #55595f;
  --border: #e5e6eb;
  --primary: #2b7fff;
  --primary-hover: #1a6ef0;
  --accent: #2b7fff;
  --code-bg: #f6f8fa;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-hover: 0 6px 20px rgba(0,0,0,.12);
}
[data-theme="dark"] {
  --bg: #0f1115;
  --bg-elev: #1a1d23;
  --bg-soft: #20242c;
  --text: #e6e8eb;
  --text-soft: #9aa4b2;
  --border: #2a2f38;
  --primary: #4d94ff;
  --primary-hover: #6aa6ff;
  --accent: #4d94ff;
  --code-bg: #161a20;
  --shadow: 0 2px 8px rgba(0,0,0,.4);
  --shadow-hover: 0 6px 20px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* ===== 页脚 ===== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 18px 0 26px;
  margin-top: 20px;
}
.site-footer .container { text-align: center; }
/* 页脚单行：版权信息与备案同排，空间不足时自动换行 */
.footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.footer-row p { margin: 0; color: var(--text-soft); }
.footer-beian {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.footer-beian a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-soft);
  font-size: 13px;
}
.footer-beian a:hover { color: var(--primary); text-decoration: none; }
.gongan-badge { width: 14px; height: 14px; flex-shrink: 0; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.site-title { font-size: 20px; font-weight: 700; color: var(--text); }
.site-nav { display: flex; align-items: center; flex: 1; justify-content: flex-end; }
.site-nav a {
  margin-left: 18px; color: var(--text); font-size: 15px;
}
.site-nav a:hover { color: var(--primary); text-decoration: none; }
.site-nav a.active { color: var(--text); }
.site-nav .nav-admin { color: var(--text); }
.site-nav .nav-admin:hover { color: var(--primary); }
.theme-toggle {
  margin-left: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 18px;
  transition: color .2s, background .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  outline: none;
}
.theme-toggle:hover { color: var(--primary); background: var(--bg-soft); }
.theme-toggle:active { transform: scale(0.95); }
.theme-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.theme-icon.sun {
  display: block;
}
.theme-icon.moon {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .theme-icon.sun { display: none; }
  .theme-icon.moon { display: block; }
}
[data-theme="light"] .theme-icon.sun { display: block; }
[data-theme="light"] .theme-icon.moon { display: none; }
[data-theme="dark"] .theme-icon.sun { display: none; }
[data-theme="dark"] .theme-icon.moon { display: block; }

/* ===== 双栏布局 ===== */
.layout { display: flex; gap: 24px; padding-top: 24px; padding-bottom: 40px; }
.content-main { flex: 1; min-width: 0; }
.sidebar { width: var(--sidebar-width); flex-shrink: 0; }
.layout.admin-mode .content-main { max-width: 100%; }

/* ===== 文章列表卡片 ===== */
.article-card {
  background: var(--bg-elev);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: row;
  align-items: center;
}
.article-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.article-card .cover-link { flex-shrink: 0; width: 160px; height: 120px; display: flex; align-items: center; justify-content: center; background: var(--bg-soft); margin: 12px; border-radius: 6px; overflow: hidden; }
.article-card .cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card-body { padding: 12px 16px; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.article-card-title { margin: 0 0 8px; font-size: 17px; line-height: 1.4; }
.article-card-title a { color: var(--text); }
.article-card-title a:hover { color: var(--primary); text-decoration: none; }
.article-meta { font-size: 12px; color: var(--text-soft); margin-bottom: 8px; }
.article-meta .cat { margin-left: 10px; padding: 1px 6px; background: var(--bg-soft); border-radius: 4px; text-decoration: none; color: var(--text); cursor: pointer; transition: background 0.15s; font-size: 12px; }
.article-meta .cat:hover { background: var(--primary); color: #fff; }
.article-meta .tag { margin-left: 4px; padding: 1px 6px; background: var(--accent); color: white; border-radius: 4px; font-size: 11px; text-decoration: none; }
.article-meta .tag:hover { opacity: 0.85; }

/* ===== 友情链接 widget ===== */
.friend-widget .friend-links { display: flex; flex-direction: column; gap: 6px; }
.friend-widget .friend-link { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg-soft); border-radius: 6px; text-decoration: none; color: var(--text); font-size: 14px; transition: background 0.2s; }
.friend-widget .friend-link:hover { background: var(--bg-hover); }
.friend-widget .friend-icon { font-size: 18px; }

/* ===== 联系方式 ===== */
.author-contact { margin: 4px 0; font-size: 13px; color: var(--text-soft); }
.article-contact { margin: 24px 0; padding: 16px; background: var(--bg-soft); border-radius: 8px; border-left: 3px solid var(--primary); }
.article-contact p { margin: 4px 0; font-size: 14px; color: var(--text); }
.article-contact a { color: var(--primary); }

/* ===== 文章页 meta tag ===== */
.article-detail .article-meta .tag { margin-left: 6px; }
.article-summary { color: var(--text-soft); margin: 0 0 10px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-summary a { color: inherit; text-decoration: none; }
.article-summary a:hover { color: inherit; }
.article-card { cursor: pointer; }
.article-card:hover .article-card-title a { color: var(--primary); }
.article-cover { margin-bottom: 20px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.article-cover img { width: 100%; max-height: 400px; object-fit: cover; display: block; }
.read-more { font-size: 14px; }

/* ===== 分页 ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 28px 0; }
.pagination a, .pagination .page-info { padding: 6px 14px; border-radius: 6px; background: var(--bg-elev); border: 1px solid var(--border); }
.page-info { color: var(--text-soft); }

/* ===== 文章详情 ===== */
.article-title { font-size: 28px; margin: 0 0 8px; }
.article-meta { color: var(--text-soft); font-size: 14px; margin-bottom: 20px; }
.article-content { font-size: 16px; }
.article-content h2, .article-content h3 { margin-top: 1.6em; }
.article-content p { margin: 1em 0; }
.article-content img { border-radius: 6px; box-shadow: var(--shadow); }
.article-content blockquote {
  margin: 1em 0; padding: 8px 16px; border-left: 4px solid var(--primary);
  background: var(--bg-soft); color: var(--text-soft); border-radius: 0 6px 6px 0;
}
.article-content pre {
  background: var(--code-bg); padding: 14px 16px; border-radius: 6px;
  overflow-x: auto; font-size: 14px; border: 1px solid var(--border);
}
.article-content code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
.article-content :not(pre) > code { background: var(--code-bg); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.article-content table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 8px 12px; }
.article-content th { background: var(--bg-soft); }

/* ===== 侧边栏组件 ===== */
.widget {
  background: var(--bg-elev); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 18px; margin-bottom: 20px;
}
.widget-title { margin: 0 0 12px; font-size: 15px; color: var(--text-soft); border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.author-widget { text-align: center; }
.author-avatar { width: 100%; max-width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow); display: block; }
.author-name { margin: 10px 0 4px; font-size: 17px; }
.author-bio { color: var(--text-soft); font-size: 14px; margin: 0; }
.archive-list, .archive-items { list-style: none; padding: 0; margin: 0; }
.archive-list li { margin: 6px 0; font-size: 14px; }
.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li { margin: 6px 0; font-size: 14px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-link { padding: 2px 8px; background: var(--accent); color: white; border-radius: 12px; font-size: 12px; text-decoration: none; }
.tag-link:hover { opacity: 0.8; }
.toc-nav { max-height: 320px; overflow-y: auto; font-size: 14px; }
.toc-nav a { display: block; padding: 4px 0 4px 12px; color: var(--text-soft); border-left: 2px solid transparent; }
.toc-nav a:hover, .toc-nav a.active { color: var(--primary); border-left-color: var(--primary); text-decoration: none; }
.toc-nav .toc-h3 { padding-left: 28px; font-size: 13px; }

/* ===== 视频播放器（核心样式） ===== */
.video-wrap {
  position: relative;
  margin: 24px auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border);
}
.video-wrap .video-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  z-index: 1;
}
.video-wrap .video-loading {
  color: #fff; font-size: 14px; opacity: .8;
}
.video-wrap .video-loading::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%;
  animation: spin 0.8s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.video-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; display: block; z-index: 2; background: #000;
}
.video-wrap .video-title {
  position: relative; z-index: 3;
  padding: 10px 14px; font-size: 14px; color: #e6e8eb;
  background: rgba(20,22,26,.9); border-top: 1px solid rgba(255,255,255,.06);
}

/* 默认（auto）：移动端竖屏 9:16，PC端横屏 16:9 */
.video-wrap.orient-auto { width: 100%; padding-top: 56.25%; }       /* 16:9 */
.video-wrap.orient-portrait { width: 100%; max-width: 360px; padding-top: 177.78%; } /* 9:16 */
.video-wrap.orient-landscape { width: 100%; padding-top: 56.25%; }   /* 16:9 */

.back-link { margin: 16px 0; }
.back-link a { color: var(--primary); text-decoration: none; font-size: 14px; }
.back-link a:hover { text-decoration: underline; }
.float-back-btn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  box-shadow: var(--shadow);
  z-index: 100;
}
.float-back-btn:hover {
  background: var(--primary-hover);
}
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 40px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  box-shadow: var(--shadow);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: var(--primary-hover);
}
@media (max-width: 768px) {
  .float-back-btn { display: none; }
  .back-to-top { bottom: 20px; right: 20px; }
}

.video-wrap.douyin-player {
  width: min(324px, 100%);
  margin: 24px auto;
  aspect-ratio: 9/16;
}

/* ===== 归档页 ===== */
.archive-group { margin-bottom: 24px; }
.archive-group-title { font-size: 18px; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.archive-items li { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.archive-items time { color: var(--text-soft); font-size: 13px; min-width: 44px; }
.page-title { font-size: 24px; margin-bottom: 20px; }
.empty { text-align: center; color: var(--text-soft); padding: 40px; }

/* ===== 后台 ===== */
.admin-bar { display: flex; align-items: center; gap: 12px; justify-content: flex-start; margin-bottom: 20px; }
.admin-bar #admin-username { margin-right: auto; color: var(--text-soft); }
.btn {
  padding: 6px 14px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text); cursor: pointer; font-size: 14px;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-ghost { background: transparent; }
.admin-search { display: flex; gap: 8px; margin-bottom: 16px; }
.admin-search input { flex: 1; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--bg-elev); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
.admin-table th { background: var(--bg-soft); color: var(--text-soft); font-weight: 600; }
.admin-table tr:hover { background: var(--bg-soft); }
.status-pub { color: #2bb673; }
.status-draft { color: #d48806; }
.badge-top {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 2px 5px;
  margin-right: 6px;
  border-radius: 3px;
  color: #fff;
  background: var(--primary);
  vertical-align: 1px;
}

.admin-layout { display: flex; gap: 20px; }
.admin-sidebar { width: 200px; flex-shrink: 0; background: var(--bg-elev); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.admin-sidebar h3 { margin: 0 0 12px; font-size: 14px; color: var(--text-soft); }
.admin-nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.admin-nav .nav-item { padding: 8px 12px; border-radius: 6px; text-decoration: none; color: var(--text); font-size: 14px; transition: background .2s; }
.admin-nav .nav-item:hover { background: var(--bg-soft); }
.admin-nav .nav-item.active { background: var(--primary); color: #fff; }
.admin-user { border-top: 1px solid var(--border); padding-top: 12px; }
.admin-content { flex: 1; }
.admin-bar h2 { margin: 0; font-size: 18px; }

.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: var(--bg-elev); padding: 24px; border-radius: var(--radius); width: 90%; max-width: 400px; box-shadow: var(--shadow); }
.modal-content h3 { margin: 0 0 16px; }
.modal-content label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 14px; }
.modal-content input { padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* 登录 */
.admin-login { max-width: 360px; margin: 60px auto; }
.login-form {
  background: var(--bg-elev); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.login-form h2 { margin: 0 0 8px; text-align: center; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-soft); }
.login-form input { padding: 10px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.login-form button { padding: 10px; border: none; border-radius: 6px; background: var(--primary); color: #fff; cursor: pointer; }
.login-msg { color: #e54848; font-size: 14px; min-height: 18px; margin: 0; }

/* 编辑器 */
.editor-page { display: flex; flex-direction: column; gap: 16px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.editor-fields { display: flex; flex-direction: column; gap: 12px; background: var(--bg-elev); padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow); }
.editor-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-soft); white-space: nowrap; }
.editor-fields input, .editor-fields select, .editor-fields textarea {
  padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.field-row { display: flex; gap: 12px; }
.field-row label { flex: 1; }
.cover-upload { display: flex; gap: 8px; align-items: center; }
.cover-upload input[type="text"] { flex: 1; }
.cover-preview { margin-top: 8px; max-width: 300px; }
.cover-preview img { max-width: 100%; height: auto; border-radius: 6px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.avatar-field { display: flex; gap: 8px; align-items: center; }
.avatar-field input[type="text"] { flex: 1; }
.avatar-preview { margin-top: 8px; }
.avatar-preview img { max-width: 200px; height: auto; border-radius: 6px; border: 2px solid var(--border); display: block; }
.tags-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-item { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: var(--accent); color: white; border-radius: 12px; font-size: 12px; }
.tag-item .tag-remove { cursor: pointer; background: none; border: none; color: white; font-size: 16px; line-height: 1; padding: 0; }
.tag-input-wrapper { position: relative; }
.tag-suggestions { position: absolute; top: 100%; left: 0; right: 0; margin-top: 2px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); z-index: 100; max-height: 200px; overflow-y: auto; }
.tag-suggestion-item { padding: 8px 12px; cursor: pointer; font-size: 13px; color: var(--text); }
.tag-suggestion-item:hover { background: var(--accent); color: white; }
.tag-suggestion-item.tag-new { color: var(--primary); }
.tag-suggestion-item.tag-new:hover { background: var(--accent); color: white; }
.alias-label { white-space: nowrap !important; }
.alias-preview { display: block; font-size: 12px; color: var(--text-soft); margin-top: 2px; font-family: monospace; }
.editor-hint { font-size: 12px; color: var(--text-soft); margin-bottom: 6px; }
.editor-hint code { background: var(--code-bg); padding: 1px 5px; border-radius: 3px; }
.checkbox-label { flex-direction: row !important; align-items: center; gap: 8px !important; }
.checkbox-label input[type="checkbox"] { width: auto; margin: 0; }
.checkbox-label .editor-hint { margin: 0; }
.vditor-container {
  background: var(--bg-elev);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ===== 汉堡菜单按钮 ===== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--text);
  transition: background .2s;
}
.mobile-menu-btn:hover { background: var(--bg-soft); }
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== 移动端下拉导航 ===== */
.mobile-nav {
  display: none;
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}
.mobile-nav.open {
  display: flex;
  max-height: 400px;
}
.mobile-nav a {
  padding: 12px 20px;
  color: var(--text-soft);
  font-size: 15px;
  border-bottom: 1px solid var(--border);
  transition: background .2s, color .2s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--primary);
  background: var(--bg-soft);
  text-decoration: none;
}
.mobile-nav .nav-admin {
  color: var(--primary);
  font-weight: 500;
}

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .editor-main { flex-direction: column; }
}

@media (max-width: 640px) {
  .header-inner {
    height: 52px;
    flex-wrap: nowrap;
    padding: 0 8px;
  }
  .site-title { font-size: 17px; padding-left: 8px; }
  .site-nav { display: none; }
  .theme-toggle { display: inline-flex; margin-left: auto; padding: 6px; }
  .mobile-menu-btn { display: flex; margin-left: 0; }

  .article-card { flex-direction: column; }
  .article-card .cover-link { width: 100%; height: 180px; }
  .article-card-body { padding: 14px 16px; }
  .article-card-title { font-size: 17px; }
  .article-title { font-size: 22px; }
  .pagination { gap: 8px; }
  .pagination a, .pagination .page-info { padding: 4px 10px; font-size: 13px; }
  .back-to-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
  .float-back-btn { bottom: 20px; right: 72px; width: 42px; height: 42px; }
}
