.crop-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  overflow: auto;
  border: 1px solid #e5e0d6;
  border-radius: 15px;
  color: #242521;
  background: #fffdf8;
  box-shadow: 0 20px 100px #24252140;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
.crop-dialog::backdrop { background: #242521a6; }
.crop-dialog * { box-sizing: border-box; }
.crop-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.crop-eyebrow { color: #9b978a; font-size: 11px; letter-spacing: 1.4px; }
.crop-heading h2 { margin: 5px 0 0; font-size: 19px; font-weight: 600; letter-spacing: .4px; }
.crop-dialog button { font: inherit; cursor: pointer; touch-action: manipulation; }
.crop-close { border: 0; padding: 0; border-radius: 7px; width: 32px; height: 32px; background: #f1eee7; color: #827f75; font-size: 24px !important; line-height: 1; }
.crop-close:hover { background: #e8e2d8; }
.crop-proportion { margin: 9px 0 17px; color: #827f75; font-size: 12px; }
.crop-stage { height: clamp(190px, 38dvh, 340px); display: flex; align-items: center; justify-content: center; overflow: hidden; background: #e9e5dc; border: 1px solid #e5e0d6; border-radius: 9px; }
.crop-frame { position: relative; flex: none; overflow: hidden; cursor: grab; touch-action: none; user-select: none; outline: 2px solid #fffdf8; background-color: #fff; background-image: linear-gradient(45deg, #deddd9 25%, transparent 25%), linear-gradient(-45deg, #deddd9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #deddd9 75%), linear-gradient(-45deg, transparent 75%, #deddd9 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.crop-frame.is-dragging { cursor: grabbing; }
.crop-frame:focus-visible { outline: 3px solid #ed6b31; outline-offset: 3px; }
.crop-photo { display: block; position: absolute; margin: 0; padding: 0; max-width: none !important; max-height: none !important; pointer-events: none; user-select: none; }
.crop-grid { position: absolute; inset: 0; pointer-events: none; border: 1px solid #fffffff0; background-image: linear-gradient(to right, transparent calc(100% / 3 - .5px), #ffffff6e calc(100% / 3 - .5px), #ffffff6e calc(100% / 3 + .5px), transparent calc(100% / 3 + .5px), transparent calc(200% / 3 - .5px), #ffffff6e calc(200% / 3 - .5px), #ffffff6e calc(200% / 3 + .5px), transparent calc(200% / 3 + .5px)), linear-gradient(to bottom, transparent calc(100% / 3 - .5px), #ffffff6e calc(100% / 3 - .5px), #ffffff6e calc(100% / 3 + .5px), transparent calc(100% / 3 + .5px), transparent calc(200% / 3 - .5px), #ffffff6e calc(200% / 3 - .5px), #ffffff6e calc(200% / 3 + .5px), transparent calc(200% / 3 + .5px)); }
.crop-help { margin: 11px 0 15px; color: #827f75; font-size: 12px; line-height: 1.8; }
.crop-zoom-row { display: flex; align-items: center; gap: 9px; }
.crop-zoom-row label { flex-shrink: 0; font-size: 12px; color: #626357; }
.crop-zoom-row input { flex: 1; width: 0; min-width: 35px; accent-color: #ed6b31; cursor: pointer; }
.crop-zoom-row button { flex-shrink: 0; width: 30px; height: 30px; padding: 0; border: 1px solid #e5e0d6; border-radius: 7px; background: #f8f5ee; color: #626357; font-size: 17px; }
.crop-dialog button:disabled { cursor: default; opacity: .4; }
.crop-zoom-value { width: 42px; text-align: right; font-size: 12px; color: #827f75; font-variant-numeric: tabular-nums; }
.crop-resolution { margin: 12px 0 17px; color: #a09a8b; font-size: 11px; font-variant-numeric: tabular-nums; }
.crop-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e5e0d6; padding-top: 17px; }
.crop-actions > div { display: flex; align-items: center; gap: 9px; }
.crop-actions button { min-height: 38px; padding: 7px 15px; border: 1px solid #e5e0d6; border-radius: 7px; color: #626357; background: #fffdf8; font-size: 12px; white-space: nowrap; }
.crop-actions .crop-reset { border-color: transparent; padding-left: 0; color: #827f75; }
.crop-actions .crop-apply { background: #ed6b31; color: #fffdf8; border-color: #ed6b31; }
.crop-actions .crop-apply:hover { background: #b94b21; border-color: #b94b21; }
.crop-dialog button:focus-visible, .crop-dialog input:focus-visible { outline: 3px solid #ed6b31; outline-offset: 3px; }
@media (max-width: 480px) {
  .crop-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 17px; }
  .crop-heading h2 { font-size: 17px; }
  .crop-stage { height: clamp(185px, 35dvh, 290px); }
  .crop-zoom-row { gap: 6px; }
  .crop-zoom-row label { font-size: 11px; }
  .crop-zoom-row button { width: 28px; height: 28px; }
  .crop-actions button { padding: 7px 11px; }
}
