:root {
    --s: 4;
    --green: #7cff5b;
    --green-dim: #2f7a2a;
}

html, body {
    margin: 0;
    height: 100%;
    background: #050805;
    overflow: hidden;
}

#frame {
    position: relative;
}

#stage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

#garage {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    cursor: pointer;
}

#controls {
    position: absolute;
    bottom: calc(var(--s) * 1px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: calc(var(--s) * 2px);
}

#controls button {
    font: bold calc(var(--s) * 3.4px) / 1 "Courier New", ui-monospace, monospace;
    letter-spacing: 0.05em;
    color: var(--green);
    background: #071407;
    border: calc(var(--s) * 0.75px) solid var(--green-dim);
    padding: calc(var(--s) * 1.4px) calc(var(--s) * 2.5px);
    text-shadow: 0 0 calc(var(--s) * 1.5px) #3cff3c;
    cursor: pointer;
}

#controls button:hover {
    border-color: var(--green);
}

#capacity-label {
    display: flex;
    align-items: center;
    gap: calc(var(--s) * 1.5px);
    font: bold calc(var(--s) * 3.4px) / 1 "Courier New", ui-monospace, monospace;
    letter-spacing: 0.05em;
    color: var(--green);
    text-shadow: 0 0 calc(var(--s) * 1.5px) #3cff3c;
}

#capacity {
    width: calc(var(--s) * 11px);
    font: inherit;
    color: var(--green);
    background: #071407;
    border: calc(var(--s) * 0.75px) solid var(--green-dim);
    padding: calc(var(--s) * 1.1px) calc(var(--s) * 1px);
}

#capacity:focus {
    outline: none;
    border-color: var(--green);
}

#controls button:disabled {
    opacity: 0.4;
    cursor: default;
}

#controls button.active {
    color: #071407;
    background: var(--green);
    border-color: var(--green);
    text-shadow: none;
}

#events-debug {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(480 * var(--s) * 1px);
    height: calc(270 * var(--s) * 1px);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#events-debug[hidden] {
    display: none;
}

#controls {
    z-index: 2;
}

#events-debug {
    z-index: 1;
}

/* link on the canvas sign: sign spans x 60-172, line 4 at y 252 (canvas px) */
#em-studio-link {
    position: absolute;
    left: calc(var(--s) * 60px);
    width: calc(var(--s) * 112px);
    top: calc(var(--s) * 251px);
    text-align: center;
    font: bold calc(var(--s) * 4px) / 1 "Courier New", ui-monospace, monospace;
    letter-spacing: 0.05em;
    color: #ffffff;
    text-decoration: underline;
}

#em-studio-link:hover {
    color: #9fc0ff;
}
