:root { color-scheme:dark; font-family:Arial,Helvetica,sans-serif; background:#020407; color:#dbd9d5; }
* { box-sizing:border-box; }
html,body { margin:0; width:100%; height:100%; overflow:hidden; }
main { position:relative; width:100%; height:100svh; height:100dvh; overflow:clip; isolation:isolate; }
button { font:inherit; -webkit-tap-highlight-color:transparent; touch-action:manipulation; cursor:pointer; border:0; padding:0; background:none; color:inherit; }
.scene { position:absolute; inset:0; overflow:hidden; transition:opacity 1.35s ease, transform 1.8s ease, filter 1.6s ease; }
.backdrop { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; pointer-events:none; user-select:none; }
.wall { object-position:79.3% 43.5%; }
/* Dim the photographed stars only; preserve the original horizon and lake.
   The interactive constellation is a separate, unmasked layer. */
.sky {
 object-position:50% 85%;
 -webkit-mask-image:linear-gradient(to bottom, #00000038 0%, #00000045 68%, #00000088 82%, #000 93%);
 mask-image:linear-gradient(to bottom, #00000038 0%, #00000045 68%, #00000088 82%, #000 93%);
}
#threshold { opacity:1; z-index:2; transform-origin:79.3% 43.5%; }
#keyhole { position:absolute; left:79.3%; top:43.5%; width:var(--lock-width,70px); height:var(--lock-height,148px); min-width:44px; min-height:44px; transform:translate(-50%,-50%); border-radius:45%; }
#keyhole:focus-visible { outline:1px solid #dbb77d; outline-offset:8px; box-shadow:0 0 35px #c7a56855; }
#universe { opacity:0; transform:scale(1.025); }
body[data-scene="universe"] #threshold { opacity:0; transform:scale(1.075); filter:blur(3px); pointer-events:none; }
body[data-scene="universe"] #universe { opacity:1; transform:scale(1); }
#constellation { position:absolute; inset:0; transition:opacity .7s ease; }
.star { position:absolute; left:var(--x); top:var(--y); width:48px; height:48px; transform:translate(-50%,-50%); color:var(--color); outline:none; }
.spark { position:absolute; width:5px; height:5px; left:calc(50% - 2.5px); top:calc(50% - 2.5px); border-radius:50%; background:#fff; box-shadow:0 0 6px 2px var(--color),0 0 22px 5px var(--color); opacity:.8; transition:opacity .7s,transform .7s; animation:breathe 7s ease-in-out infinite; animation-delay:var(--delay); }
.spark::before,.spark::after { content:""; position:absolute; left:50%; top:50%; width:30px; height:1px; transform:translate(-50%,-50%); background:linear-gradient(90deg,transparent,var(--color),#fff,var(--color),transparent); opacity:.6; }
.spark::after { transform:translate(-50%,-50%) rotate(90deg); width:24px; }
.star:first-child .spark { width:7px; height:7px; left:calc(50% - 3.5px); top:calc(50% - 3.5px); opacity:1; box-shadow:0 0 10px 4px var(--color),0 0 30px 12px #8abaff88,0 0 54px 18px #8abaff33; animation-name:nearby; }
.star-label { position:absolute; left:calc(50% + 22px); top:50%; transform:translate(0,-50%); font-size:.875rem; line-height:1.4; letter-spacing:.1em; white-space:nowrap; opacity:0; transition:opacity .45s,transform .45s; pointer-events:none; text-shadow:0 1px 6px #000,0 0 12px #000; }
.star.revealed .star-label,.star:focus-visible .star-label { opacity:1; transform:translate(4px,-50%); }
.star.revealed .spark,.star:focus-visible .spark { opacity:1; transform:scale(1.6); animation:none; }
.star:focus-visible { border-radius:50%; outline:1px solid currentColor; outline-offset:3px; }
.cup { width:38px; height:38px; fill:none; stroke:currentColor; stroke-width:1.1; opacity:.9; filter:drop-shadow(0 0 6px #edb87988); transition:opacity .5s; }
.cafe .spark { top:34px; width:3px; height:3px; }
.cafe .star-label { top:calc(50% + 33px); left:50%; transform:translate(-50%,-50%)!important; }
.cafe.revealed .cup,.cafe:focus-visible .cup { opacity:1; }
.return { position:absolute; top:max(22px,env(safe-area-inset-top)); right:max(26px,env(safe-area-inset-right)); width:48px; height:48px; color:#c7a677; opacity:.75; transition:opacity .4s; }
.return svg { width:42px; height:42px; fill:none; stroke:currentColor; stroke-width:1.15; }
.return-label { position:absolute; top:53px; right:0; font-size:.75rem; letter-spacing:.07em; opacity:0; }
.return:focus-visible { outline:1px solid currentColor; outline-offset:5px; border-radius:50%; opacity:1; }
.return:focus-visible .return-label { opacity:1; }
#destination { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:32px; background:#02040788; animation:arrive 1.5s ease both; }
#destination h1,#destination p { animation:destination-details 1.8s ease both; }
#destination:not([hidden]) .world-header { animation:destination-details 1.9s ease both; }
#destination[hidden] { display:none; }
#destination h1 { font-size:clamp(1.25rem,4vw,2rem); letter-spacing:.22em; font-weight:400; color:var(--destination-color); margin:0 0 22px; }
#destination p { font-size:1rem; color:#b5b4b7; line-height:1.6; margin:0; }
#destination:focus { outline:none; }
body[data-destination] #constellation { opacity:0; pointer-events:none; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#load-error { position:absolute; z-index:3; bottom:10%; width:100%; padding:24px; text-align:center; font-size:1rem; }
@media (hover:hover) and (pointer:fine) {
 .star:hover .star-label { opacity:1; transform:translate(4px,-50%); }
 .star:hover .spark { opacity:1; transform:scale(1.6); animation:none; }
 .star:hover .cup,.return:hover { opacity:1; }
 .return:hover .return-label { opacity:1; }
}
@media (max-aspect-ratio:3/4) {
 .star { left:var(--mx); top:var(--my); }
 .star.label-left .star-label { left:auto; right:calc(50% + 18px); }
 .star-label { font-size:.875rem; letter-spacing:.055em; }
 .return { right:max(18px,env(safe-area-inset-right)); }
}
@media (max-height:480px) { .return { top:12px; right:16px; } .star-label { font-size:.8125rem; letter-spacing:.04em; } }
@keyframes breathe { 0%,100% { opacity:.72; } 50% { opacity:.95; } }
@keyframes nearby { 0%,100% { opacity:.8; } 50% { opacity:1; } }
@keyframes arrive { from { opacity:0; } to { opacity:1; } }
@keyframes destination-details { 0%,30% { opacity:0; } 100% { opacity:1; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; } }

/* The entry is orchestrated as one continuous camera movement. */
body.entering .scene { transition:none; }
.lock-glow { position:absolute; left:79.3%; top:43.5%; width:clamp(180px,26vw,420px); aspect-ratio:1; transform:translate(-50%,-50%); opacity:0; pointer-events:none; background:radial-gradient(ellipse,#f3d19b77, #c79b4333 25%,transparent 68%); }
#destination .world-header { position:absolute; top:0; left:0; right:0; font-family:Baskerville,'Times New Roman',serif; font-synthesis:none; }
#destination p { max-width:34rem; }
body[data-destination] #return { display:none; }
.world-icon:focus-visible,.world-menu-item:focus-visible { outline:1px solid #c6a36d; outline-offset:3px; }
.world-menu-item { width:100%; }
