@font-face {
    font-family: STT;
    src: url("stt-loading-font.ttf?v=fdcffb5b445fe204");
    font-display: swap;
}

:root {
    color-scheme: light;
    --startup-bg: #F4FAFA;
    --startup-text: #082B3C;
    --startup-muted: #526D78;
    --startup-accent: #007F95;
    --startup-glow: rgba(75, 225, 221, .17);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-startup-theme="LIGHT"]) {
        color-scheme: dark;
        --startup-bg: #041923;
        --startup-text: #F4FAFA;
        --startup-muted: #A4BDC7;
        --startup-accent: #4BE1DD;
        --startup-glow: rgba(0, 127, 149, .23);
    }
}

:root[data-startup-theme="DARK"] {
    color-scheme: dark;
    --startup-bg: #041923;
    --startup-text: #F4FAFA;
    --startup-muted: #A4BDC7;
    --startup-accent: #4BE1DD;
    --startup-glow: rgba(0, 127, 149, .23);
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--startup-bg);
}

#compose-app {
    width: 100%;
    height: 100%;
}

#stt-startup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    color: var(--startup-text);
    background: radial-gradient(ellipse at 50% 42%, var(--startup-glow), transparent 58%), var(--startup-bg);
    font-family: STT, Tahoma, sans-serif;
    text-align: center;
    transition: opacity .28s ease;
}

#stt-startup[data-ready="true"] {
    opacity: 0;
    pointer-events: none;
}

.startup-content { width: min(360px, calc(100% - 48px)); padding: 24px 0; }
.startup-icon { width: 144px; height: 144px; filter: drop-shadow(0 16px 26px rgba(4, 25, 35, .15)); }
#startup-title { font: 700 32px/1.2 STT, sans-serif; letter-spacing: 4px; margin: 22px 0 10px; }
.startup-tagline { font-size: 17px; margin: 0; }
.startup-wave { display: flex; justify-content: center; align-items: center; gap: 5px; height: 36px; margin: 32px 0 14px; }
.startup-wave span { width: 4px; height: 18px; border-radius: 4px; background: var(--startup-accent); animation: startup-wave 1.15s ease-in-out infinite; }
.startup-wave span:nth-child(2), .startup-wave span:nth-child(4) { animation-delay: .14s; height: 26px; }
.startup-wave span:nth-child(3) { animation-delay: .28s; height: 34px; }
#startup-message { font-size: 14px; margin: 0 0 10px; }
#startup-hint { color: var(--startup-muted); font-size: 12px; line-height: 1.8; margin: 0; }
.startup-footer { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); margin: 0; color: var(--startup-muted); font: 11px/1.5 sans-serif; letter-spacing: 3px; }
#startup-retry { margin-top: 20px; padding: 10px 24px; border: 0; border-radius: 12px; background: var(--startup-accent); color: var(--startup-bg); font: inherit; cursor: pointer; }
#startup-retry:focus-visible { outline: 2px solid var(--startup-text); outline-offset: 4px; }
#stt-startup[data-error="true"] .startup-wave { visibility: hidden; animation: none; }
@keyframes startup-wave { 0%, 100% { transform: scaleY(.55); opacity: .55; } 50% { transform: scaleY(1); opacity: 1; } }
@media (max-height: 480px) { .startup-icon { width: 88px; height: 88px; } .startup-wave { margin-top: 18px; } .startup-footer { bottom: 14px; } }
@media (prefers-reduced-motion: reduce) {
    #stt-startup { transition: none; }
    .startup-wave span { animation: none; }
}
