.background-crop-overlay{position:fixed;inset:0;z-index:180;display:flex;align-items:center;justify-content:center;padding:16px;background:var(--theme-overlay,rgba(0,0,0,.55));overscroll-behavior:contain}
.background-crop-dialog{width:min(720px,100%);max-height:calc(100dvh - 32px);overflow:auto;background:var(--bg-card);color:var(--text-main);border:1px solid var(--border-color);border-radius:16px;box-shadow:0 20px 80px #0005}
.background-crop-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--border-color)}.background-crop-dialog h2{margin:0;font-size:17px}.background-crop-dialog>header>button{font-size:24px;color:var(--text-muted)}
.background-crop-body{padding:16px 20px}.background-crop-body>p{margin:0 0 12px;font-size:12px;color:var(--text-muted)}.background-crop-stage{position:relative;max-width:100%;margin:auto;overflow:hidden;border:2px solid var(--accent-readable,var(--accent-pink));border-radius:8px;background:repeating-conic-gradient(#9994 0 25%,#aaa2 0 50%) 0/16px 16px}.background-crop-stage>canvas{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none;cursor:grab;outline:none}.background-crop-stage>canvas:active{cursor:grabbing}.background-crop-stage:focus-within{outline:2px solid var(--focus-ring,var(--accent-pink));outline-offset:3px}
.background-crop-zoom{display:flex;align-items:center;gap:12px;margin:16px 0 0;font-size:13px}.background-crop-zoom>input{flex:1;min-width:0;width:auto;accent-color:var(--brand-primary,var(--accent-pink))}.background-crop-zoom>output{min-width:46px;text-align:right;font-variant-numeric:tabular-nums}.background-crop-body>.background-crop-error{color:var(--red,#b91c1c);margin:10px 0 0}.background-crop-error:empty{display:none}
.background-crop-dialog>footer{display:flex;align-items:center;gap:8px;padding:14px 20px;border-top:1px solid var(--border-color)}.background-crop-dialog>footer>span{flex:1}.background-crop-dialog .btn{color:var(--text-main);background:var(--bg-card);border:1px solid var(--control-border,var(--border-color));min-height:38px;font-size:13px}.background-crop-dialog .btn:hover{background:var(--accent-soft);border-color:var(--accent-readable)}.background-crop-dialog .btn.primary{color:#fff;background:var(--brand-primary,#be185d);border-color:var(--brand-primary,#be185d)}.background-crop-dialog .btn:focus-visible{outline:2px solid var(--focus-ring,var(--accent-pink));outline-offset:2px}.background-crop-dialog button:disabled{opacity:.6;cursor:wait}
@media(max-width:600px){.background-crop-overlay{padding:10px}.background-crop-dialog{max-height:calc(100dvh - 20px)}.background-crop-body{padding:14px 16px}.background-crop-dialog>header,.background-crop-dialog>footer{padding:12px 16px}.background-crop-dialog>footer{gap:6px}.background-crop-dialog .btn{font-size:12px;padding:8px 10px}}

