@charset "UTF-8";

html { scroll-behavior: smooth; scroll-padding-top: 0; }
body { overflow-x: hidden; }
html[data-entry="pending"] .gallery,
html[data-entry="pending"] .collection-index { visibility: hidden; }
#world { --hero-progress: 0; }
#world .art-window {
  translate: 0 calc(var(--hero-progress) * -34px);
  scale: calc(1 + var(--hero-progress) * .035);
}
#world .copy { translate: 0 calc(var(--hero-progress) * -45px); }
#world:after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 110px;
  background: linear-gradient(transparent, #090806);
  pointer-events: none;
  z-index: 2;
}

.gallery {
  height: 880svh;
  position: relative;
  background: #100d13;
}
.gallery-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 360px;
  overflow: hidden;
  isolation: isolate;
  background: #0a090e;
  color: #f0dfc7;
  --gallery-progress: 0;
}

.gallery-ambient,
.gallery-axis,
.gallery-helix { position: absolute; inset: 0; }
.gallery-ambient {
  background:
    radial-gradient(ellipse at 72% 1%, #73502c42, transparent 55%),
    radial-gradient(ellipse at 72% 63%, #53361c32, transparent 46%),
    radial-gradient(ellipse at 2% 86%, #39281732, transparent 54%),
    #0a090e;
}
.gallery-axis {
  background: radial-gradient(ellipse 18% 75% at 61% 49%, #8c592322, #7150240c 58%, transparent);
  pointer-events: none;
}
.gallery-axis canvas { display: block; width: 100%; height: 100%; }
.gallery-pin::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: linear-gradient(180deg, #0b090ecc, transparent 24%, transparent 70%, #0b090ee6);
}

.gallery-header {
  top: clamp(18px, 4vh, 44px);
  z-index: 40;
}
.gallery-header nav {
  gap: clamp(9px, 1.4vw, 24px);
  padding: 9px 20px;
  border: 1px solid #c6aa803b;
  border-radius: 99px;
  background: #100e15cc;
}
.gallery-header nav button { font-size: 13px; letter-spacing: .16em; }
.gallery-header nav small { font-size: 7px; }
.gallery-header nav button::after { bottom: -4px; }
.gallery-header nav button:first-child::after { transform: scaleX(1); }
.gallery-header .brand { font-size: clamp(16px, 1.75vw, 26px); }
.gallery-header .menu { border: 0; padding-left: 0; }

.gallery-plate {
  position: absolute;
  top: 45.5%;
  left: 44%;
  width: min(66%, 89svh, 1100px);
  aspect-ratio: 16 / 10;
  display: block;
  padding: 0;
  transform-origin: 0 0;
  cursor: pointer;
}
.gallery-plate[hidden] { display: none; }
.gallery-face {
  position: absolute;
  inset: 0;
  display: grid;
  border: 1px solid #d9bd9670;
  border-radius: clamp(10px, 1.7vw, 26px);
  overflow: hidden;
  background: radial-gradient(ellipse at 64% 20%, #29231dcc, #100e0ded 65%);
  box-shadow: 0 18px 45px #0605099e, inset 0 0 30px #e4ae731a;
  text-align: start;
  transition: scale 320ms cubic-bezier(.22,.72,.26,1), border-color 220ms;
  animation: gallery-float 6.8s ease-in-out var(--float-delay, 0s) infinite paused;
  pointer-events: none;
}
.gallery-pin[data-visible="true"] .gallery-face { animation-play-state: running; }
html:has(.artwork-dialog[open], .collection-dialog[open]) .gallery-face { animation-play-state: paused; }
@keyframes gallery-float {
  0%, 100% { translate: 0 3px; }
  48% { translate: 0 -5px; }
}
.gallery-face img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2.5% 4% 6%;
  pointer-events: none;
}
.gallery-face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, #0b0810e8, transparent 29%), linear-gradient(125deg, #e6d9e01c, transparent 37%);
}
.gallery-plate-title {
  align-self: end;
  justify-self: start;
  z-index: 1;
  margin: 0 4.6% 3.4%;
  font-size: clamp(13px, 1.7vw, 26px);
  letter-spacing: .08em;
  color: #faecd5;
  text-shadow: 0 1px 6px #0b0710;
  pointer-events: none;
}
.gallery-plate:focus-visible .gallery-face { border-color: #fff0cd; }
.gallery-plate:focus-visible { outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .gallery-plate:hover .gallery-face {
    scale: 1.045;
    border-color: #fff0cd;
  }
}

.gallery-title-block, .gallery-side-copy, .gallery-controls, .gallery-scroll-hint {
  position: absolute;
  z-index: 35;
}
.gallery-title-block {
  left: var(--edge);
  bottom: clamp(67px, 10.5svh, 126px);
  pointer-events: none;
  text-shadow: 0 2px 20px #0b080f;
}
.gallery-title-block h2 {
  margin: 0;
  font: 400 clamp(34px, 4.5vw, 75px)/1.06 "STKaiti", "KaiTi", "Songti SC", "SimSun", serif;
  letter-spacing: .1em;
}
.gallery-title-block p { margin: .65rem 0 0; font-size: 13px; letter-spacing: .15em; color: #cab495; }
.gallery-side-copy {
  right: var(--edge);
  bottom: clamp(80px, 14svh, 160px);
  text-align: right;
  pointer-events: none;
}
.gallery-side-copy p { margin: 0 0 .5rem; }
.gallery-counter { font: 14px Georgia, serif; letter-spacing: .16em; color: #cfb188; }
#gallery-work-name { max-width: 18ch; margin-inline-start: auto; color: #faecd5; font-size: 14px; }
.gallery-enter {
  padding: 8px 0 2px;
  border-bottom: 1px solid #e6c99d66;
  color: #dfc5a1;
  font-size: 12px;
  pointer-events: auto;
}
.gallery-controls {
  right: var(--edge);
  bottom: 30px;
  display: flex;
  gap: 8px;
}
.gallery-controls button {
  width: 41px;
  height: 41px;
  border: 1px solid #b89b6e70;
  border-radius: 50%;
  background: #141118a8;
  font: 20px Georgia, serif;
}
.gallery-controls button:disabled { opacity: .31; cursor: default; }
.gallery-scroll-hint {
  left: 50%;
  bottom: 30px;
  margin: 0;
  transform: translateX(-50%);
  color: #bca98f;
  font-size: 12px;
  letter-spacing: .15em;
  white-space: nowrap;
  pointer-events: none;
}
.gallery-scroll-hint span { margin-left: .35em; color: #ead0ab; }
.gallery-scroll-progress {
  position: absolute;
  inset: auto var(--edge) 13px;
  height: 1px;
  z-index: 35;
  background: #d2b58a33;
}
.gallery-scroll-progress span {
  display: block;
  height: 100%;
  transform: scaleX(var(--gallery-progress));
  transform-origin: left;
  background: #d9b77e;
}

.collection-index{background:linear-gradient(#090806,#0e0c09 35%,#090806);padding:95px var(--edge) 32px;color:#d2bd98;position:relative;isolation:isolate}.collection-intro{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:14px 30px;margin-bottom:44px}.collection-intro>p{font:9px Georgia;letter-spacing:3px;color:#9e8760;grid-column:1/-1}.collection-intro h2{font-size:clamp(26px,3.3vw,48px);font-weight:400;letter-spacing:4px;margin:0}.collection-intro>span{font-size:11px;letter-spacing:2px;color:#968165;justify-self:end}.collection-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:38px 28px}.collection-card{display:block;padding:0;text-align:left;min-width:0}.collection-media,.artwork-media{display:block;aspect-ratio:4/3;background:linear-gradient(140deg,#b8985b0a,#1b181133);border:1px solid #af925e45;position:relative;overflow:hidden}.media-corners{position:absolute;inset:10px;border:1px solid #c4a76c14}.reserved-label{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;letter-spacing:2px;color:#8e7c5d}.reserved-label b{font-size:26px;font-weight:400;color:#b79a68;margin-bottom:15px;opacity:.55}.reserved-label small{font:7px Georgia;letter-spacing:1.3px;margin-top:9px;color:#6e624e}.collection-caption{display:flex;align-items:center;justify-content:space-between;font-size:10px;letter-spacing:1.5px;padding-top:13px;color:#ae9873}.collection-caption>span:last-child{font-size:20px}.collection-card:hover .collection-media{border-color:#d6b778;background:#b9986211}.collection-card:hover .collection-caption{color:#e1c494}.collection-media img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}.collection-end{margin-top:70px;padding-top:26px;border-top:1px solid #a486502e;display:flex;justify-content:space-between;font-size:9px;letter-spacing:2px;color:#8d795a}.collection-end>span{font:8px Georgia;letter-spacing:2px}
html.collection-open{overflow:hidden}
.collection-dialog{position:fixed;inset:0;margin:0;padding:0;width:100vw;height:100svh;max-width:100vw;max-height:100svh;border:0;background:#090806;overflow-y:auto;overscroll-behavior:contain}
.collection-dialog:not([open]){display:none}
.collection-dialog[open]{animation:appear .3s ease both}
.collection-dialog::backdrop{background:#090806}
.collection-close{position:fixed;top:25px;left:var(--edge);z-index:3;background:#090806e8;border:1px solid #b99b6055;padding:11px 17px;font-size:11px;letter-spacing:2px;color:#d4bb8f}
.collection-dialog .collection-index{min-height:100%;padding-top:100px}
@media(max-width:700px){.collection-close{top:21px;font-size:10px;padding:10px 14px}.collection-dialog .collection-index{padding-top:90px}}
.collection-dialog[open]{animation:collection-fade .25s ease both}
@keyframes collection-fade{from{opacity:0}to{opacity:1}}

.artwork-dialog {
  inset: 0;
  margin: auto;
  width: min(1040px, 96vw);
  max-width: 96vw;
  max-height: 94svh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(18px, 3.5vw, 46px);
  border: 1px solid var(--qilu-line, #b9a17c50);
  border-radius: 3px;
  color: var(--qilu-ink, #f0e7d6);
  background: linear-gradient(155deg, #171713, #0b0c0b 65%);
  box-shadow: 0 24px 100px #000a;
  scrollbar-color: #8d7c5c #101110;
}
.artwork-dialog::backdrop { background: #050605e8; }
.artwork-dialog[open]::backdrop { animation: collection-fade 500ms both; }
.artwork-dialog.artwork-closing { background: #0b0c0b20; border-color: transparent; }
.artwork-dialog.artwork-closing::backdrop { animation: artwork-backdrop-out 290ms both; }
.artwork-dialog.artwork-closing > :not(.artwork-media) { visibility: hidden; }
@keyframes artwork-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
.artwork-close {
  display: block;
  margin: 0 0 20px;
  border-bottom: 1px solid #d0ac786e;
  padding: 6px 1px;
  font-size: 13px;
  color: #d6b783;
}
.artwork-kicker { color: #c5a677; font: 11px Georgia, serif; letter-spacing: .18em; }
.artwork-media {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 57svh;
  background: #090a09;
  border: 1px solid #b9a17c35;
  border-radius: 2px;
  overflow: hidden;
  transform-origin: top left;
}
.collection-media img, .artwork-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4%;
}
.artwork-dialog h2 {
  margin: 20px 0 6px;
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 400;
}
.artwork-description, .artwork-source { color: var(--qilu-muted, #c7bba8); font-size: 13px; }
.artwork-dialog-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px solid #d1ad7c35;
  color: #dcc19e;
  font-size: 13px;
}

@media (max-width: 700px) {
  .gallery { height: 730svh; }
  .gallery-header nav { display: none; }
  .gallery-header .menu { margin-left: auto; }
  .gallery-plate { top: 47%; left: 48%; width: 84%; aspect-ratio: 4 / 3; }
  .gallery-face img { padding: 1% 2% 8%; }
  .gallery-title-block { bottom: 105px; }
  .gallery-title-block h2 { font-size: clamp(25px, 7vw, 44px); }
  .gallery-title-block p { font-size: 11px; }
  .gallery-side-copy { bottom: 87px; }
  .gallery-counter, #gallery-work-name { font-size: 11px; }
  #gallery-work-name { max-width: 11ch; }
  .gallery-enter { font-size: 11px; }
  .gallery-scroll-hint { left: var(--edge); transform: none; }
  .collection-intro { display: block; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px 14px; }
  .collection-caption { font-size: 9px; letter-spacing: .04em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #world .art-window { translate: none; scale: 1; }
  #world .copy { translate: none; }
  .gallery { height: auto; }
  .gallery-pin { position: relative; }
  .gallery-plate { transform: translate(-50%, -50%) !important; opacity: 1 !important; transition: none; }
  .gallery-face { animation: none; transition: none; }
  .gallery-axis, .gallery-scroll-hint { display: none; }
  .collection-dialog[open], .artwork-dialog[open]::backdrop { animation: none; }
}

/* Reserve a scroll passage inside the gallery's existing sticky stage. */
.gallery {height:1140svh}
.gallery-time-tone {
 position:absolute;inset:0;z-index:31;pointer-events:none;
 background:radial-gradient(ellipse at 48% 38%,#59402025,transparent 65%),#100e0e;
 opacity:var(--exit-gold,0);
}
.gallery-outro {position:absolute;inset:0;z-index:35;pointer-events:none;color:#f4e9d7}
.gallery-outro article {
 position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
 padding:6svh 7vw;text-align:center;
}
.gallery-outro-moment {opacity:var(--exit-moment,0);transform:translateY(var(--exit-moment-y,24px))}
.gallery-outro-time {opacity:var(--exit-time,0);transform:translateY(var(--exit-time-y,24px))}
.gallery-outro .outro-eyebrow {margin:0 0 clamp(22px,4svh,44px);font:12px Georgia,serif;letter-spacing:.34em;color:#dfbb78}
.gallery-outro h2 {margin:0 0 clamp(24px,4svh,45px);font:400 clamp(28px,4.8vw,76px)/1.35 "Songti SC",SimSun,serif;letter-spacing:.07em}
.gallery-outro .outro-body {margin:0;font:400 clamp(15px,1.7vw,26px)/1.95 "Songti SC",SimSun,serif;letter-spacing:.055em;color:#d7c8ad}
.outro-rule {display:block;width:clamp(80px,16vw,230px);height:1px;margin-top:clamp(24px,5svh,52px);background:linear-gradient(90deg,transparent,#b89254,transparent)}
.gallery-pin.is-ending .gallery-helix {opacity:var(--exit-art,1);translate:0 var(--exit-card-y,0px);pointer-events:none}
.gallery-pin.is-ending :is(.gallery-header,.gallery-title-block,.gallery-side-copy,.gallery-controls,.gallery-scroll-hint,.gallery-scroll-progress) {opacity:var(--exit-ui,1);pointer-events:none}
.gallery-pin.is-ending .gallery-axis {background:none}
@media(max-width:600px) {
 .gallery-outro h2 {max-width:13em;font-size:clamp(28px,7.4vw,42px);letter-spacing:.025em}
 .gallery-outro .outro-body {font-size:14px;line-height:2}
 .gallery-outro .outro-eyebrow {font-size:10px;letter-spacing:.2em}
}
@media(prefers-reduced-motion:reduce) {
 .gallery {height:auto}
 .gallery-pin {height:auto;min-height:100svh;overflow:visible}
 .gallery-outro {margin-top:100svh}
 .gallery-outro {position:relative;height:auto;background:#100e0e}
 .gallery-outro article {position:relative;opacity:1;transform:none;padding:64px 7vw}
 .gallery-outro-moment {display:none!important}
}
.artwork-facts { margin:24px 0;color:var(--qilu-ink, #f0e7d6); }
.artwork-facts>div { display:grid;grid-template-columns:48px minmax(0,1fr);gap:16px;padding:16px 0;border-top:1px solid #c4a76c26; }
.artwork-facts dt { color:#ac956f;font-size:14px;line-height:1.9; }
.artwork-facts dd { margin:0;font-size:16px;line-height:1.9;letter-spacing:.025em;overflow-wrap:anywhere; }
.artwork-dialog h2 { overflow-wrap:anywhere;line-height:1.5; }
.gallery-plate-title { overflow-wrap:anywhere; }
.reserved-label[hidden] { display:none; }
