/* This layer follows the displayed source image, never a resized export canvas. */
.image-tools-page .crop-stage {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    isolation: isolate;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair;
}
.image-tools-page .crop-stage > img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    pointer-events: none;
    -webkit-user-drag: none;
}
.image-tools-page .crop-stage .crop-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    pointer-events: none;
}
.image-tools-page .crop-shade path { fill: rgba(7, 18, 34, 0.56); }
.image-tools-page .crop-stage .crop-box {
    position: absolute;
    z-index: 2;
    display: block;
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    cursor: move;
    touch-action: none;
}
.image-tools-page .crop-box::before {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    border: 1px solid #fff;
    box-shadow: inset 0 0 0 1px rgba(9, 25, 47, 0.5);
    background-image: linear-gradient(to right, transparent 33.1%, rgba(255,255,255,0.42) 33.1%, rgba(255,255,255,0.42) 33.6%, transparent 33.6%, transparent 66.4%, rgba(255,255,255,0.42) 66.4%, rgba(255,255,255,0.42) 66.9%, transparent 66.9%), linear-gradient(to bottom, transparent 33.1%, rgba(255,255,255,0.42) 33.1%, rgba(255,255,255,0.42) 33.6%, transparent 33.6%, transparent 66.4%, rgba(255,255,255,0.42) 66.4%, rgba(255,255,255,0.42) 66.9%, transparent 66.9%);
    content: '';
    pointer-events: none;
}
.image-tools-page .crop-box:focus-visible::before {
    border: 2px solid #ffe18b;
    box-shadow: inset 0 0 0 1px #183557;
}
.image-tools-page .crop-is-circle .crop-box::before { background-image: none; border-style: dashed; }
.image-tools-page .crop-is-circle .crop-box::after {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    border: 2px solid #fff;
    border-radius: 50%;
    content: '';
    pointer-events: none;
}
.image-tools-page .crop-stage .crop-handle {
    position: absolute;
    z-index: 3;
    display: block;
    box-sizing: border-box;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    line-height: 1;
    box-shadow: none;
    touch-action: none;
}
.image-tools-page .crop-handle::after {
    position: absolute;
    left: var(--crop-marker-x, 5px);
    top: var(--crop-marker-y, 5px);
    box-sizing: border-box;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 2px;
    background: #0052cc;
    box-shadow: 0 0 0 1px rgba(9, 25, 47, 0.65);
    transform: translate(-50%, -50%);
    content: '';
    pointer-events: none;
}
.image-tools-page .crop-handle[data-handle="nw"],
.image-tools-page .crop-handle[data-handle="se"] { cursor: nwse-resize; }
.image-tools-page .crop-handle[data-handle="ne"],
.image-tools-page .crop-handle[data-handle="sw"] { cursor: nesw-resize; }
.image-tools-page .crop-stage .crop-handle:focus-visible {
    outline: 2px solid #ffe18b;
    outline-offset: -3px;
    background: rgba(0, 82, 204, 0.2);
}
.image-tools-page .crop-is-dragging { cursor: grabbing; }
.image-tools-page .crop-is-dragging .crop-box { cursor: grabbing; }
