/* The story is HTML text over a static starfield: no video or extra GPU context. */
#sw48-opening{position:fixed;inset:0;z-index:20000;overflow:hidden;background:#020408;color:#ffe269;font-family:'Segoe UI','Microsoft YaHei',sans-serif;isolation:isolate;outline:0;touch-action:manipulation;}
#sw48-opening *{box-sizing:border-box;}
#sw48-opening[data-ready="true"]:not([data-stage="0"]){background:transparent;}
.opening-prologue{position:absolute;inset:0;display:grid;place-items:center;color:#70c8e9;padding:24px;font-size:clamp(23px,3.5vw,42px);font-weight:400;line-height:1.8;animation:sw48-crawl-prologue 5s linear both;pointer-events:none;}
.opening-prologue p{margin:0;min-width:0;max-width:100%;overflow-wrap:anywhere;text-align:start;}
.opening-static-prologue{display:none;}
@keyframes sw48-crawl-prologue{0%{opacity:0}18%,76%{opacity:1}100%{opacity:0}}
.opening-stars{position:absolute;inset:0;z-index:-1;background-image:radial-gradient(1px 1px at 17px 37px,#b5cad7 70%,transparent),radial-gradient(1px 1px at 83px 102px,#c0c6cd 70%,transparent),radial-gradient(1px 1px at 211px 71px,#6c879b 70%,transparent),radial-gradient(1.5px 1.5px at 165px 223px,#a6b7c5 60%,transparent);background-size:293px 317px,379px 431px,487px 367px,701px 557px;opacity:.65;}
.opening-logo{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;animation:sw48-crawl-logo 10s linear both;pointer-events:none;}
.opening-logo strong{font:900 clamp(76px,16vw,200px)/1 Arial,sans-serif;letter-spacing:-.06em;color:#020408;-webkit-text-stroke:2px #ffe269;}

.opening-perspective{position:absolute;inset:0 0 80px;perspective:480px;perspective-origin:50% 28%;overflow:hidden;mask-image:linear-gradient(transparent 2%,#000 23%,#000 95%,transparent);}
.opening-crawl{position:absolute;top:100%;left:50%;width:min(680px,82vw);margin:0;padding:0 0 35px;transform-origin:50% 0;transform:translateX(-50%) rotateX(24deg);font-size:clamp(22px,2.7vw,34px);font-weight:600;line-height:1.9;text-align:justify;overflow-wrap:anywhere;animation:sw48-crawl-travel 68s linear both;will-change:transform;}


.opening-crawl p{margin:0 0 1.5em;}


.opening-controls{position:absolute;bottom:max(18px,env(safe-area-inset-bottom));left:max(20px,env(safe-area-inset-left));right:max(20px,env(safe-area-inset-right));display:flex;align-items:center;justify-content:flex-end;gap:12px;color:#8b9daa;font-size:13px;}
.opening-controls button,.opening-wait button{padding:12px 18px;min-height:44px;border:1px solid #a6924b80;border-radius:2px;background:#090c11;color:#e9d991;font:inherit;cursor:pointer;}
.opening-controls button:hover,.opening-wait button:hover{border-color:#ffe269;color:#fff1ab;}
.opening-controls button:focus-visible,.opening-wait button:focus-visible{outline:2px solid #ffe269;outline-offset:4px;}
.opening-wait{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;color:#c8d6df;padding:24px;}
#sw48-opening[data-paused=true] .opening-prologue,#sw48-opening[data-paused=true] .opening-logo,#sw48-opening[data-paused=true] .opening-crawl{animation-play-state:paused;}
@keyframes sw48-crawl-logo{0%{opacity:1;transform:scale(1.4)}80%{opacity:1;transform:scale(.08)}100%{opacity:0;transform:scale(.025)}}
@keyframes sw48-crawl-travel{from{transform:translateX(-50%) rotateX(24deg) translateY(0)}to{transform:translateX(-50%) rotateX(24deg) translateY(calc(-100% - 110vh))}}
@media(max-width:600px){.opening-crawl{width:84vw;font-size:clamp(21px,5.6vw,27px);line-height:1.85}.opening-perspective{perspective:380px;bottom:80px}.opening-controls{font-size:12px}.opening-controls>span{max-width:90px;}.opening-logo strong{-webkit-text-stroke:1.5px #ffe269;}}
@media(orientation:landscape) and (max-height:500px){.opening-crawl{width:min(590px,76vw);font-size:22px;line-height:1.75}.opening-perspective{bottom:58px;perspective:420px}.opening-controls{bottom:max(8px,env(safe-area-inset-bottom));}.opening-controls button{padding:8px 14px;}}
@media(prefers-reduced-motion:reduce){.opening-logo{display:none}.opening-perspective{perspective:none;overflow:auto;mask-image:none;padding:24px 0;}.opening-crawl{position:relative;top:auto;left:auto;width:min(680px,86vw);margin:auto;font-size:clamp(18px,4.5vw,26px);transform:none;animation:none;will-change:auto;}.opening-prologue{display:none}.opening-static-prologue{display:block;color:#70c8e9;font-weight:400;margin-bottom:2em}}
