/* Gold gate belongs to the real Portal. Home expands over its real snapshot. */
.portal-opening-ring{position:fixed;width:260px;height:260px;border:1px solid #e8bd77;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;background:transparent;z-index:9999}
::view-transition-group(root){animation-duration:650ms;animation-timing-function:cubic-bezier(.22,.61,.36,1)}
::view-transition-old(root){animation:portal-depth 650ms ease-out both;opacity:1;mix-blend-mode:normal}
::view-transition-new(root){animation:portal-home-reveal 650ms cubic-bezier(.22,.61,.36,1) both;mix-blend-mode:normal}
@keyframes portal-depth{from{transform:scale(1)}to{transform:scale(1.025)}}
@keyframes portal-home-reveal{from{clip-path:circle(0 at var(--portal-x,70%) var(--portal-y,45%))}to{clip-path:circle(150vmax at var(--portal-x,70%) var(--portal-y,45%))}}
@media(prefers-reduced-motion:reduce){
 .portal-opening-ring{display:none}
 ::view-transition-group(root){animation-duration:120ms}
 ::view-transition-old(root){animation:portal-fade-out 120ms linear both}
 ::view-transition-new(root){animation:home-fade-in 120ms linear both}
}
@keyframes portal-fade-out{from{opacity:1}to{opacity:0}}
@keyframes home-fade-in{from{opacity:0}to{opacity:1}}

/* Reverse reveal: the actual working screen shrinks over the real Portal. */
html[data-portal-exit]::view-transition-old(root){animation:portal-home-close 650ms cubic-bezier(.22,.61,.36,1) both;z-index:2;mix-blend-mode:normal}
html[data-portal-exit]::view-transition-new(root){animation:none;opacity:1;z-index:1;mix-blend-mode:normal}
@keyframes portal-home-close{from{clip-path:circle(150vmax at var(--portal-x,70%) var(--portal-y,45%))}to{clip-path:circle(0 at var(--portal-x,70%) var(--portal-y,45%))}}
@media(prefers-reduced-motion:reduce){
 html[data-portal-exit]::view-transition-old(root){animation:portal-fade-out 120ms linear both}
 html[data-portal-exit]::view-transition-new(root){animation:home-fade-in 120ms linear both}
}
