/* Visual tokens read from the supplied offline prototype; no external assets. */
:root {
  --ink: #0f172a;
  --muted: #64748b;
  --body: #475569;
  --paper: #f8fafc;
  --white: #fff;
  --line: #e2e8f0;
  --pink: #f43f5e;
  --red: #e11d48;
  --pink-soft: #fff1f2;
  --sans: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --radius: 18px;
  --shadow: 0 8px 28px rgb(15 23 42 / 5%);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.7 var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button, select { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; line-height: 1.35; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--red); outline-offset: 4px;
}
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link { position: fixed; left: 20px; top: -80px; z-index: 100; padding: 12px; background: white; }
.skip-link:focus { top: 10px; }

/* White navigation, rose brand and a compact rounded staff entry. */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px max(4%, calc((100vw - 1320px) / 2));
  min-height: 82px; background: white; border-bottom: 1px solid #f1f5f9;
  position: relative; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.seal {
  display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px;
  border-radius: 50%; color: white; background: var(--pink); font-size: 29px; line-height: 1;
}
.brand strong { display: block; font-size: 17px; color: var(--red); line-height: 1.5; white-space: nowrap; }
.brand small { display: block; font-size: 10px; line-height: 1.5; color: var(--muted); }
.site-header nav { display: flex; gap: 24px; align-items: center; }
.site-header nav a { position: relative; padding: 9px 0; font-size: 14px; white-space: nowrap; color: var(--body); }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--red); }
.site-header nav a[aria-current]::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  border-radius: 2px; background: var(--pink);
}
.header-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.language-switch { border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; font-size: 12px; color: var(--body); }
.portal-link { background: var(--red); color: white; border-radius: 22px; padding: 8px 16px; font-size: 13px; white-space: nowrap; }
.portal-link:hover { background: #be123c; }
.account-menu { position: relative; font-size: 13px; }
.account-menu summary { display: block; cursor: pointer; list-style: none; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-dropdown { position: absolute; right: 0; top: calc(100% + 10px); min-width: 165px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 50; }
.account-dropdown p { margin: 0 0 10px; color: var(--muted); }
.account-dropdown a { display: block; margin-bottom: 10px; }
.account-dropdown form { margin: 0; }
.account-dropdown button { width: 100%; padding: 9px; font: inherit; cursor: pointer; color: var(--red); background: var(--pink-soft); border: 1px solid var(--line); border-radius: 6px; }
.menu-toggle { display: none; padding: 3px 8px; border: 0; background: none; color: var(--body); font-size: 24px; }

/* The prototype's left-hand title/search and right-hand supplied IP illustration. */
.hero {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center;
  min-height: 610px; padding: 62px max(7%, calc((100vw - 1240px) / 2));
  background: linear-gradient(115deg, #fff5f6 0%, #f9f7fa 48%, #eff9ff 100%);
}
.hero-copy { min-width: 0; }
.hero-badge {
  display: inline-block; margin: 0 0 20px; padding: 5px 14px;
  color: #be123c; background: #ffe4e6; border-radius: 18px; font-size: 12px; letter-spacing: .05em;
}
.hero h1 { margin: 0; font-size: clamp(35px, 3.6vw, 53px); letter-spacing: -.025em; line-height: 1.35; }
.hero h1 span { display: block; color: var(--red); }
.hero-values { margin: 14px 0 0; color: var(--muted); font-size: 16px; letter-spacing: .16em; }
.hero-intro { margin: 17px 0 22px; color: var(--body); font-size: 14px; line-height: 1.9; max-width: 480px; }
.quick-search {
  display: flex; align-items: center; gap: 10px; background: white; padding: 7px 8px 7px 17px;
  border: 1px solid #f1e5eb; border-radius: 13px; box-shadow: 0 5px 20px rgb(244 63 94 / 4%);
}
.quick-search input { min-width: 0; width: 100%; padding: 8px 0; color: var(--ink); border: 0; background: none; font-size: 13px; }
input::placeholder { color: #718096; opacity: 1; }
.quick-search button { flex-shrink: 0; background: var(--red); border: 0; border-radius: 9px; color: white; padding: 10px 18px; font-size: 13px; }
.quick-search button:hover { background: #be123c; }
.stats { display: flex; margin: 26px 0 16px; gap: 0; }
.stats div { flex: 1; display: flex; flex-direction: column; padding: 0 20px; border-right: 1px solid #e5e7eb; }
.stats div:first-child { padding-left: 5px; }
.stats div:last-child { border-right: 0; }
.stats strong { font-size: 27px; font-weight: 700; line-height: 1.2; }
.stats span { font-size: 12px; color: var(--muted); margin-top: 5px; }
.hero-browse { margin-top: 6px; display: inline-block; }
.hero-art { margin: 0; position: relative; min-width: 0; transform: rotate(-2deg); }
.hero-art img {
  width: 100%; height: auto; border-radius: 28px; background: white;
  box-shadow: 0 14px 40px rgb(15 23 42 / 10%), 0 2px 10px rgb(15 23 42 / 4%);
}
.hero-art figcaption { margin-top: 12px; color: var(--muted); font-size: 12px; text-align: right; }

/* Shared page surfaces and typographic hierarchy. */
.section { padding: 52px max(5.5%, calc((100vw - 1280px) / 2)); }
.section.compact { padding-top: 30px; }
.shaded { background: #f1f5f9; }
.eyebrow { margin: 0 0 12px; display: block; color: var(--red); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.section-heading h2 { margin: 0; font-size: 28px; }
.section-heading p:not(.eyebrow) { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.text-link { color: var(--red); font-size: 14px; font-weight: 600; }
.text-link:hover { color: #be123c; }
.page-intro {
  padding: 44px max(5.5%, calc((100vw - 1280px) / 2)) 32px;
  background: linear-gradient(105deg, #fff5f6, #f8fafc 70%, #f0f9ff);
  border-bottom: 1px solid #f1f5f9;
}
.page-intro h1 { margin: 4px 0 14px; font-size: clamp(30px, 3.3vw, 44px); }
.page-intro > p:not(.eyebrow) { margin: 0; max-width: 850px; color: var(--body); font-size: 15px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 18px; width: max-content;
  padding: 11px 21px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px;
  transition: background .15s, border-color .15s, transform .15s;
}
.primary { background: var(--red); color: white; border-color: var(--red); }
.primary:hover { background: #be123c; border-color: #be123c; }
.muted { color: var(--muted); font-size: 14px; }

/* Three places and archive cards retain real backend counts. */
.region-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.region-card {
  position: relative; min-height: 172px; display: flex; align-items: end; overflow: hidden;
  border: 1px solid #f0dce2; border-radius: var(--radius); background: #fff5f6; padding: 25px;
  transition: box-shadow .2s, transform .2s;
}
.region-xunpu { background: #fff4f8; border-color: #f4dbe8; }
.region-meizhou { background: #f0f9ff; border-color: #dcebf6; }
.region-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.region-number { position: absolute; left: 25px; top: 18px; color: var(--muted); font-size: 12px; }
.region-motif { position: absolute; top: -2px; right: 25px; color: var(--red); opacity: .07; font-size: 110px; font-weight: 700; }
.region-meizhou .region-motif { color: #0284c7; }
.region-card h3 { position: relative; margin: 0 0 8px; font-size: 25px; }
.region-card p { margin: 0; color: var(--muted); font-size: 13px; }
.region-arrow { position: absolute; right: 25px; bottom: 28px; color: var(--red); font-size: 22px; }
.record-grid, .topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; }
.record-card, .topic-card {
  min-width: 0; background: white; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 3px 12px rgb(15 23 42 / 2%); transition: transform .2s, box-shadow .2s;
}
.record-card:hover, .topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.record-card > a { display: flex; flex-direction: column; height: 100%; }
.card-visual { height: 210px; position: relative; display: grid; place-items: center; overflow: hidden; background: #f1f5f9; }
.kind-image { background: #eff6ff; }
.kind-audio, .kind-oral_history { background: #fff1f2; }
.kind-video { background: #f0fdfa; }
.kind-document { background: #f5f3ff; }
.card-visual img { width: 100%; height: 100%; object-fit: cover; }
.type-glyph { font-size: 52px; font-weight: 700; color: #94a3b8; }
.kind-audio .type-glyph, .kind-oral_history .type-glyph { color: #f9a8b8; }
.format-chip { position: absolute; bottom: 14px; left: 16px; background: white; border-radius: 6px; color: var(--body); font-size: 12px; padding: 4px 10px; }
.card-copy { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.card-copy h3 { margin: 0 0 12px; font-size: 20px; }
.card-copy > p { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.card-copy .eyebrow { margin-bottom: 9px; font-size: 12px; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid #f1f5f9; }
.card-bottom small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.card-bottom > span { font-size: 22px; color: var(--red); }
.empty-state { grid-column: 1/-1; padding: 44px 28px; width: 100%; background: white; border: 1px dashed #cbd5e1; border-radius: var(--radius); text-align: center; }
.empty-state > span { display: grid; place-items: center; margin: auto; width: 64px; height: 64px; border-radius: 20px; background: var(--pink-soft); color: var(--red); font-size: 29px; }
.empty-state h3 { margin: 20px 0 10px; font-size: 22px; }
.empty-state p { margin: 0 auto 17px; max-width: 600px; font-size: 14px; color: var(--muted); }
.topic-art { height: 185px; position: relative; display: grid; place-items: center; overflow: hidden; background: #ffe4e6; }
.topic-art > span { font-size: 56px; font-weight: 700; color: #f9a8b8; }
.topic-art small { position: absolute; bottom: 15px; left: 20px; color: #9f1239; font-size: 12px; }
.topic-art img { width: 100%; height: 100%; object-fit: cover; }
.topic-copy { padding: 24px; }
.topic-copy h3 { margin: 0 0 12px; font-size: 22px; }
.topic-copy p { color: var(--muted); font-size: 14px; }
.topic-copy > div { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 15px; border-top: 1px solid #f1f5f9; }
.topic-copy small { color: var(--muted); font-size: 12px; }
.topic-copy > div > span { color: var(--red); }
.topic-banner { padding: 26px max(5.5%, calc((100vw - 1280px) / 2)) 0; }
.topic-banner img { max-height: 430px; width: 100%; object-fit: cover; border-radius: var(--radius); }

/* Working search controls, rose selected states and rounded fields. */
.filters { display: grid; grid-template-columns: minmax(200px, 2fr) 1fr 1fr auto auto; align-items: end; gap: 18px; padding: 25px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.filters label { min-width: 0; }
.filters label span { display: block; color: var(--body); font-size: 13px; margin-bottom: 9px; }
.filters input, .filters select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #dbe2ea; border-radius: 9px; background: white; color: var(--ink); font-size: 14px; }
.filters input:focus, .filters select:focus { border-color: var(--pink); }
.filters .button { height: 46px; }
.filters > .text-link { padding-bottom: 12px; white-space: nowrap; }
.result-count { margin: 25px 0; color: var(--muted); font-size: 14px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 32px; font-size: 14px; }
.pagination a { color: var(--red); padding: 7px 14px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.region-tabs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.region-tabs a { padding: 8px 19px; border: 1px solid var(--line); border-radius: 22px; background: white; color: var(--body); font-size: 14px; }
.region-tabs a[aria-current] { color: white; background: var(--red); border-color: var(--red); }

/* People, detail records and supporting evidence use the same design system. */
.people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px; }
.person-card { display: grid; grid-template-columns: 135px 1fr; gap: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.portrait { display: grid; place-items: center; overflow: hidden; min-height: 170px; border-radius: 13px; background: #ffe4e6; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait > span { font-size: 68px; color: #f9a8b8; }
.person-card h2 { margin: 8px 0; font-size: 25px; }
.person-card p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.person-detail { display: grid; grid-template-columns: 250px 1fr; gap: 48px; }
.person-detail .portrait { align-self: start; height: 320px; }
.person-detail h1 { font-size: 38px; margin: 10px 0 18px; }
.detail-kickers { display: flex; flex-wrap: wrap; gap: 14px; margin: 25px 0 12px; color: var(--muted); font-size: 13px; }
.detail-intro > small { color: var(--red); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 45px; }
.detail-main { min-width: 0; }
.detail-main h2 { margin: 0 0 24px; font-size: 24px; }
.detail-main > section { padding: 30px 0; border-bottom: 1px solid var(--line); }
.detail-main > section:first-of-type { padding-top: 0; }
.media-section figure { margin: 0 0 25px; }
.media-section img, .media-section video { max-width: 100%; max-height: 650px; margin: auto; border-radius: 12px; background: #f1f5f9; }
.media-section video, .media-section audio { width: 100%; }
.media-section figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 0; color: var(--muted); font-size: 13px; }
.media-section figcaption a { color: var(--red); }
.prose { font-size: 16px; line-height: 2; color: var(--body); }
.translation-note { font-size: 14px; background: var(--pink-soft); padding: 15px 18px; border-left: 3px solid var(--pink); border-radius: 0 10px 10px 0; color: #9f1239; }
.catalogue { position: sticky; top: 25px; align-self: start; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.catalogue h2 { font-size: 23px; margin: 0 0 22px; }
.catalogue dl > div { padding: 14px 0; border-bottom: 1px solid #f1f5f9; }
.catalogue dt { color: var(--muted); font-size: 12px; }
.catalogue dd { font-size: 14px; margin: 5px 0 0; overflow-wrap: anywhere; }
.rights-note { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags span { padding: 4px 10px; border-radius: 6px; font-size: 12px; color: #9f1239; background: var(--pink-soft); }
.source-row { display: grid; grid-template-columns: 25px 1fr; gap: 17px; margin: 20px 0; }
.source-row > span { color: var(--red); font-size: 13px; padding-top: 5px; }
.source-row p { margin: 0 0 8px; color: var(--body); }
.source-row small { display: block; margin-bottom: 9px; color: var(--muted); font-size: 13px; }
.format-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.format-grid a { position: relative; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.format-grid a:hover { border-color: #fda4af; box-shadow: var(--shadow); }
.format-grid a > span { color: var(--red); font-size: 12px; }
.format-grid h3 { margin: 15px 0; font-size: 23px; }
.format-grid p { color: var(--muted); font-size: 13px; }
.format-grid b { position: absolute; right: 22px; bottom: 20px; color: var(--red); font-weight: 400; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.principles article { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.principles article > span { color: var(--red); font-size: 12px; }
.principles h2 { font-size: 25px; }
.principles p { color: var(--body); font-size: 15px; line-height: 1.9; }
.about-intro p { line-height: 2; }
.contribution-section { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 42px max(5.5%, calc((100vw - 1280px) / 2)); background: var(--pink-soft); }
.contribution-section h2 { font-size: 28px; margin: 5px 0 10px; }
.contribution-section p:not(.eyebrow) { font-size: 14px; color: var(--body); }
.site-footer { display: grid; grid-template-columns: 1.2fr 1fr 45px; align-items: center; gap: 36px; padding: 42px max(5.5%, calc((100vw - 1280px) / 2)); background: white; border-top: 1px solid var(--line); }
.site-footer h2 { margin: 0 0 10px; color: var(--red); font-size: 20px; }
.site-footer p { color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--red); font-size: 14px; }
.footer-seal { color: var(--red); border: 1px solid #fecdd3; border-radius: 12px; padding: 8px 10px; text-align: center; font-size: 13px; }
html[lang=en] .brand strong { font-size: 20px; }
html[lang=en] .site-header nav { gap: 20px; }
html[lang=en] .hero h1 { font-size: clamp(30px, 3vw, 43px); }
html[lang=en] .hero-values { letter-spacing: .035em; }

@media (max-width: 1250px) {
  .site-header { gap: 18px; padding-left: 4%; padding-right: 4%; }
  .site-header nav { gap: 17px; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 9px; }
  .hero { gap: 42px; padding-left: 6%; padding-right: 6%; min-height: 570px; }
  .portal-link { padding: 8px 12px; }
  .filters { grid-template-columns: 2fr 1fr 1fr; }
  .filters > .button { grid-column: 2; }
  .filters > .text-link { justify-self: end; }
}
@media (max-width: 1080px) {
  .site-header { flex-wrap: wrap; }
  .menu-toggle { display: block; margin-left: auto; }
  .site-header nav { display: none; width: 100%; order: 4; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
  .site-header nav.open { display: flex; }
  .site-header nav a { padding: 8px 12px; }
  .hero { gap: 32px; }
  .hero h1 { font-size: 38px; }
  .detail-grid { gap: 28px; }
  .person-card { grid-template-columns: 100px 1fr; padding: 20px; gap: 18px; }
}
@media (max-width: 800px) {
  .site-header { padding: 16px 5%; }
  .portal-link { display: none; }
  .hero { gap: 28px; padding: 45px 5%; min-height: 520px; }
  .hero h1 { font-size: 33px; }
  .hero-intro { font-size: 13px; }
  .hero-values { font-size: 14px; }
  .quick-search { padding-left: 12px; gap: 5px; }
  .quick-search button { padding: 10px 13px; }
  .stats div { padding: 0 10px; }
  .stats span { font-size: 11px; }
  .hero-art img { border-radius: 20px; }
  .section { padding: 40px 5%; }
  .record-grid, .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .region-grid { gap: 14px; }
  .region-card { padding: 20px; }
  .region-card h3 { font-size: 22px; }
  .region-number { left: 20px; }
  .region-motif { right: 15px; font-size: 95px; }
  .people-grid, .detail-grid { grid-template-columns: 1fr; }
  .catalogue { position: static; }
  .format-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-detail { grid-template-columns: 180px 1fr; gap: 28px; }
  .person-detail .portrait { height: 240px; }
  .person-detail h1 { font-size: 30px; }
  .principles { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .site-header { gap: 8px; min-height: 74px; padding: 14px 5%; }
  .brand { gap: 8px; max-width: calc(100% - 100px); }
  .seal { flex-basis: 32px; width: 32px; height: 32px; font-size: 23px; }
  .brand strong { font-size: 12px; white-space: normal; line-height: 1.5; }
  .brand small { font-size: 8px; }
  .header-tools { gap: 0; }
  .language-switch { font-size: 11px; padding: 3px 6px; }
  html[lang=en] .brand strong { font-size: 16px; }
  .menu-toggle { padding: 3px 6px; }
  .hero { grid-template-columns: 1fr; gap: 34px; padding: 40px 6%; }
  .hero h1 { font-size: 39px; }
  html[lang=en] .hero h1 { font-size: 34px; }
  .hero-intro { max-width: none; font-size: 14px; }
  .hero-badge { margin-bottom: 18px; }
  .hero-art { margin: 0 8px; }
  .stats { margin-top: 24px; }
  .stats span { font-size: 12px; }
  .section { padding: 36px 6%; }
  .section-heading { align-items: start; gap: 18px; }
  .section-heading h2 { font-size: 25px; }
  .section-heading .text-link { font-size: 12px; padding-top: 4px; }
  .section-heading p:not(.eyebrow) { font-size: 13px; }
  .eyebrow { font-size: 11px; }
  .region-grid, .record-grid, .topic-grid { grid-template-columns: 1fr; }
  .region-card { min-height: 142px; }
  .region-card h3 { font-size: 25px; }
  .region-motif { right: 55px; top: -15px; font-size: 110px; }
  .page-intro { padding: 32px 6% 28px; }
  .page-intro h1 { font-size: 31px; }
  .page-intro > p:not(.eyebrow) { font-size: 14px; }
  .filters { grid-template-columns: 1fr 1fr; padding: 19px; gap: 14px; }
  .search-label { grid-column: 1/-1; }
  .filters > .button { grid-column: 1; width: 100%; }
  .filters > .text-link { padding: 0; align-self: center; font-size: 13px; }
  .person-card { grid-template-columns: 90px 1fr; padding: 18px; gap: 16px; }
  .person-card h2 { font-size: 22px; }
  .person-card .portrait { min-height: 150px; }
  .person-detail { grid-template-columns: 1fr; }
  .person-detail .portrait { width: 160px; height: 210px; }
  .format-grid { gap: 14px; }
  .format-grid a { padding: 20px; }
  .format-grid h3 { font-size: 21px; }
  .contribution-section { padding: 35px 6%; flex-direction: column; align-items: start; }
  .contribution-section h2 { font-size: 25px; }
  .site-footer { padding: 35px 6%; grid-template-columns: 1fr 40px; gap: 24px; }
  .site-footer h2 { font-size: 18px; }
  .site-footer > div:nth-child(2) { grid-column: 1; grid-row: 2; }
  .footer-seal { grid-column: 2; grid-row: 1/3; }
  .source-row { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Six page-specific layouts follow the supplied material, with real reading routes. */
.center-heading { text-align: center; max-width: 800px; margin: 0 auto 32px; }
.center-heading h2 { font-size: 30px; margin: 0 0 12px; }
.center-heading > p:not(.eyebrow) { color: var(--muted); font-size: 14px; margin: 12px 0; }
.section-end { text-align: center; margin-top: 30px; }
.culture-section { background: white; }
.culture-panorama { display: block; border-radius: 22px; overflow: hidden; margin-bottom: 38px; }
.culture-panorama img { width: 100%; height: auto; }
.culture-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; }
.culture-photo { display: block; overflow: hidden; border-radius: 16px; margin-bottom: 22px; }
.culture-photo img { width: 100%; height: 230px; object-fit: cover; }
.culture-grid h3 { font-size: 25px; margin: 0 0 7px; }
.culture-grid h4 { font-size: 14px; font-weight: 500; color: var(--red); margin: 0 0 12px; }
.culture-grid p:not(.eyebrow) { font-size: 14px; color: var(--body); line-height: 1.95; }
.library-intro { background: white; text-align: center; border: 0; padding-top: 48px; padding-bottom: 20px; }
.library-intro h1 { font-size: 32px; }
.library-intro > p:not(.eyebrow) { max-width: 740px; margin: 0 auto; }
.material-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.material-topic-card { background: white; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.topic-photo { display: block; position: relative; overflow: hidden; }
.topic-photo img { width: 100%; height: 240px; object-fit: cover; transition: transform .25s; }
.topic-photo:hover img { transform: scale(1.03); }
.topic-photo > span { position: absolute; top: 16px; left: 16px; background: #fff1f2; color: #9f1239; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 4px 11px; }
.topic-body { padding: 24px; }
.topic-body h2 { font-size: 21px; margin: 0 0 12px; }
.topic-body > p { color: var(--body); font-size: 14px; line-height: 1.95; min-height: 82px; }
.topic-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #f1f5f9; }
.topic-bottom > span { font-size: 12px; color: var(--muted); }
.topic-bottom .text-link { font-size: 13px; }
.catalogue-header { padding: 32px max(5.5%, calc((100vw - 1280px) / 2)) 26px; display: flex; align-items: center; justify-content: space-between; gap: 32px; background: white; }
.catalogue-header h1 { font-size: 28px; margin: 0; }
.catalogue-header .eyebrow { margin-bottom: 5px; }
.catalogue-header .quick-search { width: 360px; }
.type-tabs { display: flex; gap: 10px; padding-bottom: 20px; flex-wrap: wrap; }
.type-tabs a { border-radius: 8px; font-size: 14px; padding: 9px 22px; border: 1px solid var(--line); background: white; }
.type-tabs a[aria-current], .type-tabs a:hover { color: white; background: var(--red); border-color: var(--red); }
.region-tabs { align-items: center; flex-wrap: wrap; gap: 12px; }
.region-tabs > span { font-size: 13px; color: var(--muted); margin-right: 4px; }
.advanced-filters { margin: 12px 0 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.advanced-filters summary { cursor: pointer; color: var(--body); font-size: 13px; width: fit-content; }
.advanced-filters .filters { margin-top: 12px; }
.catalogue-section .result-count { margin-bottom: 18px; }
.material-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 20px; }
.material-card { background: white; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 3px 12px rgb(15 23 42 / 3%); min-width: 0; transition: box-shadow .2s; }
.material-card:hover { box-shadow: 0 8px 22px rgb(15 23 42 / 9%); }
.material-image { position: relative; display: block; overflow: hidden; background: #f1f5f9; }
.material-image img { width: 100%; height: 200px; object-fit: cover; }
.category-ip .material-image img { object-fit: contain; background: #fff9f5; }
.structure-card .material-image img { object-fit: contain; background: white; padding: 8px; }
.preview-open { overflow: hidden; }
.material-badge { position: absolute; top: 10px; left: 10px; font-size: 11px; color: #334155; background: rgb(255 255 255 / 96%); border-radius: 5px; padding: 2px 8px; box-shadow: 0 1px 6px rgb(15 23 42 / 5%); }
.cover-label { position: absolute; right: 9px; bottom: 9px; font-size: 11px; color: white; background: rgb(15 23 42 / 85%); padding: 3px 8px; border-radius: 5px; }
.material-caption { padding: 15px 14px 12px; }
.material-caption h3 { font-size: 14px; line-height: 1.6; margin: 0 0 12px; min-height: 44px; }
.material-caption h3 a:hover { color: var(--red); }
.material-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 11px; }
.material-meta > div { display: flex; align-items: center; gap: 5px; }
.material-meta button, .material-meta a { border: 0; background: transparent; font-size: 19px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--body); border-radius: 5px; }
.material-meta button:hover, .material-meta a:hover { background: var(--pink-soft); color: var(--red); }
.database-section { margin-top: 40px; }
.inheritance-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 70px; padding: 56px max(5.5%, calc((100vw - 1280px) / 2)); background: white; }
.inheritance-hero h1 { font-size: clamp(32px, 3.3vw, 48px); margin: 0 0 20px; line-height: 1.45; }
.inheritance-hero h1 span { color: var(--red); display: block; }
.inheritance-hero > div > p:not(.eyebrow) { color: var(--body); font-size: 15px; max-width: 470px; margin-bottom: 24px; }
.interview-feature { position: relative; display: block; overflow: hidden; border-radius: 20px; isolation: isolate; }
.interview-feature::after { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(transparent 30%, rgb(15 23 42 / 78%)); }
.interview-feature img { width: 100%; height: 330px; object-fit: cover; }
.interview-arrow { position: absolute; left: calc(50% - 25px); top: 36%; z-index: 1; width: 50px; height: 50px; display: grid; place-items: center; background: rgb(255 255 255 / 90%); color: var(--red); border-radius: 50%; font-size: 25px; }
.interview-feature > div { position: absolute; bottom: 24px; left: 28px; right: 28px; color: white; z-index: 1; }
.interview-feature small { background: var(--red); padding: 3px 10px; border-radius: 4px; font-size: 11px; }
.interview-feature h2 { font-size: 22px; margin: 12px 0 8px; }
.interview-feature > div > span { font-size: 12px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.project-grid > a { display: flex; align-items: center; gap: 18px; padding: 24px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.project-grid > a:hover { border-color: #fda4af; }
.project-icon { flex: 0 0 48px; height: 48px; background: var(--pink-soft); color: var(--red); border-radius: 12px; display: grid; place-items: center; font-size: 28px; }
.project-grid h3 { font-size: 18px; margin: 0 0 8px; }
.project-grid p { color: var(--body); font-size: 13px; margin: 0; }
.project-arrow { color: var(--red); margin-left: auto; }
.heritage-people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.heritage-person { border: 1px solid var(--line); border-radius: 16px; background: white; overflow: hidden; }
.heritage-portrait { display: block; }
.heritage-portrait img { width: 100%; height: 260px; object-fit: cover; object-position: center 30%; }
.heritage-person-copy { padding: 24px; }
.heritage-person h3 { font-size: 23px; margin: 0 0 6px; }
.craft-label { color: var(--red); font-size: 13px; margin: 0; }
.heritage-person-copy > p:not(.craft-label) { color: var(--body); font-size: 14px; line-height: 1.9; min-height: 80px; }
.compact-people .heritage-person { padding-top: 24px; text-align: center; }
.compact-people .heritage-portrait { width: 110px; margin: 0 auto; border: 5px solid var(--pink-soft); border-radius: 50%; overflow: hidden; }
.compact-people .heritage-portrait img { height: 100px; }
.discovery-section { padding: 58px max(5.5%, calc((100vw - 1280px) / 2)) 68px; background: linear-gradient(110deg, #fff2f5, #fbf8fb 48%, #edf8ff); }
.discovery-heading { max-width: 880px; margin-bottom: 38px; }
.discovery-heading h1 { font-size: clamp(34px, 3.8vw, 54px); line-height: 1.4; margin: 0 0 20px; }
.discovery-heading h1 span { display: block; color: var(--red); }
.discovery-heading > p:not(.eyebrow) { color: var(--body); font-size: 15px; max-width: 780px; }
.discovery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.discovery-card { position: relative; min-height: 330px; border-radius: 20px; padding: 28px 25px; overflow: hidden; border: 1px solid rgb(255 255 255 / 80%); box-shadow: var(--shadow); isolation: isolate; }
.discovery-huian { background: #f3ece1; color: #66513e; }
.discovery-xunpu { background: #e0f2ee; color: #215b54; }
.discovery-meizhou { background: #f7efd9; color: #7d621e; }
.discovery-card > div { position: relative; z-index: 1; width: 60%; }
.discovery-card h2 { font-size: 31px; margin: 18px 0 7px; }
.discovery-card .eyebrow { color: inherit; font-size: 10px; letter-spacing: .12em; white-space: nowrap; }
.discovery-subtitle { font-size: 14px; font-weight: 600; margin-top: 0; }
.discovery-card p:not(.eyebrow):not(.discovery-subtitle) { font-size: 12px; line-height: 1.9; }
.discovery-link { display: inline-block; font-size: 12px; font-weight: 600; margin-top: 18px; }
.discovery-card img { position: absolute; right: -48px; top: 72px; width: 218px; height: 218px; object-fit: cover; border-radius: 50%; z-index: 0; }
.discovery-card:hover { outline: 2px solid rgb(225 29 72 / 20%); }
.mission-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; padding-top: 30px; background: white; }
.mission-layout figure { margin: 0; }
.mission-layout figure img { width: 100%; border-radius: 18px; }
.mission-principles { display: grid; gap: 26px; }
.mission-principles article { display: flex; gap: 18px; }
.mission-principles article > span { width: 45px; height: 45px; flex: 0 0 45px; background: var(--pink-soft); color: var(--red); border-radius: 11px; display: grid; place-items: center; font-size: 24px; }
.mission-principles h2 { font-size: 19px; margin: 0 0 8px; }
.mission-principles p { font-size: 14px; color: var(--body); margin: 0; line-height: 1.9; }
.contact-card { background: white; border-radius: 20px; padding: 38px; border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin: 34px 0 24px; }
.contact-grid > div { padding: 0 20px; border-right: 1px solid var(--line); }
.contact-grid > div:last-child { border: 0; }
.contact-grid > div > span { color: var(--red); font-size: 26px; }
.contact-grid h3 { font-size: 15px; margin: 12px 0 5px; }
.contact-grid p, .contact-grid a { font-size: 14px; color: var(--body); margin: 0; }
.institutions-section { padding-top: 10px; }
.institutions-section h2 { font-size: 23px; }
.institution-chips { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.institution-chips span { padding: 12px 18px; background: white; border: 1px solid var(--line); border-radius: 8px; color: var(--body); font-size: 13px; }
.source-summary { border-top: 1px solid var(--line); padding-top: 28px; padding-bottom: 32px; }
.source-summary h2 { font-size: 19px; }
.source-summary p, .source-note { color: var(--body); font-size: 13px; }
.source-note { background: #fff1f2; border-left: 3px solid var(--pink); padding: 14px 18px; }
.detail-material-image { display: block; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.detail-material-image img { margin: 0 auto; max-height: 620px; object-fit: contain; }
.material-video { display: block; width: 100%; max-height: 640px; background: var(--ink); object-fit: contain; border: 1px solid var(--line); border-radius: 14px; }
.video-error { color: var(--red); font-size: 14px; padding: 16px; background: var(--pink-soft); border-radius: 10px; }
.video-play-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 54px; height: 54px; background: rgb(15 23 42 / 65%); border: 2px solid white; border-radius: 50%; color: white; font-size: 23px; }
/* Clicked IP panels retain the source character, component artwork and text. */
[hidden] { display: none !important; }
.interaction-tabs { display: flex; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.interaction-tabs button { border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--body); padding: 10px 18px; font-size: 14px; }
.interaction-tabs button[aria-selected="true"] { color: white; background: var(--red); border-color: var(--red); }
.interaction-tabs button:hover { border-color: var(--red); }
.image-hint { color: var(--muted); font-size: 12px; margin: 16px 0 24px; }
.ip-board { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 28px; align-items: start; }
.ip-hero { border: 0; padding: 24px; }
.ip-hero img { max-height: 800px; width: 100%; object-fit: contain; }
.ip-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.ip-part { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.part-images { display: flex; gap: 10px; height: 170px; margin-bottom: 18px; }
.part-images > a { min-width: 0; flex: 1; }
.part-images img { width: 100%; height: 100%; object-fit: contain; }
.ip-part h2 { font-size: 18px; margin: 0 0 12px; }
.ip-part p { color: var(--body); font-size: 13px; line-height: 1.9; margin: 0; }
.ip-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.ip-gallery img { width: 100%; height: 560px; object-fit: contain; }
.catalogue-wide { position: static; margin-top: 32px; }
.catalogue-wide dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 32px; margin: 0; }
.structure-description { margin-top: 32px; }
.structure-description h2 { font-size: 24px; }
.structure-description p { color: var(--body); font-size: 15px; line-height: 2; }
@media (max-width: 1000px) {
  .ip-board { grid-template-columns: 1fr; }
  .ip-hero img { max-height: 540px; }
}
@media (max-width: 600px) {
  .ip-parts, .ip-gallery, .catalogue-wide dl { grid-template-columns: 1fr; }
  .interaction-tabs { gap: 8px; }
  .interaction-tabs button { font-size: 12px; padding: 9px 12px; }
  .ip-gallery img { height: auto; max-height: 580px; }
  .part-images { height: 230px; }
}
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.material-story { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.material-story > img { width: 100%; max-height: 440px; border-radius: 18px; object-fit: cover; }
.material-story > div > p { color: var(--body); line-height: 2; }
.material-story h1 { font-size: 40px; }
.person-story { grid-template-columns: 300px 1fr; }
.person-story > img { height: 380px; }
.full-footer { background: #0f172a; color: white; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding: 42px max(5.5%, calc((100vw - 1280px) / 2)) 18px; }
.full-footer h2 { font-size: 19px; color: white; margin: 8px 0 14px; }
.full-footer h3 { font-size: 15px; margin: 0 0 18px; }
.full-footer p { color: #cbd5e1; font-size: 12px; max-width: 390px; }
.full-footer .eyebrow { color: #fda4af; }
.full-footer a { color: #e2e8f0; font-size: 12px; display: block; margin-bottom: 10px; }
.full-footer a:hover { color: #fda4af; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 20px; }
.full-footer .footer-bottom { grid-column: 1/-1; border-top: 1px solid #334155; text-align: center; padding-top: 18px; max-width: none; margin: 0; font-size: 11px; }
.media-dialog { width: min(1100px, 94vw); max-height: 94vh; border: 1px solid var(--line); padding: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 30px 100px rgb(15 23 42 / 25%); }
.media-dialog::backdrop { background: rgb(15 23 42 / 68%); }
.media-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; background: white; border-bottom: 1px solid var(--line); }
.media-dialog h2 { font-size: 17px; margin: 0; }
.media-dialog header button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--pink-soft); font-size: 25px; color: var(--red); }
.zoom-stage { overflow: auto; height: min(65vh, 650px); background: #f1f5f9; padding: 20px; }
.zoom-stage img { width: 100%; height: 100%; max-width: none; object-fit: contain; transform-origin: top left; }
.zoom-controls { display: flex; align-items: center; gap: 16px; padding: 14px 20px; font-size: 13px; background: white; }
.zoom-controls input { min-width: 0; flex: 1; accent-color: var(--red); }
.zoom-controls output { min-width: 45px; }
.action-status { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #0f172a; color: white; border-radius: 10px; padding: 12px 20px; z-index: 50; font-size: 14px; box-shadow: var(--shadow); pointer-events: none; }
.action-status:empty { display: none; }
@media (max-width: 1100px) {
  .material-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .discovery-grid { grid-template-columns: 1fr; }
  .discovery-card { min-height: 250px; }
  .discovery-card > div { width: 55%; }
  .discovery-card img { width: 250px; height: 250px; right: 5%; top: 20px; }
  .inheritance-hero, .mission-layout { gap: 35px; }
  .topic-body { padding: 18px; }
  .topic-body h2 { font-size: 19px; }
  .topic-bottom { flex-wrap: wrap; }
}
@media (max-width: 800px) {
  .material-topic-grid, .heritage-people, .culture-grid { gap: 18px; }
  .topic-photo img { height: 180px; }
  .material-topic-grid { grid-template-columns: 1fr; }
  .topic-body > p { min-height: 0; }
  .topic-photo img { height: 270px; }
  .heritage-person-copy { padding: 18px; }
  .heritage-portrait img { height: 200px; }
  .culture-grid { grid-template-columns: 1fr; }
  .culture-photo img { height: 320px; }
  .catalogue-header { gap: 22px; }
  .catalogue-header .quick-search { width: 45%; }
  .inheritance-hero { grid-template-columns: 1fr; }
  .inheritance-hero > div > p:not(.eyebrow) { max-width: none; }
  .project-grid { grid-template-columns: 1fr; }
  .mission-layout { grid-template-columns: 1fr; gap: 32px; }
  .mission-layout figure { max-width: 600px; }
  .full-footer { gap: 28px; grid-template-columns: 1.3fr 1fr; }
  .full-footer > div:nth-child(3) { grid-column: 1/-1; }
  .material-story { gap: 28px; }
}
@media (max-width: 600px) {
  .center-heading h2 { font-size: 25px; }
  .culture-panorama img { height: auto; }
  .culture-photo img { height: 260px; }
  .catalogue-header { flex-direction: column; align-items: stretch; gap: 20px; padding: 30px 6% 24px; }
  .catalogue-header .quick-search { width: 100%; }
  .type-tabs { gap: 8px; }
  .type-tabs a { padding: 8px 15px; font-size: 12px; }
  .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; }
  .material-image img { height: 160px; }
  .material-caption { padding: 12px 10px 8px; }
  .material-caption h3 { font-size: 13px; min-height: 42px; }
  .material-meta { font-size: 10px; }
  .material-meta button, .material-meta a { width: 26px; height: 32px; }
  .material-badge { top: 8px; left: 8px; font-size: 10px; }
  .cover-label { font-size: 10px; }
  .inheritance-hero { padding: 36px 6%; }
  .inheritance-hero h1 { font-size: 35px; }
  .interview-feature img { height: 270px; }
  .interview-feature > div { left: 20px; bottom: 20px; }
  .interview-feature h2 { font-size: 19px; }
  .project-grid > a { padding: 20px 16px; gap: 12px; }
  .project-grid h3 { font-size: 16px; }
  .heritage-people { grid-template-columns: 1fr; }
  .heritage-portrait img { height: 300px; }
  .heritage-person-copy > p:not(.craft-label) { min-height: 0; }
  .discovery-section { padding: 40px 6%; }
  .discovery-heading h1 { font-size: 36px; }
  .discovery-card { padding: 25px 20px; min-height: 300px; }
  .discovery-card img { width: 190px; height: 190px; right: -58px; top: 100px; }
  .discovery-card > div { width: 63%; }
  .discovery-card h2 { font-size: 30px; }
  .contact-card { padding: 26px 20px; }
  .contact-grid { grid-template-columns: 1fr; gap: 25px; }
  .contact-grid > div { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 25px; }
  .contact-grid > div:last-child { padding-bottom: 0; }
  .institution-chips { gap: 10px; }
  .institution-chips span { font-size: 12px; padding: 10px 12px; }
  .full-footer { grid-template-columns: 1fr; gap: 26px; padding: 35px 6% 18px; }
  .full-footer > div:nth-child(2), .full-footer > div:nth-child(3) { grid-column: 1; grid-row: auto; }
  .material-story, .person-story { grid-template-columns: 1fr; }
  .person-story > img { max-width: 300px; height: 340px; }
  .material-story h1 { font-size: 31px; }
  .zoom-controls { gap: 10px; font-size: 11px; padding: 14px; }
  .action-status { font-size: 12px; max-width: 90vw; width: max-content; }
}
