.ara-receipt-crop {
  box-sizing: border-box;
  width: min(760px, calc(100vw - 24px));
  height: min(900px, calc(100vh - 24px));
  height: min(900px, calc(100dvh - 24px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 18px;
  border: 1px solid #b9cbd7;
  border-radius: 14px;
  background: #fff;
  color: #1b3046;
  font-family: inherit;
  box-shadow: 0 18px 70px #10263855;
  overflow: hidden;
}
.ara-receipt-crop[open] { display: flex; flex-direction: column; gap: 10px; }
.ara-receipt-crop::backdrop { background: #071b2cba; }
.ara-receipt-crop .ara-crop-header { display: block; flex: 0 0 auto; }
.ara-receipt-crop h2 { margin: 0 0 5px; font-size: 20px; line-height: 1.3; }
.ara-receipt-crop .ara-crop-header p { margin: 0; color: #50667a; font-size: 14px; }
.ara-receipt-crop button {
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #b5c7d5;
  border-radius: 8px;
  background: #fff;
  color: #1b3046;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
  touch-action: manipulation;
}
.ara-receipt-crop button:focus-visible { outline: 3px solid #006fc9; outline-offset: 2px; }
.ara-receipt-crop button:disabled { opacity: .5; cursor: wait; }
.ara-receipt-crop .ara-crop-stage {
  position: relative;
  flex: 1 1 160px;
  min-height: 100px;
  width: 100%;
  overflow: hidden;
  background: #1b2b39;
  border-radius: 8px;
  touch-action: none;
}
.ara-receipt-crop .ara-crop-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ara-receipt-crop .ara-crop-corner {
  position: absolute;
  z-index: 1;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  touch-action: none;
  cursor: grab;
}
.ara-receipt-crop .ara-crop-corner span {
  display: block;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  margin: auto;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #16828a;
  box-shadow: 0 1px 6px #0009;
}
.ara-receipt-crop .ara-crop-corner.is-selected span { background: #fff; border-color: #38aeb8; box-shadow: 0 0 0 3px #fff9; }
.ara-receipt-crop .ara-crop-adjustments { display: flex; justify-content: center; align-items: center; gap: 8px; flex: 0 0 auto; }
.ara-receipt-crop .ara-crop-adjustments button { padding: 4px; font-size: 23px; }
.ara-receipt-crop .ara-crop-selected { min-width: 70px; font-size: 13px; }
.ara-receipt-crop .ara-crop-tools { display: flex; justify-content: center; gap: 10px; flex: 0 0 auto; }
.ara-receipt-crop .ara-crop-error { margin: 0; color: #a12c2c; font-size: 13px; line-height: 1.4; flex: 0 0 auto; }
.ara-receipt-crop .ara-crop-error:empty { display: none; }
.ara-receipt-crop .ara-crop-actions { display: flex; justify-content: flex-end; gap: 10px; flex: 0 0 auto; padding-top: 5px; }
.ara-receipt-crop .ara-crop-actions button { min-width: 88px; }
.ara-receipt-crop .ara-crop-apply { color: #fff; background: #207c87; border-color: #207c87; }
@media(max-width: 480px) {
  .ara-receipt-crop { padding: 12px; width: calc(100vw - 12px); height: calc(100vh - 12px); height: calc(100dvh - 12px); border-radius: 10px; }
  .ara-receipt-crop[open] { gap: 8px; }
  .ara-receipt-crop h2 { font-size: 18px; }
  .ara-receipt-crop .ara-crop-adjustments { gap: 5px; }
  .ara-receipt-crop .ara-crop-actions button { flex: 1; }
}
