/* Launch splash for initial WebAssembly boot */
#app {
    min-height: 100vh;
}

.splash-screen {
    --splash-primary: #3dcb5b;
    --splash-primary-dark: #34b350;
    --splash-accent: #ffbf73;
    position: relative;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 2.5vw, 2rem);
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 8% 15%, rgba(61, 203, 91, 0.2) 0%, rgba(61, 203, 91, 0) 60%),
        radial-gradient(90% 70% at 95% 2%, rgba(255, 191, 115, 0.28) 0%, rgba(255, 191, 115, 0) 65%),
        linear-gradient(145deg, #f2faf4 0%, #eaf7ef 48%, #f8fbf9 100%);
}

.splash-screen__orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
    opacity: 0.6;
    pointer-events: none;
}

.splash-screen__orb--left {
    width: min(56vw, 22rem);
    aspect-ratio: 1 / 1;
    left: -14vw;
    top: 12svh;
    background: radial-gradient(circle at 35% 35%, rgba(61, 203, 91, 0.42) 0%, rgba(61, 203, 91, 0.05) 70%, transparent 100%);
    animation: splash-drift-left 7.5s ease-in-out infinite alternate;
}

.splash-screen__orb--right {
    width: min(42vw, 17rem);
    aspect-ratio: 1 / 1;
    right: -10vw;
    bottom: 12svh;
    background: radial-gradient(circle at 65% 40%, rgba(255, 191, 115, 0.48) 0%, rgba(255, 191, 115, 0.08) 68%, transparent 100%);
    animation: splash-drift-right 8.25s ease-in-out infinite alternate;
}

.splash-screen__content {
    width: min(31rem, 100%);
    border-radius: 1.5rem;
    padding: clamp(1.35rem, 3vw, 2rem);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow:
        0 24px 48px rgba(32, 70, 40, 0.12),
        0 2px 8px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(14px);
    animation: splash-card-in 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.splash-screen__logo-shell {
    position: relative;
    width: fit-content;
    margin: 0 auto 0.95rem;
    display: grid;
    place-items: center;
}

.splash-screen__logo-ring {
    position: absolute;
    width: 5.75rem;
    height: 5.75rem;
    border: 2px dashed rgba(61, 203, 91, 0.45);
    border-radius: 50%;
    animation: splash-spin 5.8s linear infinite;
}

.splash-screen__logo {
    width: 4.75rem;
    height: 4.75rem;
    border-radius: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 20px rgba(61, 203, 91, 0.25);
}

.splash-screen__badge {
    margin: 0;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1;
    letter-spacing: 0.12em;
    font-weight: 700;
    text-transform: uppercase;
    color: #148f35;
}

.splash-screen__title {
    margin: 0.42rem 0 0;
    text-align: center;
    font-size: clamp(1.42rem, 4.9vw, 2rem);
    line-height: 1.16;
    font-weight: 800;
    color: #0f172a;
}

.splash-screen__subtitle {
    margin: 0.64rem auto 0;
    text-align: center;
    color: #334155;
    font-size: 0.95rem;
    max-width: 26ch;
}

.splash-screen__progress {
    margin-top: 1.3rem;
}

.splash-screen__progress-track {
    width: 100%;
    height: 0.7rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.22);
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.09);
}

.splash-screen__progress-value {
    position: relative;
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--splash-primary-dark), var(--splash-primary), #79dd8c);
    transition: width 200ms ease-out;
}

.splash-screen__progress-value::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.4) 28%, transparent 55%);
    transform: translateX(-100%);
    animation: splash-progress-sheen 1.9s ease-in-out infinite;
}

.splash-screen__progress-meta {
    margin-top: 0.6rem;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: #1f2937;
}

.splash-screen__progress-meta span:last-child {
    font-weight: 700;
    color: #166534;
}

.splash-screen__tip {
    margin: 1.1rem 0 0;
    font-size: 0.79rem;
    line-height: 1.4;
    color: #475569;
}

@keyframes splash-card-in {
    from {
        opacity: 0;
        transform: translateY(0.75rem) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes splash-progress-sheen {
    to {
        transform: translateX(120%);
    }
}

@keyframes splash-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes splash-drift-left {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(1.4rem, -1rem, 0);
    }
}

@keyframes splash-drift-right {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-1.25rem, 0.9rem, 0);
    }
}

@media (max-width: 420px) {
    .splash-screen__content {
        border-radius: 1.25rem;
    }

    .splash-screen__tip {
        font-size: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .splash-screen__orb,
    .splash-screen__logo-ring,
    .splash-screen__progress-value::after,
    .splash-screen__content {
        animation: none !important;
    }

    .splash-screen__progress-value {
        transition: none;
    }
}

@supports not (backdrop-filter: blur(1px)) {
    .splash-screen__content {
        background: rgba(255, 255, 255, 0.96);
    }
}
