.bm-crop-fine {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg-primary, #f9fafb);
  color: var(--text-primary, #111827);
  overflow: hidden;
  overscroll-behavior: none;
}
.bm-crop-fine[open] { display: flex; flex-direction: column; }
.bm-crop-fine::backdrop { background: #f9fafb; }
.bm-crop-fine__header {
  flex: none;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 12px;
  background: var(--bg-primary, #f9fafb);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}
.bm-crop-fine__header h2 { margin: 0; font-size: 18px; font-weight: 700; }
.bm-crop-fine__header p { margin: 5px 0 0; font-size: 13px; color: var(--text-secondary, #64748b); }
.bm-crop-fine__viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  background: #e5e7eb;
}
.bm-crop-fine__image {
  position: absolute;
  max-width: none;
  max-height: none;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}
.bm-crop-fine__overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.bm-crop-fine__shade { fill: rgba(15, 23, 42, 0.44); }
.bm-crop-fine__frame { fill: transparent; stroke: var(--primary, #6366f1); stroke-width: 2; vector-effect: non-scaling-stroke; }
.bm-crop-fine__handle {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  cursor: crosshair;
  touch-action: none;
}
.bm-crop-fine__handle[hidden] { display: none; }
.bm-crop-fine__handle::before {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--primary, #6366f1);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.32);
  content: '';
}
.bm-crop-fine__handle.is-edge::before { left: 17px; top: 17px; width: 14px; height: 14px; }
.bm-crop-fine__handle.is-active::before { background: #312e81; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); }
.bm-crop-fine__handle:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: -3px; }
.bm-crop-fine__viewport.is-moving .bm-crop-fine__frame { filter: drop-shadow(0 7px 9px rgba(79, 70, 229, 0.3)); }
.bm-crop-fine__status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; font-size: 14px; background: #f3f4f6; }
.bm-crop-fine__status[hidden] { display: none; }
.bm-crop-fine__magnifier {
  position: absolute;
  z-index: 5;
  border: 2px solid #fff;
  border-radius: 18px;
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.28);
  pointer-events: none;
}
.bm-crop-fine__magnifier[hidden] { display: none; }
.bm-crop-fine__footer {
  display: flex;
  flex: none;
  gap: 12px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: var(--bg-primary, #f9fafb);
}
.bm-crop-fine__footer button {
  flex: 1;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  background: #fff;
  color: var(--text-primary, #111827);
  font: inherit;
  font-weight: 600;
}
.bm-crop-fine__footer [data-action="done"] { background: var(--primary, #6366f1); color: #fff; border-color: transparent; }
.bm-crop-fine__footer button:disabled { opacity: 0.45; }
@media (max-height: 500px) {
  .bm-crop-fine__header { padding-top: max(6px, env(safe-area-inset-top, 0px)); padding-bottom: 6px; }
  .bm-crop-fine__header h2 { font-size: 16px; }
  .bm-crop-fine__header p { margin-top: 2px; font-size: 12px; }
  .bm-crop-fine__footer { padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom, 0px)); }
}
