/* ===== 侧栏：头像下方简介（简约，跟随主题主色） ===== */
#aside-content .author-info-description {
  margin-top: 4px;
}
#aside-content .author-info-description .author-motto {
  color: var(--default-bg-color, #2f6b5f);
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: .2px;
}
#aside-content .author-info-description .motto-line {
  display: flex;
  justify-content: center;
  gap: 1.6em;
}
#aside-content .author-info-description .motto-line + .motto-line {
  margin-top: 2px;
}
#aside-content .author-info-description .motto-line span {
  color: inherit;
}

/* ===== 归档 / 标签 / 分类 / 友链 / 留言板 / 关于：顶部图只留图，不显示标题文字 ===== */
#page-header.not-home-page #page-site-info {
  display: none !important;
}

/* ===== 当前页面导航项：绿色图标+文字，文字下方绿色横线 ===== */
#nav .menus_items .menus_item > a.site-page.current,
#nav .menus_items .menus_item > a.site-page.current:hover,
#nav .menus_items .menus_item > a.site-page.current i,
#nav .menus_items .menus_item > a.site-page.current span {
  color: #2f6b5f !important;
}
#nav .menus_items .menus_item > a.site-page.current::after,
#nav .menus_items .menus_item > a.site-page.current:hover::after {
  width: 100% !important;
  background-color: #2f6b5f !important;
  z-index: 1;
}
/* 移动端展开菜单同步显示绿色 */
#menu .site-page.current,
#menu .site-page.current:hover,
#menu .site-page.current i,
#menu .site-page.current span {
  color: #2f6b5f !important;
}

/* ===== 导航栏：顶部透明；滚动后白底深字，无阴影无边框 ===== */
#page-header #nav {
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
  border: 0 !important;
}
/* 滚动后压在白色正文上：给纯白底 + 深色字，避免白字隐形、正文透过 */
#page-header.nav-fixed > #nav {
  background: rgba(255, 255, 255, .94) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: none !important;
  border: 0 !important;
}
#page-header.nav-fixed #nav a:not(.current),
#page-header.nav-fixed #nav span.site-page:not(.current),
#page-header.nav-fixed #nav .site-name,
#page-header.nav-fixed #nav #toggle-menu,
#page-header.nav-fixed #nav #blog-info {
  color: #3c4658 !important;
  text-shadow: none !important;
}
#page-header.nav-fixed #nav a:not(.current):hover,
#page-header.nav-fixed #nav span.site-page:not(.current):hover {
  color: #215348 !important;
}
[data-theme='dark'] #page-header.nav-fixed > #nav {
  background: rgba(20, 24, 33, .94) !important;
}
[data-theme='dark'] #page-header.nav-fixed #nav a:not(.current),
[data-theme='dark'] #page-header.nav-fixed #nav span.site-page:not(.current),
[data-theme='dark'] #page-header.nav-fixed #nav .site-name,
[data-theme='dark'] #page-header.nav-fixed #nav #toggle-menu,
[data-theme='dark'] #page-header.nav-fixed #nav #blog-info {
  color: #e3e8f0 !important;
}

/* ===== 关于页面 ===== */
.about-quote {
  margin: 0 0 34px;
  padding: 30px 24px;
  border: 1px solid #d8e8de;
  border-radius: 18px;
  background: linear-gradient(120deg, #fbfdf7 0%, #f2f8f2 55%, #eaf4ee 100%);
  text-align: center;
}
.about-quote .quote-main {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #38404f;
}
.about-quote .quote-sub {
  margin: 14px 0 0;
  font-size: 15px;
  font-style: italic;
  letter-spacing: 2px;
  color: #6a737d;
}
.about-text p {
  margin: 0 0 22px;
  text-indent: 2em;
  font-size: 16px;
  line-height: 2;
  color: #4c5566;
}
.about-text p strong {
  color: #38404f;
}
.about-text .about-sign {
  margin-top: 34px;
  text-indent: 0;
  text-align: right;
  color: #5c6474;
}
@media (max-width: 768px) {
  .about-quote { padding: 24px 16px; }
  .about-quote .quote-main { font-size: 18px; }
  .about-quote .quote-sub { font-size: 13px; letter-spacing: 1px; }
}

/* ===== 关于页：联系方式（标题与三个小图标按钮同一行） =====
   细线 + 描边按钮，不加渐变和阴影，保持简约；窄屏仍保持一行。 */
.about-info {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid var(--hr-border, #e3e8f0);
  text-align: left;
}
.about-info .info-title {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
  color: var(--font-color, #38404f);
}
.about-info .info-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 13px;
  margin-right: 10px;
  vertical-align: -2px;
  border-radius: 2px;
  background: #2f6b5f;
}
#article-container .contact-btns {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 0;
}
#article-container .contact-btn {
  flex: 0 0 auto;
  min-width: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--hr-border, #e3e8f0);
  border-radius: 10px;
  background: var(--card-bg, #fff);
  color: var(--font-color, #4c5566);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s;
}
#article-container .contact-btn i { font-size: 14px; color: #2f6b5f; }
#article-container .contact-btn:hover {
  border-color: #215348;
  color: #215348;
  transform: translateY(-2px);
}
#article-container .contact-btn:hover i { color: inherit; }
[data-theme='dark'] #article-container .contact-btn {
  border-color: #3a4050;
  background: #242936;
}
@media (max-width: 768px) {
  .about-info { margin-top: 34px; padding-top: 22px; gap: 10px; }
  .about-info .info-title { font-size: 13px; letter-spacing: 0; }
  .about-info .info-title::before { height: 12px; margin-right: 7px; }
  #article-container .contact-btns { gap: 6px; }
  #article-container .contact-btn { min-width: 0; padding: 7px 8px; gap: 4px; font-size: 11px; }
  #article-container .contact-btn i { font-size: 12px; }
}
@media (max-width: 380px) {
  .about-info { gap: 8px; }
  .about-info .info-title::before { display: none; }
  #article-container .contact-btn { padding: 6px; font-size: 10px; }
}

/* ===== 友链页：申请友链卡片 ===== */
#article-container .link-apply {
  margin: 4px 0 30px;
  padding: 30px 32px 34px;
  border: 1px solid #edf0f6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(31, 45, 71, .05);
}
#article-container .link-apply-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #1f2733;
}
#article-container .link-apply-title::before {
  content: '';
  flex: none;
  width: 5px;
  height: 24px;
  border-radius: 3px;
  background: linear-gradient(180deg, #357e70 0%, #2f6b5f 100%);
}
#article-container .link-apply-subtitle {
  margin: 0 0 24px;
  font-size: 15px;
  color: #6a737d;
}
#article-container .link-apply-rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
#article-container .link-apply-rule {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f2f8f4 0%, #eaf4ee 100%);
}
#article-container .link-apply-rule-icon {
  flex: none;
  margin-top: 3px;
  font-size: 18px;
  color: #2f6b5f;
}
#article-container .link-apply-rule-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #2b3341;
}
#article-container .link-apply-rule-desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #6a737d;
}
#article-container .link-apply-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
}
#article-container .link-apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 168px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
#article-container .link-apply-btn i { font-size: 15px; }
#article-container .link-apply-btn-blue {
  background: linear-gradient(100deg, #357e70 0%, #2f6b5f 100%);
  box-shadow: 0 8px 20px rgba(47, 107, 95, .30);
}
#article-container .link-apply-btn-purple {
  background: linear-gradient(100deg, #2f6b5f 0%, #215348 100%);
  box-shadow: 0 8px 20px rgba(47, 107, 95, .30);
}
#article-container .link-apply-btn:hover {
  color: #fff;
  transform: translateY(-2px);
}
#article-container .link-apply-btn-blue:hover { box-shadow: 0 12px 24px rgba(47, 107, 95, .42); }
#article-container .link-apply-btn-purple:hover { box-shadow: 0 12px 24px rgba(33, 83, 72, .42); }
/* 复制提示 */
.link-apply-toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  z-index: 9999;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(32, 38, 50, .92);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .25s ease, transform .25s ease;
}
.link-apply-toast.show { opacity: 1; transform: translate(-50%, 0); }
/* 友链列表：淡蓝描边呼应申请卡片 */
#article-container .flink .flink-list-item {
  border: 1px solid #e8f1ff;
  border-radius: 12px;
}
/* 暗色模式适配 */
[data-theme='dark'] #article-container .link-apply {
  border-color: #3a4050;
  background: #242936;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
[data-theme='dark'] #article-container .link-apply-title,
[data-theme='dark'] #article-container .link-apply-rule-name { color: #e8ecf4; }
[data-theme='dark'] #article-container .link-apply-rule {
  background: linear-gradient(135deg, #2b3444 0%, #273041 100%);
}
[data-theme='dark'] #article-container .flink .flink-list-item { border-color: #37405a; }
@media (max-width: 768px) {
  #article-container .link-apply { padding: 22px 18px 26px; }
  #article-container .link-apply-title { font-size: 20px; }
  #article-container .link-apply-rules { grid-template-columns: 1fr; gap: 12px; }
  #article-container .link-apply-actions { flex-direction: column; align-items: center; gap: 14px; }
  #article-container .link-apply-btn { width: 100%; max-width: 260px; }
}

/* ===== 顶部导航站点名：英文名后缀 ===== */
#blog-info .site-name-en {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: .72em;
  font-weight: 400;
  font-style: normal;
  letter-spacing: .4px;
  white-space: nowrap;
  opacity: .88;
}
/* 窄屏同样显示完整的中英文站点名：缩小字号，避免被主题单行省略号截断 */
@media (max-width: 768px) {
  #blog-info {
    min-width: 0;
    font-size: 15px;
  }
  #blog-info .site-name-en {
    display: inline;
    font-size: .78em;
    letter-spacing: 0;
  }
}
@media (max-width: 340px) {
  #blog-info { font-size: 14px; }
}

/* ===== 关闭两处黑色 GitHub 社交图标 =====
   顶层 social 配置已在 _config.butterfly.yml 中关闭，这里再做一层 CSS 兜底：
   1) 首页顶部简介下方（主题默认只在 ≤768px 显示）
   2) 侧栏作者卡片底部（头像下面的黑色小图标）
   蓝色的 GitHub 大按钮 #card-info-btn 保留。 */
#site_social_icons,
.card-info-social-icons {
  display: none !important;
}

/* ===== 文章表格：短标签列不折行，长文字列可断行 =====
   auto 布局下浏览器会把长文字列撑宽、把第一列压到逐字折行；
   nowrap 让首列保持单行，overflow-wrap 让长 URL/英文串在列内断开而不撑破表格。 */
#article-container .table-wrap table {
  width: 100%;
  overflow-wrap: anywhere;
}
#article-container .table-wrap table th:first-child,
#article-container .table-wrap table td:first-child {
  white-space: nowrap;
}

/* ===== 留言板：顶部标语打字机（绿色加粗 + 喇叭图标，无需主题 typed.js） ===== */
#article-container .site-motto {
  display: flex;
  align-items: center;
  margin: 0 0 1.2rem;
  font-size: 1.06rem;
  font-weight: 700;
  color: #2f6b5f;
}
#article-container .site-motto-icon {
  flex: none;
  margin-right: 10px;
  font-size: 1.15rem;
  color: #2f6b5f;
}
/* ghost 隐藏但撑住整句宽度；打字层绝对定位叠其上，逐字增删时外框不抖动 */
#article-container .site-motto-text {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
#article-container .site-motto-ghost { visibility: hidden; }
#article-container .site-motto-flow {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
}
#article-container .site-motto-cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.16em;
  background: #2f6b5f;
  animation: site-motto-blink 1s steps(1) infinite;
}
@keyframes site-motto-blink { 50% { opacity: 0; } }
[data-theme='dark'] #article-container .site-motto,
[data-theme='dark'] #article-container .site-motto-icon { color: #7fd1bd; }
[data-theme='dark'] #article-container .site-motto-cursor { background: #7fd1bd; }
@media (prefers-reduced-motion: reduce) {
  #article-container .site-motto-cursor { animation: none; }
}

/* ===== 留言板：网站信息整体方框（左右两栏 + 中间分隔线） ===== */
.site-info-panel {
  padding: 24px;
  border: 1px solid rgba(47, 107, 95, .2);
  border-radius: 16px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 6px 24px rgba(31, 45, 71, .05);
}
.site-info-panel .site-info-card {
  border: none;
  border-right: 1px solid rgba(47, 107, 95, .18);
  border-radius: 0;
  padding: 4px 24px 4px 0;
  background: transparent;
}
#article-container .site-info-heading {
  margin: 0 0 14px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 2px solid rgba(47, 107, 95, .3);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .5px;
  color: #2f6b5f;
}
[data-theme='dark'] #article-container .site-info-heading {
  color: #7fd1bd;
  border-bottom-color: rgba(124, 209, 189, .3);
}
/* 快照图：白色相框效果（上下留白收窄，左右保留适中白边） */
.site-info-panel .site-info-shot {
  padding: 4px 8px;
  border: 4px solid #fff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(31, 45, 71, .16);
}
.site-info-panel .site-info-shot img { border-radius: 4px; }
.site-info-panel .site-info-shot:hover {
  box-shadow: 0 10px 28px rgba(31, 45, 71, .24);
}
[data-theme='dark'] .site-info-panel {
  border-color: rgba(124, 209, 189, .24);
  background: rgba(20, 26, 30, .5);
}
[data-theme='dark'] .site-info-panel .site-info-card { border-right-color: rgba(124, 209, 189, .2); background: transparent; }

/* ===== 留言板：网站信息（左卡片 / 右快照裸图，并列摆放） ===== */
.site-info-wrap {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin: 1.2rem 0 1.6rem;
}
.site-info-card {
  display: flex;
  flex-direction: column;
  padding: 15px 20px;
  border: 1px solid rgba(47, 107, 95, .22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(47, 107, 95, .07), rgba(47, 107, 95, .015));
}
.site-info-rows {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.site-info-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
  font-size: .9rem;
}
.site-info-row:last-child { border-bottom: none; padding-bottom: 0; }
.site-info-label {
  flex: 0 0 4.6em;
  font-weight: 500;
  color: #6a737d;
}
.site-info-value {
  flex: 1;
  min-width: 0;
  color: var(--font-color, #1f2d3d);
  overflow-wrap: anywhere;
}
.site-info-value a {
  color: #2f6b5f;
  text-decoration: underline;
}
.site-info-value a:hover { color: #215348; }
/* 一键复制网站信息：居中实心按钮（抵消卡片右侧 24px 分隔线留白，使按钮相对整栏居中） */
.site-info-actions { margin-top: 10px; text-align: center; }
.site-info-panel .site-info-actions { margin-right: -24px; }
.site-info-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 15px;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .3px;
  line-height: 1.2;
  color: #fff;
  background: #2f6b5f;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(47, 107, 95, .26);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .12s ease;
}
.site-info-copy-icon { font-size: .9em; opacity: .95; }
.site-info-copy:hover {
  background: #215348;
  box-shadow: 0 4px 12px rgba(47, 107, 95, .34);
}
.site-info-copy:active { transform: translateY(1px); }
.site-info-copy:focus-visible {
  outline: 2px solid #2f6b5f;
  outline-offset: 2px;
}
.site-info-copy.copied {
  color: #4a3300;
  background: #f2b53c;
  box-shadow: 0 2px 8px rgba(242, 181, 60, .32);
}
.site-info-copy.copied:hover { background: #e6a828; }
/* 右侧快照：裸图，不套边框 */
.site-info-shot {
  display: flex;
  align-items: center;
  min-width: 0;
  border-radius: 10px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.site-info-shot img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
}
.site-info-shot:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(47, 107, 95, .22);
}
[data-theme='dark'] .site-info-card {
  border-color: rgba(124, 209, 189, .28);
  background: linear-gradient(135deg, rgba(124, 209, 189, .12), rgba(124, 209, 189, .03));
}
[data-theme='dark'] .site-info-value a { color: #7fd1bd; }
[data-theme='dark'] .site-info-row { border-bottom-color: rgba(255, 255, 255, .07); }
[data-theme='dark'] .site-info-label { color: #9ca3af; }
[data-theme='dark'] .site-info-shot:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
}
[data-theme='dark'] .site-info-copy {
  background: #2f7568;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
[data-theme='dark'] .site-info-copy:hover { background: #357e70; }
[data-theme='dark'] .site-info-copy.copied {
  color: #4a3300;
  background: #f5c05a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
[data-theme='dark'] .site-info-copy.copied:hover { background: #ffcf6e; }
/* 中等宽度：改上下堆叠 */
@media (max-width: 760px) {
  .site-info-wrap {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
  }
  .site-info-panel { padding: 18px; }
  .site-info-panel .site-info-card {
    border-right: none;
    border-bottom: 1px solid rgba(47, 107, 95, .18);
    border-radius: 0;
    padding: 0 0 16px;
  }
  .site-info-panel .site-info-actions { margin-right: 0; }
  .site-info-panel .site-info-shot { padding-left: 0; }
  .site-info-rows { justify-content: flex-start; }
  .site-info-label { flex: 0 0 4.8em; }
  .site-info-shot { display: block; }
}
@media (max-width: 600px) {
  .site-info-panel { padding: 16px; }
  .site-info-card { padding: 16px; }
  .site-info-panel .site-info-card { padding: 0 0 16px; }
  .site-info-row { padding: 8px 0; font-size: .88rem; }
  .site-info-label { flex: 0 0 4.4em; font-size: .85rem; }
  .site-info-shot { margin-top: 2px; }
}

/* ===== 全站背景：雾松（低饱和冷灰绿） =====
   #eef2ee → #dce6df → #e7ede8，与墨绿主色同系但退到背景里，
   正式克制又留绿意，与纯白卡片、透明页脚搭配柔和，长时间阅读不抢内容。 */
#web_bg {
  position: fixed;
  z-index: -999;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #eef2ee 0%, #dce6df 50%, #e7ede8 100%) !important;
}
/* 纯色渐变无需主题那 4 秒淡入，避免「先白后米」的跳变 */
#web_bg.bg-animation {
  -webkit-animation: none !important;
  animation: none !important;
}
/* 深色模式沿用同色系墨绿（浅色换 Autumn 淡版时保持不变），避免浅底刺眼；并去掉主题默认的黑色遮罩 */
[data-theme='dark'] #web_bg {
  background:
    radial-gradient(ellipse 82% 72% at 46% 42%, rgba(255, 255, 255, .045) 0%, rgba(255, 255, 255, 0) 78%),
    radial-gradient(ellipse 80% 74% at 88% 4%, rgba(42, 104, 76, .5) 0%, rgba(42, 104, 76, 0) 72%),
    linear-gradient(180deg, #0d1d18 0%, #11251d 32%, #0f201a 66%, #0b1915 100%) !important;
}
[data-theme='dark'] #web_bg::before {
  display: none !important;
}
/* 右下角悬浮按钮：原亮蓝 #49b1f5 与薄荷系不搭，改为同色系墨青绿
   白图标对比 5.16:1，只在浅色模式生效（深色沿用主题变量） */
html[data-theme='light'] #rightside {
  --btn-bg: #2f6b5f;
  --btn-hover-color: #215348;
  --btn-color: #ffffff;
}

/* ===== 文章底部翻页：左右两栏 ===== */
/* 静态只显示标签 + 标题；hover 时标题上移，文章摘要淡入（限制 2 行） */
#pagination.pagination-post .info-1 {
  text-shadow: 0 1px 5px rgba(0, 0, 0, .5);
  transition: transform .3s, opacity .3s;
}
#pagination.pagination-post .info-2 {
  display: block !important;
  top: auto;
  bottom: 14px;
  padding: 0 40px;
  opacity: 0 !important;
  visibility: hidden;
  transform: translate(0, 10px) !important;
  transition: opacity .3s, transform .3s, visibility .3s;
  pointer-events: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .9), 0 0 4px rgba(0, 0, 0, .65);
}
/* 摘要元素与标签同名 .info-item-1，这里必须锁死 2 行截断，
   否则 hover 的胶囊规则会把 display 改成 inline-block，整段摘要展开溢出卡片 */
#pagination.pagination-post .info-2 .info-item-1 {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
  -webkit-line-clamp: 2 !important;
  font-size: .84rem;
  line-height: 1.45;
}
#pagination.pagination-post .pagination-related:not(.pagination-empty):hover .info-2 {
  opacity: 1 !important;
  visibility: visible;
  transform: translate(0, 0) !important;
}
/* 标题与胶囊标签始终可见，hover 时上移让出摘要位置 */
#pagination.pagination-post .pagination-related:not(.pagination-empty):hover .info-1 {
  opacity: 1 !important;
  transform: translate(0, -82%) !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .85), 0 0 4px rgba(0, 0, 0, .6);
}

/* 两栏各占一半；只有一篇相邻文章时由 custom.js 补一个占位栏 */
#pagination.pagination-post .pagination-related.full-width {
  width: auto !important;
  flex: 1 1 50%;
  min-width: 0;
}
#pagination.pagination-post .pagination-related.pagination-empty {
  flex: 1 1 50%;
  min-width: 0;
  height: 150px;
  cursor: default;
  background: linear-gradient(135deg, rgba(235, 230, 199, .55), rgba(212, 235, 216, .55)) !important;
}
.pagination-related.pagination-empty .info-item-1 { color: #6a737d !important; }
.pagination-related.pagination-empty .info-item-2 { color: #6a737d !important; font-weight: 400; }

/* hover：封面图提亮放大露出原图细节，标签变成小胶囊 */
#pagination.pagination-post .pagination-related:not(.pagination-empty):hover .cover {
  opacity: .72 !important;
  transform: scale(1.06) !important;
}
#pagination.pagination-post .pagination-related:hover .info-1 .info-item-1 {
  display: inline-block;
  width: auto;
  padding: 2px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  color: #fff !important;
  text-transform: none;
}
/* 占位栏不参与 hover 变化 */
#pagination.pagination-post .pagination-related.pagination-empty:hover .info-1 .info-item-1 {
  display: block;
  padding: 0;
  border-radius: 0;
  background: none;
  color: #6a737d !important;
}
/* 深色规则需带上 #pagination.pagination-post，否则权重压不过上面的浅色规则 */
[data-theme='dark'] #pagination.pagination-post .pagination-related.pagination-empty {
  background: linear-gradient(135deg, rgba(20, 43, 40, .6), rgba(16, 34, 31, .6)) !important;
}
[data-theme='dark'] #pagination.pagination-post .pagination-related.pagination-empty .info-item-1,
[data-theme='dark'] #pagination.pagination-post .pagination-related.pagination-empty:hover .info-item-1 { color: #9fc2b6 !important; }
[data-theme='dark'] #pagination.pagination-post .pagination-related.pagination-empty .info-item-2 { color: #a6c0b6 !important; }

/* 窄屏改为上下堆叠，避免两栏过挤 */
@media (max-width: 768px) {
  #pagination.pagination-post .pagination-related.full-width,
  #pagination.pagination-post .pagination-related.pagination-empty {
    flex: none;
    width: 100% !important;
  }
}

/* ===== 长代码块折叠：超过 20 行只显示前 20 行 =====
   --code-fold-height 由 /js/custom.js 按实际行数与行高算出，避免不同字号下偏差 */
/* 底部留出 34px 放展开按钮，避免按钮压住第 20 行代码 */
figure.highlight.code-foldable {
  position: relative;
  padding-bottom: 34px;
  margin-bottom: 0;
}

figure.highlight.code-foldable:not(.code-expanded) > table,
figure.highlight.code-foldable:not(.code-expanded) > pre {
  max-height: var(--code-fold-height, 456px);
  overflow: hidden;
}

/* 折叠处向下渐隐，提示后面还有代码 */
figure.highlight.code-foldable:not(.code-expanded)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  height: 20px;
  background: linear-gradient(180deg, transparent, var(--hl-bg));
  pointer-events: none;
  z-index: 9;
}

.code-fold-btn {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  padding: 0;
  border: 0;
  background: var(--hlexpand-bg);
  color: #2f6b5f;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  transition: color .2s ease;
}
.code-fold-btn:hover { color: #215348; }
[data-theme='dark'] .code-fold-btn { color: #cfe6df; }
[data-theme='dark'] .code-fold-btn:hover { color: #ffffff; }
.code-fold-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transition: transform .2s ease;
}
figure.highlight.code-expanded .code-fold-arrow { transform: rotate(180deg); }

/* 展开后（可能上万像素高）按钮吸附视口底部，随时可收起 */
figure.highlight.code-expanded .code-fold-btn {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 24px;
  width: auto;
  min-width: 132px;
  padding: 0 18px;
  border: 1px solid var(--hlnumber-bg);
  border-radius: 18px;
  background: var(--hltools-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .16);
  transform: translateX(-50%);
  z-index: 90;
}

/* ===== 移动端首页：竖版顶部图 =====
   桌面仍用 index_img 横版 banner.webp；手机首屏为 100vh，
   横图会被 cover 裁成中央窄条，故仅在 <=768px 换 19.5:9 竖图。 */
@media (max-width: 768px) {
  #page-header.full_page {
    background-image: url('/img/banner-mobile.webp?v=20261114g') !important;
  }
}

/* 留言板：站点信息方框与评论区统一宽度 700px（与正文一致） */
#post-comment,
#post-comment .comment-wrap,
#giscus-click-box,
#giscus-wrap,
#giscus-wrap iframe {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== 评论区：点击后才加载 =====
   主题 lazyload 用 IntersectionObserver 观察 #giscus-wrap；
   默认隐藏使观察器不触发，也就不会请求 giscus.app/client.js。
   custom.js 点击按钮后加 .giscus-click-ready 显示容器，观察器随即加载评论。 */
#giscus-wrap { display: none; }
#giscus-wrap.giscus-click-ready { display: block; }

.giscus-click-box {
  margin: 12px auto 18px;
  padding: 22px 16px;
  text-align: center;
  border: 1px dashed rgba(47, 107, 95, .45);
  border-radius: 12px;
  background: rgba(255, 255, 255, .38);
}
.giscus-click-tip {
  margin: 0 0 14px;
  font-size: .86rem;
  line-height: 1.6;
  color: #6a737d;
}
.giscus-click-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 22px;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .4px;
  color: #fff;
  background: #2f6b5f;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}
.giscus-click-btn:hover {
  background: #215348;
  box-shadow: 0 4px 12px rgba(47, 107, 95, .34);
}
.giscus-click-btn:active { transform: translateY(1px); }
.giscus-click-btn:focus-visible { outline: 2px solid #2f6b5f; outline-offset: 2px; }
.giscus-click-btn:disabled { opacity: .68; cursor: default; box-shadow: none; transform: none; }

/* ===== 配色收敛：主色 #2f6b5f / hover #215348 / 灰字 #6a737d =====
   主题 index.css 里大量写死 #49b1f5、#f47466，且 URL 版本号固定，
   老浏览器可能缓存 4 小时。这里用带版本号的 custom.css 覆盖关键项，
   保证改动立即生效；深色模式沿用主题暗色规则，不受影响。 */
html:not([data-theme='dark']) {
  --default-bg-color: #2f6b5f !important;
  --btn-bg: #2f6b5f !important;
  --btn-hover-color: #215348 !important;
  --pseudo-hover: #215348 !important;
  --card-meta: #6a737d !important;
  --hr-border: #cbdcd5 !important;
  --hr-before-color: #8fb5a8 !important;
  --blockquote-color: #6a737d !important;
  --blockquote-bg: rgba(47, 107, 95, .08) !important;
  --scrollbar-color: #2f6b5f !important;
  --text-bg-hover: rgba(47, 107, 95, .7) !important;
}
/* 只覆盖 .container code（不写 #article-container code），
   避免 specificity 过高误伤 pre code 的语法高亮色。 */
#article-container a,
.container a { color: #2f6b5f; }
#article-container a:hover,
.container a:hover { color: #215348; }
.container code { color: #a94442; }

/* ===== 正文阅读：16px 字号 + 700px 行宽 + 1.8 行高 =====
   主题默认 --global-font-size 14px、主栏 max-width 60%(≈786px)，
   中文约 55 字/行偏长。收到 700px（≈44 字/行）+ 16px，长文更易读。
   主题 body 行高固定为 2，字号升到 16px 后变成 32px 偏松，这里只收紧文章区。 */
:root {
  --global-font-size: 16px !important;
}
#article-container {
  max-width: 700px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  line-height: 1.8 !important;
}
/* 标题行高收紧到 1.35，避免 24/32px 标题拖出 48/64px 的松垮间距 */
#article-container h1,
#article-container h2,
#article-container h3,
#article-container h4,
#article-container h5,
#article-container h6 {
  line-height: 1.35 !important;
}
/* 代码块：主题字号回退到全局 16px，这里回到常规 14px
   （主题 index.css 版本号固定，单改主题配置会被浏览器缓存挡住，故此处同步覆盖） */
#article-container pre,
#article-container code {
  font-size: 14px;
}
/* 窄屏留安全边距，避免 700px 限宽在平板附近突兀 */
@media (max-width: 900px) {
  #article-container { max-width: 100% !important; }
}

/* ===== 首页主标题：加暗色渐变遮罩，白字不被亮部吞掉 =====
   banner 电视/台灯处偏亮，标题压上去对比不足；
   仅对首页 .full_page 加一层自下而上的黑渐变，不挡图主体。 */
#page-header.full_page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .34) 0%, rgba(0, 0, 0, .12) 42%, rgba(0, 0, 0, 0) 72%);
  pointer-events: none;
  z-index: 0;
}
#page-header.full_page #site-info {
  position: relative;
  z-index: 1;
}
#page-header.full_page #site-title,
#page-header.full_page #site-subtitle {
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}
