/* 知远风物志 - 全局样式 V3.0 统一视觉规范 */
:root {
  --color-primary: #5A3A1F;
  --color-dark: #2A190D;
  --color-bg: #F5F0E8;
  --color-card: #FFFFFF;
  --color-accent: #8B4513;
  --color-gold: #C8956D;
  --color-text: #3D2B1F;
  --color-text-light: #7A6B5D;
  --color-border: #E0D5C5;
  --color-highlight: #F0E6D6;
  --radius-card: 14px;
  --radius-btn: 10px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 12px rgba(90,58,31,0.08);
  --shadow-hover: 0 8px 28px rgba(90,58,31,0.16);
  --font-title: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-kai: "STKaiti", "KaiTi", "Noto Serif SC", serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
header {
  background: rgba(42,25,13,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--color-accent);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: var(--font-kai);
  font-size: 22px;
  color: #E8DCC8;
  text-decoration: none;
  letter-spacing: 2px;
  font-weight: 600;
}
.logo span { color: var(--color-accent); }
nav { display: flex; gap: 20px; margin-left: auto; margin-right: 20px; }
nav a {
  color: #D8C9B0;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(222,180,122,.28);
  background: rgba(255,255,255,.045);
  transition: color .2s, background .2s, border-color .2s, transform .15s;
  white-space: nowrap;
}
nav a:hover, nav a.active {
  color: #F6EAD6;
  background: rgba(139,77,25,.55);
  border-color: rgba(222,180,122,.62);
}
nav a:active { transform: scale(.95); }
.nav-cta {
  background: var(--color-accent);
  color: #F5EDE0;
  padding: 8px 18px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--color-primary);
  transform: translateY(-1px);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, rgba(42,25,13,0.9) 0%, rgba(90,58,31,0.85) 100%), url('IMAGES_PLACEHOLDER') center/cover no-repeat;
  padding: 72px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139,69,19,0.25);
  border-left: 3px solid var(--color-accent);
  color: #E8DCC8;
  padding: 6px 16px;
  font-size: 13px;
  margin-bottom: 20px;
  position: relative;
  letter-spacing: 1px;
  backdrop-filter: blur(2px);
}
.hero-category::before {
  content: "❖";
  color: var(--color-accent);
  font-size: 11px;
}
.hero h1 {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 700;
  color: #F5EDE0;
  line-height: 1.55;
  max-width: 680px;
  margin: 0 auto 16px;
  position: relative;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
  letter-spacing: 0.5px;
}
.hero-meta {
  color: #A89880;
  font-size: 13px;
  position: relative;
}
.hero-meta span { margin: 0 8px; }

/* 面包屑 */
.breadcrumb {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 20px 0;
  font-size: 13px;
  color: var(--color-text-light);
}
.breadcrumb a {
  color: var(--color-accent);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; color: var(--color-border); }

/* 容器 */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}
.overview-card {
  background: var(--color-card);
  border-left: 4px solid var(--color-accent);
  padding: 24px 28px;
  margin-bottom: 40px;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s;
}
.overview-card:hover { box-shadow: var(--shadow-hover); }
.overview-card p {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--color-text);
}

/* 标题 */
h2 {
  font-family: var(--font-title);
  font-size: 21px;
  font-weight: 700;
  color: var(--color-dark);
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
  position: relative;
  word-break: keep-all;
}
h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--color-accent);
}
h3 {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-primary);
  margin: 26px 0 12px;
  word-break: keep-all;
}
p {
  margin-bottom: 16px;
  text-align: justify;
}
strong { color: var(--color-dark); font-weight: 600; }

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-card);
  font-size: 14px;
  min-width: 480px;
}
th {
  background: var(--color-primary);
  color: #F5EDE0;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-family: var(--font-title);
  white-space: nowrap;
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background: var(--color-highlight); }

/* 列表 */
ol, ul { margin: 12px 0 16px 24px; }
li { margin-bottom: 8px; }

/* 误区纠正 */
.misconception {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.3s;
}
.misconception:hover { box-shadow: var(--shadow-card); }
.misconception .wrong {
  color: #8B3A3A;
  font-weight: 600;
  margin-bottom: 6px;
}
.misconception .correct { color: var(--color-text); }

/* 现代意义高亮 */
.insight-box {
  background: linear-gradient(135deg, var(--color-highlight) 0%, #E8DCC8 100%);
  border-left: 4px solid var(--color-accent);
  padding: 22px 26px;
  margin: 28px 0;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}
.insight-box .insight-title {
  font-family: var(--font-title);
  color: var(--color-accent);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* 信息图 */
.infographic-box {
  margin-top: 40px;
  padding: 28px;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.infographic-box h2 {
  border: none;
  padding: 0;
  margin-bottom: 16px;
  font-size: 20px;
}
.infographic-box h2::after { display: none; }
.infographic-box figure { margin: 0; text-align: center; }
.infographic-box img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.infographic-box figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.75;
  text-align: left;
  padding: 0 4px;
}

/* FAQ */
.faq-section { margin-top: 40px; }
.faq-item {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.faq-item:hover { box-shadow: var(--shadow-card); }
.faq-item summary {
  padding: 16px 22px;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--color-dark);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.faq-item summary:hover { background: var(--color-highlight); }
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--color-accent);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-answer {
  padding: 0 22px 18px;
  color: var(--color-text);
  font-size: 14.5px;
  line-height: 1.85;
}

/* 参考资料 */
.references {
  margin-top: 40px;
  padding: 24px;
  background: var(--color-highlight);
  border-radius: var(--radius-card);
}
.references h3 {
  margin-top: 0;
  color: var(--color-dark);
}
.references ol {
  margin-left: 20px;
  font-size: 13px;
  color: var(--color-text-light);
}
.references li { margin-bottom: 10px; }

/* 相关文章 */
.related-section {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 2px solid var(--color-border);
}
.related-section h2 { border: none; padding: 0; margin-bottom: 20px; }
.related-section h2::after { display: none; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.related-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 18px;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s;
  display: block;
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-accent);
}
.related-card .rc-cat {
  font-size: 11px;
  color: var(--color-accent);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.related-card .rc-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-dark);
  line-height: 1.55;
}

/* 页脚 */
footer {
  background: var(--color-dark);
  color: #8A7B68;
  padding: 32px 20px;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}
footer .footer-inner { max-width: 760px; margin: 0 auto; }
footer .disclaimer {
  margin-bottom: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  text-align: left;
}
footer a { color: #A89880; }

/* 平板适配 */
@media (max-width: 768px) {
  .hero { padding: 60px 20px 50px; }
  .hero h1 { font-size: 24px; max-width: 100%; }
  .container { padding: 28px 18px 50px; }
  h2 { font-size: 19px; margin: 34px 0 14px; }
  h3 { font-size: 16px; }
  .overview-card { padding: 18px 20px; }
  .overview-card p { font-size: 15px; }
  .related-grid { grid-template-columns: 1fr; }
  .infographic-box { padding: 18px; }
}

/* 手机适配 */
@media (max-width: 480px) {
  body { font-size: 15px; line-height: 1.8; }
  .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
    padding: 8px 14px;
  }
  .logo { font-size: 19px; order: 1; }
  nav:not([class]) { order: 3; width: 100%; display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 6px;
    margin-left: 0;
    margin-right: 0;
    padding: 2px 0;
  }
  nav:not([class]) a { font-size: 12.5px; white-space: nowrap; text-align: center; padding: 7px 4px; overflow: hidden; text-overflow: ellipsis; }
  .nav-cta { order: 2; margin-left: auto; padding: 7px 14px; font-size: 13px; }
  .hero { padding: 48px 16px 40px; }
  .hero h1 {
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: 0.3px;
  }
  .hero-category {
    font-size: 12px;
    padding: 5px 12px;
  }
  .hero-meta { font-size: 12px; }
  .hero-meta span { margin: 0 4px; }
  .breadcrumb { font-size: 12px; padding: 10px 16px 0; }
  .container { padding: 20px 16px 40px; }
  h2 { font-size: 18px; margin: 28px 0 12px; padding-bottom: 8px; }
  h3 { font-size: 15.5px; margin: 22px 0 10px; }
  p { margin-bottom: 14px; }
  .overview-card { padding: 16px 18px; margin-bottom: 28px; }
  .overview-card p { font-size: 14.5px; line-height: 1.85; }
  table { font-size: 13px; min-width: 400px; }
  th, td { padding: 8px 10px; }
  .faq-item summary { padding: 14px 16px; font-size: 14.5px; }
  .faq-item .faq-answer { padding: 0 16px 16px; font-size: 14px; }
  .misconception { padding: 14px 16px; }
  .insight-box { padding: 16px 18px; }
  .references { padding: 16px; }
  .related-grid { grid-template-columns: 1fr; gap: 10px; }
  .related-card { padding: 14px; }
  .infographic-box { padding: 14px; margin-top: 28px; }
  .infographic-box h2 { font-size: 18px; }
  .infographic-box figcaption { font-size: 12.5px; }
  footer { padding: 24px 16px; font-size: 12px; }
}

/* ===== 骨架屏 Skeleton ===== */
.skeleton {
  background: linear-gradient(90deg, var(--color-highlight) 25%, #E8DCC8 50%, var(--color-highlight) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-line { height: 16px; margin-bottom: 12px; }
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-title { height: 28px; margin-bottom: 16px; width: 70%; }
.skeleton-card { height: 200px; border-radius: var(--radius-card); margin-bottom: 16px; }

/* ===== 空状态 Empty State ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-light);
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state h3 {
  font-family: var(--font-title);
  color: var(--color-dark);
  font-size: 18px;
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
}
.empty-state .empty-action {
  display: inline-block;
  padding: 10px 24px;
  background: var(--color-accent);
  color: #F5EDE0;
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}
.empty-state .empty-action:hover { background: var(--color-primary); }

/* ===== 瀑布流 Masonry ===== */
.masonry-grid {
  columns: 3;
  column-gap: 20px;
}
.masonry-grid .masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .masonry-grid { columns: 2; }
}
@media (max-width: 480px) {
  .masonry-grid { columns: 1; }
}

/* ===== 平滑滚动 ===== */
html { scroll-behavior: smooth; }

/* ===== 主站统一底部导航（与首页移动 tab 一致，PC/移动双端常驻） ===== */
body { padding-bottom: 92px; }
.zy-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px;
  padding: 7px 12px calc(env(safe-area-inset-bottom, 0px) + 9px);
  background: rgba(42, 25, 13, .95);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(200, 149, 109, .28);
  box-shadow: 0 -6px 24px rgba(42, 25, 13, .18);
}
.zy-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-height: 52px; border-radius: 15px;
  color: #C6B8A1; text-decoration: none; font-size: 11px; line-height: 1;
  -webkit-tap-highlight-color: transparent; transition: color .18s, background .18s, transform .12s;
}
.zy-tab svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.zy-tab.active { color: #e0b37a; background: rgba(139, 77, 25, .45); }
.zy-tab:active { transform: scale(.94); }
@media (min-width: 769px) {
  body { padding-bottom: 104px; }
  .zy-tabbar {
    left: 50%; right: auto; transform: translateX(-50%);
    width: 520px; bottom: 18px; border-radius: 20px;
    border: 1px solid rgba(200, 149, 109, .3); padding: 7px 10px;
  }
}
