@font-face {
  font-family: "Print Song";
  src: url("./assets/print-song.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #302d28;
  --quiet: #655f55;
  --line: #d6d1c7;
  --rule: #9c9485;
  --clay: #904633;
  --pale: #f0ede6;
  --song: "Print Song", "Songti SC", "STSong", "Noto Serif CJK SC", SimSun, serif;
  --body: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --gutter: clamp(20px, 5.8vw, 100px);
  font: 100%/1.65 var(--body);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
h1,h2,h3 { font-family: var(--song); font-weight: 400; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: transparent; border: 0; padding: 0; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .52; }
a { color: inherit; text-decoration: none; }
a:hover, button:hover:not(:disabled) { color: var(--clay); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
[hidden] { display: none !important; }
[data-icon] { display: inline-flex; }
button svg, [data-icon] svg { width: 18px; height: 18px; display: block; }
.masthead, main { width: min(100%, 1640px); margin-inline: auto; padding-inline: var(--gutter); }
.masthead { height: 80px; display: flex; align-items: center; justify-content: space-between; }
.brand, .ref-btn { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.brand { font: 400 17px/1.35 var(--song); letter-spacing: .14em; }
.ref-btn { font: 400 15px/1.4 var(--song); letter-spacing: .1em; }
.ref-btn svg { width: 17px; height: 17px; }
.cover {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 40% 60%;
  height: clamp(420px, 70svh, 760px); align-items: center; border-block-start: 1px solid var(--line);
}
.cover-writing { position: relative; z-index: 1; justify-self: center; display: flex; align-items: center; flex-direction: column; }
.title-block { display: flex; flex-direction: row-reverse; align-items: flex-start; gap: clamp(15px, 2vw, 36px); }
h1 { writing-mode: vertical-rl; font: 400 clamp(57px, 5.8vw, 99px)/1.05 var(--song); letter-spacing: .15em; }
.colophon { display: flex; writing-mode: vertical-rl; align-items: center; gap: 12px; padding-top: 5px; font: 400 15px/1.35 var(--song); color: var(--quiet); letter-spacing: .18em; }
.colophon i { width: 1px; height: 22px; background: var(--rule); }
.seal { align-self: flex-start; margin-top: 17px; border: 1px solid var(--clay); outline: 1px solid var(--clay); outline-offset: -3px; color: var(--clay); padding: 4px 6px 4px 7px; font: 400 14px/1 var(--song); letter-spacing: .1em; }
.cover-picture { height: 100%; min-height: 0; padding: clamp(12px, 2vh, 25px) 4% 6px 0; display: grid; place-items: center; }
.cover-picture img { width: 100%; height: 100%; max-height: 100%; min-height: 0; object-fit: contain; mix-blend-mode: multiply; }
.cover-nav { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--rule); }
.cover-nav a { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 68px; font: 400 18px/1.4 var(--song); letter-spacing: .17em; }
.cover-nav a + a::before { content: ""; position: absolute; left: 0; height: 15px; width: 1px; background: var(--line); }
.cover-nav a:hover { background-color: #f2eee7; }
.cover-nav svg { width: 13px; height: 13px; }
.workshop { margin-block-start: clamp(68px, 8vw, 128px); scroll-margin-top: 18px; }
.workshop:focus:not(:focus-visible) { outline: 0; }
.work-heading,.panel-title,.dialog-top,footer { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.work-heading { align-items: center; padding-bottom: 23px; border-bottom: 1px solid var(--rule); }
.work-heading h2 { font-size: clamp(28px, 3.1vw, 46px); line-height: 1.3; letter-spacing: .13em; }
.work-heading p { color: var(--quiet); font: 400 15px/1.5 var(--song); letter-spacing: .08em; }
.work-heading p span { padding-inline: .7em; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) clamp(287px, 28vw, 380px); gap: clamp(25px, 3.6vw, 68px); height: clamp(562px, 74svh, 865px); }
.stage,.panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.stage { position: relative; isolation: isolate; }
.stage-top { flex: none; }
.modes { display: flex; gap: clamp(12px, 2vw, 36px); padding-inline: 3px; }
.modes button,.ref-tabs button { min-height: 49px; position: relative; font: 400 16px/1.5 var(--song); letter-spacing: .1em; }
.modes button[aria-pressed=true],.ref-tabs button[aria-pressed=true] { color: var(--clay); }
.modes button[aria-pressed=true]::after,.ref-tabs button[aria-pressed=true]::after { content: ""; position: absolute; bottom: 4px; left: 0; right: .08em; height: 2px; background: var(--clay); }
.model-sheet { position: relative; flex: 1; min-height: 0; background: #f5f3ed; }
#viewport { position: absolute; inset: 0; touch-action: none; }
#viewport canvas { display: block; width: 100%; height: 100%; }
.stage-tools { position: absolute; bottom: 10px; right: 11px; display: grid; background: #faf9f6eb; border: 1px solid var(--line); }
.stage-tools button,.dialog-top button,.undo { display: grid; place-items: center; width: 42px; min-height: 42px; }
.stage-tools button + button { border-top: 1px solid var(--line); }
.stage-tools svg { width: 16px; height: 16px; }
.loader,.isolate-note { position: absolute; background: var(--paper); border: 1px solid var(--line); font-size: 14px; }
.loader { top: 50%; left: 50%; transform: translate(-50%, -50%); width: max-content; max-width: 88%; text-align: center; padding: 12px 18px; }
.loader button { display: block; text-decoration: underline; margin: 6px auto 0; }
.isolate-note { left: 12px; top: 12px; }
.isolate-note button { padding: 9px 13px; }
.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; }
.stage-caption,#space-control,.text-control { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--quiet); }
.stage-caption svg { width: 15px; height: 15px; }
input[type=range] { accent-color: var(--clay); }
#spacing { width: clamp(58px, 7vw, 115px); }
.stage.touring .stage-foot { display: none; }
.tour-player { padding: 14px 0 5px; }
.tour-caption { display: flex; gap: 13px; align-items: baseline; }
.tour-caption>span { color: var(--clay); white-space: nowrap; font: 400 15px/1.6 var(--song); }
.tour-caption p,.detail p { font-size: 16px; line-height: 1.7; }
.transport { display: flex; align-items: center; gap: 8px; padding-top: 5px; }
.transport button { display: grid; place-items: center; width: 40px; min-height: 40px; }
.transport button:first-child { color: var(--paper); background: var(--clay); }
.transport input { flex: 1; min-width: 0; }
#tour-time,.number,.meta { font-variant-numeric: tabular-nums; }
#tour-time { font-size: 13px; white-space: nowrap; color: var(--quiet); }
.panel { border-left: 1px solid var(--line); padding-left: clamp(20px, 2.5vw, 38px); padding-top: 18px; }
.panel-title h2,dialog h2 { font-size: 25px; letter-spacing: .08em; line-height: 1.45; }
.meta,.eyebrow,.part .l,.ref-credit { font-size: 13px; color: var(--quiet); }
.panel-intro p { margin-top: 5px; font-size: 15px; color: var(--quiet); }
.detail { padding: 14px 0 16px; border-block-start: 1px solid var(--line); margin-top: 17px; }
.detail-heading { display: flex; align-items: center; gap: 12px; }
.part-pict { width: 38px; height: 38px; color: var(--clay); display: grid; place-items: center; border: 1px solid var(--line); }
.part-pict svg { width: 24px; height: 24px; }
.detail h3 { font-size: 21px; line-height: 1.45; }
.detail p { margin-top: 8px; color: var(--quiet); }
.text-control { color: var(--clay); min-height: 40px; text-decoration: underline; text-underline-offset: 4px; }
.parts { flex: 1; min-height: 0; border-top: 1px solid var(--rule); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c1b9aa transparent; }
.part { width: 100%; text-align: left; display: grid; align-items: center; grid-template-columns: 30px 1fr auto; gap: 8px; min-height: 47px; padding: 7px 7px; border-bottom: 1px solid var(--line); }
.part .number { font: 15px Georgia,serif; color: var(--quiet); }
.part .n { font: 400 17px/1.55 var(--song); }
.part .number svg { width: 15px; height: 15px; }
.part.chosen,.part[aria-current=step] { box-shadow: inset 2px 0 var(--clay); color: var(--clay); background: #efe9df; }
.part.next { cursor: grab; }
#progress-box { padding-bottom: 13px; font-size: 14px; }
#progress-box>div { display: flex; justify-content: space-between; }
progress { display: block; width: 100%; height: 4px; border: 0; background: var(--pale); accent-color: var(--clay); }
progress::-webkit-progress-bar { background: var(--pale); }
progress::-webkit-progress-value { background: var(--clay); }
.actions { border-top: 1px solid var(--rule); display: flex; gap: 8px; padding-top: 12px; }
.actions #primary { display: flex; justify-content: center; align-items: center; flex: 1; min-height: 44px; gap: 10px; color: var(--paper); background: #654333; font: 400 16px/1.5 var(--song); letter-spacing: .07em; }
.actions #primary:hover:not(:disabled),.transport button:first-child:hover { background: var(--clay); color: white; }
.undo { border: 1px solid var(--line); }
footer { margin-top: 42px; border-top: 1px solid var(--line); font-size: 13px; color: var(--quiet); }
footer span,footer a { padding-block: 16px 23px; }
dialog { width: min(770px, 94vw); max-height: 93svh; padding: clamp(17px, 3vw, 36px); background: var(--paper); color: var(--ink); border: 1px solid var(--rule); }
dialog::backdrop { background: #302c26ad; }
.dialog-top { align-items: center; border-bottom: 1px solid var(--rule); padding-bottom: 7px; }
.ref-tabs { display: flex; gap: 24px; }
.ref-image { display: grid; place-items: center; background: #f1efe9; }
.ref-image img { display: block; max-width: 100%; max-height: 61svh; object-fit: contain; }
.ref-credit { margin-top: 10px; }
.sr-only,.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { position: absolute; top: 12px; left: 16px; z-index: 2; padding: 8px 14px; background: var(--paper); }
@media (max-width: 800px) {
  :root { --gutter: clamp(18px, 5vw, 33px); }
  .masthead { height: 64px; }
  .brand { gap: 8px; font-size: 15px; }
  .brand img { width: 28px; height: 28px; }
  .cover { grid-template-columns: 26% 74%; height: clamp(370px, 65svh, 580px); }
  .cover-picture { padding: 0; }
  .cover-writing { justify-self: start; }
  .title-block { gap: 8px; }
  h1 { font-size: clamp(42px, 8.1vw, 64px); letter-spacing: .1em; }
  .colophon { font-size: 13px; gap: 7px; letter-spacing: .1em; }
  .colophon i { height: 15px; }
  .seal { margin-top: 12px; font-size: 12px; }
  .cover-nav a { min-height: 56px; font-size: 16px; gap: 3px; }
  .workshop { margin-top: 60px; scroll-margin-top: 8px; }
  .work-heading { padding-bottom: 12px; }
  .work-heading p { font-size: 13px; }
  .workspace { display: flex; flex-direction: column; height: auto; gap: 24px; }
  .stage { min-height: 0; }
  .modes { justify-content: space-between; padding-inline: 4px; }
  .modes button { min-height: 46px; }
  .model-sheet { flex: none; height: clamp(292px, 48svh, 530px); }
  .stage-foot { min-height: 43px; }
  .stage-foot:has(#space-control:not([hidden])) .stage-caption { display: none; }
  .stage-caption { font-size: 13px; }
  .stage-tools { right: 7px; bottom: 7px; }
  .stage-tools button { width: 40px; min-height: 40px; }
  .panel { border-left: 0; border-top: 1px solid var(--rule); padding: 17px 0 0; }
  .detail { margin-top: 12px; }
  .parts { max-height: 267px; flex: auto; }
  .tour-caption { gap: 9px; }
  .transport { gap: 3px; }
  footer { margin-top: 30px; }
}
@media (max-width: 360px) {
  .work-heading { gap: 5px; }
  .work-heading h2 { font-size: 25px; }
  .cover-nav a { letter-spacing: .05em; }
  .ref-btn { gap: 5px; }
}
.header-links { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.cover-picture { container-type: size; background: var(--paper); }
.paper-print { position: relative; width: min(100cqw, 80.03cqh); aspect-ratio: 1122 / 1402; mix-blend-mode: multiply; }
.cover-picture .print-base { display: block; width: 100%; height: 100%; }
.cover-picture .print-board { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: auto; transform: translate(-50%, -50%) skewY(var(--skew, 0deg)); }
#plaque-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-block: 8px 16px; }
#plaque-controls label { font-size: 14px; color: var(--quiet); }
#plaque-select { min-height: 42px; max-width: 100%; background: var(--paper); border: 1px solid var(--rule); padding: 5px 30px 5px 10px; border-radius: 0; font: 16px var(--song); color: var(--ink); }
.show-plaque .ref-image { min-height: min(30svh, 245px); padding: 24px; }
.show-plaque .ref-image img { width: auto; max-width: 100%; max-height: 40svh; }
.inscriptions { margin-block-start: clamp(72px, 9vw, 140px); scroll-margin-top: 20px; }
.ink-intro { max-width: 44em; margin: 25px 0 34px; line-height: 1.9; color: var(--quiet); }
.ink-sub,.walking-note h3 { font: 400 23px/1.5 var(--song); letter-spacing: .1em; }
.featured-plaques { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(22px,3vw,54px); margin: 15px 0 32px; }
.featured-plaques article { min-width: 0; }
.featured-plaques button { display: block; width: 100%; text-align: left; }
.featured-image { height: clamp(150px,15vw,230px); display: grid; place-items: center; background: #f3f0e9; padding: 18px 24px; }
.featured-image img { display: block; max-width: 94%; max-height: 100%; min-height: 0; object-fit: contain; }
.entry-title { display: block; margin: 15px 0 2px; font: 400 25px/1.4 var(--song); letter-spacing: .08em; }
.featured-plaques small,.ink-footnote { font-size: 14px; color: var(--quiet); }
.featured-plaques p,.walking-note p,.ink-rows p,.sources-fold p { line-height: 1.85; margin-top: 8px; }
.ink-fold { border-top: 1px solid var(--line); }
.ink-fold summary { cursor: pointer; padding: 16px 0; font: 400 19px/1.5 var(--song); }
.ink-fold summary::marker { font-size: .76em; color: var(--clay); }
.ink-rows { padding: 0 0 14px; }
.ink-rows>div { display: grid; grid-template-columns: minmax(100px, 19%) minmax(0,1fr); gap: 0 22px; padding: 10px 0; }
.ink-rows h4 { margin: 8px 0 0; font: 400 18px/1.7 var(--song); }
.ink-rows p { max-width: 48em; grid-column: 2; }
.couplet { font: 400 19px/1.9 var(--song); }
.walking-note { padding-block: 24px; border-top: 1px solid var(--line); }
.walking-links { display: flex; flex-wrap: wrap; gap: 5px 22px; margin-block: 6px; }
.walking-links button,.sources-fold a { color: var(--clay); text-decoration: underline; text-underline-offset: 5px; }
.walking-links button { min-height: 42px; }
.sources-fold ul { padding-left: 20px; line-height: 1.9; }
@media(max-width:700px) {
  .featured-plaques { display: block; }
  .featured-plaques article { padding-block: 18px 24px; border-bottom: 1px solid var(--line); }
  .featured-image { height: 156px; }
  .ink-intro { margin: 18px 0 24px; }
  .ink-rows>div { display: block; padding: 7px 0; }
  .walking-links { gap: 2px 16px; }
  .featured-plaques article:last-child { border: 0; }
}
