/* =============================================
   Crop Modal — global circular image cropper
   ============================================= */

.crop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.crop-modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
}

/* Head */
.crop-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-line);
}
.crop-modal__title {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
  margin: 0;
}
.crop-close {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--color-ink-soft);
  display: flex;
  align-items: center;
  border-radius: var(--radius-xs);
  transition: color var(--ease), background var(--ease);
}
.crop-close:hover { color: var(--color-ink); background: var(--color-soft); }

/* Stage */
.crop-stage {
  padding: var(--space-5) var(--space-5) var(--space-4);
  display: flex;
  justify-content: center;
  background: #1c1c1e;
}

.crop-viewport {
  width: 300px;
  height: 300px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-pill);
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.crop-viewport:active { cursor: grabbing; }

.crop-viewport img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  pointer-events: none;
  max-width: none;
}

/* Ring darkens outside the circle */
.crop-ring {
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 0 800px rgba(28, 28, 30, .65);
  pointer-events: none;
  z-index: 1;
}

/* Zoom */
.crop-zoom-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-line);
  color: var(--color-ink-soft);
}
.crop-zoom {
  flex: 1;
  accent-color: var(--color-teal);
  cursor: pointer;
  height: 4px;
}

/* Footer */
.crop-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
}
.crop-save-btn {
  padding: 11px 28px;
  background: var(--color-teal);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-family);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: background var(--ease), transform var(--ease);
}
.crop-save-btn:hover {
  background: var(--color-teal-deep);
  transform: translateY(-1px);
}
