.cv-photo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid #cddced;
  border-radius: 12px;
  background: #f7faff;
}

.cv-photo [hidden] { display: none; }
.cv-photo-main strong { color: #16324f; }
.cv-photo-main p, .cv-photo-dialog p { margin: 6px 0 12px; }
.cv-photo-thumbnail {
  display: grid;
  width: 88px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d4e1ef;
  border-radius: 12px;
  background: #eaf1fa;
  color: #405976;
  font-size: .77rem;
  text-align: center;
}

.cv-photo-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.cv-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-photo-actions .button { min-height: 42px; }
.cv-photo-dialog {
  position: fixed;
  inset: 0;
  width: min(29rem, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 18px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #cddced;
  border-radius: 14px;
  background: #fff;
  color: #16324f;
}

.cv-photo-dialog::backdrop { background: rgba(13, 35, 59, .62); }
.cv-photo-dialog h2 { margin: 0; }
.cv-photo-dialog canvas {
  display: block;
  width: min(100%, 280px, 40dvh);
  height: auto;
  margin: 10px auto 14px;
  border: 1px solid #d4e1ef;
  border-radius: 9px;
  background: #eaf1fa;
  cursor: grab;
  touch-action: none;
}

.cv-photo-dialog canvas:active { cursor: grabbing; }
.cv-photo-sliders { display: grid; gap: 8px; margin: 12px 0; }
.cv-photo-sliders label { display: grid; gap: 2px; font-size: .88rem; font-weight: 600; }
.cv-photo-sliders input[type="range"] { width: 100%; min-height: 26px; margin: 0; padding: 0; }
@media (max-width: 420px) {
  .cv-photo { gap: 10px; padding: 10px; }
  .cv-photo-thumbnail { width: 64px; }
}
