/* Brand opening reuses the existing system background; the controller is unchanged. */
.app-launch{
  --launch-anchor:40%;--stage-size:clamp(208px,64vw,270px);--stage-half:clamp(104px,32vw,135px);--coin-size:clamp(158px,46vw,190px);
  position:fixed;z-index:1000;inset:0;display:grid;place-items:center;overflow:hidden;isolation:isolate;touch-action:none;
  background:#041d19;color:#f4e8c9;transition:opacity .45s ease;animation:launch-failsafe 0s 7s forwards
}
.app-launch[hidden]{display:none}
/* Match the shared scene's framing and shade without starting a second renderer. */
.app-launch-scene{position:absolute;top:0;bottom:0;left:50%;width:min(100%,460px);transform:translateX(-50%);overflow:hidden;pointer-events:none;background:#03130f url('/assets/blackhole-cinematic-v1.png') center top / cover no-repeat}
.app-launch-scene::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#020d0999,transparent 65%),linear-gradient(180deg,#02100c08 0%,#02100c12 24%,#03161138 50%,#010c0928 80%,#020c094a)}
.app-launch-content{position:absolute;inset:0;text-align:center;pointer-events:none}
.app-launch-stage{position:absolute;left:50%;top:var(--launch-anchor);width:var(--stage-size);height:var(--stage-size);transform:translate(-50%,-50%);display:grid;place-items:center;perspective:850px;transform-style:preserve-3d}
.app-launch-stage::after{content:"";position:absolute;left:27%;right:27%;bottom:5%;height:14px;border-radius:50%;background:radial-gradient(ellipse,#00000060,transparent 69%);transform:rotateX(56deg);animation:launch-shadow 3.8s ease-in-out infinite}
.app-launch-coin{position:relative;z-index:2;width:var(--coin-size);height:var(--coin-size);transform-style:preserve-3d;animation:launch-coin-enter 1.25s cubic-bezier(.17,.7,.25,1) both,launch-coin-float 3.8s 1.25s ease-in-out infinite}
.app-launch-coin-face{position:absolute;inset:0;transform:translateZ(6px)}
.app-launch-coin-face img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 9px 10px #00130bb3)}
.app-launch-coin-face::after{content:"";position:absolute;inset:5%;border-radius:50%;background:linear-gradient(105deg,transparent 28%,#f8ffed2e 49%,transparent 65%);opacity:0;animation:launch-polish 3.2s .4s ease-in-out infinite}
.app-launch-title{position:absolute;left:0;right:0;top:calc(var(--launch-anchor) + var(--stage-half) + 15px);margin:0;font:500 30px/1.45 "Microsoft YaHei",system-ui,sans-serif;letter-spacing:.28em;padding-left:.28em;color:#f4e8c9;text-shadow:0 2px 10px #001009;animation:launch-copy-enter .8s .2s both}
.app-launch-subtitle{position:absolute;left:0;right:0;top:calc(var(--launch-anchor) + var(--stage-half) + 72px);margin:0;color:#d4dfcd;text-shadow:0 1px 3px #000,0 0 8px #000;font:400 11px/1.5 "Microsoft YaHei",system-ui,sans-serif;letter-spacing:.24em;padding-left:.24em;animation:launch-copy-enter .8s .35s both}
.app-launch-meter{position:absolute;left:50%;bottom:calc(66px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);width:46px;height:1px;background:#e4d5af30;overflow:hidden}
.app-launch-meter::after{content:"";display:block;width:45%;height:100%;background:linear-gradient(90deg,transparent,#e9d095,transparent);animation:launch-meter 1.6s ease-in-out infinite}
.app-launch.is-leaving{opacity:0;pointer-events:none}
.app-launch[hidden] *,.app-launch[hidden] *::before,.app-launch[hidden] *::after{animation-play-state:paused!important}
@keyframes launch-coin-enter{from{opacity:0;transform:translate3d(0,12px,-30px) rotateX(5deg) rotateY(-16deg) scale(.95)}to{opacity:1;transform:translateZ(0) rotateX(0) rotateY(0) scale(1)}}
@keyframes launch-coin-float{0%,100%{transform:translateY(0) rotateX(0) rotateY(0)}50%{transform:translateY(-3px) rotateX(2deg) rotateY(-3deg)}}
@keyframes launch-polish{0%,100%{opacity:0}45%{opacity:.45}}
@keyframes launch-shadow{50%{opacity:.6;transform:rotateX(56deg) scale(.96)}}
@keyframes launch-copy-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes launch-meter{from{transform:translateX(-110%)}to{transform:translateX(330%)}}
/* Independent fail-open even if JavaScript or account initialization fails. */
@keyframes launch-failsafe{to{visibility:hidden;pointer-events:none}}
@media(max-height:660px){.app-launch{--stage-size:194px;--stage-half:97px;--coin-size:150px;--launch-anchor:38%}.app-launch-title{font-size:27px;top:calc(var(--launch-anchor) + var(--stage-half) + 6px)}.app-launch-subtitle{top:calc(var(--launch-anchor) + var(--stage-half) + 56px)}.app-launch-meter{bottom:calc(38px + env(safe-area-inset-bottom,0px))}}
@media(max-height:440px){.app-launch{--stage-size:140px;--stage-half:70px;--coin-size:110px;--launch-anchor:34%}.app-launch-title{font-size:23px}.app-launch-subtitle{top:calc(var(--launch-anchor) + var(--stage-half) + 46px);font-size:10px}.app-launch-meter{bottom:24px}}
@media(prefers-reduced-motion:reduce){.app-launch *,.app-launch *::before,.app-launch *::after{animation:none!important}.app-launch{transition:opacity .1s;animation:launch-failsafe 0s 7s forwards!important}.app-launch-coin-face::after{display:none}}
