:root {
    --phosphor: #7dffa0;
    --phosphor-glow: rgba(90, 255, 150, 0.55);
    --bg: #000;
}

html,
body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

#game {
    position: fixed;
    inset: 0;
    max-width: 560px;
    margin: 0 auto;
    background: var(--bg);
    overflow: hidden;
}

/* desktop and tablets: phone proportions, so the HUD (needle square, DSKY) looks the same
   as on a phone. Phones (under 600 px wide) keep their full width. */
@media (min-width: 600px) {
    #game {
        max-width: min(560px, 47vh);
    }
}

#scene {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: block;
}

#frame,
#hud {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#hud {
    filter: drop-shadow(0 0 2.5px var(--phosphor-glow));
}

#pad {
    position: absolute;
    touch-action: none;
    border-radius: 6px;
    cursor: crosshair;
}

#pro,
#lever {
    position: absolute;
    touch-action: none;
    cursor: pointer;
}

#lever {
    display: none;
    cursor: ns-resize;
}

/* Back to Games / Back to Main: on the title and debrief screens */
#end-links {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 16px;
}

#end-links[hidden] {
    display: none;
}

#end-links a {
    flex: 0 1 180px;
    padding: 10px 8px;
    text-align: center;
    font: 600 13px/1.2 ui-monospace, "Courier New", monospace;
    letter-spacing: 0.08em;
    color: var(--phosphor);
    text-decoration: none;
    border: 1.5px solid var(--phosphor);
    border-radius: 6px;
    background: rgba(2, 12, 6, 0.75);
    box-shadow: 0 0 8px var(--phosphor-glow);
}

#end-links a:active,
#end-links a:hover {
    background: rgba(125, 255, 160, 0.18);
}

#safe-probe {
    position: absolute;
    visibility: hidden;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

#fallback {
    position: absolute;
    inset: 40% 16px auto;
    color: var(--phosphor);
    font: 14px/1.4 ui-monospace, "Courier New", monospace;
    text-align: center;
}
