.start-page {
    position: relative;
    display: grid;
    min-height: 100dvh;
    padding-top: max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-top, 0px));
    padding-right: max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-right, 0px));
    padding-bottom: max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-bottom, 0px));
    padding-left: max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-left, 0px));
    place-items: center;
    overflow: clip;
    color: #fff;
    background:
        radial-gradient(circle at 10% 12%, rgb(255 255 255 / 15%), transparent 20rem),
        radial-gradient(circle at 90% 88%, rgb(59 130 246 / 22%), transparent 24rem),
        linear-gradient(135deg, #667eea, #764ba2 58%, #4f46e5);
}

.start-page::before,
.start-page::after {
    position: absolute;
    width: min(44vw, 35rem);
    aspect-ratio: 1;
    border: 1px dashed rgb(255 255 255 / 22%);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.start-page::before { top: -18rem; right: -14rem; }
.start-page::after { bottom: -20rem; left: -14rem; }

.start-page__theme {
    position: fixed;
    z-index: 2;
    top: max(1rem, env(safe-area-inset-top, 0px));
    left: max(1rem, env(safe-area-inset-left, 0px));
}

.start-page__theme .theme-toggle {
    color: #5b5fcd;
    background: rgb(255 255 255 / 94%);
    border-color: rgb(255 255 255 / 42%);
}

.start-card {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 44rem);
    min-height: min(38rem, calc(100dvh - 4rem));
    align-content: center;
    justify-items: center;
    gap: clamp(1.25rem, 3vw, 2rem);
    padding: clamp(2rem, 6vw, 4.5rem);
    overflow: hidden;
    text-align: center;
    border: 1px solid rgb(255 255 255 / 26%);
    border-radius: var(--radius-2xl);
    background: rgb(20 24 73 / 18%);
    box-shadow: 0 1.5rem 4rem rgb(15 23 42 / 30%);
}

.start-card > header,
.startup-status,
.startup-action,
.start-card > footer,
.brand { position: relative; z-index: 1; }

.orb {
    position: absolute;
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: 50%;
    pointer-events: none;
}

.orb-one { width: 29rem; aspect-ratio: 1; top: -14rem; right: -14rem; }
.orb-two { width: 24rem; aspect-ratio: 1; bottom: -15rem; left: -12rem; border-width: 2rem; border-color: rgb(255 255 255 / 4%); }

.brand {
    display: grid;
    width: clamp(5.5rem, 13vw, 8rem);
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 50%;
    color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 .8rem rgb(255 255 255 / 8%), 0 0 2.25rem rgb(255 255 255 / 44%);
    font-size: clamp(1.05rem, 2.6vw, 1.45rem);
    font-weight: 900;
    letter-spacing: .08em;
}

.start-card header { display: grid; gap: .6rem; max-width: 35rem; }
.start-card h1 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.55rem); line-height: 1.35; }
.start-card header p { margin: 0; color: rgb(255 255 255 / 86%); font-size: clamp(.92rem, 2vw, 1.08rem); line-height: 1.9; }

.startup-status,
.startup-action { display: grid; width: min(100%, 29rem); gap: 1rem; }
.startup-status > p,
.startup-action .message { margin: 0; color: rgb(255 255 255 / 90%); font-size: .92rem; line-height: 1.7; }

.startup-spinner {
    display: block;
    width: 2rem;
    height: 2rem;
    margin-inline: auto;
    border: .2rem solid rgb(255 255 255 / 28%);
    border-top-color: #fff;
    border-radius: 50%;
    animation: start-spin .8s linear infinite;
}

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; }
.start-card .button { min-width: 9rem; min-height: 2.8rem; border: 1px solid transparent; border-radius: .75rem; font: inherit; font-size: .88rem; font-weight: 800; cursor: pointer; transition: box-shadow var(--dfms-transition-fast), border-color var(--dfms-transition-fast); }
.start-card .button.warning { color: #713f12; background: #fef3c7; }.start-card .button.success { color: #fff; background: #0f766e; }.start-card .button.danger { color: #fff; background: #dc2626; }
.start-card .button:hover:not(:disabled) { box-shadow: 0 .35rem .8rem rgb(15 23 42 / 18%); }
.start-card .button:focus-visible { outline: 3px solid rgb(255 255 255 / 65%); outline-offset: 3px; }
.start-card .button:disabled { cursor: wait; opacity: .65; }
.start-card > footer { color: rgb(255 255 255 / 66%); font-size: .72rem; }

:root[data-theme="dark"] .start-page { background: radial-gradient(circle at 10% 12%, rgb(147 164 255 / 18%), transparent 20rem), radial-gradient(circle at 90% 88%, rgb(14 116 144 / 22%), transparent 24rem), linear-gradient(135deg, #111a42, #2d1c4a 58%, #13203d); }
:root[data-theme="dark"] .start-card { background: rgb(2 6 23 / 42%); border-color: rgb(191 219 254 / 22%); }

@media (max-width: 42rem) {
    .start-page {
        padding-top: max(1rem, env(safe-area-inset-top, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
        padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
    }

    .start-page__theme {
        top: max(.75rem, env(safe-area-inset-top, 0px));
        left: max(.75rem, env(safe-area-inset-left, 0px));
    }

    .start-card {
        min-height: calc(
            100dvh
            - max(1rem, env(safe-area-inset-top, 0px))
            - max(1rem, env(safe-area-inset-bottom, 0px))
        );
        padding: 2rem 1.25rem;
    }

    .actions {
        width: 100%;
    }

    .start-card .button {
        width: 100%;
    }
}

@media (max-height: 32rem) {
    .start-page {
        place-items: start center;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .start-card {
        min-height: 0;
        margin-block: auto;
        gap: .75rem;
        padding: 1.25rem;
    }

    .brand {
        width: 4.25rem;
    }

    .start-card header {
        gap: .35rem;
    }

    .start-card h1 {
        font-size: clamp(1.3rem, 3vw, 1.7rem);
    }

    .start-card header p,
    .startup-status > p,
    .startup-action .message {
        line-height: 1.55;
    }

    .startup-status,
    .startup-action {
        gap: .6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .startup-spinner { animation: none; }
    .start-card .button { transition: none; }
}

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