/* =====================================================================
 * 像素小站 - Minecraft 像素方块风样式
 * ===================================================================== */

/* ---------- 字体 ---------- */
@font-face {
  font-family: 'Zpix';
  src: url('../fonts/zpix.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------- 设计变量 ---------- */
:root {
  --grass: #7cbd4f;
  --grass-dark: #5d9b3a;
  --grass-light: #9ed15f;
  --dirt: #79553a;
  --dirt-dark: #5e412c;
  --dirt-light: #96694a;
  --stone: #8b8b8b;
  --stone-dark: #6f6f6f;
  --stone-light: #a8a8a8;
  --stone-ink: #3c3c3c;
  --plank: #a58b5c;
  --plank-dark: #7c673f;
  --plank-light: #c4a878;
  --obsidian: #1d1917;
  --ink: #241d16;
  --paper: #f2e9d8;
  --danger: #b8452f;
  --shadow: rgba(0, 0, 0, 0.45);
  --border-w: 3px;
  --font: 'Zpix', 'Microsoft YaHei', 'PingFang SC', monospace;
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  color: var(--paper);
  min-height: 100vh;
  /* 页脚兜底：内容不足一屏时页脚仍贴在底部 */
  display: flex;
  flex-direction: column;
  /* 像素风背景图（固定铺满）+ 半透明压暗层保证可读性 */
  background: var(--obsidian) url('../images/bg-voxel-landscape.png') center 30% / cover fixed no-repeat;
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
}

/* 压暗层 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 16, 0.58);
  pointer-events: none;
  z-index: 0;
}

img { image-rendering: pixelated; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--grass-dark); color: #fff; }

/* 像素滚动条 */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--obsidian); }
::-webkit-scrollbar-thumb {
  background: var(--stone);
  border: 2px solid var(--obsidian);
  box-shadow: inset -2px -2px 0 rgba(0,0,0,.4), inset 2px 2px 0 rgba(255,255,255,.3);
}
::-webkit-scrollbar-thumb:hover { background: var(--stone-light); }

/* ---------- 通用工具 ---------- */
.container { max-width: 1060px; margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }

/* 内容区弹性撑满，保证页脚永远贴在视口底部 */
main.hero { flex: 1 0 auto; }
main.container { flex: 1 0 auto; width: 100%; }
.site-footer { flex-shrink: 0; }

/* Minecraft 风格的立体感（内阴影斜切模拟方块高光/暗面） */
.bevel-up   { box-shadow: inset -4px -4px 0 rgba(0,0,0,.28), inset 4px 4px 0 rgba(255,255,255,.22); }
.bevel-down { box-shadow: inset 4px 4px 0 rgba(0,0,0,.28), inset -4px -4px 0 rgba(255,255,255,.22); }
.bevel-in   { box-shadow: inset 3px 3px 0 rgba(0,0,0,.3), inset -3px -3px 0 rgba(255,255,255,.12); }

/* 石头按钮 */
.mc-btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 13px;
  color: #fff;
  background: var(--stone);
  border: var(--border-w) solid var(--ink);
  padding: 8px 18px;
  cursor: pointer;
  user-select: none;
  text-shadow: 1px 1px 0 rgba(0,0,0,.5);
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.3), inset 4px 4px 0 rgba(255,255,255,.25);
  transition: transform .06s steps(1);
}
.mc-btn:hover { background: var(--stone-light); }
.mc-btn:active { transform: translateY(3px); box-shadow: inset 4px 4px 0 rgba(0,0,0,.3), inset -4px -4px 0 rgba(255,255,255,.15); }
.mc-btn.grass { background: var(--grass); }
.mc-btn.grass:hover { background: var(--grass-light); }
.mc-btn:focus-visible { outline: 3px solid #ffe27a; outline-offset: 2px; }

/* 页面标题 */
.page-title {
  font-size: 24px;
  color: #fff;
  margin: 26px 0 18px;
  text-shadow: 3px 3px 0 rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-title::before {
  content: '❯';
  color: var(--grass-light);
  font-size: 26px;
}

/* 面板（石头质感卡片容器） */
.panel {
  background: linear-gradient(rgba(28,28,28,.82), rgba(24,22,20,.82));
  border: var(--border-w) solid var(--ink);
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.35), inset 4px 4px 0 rgba(255,255,255,.1), 0 6px 0 rgba(0,0,0,.35);
  padding: 16px;
}

/* 木质告示牌 */
.sign {
  background: var(--plank);
  border: var(--border-w) solid var(--plank-dark);
  color: var(--ink);
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.25), inset 4px 4px 0 rgba(255,255,255,.3), 0 5px 0 rgba(0,0,0,.35);
  padding: 14px 18px;
}

/* =====================================================================
 * 顶部导航（熔炉黑曜石条 + 快捷栏）
 * ===================================================================== */
.topnav {
  position: relative;
  z-index: 10;
  background: var(--obsidian);
  border-bottom: var(--border-w) solid var(--ink);
  box-shadow: 0 4px 0 rgba(0,0,0,.3), inset 0 3px 0 rgba(255,255,255,.08);
}
.topnav-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* 站点 logo：草方块小图标（纯 CSS 像素块） */
.brand-block {
  width: 22px; height: 22px;
  background: var(--grass);
  border: 2px solid var(--ink);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.3), inset 3px 3px 0 rgba(255,255,255,.25);
  position: relative;
}
.brand-block::after {
  content: '';
  position: absolute; left: -2px; right: -2px; bottom: -2px; height: 5px;
  background: var(--dirt);
  border-left: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.brand-text { font-size: 16px; color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.6); }

.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-link {
  font-size: 13px;
  color: #fff;
  background: var(--stone-dark);
  border: 2px solid var(--ink);
  padding: 7px 16px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.5);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.3), inset 3px 3px 0 rgba(255,255,255,.2);
  transition: transform .06s steps(1);
}
.nav-link:hover { background: var(--stone); }
.nav-link.active {
  background: var(--grass);
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.25), inset -3px -3px 0 rgba(255,255,255,.2);
  transform: translateY(2px);
}
.nav-link.active:hover { background: var(--grass-light); }

/* =====================================================================
 * 首页（头像 / 名字 / 预设语句轮播）
 * ===================================================================== */
.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 58px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.hero-inner { text-align: center; max-width: 640px; }

.hero-avatar {
  width: 148px;
  margin: 0 auto 22px;
  position: relative;
  animation: floaty 3.2s ease-in-out infinite;
}
.hero-avatar img {
  width: 100%;
  display: block;
  border: 4px solid var(--ink);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), 8px 8px 0 rgba(0,0,0,.45);
}
/* 头像下的“阴影块” */
.hero-avatar::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -16px;
  width: 70%; height: 10px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.4);
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.hero-name {
  font-size: 34px;
  color: #fff;
  letter-spacing: 4px;
  text-shadow: 4px 4px 0 rgba(0,0,0,.65);
  margin-bottom: 20px;
}

/* 预设语句轮播框（告示牌） */
.hero-quote {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quote-sign {
  background: var(--plank);
  border: 4px solid var(--plank-dark);
  color: var(--ink);
  font-size: 15px;
  padding: 12px 22px;
  box-shadow: inset -5px -5px 0 rgba(0,0,0,.22), inset 5px 5px 0 rgba(255,255,255,.28), 0 6px 0 rgba(0,0,0,.35);
  position: relative;
  transition: opacity .25s steps(2), transform .25s steps(2);
}
.quote-sign.leaving { opacity: 0; transform: translateY(-10px); }
.quote-sign.entering { opacity: 1; transform: translateY(0); }
/* 打字光标 */
.quote-cursor {
  display: inline-block;
  width: 10px; height: 15px;
  background: var(--ink);
  margin-left: 4px;
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* 首页快捷按钮 */
.hero-actions { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* 首页底部小字 */
.hero-foot {
  margin-top: 48px;
  font-size: 12px;
  color: rgba(242,233,216,.75);
  text-shadow: 1px 1px 0 rgba(0,0,0,.6);
}

/* =====================================================================
 * 文章页（分类 / 标签 / 卡片）
 * ===================================================================== */
.filter-panel { margin-bottom: 16px; }

.filter-row { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; }
.filter-row + .filter-row { margin-top: 10px; }

.filter-label {
  flex-shrink: 0;
  font-size: 13px;
  color: #fff;
  background: var(--stone-ink);
  border: 2px solid var(--ink);
  padding: 5px 10px;
  margin-top: 2px;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.35), inset 3px 3px 0 rgba(255,255,255,.15);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  font-family: var(--font);
  font-size: 13px;
  color: #fff;
  background: var(--stone-dark);
  border: 2px solid var(--ink);
  padding: 5px 14px;
  cursor: pointer;
  user-select: none;
  text-shadow: 1px 1px 0 rgba(0,0,0,.5);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.3), inset 3px 3px 0 rgba(255,255,255,.18);
  transition: transform .06s steps(1);
}
.chip:hover { filter: brightness(1.12); }
.chip:active { transform: translateY(2px); }
/* 分类 chip 自带颜色 */
.chip.cat { background: var(--cat, var(--stone)); }
.chip.active {
  background: var(--ink);
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.4), inset -3px -3px 0 rgba(255,255,255,.1);
  transform: translateY(2px);
  border-color: #000;
}

.result-bar {
  font-size: 12px;
  color: rgba(242,233,216,.85);
  margin: 0 0 12px 2px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.6);
}
.result-bar b { color: var(--grass-light); font-weight: normal; }

/* 卡片网格 */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding-bottom: 20px;
}

.article-card {
  background: var(--stone);
  border: var(--border-w) solid var(--ink);
  cursor: pointer;
  position: relative;
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.3), inset 4px 4px 0 rgba(255,255,255,.22), 0 5px 0 rgba(0,0,0,.35);
  transition: transform .08s steps(2), box-shadow .08s steps(2);
  display: flex;
  flex-direction: column;
}
/* 卡片顶部：分类色“草皮” */
.article-card::before {
  content: '';
  height: 12px;
  background: var(--cat, var(--stone));
  border-bottom: 3px solid var(--ink);
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.3), inset 4px 4px 0 rgba(255,255,255,.22), 0 10px 0 rgba(0,0,0,.4);
}
.article-card:active { transform: translateY(-2px); }

.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }

/* 第一行：标题 */
.card-title {
  font-size: 15px;
  line-height: 1.5;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0,0,0,.5);
  min-height: 45px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 第二行：作者 */
.card-author { font-size: 12px; color: #e6dcc4; }
.card-author::before { content: '✎ '; color: var(--grass-light); }
/* 第三行：时间 */
.card-date { font-size: 12px; color: #cfc3a6; }
.card-date::before { content: '◷ '; color: var(--grass-light); }
/* 第四行：简介 */
.card-summary {
  font-size: 13px;
  color: #3a3126;
  background: var(--plank-light);
  border: 2px solid var(--plank-dark);
  padding: 8px 10px;
  margin-top: auto;
  line-height: 1.6;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.15);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 卡片底部标签条 */
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.card-tag {
  font-size: 11px;
  color: #fff;
  background: var(--stone-ink);
  border: 1px solid var(--ink);
  padding: 2px 7px;
}

/* 空状态（苦力怕） */
.empty { text-align: center; padding: 40px 0 60px; }
.empty img { width: 96px; image-rendering: pixelated; animation: floaty 2.6s ease-in-out infinite; }
.empty p { margin-top: 14px; font-size: 15px; color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.6); }
.empty .empty-sub { font-size: 12px; color: rgba(242,233,216,.75); }

/* =====================================================================
 * 文章详情弹窗
 * ===================================================================== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(12, 10, 8, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-mask.open { display: flex; }

.modal-panel {
  background: var(--stone);
  border: var(--border-w) solid var(--ink);
  max-width: 640px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: inset -5px -5px 0 rgba(0,0,0,.3), inset 5px 5px 0 rgba(255,255,255,.2), 0 10px 0 rgba(0,0,0,.45);
  animation: pop .18s steps(3);
}
@keyframes pop { 0% { transform: scale(.85); } 100% { transform: scale(1); } }

.modal-head {
  background: var(--dirt);
  border-bottom: 3px solid var(--ink);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.15);
}
.modal-title { font-size: 16px; color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.5); line-height: 1.5; }
.modal-meta { font-size: 12px; color: #e0d3b4; margin-top: 4px; }
.modal-close {
  flex-shrink: 0;
  width: 30px; height: 30px;
  background: var(--danger);
  border: 2px solid var(--ink);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.3), inset 3px 3px 0 rgba(255,255,255,.2);
}
.modal-close:hover { filter: brightness(1.15); }
.modal-close:active { transform: translateY(2px); }

.modal-body { padding: 16px 18px 20px; color: #f4ecda; font-size: 14px; }
.modal-body p { margin-bottom: 10px; }
.modal-body h3 {
  font-size: 15px;
  color: var(--grass-light);
  margin: 14px 0 8px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.5);
}
.modal-body h3::before { content: '▍'; }
.modal-body ul { margin: 0 0 10px 4px; list-style: none; }
.modal-body li { padding-left: 20px; position: relative; margin-bottom: 4px; }
.modal-body li::before { content: '▪'; position: absolute; left: 2px; color: var(--grass-light); }
.modal-body ol { margin: 0 0 10px 24px; }
.modal-body ol li { margin-bottom: 4px; }
.modal-empty { color: #cfc3a6; }

/* 正文里的代码块 / 行内代码 / 表格 / 引用 / 分割线 / 图片 / 链接 */
.modal-body pre {
  background: #131110;
  border: 2px solid var(--ink);
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.35);
  padding: 10px 12px;
  margin: 10px 0;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.75;
  color: #d8e6c8;
  font-family: Consolas, 'Courier New', monospace;
  white-space: pre;
}
.modal-body code {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 12px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(0,0,0,.45);
  color: #ffe27a;
  padding: 1px 5px;
}
.modal-body pre code { background: none; border: none; color: inherit; padding: 0; }
.md-table-wrap { overflow-x: auto; margin: 10px 0; }
.modal-body table { border-collapse: collapse; width: 100%; font-size: 12px; }
.modal-body th, .modal-body td {
  border: 1px solid #7a7a7a;
  padding: 5px 9px;
  text-align: left;
  vertical-align: top;
}
.modal-body th { background: var(--stone-ink); color: #fff; font-weight: normal; white-space: nowrap; }
.modal-body tr:nth-child(even) td { background: rgba(0,0,0,.14); }
.modal-body blockquote {
  border-left: 4px solid var(--grass-dark);
  background: rgba(0,0,0,.25);
  padding: 6px 12px;
  margin: 10px 0;
  color: #e0d8c0;
}
.modal-body blockquote p { margin-bottom: 0; }
.modal-body hr { border: none; border-top: 2px dashed rgba(255,255,255,.25); margin: 14px 0; }
.modal-body img {
  max-width: 100%;
  height: auto;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(0,0,0,.4);
  margin: 8px 0;
  image-rendering: auto; /* 文章截图不需要像素化 */
}
.modal-body a { color: var(--grass-light); text-decoration: underline; }

/* =====================================================================
 * 导航页（链接列表）
 * ===================================================================== */
.link-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }

.link-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--dirt);
  border: var(--border-w) solid var(--ink);
  padding: 13px 16px;
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.3), inset 4px 4px 0 rgba(255,255,255,.18), 0 4px 0 rgba(0,0,0,.35);
  transition: transform .07s steps(2), background .07s steps(2);
}
.link-row:hover { background: var(--dirt-light); transform: translateX(4px); }
.link-row:active { transform: translateY(2px); }

.link-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--plank);
  border: 2px solid var(--plank-dark);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.25), inset 3px 3px 0 rgba(255,255,255,.3);
}
.link-main { flex: 1; min-width: 0; }
.link-name { font-size: 15px; color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.link-desc { font-size: 12px; color: #e0d3b4; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-arrow { font-size: 16px; color: var(--grass-light); flex-shrink: 0; }

/* =====================================================================
 * 关于页
 * ===================================================================== */
.about-card { display: flex; gap: 22px; padding: 22px; align-items: flex-start; }

.about-avatar { flex-shrink: 0; }
.about-avatar img {
  width: 168px;
  display: block;
  border: 4px solid var(--ink);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), 7px 7px 0 rgba(0,0,0,.45);
}

.about-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.about-row { display: flex; align-items: center; gap: 10px; }
.about-label {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  font-size: 13px;
  color: #fff;
  background: var(--stone-dark);
  border: 2px solid var(--ink);
  padding: 5px 4px;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.3), inset 3px 3px 0 rgba(255,255,255,.18);
}
.about-value {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink);
  background: var(--plank-light);
  border: 2px solid var(--plank-dark);
  padding: 5px 12px;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.15);
  overflow-wrap: break-word;
}

.about-motto { margin-top: 18px; text-align: center; }
.about-motto .sign { display: inline-block; font-size: 14px; }

/* =====================================================================
 * 页脚
 * ===================================================================== */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  background: var(--dirt) url('../images/textures/dirt.png') repeat;
  image-rendering: pixelated;
  border-top: var(--border-w) solid var(--ink);
  box-shadow: inset 0 4px 0 rgba(255,255,255,.12);
  text-align: center;
  padding: 16px 12px 20px;
}
.site-footer p { font-size: 12px; color: #f0e6cf; text-shadow: 1px 1px 0 rgba(0,0,0,.6); }
.site-footer .foot-extra { margin-top: 4px; font-size: 11px; color: rgba(240,230,207,.75); }

/* =====================================================================
 * 响应式
 * ===================================================================== */
@media (max-width: 720px) {
  .topnav-inner { flex-direction: column; padding: 10px 12px; gap: 8px; }
  .hero { min-height: calc(100vh - 108px); }
  .hero-name { font-size: 26px; }
  .about-card { flex-direction: column; align-items: center; }
  .about-info { width: 100%; }
  .filter-row { flex-direction: column; gap: 8px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* =====================================================================
 * 文章搜索框
 * ===================================================================== */
.search-input {
  font-family: var(--font);
  font-size: 13px;
  color: var(--ink);
  background: var(--plank-light);
  border: 2px solid var(--plank-dark);
  padding: 7px 12px;
  flex: 1;
  min-width: 200px;
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.15);
  outline: none;
}
.search-input:focus {
  border-color: var(--grass);
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.15), 0 0 0 2px rgba(124,189,79,.45);
}
.search-input::placeholder { color: rgba(36,29,22,.5); }

/* =====================================================================
 * 首页：统计竖列 + 最新文章 2×2 卡片（并排，节省纵向空间）
 * ===================================================================== */
.stats-latest {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 18px;
  align-items: stretch;
}

/* 左侧统计竖列（数值由 JS 自动计算） */
.stats-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.stat-block {
  flex: 1;
  background: var(--stone);
  border: var(--border-w) solid var(--ink);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 6px;
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.3), inset 4px 4px 0 rgba(255,255,255,.22), 0 4px 0 rgba(0,0,0,.35);
}
.stat-num { font-size: 24px; color: #fff; text-shadow: 3px 3px 0 rgba(0,0,0,.5); }
.stat-label { font-size: 11px; color: #e6dcc4; margin-top: 2px; }
.stat-caption { font-size: 11px; color: rgba(242,233,216,.8); text-align: center; margin-top: 2px; text-shadow: 1px 1px 0 rgba(0,0,0,.6); }

/* 右侧最新文章（按日期动态排序，取前 4 篇，2×2） */
.latest { margin-top: 34px; padding-bottom: 10px; }
.latest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.latest-more { text-align: center; margin-top: 22px; }
/* 首页最新文章卡片：整卡可点击跳转 */
a.article-card { color: inherit; }

/* 中屏：统计横排、卡片自适应列数 */
@media (max-width: 960px) {
  .stats-latest { grid-template-columns: 1fr; }
  .stats-panel {
    flex-direction: row;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .stat-caption { grid-column: 1 / -1; }
  .latest-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
@media (max-width: 560px) {
  .stats-panel { grid-template-columns: repeat(2, 1fr); }
}
