@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Serif+SC:wght@400;500;600&display=swap");

:root {
  --paper: #f2ecdf;
  --paper-deep: #e8dfcf;
  --surface: #f8f3e9;
  --ink: #1d1a16;
  --muted: #756c61;
  --line: #d4c9b7;
  --line-dark: #aa9c87;
  --red: #a8382c;
  --red-dark: #76261f;
  --gold: #b88b42;
  --teal: #486b67;
  --night: #171512;
  --serif: "Noto Serif SC", "Songti SC", SimSun, serif;
  --sans: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
  --page: min(1320px, calc(100vw - 48px));
  --collection-page: min(2240px, calc(100vw - clamp(64px, 7vw, 144px)));
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #171512;
  --paper-deep: #201d19;
  --surface: #24201b;
  --ink: #eee5d5;
  --muted: #aca090;
  --line: #40382f;
  --line-dark: #625747;
  --red: #d26656;
  --red-dark: #e88774;
  --gold: #caa55f;
  --teal: #78aaa3;
  --night: #0f0e0c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
html.intro-playing { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; color: #fff8ea; background: var(--red); font: 700 11px/1.2 var(--sans); text-decoration: none; transform: translateY(-150%); transition: transform .18s ease; }
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--gold); outline-offset: 2px; }
.page-width { width: var(--page); margin-inline: auto; }

.opening-screen { display: none; }
.intro-enabled .opening-screen {
  position: fixed;
  z-index: 120;
  inset: 0;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff7e8;
  background: #100e0b;
}
.opening-media {
  --opening-art: url("https://pub-2f296678a1134f0fa45cf651ddd6f956.r2.dev/modules/shaanxi-history/assets/generated/opening-eight-treasures-v1.webp");
  position: absolute;
  z-index: -3;
  inset: -4%;
  overflow: hidden;
  background: #100e0b;
  transform: scale(1.07);
  animation: opening-drift 2.8s cubic-bezier(.2,.72,.2,1) both;
}
.opening-media::before,
.opening-media::after { content: ""; position: absolute; inset: 0; }
.opening-media::before { inset: -7%; background: var(--opening-art) center / cover no-repeat; filter: blur(30px) brightness(.42) saturate(.72); transform: scale(1.08); }
.opening-media::after { background: var(--opening-art) center / contain no-repeat; }
.opening-shade { position: absolute; z-index: -2; inset: 0; background: radial-gradient(ellipse at center, rgba(8,6,4,.5) 0 14%, rgba(8,6,4,.12) 40%, rgba(8,6,4,.4) 100%), linear-gradient(0deg, rgba(8,6,4,.62), transparent 54%); }
.opening-shade::after { content: ""; position: absolute; inset: 8% 5%; border: 1px solid rgba(231,195,129,.28); transform: scaleX(0); animation: opening-frame 1.2s .18s cubic-bezier(.22,.8,.25,1) forwards; }
.opening-copy { display: grid; justify-items: center; text-align: center; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.opening-copy p { display: flex; align-items: center; gap: 12px; margin: 0 0 17px; color: #e7c381; font: 700 9px/1 var(--sans); letter-spacing: .24em; opacity: 0; animation: opening-rise .7s .32s ease-out forwards; }
.opening-copy p i { width: 38px; height: 1px; background: currentColor; transform: scaleX(0); animation: opening-line .7s .72s ease-out forwards; }
.opening-copy strong { font-size: clamp(42px, 7vw, 92px); font-weight: 500; line-height: 1; letter-spacing: .08em; opacity: 0; transform: translateY(18px); animation: opening-rise .82s .42s cubic-bezier(.22,.8,.25,1) forwards; }
.opening-copy small { margin-top: 19px; color: rgba(255,247,232,.72); font: 500 11px/1.5 var(--sans); letter-spacing: .18em; opacity: 0; animation: fade-in .7s .86s ease-out forwards; }
.opening-skip { position: absolute; right: max(22px, 4vw); bottom: max(20px, 4vh); min-width: 88px; min-height: 40px; border: 1px solid rgba(255,247,232,.34); color: rgba(255,247,232,.8); background: rgba(12,10,8,.2); backdrop-filter: blur(8px); cursor: pointer; font: 600 10px/1 var(--sans); letter-spacing: .08em; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.opening-skip:hover, .opening-skip:focus-visible { color: #fff; border-color: #e7c381; background: rgba(12,10,8,.5); outline: 2px solid rgba(231,195,129,.32); outline-offset: 3px; }
.opening-screen.is-leaving { pointer-events: none; animation: opening-out .72s cubic-bezier(.55,0,.75,.2) forwards; }

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px max(24px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: #fff7e9; background: var(--red); font: 600 18px/1 var(--serif); }
.brand-mark img { display: block; width: 88%; height: 88%; object-fit: contain; }
.brand-type { display: grid; gap: 1px; }
.brand-type b { font: 600 14px/1.25 var(--sans); letter-spacing: .08em; }
.brand-type small { color: var(--muted); font: 600 8px/1.2 var(--sans); letter-spacing: .18em; }
.top-nav { display: flex; gap: clamp(14px, 2.4vw, 32px); margin-left: auto; }
.top-nav a, .official-link { color: var(--muted); text-decoration: none; font: 600 12px/1 var(--sans); letter-spacing: .05em; }
.top-nav a:hover, .top-nav a:focus-visible, .official-link:hover, .official-link:focus-visible { color: var(--red); }
.official-link { margin-left: 14px; color: var(--red); white-space: nowrap; }
.theme-button { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer; }
.theme-button:hover, .theme-button:focus-visible { border-color: var(--red); outline: 2px solid color-mix(in srgb, var(--red) 20%, transparent); outline-offset: 2px; }

.hero {
  min-height: min(680px, calc(100vh - 64px));
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: end;
  color: #fff8ea;
  background: var(--night) url("https://pub-2f296678a1134f0fa45cf651ddd6f956.r2.dev/modules/shaanxi-history/assets/generated/hero-atmosphere-v1.webp") center 47% / cover no-repeat;
}
.hero::after { content: ""; position: absolute; left: max(24px, calc((100vw - 1320px) / 2)); bottom: 42px; width: min(300px, 32vw); height: 1px; background: rgba(231,195,129,.72); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.hero-shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(10, 8, 6, .82) 0%, rgba(10, 8, 6, .45) 46%, rgba(10, 8, 6, .12) 78%), linear-gradient(0deg, rgba(8, 6, 4, .76), transparent 58%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px; padding: 108px 0 70px; }
.hero-copy { max-width: 660px; }
.eyebrow { margin: 0 0 10px; color: var(--red); font: 700 10px/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
.eyebrow.light { color: #e7c381; }
.hero h1 { margin: 0 0 18px; font-size: clamp(34px, 4.8vw, 64px); font-weight: 500; line-height: 1.12; letter-spacing: -.045em; }
.hero-copy > p:not(.eyebrow) { max-width: 580px; margin: 0 0 26px; color: rgba(255, 248, 234, .84); font-size: clamp(14px, 1.35vw, 17px); line-height: 1.9; }
.primary-action { min-height: 44px; display: inline-flex; align-items: center; gap: 28px; padding: 10px 16px; color: #fff8ea; background: var(--red); border: 1px solid var(--red); text-decoration: none; font: 700 12px/1 var(--sans); letter-spacing: .06em; }
.primary-action:hover, .primary-action:focus-visible { background: var(--red-dark); outline: 2px solid rgba(255,255,255,.7); outline-offset: 3px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 96px); align-self: end; border-top: 1px solid rgba(255,255,255,.42); border-bottom: 1px solid rgba(255,255,255,.28); }
.hero-stats div { padding: 13px 8px 12px; border-right: 1px solid rgba(255,255,255,.22); }
.hero-stats div:last-child { border-right: 0; }
.hero-stats b { display: block; font: 500 22px/1.1 var(--serif); }
.hero-stats span { color: rgba(255,255,255,.68); font: 600 9px/1.4 var(--sans); letter-spacing: .08em; }
.photo-credit { position: absolute; right: max(18px, calc((100vw - 1320px) / 2)); bottom: 14px; max-width: min(92vw, 760px); margin: 0; color: rgba(255,255,255,.62); font: 400 9px/1.5 var(--sans); text-align: right; }
.photo-credit a { text-decoration: underline; text-underline-offset: 2px; }

.section { padding-block: 82px; border-bottom: 1px solid var(--line); scroll-margin-top: 68px; }
.section-label { min-width: 126px; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.section-label span { color: var(--red); font: 700 10px/1 var(--mono); }
.section-label p { margin: 0; font: 700 9px/1.4 var(--sans); letter-spacing: .18em; }
.section-label.gold span { color: var(--gold); }
h2, h3, p { margin-top: 0; }
h2, h3 { font-weight: 500; }

.museum-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--paper) url("https://pub-2f296678a1134f0fa45cf651ddd6f956.r2.dev/modules/shaanxi-history/assets/hero-museum.webp") center 57% / cover no-repeat;
}
.museum-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--paper) 82%, transparent) 0%, color-mix(in srgb, var(--paper) 60%, transparent) 56%, color-mix(in srgb, var(--paper) 34%, transparent) 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--paper) 68%, transparent) 0%, color-mix(in srgb, var(--paper) 12%, transparent) 48%, color-mix(in srgb, var(--paper) 46%, transparent) 100%);
}
.museum-section::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; box-shadow: inset 0 1px color-mix(in srgb, var(--paper) 42%, transparent), inset 0 -1px color-mix(in srgb, var(--paper) 48%, transparent); }
.museum { position: relative; z-index: 1; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 42px; }
.museum .section-label { align-self: start; padding-top: 8px; }
.museum .section-label p { color: color-mix(in srgb, var(--ink) 70%, var(--muted)); }
.section-title-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.section-title-row h2, .collection-head h2, .special h2 { margin: 0; font-size: clamp(28px, 3.1vw, 42px); line-height: 1.34; letter-spacing: -.035em; }
.section-title-row p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.text-link, .text-button { color: var(--red); text-decoration: none; white-space: nowrap; font: 700 11px/1.3 var(--sans); letter-spacing: .05em; }
.text-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.text-link:hover, .text-button:hover, .text-link:focus-visible, .text-button:focus-visible { color: var(--red-dark); text-decoration: underline; text-underline-offset: 4px; outline: 0; }
.museum-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid color-mix(in srgb, var(--line-dark) 76%, transparent); border-left: 1px solid color-mix(in srgb, var(--line-dark) 76%, transparent); background: color-mix(in srgb, var(--paper) 84%, transparent); box-shadow: 0 22px 54px rgba(49, 35, 20, .16); backdrop-filter: blur(14px) saturate(.74); }
.museum-facts article { min-height: 168px; padding: 22px 24px; border-right: 1px solid color-mix(in srgb, var(--line-dark) 76%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line-dark) 76%, transparent); background: color-mix(in srgb, var(--surface) 44%, transparent); }
.museum-facts h3 { margin: 0 0 10px; color: var(--red); font: 700 12px/1.4 var(--sans); letter-spacing: .1em; }
.museum-facts p { margin: 0; color: color-mix(in srgb, var(--ink) 78%, var(--muted)); font-size: 14px; line-height: 1.9; text-indent: 2em; }
.museum-photo-note { position: absolute; z-index: 2; right: max(18px, calc((100vw - 1320px) / 2)); bottom: 12px; margin: 0; padding: 4px 7px; color: rgba(255,255,255,.88); background: rgba(20,17,13,.5); font: 500 9px/1.3 var(--sans); letter-spacing: .06em; backdrop-filter: blur(7px); }

.treasures { position: relative; overflow: hidden; color: #f6ead6; background: #171411; }
.treasures::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 12% 8%, rgba(174,45,34,.24), transparent 34%), radial-gradient(circle at 88% 94%, rgba(182,139,70,.17), transparent 32%), url("https://pub-2f296678a1134f0fa45cf651ddd6f956.r2.dev/modules/shaanxi-history/assets/generated/archive-texture-v1.webp") center / cover no-repeat; opacity: .58; mix-blend-mode: screen; }
.treasures > .page-width { position: relative; z-index: 1; }
.treasures-head { display: grid; grid-template-columns: 150px minmax(260px,.7fr) minmax(440px,1.3fr); gap: 42px; align-items: end; margin-bottom: 38px; }
.treasures-title .eyebrow { color: #d7ad61; }
.treasures-title h2 { margin: 4px 0 0; font-size: clamp(42px,5.8vw,82px); font-weight: 500; line-height: .98; letter-spacing: -.075em; }
.treasures-intro { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 28px; align-items: end; }
.treasures-intro p { margin: 0; color: rgba(246,234,214,.72); font-size: 13px; line-height: 1.95; }
.treasures-all { min-height: 44px; padding: 0 0 4px; border: 0; border-bottom: 1px solid rgba(215,173,97,.72); color: #e3bd79; background: none; cursor: pointer; font: 700 10px/1.3 var(--sans); white-space: nowrap; }
.treasures-all:hover, .treasures-all:focus-visible { color: #fff1d3; border-color: #fff1d3; outline: 0; }
.treasure-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid rgba(239,214,169,.25); border-left: 1px solid rgba(239,214,169,.25); }
.treasure-card { min-width: 0; display: grid; grid-template-rows: clamp(210px,18vw,310px) 1fr; padding: 0; border: 0; border-right: 1px solid rgba(239,214,169,.25); border-bottom: 1px solid rgba(239,214,169,.25); color: inherit; background: rgba(255,248,234,.035); text-align: left; cursor: pointer; }
.treasure-image { position: relative; display: block; overflow: hidden; background: #0b0908; }
.treasure-image::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent,rgba(8,7,6,.82)); }
.treasure-image img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.9) contrast(1.04); transition: transform .45s cubic-bezier(.22,.8,.25,1), filter .3s ease; }
.treasure-card[data-item-id="chunhua-dading"] .treasure-image img { object-fit: contain; }
.treasure-image b { position: absolute; z-index: 2; top: 14px; left: 14px; padding: 6px 7px; color: #f3d9a9; background: rgba(8,7,6,.72); font: 700 9px/1 var(--mono); }
.treasure-copy { min-width: 0; display: flex; flex-direction: column; padding: 20px 20px 18px; }
.treasure-meta { color: #c99645; font: 700 9px/1.4 var(--sans); letter-spacing: .08em; }
.treasure-copy strong { display: block; margin-top: 9px; font-size: clamp(18px,1.55vw,24px); font-weight: 500; line-height: 1.35; letter-spacing: -.035em; }
.treasure-note { display: block; margin-top: 12px; color: rgba(246,234,214,.66); font-size: 11px; line-height: 1.8; }
.treasure-copy i { display: block; margin-top: auto; padding-top: 20px; color: #d7ad61; font: 600 9px/1.3 var(--sans); font-style: normal; letter-spacing: .04em; }
.treasure-card:hover, .treasure-card:focus-visible { position: relative; z-index: 1; background: rgba(180,52,38,.14); outline: 2px solid #b43d2f; outline-offset: -2px; }
.treasure-card:hover img, .treasure-card:focus-visible img { transform: scale(1.035); filter: saturate(1) contrast(1.06); }

.collection { position: relative; isolation: isolate; overflow: hidden; background: var(--paper-deep); }
.collection::before { content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none; background: url("https://pub-2f296678a1134f0fa45cf651ddd6f956.r2.dev/modules/shaanxi-history/assets/generated/archive-texture-v1.webp") center top / cover no-repeat; opacity: .18; mix-blend-mode: multiply; mask-image: linear-gradient(180deg, #000 0, rgba(0,0,0,.72) 28%, transparent 72%); }
:root[data-theme="dark"] .collection::before { opacity: .1; mix-blend-mode: screen; }
.collection > .page-width { width: var(--collection-page); max-width: none; position: relative; z-index: 1; }
.collection-head { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 42px; align-items: end; margin-bottom: 28px; }
.collection-head > div:last-child { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.collection-head h2 { line-height: 1.1; }
.collection-head p { max-width: 560px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; text-align: right; }
.filter-shell { border: 1px solid var(--line-dark); background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 16px 42px rgba(54,38,19,.06); backdrop-filter: blur(10px); }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) 188px; }
.search-box { min-height: 52px; display: flex; align-items: center; gap: 11px; padding: 0 14px; border-right: 1px solid var(--line); }
.search-box > span { color: var(--red); font-size: 21px; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font: 400 13px/1 var(--sans); }
.search-box input::placeholder { color: color-mix(in srgb, var(--muted) 78%, transparent); }
kbd { padding: 2px 6px; border: 1px solid var(--line); color: var(--muted); background: var(--paper); font: 600 9px/1.4 var(--mono); }
.sort-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; color: var(--muted); font: 600 10px/1 var(--sans); }
.sort-box select { max-width: 110px; border: 0; outline: 0; color: var(--ink); background: transparent; cursor: pointer; font: 600 12px/1 var(--sans); }
.search-box:focus-within, .sort-box:focus-within { outline: 2px solid var(--red); outline-offset: -2px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); }
.filter-chip { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; margin: -1px 0 0 -1px; padding: 8px 13px; border: 1px solid var(--line); color: var(--muted); background: transparent; cursor: pointer; font: 600 11px/1.2 var(--sans); text-align: center; }
.filter-chip i { margin-left: 4px; font-style: normal; opacity: .62; }
.filter-chip:hover, .filter-chip:focus-visible { position: relative; z-index: 1; border-color: var(--red); color: var(--red); outline: 0; }
.filter-chip.active { color: var(--surface); border-color: var(--ink); background: var(--ink); }
.filter-chip.music.active { border-color: var(--teal); background: var(--teal); }
.filter-chip.forbidden.active { border-color: var(--red); background: var(--red); }
.filter-chip.greek.active { color: #21170c; border-color: var(--gold); background: var(--gold); }
.filter-chip.wall.active { border-color: var(--red-dark); background: var(--red-dark); }
.primary-filters, .secondary-filters { flex-wrap: nowrap; }
.primary-filters .filter-chip { min-width: 0; flex: 1 1 0; padding-inline: clamp(14px, 1.5vw, 30px); }
.secondary-filters { max-height: none; overflow: visible; }
.secondary-filters:empty { display: none; }
.secondary-filters .filter-chip { min-width: 0; min-height: 40px; flex: 1 1 0; padding-inline: 8px; font-size: 10px; white-space: nowrap; }
.filter-label { min-width: 72px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 72px; margin: -1px 0 0 -1px; padding: 0 10px; color: var(--muted); font: 700 9px/1 var(--sans); letter-spacing: .08em; }
.result-line { min-height: 42px; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font: 600 10px/1.4 var(--sans); letter-spacing: .05em; }
#active-query { color: var(--red); }

.object-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; align-items: stretch; gap: 16px; border: 0; background: transparent; }
.object-card { --title-size: 20px; min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(196px, 1fr); overflow: hidden; padding: 0; border: 1px solid var(--line); color: var(--ink); background: color-mix(in srgb, var(--surface) 97%, transparent); box-shadow: 0 8px 28px rgba(48,33,18,.045); text-align: left; cursor: pointer; transition: background .18s ease, transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.object-card:hover, .object-card:focus-visible { position: relative; z-index: 2; border-color: color-mix(in srgb, var(--red) 64%, var(--line)); background: color-mix(in srgb, var(--surface) 90%, var(--gold) 10%); box-shadow: 0 18px 42px rgba(48,33,18,.14); transform: translateY(-3px); outline: 0; }
.object-card:active { transform: scale(.994); }
.card-image { min-width: 0; min-height: 0; aspect-ratio: 5 / 4; position: relative; isolation: isolate; overflow: hidden; display: block; background: #171512; }
.card-image::before { display: none; }
.card-image::after { content: ""; position: absolute; z-index: 3; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(8,6,4,.14), transparent 24%, transparent 72%, rgba(8,6,4,.18)); }
.card-image img { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.96) contrast(1.025); transform: scale(1.001); transform-origin: center; transition: transform .42s cubic-bezier(.22,.8,.25,1), filter .24s ease; }
.object-card:hover .card-image img, .object-card:focus-visible .card-image img { filter: saturate(1) contrast(1.035); transform: scale(1.025); }
.image-placeholder { position: relative; z-index: 2; color: #c6aa76; font-size: 28px; }
.card-number { position: absolute; z-index: 4; left: 9px; top: 9px; padding: 4px 7px; color: #fff4e0; background: rgba(10, 8, 6, .76); font: 700 10px/1 var(--mono); }
.card-photo-count { position: absolute; z-index: 4; right: 9px; bottom: 9px; padding: 4px 7px; color: #fff4e0; background: rgba(10, 8, 6, .76); font: 600 10px/1 var(--sans); }
.card-body { min-width: 0; display: flex; flex-direction: column; padding: 17px 18px 15px; border-top: 1px solid var(--line); }
.card-kicker { display: flex; justify-content: space-between; gap: 10px; color: var(--red); font: 700 11px/1.35 var(--sans); letter-spacing: .05em; }
.card-kicker span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title { min-width: 0; display: block; margin: 10px 0 5px; overflow: hidden; color: var(--ink); font-size: var(--title-size); font-weight: 500; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; letter-spacing: -.025em; }
.card-origin { margin: 0; overflow: hidden; color: var(--muted); font: 400 11px/1.5 var(--sans); white-space: nowrap; text-overflow: ellipsis; }
.card-lead { display: -webkit-box; margin-top: 9px; overflow: hidden; color: color-mix(in srgb, var(--ink) 82%, var(--muted)); font: 400 12px/1.58 var(--sans); -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.card-bottom { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 9px; }
.card-tags { min-width: 0; display: flex; flex-wrap: nowrap; gap: 4px; overflow: hidden; }
.mini-tag { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 3px 6px; border: 1px solid var(--line); color: var(--muted); font: 600 10px/1.25 var(--sans); white-space: nowrap; }
.mini-tag.music { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 50%, var(--line)); }
.mini-tag.forbidden { color: var(--red); border-color: color-mix(in srgb, var(--red) 52%, var(--line)); }
.mini-tag.greek { color: color-mix(in srgb, var(--gold) 82%, var(--ink)); border-color: color-mix(in srgb, var(--gold) 70%, var(--line)); }
.mini-tag.wall { color: var(--red-dark); border-color: color-mix(in srgb, var(--red-dark) 52%, var(--line)); }
.card-reference { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 600 9px/1.3 var(--sans); letter-spacing: .04em; }
.card-reference i { color: var(--red); font: normal 700 16px/1 var(--sans); }
.empty-state { padding: 54px 24px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.empty-state h3 { margin-bottom: 7px; font-size: 20px; }
.empty-state p { margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.quiet-action { min-height: 40px; padding: 8px 14px; border: 1px solid var(--line-dark); color: var(--ink); background: transparent; cursor: pointer; font: 700 11px/1 var(--sans); }

.special { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 42px; background: var(--paper); }
.special-copy { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr); gap: 70px; align-items: start; }
.special-copy .eyebrow { color: var(--gold); }
.special-copy h2 { max-width: 520px; font-size: clamp(27px, 3vw, 40px); }
.special-copy > div:last-child > p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.9; text-indent: 2em; }
.special-preview { grid-column: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 30px; border: 1px solid var(--line); background: var(--line); }
.special-card { min-width: 0; min-height: 100px; display: grid; grid-template-columns: 120px minmax(0, 1fr); padding: 0; border: 0; color: inherit; background: var(--surface); text-align: left; cursor: pointer; }
.special-card:hover, .special-card:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--gold); outline-offset: -2px; }
.special-preview img { width: 120px; height: 96px; object-fit: cover; background: #171512; transition: transform .28s ease; }
.special-card:hover img, .special-card:focus-visible img { transform: scale(1.025); }
.special-preview .special-card > span { min-width: 0; padding: 13px; }
.special-title { display: block; margin: 4px 0 0; overflow: hidden; font-size: 12px; font-weight: 500; line-height: 1.45; white-space: nowrap; text-overflow: ellipsis; }
.special-preview small { color: var(--gold); font: 600 8px/1.3 var(--sans); letter-spacing: .08em; }

.method {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 42px;
}
#method.method {
  background:
    linear-gradient(100deg, rgba(246, 240, 227, .94), rgba(246, 240, 227, .72) 58%, rgba(246, 240, 227, .9)),
    url("assets/generated/method-tang-conservation-v1.webp") center / cover no-repeat;
}
.method-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.method-grid article { padding-top: 12px; border-top: 2px solid var(--ink); }
.method-grid b { color: var(--red); font: 700 11px/1.4 var(--sans); letter-spacing: .06em; }
.method-grid p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; text-indent: 2em; }
.site-footer { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font: 600 9px/1.4 var(--sans); letter-spacing: .06em; }
.site-footer a { color: var(--red); text-decoration: none; }

.object-dialog { width: min(1180px, calc(100vw - 32px)); max-width: none; height: min(820px, calc(100vh - 32px)); max-height: none; padding: 0; border: 1px solid var(--line-dark); color: var(--ink); background: var(--paper); box-shadow: 0 28px 90px rgba(0,0,0,.34); }
.object-dialog::backdrop { background: rgba(14, 11, 8, .72); backdrop-filter: blur(5px); }
.dialog-shell { height: 100%; display: grid; grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); position: relative; }
.dialog-close { position: absolute; z-index: 4; top: 12px; right: 12px; width: 44px; height: 44px; border: 1px solid var(--line); color: var(--ink); background: color-mix(in srgb, var(--paper) 92%, transparent); cursor: pointer; font-size: 22px; line-height: 1; }
.dialog-close:hover, .dialog-close:focus-visible { border-color: var(--red); color: var(--red); outline: 2px solid color-mix(in srgb, var(--red) 20%, transparent); }
.dialog-media { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; padding: 14px; background: #171512; }
.dialog-image-wrap { min-width: 0; min-height: 0; position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden; background: #0d0c0a url("https://pub-2f296678a1134f0fa45cf651ddd6f956.r2.dev/modules/shaanxi-history/assets/card-museum-underlay.png") center / cover no-repeat; }
.dialog-image-wrap::before { content: ""; position: absolute; z-index: 0; inset: -12%; background-image: var(--dialog-bg, none); background-position: center; background-size: cover; filter: blur(25px) brightness(.42) saturate(.74); opacity: .78; transform: scale(1.12); }
.dialog-image-wrap::after { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 46%, transparent 36%, rgba(7, 6, 5, .2) 100%); }
.dialog-image-wrap img { position: relative; z-index: 2; width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .2)); transform: translate3d(var(--zoom-x,0px),var(--zoom-y,0px),0) scale(var(--zoom-scale,1)); transform-origin: center; transition: transform .12s ease-out; user-select: none; -webkit-user-drag: none; }
.dialog-image-wrap.is-zoomed { cursor: grab; touch-action: none; }
.dialog-image-wrap.is-dragging { cursor: grabbing; }
.dialog-image-wrap.is-dragging img { transition: none; }
.dialog-image-wrap:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; }
.dialog-sequence { position: absolute; z-index: 3; left: 9px; bottom: 9px; padding: 4px 6px; color: #fff2db; background: rgba(0,0,0,.72); font: 600 8px/1.2 var(--mono); }
.zoom-toolbar { position: absolute; z-index: 4; top: 10px; right: 10px; display: flex; border: 1px solid rgba(255,242,219,.3); background: rgba(8,7,6,.72); backdrop-filter: blur(8px); }
.zoom-toolbar button { min-width: 38px; min-height: 38px; padding: 0 9px; border: 0; border-left: 1px solid rgba(255,242,219,.2); color: #fff2db; background: transparent; cursor: pointer; font: 700 12px/1 var(--sans); }
.zoom-toolbar button:first-child { border-left: 0; }
.zoom-toolbar button[data-zoom-reset] { min-width: 58px; font-size: 9px; }
.zoom-toolbar button:hover,.zoom-toolbar button:focus-visible { color: #1b1308; background: var(--gold); outline: 0; }
.zoom-hint { position: absolute; z-index: 4; left: 50%; bottom: 9px; transform: translateX(-50%); padding: 5px 8px; color: rgba(255,242,219,.78); background: rgba(0,0,0,.62); font: 600 8px/1.2 var(--sans); white-space: nowrap; pointer-events: none; transition: opacity .25s ease; }
.dialog-image-wrap.is-zoomed .zoom-hint { opacity: 0; }
.gallery-strip { min-height: 64px; display: flex; gap: 5px; overflow-x: auto; }
.gallery-thumb { width: 82px; height: 60px; flex: 0 0 82px; padding: 0; border: 1px solid #4b4134; background: #11100e; cursor: pointer; opacity: .65; }
.gallery-thumb.active, .gallery-thumb:hover, .gallery-thumb:focus-visible { border-color: var(--gold); opacity: 1; outline: 0; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.dialog-content { min-width: 0; overflow: auto; padding: 48px clamp(24px, 4vw, 50px) 38px; }
.dialog-kicker { color: var(--red); font: 700 9px/1.4 var(--sans); letter-spacing: .12em; }
.dialog-content h2 { --dialog-title-size: 34px; margin: 10px 0 11px; overflow: hidden; font-size: var(--dialog-title-size); line-height: 1.28; letter-spacing: -.035em; white-space: nowrap; text-overflow: ellipsis; }
.dialog-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dialog-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 18px 0 22px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font: 400 11px/1.55 var(--sans); }
.dialog-meta b { display: block; margin-bottom: 2px; color: var(--ink); font: 700 9px/1.4 var(--sans); letter-spacing: .05em; }
.dialog-essay h3 { margin: 22px 0 7px; color: var(--red); font: 600 15px/1.4 var(--serif); }
.dialog-essay p { margin: 0; color: color-mix(in srgb, var(--ink) 86%, var(--muted)); font-size: 14px; line-height: 1.95; text-indent: 2em; }
.dialog-evidence { margin-top: 26px; padding: 12px 14px; border-left: 2px solid var(--gold); color: var(--muted); background: color-mix(in srgb, var(--surface) 58%, transparent); font: 400 10px/1.75 var(--sans); }
.dialog-evidence b { color: var(--ink); }
.dialog-evidence a { color: var(--red); }

/* Motion is progressive enhancement: without JS every section remains visible. */
.motion-ready .hero { animation: hero-drift 1.15s cubic-bezier(.22,.8,.25,1) both; }
.motion-ready .hero-shade { animation: shade-in .9s ease-out both; }
.motion-ready .hero::after { animation: draw-line .9s .55s cubic-bezier(.22,.8,.25,1) both; }
.motion-ready .hero-copy > * { opacity: 0; transform: translateY(18px); animation: hero-rise .72s cubic-bezier(.22,.8,.25,1) forwards; }
.motion-ready .hero-copy > :nth-child(1) { animation-delay: .12s; }
.motion-ready .hero-copy > :nth-child(2) { animation-delay: .22s; }
.motion-ready .hero-copy > :nth-child(3) { animation-delay: .32s; }
.motion-ready .hero-copy > :nth-child(4) { animation-delay: .46s; }
.motion-ready .hero-stats { opacity: 0; transform: translateY(12px); animation: hero-rise .72s .48s cubic-bezier(.22,.8,.25,1) forwards; }
.motion-ready .photo-credit { opacity: 0; animation: fade-in .7s .8s ease-out forwards; }
.motion-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .72s ease, transform .72s cubic-bezier(.22,.8,.25,1); transition-delay: var(--reveal-delay, 0ms); }
.motion-ready .reveal.is-visible { opacity: 1; transform: none; }
.motion-ready .reveal:target { opacity: 1; transform: none; }
.object-card.card-enter { animation: card-in .42s var(--card-delay, 0ms) cubic-bezier(.22,.8,.25,1) both; }
.object-dialog { opacity: 0; transform: translateY(12px) scale(.985); transition: opacity .28s ease, transform .28s cubic-bezier(.22,.8,.25,1); }
.object-dialog[open], .object-dialog.is-open { opacity: 1; transform: none; }
.object-dialog::backdrop { opacity: 0; transition: opacity .28s ease; }
.object-dialog[open]::backdrop { opacity: 1; }

@keyframes hero-drift { from { background-position: 48% 50%; } to { background-position: 50% 47%; } }
@keyframes shade-in { from { opacity: .25; } to { opacity: 1; } }
@keyframes draw-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hero-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes card-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes opening-drift { from { transform: scale(1.07); filter: brightness(.72) saturate(.72); } to { transform: scale(1); filter: brightness(1) saturate(.9); } }
@keyframes opening-frame { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
@keyframes opening-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes opening-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes opening-out { from { opacity: 1; filter: blur(0); } to { opacity: 0; filter: blur(8px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion-ready .hero, .motion-ready .hero-shade, .motion-ready .hero::after,
  .motion-ready .hero-copy > *, .motion-ready .hero-stats, .motion-ready .photo-credit,
  .object-card.card-enter { animation: none; opacity: 1; transform: none; }
  .intro-enabled .opening-screen { display: none; }
  .motion-ready .reveal { opacity: 1; transform: none; transition: none; }
  .object-dialog, .object-dialog::backdrop { transition: none; }
}

@media (max-width: 1040px) {
  :root { --page: min(100% - 36px, 920px); }
  .topbar { flex-wrap: wrap; gap: 8px 12px; }
  .top-nav { order: 1; flex: 1 0 100%; min-width: 0; margin-left: 0; gap: 20px; overflow-x: auto; }
  .top-nav a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 36px; white-space: nowrap; }
  .official-link { margin-left: auto; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-stats { justify-self: start; }
  .museum, .special, .method, .collection-head { grid-template-columns: 118px minmax(0, 1fr); gap: 26px; }
  .treasures-head { grid-template-columns: 118px minmax(220px,.7fr) minmax(360px,1.3fr); gap: 26px; }
  .treasure-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .treasure-card { grid-template-rows: 210px 1fr; }
  .object-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px; }
  .object-card { grid-template-rows: auto minmax(190px, 1fr); }
  .special-copy { grid-template-columns: 1fr; gap: 22px; }
  .special-preview { grid-template-columns: 1fr 1fr; }
  .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog-shell { grid-template-columns: minmax(0, .9fr) minmax(390px, 1.1fr); }
  .secondary-filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .secondary-filters .filter-chip, .secondary-filters .filter-label { width: 100%; min-width: 0; }
}

@media (max-width: 760px) {
  :root { --page: calc(100% - 24px); }
  .opening-media { --opening-art: url("https://pub-2f296678a1134f0fa45cf651ddd6f956.r2.dev/modules/shaanxi-history/assets/generated/opening-eight-treasures-mobile-v1.webp"); }
  .opening-media::before { filter: blur(24px) brightness(.38) saturate(.68); }
  .topbar { min-height: 58px; padding: 8px 12px; }
  .brand-type small { display: none; }
  .official-link { font-size: 10px; }
  .hero { min-height: 560px; background-position: 58% center; }
  .hero-inner { padding: 86px 0 66px; }
  .hero h1 { font-size: 34px; }
  .hero-stats { grid-template-columns: repeat(3, minmax(76px, 92px)); }
  .photo-credit { right: 12px; bottom: 9px; font-size: 8px; }
  .section { padding-block: 58px; }
  .museum, .special, .method, .collection-head { grid-template-columns: 1fr; gap: 20px; }
  .treasures-head { grid-template-columns: 1fr; gap: 18px; }
  .treasures-intro { grid-template-columns: 1fr; gap: 14px; }
  .treasures-all { justify-self: start; }
  .treasure-grid { grid-template-columns: 1fr; }
  .treasure-card { grid-template-columns: minmax(112px,.9fr) minmax(0,1.3fr); grid-template-rows: 1fr; }
  .treasure-copy { padding: 16px 14px; }
  .treasure-copy i { padding-top: 14px; }
  .section-label { min-width: 0; }
  .section-title-row { align-items: start; flex-direction: column; margin-bottom: 24px; }
  .section-title-row h2, .collection-head h2, .special h2 { font-size: 27px; }
  .museum-facts { grid-template-columns: 1fr; }
  .museum-facts article { min-height: 0; padding: 18px; }
  .collection-head > div:last-child { display: block; }
  .collection-head p { margin-top: 8px; text-align: left; }
  .search-row { grid-template-columns: 1fr; }
  .search-box { border-right: 0; border-bottom: 1px solid var(--line); }
  .sort-box { min-height: 44px; }
  .primary-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-filters .filter-chip { width: 100%; }
  .primary-filters .filter-chip:last-child { grid-column: 1 / -1; }
  .secondary-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; }
  .object-grid { grid-template-columns: 1fr !important; gap: 8px; }
  .object-card { height: 184px; min-height: 0; grid-template-columns: 142px minmax(0, 1fr); grid-template-rows: 1fr; }
  .object-card .card-image { aspect-ratio: auto; }
  .card-body { padding: 13px 14px 11px; border-top: 0; border-left: 1px solid var(--line); }
  .card-lead { font-size: 10px; line-height: 1.5; -webkit-line-clamp: 2; line-clamp: 2; }
  .special-preview { grid-column: 1; grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .site-footer { min-height: 110px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 7px; }
  .object-dialog { width: calc(100vw - 12px); height: calc(100vh - 12px); }
  .dialog-shell { grid-template-columns: 1fr; grid-template-rows: minmax(300px, 44vh) minmax(0, 1fr); }
  .dialog-media { padding: 8px; }
  .dialog-content { padding: 34px 18px 28px; }
  .dialog-close { top: 7px; right: 7px; }
  .zoom-toolbar { right: auto; left: 10px; }
  .dialog-content h2 { --dialog-title-size: 25px; }
}

@media (max-width: 430px) {
  .brand-type b { font-size: 12px; letter-spacing: .04em; }
  .official-link span { display: none; }
  .hero-copy > p:not(.eyebrow) { font-size: 13px; }
  .hero-stats div { padding-inline: 6px; }
  .object-card { --title-size: 16px; height: 172px; grid-template-columns: 116px minmax(0, 1fr); }
  .card-origin { font-size: 10px; }
  .dialog-meta { grid-template-columns: 1fr; }
  .dialog-essay p { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Keep the museum introduction and its content on one left axis. */
#museum > .museum { display: block; }
#museum > .museum > .section-label { width: 100%; margin-bottom: 28px; padding-top: 0; }
#museum > .museum > .section-label::after { content: ""; flex: 1 1 auto; height: 1px; margin-left: 12px; background: color-mix(in srgb, var(--line-dark) 76%, transparent); }
#museum .section-title-row { flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; gap: 10px; margin-bottom: 36px; }
#museum .museum-facts { text-align: left; }

/* Collection theme: Tang gold, vermilion, paper, and ink. */
#collection.collection {
  --paper: #E8DFCE;
  --paper-deep: #E8DFCE;
  --surface: #F4EDE0;
  --ink: #241F18;
  --muted: #6F6254;
  --line: rgba(36, 31, 24, .18);
  --line-dark: rgba(36, 31, 24, .42);
  --red: #A94332;
  --red-dark: #7F3026;
  --gold: #B88A3D;
  --teal: #496E65;
  --night: #241F18;
  --collection-art: url("assets/ui/collection-background.webp");
  color: var(--ink);
  color-scheme: light;
  background:
    linear-gradient(180deg, rgba(232, 223, 206, .92), rgba(232, 223, 206, .78) 48%, rgba(232, 223, 206, .94)),
    var(--collection-art) center / cover no-repeat;
}
#collection.collection::before {
  opacity: .1;
  mix-blend-mode: multiply;
}

#collection.collection .collection-head p,
#collection.collection .result-line { color: var(--muted); }
#collection.collection .filter-shell { border-color: var(--line-dark); background: rgba(244, 237, 224, .9); box-shadow: 0 18px 46px rgba(55, 39, 20, .1); }
#collection.collection .search-box,
#collection.collection .filter-row { border-color: var(--line); }
#collection.collection .search-box input,
#collection.collection .sort-box select { color: var(--ink); }
#collection.collection .search-box input::placeholder { color: color-mix(in srgb, var(--muted) 76%, transparent); }
#collection.collection kbd { border-color: var(--line); color: var(--muted); background: rgba(255, 250, 241, .72); }
#collection.collection .filter-chip { border-color: var(--line); color: var(--muted); }
#collection.collection .filter-chip:hover,
#collection.collection .filter-chip:focus-visible { border-color: var(--gold); color: var(--gold); }
#collection.collection .filter-chip.active,
#collection.collection .filter-chip.forbidden.active,
#collection.collection .filter-chip.wall.active { color: #F4EDE0; border-color: var(--ink); background: var(--ink); }
#collection.collection .filter-chip.music.active { color: #F4EDE0; border-color: var(--teal); background: var(--teal); }
#collection.collection .filter-chip.forbidden.active { color: #F4EDE0; border-color: var(--red); background: var(--red); }
#collection.collection .filter-chip.greek.active { color: var(--ink); border-color: var(--gold); background: var(--gold); }
#collection.collection .section-label span { color: var(--gold); }
#collection.collection .object-grid { border-color: var(--line); }
#collection.collection .object-card {
  border-color: var(--line);
  border-top: 2px solid var(--gold);
  color: var(--ink);
  background: rgba(244, 237, 224, .94);
}
#collection.collection .object-card:hover,
#collection.collection .object-card:focus-visible {
  border-color: var(--gold);
  border-top-color: var(--red);
  background: #F1E5CD;
}
#collection.collection .card-title { color: var(--ink); }
#collection.collection .mini-tag { border-color: var(--line); color: var(--muted); }
#collection.collection .card-origin,
#collection.collection .card-lead { color: color-mix(in srgb, var(--ink) 76%, var(--muted)); }
#collection.collection .card-reference { color: var(--muted); }
#collection.collection .empty-state { border-color: var(--line); background: rgba(244, 237, 224, .94); }
#collection.collection .quiet-action { border-color: var(--line-dark); color: var(--ink); }

@media (min-width: 761px) {
  #collection.collection .object-card { grid-template-rows: clamp(208px, 18vw, 252px) minmax(214px, 1fr); }
  #collection.collection .card-image { aspect-ratio: auto; }
  #collection.collection .card-body { min-height: 214px; }
}

/* Special exhibition theme: a warm gold field for the Hellenistic display. */
#special.special {
  color: #2b1a0c;
  background:
    linear-gradient(118deg, rgba(171, 116, 25, .94), rgba(240, 202, 112, .9) 52%, rgba(151, 94, 17, .94)),
    url("https://pub-2f296678a1134f0fa45cf651ddd6f956.r2.dev/modules/shaanxi-history/assets/generated/archive-texture-v1.webp") center / cover no-repeat;
}
#special.special .section-label,
#special.special .section-label span,
#special.special .section-label p,
#special.special .special-copy .eyebrow { color: #61370c; }
#special.special .section-label span { color: #4e2907; }
#special.special .special-copy > div:last-child > p { color: rgba(43, 26, 12, .8); }
#special.special .text-button { color: #5e3208; border-color: rgba(94, 50, 8, .46); }
#special.special .text-button:hover,
#special.special .text-button:focus-visible { color: #2b1a0c; }
#special.special .special-preview { border-color: rgba(82, 45, 8, .42); background: rgba(82, 45, 8, .38); }
#special.special .special-card { color: #2b1a0c; background: rgba(255, 244, 211, .82); }
#special.special .special-preview small { color: #70400c; }
#special.special .special-title { color: #2b1a0c; }

/* PR40 · shared research record layer; Tang-gold theme remains scoped above. */
#collection.collection {
  --record-title: clamp(22px, 1.7vw, 26px);
  --record-meta: 11px;
  --record-copy: 15px;
}

#collection.collection .object-grid {
  grid-auto-rows: 530px;
}

#collection.collection .object-card {
  height: 530px;
  min-height: 530px;
  grid-template-rows: auto minmax(0, 1fr);
}

#collection.collection .card-image {
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 10;
}

#collection.collection .card-image img {
  object-fit: cover;
  object-position: center;
}

#collection.collection .card-number {
  font-size: var(--record-meta);
  letter-spacing: .06em;
}

#collection.collection .card-number::before { content: "OBJECT No. "; }

#collection.collection .card-kicker,
#collection.collection .card-origin,
#collection.collection .card-bottom { font-size: var(--record-meta); }

#collection.collection .card-kicker span:first-child::before,
#collection.collection .card-kicker span:last-child::before,
#collection.collection .card-origin::before { color: var(--gold); }

#collection.collection .card-kicker span:first-child::before { content: "TYPE / "; }
#collection.collection .card-kicker span:last-child::before { content: "DATE / "; }
#collection.collection .card-origin::before { content: "SOURCE / "; }

#collection.collection .card-title {
  font-size: var(--record-title) !important;
  line-height: 1.25;
}

#collection.collection .card-lead {
  font-size: var(--record-copy);
  line-height: 1.65;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

#collection.collection .card-reference {
  font-size: 0;
  letter-spacing: .08em;
}

#collection.collection .card-reference::before {
  color: var(--red);
  content: "OPEN RECORD ↗";
  font-size: var(--record-meta);
}

#collection.collection .card-reference i { display: none; }

@media (max-width: 1180px) {
  #collection.collection .object-card {
    height: 530px;
    min-height: 530px;
    grid-template-rows: auto minmax(0, 1fr);
  }
  #collection.collection .card-image { min-height: 0; }
}

@media (max-width: 760px) {
  #collection.collection .object-grid { grid-auto-rows: 462px; }
  #collection.collection .object-card {
    height: 462px;
    min-height: 462px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  #collection.collection .card-image { aspect-ratio: 16 / 9; }
  #collection.collection .card-title { font-size: 22px !important; }
  #collection.collection .card-lead { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  #collection.collection .object-card,
  #collection.collection .card-image img { transition: none; }
}

/* PR41 · detail research layer; Tang Golden Archive remains gold, vermilion and paper. */
.object-dialog .dialog-content {
  position: relative;
  padding: clamp(2.8rem, 5vw, 4.2rem) clamp(1.6rem, 4vw, 4rem) 3rem;
  background:
    linear-gradient(135deg, rgba(255, 252, 244, .98), rgba(242, 236, 223, .96)),
    url("assets/generated/detail-tang-archive-v1.webp") center / cover no-repeat;
}
.object-dialog .dialog-content::before {
  display: block;
  margin-bottom: 1.65rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid rgba(169, 133, 67, .36);
  color: var(--gold);
  content: "OBJECT RECORD / TANG GOLDEN ARCHIVE";
  font: 700 9px/1.4 var(--sans);
  letter-spacing: .16em;
}
.object-dialog .dialog-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .45rem;
  align-items: baseline;
  color: var(--muted);
}
.object-dialog .dialog-kicker::after {
  color: var(--gold);
  content: "/ TANG COURT COLLECTION";
}
.object-dialog[data-item-id="chunhua-dading"] .dialog-content::before { content: "OBJECT RECORD / WESTERN ZHOU"; }
.object-dialog[data-item-id="chunhua-dading"] .dialog-kicker::after { content: "/ CHUNHUA COUNTY MUSEUM"; }
.object-dialog .dialog-content h2 {
  max-width: 14ch;
  color: var(--ink);
  letter-spacing: -.055em;
}
.object-dialog .dialog-tags { margin-top: .9rem; }
.object-dialog .dialog-meta {
  gap: 0;
  margin: 1.7rem 0 2.1rem;
  border: 1px solid rgba(36, 31, 24, .18);
  background: rgba(255, 252, 244, .4);
}
.object-dialog .dialog-meta > div {
  min-height: 4.4rem;
  padding: .85rem .9rem;
  border-color: rgba(36, 31, 24, .15);
}
.object-dialog .dialog-meta b {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .35rem;
  align-items: baseline;
  color: var(--ink);
}
.object-dialog .dialog-meta b::before {
  color: var(--gold);
  font: 700 9px/1.4 var(--sans);
  letter-spacing: .08em;
}
.object-dialog .dialog-meta > div:nth-child(1) b::before { content: "PERIOD /"; }
.object-dialog .dialog-meta > div:nth-child(2) b::before { content: "MATERIAL /"; }
.object-dialog .dialog-meta > div:nth-child(3) b::before { content: "CATEGORY /"; }
.object-dialog .dialog-meta > div:nth-child(4) b::before { content: "PROVENANCE /"; }
.object-dialog .dialog-meta > div:nth-child(5) b::before { content: "PHOTO SET /"; }
.object-dialog .dialog-meta > div:nth-child(6) b::before { content: "OBJECT NO. /"; }
.object-dialog .dialog-essay h3::before {
  margin-right: .45rem;
  color: var(--gold);
  content: "CONTEXT /";
  font: 700 9px/1 var(--sans);
  letter-spacing: .1em;
}
.object-dialog .dialog-evidence {
  border-left-width: 3px;
  border-left-color: var(--gold);
  background: rgba(169, 133, 67, .08);
}
.object-dialog .dialog-evidence b::before {
  margin-right: .45rem;
  color: var(--gold);
  content: "PROVENANCE /";
  font: 700 9px/1 var(--sans);
  letter-spacing: .08em;
}

@media (max-width: 760px) {
  .object-dialog .dialog-content { padding: 2.4rem 1rem 2rem; }
  .object-dialog .dialog-content::before { margin-bottom: 1.25rem; font-size: 8px; }
  .object-dialog .dialog-meta > div { min-height: 0; }
  .object-dialog .dialog-content h2 { max-width: none; }
}

/* PR42 · preserve complete record titles and align detail controls. */
.object-dialog .dialog-content h2 {
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}
.object-dialog .dialog-close {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  line-height: 1;
  touch-action: manipulation;
}

/* PR43 · artifact archive fields extend the Tang-gold record layer. */
.object-dialog .detail-archive-fields {
  margin: 1.45rem 0 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(169, 133, 67, .36);
}
.object-dialog .detail-archive-heading {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .55rem;
  align-items: baseline;
  margin: 0 0 .8rem;
  color: var(--gold);
  font: 700 9px/1.4 var(--sans);
  letter-spacing: .14em;
}
.object-dialog .detail-archive-heading small {
  color: var(--muted);
  font: 400 10px/1.4 var(--sans);
  letter-spacing: .08em;
}
.object-dialog .detail-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(36, 31, 24, .16);
  border-left: 1px solid rgba(36, 31, 24, .16);
}
.object-dialog .detail-archive-field {
  min-width: 0;
  min-height: 4rem;
  padding: .75rem .8rem;
  border-right: 1px solid rgba(36, 31, 24, .16);
  border-bottom: 1px solid rgba(36, 31, 24, .16);
}
.object-dialog .detail-archive-label {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .35rem;
  align-items: baseline;
  color: var(--ink);
  font: 700 9px/1.4 var(--sans);
  letter-spacing: .07em;
}
.object-dialog .detail-archive-label::before { color: var(--gold); }
.object-dialog .detail-archive-field:nth-child(1) .detail-archive-label::before { content: "OBJECT NO. /"; }
.object-dialog .detail-archive-field:nth-child(2) .detail-archive-label::before { content: "CATEGORY /"; }
.object-dialog .detail-archive-field:nth-child(3) .detail-archive-label::before { content: "PERIOD /"; }
.object-dialog .detail-archive-field:nth-child(4) .detail-archive-label::before { content: "MATERIAL /"; }
.object-dialog .detail-archive-field:nth-child(5) .detail-archive-label::before { content: "FINDSPOT /"; }
.object-dialog .detail-archive-field:nth-child(6) .detail-archive-label::before { content: "DIMENSIONS /"; }
.object-dialog .detail-archive-value {
  display: block;
  margin-top: .4rem;
  color: var(--ink);
  font: 400 11px/1.65 var(--sans);
  overflow-wrap: anywhere;
}
.object-dialog .detail-archive-value.is-pending {
  color: color-mix(in srgb, var(--muted) 68%, transparent);
  font-style: italic;
}

@media (max-width: 760px) {
  .object-dialog .detail-archive-grid { grid-template-columns: 1fr; }
  .object-dialog .detail-archive-field { min-height: 0; }
}

/* 2026-08-27 · center the museum lead and the remaining special-exhibition content. */
#museum .section-title-row {
  align-items: center;
  justify-content: center;
  text-align: center;
}

#museum .section-title-row h2 {
  max-width: 100%;
}

#special.special {
  display: block;
}

#special.special .special-copy {
  width: min(100%, 1120px);
  margin-inline: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  text-align: center;
}

#special.special .special-copy > div {
  min-width: 0;
}

#special.special .special-copy h2 {
  max-width: 100%;
  margin-inline: auto;
}

#special.special .special-copy > div:last-child > p {
  max-width: 42em;
  margin-inline: auto;
}

#special.special .special-preview {
  grid-column: auto;
  width: min(100%, 1120px);
  margin: 32px auto 0;
}

@media (max-width: 1040px) {
  #special.special .special-copy {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 760px) {
  #special.special .special-copy {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  #special.special .special-preview {
    grid-template-columns: 1fr;
  }
}

/* Generated Tang art remains visible on list cards and opened records. */
#collection.collection .card-body {
  background:
    linear-gradient(135deg, rgba(244, 237, 224, .68), rgba(244, 237, 224, .76)),
    url("assets/generated/card-interior-tang-collage-v2.webp") center / cover no-repeat;
}

#collection.collection .object-card:nth-child(3n + 1) .card-body { background-position: center, 12% center; }
#collection.collection .object-card:nth-child(3n + 2) .card-body { background-position: center, 50% center; }
#collection.collection .object-card:nth-child(3n) .card-body { background-position: center, 88% center; }

.object-dialog .dialog-content {
  background:
    linear-gradient(135deg, rgba(255, 252, 244, .64), rgba(242, 236, 223, .72)),
    url("assets/generated/card-interior-tang-collage-v2.webp") center / cover no-repeat;
}

.object-dialog .dialog-media {
  background:
    linear-gradient(rgba(23, 21, 18, .5), rgba(23, 21, 18, .66)),
    url("assets/generated/card-interior-tang-collage-v2.webp") center / cover no-repeat;
}
