/* Telegram-only WebAssembly bootstrap; kept aligned with TelegramLaunchGate. */
#orzu-telegram-boot[hidden],
#orzu-telegram-boot [hidden],
.browser-bootstrap[hidden] {
    display: none;
}

#orzu-telegram-boot {
    --telegram-purple: #6730d7;
    --telegram-ink: #211044;
    --telegram-muted: #716487;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: minmax(min-content, 1fr) auto;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #fcfaff;
    color: var(--telegram-ink);
}

#orzu-telegram-boot::before,
#orzu-telegram-boot::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
    background: #f2ebff;
}

#orzu-telegram-boot::before {
    width: 29rem;
    height: 29rem;
    inset-block-start: -21rem;
    inset-inline-start: -15rem;
    box-shadow: 0 0 0 3.5rem #f7f2ff;
}

#orzu-telegram-boot::after {
    width: 34rem;
    height: 34rem;
    inset-block-start: 18%;
    inset-inline-end: -29rem;
    background: #f6f1ff;
}

.telegram-boot-content {
    align-self: center;
    width: 100%;
    max-width: 32rem;
    min-width: 0;
    margin-inline: auto;
    padding: max(3rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) 2.5rem max(1.25rem, env(safe-area-inset-left));
    text-align: center;
    box-sizing: border-box;
}

.telegram-boot-brand { display: flex; flex-direction: column; align-items: center; gap: 0.125rem; }
.telegram-boot-mark { display: block; width: 6.5rem; height: 6.5rem; object-fit: contain; mix-blend-mode: multiply; }
.telegram-boot-wordmark { color: var(--telegram-purple); font-size: 3rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1; }

#orzu-telegram-boot h1 {
    margin: 1.75rem 0 0.625rem;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

#orzu-telegram-boot p { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.telegram-boot-subtitle { color: var(--telegram-muted); font-size: 1rem; text-wrap: balance; }

.telegram-boot-panel {
    margin-top: 1.75rem;
    padding: 1.5rem;
    border-radius: 1.5rem;
    background: #fff;
    box-shadow: 0 14px 44px rgb(103 48 215 / 0.09);
}

.telegram-boot-connection { display: flex; align-items: center; justify-content: center; gap: 1rem; text-align: start; }

.telegram-boot-icon {
    display: grid;
    place-items: center;
    flex: 0 0 3.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border: 0.375rem solid #f4f1ff;
    border-radius: 50%;
    background: #27a8ed;
    box-sizing: content-box;
    box-shadow: 0 7px 16px rgb(103 48 215 / 0.1);
}

.telegram-boot-icon svg { width: 1.875rem; height: 1.875rem; fill: #fff; }
.telegram-boot-connection-state { min-width: 0; }

#orzu-telegram-boot h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.telegram-boot-dots { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.75rem; min-height: 0.625rem; }
.telegram-boot-dots span { width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--telegram-purple); animation: telegram-boot-loading 1.35s ease-in-out infinite; }
.telegram-boot-dots span:nth-child(2) { opacity: 0.55; animation-delay: 0.15s; }
.telegram-boot-dots span:nth-child(3) { opacity: 0.3; animation-delay: 0.3s; }
.telegram-boot-status { margin-top: 1.25rem; color: var(--telegram-muted); font-size: 0.9375rem; }

.telegram-boot-cityscape { display: flex; justify-content: center; height: clamp(8rem, 37.5vw, 20rem); min-height: 8rem; padding-bottom: env(safe-area-inset-bottom); overflow: hidden; pointer-events: none; }
.telegram-boot-cityscape img { display: block; width: auto; max-width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
#orzu-telegram-boot ::selection { color: var(--telegram-ink); background: #e8dcff; }

@keyframes telegram-boot-loading {
    0%, 70%, 100% { transform: translateY(0); }
    35% { transform: translateY(-0.1875rem); }
}

@media (min-width: 768px) {
    .telegram-boot-content { padding-top: max(3.5rem, env(safe-area-inset-top)); }
    .telegram-boot-panel { padding: 1.75rem 2rem; }
    .telegram-boot-cityscape img { mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); }
}

@media (max-width: 359px) {
    .telegram-boot-content { padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right)); }
    .telegram-boot-panel { padding: 1.25rem 1rem; }
    .telegram-boot-connection { gap: 0.75rem; }
    #orzu-telegram-boot h1 { font-size: 1.5rem; }
}

@media (max-height: 699px) {
    .telegram-boot-content { padding-top: max(2rem, env(safe-area-inset-top)); padding-bottom: 2rem; }
    .telegram-boot-mark { width: 5rem; height: 5rem; }
    .telegram-boot-wordmark { font-size: 2.5rem; }
    #orzu-telegram-boot h1 { margin-top: 1.25rem; }
    .telegram-boot-cityscape { height: 8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .telegram-boot-dots span { animation: none; }
}
