/* Extend the approved exhibition direction with story-specific traces. */
.artifact-page #model-hit{touch-action:none;left:29%;width:44%;top:20%;height:36%}
.artifact-page .model-tools{top:57%;width:min(480px,46%)}
.artifact-page .model-tools>span{font-size:11px;line-height:1.8;letter-spacing:2px}
.artifact-page .detail-title{top:72%}
.artifact-page .detail-title p{max-width:580px}
.artifact-page .detail-meta .meta-name{font-size:clamp(21px,1.7vw,29px);line-height:1.65}
.artifact-page .detail-meta .meta-value:not(.meta-name){font-size:clamp(16px,1.25vw,20px);line-height:1.8}
.artifact-page .detail-meta{max-width:285px}
.artifact-page .detail-meta .meta-story{font-size:17px}
.book-views{margin-top:9px;gap:7px!important}
.book-views button{border-color:transparent;background:transparent;min-width:44px;padding:3px 8px}
.book-views button[aria-pressed=true]{border-bottom-color:#c9a46a99;color:#edd7af;background:#82423422}
.previous-story{border:0!important;padding:0!important;background:transparent!important;margin-top:10px;font:12px/2 ExhibitionSerif,serif!important;color:#ac9471;letter-spacing:1px}
.theme-song .detail-title{top:74%}
.motif-paper .artifact-traces{background:repeating-linear-gradient(0deg,transparent 0 31px,#b49a7429 32px 33px);mask-image:radial-gradient(ellipse,#000,transparent 66%);transform:rotate(-7deg)}
.motif-paper .artifact-traces i{display:none}
.motif-wood .artifact-traces{background:repeating-linear-gradient(91deg,transparent 0 38px,#c4a07830 39px 40px);mask-image:radial-gradient(ellipse,#000,transparent 67%)}
.motif-fabric .artifact-traces,.motif-weave .artifact-traces{background:repeating-linear-gradient(87deg,transparent 0 37px,#c4ad7a22 38px 39px),repeating-linear-gradient(3deg,transparent 0 37px,#c4ad7a22 38px 39px);mask-image:radial-gradient(ellipse,#000,transparent 68%)}
.motif-sound .artifact-traces i,.motif-orbit .artifact-traces i{width:55%;height:75%;top:12%;left:22%;border-radius:50%;transform:rotate(-16deg)}
.motif-sound .artifact-traces i:nth-child(2),.motif-orbit .artifact-traces i:nth-child(2){scale:1.2;opacity:.5}
.motif-sound .artifact-traces i:nth-child(3),.motif-orbit .artifact-traces i:nth-child(3){scale:1.45;opacity:.25}
.motif-sound .artifact-traces i:nth-child(4){display:none}
.motif-orbit .artifact-traces{transform:perspective(500px) rotateX(57deg) rotate(-20deg)}
.motif-signal .artifact-traces{background:repeating-radial-gradient(ellipse at 50% 50%,transparent 0 38px,#ba9e723d 39px 40px);mask-image:radial-gradient(ellipse,#000,transparent 65%)}
.motif-forest .artifact-traces{background:repeating-linear-gradient(76deg,transparent 0 68px,#94967a29 69px 71px,transparent 72px 120px);mask-image:radial-gradient(ellipse,#000,transparent 65%)}
.motif-rail .artifact-traces i{width:70%;height:100%;top:0;left:15%;border-top:0;border-bottom:0;transform:perspective(400px) rotateX(60deg)}
.motif-rail .artifact-traces i:nth-child(2){width:50%;left:25%}.motif-rail .artifact-traces i:nth-child(n+3){display:none}
.motif-film .artifact-traces i{width:70%;height:60%;left:15%;top:20%;border-width:8px 1px;border-top-style:dashed;border-bottom-style:dashed;transform:rotate(-9deg)}
.motif-ink .artifact-traces{background:linear-gradient(170deg,transparent 43%,#c2a06b22 44%,transparent 44.4%);transform:rotate(-7deg)}
.hall .tick-row{gap:7px}.hall .tick-row button{width:3px}
.gallery-fallback{overflow:auto;grid-template-columns:repeat(6,minmax(0,1fr));pointer-events:auto;gap:14px;inset:17% 6% 17%}
.gallery-fallback button{min-height:150px;display:grid;place-items:center}
.gallery-fallback img{max-width:90%;max-height:110px}
.gallery-fallback small{position:static;opacity:1;font-size:12px;line-height:1.6}
.gallery-fallback p{display:none}
.no-webgl .hall-center{display:none}
.artifact-load-fallback img{filter:drop-shadow(0 18px 20px #0005)}
.reconstruction{overflow:hidden;pointer-events:none}
.reconstruction canvas{display:block;width:100%;height:100%;filter:drop-shadow(0 0 5px #cba15c30)}
#model-hit[aria-busy=true]{cursor:progress}
#model-status button{margin-left:8px;min-height:28px;padding:3px 10px;font-size:11px}
.video-cover[hidden]{display:none!important}
/* Keep centering independent of the entrance/re-entry transform animation. */
.hall .hall-center{translate:-50% -50%;transform:none}
.hall .hall-hint,.hall .exhibit-footer{translate:-50% 0;transform:none}
body[data-route=hall] .hall-center,body[data-route=hall] .hall-hint,body[data-route=hall] .exhibit-footer{animation:gallery-caption 2.8s both}
@keyframes gallery-caption{0%,40%{opacity:0;transform:translateY(8px)}100%{opacity:1;transform:none}}
@media(max-width:1000px) and (min-width:761px){.artifact-page .detail-meta{width:25vw}.artifact-page .detail-meta .meta-name{font-size:20px}.artifact-page .detail-meta .meta-value:not(.meta-name){font-size:16px}.artifact-page .detail-meta .meta-story{font-size:15px}}
@media(max-width:760px){
 .artifact-page .detail-meta{top:15%;left:6%;width:88%;max-width:none;gap:9px 17px}
 .artifact-page .detail-meta .meta-name{font-size:19px;line-height:1.55}
 .artifact-page .detail-meta .meta-value:not(.meta-name){font-size:12px;line-height:1.8}
 .artifact-page .detail-meta .meta-story{font-size:12px}
 .artifact-page #model-hit{left:6%;width:88%;top:33%;height:25%}
 .artifact-page .model-tools{top:58%;width:90%}
 .artifact-page .model-tools>span{font-size:9px}
 .artifact-page .detail-title{top:74%;width:92%;left:4%;transform:none}
 .artifact-page .detail-title h1{font-size:26px;line-height:1.6;letter-spacing:2px}
 .artifact-page .detail-title p{font-size:11px;line-height:1.9;margin-top:10px}
 .theme-song .detail-title{top:77%}
 .theme-song .detail-title p{margin-top:3px}
 .book-views{margin-top:6px}
 .book-views button{height:22px;font-size:9px}
 .reference-photo img{height:clamp(230px,65vw,380px)}
 .reference-heading p{font-size:11px;line-height:1.9}
 .gallery-fallback{grid-template-columns:repeat(2,minmax(0,1fr))}
 .hall .tick-row{gap:4px}.hall .tick-row button{width:2px}.hall .exhibit-footer{gap:14px}
}
@media(prefers-reduced-motion:reduce){.hall-center,.hall-hint,.exhibit-footer{animation:none!important}}

.hall.hall-reentry .hall-center,.hall.hall-reentry .hall-hint,.hall.hall-reentry .exhibit-footer{animation:soft-reveal .45s both}

@media(max-height:800px) and (min-width:761px){.artifact-page .detail-title{top:68%}.artifact-page .detail-scroll{bottom:12px}.artifact-page .detail-scroll:after{height:18px;margin-top:8px}}

@media(min-width:761px){.theme-song .detail-title{top:72%}.theme-song .detail-title h1{line-height:1.25;margin:12px 0 0}.theme-song .detail-title p{margin-top:12px}}

/* Persistent sound control remains outside route replacement. */
.music-toggle{position:fixed;right:4.5%;bottom:76px;z-index:80;display:flex;align-items:center;justify-content:center;gap:10px;min-width:102px;min-height:44px;padding:10px 15px;border:1px solid #b58b4e66;border-radius:24px;background:#291c1dd9;backdrop-filter:blur(10px);color:#d7bd8c;font-size:11px;letter-spacing:1px;box-shadow:0 4px 20px #0002}
.music-toggle:focus-visible{outline:2px solid #e1bf80;outline-offset:4px}.music-wave{position:relative;display:flex;gap:3px;align-items:center;height:18px;width:19px}.music-wave i{display:block;width:2px;height:7px;background:currentColor;transform-origin:center}.music-wave i:nth-child(2){height:15px}.music-wave i:nth-child(3){height:11px}.music-wave i:nth-child(4){height:6px}.music-toggle[data-state=playing] .music-wave i{animation:music-breathe 1.8s ease-in-out infinite alternate}.music-wave i:nth-child(2){animation-delay:-.8s!important}.music-wave i:nth-child(3){animation-delay:-.4s!important}.music-toggle[data-state=off]{color:#a08f78}.music-toggle[data-state=off] .music-wave:after{content:'';position:absolute;width:25px;height:1px;left:-3px;top:8px;background:currentColor;transform:rotate(-45deg)}
@keyframes music-breathe{from{transform:scaleY(.45)}to{transform:scaleY(1)}}
@media(max-width:760px){.music-toggle{right:14px;bottom:calc(12px + env(safe-area-inset-bottom,0px));width:44px;min-width:44px;padding:10px}.music-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.intro .site-foot{padding-right:48px}}
@media(prefers-reduced-motion:reduce){.music-toggle .music-wave i{animation:none!important}}

/* Pending local hall review: photos remain opaque; caption shares WebGL depth. */
body[data-route="hall"] #scene{mask-image:none;-webkit-mask-image:none}
body:not(.no-webgl) .hall-caption-copy{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}

.artifact-name-line{display:block;white-space:nowrap;word-break:keep-all}.story-copy p{line-break:strict}

/* Mobile detail: variable-height copy and controls share normal flow, never overlap. */
@media(max-width:760px){
 .artifact-page .detail-hero{height:auto;min-height:max(650px,100svh);padding-bottom:32px}
 .artifact-page .detail-meta{top:max(97.5px,15svh)}
 .artifact-page #model-hit{top:max(214.5px,33svh);height:max(162.5px,25svh)}
 .artifact-page .model-tools{position:relative;top:auto;left:auto;translate:none;transform:none;width:90%;margin:0 auto;padding-top:max(377px,58svh)}
 .artifact-page .model-tools>span{display:block;line-height:1.9;overflow-wrap:anywhere}
 .artifact-page .detail-title{position:relative;top:auto;left:auto;width:92%;margin:28px auto 0;transform:none}
 .artifact-page .detail-title>.tiny{display:block;line-height:1.8}
 .artifact-page .detail-title h1{margin:14px 0 10px;font-size:26px;line-height:1.6}
 .artifact-page .detail-title p{margin:10px 0 0;padding:0 12px;font-size:11px;line-height:1.9;overflow-wrap:anywhere}
 .artifact-page .detail-scroll{position:relative;top:auto;bottom:auto;left:auto;transform:none;display:block;width:88%;max-width:340px;margin:24px auto 0;font-size:9px;line-height:1.9;letter-spacing:1.5px}
 .artifact-page .detail-scroll:after{height:18px;margin:12px auto 0}
}
