:root {
  --bg: #f3ede4;
  --paper: #fbf8f2;
  --ink: #2f2922;
  --muted: #6d6258;
  --line: #d4c5b1;
  --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, #f7f1e8 0%, #eee3d2 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.92); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(212, 197, 177, 0.78); }
.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.08fr) minmax(300px, 0.92fr); gap: 28px; align-items: start; }
.hero-copy, .detail-copy, .detail-viewer, .section-band, .content-block { background: rgba(251, 248, 242, 0.94); 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; }
.detail-hero h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.hero-lead, .chapter-summary { color: var(--muted); font-size: 18px; line-height: 1.75; margin: 16px 0 0; }
.hero-points { margin: 22px 0 0; padding-left: 18px; display: grid; gap: 10px; line-height: 1.8; }
.hero-visual { display: grid; gap: 18px; }
.hero-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hero-cover-frame img, .hero-grid-frame img, .plate-thumb img, .mini-thumb img, .thumb-frame img { object-fit: contain; background: #f6efe3; }
.hero-cover-frame, .hero-grid-frame, .plate-thumb, .mini-thumb, .thumb-frame { border-radius: 18px; overflow: hidden; border: 1px solid rgba(212, 197, 177, 0.9); background: #f6efe3; }
.hero-cover-frame { min-height: 360px; }
.hero-grid-frame { min-height: 148px; }
.hero-cover-frame img { height: 360px; }
.hero-grid-frame img { height: 148px; }
.hero-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 22px 0 10px; }
.metric { padding: 18px 20px; border-radius: 18px; background: rgba(251, 248, 242, 0.88); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 4px; }
.metric strong { font-size: 28px; font-family: "STSong","Songti SC","Noto Serif CJK SC",serif; }
.metric span, .section-note, .footer-note { color: var(--muted); }
.section-band { margin-top: 24px; padding: 24px; }
.section-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 18px; }
.section-head h2, .section-head h1 { font-size: clamp(24px, 3.2vw, 34px); line-height: 1.2; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 0; margin-bottom: 10px; }
.search { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fffdf9; font-size: 16px; margin-bottom: 16px; }
.card-grid, .plate-showcase, .related-grid, .mini-plate-grid, .deep-grid { display: grid; gap: 16px; }
.chapter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.concept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plate-showcase, .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-plate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deep-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .plate-card, .related-card, .mini-plate, .source-item-deep { background: rgba(255, 253, 249, 0.96); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.chapter-card, .concept-card { padding: 18px; display: grid; gap: 14px; min-height: 100%; }
.chapter-card-figure { display: block; border-radius: 16px; overflow: hidden; border: 1px solid rgba(212, 197, 177, 0.8); background: #f6efe3; }
.chapter-card-figure img { height: 220px; object-fit: contain; background: #f6efe3; }
.chapter-card h2, .concept-card h2, .plate-card h3, .source-item-deep h3 { margin: 0; font-family: "STSong","Songti SC","Noto Serif CJK SC",serif; line-height: 1.3; }
.chapter-card p, .concept-card p, .plate-card p, .source-item-deep p, .content-block p, .content-block li, .glossary-table { line-height: 1.78; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chip { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: var(--accent-soft); color: #68411b; font-size: 14px; }
.plate-card { display: grid; gap: 0; overflow: hidden; }
.plate-meta { padding: 18px; display: grid; gap: 8px; }
.plate-thumb img { height: 260px; }
.page-detail { display: grid; gap: 20px; }
.detail-viewer { display: grid; gap: 14px; }
.detail-viewer.single { align-self: start; }
.viewer-main, .full-plate { width: 100%; border-radius: 18px; border: 1px solid var(--line); background: #f7f1e7; object-fit: contain; }
.viewer-main { min-height: 560px; max-height: 760px; }
.full-plate { min-height: 700px; max-height: 980px; }
.thumb-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.thumb-button { border: 1px solid var(--line); border-radius: 16px; padding: 10px; background: #fffdf9; display: grid; gap: 8px; text-align: left; cursor: pointer; min-height: 100%; }
.thumb-button span { font-size: 14px; line-height: 1.5; color: var(--muted); }
.thumb-frame img { height: 120px; }
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.content-block { padding: 22px; }
.content-block h2 { font-size: 26px; margin-bottom: 12px; }
.content-block ul, .content-block ol { margin: 0; padding-left: 20px; }
.source-item-deep { padding: 18px; }
.mini-plate { padding: 12px; display: grid; gap: 10px; }
.mini-thumb img { height: 170px; }
.mini-plate span { line-height: 1.6; }
.qa-block { display: grid; gap: 12px; }
.answer-button, .filter-button { border: 1px solid var(--line); background: #fffdf9; border-radius: 999px; padding: 10px 14px; cursor: pointer; width: fit-content; }
.answer-panel { background: #fff7ed; border: 1px solid #f0d8be; border-radius: 14px; padding: 14px 16px; }
.pager { display: flex; justify-content: space-between; gap: 12px; }
.pager a, .inline-link { color: var(--accent); font-weight: 600; }
.pager-spacer { display: block; min-width: 120px; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.related-card { padding: 16px; display: grid; gap: 8px; }
.related-card strong { font-family: "STSong","Songti SC","Noto Serif CJK SC",serif; font-size: 18px; }
.table-wrap { overflow-x: auto; }
.glossary-table { width: 100%; border-collapse: collapse; background: #fffdf9; }
.glossary-table th, .glossary-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.glossary-table th { font-family: "STSong","Songti SC","Noto Serif CJK SC",serif; }
.hidden-card { display: none !important; }
@media (max-width: 1100px) {
  .chapter-grid, .plate-showcase, .deep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero, .detail-hero, .content-grid { grid-template-columns: 1fr; }
  .chapter-grid, .concept-grid, .plate-showcase, .mini-plate-grid, .deep-grid, .related-grid, .hero-strip { grid-template-columns: 1fr; }
  .thumb-list { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: start; }
  .hero-cover-frame img, .viewer-main, .full-plate { height: auto; min-height: 0; }
}
@media (max-width: 560px) {
  .page { width: min(100% - 20px, 1180px); }
  .topbar { padding: 14px 16px; }
  .hero-copy, .detail-copy, .detail-viewer, .section-band, .content-block { border-radius: 18px; }
  .thumb-list { grid-template-columns: 1fr; }
}
