/* Open chapter keeps its paired view when space allows. Small screens choose
   a whole photograph or its detail; neither is compressed to make room. */
#field-gallery .gallery-stage{container-type:normal;background:#eae5db}
#field-gallery .gallery-stage::before{left:61%;background:#82776325}
#field-gallery .gallery-images{bottom:58px}
#field-gallery .gallery-spread{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:7%;padding:42px 4% 20px}
#field-gallery .chapter-overview{gap:12px}
#field-gallery .gallery-title{font-family:'DM Sans',sans-serif;font-style:normal;font-size:clamp(21px,2.05vw,33px);font-weight:400;letter-spacing:-.04em;line-height:1.12}
#field-gallery .chapter-title{font-family:'Instrument Serif',serif;font-size:clamp(26px,2.6vw,38px);line-height:1.06}
#field-gallery .chapter-detail{gap:18px}
#field-gallery .detail-window{width:min(100%,calc((var(--gallery-height) - 285px)*1.3333));min-width:0}
#field-gallery .chapter-topline{top:15px;left:4%;right:4%;font-size:10px}
#field-gallery .chapter-topline,#field-gallery .gallery-category,#field-gallery .chapter-label{color:#655e52}
#field-gallery .gallery-category,#field-gallery .chapter-label{font-size:10px;line-height:1.5}
#field-gallery .gallery-detail{font-size:13px;line-height:1.6;color:#615a4f}
#field-gallery .gallery-controls{height:58px;padding:7px 4%;gap:8px;background:#eee9df}
#field-gallery .gallery-play-note{color:#655e52}
#field-gallery .gallery-controls button{min-width:44px;min-height:44px;padding:8px 10px}
#field-gallery .gallery-controls [data-gallery-play]{min-width:65px}
#field-gallery .gallery-controls>div{display:flex;gap:8px}
#field-gallery .gallery-view{display:none}
#field-gallery .gallery-expand{position:absolute;z-index:4;top:42px;left:calc(57% - 40px);width:40px;height:40px;display:grid;place-items:center;border:1px solid #a3998860;background:#f8f7f3ed;color:#554937;font-size:20px;cursor:pointer;opacity:.85}
#field-gallery .gallery-expand:hover{opacity:1;background:#fff}
#field-gallery[data-compact=true] .gallery-toolbar{flex-wrap:nowrap;gap:10px;padding:8px 0}
#field-gallery[data-compact=true] .gallery-filters{min-width:0;flex:1;overflow-x:auto;flex-wrap:nowrap;gap:4px;padding:2px 0;scrollbar-width:thin}
#field-gallery[data-compact=true] .gallery-filters button{flex:none;font-size:11px;padding:8px}
#field-gallery[data-compact=true] .gallery-controls-top{width:auto;flex:none}
#field-gallery[data-compact=true] .gallery-controls-top button{display:none}
#field-gallery[data-compact=true] .gallery-count{font-size:11px;padding:0;margin:0}
#field-gallery[data-compact=true] .gallery-stage::before{display:none}
#field-gallery[data-compact=true] .gallery-spread{display:block;padding:33px 5% 13px}
#field-gallery[data-compact=true] .chapter-overview{display:flex;height:100%;gap:12px}
#field-gallery[data-compact=true] .chapter-detail{display:none;height:100%;padding:0;border:0}
#field-gallery[data-compact=true] .gallery-title{font-size:23px;line-height:1.1;margin-top:4px}
#field-gallery[data-compact=true] .chapter-topline{top:10px;left:5%;right:5%;font-size:9px}
#field-gallery[data-compact=true] .chapter-title{font-size:26px;margin:5px 0 8px}
#field-gallery[data-compact=true] .gallery-detail{font-size:12px;line-height:1.5}
#field-gallery[data-compact=true] .chapter-note{flex:none}
#field-gallery[data-compact=true] .detail-window{margin:0 auto;width:min(100%,calc((var(--gallery-height) - 245px)*1.3333));min-width:0;flex:none}
#field-gallery[data-compact=true][data-detail=true] .chapter-overview{display:none}
#field-gallery[data-compact=true][data-detail=true] .chapter-detail{display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:16px}
#field-gallery[data-compact=true] .gallery-view{display:block;white-space:nowrap}
#field-gallery[data-compact=true] .gallery-play-note{display:none}
#field-gallery[data-compact=true] .gallery-controls{padding:7px 4%;gap:4px}
#field-gallery[data-compact=true] .gallery-controls [data-gallery-play]{margin-right:auto;min-width:50px;text-align:left}
#field-gallery[data-compact=true] .gallery-controls>div{gap:4px}
#field-gallery[data-compact=true] .gallery-expand{left:auto;right:5%;top:35px}
/* On a phone, the navigation stays beside the photograph while the visitor
   scrolls into it. Clip is intentional: hidden would trap sticky positioning
   inside an extra scroll container. Enlarged-text reading mode stays in flow. */
@media(max-width:700px){
 #field-gallery[data-reading=false] .gallery-stage{overflow:clip}
 #field-gallery[data-reading=false] .gallery-stage::before{display:block;position:relative;inset:auto;width:0;height:calc(100% - 58px);background:none}
 #field-gallery[data-reading=false] .gallery-controls{position:sticky;top:auto;bottom:env(safe-area-inset-bottom,0px);isolation:isolate}
}
#field-gallery[data-landscape=true] .chapter-overview,#field-gallery[data-landscape=true][data-detail=true] .chapter-detail{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:6%;align-items:center}
#field-gallery[data-landscape=true] .gallery-picture{height:100%}
#field-gallery[data-landscape=true] .detail-window{width:min(100%,calc((var(--gallery-height) - 104px)*1.3333));margin:0 auto}
#field-gallery[data-landscape=true] .chapter-title{font-size:24px}
#field-gallery[data-landscape=true] .gallery-expand{right:46%;top:35px}
#field-gallery[data-landscape=true] .gallery-spread{padding-top:30px;padding-bottom:12px}
.photo-lightbox{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;border:0;margin:0;padding:0;background:#eeebe3;color:#29312b;overflow:hidden;grid-template-rows:64px minmax(0,1fr) 64px}
.photo-lightbox[open]{display:grid}.photo-lightbox::backdrop{background:#eeebe3}
.photo-lightbox-bar,.photo-lightbox-controls{display:flex;align-items:center;justify-content:space-between;padding:8px clamp(18px,4vw,60px);font-size:12px}
.photo-lightbox button{min-width:44px;min-height:44px;background:none;border:0;color:inherit;cursor:pointer;font:inherit}
.photo-lightbox figure{margin:0;padding:10px clamp(18px,4vw,60px) 0;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:12px;min-height:0}
.photo-lightbox img{width:100%;height:100%;min-height:0;object-fit:contain}
.photo-lightbox figcaption{text-align:center;font-size:13px;line-height:1.4}.photo-lightbox-controls button{font-size:24px}
.photo-lightbox :focus-visible{outline:2px solid #9c5138;outline-offset:2px}
@media(max-height:500px){.photo-lightbox{grid-template-rows:48px minmax(0,1fr) 48px}.photo-lightbox figure{padding-top:0;gap:6px}.photo-lightbox figcaption{font-size:11px}}
/* The existing three material labels now reveal their role in the plan. */
.assembly-sequence button{font:inherit;color:inherit;background:none;border:0;border-bottom:1px solid transparent;padding:8px 0;min-height:44px;cursor:pointer;text-align:left;white-space:nowrap}
.assembly-sequence button:not(:disabled):hover,.assembly-sequence button[aria-pressed=true]{border-bottom-color:#9c5138;color:#914d35}
.assembly-sequence button:disabled{cursor:default;color:inherit;opacity:1}
.assembly-note{margin:2px 5% 17px;max-width:52ch;min-height:3.3em;font:13px/1.65 'DM Sans',sans-serif;color:#655e52}
.assembly-sequence button:focus-visible{outline:2px solid #9c5138;outline-offset:3px}
@media(max-width:700px){.assembly-sequence{justify-content:space-between}.assembly-sequence button{font-size:11px}.assembly-note{font-size:12px;margin-bottom:12px}}
.gallery-strip button:focus-visible{outline-offset:-3px;opacity:1}
