.ect-gate-curtain {
    position:absolute;inset:0;overflow:hidden;pointer-events:none;isolation:isolate;z-index:7;
    border-radius:inherit;--edge:transparent;--rim:transparent;
    background:radial-gradient(ellipse at center,transparent 45%,var(--edge) 100%);
    box-shadow:inset 0 0 clamp(12px,3.8cqi,64px) var(--rim);
}
.ect-gate-curtain[hidden]{display:none}
.ect-gate-curtain canvas {display:block;width:100%;height:100%}
.ect-gate-curtain[data-state=closing]{--edge:#6927256e;--rim:#b977335c}
.ect-gate-curtain[data-state=last]{--edge:#7f211dac;--rim:#e4845269}
.ect-gate-curtain[data-state=sealed]{--edge:#24121ad6;--rim:#a24e46ae}
.ect-gate-curtain strong {
    position:absolute;inset:34% 0 auto;text-align:center;opacity:0;
    font:800 clamp(35px,7cqi,106px)/1.35 var(--title-face,serif);letter-spacing:.09em;color:#fff1ca;
    text-shadow:0 2px 1px #4a281e,0 4px 22px #28151b,0 0 42px #50251a;
}
@media(prefers-reduced-motion:no-preference){
    .ect-gate-curtain[data-state=closing] strong{animation:ect-web-warning 1.2s both}
    .ect-gate-curtain[data-state=last] strong{animation:ect-web-last 1.2s both;color:#ffddae}
    @keyframes ect-web-warning{0%{opacity:0;transform:translateY(.25em)}22%,65%{opacity:1;transform:none}100%{opacity:0;transform:translateY(-.14em)}}
    @keyframes ect-web-last{0%{opacity:0;transform:scale(1.15)}22%,65%{opacity:1;transform:none}100%{opacity:0;transform:scale(.96)}}
}
/* Each seal changes the light around the battlefield as the exit closes. */
.ect-gate-curtain[data-theme=echo] {--gate-tint:41,77,105;--gate-glow:150,233,222}
.ect-gate-curtain[data-theme=clock] {--gate-tint:104,56,19;--gate-glow:244,191,95}
.ect-gate-curtain[data-theme=portcullis] {--gate-tint:43,50,68;--gate-glow:182,175,148}
.ect-gate-curtain[data-theme=crystal] {--gate-tint:60,41,99;--gate-glow:168,216,255}
.ect-gate-curtain:not([data-theme=web])[data-state=closing] {--edge:rgba(var(--gate-tint),.52);--rim:rgba(var(--gate-glow),.27)}
.ect-gate-curtain:not([data-theme=web])[data-state=last] {--edge:rgba(var(--gate-tint),.82);--rim:rgba(var(--gate-glow),.43)}
.ect-gate-curtain[data-theme=phoenix] {--gate-tint:100,38,27;--gate-glow:255,194,87}
