/* Keep the mobile page clipped beneath its fixed header. */
#pageScroll{display:contents}
@media(max-width:700px){
 html,body{height:100%;overflow:hidden;overscroll-behavior:none;background:#080b12}
 #pageScroll{display:block;position:fixed;inset:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:none;scroll-behavior:smooth;scroll-padding-top:calc(90px + env(safe-area-inset-top,0px));isolation:isolate;-webkit-overflow-scrolling:touch}
 body.modal-open #pageScroll{overflow:hidden}
 .header,.header.scrolled{top:0!important;z-index:40;background:#080b12!important;backdrop-filter:none;-webkit-backdrop-filter:none;transform:none!important}
 /* Opaque overscan also covers the host's top inset while its controls collapse. */
 .header:after{content:'';position:absolute;left:0;right:0;bottom:calc(100% - 1px);height:100svh;background:#080b12;pointer-events:none}
 .brand-veil{z-index:39}
}
.portrait-wall.is-distant .portrait-echo{visibility:hidden!important}

/* One local coordinate system: upright paper crosses the centre of the lid slit. */
@media(max-width:700px){
 .scene .camera,.scene.webgl-ready .camera{opacity:calc(var(--zoom) * (1 - var(--wall)))!important}
 .scene .urn .paper{display:block!important;left:60px;top:-140px;width:180px;height:110px;transform-origin:50% 50%;transform:translate3d(0,calc(var(--mobile-envelope-drop,0) * 320px),0) rotateX(calc(var(--mobile-envelope-land,0) * -90deg))!important;opacity:var(--mobile-envelope-show,0)!important;filter:none;will-change:transform,opacity}
 .scene .urn .paper-bottom{inset:0;width:180px;height:110px;border:0;border-radius:3px;background:url('envelope-art.svg') center/100% 100%!important}
 .scene .urn .paper-top,.scene .urn .paper .envelope-seam{display:none!important}
}

.mobile-envelope-anchor{display:none}
@media(max-width:700px){.mobile-envelope-anchor{display:block;position:absolute;left:60px;top:-140px;width:180px;height:110px;visibility:hidden;pointer-events:none}}
