body.photo-crop-open { overflow: hidden; }

#photo-crop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(42, 28, 18, 0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 24px 12px;
}
#photo-crop[hidden] { display: none; }

.photo-crop-panel {
  width: min(640px, 100%);
  background: #f6efe3;
  color: #3a2a1c;
  border: 1px solid #c9b08a;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 40px rgba(42, 28, 18, 0.35);
}
.photo-crop-panel h2 {
  margin: 0 0 6px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 32px;
  font-weight: 600;
}
.photo-crop-panel p { margin: 0 0 14px; }
.photo-crop-warn { color: #8b2e2e; }
.photo-crop-warn[hidden] { display: none; }
.photo-face-warn { color: #8b2e2e; font-size: 13px; margin-top: 6px; }
.photo-face-warn:empty { display: none; }

.photo-crop-stage {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.photo-crop-frame-wrap {
  position: relative;
  width: 204px;
  height: 300px;
  flex: none;
}
.photo-crop-frame {
  width: 204px;
  height: 300px;
  background: #2a1c12;
  cursor: grab;
  touch-action: none;
  border: 1px solid #6b3d2a;
}
.photo-crop-frame:active { cursor: grabbing; }
.photo-crop-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.photo-crop-cross {
  position: absolute;
  top: 36%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
}
.photo-crop-cross:first-child { left: 38%; }
.photo-crop-cross:last-child { left: 62%; }
.photo-crop-cross::before,
.photo-crop-cross::after {
  content: "";
  position: absolute;
  background: #fff;
  box-shadow: 0 0 0 1px #2a1c12;
}
.photo-crop-cross::before {
  left: 8px;
  top: 0;
  width: 2px;
  height: 18px;
}
.photo-crop-cross::after {
  left: 0;
  top: 8px;
  width: 18px;
  height: 2px;
}
.photo-crop-samples { display: flex; gap: 14px; }
.photo-crop-samples div { text-align: center; }
.photo-crop-samples span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
}
.photo-crop-card,
.photo-crop-profile {
  display: block;
  background: #2a1c12;
  border: 1px solid #c9b08a;
}
.photo-crop-zoom {
  display: block;
  margin: 14px 0;
}
.photo-crop-zoom input { width: min(320px, 100%); vertical-align: middle; }
.photo-crop-actions button {
  background: #6b3d2a;
  color: #f6ead8;
  border: 1px solid #5a3222;
  padding: 6px 16px;
  margin-right: 8px;
  cursor: pointer;
}
.photo-crop-actions button[data-act="cancel"] {
  background: transparent;
  color: #3a2a1c;
}

.photo-crop-preview { margin-top: 8px; }
.photo-crop-preview img {
  width: 102px;
  height: 150px;
  object-fit: cover;
  display: block;
  border: 1px solid #c9b08a;
  background: #2a1c12;
}
.photo-upload-hint {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #5c4a3a;
}
.photo-upload-preview { margin-top: 10px; }
.photo-upload-preview img {
  display: block;
  max-width: min(320px, 100%);
  max-height: 240px;
  object-fit: contain;
  border: 1px solid #c9b8a6;
  border-radius: 4px;
  background: #f6efe3;
}
.photo-upload-preview span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #5c4a3a;
}
.photo-upload-warn {
  display: block;
  color: #8b2e2e;
  font-size: 13px;
}
.photo-crop-preview span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b3d2a;
}

.profiles_1 .photo_block .photo_1 img.photo {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.profile_page img.main_photo,
.ucp_profile .main_photo {
  width: 180px;
  height: 265px;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
}
