.startup-splash {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    background: radial-gradient(ellipse at 50% 46%, #18204d 0%, #0e1230 42%, #050713 100%);
    color: #f6f7ff;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    overflow: auto;
    overscroll-behavior: contain;
}
.startup-splash[hidden], .startup-splash [hidden] { display: none !important; }
.startup-splash::backdrop { background: #050713; }
html.mtg-startup-open, html.mtg-startup-open body { overflow: hidden; }
.startup-cosmos { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.startup-cosmos > span { position: absolute; display: block; pointer-events: none; }
.startup-aurora { width: min(850px, 150vw); height: min(650px, 85vh); border-radius: 50%; opacity: .7; }
.startup-aurora-violet { top: -20%; left: -25%; background: radial-gradient(ellipse, #6041c959 0%, #343ac62b 35%, transparent 70%); animation: startup-aurora-drift 14s ease-in-out infinite alternate; }
.startup-aurora-red { right: -30%; bottom: -22%; background: radial-gradient(ellipse, #d12f4c42 0%, #7e284d26 38%, transparent 70%); animation: startup-aurora-drift 18s -5s ease-in-out infinite alternate-reverse; }
.startup-stars { inset: -10px; background-repeat: no-repeat; }
.startup-stars-near {
    background-image: radial-gradient(circle at 12% 18%, #dce7ffb0 0 1px, transparent 1.8px), radial-gradient(circle at 76% 13%, #c7d1ffb0 0 1px, transparent 2px), radial-gradient(circle at 91% 36%, #dce7ff80 0 .8px, transparent 1.7px), radial-gradient(circle at 23% 41%, #c9d7ff80 0 .8px, transparent 1.7px), radial-gradient(circle at 83% 70%, #e9c9e999 0 1px, transparent 2px), radial-gradient(circle at 13% 76%, #bed1ff99 0 1px, transparent 1.8px), radial-gradient(circle at 38% 88%, #c7d1ff80 0 .8px, transparent 1.7px), radial-gradient(circle at 57% 7%, #dce7ff80 0 .8px, transparent 1.7px);
    animation: startup-star-breathe 5s ease-in-out infinite alternate;
}
.startup-stars-far {
    background-image: radial-gradient(circle at 31% 11%, #dce7ff80 0 .6px, transparent 1.4px), radial-gradient(circle at 89% 20%, #dce7ff66 0 .7px, transparent 1.4px), radial-gradient(circle at 7% 51%, #dce7ff80 0 .6px, transparent 1.4px), radial-gradient(circle at 70% 86%, #dce7ff80 0 .7px, transparent 1.4px), radial-gradient(circle at 47% 73%, #dce7ff66 0 .6px, transparent 1.4px), radial-gradient(circle at 66% 32%, #dce7ff80 0 .7px, transparent 1.4px), radial-gradient(circle at 94% 89%, #dce7ff80 0 .6px, transparent 1.4px);
    animation: startup-star-breathe 7s -3s ease-in-out infinite alternate-reverse;
}
.startup-space-beam { top: 40%; left: -30%; width: 160%; height: 1px; opacity: 0; background: linear-gradient(90deg, transparent 5%, #9aa4ff22 30%, #ccd9ffbb 50%, #ff6e8c55 65%, transparent 95%); box-shadow: 0 0 18px 2px #777aff33; transform: rotate(-18deg); }
.startup-splash-scene { position: relative; z-index: 1; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.startup-logo-frame { position: relative; width: clamp(126px, 25vw, 180px); aspect-ratio: 1; margin-bottom: 24px; }
.startup-logo-frame::before { content: ""; position: absolute; inset: -40%; border-radius: 50%; background: radial-gradient(circle, #9ba5ff30 0%, #5b63db24 30%, #e8415e0d 49%, transparent 70%); pointer-events: none; }
.startup-logo-frame img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain;
    /* Exterior-only silhouette clip: preserve the original bitmap and internal whites. */
    clip-path: polygon(50% 0%, 61% 5%, 74% 9%, 87% 11%, 87% 40%, 89% 42%, 89% 38%, 89% 32%, 93% 35%, 95% 40%, 96% 38%, 99% 44%, 99% 48%, 100% 47%, 100% 56%, 99% 59%, 100% 58%, 100% 65%, 98% 70%, 97% 75%, 94% 79%, 91% 82%, 88% 85%, 88% 89%, 82% 94%, 78% 94%, 76% 96%, 63% 97%, 50% 100%, 37% 97%, 24% 96%, 22% 94%, 18% 94%, 12% 89%, 12% 85%, 9% 82%, 6% 79%, 3% 75%, 2% 70%, 0% 65%, 0% 58%, 1% 59%, 0% 56%, 0% 47%, 1% 48%, 1% 44%, 4% 38%, 5% 40%, 7% 35%, 11% 32%, 11% 38%, 11% 42%, 13% 40%, 13% 11%, 26% 9%, 39% 5%);
}
.startup-launch-ring { position: absolute; inset: -15%; border: 1px solid #a0a9ff66; border-radius: 50%; opacity: 0; pointer-events: none; }
.startup-brand-copy { max-width: 100%; }
.startup-eyebrow { color: #a4afcd; font-size: 10px; font-weight: 700; letter-spacing: .3em; }
.startup-brand-copy h2 { margin: 10px 0 8px; font-size: clamp(23px, 6vw, 40px); line-height: 1.2; font-weight: 850; letter-spacing: .075em; color: #f6f7ff; text-shadow: 0 0 28px #9ca6ff30; }
.startup-brand-subtitle { margin: 0; color: #b4c1e1; font-size: 11px; letter-spacing: .32em; font-weight: 600; }
.startup-brand-line { display: block; width: 48px; height: 3px; margin: 23px auto 0; background: linear-gradient(90deg, #fc4264, #9d89ff); border-radius: 4px; box-shadow: 0 0 18px #ee4f7c55; }
.startup-caption { margin: 18px 0 0; color: #aeb9d4; font-size: 13px; }
.startup-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 34px; }
.startup-splash button { font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.startup-splash .startup-start { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border: 0; border-radius: 0; color: #f3f4ff; background: transparent; box-shadow: none; font-size: 15px; font-weight: 600; letter-spacing: .08em; transition: transform 180ms cubic-bezier(.2,.8,.3,1); }
.startup-start:active { transform: scale(.95); }
.startup-splash button:focus-visible { outline: 3px solid #e78e98; outline-offset: 5px; }
.startup-status { min-height: 24px; margin-top: 36px; color: #b5bfd8; font-size: 12px; outline: none; }
.startup-splash.is-playing .startup-logo-frame { animation: startup-logo-reveal 900ms cubic-bezier(.16,1,.3,1) both; }
.startup-splash.is-playing .startup-launch-ring { animation: startup-halo-expand 1200ms 120ms ease-out both; }
.startup-splash.is-playing .startup-space-beam { animation: startup-beam-pass 1100ms 100ms ease-out both; }
.startup-splash.is-playing .startup-logo-frame::after { content: ""; position: absolute; inset: -8px; pointer-events: none; background: linear-gradient(110deg, transparent 35%, #ffffffba 49%, transparent 63%); animation: startup-light-sweep 1100ms 200ms ease-out both; }
.startup-splash.is-playing h2 { animation: startup-title-reveal 850ms 200ms cubic-bezier(.16,1,.3,1) both; }
.startup-splash.is-playing .startup-brand-subtitle { animation: startup-copy-reveal 600ms 600ms ease-out both; }
.startup-splash.is-playing .startup-brand-line { animation: startup-line-reveal 750ms 300ms ease-out both; }
.startup-splash.is-leaving .startup-splash-scene { animation: startup-scene-out 280ms ease-in both; }
.startup-splash.is-leaving { animation: startup-background-out 280ms ease-in both; }
.startup-splash.is-leaving::backdrop { animation: startup-background-out 280ms ease-in both; }
@keyframes startup-logo-reveal { from { opacity: 0; transform: scale(.88) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes startup-title-reveal { from { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateY(5px); } to { opacity: 1; clip-path: inset(0); transform: none; } }
@keyframes startup-copy-reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes startup-line-reveal { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes startup-light-sweep { from { opacity: 0; transform: translateX(-80%); } 30% { opacity: .65; } to { opacity: 0; transform: translateX(80%); } }
@keyframes startup-scene-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes startup-background-out { to { opacity: 0; } }
@keyframes startup-aurora-drift { from { transform: translate3d(0, 0, 0) scale(1); opacity: .55; } to { transform: translate3d(6%, 5%, 0) scale(1.08); opacity: .85; } }
@keyframes startup-star-breathe { from { opacity: .4; transform: translateY(0); } to { opacity: .85; transform: translateY(-3px); } }
@keyframes startup-halo-expand { from { opacity: .65; transform: scale(.78); } to { opacity: 0; transform: scale(1.65); } }
@keyframes startup-beam-pass { from { opacity: 0; transform: translateY(55px) rotate(-18deg); } 35% { opacity: .75; } to { opacity: 0; transform: translateY(-65px) rotate(-18deg); } }
.startup-splash:not([open]) *, .startup-splash:not([open]) *::before, .startup-splash:not([open]) *::after { animation: none !important; }
.startup-splash.is-suspended *, .startup-splash.is-suspended *::before, .startup-splash.is-suspended *::after { animation-play-state: paused !important; }
@media (max-width: 767px) { .startup-stars-far { display: none !important; } .startup-aurora { width: 120vw; height: 65vh; } }
@media (max-height: 520px) { .startup-logo-frame { width: 90px; margin-bottom: 12px; } .startup-actions { margin-top: 16px; } .startup-brand-line { margin-top: 14px; } }
@media (prefers-reduced-motion: reduce) {
    .startup-splash *, .startup-splash *::before, .startup-splash *::after, .startup-splash.is-leaving, .startup-splash.is-leaving::backdrop { animation: none !important; transition: none !important; }
    .startup-logo-frame::after { display: none; }
}
