/* Self-contained profile cropper; intentionally no remote fonts or assets. */
.sf-avatar-crop {
  --crop-teal: #17675d;
  --crop-ink: #24463e;
  --crop-tan: #f5f1e8;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin-top: 24px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid #d1ded8;
  border-radius: 18px;
  color: var(--crop-ink);
  background: #fff;
  font-family: 'DM Sans', 'Manrope', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
.sf-avatar-crop *, .sf-avatar-crop *::before, .sf-avatar-crop *::after { box-sizing: border-box; }
.sf-avatar-crop h4 { margin: 0 0 10px; font-family: 'Manrope', 'DM Sans', sans-serif; font-size: 22px; line-height: 1.3; font-weight: 800; }
.sf-avatar-crop p { margin: 0; font-size: 16px; }
.sf-avatar-crop .sf-avatar-crop-help { max-width: 62ch; margin-bottom: 22px; color: #466357; }
.sf-avatar-crop-preview { display: flex; justify-content: center; min-width: 0; padding: 16px; border-radius: 16px; background: var(--crop-tan); }
.sf-avatar-crop canvas {
  display: block;
  width: min(100%, 320px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e0f0eb;
  box-shadow: 0 0 0 5px #fff;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.sf-avatar-crop canvas:active { cursor: grabbing; }
.sf-avatar-crop[aria-busy='true'] canvas { cursor: progress; }
.sf-avatar-crop-zoom { margin-top: 24px; }
.sf-avatar-crop-zoom-label { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 10px; font-weight: 700; }
.sf-avatar-crop output { color: var(--crop-teal); font-size: 16px; font-variant-numeric: tabular-nums; }
.sf-avatar-crop-zoom-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sf-avatar-crop input[type='range'] { flex: 1; min-width: 0; width: 100%; min-height: 48px; margin: 0; padding: 0; accent-color: var(--crop-teal); cursor: pointer; font: inherit; }
.sf-avatar-crop button {
  min-width: 48px;
  min-height: 48px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid #b6cec3;
  border-radius: 12px;
  background: #f5f9f6;
  color: #155c51;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
.sf-avatar-crop-zoom-row button, .sf-avatar-crop-move button { flex: 0 0 48px; width: 48px; padding: 8px; font-size: 22px; }
.sf-avatar-crop button:hover:not(:disabled) { border-color: #267d70; background: #dfeee7; }
.sf-avatar-crop button:disabled { opacity: 0.55; cursor: not-allowed; }
.sf-avatar-crop button:focus-visible, .sf-avatar-crop input:focus-visible, .sf-avatar-crop canvas:focus-visible { outline: 3px solid #267d70; outline-offset: 4px; }
.sf-avatar-crop-controls { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 20px; }
.sf-avatar-crop-move, .sf-avatar-crop-tools, .sf-avatar-crop-footer { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sf-avatar-crop-feedback { min-height: 24px; margin-top: 18px; color: #466357; font-size: 16px; overflow-wrap: anywhere; }
.sf-avatar-crop .sf-avatar-crop-error { padding: 14px 16px; border: 1px solid #e5c4bc; border-radius: 12px; background: #fff4ef; color: #803e32; font-size: 16px; }
.sf-avatar-crop-footer { margin-top: 12px; }
.sf-avatar-crop .sf-avatar-crop-cancel { border-color: #cbbfae; background: #fff; color: #64594b; }
.sf-avatar-crop .sf-avatar-crop-privacy { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--crop-tan); color: #526157; font-size: 16px; }
@media (max-width: 480px) {
  .sf-avatar-crop-preview { padding: 10px; }
  .sf-avatar-crop-controls { align-items: stretch; flex-direction: column; gap: 16px; }
  .sf-avatar-crop-move { justify-content: center; }
  .sf-avatar-crop-tools button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .sf-avatar-crop, .sf-avatar-crop * { animation: none; transition: none; } }
