:root {
    --brand: #299bb2;
    --brand-dark: #08758b;
    --brand-deep: #075d70;
    --brand-soft: #eaf8fb;
    --ink: #0f2430;
    --muted: #647985;
    --line: #d9eaee;
    --white: #ffffff;
    --success: #16845b;
    --danger: #b42318;
    --shadow: 0 28px 80px rgba(7, 93, 112, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--white);
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 8%, rgba(41, 155, 178, 0.12), transparent 31rem),
        radial-gradient(circle at 90% 95%, rgba(41, 155, 178, 0.08), transparent 28rem),
        #f8fcfd;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.is-launching {
    overflow: hidden;
}

a {
    -webkit-tap-highlight-color: transparent;
}

.ambient {
    position: fixed;
    z-index: 0;
    border: 1px solid rgba(41, 155, 178, 0.13);
    border-radius: 50%;
    pointer-events: none;
}

.ambient-one {
    top: -150px;
    right: -120px;
    width: 340px;
    height: 340px;
}

.ambient-two {
    bottom: -190px;
    left: -150px;
    width: 420px;
    height: 420px;
}

.app-shell {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    padding:
        max(22px, env(safe-area-inset-top))
        max(18px, env(safe-area-inset-right))
        max(22px, env(safe-area-inset-bottom))
        max(18px, env(safe-area-inset-left));
}

.splash-card {
    width: min(100%, 440px);
    padding: 42px 34px 30px;
    border: 1px solid rgba(41, 155, 178, 0.12);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    text-align: center;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: card-arrive 650ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 218px;
    height: 218px;
    margin: 0 auto 25px;
    place-items: center;
}

.brand-glow {
    position: absolute;
    inset: 17%;
    border-radius: 50%;
    background: rgba(41, 155, 178, 0.2);
    filter: blur(25px);
    animation: glow-pulse 2.8s ease-in-out infinite;
}

.brand-logo {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 22px rgba(7, 117, 139, 0.17));
    animation: logo-arrive 800ms 90ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(27px, 7vw, 34px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.platforms {
    margin: 15px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}

.platforms span {
    margin: 0 4px;
    color: var(--brand);
}

.status-card {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 25px auto 0;
    padding: 9px 13px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #d8efe6;
    border-radius: 999px;
    background: #f3fbf7;
    color: #35685a;
    font-size: 12px;
    font-weight: 650;
}

.status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border: 2px solid #c7ebdc;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(22, 132, 91, 0.08);
}

.actions {
    display: grid;
    gap: 11px;
    margin-top: 27px;
}

.primary-button {
    display: inline-flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 17px;
    font-weight: 750;
    text-decoration: none;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.primary-button {
    border: 0;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    box-shadow: 0 14px 28px rgba(8, 117, 139, 0.24);
    color: var(--white);
    font-size: 16px;
}

.primary-button svg,
.security-note svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.primary-button:hover {
    box-shadow: 0 17px 34px rgba(8, 117, 139, 0.3);
    transform: translateY(-2px);
}

.primary-button:active {
    transform: scale(0.98);
}

.primary-button:focus-visible {
    outline: 3px solid rgba(41, 155, 178, 0.25);
    outline-offset: 3px;
}

.primary-button[aria-disabled="true"] {
    cursor: wait;
    opacity: 0.78;
}

.connection-message {
    min-height: 19px;
    margin: 13px 0 -2px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}

.security-note {
    display: flex;
    margin-top: 18px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #7a8c95;
    font-size: 11px;
}

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    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));
    place-items: center;
    background:
        radial-gradient(circle at 50% 25%, rgba(41, 155, 178, 0.14), transparent 22rem),
        var(--white);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.025);
    transition: opacity 320ms ease, transform 420ms ease;
}

.loading-screen[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.loading-content {
    width: min(100%, 360px);
    text-align: center;
}

.loading-logo-wrap {
    position: relative;
    display: grid;
    width: 154px;
    height: 154px;
    margin: 0 auto 31px;
    place-items: center;
}

.loading-logo-wrap img {
    display: block;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    filter: drop-shadow(0 14px 22px rgba(7, 117, 139, 0.16));
}

.loading-ring {
    position: absolute;
    inset: 0;
    border: 4px solid #e2f2f5;
    border-top-color: var(--brand);
    border-right-color: var(--brand-dark);
    border-radius: 50%;
    animation: ring-spin 1s linear infinite;
    animation-play-state: paused;
}

.loading-content h2 {
    margin: 0;
    color: var(--ink);
    font-size: 25px;
    letter-spacing: -0.025em;
}

.loading-content > p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.progress-track {
    height: 8px;
    margin-top: 27px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5f1f4;
}

.progress-bar {
    display: block;
    width: 12%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), var(--brand-dark));
}

.loading-screen[aria-hidden="false"] .loading-ring {
    animation-play-state: running;
}

.loading-screen[aria-hidden="false"] .progress-bar {
    animation: progress-run 1.25s cubic-bezier(0.35, 0, 0.2, 1) forwards;
}

.loading-content .loading-hint {
    margin-top: 12px;
    color: #8aa0aa;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.noscript-message {
    position: fixed;
    right: 15px;
    bottom: 15px;
    left: 15px;
    z-index: 200;
    padding: 12px;
    border-radius: 10px;
    background: #fff1f0;
    color: var(--danger);
    font-size: 13px;
    text-align: center;
}

.noscript-message a {
    color: inherit;
    font-weight: 800;
}

@keyframes card-arrive {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

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

@keyframes logo-arrive {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.88);
    }

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

@keyframes glow-pulse {
    0%,
    100% {
        opacity: 0.65;
        transform: scale(0.92);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

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

@keyframes progress-run {
    0% {
        width: 12%;
    }

    45% {
        width: 58%;
    }

    100% {
        width: 96%;
    }
}

@media (max-width: 520px) {
    body {
        background: var(--white);
    }

    .ambient {
        display: none;
    }

    .app-shell {
        align-items: center;
        padding-right: max(20px, env(safe-area-inset-right));
        padding-left: max(20px, env(safe-area-inset-left));
    }

    .splash-card {
        padding: 24px 0 19px;
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .brand-mark {
        width: min(56vw, 208px);
        height: min(56vw, 208px);
        margin-bottom: 21px;
    }
}

@media (max-height: 690px) {
    .splash-card {
        padding-top: 16px;
        padding-bottom: 13px;
    }

    .brand-mark {
        width: 154px;
        height: 154px;
        margin-bottom: 15px;
    }

    .eyebrow {
        margin-bottom: 7px;
    }

    h1 {
        font-size: 25px;
    }

    .platforms {
        margin-top: 10px;
    }

    .status-card {
        margin-top: 16px;
    }

    .actions {
        margin-top: 18px;
    }

    .security-note {
        margin-top: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}
