/* =============================================
   NeoSoft Blog Theme - Grove Style
   Version: 1.2.7
   ============================================= */

/* Fonts loaded via header.php when enable_gfont is on */

:root {
  /* Grove 自然绿调色板（全站统一） */
  --grove-dark:    #1c3d18;
  --grove-mid:     #2d5c27;
  --grove-light:   #4a8c42;
  --grove-bright:  #6db560;
  --grove-pale:    #e8f5e3;
  --grove-card:    #f2f8ef;
  --grove-white:   #ffffff;
  --grove-text:    #1a2e18;
  --grove-sub:     #4a6547;
  --grove-muted:   #7a9278;
  --grove-border:  rgba(45,92,39,0.12);
  --grove-shadow:  0 4px 20px rgba(30,70,25,0.12);
  --grove-radius:  20px;
  --grove-radius-sm: 14px;

  --bg: #e8f5e3;
  --bg-light: #f2f8ef;
  --bg-card: #ffffff;
  --neo-highlight: rgba(255, 255, 255, 0.92);
  --neo-shadow: rgba(30, 70, 25, 0.12);
  --shadow-sm: 0 2px 8px rgba(30,70,25,0.08);
  --shadow-md: 0 4px 16px rgba(30,70,25,0.12);
  --shadow-lg: 0 8px 28px rgba(30,70,25,0.16);
  --shadow-inset: inset 2px 2px 6px rgba(30,70,25,0.08);
  --shadow-inset-sm: inset 1px 1px 4px rgba(30,70,25,0.06);
  --accent: #4a8c42;
  --accent2: #2d5c27;
  --accent-gradient: linear-gradient(135deg, #2d5c27 0%, #4a8c42 100%);
  --accent-soft: rgba(74, 140, 66, 0.12);
  --text-primary: #1a2e18;
  --text-secondary: #4a6547;
  --text-muted: #7a9278;
  --text-white: #ffffff;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --font-sans: 'Nunito', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-serif: 'Noto Serif SC', serif;
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.16s ease;
  --surface-border: 1px solid rgba(45, 92, 39, 0.08);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; overflow-x: clip; overflow-y: auto; height: auto; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: clip;
  overflow-y: auto;
  height: auto;
  min-height: 0;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background:
    radial-gradient(ellipse 70% 50% at 5% -5%, rgba(109,181,96,0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 98% 2%, rgba(45,92,39,0.06), transparent 50%);
}
.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: visible;
}
.page-shell > main { width: 100%; }
#site-footer { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--accent2); }

img { max-width: 100%; height: auto; display: block; }
.fa, .fas, .far, .fab { font-display: swap; }

ul, ol { list-style: none; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background: var(--shadow-dark); border-radius: var(--radius-full); }
html::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === ANNOUNCEMENT BAR === */
#announcement-bar {
  background: linear-gradient(135deg, var(--grove-mid), var(--grove-light));
  color: var(--text-white);
  text-align: center;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(88, 120, 212, 0.22);
}
#announcement-bar .ann-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
#announcement-bar .ann-icon { font-size: 1rem; animation: bell 2s infinite; }
@keyframes bell {
  0%,100%{transform:rotate(0)} 10%{transform:rotate(-10deg)} 20%{transform:rotate(10deg)} 30%{transform:rotate(-8deg)} 40%{transform:rotate(8deg)} 50%{transform:rotate(0)}
}
#announcement-bar .ann-close {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.2); border: none; color: white;
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem;
  transition: var(--transition-fast);
}
#announcement-bar .ann-close:hover { background: rgba(255,255,255,0.4); }

/* === HEADER === */
#site-header {
  position: sticky; top: 0; z-index: 900;
  background: var(--grove-pale);
  border-bottom: 1px solid var(--grove-border);
  padding: 0 24px;
  transition: var(--transition);
  box-shadow: none;
}
#site-header.scrolled {
  box-shadow: 0 2px 12px rgba(30,70,25,0.1);
  background: rgba(232,245,227,0.96);
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 20px;
}

/* Logo */
.site-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.logo-mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(30,70,25,0.12);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--grove-mid);
  font-size: 1.4rem; color: white; font-weight: 700;
  flex-shrink: 0;
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.site-logo--img .logo-mark {
  width: auto;
  min-width: 44px;
  max-width: 148px;
  height: 44px;
  padding: 4px 8px;
  background: var(--grove-white);
}
.site-logo--img .logo-mark img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 1.1rem; font-weight: 800; color: var(--grove-dark); line-height: 1.2; }
.logo-desc { font-size: 0.72rem; color: var(--grove-sub); font-weight: 500; }

/* Navigation */
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.current {
  color: var(--grove-mid);
  box-shadow: 0 2px 8px rgba(30,70,25,0.08);
  background: var(--grove-white);
}

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 10px; }
.neo-btn-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: none; cursor: pointer;
  background: var(--grove-white);
  box-shadow: 0 2px 8px rgba(30,70,25,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--grove-mid);
  transition: box-shadow 0.22s ease, transform 0.22s ease, color 0.2s ease;
}
.neo-btn-icon:hover { box-shadow: 0 4px 14px rgba(30,70,25,0.14); color: var(--grove-light); transform: translateY(-1px); }
.neo-btn-icon:active { box-shadow: var(--shadow-inset-sm); transform: scale(0.96); }

/* Search Box */
.search-wrap { position: relative; }
.search-input-header {
  width: 0; opacity: 0; padding: 8px 16px;
  border-radius: var(--radius-full);
  border: none; background: var(--bg);
  box-shadow: var(--shadow-inset-sm);
  font-family: var(--font-sans); font-size: 0.88rem;
  color: var(--text-primary);
  transition: var(--transition); outline: none;
}
.search-input-header.open { width: 200px; opacity: 1; margin-right: 8px; }

/* Mobile menu toggle */
.mobile-toggle { display: none; }

/* === MAIN LAYOUT === */
.site-wrapper {
  max-width: 1200px; margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
.content-main { min-width: 0; }
.content-side { position: sticky; top: 90px; }

/* === NEO CARD === */
.neo-card {
  background: var(--grove-white);
  border-radius: var(--grove-radius-sm);
  box-shadow: 0 3px 14px rgba(30,70,25,0.08);
  border: var(--surface-border);
  overflow: hidden;
  transition: box-shadow 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.neo-card:hover { box-shadow: 0 6px 22px rgba(30,70,25,0.12); transform: translateY(-2px); }

/* === HERO (Featured Post) === */
.hero-post {
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/7;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
}
.hero-post img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.hero-post:hover img { transform: scale(1.04); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(30,32,50,0.85) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 32px;
}
.hero-cat {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-gradient);
  color: white; padding: 4px 14px;
  border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 700;
  margin-bottom: 10px; width: fit-content;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: 1.8rem; font-weight: 700;
  color: white; line-height: 1.35; margin-bottom: 12px;
}
.hero-meta { display: flex; gap: 16px; color: rgba(255,255,255,0.75); font-size: 0.82rem; }
.hero-meta span { display: flex; align-items: center; gap: 5px; }

/* === POST LIST === */
.post-list { display: flex; flex-direction: column; gap: 22px; }

.post-card {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 0; cursor: pointer;
}
.post-card-thumb {
  aspect-ratio: 4/3; overflow: hidden;
}
.post-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.06); }
.post-card-no-img { grid-template-columns: 1fr; }
.post-card-no-img .post-card-thumb { display: none; }

.post-card-body { padding: 22px 24px; display: flex; flex-direction: column; }
.post-card-cat {
  font-size: 0.72rem; font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-primary); line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-title:hover { color: var(--accent); }
.post-card-excerpt {
  font-size: 0.85rem; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1; margin-bottom: 14px;
}
.post-card-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 0.78rem; color: var(--text-muted); flex-wrap: wrap;
}
.post-card-meta span { display: flex; align-items: center; gap: 4px; }
.post-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag-chip {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--bg); box-shadow: var(--shadow-sm);
  font-size: 0.72rem; font-weight: 600; color: var(--text-secondary);
  transition: var(--transition-fast);
}
.tag-chip:hover { color: var(--accent); box-shadow: var(--shadow-md); }

/* === PAGINATION === */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 10px; margin-top: 36px; flex-wrap: wrap;
}
.page-item {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg); box-shadow: var(--shadow-sm);
  transition: var(--transition); cursor: pointer;
}
.page-item:hover { box-shadow: var(--shadow-md); color: var(--accent); }
.page-item.active {
  background: var(--accent);
  color: white; box-shadow: var(--shadow-sm);
}
.page-item.disabled { opacity: 0.4; cursor: not-allowed; }

/* === SIDEBAR === */
.sidebar { display: flex; flex-direction: column; gap: 22px; }
.side-card { padding: 22px; }
.side-title {
  font-size: 0.82rem; font-weight: 700;
  color: var(--text-muted); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.side-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, var(--shadow-dark), transparent);
}

/* Author Card */
.author-card { text-align: center; padding: 28px 22px; }
.author-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  margin: 0 auto 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-avatar-default {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: white; font-weight: 800;
  margin: 0 auto 14px;
  box-shadow: var(--shadow-md);
}
.author-name { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; }
.author-bio { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 16px; }
.author-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 18px;
}
.author-stat {
  background: var(--bg); box-shadow: var(--shadow-inset-sm);
  border-radius: 12px; padding: 10px 6px; text-align: center;
}
.author-stat-num { font-size: 1.1rem; font-weight: 800; color: var(--accent); }
.author-stat-label { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }
.social-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.social-link {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--text-secondary);
  transition: var(--transition);
}
.social-link:hover { box-shadow: var(--shadow-md); color: var(--accent); transform: translateY(-2px); }

/* Search Widget */
.search-widget { display: flex; gap: 10px; }
.neo-input {
  flex: 1; padding: 11px 16px;
  border: none; outline: none;
  background: var(--bg); box-shadow: var(--shadow-inset-sm);
  border-radius: var(--radius-full);
  font-family: var(--font-sans); font-size: 0.88rem;
  color: var(--text-primary);
}
.neo-input::placeholder { color: var(--text-muted); }
.neo-btn {
  padding: 10px 22px;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--grove-mid), var(--grove-light));
  color: white; border-radius: var(--radius-full);
  font-family: var(--font-sans); font-size: 0.86rem; font-weight: 600;
  box-shadow: 0 4px 12px rgba(45,92,39,0.3);
  transition: var(--transition);
}
.neo-btn:hover { box-shadow: 0 6px 18px rgba(45,92,39,0.4); }
.neo-btn:active { box-shadow: var(--shadow-inset-sm); transform: scale(0.98); }
.neo-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* Category List */
.cat-list { display: flex; flex-direction: column; gap: 8px; }
.cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 12px;
  background: var(--grove-pale); box-shadow: 0 2px 8px rgba(30,70,25,0.08);
  transition: var(--transition);
  text-decoration: none; color: var(--grove-sub); font-size: 0.88rem; font-weight: 600;
}
.cat-item:hover { box-shadow: 0 4px 14px rgba(30,70,25,0.12); color: var(--grove-mid); }
.cat-count {
  background: rgba(74,140,66,0.12); color: var(--grove-light);
  padding: 2px 10px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700;
}

/* Recent Posts Widget */
.recent-post-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.recent-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.recent-thumb {
  width: 56px; height: 56px; border-radius: 10px;
  overflow: hidden; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-thumb-default {
  width: 56px; height: 56px; border-radius: 10px;
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.recent-info { flex: 1; min-width: 0; }
.recent-title {
  font-size: 0.85rem; font-weight: 700; color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 4px; line-height: 1.4;
}
.recent-title:hover { color: var(--accent); }
.recent-date { font-size: 0.72rem; color: var(--text-muted); }

/* Tag Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud-item {
  padding: 5px 14px; border-radius: var(--radius-full);
  background: var(--bg); box-shadow: var(--shadow-sm);
  font-size: 0.8rem; font-weight: 600; color: var(--text-secondary);
  transition: var(--transition);
}
.tag-cloud-item:hover { box-shadow: var(--shadow-md); color: var(--accent); }

/* === SINGLE POST === */
.post-header { padding: 36px 36px 0; }
.post-featured-img {
  aspect-ratio: 16/7;
  overflow: hidden;
  margin: 24px 28px 0;
  border-radius: var(--grove-radius-sm);
}
.post-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.post-breadcrumb {
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.post-breadcrumb span { color: var(--text-muted); }
.post-title {
  font-family: var(--font-serif);
  font-size: 2rem; font-weight: 700;
  color: var(--text-primary); line-height: 1.4; margin-bottom: 16px;
}
.post-meta-bar {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; padding: 16px 36px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 0.82rem; color: var(--text-muted);
}
.post-meta-bar span { display: flex; align-items: center; gap: 5px; }
.post-meta-bar .cat-badge {
  background: var(--accent-gradient); color: white;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 700;
}

/* Article Content */
.post-content { padding: 32px 36px; font-size: 1rem; line-height: 1.85; color: var(--text-primary); }
.post-content h1,.post-content h2,.post-content h3,.post-content h4 {
  font-family: var(--font-serif); font-weight: 700; margin: 2em 0 0.8em;
  color: var(--text-primary); line-height: 1.35;
}
.post-content h2 { font-size: 1.45rem; padding-bottom: 8px; border-bottom: 2px solid var(--accent-soft); }
.post-content h3 { font-size: 1.2rem; }
.post-content p { margin-bottom: 1.2em; }
.post-content img {
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  margin: 1.5em auto;
}
.post-content blockquote {
  margin: 1.5em 0; padding: 16px 20px 16px 24px;
  border-left: 4px solid var(--accent);
  background: var(--bg); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm); color: var(--text-secondary); font-style: italic;
}
.post-content code {
  background: var(--bg); padding: 2px 8px; border-radius: 6px;
  font-size: 0.88em; color: var(--accent);
  box-shadow: var(--shadow-inset-sm);
}
.post-content pre {
  background: #2d2f3e; border-radius: var(--radius-md); padding: 20px;
  overflow-x: auto; margin: 1.5em 0;
  box-shadow: var(--shadow-md);
}
.post-content pre code { background: none; color: #e2e4f0; box-shadow: none; padding: 0; }
.post-content ul, .post-content ol { padding-left: 1.5em; margin-bottom: 1.2em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 0.4em; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); }
.post-content th { background: var(--accent-gradient); color: white; padding: 12px 16px; font-weight: 700; }
.post-content td { padding: 10px 16px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.post-content tr:last-child td { border-bottom: none; }
.post-content tr:nth-child(even) td { background: var(--bg); }
.post-content a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.post-content a:hover { color: var(--accent2); border-bottom-color: var(--accent2); }

/* Post Footer */
.post-footer { padding: 20px 36px 36px; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

/* 分享栏：紧凑拟物图标条 */
.post-share {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  width: fit-content;
  max-width: 100%;
}

.share-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.share-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  user-select: none;
}
.share-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  transition: var(--transition);
}
.share-btn span { display: none; }
.share-btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.share-btn:active { box-shadow: var(--shadow-inset-sm); transform: translateY(0); }
.share-btn.weibo:hover { color: #e6162d; }
.share-btn.twitter:hover { color: #1da1f2; }
.share-btn.wechat:hover { color: #07c160; }
.share-btn.link:hover { color: var(--accent); }

/* 微信分享二维码弹窗 */
.wechat-qr-modal {
  position: fixed; inset: 0; z-index: 10001;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.wechat-qr-overlay {
  position: absolute; inset: 0;
  background: rgba(47, 52, 64, 0.45);
  backdrop-filter: blur(6px);
}
.wechat-qr-panel {
  position: relative; z-index: 1;
  background: var(--bg-card);
  border: var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 280px; width: 100%;
}
.wechat-qr-title {
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 16px;
}
.wechat-qr-target {
  width: 160px; height: 160px;
  margin: 0 auto 14px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-inset-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.wechat-qr-target img,
.wechat-qr-target canvas { display: block; max-width: 100%; height: auto; }
.wechat-qr-loading { font-size: 0.78rem; color: var(--text-muted); }
.wechat-qr-hint { font-size: 0.76rem; color: var(--text-muted); margin-bottom: 16px; }
.wechat-qr-close { min-width: 100px; }

/* 文章详情页：禁用卡片 hover 上浮，避免滚动条抖动 */
#single-post.neo-card {
  overflow: visible;
}
#single-post.neo-card:hover {
  transform: none;
  box-shadow: var(--shadow-md);
}

/* Post Navigation */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 20px;
}
.post-nav-item {
  padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.post-nav-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.post-nav-item:active { box-shadow: var(--shadow-inset-sm); transform: translateY(0); }
.post-nav-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.post-nav-title { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-nav-title:hover { color: var(--accent); }
.post-nav-item.next { text-align: right; }

/* === COMMENTS === */
.comments-section { padding: 0 36px 36px; }
.comments-title {
  font-size: 1.05rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.comments-title .count {
  background: var(--accent); color: white;
  padding: 2px 10px; border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Comment Form */
.comment-form-wrap {
  padding: 22px 24px; border-radius: var(--radius-lg);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
  border: var(--surface-border);
  margin-bottom: 24px;
}
.comment-form-title {
  font-size: 0.92rem; font-weight: 700; margin-bottom: 18px;
  color: var(--text-primary); display: flex; align-items: center; gap: 8px;
}
.comment-form-title i { color: var(--accent); font-size: 0.88rem; }
.form-required { color: #d46a6a; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.76rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; }
.neo-input-field {
  padding: 11px 16px; border: none; outline: none;
  background: var(--bg); box-shadow: var(--shadow-inset-sm);
  border-radius: var(--radius-md);
  font-family: var(--font-sans); font-size: 0.88rem; color: var(--text-primary);
  transition: var(--transition-fast);
}
.neo-input-field:focus { box-shadow: var(--shadow-inset); }
.neo-textarea {
  resize: vertical; min-height: 120px;
  padding: 14px 16px; border: none; outline: none;
  background: var(--bg); box-shadow: var(--shadow-inset-sm);
  border-radius: var(--radius-md);
  font-family: var(--font-sans); font-size: 0.88rem; color: var(--text-primary);
  width: 100%; transition: var(--transition-fast);
  line-height: 1.65;
}
.neo-textarea:focus { box-shadow: var(--shadow-inset); }
.comment-submit-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.comment-tips { font-size: 0.8rem; color: var(--text-muted); min-height: 1.2em; text-align: right; }
.comment-tips.is-error { color: #c45c5c; }
.comment-tips.is-success { color: #4a9d72; }
.comment-empty {
  text-align: center; padding: 36px 20px; color: var(--text-muted);
}
.comment-empty i { font-size: 1.8rem; opacity: 0.35; margin-bottom: 10px; display: block; }
.comment-empty p { font-size: 0.86rem; }

/* Emoji Picker */
.emoji-bar-wrap { margin-bottom: 14px; position: relative; }
.emoji-toggle-btn {
  padding: 6px 14px; border-radius: var(--radius-full);
  border: none; cursor: pointer;
  background: var(--bg-card); box-shadow: var(--shadow-sm);
  font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
  display: inline-flex; align-items: center; gap: 6px;
  transition: box-shadow 0.25s ease, color 0.2s ease, transform 0.2s ease;
}
.emoji-toggle-btn:hover { box-shadow: var(--shadow-md); color: var(--accent); }
.emoji-toggle-btn.active {
  box-shadow: var(--shadow-inset-sm);
  color: var(--accent);
  transform: scale(0.97);
}
.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: none;
  overflow: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top left;
  pointer-events: none;
  transition:
    max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.28s ease,
    padding 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 0.3s ease;
}
.emoji-picker.show {
  max-height: 160px;
  opacity: 1;
  margin-top: 10px;
  padding: 12px;
  box-shadow: var(--shadow-md);
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.emoji-item {
  width: 34px; height: 34px;
  border-radius: 10px; border: none; cursor: pointer;
  background: var(--bg); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  transform: scale(0.6);
  transition: box-shadow 0.15s ease, transform 0.2s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.2s ease;
}
.emoji-picker.show .emoji-item {
  opacity: 1;
  transform: scale(1);
}
.emoji-picker.show .emoji-item:nth-child(1) { transition-delay: 0.02s; }
.emoji-picker.show .emoji-item:nth-child(2) { transition-delay: 0.03s; }
.emoji-picker.show .emoji-item:nth-child(3) { transition-delay: 0.04s; }
.emoji-picker.show .emoji-item:nth-child(4) { transition-delay: 0.05s; }
.emoji-picker.show .emoji-item:nth-child(5) { transition-delay: 0.06s; }
.emoji-picker.show .emoji-item:nth-child(6) { transition-delay: 0.07s; }
.emoji-picker.show .emoji-item:nth-child(7) { transition-delay: 0.08s; }
.emoji-picker.show .emoji-item:nth-child(8) { transition-delay: 0.09s; }
.emoji-picker.show .emoji-item:nth-child(n+9) { transition-delay: 0.1s; }
.emoji-item:hover { box-shadow: var(--shadow-md); transform: scale(1.12); }
.emoji-item:active { box-shadow: var(--shadow-inset-sm); transform: scale(0.95); }

.comment-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.comment-captcha { display: flex; align-items: center; gap: 10px; }
.captcha-img {
  height: 36px; border-radius: 10px; box-shadow: var(--shadow-sm);
  cursor: pointer; overflow: hidden;
}

/* Comment List */
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-item { display: flex; gap: 14px; }
.comment-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-avatar-default {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.95rem; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.comment-body {
  flex: 1; padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
  border: var(--surface-border);
}
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.comment-author { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); }
.comment-admin { background: var(--accent); color: white; padding: 1px 8px; border-radius: var(--radius-full); font-size: 0.68rem; font-weight: 600; }
.comment-date { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }
.comment-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }
.comment-text img.emoji-in-comment { display: inline; width: 22px; height: 22px; vertical-align: middle; }
.comment-reply-btn {
  margin-top: 8px; padding: 3px 10px;
  border: none; cursor: pointer;
  background: var(--bg); box-shadow: var(--shadow-sm);
  border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); transition: var(--transition-fast);
}
.comment-reply-btn:hover { color: var(--accent); box-shadow: var(--shadow-md); }

/* Child comments */
.comment-children { margin-left: 56px; margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.comment-children .comment-body { background: var(--bg); }

/* === PAGE === */
.page-content { padding: 36px; }
.page-title { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 700; margin-bottom: 24px; }

/* === ARCHIVE === */
.archive-year {
  font-size: 1.8rem; font-weight: 800; color: var(--text-primary);
  margin-bottom: 16px; opacity: 0.15;
}
.archive-item {
  display: flex; align-items: baseline; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.archive-month {
  font-size: 1.1rem; font-weight: 800; color: var(--accent);
  margin: 24px 0 8px; padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-soft);
}
.archive-list { margin-bottom: 8px; }
.archive-date { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; font-weight: 600; min-width: 100px; }
.archive-title { font-size: 0.92rem; font-weight: 600; color: var(--text-primary); }
.archive-title:hover { color: var(--accent); }

/* === SEARCH === */
.search-results-header {
  padding: 24px; margin-bottom: 20px;
  background: var(--bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-inset-sm);
}
.search-results-header strong { color: var(--accent); }

/* === 404 === */
.error-page {
  text-align: center; padding: 80px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.error-code {
  font-size: 6rem; font-weight: 900;
  background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1;
}
.error-title { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.error-desc { color: var(--text-secondary); font-size: 0.95rem; }

/* === FOOTER === */
#site-footer {
  padding: 24px 20px 24px;
  background: transparent;
  position: relative;
  z-index: 2;
}
.footer-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 36px 32px 22px;
  border-radius: var(--grove-radius);
  background: linear-gradient(160deg, var(--grove-dark) 0%, #1e3d18 100%);
  box-shadow: 0 -4px 24px rgba(28,61,24,0.15);
  border: none;
  overflow: hidden;
  position: relative;
}
.footer-shell::before {
  content: '🌿';
  position: absolute;
  right: 28px;
  bottom: 52px;
  font-size: 2.8rem;
  opacity: 0.18;
  pointer-events: none;
  line-height: 1;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 24px 20px;
  padding-bottom: 22px;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 12px;
}
.footer-logo-mark {
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
}
.footer-logo--img .footer-logo-mark {
  width: auto !important;
  min-width: 38px;
  max-width: 120px;
  height: 38px !important;
  padding: 3px 6px !important;
  background: rgba(255,255,255,0.12) !important;
}
.footer-logo--img .footer-logo-mark img {
  width: auto !important;
  height: 100% !important;
  max-width: 100%;
  object-fit: contain !important;
}
.footer-brand .logo-name { color: #fff; }
.footer-brand p {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  margin-bottom: 14px;
  max-width: 280px;
}
.footer-social { justify-content: flex-start; }
.footer-col-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  padding-top: 2px;
}
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s ease, transform 0.2s ease;
  position: relative;
  width: fit-content;
  padding-bottom: 2px;
}
.footer-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--grove-bright);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-links a:hover { color: #fff; transform: translateX(3px); }
.footer-links a:hover::after { width: 100%; }

.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
}
.footer-contact-item i {
  color: var(--grove-bright);
  width: 16px;
  text-align: center;
}
.footer-contact-empty { color: rgba(255,255,255,0.45); font-size: 0.78rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.45);
}
.footer-copyright, .footer-credits { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.footer-sep { opacity: 0.45; margin: 0 2px; }
.footer-bottom a { color: rgba(255,255,255,0.5); transition: color 0.2s ease; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom strong { color: var(--grove-bright); font-weight: 600; }

.footer-shell .social-link {
  background: rgba(255,255,255,0.1);
  box-shadow: none;
  color: rgba(255,255,255,0.75);
}
.footer-shell .social-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

/* 插件页脚挂载点：避免在 footer 外撑出空白 */
.footer-hook { margin-top: 12px; font-size: 0.76rem; color: var(--text-muted); }
.footer-hook:empty { display: none; margin: 0; }
/* 隐藏 emlog / 插件在页脚外注入的多余节点，防止撑出空白滚动区 */
body > .poweredby,
body > .emlog-powered,
body > p:empty,
body > div:empty:not(.m-search-overlay):not(#page-shell) {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

/* 归档页 */
.archive-page-card { padding: 28px 32px; }
.archive-page-header { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.archive-page-icon {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  color: white; font-size: 1.3rem;
}
.archive-page-title { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.archive-page-meta { font-size: 0.85rem; color: var(--text-secondary); }
.archive-empty { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* === 动效 === */
@keyframes neo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes neo-pulse-soft {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.55; }
}
@keyframes back-top-in {
  from { opacity: 0; transform: translateY(14px) scale(0.88); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.comment-empty i { animation: neo-float 3.2s ease-in-out infinite; }
.social-link { transition: box-shadow 0.22s ease, transform 0.22s ease, color 0.2s ease; }
.social-link:hover { transform: translateY(-2px); }
.social-link:active { transform: scale(0.94); box-shadow: var(--shadow-inset-sm); }
.post-card { transition: box-shadow 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1); }
.post-card:hover { transform: translateY(-3px); }
#toggle-dark { transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1); }
#toggle-dark:active { transform: rotate(-18deg) scale(0.92); }

/* === LOADING === */
.neo-skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-light) 50%, var(--bg-card) 75%);
  background-size: 200% 100%; animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-loading { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* === BACK TO TOP === */
#back-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, var(--grove-mid), var(--grove-light));
  color: white;
  border: none; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(45,92,39,0.35);
  transition: box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.3, 0.64, 1);
  opacity: 0; transform: translateY(20px) scale(0.9); pointer-events: none;
  z-index: 800;
}
#back-top.show {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
  animation: back-top-in 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
}
#back-top:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-lg); }
#back-top:active { transform: scale(0.94); box-shadow: var(--shadow-inset-sm); }

/* === MOBILE MENU === */
.mobile-nav {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(232,234,240,0.96); backdrop-filter: blur(10px);
  z-index: 950; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 1.5rem; font-weight: 800; color: var(--text-primary);
  padding: 10px 30px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.mobile-nav a:hover { color: var(--accent); box-shadow: var(--shadow-md); }
.mobile-nav-close {
  position: absolute; top: 20px; right: 20px;
  background: var(--bg); box-shadow: var(--shadow-sm);
  border: none; cursor: pointer;
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--text-secondary);
}

/* === READING PROGRESS === */
#reading-progress {
  position: fixed; top: 0; left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--grove-mid), var(--grove-bright));
  z-index: 9999; width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* === TOC === */
.toc-card { padding: 20px; }
.toc-list { display: flex; flex-direction: column; gap: 4px; }
.toc-item {
  padding: 6px 12px; border-radius: 8px;
  font-size: 0.82rem; color: var(--text-secondary);
  transition: var(--transition-fast); cursor: pointer;
  border-left: 2px solid transparent;
}
.toc-item:hover, .toc-item.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
.toc-item.h3 { padding-left: 24px; }
.toc-item.h4 { padding-left: 36px; }

/* === DARK MODE === */
[data-theme="dark"] {
  --bg: #12181a;
  --bg-light: #1a2226;
  --bg-card: #1e262b;
  --shadow-light: #2a3439;
  --shadow-dark: #0a0e10;
  --text-primary: #e4ebe2;
  --text-secondary: #9cad98;
  --text-muted: #6d7f6a;
  --accent-soft: rgba(109,181,96,0.15);

  --grove-pale: #12181a;
  --grove-card: #1e262b;
  --grove-white: #252e33;
  --grove-dark: #e4ebe2;
  --grove-text: #e4ebe2;
  --grove-sub: #9cad98;
  --grove-muted: #6d7f6a;
  --grove-border: rgba(109,181,96,0.14);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.35);
}
[data-theme="dark"] body::before {
  opacity: 0.22;
  background:
    radial-gradient(ellipse 70% 50% at 5% -5%, rgba(61,122,54,0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 98% 2%, rgba(45,92,39,0.08), transparent 50%);
}
[data-theme="dark"] #site-header {
  background: rgba(18,24,26,0.96);
  border-bottom-color: var(--grove-border);
}
[data-theme="dark"] #site-header.scrolled {
  background: rgba(18,24,26,0.98);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
[data-theme="dark"] .neo-btn-icon {
  background: var(--grove-white);
  color: var(--grove-bright);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
[data-theme="dark"] .site-nav a:hover,
[data-theme="dark"] .site-nav a.current {
  background: var(--grove-white);
  color: var(--grove-bright);
}
[data-theme="dark"] .page-home .post-card--home {
  box-shadow: 0 3px 14px rgba(0,0,0,0.28);
}
[data-theme="dark"] .page-home .post-card--home:hover {
  box-shadow: 0 6px 22px rgba(0,0,0,0.38);
}
[data-theme="dark"] .m-cat-tab {
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}
[data-theme="dark"] .m-cat-tab.active {
  box-shadow: 0 4px 14px rgba(45,92,39,0.35);
}
[data-theme="dark"] .m-creator-card {
  box-shadow: 0 3px 14px rgba(0,0,0,0.25);
}
[data-theme="dark"] .page-home .neo-pagination a,
[data-theme="dark"] .page-home .neo-pagination span {
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}
[data-theme="dark"] .site-logo--img .logo-mark {
  background: var(--grove-white);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .site-wrapper { grid-template-columns: 1fr; }
  .content-side { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 768px) {
  .site-nav { display: none; }
  .mobile-toggle { display: flex; }
  .post-card { grid-template-columns: 1fr; }
  .post-card-thumb { aspect-ratio: 16/9; }
  .form-row { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .header-inner { height: 60px; }
  .post-title { font-size: 1.5rem; }
  .post-header, .post-content, .post-footer, .comments-section { padding-left: 20px; padding-right: 20px; }
  .footer-top { grid-template-columns: 1fr; gap: 18px; padding-bottom: 18px; }
  .footer-shell { padding: 28px 18px 18px; }
  #site-footer { padding: 24px 12px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .hero-title { font-size: 1.3rem; }
  /* 防止搜索框在小屏上撑爆 header */
  .search-input-header.open { width: min(180px, 38vw); margin-right: 6px; }
  /* 文章内容横向溢出保护 */
  .post-content { overflow-x: hidden; }
  .post-content pre { overflow-x: auto; }
  .post-content table { display: block; overflow-x: auto; }
  .post-content img { max-width: 100%; }
  /* 加大移动端点击区域 */
  .neo-btn-icon { width: 44px; height: 44px; }
  /* 评论表单在极小屏适配 */
  .comment-submit-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 480px) {
  .site-wrapper { padding: 16px; }
  .author-stats { grid-template-columns: repeat(3, 1fr); }
  /* hero post 在极小屏给更多高度感 */
  .hero-post { aspect-ratio: 4/3; }
  .hero-title { font-size: 1.1rem; }
}

/* === Emlog 原生分页兼容 === */
.neo-pagination { display:flex;justify-content:center;gap:8px;margin-top:36px;flex-wrap:wrap; }
.neo-pagination a, .neo-pagination span {
  display:inline-flex;align-items:center;justify-content:center;
  min-width:40px;height:40px;padding:0 10px;
  border-radius:12px;font-weight:700;font-size:.9rem;
  background:var(--bg-card);box-shadow:var(--shadow-sm);
  color:var(--text-secondary);text-decoration:none;transition:var(--transition);
}
.neo-pagination a:hover { box-shadow:var(--shadow-md);color:var(--accent); }
.neo-pagination .current, .neo-pagination a.active {
  background:var(--accent-gradient);color:#fff;
  box-shadow:0 4px 14px rgba(108,142,245,.4);
}
/* 评论树缩进 */
.comment-children { margin-left:56px;margin-top:10px;display:flex;flex-direction:column;gap:10px; }
/* 置顶标记 */
.neo-top-badge {
  display:inline-flex;align-items:center;gap:4px;
  padding:2px 10px;border-radius:20px;font-size:.72rem;font-weight:700;
  background:var(--accent-gradient);color:white;margin-left:8px;
}
/* post-tags 内 Emlog 原生标签链接 */
.post-tags a { display:inline-flex;padding:3px 12px;border-radius:20px;background:var(--bg);box-shadow:var(--shadow-sm);font-size:.78rem;font-weight:600;color:var(--text-secondary);text-decoration:none;margin:2px;transition:var(--transition-fast); }
.post-tags a:hover { color:var(--accent);box-shadow:var(--shadow-md); }
/* blog_sort / blog_tag / blog_author 输出的链接 */
.post-card-cat a, .post-card-tags a { text-decoration:none; }
.hero-cat-wrap a { color:white;text-decoration:none;font-size:.78rem;font-weight:700; }
/* 修复顶部搜索和深色模式按钮的垂直对齐 */
.header-actions { display: flex; align-items: center; gap: 12px; }
.search-wrap { display: flex; align-items: center; position: relative; }

/* 强制覆盖沉重的衬线字体，统一使用现代、圆润的无衬线字体，贴合拟物风 */
:root {
  --font-serif: var(--font-sans) !important;
}
.post-title, .post-content h1, .post-content h2, .post-content h3, .post-content h4, .hero-title {
  font-family: var(--font-sans) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

/* 修复首页缩略图无法填满高度留白的问题 */
.post-card { align-items: stretch; }
.post-card-thumb { height: 100%; aspect-ratio: auto; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 手机端恢复常规比例 */
@media (max-width: 768px) {
  .post-card-thumb { height: auto; aspect-ratio: 16/9; }
}

/* 修复 echo_log / page 页中侧边栏嵌套时内层 aside 不应再 sticky */
.content-side .content-side,
.sidebar .content-side {
  position: static !important;
}

/* 移动端菜单打开时锁定滚动（仅 html 作为滚动容器） */
html:has(body.mobile-nav-open) {
  overflow: hidden;
}
body.mobile-nav-open {
  overflow: hidden;
}

/* --- 移动端强制适配优化 --- */
@media (max-width: 768px) {
  /* 防止任何元素撑破屏幕产生横向滚动条 */
  html, body { overflow-x: clip !important; width: 100%; max-width: 100vw; }
  main, .site-wrapper, .content-main { overflow: visible !important; }
  
  /* 缩小整体外边距和间距 */
  .site-wrapper { padding: 12px; gap: 16px; width: 100%; box-sizing: border-box; }
  
  /* 强制缩减卡片内边距，释放屏幕空间 */
  .neo-card { padding: 16px !important; }
  .post-card-body { padding: 16px !important; }
  .post-content { padding: 16px !important; word-wrap: break-word; word-break: break-all; }
  .post-header { padding: 20px 16px 0 !important; }
  .post-footer { padding: 16px !important; }
  .post-share { width: 100%; box-sizing: border-box; justify-content: flex-start; }
  .share-btn { width: 36px; height: 36px; font-size: 0.95rem; }
  .comments-section { padding: 0 16px 16px !important; }
  .hero-overlay { padding: 20px; }
  
  /* 调整移动端标题字号和排版 */
  .post-title { font-size: 1.35rem !important; }
  .hero-title { font-size: 1.25rem !important; }
  .post-meta-bar { padding: 12px 16px !important; gap: 10px; }
  
  /* 保证文章内图片绝对不超宽 */
  .post-content img { max-width: 100% !important; height: auto !important; }
}

/* ============================================================
   GROVE 全站统一风格（PC + 移动）
   ============================================================ */

.hero-post.pc-only { display: none !important; }

.m-bottom-nav,
.m-search-overlay { display: none; }

/* ========== 首页 · Grove 移动风（PC / 移动统一） ========== */

/* --- Hero --- */
.m-grove-hero {
  display: block;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 28px 24px 32px;
  border-radius: var(--grove-radius);
  background: linear-gradient(145deg, var(--grove-dark) 0%, var(--grove-mid) 60%, var(--grove-light) 100%);
  border: none;
  box-shadow: 0 8px 32px rgba(28,61,24,0.3);
}
.m-grove-hero-deco {
  position: absolute;
  right: -20px; top: -20px;
  width: 160px; height: 160px;
  pointer-events: none;
  opacity: 0.6;
}
.m-deco-leaf { width: 100%; height: 100%; }
.m-grove-hero-content { position: relative; z-index: 2; }
.m-grove-hero-label {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
  font-size: 0.75rem; font-weight: 600;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
}
.m-grove-hero-title {
  font-size: clamp(1.85rem, 6vw, 2.4rem);
  font-weight: 900; color: #fff;
  line-height: 1.15; margin-bottom: 10px;
  letter-spacing: -0.03em;
  font-family: var(--font-sans) !important;
}
.m-grove-hero-desc {
  font-size: 0.85rem; color: rgba(255,255,255,0.7);
  margin-bottom: 22px; line-height: 1.5;
  max-width: 480px;
}
.m-grove-hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.m-grove-btn-primary,
.m-grove-btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 0.88rem; font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.m-grove-btn-primary {
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(8px);
  color: #fff;
  box-shadow: none;
}
.m-grove-btn-primary:hover { background: rgba(255,255,255,0.28); color: #fff; }
.m-grove-btn-secondary {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
}
.m-grove-btn-secondary:hover { color: #fff; border-color: rgba(255,255,255,0.4); }

/* --- 分类导航（竖向图标 + 横向滚动） --- */
.m-cat-tabs-wrap { padding: 16px 0 4px; overflow: hidden; }
.m-cat-tabs {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.m-cat-tabs::-webkit-scrollbar { display: none; }
.m-cat-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  border-radius: 16px;
  background: var(--grove-white);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  color: var(--grove-sub);
  font-size: 0.78rem; font-weight: 600;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(30,70,25,0.08);
  flex-shrink: 0;
}
.m-cat-tab.active {
  background: var(--grove-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(28,61,24,0.25);
}
.m-cat-tab:hover:not(.active) {
  color: var(--grove-mid);
  box-shadow: 0 4px 12px rgba(30,70,25,0.12);
}
.m-cat-icon { font-size: 1.2rem; line-height: 1; }

/* --- 首页容器 --- */
.page-home-top {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 20px 0;
}
.page-home-top .m-grove-hero,
.page-home-top .m-cat-tabs-wrap {
  max-width: none;
  margin: 0;
}

.page-home-body {
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 20px 32px;
}

/* 首页博主卡 */
.page-home .home-creator {
  margin: 0 0 4px;
  padding: 0;
}
.page-home .home-creator .m-section-header {
  padding: 8px 0 10px;
  margin: 0;
}

.page-home .site-wrapper.home-layout {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.page-home .content-main {
  padding: 0;
  min-width: 0;
  border: none;
}
.page-home .content-side {
  position: static;
  min-width: 0;
  padding: 0;
  background: transparent;
}
.page-home .sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  padding: 0;
}
.page-home .sidebar .neo-card,
.page-home .sidebar .side-card { display: none; }

/* --- 区块标题 --- */
.page-home .m-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 16px 0 8px;
  max-width: none;
}
.page-home .m-section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0;
  font-size: 1rem; font-weight: 800;
  color: var(--grove-dark);
}
.m-section-icon { font-size: 1.1rem; }
.page-home .m-section-more {
  display: inline-flex; align-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.82rem; font-weight: 600;
  color: var(--grove-light);
  text-decoration: none;
  transition: color 0.2s ease;
}
.page-home .m-section-more:hover {
  background: transparent;
  color: var(--grove-mid);
}

/* --- 文章卡片 · 2 列 --- */
.page-home .post-list.m-post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 4px 0 16px;
}
.page-home .post-card--home {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--grove-white);
  border: none;
  border-radius: var(--grove-radius-sm);
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(30,70,25,0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.page-home .post-card--home:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(30,70,25,0.14);
}
.page-home .post-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}
.page-home .post-card-thumb {
  position: relative;
  width: 100%;
  height: 110px;
  aspect-ratio: auto;
  overflow: hidden;
  background: var(--grove-pale);
  flex-shrink: 0;
}
.page-home .post-card-thumb .m-post-no-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m-post-no-cover-icon {
  font-size: 1.8rem;
  opacity: 0.7;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}
.page-home .post-card-cover-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.page-home .post-card--home:hover .post-card-cover-img { transform: scale(1.04); }
.page-home .post-card-cover-img.is-broken { display: none !important; }

.page-home .post-card--home .post-card-body {
  position: relative;
  z-index: 2;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}
.page-home .post-card--home .post-card-cat {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--grove-light);
  margin: 0 0 4px;
  pointer-events: auto;
  position: relative;
  z-index: 4;
}
.page-home .post-card--home .post-card-cat a {
  color: var(--grove-light);
  text-decoration: none;
}
.page-home .post-card--home .post-card-cat a:hover { color: var(--grove-mid); }
.page-home .post-card--home .post-card-title {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--grove-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page-home .post-card--home .post-card-title a {
  color: inherit;
  text-decoration: none;
}
.page-home .post-card--home .post-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--grove-muted);
  flex-wrap: wrap;
}
.page-home .post-card-meta-dot { opacity: 0.5; }

.page-home .home-empty {
  grid-column: 1 / -1;
  padding: 48px 20px;
  text-align: center;
  color: var(--grove-muted);
}
.page-home .home-empty-icon { font-size: 2.5rem; display: block; margin-bottom: 10px; }

.page-home .home-pagination {
  margin: 16px 0 0;
  padding-top: 0;
}

/* --- 侧栏 Grove 模块 --- */
.home-creator,
.page-home .home-creator { display: block; }
.m-creator-section { display: none; }

.page-home .m-creator-section {
  max-width: none;
  margin: 0;
  padding: 0;
}
.page-home .m-creator-section .m-section-header {
  padding: 0 0 10px;
}
.m-creator-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--grove-white);
  border: none;
  border-radius: var(--grove-radius-sm);
  box-shadow: 0 3px 14px rgba(30,70,25,0.08);
}
.m-creator-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(30,70,25,0.12);
}
.m-creator-avatar img { width: 100%; height: 100%; object-fit: cover; }
.m-creator-avatar-default {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--grove-mid), var(--grove-light));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 1.1rem;
}
.m-creator-info { flex: 1; min-width: 0; }
.m-creator-name { font-size: 0.9rem; font-weight: 700; color: var(--grove-dark); margin-bottom: 2px; }
.m-creator-meta {
  font-size: 0.72rem; color: var(--grove-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.m-creator-follow-btn {
  padding: 7px 16px;
  background: var(--grove-dark);
  color: white;
  border-radius: 100px;
  font-size: 0.78rem; font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.m-creator-follow-btn:hover { background: var(--grove-mid); color: white; }

.page-home .neo-pagination a,
.page-home .neo-pagination span {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--grove-white);
  border: none;
  color: var(--grove-sub);
  box-shadow: 0 2px 8px rgba(30,70,25,0.08);
  font-weight: 700;
  font-size: 0.82rem;
}
.page-home .neo-pagination .current,
.page-home .neo-pagination a.active {
  background: var(--grove-mid);
  color: white;
  box-shadow: 0 4px 14px rgba(45,92,39,0.3);
}

.tag-chip, .tag-cloud-item {
  background: var(--grove-pale);
  color: var(--grove-sub);
  box-shadow: none;
  border: 1px solid var(--grove-border);
}
.tag-chip:hover, .tag-cloud-item:hover { color: var(--grove-mid); }

.mobile-nav {
  background: rgba(232,245,227,0.97);
}
.mobile-nav a { color: var(--grove-dark); }
.mobile-nav a:hover { color: var(--grove-mid); }

/* --- PC 首页加宽 + 多列 --- */
@media (min-width: 769px) {
  .mobile-toggle { display: none; }
  .site-nav { display: flex; }
  .m-bottom-nav { display: none !important; }
  #site-footer { padding: 28px 20px 20px; }
  .footer-top { grid-template-columns: 1.6fr repeat(3, 1fr); }
  #back-top { bottom: 24px; }

  .page-home-top { padding: 24px 24px 0; }
  .page-home-body { padding: 16px 24px 36px; }

  .page-home .post-list.m-post-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .page-home .post-card--home .post-card-thumb {
    height: 140px;
  }
  .page-home .post-card--home .post-card-body {
    padding: 12px 14px 14px;
  }
  .page-home .post-card--home .post-card-title {
    font-size: 0.88rem;
  }
}

@media (min-width: 1100px) {
  .page-home .post-list.m-post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-home .post-card--home .post-card-thumb {
    height: 160px;
  }
}

/* 清理旧规则占位 — 以下保留全局 m-section 供非首页引用 */
.m-section-header {
  display: flex; align-items: center; justify-content: space-between;
}
.m-section-more { text-decoration: none; color: var(--grove-light); font-weight: 600; }
.m-section-more:hover { color: var(--grove-mid); }

/* --- 以下旧首页样式块已合并至上方，保留占位避免重复定义 --- */
.home-layout-legacy { display: none; }

/* --- 文章详情 / 内页 --- */
#single-post .post-header {
  background: linear-gradient(to bottom, var(--grove-pale), var(--grove-white));
}
.post-title { color: var(--grove-dark); }
.post-meta-bar .cat-badge { background: var(--grove-mid); }
.post-content a { color: var(--grove-light); }
.post-content blockquote { border-left-color: var(--grove-light); }

/* ============================================================
   GROVE 移动端补充样式
   ============================================================ */
@media (max-width: 768px) {

  body { padding-bottom: 70px; }

  .page-home .m-creator-section .m-section-header {
    padding: 0 0 10px !important;
    margin: 0;
  }

  /* === 基础色彩覆盖 === */
  body {
    background-color: var(--grove-pale) !important;
  }

  /* === Header === */
  #site-header {
    background: var(--grove-pale) !important;
    border-bottom: 1px solid var(--grove-border);
    padding: 0 16px;
    box-shadow: none !important;
  }
  #site-header.scrolled {
    box-shadow: 0 2px 12px rgba(30,70,25,0.1) !important;
    background: rgba(232,245,227,0.96) !important;
    backdrop-filter: blur(12px);
  }
  [data-theme="dark"] #site-header.scrolled {
    background: rgba(18,24,26,0.98) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35) !important;
  }
  .header-inner { height: 56px; }

  .logo-name { color: var(--grove-dark) !important; font-size: 1rem !important; }
  .logo-mark {
    background: var(--grove-mid) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
  }
  .site-logo--img .logo-mark {
    background: var(--grove-white) !important;
  }
  .logo-desc { color: var(--grove-sub) !important; }

  .neo-btn-icon {
    background: var(--grove-white) !important;
    box-shadow: 0 2px 8px rgba(30,70,25,0.1) !important;
    color: var(--grove-mid) !important;
  }
  .neo-btn-icon:hover { color: var(--grove-light) !important; }

  /* 隐藏桌面元素 */
  .site-nav, #toggle-dark { display: none !important; }
  .hero-post.pc-only { display: none !important; }

  /* 首页 Grove 样式已在全端统一块定义，此处仅保留内页移动适配 */

  /* === 主布局覆盖（内页） === */
  .site-wrapper {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
    gap: 0 !important;
    max-width: 100% !important;
  }
  .content-main { padding: 0 !important; }
  .content-side { position: static !important; }

  /* 分页在移动端 */
  .neo-pagination {
    margin: 8px 16px 16px !important;
  }
  .neo-pagination a, .neo-pagination span {
    background: var(--grove-white) !important;
    color: var(--grove-sub) !important;
    box-shadow: 0 2px 8px rgba(30,70,25,0.08) !important;
  }
  .neo-pagination .current, .neo-pagination a.active {
    background: var(--grove-mid) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(45,92,39,0.3) !important;
  }

  /* === 侧边栏在移动端（内页隐藏桌面卡片） === */
  .sidebar { gap: 0 !important; padding: 0 !important; }
  .sidebar .neo-card,
  .sidebar .side-card { display: none !important; }

  /* 非首页也显示 Grove 侧栏模块（仅移动） */
  .m-creator-section { display: block !important; padding: 8px 16px 0; }

  /* === 底部导航栏 === */
  .m-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 62px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(45,92,39,0.1);
    padding: 0 8px;
    z-index: 800;
    box-shadow: 0 -4px 20px rgba(30,70,25,0.08);
    justify-content: space-around;
    align-items: center;
  }
  .m-bottom-nav-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 3px;
    padding: 8px 12px;
    color: var(--grove-muted);
    text-decoration: none;
    font-size: 0.6rem; font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s;
    min-width: 48px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
  }
  .m-bottom-nav-item i { font-size: 1.1rem; }
  .m-bottom-nav-item.active, .m-bottom-nav-item:hover {
    color: var(--grove-mid);
    background: var(--grove-pale);
  }

  /* === 移动端搜索浮层 === */
  .m-search-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 950;
    background: rgba(28,61,24,0.5);
    backdrop-filter: blur(8px);
    align-items: flex-start;
    padding-top: 60px;
  }
  .m-search-overlay.open { display: flex !important; }
  .m-search-inner { width: 100%; padding: 0 16px; }
  .m-search-box {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(28,61,24,0.2);
  }
  .m-search-box i { color: var(--grove-light); font-size: 1rem; }
  .m-search-box input {
    flex: 1; border: none; outline: none;
    font-size: 1rem; font-family: var(--font-sans);
    color: var(--grove-dark);
    background: transparent;
  }
  .m-search-box input::placeholder { color: var(--grove-muted); }
  .m-search-close {
    background: var(--grove-pale); border: none;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer; font-size: 0.85rem;
    color: var(--grove-sub);
    display: flex; align-items: center; justify-content: center;
  }

  /* === body 底部留白（避免被底栏遮挡） === */
  body { padding-bottom: 70px; }

  /* === footer 移动端 === */
  #site-footer {
    background: transparent !important;
    padding: 0 12px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .footer-shell {
    background: linear-gradient(160deg, var(--grove-dark) 0%, #1e3d18 100%) !important;
    box-shadow: 0 -4px 24px rgba(28,61,24,0.15) !important;
    border: none !important;
    padding: 24px 18px 14px !important;
  }
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding-bottom: 16px !important;
  }
  .footer-brand .logo-name { color: white !important; }
  .footer-brand p { color: rgba(255,255,255,0.65) !important; max-width: none; }
  .footer-col-title { color: rgba(255,255,255,0.5) !important; }
  .footer-links a { color: rgba(255,255,255,0.75) !important; }
  .footer-links a:hover { color: white !important; }
  .footer-links a::after { background: var(--grove-bright); }
  .footer-contact-item { color: rgba(255,255,255,0.75) !important; }
  .footer-contact-item i { color: var(--grove-bright) !important; }
  .footer-contact-empty { color: rgba(255,255,255,0.45) !important; }
  .footer-bottom {
    border-top-color: rgba(255,255,255,0.12) !important;
    color: rgba(255,255,255,0.45) !important;
    padding-top: 12px !important;
  }
  .footer-bottom a { color: rgba(255,255,255,0.5) !important; }
  .footer-bottom a:hover { color: white !important; }
  .footer-bottom strong { color: var(--grove-bright) !important; }
  .social-link {
    background: rgba(255,255,255,0.1) !important;
    box-shadow: none !important;
    color: rgba(255,255,255,0.75) !important;
  }
  .social-link:hover { color: white !important; background: rgba(255,255,255,0.18) !important; }

  /* === 文章详情页移动端 === */
  #single-post {
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }
  #single-post .post-header {
    background: linear-gradient(to bottom, var(--grove-pale), white);
    padding: 20px 18px 0 !important;
  }
  #single-post .post-featured-img {
    margin: 16px 16px 0 !important;
    border-radius: var(--grove-radius-sm) !important;
  }
  .post-title {
    color: var(--grove-dark) !important;
    font-size: 1.4rem !important;
  }
  .post-meta-bar .cat-badge {
    background: var(--grove-mid) !important;
  }
  .post-content a { color: var(--grove-light) !important; }
  .post-content blockquote { border-left-color: var(--grove-light) !important; }

  /* === neo-card 移动端改色 === */
  .neo-card {
    background: var(--grove-white) !important;
    box-shadow: 0 3px 14px rgba(30,70,25,0.08) !important;
    border-radius: var(--grove-radius-sm) !important;
  }
  .neo-card:hover { box-shadow: 0 6px 22px rgba(30,70,25,0.12) !important; }

  /* === 颜色变量覆盖（移动端） === */
  body {
    --accent:           var(--grove-light);
    --accent2:          var(--grove-mid);
    --accent-gradient:  linear-gradient(135deg, var(--grove-mid) 0%, var(--grove-light) 100%);
    --accent-soft:      rgba(74,140,66,0.1);
    --bg:               var(--grove-pale);
    --bg-card:          var(--grove-white);
    --bg-light:         var(--grove-card);
    --text-primary:     var(--grove-dark);
    --text-secondary:   var(--grove-sub);
    --text-muted:       var(--grove-muted);
    --shadow-sm:        0 2px 8px rgba(30,70,25,0.08);
    --shadow-md:        0 4px 16px rgba(30,70,25,0.12);
    --shadow-lg:        0 8px 28px rgba(30,70,25,0.16);
  }

  /* neo-btn 绿色 */
  .neo-btn {
    background: linear-gradient(135deg, var(--grove-mid), var(--grove-light)) !important;
    box-shadow: 0 4px 12px rgba(45,92,39,0.3) !important;
  }
  .neo-btn:hover { box-shadow: 0 6px 18px rgba(45,92,39,0.4) !important; }

  /* tag chips */
  .tag-chip, .tag-cloud-item {
    background: var(--grove-pale) !important;
    color: var(--grove-sub) !important;
    box-shadow: 0 1px 4px rgba(30,70,25,0.1) !important;
  }
  .tag-chip:hover, .tag-cloud-item:hover { color: var(--grove-mid) !important; }

  /* cat items */
  .cat-item { background: var(--grove-pale) !important; box-shadow: 0 2px 8px rgba(30,70,25,0.08) !important; }
  .cat-item:hover { color: var(--grove-mid) !important; }
  .cat-count { background: rgba(74,140,66,0.12) !important; color: var(--grove-light) !important; }

  /* reading progress bar */
  #reading-progress { background: linear-gradient(to right, var(--grove-mid), var(--grove-bright)) !important; }

  /* back-to-top */
  #back-top {
    background: linear-gradient(135deg, var(--grove-mid), var(--grove-light)) !important;
    box-shadow: 0 4px 16px rgba(45,92,39,0.35) !important;
    bottom: 80px; /* 在底栏上方 */
  }

  /* 公告栏 */
  #announcement-bar { background: linear-gradient(135deg, var(--grove-mid), var(--grove-light)) !important; }

  /* 移动端导航滑出菜单 */
  .mobile-nav {
    background: rgba(232,245,227,0.97) !important;
  }
  .mobile-nav a { color: var(--grove-dark) !important; }
  .mobile-nav a:hover { color: var(--grove-mid) !important; }
}

/* ============================================================
   超小屏 (≤400px) 优化
   ============================================================ */
@media (max-width: 400px) {
  .m-grove-hero-title { font-size: 2rem; }
  .page-home .post-list.m-post-grid { gap: 8px; }
  .page-home .post-card--home .post-card-thumb { height: 90px; }
  .page-home-top { padding: 12px 12px 0; }
  .page-home-body { padding: 10px 12px 20px; }
}
