html,
body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

#wrap {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem;
    box-sizing: border-box;
}

canvas {
    display: block;
    image-rendering: pixelated;
    background: #000;
    width: 100%;
    max-width: 960px;   /* 2x framebuffer: fills the frame, stays chunky */
    height: auto;
    aspect-ratio: 480 / 300;
}

.help {
    flex: 0 0 auto;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    opacity: .75;
    white-space: pre-wrap;
    pointer-events: none;
}

.hint {
    flex: 0 0 auto;
    text-align: center;
    font-size: 12px;
    opacity: .6;
    pointer-events: none;
}