.nsme {
    width: min(100%, 980px);
    margin: 0 auto 2rem;
}

.nsme-stage {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #111;
    border: 1px solid #222;
}

.nsme-stage:fullscreen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
    background: #000;
}

.nsme-stage:fullscreen canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#nsme-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.nsme-toolbar {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    gap: 8px;
    opacity: 0.82;
    transition: opacity 160ms ease;
}

.nsme-stage:hover .nsme-toolbar,
.nsme-toolbar:focus-within {
    opacity: 1;
}

.nsme-toolbar button {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.62);
    color: white;
    padding: 7px 10px;
    font: inherit;
    cursor: pointer;
}

.nsme-toolbar button:hover,
.nsme-toolbar button:focus-visible {
    background: rgba(0, 0, 0, 0.82);
}
