.photo-crop-dialog{width:min(440px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);box-sizing:border-box;overflow:hidden;overscroll-behavior:contain;padding:18px;border:0;border-radius:16px;background:#fff;color:#203a27}
.photo-crop-dialog[open]{display:flex;flex-direction:column}
.photo-crop-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:3px;flex:1 1 auto}
.photo-crop-dialog>h2,.photo-crop-dialog>#photo-crop-help,.photo-crop-dialog>.photo-crop-actions{flex:0 0 auto}
.photo-crop-dialog::backdrop{background:#14200db3}
.photo-crop-dialog h2{margin:0 0 8px;font-size:22px;line-height:1.3}
.photo-crop-dialog p{margin:0 0 12px;font-size:14px;line-height:1.5;color:#50604c}
.photo-crop-preview{display:block;width:100%;height:auto;aspect-ratio:1;max-width:360px;margin:0 auto 14px;border:1px solid #b7c8ad;border-radius:8px;background:#edf3e9;touch-action:none;cursor:grab}
.photo-crop-dialog[data-crop-frame=portrait] .photo-crop-preview{aspect-ratio:9 / 16;width:auto;height:clamp(160px,calc(100dvh - 440px),360px);max-width:100%;object-fit:contain}
.photo-crop-preview:active{cursor:grabbing}
.photo-crop-controls{display:grid;gap:8px}
.photo-crop-controls label{display:block;margin:0;font:inherit;font-size:14px;font-weight:600;line-height:1.4}
.photo-crop-controls output{float:right;font-variant-numeric:tabular-nums;font-weight:400}
.photo-crop-controls input[type=range]{display:block;width:100%;min-height:44px;height:44px;margin:0;padding:0;accent-color:#28531a;box-sizing:border-box;cursor:pointer}
.photo-crop-dialog .photo-crop-note{margin:8px 0 12px;font-size:13px}
.photo-crop-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:10px;background:#fff}
.photo-crop-actions>.btn{width:100%;min-width:0;min-height:44px;margin:0;padding:10px 6px;white-space:normal;font:inherit;font-size:14px;line-height:1.4}
.photo-crop-dialog :focus-visible{outline:3px solid #397126;outline-offset:3px}
@media(max-height:650px){.photo-crop-preview{max-width:240px}.photo-crop-dialog{padding:12px}}
@media(max-width:340px){.photo-crop-dialog{padding:12px}}
