.stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.device {
    position: relative;
    padding: var(--bezel);
    border-radius: var(--radius-device);
    background:
        linear-gradient(160deg, var(--shell-light) 0%, var(--shell-mid) 32%, var(--shell-dark) 70%, #0b0b10 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.07),
        0 30px 70px rgba(0, 0, 0, 0.85);

    touch-action: none;
}

.device::after {
    content: "";
    position: absolute;
    inset: calc(2 * var(--px));
    border-radius: calc(var(--radius-device) - 2 * var(--px));
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0%, transparent 26%, transparent 72%, rgba(255, 255, 255, 0.07) 100%);
    pointer-events: none;
}

.device__key {
    position: absolute;
    width: calc(3 * var(--px));
    border-radius: calc(3 * var(--px));
    background: linear-gradient(90deg, var(--shell-light), var(--shell-mid));
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.device__key--vol-up {
    left: calc(-3 * var(--px));
    top: calc(132 * var(--px));
    height: calc(52 * var(--px));
}

.device__key--vol-down {
    left: calc(-3 * var(--px));
    top: calc(196 * var(--px));
    height: calc(52 * var(--px));
}

.device__key--power {
    right: calc(-3 * var(--px));
    top: calc(164 * var(--px));
    height: calc(74 * var(--px));
}

.screen {
    position: relative;
    width: var(--screen-w);
    height: var(--screen-h);
    border-radius: calc(var(--radius-device) - var(--bezel) - 2 * var(--px));
    background: var(--screen);
    overflow: hidden;
}

.screen__layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.screen__pixels {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: calc(2 * var(--px)) calc(2 * var(--px));
    opacity: 0.5;
}

.screen__scanlines {
    background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0.22) 4px);
    background-size: 100% calc(4 * var(--px));
    opacity: 0.5;
    animation: scanline-drift 7s linear infinite;
}

@keyframes scanline-drift {
    from { background-position-y: 0; }
    to   { background-position-y: calc(8 * var(--px)); }
}

.screen__vignette {
    background: radial-gradient(120% 100% at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.55) 100%);
}

@media (prefers-reduced-motion: reduce) {
    .screen__scanlines { animation: none; }
}
