/* ============================================
   TRAE Forum Posts - 主样式表
   支持亮色/深色主题切换
   ============================================ */

/* ── CSS 变量 ── */
:root {
  --accent: #4F6EF7;
  --accent-soft: #EEF1FE;
  --accent-mid: #C5D0FB;
  --teal: #0EBEAD;
  --teal-soft: #E6FAF8;
  --coral: #F5655C;
  --coral-soft: #FEF0EF;
  --amber: #E9A117;
  --amber-soft: #FDF5E3;
  --violet: #8B6CFC;
  --violet-soft: #F1EDFE;
  --rose: #EC4899;
  --rose-soft: #FDF2F8;
  --bg: #F0F2F8;
  --bg-white: #FFFFFF;
  --text-primary: #1E2432;
  --text-secondary: #5C6478;
  --text-tertiary: #9BA3B5;
  --border: #E2E6F0;
  --border-light: #EDF0F7;
  --shadow-sm: 0 1px 2px rgba(30,36,50,0.04);
  --shadow-md: 0 2px 12px rgba(30,36,50,0.06);
  --shadow-lg: 0 8px 28px rgba(30,36,50,0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 73px;
  --toolbar-h: 57px;
}

/* ── 深色主题 ── */
[data-theme="dark"] {
  --accent: #6B8AFF;
  --accent-soft: #1E2A4A;
  --accent-mid: #3D5080;
  --teal: #14D4C0;
  --teal-soft: #0D2D2A;
  --coral: #FF7B72;
  --coral-soft: #3A1A18;
  --amber: #FFB84D;
  --amber-soft: #2A2010;
  --violet: #A78BFA;
  --violet-soft: #231A3A;
  --rose: #F472B6;
  --rose-soft: #3A1528;
  --bg: #0D1117;
  --bg-white: #161B22;
  --text-primary: #E6EDF3;
  --text-secondary: #8B949E;
  --text-tertiary: #6E7681;
  --border: #30363D;
  --border-light: #21262D;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.4);
}

/* ── 基础重置 ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.container { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }

/* ── HEADER ── */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky; top: 0; z-index: 100;
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 1px 12px rgba(30,36,50,0.06); }
.header-inner {
  display: flex; align-items: center; gap: 16px;
  max-width: 1440px; margin: 0 auto; padding: 12px 24px;
}
.header-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 3px solid var(--border-light);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.header-avatar:hover { border-color: var(--accent-mid); transform: scale(1.05); }
.header-info { flex: 1; min-width: 0; }
.header-name {
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-badges { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.header-badge {
  font-size: 0.72rem; color: var(--text-tertiary);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; background: var(--bg); border-radius: 12px;
}
.header-badge a { color: var(--accent); }
.header-badge a:hover { text-decoration: underline; }
.header-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.header-stats { display: flex; gap: 24px; flex-shrink: 0; }
.header-stat {
  text-align: center; padding: 8px 12px;
  background: var(--bg); border-radius: var(--radius-md);
  min-width: 80px;
}
.header-stat-num {
  font-size: 1.2rem; font-weight: 700;
  color: var(--accent); line-height: 1.2;
}
.header-stat-label {
  font-size: 0.68rem; color: var(--text-tertiary);
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ── 主题切换按钮 ── */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text-secondary);
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent-mid); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ── 导出按钮 ── */
.export-btn {
  padding: 6px 14px; border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-white); color: var(--text-secondary);
  font-size: 0.8rem; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all 0.2s var(--ease);
}
.export-btn:hover { border-color: var(--accent-mid); color: var(--accent); }
.export-btn svg { width: 14px; height: 14px; }

/* ── TOOLBAR ── */
.toolbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
  position: sticky; top: var(--header-h); z-index: 99;
  transition: background 0.3s var(--ease);
}
.toolbar-inner {
  display: flex; align-items: center; gap: 12px;
  max-width: 1440px; margin: 0 auto; padding: 0 24px;
}
.search-box { position: relative; width: 240px; flex-shrink: 0; }
.search-box svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-tertiary); pointer-events: none;
}
.search-box input {
  width: 100%; padding: 8px 12px 8px 36px;
  border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text-primary);
  font-size: 0.85rem; outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.search-box input::placeholder { color: var(--text-tertiary); }
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  border: none; background: var(--border); color: var(--text-tertiary);
  cursor: pointer; display: none; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1;
  transition: background 0.2s var(--ease);
}
.search-clear:hover { background: var(--text-tertiary); color: #fff; }
.search-clear.show { display: flex; }
.cat-tabs {
  display: flex; gap: 6px; overflow-x: auto; flex: 1;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 2px 0;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px;
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer; border: 1.5px solid var(--border);
  background: var(--bg-white); color: var(--text-secondary);
  white-space: nowrap; user-select: none;
  transition: all 0.2s var(--ease);
}
.cat-tab .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cat-tab:hover { border-color: var(--accent-mid); color: var(--accent); background: var(--accent-soft); }
.cat-tab.active {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(79,110,247,0.25);
}
.cat-tab.active .dot { background: rgba(255,255,255,0.6) !important; }
.cat-tab .cnt { font-size: 0.68rem; opacity: 0.6; font-weight: 600; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sort-select {
  padding: 6px 10px; border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-white); color: var(--text-secondary);
  font-size: 0.8rem; outline: none; cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.sort-select:hover { border-color: var(--accent-mid); }
.view-toggle {
  display: flex; gap: 4px; background: var(--bg);
  padding: 4px; border-radius: 8px;
}
.view-btn {
  padding: 6px 10px; border-radius: 6px;
  border: none; background: transparent;
  color: var(--text-tertiary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
}
.view-btn:hover { color: var(--text-secondary); }
.view-btn.active {
  background: var(--bg-white); color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.view-btn svg { width: 16px; height: 16px; }
.search-results {
  font-size: 0.78rem; color: var(--text-tertiary);
  padding: 4px 12px; background: var(--accent-soft);
  border-radius: 12px; white-space: nowrap;
}

/* ── MAIN ── */
main { padding: 24px 0 48px; }

/* ── 分类列视图 ── */
.cat-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; align-items: start;
}
.cat-col {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  animation: colIn 0.35s var(--ease) both;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.cat-col:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.cat-col-header {
  padding: 16px 18px 14px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border-light);
  position: sticky; top: 0;
  background: var(--bg-white); z-index: 1;
}
.cat-col-dot { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.cat-col-name {
  font-size: 0.92rem; font-weight: 700;
  color: var(--text-primary); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat-col-count {
  font-size: 0.72rem; font-weight: 600;
  color: var(--text-tertiary);
  background: var(--bg); padding: 3px 10px; border-radius: 12px;
}
.cat-col-body {
  padding: 12px 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  max-height: 70vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.cat-col-body::-webkit-scrollbar { width: 4px; }
.cat-col-body::-webkit-scrollbar-track { background: transparent; }
.cat-col-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── 帖子项（列视图） ── */
.post-item {
  display: block; padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none; color: inherit;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
  cursor: pointer;
}
.post-item:hover {
  background: var(--bg);
  border-color: var(--border);
  transform: translateX(4px);
}
.post-item-title {
  font-size: 0.85rem; font-weight: 600;
  line-height: 1.4; color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  transition: color 0.2s var(--ease);
}
.post-item:hover .post-item-title { color: var(--accent); }
.post-item-meta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px; font-size: 0.72rem; color: var(--text-tertiary);
}
.post-item-meta span { display: inline-flex; align-items: center; gap: 4px; }
.post-item-meta svg { width: 12px; height: 12px; }
.post-item-pin {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 4px;
  background: var(--coral-soft); color: var(--coral);
  font-size: 0.65rem; font-weight: 600; margin-left: 6px;
}

/* ── 卡片网格视图 ── */
.flat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.flat-card {
  display: flex; flex-direction: column;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  animation: cardIn 0.3s var(--ease) both;
}
.flat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-mid);
}
.flat-card-img {
  width: 100%; height: 180px;
  object-fit: cover; display: block;
  transition: transform 0.3s var(--ease);
}
.flat-card:hover .flat-card-img { transform: scale(1.03); }
.flat-card-img-wrap { width: 100%; height: 180px; overflow: hidden; }
.flat-card-placeholder {
  width: 100%; height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; opacity: 0.3;
}
.flat-card-body { padding: 16px 18px 14px; flex: 1; display: flex; flex-direction: column; }
.flat-card-cat {
  display: inline-flex; align-self: flex-start;
  padding: 3px 10px; border-radius: 6px;
  font-size: 0.7rem; font-weight: 600; margin-bottom: 8px;
}
.flat-card-title {
  font-size: 0.95rem; font-weight: 600;
  line-height: 1.4; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  color: var(--text-primary);
  transition: color 0.2s var(--ease);
}
.flat-card:hover .flat-card-title { color: var(--accent); }
.flat-card-excerpt {
  font-size: 0.82rem; color: var(--text-secondary);
  line-height: 1.5; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; flex: 1;
}
.flat-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid var(--border-light);
}
.flat-card-stats {
  display: flex; gap: 12px; font-size: 0.75rem; color: var(--text-tertiary);
}
.flat-card-stats span { display: inline-flex; align-items: center; gap: 4px; }
.flat-card-stats svg { width: 13px; height: 13px; }
.flat-card-date { font-size: 0.72rem; color: var(--text-tertiary); }

/* ── 状态 ── */
.empty-state { text-align: center; padding: 100px 20px; color: var(--text-tertiary); }
.empty-state .icon { font-size: 3.2rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state p { font-size: 0.95rem; }
.loading-state { text-align: center; padding: 100px 20px; color: var(--text-tertiary); }
.loader {
  width: 36px; height: 36px; margin: 0 auto 16px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.error-state {
  text-align: center; padding: 60px 24px;
  background: var(--bg-white); border-radius: var(--radius-md);
  border: 1px solid var(--coral-soft);
}
.error-state h3 { color: var(--coral); margin-bottom: 8px; font-size: 1.1rem; }
.error-state p { color: var(--text-secondary); font-size: 0.9rem; }
.error-state a { color: var(--accent); }

/* ── FOOTER ── */
footer {
  text-align: center; padding: 24px;
  font-size: 0.75rem; color: var(--text-tertiary);
  border-top: 1px solid var(--border-light);
  background: var(--bg-white);
  transition: background 0.3s var(--ease);
}
footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
footer a:hover { text-decoration: underline; }

/* ── 回到顶部 ── */
.back-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: var(--accent); color: #fff;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(79,110,247,0.3);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 90; pointer-events: none;
}
.back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover { background: #3D5BD9; }
.back-top svg { width: 16px; height: 16px; }

/* ── 快捷键提示 ── */
.shortcut-hint {
  position: fixed; bottom: 24px; left: 24px;
  display: flex; gap: 8px; z-index: 90;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  pointer-events: none;
}
.shortcut-hint.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.shortcut-key {
  padding: 4px 10px; border-radius: 6px;
  background: var(--bg-white); border: 1px solid var(--border);
  font-size: 0.7rem; color: var(--text-tertiary);
  box-shadow: var(--shadow-sm);
}
.shortcut-key kbd {
  font-family: var(--font); font-weight: 600;
  color: var(--text-secondary);
}

/* ── 图表面板 ── */
.stats-panel {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 24px; margin-bottom: 24px;
  display: none;
  animation: fadeIn 0.3s var(--ease);
}
.stats-panel.show { display: block; }
.stats-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.stats-panel-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.stats-panel-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: var(--bg); color: var(--text-tertiary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
}
.stats-panel-close:hover { background: var(--coral-soft); color: var(--coral); }
.stats-charts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.chart-container {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 16px;
}
.chart-container canvas { width: 100% !important; max-height: 250px; }

/* ── 动画 ── */
@keyframes colIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 骨架屏 ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg) 0px, var(--border-light) 100px, var(--bg) 200px);
  background-size: 200px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-header {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-info { flex: 1; }
.skeleton-name { height: 18px; width: 120px; margin-bottom: 8px; }
.skeleton-badges { display: flex; gap: 8px; }
.skeleton-badge { height: 20px; width: 80px; border-radius: 12px; }
.skeleton-stats { display: flex; gap: 24px; }
.skeleton-stat { height: 60px; width: 80px; border-radius: var(--radius-md); }
.skeleton-toolbar {
  padding: 12px 24px; background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 12px;
}
.skeleton-search { height: 36px; width: 240px; border-radius: 10px; }
.skeleton-tabs { display: flex; gap: 6px; flex: 1; }
.skeleton-tab { height: 32px; width: 80px; border-radius: 20px; }
.skeleton-content { padding: 24px; }
.skeleton-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.skeleton-column {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light); overflow: hidden;
}
.skeleton-col-header {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 12px;
}
.skeleton-col-dot { width: 12px; height: 12px; border-radius: 4px; }
.skeleton-col-name { height: 16px; width: 100px; }
.skeleton-col-count { height: 20px; width: 30px; border-radius: 12px; }
.skeleton-col-body {
  padding: 12px 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.skeleton-item { padding: 12px 14px; border-radius: var(--radius-sm); }
.skeleton-item-title { height: 14px; width: 100%; margin-bottom: 8px; }
.skeleton-item-title-short { height: 14px; width: 60%; }
.skeleton-item-meta { display: flex; gap: 10px; margin-top: 6px; }
.skeleton-meta-item { height: 12px; width: 40px; }

/* ── 焦点样式 ── */
.post-item:focus-visible,
.flat-card:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.cat-tab:focus-visible,
.view-btn:focus-visible,
.sort-select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ── 活跃状态 ── */
.post-item:active, .flat-card:active { transform: scale(0.98); }
.cat-tab:active { transform: scale(0.95); }

/* ── 响应式 ── */
@media (max-width: 1200px) {
  .cat-columns { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 900px) {
  .cat-columns { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .flat-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .header-stats { gap: 16px; }
  .toolbar-actions { display: none; }
  .stats-charts { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .header-stats { width: 100%; justify-content: space-around; }
  .toolbar-inner { flex-wrap: wrap; gap: 10px; }
  .search-box { width: 100%; order: -1; }
  .cat-columns { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
  .cat-col-body { max-height: 50vh; }
  .flat-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .toolbar { position: static; }
  .skeleton-columns { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .shortcut-hint { display: none; }
}
@media (max-width: 480px) {
  .cat-columns { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cat-col-body { max-height: 40vh; }
  .header-stat-num { font-size: 1rem; }
  .header-stat { min-width: 70px; padding: 6px 8px; }
  .skeleton-columns { grid-template-columns: 1fr; }
}

/* ── 打印样式 ── */
@media print {
  .toolbar, .back-top, .skeleton, .theme-toggle, .export-btn,
  .shortcut-hint, .stats-panel { display: none !important; }
  .site-header { position: static; box-shadow: none; }
  .cat-col { break-inside: avoid; }
}
