:root {
  --bg: #f4efe6;
  --paper: #fbf8f2;
  --ink: #2f2922;
  --muted: #6d6258;
  --line: #d5c8b6;
  --accent: #b96a2d;
  --accent-soft: #ead0b8;
  --shadow: 0 18px 45px rgba(74, 53, 33, 0.08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "PingFang SC","Noto Sans CJK SC","Hiragino Sans GB",sans-serif; color: var(--ink); background: linear-gradient(180deg, #f6f0e7 0%, #efe6d7 100%); }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
.site-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; background: rgba(251, 248, 242, 0.9); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(213, 200, 182, 0.75); }
.brand { font-family: "STSong","Songti SC","Noto Serif CJK SC",serif; font-size: 22px; font-weight: 700; }
.topnav { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); }
.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 72px; }
.hero, .detail-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr); gap: 28px; align-items: start; }
.hero-copy, .detail-copy, .detail-viewer, .section-band, .content-block { background: rgba(251, 248, 242, 0.92); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.hero-copy, .detail-copy { padding: 28px; }
.detail-viewer { padding: 20px; }
.hero h1, .detail-hero h1, .section-head h1, .section-head h2, .content-block h2 { font-family: "STSong","Songti SC","Noto Serif CJK SC",serif; margin: 0; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.08; }
.hero-lead, .chapter-summary, .section-note, .content-block p, .content-block li { line-height: 1.8; color: var(--muted); }
.hero-points { padding-left: 20px; line-height: 1.8; }
.eyebrow { color: var(--accent); font-size: 14px; margin-bottom: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip { padding: 8px 12px; border-radius: 999px; background: var(--accent-soft); color: #6b3f18; font-size: 13px; }
.hero-visual { display: grid; gap: 16px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.media-frame { background: #f8f3ec; border: 1px solid var(--line); border-radius: 20px; padding: 14px; overflow: hidden; }
.media-frame img { width: 100%; height: 100%; object-fit: contain; }
.hero-cover-frame { aspect-ratio: 4 / 5; }
.hero-grid-frame, .plate-thumb, .mini-thumb, .thumb-frame { aspect-ratio: 4 / 3; }
.hero-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0; }
.metric { background: rgba(251, 248, 242, 0.92); border: 1px solid var(--line); border-radius: 18px; padding: 18px; text-align: center; box-shadow: var(--shadow); }
.metric strong { display: block; font-size: 28px; }
.section-band { padding: 24px; margin-top: 24px; }
.section-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 18px; }
.search { width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: #fffdf8; margin-bottom: 18px; }
.card-grid, .plate-showcase, .related-grid, .deep-grid, .mini-plate-grid { display: grid; gap: 18px; }
.chapter-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.concept-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plate-showcase, .related-grid, .deep-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.mini-plate-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.card, .plate-card, .related-card, .source-item-deep, .mini-plate { background: #fffdf8; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 24px rgba(72, 51, 32, 0.05); }
.card { padding: 18px; }
.chapter-card-figure img { aspect-ratio: 4 / 3; object-fit: contain; background: #f8f3ec; border-radius: 14px; padding: 12px; }
.plate-card { display: flex; flex-direction: column; }
.plate-meta, .mini-plate span, .related-card, .source-item-deep { padding: 16px; }
.mini-plate { display: block; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 24px; }
.content-block { padding: 22px; }
.content-block ul, .content-block ol { padding-left: 20px; margin: 14px 0 0; }
.viewer-main, .full-plate { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f8f3ec; border-radius: 16px; border: 1px solid var(--line); padding: 12px; }
.thumb-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 12px; margin-top: 14px; }
.thumb-button { display: grid; gap: 8px; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: #fffdf8; cursor: pointer; }
.thumb-button img { object-fit: contain; }
.answer-button, .filter-button, .inline-link, .pager a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fffdf8; color: var(--ink); }
.filter-row, .pager { display: flex; flex-wrap: wrap; gap: 12px; }
.filter-button.active { background: var(--accent); color: white; border-color: var(--accent); }
.answer-panel { margin-top: 12px; padding: 14px; border-radius: 14px; background: #fff8ef; border: 1px dashed var(--accent); }
.footer-note { color: var(--muted); font-size: 13px; }
.table-wrap { overflow: auto; }
.glossary-table { width: 100%; border-collapse: collapse; background: #fffdf8; border-radius: 18px; overflow: hidden; }
.glossary-table th, .glossary-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
@media (max-width: 900px) {
  .hero, .detail-hero { grid-template-columns: 1fr; }
  .hero-strip { grid-template-columns: repeat(2, 1fr); }
  .section-head { flex-direction: column; align-items: start; }
}
@media (max-width: 640px) {
  .page { width: min(100% - 20px, 1180px); }
  .topbar { padding: 14px 16px; }
  .hero-strip { grid-template-columns: 1fr 1fr; }
}
