/* Keep the approved background and artwork. The title is a separate local patch. */
@font-face{
 font-family:StoryBrush;
 src:url('./assets/MaShanZheng-story.woff') format('woff');
 font-display:swap;
}
:root{--paper:#fce7d4;--ink:#211a12;--red:#bd3317;--gold:#ab651a;--reference-art:url('./assets/approved-home-reference.webp');--catalog-ejiao:url('./assets/ejiao-approved-mobile.webp')}
@media(pointer:coarse), (max-width:720px){:root{--reference-art:url('./assets/approved-home-reference-mobile.webp')}}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.reference-home{position:fixed;inset:0;z-index:16;background:#fce7d4;display:grid;place-items:center;pointer-events:none}
.reference-art{position:relative;width:min(100vw,177.6833156svh);aspect-ratio:1672/941;pointer-events:none}
.reference-art>picture,.reference-art>picture>img{display:block;width:100%;height:100%;user-select:none}
.reference-art::after,.mobile-reference-copy::after{
 content:'';position:absolute;pointer-events:none;
 background:url('./assets/weifang-title.webp') center/100% 100% no-repeat;
 mask-image:linear-gradient(to right,transparent,#000 3%,#000 96%,transparent),linear-gradient(to bottom,transparent,#000 5%,#000 94%,transparent);
 mask-composite:intersect;
}
.reference-art::after{left:7.77512%;top:23.91073%;width:29.60526%;height:18.27843%}
.reference-art>.watermark-ink{position:absolute;inset:0}
.watermark-ink{
 filter:url(#watermark-ink);
 clip-path:polygon(26% 50%,41% 50%,41% 63%,46% 65%,45% 83%,27% 85%,26% 73%,31% 65%,31% 55%,26% 55%);
 pointer-events:none;
}
.reference-hit{position:absolute;display:block;padding:0;margin:0;border:0;background:transparent;border-radius:3px;pointer-events:auto;cursor:pointer;touch-action:manipulation}
.reference-hit:focus-visible{outline:2px solid #a82d16;outline-offset:3px;background:#fff2dc20}
.hit-home{left:62.4%;top:2.5%;width:4.7%;height:6.1%}.hit-catalog{left:69.6%;top:2.5%;width:4.7%;height:6.1%}.hit-craft{left:77%;top:2.5%;width:4.7%;height:6.1%}.hit-village{left:84.4%;top:2.5%;width:4.7%;height:6.1%}.hit-about{left:91.8%;top:2.5%;width:4.7%;height:6.1%}
.hit-explore{left:9.35%;top:71.65%;width:16.6%;height:6.9%}.hit-bamboo{left:39.7%;top:10.3%;width:8.5%;height:5%}.hit-paint{left:87.5%;top:28.4%;width:8.3%;height:5%}.hit-view{left:59.2%;top:87.6%;width:17%;height:5%}
.reference-mobile{display:none}
.free-viewing{touch-action:none;overscroll-behavior:none}
@media(pointer:coarse){body:not(.free-viewing){touch-action:pan-y pinch-zoom}}
@media(pointer:coarse){
 .watermark-ink{display:none}
 .gesture-pill,.camera-tools,.mobile-menu:not([hidden]){backdrop-filter:none}
 .paper-world{isolation:isolate}
 .paper-grain{mix-blend-mode:normal}
}
body[data-reference-home="true"] .site-header,body[data-reference-home="true"] #hero-copy,body[data-reference-home="true"] #hero-footer,body[data-reference-home="true"] #scroll-cue,body[data-reference-home="true"] #gesture-control,body[data-reference-home="true"] .chapter-dots,body[data-reference-home="true"] #projected-ui,body[data-reference-home="true"] #poster-layer,body[data-reference-home="true"] #load-status,body[data-reference-home="true"] #load-error{visibility:hidden!important;pointer-events:none!important}
body[data-reference-home="true"] #scene{visibility:hidden}
.paper-world{
 background:radial-gradient(ellipse 32% 26% at 5% 84%,#edb98e70,transparent 90%),
   radial-gradient(ellipse 20% 21% at 17% 18%,#f2c79959,transparent 91%),
   radial-gradient(ellipse at 23% 38%,#fbe7d8 0%,transparent 70%),#f7e2d2;
}
.paper-world .paper-grain{opacity:.19}
.paper-world .cinnabar-wash{
 /* Sample the original, unobstructed right margin of the artwork. */
 top:24%;right:0;width:min(28vw,30svh);height:61%;opacity:1;
 background-image:var(--reference-art);
 background-size:1019.512% 209.111%;
 background-position:100% 65.173%;
 mask-image:linear-gradient(to right,transparent,#000 62%),linear-gradient(to bottom,transparent,#000 24%,#000 63%,transparent);
 mask-composite:intersect;
}
.paper-world .copy-wash{
 top:44%;right:auto;left:16%;
 width:min(36vw,49svh);height:40%;
 opacity:.36;
 transform:rotate(-16deg) scaleX(-1);
 mask-image:linear-gradient(to right,transparent,#000 35%,#000 61%,transparent),linear-gradient(to bottom,transparent,#000 35%,#000 59%,transparent);
}
.paper-world .ghost-frame{color:#a6723e;opacity:.22}
.exhibit-clouds{position:absolute;inset:0;pointer-events:none;color:#b38243}
.exhibit-cloud{position:absolute;width:clamp(126px,19vw,292px);height:auto}
.exhibit-cloud-high{top:15%;right:6%;opacity:.46;transform:rotate(-5deg)}
.exhibit-cloud-middle{top:43%;left:36%;opacity:.33;transform:scaleX(-1) rotate(6deg)}
.exhibit-cloud-low{bottom:15%;right:17%;width:clamp(150px,24vw,365px);opacity:.52;transform:rotate(-3deg)}
.copy-cloud-high{top:14%;left:13%;width:clamp(155px,20vw,320px);opacity:.58;transform:scaleX(-1) rotate(5deg)}
.copy-cloud-low{bottom:5%;left:2%;width:clamp(205px,29vw,460px);opacity:.67;transform:rotate(-5deg)}
body[data-chapter="village"] .exhibit-cloud-low{opacity:.4}
#kite-flight-line{position:fixed;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}
#kite-flight-thread{fill:none;stroke:#8d5839;stroke-width:1.55;stroke-linecap:round;vector-effect:non-scaling-stroke}
.paper-world .cloud{visibility:hidden}
.paper-world::before,.paper-world::after{
 content:'';
 position:absolute;
 z-index:1;
 background-image:var(--reference-art);
 background-repeat:no-repeat;
 pointer-events:none;
}
.paper-world::before{
 top:7%;left:0;width:clamp(130px,17vw,275px);aspect-ratio:275/86;
 background-size:608% auto;background-position:0 9.12%;
 mask-image:linear-gradient(145deg,#000 12%,transparent 88%);
}
.paper-world::after{
 bottom:0;right:0;width:clamp(170px,22vw,350px);aspect-ratio:350/110;
 background-size:477.72% auto;background-position:100% 100%;
 mask-image:linear-gradient(318deg,#000 22%,transparent 86%);
}

/* Match the header to the approved artwork using its original wordmark. */
.site-header .brand{
 position:relative;
 display:block;
 flex:none;
 width:clamp(188px,16.4vw,274px);
 aspect-ratio:274/62;
 background:var(--reference-art) no-repeat;
 background-size:610.22% auto;
 background-position:7.15% 2.6%;
 mask-image:linear-gradient(to right,transparent,#000 4px,#000 calc(100% - 4px),transparent);
}
.site-header .brand>*{position:absolute;inset:0;opacity:0;overflow:hidden}
.desktop-nav{color:var(--ink);letter-spacing:.16em}
.desktop-nav a::after{height:3px}

.side-copy .eyebrow,.dialog-inner .eyebrow{color:#8e4815;font-weight:600}
.side-copy h2,.dialog-inner>h2{font-family:StoryBrush,ShayanBrush,var(--serif);color:#24180f;font-weight:400;line-height:1.29}
.side-copy>p:not(.eyebrow),#dialog-body{color:#38271d}
.side-copy .quiet-note,.craft-copy .layer-note{color:#76523a}
.craft-copy h3,#dialog-body h3{color:#8e4815}
.craft-steps button{border:1px solid #c28e5d55;border-radius:6px;color:#784016;background:#fff4e788;transition:border-color .17s}
.craft-steps button.active,.side-copy .text-button{
 color:#fff1df;
 background:linear-gradient(115deg,#bd381a,#a52710);
 border:1px solid #99230e;
 border-radius:7px;
}
.side-copy .text-button{padding:7px 14px}
.side-copy .text-button:hover{color:#fff6ec;background:#932710}
.return-button,.gesture-pill,.camera-tools,.layer-label,.hotspot-label{
 border-color:#b77e4f80;
 background:#fff0dfda;
 color:#4f301c;
}
#info-dialog{
 background:radial-gradient(ellipse at 100% 0,#f1b79061,transparent 58%),#fce9d6;
 border:1px solid #b77e4f80;
 border-radius:12px;
 color:var(--ink);
}
#info-dialog::backdrop{background:#602d1960}
#dialog-body .catalog-item,#dialog-body .craft-list section{
 background:#fff4e480;
 border-color:#b77e4f69;
 border-radius:7px;
}
#dialog-body a,#dialog-body .catalog-item small{color:#8d411e}
#dialog-body a.catalog-item{margin-top:12px;text-decoration:none}
#dialog-body .catalog-ejiao-preview{flex:none;width:130px;height:100px;background:var(--catalog-ejiao) 100% 64%/160.62% 124.14% no-repeat;border-radius:5px}
@media(max-aspect-ratio:1/1), (max-width:650px) and (min-aspect-ratio:1/1) and (min-height:540px){
 .paper-world .cinnabar-wash{top:39%;width:min(54vw,22svh);height:47%}
 .paper-world .copy-wash{top:48%;left:-8%;width:min(82vw,51svh);height:31%;opacity:.29}
 .exhibit-cloud-high{top:38%;right:2%;width:36vw;opacity:.36}
 .exhibit-cloud-middle{top:56%;left:-6%;width:40vw;opacity:.36}
 .exhibit-cloud-low{right:9%;bottom:15%;width:51vw;opacity:.46}
 .copy-cloud-high{top:10%;left:auto;right:3%;width:29vw;opacity:.43}
 .copy-cloud-low{bottom:3%;left:-3%;width:44vw;opacity:.56}
 .site-header{background:linear-gradient(#fce7d4eb,#fce7d400)}
 .mobile-menu:not([hidden]){background:#fce9d6f5;border-color:#b77e4f80}
 .side-copy{max-width:calc(100% - 14vw);overflow-wrap:anywhere}
 .craft-steps{gap:clamp(8px,3vw,14px)}
 .side-copy .text-button{padding:5px 12px}
 .reference-desktop{display:none}
 .reference-mobile{display:flex;width:100%;height:100%;max-height:100svh;box-sizing:border-box;align-items:center;flex-direction:column;justify-content:space-between;gap:3px;padding:max(12px,env(safe-area-inset-top)) 0 max(12px,env(safe-area-inset-bottom));background:#fce7d4}
 .reference-crop{position:relative;overflow:hidden;pointer-events:none;flex-shrink:0;mask-image:linear-gradient(to right,transparent,#000 6px,#000 calc(100% - 6px),transparent),linear-gradient(to bottom,transparent,#000 6px,#000 calc(100% - 6px),transparent);mask-composite:intersect}.reference-crop img{position:absolute;max-width:none;user-select:none;height:auto;display:block}
 .mobile-reference-brand{width:min(54vw,24svh,260px);aspect-ratio:300/70;align-self:flex-start;margin-left:7%}.mobile-reference-brand img{width:557.333333%;left:-30%;top:-28.571429%}
 .mobile-reference-copy{width:min(88vw,37svh,490px);aspect-ratio:530/580;align-self:flex-start;margin-left:7%}.mobile-reference-copy img{width:315.471698%;left:-24.528302%;top:-29.310345%}.mobile-reference-copy>.reference-hit{left:5.1%;top:87%;width:52%;height:11%}
 .mobile-reference-copy::after{left:0;top:9.48276%;width:93.39623%;height:29.65517%}
 .mobile-reference-kite{width:min(98vw,48svh,680px);aspect-ratio:1012/740}.mobile-reference-kite img{width:165.217391%;left:-65.217391%;top:-12.837838%}.mobile-reference-kite>.reference-hit{left:78%;top:23%;width:15%;height:9%}
 .mobile-reference-view{pointer-events:auto;font-size:12px;letter-spacing:1px;border-bottom:1px solid #bd331755;color:#823c19;padding:2px 0;min-height:30px}
 .reference-mobile-menu{position:absolute;top:max(13px,env(safe-area-inset-top));right:5%;width:44px;height:44px;display:grid;place-content:center;gap:6px;pointer-events:auto}
 .reference-mobile-menu span{display:block;width:20px;height:1px;background:var(--ink)}
 .gesture-control{bottom:max(5.7%,calc(env(safe-area-inset-bottom) + 8px))}
 #dialog-body .catalog-ejiao-preview{width:90px;height:83px}
 .camera-tools{flex-wrap:wrap}
}
@media(max-aspect-ratio:1/1) and (max-height:650px){
 .site-header{height:64px}
 .mobile-menu:not([hidden]){top:60px}
 .side-copy{top:72px}.side-copy h2{font-size:24px;margin:5px 0 7px}
 .side-copy>p:not(.eyebrow),.craft-copy #craft-description{font-size:12px;line-height:1.55}
 .craft-steps{margin:6px 0}.craft-steps button{height:30px;font-size:19px}
 .craft-copy h3,.craft-copy .layer-note{margin:4px 0}.side-copy .text-button{margin-top:3px}
}
@media(max-aspect-ratio:1/1) and (max-height:490px){
 .side-copy{max-height:51svh;overflow:auto;pointer-events:auto}
 .side-copy .craft-intro{display:none}
}
@media(min-aspect-ratio:1/1) and (max-height:540px){
 .copy-cloud-high{top:10%;left:29%;width:15vw;opacity:.34}
 .copy-cloud-low{bottom:1%;left:0;width:20vw;opacity:.47}
 .site-header{height:52px}.site-header .brand{width:155px}.desktop-nav{gap:clamp(9px,3vw,30px)}
 .side-copy{top:52px;transform:none;width:42%;max-height:calc(100dvh - 65px);overflow:auto;overscroll-behavior:contain;pointer-events:auto}
 .side-copy h2,.craft-copy h2{font-size:clamp(21px,5.8vh,31px);margin:5px 0 7px}.side-copy h2 br{display:none}
 .side-copy>p:not(.eyebrow),.craft-copy #craft-description{font-size:12px;line-height:1.5;min-height:0}
 .craft-steps{margin:6px 0}.craft-steps button{height:28px;width:32px;font-size:18px}
 .craft-copy h3,.craft-copy .layer-note{margin:4px 0}.side-copy .text-button,.return-button{margin-top:5px;padding:4px 8px}
 .gesture-control{bottom:3%;right:4%}.gesture-pill{min-height:33px;padding:4px 10px}
}
