/* Transparent image edges, opaque portal worlds, and an isolated star cursor. */
#discovery-lens[hidden]{display:none}
#frame-expand[hidden]{display:none}
body.frame-focus .camera-cursor{transform:scale(1.65)!important}
.camera-cursor canvas{mask-image:radial-gradient(ellipse,#000 62%,transparent 99%)}
.secret-scene{padding:0;border:0;background:transparent;border-radius:0;box-shadow:none;cursor:pointer;mask-image:radial-gradient(ellipse at center,#000 46%,#000d 65%,transparent 99%)}
.secret-scene>img{display:block;will-change:translate,scale}
.emblem img,.welcome-emblem{mask-image:radial-gradient(ellipse,#000 76%,transparent 100%)}
#manifestation{width:min(94vw,151.1vh,1600px);height:auto;max-height:none;mask-image:radial-gradient(ellipse closest-side,#000 50%,#000d 72%,transparent 100%);box-shadow:none;pointer-events:auto;cursor:pointer}
.energy-field{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;mix-blend-mode:screen;z-index:3}
#preview-energy{z-index:1}.preview-controls{z-index:4}
[data-energy]:focus-visible{outline:2px solid #eecb85;outline-offset:8px}
.gesture-gateway{isolation:isolate;height:270px;filter:drop-shadow(0 0 28px #d4ba6938)}
.gesture-gateway>img{z-index:1;pointer-events:none;animation:none!important;mask-image:radial-gradient(circle,#000 66%,#000b 82%,transparent 100%)}
.vortex-interior{position:absolute;inset:11%;overflow:hidden;border-radius:50%;background:#03080e;pointer-events:none;z-index:0;isolation:isolate}
.vortex-disc{display:block;width:100%;height:100%;transform:scale(1.06);will-change:transform}
.portal-spin{position:absolute;inset:0;border:0;border-radius:50%;background:transparent;padding:0;cursor:pointer;z-index:2}
.portal-spin:focus-visible{outline:2px solid #ffe5a2;outline-offset:4px}
.portal-spin[aria-pressed=true]{box-shadow:inset 0 0 28px #b7e7d82b}
.gesture-gateway .vortex-interior{left:9%;right:auto;top:9%;bottom:auto;width:82%;height:auto;aspect-ratio:1}
.gesture-gateway>a{position:relative;z-index:3;background:transparent;box-shadow:none}
.gesture-gateway>p{z-index:3;pointer-events:none;bottom:-1.2rem}
.portal-gate{opacity:1!important}
.portal-gate .portal-art,.portal-gate.open .portal-art{z-index:1;animation:none!important;filter:drop-shadow(0 0 26px #e9b25788);mask-image:radial-gradient(circle,#000 63%,#000d 81%,transparent 100%)}
.portal-gate:after,.portal-gate:before{display:none!important}
.portal-centre{position:relative;z-index:3;pointer-events:auto;text-shadow:0 2px 14px #02050b,0 1px 3px #000}
.portal-centre a{pointer-events:auto;background:#02060b3b}
.portal-gate.open,.universe-awake .portal-gate{filter:none}
.portal-ring{will-change:transform}
.star-cursor-art{position:absolute;inset:-4%;width:108%;height:108%;object-fit:contain;opacity:0;transform:scale(.55);transition:opacity .3s,transform .5s;filter:drop-shadow(0 0 5px #fff0aa) drop-shadow(0 0 14px #69dacf)}
body.star-cursor #cinema-cursor{width:130px;height:104px;margin:-52px 0 0 -65px}
body.star-cursor #cinema-cursor .camera-cursor,body.star-cursor #cinema-cursor .spot-cursor,body.star-cursor #cinema-cursor .clapper-cursor,body.star-cursor #cinema-cursor .morph-orbit{display:none!important}
body.star-cursor .star-cursor-art{opacity:1;transform:scale(1);animation:star-current 1.8s ease-in-out infinite}
@keyframes star-current{0%,100%{filter:drop-shadow(0 0 5px #ffe9a0) drop-shadow(0 0 13px #67d4ce)}50%{filter:drop-shadow(0 0 9px #fff7ce) drop-shadow(0 0 22px #82fff0)}}
@media(max-width:700px){.gesture-gateway{height:240px}.gesture-gateway .vortex-interior{bottom:auto}body.frame-focus .camera-cursor{transform:scale(1.6)!important}.gesture-alternatives{flex-wrap:wrap;justify-content:center}}
@media(prefers-reduced-motion:reduce){.star-cursor-art{animation:none!important}.secret-scene>img,#manifestation{translate:none!important;scale:none!important}}

.gesture-gateway>a:hover{background:transparent;box-shadow:none}
.gesture-alternatives{flex-wrap:wrap;justify-content:center}
#frame-expand{width:auto;flex:0 0 auto;min-height:44px;padding:.7rem 1rem;border:1px solid #685028;border-radius:30px;background:#161006bd;color:#e6c481;font-size:.8rem;letter-spacing:normal}

/* Dialogs live above the animated cursor. Keep their native pointer visible. */
body.welcome-open,body.cursor-active dialog[open],body.cursor-active dialog[open] *{cursor:auto!important}
body.cursor-active dialog[open] button,body.cursor-active dialog[open] a,body.cursor-active dialog[open] [role=button]{cursor:pointer!important}
body.cursor-active dialog[open] input,body.cursor-active dialog[open] textarea{cursor:text!important}
body.cursor-active dialog[open] input[type=checkbox]{cursor:pointer!important}
body.cursor-active dialog[open] button *,body.cursor-active dialog[open] a *{cursor:inherit!important}
.preview-controls{flex-direction:column;align-items:center;gap:.6rem;pointer-events:none}
.preview-controls button{pointer-events:auto}
#preview-hint{margin:0;padding:0 1rem;color:#c6c7ba;font-size:.75rem;text-align:center}
@media(max-width:700px){.preview-controls{bottom:1rem}#preview-hint{font-size:.7rem}}

/* Give the italic descender its own painted area, including the gradient. */
#hero-title{overflow:visible}
#hero-title em{line-height:1.35;padding:0 .12em .2em;margin-bottom:-.12em;overflow:visible}

/* The fourth discovery preserves the complete circular artwork. */
.star-discovery{width:min(900px,96vw);aspect-ratio:1.5;mask-image:none;overflow:visible;margin-block:1rem 4rem}
.star-discovery>img{object-fit:contain;mask-image:none;filter:drop-shadow(0 0 22px #d5a95850);will-change:translate,scale,rotate}
.star-discovery .energy-field{inset:-10%;width:120%;height:120%}

/* Keep the portal hit area still while its image and space interior expand. */
#portal-gate{transform:none!important;filter:none!important;z-index:45;--arrival:0;--credit-glow:0}
#portal-gate .portal-ring,#portal-gate .vortex-interior{transform-origin:center;will-change:transform,scale}
#portal-gate .portal-ring{pointer-events:none;transition:filter 1.4s;mask-image:radial-gradient(circle closest-side,#000 76%,transparent 100%)}
#portal-gate.travelling .portal-ring{filter:drop-shadow(0 0 50px #e9c18499)}
.portal-supernova{position:absolute;left:50%;top:50%;width:min(1100px,78vw);height:min(740px,70vh);transform:translate(-50%,-50%);pointer-events:none;z-index:4;opacity:0;mix-blend-mode:screen;mask-image:radial-gradient(ellipse closest-side,#000 55%,transparent 100%)}
#portal-gate .portal-centre{z-index:5}
#portal-gate .portal-centre.pinned{position:fixed;left:var(--card-left);top:var(--card-top);width:var(--card-width);margin:0;transform:none}
#portal-gate .portal-pretitle{transform:scale(calc(1 + var(--credit-glow)*.08));text-shadow:0 2px 12px #020608,0 0 calc(8px + var(--credit-glow)*24px) #fff0bcb3}
#portal-entry{background:transparent;transition:text-shadow .6s}
#portal-entry>span{display:block;transform:scale(calc(1 + var(--credit-glow)*.16));text-shadow:0 2px 16px #000,0 0 calc(6px + var(--credit-glow)*34px) #ffe1a8aa}
#portal-entry small{position:relative;z-index:6;white-space:nowrap;transform:none;padding:.4rem .7rem;border-radius:20px;background:#040a10b8;text-shadow:0 1px 6px #000}
#portal-entry:hover>span{color:#fff9df;text-shadow:0 0 16px #ffdf85,0 0 42px #eac27aaa}
body.portal-travelling #spotlight-field{opacity:0!important}

/* An upright, unlettered star grows from the spotlight without a hard cut. */
body.star-cursor #cinema-cursor{width:80px;height:80px;margin:-40px 0 0 -40px}
body.star-cursor #cinema-cursor .camera-cursor,body.star-cursor #cinema-cursor .spot-cursor,body.star-cursor #cinema-cursor .morph-orbit{display:block!important;opacity:0!important;transform:scale(.25);filter:blur(3px)}
.star-cursor-art{inset:0;width:100%;height:100%;transform:scale(.35);transition:opacity .7s,transform .12s;filter:drop-shadow(0 0 9px #ffe9a0) drop-shadow(0 0 20px #73cfc6)}
body.star-cursor .star-cursor-art{opacity:.92;transform:scale(var(--portal-star-growth,1));animation:none}
@media(max-width:700px){.star-discovery{aspect-ratio:1.2}.portal-supernova{width:100vw;height:55vh}#portal-entry small{font-size:.68rem}}
@media(prefers-reduced-motion:reduce){.portal-supernova{display:none}.star-discovery>img{rotate:none!important}#portal-gate .portal-ring,#hero-title em{transition:none}}
