html {
    background-color: var(--background, oklch(1 0 0));
}

html.dark {
    background-color: var(--background, oklch(0.145 0 0));
}

#app-brand-splash {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background, oklch(1 0 0));
}

#app-brand-splash img,
.pl-brand-logo {
    height: 96px;
    width: auto;
    object-fit: contain;
    max-width: 400px;
}

#page-loader .pl-brand-logo {
    height: 84px;
}


html.dark #app-brand-splash {
    background-color: var(--background, oklch(0.145 0 0));
}

#page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background-color: var(--pl-bg, #ffffff);
    transition: opacity var(--pl-fade, 400ms) ease, visibility var(--pl-fade, 400ms) ease;
}

#page-loader.pl-hiding {
    opacity: 0;
    visibility: hidden;
}

.pl-spinner-wrap {
    position: relative;
    width: 48px;
    height: 48px;
}

.pl-spinner-track {
    position: absolute;
    inset: 0;
    border: 4px solid var(--pl-accent-faint, rgba(0, 0, 0, 0.15));
    border-radius: 50%;
}

.pl-spinner {
    position: absolute;
    inset: 0;
    border: 4px solid transparent;
    border-top-color: var(--pl-accent, #000000);
    border-radius: 50%;
    animation: pl-spin 0.8s linear infinite;
}

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

.pl-dots {
    display: flex;
    gap: 8px;
}

.pl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pl-accent, #000000);
    animation: pl-bounce 1.2s ease-in-out infinite;
}

.pl-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.pl-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pl-bounce {
    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.pl-bar-track {
    position: relative;
    width: 200px;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.pl-bar-bg {
    position: absolute;
    inset: 0;
    background: var(--pl-accent, #000000);
    opacity: 0.15;
}

.pl-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    background: var(--pl-accent, #000000);
    border-radius: 2px;
    animation: pl-bar 1.5s ease-in-out infinite;
}

@keyframes pl-bar {
    0% {
        transform: translateX(-150%);
    }

    100% {
        transform: translateX(375%);
    }
}

.pl-logo-pulse {
    animation: pl-pulse 1.5s ease-in-out infinite;
}

@keyframes pl-pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.65;
        transform: scale(0.94);
    }
}

.pl-text {
    font-size: 14px;
    color: var(--pl-accent, #000000);
    font-family: inherit;
    opacity: 0.8;
    letter-spacing: 0.02em;
}
