/* 生成图档案 — 一面展墙、一幅作品、一段停留。 */
:root {
  --night: #0c0c0b;
  --wall: #151411;
  --mat: #211e19;
  --gold: #b49a69;
  --gold-soft: #8d7957;
  --ivory: #efe8d8;
  --muted: #aaa393;
  --rule: rgba(190, 164, 113, .28);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont, sans-serif;
  --pad: clamp(20px, 4.2vw, 76px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: var(--night); color: var(--ivory); font: 15px/1.65 var(--sans); font-variant-numeric: tabular-nums; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #e1c68e; outline-offset: 5px; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ivory); color: var(--night); }
.skip-link:focus { top: 12px; }

.site-header { min-height: 88px; padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--rule); background: var(--night); position: relative; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 14px; font: 600 1.15rem/1.2 var(--serif); letter-spacing: .14em; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--gold-soft); border-radius: 50%; color: var(--gold); font: 1.25rem/1 var(--serif); letter-spacing: 0; }
.site-nav { display: flex; align-items: center; gap: clamp(26px, 4vw, 64px); margin-left: auto; }
.site-nav a { position: relative; padding: 34px 0 31px; color: var(--muted); font-size: .86rem; letter-spacing: .15em; transition: color .2s ease; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ivory); }
.site-nav a[aria-current]::after { content: ""; height: 1px; background: var(--gold); position: absolute; bottom: 0; left: 0; right: 0; }
.header-note { color: var(--gold-soft); border-left: 1px solid var(--rule); padding-left: 26px; margin-left: 10px; font-size: .72rem; letter-spacing: .06em; white-space: nowrap; }

/* 聚光只落在作品上，其余保持展厅的安静。 */
.hero { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse 42% 72% at 50% 18%, rgba(190,154,90,.17), transparent 78%), linear-gradient(90deg, #0e0e0c, #1a1814 48%, #0e0e0c); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .65; background: linear-gradient(90deg, transparent 5.5%, rgba(201,170,112,.13) 5.57%, transparent 5.65%, transparent 94.35%, rgba(201,170,112,.13) 94.43%, transparent 94.5%), linear-gradient(0deg, rgba(160,128,75,.09), transparent 23%); }
.hero-inner { position: relative; max-width: 1680px; min-height: min(800px, calc(100svh - 88px)); margin: auto; padding: 64px var(--pad) 78px; display: grid; grid-template-columns: minmax(210px, 1fr) minmax(0, 2.15fr) minmax(170px, .75fr); align-items: center; gap: clamp(22px, 3.2vw, 58px); }
.hero-copy { align-self: center; position: relative; z-index: 1; }
.hero-overline, .section-overline { margin: 0 0 28px; color: var(--gold); font-size: .73rem; letter-spacing: .28em; }
.hero-copy h1 { margin: 0; font: 500 clamp(3.5rem, 5.2vw, 6.7rem)/1.2 var(--serif); letter-spacing: -.04em; white-space: nowrap; }
.hero-copy h1 span { display: block; }
.hero-copy h1 span + span { margin-top: .1em; }
.hero-lead { max-width: 23em; margin: 30px 0 38px; color: #c1b9a8; font-size: .93rem; line-height: 2.1; }
.hero-enter { display: inline-flex; align-items: center; gap: 26px; padding: 0 0 12px; border-bottom: 1px solid var(--gold); color: var(--ivory); font-size: .86rem; letter-spacing: .14em; transition: color .2s ease, gap .2s ease; }
.hero-enter:hover { color: #dfc48d; gap: 36px; }
.enter-symbol { color: var(--gold); font-size: 1.2rem; line-height: 1; }
.hero-artwork { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.hero-frame { width: min(100%, 690px, calc(57vh * var(--art-ratio, 1))); appearance: none; display: block; position: relative; margin: 0; padding: clamp(10px, 1.2vw, 17px); border: 1px solid #89734d; background: #17140f; color: inherit; cursor: zoom-in; box-shadow: 0 0 0 6px #242019, 0 0 0 7px rgba(182,150,90,.53), 0 0 0 12px #100f0c, 0 36px 90px rgba(0,0,0,.7); transition: box-shadow .3s ease, transform .3s ease; }
.hero-frame:not(:disabled):hover { transform: translateY(-4px); box-shadow: 0 0 0 6px #28231b, 0 0 0 7px rgba(218,186,124,.8), 0 0 0 12px #100f0c, 0 45px 105px rgba(0,0,0,.76); }
.hero-frame:disabled { cursor: default; }
.hero-mat { display: block; width: 100%; aspect-ratio: var(--art-ratio, 1); overflow: hidden; border: 1px solid rgba(238,206,147,.2); background: linear-gradient(145deg, #302b23, #171613); }
.hero-mat img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.hero-mat img.revealed { animation: artwork-reveal .9s cubic-bezier(.18,.72,.28,1) both; }
@keyframes artwork-reveal { from { opacity: 0; filter: brightness(.4); transform: scale(.985); } to { opacity: 1; filter: brightness(1); transform: scale(1); } }
.frame-corner { position: absolute; width: 8px; height: 8px; border-color: #cfb47f; border-style: solid; pointer-events: none; }
.corner-tl { top: 3px; left: 3px; border-width: 1px 0 0 1px; }
.corner-tr { top: 3px; right: 3px; border-width: 1px 1px 0 0; }
.corner-bl { bottom: 3px; left: 3px; border-width: 0 0 1px 1px; }
.corner-br { bottom: 3px; right: 3px; border-width: 0 1px 1px 0; }
.hero-art-caption { margin: 34px 0 0; color: var(--gold-soft); font-size: .72rem; letter-spacing: .16em; text-align: center; }
.hero-art-caption span { margin: 0 12px; font-size: .62rem; }
.hero-side { align-self: center; max-width: 240px; padding-left: clamp(18px, 2vw, 34px); border-left: 1px solid var(--rule); }
.hero-rule { width: 22px; height: 1px; background: var(--gold); margin: 0 0 24px; }
.side-heading { margin: 0 0 6px; color: var(--gold); font-size: .73rem; letter-spacing: .22em; }
.side-preset { margin: 0 0 34px; font: 500 clamp(1.65rem, 2.4vw, 2.4rem)/1.4 var(--serif); overflow-wrap: anywhere; }
.hero-side dl { margin: 0; }
.hero-side dl div { margin: 0 0 17px; }
.hero-side dt { color: var(--gold-soft); font-size: .7rem; letter-spacing: .1em; }
.hero-side dd { margin: 4px 0 0; color: #d4ccba; font-size: .8rem; white-space: nowrap; }
.side-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; border-top: 1px solid var(--rule); margin-top: 42px; padding-top: 20px; color: var(--gold-soft); font-size: .72rem; }
.side-total span:first-child { width: 100%; }
.side-total strong { color: var(--ivory); font: 400 clamp(2.2rem, 3vw, 3.2rem)/1.2 var(--serif); }
.hero-baseline { position: absolute; bottom: 0; left: var(--pad); right: var(--pad); display: flex; align-items: center; gap: 18px; color: var(--gold-soft); font-size: .65rem; line-height: 1; }
.hero-baseline span:first-child, .hero-baseline span:last-child { flex: 1; height: 1px; background: var(--rule); }

/* 目录的节奏比网格密度更重要。 */
.collection { max-width: 1680px; margin: 0 auto; padding: clamp(84px, 9vw, 150px) var(--pad) 100px; }
.collection-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 50px; }
.section-overline { margin-bottom: 12px; }
.collection-heading h2 { margin: 0; font: 500 clamp(2.8rem, 5.2vw, 5.4rem)/1.25 var(--serif); letter-spacing: .035em; }
.heading-mark { display: inline-block; margin-left: .45em; vertical-align: top; color: var(--gold); font: .22em/2 var(--serif); }
.collection-intro { margin: 0 0 5px; max-width: 28em; color: var(--muted); font-size: .88rem; line-height: 2; }
.collection-intro span { color: var(--gold); }
.filters { position: sticky; top: 0; z-index: 20; display: flex; gap: 34px; align-items: stretch; min-height: 70px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: rgba(12,12,11,.96); backdrop-filter: blur(14px); overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--gold-soft) transparent; }
.filter { appearance: none; position: relative; flex: 0 0 auto; padding: 18px 0 17px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); text-align: left; white-space: nowrap; cursor: pointer; transition: color .2s ease, border-color .2s ease; }
.filter:hover { color: var(--ivory); }
.filter[aria-pressed="true"] { color: var(--ivory); border-bottom-color: var(--gold); }
.filter-name { font: 500 1.04rem/1.2 var(--serif); }
.filter-count { margin-left: 8px; color: var(--gold-soft); font: .7rem/1 var(--sans); }
.gallery-grid { display: flex; gap: clamp(20px, 2.8vw, 46px); align-items: flex-start; padding-top: clamp(42px, 5vw, 74px); }
.gallery-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(38px, 5vw, 74px); }
.tile { display: block; appearance: none; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: zoom-in; }
.tile-frame { display: block; padding: clamp(8px, 1vw, 14px); border: 1px solid rgba(185,155,100,.36); background: #1e1b16; box-shadow: 0 18px 38px rgba(0,0,0,.22); transition: border-color .25s ease, box-shadow .25s ease; }
.tile:hover .tile-frame, .tile:focus-visible .tile-frame { border-color: #cfb47f; box-shadow: 0 22px 48px rgba(0,0,0,.42), 0 0 0 1px rgba(207,180,127,.24); }
.tile-media { display: block; width: 100%; aspect-ratio: var(--ar, 1); overflow: hidden; background: var(--mat); }
.tile-media img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.tile-media img.loaded { opacity: 1; }
.tile-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 16px 1px 0; }
.tile-preset { min-width: 0; color: var(--ivory); font: 500 1.08rem/1.5 var(--serif); overflow-wrap: anywhere; }
.tile-facts { color: var(--gold-soft); font-size: .68rem; line-height: 1.5; text-align: right; white-space: nowrap; }
.sentinel { height: 1px; }
.gallery-end { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 100px; margin-top: 44px; border-top: 1px solid var(--rule); }
.status { margin: 0; color: var(--muted); font-size: .82rem; }
.load-more { appearance: none; padding: 11px 20px; border: 1px solid var(--gold-soft); background: transparent; color: var(--ivory); font-size: .8rem; cursor: pointer; transition: background .2s ease; }
.load-more:hover { background: rgba(180,154,105,.15); }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; min-height: 138px; padding: 34px var(--pad); border-top: 1px solid var(--rule); color: var(--muted); font-size: .76rem; }
.footer-name { color: var(--ivory); font-family: var(--serif); font-size: 1rem; letter-spacing: .06em; }
.footer-name:first-letter { color: var(--gold); }
.site-footer a { color: var(--gold); }
.site-footer a:hover { color: var(--ivory); }

/* 灯箱延续展厅，不把画面放进一块白色软件面板。 */
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 80px clamp(24px, 7vw, 110px) 66px; background: rgba(7,7,7,.985); }
.lb-top { position: absolute; left: clamp(20px, 4vw, 64px); right: clamp(20px, 4vw, 64px); top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.lb-counter { color: var(--gold); font: .78rem/1 var(--sans); letter-spacing: .12em; }
.lb-close { appearance: none; padding: 7px 0 7px 18px; border: 0; background: none; color: var(--ivory); cursor: pointer; font-size: .86rem; }
.lb-close span { margin-left: 10px; color: var(--gold); font-size: 1.5rem; vertical-align: -.08em; }
.lb-close:hover { color: var(--gold); }
.lb-figure { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%; min-width: 0; margin: 0; }
.lb-frame { position: relative; width: min(100%, 1180px, calc((100dvh - 220px) * var(--ar, 1))); aspect-ratio: var(--ar, 1); min-height: 0; border: 1px solid rgba(180,154,105,.42); padding: 8px; background: var(--mat); box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.lb-frame img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.lb-frame img.ready { opacity: 1; transition: opacity .24s ease; }
.lb-hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .8rem; opacity: 0; pointer-events: none; }
.lb-frame[data-loading="1"] .lb-hint { opacity: 1; }
.lb-caption { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 26px; width: min(100%, 1180px); padding-top: 8px; border-top: 1px solid var(--rule); }
.lb-preset { color: var(--ivory); font: 500 1.2rem/1.5 var(--serif); }
.lb-meta { color: var(--muted); font-size: .76rem; }
.lb-nav { appearance: none; position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 45px; height: 60px; padding: 0; border: 1px solid var(--rule); background: rgba(15,14,12,.8); color: var(--ivory); font: 2rem/1 var(--serif); cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.lb-nav:hover { border-color: var(--gold); color: var(--gold); }
.lb-prev { left: clamp(12px, 3vw, 50px); }
.lb-next { right: clamp(12px, 3vw, 50px); }
.lb-help { position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; text-align: center; color: var(--gold-soft); font-size: .68rem; letter-spacing: .07em; }

@media (max-width: 1180px) {
  .hero-inner { grid-template-columns: minmax(210px, .8fr) minmax(0, 1.3fr); min-height: 0; padding-top: 90px; }
  .hero-side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: start; gap: 14px; max-width: none; padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--rule); }
  .hero-rule { display: none; }
  .side-heading { grid-column: 1; }
  .side-preset { grid-column: 1; margin: -6px 0 0; }
  .hero-side dl { grid-column: 2; grid-row: 1 / 3; display: flex; gap: 26px; }
  .side-total { grid-column: 3; grid-row: 1 / 3; margin: 0; padding: 0; border: 0; }
  .header-note { display: none; }
}
@media (max-width: 760px) {
  .site-header { min-height: 70px; }
  .brand { font-size: .95rem; gap: 10px; letter-spacing: .06em; }
  .brand-mark { width: 30px; height: 30px; font-size: 1rem; }
  .site-nav { gap: 18px; }
  .site-nav a { padding: 25px 0 22px; font-size: .77rem; }
  .hero-inner { display: flex; flex-direction: column; align-items: stretch; gap: 48px; padding: 65px var(--pad) 60px; }
  .hero-copy h1 { font-size: clamp(3.25rem, 10vw, 5rem); }
  .hero-lead { margin: 22px 0 26px; }
  .hero-artwork { width: 100%; }
  .hero-frame { width: min(100%, 570px, calc(48vh * var(--art-ratio, 1))); }
  .hero-side { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
  .hero-side dl { grid-column: 1; grid-row: 3; display: block; }
  .side-total { grid-column: 2; grid-row: 2 / 4; align-self: start; }
  .collection-heading { display: block; margin-bottom: 34px; }
  .collection-intro { margin-top: 22px; }
  .gallery-grid { gap: 22px; }
  .gallery-col { gap: 42px; }
  .tile-caption { flex-direction: column; gap: 2px; }
  .tile-facts { text-align: left; }
  .lightbox { padding: 72px 20px 66px; }
  .lb-frame { width: min(100%, calc((100dvh - 210px) * var(--ar, 1))); }
  .lb-nav { top: auto; bottom: 18px; transform: none; width: 42px; height: 42px; }
  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
  .lb-help { bottom: 29px; pointer-events: none; }
}
@media (max-width: 520px) {
  .site-nav a:first-child { display: none; }
  .hero-overline { margin-bottom: 20px; }
  .hero-copy h1 { font-size: clamp(2.95rem, 12vw, 4rem); }
  .hero-lead { max-width: 27em; font-size: .83rem; }
  .hero-art-caption { font-size: .66rem; }
  .side-preset { font-size: 1.7rem; }
  .side-total strong { font-size: 2.1rem; }
  .collection { padding-top: 82px; padding-bottom: 60px; }
  .collection-heading h2 { font-size: 2.85rem; }
  .filters { gap: 26px; min-height: 62px; }
  .filter { padding: 16px 0 13px; }
  .gallery-grid { display: block; max-width: 510px; margin: 0 auto; }
  .gallery-col { width: 100%; }
  .tile-caption { flex-direction: row; }
  .tile-facts { text-align: right; }
  .gallery-end { align-items: flex-start; flex-direction: column; justify-content: center; gap: 12px; padding: 20px 0; }
  .site-footer { flex-direction: column; align-items: flex-start; min-height: 0; padding-top: 36px; padding-bottom: 48px; }
  .lb-frame { width: min(100%, calc((100dvh - 225px) * var(--ar, 1))); }
  .lb-caption { flex-direction: column; }
  .lb-help { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .tile-media img, .hero-mat img { opacity: 1; }
}
