html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

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

#splash {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1F1611;
    opacity: 1;
    transition: opacity 220ms ease-out;
}

.splash-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #B8935A;
    animation: splash-pulse 1400ms ease-in-out infinite;
}

@keyframes splash-pulse {
    0%, 100% { opacity: 0.25; transform: scale(0.8); }
    50%      { opacity: 1;    transform: scale(1); }
}

#splash.splash--done {
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .splash-dot {
        animation: none;
        opacity: 0.85;
    }
}

#startup-failed {
    position: fixed;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #1F1611;
    color: #F7F2EA;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

#startup-failed[hidden] {
    display: none;
}

.failed-card {
    max-width: 34rem;
}

.failed-eyebrow {
    margin: 0 0 20px;
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    color: #B8935A;
}

.failed-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 10px;
    border-radius: 50%;
    background: #B8935A;
    vertical-align: middle;
}

.failed-title {
    margin: 0 0 16px;
    font-family: ui-serif, Georgia, "Times New Roman", serif;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 400;
    line-height: 1.15;
}

.failed-body {
    margin: 0 0 28px;
    font-size: 1rem;
    line-height: 1.6;
}

.failed-action {
    display: inline-block;
    padding: 14px 28px;
    border: 0;
    border-radius: 2px;
    background: #B8935A;
    color: #1F1611;
    font: inherit;
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

.failed-action:hover {
    background: #D4B074;
}

.failed-action:focus-visible {
    outline: 2px solid #D4B074;
    outline-offset: 3px;
}

.failed-note {
    margin: 24px 0 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #B6B0A9;
}

#card-frame {
    position: fixed;
    z-index: 2;
    overflow: hidden;
    border-radius: 12px;
    background: #FFFFFF;
    animation: card-frame-in 220ms ease-out;
}

#card-frame[hidden] {
    display: none;
}

@keyframes card-frame-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
