html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
}

#display {
    position: absolute;
    inset: 0;
    display: block;
    cursor: grab;
    touch-action: none;
}

#selectionRectangle {
    position: absolute;
    border: 1px solid #ff4d4d;
    background: rgba(255, 77, 77, 0.08);
    pointer-events: none;
    visibility: hidden;
}

.overlay {
    position: absolute;
    z-index: 10;
    /* No browser double-tap / pinch zoom on the controls */
    touch-action: manipulation;
}

.top-left {
    left: 10px;
    top: 10px;
    width: min(680px, calc(100vw - 20px - 230px));
    min-width: 260px;
}

.top-right {
    right: 10px;
    top: 10px;
}

.top-right .form-select {
    width: auto;
}

.bottom-center {
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 20px));
    background: rgba(34, 34, 34, 0.92);
}

.bottom-left {
    left: 10px;
    bottom: 8px;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 0 3px #000, 0 0 3px #000;
    pointer-events: none;
}

#formula {
    font-family: var(--bs-font-monospace);
}

#preset {
    flex: 0 0 auto;
    width: 12.5em;
}

@media (max-width: 640px) {
    .top-left {
        width: calc(100vw - 20px);
        top: 60px;
    }
}
