html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}
body {
    background: #fff;
    color: #eaf2fb;
    display: flex;
    flex-direction: column;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    position: relative;
}
a { color: inherit; }
.emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
textarea.emscripten {
    box-sizing: border-box;
    color: white;
    background-color: black;
    display: block;
    font-family: monospace;
    height: 9.5rem;
    resize: none;
    width: 100%;
}
div.emscripten { text-align: center; }
#loading {
    align-items: center;
    background: #244a73;
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 1;
    position: fixed;
    transition: opacity 280ms ease;
    z-index: 100000;
}
#loading[hidden] { display: none; }
#loading.is-complete {
    opacity: 0;
    pointer-events: none;
}
.loading-content {
    align-items: center;
    display: flex;
    flex-direction: column;
    max-width: min(420px, calc(100vw - 48px));
    text-align: center;
    width: 100%;
}
.loading-badge {
    align-items: center;
    background: #f8f5e8;
    border-radius: 50% 48% 52% 46%;
    box-shadow: 7px 7px 0 rgba(7, 25, 43, .3);
    color: #142f4c;
    display: flex;
    font-family: "Comic Sans MS", "Comic Sans", cursive;
    font-size: 30px;
    font-weight: 700;
    height: 82px;
    justify-content: center;
    margin-bottom: 24px;
    transform: rotate(-4deg);
    width: 82px;
}
.loading-kicker {
    color: #bcd4ec;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.loading-content h1 {
    color: #fff;
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 650;
    letter-spacing: -.025em;
    margin: 8px 0 24px;
}
#progress {
    appearance: none;
    background: rgba(255, 255, 255, .16);
    border: 0;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}
#progress::-webkit-progress-bar {
    background: rgba(255, 255, 255, .16);
    border-radius: 999px;
}
#progress::-webkit-progress-value {
    background: #f4cc4f;
    border-radius: 999px;
    transition: width 120ms linear;
}
#progress::-moz-progress-bar {
    background: #f4cc4f;
    border-radius: 999px;
}
#status {
    color: #eaf2fb;
    font-size: 14px;
    margin-top: 14px;
    min-height: 20px;
}
.loading-note {
    color: #9fbad4;
    font-size: 12px;
    margin-top: 4px;
}
.loading-dots {
    display: flex;
    gap: 5px;
    margin-top: 18px;
}
.loading-dots span {
    animation: loading-dot 900ms ease-in-out infinite;
    background: #fff;
    border-radius: 50%;
    height: 5px;
    opacity: .35;
    width: 5px;
}
.loading-dots span:nth-child(2) { animation-delay: 120ms; }
.loading-dots span:nth-child(3) { animation-delay: 240ms; }
#loading.is-error .loading-badge { background: #f2a5a5; }
@keyframes loading-dot {
    0%, 100% { opacity: .3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
}
#app {
    box-sizing: border-box;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}
#controls {
    display: none;
}
#dropzone {
    align-items: center;
    box-sizing: border-box;
    container-type: size;
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    text-align: center;
    touch-action: pinch-zoom;
    width: 100%;
}
div.emscripten_border {
    aspect-ratio: 4 / 3;
    background: #fff;
    border: 0;
    box-sizing: border-box;
    display: block;
    line-height: 0;
    margin: auto;
    max-height: 100%;
    max-width: 100%;
    overflow: hidden;
    touch-action: pinch-zoom;
    width: min(100%, calc(100vh * 4 / 3));
}
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
canvas.emscripten {
    border: 0px none;
    display: block;
    height: 100%;
    touch-action: pinch-zoom;
    width: 100%;
}
#mobile-controls {
    display: none;
    z-index: 90000;
}
#mobile-keyboard-button,
#mobile-send,
#mobile-close {
    appearance: none;
    border: 0;
    cursor: pointer;
    font: 700 15px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#mobile-keyboard-button {
    align-items: center;
    background: rgba(20, 47, 76, .94);
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 999px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .3);
    color: #fff;
    display: flex;
    gap: 7px;
    min-height: 48px;
    padding: 0 17px;
}
#mobile-keyboard-button .keyboard-icon {
    font-size: 21px;
}
#mobile-composer {
    align-items: center;
    background: rgba(20, 47, 76, .97);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 16px;
    box-shadow: 0 5px 24px rgba(0, 0, 0, .38);
    box-sizing: border-box;
    display: flex;
    gap: 8px;
    padding: 7px;
    width: min(560px, calc(100vw - 20px));
}
#mobile-composer[hidden] {
    display: none;
}
#mobile-input {
    background: #fff;
    border: 0;
    border-radius: 10px;
    box-sizing: border-box;
    color: #111;
    flex: 1 1 auto;
    font: 16px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    height: 42px;
    min-width: 0;
    padding: 0 12px;
}
#mobile-send {
    align-self: stretch;
    background: #f4cc4f;
    border-radius: 10px;
    color: #142f4c;
    padding: 0 14px;
}
#mobile-close {
    align-self: stretch;
    background: transparent;
    color: #fff;
    font-size: 25px;
    padding: 0 7px;
}
@media (pointer: coarse), (max-width: 720px) {
    html,
    body {
        height: var(--mobile-viewport-height, 100dvh);
    }
    body {
        inset: 0 auto auto 0;
        position: fixed;
        width: 100%;
    }
    #app {
        flex: 0 0 auto;
        height: auto;
        max-height: 100%;
        width: 100%;
    }
    #dropzone {
        align-items: flex-start;
        container-type: normal;
        flex: 0 0 auto;
    }
    div.emscripten_border {
        margin: 0 auto;
        max-height: none;
        width: min(100%, calc((var(--mobile-viewport-height, 100dvh) - var(--mobile-controls-height, 68px)) * 4 / 3));
    }
    #mobile-controls {
        align-items: center;
        background: #fff;
        box-sizing: border-box;
        display: flex;
        flex: 0 0 auto;
        justify-content: center;
        padding: 6px max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
        position: static;
        width: 100%;
    }
    body.mobile-composer-open #mobile-keyboard-button {
        display: none;
    }
}
#console {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 100%;
}
#app > hr {
    display: none;
}
.modalDialog {
    position: fixed;
    font-family: Arial, Helvetica, sans-serif;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0,0,0,0.8);
    z-index:99999;
    opacity: 0;
    -webkit-transition: opacity 400ms ease-in;
    -moz-transition: opacity 400ms ease-in;
    transition: opacity 400ms ease-in;
    pointer-events: none;
}
.modalDialog:target{
    opacity: 1;
    pointer-events: auto;
}
.modalDialog > div {
    width: 400px;
    position: relative;
    margin: 10% auto;
    padding: 5px 20px 13px 20px;
    border-radius: 10px;
    background: #fff;
}
.close{
    background: #606061;
    color: #ffffff;
    line-height: 25px;
    position: absolute;
    right: -12px;
    text-align: center;
    top: -10px;
    width: 24px;
    text-decoration: none;
    -webkit-border-radius: 12px;
    border-radius: 12px;
    -webkit-box-shadow: 1px 1px 3px #000;
    box-shadow: 1px 1px 3px #000;
}
.close:hover{
    background: #00d9ff;
}
.scroll-style
{
    max-height: 250px;
    overflow-y: scroll;
}
