/* ============================================================
   个人博客 · 样式表（Hexo Fluid 风格）
   浅色 / 深色通过 <html data-theme> 切换
   ============================================================ */

/* ---- 自托管字体 ----
   西文 Charter（衬线）+ 中文霞鹜致宋，与参考站同一套。
   按 font-weight / font-style 分别声明，粗体与斜体才能真正生效。
   font-display: swap —— 字体没加载完先用系统字体顶上，不阻塞首屏。 */
@font-face {
  font-family: 'Charter';
  src: url('../fonts/Charter-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Charter';
  src: url('../fonts/Charter-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Charter';
  src: url('../fonts/Charter-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Charter';
  src: url('../fonts/Charter-BoldItalic.woff2') format('woff2');
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'LXGW Neo ZhiSong Screen Full';
  src: url('../fonts/LXGWNeoZhiSongScreenFull.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'mononoki';
  src: url('../fonts/mononoki-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'mononoki';
  src: url('../fonts/mononoki-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'mononoki';
  src: url('../fonts/mononoki-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  /* ---- 字体栈 ---- */
  --font-body: 'Charter', 'LXGW Neo ZhiSong Screen Full', Georgia, 'Times New Roman',
    'Songti SC', 'SimSun', 'Noto Serif CJK SC', 'Source Han Serif SC', serif;
  --font-code: 'mononoki', ui-monospace, 'JetBrains Mono', Consolas, 'Courier New', monospace;

  /* ---- Fluid 配色变量 ---- */
  --body-bg-color: #eee;
  --board-bg-color: #fff;
  --text-color: #3c4858;
  --sec-text-color: #718096;
  --post-text-color: #2c3e50;
  --post-heading-color: #1a202c;
  --post-link-color: #7eb2f0;
  --link-hover-color: #4e7ac7;
  --link-hover-bg-color: #bfa57b;
  --line-color: #eaecef;
  --navbar-bg-color: #add5f7;
  --navbar-text-color: #0c4663;
  --subtitle-color: #fff;
  --inlinecode-bg-color: rgba(175, 184, 193, 0.2);
  --board-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);
  --navbar-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);

  /* ---- 兼容旧命名（后台样式也用这套） ---- */
  --bg: var(--body-bg-color);
  --bg-paper: var(--board-bg-color);
  --bg-soft: #f2f3f5;
  --text: var(--text-color);
  --text-soft: var(--sec-text-color);
  --text-faint: #a0a4a8;
  --line: var(--line-color);
  --accent: #4e7ac7;
  --accent-soft: rgba(78, 122, 199, 0.12);

  --radius: 0.25rem;
  --maxw: 1140px;

  /* 横幅背景（由管理后台「外观」页签设置，前台只读） */
  --banner-image: linear-gradient(135deg, #8fb8e8 0%, #b8c9e8 45%, #d8d3e2 100%);
  --banner-mask: 0.3;
  --banner-fit: cover;
}

[data-theme='dark'] {
  --body-bg-color: #080a05;
  --board-bg-color: #595959;
  --text-color: #c4c6c9;
  --sec-text-color: #a7a9ad;
  --post-text-color: #c4c6c9;
  --post-heading-color: #c4c6c9;
  --line-color: #435266;
  --navbar-bg-color: #2b3a73;
  --navbar-text-color: #d0d0d0;
  --subtitle-color: #d0d0d0;
  --inlinecode-bg-color: rgba(110, 118, 129, 0.35);
  --board-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.38), 0 4px 15px 0 rgba(0, 0, 0, 0.32);

  --bg-soft: #5c6169;
  --text-faint: #8d939a;
  --accent: #7eb2f0;
  --accent-soft: rgba(126, 178, 240, 0.18);

  --banner-image: linear-gradient(135deg, #243b6b 0%, #2b3a73 50%, #3c4b5e 100%);
  --banner-mask: 0.45;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--body-bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ============================================================
   极简栅格（对齐 Bootstrap 4 的命名与比例）
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-fluid {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 0.5rem;
}
.row { display: flex; flex-wrap: wrap; }
.nomargin-x { margin-left: 0; margin-right: 0; }
.row > * { padding-left: 0.5rem; padding-right: 0.5rem; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.m-auto, .mx-auto { margin-left: auto; margin-right: auto; }
.d-none { display: none !important; }
.text-center { text-align: center; }
@media (min-width: 768px) {
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
}
@media (min-width: 992px) {
  .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .d-lg-block { display: block !important; }
}

/* ============================================================
   顶部导航
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: transparent;
  box-shadow: var(--navbar-shadow);
  font-size: 0.9375rem;
  padding: 1rem 0;
  transition: padding 0.3s ease-in-out, background-color 0.3s ease-in-out;
}
.navbar.top-nav-collapse {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  background-color: var(--navbar-bg-color);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 1.5rem;
}
.navbar-brand {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navbar .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.875rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.navbar .nav-link:hover { background-color: rgba(255, 255, 255, 0.18); }
.navbar.top-nav-collapse .navbar-brand,
.navbar.top-nav-collapse .nav-link { color: var(--navbar-text-color); text-shadow: none; }

.iconfont { font-size: 1em; line-height: 1; }

/* ============================================================
   顶部横幅 Banner
   ============================================================ */
.header-inner { position: relative; width: 100%; overflow: hidden; height: 100vh; }
/* 真手机上 100vh 比可见区域高（地址栏/工具栏占掉一截），svh 才是「可见小视口」 */
@supports (height: 100svh) {
  .header-inner { height: 100svh; }
}
.header-inner--compact { height: 60vh; min-height: 340px; }
@supports (height: 100svh) {
  .header-inner--compact { height: 60svh; }
}
.banner { position: relative; height: 100%; overflow: hidden; cursor: default; }
.banner .full-bg-img {
  position: absolute;
  inset: 0;
  background-color: #9db8d8;
  background-image: var(--banner-image);
  background-size: var(--banner-fit, cover);
  background-position: center;
  background-repeat: no-repeat;
}
/* 动图 / 视频背景：视频循环静音播放，gif 走 background-image 天然会动 */
.banner .banner-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.banner .mask {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, var(--banner-mask));
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-text {
  color: var(--subtitle-color);
  width: 80%;
  max-width: calc(960px - 6rem);
  overflow-wrap: break-word;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}
.banner-text .h2 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.03em;
  min-height: 1.4em;
}
.banner-text .banner-meta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  font-size: 0.875rem;
  opacity: 0.92;
}
.banner-text .banner-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.typed-cursor { opacity: 1; animation: typed-blink 0.7s infinite; font-weight: 300; }
@keyframes typed-blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }

.fade-in-up { animation: fade-in-up 0.8s ease; }
@keyframes fade-in-up {
  from { opacity: 0; transform: translate3d(0, 30px, 0); }
  to { opacity: 1; transform: none; }
}

.scroll-down-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  padding-bottom: 1.2rem;
  color: var(--subtitle-color);
}
.scroll-down-bar i {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: scroll-down 1.6s infinite;
  opacity: 0.85;
}
@keyframes scroll-down {
  0% { transform: rotate(45deg) translate(0, 0); opacity: 0.2; }
  50% { transform: rotate(45deg) translate(6px, 6px); opacity: 0.9; }
  100% { transform: rotate(45deg) translate(0, 0); opacity: 0.2; }
}

/* ============================================================
   主体 Board（Fluid 的白色面板）
   ============================================================ */
.board-wrap { padding-top: 2rem; }
#board {
  position: relative;
  padding: 2.5rem 2rem 3rem;
  background-color: var(--board-bg-color);
  color: var(--post-text-color);
  border-radius: 0.5rem;
  box-shadow: var(--board-shadow);
}
#seo-header { display: none; }

.section-title {
  margin: 2rem 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: 0.02em;
}
.section-title .count {
  margin-left: 8px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--sec-text-color);
}

/* ---------- 关于我 ---------- */
.about-card { display: flex; gap: 1.5rem; align-items: flex-start; }
.about-avatar {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, #add5f7, #4e7ac7);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18);
}
.about-body { flex: 1; min-width: 0; }
.about-body h3 { margin: 0 0 0.4rem; font-size: 1.35rem; color: var(--post-heading-color); }
.about-body .intro { margin: 0 0 0.75rem; color: var(--post-text-color); }
.about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.8125rem;
  color: var(--sec-text-color);
  margin-bottom: 0.85rem;
}
.about-stats > span { display: inline-flex; align-items: center; gap: 5px; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-color);
  font-size: 0.8125rem;
  color: var(--sec-text-color);
  transition: all 0.2s;
}
.social-links a:hover {
  border-color: var(--link-hover-color);
  color: var(--link-hover-color);
  background-color: var(--accent-soft);
}

/* ---------- 标签筛选 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.5rem; }
.chip {
  padding: 3px 12px;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  background: transparent;
  color: var(--sec-text-color);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.18s;
}
.chip:hover { border-color: var(--link-hover-color); color: var(--link-hover-color); }
.chip.active { background: var(--link-hover-color); border-color: var(--link-hover-color); color: #fff; }

/* ============================================================
   文章列表（index-card）
   ============================================================ */
.index-card { display: flex; margin-bottom: 2.5rem; }
.index-img { display: flex; align-items: center; }
.index-img a { display: block; width: 100%; }
.index-img img,
.index-img .cover-ph {
  display: block;
  width: 100%;
  height: 10rem;
  object-fit: cover;
  border-radius: 0.25rem;
  box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);
}
.index-img .cover-ph {
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.index-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.index-header {
  color: var(--text-color);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.index-header a { transition: color 0.2s; }
.index-card:hover .index-header a { color: var(--link-hover-color); }
.index-excerpt {
  color: var(--sec-text-color);
  margin: 0.5rem 0;
  font-size: 0.9375rem;
  line-height: 1.4;
  height: calc(1.4rem * 3);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  transition: color 0.2s;
}
.index-excerpt:hover { color: var(--link-hover-color); }
.index-btm {
  color: var(--sec-text-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 0.8125rem;
}
.index-btm a { color: var(--sec-text-color); }
.index-btm a:hover { color: var(--link-hover-color); }
.post-meta { display: inline-flex; align-items: center; gap: 4px; }
.tag-link { color: var(--sec-text-color); }
.tag-link:hover { color: var(--link-hover-color); }
.tag-link::before { content: '#'; opacity: 0.65; }

.empty { padding: 2.5rem 0; text-align: center; color: var(--sec-text-color); font-size: 0.9375rem; }

/* ---------- 在做的事 ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.project-card {
  display: block;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line-color);
  border-radius: 0.5rem;
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
}
.project-card:hover {
  box-shadow: var(--board-shadow);
  border-color: var(--link-hover-color);
  transform: translateY(-3px);
}
.project-card .p-tag { font-size: 0.75rem; color: var(--link-hover-color); letter-spacing: 0.08em; }
.project-card h4 { margin: 6px 0 8px; font-size: 1rem; color: var(--text-color); }
.project-card p { margin: 0; font-size: 0.875rem; color: var(--sec-text-color); line-height: 1.7; }

/* ---------- 找到我 ---------- */
.contact-list { display: flex; flex-direction: column; }
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.25rem;
  border-bottom: 1px solid var(--line-color);
  font-size: 0.9375rem;
}
.contact-row:last-child { border-bottom: none; }
.contact-row .k { color: var(--sec-text-color); font-size: 0.8125rem; }
.contact-row:hover .v { color: var(--link-hover-color); }

/* ============================================================
   文章详情页
   ============================================================ */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--link-hover-color);
  width: 0;
  z-index: 200;
  transition: width 0.1s linear;
}

.post-content { max-width: 840px; margin: 0 auto; overflow: hidden; }

.markdown-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--post-text-color);
  word-wrap: break-word;
}
.markdown-body p { margin: 0 0 1.25rem; }
.markdown-body p.blank { min-height: 1em; margin: 0 0 1.25rem; }

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: var(--post-heading-color);
  font-weight: 700;
  line-height: 1.5;
  margin: 2rem 0 1rem;
}
.markdown-body h1 { font-size: 1.75rem; }
.markdown-body h2 {
  font-size: 1.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--line-color);
}
.markdown-body h3 { font-size: 1.25rem; }
.markdown-body h4 { font-size: 1.1rem; }
.markdown-body h5 { font-size: 1rem; }
.markdown-body h6 { font-size: 0.9375rem; color: var(--sec-text-color); }
.headerlink { margin-left: 0.4rem; opacity: 0; color: var(--post-link-color); font-weight: 400; transition: opacity 0.2s; }
.markdown-body h1:hover .headerlink,
.markdown-body h2:hover .headerlink,
.markdown-body h3:hover .headerlink,
.markdown-body h4:hover .headerlink { opacity: 1; }

.markdown-body a {
  color: var(--post-link-color);
  border-bottom: 1px solid var(--post-link-color);
  transition: background-color 0.2s, color 0.2s;
}
.markdown-body a:hover {
  background-color: var(--link-hover-bg-color);
  border-bottom-color: var(--link-hover-bg-color);
  color: #fff;
}
.markdown-body strong { color: var(--post-heading-color); font-weight: 700; }
.markdown-body em { font-style: italic; color: var(--link-hover-color); }
.markdown-body del { color: var(--sec-text-color); }

.markdown-body blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  border-left: 0.25rem solid var(--post-link-color);
  background-color: var(--bg-soft);
  color: var(--sec-text-color);
  border-radius: 0 0.25rem 0.25rem 0;
}
.markdown-body blockquote p:last-child { margin-bottom: 0; }
.markdown-body blockquote em { color: inherit; }
[data-theme='dark'] .markdown-body blockquote,
[data-theme='dark'] .markdown-body blockquote em { color: #ffffff; }

.markdown-body ul,
.markdown-body ol { padding-left: 1.5rem; margin: 0 0 1.25rem; }
.markdown-body li { margin-bottom: 0.35rem; }
.markdown-body hr { border: none; border-top: 1px solid var(--line-color); margin: 2rem 0; }
.markdown-body img {
  border-radius: 0.25rem;
  box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18);
  margin: 0.5rem 0;
}
.markdown-body code {
  tab-size: 4;
  background-color: var(--inlinecode-bg-color);
  padding: 0.15rem 0.35rem;
  border-radius: 0.2rem;
  font-family: var(--font-code);
  font-size: 0.9em;
}
.markdown-body pre {
  background-color: var(--bg-soft);
  padding: 1rem 1.2rem;
  border-radius: 0.25rem;
  overflow-x: auto;
  margin: 0 0 1.25rem;
}
.markdown-body pre code { background: none; padding: 0; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: 0.9375rem; }
.markdown-body th,
.markdown-body td { border: 1px solid var(--line-color); padding: 0.5rem 0.7rem; }
.markdown-body th { background-color: var(--bg-soft); }

.note {
  padding: 0.75rem;
  border-left: 0.35rem solid;
  border-radius: 0.25rem;
  margin: 1.5rem 0;
  color: var(--text-color);
  font-size: 0.9rem;
}
.note-info { background-color: rgba(160, 197, 228, 0.25); border-color: #428bca; }
.note p:last-child { margin-bottom: 0; }

.article-end { margin: 2.5rem 0 0; text-align: center; color: var(--sec-text-color); letter-spacing: 0.5em; }

/* 上一篇 / 下一篇 */
.post-prevnext {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-top: 1.5rem;
}
.post-prevnext .post-prev,
.post-prevnext .post-next { display: flex; padding-left: 0; padding-right: 0; }
.post-prevnext .post-next { justify-content: flex-end; }
.post-prevnext a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0;
  color: var(--sec-text-color);
  transition: color 0.2s;
}
.post-prevnext a:hover { color: var(--link-hover-color); }
.visible-mobile { display: none; }

/* ---------- 侧栏：分类 / 目录 ---------- */
.sidebar { position: sticky; top: 5rem; padding: 0 0.25rem; }
.side-col > .sidebar { max-height: 85vh; overflow-y: auto; }
.category-bar .category-list { max-height: 80vh; overflow-y: auto; overflow-x: hidden; }
.category { margin-bottom: 0.25rem; }
.category-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.95rem;
  color: var(--text-color);
  cursor: pointer;
  padding: 2px 0;
}
.category-item:hover { color: var(--link-hover-color); }
.list-group-count { margin: 0 0.2rem; font-size: 0.85em; color: var(--sec-text-color); }
.category-post-list {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line-color);
}
.category-post {
  display: block;
  font-size: 0.8125rem;
  color: var(--sec-text-color);
  padding: 3px 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-post:hover { color: var(--link-hover-color); }
.category-post.active { color: var(--link-hover-color); font-weight: 700; }

.toc-header {
  margin-bottom: 0.5rem;
  font-weight: 700;
  line-height: 1.2;
  font-size: 0.9375rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 5px;
}
.toc-body { max-height: 75vh; overflow-y: auto; }
.toc-body a {
  display: block;
  font-size: 0.8125rem;
  color: var(--sec-text-color);
  padding: 3px 0 3px 0.5rem;
  line-height: 1.4;
  border-left: 2px solid transparent;
}
.toc-body a:hover { color: var(--link-hover-color); }
.toc-body a.active { color: var(--link-hover-color); border-left-color: var(--link-hover-color); }
.toc-body a.toc-h3 { padding-left: 1.25rem; }

/* ============================================================
   返回顶部 / 搜索弹窗
   ============================================================ */
#scroll-top-button {
  position: fixed;
  z-index: 99;
  right: 1.5rem;
  background: var(--board-bg-color);
  color: var(--text-color);
  transition: background-color 0.2s ease-in-out, bottom 0.3s ease;
  border-radius: 4px;
  min-width: 40px;
  min-height: 40px;
  bottom: -60px;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}
#scroll-top-button.show { bottom: 1.5rem; }

.modal { position: fixed; inset: 0; z-index: 300; display: none; background: rgba(0, 0, 0, 0.4); }
.modal.show { display: block; }
.modal-dialog { max-width: 700px; margin: 8vh auto; }
.modal-content {
  background-color: var(--board-bg-color);
  border-radius: 0.5rem;
  box-shadow: var(--board-shadow);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--line-color);
}
.modal-header h4 { margin: 0; font-size: 1.05rem; color: var(--text-color); }
.modal-header .close {
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--sec-text-color);
  cursor: pointer;
}
.modal-body { padding: 1.2rem; }
.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-color);
  border-radius: 0.25rem;
  background: transparent;
  color: var(--text-color);
  font-size: 0.9375rem;
  font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--link-hover-color); }
.list-group { margin-top: 0.75rem; }
.search-item { display: block; padding: 0.6rem 0.25rem; border-bottom: 1px solid var(--line-color); cursor: pointer; }
.search-item:hover .search-title { color: var(--link-hover-color); }
.search-title { font-size: 0.9375rem; color: var(--text-color); }
.search-sum { font-size: 0.8125rem; color: var(--sec-text-color); margin-top: 2px; }

/* ============================================================
   页脚
   ============================================================ */
.footer-inner { padding: 3rem 0 1rem 0; text-align: center; }
.footer-content { color: var(--sec-text-color); font-size: 0.8125rem; line-height: 1.9; }
.footer-content a { color: var(--link-hover-color); }
.footer-content a:hover { text-decoration: underline; }

/* ============================================================
   色板（后台「外观」页的预设背景用）
   ============================================================ */
.swatch { height: 38px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; transition: transform 0.15s; }
.swatch:hover { transform: scale(1.07); }
.swatch.active { border-color: var(--accent); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 991px) {
  #board { padding: 2rem 1.25rem 2.5rem; }
}
@media (max-width: 767px) {
  .container { padding: 0 1.25rem; }
  /* 竖屏上 cover 会把 16:9 素材裁得只剩中间一条，直接按素材比例给横幅定高，
     整幅画面完整可见；文章页横幅要放标题，给更高的高度 */
  .header-inner { height: auto; aspect-ratio: 16 / 9; min-height: 230px; }
  .header-inner--compact { height: 52vh; min-height: 300px; aspect-ratio: auto; }
  @supports (height: 100svh) {
    .header-inner--compact { height: 52svh; }
  }
  .banner-text { width: 88%; }
  .banner-text .h2 { font-size: 1.6rem; }
  .index-card { flex-direction: column; }
  .index-img { width: 100%; max-width: 100%; flex: 0 0 auto; align-self: stretch; }
  .index-img img, .index-img .cover-ph { width: 100%; height: 10.5rem; }
  .index-header { font-size: 1.25rem; white-space: normal; }
  .about-card { flex-direction: column; gap: 1rem; }
  .post-prevnext { flex-direction: column; }
  .post-prevnext .post-prev, .post-prevnext .post-next { flex: 0 0 100%; max-width: 100%; }
  .post-prevnext .post-next { justify-content: flex-start; }
  .scroll-down-bar { display: none; }
  /* 手机上手指点击区至少 40px（Apple/Google 建议约 44px） */
  .navbar .nav-link span { display: none; }
  .navbar .nav-link { padding: 11px 10px; min-width: 42px; min-height: 42px; justify-content: center; }
  .chip { padding: 7px 14px; font-size: 0.875rem; }
  .tag-link { padding: 4px 2px; }
  .modal-dialog { margin: 4vh 1rem; }
}
