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

body {
    background: #0063B1;
    color: #FFFFFF;
    font-family: "Segoe UI Light", "Segoe UI", "Selawik", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 300;
    cursor: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}


/* --- The update screen ------------------------------------------------- */

#wu-update {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 6vw;
    box-sizing: border-box;
    font-size: clamp(16px, 1.55vw, 34px);
    line-height: 1.45;
}

.wu-line {
    margin: 0;
}

.wu-foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8vh;
    margin: 0;
    padding: 0 6vw;
}

/* The ring: each <i> is a full-size box spun about the centre; its ::after
   is the dot at twelve o'clock. Same keyframes, staggered start. */
.wu-ring {
    position: relative;
    width: 3.4em;
    height: 3.4em;
    margin-bottom: 2.6em;
}

.wu-ring i {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: wu-orbit 5.5s infinite;
}

.wu-ring i::after {
    content: "";
    position: absolute;
    left: 45%;
    top: 0;
    width: 10%;
    height: 10%;
    border-radius: 50%;
    background: #FFFFFF;
}

.wu-ring i:nth-child(2) { animation-delay: 0.24s; }
.wu-ring i:nth-child(3) { animation-delay: 0.48s; }
.wu-ring i:nth-child(4) { animation-delay: 0.72s; }
.wu-ring i:nth-child(5) { animation-delay: 0.96s; }

@keyframes wu-orbit {
    0%   { transform: rotate(225deg); opacity: 1; animation-timing-function: ease-out; }
    7%   { transform: rotate(345deg); animation-timing-function: linear; }
    30%  { transform: rotate(455deg); animation-timing-function: ease-in-out; }
    39%  { transform: rotate(690deg); animation-timing-function: linear; }
    70%  { transform: rotate(815deg); opacity: 1; animation-timing-function: ease-out; }
    75%  { transform: rotate(945deg); animation-timing-function: ease-out; }
    76%  { transform: rotate(945deg); opacity: 0; }
    100% { transform: rotate(945deg); opacity: 0; }
}


/* --- The blue screen ---------------------------------------------------- */

#wu-bsod {
    display: none;
    position: fixed;
    inset: 0;
    background: #0078D7;
    overflow: hidden;
}

body.wu-crashed #wu-update {
    display: none;
}

body.wu-crashed #wu-bsod {
    display: flex;
    align-items: center;
}

.wu-bsod-inner {
    box-sizing: border-box;
    width: 100%;
    padding: 0 10vw;
    font-size: clamp(15px, 1.75vw, 36px);
    line-height: 1.35;
}

.wu-bsod-inner p {
    margin: 0 0 0.9em;
    max-width: 34em;
}

.wu-sad {
    font-size: 6.5em;
    line-height: 1;
    margin: 0 0 0.25em;
}

.wu-bsod-row {
    display: flex;
    align-items: flex-start;
    gap: 1.1em;
    margin-top: 1.4em;
}

#wu-qr {
    flex: 0 0 auto;
    width: 5.2em;
    height: 5.2em;
}

.wu-bsod-small {
    font-size: 0.62em;
    line-height: 1.45;
}

.wu-bsod-small p {
    margin-bottom: 0.8em;
}

/* Held upright, the QR goes above the small print rather than beside it. */
@media (orientation: portrait) {
    /* Big enough to scan off a phone: at 5.2em it came out near 90px wide
       on a 390px screen, too small for a camera across a desk. */
    #wu-qr {
        width: 8.5em;
        height: 8.5em;
    }

    .wu-bsod-inner {
        padding: 0 8vw;
        font-size: clamp(15px, 4.6vw, 30px);
    }

    .wu-bsod-row {
        flex-direction: column;
    }

    .wu-bsod-small {
        font-size: 0.8em;
    }

    #wu-update {
        font-size: clamp(16px, 4.4vw, 30px);
    }
}


/* --- Hint ---------------------------------------------------------------- */

#wu-hint {
    position: fixed;
    left: 50%;
    top: 34px;
    transform: translateX(-50%);
    z-index: 4;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 4vw, 20px);
    line-height: 1.5;
    text-align: center;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 14px;
    padding: 18px 28px 22px;
    box-sizing: border-box;
    width: max-content;
    max-width: min(92vw, 30em);
    overflow: hidden;

    transition: opacity 0.6s ease;
}

#wu-hint kbd {
    font-family: inherit;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

/* Countdown to the hint going away: drains over HINT_TIMEOUT_MS, which the
   JS hands over as --hint-ms. */
#wu-hint::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    box-sizing: content-box;
    height: 5px;
    background: #FFFFFF;
    border-top: 1px solid #000000;
    border-bottom: 1px solid #000000;
    transform-origin: left center;
    animation: wu-hint-countdown var(--hint-ms, 8s) linear forwards;
}

@keyframes wu-hint-countdown {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

#wu-hint.wu-hint-gone {
    opacity: 0;
    pointer-events: none;
}
