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

.wallpaper-crop-layer {
    position: absolute;
    inset: 0;
    transform-origin: var(--crop-position);
    transform: scale(var(--crop-zoom));
}

.wallpaper-crop-layer > .wallpaper-image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: var(--image-position);
    transform: translate(-50%, -50%) scaleX(var(--crop-mirror)) rotate(var(--crop-turn));
}

[data-quarter-turn] .wallpaper-crop-layer > .wallpaper-image {
    width: 100cqh;
    height: 100cqw;
}

.wallpaper-placed-image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.wallpaper-placed-image[data-placement-pending] {
    visibility: hidden;
}
