/* Reviewable, non-destructive crop UI for touch and desktop. */
.smart-crop-overlay{position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;margin:0;border:0;box-sizing:border-box;z-index:10050;background:rgba(24,18,22,.78);display:flex;align-items:center;justify-content:center;padding:12px}
.smart-crop-panel{width:min(960px,100%);max-height:94dvh;overflow:auto;background:#fffaf7;border-radius:18px;padding:18px;box-shadow:0 20px 70px rgba(0,0,0,.28);color:#30292a}
.smart-crop-stage{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:14px 0}
.smart-crop-stage>div{min-width:0;text-align:center}
.smart-crop-stage img,.smart-crop-stage canvas{display:block;width:100%;height:min(42vh,340px);object-fit:contain;background:#f4ebe7;border-radius:10px}
.smart-crop-stage small{display:block;margin-bottom:5px;font-weight:700}
.smart-crop-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}
.smart-crop-controls label{font-size:.85rem;font-weight:600}
.smart-crop-controls input{display:block;width:100%;margin-top:9px}
.smart-crop-panel .actions{display:flex;gap:9px;flex-wrap:wrap}
@media(max-width:620px){.smart-crop-panel{padding:12px}.smart-crop-stage{gap:8px}.smart-crop-stage img,.smart-crop-stage canvas{height:30vh}.smart-crop-controls{grid-template-columns:1fr;gap:8px}.smart-crop-panel .actions button{flex:1 1 auto}}

.smart-crop-trim{border:1px solid #d8c9be;border-radius:10px;padding:10px 12px;margin:14px 0;min-width:0}
.smart-crop-trim legend{font-weight:700;padding:0 5px}
.smart-crop-trim .smart-crop-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
.smart-crop-trim input{min-height:34px}

.smart-crop-legend{font-size:.85rem;line-height:1.4;margin:8px 0 14px;color:#433832}
.smart-crop-stage [data-crop-original]{border-radius:0}
.smart-crop-stage [data-crop-gallery]{height:auto;aspect-ratio:1;outline:2px solid #76583c;outline-offset:2px;border-radius:0}
@media(max-width:620px){.smart-crop-stage{grid-template-columns:repeat(2,minmax(0,1fr))}.smart-crop-source{grid-column:1/-1}.smart-crop-stage [data-crop-original]{height:32vh}}
