.preview.image-zoom {
    padding: 0;
    overflow: hidden;
    overscroll-behavior: contain;
}

.image-zoom-stage {
    position: absolute;
    inset: 48px 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.image-zoom-stage.is-zoomed {
    cursor: grabbing;
}

.preview.image-zoom .image-zoom-stage img {
    display: block;
    width: auto;
    height: auto;
    max-width: 96vw;
    max-height: calc(100vh - 120px);
    transform-origin: center center;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

.preview.image-zoom > .image-zoom-close {
    z-index: 3;
    top: 5px;
    right: 8px;
    width: 44px;
    height: 44px;
    background: transparent;
    color: #fff;
    font-size: 36px;
}

.image-zoom-tools {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    transform: translateX(-50%);
    border-radius: 24px;
    background: rgba(0, 0, 0, .68);
}

.preview.image-zoom .image-zoom-tools button {
    position: static;
    min-width: 38px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 17px;
    background: #fff;
    color: #222;
    font-size: 18px;
    font-weight: bold;
}

.preview.image-zoom .image-zoom-tools button[data-zoom="reset"] {
    font-size: 13px;
}

.image-zoom-tools output {
    min-width: 48px;
    color: #fff;
    text-align: center;
    font: 13px Arial, sans-serif;
}

.image-zoom-help {
    position: absolute;
    z-index: 2;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
}

@media (max-width: 500px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .app {
        width: 100% !important;
        max-width: 100% !important;
    }

    .image-zoom-stage {
        inset: 42px 0 60px;
    }

    .preview.image-zoom .image-zoom-stage img {
        max-width: 100vw;
        max-height: calc(100vh - 108px);
    }

    .image-zoom-help {
        top: 13px;
        font-size: 11px;
    }

    .image-zoom-tools {
        bottom: 10px;
    }
}
