/* Keep the door controls above the station navigation until Home is entered. */
.portal[data-entry-state="ready"] .portal-entry,.portal[data-entry-state="entering"] .portal-entry{z-index:100;isolation:isolate}
.portal:is([data-entry-state="ready"],[data-entry-state="entering"]){z-index:60}
body:has(.portal:is([data-entry-state="ready"],[data-entry-state="entering"])) .workbench{visibility:hidden}
.portal .portal-entry [data-portal-skip]{position:absolute;z-index:12;pointer-events:auto;min-height:44px;bottom:max(1rem,env(safe-area-inset-bottom));right:clamp(1rem,4vw,4rem);left:auto}
body:has(.portal[data-entry-state="ready"]) [data-desk-lip],body:has(.portal[data-entry-state="entering"]) [data-desk-lip]{visibility:hidden;pointer-events:none}
.site-preview-directory{font-family:Body,system-ui,sans-serif}
/* Keep the invitation below the mark and its Enter label on compact screens.
   Both sliced halves retain their native transform/door animation. */
@media(max-width:800px) and (min-height:501px){
 .portal .portal-entry{--entry-mark-size:min(58vw,26svh,260px);--entry-mark-top:clamp(24px,6svh,64px)}
 .portal .portal-entry .entry-identity{top:var(--entry-mark-top);width:var(--entry-mark-size)}
 .portal .portal-entry .entry-invitation{top:calc(var(--entry-mark-top) + var(--entry-mark-size)*427/452 + 64px)}
}
@media(max-height:500px){
 .portal .portal-entry .entry-identity{left:25%;top:24px;width:min(32vw,42svh);max-width:none}
 .portal .portal-entry .entry-invitation{left:72%;top:24px;width:44%;max-width:400px}
 .portal .portal-entry .entry-invitation .entry-name{margin-top:0}
 .portal .portal-entry .entry-invitation>p:not(.entry-name){font-size:.7rem;line-height:1.45}
}
/* The entrance owns focus until the shutters and film have finished. */
body:has(.portal:is([data-entry-state="ready"],[data-entry-state="entering"])) [data-whop-choice]{visibility:hidden;pointer-events:none}
@media(max-width:500px) and (max-height:500px) and (orientation:portrait){
 .portal .portal-entry .entry-identity{left:50%;top:16px;width:min(42vw,24svh)}
 .portal .portal-entry .entry-invitation{left:50%;top:calc(16px + min(42vw,24svh)*427/452 + 64px);width:92%}
}
@media(max-width:800px) and (min-height:700px){
 .portal .portal-entry{--entry-mark-top:max(24px,calc((100svh - var(--entry-mark-size)*427/452 - 290px)/2))}
}
/* Reveal the moving picture through the physical gap between the shutters. */
.portal-entry .entry-film{z-index:0}
.portal[data-native-entry="revealing"] .entry-film{opacity:1}
.portal-entry .entry-shutter{z-index:1}
.portal-entry .entry-light{z-index:2}
.portal-entry .entry-identity,.portal-entry .entry-invitation{z-index:3}
