/* Scope only the approved portal. Earlier chapters keep their exact styles. */
body.portal-view #visual{inset:0!important;width:100%!important;height:100%!important;mask-image:none!important}
body.portal-view #visual::after{display:none}
body.portal-view .infra-kicker,body.portal-view .infra-bottom{visibility:hidden!important}
body.portal-close .sequence-footer{z-index:12;background:transparent}
body.portal-close .sequence-footer nav{opacity:.75}
#infrastructure-section:focus{outline:none}
@media(orientation:landscape) and (max-height:520px){body.portal-view #stage{min-height:0}}

/* Continuous expansion of the original mobile art viewport during the raccord. */
@media(max-width:800px) and (min-height:521px){body.portal-view #visual{inset:auto 0 auto!important;top:calc(46% * (1 - var(--portal-expand,1)))!important;height:calc(35% + 65% * var(--portal-expand,1))!important}}

/* QA75-012: the same unmasked physical room is visible on both sides of the
   raccord. Do not toggle the floor/wall shading with the portal CSS class. */
body[data-chapter=infrastructure]:not([data-study]) #visual{mask-image:none!important}
body[data-chapter=infrastructure] #visual::after{display:none}
/* Retain the approved portrait edge treatment. Its strength follows the existing
   continuous viewport expansion; the physical scene itself never changes opacity. */
@media(max-width:800px) and (min-height:521px){
 body[data-chapter=infrastructure] #visual::after{display:block;opacity:calc(1 - var(--portal-expand,0))}
}
