/*
Theme Name: WeMedia H5 v4.0
Theme URI: http://ai.jxgzhc.cn
Author: AI观察
Author URI: http://ai.jxgzhc.cn
Description: 微信公众号 H5 风格 + 网易宽幅排版 — 顶底栏 / 听全文 / 留言 / 关注 / 点赞
Version: 4.1.3
License: MIT
Text Domain: wemedia-h5
Tags: we-media, masonry, dark-mode, minimalist, editorial, blog, news
*/

/* ================================================================
   DESIGN TOKENS — 4pt spacing · monochromatic + single accent
   ================================================================ */
:root {
  /* Spacing (4pt base) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code", "Consolas", monospace;
  --fs-xs: 0.7rem;
  --fs-sm: 0.8rem;
  --fs-base: 0.95rem;
  --fs-md: 1.05rem;
  --fs-lg: 1.2rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.6rem;
  --fs-display: clamp(2rem, 5vw, 3.5rem);
  --lh-tight: 1.2;
  --lh-normal: 1.55;
  --lh-relaxed: 1.7;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms;
  --t-normal: 300ms;
  --t-slow: 500ms;
  --t-glacial: 800ms;

  /* Colors — Light (default) */
  --bg: #f9f8f6;
  --bg-alt: #f3f2ef;
  --surface: #ffffff;
  --surface-hover: #fafaf9;
  --text-primary: #1a1a1a;
  --text-secondary: #525252;
  --text-tertiary: #8c8c8c;
  --text-muted: #b0b0b0;
  --border-light: #ecebe8;
  --border: #dcd9d4;
  --border-strong: #c4c0b9;
  --accent: #1d4ed8;
  --accent-light: #dbeafe;
  --accent-hover: #1e40af;
  --accent-text: #1d4ed8;
  --success: #059669;
  --warn: #d97706;
  --divider: #e8e6e2;
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #0b0b0b;
  --bg-alt: #111111;
  --surface: #171717;
  --surface-hover: #1e1e1e;
  --text-primary: #ededed;
  --text-secondary: #a0a0a0;
  --text-tertiary: #6b6b6b;
  --text-muted: #444444;
  --border-light: #222222;
  --border: #2a2a2a;
  --border-strong: #363636;
  --accent: #3b82f6;
  --accent-light: #1e293b;
  --accent-hover: #60a5fa;
  --accent-text: #60a5fa;
  --divider: #1f1f1f;
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--t-normal) var(--ease-out);
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
ul, ol { list-style: none; }
button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
input, textarea {
  font: inherit;
  color: inherit;
}

/* ================================================================
   LAYOUT — Container & Grid
   ================================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--space-xl); }
}
@media (min-width: 1280px) {
  .container { padding: 0 var(--space-2xl); }
}

/* Full-width container — for masonry sections */
.container--fullwidth {
  max-width: none !important;
}
@media (min-width: 768px) {
  .container--fullwidth { padding: 0 var(--space-xl); }
}
@media (min-width: 1280px) {
  .container--fullwidth { padding: 0 var(--space-2xl); }
}

/* ================================================================
   READING PROGRESS BAR
   ================================================================ */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 10001;
  background: transparent;
  pointer-events: none;
}
.reading-progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* ================================================================
   HEADER — Ultra-minimal
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  transition: background var(--t-normal) var(--ease-out);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
@media (min-width: 768px) {
  .site-header .container { height: 64px; }
}

.site-branding {
  flex-shrink: 0;
}

/* ---- Logo SVG ---- */
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.site-logo-svg {
  display: block;
  height: 32px;
  width: auto;
}
.logo-badge {
  fill: var(--accent);
}
.logo-badge-text {
  fill: #ffffff;
}
.logo-name {
  fill: var(--text-primary);
}

/* 点击反馈 */
.site-logo:active .logo-badge {
  fill: var(--accent-dark, var(--accent));
  opacity: 0.85;
}

/* 保留 .site-title 给移动端菜单使用 */
.site-title {
  font-size: 1.15rem;
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.site-title a { transition: color var(--t-fast) var(--ease-out); }
.site-title a:hover { color: var(--accent); }

.desktop-nav {
  display: none;
}
@media (min-width: 768px) {
  .desktop-nav { display: flex; align-items: center; gap: var(--space-xs); }
  .desktop-nav a {
    padding: 6px 14px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-secondary);
    border-radius: var(--r-full);
    transition: all var(--t-fast) var(--ease-out);
  }
  .desktop-nav a:hover,
  .desktop-nav .current-menu-item a {
    color: var(--text-primary);
    background: var(--bg-alt);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.btn-icon {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  color: var(--text-secondary);
  transition: all var(--t-fast) var(--ease-out);
}
.btn-icon svg { width: 18px; height: 18px; }
.btn-icon:hover { background: var(--bg-alt); color: var(--text-primary); }

/* Theme toggle — show/hide sun/moon */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { width: 18px; height: 18px; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

/* Mobile menu button */
.mobile-menu-btn { display: flex; }
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10002;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal) var(--ease-out);
}
.search-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.search-close {
  position: absolute;
  top: var(--space-lg); right: var(--space-lg);
  font-size: 1.5rem;
  color: var(--text-tertiary);
  transition: color var(--t-fast);
}
.search-close:hover { color: var(--text-primary); }
.search-overlay-inner {
  width: 100%;
  max-width: 560px;
  padding: 0 var(--space-lg);
}
.search-overlay-inner input {
  width: 100%;
  padding: 16px 0;
  font-size: 1.5rem;
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  outline: none;
  transition: border-color var(--t-fast);
}
.search-overlay-inner input::placeholder { color: var(--text-muted); }
.search-overlay-inner input:focus { border-color: var(--accent); }

/* Mobile menu */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-normal);
}
.menu-overlay.active { opacity: 1; pointer-events: auto; }
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 85vw);
  background: var(--surface);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform var(--t-normal) var(--ease-out);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--border-light);
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}
.mobile-menu-header .site-title { font-size: 1rem; }
.mobile-menu-close { font-size: 1.3rem; color: var(--text-tertiary); }
.mobile-menu nav { flex: 1; overflow-y: auto; padding: var(--space-md); }
.mobile-menu nav a {
  display: block;
  padding: 12px 0;
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  transition: color var(--t-fast);
}
.mobile-menu nav a:hover { color: var(--accent); }

/* ================================================================
   HERO / FEATURED SECTION — Single large card
   ================================================================ */
.hero-section {
  padding: var(--space-2xl) 0 var(--space-xl);
}
.featured-section {
  /* nothing extra needed */
}
.featured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}
.featured-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.featured-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  border-radius: var(--r-full);
  border: 1px solid var(--border-light);
  transition: all var(--t-fast) var(--ease-out);
}
.featured-refresh:hover {
  color: var(--text-primary);
  border-color: var(--border);
  background: var(--bg-alt);
}
.featured-refresh svg { width: 14px; height: 14px; }

/* Featured grid — Masonry layout: first large, rest compact */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

/* Mobile first: 1st card full-width hero, rest 2-column */
.featured-card:first-child {
  grid-column: 1 / -1;
  height: 220px;
}
.featured-card:first-child .featured-card-title {
  font-size: var(--fs-lg);
}
.featured-card {
  height: 160px;
}
.featured-card:nth-child(n+2) .featured-card-title {
  font-size: var(--fs-sm);
}

@media (min-width: 480px) {
  .featured-card:first-child {
    height: 280px;
  }
  .featured-card:first-child .featured-card-title {
    font-size: var(--fs-xl);
  }
  .featured-card {
    height: 200px;
  }
  .featured-card:nth-child(n+2) .featured-card-title {
    font-size: var(--fs-base);
  }
}

@media (min-width: 768px) {
  .featured-grid {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 200px 200px;
    gap: var(--space-md);
  }
  .featured-card:first-child {
    grid-column: auto;
    grid-row: 1 / 3;
    height: auto;
  }
  .featured-card {
    height: auto;
  }
  .featured-card:first-child .featured-card-title {
    font-size: var(--fs-2xl);
  }
  .featured-card:nth-child(n+2) .featured-card-title {
    font-size: var(--fs-base);
  }
  .featured-card-overlay {
    padding: var(--space-lg);
  }
}
@media (min-width: 1024px) {
  .featured-grid {
    grid-template-rows: 240px 240px;
  }
}

.featured-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-alt);
  display: block;
  cursor: pointer;
  transition: transform var(--t-normal) var(--ease-out),
              box-shadow var(--t-normal) var(--ease-out);
}
.featured-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-out);
}
.featured-card:hover img { transform: scale(1.04); }
.featured-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
}
.featured-card-cat {
  display: inline-block;
  align-self: flex-start;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  color: #fff;
  margin-bottom: var(--space-sm);
}
.featured-card-title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-card:first-child .featured-card-title {
  font-size: var(--fs-xl);
}
@media (min-width: 768px) {
  .featured-card:first-child .featured-card-title {
    font-size: var(--fs-2xl);
  }
}

/* ================================================================
   CATEGORY TABS
   ================================================================ */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--divider);
}
.cat-tab {
  padding: 6px 16px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  border-radius: var(--r-full);
  background: var(--bg-alt);
  transition: all var(--t-fast) var(--ease-out);
}
.cat-tab:hover,
.cat-tab.active {
  color: #fff;
  background: var(--accent);
}

/* ================================================================
   CONTENT AREA
   ================================================================ */
.content-area {
  padding-bottom: var(--space-3xl);
}
.main-content { min-width: 0; }

/* Section header */
.section-header {
  margin-bottom: var(--space-xl);
}
.section-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.section-title .icon { font-size: 1.3rem; }

/* ================================================================
   MASONRY GRID — JS-powered column distribution
   ================================================================ */
.masonry-grid {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}
.masonry-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ================================================================
   POST CARD — Editorial card design
   ================================================================ */
.post-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: transform 0.35s var(--ease-out),
              box-shadow 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out);
  /* Entrance animation state */
  opacity: 0;
  transform: translateY(24px);
}
.post-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-out),
              transform 0.6s var(--ease-out);
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

/* Card inner link — desktop uses block, mobile overridden to flex */
.post-card-inner {
  display: block;
  color: inherit;
}

/* Card thumbnail */
.post-card-thumb {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg-alt);
}
.post-card-thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease-out);
}
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--bg-alt) 25%, var(--surface-hover) 50%, var(--bg-alt) 75%);
  background-size: 200% 200%;
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Badge */
.post-card-badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: var(--r-full);
  color: #fff;
  backdrop-filter: blur(12px);
  background: rgba(0,0,0,0.45);
}
.post-card-badge.cat-color-1 { background: rgba(239,68,68,0.85); }
.post-card-badge.cat-color-2 { background: rgba(20,184,166,0.85); }
.post-card-badge.cat-color-3 { background: rgba(59,130,246,0.85); }
.post-card-badge.cat-color-4 { background: rgba(245,158,11,0.85); color: #1a1a1a; }
.post-card-badge.cat-color-5 { background: rgba(139,92,246,0.85); }
.post-card-badge.cat-color-6 { background: rgba(236,72,153,0.85); }
.post-card-badge.cat-color-7 { background: rgba(34,197,94,0.85); }
.post-card-badge.cat-color-8 { background: rgba(14,165,233,0.85); }

/* Card body */
.post-card-body {
  padding: var(--space-lg) var(--space-lg) var(--space-xl);
}
@media (min-width: 768px) {
  .post-card-body { padding: var(--space-xl) var(--space-xl) 28px; }
}

/* Category label in body (when no thumbnail) */
.post-card-cat {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-text);
  margin-bottom: var(--space-sm);
}

/* Card title */
.post-card-title {
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t-fast) var(--ease-out);
}
@media (min-width: 768px) {
  .post-card-title { font-size: 1.15rem; }
}
.post-card:hover .post-card-title { color: var(--accent); }

/* Excerpt */
.post-card-excerpt {
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: var(--text-tertiary);
  margin-bottom: var(--space-lg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta row */
.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* Source/time line — H5 only (hidden on desktop) */
.post-card-source {
  display: none;
}
.post-card-author {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}
.post-card-author img,
.avatar-default {
  width: 20px; height: 20px;
  border-radius: var(--r-full);
  object-fit: cover;
}
.avatar-default {
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: var(--fw-semibold);
}
.post-card-meta-sep { color: var(--text-muted); }
.post-card-views {
  display: flex;
  align-items: center;
  gap: 3px;
}
.post-card-views svg { width: 11px; height: 11px; opacity: 0.5; }

/* "Read more" link */
.post-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--accent-text);
  letter-spacing: 0.02em;
  transition: gap var(--t-fast) var(--ease-out);
}
.post-card-link svg { width: 13px; height: 13px; transition: transform var(--t-fast) var(--ease-out); }
.post-card:hover .post-card-link { gap: 8px; }
.post-card:hover .post-card-link svg { transform: translateX(3px); }

/* ================================================================
   LOAD MORE
   ================================================================ */
.load-more-wrapper {
  display: flex;
  justify-content: center;
  padding: var(--space-2xl) 0 var(--space-xl);
}
.load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 14px 32px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.load-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-md);
}
.load-more-btn.loading {
  pointer-events: none;
  color: var(--text-muted);
}
.load-more-loading {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dot-pulse {
  display: flex;
  gap: 4px;
}
.dot-pulse::before,
.dot-pulse::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: var(--r-full);
  background: var(--text-muted);
  animation: dotPulse 1.2s infinite ease-in-out;
}
.dot-pulse::after { animation-delay: 0.3s; content: ''; }
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* End state */
.load-more-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-2xl) 0;
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.end-line {
  width: 40px;
  height: 1px;
  background: var(--border);
}

/* ================================================================
   NO RESULTS
   ================================================================ */
.no-results {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-tertiary);
}

/* ================================================================
   FOOTER — Minimal
   ================================================================ */
.site-footer {
  border-top: 1px solid var(--divider);
  background: var(--surface);
  padding: var(--space-2xl) 0 var(--space-xl);
}
.footer-widgets {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}
@media (min-width: 640px) {
  .footer-widgets { grid-template-columns: repeat(3, 1fr); }
}
.footer-widget h3 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}
.footer-widget p { font-size: var(--fs-sm); color: var(--text-tertiary); }
.footer-links a {
  display: block;
  padding: 4px 0;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--accent); }
.footer-mode-toggle {
  display: flex;
  gap: var(--space-sm);
}
.mode-btn {
  padding: 5px 14px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-full);
  transition: all var(--t-fast);
}
.mode-btn:hover { border-color: var(--accent); color: var(--accent); }
.mode-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--divider);
}
.footer-bottom p {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
}
.footer-bottom a { color: var(--text-secondary); }
.footer-bottom a:hover { color: var(--accent); }

/* ================================================================
   BACK TO TOP
   ================================================================ */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  color: var(--text-secondary);
  z-index: 999;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all var(--t-normal) var(--ease-out);
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.back-to-top svg { width: 20px; height: 20px; }

/* ================================================================
   RESPONSIVE ADJUSTMENTS
   ================================================================ */
@media (max-width: 767px) {
  .hero-section { padding: var(--space-xl) 0 var(--space-lg); }
  .featured-grid { gap: var(--space-sm); }
  .featured-card { height: 140px; }
  .featured-card:first-child { height: 200px; }
  .featured-card:first-child .featured-card-title { font-size: 1.1rem; }
  .featured-card:nth-child(n+2) .featured-card-title { font-size: 0.9rem; }
  .featured-card-overlay { padding: var(--space-md); }
  .masonry-grid { gap: var(--space-sm); }
  .masonry-col { gap: var(--space-sm); }
  .section-header { margin-bottom: var(--space-lg); }
  .category-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-sm);
  }
  .cat-tab { flex-shrink: 0; white-space: nowrap; }

  /* ===========================================================
     H5 POST CARDS — News feed list style (screenshot reference)
     =========================================================== */
  .masonry-col .post-card {
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-light);
    box-shadow: none;
  }
  .masonry-col .post-card.visible {
    opacity: 1;
    transform: translateY(0);
  }
  .masonry-col .post-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-light);
  }

  /* All cards: horizontal (title left, thumbnail right) */
  .masonry-col .post-card > a {
    display: flex;
    flex-direction: row-reverse;
    gap: var(--space-md);
    align-items: flex-start;
    padding: var(--space-md) 0;
  }
  .masonry-col .post-card .post-card-thumb {
    flex: 0 0 100px;
    width: 100px;
    height: 76px;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--bg-alt);
  }
  .masonry-col .post-card .post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .masonry-col .post-card .post-card-thumb-placeholder {
    aspect-ratio: auto;
    height: 100%;
  }
  .masonry-col .post-card .post-card-body {
    flex: 1;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
  }
  .masonry-col .post-card .post-card-title {
    font-size: 1.1rem;
    font-weight: var(--fw-bold);
    line-height: 1.5;
    -webkit-line-clamp: 3;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
  }
  .masonry-col .post-card:hover .post-card-title { color: var(--accent); }

  /* Source / time / views row — matches screenshot */
  .masonry-col .post-card .post-card-source {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 var(--space-sm);
    margin-top: auto;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.4;
  }
  .masonry-col .post-card .post-card-source-name {
    color: var(--text-secondary);
  }
  .masonry-col .post-card .post-card-source-time::before,
  .masonry-col .post-card .post-card-source-views::before {
    content: "·";
    margin-right: var(--space-sm);
    color: var(--text-muted);
  }

  /* Hide desktop-only elements on H5 */
  .masonry-col .post-card .post-card-excerpt,
  .masonry-col .post-card .post-card-link,
  .masonry-col .post-card .post-card-badge,
  .masonry-col .post-card .post-card-cat,
  .masonry-col .post-card .post-card-meta,
  .masonry-col .post-card .post-card-author {
    display: none;
  }
}

@media (min-width: 1024px) {
  .masonry-grid, .masonry-col { gap: var(--space-xl); }
}

/* ================================================================
   PAGINATION (legacy — for archive/search pages)
   ================================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-2xl) 0;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 12px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: all var(--t-fast) var(--ease-out);
}
.pagination .page-numbers:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pagination .current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pagination .dots {
  border: none;
  background: none;
  color: var(--text-muted);
}

/* ================================================================
   ARCHIVE HERO — Category / Tag / Author / Date header
   ================================================================ */
.archive-hero {
  padding: var(--space-3xl) 0 var(--space-xl);
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
}
.archive-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}
.archive-breadcrumb {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-lg);
}
.archive-breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--t-fast);
}
.archive-breadcrumb a:hover { color: var(--c-accent); }
.archive-breadcrumb .sep { margin: 0 var(--space-xs); color: var(--border); }
.archive-breadcrumb .current { color: var(--text-primary); font-weight: var(--fw-medium); }

.archive-hero-body {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
}
.archive-hero-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-lg);
  background: var(--c-accent-light);
  color: var(--c-accent);
}
.archive-hero-icon svg { width: 26px; height: 26px; }
.archive-hero-title {
  font-size: 1.75rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}
.archive-hero-desc {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-sm);
}
.archive-hero-count {
  display: inline-block;
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
  background: var(--bg);
  padding: 3px 12px;
  border-radius: var(--r-full);
}

/* ================================================================
   NO RESULTS — Empty state
   ================================================================ */
.no-results {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}
.no-results-icon {
  width: 72px; height: 72px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--text-tertiary);
}
.no-results-icon svg { width: 36px; height: 36px; }
.no-results h2 {
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.no-results p {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}
.no-results .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: #fff;
  background: var(--c-accent);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}
.no-results .btn:hover { background: var(--c-accent-dark); transform: translateY(-1px); }

@media (max-width: 639px) {
  .archive-hero { padding: var(--space-2xl) 0 var(--space-lg); }
  .archive-hero-title { font-size: 1.35rem; }
  .archive-hero-body { gap: var(--space-md); }
  .archive-hero-icon { width: 44px; height: 44px; }
  .archive-hero-icon svg { width: 22px; height: 22px; }
}

/* ================================================================
   SINGLE POST — Editorial article layout
   ================================================================ */

/* Post Hero — Full-width featured image with gradient overlay */
/* ================================================================
   POST FEATURED IMAGE — full-width within article column, no overlay
   ================================================================ */
.post-featured-figure {
  margin: 0 0 var(--space-2xl) 0;
  animation: slideUp var(--t-slow) var(--ease-out) 0.08s both;
}
.post-featured-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-md);
}
.post-featured-caption {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  text-align: center;
  margin-top: var(--space-sm);
  line-height: var(--lh-normal);
}

/* Container — 980px reading column */
.container--article {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ================================================================
   POST HEADER — NetEase news style
   ================================================================ */
.post-header {
  padding: var(--space-2xl) 0 var(--space-xl);
  animation: slideUp var(--t-slow) var(--ease-out) both;
}

/* Source badge */
.post-header-source {
  display: inline-block;
  padding: 4px 12px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--r-sm);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.post-header-source.cat-color-blue,
.post-header-source.cat-color-1 { background: var(--accent); color: #fff; }
.post-header-source.cat-color-green,
.post-header-source.cat-color-2 { background: #059669; color: #fff; }
.post-header-source.cat-color-purple,
.post-header-source.cat-color-3 { background: #7c3aed; color: #fff; }
.post-header-source.cat-color-orange,
.post-header-source.cat-color-4 { background: #c2410c; color: #fff; }
.post-header-source.cat-color-red,
.post-header-source.cat-color-5 { background: #b91c1c; color: #fff; }
.post-header-source.cat-color-teal,
.post-header-source.cat-color-6 { background: #0d9488; color: #fff; }

/* Title — NetEase-style large headline */
.post-title-single {
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  font-weight: var(--fw-bold);
  line-height: 1.4;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-md);
}

/* Subtitle */
.post-subtitle {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-lg);
}

/* Meta line — time · source · author · reading · views */
.post-meta-single {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--divider);
}
.post-meta-time,
.post-meta-source,
.post-meta-author-info,
.post-meta-reading,
.post-meta-views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-tertiary);
}
.post-meta-source {
  color: var(--text-secondary);
}
.meta-sep {
  color: var(--text-muted);
  font-weight: var(--fw-normal);
}

/* ================================================================
   ARTICLE CONTENT — NetEase newspaper typography engine
   ================================================================ */
.post-content {
  animation: slideUp var(--t-slow) var(--ease-out) 0.15s both;
  font-size: 1.125rem;
  line-height: 1.9;
  color: var(--text-primary);
  word-break: break-word;
}
.post-content > * + * { margin-top: var(--space-xl); }
.post-content > *:first-child { margin-top: 0; }

/* Headings inside article — clean hierarchy */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-weight: var(--fw-bold);
  line-height: 1.35;
  color: var(--text-primary);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-md);
}
.post-content h2 {
  font-size: 1.45rem;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--divider);
}
.post-content h3 {
  font-size: 1.25rem;
  padding-left: var(--space-md);
  border-left: 3px solid var(--accent);
}
.post-content h4 { font-size: 1.1rem; }

/* Paragraphs — generous spacing for readability */
.post-content p {
  line-height: 1.9;
  margin-bottom: var(--space-xl);
}

/* Links */
.post-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-light);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.post-content a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

/* Images inside content — responsive with subtle depth */
.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  margin: var(--space-xl) auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.post-content figure {
  margin: var(--space-xl) 0;
}
.post-content figure img {
  margin-bottom: 0;
}
.post-content figcaption {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: var(--space-sm);
  line-height: var(--lh-normal);
}
/* WordPress gallery / caption blocks */
.post-content .wp-caption,
.post-content .wp-block-image {
  max-width: 100%;
  margin: var(--space-xl) 0;
}
.post-content .wp-caption img,
.post-content .wp-block-image img {
  margin-bottom: 0;
}
.post-content .wp-caption-text {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: var(--space-sm);
}

/* Blockquote — editorial pull-quote */
.post-content blockquote {
  margin: var(--space-2xl) 0;
  padding: var(--space-xl) var(--space-2xl);
  border-left: 4px solid var(--text-secondary);
  background: var(--bg-alt);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.post-content blockquote p { margin-bottom: 0; }

/* Code blocks */
.post-content pre {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: var(--r-md);
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.65;
  font-family: var(--font-mono);
}
[data-theme="dark"] .post-content pre {
  background: #111;
  color: #e0e0e0;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-alt);
  color: var(--accent);
  padding: 2px 5px;
  border-radius: var(--r-sm);
}
.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* Lists */
.post-content ul,
.post-content ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-lg);
}
.post-content li {
  margin-bottom: var(--space-sm);
  line-height: var(--lh-relaxed);
}
.post-content li::marker {
  color: var(--accent);
}

/* Horizontal rule */
.post-content hr {
  border: none;
  border-top: 1px solid var(--divider);
  margin: var(--space-2xl) 0;
}

/* Tables */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  font-size: var(--fs-sm);
}
.post-content th {
  background: var(--bg-alt);
  font-weight: var(--fw-semibold);
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
}
.post-content td {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-light);
}
.post-content tr:nth-child(even) td {
  background: var(--bg-alt);
}

/* Page links (for paged articles) */
.page-links {
  margin-top: var(--space-2xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--divider);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}
.page-links span {
  margin-right: var(--space-sm);
}
.page-link {
  display: inline-block;
  min-width: 32px;
  line-height: 32px;
  margin: 0 2px;
  border-radius: var(--r-sm);
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
  text-decoration: none;
}
.page-link:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* ================================================================
   POST FOOTER AREA
   ================================================================ */
.post-footer-area {
  padding: var(--space-3xl) 0 var(--space-4xl);
  margin-top: var(--space-2xl);
  border-top: 1px solid var(--divider);
}

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-xl);
}
.post-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--r-full);
  transition: all var(--t-fast) var(--ease-out);
}
.post-tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

/* Social Share */
.post-share {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-xl);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.share-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.share-btns {
  display: flex;
  gap: 4px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
  position: relative;
}
.share-btn:hover {
  background: var(--bg-alt);
  color: var(--accent);
}
.share-btn svg {
  width: 16px; height: 16px;
}
.share-copy-feedback {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  background: var(--text-primary);
  color: var(--bg);
  padding: 2px 8px;
  border-radius: var(--r-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
  white-space: nowrap;
}
.share-copy-feedback.show {
  opacity: 1;
}

/* Author Box */
.author-box {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  background: var(--bg-alt);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
}
.author-box .author-avatar img,
.author-box .author-avatar .post-card-author-avatar-default {
  width: 60px; height: 60px;
  border-radius: var(--r-full);
  object-fit: cover;
  flex-shrink: 0;
}
.author-box .author-name {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: 4px;
}
.author-box .author-desc {
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
  line-height: var(--lh-relaxed);
}

/* Post Navigation — Prev / Next */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
}
.post-nav-item {
  position: relative;
  padding: var(--space-lg);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  transition: all var(--t-normal) var(--ease-out);
}
.post-nav-item:not(.is-empty):hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.post-nav-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.post-nav-link {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  line-height: var(--lh-normal);
  transition: color var(--t-fast);
}
.post-nav-link svg {
  flex-shrink: 0;
  margin-top: 1px;
}
.post-nav-link:hover { color: var(--accent); }
.post-nav-item.next .post-nav-link {
  justify-content: flex-end;
  text-align: right;
}
.post-nav-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-nav-placeholder {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* Related Posts section — NetEase list style */
.related-posts {
  margin-bottom: var(--space-3xl);
}
.related-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  letter-spacing: -0.01em;
}
.related-title svg {
  color: var(--accent);
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.related-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--divider);
  transition: background-color var(--t-fast);
}
.related-item:last-child {
  border-bottom: none;
}
.related-item:hover {
  background-color: var(--bg-alt);
}
.related-item:hover .related-item-title {
  color: var(--accent);
}

.related-item-thumb {
  flex: 0 0 160px;
  width: 160px;
  height: 110px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-alt);
}
.related-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-normal);
}
.related-item:hover .related-item-img {
  transform: scale(1.04);
}
.related-item-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-alt);
}

.related-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.related-item-title {
  font-size: 1.1rem;
  font-weight: var(--fw-semibold);
  line-height: 1.45;
  color: var(--text-primary);
  margin: 0;
  transition: color var(--t-fast);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-item-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}
.related-item-source {
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}
.related-item-date {
  color: var(--text-tertiary);
}

/* Comments section */
.post-comments {
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--divider);
}
.post-comments .commentlist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-comments .comment {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border-light);
}
.post-comments .comment-body {
  display: flex;
  gap: var(--space-md);
}
.post-comments .comment-author img {
  border-radius: var(--r-full);
  width: 40px; height: 40px;
}
.post-comments .comment-author .fn {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  color: var(--text-primary);
}
.post-comments .comment-meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.post-comments .comment-meta a {
  color: var(--text-muted);
}
.post-comments .comment-content {
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
}
.post-comments .comment-content p { margin-bottom: var(--space-sm); }
.post-comments .reply a {
  font-size: var(--fs-xs);
  color: var(--accent);
  font-weight: var(--fw-medium);
}
.post-comments .children {
  list-style: none;
  padding-left: var(--space-xl);
  margin-top: var(--space-md);
}

/* Comment form */
.post-comments .comment-respond {
  margin-top: var(--space-2xl);
}
.post-comments .comment-reply-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}
.post-comments .comment-form p {
  margin-bottom: var(--space-md);
}
.post-comments .comment-form label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.post-comments .comment-form input[type="text"],
.post-comments .comment-form input[type="email"],
.post-comments .comment-form input[type="url"],
.post-comments .comment-form textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--fs-sm);
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color var(--t-fast);
}
.post-comments .comment-form input:focus,
.post-comments .comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.post-comments .comment-form textarea {
  min-height: 120px;
  resize: vertical;
}
.post-comments .form-submit input[type="submit"] {
  padding: 10px 28px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  font-family: inherit;
  border: none;
  border-radius: var(--r-md);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.post-comments .form-submit input[type="submit"]:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}
.post-comments .comment-notes {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* No comments message */
.no-comments {
  text-align: center;
  padding: var(--space-2xl) 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ================================================================
   REVEAL ANIMATIONS — For IntersectionObserver
   ================================================================ */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ================================================================
   RESPONSIVE — Post content (H5 mobile first)
   ================================================================ */
@media (max-width: 768px) {
  .container--article {
    padding: 0 var(--space-md);
  }
  .post-header {
    padding: var(--space-xl) 0 var(--space-lg);
  }
  .post-title-single {
    font-size: 1.5rem;
  }
  .post-subtitle {
    font-size: var(--fs-base);
  }
  .post-meta-single {
    font-size: var(--fs-xs);
    gap: 4px;
  }
  .post-meta-single svg {
    width: 13px; height: 13px;
  }
  .post-featured-figure {
    margin-bottom: var(--space-lg);
  }
  .post-content {
    font-size: 1.05rem;
    line-height: 1.8;
  }
  .post-content h2 {
    font-size: 1.3rem;
  }
  .post-content h3 {
    font-size: 1.15rem;
  }
  .post-content blockquote {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--fs-base);
  }
  .post-navigation {
    grid-template-columns: 1fr;
  }
  .related-item-thumb {
    flex: 0 0 140px;
    width: 140px;
    height: 96px;
  }
  .related-item-title {
    font-size: 1rem;
  }
  .post-share {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .container--article {
    padding: 0 14px;
  }
  .post-header {
    padding: var(--space-lg) 0;
  }
  .post-title-single {
    font-size: 1.35rem;
  }
  .post-meta-single {
    gap: 4px;
    font-size: 0.72rem;
  }
  .post-content {
    font-size: 1rem;
    line-height: 1.75;
  }
  .post-content h2 {
    font-size: 1.2rem;
  }
  .post-content h3 {
    font-size: 1.08rem;
  }
  .post-content p {
    margin-bottom: var(--space-lg);
  }
  .post-footer-area {
    padding-top: var(--space-2xl);
  }
  .related-item {
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
  }
  .related-item-thumb {
    flex: 0 0 110px;
    width: 110px;
    height: 78px;
  }
  .related-item-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 3;
  }
  .related-item-meta {
    font-size: var(--fs-xs);
  }

  /* H5 cards extra compact */
  .masonry-col .post-card > a {
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
  }
  .masonry-col .post-card .post-card-thumb {
    flex: 0 0 88px;
    width: 88px;
    height: 66px;
  }
  .masonry-col .post-card .post-card-title {
    font-size: 1rem;
    line-height: 1.5;
    -webkit-line-clamp: 3;
  }
}


/* ================================================================
   H5 ARTICLE PAGE — WeChat-style mobile layout
   Base: hidden on desktop; shown on max-width:768px
   ================================================================ */

/* H5 top bar — fixed */
.h5-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  z-index: 100;
  padding: 0 12px;
  align-items: center;
  justify-content: space-between;
}
.h5-topbar-back,
.h5-topbar-more {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}
.h5-topbar-back:active,
.h5-topbar-more:active {
  background: var(--bg-alt);
}
.h5-topbar-menu {
  position: absolute;
  top: 48px;
  right: 8px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  padding: 6px;
  min-width: 140px;
  display: none;
  flex-direction: column;
  z-index: 110;
}
.h5-topbar-menu.active {
  display: flex;
}
.h5-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
  text-decoration: none;
}
.h5-menu-item:active {
  background: var(--bg-alt);
}

/* H5 meta — date + listen button (hidden on PC) */
.post-meta-h5 {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}
.h5-meta-time {
  color: var(--text-tertiary);
}
.h5-listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--divider);
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: auto;
}
.h5-listen-btn:active {
  background: var(--bg-alt);
}
.h5-listen-btn.playing {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

/* H5 bottom bar — fixed */
.h5-bottombar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--surface);
  border-top: 1px solid var(--divider);
  z-index: 100;
  padding: 0 12px;
  padding-bottom: env(safe-area-inset-bottom);
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
}
.h5-bottombar-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s;
}
.h5-bottombar-brand:active {
  opacity: 0.7;
}
.h5-bottombar-brand .site-logo-svg {
  height: 28px;
  width: auto;
}
.h5-brand-info {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.h5-brand-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}
.h5-brand-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}
.h5-follow-btn {
  flex-shrink: 0;
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.h5-follow-btn .h5-followed-text {
  display: none;
}
.h5-follow-btn.followed {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--divider);
}
.h5-follow-btn.followed .h5-follow-text {
  display: none;
}
.h5-follow-btn.followed .h5-followed-text {
  display: inline;
}

.h5-bottombar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: 0 0 auto;
}
.h5-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
  min-width: 44px;
}
.h5-action-btn:active {
  background: var(--bg-alt);
}
.h5-action-btn.liked {
  color: var(--accent);
}
.h5-action-btn.liked svg {
  fill: var(--accent);
}
.h5-action-btn.favorited {
  color: #ef4444;
}
.h5-action-btn.favorited svg {
  fill: #ef4444;
  stroke: #ef4444;
}
.h5-action-count {
  font-size: 0.68rem;
  color: inherit;
  line-height: 1;
}

/* H5 share sheet */
.h5-share-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}
.h5-share-sheet.active {
  display: block;
}
.h5-share-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  animation: fadeIn 0.2s ease-out;
}
.h5-share-sheet-inner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  animation: slideUpSheet 0.3s var(--ease-out);
}
@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.h5-share-sheet-title {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}
.h5-share-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.h5-share-sheet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.78rem;
  transition: opacity 0.15s;
}
.h5-share-sheet-item:active {
  opacity: 0.6;
}
.h5-share-sheet-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.h5-share-sheet-cancel {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--bg-alt);
  border: none;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

/* H5 comments — WeChat style */
.comments-h5-header {
  display: none;
}
.comment-form-h5 {
  display: none;
}
.comments-h5-list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ================================================================
   H5 ARTICLE PAGE — MOBILE BREAKPOINTS
   ================================================================ */
@media (max-width: 768px) {
  /* Show H5 UI */
  .h5-topbar { display: flex; }
  .h5-bottombar { display: flex; }
  .post-meta-h5 { display: flex; }
  .post-meta-h5 {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 0;
    padding: 10px 0 0;
  }
  .h5-listen-btn {
    font-size: 0.8rem;
    padding: 5px 12px;
  }
  .comments-h5-header { display: block; }
  .comment-form-h5 { display: block; }
  .comments-h5-list { display: block; }

  /* ============ H5 Content Typography ============ */

  /* Hide PC elements */
  .post-meta-pc { display: none !important; }
  .post-share-pc { display: none !important; }
  .post-comments-pc { display: none !important; }
  .post-comments { display: none !important; }
  .post-tags { display: none !important; }

  /* Reserve top/bottom space for fixed bars — only on single post pages */
  body.single.single-post .site-header { display: none; }
  body.single.single-post {
    padding-top: 44px;
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  .reading-progress { top: 44px; }

  /* Container full-width with edge padding */
  .container--article {
    max-width: 100%;
    padding: 0 16px;
  }

  /* Header — WeChat / Toutiao hybrid */
  .post-header {
    padding: 16px 0 14px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--divider);
  }
  .post-header-source {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 10px;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }
  .post-title-single {
    font-size: 1.625rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    color: var(--text-primary);
  }
  .post-subtitle {
    font-size: 1rem;
    color: var(--text-tertiary);
    line-height: 1.55;
    margin-bottom: 10px;
    font-weight: 400;
  }

  /* Content typography — H5 optimized for Chinese reading */
  .post-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .post-content p {
    margin-bottom: 16px;
    line-height: 1.85;
    text-align: justify;
    word-break: break-word;
  }
  .post-content h2 {
    font-size: 1.2rem;
    margin-top: 28px;
    margin-bottom: 14px;
    border-bottom: none;
    font-weight: 700;
    line-height: 1.45;
  }
  .post-content h3 {
    font-size: 1.1rem;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.5;
  }
  .post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  }
  .post-content figure {
    margin: 20px auto;
    text-align: center;
  }
  .post-content figure img {
    margin-bottom: 0;
    border-radius: 6px;
  }
  .post-content figcaption {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 6px;
    line-height: 1.5;
  }
  .post-content .wp-caption,
  .post-content .wp-block-image {
    margin: 20px auto;
    text-align: center;
  }
  .post-content .wp-caption img,
  .post-content .wp-block-image img {
    margin-bottom: 0;
  }
  .post-content .wp-caption-text {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 6px;
    line-height: 1.5;
  }
  .post-content blockquote {
    margin: 20px 0;
    padding: 14px 16px;
    font-size: 0.95rem;
    line-height: 1.75;
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    border-radius: 0 6px 6px 0;
    color: var(--text-secondary);
  }
  .post-content blockquote p { margin-bottom: 0; }

  /* Lists */
  .post-content ul,
  .post-content ol {
    margin: 16px 0;
    padding-left: 1.5em;
    line-height: 1.85;
  }
  .post-content li {
    margin-bottom: 6px;
  }
  .post-content ul { list-style: disc; }
  .post-content ol { list-style: decimal; }
  .post-content ul ul,
  .post-content ol ul { list-style: circle; }

  /* Horizontal rule */
  .post-content hr {
    border: none;
    border-top: 1px solid var(--divider);
    margin: 24px 0;
  }

  /* Tables */
  .post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 0.9rem;
    overflow-x: auto;
    display: block;
  }
  .post-content th,
  .post-content td {
    padding: 8px 10px;
    border: 1px solid var(--divider);
    text-align: left;
  }
  .post-content th {
    background: var(--bg-alt);
    font-weight: 600;
  }

  /* Code / Pre */
  .post-content code {
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88rem;
    font-family: var(--font-mono);
    word-break: break-word;
  }
  .post-content pre {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.6;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .post-content pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
  }

  /* Post footer — compact on H5 */
  .post-footer-area {
    padding: 16px 0 12px;
    margin-top: 12px;
  }

  /* Post navigation — H5 two-column with center divider */
  .post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 12px 0 8px;
    padding: 12px 0;
    background: var(--surface);
    border-radius: 8px;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .post-nav-item {
    display: flex;
    flex-direction: column;
    padding: 0 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: opacity var(--t-fast);
  }
  .post-nav-item:not(.is-empty):active {
    opacity: 0.7;
  }
  .post-nav-item.prev {
    text-align: left;
    border-right: 1px solid var(--divider);
  }
  .post-nav-item.next {
    text-align: right;
    align-items: flex-end;
  }
  .post-nav-label {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 8px;
    line-height: 1.4;
  }
  .post-nav-label svg {
    display: block;
    width: 16px;
    height: 16px;
  }
  .post-nav-item:not(.is-empty) .post-nav-label {
    color: var(--text-secondary);
    font-weight: var(--fw-semibold);
  }
  .post-nav-link {
    min-width: 0;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-decoration: none;
  }
  .post-nav-placeholder {
    font-size: 0.8rem;
    color: var(--text-muted);
  }

  /* Related posts — compact list with source info */
  .related-posts {
    margin: 24px 0;
  }
  .related-title {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    text-transform: none;
    letter-spacing: 0;
  }
  .related-title::before {
    display: none;
  }
  .related-item {
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--divider);
  }
  .related-item:last-child {
    border-bottom: none;
  }
  .related-item-thumb {
    flex: 0 0 105px;
    width: 105px;
    height: 74px;
    border-radius: 6px;
    overflow: hidden;
  }
  .related-item-img {
    border-radius: 6px;
  }
  .related-item-title {
    font-size: 0.95rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    color: var(--text-primary);
    font-weight: 500;
  }
  .related-item-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    gap: 6px;
  }

  /* Comments H5 */
  .comments-h5-header {
    margin: 28px 0 12px;
    padding-top: 16px;
    border-top: 1px solid var(--divider);
  }
  .comments-h5-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px;
  }
  .comments-h5-count {
    color: var(--text-tertiary);
    font-weight: 400;
  }
  .comment-form-h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 10px;
    background: var(--bg-alt);
    border-radius: 8px;
  }
  .comment-h5-name {
    flex: 0 0 80px;
    padding: 6px 8px;
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--text-primary);
    font-family: inherit;
  }
  .comment-h5-name:focus {
    outline: none;
    border-color: var(--accent);
  }
  .comment-h5-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-radius: 6px;
    padding: 0 6px;
  }
  .comment-h5-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 6px 4px;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-family: inherit;
    min-width: 0;
  }
  .comment-h5-input:focus { outline: none; }
  .comment-h5-emoji,
  .comment-h5-image {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
  }
  .comment-h5-submit {
    flex-shrink: 0;
    padding: 6px 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
  }
  .comment-h5-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .comments-h5-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .comment-h5-item {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--divider);
  }
  .comment-h5-item:last-child {
    border-bottom: none;
  }
  .comment-h5-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-alt);
  }
  .comment-h5-avatar img,
  .comment-h5-avatar .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
  }
  .comment-h5-body {
    flex: 1;
    min-width: 0;
  }
  .comment-h5-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-bottom: 4px;
  }
  .comment-h5-name {
    color: var(--text-secondary);
    font-weight: 500;
  }
  .comment-h5-loc {
    color: var(--text-tertiary);
    display: inline-flex;
    align-items: center;
    gap: 2px;
  }
  .comment-h5-time {
    color: var(--text-muted);
    margin-left: auto;
  }
  .comment-h5-content {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.55;
    word-break: break-word;
  }
  .comment-h5-content p { margin: 0; }
  .comment-h5-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
  }
  .comment-h5-reply,
  .comment-h5-like {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color 0.15s;
  }
  .comment-h5-reply:active,
  .comment-h5-like:active {
    color: var(--accent);
  }
  .comment-h5-like.liked {
    color: var(--accent);
  }
  .comment-h5-like.liked svg {
    fill: var(--accent);
  }
  .comment-h5-empty {
    text-align: center;
    padding: 32px 0;
    color: var(--text-tertiary);
  }
  .comment-h5-empty svg {
    color: var(--text-muted);
    margin-bottom: 8px;
  }
  .comment-h5-empty p {
    margin: 0;
    font-size: 0.85rem;
  }
  .comment-h5-item.new-comment {
    animation: newCommentFade 0.5s var(--ease-out);
  }
  @keyframes newCommentFade {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Hide related posts & all footer widgets on H5 */
  .related-posts { display: none !important; }
  .footer-widgets { display: none !important; }

  /* Compact footer */
  .site-footer {
    padding: 8px 0 6px;
  }
  .footer-bottom {
    padding-top: 0;
    border-top: none;
    margin-top: 0;
  }
  .footer-bottom p {
    font-size: 0.7rem;
    line-height: 1.4;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .comment-form-h5 {
    flex-wrap: wrap;
  }
  .comment-h5-name {
    flex: 1 1 100%;
  }
  .h5-bottombar {
    padding: 0 8px;
    gap: 8px;
  }
  .h5-brand-name { max-width: 70px; font-size: 0.78rem; }
  .h5-action-btn { min-width: 38px; padding: 4px 4px; }
  .h5-action-btn svg { width: 16px; height: 16px; }
}


/* ================================================================
   PREFERS REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ================================================================
   UTILITY — Screen reader only
   ================================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
