@font-face {
  font-family: "Exhibit Serif";
  src: url("assets/serif-tc.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Exhibit Sans";
  src: url("assets/sans-tc.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
:root {
  --navy: #111b2e;
  --blue: #172440;
  --night-text: #f6eee0;
  --night-muted: #c3c8cf;
  --gold: #d3b77c;
  --antique: #73542b;
  --paper: #f6f1e7;
  --ink: #19263b;
  --muted: #4c5360;
  --seal: #92332e;
  --rule: rgba(44, 48, 51, .23);
  --night-rule: rgba(231, 209, 164, .25);
  --display: "Exhibit Serif", "Noto Serif TC", "Songti TC", PMingLiU, serif;
  --sans: "Exhibit Sans", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color-scheme: light;
  font-family: var(--sans);
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--navy); color: var(--night-text); }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid #c38a34; outline-offset: 5px; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3, blockquote { font-weight: 400; }
p { line-height: 1.95; }
.shell { width: min(100% - 104px, 1232px); margin-inline: auto; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 20; background: var(--paper); color: var(--ink); padding: 12px 17px; transform: translateY(-160%); }
.skip:focus { transform: none; }
.site-header { background: #111a2c; border-bottom: 1px solid var(--night-rule); }
.header-row { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; justify-self: start; font-family: var(--display); font-size: 20px; letter-spacing: .12em; white-space: nowrap; }
.brand-seal { height: 33px; width: 31px; display: grid; place-items: center; border: 1px solid #bd9f62; letter-spacing: 0; color: var(--gold); font-size: 19px; }
nav { display: flex; align-items: center; gap: clamp(25px, 4vw, 66px); }
nav a, .header-download { min-height: 42px; display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--night-muted); white-space: nowrap; }
nav a:hover, .header-download:hover { color: #fff4d6; }
.header-download { justify-self: end; min-height: 38px; padding-inline: 14px; border: 1px solid var(--night-rule); color: var(--night-text); }
.header-download span { color: var(--gold); }
.hero {
  background-color: var(--navy);
  background-image: linear-gradient(180deg, #111b2e12 0%, #111b2e22 52%, #111b2eec 100%), url("assets/indigo-ground.webp");
  background-position: center, center top;
  background-size: cover;
}
.hero-inner { padding-top: clamp(44px, 6.3vw, 96px); }
.hero-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: clamp(28px, 4vw, 53px); }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .26em; line-height: 1.6; margin-bottom: 13px; }
h1 { font-family: var(--display); font-size: clamp(68px, 10.3vw, 152px); letter-spacing: .12em; line-height: 1.13; margin-left: -.06em; }
.hero-quote { padding: 6px 0 8px 20px; border-left: 1px solid #a88d60; margin-bottom: 2px; }
.hero-quote blockquote { font-family: var(--display); font-size: clamp(18px, 2.25vw, 31px); letter-spacing: .06em; white-space: nowrap; }
.hero-quote p { color: var(--night-muted); font-size: 12px; margin-top: 10px; letter-spacing: .12em; }
.image-action { position: relative; display: block; overflow: hidden; isolation: isolate; }
.image-action img { transition: transform .45s ease; }
.image-action:hover img { transform: scale(1.025); }
.panorama-frame { border: 1px solid #95805b; background: #253d71; box-shadow: 0 18px 80px #0b13268f; }
.panorama-frame img { width: 100%; height: auto; }
.view-image { position: absolute; bottom: 14px; right: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 12px; padding: 10px 13px; background: #111b2ef0; border: 1px solid #e8d4ad70; color: #fff6e6; font-size: 12px; letter-spacing: .05em; }
.view-image span { color: var(--gold); }
.panorama-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 18px 0 31px; color: var(--night-muted); font-size: 12px; letter-spacing: .14em; }
.panorama-caption a { color: var(--gold); padding-block: 5px; white-space: nowrap; }
.panorama-caption a:hover { text-decoration: underline; text-underline-offset: .35em; }
.paper-section { background: var(--paper); color: var(--ink); }
.paper-section .eyebrow { color: var(--antique); }
h2 { font-family: var(--display); font-size: clamp(37px, 5.4vw, 76px); line-height: 1.2; letter-spacing: .04em; }
.lead { font-size: clamp(17px, 1.55vw, 22px); line-height: 1.8; }
.reading, .ink-section, .character-section, .signature-section { padding-block: clamp(66px, 10vw, 142px); }
.reading-layout { display: grid; grid-template-columns: .81fr 1fr; align-items: center; gap: clamp(36px, 7.5vw, 112px); }
.reading-copy h2, .ink-copy h2 { margin-bottom: 28px; }
.reading-copy p + p, .ink-copy p + p { margin-top: 17px; }
.reading-copy p:not(.eyebrow):not(.lead), .character-text p { color: var(--muted); }
.reading-demo { width: 100%; min-width: 0; padding: clamp(14px, 3vw, 38px); border: 1px solid #9b87655e; background: #f9f5ec; }
.reading-direction { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding-bottom: 16px; color: var(--antique); font-size: 12px; letter-spacing: .15em; }
.verse-board { display: grid; direction: rtl; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid #cabda8; }
.verse-line { display: grid; grid-template-rows: repeat(7, minmax(0, 1fr)); direction: ltr; border: 0; border-inline-start: 1px solid #d9cfbd; background: transparent; color: var(--ink); cursor: pointer; padding: 0; font-family: var(--display); font-size: clamp(16px, 2.35vw, 31px); line-height: 1; }
.verse-line:first-child { border-inline-end: 0; }
.verse-line:last-child { border-inline-start: 0; }
.verse-line span { display: grid; place-items: center; width: 100%; aspect-ratio: 1.15; }
.verse-line span + span { border-top: 1px solid #d6cbb6; }
.verse-line:hover { background: #e6d9c1; }
.verse-line[aria-pressed="true"] { background: #243760; color: #fff1d7; }
.verse-line[aria-pressed="true"] span + span { border-color: #e4d4b942; }
.verse-line:focus-visible { outline-offset: -3px; position: relative; z-index: 1; }
.verse-active { font-size: 13px; letter-spacing: .06em; min-height: 22px; padding-top: 15px; color: var(--muted); }
.ink-section { background: #171f32; }
.ink-layout { display: grid; grid-template-columns: 1.12fr 1fr; align-items: center; gap: clamp(34px, 7vw, 102px); }
.ink-photo { min-width: 0; }
.ink-image { display: grid; place-items: center; background: #101925; border: 1px solid var(--night-rule); height: clamp(385px, 49vw, 690px); }
.ink-image img { height: 100%; width: 100%; object-fit: cover; object-position: center; }
.ink-photo figcaption { margin-top: 15px; font-size: 12px; letter-spacing: .09em; color: var(--night-muted); }
.ink-copy p:not(.eyebrow):not(.lead) { color: var(--night-muted); }
.color-note { display: flex; align-items: center; gap: 13px; margin-block: 23px; padding-block: 15px; border-block: 1px solid var(--night-rule); }
.color-swatch { display: block; width: 41px; aspect-ratio: 1; border: 1px solid #aabee6; background: #404884; flex: 0 0 auto; }
.color-name, .color-code { display: block; }
.color-name { font-family: var(--display); font-size: 19px; letter-spacing: .11em; }
.color-code { color: var(--night-muted); font-size: 11px; margin-top: 4px; }
.photo-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.photo-switch button { color: var(--night-text); font-size: 12px; min-height: 43px; padding: 9px 16px; background: transparent; border: 1px solid var(--night-rule); cursor: pointer; }
.photo-switch button[aria-pressed="true"], .photo-switch button:hover { background: #e6d1a7; color: var(--navy); border-color: #e6d1a7; }
.section-title { margin-bottom: clamp(28px, 4.7vw, 58px); }
.character-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(18px, 4vw, 55px); }
.character { min-width: 0; border-top: 1px solid #ae935e; }
.character-image { height: clamp(158px, 24vw, 320px); display: grid; place-items: center; background: #202b55; }
.character-title-image { background: #1d2e52; }
.character-image img { height: 100%; width: 100%; object-fit: contain; }
.character-text { padding: 20px 3px 0; }
.character-text h3 { font-family: var(--display); font-size: clamp(40px, 5vw, 63px); line-height: 1.15; }
.character-text small { font-family: var(--sans); font-size: 12px; letter-spacing: .15em; color: var(--antique); vertical-align: middle; margin-left: 7px; }
.character-text p { margin-top: 14px; max-width: 39em; }
.signature-section { background: #eee6d8; color: var(--ink); }
.signature-layout { display: grid; grid-template-columns: 1fr .64fr; align-items: center; gap: clamp(35px, 13vw, 165px); }
.signature-copy .eyebrow { color: var(--seal); }
.signature-copy h2 { color: var(--seal); margin-bottom: 24px; font-size: clamp(55px, 7.6vw, 104px); letter-spacing: .13em; }
.signature-copy p:not(.eyebrow) { color: var(--muted); }
.signature-copy blockquote { font-family: var(--display); color: var(--seal); font-size: clamp(21px, 3.3vw, 45px); line-height: 1.52; border-left: 2px solid #a75249; padding-left: 21px; margin-block: 30px; }
.signature-plate { width: min(100%, 350px); justify-self: center; }
.seal-image { background: white; border: 1px solid #aa81745c; }
.seal-image img { width: 100%; height: auto; }
.signature-plate figcaption { padding-top: 13px; color: var(--muted); font-size: 12px; letter-spacing: .13em; }
.site-footer { background: #111a2c; padding-block: 44px; }
.footer-layout { display: grid; grid-template-columns: minmax(130px, .75fr) 1fr 1fr; gap: 24px; align-items: start; }
.footer-title { font-family: var(--display); font-size: 25px; letter-spacing: .12em; }
.footer-layout p, .file-info { color: var(--night-muted); font-size: 12px; }
.footer-layout p { margin-top: 6px; }
.footer-actions { display: grid; justify-items: start; gap: 9px; justify-self: center; }
.download { display: inline-flex; gap: 10px; padding: 11px 15px; border: 1px solid var(--night-rule); color: var(--night-text); font-size: 13px; }
.download:hover { background: #243452; }
.download span { color: var(--gold); }
.references { display: grid; gap: 8px; justify-self: end; color: var(--night-muted); font-size: 12px; line-height: 1.65; }
.references a:hover { color: var(--night-text); text-decoration: underline; }
.dialog-open { overflow: hidden; }
dialog { width: min(96vw, 1320px); max-width: none; max-height: 97dvh; margin: auto; padding: 10px 20px 16px; border: 1px solid #ad936a; background: #111b2e; color: var(--night-text); overflow: auto; }
dialog::backdrop { background: #070d18df; }
.gallery-top { display: flex; align-items: center; justify-content: space-between; padding: 3px 0 8px; color: var(--night-muted); font-size: 13px; }
.gallery-close { width: 43px; height: 43px; border-radius: 0; background: transparent; color: var(--night-text); border: 1px solid var(--night-rule); cursor: pointer; font-size: 23px; font-family: system-ui, sans-serif; }
.gallery-figure img { margin: 0 auto; width: auto; max-width: 100%; height: auto; max-height: 72dvh; object-fit: contain; }
.gallery-figure figcaption { color: var(--night-text); font-size: 13px; text-align: center; margin: 13px 0 14px; }
.gallery-controls { display: flex; justify-content: center; align-items: center; gap: 9px; }
.gallery-controls button { padding: 9px 15px; min-height: 43px; border: 1px solid var(--night-rule); background: transparent; cursor: pointer; color: var(--night-text); font-size: 12px; }
.gallery-controls button:hover, .gallery-close:hover { background: #283a58; }
@media (max-width: 980px) {
  .shell { width: calc(100% - 62px); }
  .reading-layout, .ink-layout { gap: 37px; }
}
@media (max-width: 690px) {
  .shell { width: calc(100% - 36px); }
  .header-row { min-height: 59px; grid-template-columns: 1fr auto; gap: 12px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-seal { width: 26px; height: 28px; font-size: 16px; }
  nav { gap: 19px; }
  nav a { font-size: 12px; }
  .header-download { display: none; }
  .hero-heading { flex-direction: column; align-items: start; gap: 20px; padding-bottom: 23px; }
  .hero {
    background-image: linear-gradient(180deg, #111b2e12 0%, #111b2e22 52%, #111b2eec 100%), url("assets/indigo-ground-mobile.webp");
  }
  .hero-inner { padding-top: 36px; }
  h1 { font-size: clamp(59px, 15vw, 96px); }
  .hero-quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 11px; padding: 0 0 0 11px; }
  .hero-quote blockquote { font-size: 16px; }
  .hero-quote p { margin-top: 0; font-size: 10px; }
  .eyebrow { font-size: 11px; margin-bottom: 10px; }
  .view-image { right: 7px; bottom: 7px; padding: 6px 8px; gap: 6px; font-size: 10px; }
  .panorama-caption { padding: 13px 0 22px; font-size: 10px; }
  .reading-layout, .ink-layout, .signature-layout { grid-template-columns: 1fr; gap: 32px; }
  .reading-copy h2, .ink-copy h2 { margin-bottom: 19px; }
  .verse-line { font-size: clamp(18px, 5vw, 28px); }
  .ink-photo { grid-row: 2; }
  .ink-image { height: min(105vw, 550px); }
  .character-grid { grid-template-columns: 1fr; gap: 34px; }
  .character-image { height: min(62vw, 380px); }
  .signature-plate { width: min(76%, 300px); justify-self: start; }
  .signature-copy blockquote { font-size: clamp(22px, 6vw, 37px); }
  .footer-layout { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .footer-actions { justify-self: end; }
  .download { font-size: 11px; padding: 10px; gap: 5px; }
  .references { justify-self: start; grid-column: 1 / -1; }
  dialog { padding: 6px 9px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* The introduction reads like the catalogue label beside the full work. */
.hero-quote { max-width: 410px; }
.hero-quote .hero-summary { font-size: 14px; letter-spacing: .03em; line-height: 1.75; max-width: 28em; margin-top: 14px; }
.panorama-links { display: flex; align-items: baseline; gap: clamp(14px, 4vw, 38px); }
.exhibit-intro { padding-block: clamp(56px, 8vw, 110px); }
.intro-layout { display: grid; grid-template-columns: minmax(0, 1.24fr) minmax(280px, .76fr); align-items: start; gap: clamp(34px, 8vw, 110px); }
.intro-copy h2 { margin-bottom: 24px; }
.intro-copy p:not(.lead) { color: var(--muted); margin-top: 18px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding-block: 6px; color: var(--antique); border-bottom: 1px solid #9e815a; font-size: 13px; }
.text-link:hover { color: #532d13; border-bottom-color: currentColor; }
.ink-copy .text-link { color: var(--gold); border-color: var(--night-rule); }
.work-record { padding: clamp(21px, 3vw, 38px); background: #ede6d7; border-top: 1px solid #9f8352; }
.work-record h3 { font-family: var(--display); font-size: clamp(23px, 2.75vw, 35px); padding-bottom: 13px; letter-spacing: .06em; }
.work-record dl { margin-block: 0; }
.work-record dl div { display: grid; grid-template-columns: 3em 1fr; gap: 13px; align-items: baseline; padding: 13px 0; border-top: 1px solid var(--rule); }
.work-record dt { color: var(--antique); font-size: 12px; letter-spacing: .14em; }
.work-record dd { font-size: 14px; line-height: 1.65; margin: 0; }
.work-record dd span { color: var(--muted); font-size: 12px; display: block; }
.reading { border-top: 1px solid var(--rule); }
.verse-note { color: var(--muted); font-size: 11px; margin-top: 4px; }
.ink-steps { margin: 18px 0 0; padding-inline-start: 1.35em; display: grid; gap: 8px; color: var(--night-muted); }
.ink-steps li { padding-left: 5px; font-size: 13px; line-height: 1.7; }
.ink-steps li::marker { color: var(--gold); }
.ink-steps strong { color: var(--night-text); display: inline-block; margin-right: 10px; }
.koi-section { padding-block: clamp(56px, 9vw, 120px); border-top: 1px solid var(--rule); }
.koi-layout { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); align-items: center; gap: clamp(33px, 9vw, 122px); }
.koi-copy h2 { margin-bottom: 24px; }
.koi-copy p:not(.lead):not(.eyebrow) { color: var(--muted); margin-top: 17px; }
.koi-image { aspect-ratio: 5 / 6; max-height: 700px; background: #202a48; border: 1px solid #8f7651; }
.koi-image picture { display: block; height: 100%; }
.koi-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 53%; }
.koi-plate figcaption { margin-top: 13px; font-size: 12px; color: var(--muted); letter-spacing: .09em; }
@media (max-width: 690px) {
  nav { gap: clamp(10px, 3.4vw, 18px); }
  .hero-quote .hero-summary { flex-basis: 100%; margin-top: 4px; font-size: 12px; }
  .intro-layout, .koi-layout { grid-template-columns: 1fr; gap: 29px; }
  .intro-copy h2, .koi-copy h2 { margin-bottom: 17px; }
  .work-record dl div { padding-block: 11px; }
  .view-image { font-size: 12px; }
  .panorama-caption { align-items: center; padding-block: 8px 16px; font-size: 12px; letter-spacing: .045em; }
  .panorama-links { flex-wrap: wrap; justify-content: end; gap: 5px 12px; }
  .panorama-links a { display: inline-flex; min-height: 40px; align-items: center; gap: 3px; padding-block: 0; }
  .koi-image { max-height: 115vw; }
}

/* Keep the original photographs intact while placing each glyph's focal point in view. */
.glyph-image { height: auto; aspect-ratio: 5 / 4; background: #252f59; }
.glyph-image picture { display: block; position: absolute; inset: 0; }
.glyph-image img {
  object-fit: cover;
  object-position: 50% var(--object-y, 50%);
  transform: scale(var(--crop-scale, 1.16));
  transform-origin: var(--focal-x, 50%) 50%;
}
.glyph-image:hover img { transform: scale(calc(var(--crop-scale, 1.16) + .035)); }
.glyph-huan { --focal-x: 58%; --object-y: 47%; --crop-scale: 1.59; }
.glyph-zhi { --focal-x: 18%; --object-y: 56%; --crop-scale: 1.59; }
