/* The walkable arcade — page framing.
 * The stage fills the viewport under the fixed site banner. In it: the
 * room's canvas (internal pixels, scaled up by a whole number with hard
 * edges), the HUD canvas exactly over it, and the machine layer, which is
 * hidden until you step up to play and then shows the machine's own screen
 * over the room. The blurb lives below the fold.
 */

html:has(.arcade-page),
body:has(.arcade-page) {
    overscroll-behavior: none;
    background: #07060d;
}

.arcade-page {
    background: #07060d;
    width: 100%;
    margin: 0;
    padding: 0 0 2rem;
}

.arcade-stage {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--banner-h, 56px));
    height: calc(100dvh - var(--banner-h, 56px));
    overflow: hidden;
    background: #07060d;
    touch-action: none;
    overscroll-behavior: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    outline: none;
    cursor: crosshair;
}

/* stacking: the room, then its HUD, then the machine's screen, then STEP BACK */
.arcade-world,
.arcade-hud {
    position: absolute;
    z-index: 0;
    display: block;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.arcade-hud {
    z-index: 1;
    pointer-events: none;
}

/* the machine's own screen: present all along (it paints its cabinet for the
   room's 3-D face), seen and touched only while you play it */
.arcade-machine {
    position: absolute;
    z-index: 2;
    inset: 0;
    visibility: hidden;
    pointer-events: none;
}

.arcade-machine.is-on {
    visibility: visible;
    pointer-events: auto;
}

/* a 'fade' machine (world-host.js) fades in over its 3-D lane */
.arcade-machine--fade {
    opacity: 0;
    transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}

.arcade-machine--fade.is-on {
    opacity: 1;
    transition: opacity 0.32s ease, visibility 0s;
}

.arcade-machine .pachinko-canvas,
.arcade-machine .skeeball-canvas {
    background: transparent;
    outline: none;
}

.arcade-step-back {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    font: 600 0.95rem/1 ui-monospace, Menlo, monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8dfc8;
    background: rgba(7, 6, 13, 0.72);
    border: 1px solid #453567;
    padding: 0.55rem 0.7rem;
    cursor: pointer;
}

.arcade-step-back span {
    color: #8a7f9a;
    margin-left: 0.4rem;
}

@media (pointer: coarse) {
    .arcade-step-back span { display: none; }
}

.arcade-step-back:hover,
.arcade-step-back:focus-visible {
    border-color: #ff4fa8;
    outline: none;
}

.arcade-perf {
    position: absolute;
    right: 8px;
    top: 8px;
    font: 11px/1.3 ui-monospace, Menlo, monospace;
    color: #e8dfc8;
    background: rgba(7, 6, 13, 0.7);
    padding: 3px 6px;
    pointer-events: none;
}

.arcade-noscript {
    position: absolute;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);
    color: #e8dfc8;
}

.arcade-placard {
    max-width: 42rem;
    margin: 0 auto;
    padding: var(--s-4, 1.5rem) var(--s-3, 1rem) 0;
    color: #b0a78d;
}

.arcade-blurb {
    margin: 0 0 var(--s-2, 0.75rem);
    line-height: 1.6;
}

.arcade-blurb a {
    color: #ff4fa8;
}

.arcade-build {
    margin: 0;
    font: 0.75rem/1.4 ui-monospace, Menlo, monospace;
    color: #6f5d95;
}

.arcade-build-sep {
    margin: 0 0.4em;
}
