.crop-app {max-width:860px;margin:auto;text-align:center;min-width:0}
.crop-app [hidden]{display:none!important}
.crop-pick {padding:12px 0;position:relative}
.crop-pick-button {display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 24px;border-radius:10px;background:#145eb7;color:#fff!important;font-weight:650;cursor:pointer}
.crop-file {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;opacity:0;overflow:hidden}
.crop-pick:focus-within .crop-pick-button{outline:3px solid #65a3fa;outline-offset:3px}
.crop-pick details,.crop-options{font-size:14px;margin:12px auto;max-width:100%;text-align:left;border:1px solid #d8e4ef;border-radius:9px;padding:10px 12px}
.crop-status {font-size:14px;color:#52677f;overflow-wrap:anywhere;margin:10px 0;min-height:1.5em}
.crop-toolbar {display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:12px 0}
.crop-toolbar button,.crop-app>div>button {min-height:44px;padding:10px 18px;line-height:1.3}
.crop-toolbar .crop-light {background:#edf4fc;color:#185994;border:1px solid #cddced}
.crop-stage {position:relative;display:inline-block;vertical-align:middle;max-width:100%;overflow:hidden;border-radius:8px;background:repeating-conic-gradient(#e0e5eb 0% 25%,#f5f7fa 0% 50%) 0 0/18px 18px;line-height:0;user-select:none;}
.crop-stage img {display:block;max-width:100%;max-height:min(64vh,700px);width:auto;height:auto;margin:0;border:0;object-fit:contain;image-orientation:from-image;pointer-events:none}
.crop-stage.editing {touch-action:none;cursor:crosshair}
#crop-frame {position:absolute;border:2px solid white;box-sizing:border-box;box-shadow:0 0 0 3000px rgba(10,20,35,.54);cursor:move;touch-action:none}
.crop-grid {position:absolute;inset:0;pointer-events:none;background:linear-gradient(to right,transparent 33%,#ffffff77 33%,#ffffff77 33.5%,transparent 33.5%,transparent 66%,#ffffff77 66%,#ffffff77 66.5%,transparent 66.5%),linear-gradient(to bottom,transparent 33%,#ffffff77 33%,#ffffff77 33.5%,transparent 33.5%,transparent 66%,#ffffff77 66%,#ffffff77 66.5%,transparent 66.5%)}
.crop-app .crop-handle {position:absolute;display:block;width:46px;height:46px;min-width:0;min-height:0;padding:0;margin:0;background:transparent;border:0;border-radius:0;touch-action:none;box-shadow:none;z-index:2;transform:translate(-50%,-50%)}
.crop-handle:after {content:'';position:absolute;inset:14px;border:2px solid #1565ba;background:white;border-radius:5px;box-shadow:0 1px 6px #0006}
.crop-handle.nw{left:0;top:0;cursor:nwse-resize}.crop-handle.ne{left:100%;top:0;cursor:nesw-resize}.crop-handle.sw{left:0;top:100%;cursor:nesw-resize}.crop-handle.se{left:100%;top:100%;cursor:nwse-resize}
.crop-coordinates{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-width:480px;margin:0 auto}
.crop-coordinates label{text-align:left;font-size:13px;min-width:0}.crop-coordinates input{width:100%;min-width:0;box-sizing:border-box;margin:4px 0;min-height:40px}
.crop-app select{max-width:100%;min-height:42px;padding:5px 8px;border:1px solid #cddced;border-radius:7px;background:white;color:#18344e}
#crop-preview-box{background:#f1f6fb;padding:10px;border-radius:8px;margin:12px 0}#crop-preview-box img{max-width:100%;max-height:55vh;height:auto;width:auto}
.crop-warning{color:#a33e38!important}.crop-hint{margin:8px 0}.crop-app button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:480px){.crop-coordinates{grid-template-columns:repeat(2,minmax(0,1fr))}.crop-toolbar{gap:8px}.crop-toolbar button{flex:1}.crop-stage img{max-height:58vh}.crop-app .crop-handle{width:48px;height:48px}.crop-handle:after{inset:14px}}
