:root { --scan: rgba(0,0,0,0.22); --edge: #2f3d33; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    height: 100%;
    background: #0d1310;
    color: #cfd8c4;
    font-family: "Courier New", monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#wrap {
    position: relative;
    image-rendering: pixelated;
    line-height: 0;
}
canvas {
    display: block;
    image-rendering: pixelated;
    background: #161d1a;
    border: 3px solid var(--edge);
    box-shadow: 0 0 0 3px #0d1310, 0 0 44px rgba(77,107,57,0.28);
    width: min(96vw, 173.33vh, 1280px);
    height: auto;
    aspect-ratio: 16 / 9;
}
/* Subtle CRT scanlines, matching the collection's arcade framing. */
#wrap::after {
    content: "";
    position: absolute;
    inset: 3px;
    pointer-events: none;
    background: repeating-linear-gradient(
            to bottom,
            rgba(0,0,0,0) 0px,
            rgba(0,0,0,0) 2px,
            var(--scan) 3px,
            var(--scan) 4px
    );
    mix-blend-mode: multiply;
}
/* Control legend. The title screen used to draw these on the canvas, where the
   wordmark's centred textAlign was never reset, so both columns rendered
   centred instead of left-aligned and the long values collided. DOM text wraps,
   stays crisp at any scale and never fights the pixel grid. */
#hint {
    position: absolute;
    bottom: 8px;
    left: 0; right: 0;
    text-align: center;
    font-size: 10px;
    line-height: 1.8;
    letter-spacing: 1px;
    color: #77876f;
    pointer-events: none;
    text-shadow: 0 0 6px rgba(77,107,57,0.35);
}
#hint b { color: #6d9049; font-weight: bold; }
@media (max-width: 640px) { #hint { font-size: 9px; letter-spacing: 0.5px; } }
@media (max-height: 560px) { #hint { display: none; } }
