@property --scn-cw {
    syntax: "<length>";
    inherits: false;
    initial-value: 0px;
}

.scn {
    position: absolute;
    inset: 0;
    overflow: hidden;
    container-type: size;
}

.scn__fit {
    --scn-cw: 100cqw;
    --scn-k: calc(tan(atan2(var(--scn-cw), var(--scn-w))));
    position: absolute;
    top: 0;
    left: 0;
    width: var(--scn-w);
    height: calc(100cqh / var(--scn-k));
    transform: scale(var(--scn-k));
    transform-origin: 0 0;
}

.scn-box { position: absolute; inset: 0; }

.scn-box--phone {
    right: auto;
    left: 50%;
    width: auto;
    max-width: 100%;
    height: 100%;
    aspect-ratio: 433 / 882;
    translate: -50% 0;
}

.frame--none:has(> .frame__screen > .scn-box) { aspect-ratio: 16 / 10; }
.frame--none:has(> .frame__screen > .scn-box--phone) { aspect-ratio: 433 / 882; }
.frame--none > .frame__screen:has(> .scn-box) { position: relative; height: 100%; }
