:root {
  /* 背景 / 表面 */
  --home-bg: #F7F4EE;
  --home-surface: #FFFFFF;
  --home-surface-alt: #F2EEE6;
  --home-border: #E6E1D6;
  --home-border-light: #EFEBE2;
  /* 文字 */
  --home-text: #2A2A26;
  --home-text-muted: #7B7A72;
  --home-text-soft: #555450;
  /* 主色（墨绿 · 松柏） */
  --home-primary: #3F6252;
  --home-primary-hover: #5B7E6C;
  --home-primary-soft: #E6EEE8;
  --home-primary-shadow: rgba(63, 98, 82, 0.18);
  /* 强调点缀 */
  --home-accent: #A88B5C;
  --home-accent-soft: #F1E9DA;
  /* 时间线 */
  --home-timeline-dot: #3F6252;
  /* 圆角（保持克制，古风忌过圆） */
  --home-radius-sm: 4px;
  --home-radius-md: 6px;
  --home-radius-lg: 10px;
  /* 阴影（淡而不重） */
  --home-shadow-sm: 0 1px 2px rgba(60, 55, 45, 0.04);
  --home-shadow-md: 0 2px 10px rgba(60, 55, 45, 0.06);
}
[data-theme="dark"] {
  /* 深色：墨玉深绿底 + 米白文字，像深夜的竹林灯下 */
  --home-bg: #1A2420;
  --home-surface: #222E28;
  --home-surface-alt: #283630;
  --home-border: #34433C;
  --home-border-light: #2D3B35;
  --home-text: #ECE8DC;
  --home-text-muted: #9A988C;
  --home-text-soft: #C0BEB2;
  --home-primary: #6E9885;
  --home-primary-hover: #8BB39E;
  --home-primary-soft: #2D4038;
  --home-primary-shadow: rgba(110, 152, 133, 0.25);
  --home-accent: #C4A26F;
  --home-accent-soft: #3D3224;
  --home-timeline-dot: #6E9885;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
body.home-body {
  margin: 0;
  padding: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "PingFang SC", "Songti SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, serif;
  font-size: 15px;
  line-height: 1.7;
  background: var(--home-bg);
  color: var(--home-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, color 0.2s ease;
}
a {
  color: var(--home-primary);
  text-decoration: none;
}
a:hover {
  color: var(--home-primary-hover);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
code {
  background: var(--home-surface-alt);
  padding: 2px 6px;
  border-radius: var(--home-radius-sm);
  font-size: 0.875em;
  font-family: "Fira Code", Consolas, Monaco, monospace;
}
.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (max-width: 640px) {
  body.nav-categories .container,
  body.nav-tags .container,
  body.nav-archive .container,
  body.nav-search .container {
    max-width: 100%;
    padding: 0 14px;
  }
}
.site-header {
  background: var(--home-surface);
  border-bottom: 1px solid var(--home-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 1px 3px rgba(60, 55, 45, 0.04);
}
.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-header .site-logo {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--home-text);
}
.site-header .site-logo:hover {
  color: var(--home-primary);
  text-decoration: none;
}
.site-header .site-nav {
  display: flex;
  gap: 1.5rem;
}
.site-header .site-nav a {
  color: var(--home-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}
.site-header .site-nav a:hover {
  color: var(--home-primary);
  text-decoration: none;
}
.site-header .site-nav a.active {
  color: var(--home-primary);
}
@media (max-width: 640px) {
  .site-header .site-nav {
    display: none;
  }
}
.site-header .mobile-nav-btn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--home-text);
  padding: 4px 8px;
}
@media (max-width: 640px) {
  .site-header .mobile-nav-btn {
    display: block;
  }
}
.site-header .theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--home-text);
}
.site-header .theme-toggle:hover {
  background: var(--home-surface-alt);
}
.breadcrumb {
  padding: 12px 0;
  color: var(--home-text-muted);
  font-size: 13px;
}
.breadcrumb a {
  color: var(--home-text-muted);
}
.breadcrumb .sep {
  margin: 0 6px;
  /* color: @home-border; */
}
.main {
  flex: 1;
  padding: 24px 0;
}
.site-footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--home-border);
  text-align: center;
  color: var(--home-text-muted);
  font-size: 13px;
}
.site-footer p {
  margin: 4px 0;
}
.site-footer .site-footer-beian {
  margin-top: 8px;
  font-size: 12px;
}
.site-footer .site-footer-beian a {
  color: var(--home-text-muted);
  text-decoration: none;
}
.site-footer .site-footer-beian a:hover {
  color: var(--home-primary);
}
.site-footer .site-footer-beian .beian-sep {
  margin: 0 8px;
  color: var(--home-border);
}
.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 220px;
  background: var(--home-surface);
  border-right: 1px solid var(--home-border);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  padding: 24px 0;
}
@media (max-width: 640px) {
  .mobile-drawer {
    display: block;
  }
  body.drawer-open .mobile-drawer {
    transform: translateX(0);
  }
}
.mobile-drawer a {
  display: block;
  padding: 14px 24px;
  color: var(--home-text);
  font-weight: 500;
  border-left: 3px solid transparent;
}
.mobile-drawer a:hover {
  background: var(--home-surface-alt);
  color: var(--home-primary);
  text-decoration: none;
}
.mobile-drawer a.active {
  border-left-color: var(--home-primary);
  color: var(--home-primary);
}
.drawer-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 150;
}
@media (max-width: 640px) {
  body.drawer-open .drawer-mask {
    display: block;
  }
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--home-border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--home-text-muted);
}
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 32px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--home-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--home-primary-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.15s ease;
  z-index: 300;
}
.back-to-top:hover {
  background: var(--home-primary-hover);
  transform: translateY(-2px);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 640px) {
  .back-to-top {
    right: 18px;
    bottom: 24px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}
.timeline-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.timeline-tags a {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--home-text-muted);
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  transition: all 0.15s;
}
.timeline-tags a:hover {
  color: var(--home-primary);
  border-color: var(--home-primary);
  text-decoration: none;
}
.timeline-tags a.active {
  background: var(--home-primary);
  color: #fff;
  border-color: var(--home-primary);
}
.timeline-year {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.timeline-year .year-label {
  font-size: 22px;
  font-weight: 700;
  color: var(--home-text);
}
.timeline-year .year-dot {
  font-size: 14px;
  color: var(--home-text-muted);
}
.timeline-year .year-count {
  font-size: 13px;
  color: var(--home-text-muted);
}
.timeline {
  position: relative;
  margin-top: 1em;
}
.timeline-item {
  position: relative;
  padding: 8px 0 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-left: 60px;
}
@media (max-width: 640px) {
  .timeline-item {
    margin-left: 0px;
  }
}
.timeline-item .item-left {
  flex-shrink: 0;
  position: relative;
  width: 40px;
}
.timeline-item .item-left .item-date {
  font-size: 13px;
  color: var(--home-text-muted);
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  padding-top: 2px;
}
.timeline-item .item-body {
  flex: 1;
  min-width: 0;
}
.timeline-item .item-body .item-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.4;
}
.timeline-item .item-body .item-title a {
  color: var(--home-text);
}
.timeline-item .item-body .item-title a:hover {
  color: var(--home-primary);
  text-decoration: none;
}
.timeline-item .item-body .item-summary {
  font-size: 14px;
  color: var(--home-text-muted);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.timeline-pagination {
  text-align: center;
  padding: 24px 0 4px;
}
.timeline-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--home-text-muted);
  font-size: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: var(--home-radius-md);
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.btn:hover {
  opacity: 0.9;
  text-decoration: none;
}
.btn-primary {
  background: var(--home-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--home-primary-hover);
  color: #fff;
}
.btn-link {
  color: var(--home-primary);
  background: none;
  padding: 0;
}
.card {
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--home-shadow-sm);
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.pagination .pagination-pages {
  display: flex;
  gap: 6px;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius-sm);
  font-size: 13px;
  color: var(--home-text);
  background: var(--home-surface);
  text-decoration: none;
  transition: all 0.15s ease;
}
.pagination a:hover:not(.active):not(.disabled) {
  border-color: var(--home-primary);
  color: var(--home-primary);
  text-decoration: none;
}
.pagination .active {
  background: var(--home-primary);
  color: #fff;
  border-color: var(--home-primary);
  font-weight: 600;
}
.pagination .ellipsis {
  border: none;
  background: transparent;
  min-width: auto;
  color: var(--home-text-muted);
  padding: 0 4px;
}
.pagination .page-nav {
  min-width: auto;
  padding: 0 14px;
}
.pagination .page-nav.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
@media (max-width: 640px) {
  .pagination {
    gap: 12px;
  }
  .pagination .pagination-pages {
    display: none;
  }
  .pagination .page-nav {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
  }
}
.sidebar h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--home-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar li {
  padding: 8px 0;
  border-bottom: 1px solid var(--home-border-light);
}
.sidebar li:last-child {
  border-bottom: none;
}
.sidebar a {
  color: var(--home-text);
  font-size: 14px;
}
.sidebar a:hover {
  color: var(--home-primary);
  text-decoration: none;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-chip {
  display: inline-block;
  padding: 4px 12px;
  background: var(--home-surface-alt);
  color: var(--home-text-muted);
  border-radius: 16px;
  font-size: 13px;
  border: 1px solid transparent;
  margin-bottom: 10px;
}
.tag-chip:hover {
  background: var(--home-primary);
  color: #fff;
  text-decoration: none;
}
.search-form {
  display: flex;
  gap: 10px;
}
.search-form input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius-md);
  background: var(--home-surface);
  color: var(--home-text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-form input[type="text"]:focus {
  border-color: var(--home-primary);
  box-shadow: 0 0 0 3px var(--home-primary-shadow);
}
.search-form button {
  background: var(--home-primary);
  color: #fff;
  border: none;
  border-radius: var(--home-radius-md);
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.article-detail {
  margin: 0 auto;
}
.article-detail h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
}
.article-detail .article-meta {
  font-size: 13px;
  color: var(--home-text-muted);
  margin-bottom: 24px;
}
.article-detail .article-meta span {
  margin-right: 16px;
}
.article-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--home-text);
}
.article-body h1,
.article-body h2,
.article-body h3 {
  margin-top: 2em;
  font-weight: 600;
}
.article-body h2 {
  font-size: 20px;
  border-bottom: 1px solid var(--home-border);
  padding-bottom: 6px;
}
.article-body h3 {
  font-size: 17px;
}
.article-body p {
  margin: 1em 0;
}
.article-body pre {
  background: var(--home-surface-alt);
  border-radius: var(--home-radius-md);
  padding: 16px;
  overflow-x: auto;
  font-size: 14px;
}
.article-body code {
  background: var(--home-surface-alt);
  padding: 2px 6px;
  font-size: 14px;
}
.article-body pre code {
  background: none;
  padding: 0;
  font-size: 14px;
}
.article-body blockquote {
  border-left: 4px solid var(--home-primary);
  padding: 0 16px;
  color: var(--home-text-muted);
  margin: 16px 0;
}
.article-body img {
  max-width: 100%;
  border-radius: var(--home-radius-md);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.article-body th,
.article-body td {
  border: 1px solid var(--home-border);
  padding: 8px 12px;
}
.article-body th {
  background: var(--home-surface-alt);
}
.page-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  padding: 24px 0;
}
@media (max-width: 768px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
}
.archive-group {
  margin-bottom: 28px;
}
.archive-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--home-border);
  color: var(--home-text);
}
.archive-count {
  font-size: 12px;
  color: var(--home-text-muted);
  font-weight: normal;
  margin-left: 8px;
}
.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.archive-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--home-border);
  font-size: 15px;
}
.archive-date {
  color: var(--home-text-muted);
  font-size: 13px;
  font-family: "SF Mono", Menlo, monospace;
  min-width: 64px;
}
.archive-list a {
  color: var(--home-text);
}
.archive-list a:hover {
  color: var(--home-primary);
  text-decoration: none;
}
.archive-list a.archived {
  color: var(--home-text-muted);
  text-decoration: line-through;
  cursor: pointer;
}
.archive-list a.archived:hover {
  color: var(--home-text-muted);
  text-decoration: line-through;
}
.subscribe-wrap {
  max-width: 480px;
  margin: 48px auto;
  padding: 0 20px;
}
.subscribe-card {
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius-lg);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--home-shadow-md);
}
.subscribe-card h2 {
  font-size: 20px;
  margin: 0 0 8px;
}
.subscribe-card p {
  color: var(--home-text-muted);
  margin: 0 0 20px;
}
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.subscribe-error {
  background: #f8eaea;
  color: #9a3d3d;
  border-radius: var(--home-radius-md);
  padding: 10px 16px;
  font-size: 14px;
}
[data-theme="dark"] .subscribe-error {
  background: rgba(154, 61, 61, 0.22);
}
.not-found {
  text-align: center;
  padding: 80px 20px;
}
.not-found .code {
  background: var(--home-primary);
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #fff;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 24px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px var(--home-primary-shadow);
}
.not-found p {
  color: var(--home-text-muted);
  margin: 0 0 24px;
}
.not-found-archived .code {
  background: var(--home-primary);
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #fff;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 24px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px var(--home-primary-shadow);
}
.article-pager {
  display: flex;
  gap: 16px;
  margin: 32px 0 24px;
}
.article-pager-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
  min-width: 0;
}
.article-pager-item:hover {
  border-color: var(--home-primary);
  background-color: var(--home-surface-alt);
  transform: translateY(-1px);
}
.article-pager-empty {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.article-pager-empty:hover {
  transform: none;
}
.article-pager-prev {
  text-align: left;
}
.article-pager-next {
  text-align: right;
  align-items: flex-end;
}
.article-pager-label {
  font-size: 12px;
  color: var(--home-text-muted);
  letter-spacing: 0.02em;
}
.article-pager-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--home-text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
@media (max-width: 640px) {
  .article-pager {
    flex-direction: column;
  }
  .article-pager .article-pager-next {
    align-items: flex-start;
    text-align: left;
  }
}
.muted {
  color: var(--home-text-muted);
}
.page-stats {
  margin-top: 16px;
  font-size: 12px;
  color: var(--home-text-muted);
  text-align: right;
}
.text-center {
  text-align: center;
}
.mt-4 {
  margin-top: 1.5rem;
}
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}
@media (max-width: 640px) {
  .tag-chips {
    flex-direction: column;
    text-align: center;
  }
}
#comment-area {
  margin: 40px 0 24px;
}
#comment-area .comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--home-border);
}
#comment-area .comment-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
#comment-area .comment-empty,
#comment-area .comment-loading {
  text-align: center;
  padding: 40px;
  color: var(--home-text-muted);
  font-size: 14px;
}
#comment-area .comment-form {
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 32px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#comment-area .comment-form:focus-within {
  border-color: var(--home-primary);
  box-shadow: 0 0 0 3px var(--home-primary-shadow);
}
#comment-area .comment-form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
#comment-area .comment-form input,
#comment-area .comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--home-border);
  border-radius: 6px;
  background: var(--home-bg);
  color: var(--home-text);
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
  font-family: inherit;
}
#comment-area .comment-form input:focus,
#comment-area .comment-form textarea:focus {
  outline: none;
  border-color: var(--home-primary);
}
#comment-area .comment-form textarea {
  min-height: 100px;
  padding: 12px;
  resize: vertical;
}
#comment-area .comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
#comment-area .comment-notify {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--home-text-muted);
  cursor: pointer;
}
#comment-area .comment-notify input {
  width: auto;
  margin: 0;
}
#comment-area .comment-submit {
  padding: 10px 24px;
  background: var(--home-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
#comment-area .comment-submit:hover:not(:disabled) {
  background: var(--home-primary-hover);
}
#comment-area .comment-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#comment-area .comment-root {
  padding: 20px 0;
  border-bottom: 1px solid var(--home-border-light);
}
#comment-area .comment-root:last-child {
  border-bottom: none;
}
#comment-area .comment-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
#comment-area .comment-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#comment-area .comment-card-reply {
  padding: 0;
}
#comment-area .comment-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  background: var(--home-primary);
}
.comment-card-reply #comment-area .comment-avatar {
  width: 28px;
  height: 28px;
  font-size: 13px;
}
#comment-area .comment-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
#comment-area .comment-name,
#comment-area .comment-name-link {
  font-weight: 600;
  color: var(--home-text);
  text-decoration: none;
  font-size: 14px;
}
#comment-area .comment-name:hover,
#comment-area .comment-name-link:hover {
  color: var(--home-primary);
}
#comment-area .comment-time {
  font-size: 12px;
  color: var(--home-text-muted);
}
#comment-area .comment-content {
  flex: 1;
  font-size: 14px;
  line-height: 1.7;
  color: var(--home-text);
  word-break: break-word;
}
#comment-area .comment-content a {
  color: var(--home-primary);
}
#comment-area .comment-content a:hover {
  text-decoration: underline;
}
#comment-area .comment-footer {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 6px;
}
#comment-area .comment-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--home-text-muted);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}
#comment-area .comment-btn:hover {
  color: var(--home-primary);
}
#comment-area .comment-like-btn.liked {
  color: #E74C3C;
  animation: like-pop 0.25s ease-out;
}
#comment-area .comment-like-btn.like-bounce {
  animation: like-bounce 0.35s ease-out;
}
@keyframes like-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes like-bounce {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(3px);
  }
}
#comment-area .comment-inline-form {
  margin: 10px 0 4px;
  padding: 12px 16px;
  background: var(--home-surface-alt);
  border: 1px solid var(--home-border-light);
  border-radius: 8px;
  animation: comment-inline-in 0.18s ease-out;
}
#comment-area .comment-inline-form .comment-inline-hint {
  font-size: 13px;
  color: var(--home-text-muted);
  margin-bottom: 8px;
}
#comment-area .comment-inline-form .comment-inline-textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--home-border);
  border-radius: 6px;
  background: var(--home-bg);
  color: var(--home-text);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
#comment-area .comment-inline-form .comment-inline-textarea:focus {
  outline: none;
  border-color: var(--home-primary);
}
#comment-area .comment-inline-form .comment-inline-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 12px;
  flex-wrap: wrap;
}
#comment-area .comment-inline-form .comment-inline-actions {
  display: flex;
  gap: 8px;
}
#comment-area .comment-inline-form .comment-inline-cancel,
#comment-area .comment-inline-form .comment-inline-submit {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
#comment-area .comment-inline-form .comment-inline-cancel {
  background: transparent;
  color: var(--home-text-muted);
  border-color: var(--home-border);
}
#comment-area .comment-inline-form .comment-inline-cancel:hover {
  color: var(--home-text);
  border-color: var(--home-text-muted);
}
#comment-area .comment-inline-form .comment-inline-submit {
  background: var(--home-primary);
  color: #fff;
}
#comment-area .comment-inline-form .comment-inline-submit:hover:not(:disabled) {
  background: var(--home-primary-hover);
}
#comment-area .comment-inline-form .comment-inline-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@keyframes comment-inline-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#comment-area .comment-replies {
  margin-top: 8px;
  margin-left: 44px;
  padding-left: 12px;
  border-left: 2px solid var(--home-border-light);
}
#comment-area .comment-reply {
  padding: 14px 0;
}
#comment-area .comment-reply .comment-card {
  padding: 0;
}
#comment-area .comment-expand-replies,
#comment-area .comment-load-more {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 12px 5px 10px;
  font-size: 12px;
  color: var(--home-text-muted);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  text-align: left;
  transition: all 0.15s;
  user-select: none;
}
#comment-area .comment-expand-replies::before,
#comment-area .comment-load-more::before {
  content: '▾';
  font-size: 11px;
  margin-right: 4px;
  opacity: 0.7;
}
#comment-area .comment-expand-replies:hover,
#comment-area .comment-load-more:hover {
  background: rgba(0, 0, 0, 0.09);
  color: var(--home-text);
}
#comment-area .comment-load-more {
  display: block;
  margin: 20px auto 0;
  text-align: center;
}
[data-theme="dark"] #comment-area .comment-btn:hover {
  color: var(--home-primary);
}
[data-theme="dark"] #comment-area .comment-expand-replies,
[data-theme="dark"] #comment-area .comment-load-more {
  background: rgba(255, 255, 255, 0.08);
  color: var(--home-text-muted);
}
[data-theme="dark"] #comment-area .comment-expand-replies:hover,
[data-theme="dark"] #comment-area .comment-load-more:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--home-text-soft);
}
[data-theme="dark"] #comment-area .comment-form:focus-within {
  box-shadow: 0 0 0 3px rgba(110, 152, 133, 0.25);
}
@media (max-width: 640px) {
  #comment-area .comment-form-row {
    grid-template-columns: 1fr;
  }
  #comment-area .comment-replies {
    margin-left: 0;
    padding-left: 20px;
  }
}
/* ============ 首页内嵌订阅 Banner ============ */
.subscribe-banner {
  background: var(--home-primary-soft);
  border-radius: var(--home-radius-lg);
  padding: 36px 40px;
  margin-bottom: 32px;
  border: 1px solid var(--home-border);
}
.subscribe-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.subscribe-banner-text h2 {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--home-text);
  line-height: 1.3;
}
.subscribe-banner-text p {
  margin: 0;
  color: var(--home-text-muted);
  font-size: 15px;
  line-height: 1.5;
}
.subscribe-banner-form {
  flex-shrink: 0;
  width: 300px;
}
.subscribe-banner-fields {
  display: flex;
  gap: 10px;
  flex-direction: column;
}
.subscribe-banner-fields input[type=email] {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius-md);
  background: var(--home-surface);
  color: var(--home-text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.subscribe-banner-fields input[type=email]:focus {
  border-color: var(--home-primary);
  box-shadow: 0 0 0 3px var(--home-primary-shadow);
}
.subscribe-banner-fields button {
  padding: 12px 22px;
  background: var(--home-primary);
  color: #fff;
  border: none;
  border-radius: var(--home-radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.subscribe-banner-fields button:hover:not(:disabled) {
  background: var(--home-primary-hover);
}
.subscribe-banner-fields button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.subscribe-banner-feedback {
  font-size: 13px;
  line-height: 1.4;
}
.subscribe-banner-feedback.feedback-success {
  color: #3F6252;
}
.subscribe-banner-feedback.feedback-error {
  color: #9A3D3D;
}
/* 移动端：上下堆叠 */
@media (max-width: 640px) {
  .subscribe-banner {
    padding: 24px 20px;
  }
  .subscribe-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .subscribe-banner-text h2 {
    font-size: 22px;
  }
  .subscribe-banner-form {
    width: 100%;
  }
  .subscribe-banner-fields {
    flex-direction: column;
  }
  .subscribe-banner-fields button {
    width: 100%;
  }
}
/* ============ 站点统计卡片（分页下方） ============ */
.site-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 2em;
}
.site-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 12px;
  background: var(--home-bg-card);
  border: 1px solid var(--home-border);
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.site-stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--home-primary);
  opacity: 0.85;
}
.site-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-color: var(--home-primary);
  text-decoration: none;
}
.site-stat-card:hover::before {
  opacity: 1;
}
.site-stat-card:nth-child(1)::before {
  background: #4D96FF;
}
.site-stat-card:nth-child(2)::before {
  background: #6BCB77;
}
.site-stat-card:nth-child(3)::before {
  background: #9B59B6;
}
.site-stat-card:nth-child(4)::before {
  background: #95A5A6;
}
.site-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--home-text);
  line-height: 1;
  letter-spacing: -0.5px;
}
.site-stat-label {
  font-size: 12px;
  color: var(--home-text-muted);
  white-space: nowrap;
}
@media (max-width: 768px) {
  .site-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
  }
  .site-stat-card {
    padding: 14px 10px;
  }
  .site-stat-num {
    font-size: 20px;
  }
  .site-stat-label {
    font-size: 11px;
  }
}
@media (max-width: 380px) {
  .site-stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}
