@font-face {
  font-family: StudySong;
  src: url("assets/study-serif.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
:root {
  --paper: #faf9f6;
  --ink: #363630;
  --quiet: #65665d;
  --ochre: #806348;
  --serif: StudySong, "Songti SC", STSong, "Noto Serif CJK SC", SimSun, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --edge: clamp(24px, 7vw, 130px);
  --chapter-gap: clamp(94px, 10vw, 155px);
  --bar: 62px;
  background: var(--paper);
  color: var(--ink);
  scroll-padding-top: calc(var(--bar) + 8px);
  scroll-behavior: smooth;
}
* { box-sizing: border-box }
body { margin: 0; font: 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased }
img { display: block; max-width: 100% }
h1,h2,h3,p,figure { margin: 0 }
button,a { -webkit-tap-highlight-color: transparent }
button { border: 0; border-radius: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer }
a { color: inherit; text-decoration: none }
[hidden] { display: none !important }
a:focus-visible, button:focus-visible { outline: 1px solid var(--ochre); outline-offset: 5px }
::selection { background: #ded9ca; color: #33352d }
.content-width,.top-inner { width: min(calc(100% - var(--edge) * 2), 1310px); margin-inline: auto }
.skip { position: fixed; z-index: 30; top: 0; left: var(--edge); padding: 8px 12px; background: var(--paper); transform: translateY(-140%) }
.skip:focus { transform: none }
/* Keep the bilingual wordmark centred as a unit. */
.cover { display: grid; place-items: center; height: 100vh; height: 100dvh; background: var(--paper) }
.cover h1 { margin: 0; font: 400 clamp(64px, 7.4vw, 116px)/1 var(--serif); letter-spacing: .19em; text-indent: .19em; color: #34362f }
.topbar { position: fixed; z-index: 10; inset: 0 0 auto; visibility: hidden; opacity: 0; pointer-events: none; background: rgb(250 249 246 / .97); transition: opacity .36s ease, visibility .36s }
.topbar.visible { visibility: visible; opacity: 1; pointer-events: auto }
.top-inner { height: var(--bar); display: flex; align-items: center; gap: 37px }
.identity { display: inline-flex; align-items: center; font: 400 23px/1.3 var(--serif); letter-spacing: .15em; white-space: nowrap }
.desktop-nav { display: flex; align-items: center; gap: clamp(18px,2.4vw,37px); margin-left: auto }
.desktop-nav a,.menu-trigger,.top-link { min-height: 44px; display: inline-flex; align-items: center; font: 14px/1.5 var(--sans); color: var(--quiet) }
.desktop-nav a[aria-current],.desktop-nav a:hover,.top-link:hover,.menu-trigger:hover { color: var(--ochre); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px }
.menu-trigger { gap: 8px }
.menu-icon { width: 16px; height: 7px; border-top: 1px solid; border-bottom: 1px solid }
.concept,.marks,.colour,.packaging { position: relative; padding-block: var(--chapter-gap) }
.section-tag,.route-kicker,.gallery-small { color: var(--ochre); font: 400 14px/1.6 var(--serif); letter-spacing: .14em }
h2,h3 { color: var(--ink); font-family: var(--serif); font-weight: 400; text-wrap: balance }
h2 { font-size: clamp(35px,4vw,66px); line-height: 1.4; letter-spacing: -.025em }
h3 { font-size: clamp(28px,2.8vw,45px); line-height: 1.5 }
.prose p,.route-copy>p,.pack-set>p { font: 400 clamp(16px,1.14vw,18px)/1.95 var(--serif); color: #585a51; letter-spacing: .025em }
.prose p+p { margin-top: 12px }
.concept-layout { display: grid; grid-template-columns: .82fr 1.18fr; column-gap: clamp(48px,8vw,130px); align-items: center }
.concept-text h2 { margin: 16px 0 24px }
.concept-text .prose { max-width: 25em }
.intro-spread { display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: clamp(30px,7vw,116px); margin: 17px 0 clamp(42px,5vw,80px) }
.ref { min-width: 0 }
.open-ref { display: block; width: 100%; cursor: zoom-in; background: transparent; overflow: hidden }
.open-ref img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1) }
.open-ref:hover img { transform: scale(1.025) }
.ref figcaption { margin-top: 10px; font: 13px/1.7 var(--serif); color: var(--quiet); letter-spacing: .045em }
.marks { background: #efeee7 }
.colour { padding-bottom: calc(var(--chapter-gap) * .6) }
.route { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: clamp(46px,8vw,130px); margin-top: clamp(55px,7vw,110px) }
.route+.route { margin-top: clamp(84px,11vw,172px) }
.route-copy { max-width: 28em }
.route h3,.pack-set h3 { margin: 9px 0 17px }
.route-images { display: grid; grid-template-columns: 1.25fr .78fr; align-items: end; gap: clamp(15px,2vw,32px) }
.bright .route-images { grid-column: 1; grid-row: 1; grid-template-columns: 1.35fr .64fr; align-items: start }
.bright { grid-template-columns: 1.22fr .78fr }
.bright .route-copy { grid-column: 2; grid-row: 1 }
.palette { margin: 24px 0 0; padding: 0; list-style: none; display: flex; gap: 8px; max-width: 315px }
.palette li { flex: 1; text-align: center }
.palette i { display: block; width: 100%; height: 24px; mask: url("assets/pigment.png") center/100% 100% no-repeat; -webkit-mask: url("assets/pigment.png") center/100% 100% no-repeat }
.palette li:nth-child(even) i { transform: rotate(176deg) }
.palette span { font: 13px/1.8 var(--serif); color: var(--quiet) }
.packaging { background: #f4f2ed }
.pack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(44px,8vw,132px) }
.pack-set { min-width: 0 }
.pack-set>p { margin-top: 24px }
.foot-inner { min-height: 105px; display: flex; gap: 21px; align-items: center }
.foot-inner p { font: 14px/1.6 var(--serif); color: var(--quiet); letter-spacing: .05em }
.top-link { margin-left: auto; font-family: var(--serif) }
body.modal-active { overflow: hidden }
dialog { border: 0; padding: 0; background: var(--paper); color: var(--ink); max-width: 100vw; max-height: 100dvh }
dialog::backdrop { background: rgb(52 53 45 / .38) }
#menu-dialog { margin: 0 0 0 auto; width: min(425px,100vw); height: 100dvh; padding: 20px clamp(25px,4vw,55px); overflow-y: auto }
.drawer-head,.gallery-top { display: flex; align-items: center; justify-content: space-between; gap: 20px }
.close-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-size: 14px }
.close-button:hover,.full-button:hover,.plate-controls button:hover { text-decoration: underline; text-underline-offset: 5px }
#menu-heading { margin: 44px 0 23px; font-size: 45px }
#menu-dialog nav a { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; padding: 15px 0 }
#menu-dialog nav span { font: 23px/1.5 var(--serif) }
#menu-dialog nav em { font: italic 15px/1.5 Georgia,serif; color: var(--quiet) }
#menu-dialog nav a:hover { color: var(--ochre) }
.full-button { font-size: 14px; min-height: 44px; margin-top: 25px; color: var(--quiet) }
#gallery { width: 100vw; height: 100dvh; margin: 0; overflow: hidden }
.gallery-shell { width: min(calc(100% - 2 * var(--edge)),1380px); height: 100%; margin: auto; display: flex; flex-direction: column; padding: clamp(15px,3vw,38px) 0 }
.gallery-top { flex-shrink: 0; padding-bottom: 18px }
.gallery-small { font-size: 13px }
.gallery-top h2 { font-size: clamp(23px,2vw,32px); margin-top: 4px }
#index-view { overflow: auto; overscroll-behavior: contain }
#gallery-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 27px 23px; padding: 6px }
.gallery-thumb { text-align: left; min-width: 0 }
.thumb-image { display: grid; place-items: center; aspect-ratio: 1.15; overflow: hidden }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain }
.gallery-thumb>span:last-child { display: block; text-align: center; font: 14px/1.7 var(--serif); margin-top: 9px }
.gallery-thumb:hover>span:last-child { text-decoration: underline; text-underline-offset: 4px }
#detail-view { flex: 1; min-height: 0; display: flex; flex-direction: column }
.plate-view { min-height: 0; flex: 1; display: grid; place-items: center; touch-action: pan-y }
.plate-view img { width: 100%; height: 100%; object-fit: contain; min-height: 0 }
.plate-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px }
#image-counter { font: 13px/1.5 var(--sans); color: var(--quiet); margin-right: 13px }
#image-caption { font: 400 16px/1.5 var(--serif) }
.plate-controls { display: flex; align-items: center; gap: 20px }
.plate-controls button { min-height: 44px; font: 14px/1.5 var(--serif); white-space: nowrap }
.motion-ready [data-reveal] { transition: opacity .85s ease, transform .95s cubic-bezier(.2,.68,.25,1) }
.motion-ready [data-reveal].waiting { opacity: 0; transform: translateY(18px) }
@media(max-width:800px) {
  :root { --edge: clamp(23px,5.8vw,44px); --bar: 54px; --chapter-gap: clamp(72px,12vw,98px) }
  .cover h1 { font-size: clamp(64px,11vw,84px) }
  .desktop-nav { display: none }
  .menu-trigger { margin-left: auto }
  .identity { font-size: 21px }
  .concept-layout,.intro-spread,.route,.bright,.pack-grid { grid-template-columns: 1fr }
  .concept-layout { gap: 29px }
  .concept-text h2 { margin: 12px 0 19px }
  .concept-text .prose,.prose,.route-copy { max-width: 35em }
  .intro-spread { gap: 18px; margin: 12px 0 32px }
  .ref figcaption { font-size: 12px; margin-top: 7px }
  .route { gap: 26px; margin-top: 43px }
  .bright .route-copy,.bright .route-images { grid-column: auto; grid-row: auto }
  .route-images,.bright .route-images { gap: 18px }
  .route+.route { margin-top: 70px }
  .pack-grid { gap: 56px }
  .palette { max-width: 270px }
  .foot-inner { min-height: 88px; gap: 12px }
  .foot-inner p { font-size: 12px }
  #gallery-grid { grid-template-columns: repeat(3,1fr); gap: 17px 12px }
  .plate-bar { flex-wrap: wrap; gap: 6px }
}
@media(max-width:480px) {
  .section-tag,.route-kicker { font-size: 13px }
  .cover h1 { font-size: clamp(59px,16vw,73px) }
  h2 { font-size: clamp(31px,8.5vw,39px) }
  #gallery-grid { grid-template-columns: repeat(2,1fr) }
  .gallery-shell { width: calc(100% - 34px); padding-block: 14px max(12px,env(safe-area-inset-bottom)) }
  .plate-controls { justify-content: space-between; width: 100% }
}
@media(prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto }
  *,*::before,*::after { transition: none !important; animation: none !important }
  .motion-ready [data-reveal].waiting { opacity: 1; transform: none }
}


.cover-lockup { display: grid; justify-items: center; row-gap: clamp(15px, 1.5vw, 25px) }
.cover-roman { margin: 0; font: 400 clamp(16px, 1.45vw, 23px)/1.1 Baskerville, "Times New Roman", serif; letter-spacing: .25em; text-indent: .25em; color: #59594f }

/* Every reference is a regular figure in the document, linked to its full-size view. */
.open-plate .open-ref { display: block; background: transparent; overflow: visible }
.open-plate .open-ref img { display: block; width: 100%; height: auto; transform: none; object-fit: contain }
.open-plate .open-ref:hover img { transform: none }
.open-plate .open-ref:hover + figcaption { color: var(--ink); text-decoration: underline; text-underline-offset: 4px }
.concept-layout { grid-template-columns: .76fr 1.24fr }
.reference-spread { display: grid; gap: clamp(22px,3.3vw,50px) }
.reference-row { display: flex; align-items: flex-start; gap: clamp(17px,2.4vw,38px) }
.reference-row .open-plate { flex: var(--image-ratio) 1 0%; min-width: 0 }
.concept-spread { margin-top: clamp(46px,6vw,90px) }
.concept-spread .reference-row:last-child { width: 67%; justify-self: end }
.route { row-gap: clamp(30px,4vw,60px) }
.route>.reference-spread { grid-column: 1/-1 }
.route-images { align-items: center }
.bright .route-images { align-items: center }
.pack-set .reference-spread { margin-top: 24px; gap: 24px }
.pack-set .reference-row { gap: clamp(14px,1.5vw,22px) }
.pack-set>p { margin-top: 5px }
.motion-ready .open-plate.arrived { animation: plate-in .75s cubic-bezier(.22,.55,.24,1) both }
@keyframes plate-in { from { opacity: .78; transform: translateY(9px) } to { opacity: 1; transform: none } }
@media(max-width:800px) {
  .concept-layout { grid-template-columns: 1fr }
  .concept-spread .reference-row:last-child { width: 100% }
  .reference-spread { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 15px; align-items: start }
  .reference-row { display: contents }
  .pack-set .reference-spread { gap: 22px 16px }
  .open-plate figcaption { font-size: 13px; line-height: 1.5 }
}
@media(max-width:480px) {
  .cover-lockup { row-gap: 15px }
}

/* The paper surface and the ink impressions extend across the chapter, outside the photographs. */
:root {
  --paper: #f6f5f0;
  --ink: #202d37;
  --quiet: #4b5f6f;
  --blue: #395c77;
  --ochre: var(--blue);
  --chapter-gap: clamp(84px, 10.3vw, 160px);
}
.cover {
  position: relative;
  isolation: isolate;
  background: #f4f2ea;
}
.material-plates {
  width: min(100%, 410px);
  justify-self: center;
  margin-top: clamp(18px, 4vw, 65px);
}
@media(max-width: 800px) {
  .material-plates { width: min(100%, 390px); margin-top: 0; justify-self: start }
}
.cover-lockup { row-gap: clamp(15px,1.35vw,24px) }
.cover h1 { color: #202e38; font-size: clamp(70px,8.25vw,130px); letter-spacing: .145em; text-indent: .145em }
.cover-roman { color: var(--blue); font: 400 clamp(17px,1.65vw,25px)/1.1 Arial,sans-serif; letter-spacing: .20em; text-indent: .20em }
.topbar { background: rgb(246 245 240 / .96) }
.concept, .marks, .colour, .packaging { isolation: isolate }
.cover::before,.concept::before,.marks::before,.colour::before,.packaging::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: url("assets/shanbai-grain.webp") repeat;
  mix-blend-mode: multiply;
  opacity: .10;
}
.cover::after,.concept::after,.colour::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: min(92vw,1450px);
  height: min(76vw,950px);
  background: url("assets/shanbai-contour.webp") right top / 100% 100% no-repeat;
  opacity: .60;
  pointer-events: none;
}
.cover::after {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: right center;
}
.cover-lockup, .cover-mood { z-index: 1 }
.concept { background: #f4f2ea }
.marks { background: #f0f4f5 }
.colour { background: #e9f0f5 }
.colour::after { background-image: url("assets/shanbai-water.webp"); opacity: .75; height: min(60vw,780px) }
.packaging { background: #f5f3ec }
.section-tag,.route-kicker,.gallery-small { color: var(--blue); letter-spacing: .15em }
h2 { font-size: clamp(38px,4.9vw,75px); line-height: 1.28; letter-spacing: -.03em }
.prose p,.route-copy>p,.pack-set>p { color: #3d505c }
.concept-layout { align-items: start; column-gap: clamp(35px,6.6vw,110px) }
.concept-text { padding-top: clamp(14px,4.2vw,67px) }
.concept-text .prose { max-width: 23em }
.concept-text h2 { margin: 15px 0 26px; font-size: clamp(32px,3.65vw,62px) }
.concept-spread { margin-top: clamp(58px,8vw,115px) }
.concept-spread .reference-row:first-child { width: 86%; justify-self: start }
.reference-spread { row-gap: clamp(30px,4.3vw,61px) }
.marks .reference-row:nth-child(even) { width: 87%; justify-self: end }
.marks .reference-row:nth-child(3) { width: 91%; justify-self: start }
.ref figcaption { color: var(--quiet); margin-top: 9px }
.colour .intro-spread { margin-bottom: clamp(65px,8vw,122px) }
.earth .reference-row:nth-child(2) { width: 86%; justify-self: end }
.bright .reference-row:last-child { width: 86%; justify-self: start }
.pack-set:nth-child(2) { margin-top: clamp(28px,5.2vw,85px) }
.pack-set .reference-spread { margin-top: 34px }
#gallery, #menu-dialog { background: #f6f5f0 }
@media(max-width:800px) {
  :root { --chapter-gap: clamp(73px,12vw,104px) }
  .cover h1 { font-size: clamp(62px,15vw,92px) }
  h2 { font-size: clamp(32px,9vw,50px) }
  .concept::after,.colour::after { width: 100%; height: min(109vw,620px); opacity: .42 }
  .concept-text { padding-top: 0 }
  .concept-text h2 { margin: 12px 0 17px; font-size: clamp(32px,9vw,50px) }
  .reference-spread { row-gap: 28px }
  .pack-set:nth-child(2) { margin-top: 0 }
  .colour .intro-spread { margin-bottom: 40px }
}

.cover-mood {
  position: absolute;
  left: 50%;
  bottom: max(clamp(20px, 4.5vh, 48px), env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  min-height: 44px;
  padding-inline: .72em;
  place-items: center;
  color: var(--blue);
  font: 400 15px/1.5 var(--serif);
  letter-spacing: .17em;
  text-indent: .17em;
  white-space: nowrap;
}
.cover-mood:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .45em }
