/* ========== 全站统一样式 ========== */
:root {
  --bg-1: #0a0a1a;
  --bg-2: #1a1a3e;
  --bg-3: #0d0d2b;
  --gold: #d4a843;
  --gold-light: #f0d68a;
  --gold-dim: #8b6914;
  --text: #e0d5c0;
  --text-muted: #9a8e7b;
  --text-dim: #5a5a7c;
  --card-bg: rgba(20,20,45,0.6);
  --card-bg-strong: rgba(30,30,60,0.8);
  --card-border: #3a3a5c;
  --good: #7ec87e;
  --bad: #e06060;
  --accent-blue: #a8c8f0;
}

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

body {
  font-family: "Microsoft YaHei", "SimSun", serif;
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ========== 顶部导航 ========== */
.site-header {
  background: rgba(10,10,26,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212,168,67,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 3px;
  font-weight: bold;
}
.site-logo .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--bg-1);
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 0 12px rgba(212,168,67,0.4);
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.main-nav a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 2px;
  border-radius: 4px;
  transition: all 0.25s;
  position: relative;
}
.main-nav a:hover:not(.disabled) {
  color: var(--gold-light);
  background: rgba(212,168,67,0.08);
}
.main-nav a.active {
  color: var(--gold);
  background: rgba(212,168,67,0.12);
}
.main-nav a.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.main-nav a.disabled {
  color: var(--text-dim);
  cursor: not-allowed;
}
.main-nav a.disabled::after {
  content: '敬请期待';
  position: absolute;
  top: 2px;
  right: -2px;
  font-size: 9px;
  color: var(--text-dim);
  background: rgba(90,90,124,0.3);
  padding: 1px 4px;
  border-radius: 8px;
  letter-spacing: 0;
}

/* ========== 主内容容器 ========== */
.page-body {
  flex: 1;
  padding: 30px 20px;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
}
.container-narrow {
  max-width: 1100px;
  margin: 0 auto;
}

/* ========== 通用页头标题 ========== */
.page-title {
  text-align: center;
  padding: 20px 0 30px;
}
.page-title h1 {
  font-size: 34px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 10px;
  text-shadow: 0 0 30px rgba(212,168,67,0.3);
}
.page-title .subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 8px;
  letter-spacing: 4px;
}

/* ========== 通用按钮 ========== */
.btn-gold {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--bg-1);
  border: none;
  padding: 10px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 3px;
  transition: all 0.3s;
  display: inline-block;
  font-family: inherit;
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(212,168,67,0.4);
}

/* ========== 通用卡片 ========== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px 24px;
}
.card-strong {
  background: var(--card-bg-strong);
}

/* ========== 通用区块标签 ========== */
.section-label {
  color: var(--gold-light);
  font-size: 15px;
  letter-spacing: 3px;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  margin-bottom: 12px;
}

/* ========== 页脚 ========== */
.site-footer {
  border-top: 1px solid rgba(90,90,124,0.25);
  padding: 24px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 1px;
  line-height: 1.8;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--gold); }
.footer-note { margin-top: 4px; }
.footer-links { margin-top: 6px; font-size: 12px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--gold); }

/* 网站地图页 */
.sm-section { margin: 18px 0; }
.sm-section h3 { font-size: 15px; color: var(--gold); margin-bottom: 10px; }
.sm-cat-link { font-size: 12px; font-weight: normal; color: var(--text-dim); }
.sm-cat-link a { color: var(--text-muted); }
.sm-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sm-links a { color: var(--text-muted); font-size: 13px; }
.sm-links a:hover { color: var(--gold); }

/* ========== 命理文库：分类导航 + 搜索 ========== */
.kn-toolbar {
  max-width: 1200px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.kn-cats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.kn-cat-wrap { position: relative; }
.kn-cat {
  display: inline-block;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 2px;
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  transition: all 0.25s;
  white-space: nowrap;
  cursor: pointer;
}
.kn-cat:hover {
  color: var(--gold-light);
  border-color: var(--gold);
  background: rgba(212,168,67,0.08);
}
.kn-cat.active {
  color: var(--bg-1);
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border-color: var(--gold);
  font-weight: bold;
}
/* 二级分类悬停下拉 */
.kn-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  background: rgba(15,15,35,0.97);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}
.kn-cat-wrap:hover .kn-submenu { display: flex; }
.kn-submenu a {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: 4px;
  letter-spacing: 1px;
  transition: all 0.2s;
}
.kn-submenu a:hover {
  color: var(--gold-light);
  background: rgba(212,168,67,0.1);
}
/* 二级分类栏（选中时显示） */
.kn-subcats {
  max-width: 1200px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(20,20,45,0.4);
  border: 1px solid var(--card-border);
  border-radius: 8px;
}
.kn-subcats a {
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: 4px;
  letter-spacing: 1px;
  transition: all 0.2s;
}
.kn-subcats a:hover { color: var(--gold-light); background: rgba(212,168,67,0.08); }
.kn-subcats a.active { color: var(--gold); background: rgba(212,168,67,0.15); font-weight: bold; }
/* 搜索框 */
.kn-search {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kn-search input {
  width: 220px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text);
  background: rgba(20,20,45,0.6);
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  outline: none;
  font-family: inherit;
  letter-spacing: 1px;
  transition: border-color 0.2s;
}
.kn-search input::placeholder { color: var(--text-dim); }
.kn-search input:focus { border-color: var(--gold); }
.kn-search button {
  padding: 7px 18px;
  font-size: 13px;
  color: var(--bg-1);
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border: none;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 2px;
  font-family: inherit;
  transition: all 0.25s;
}
.kn-search button:hover { box-shadow: 0 0 12px rgba(212,168,67,0.4); }

/* 筛选状态信息 */
.kn-filter-info {
  max-width: 1200px;
  margin: 0 auto 20px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kn-filter-info strong { color: var(--gold); }
.kn-filter-info em { color: var(--gold-light); font-style: normal; }
.kn-clear { color: var(--text-dim); font-size: 12px; }
.kn-clear:hover { color: var(--gold); }

/* ========== 主体布局：内容 + 侧边栏 ========== */
.kn-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: start;
}
.kn-main { min-width: 0; }

/* ========== 精选置顶区 ========== */
.kn-section-head {
  text-align: center;
  margin-bottom: 20px;
}
.kn-section-head h2 {
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 6px;
  margin-bottom: 4px;
}
.kn-section-sub {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 2px;
}
.kn-featured { margin-bottom: 36px; }
.kn-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.kn-feature-card {
  position: relative;
  background: linear-gradient(180deg, rgba(30,30,60,0.7) 0%, rgba(20,20,45,0.5) 100%);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 24px 22px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  overflow: hidden;
}
.kn-feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}
.kn-feature-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4), 0 0 20px rgba(212,168,67,0.15);
}
.kn-feat-tag {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 10px;
  color: var(--bg-1);
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 1px;
  font-weight: bold;
}

/* ========== 通用卡片元素 ========== */
.kn-card-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212,168,67,0.15), rgba(212,168,67,0.05));
  border: 1px solid rgba(212,168,67,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: bold;
}
.kn-card-cat {
  font-size: 11px;
  color: #8a7a5a;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.kn-card-title {
  font-size: 16px;
  color: var(--gold-light);
  letter-spacing: 2px;
  margin-bottom: 8px;
  font-weight: bold;
  line-height: 1.4;
}
.kn-card-summary {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kn-card-meta {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* ========== 主体卡片网格（双列） ========== */
.kn-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(90,90,124,0.25);
}
.kn-main-head h3 {
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 4px;
}
.kn-sort { font-size: 12px; letter-spacing: 1px; }
.kn-sort a { color: var(--text-muted); transition: color 0.2s; }
.kn-sort a:hover { color: var(--gold-light); }
.kn-sort a.active { color: var(--gold); font-weight: bold; }
.kn-sort-sep { color: var(--text-dim); margin: 0 6px; }
.kn-more { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }
.kn-more:hover { color: var(--gold); }

.kn-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}
.kn-card {
  background: linear-gradient(180deg, rgba(30,30,60,0.6) 0%, rgba(20,20,45,0.4) 100%);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 18px 18px;
  transition: all 0.3s;
  display: flex;
  gap: 14px;
  overflow: hidden;
  position: relative;
}
.kn-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.kn-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35), 0 0 15px rgba(212,168,67,0.12);
}
.kn-card:hover::before { opacity: 1; }
.kn-card-top { flex-shrink: 0; }
.kn-card .kn-card-icon { margin-bottom: 0; width: 40px; height: 40px; font-size: 18px; }
.kn-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kn-card .kn-card-title { font-size: 15px; }

/* 搜索结果列表（单列宽卡片） */
.kn-card-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}
.kn-card-list .kn-card { display: flex; gap: 16px; }

/* ========== 紧凑列表（解梦等） ========== */
.kn-compact-list {
  background: rgba(20,20,45,0.4);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 30px;
}
.kn-compact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(90,90,124,0.15);
  transition: all 0.2s;
}
.kn-compact-row:last-child { border-bottom: none; }
.kn-compact-row:hover { background: rgba(212,168,67,0.06); }
.kn-compact-title {
  font-size: 14px;
  color: var(--gold-light);
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}
.kn-compact-summary {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kn-compact-tag {
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--card-border);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.kn-compact-preview { margin-bottom: 36px; }

/* ========== 分页 ========== */
.kn-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 24px 0 16px;
}
.kn-page-btn, .kn-page-num {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0 10px;
  transition: all 0.2s;
  letter-spacing: 1px;
}
.kn-page-btn:hover, .kn-page-num:hover {
  color: var(--gold-light);
  border-color: var(--gold);
  background: rgba(212,168,67,0.08);
}
.kn-page-btn.disabled { opacity: 0.3; pointer-events: none; }
.kn-page-num.active {
  color: var(--bg-1);
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border-color: var(--gold);
  font-weight: bold;
}
.kn-load-more {
  text-align: center;
  margin-bottom: 20px;
}
.kn-load-more a {
  display: inline-block;
  padding: 10px 40px;
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 3px;
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  transition: all 0.25s;
}
.kn-load-more a:hover {
  color: var(--bg-1);
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border-color: var(--gold);
}

/* 空状态 */
.kn-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 2px;
}

/* ========== 右侧固定侧边栏 ========== */
.kn-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.kn-widget {
  background: rgba(20,20,45,0.5);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 18px 18px;
}
.kn-widget h4 {
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 3px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212,168,67,0.15);
}
.kn-hot-list { list-style: none; counter-reset: hot; }
.kn-hot-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(90,90,124,0.15);
}
.kn-hot-list li:last-child { border-bottom: none; }
.kn-hot-num {
  flex-shrink: 0;
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(90,90,124,0.2);
  border-radius: 4px;
  margin-top: 1px;
}
.kn-hot-num.top { color: var(--bg-1); background: linear-gradient(135deg, var(--gold-dim), var(--gold)); }
.kn-hot-list li a {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  transition: color 0.2s;
}
.kn-hot-list li a:hover { color: var(--gold-light); }
.kn-side-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.kn-side-cats a {
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  letter-spacing: 1px;
  transition: all 0.2s;
}
.kn-side-cats a:hover { color: var(--gold-light); border-color: var(--gold); }
.kn-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.kn-tag-cloud a {
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 10px;
  background: rgba(90,90,124,0.12);
  border-radius: 12px;
  letter-spacing: 1px;
  transition: all 0.2s;
}
.kn-tag-cloud a:hover { color: var(--gold-light); background: rgba(212,168,67,0.15); }

/* ========== 面包屑 ========== */
.kn-breadcrumb {
  max-width: 1200px;
  margin: 0 auto 20px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1px;
}
.kn-breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.kn-breadcrumb a:hover { color: var(--gold); }
.kn-breadcrumb .sep { margin: 0 8px; color: var(--text-dim); }
.kn-breadcrumb .current { color: var(--gold-light); }

/* ========== 文章详情正文 ========== */
.kn-content {
  background: rgba(20,20,45,0.5);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 30px 36px;
}
.kn-content .article h2 {
  font-size: 24px;
  color: var(--gold-light);
  letter-spacing: 6px;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(212,168,67,0.2);
}
.kn-content .art-meta {
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.kn-content .art-meta .sep { color: var(--text-dim); }
.kn-content .article h3 {
  color: var(--gold);
  font-size: 17px;
  letter-spacing: 3px;
  margin: 22px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
}
.kn-content .article p {
  color: #c0b090;
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-indent: 2em;
}
.kn-content .article ul {
  margin: 8px 0 14px 2em;
  color: #c0b090;
  font-size: 14px;
  line-height: 2;
}
.kn-content .article ul li { margin-bottom: 4px; letter-spacing: 0.5px; }
.kn-content .star-block {
  background: rgba(30,30,60,0.5);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 12px;
}
.kn-content .sb-title {
  color: var(--gold-light);
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.kn-content .sb-title .sb-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
  margin-left: 8px;
  letter-spacing: 1px;
}
.kn-content .sb-desc {
  color: #c0b090;
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.5px;
}
.kn-content .palace-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
}
.kn-content .palace-table th, .kn-content .palace-table td {
  padding: 8px 12px;
  text-align: left;
  border: 1px solid var(--card-border);
}
.kn-content .palace-table th {
  background: rgba(212,168,67,0.1);
  color: var(--gold);
  letter-spacing: 2px;
  font-weight: bold;
}
.kn-content .palace-table td { color: #c0b090; line-height: 1.7; }
.kn-content .palace-table td:first-child { color: var(--gold-light); white-space: nowrap; }
.kn-content .info-note {
  background: rgba(212,168,67,0.06);
  border-left: 3px solid var(--gold);
  padding: 10px 16px;
  margin: 14px 0;
  font-size: 13px;
  color: #c0b090;
  line-height: 1.8;
  letter-spacing: 0.5px;
}
.kn-content .info-note strong { color: var(--gold-light); }
.kn-content .card-art {
  display: block;
  margin: 0 auto 24px;
  max-width: 300px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--gold-dim);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.kn-content .art-tags {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed rgba(90,90,124,0.3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kn-content .art-tags a {
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 12px;
  background: rgba(90,90,124,0.12);
  border-radius: 12px;
  letter-spacing: 1px;
  transition: all 0.2s;
}
.kn-content .art-tags a:hover { color: var(--gold-light); background: rgba(212,168,67,0.15); }

/* 上一篇/下一篇 */
.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}
.prev-next a {
  flex: 1;
  background: rgba(30,30,60,0.5);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 12px 18px;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 1px;
  transition: all 0.2s;
}
.prev-next a:hover {
  color: var(--gold-light);
  border-color: var(--gold);
  background: rgba(212,168,67,0.06);
}
.prev-next a .pn-label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
  letter-spacing: 2px;
}
.prev-next a .pn-title {
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 2px;
}
.prev-next a.pn-next { text-align: right; }
.prev-next a.pn-disabled { opacity: 0.35; pointer-events: none; }

/* 相关推荐 */
.kn-related { margin-top: 30px; }
.kn-related h3 {
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 4px;
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
}
.kn-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.kn-related-card {
  background: rgba(20,20,45,0.4);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 14px 16px;
  transition: all 0.25s;
}
.kn-related-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.kn-related-card .kn-card-icon { width: 36px; height: 36px; font-size: 16px; margin-bottom: 8px; }
.kn-related-card .kn-card-title { font-size: 14px; margin-bottom: 6px; }
.kn-related-card .kn-card-summary { font-size: 12px; -webkit-line-clamp: 1; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .header-inner { padding: 10px 14px; gap: 10px; }
  .site-logo { font-size: 15px; letter-spacing: 2px; }
  .main-nav a { padding: 6px 10px; font-size: 13px; letter-spacing: 1px; }
  .page-title h1 { font-size: 26px; letter-spacing: 6px; }
  .page-body { padding: 20px 14px; }
  .kn-toolbar { gap: 10px; }
  .kn-cats { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .kn-cat { flex-shrink: 0; }
  .kn-submenu { display: none !important; }
  .kn-search { width: 100%; }
  .kn-search input { width: 100%; flex: 1; }
  .kn-layout { grid-template-columns: 1fr; gap: 24px; }
  .kn-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .kn-sidebar .kn-widget { flex: 1; min-width: 240px; }
  .kn-featured-grid { grid-template-columns: 1fr; }
  .kn-card-grid { grid-template-columns: 1fr; }
  .kn-related-grid { grid-template-columns: 1fr; }
  .kn-content { padding: 22px 18px; }
  .kn-content .article h2 { font-size: 20px; letter-spacing: 4px; }
  .kn-content .article p { font-size: 13px; line-height: 1.9; }
  .prev-next { flex-direction: column; }
  .kn-compact-summary { display: none; }
}

/* ========== 主题切换按钮 ========== */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--gold);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  flex-shrink: 0;
  line-height: 1;
}
.theme-toggle:hover {
  border-color: var(--gold);
  background: rgba(212,168,67,0.1);
  transform: rotate(20deg);
}
.theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: block; }

/* ========== 明亮主题（宣纸金墨） ========== */
[data-theme="light"] {
  --bg-1: #f0e8d6;
  --bg-2: #e6dcc4;
  --bg-3: #faf6ee;
  --gold: #8a6810;
  --gold-light: #6a5008;
  --gold-dim: #a8902a;
  --text: #2e2820;
  --text-muted: #524738;
  --text-dim: #6b6048;
  --card-bg: rgba(255,253,247,0.85);
  --card-bg-strong: rgba(255,253,247,0.97);
  --card-border: #c4b59a;
  --good: #3a7a3a;
  --bad: #b04848;
  --accent-blue: #3a6a92;
}
/* 背景与页头 */
[data-theme="light"] body {
  background: linear-gradient(135deg, #f0e8d6 0%, #e6dcc4 50%, #faf6ee 100%);
}
[data-theme="light"] .site-header {
  background: rgba(255,253,247,0.95);
  border-bottom-color: rgba(138,104,16,0.3);
}
[data-theme="light"] .site-footer {
  border-top-color: rgba(160,140,100,0.35);
  color: #6b6048;
}
/* 深色卡片背景 → 明亮 */
[data-theme="light"] .card,
[data-theme="light"] .card-strong,
[data-theme="light"] .feature-card,
[data-theme="light"] .intro-block,
[data-theme="light"] .kn-feature-card,
[data-theme="light"] .kn-card,
[data-theme="light"] .kn-content,
[data-theme="light"] .kn-widget,
[data-theme="light"] .kn-compact-list,
[data-theme="light"] .kn-related-card,
[data-theme="light"] .kn-subcats,
[data-theme="light"] .prev-next a,
[data-theme="light"] .kn-content .star-block {
  background: linear-gradient(180deg, rgba(255,253,247,0.98) 0%, rgba(248,243,230,0.92) 100%);
}
[data-theme="light"] .kn-card-list .kn-card {
  background: rgba(255,253,247,0.95);
}
/* 边框统一加深 */
[data-theme="light"] .feature-card,
[data-theme="light"] .intro-block,
[data-theme="light"] .kn-feature-card,
[data-theme="light"] .kn-card,
[data-theme="light"] .kn-content,
[data-theme="light"] .kn-widget,
[data-theme="light"] .kn-compact-list,
[data-theme="light"] .kn-related-card,
[data-theme="light"] .kn-subcats,
[data-theme="light"] .prev-next a,
[data-theme="light"] .card,
[data-theme="light"] .card-strong,
[data-theme="light"] .kn-content .star-block,
[data-theme="light"] .kn-content .palace-table th,
[data-theme="light"] .kn-content .palace-table td {
  border-color: #c4b59a;
}
/* 深色文字 → 深墨色 */
[data-theme="light"] .kn-content .article p,
[data-theme="light"] .kn-content .article ul,
[data-theme="light"] .kn-content .article ul li,
[data-theme="light"] .kn-content .palace-table td,
[data-theme="light"] .kn-content .sb-desc {
  color: #3a3225;
}
[data-theme="light"] .kn-content .palace-table td:first-child,
[data-theme="light"] .kn-content .sb-title {
  color: #6a5008;
}
[data-theme="light"] .kn-card-cat,
[data-theme="light"] .article-card .card-category {
  color: #6a5a18;
}
/* 卡片悬停阴影 */
[data-theme="light"] .feature-card:hover,
[data-theme="light"] .kn-feature-card:hover,
[data-theme="light"] .kn-card:hover,
[data-theme="light"] .kn-related-card:hover {
  box-shadow: 0 6px 20px rgba(140,120,80,0.2), 0 0 15px rgba(138,104,16,0.12);
}
/* 搜索框与输入 */
[data-theme="light"] .kn-search input {
  background: rgba(255,253,247,0.9);
  border-color: var(--gold-dim);
  color: var(--text);
}
[data-theme="light"] .kn-search input::placeholder { color: #8a7e68; }
/* 分类按钮 */
[data-theme="light"] .kn-cat {
  border-color: var(--gold-dim);
}
/* 二级分类下拉 */
[data-theme="light"] .kn-submenu {
  background: rgba(255,253,247,0.99);
  border-color: #c4b59a;
  box-shadow: 0 8px 25px rgba(140,120,80,0.2);
}
/* 紧凑列表行 */
[data-theme="light"] .kn-compact-row {
  border-bottom-color: rgba(180,160,120,0.35);
}
[data-theme="light"] .kn-compact-row:hover { background: rgba(138,104,16,0.08); }
/* 热门列表 */
[data-theme="light"] .kn-hot-list li { border-bottom-color: rgba(180,160,120,0.3); }
[data-theme="light"] .kn-hot-num { background: rgba(160,140,100,0.25); color: #524738; }
/* 分页 */
[data-theme="light"] .kn-page-btn,
[data-theme="light"] .kn-page-num {
  border-color: #c4b59a;
}
[data-theme="light"] .kn-page-btn:hover,
[data-theme="light"] .kn-page-num:hover {
  background: rgba(138,104,16,0.1);
}
[data-theme="light"] .kn-load-more a {
  border-color: var(--gold-dim);
}
/* 标签 */
[data-theme="light"] .kn-tag-cloud a,
[data-theme="light"] .kn-content .art-tags a {
  background: rgba(160,140,100,0.18);
}
[data-theme="light"] .kn-side-cats a { border-color: #c4b59a; }
/* 信息提示框 */
[data-theme="light"] .kn-content .info-note {
  background: rgba(138,104,16,0.08);
}
/* 上一篇/下一篇 hover */
[data-theme="light"] .prev-next a:hover {
  background: rgba(138,104,16,0.08);
}
/* 空状态文字 */
[data-theme="light"] .kn-empty { color: #6b6048; }
/* 明亮主题响应式补充 */
@media (max-width: 768px) {
  [data-theme="light"] .kn-sidebar .kn-widget { background: rgba(255,253,247,0.95); }
}
