html{
    height: 100vh;
    background: #ffffff;
    /* Overridden by applyBranding() once the brand is known; these defaults
       stay in place when branding itself is what failed. */
    --boot-on-background: #1f1f1f;
    /* Same red as the witness error line, so both read as one signal. */
    --boot-error: rgb(140, 20, 20);
}

/* Generic boot error dialog (see showBootErrorDialog in index.html). No
   z-index on purpose, same reason as #bootWitness: Flutter's view paints over
   it if the app eventually renders. */
#bootErrorDialog {
    max-width: 420px;
    margin: 0 16px;
    padding: 24px;
    color: var(--boot-on-background);
    font-family: Helvetica, sans-serif;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#bootErrorDialog[hidden] {
    display: none;
}

#bootErrorDialog p {
    margin: 0;
}

#bootErrorTitle {
    font-weight: 700;
}

#bootErrorCode {
    color: var(--boot-error);
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    user-select: all;
}

/* Boot witness: bottom-left process/error trail, independent of Flutter —
   still visible even if the Flutter engine never attaches. Codes are internal
   (see index.html), not meant to be meaningful to the end user. Two separate
   lines on purpose: the step line only ever shows the latest checkpoint, the
   error line accumulates every error seen and is never erased by a later step. */
#bootWitness {
    position: fixed;
    left: 8px;
    bottom: 8px;
    /* No z-index (stays "auto") on purpose: with an equal/auto stacking level,
       paint order follows DOM order, and Flutter's own view is always appended
       to the DOM after this static markup — so it naturally paints on top,
       without any JS detection needed. */
    font-family: 'Courier New', monospace;
    font-size: 10px;
    line-height: 1.3;
    pointer-events: none;
    white-space: pre;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

#bootWitnessStep {
    padding: 2px 5px;
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.75);
}

#bootWitnessErrors {
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(140, 20, 20, 0.85);
    color: #ffffff;
}

body {
    /* background: linear-gradient(90deg, #2d1f6a 0%, #1f193e 100%); */
    background: #ffffff;
    margin: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.mainContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loading {
    border-radius: 5px;
    overflow: hidden;
    max-width: 200px;
    margin: 0 auto;
    padding: 10px;
}

.loading img {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-bottom: 30px;
}

.mainContainer p {
    text-align: center;
    font-weight: 500;
    font-family: Helvetica, sans-serif;
}

#loaderLogo {
    visibility: hidden;
}

.loader,
.loader:before,
.loader:after {
    border-radius: 50%;
    width: 2.5em;
    height: 2.5em;
    animation-fill-mode: both;
    animation: bblFadInOut 1.8s infinite ease-in-out;
}

.loader {
    font-size: 6px;
    position: relative;
    text-indent: -9999em;
    transform: translateZ(0);
    animation-delay: -0.16s;
}

.loader:before,
.loader:after {
    content: '';
    position: absolute;
    top: 0;
}

.loader:before {
    left: -3.5em;
    animation-delay: -0.32s;
}

.loader:after {
    left: 3.5em;
}

@keyframes bblFadInOut {
    0%, 80%, 100% {
        box-shadow: 0 2.5em 0 -1.3em;
    }
    40% {
        box-shadow: 0 2.5em 0 0;
    }
}