/* 首页标题和副标题样式 */
#site-title {
  font-size: 6rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  text-align: center;
  margin-bottom: 20px;
}

#site-subtitle {
  font-size: 2.8rem;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
}

/* 首页标题下方：保留标题，隐藏主题原副标题 */
#page-header.full_page #site-title {
  display: block !important;
  margin-bottom: 10px;
}

#page-header.full_page #site-subtitle {
  display: none !important;
}

/* JS 未执行时：仍显示整句（与 #home-hero-typewriter 二选一，避免重复） */
#page-header.full_page #site-info:not(:has(#home-hero-typewriter)) #site-title::after {
  content: '当你为错过太阳哭泣的时候，你也要错过群星了';
  display: block;
  margin: 14px auto 0;
  max-width: min(90vw, 980px);
  color: rgba(255, 255, 255, 0.97);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.25);
}

/* 首页自定义打字机文案（JS 兜底保留） */
#home-hero-typewriter {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: min(90vw, 980px);
  z-index: 3;
  pointer-events: none;
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.97);
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.45;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.25);
}

/* Fallback: if JS timing fails and text is empty, still show sentence */
#home-hero-typewriter:empty::before {
  content: '当你为错过太阳哭泣的时候，你也要错过群星了';
}

#home-hero-typewriter::after {
  content: '|';
  margin-left: 4px;
  opacity: 1;
  animation: hero-typing-caret 1s steps(1) infinite;
}

#home-hero-typewriter.is-done::after {
  display: none;
}

@keyframes hero-typing-caret {
  50% {
    opacity: 0;
  }
}

/* 导航栏：玻璃拟态 + 更精致的阴影（接近你给的“别人的”那种质感） */
#nav {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* 顶部大图区域时的导航栏更透明一点 */
#page-header.full_page #nav {
  background: rgba(255, 255, 255, 0.55) !important;
}

/* 深色模式下导航栏 */
[data-theme="dark"] #nav {
  background: rgba(20, 20, 20, 0.72) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* 桌面端：菜单真正视觉居中（logo 固定在左，菜单整体居中） */
@media (min-width: 900px) {
  #nav {
    justify-content: center;
  }

  /* 左侧 logo 固定在左边，不参与居中计算 */
  #nav #blog-info {
    position: absolute;
    left: 36px;
  }

  #nav .menus_items {
    display: flex;
    justify-content: center;
    gap: 12px;
  }
}

/* 导航栏文字/图标默认颜色（避免发灰看不清） */
#nav a,
#nav span.site-page,
#nav i {
  color: #1f2d3d !important;
}

/* ==========================
   Nav: Search button + icon polish
   ========================== */
/* 让搜索按钮和菜单同一排，不再“单独飘在左上角” */
#nav #menus {
  display: flex;
  align-items: center;
  gap: 10px;
}

#nav #menus .menus_items {
  display: flex;
  align-items: center;
}

#nav #menus #search-button {
  display: flex;
  align-items: center;
  margin-left: auto; /* 推到最右侧 */
  order: 3;
}

/* 菜单项在左，搜索在最右（汉堡按钮最后） */
#nav #menus .menus_items {
  order: 1;
}
#nav #menus #toggle-menu {
  order: 4;
}

/* 搜索按钮：只保留图标 + 精致胶囊（桌面端更像工具按钮） */
@media (min-width: 900px) {
  #nav #menus #search-button .site-page.search span {
    display: none;
  }
}

#nav #menus #search-button .site-page.search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
  cursor: pointer;
}

#nav #menus #search-button .site-page.search:hover {
  transform: translateY(-1px);
  background: rgba(56, 189, 248, 0.10);
  box-shadow: none;
}

/* 导航菜单图标：统一成精致的小“玻璃方块” */
#nav .menus_items .menus_item i {
  /* 每个菜单项的主题色（有色彩、更高级） */
  color: var(--nav-accent, #1f2d3d) !important;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  margin-right: 6px;
  font-size: 0.98em;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

/* 给每个菜单项分配 accent（与你之前的配色保持一致） */
#nav .menus_items .menus_item:nth-child(1) { --nav-accent: #4fc3f7; } /* 首页 */
#nav .menus_items .menus_item:nth-child(2) { --nav-accent: #81c784; } /* 分类 */
#nav .menus_items .menus_item:nth-child(3) { --nav-accent: #ffb74d; } /* 标签 */
#nav .menus_items .menus_item:nth-child(4) { --nav-accent: #ef5350; } /* 关于 */

#nav .menus_items .menus_item a.site-page:hover i {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--nav-accent, #38bdf8) 14%, transparent);
  box-shadow: none;
}

/* 深色模式 */
[data-theme="dark"] #nav #menus #search-button .site-page.search {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] #nav .menus_items .menus_item i {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] #nav .menus_items .menus_item a.site-page:hover i {
  background: rgba(30, 41, 59, 0.62);
  border-color: color-mix(in srgb, var(--nav-accent, #38bdf8) 32%, rgba(148, 163, 184, 0.22));
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.52),
    0 18px 48px color-mix(in srgb, var(--nav-accent, #38bdf8) 18%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Waifu toggle: hidden state (backup in case inline style fails) */
.acg-waifu-hidden #waifu,
.acg-waifu-hidden .waifu {
  display: none !important;
}

/* Ensure rightside buttons always clickable */
#rightside {
  z-index: 100001 !important;
}

/* Waifu should not block clicks even when visible */
#waifu,
.waifu,
#live2d-widget,
#live2dcanvas,
canvas#live2dcanvas,
.live2d,
.live2d-widget,
.live2d-container {
  pointer-events: none !important;
}

/* Waifu present: avoid overlapping rightside buttons */
.acg-waifu-visible #rightside {
  bottom: 170px;
}

@media (max-width: 900px) {
  .acg-waifu-visible #rightside {
    bottom: 140px;
  }
}

/* Hide Live2D tips bubble (the “weird box”) */
#waifu-tips,
.waifu-tips {
  display: none !important;
}

/* Footer: hide framework/theme lines (and copyright block if desired) */
#footer .footer-copyright {
  display: none !important;
}

/* Rightside: add waifu toggle button style (orange) */
#rightside-config-show #acg-waifu-toggle.acg-waifu-toggle {
  background: linear-gradient(135deg, #f59e0b, #fb7185) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28) !important;
}

#rightside-config-show #acg-waifu-toggle.acg-waifu-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.35) !important;
}

/* Put waifu toggle at stack bottom and avoid “extra orange” look */
#rightside-config-show #acg-waifu-toggle {
  order: 99;
}

/* 顶部导航菜单图标：稍微放大一点，并与文字拉开一点间距 */
#nav .menus_items .menus_item i {
  font-size: 1.1em;
  margin-right: 4px;
}

/* 导航菜单：更“精致”的悬停动效（轻微上浮 + 下划线滑入） */
#nav .menus_items .menus_item a.site-page {
  position: relative;
  padding: 6px 10px;
  border-radius: 10px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#nav .menus_items .menus_item a.site-page::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: rgba(74, 163, 255, 0.9);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

#nav .menus_items .menus_item a.site-page:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.22);
}

#nav .menus_items .menus_item a.site-page:hover::after {
  transform: scaleX(1);
}

/* 每个菜单一个主题色（类似你给的参考图，每项是不同颜色的小图标） */
#nav .menus_items .menus_item:nth-child(1) i {
  color: #4fc3f7; /* 首页：蓝青色 */
}
#nav .menus_items .menus_item:nth-child(2) i {
  color: #81c784; /* 分类：绿色 */
}
#nav .menus_items .menus_item:nth-child(3) i {
  color: #ffb74d; /* 标签：橙色 */
}
#nav .menus_items .menus_item:nth-child(4) i {
  color: #ef5350; /* 关于：红色爱心 */
}

/* 首页封面图上：文字变白 + 阴影（提高对比度）
   注意：不要把图标强制变白，这样彩色图标才“精美” */
#page-header.full_page #nav a,
#page-header.full_page #nav span.site-page,
#page-header.full_page #nav .site-name {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* 首页封面图上：玻璃条再深一点，保证文字可读 */
#page-header.full_page #nav {
  background: rgba(0, 0, 0, 0.20) !important;
}

/* 滚动后（导航固定）：背景更“实”，文字更清晰，更接近你参考图的质感 */
#page-header.nav-fixed.fixed #nav,
#page-header.fixed #nav {
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

#page-header.nav-fixed.fixed #nav a,
#page-header.nav-fixed.fixed #nav span.site-page,
#page-header.nav-fixed.fixed #nav .site-name,
#page-header.fixed #nav a,
#page-header.fixed #nav span.site-page,
#page-header.fixed #nav .site-name {
  color: #1f2d3d !important;
  text-shadow: none;
}

/* 深色模式：滚动固定后 */
[data-theme="dark"] #page-header.nav-fixed.fixed #nav,
[data-theme="dark"] #page-header.fixed #nav {
  background: rgba(20, 20, 20, 0.78) !important;
}

[data-theme="dark"] #page-header.nav-fixed.fixed #nav a,
[data-theme="dark"] #page-header.nav-fixed.fixed #nav span.site-page,
[data-theme="dark"] #page-header.nav-fixed.fixed #nav .site-name,
[data-theme="dark"] #page-header.fixed #nav a,
[data-theme="dark"] #page-header.fixed #nav span.site-page,
[data-theme="dark"] #page-header.fixed #nav .site-name {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* ========== 文章页顶栏：与首页同图（脚本统一 top_img）+ 参考站式居中、底部过渡 ========== */
/* 全站 #web_bg（bg_pattern）保留，与首页一致；勿再给 #body-wrap.post 铺实色，否则会盖住底纹 */

#page-header.post-bg {
  min-height: 52vh !important;
  height: auto !important;
  max-height: 560px;
  background-attachment: scroll !important;
}

/* 底部长渐变：底端与正文背景同色，向上淡出，避免一条硬分割线 */
#page-header.post-bg::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(to top, var(--global-bg) 0%, rgba(255, 255, 255, 0) 100%);
}

[data-theme='dark'] #page-header.post-bg::after {
  background: linear-gradient(to top, var(--global-bg) 0%, rgba(13, 13, 13, 0) 100%);
}

#page-header.post-bg #nav {
  z-index: 3;
}

#page-header.post-bg #post-info {
  z-index: 2;
}

/* 未滚动时：顶栏与首页大图同款半透明导航 */
#page-header.post-bg:not(.fixed):not(.nav-fixed) #nav {
  background: rgba(0, 0, 0, 0.22) !important;
}

#page-header.post-bg:not(.fixed):not(.nav-fixed) #nav a,
#page-header.post-bg:not(.fixed):not(.nav-fixed) #nav span.site-page,
#page-header.post-bg:not(.fixed):not(.nav-fixed) #nav .site-name,
#page-header.post-bg:not(.fixed):not(.nav-fixed) #nav i {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

#page-header.post-bg #post-info .post-title {
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

#page-header.post-bg #post-info #post-meta,
#page-header.post-bg #post-info #post-meta a {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  #page-header.post-bg {
    min-height: 40vh !important;
    max-height: 400px;
  }
}

/* 文章卡片：更明显的悬浮阴影（“精致感”主要来自这里） */
#recent-posts > .recent-post-item,
.card-widget,
.layout > div:first-child:not(.recent-posts) .card-widget,
#page .article-container,
#post .post {
  border-radius: 16px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* ========== 首页 · 信封卡片 + 三列等高 + 滚动渐入（layout 4） ========== */
:root {
  /* 三列时略降封面高度，避免单卡过窄仍显得「细长」 */
  --home-env-cover-h: 236px;
  --home-env-notch: 14px;
  /* 收紧元信息区最小高度，减少白底「空一块」 */
  --home-env-meta-min-h: 3.75rem;
}

#recent-posts .recent-post-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* 列间距、行间距略收紧，中间不会空一大块 */
  gap: 18px 14px;
  /* stretch：同一行卡片等高（勿用 start，否则元信息换行会导致一高一矮） */
  align-items: stretch;
}

@media (max-width: 1180px) {
  #recent-posts .recent-post-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }
}

@media (max-width: 640px) {
  #recent-posts .recent-post-items {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* 广告位占满一行 */
#recent-posts .recent-post-item.ads-wrap {
  grid-column: 1 / -1;
}

#recent-posts .recent-post-item {
  position: relative;
  overflow: hidden;
  border-radius: 18px !important;
  background: #fff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.1) !important;
  transition:
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 有封面：整卡 flex 列，白底信息区吃掉多余高度 → 同行卡片等高 */
#recent-posts .recent-post-item:has(> .post_cover) {
  min-height: 0;
}

/* 滚动显现：进入视口时渐显上滑（一次性） */
#recent-posts .recent-post-item.home-reveal,
#aside-content .card-widget.home-reveal {
  will-change: opacity, transform;
  transition:
    opacity 0.78s cubic-bezier(0.22, 0.68, 0.2, 1),
    transform 0.78s cubic-bezier(0.22, 0.68, 0.2, 1);
}

#recent-posts .recent-post-item.home-reveal:not(.is-revealed),
#aside-content .card-widget.home-reveal:not(.is-revealed) {
  opacity: 0;
  transform: translateY(24px);
}

#recent-posts .recent-post-item.home-reveal.is-revealed,
#aside-content .card-widget.home-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

#recent-posts .recent-post-item.home-reveal.is-revealed:nth-child(3n + 2) {
  transition-delay: 0.09s;
}

#recent-posts .recent-post-item.home-reveal.is-revealed:nth-child(3n + 3) {
  transition-delay: 0.18s;
}

#aside-content .card-widget.home-reveal.is-revealed:nth-of-type(2n) {
  transition-delay: 0.08s;
}

@media (prefers-reduced-motion: reduce) {
  #recent-posts .recent-post-item.home-reveal,
  #aside-content .card-widget.home-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

#recent-posts .recent-post-item:has(> .post_cover).home-reveal.is-revealed:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.14) !important;
}

/* —— 封面区 —— */
#recent-posts .recent-post-item:has(> .post_cover) .post_cover {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 100% !important;
  height: var(--home-env-cover-h) !important;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}

#recent-posts .recent-post-item:has(> .post_cover) .post_cover a {
  display: block;
  height: 100%;
}

#recent-posts .recent-post-item:has(> .post_cover) .post-bg {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

#recent-posts .recent-post-item:has(> .post_cover) .post_cover::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.42) 100%);
}

/* 摘要叠在封面上：父级用 static，让 absolute 以 .recent-post-item 为参照 */
#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) {
  position: static !important;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: calc(-1 * var(--home-env-notch)) 0 0 !important;
  padding: calc(var(--home-env-notch) + 8px) 14px 14px !important;
  background: #fff !important;
  border: none !important;
  border-radius: 0 0 18px 18px !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  text-align: center !important;
  clip-path: polygon(
    0% 0%,
    42% 0%,
    50% var(--home-env-notch),
    58% 0%,
    100% 0%,
    100% 100%,
    0% 100%
  );
  z-index: 2 !important;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover)::before {
  display: none !important;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-title {
  margin-top: 0 !important;
  flex: 0 0 auto;
  font-weight: 800 !important;
  color: #111827 !important;
  text-shadow: none !important;
  filter: none !important;
  /* 单行/双行标题占位一致，减少左右高度差 */
  min-height: 2.5em;
  font-size: 1.38em !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-title:hover {
  color: #2563eb !important;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-meta-wrap {
  margin-top: 6px !important;
  padding-top: 0 !important;
  border-top: none !important;
  /* 不 flex 撑满，避免元信息在垂直方向被「居中」，上下出现大块留白 */
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  align-items: center;
  gap: 6px 8px;
  /* 日期/分类/标签换行时，两行占位一致，避免左右卡片一高一矮 */
  min-height: var(--home-env-meta-min-h);
  color: #6b7280 !important;
  --card-meta: #6b7280 !important;
}

/* 元信息内链式元素尽量同一行开始排，减少「单独一行只有标签」 */
#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-meta-wrap .article-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 6px;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-meta-wrap > span {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 6px;
  max-width: 100%;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-meta-wrap a {
  color: #64748b !important;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .post-meta-date i.fa-calendar-alt,
#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .post-meta-date i.fa-calendar {
  color: #22c55e;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-meta-wrap i.fa-history {
  color: #3b82f6;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-meta-wrap i.fa-inbox {
  color: #6366f1;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-meta-wrap i.fa-tag {
  color: #ec4899;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--home-env-cover-h);
  margin: 0 !important;
  padding: 16px 20px !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  text-align: center;
  line-height: 1.65 !important;
  font-size: 0.92rem !important;
  color: #fff !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  z-index: 3;
  pointer-events: none;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .content::before {
  content: '\300c';
  position: absolute;
  left: 10px;
  top: 0.4em;
  font-size: 1.25em;
  line-height: 1;
  opacity: 0.88;
  pointer-events: none;
}

#recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .content::after {
  content: '\300d';
  position: absolute;
  right: 10px;
  bottom: 0.45em;
  font-size: 1.25em;
  line-height: 1;
  opacity: 0.88;
  pointer-events: none;
}

[data-theme='dark'] #recent-posts .recent-post-item:has(> .post_cover) {
  background: #12121a;
}

[data-theme='dark'] #recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) {
  background: linear-gradient(180deg, #1c1c28 0%, #14141c 100%) !important;
}

[data-theme='dark'] #recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-title {
  color: #f3f4f6 !important;
}

[data-theme='dark'] #recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-meta-wrap {
  color: #9ca3af !important;
  --card-meta: #9ca3af !important;
}

@media (max-width: 768px) {
  :root {
    --home-env-cover-h: 200px;
    --home-env-notch: 12px;
    --home-env-meta-min-h: 4.25rem;
  }

  #recent-posts .recent-post-item:has(> .post_cover) > .recent-post-info:not(.no-cover) .article-title {
    font-size: 1.28em !important;
  }
}

/* 信封卡片内：分类/标签（覆盖下方「胶囊」通用样式） */
#recent-posts .recent-post-item:has(> .post_cover) .article-meta__categories,
#recent-posts .recent-post-item:has(> .post_cover) .article-meta__tags {
  display: inline-flex !important;
  align-items: center;
  padding: 4px 11px !important;
  margin: 4px 4px 0 0 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  color: #4b5563 !important;
  box-shadow: none !important;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

#recent-posts .recent-post-item:has(> .post_cover) .article-meta__categories {
  border-color: #dbeafe !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

#recent-posts .recent-post-item:has(> .post_cover) .article-meta__tags {
  border-color: #fce7f3 !important;
  background: #fdf2f8 !important;
  color: #be185d !important;
}

#recent-posts .recent-post-item:has(> .post_cover) .article-meta__categories:hover,
#recent-posts .recent-post-item:has(> .post_cover) .article-meta__tags:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1) !important;
}

[data-theme='dark'] #recent-posts .recent-post-item:has(> .post_cover) .article-meta__categories {
  background: rgba(30, 58, 138, 0.35) !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
  color: #93c5fd !important;
}

[data-theme='dark'] #recent-posts .recent-post-item:has(> .post_cover) .article-meta__tags {
  background: rgba(131, 24, 67, 0.35) !important;
  border-color: rgba(236, 72, 153, 0.35) !important;
  color: #fbcfe8 !important;
}

/* ========== 二次元 · 方案 B：轻装饰（贴纸感标签 + 小点缀，纯 CSS） ========== */
:root {
  --acg-pink: #f9a8d4;
  --acg-pink-deep: #ec4899;
  --acg-sky: #7dd3fc;
  --acg-lav: #c4b5fd;
  --acg-tag-bg: rgba(255, 255, 255, 0.92);
  --acg-tag-border: rgba(244, 114, 182, 0.45);
}

/* 首页列表：分类 / 标签 → 小胶囊 */
#recent-posts .article-meta__categories,
#recent-posts .article-meta__tags {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px 3px 10px;
  margin: 3px 6px 3px 0;
  font-size: 0.8rem !important;
  font-weight: 600;
  line-height: 1.35;
  border-radius: 999px;
  border: 1.5px solid var(--acg-tag-border);
  background: linear-gradient(165deg, var(--acg-tag-bg), rgba(253, 242, 248, 0.88));
  color: #be185d !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(244, 114, 182, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#recent-posts .article-meta__categories {
  border-color: rgba(125, 211, 252, 0.55);
  background: linear-gradient(165deg, var(--acg-tag-bg), rgba(240, 249, 255, 0.9));
  color: #0369a1 !important;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.12);
}

#recent-posts .article-meta__categories:hover,
#recent-posts .article-meta__tags:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.18);
  border-color: var(--acg-pink-deep);
}

#recent-posts .article-meta__categories:hover {
  border-color: #0ea5e9;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.2);
}

/* 首页卡片：分类 / 标签整块排版（条带 + 图标点缀，与胶囊链配套） */
#recent-posts .recent-post-info > .article-meta-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  margin: 0.45rem 0 0;
  padding: 0 2px;
}

#recent-posts .recent-post-info > .article-meta-wrap > .post-meta-date {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.45rem;
  align-self: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem !important;
  font-weight: 600;
  color: #334155 !important;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

#recent-posts .recent-post-item:has(> .post_cover) .recent-post-info > .article-meta-wrap > .post-meta-date {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.65);
  color: rgba(30, 41, 59, 0.92) !important;
}

#recent-posts .recent-post-info > .article-meta-wrap > span.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  padding: 0.5rem 0.55rem;
  border-radius: 14px;
  background: linear-gradient(142deg, rgba(224, 242, 254, 0.55), rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow:
    0 6px 16px rgba(14, 165, 233, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

#recent-posts .recent-post-info > .article-meta-wrap > span.article-meta.tags {
  background: linear-gradient(142deg, rgba(252, 231, 243, 0.55), rgba(255, 255, 255, 0.9));
  border-color: rgba(244, 114, 182, 0.32);
  box-shadow:
    0 6px 16px rgba(236, 72, 153, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

#recent-posts .recent-post-info > .article-meta-wrap > span.article-meta > .article-meta-separator:first-child {
  display: none;
}

#recent-posts .article-meta-wrap .article-meta i.fa-inbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45em;
  height: 1.45em;
  margin-right: 2px !important;
  font-size: 0.68em;
  color: #0369a1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(14, 165, 233, 0.18);
}

#recent-posts .article-meta-wrap .article-meta.tags i.fa-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45em;
  height: 1.45em;
  margin-right: 2px !important;
  font-size: 0.68em;
  color: #be185d;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(236, 72, 153, 0.2);
}

#recent-posts .article-meta-wrap .article-meta-link.fa-angle-right {
  color: rgba(14, 165, 233, 0.65);
  font-size: 0.75em;
}

#recent-posts .article-meta-wrap .article-meta.tags .article-meta-link {
  color: rgba(190, 24, 93, 0.45);
  margin: 0 3px;
}

[data-theme='dark'] #recent-posts .recent-post-info > .article-meta-wrap > .post-meta-date {
  color: #e2e8f0 !important;
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(71, 85, 105, 0.55);
}

[data-theme='dark'] #recent-posts .recent-post-info > .article-meta-wrap > span.article-meta {
  background: linear-gradient(142deg, rgba(30, 58, 138, 0.35), rgba(30, 32, 40, 0.75));
  border-color: rgba(56, 189, 248, 0.25);
}

[data-theme='dark'] #recent-posts .recent-post-info > .article-meta-wrap > span.article-meta.tags {
  background: linear-gradient(142deg, rgba(131, 24, 67, 0.32), rgba(30, 32, 40, 0.75));
  border-color: rgba(244, 114, 182, 0.28);
}

[data-theme='dark'] #recent-posts .article-meta-wrap .article-meta i.fa-inbox {
  color: #7dd3fc;
  background: rgba(15, 23, 42, 0.6);
}

[data-theme='dark'] #recent-posts .article-meta-wrap .article-meta.tags i.fa-tag {
  color: #f9a8d4;
  background: rgba(15, 23, 42, 0.6);
}

/* 文章页：标签同样胶囊化 */
#post .post-meta__tags {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  margin: 4px 8px 4px 0;
  font-size: 0.85rem !important;
  font-weight: 600;
  border-radius: 999px;
  border: 1.5px solid var(--acg-tag-border);
  background: linear-gradient(165deg, var(--acg-tag-bg), rgba(250, 232, 255, 0.85));
  color: #a21caf !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#post .post-meta__tags:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(192, 132, 252, 0.22);
}

/* ---------- 标签云整页（#page > .tag-cloud-list）：玻璃面板 + 说明文案 + 彩色标签胶囊 ---------- */
#page .tag-cloud-list {
  position: relative;
  z-index: 1;
  max-width: min(960px, 100%);
  margin: 0 auto 3rem;
  padding: 1.75rem 1.5rem 2.25rem;
  text-align: center;
  border-radius: 22px;
  background:
    linear-gradient(90deg, #38bdf8, #818cf8, #f472b6, #fb7185) 0 0 / 100% 4px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.88) 45%, rgba(255, 251, 252, 0.9) 100%);
  border: 1px solid rgba(148, 163, 184, 0.38);
  box-shadow:
    0 18px 50px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.75) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#page .tag-cloud-list::before {
  content: '字体越大表示该标签下文章越多 · 点击标签进入该主题下的全部文章';
  display: block;
  margin-bottom: 1.15rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #475569;
  line-height: 1.5;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(224, 242, 254, 0.65), rgba(254, 243, 199, 0.45), rgba(252, 231, 243, 0.55));
  border: 1px solid rgba(148, 163, 184, 0.28);
}

/* 标签云页（整页 .tag-cloud-list）：主题用内联 background-color + 白字，勿用 background !important 盖住 */
#page .tag-cloud-list a {
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  padding: 0.38em 1em !important;
  margin: 6px 5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(15, 23, 42, 0.4);
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    filter 0.22s ease !important;
}

#page .tag-cloud-list a:hover {
  transform: translateY(-3px) scale(1.05) !important;
  filter: brightness(1.06);
  box-shadow:
    0 14px 28px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset !important;
  border-color: rgba(255, 255, 255, 0.65) !important;
}

[data-theme='dark'] #page .tag-cloud-list {
  background:
    linear-gradient(90deg, #38bdf8, #818cf8, #f472b6, #fb7185) 0 0 / 100% 4px no-repeat,
    linear-gradient(145deg, rgba(30, 32, 40, 0.94), rgba(22, 24, 32, 0.9));
  border-color: rgba(71, 85, 105, 0.55);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme='dark'] #page .tag-cloud-list::before {
  color: #cbd5e1;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.35), rgba(88, 28, 135, 0.3), rgba(157, 23, 77, 0.28));
  border-color: rgba(100, 116, 139, 0.4);
}

/* 侧栏卡片：顶部「胶带」小装饰 + 标题左侧淡色条 */
#aside-content .card-widget {
  position: relative;
  overflow: visible;
}

#aside-content .card-widget::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 22px;
  width: 56px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(252, 165, 165, 0.85), rgba(253, 224, 71, 0.75), rgba(147, 197, 253, 0.85));
  opacity: 0.72;
  transform: rotate(-3deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  pointer-events: none;
  z-index: 2;
}

#aside-content .card-widget .item-headline {
  position: relative;
  padding-left: 12px;
}

#aside-content .card-widget .item-headline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1.1em;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--acg-pink), var(--acg-sky));
  opacity: 0.85;
}

/* 首页文章卡片右上角小星（不挡点击） */
#recent-posts .recent-post-item.ads-wrap::after {
  display: none;
}

#recent-posts .recent-post-item:has(> .post_cover)::after {
  display: none;
}

#recent-posts .recent-post-item::after {
  content: '✦';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 13px;
  color: rgba(244, 114, 182, 0.55);
  text-shadow: 0 0 12px rgba(252, 165, 165, 0.35);
  pointer-events: none;
  z-index: 4;
}

/* 深色模式：降低对比、偏霓虹柔光 */
[data-theme='dark'] {
  --acg-tag-bg: rgba(30, 27, 45, 0.92);
  --acg-tag-border: rgba(244, 114, 182, 0.35);
}

[data-theme='dark'] #recent-posts .article-meta__categories,
[data-theme='dark'] #recent-posts .article-meta__tags {
  background: linear-gradient(165deg, rgba(40, 35, 55, 0.95), rgba(55, 40, 70, 0.88));
  color: #fbcfe8 !important;
  border-color: rgba(244, 114, 182, 0.4);
}

[data-theme='dark'] #recent-posts .article-meta__categories {
  color: #bae6fd !important;
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(165deg, rgba(30, 40, 55, 0.95), rgba(35, 50, 65, 0.88));
}

[data-theme='dark'] #post .post-meta__tags {
  background: linear-gradient(165deg, rgba(40, 35, 55, 0.95), rgba(50, 40, 70, 0.88));
  color: #e9d5ff !important;
  border-color: rgba(192, 132, 252, 0.4);
}

[data-theme='dark'] #page .tag-cloud-list a {
  border-color: rgba(255, 255, 255, 0.32) !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* ========== 关于页：分层卡片 + 技能条（与首页 ACG 风一致） ========== */
#article-container .about-page {
  max-width: min(820px, 100%);
  margin: 0 auto 2.5rem;
}

#article-container .about-hero {
  position: relative;
  padding: 1.75rem 1.5rem 1.6rem;
  margin-bottom: 1.5rem;
  border-radius: 20px;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.88)),
    linear-gradient(135deg, rgba(224, 242, 254, 0.45), rgba(252, 231, 243, 0.35));
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

#article-container .about-hero::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #f472b6, #fb7185);
  opacity: 0.85;
}

#article-container .about-hero__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(115deg, #0f172a 0%, #4f46e5 38%, #db2777 72%, #ea580c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#article-container .about-hero__tagline {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.55;
}

#article-container .about-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 720px) {
  #article-container .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.1rem;
  }
}

#article-container .about-card {
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

#article-container .about-card h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.45em;
}

#article-container .about-card h2::before {
  content: '';
  width: 4px;
  height: 1.05em;
  border-radius: 999px;
  background: linear-gradient(180deg, #ec4899, #38bdf8);
  flex-shrink: 0;
}

#article-container .about-card p {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #334155;
}

#article-container .about-card p:last-child {
  margin-bottom: 0;
}

#article-container .about-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: #334155;
  font-size: 0.94rem;
  line-height: 1.65;
}

#article-container .about-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

#article-container .about-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32em 0.75em;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid rgba(244, 114, 182, 0.35);
  background: linear-gradient(165deg, rgba(253, 242, 248, 0.95), rgba(240, 249, 255, 0.9));
  color: #9d174d !important;
  box-shadow: 0 2px 8px rgba(244, 114, 182, 0.12);
}

#article-container .about-chip:nth-child(4n + 2) {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(165deg, rgba(240, 249, 255, 0.95), rgba(250, 245, 255, 0.9));
  color: #075985 !important;
}

#article-container .about-chip:nth-child(4n + 3) {
  border-color: rgba(129, 140, 248, 0.4);
  background: linear-gradient(165deg, rgba(238, 242, 255, 0.95), rgba(254, 243, 199, 0.75));
  color: #3730a3 !important;
}

#article-container .about-chip:nth-child(4n + 4) {
  border-color: rgba(52, 211, 153, 0.4);
  background: linear-gradient(165deg, rgba(236, 253, 245, 0.95), rgba(224, 242, 254, 0.85));
  color: #065f46 !important;
}

#article-container .about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

#article-container .about-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.5em 1em;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none !important;
  color: #fff !important;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#article-container .about-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.32);
}

#article-container .about-links a.about-links__secondary {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
}

#article-container .about-footnote {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #64748b;
  background: rgba(241, 245, 249, 0.75);
  border: 1px dashed rgba(148, 163, 184, 0.45);
}

[data-theme='dark'] #article-container .about-hero {
  background: linear-gradient(145deg, rgba(30, 32, 40, 0.95), rgba(22, 24, 32, 0.92));
  border-color: rgba(71, 85, 105, 0.55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

[data-theme='dark'] #article-container .about-hero__title {
  background: linear-gradient(115deg, #f1f5f9 0%, #a5b4fc 40%, #f9a8d4 75%, #fdba74 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme='dark'] #article-container .about-hero__tagline {
  color: #cbd5e1;
}

[data-theme='dark'] #article-container .about-card {
  background: rgba(30, 32, 40, 0.88);
  border-color: rgba(71, 85, 105, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

[data-theme='dark'] #article-container .about-card h2 {
  color: #f1f5f9;
}

[data-theme='dark'] #article-container .about-card p,
[data-theme='dark'] #article-container .about-card ul {
  color: #cbd5e1;
}

[data-theme='dark'] #article-container .about-footnote {
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(71, 85, 105, 0.55);
}

[data-theme='dark'] #aside-content .card-widget::before {
  opacity: 0.45;
  filter: saturate(1.2);
}

[data-theme='dark'] #recent-posts .recent-post-item::after {
  color: rgba(251, 207, 232, 0.45);
}

/* 鼠标美化：圆点 + 跟随圆环（仅桌面端，轻量不影响性能） */
.beauty-cursor-dot,
.beauty-cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 1;
  --cursor-x: -100px;
  --cursor-y: -100px;
  --cursor-scale: 1;
  transform: translate3d(var(--cursor-x), var(--cursor-y), 0) scale(var(--cursor-scale));
  transition: opacity 0.2s ease;
}

/* 主页浮层：天气 + 数字时钟 */
.home-weather-clock {
  position: relative;
  top: auto;
  right: auto;
  z-index: 99999;
  width: 100%;
  border-radius: 18px;
  padding: 14px 14px 12px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(244, 251, 255, 0.72)),
    rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 16px 38px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.75) inset;
  color: #10243b;
  user-select: none;
  margin-bottom: 14px;
  overflow: hidden;
}

.home-weather-clock__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.home-weather-clock__badge {
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(53, 134, 225, 0.12);
  color: rgba(26, 92, 170, 0.95);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.home-weather-clock__date {
  font-size: 12px;
  font-weight: 600;
  color: rgba(16, 36, 59, 0.72);
}

.home-weather-clock__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-weather-clock__weather {
  display: flex;
  min-width: 0;
  flex: 1;
}

.home-weather-clock__icon-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.home-weather-clock__emoji {
  font-size: 24px;
  line-height: 1;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(52, 136, 229, 0.11);
}

.home-weather-clock__label {
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.home-weather-clock__wind-arrow {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transform-origin: 50% 50%;
}

.home-weather-clock__stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-left: 8px;
}

.home-weather-clock__temp {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.8px;
}

.home-weather-clock__temp-unit {
  font-size: 15px;
  font-weight: 700;
  opacity: 0.75;
}

.home-weather-clock__humid {
  font-size: 13px;
  color: rgba(16, 36, 59, 0.72);
}

.home-weather-clock__humid-value {
  font-weight: 700;
}

.home-weather-clock__time {
  margin-top: 8px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: rgba(8, 24, 43, 0.94);
  text-shadow: 0 2px 12px rgba(62, 129, 203, 0.12);
}

.home-weather-clock__meta {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.home-weather-clock__chip {
  border-radius: 10px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-weather-clock__chip-key {
  font-size: 11px;
  color: rgba(16, 36, 59, 0.64);
}

.home-weather-clock__chip-value {
  font-size: 12px;
  color: rgba(16, 36, 59, 0.9);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 深色模式 */
[data-theme='dark'] .home-weather-clock {
  background:
    linear-gradient(160deg, rgba(20, 27, 40, 0.9), rgba(18, 36, 49, 0.78)),
    rgba(20, 20, 20, 0.65);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

[data-theme='dark'] .home-weather-clock__badge {
  background: rgba(78, 162, 245, 0.2);
  color: rgba(173, 220, 255, 0.95);
}

[data-theme='dark'] .home-weather-clock__date {
  color: rgba(224, 240, 255, 0.78);
}

[data-theme='dark'] .home-weather-clock__emoji {
  background: rgba(84, 167, 248, 0.24);
}

[data-theme='dark'] .home-weather-clock__time {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: none;
}

[data-theme='dark'] .home-weather-clock__humid,
[data-theme='dark'] .home-weather-clock__chip-key {
  color: rgba(218, 236, 255, 0.72);
}

[data-theme='dark'] .home-weather-clock__chip-value {
  color: rgba(236, 245, 255, 0.92);
}

[data-theme='dark'] .home-weather-clock__chip {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

/* 移动端：直接不显示（更省事，也避免占屏） */
@media (max-width: 768px) {
  .home-weather-clock {
    display: none;
  }
}


/* Live2D 看板娘：贴右侧显示，同时不拦截右侧功能按钮点击 */
#waifu,
#waifu-toggle {
  z-index: 99980 !important;
}

/* 右侧功能按钮层级始终高于看板娘 */
#rightside {
  z-index: 99999 !important;
}

/* 官方 waifu.css 默认 left:0（偏左下），改为贴右下并整体缩小 */
#waifu {
  left: auto !important;
  right: 12px !important;
  bottom: 96px !important;
  transform-origin: bottom right !important;
  transform: translateY(10px) scale(0.72) !important;
  transition:
    transform 0.28s ease-in-out,
    bottom 0.35s ease-in-out !important;
}

#waifu.waifu-active {
  bottom: 12px !important;
}

#waifu:hover {
  transform: translateY(4px) scale(0.72) !important;
}

/* 收起时的「召唤」按钮也放右下角，别挡正文左侧 */
#waifu-toggle {
  left: auto !important;
  right: 12px !important;
  bottom: 96px !important;
  pointer-events: auto !important;
  margin-left: 0 !important;
  width: 44px !important;
  padding: 4px 6px !important;
}

#waifu-toggle.waifu-toggle-active {
  margin-left: 0 !important;
}

#waifu-toggle svg {
  height: 20px !important;
}

/* 主体靠右后，工具条改到角色左侧，避免挤出视口 */
#waifu-tool {
  right: auto !important;
  left: -6px !important;
  top: 56px !important;
  pointer-events: auto !important;
}

#waifu-tool svg {
  height: 20px !important;
}

/* 保证工具栏每个按钮都可点 */
#waifu-tool span {
  pointer-events: auto !important;
}

/* 对话框略收窄，避免占满半屏 */
#waifu-tips {
  width: min(220px, 72vw) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  margin: -20px 0 0 !important;
}

/* 开启美化鼠标时：隐藏系统光标（不然不明显） */
.beauty-cursor-on,
.beauty-cursor-on * {
  cursor: none !important;
}

.beauty-cursor-dot {
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  margin-top: -2.5px;
  border-radius: 999px;
  background: rgba(86, 176, 146, 0.98);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.42),
    0 0 9px rgba(86, 176, 146, 0.3);
  /* 勿对 transform 做过渡：会与 JS 每帧更新叠加，显得「拖泥带水」 */
  transition: box-shadow 0.14s ease;
}

.beauty-cursor-ring {
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border-radius: 999px;
  border: 1px solid rgba(98, 191, 161, 0.9);
  background: rgba(176, 235, 214, 0.1);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 0 10px rgba(83, 173, 143, 0.2);
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease;
}

.beauty-cursor-ring.is-hover {
  --cursor-scale: 1.06;
  border-color: rgba(86, 186, 154, 0.98);
  background: rgba(158, 231, 203, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.32) inset,
    0 0 14px rgba(86, 176, 146, 0.24);
}

.beauty-cursor-ring.is-down {
  --cursor-scale: 0.92;
}

.beauty-cursor-dot.is-down {
  --cursor-scale: 0.8;
  box-shadow:
    0 0 6px rgba(86, 176, 146, 0.24),
    0 0 10px rgba(86, 176, 146, 0.14);
}

/* 深色模式下更明显 */
[data-theme="dark"] .beauty-cursor-ring {
  border-color: rgba(130, 221, 187, 0.92);
  background: rgba(85, 168, 138, 0.2);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 0 12px rgba(102, 194, 160, 0.28);
}

/* --------------------------------------------------------------------------
   Pace.js 顶部加载条（Butterfly：preloader.enable + source: 1）
   主题会注入 pace.min.js + 默认 minimal 皮肤，此处覆盖为渐变胶囊条
   -------------------------------------------------------------------------- */
.pace {
  pointer-events: none;
  z-index: 100002 !important;
}

.pace-inactive {
  display: none;
}

/* 勿用 !important 覆盖 right/width/transform，否则 Pace 无法推进进度 */
.pace .pace-progress {
  height: 3px !important;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #f472b6, #fb7185) !important;
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.35) inset;
  border-radius: 0 0 4px 0;
}

/* ========== 文章正文 · Markdown 表格（Butterfly 会包一层 .table-wrap） ========== */
#article-container .post-content .table-wrap,
#post .post-content .table-wrap {
  margin: 1.35em 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 6px 18px rgba(15, 23, 42, 0.06);
}

#article-container .post-content .table-wrap table,
#post .post-content .table-wrap table {
  width: 100%;
  border-collapse: collapse;
  border: none !important;
  font-size: 0.94rem;
  line-height: 1.55;
}

#article-container .post-content .table-wrap thead th,
#post .post-content .table-wrap thead th {
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%) !important;
  color: #0f172a;
  font-weight: 700;
  padding: 12px 14px;
  text-align: center;
  border: none !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.45) !important;
}

#article-container .post-content .table-wrap tbody td,
#post .post-content .table-wrap tbody td {
  padding: 11px 14px;
  text-align: center;
  vertical-align: middle;
  border: none !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95) !important;
  color: #334155;
}

#article-container .post-content .table-wrap tbody tr:nth-child(even) td,
#post .post-content .table-wrap tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.95) !important;
}

#article-container .post-content .table-wrap tbody tr:last-child td,
#post .post-content .table-wrap tbody tr:last-child td {
  border-bottom: none !important;
}

#article-container .post-content .table-wrap tbody tr:hover td,
#post .post-content .table-wrap tbody tr:hover td {
  background: rgba(224, 242, 254, 0.55) !important;
}

[data-theme='dark'] #article-container .post-content .table-wrap,
[data-theme='dark'] #post .post-content .table-wrap {
  border-color: rgba(71, 85, 105, 0.65);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

[data-theme='dark'] #article-container .post-content .table-wrap thead th,
[data-theme='dark'] #post .post-content .table-wrap thead th {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
  color: #f1f5f9 !important;
  border-bottom-color: rgba(71, 85, 105, 0.85) !important;
}

[data-theme='dark'] #article-container .post-content .table-wrap tbody td,
[data-theme='dark'] #post .post-content .table-wrap tbody td {
  color: #e2e8f0 !important;
  border-bottom-color: rgba(51, 65, 85, 0.9) !important;
}

[data-theme='dark'] #article-container .post-content .table-wrap tbody tr:nth-child(even) td,
[data-theme='dark'] #post .post-content .table-wrap tbody tr:nth-child(even) td {
  background: rgba(30, 41, 59, 0.55) !important;
}

[data-theme='dark'] #article-container .post-content .table-wrap tbody tr:hover td,
[data-theme='dark'] #post .post-content .table-wrap tbody tr:hover td {
  background: rgba(30, 58, 138, 0.4) !important;
}

/* ========== 文章正文 · 图片与嵌入媒体（不动 Markdown，仅样式） ========== */
#article-container .post-content img,
#post .post-content img {
  display: block;
  max-width: min(100%, 960px) !important;
  width: auto;
  height: auto;
  margin: 1.1em auto;
  border-radius: 10px;
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.08),
    0 8px 24px rgba(15, 23, 42, 0.06);
  /* Markdown 里常见 style="zoom:50%"，整体偏小；用 !important 抬到更接近原图（仍受 max-width 限制） */
  zoom: 1 !important;
}

#article-container .post-content p img,
#post .post-content p img {
  margin: 0.85em auto;
}

/* 仅「图片用的 figure」，勿选 .highlight：代码块也是 <figure class="highlight">，居中会导致整段代码缩进像往中间靠 */
#article-container .post-content figure:not(.highlight),
#post .post-content figure:not(.highlight) {
  margin: 1.25em auto;
  max-width: min(100%, 960px);
  text-align: center;
}

#article-container .post-content figure:not(.highlight) img,
#post .post-content figure:not(.highlight) img {
  margin: 0 auto;
}

#article-container .post-content figure:not(.highlight) figcaption,
#post .post-content figure:not(.highlight) figcaption {
  margin-top: 0.5em;
  font-size: 0.88em;
  color: #64748b;
  line-height: 1.45;
}

#article-container .post-content figure.highlight,
#post .post-content figure.highlight {
  text-align: left;
  max-width: 100%;
  /* 在主题配色之上加一点层次，避免「一片平板」感 */
  border-radius: 12px;
  border: 1px solid rgba(100, 116, 139, 0.38);
  box-shadow:
    0 8px 26px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

[data-theme='dark'] #article-container .post-content figure.highlight,
[data-theme='dark'] #post .post-content figure.highlight {
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#article-container .post-content iframe,
#post .post-content iframe {
  display: block;
  width: 100%;
  max-width: min(100%, 880px);
  margin: 1.1em auto;
  border: none;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
  background: #0f172a;
}

#article-container .post-content video,
#post .post-content video {
  display: block;
  max-width: min(100%, 960px);
  margin: 1.1em auto;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
}

[data-theme='dark'] #article-container .post-content img,
[data-theme='dark'] #post .post-content img {
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.35),
    0 8px 28px rgba(0, 0, 0, 0.25);
}

[data-theme='dark'] #article-container .post-content figure:not(.highlight) figcaption,
[data-theme='dark'] #post .post-content figure:not(.highlight) figcaption {
  color: #94a3b8;
}

[data-theme='dark'] #article-container .post-content iframe,
[data-theme='dark'] #post .post-content iframe {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

/* 手机端适配 */
@media (max-width: 768px) {
  #article-container .post-content .table-wrap table,
  #post .post-content .table-wrap table {
    font-size: 0.86rem;
  }

  #article-container .post-content .table-wrap thead th,
  #article-container .post-content .table-wrap tbody td,
  #post .post-content .table-wrap thead th,
  #post .post-content .table-wrap tbody td {
    padding: 8px 10px !important;
  }

  #article-container .post-content img,
  #post .post-content img {
    border-radius: 8px;
    margin: 0.75em auto;
  }

  #article-container .post-content iframe,
  #post .post-content iframe {
    min-height: 200px;
  }

  #site-title {
    font-size: 3rem;
  }
  #site-subtitle {
    font-size: 1.8rem;
  }

  #page-header.full_page #site-subtitle {
    font-size: 2.4rem;
  }

  #home-hero-typewriter {
    font-size: 1.1rem;
    width: 92vw;
    padding: 0 10px;
  }
}

/* --------------------------------------------------------------------------
   侧栏「目录」#card-toc：层级编号 1. / 3.1.（Hexo .toc-number）+ 毛玻璃 + 青绿高亮
   说明：主题对 ol/li 使用 list-style:none，编号只靠 <span class="toc-number">，须保证其可见。
   -------------------------------------------------------------------------- */
#aside-content #card-toc.card-widget {
  /* 勿用 overflow:hidden：主题 .toc-content 有 margin:0 -24px，会把左侧 .toc-number 裁没 */
  overflow: visible;
  border-radius: 16px;
  padding: 16px 18px 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-right: 3px solid rgba(20, 184, 166, 0.42);
  box-shadow:
    0 14px 36px rgba(15, 23, 42, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* 目录卡片不用与其它侧栏相同的「胶带」装饰，避免抢视觉 */
#aside-content #card-toc.card-widget::before {
  display: none;
}

#aside-content #card-toc .item-headline {
  padding-left: 10px;
  margin-bottom: 8px;
}

#aside-content #card-toc .item-headline::before {
  background: linear-gradient(180deg, #14b8a6, #2dd4bf);
  opacity: 0.95;
}

/* 抵消主题负边距，避免目录区向左「伸出」后被父级裁切，导致 1. / 1.1. 看不见 */
#aside-content #card-toc .toc-content {
  position: relative;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  box-sizing: border-box;
  padding-right: 14px;
}

/* 目录阅读进度条（右侧） */
#aside-content #card-toc .toc-content::before {
  content: '';
  position: absolute;
  top: 4px;
  right: 2px;
  width: 6px;
  height: calc(100% - 8px);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
}

#aside-content #card-toc .toc-content::after {
  content: '';
  position: absolute;
  right: 2px;
  bottom: 4px;
  width: 6px;
  height: var(--toc-read-progress, 0%);
  border-radius: 999px;
  background: linear-gradient(180deg, #0ea5e9 0%, #2563eb 100%);
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.5);
  transition: height 0.2s ease;
}

/* 层级编号：勿设过大 min-width，否则「1.」「1.1.」后会出现一大块空白 */
#aside-content #card-toc .toc-number {
  display: inline !important;
  font-size: 0.92em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  margin-right: 0.2em;
  color: rgba(30, 41, 59, 0.72);
  vertical-align: baseline;
}

/* 强制显示目录子层级，恢复 1.1 / 1.1.1 的可见性 */
#aside-content #card-toc .toc-child {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#aside-content #card-toc .toc-link {
  display: flex;
  align-items: flex-start;
  gap: 0.28em;
}

#aside-content #card-toc .toc-text {
  min-width: 0;
}

#aside-content #card-toc .toc-number {
  flex: 0 0 auto;
  min-width: auto !important;
  white-space: nowrap;
}

#aside-content #card-toc .toc-link {
  border-radius: 8px;
  padding: 5px 10px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

#aside-content #card-toc .toc-link:hover {
  color: #0f766e !important;
}

#aside-content #card-toc .toc-link:hover .toc-number {
  color: #0d9488;
}

/* 当前阅读章节：青绿实心条 + 白字（与 theme_color.toc_color 一致） */
#aside-content #card-toc .toc-link.toc-current {
  background: linear-gradient(135deg, #14b8a6, #0d9488) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(20, 184, 166, 0.32);
}

#aside-content #card-toc .toc-link.active,
#aside-content #card-toc .toc-link.is-active-link {
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
}

#aside-content #card-toc .toc-link.active .toc-number,
#aside-content #card-toc .toc-link.active .toc-text,
#aside-content #card-toc .toc-link.is-active-link .toc-number,
#aside-content #card-toc .toc-link.is-active-link .toc-text {
  color: inherit;
}

#aside-content #card-toc .toc-link.toc-current .toc-number,
#aside-content #card-toc .toc-link.toc-current .toc-text {
  color: #fff !important;
}

/* 当前项右侧小圆点（类似参考图） */
#aside-content #card-toc .toc-link.toc-current {
  position: relative;
  padding-right: 1.35rem;
}

#aside-content #card-toc .toc-link.toc-current::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

/* 右上角大字号：阅读进度 %（主题由 JS 写入 .toc-percentage） */
#aside-content #card-toc .toc-percentage {
  float: right;
  margin-top: -6px !important;
  font-size: clamp(1.75rem, 4vw, 2.25rem) !important;
  font-weight: 800 !important;
  font-style: normal !important;
  line-height: 1 !important;
  color: rgba(148, 163, 184, 0.38) !important;
  letter-spacing: -0.04em;
}

[data-theme='dark'] #aside-content #card-toc.card-widget {
  background: linear-gradient(145deg, rgba(30, 32, 40, 0.92), rgba(22, 24, 32, 0.88));
  border-color: rgba(255, 255, 255, 0.1);
  border-right-color: rgba(45, 212, 191, 0.45);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme='dark'] #aside-content #card-toc .toc-number {
  color: rgba(226, 232, 240, 0.55);
}

[data-theme='dark'] #aside-content #card-toc .toc-link:hover {
  color: #5eead4 !important;
}

[data-theme='dark'] #aside-content #card-toc .toc-link:hover .toc-number {
  color: #5eead4;
}

[data-theme='dark'] #aside-content #card-toc .toc-percentage {
  color: rgba(148, 163, 184, 0.28) !important;
}

/* 版权区域隐藏文章永久链接（Link），避免展示不安全地址 */
.post-copyright .post-copyright__type {
  display: none !important;
}

/* ==========================================================================
   v1 Motion Upgrade: Hero + Cards + Scroll Story
   ========================================================================== */

/* Hero title font only (no glow, no gradient) */
#page-header.full_page #site-title {
  font-family: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #ffffff;
  letter-spacing: 0.02em;
}

#page-header.full_page #site-subtitle,
#home-hero-typewriter {
  font-family: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* Cards: 3d tilt + moving glow + layered entrance */
#recent-posts .recent-post-item {
  transform-style: preserve-3d;
  transform: perspective(880px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition:
    transform 0.26s ease,
    box-shadow 0.26s ease;
}

#recent-posts .recent-post-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.28), transparent 38%);
  transition: opacity 0.24s ease;
  z-index: 2;
}

#recent-posts .recent-post-item:hover::before {
  opacity: 1;
}

#recent-posts .recent-post-item:hover {
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16) !important;
}

#recent-posts .recent-post-item.is-pressing {
  transform: perspective(880px) rotateX(calc(var(--tilt-x, 0deg) * 0.55))
    rotateY(calc(var(--tilt-y, 0deg) * 0.55)) scale(0.985);
}

#recent-posts .recent-post-item .article-title,
#recent-posts .recent-post-item .article-meta-wrap,
#recent-posts .recent-post-item .content {
  transition: transform 0.36s ease, opacity 0.36s ease;
}

#recent-posts .recent-post-item .article-title {
  transition-delay: 0.03s;
}

#recent-posts .recent-post-item .article-meta-wrap {
  transition-delay: 0.07s;
}

#recent-posts .recent-post-item .content {
  transition-delay: 0.11s;
}

#recent-posts .recent-post-item:hover .article-title {
  transform: translateY(-2px);
}

#recent-posts .recent-post-item:hover .article-meta-wrap {
  transform: translateY(-1px);
}

/* Scroll story reduced: no paragraph/title reveal animation */

#progress {
  transition: background-color 0.35s ease;
}

/* ------------------------------
   Revert: tags/categories main page
   你的要求是：点进 /tags/、/categories/ 后的“模块”不要太花
   这里撤掉 #page .tag-cloud-list 的玻璃面板/说明条，只保留胶囊可读性。
   ------------------------------ */
#page .tag-cloud-list {
  position: static !important;
  z-index: auto !important;
  max-width: 100% !important;
  margin: 0 auto 2.5rem !important;
  padding: 1.2rem 1.2rem 2.0rem !important;
  text-align: center;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

#page .tag-cloud-list::before {
  content: none !important;
  display: none !important;
}

#page .tag-cloud-list a {
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  padding: 0.35em 0.85em !important;
  margin: 6px 5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
  /* 让 inline background-color 保留的同时，叠一层“亮面”，更像贴纸胶囊 */
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.05)) !important;
  background-blend-mode: overlay !important;
  filter: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

#page .tag-cloud-list a:hover {
  transform: translateY(-3px) scale(1.04) !important;
  box-shadow:
    0 14px 34px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.36) !important;
  border-color: rgba(255, 255, 255, 0.75) !important;
}

[data-theme='dark'] #page .tag-cloud-list a {
  border-color: rgba(255, 255, 255, 0.32) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

/* ------------------------------
   Categories main page (/categories/)
   更克制的“树形列表”：轻卡片 + 层级线 + 清爽 hover
   ------------------------------ */
:root {
  --catpage-bg: rgba(255, 255, 255, 0.82);
  --catpage-border: rgba(148, 163, 184, 0.22);
  --catpage-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --catpage-text: #0f172a;
  --catpage-muted: rgba(51, 65, 85, 0.72);
  --catpage-line: rgba(148, 163, 184, 0.35);
  --catpage-hover: rgba(56, 189, 248, 0.10);
}

[data-theme='dark'] {
  --catpage-bg: rgba(15, 23, 42, 0.52);
  --catpage-border: rgba(148, 163, 184, 0.16);
  --catpage-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  --catpage-text: rgba(241, 245, 249, 0.92);
  --catpage-muted: rgba(148, 163, 184, 0.78);
  --catpage-line: rgba(148, 163, 184, 0.22);
  --catpage-hover: rgba(94, 234, 212, 0.10);
}

/* /categories/：参考图样式（顶部分组胶囊 + 中间饼图），由 JS 渲染 */
.page.type-categories #page .acg-catdash {
  position: relative;
  margin: 0 auto 2.5rem;
  max-width: min(1040px, 96vw);
  padding: 26px 26px 28px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 26px 80px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  overflow: hidden;
}

.page.type-categories #page .acg-catdash::before {
  content: '';
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(circle at 18% 10%, rgba(56, 189, 248, 0.22), transparent 42%),
    radial-gradient(circle at 86% 18%, rgba(236, 72, 153, 0.18), transparent 44%),
    radial-gradient(circle at 58% 92%, rgba(129, 140, 248, 0.16), transparent 46%);
  pointer-events: none;
  z-index: 0;
}

.page.type-categories #page .acg-catdash > * {
  position: relative;
  z-index: 1;
}

.page.type-categories #page .acg-catdash__header {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  text-align: center;
}

.page.type-categories #page .acg-catdash__title {
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(15, 23, 42, 0.9);
}

.page.type-categories #page .acg-catdash__subtitle {
  font-size: 0.92rem;
  color: rgba(51, 65, 85, 0.72);
}

.page.type-categories #page .acg-catdash__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  padding: 8px 8px 2px;
  margin: 6px auto 16px;
}

.page.type-categories #page .acg-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none !important;
  color: rgba(15, 23, 42, 0.82) !important;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 10px 26px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(148, 163, 184, 0.10) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
  max-width: min(240px, 44vw);
}

.page.type-categories #page .acg-chip:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--chip-color, #38bdf8) 26%, rgba(255,255,255,0.78));
  box-shadow:
    0 18px 44px rgba(15, 23, 42, 0.14),
    0 14px 40px color-mix(in srgb, var(--chip-color, #38bdf8) 22%, transparent),
    0 0 0 1px rgba(148, 163, 184, 0.10) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.78);
}

.page.type-categories #page .acg-chip__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.78),
    0 10px 24px color-mix(in srgb, var(--chip-color, #38bdf8) 22%, transparent);
  flex: 0 0 auto;
}

.page.type-categories #page .acg-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.page.type-categories #page .acg-chip__count {
  margin-left: 2px;
  font-weight: 900;
  font-size: 0.82rem;
  padding: 0 0.55em;
  height: 1.55em;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: rgba(51, 65, 85, 0.76);
  background: rgba(226, 232, 240, 0.55);
  border: 1px solid color-mix(in srgb, var(--chip-color, #38bdf8) 20%, rgba(148, 163, 184, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.page.type-categories #page .acg-catdash__body {
  display: grid;
  place-items: center;
}

.page.type-categories #page .acg-catdash__chart {
  width: min(820px, 100%);
  height: min(430px, 52vh);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.44) 56%, rgba(255, 255, 255, 0.40)),
    rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 18px 44px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  padding: 14px;
}

.page.type-categories #page .acg-catdash__canvas {
  width: 100% !important;
  height: 100% !important;
}

/* 原始分类列表：保留在 DOM 中供 SEO/无 JS 兜底，但视觉隐藏 */
.page.type-categories #page .acg-catdash__sr-list {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[data-theme='dark'] .page.type-categories #page .acg-catdash {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.48));
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow:
    0 28px 86px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme='dark'] .page.type-categories #page .acg-catdash__title {
  color: rgba(241, 245, 249, 0.92);
}

[data-theme='dark'] .page.type-categories #page .acg-catdash__subtitle {
  color: rgba(148, 163, 184, 0.82);
}

[data-theme='dark'] .page.type-categories #page .acg-chip {
  color: rgba(241, 245, 249, 0.9) !important;
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

[data-theme='dark'] .page.type-categories #page .acg-chip__count {
  color: rgba(226, 232, 240, 0.82);
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.16);
}

[data-theme='dark'] .page.type-categories #page .acg-catdash__chart {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
}

/* ------------------------------
   Override: Homepage 卡片里的「分类/标签区域」恢复更自然
   解决：外层框框过明显、布局留白怪异
   只保留 .article-meta__categories / .article-meta__tags 胶囊样式
   ------------------------------ */
#recent-posts .recent-post-info > .article-meta-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.42rem !important;
  margin: 8px 0 0 !important;
  padding: 0 8px !important;
}

#recent-posts .recent-post-info > .article-meta-wrap > .post-meta-date {
  padding: 4px 14px !important;
  background: rgba(248, 250, 252, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: rgba(30, 41, 59, 0.9) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
}

#recent-posts .recent-post-info > .article-meta-wrap > span.article-meta {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.25rem 0.55rem !important;
}

#recent-posts .recent-post-info > .article-meta-wrap .article-meta i.fa-inbox,
#recent-posts .recent-post-info > .article-meta-wrap .article-meta.tags i.fa-tag {
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  margin-right: 4px !important;
}

#recent-posts .recent-post-info > .article-meta-wrap .article-meta-link.fa-angle-right {
  color: inherit !important;
  font-size: inherit !important;
}

/* ------------------------------
   Compact layout: home card meta chips
   目标：不“条带化”、不多余外框、Created/分类/标签紧凑且自然居中
   ------------------------------ */
#recent-posts .recent-post-info > .article-meta-wrap {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-end !important;
  gap: 6px !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding-right: 20px !important;
}

#recent-posts .recent-post-info > .article-meta-wrap > .post-meta-date {
  order: 1;
  padding: 5px 16px !important;
  border-radius: 999px !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  background: rgba(248, 250, 252, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  box-shadow: none !important;
  align-self: flex-end !important;
}

#recent-posts .recent-post-info > .article-meta-wrap > span.article-meta {
  order: 2;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}

/* 去掉胶囊之间的竖线分隔符，视觉更干净 */
#recent-posts .recent-post-info > .article-meta-wrap .article-meta-separator {
  display: none !important;
}

#recent-posts .article-meta__categories,
#recent-posts .article-meta__tags {
  padding: 5px 16px !important;
  margin: 0 !important;
  font-size: 0.9rem !important;
  box-shadow: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#recent-posts .article-meta__categories:hover,
#recent-posts .article-meta__tags:hover {
  transform: translateY(-1px) !important;
  box-shadow: none !important;
}

/* ==========================
   强制恢复首页卡片 meta 为主题原生布局
   解决你反馈的：太挤/两边空白不均/排版怪
   仅影响首页 #recent-posts 内的 Created/分类/标签
   ========================== */
#recent-posts .recent-post-info > .article-meta-wrap {
  display: block !important;
  flex-direction: initial !important;
  align-items: initial !important;
  justify-content: initial !important;
  gap: initial !important;
  padding: 0 !important;
  margin: 6px 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  font-size: 0.9em !important;
  color: var(--card-meta) !important;
}

#recent-posts .recent-post-info > .article-meta-wrap > .post-meta-date {
  order: initial !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}

#recent-posts .recent-post-info > .article-meta-wrap > span.article-meta {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
  align-items: center !important;
}

#recent-posts .recent-post-info > .article-meta-wrap .article-meta-separator {
  display: inline !important;
  margin: 0 6px !important;
}

#recent-posts .recent-post-info > .article-meta-wrap .article-meta__categories,
#recent-posts .recent-post-info > .article-meta-wrap .article-meta__tags {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}

/* ==========================
   Restore: home card meta pill visuals (Created / categories / tags)
   只恢复外观质感，不再强行改布局，避免你说的“怪/空白多/挤”
   ========================== */
:root {
  --acg-meta-pill-bg: rgba(248, 250, 252, 0.92);
  --acg-meta-pill-border: rgba(148, 163, 184, 0.35);
}

#recent-posts .recent-post-info > .article-meta-wrap > .post-meta-date {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 14px !important;
  border-radius: 999px !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  background: rgba(248, 250, 252, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  box-shadow: none !important;
}

#recent-posts .recent-post-info > .article-meta-wrap .article-meta__categories,
#recent-posts .recent-post-info > .article-meta-wrap .article-meta__tags {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 14px !important;
  margin: 4px 6px 0 0 !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  border: 1.5px solid rgba(244, 114, 182, 0.45) !important;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(253, 242, 248, 0.88)) !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(244, 114, 182, 0.10) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

#recent-posts .recent-post-info > .article-meta-wrap .article-meta__categories {
  border-color: rgba(125, 211, 252, 0.55) !important;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(240, 249, 255, 0.9)) !important;
  color: #0369a1 !important;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.10) !important;
}

#recent-posts .recent-post-info > .article-meta-wrap .article-meta__tags {
  border-color: rgba(244, 114, 182, 0.32) !important;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(255, 232, 243, 0.9)) !important;
  color: #be185d !important;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.10) !important;
}

#recent-posts .recent-post-info > .article-meta-wrap .article-meta i.fa-inbox {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1.45em !important;
  height: 1.45em !important;
  margin-right: 2px !important;
  font-size: 0.72em !important;
  color: #0369a1 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 4px rgba(14, 165, 233, 0.18) !important;
}

#recent-posts .recent-post-info > .article-meta-wrap .article-meta i.fa-tag {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1.45em !important;
  height: 1.45em !important;
  margin-right: 2px !important;
  font-size: 0.72em !important;
  color: #be185d !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 4px rgba(236, 72, 153, 0.20) !important;
}

/* ==========================
   card-categories 美化（分类列表胶囊贴纸风）
   覆盖侧边栏/弹窗中同款“分类树”列表
   ========================== */
.card-widget.card-categories {
  --cat-pill-bg: rgba(255, 255, 255, 0.88);
  --cat-pill-border: rgba(148, 163, 184, 0.32);
  --cat-pill-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  --cat-pill-text: #334155;
  --cat-pill-bg-child: rgba(248, 250, 252, 0.78);
  --cat-pill-border-child: rgba(148, 163, 184, 0.22);
}

.card-widget.card-categories ul.card-category-list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* 所有分类/子分类项 */
.card-widget.card-categories ul.card-category-list li,
.card-widget.card-categories ul.card-category-list li * {
  list-style: none !important;
}

.card-widget.card-categories ul.card-category-list a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-sizing: border-box;

  padding: 6px 12px !important;
  margin: 3px 0 !important;

  border-radius: 999px !important;
  border: 1px solid var(--cat-pill-border) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), var(--cat-pill-bg)) !important;
  box-shadow: var(--cat-pill-shadow) !important;

  color: var(--cat-pill-text) !important;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease !important;
}

/* 覆盖主题 hover：不要再“变胖/变长”导致视觉不统一 */
.card-widget.card-categories ul.card-category-list a:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(244, 114, 182, 0.45) !important;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.24),
    rgba(255, 255, 255, 0.95) 38%,
    rgba(236, 72, 153, 0.18)
  ) !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10) !important;
}

/* 主题默认对箭头 i 使用 float:right；在胶囊 flex 布局下会显得不齐 */
.card-widget.card-categories ul.card-category-list a > i {
  float: none !important;
  margin-right: 0 !important;
  margin-left: auto !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(244, 114, 182, 0.7) !important;
}

/* 分类名/数量微调 */
.card-widget.card-categories .card-category-list-name,
.card-widget.card-categories .card-category-list-count {
  color: inherit !important;
}

.card-widget.card-categories .card-category-list-count {
  margin-left: auto !important;
  font-weight: 700 !important;
  color: rgba(51, 65, 85, 0.72) !important;
}

/* 子分类层级：缩进 + 虚线，避免原生圆点造成“简陋感” */
.card-widget.card-categories ul.card-category-list ul {
  margin: 0 !important;
  padding: 2px 0 0 14px !important;
  border-left: 1px dashed rgba(148, 163, 184, 0.35);
  list-style: none !important;
}

.card-widget.card-categories ul.card-category-list ul a {
  border-color: var(--cat-pill-border-child) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), var(--cat-pill-bg-child)) !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04) !important;
}

/* 更宽匹配：只要是 card-category-list，就统一“弹窗/抽屉/侧边栏”的观感 */
ul.card-category-list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

ul.card-category-list li,
ul.card-category-list li * {
  list-style: none !important;
}

ul.card-category-list a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-sizing: border-box;
  padding: 6px 12px !important;
  margin: 3px 0 !important;
  border-radius: 999px !important;
  border: 1px solid var(--cat-pill-border, rgba(148, 163, 184, 0.32)) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), var(--cat-pill-bg, rgba(255, 255, 255, 0.88))) !important;
  box-shadow: var(--cat-pill-shadow, 0 10px 26px rgba(15, 23, 42, 0.06)) !important;
  color: var(--cat-pill-text, #334155) !important;
  text-decoration: none !important;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease !important;
}

ul.card-category-list a:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(244, 114, 182, 0.45) !important;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.24),
    rgba(255, 255, 255, 0.95) 38%,
    rgba(236, 72, 153, 0.18)
  ) !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10) !important;
}

ul.card-category-list a > i {
  float: none !important;
  margin-right: 0 !important;
  margin-left: auto !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(244, 114, 182, 0.7) !important;
}

ul.card-category-list ul {
  margin: 0 !important;
  padding: 2px 0 0 14px !important;
  border-left: 1px dashed rgba(148, 163, 184, 0.35);
  list-style: none !important;
}

ul.card-category-list ul a {
  border-color: var(--cat-pill-border-child, rgba(148, 163, 184, 0.22)) !important;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95),
    var(--cat-pill-bg-child, rgba(248, 250, 252, 0.78))
  ) !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04) !important;
}

/* 深色模式：降低亮度、保持柔光 */
[data-theme='dark'] .card-widget.card-categories {
  --cat-pill-bg: rgba(15, 23, 42, 0.65);
  --cat-pill-border: rgba(148, 163, 184, 0.28);
  --cat-pill-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  --cat-pill-text: #e5e7eb;
  --cat-pill-bg-child: rgba(30, 41, 59, 0.55);
  --cat-pill-border-child: rgba(148, 163, 184, 0.20);
}

[data-theme='dark'] .card-widget.card-categories ul.card-category-list a {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.62)) !important;
}

[data-theme='dark'] .card-widget.card-categories ul.card-category-list a:hover {
  border-color: rgba(244, 114, 182, 0.42) !important;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.18),
    rgba(15, 23, 42, 0.65) 38%,
    rgba(236, 72, 153, 0.16)
  ) !important;
}

[data-theme='dark'] .card-widget.card-categories ul.card-category-list ul {
  border-left-color: rgba(148, 163, 184, 0.22);
}

[data-theme='dark'] ul.card-category-list a {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.62)) !important;
}

[data-theme='dark'] ul.card-category-list a:hover {
  border-color: rgba(244, 114, 182, 0.42) !important;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.18),
    rgba(15, 23, 42, 0.65) 38%,
    rgba(236, 72, 153, 0.16)
  ) !important;
}

[data-theme='dark'] ul.card-category-list ul {
  border-left-color: rgba(148, 163, 184, 0.22);
}

/* ==========================================================================
   Typography Upgrade (less "plain", more comfortable reading)
   ========================================================================== */
:root {
  --custom-font-sans: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", system-ui, sans-serif;
  --custom-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
}

body,
#page,
#nav,
#recent-posts,
#article-container,
#post,
#aside-content {
  font-family: var(--custom-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}

body {
  font-size: 16px;
  line-height: 1.75;
}

/* 正文段落更“顺”：行高 + 上下间距 */
#post .post-content p,
#article-container .post-content p {
  line-height: 1.95;
  margin: 0.95em 0;
}

/* 标题更利落：不改字号，只优化节奏 */
#post .post-content h1,
#post .post-content h2,
#post .post-content h3 {
  line-height: 1.22;
  letter-spacing: -0.02em;
}

/* 保护代码块：仍使用等宽字体，避免被全站 sans 影响 */
pre,
code,
kbd,
samp {
  font-family: var(--custom-font-mono);
}

