@font-face {
  font-family: "Museum Serif SC";
  src: url("assets/fonts/noto-serif-sc-museum-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Museum Sans SC";
  src: url("assets/fonts/noto-sans-sc-museum-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --kiln: #122d2a;
  --kiln-deep: #0b1d1b;
  --paper: #e8e3d8;
  --paper-light: #f2eee5;
  --ink: #172025;
  --muted: #756f65;
  --vermilion: #c83931;
  --rule: #aaa398;
  --serif: "Museum Serif SC", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --sans: "Museum Sans SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { background: var(--kiln-deep); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 1000; top: 12px; left: 12px; padding: 10px 14px; color: #000; background: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.eyebrow { margin: 0 0 20px; font-size: 10px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }

.record-nav { position: relative; z-index: 20; height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 3.5vw; color: var(--paper-light); background: var(--kiln-deep); border-bottom: 1px solid rgba(255,255,255,.14); }
.back-link { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; gap: 10px; font-size: 11px; letter-spacing: .08em; }
.back-link span { font-size: 18px; transition: transform .3s var(--ease); }
.back-link:hover span { transform: translateX(-5px); }
.brand { justify-self: center; display: flex; align-items: baseline; gap: 11px; }
.brand > span { font-family: var(--serif); font-size: 18px; font-weight: 800; letter-spacing: .12em; }
.brand small, .prototype-badge { font-size: 9px; letter-spacing: .18em; opacity: .68; }
.prototype-badge { justify-self: end; }

.work-record { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr); align-items: start; min-height: calc(100svh - 68px); }
.work-visual { position: sticky; top: 0; margin: 0; padding: 5vh 4vw 3vh; background: #d1cbc0; }
.image-stage { position: relative; height: 80vh; min-height: 620px; overflow: hidden; isolation: isolate; background: #c8c1b5; touch-action: none; }
.image-stage::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .36; background-image: linear-gradient(rgba(11,29,27,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(11,29,27,.07) 1px, transparent 1px); background-size: 48px 48px; }
.image-stage img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; user-select: none; -webkit-user-drag: none; will-change: transform; transition: transform .48s var(--ease), opacity .2s ease; }
.image-stage.is-zoomed img { cursor: grab; transition-duration: .18s; }
.image-stage.is-dragging img { cursor: grabbing; transition: none; }
.image-stage.is-expanded { position: fixed; z-index: 1000; inset: 0; width: 100vw; height: 100dvh; min-height: 0; background: #101817; }
.image-stage.is-expanded::before { opacity: .16; background-size: 64px 64px; }
.image-position { position: absolute; z-index: 3; top: 16px; left: 16px; padding: 8px 10px; color: rgba(242,238,229,.82); background: rgba(11,29,27,.84); border: 1px solid rgba(255,255,255,.18); font-size: 9px; letter-spacing: .16em; }
.viewer-toolbar { position: absolute; z-index: 4; right: 16px; bottom: 16px; display: flex; align-items: stretch; min-height: 44px; padding: 1px; color: var(--paper-light); background: rgba(11,29,27,.92); border: 1px solid rgba(255,255,255,.28); box-shadow: 0 12px 35px rgba(0,0,0,.18); }
.viewer-toolbar button { min-width: 42px; padding: 0 12px; color: inherit; background: transparent; border: 0; cursor: pointer; font-size: 10px; letter-spacing: .08em; }
.viewer-toolbar button:hover { background: rgba(255,255,255,.1); }
.viewer-toolbar button:disabled { cursor: default; opacity: .34; }
.viewer-toolbar .zoom-readout { padding-inline: 8px; font-variant-numeric: tabular-nums; }
.viewer-toolbar .toolbar-divider { width: 1px; flex: 0 0 1px; margin: 8px 1px; background: rgba(255,255,255,.22); }
.work-gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(68px, 84px); gap: 8px; margin-top: 10px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.work-gallery button { position: relative; height: 76px; padding: 0; overflow: hidden; background: #b9b1a5; border: 1px solid transparent; cursor: pointer; }
.work-gallery button::after { content: attr(data-label); position: absolute; right: 5px; bottom: 5px; min-width: 24px; padding: 4px 5px; color: var(--paper-light); background: rgba(11,29,27,.86); font-size: 8px; letter-spacing: .08em; }
.work-gallery button[aria-current="true"] { border-color: var(--kiln); box-shadow: inset 0 0 0 2px #d1cbc0; }
.work-gallery img { width: 100%; height: 100%; object-fit: cover; }
.viewer-open { overflow: hidden; }
.work-visual figcaption { margin-top: 13px; color: #5e5a53; font-size: 10px; line-height: 1.7; }

.record-copy { padding: 12vh 6vw 10vh; }
.record-status { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 4vh; padding: 8px 11px; color: var(--kiln); border: 1px solid #8e978d; font-size: 10px; letter-spacing: .1em; }
.record-status i { width: 7px; height: 7px; background: var(--kiln); border-radius: 50%; }
.record-copy h1 { margin: 0; font-family: var(--serif); font-size: clamp(64px, 8vw, 128px); font-weight: 500; line-height: .94; letter-spacing: -.05em; text-wrap: balance; }
.record-copy h1.is-long-title { max-width: 10em; font-size: clamp(54px, 6vw, 96px); line-height: 1.02; letter-spacing: -.04em; }
.record-copy h1.is-very-long-title { max-width: 12em; font-size: clamp(46px, 4.8vw, 76px); line-height: 1.08; letter-spacing: -.035em; }
.record-id { margin: 24px 0 0; color: var(--muted); font-size: 11px; letter-spacing: .14em; }
.record-intro { max-width: 620px; margin: 5vh 0 7vh; font-family: var(--serif); font-size: clamp(17px, 1.5vw, 22px); line-height: 1.9; }
.viewing-guide { display: grid; grid-template-columns: 88px 1fr; gap: 24px; margin: -2vh 0 7vh; padding: 18px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.viewing-guide h2 { margin: 2px 0 0; color: var(--vermilion); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.viewing-guide p { margin: 0; color: #4f4b44; font-family: var(--serif); font-size: 14px; line-height: 1.9; }

.metadata { margin: 0 0 9vh; border-top: 1px solid var(--ink); }
.metadata div { display: grid; grid-template-columns: 96px 1fr; gap: 28px; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.metadata dt { color: var(--muted); font-size: 11px; }
.metadata dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-family: var(--serif); font-size: 14px; line-height: 1.65; }
.metadata .rights-state { color: #8f302b; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .04em; }

.evidence-block, .relation-note { display: grid; grid-template-columns: 42px 1fr; gap: 22px; padding: 5vh 0; border-top: 1px solid var(--ink); }
.section-number { margin: 3px 0 0; color: var(--vermilion); font-size: 10px; letter-spacing: .12em; }
.evidence-block h2, .relation-note h2 { margin: 0 0 18px; font-family: var(--serif); font-size: clamp(25px, 2.4vw, 36px); font-weight: 500; }
.evidence-block > div > p, .relation-note > div > p { margin: 0; color: #555149; font-size: 13px; line-height: 1.9; }
.verification-list { margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.verification-list li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.verification-list span { color: var(--vermilion); font-size: 10px; letter-spacing: .08em; }
.verification-list .is-linked span { color: var(--kiln); }
.verification-list b { font-family: var(--serif); font-size: 13px; font-weight: 500; }
.record-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 5vh; background: var(--rule); border: 1px solid var(--rule); }
.record-pager a { min-height: 82px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 14px 18px; background: var(--paper); transition: color .25s, background .25s; }
.record-pager a:last-child { text-align: right; }
.record-pager a:hover { color: var(--paper-light); background: var(--kiln); }
.record-pager span { font-size: 9px; letter-spacing: .14em; opacity: .68; }
.record-pager b { font-family: var(--serif); font-size: 15px; font-weight: 500; }

.related-section { padding: 16vh 7vw; color: var(--paper-light); background: var(--kiln); }
.related-section > header { display: grid; grid-template-columns: .8fr 1.2fr 1fr; gap: 5vw; align-items: start; padding-bottom: 8vh; border-bottom: 1px solid rgba(255,255,255,.25); }
.related-section h2 { margin: 0; font-family: var(--serif); font-size: clamp(38px, 5.2vw, 76px); font-weight: 500; line-height: 1.08; letter-spacing: -.035em; }
.related-section > header > p:last-child { margin: 8px 0 0; color: rgba(242,238,229,.68); font-family: var(--serif); font-size: 14px; line-height: 2; }
.related-group { margin-top: 9vh; }
.related-group h3 { margin: 0 0 24px; font-size: 11px; font-weight: 500; letter-spacing: .2em; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.6vw; }
.related-card { display: grid; grid-template-rows: minmax(360px, 52vh) auto; }
.related-card img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; background: #d0cabf; transition: transform .55s var(--ease); }
.related-card:hover img { transform: translateY(-5px); }
.related-card span { display: flex; justify-content: space-between; gap: 14px; margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.28); }
.related-card b { font-family: var(--serif); font-size: 16px; font-weight: 500; }
.related-card small { color: rgba(242,238,229,.62); font-size: 10px; line-height: 1.5; text-align: right; }

.boundary-note { display: grid; grid-template-columns: .7fr 1.3fr 1fr; gap: 5vw; padding: 15vh 7vw; background: var(--paper); }
.boundary-note h2 { margin: 0; font-family: var(--serif); font-size: clamp(34px, 4.2vw, 64px); font-weight: 500; line-height: 1.15; letter-spacing: -.03em; }
.boundary-note > p:last-child { margin: 8px 0 0; color: #565149; font-size: 13px; line-height: 2; }

.not-found { min-height: calc(100svh - 68px); padding: 18vh 8vw; }
.not-found h1 { margin: 0; font-family: var(--serif); font-size: clamp(54px, 8vw, 120px); font-weight: 500; }
.not-found > p:not(.eyebrow) { margin: 28px 0 44px; color: var(--muted); }
.not-found a { display: inline-flex; align-items: center; justify-content: space-between; min-width: 220px; min-height: 50px; padding: 0 16px; color: var(--paper-light); background: var(--kiln); font-size: 12px; }

footer { display: grid; grid-template-columns: 1fr 1fr auto; gap: 4vw; align-items: end; padding: 7vh 7vw; color: var(--paper-light); background: var(--kiln-deep); border-top: 1px solid rgba(255,255,255,.14); }
footer div { display: flex; flex-direction: column; gap: 8px; }
footer b { font-family: var(--serif); font-size: 17px; }
footer span, footer p, footer a { margin: 0; color: rgba(242,238,229,.58); font-size: 10px; line-height: 1.7; }

@media (max-width: 900px) {
  .record-nav { grid-template-columns: 1fr auto; padding: 0 20px; }
  .record-nav .brand { display: none; }
  .prototype-badge { font-size: 8px; }
  .work-record { grid-template-columns: 1fr; }
  .work-visual { position: relative; top: auto; padding: 18px 18px 13px; }
  .image-stage { height: 68svh; min-height: 470px; }
  .record-copy { padding: 9vh 7vw 10vh; }
  .record-copy h1 { font-size: clamp(58px, 20vw, 92px); }
  .record-copy h1.is-long-title { font-size: clamp(48px, 14vw, 72px); }
  .record-copy h1.is-very-long-title { font-size: clamp(40px, 11vw, 60px); }
  .record-intro { margin-top: 4vh; }
  .related-section { padding: 12vh 7vw; }
  .related-section > header, .boundary-note { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; gap: 5vh 4vw; }
  .related-card { grid-template-rows: minmax(300px, 47vh) auto; }
  .boundary-note { padding: 12vh 7vw; }
  footer { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 560px) {
  .prototype-badge { max-width: 112px; text-align: right; line-height: 1.4; }
  .image-stage { height: 62svh; min-height: 420px; }
  .image-position { top: 10px; left: 10px; }
  .viewer-toolbar { right: 10px; bottom: 10px; }
  .viewer-toolbar button { min-width: 40px; padding-inline: 9px; }
  .work-gallery { grid-auto-columns: 64px; }
  .work-gallery button { height: 64px; }
  .metadata div { grid-template-columns: 76px 1fr; gap: 16px; }
  .viewing-guide { grid-template-columns: 72px 1fr; gap: 14px; }
  .evidence-block, .relation-note { grid-template-columns: 30px 1fr; gap: 12px; }
  .verification-list li { grid-template-columns: 62px 1fr; gap: 10px; }
  .record-pager a { min-width: 0; padding: 12px; }
  .record-pager b { font-size: 13px; }
  .related-grid { grid-template-columns: 1fr; }
  .related-card { grid-template-rows: minmax(420px, 68vh) auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.evidence-source-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding: 15px 0;
  border-top: 1px solid rgba(22, 38, 35, .24);
  border-bottom: 1px solid rgba(22, 38, 35, .24);
  font-family: var(--serif);
  font-size: 12px;
  transition: padding .25s, color .25s;
}
.evidence-source-link:hover { padding-left: 9px; color: #a75532; }

.mobile-work-ident { display: none; }
@media (max-width: 560px) {
  .mobile-work-ident { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: baseline; padding: 7px 2px 17px; color: var(--kiln); }
  .mobile-work-ident span { color: var(--vermilion); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; }
  .mobile-work-ident b { grid-column: 1 / -1; font-family: var(--serif); font-size: clamp(34px, 11vw, 48px); font-weight: 500; line-height: 1.08; letter-spacing: -.035em; }
  .mobile-work-ident small { grid-column: 1 / -1; color: #6d685f; font-size: 10.5px; letter-spacing: .09em; }
  .prototype-badge,.image-position,.work-visual figcaption,footer span,footer p,footer a{font-size:10.5px;line-height:1.7}
  .work-visual { padding-top: 16px; }
  .image-stage { height: 58svh; min-height: 390px; }
}
