.photo-review {
  text-align: left;
  overflow-wrap: anywhere;
}
.photo-review-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.photo-review button,
.photo-review select {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
}
.photo-review-list {
  list-style: none;
  padding: 0;
}
.photo-review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.photo-review-preview {
  width: 100%;
  height: 160px;
  object-fit: contain;
}
.photo-review-placeholder {
  min-height: 80px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  background: var(--tag-bg);
}
.photo-review-row p {
  margin: 6px 0;
}
@media (min-width: 600px) {
  .photo-review-row {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

/* Failed List photos retain the existing thumbnail box instead of overflowing it. */
#contactsContainer.list-view .list-photo-wrap > .photo-display-failed,
body.wireframe-shell[data-browse-density]
  #contactsContainer.list-view
  .list-row-015
  .list-photo-wrap
  > .photo-display-failed {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  max-height: 100%;
  padding: 2px;
  font-size: inherit;
  line-height: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
}

#contactsContainer.list-view .photo-display-failed > svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

/* One report dialog, read-only details; the canonical editor stays a modal. */
.photo-review-workspace {
  display: block;
  min-width: 0;
}
.photo-review-detail {
  display: none;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
}
.photo-review-workspace.detail-open .photo-review-detail {
  display: block;
}
.photo-review-workspace.detail-open .photo-review-list {
  display: none;
}
.photo-review-detail-photo {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: contain;
}
.photo-review-detail dt {
  font-weight: 600;
  margin-top: 10px;
}
.photo-review-detail dd {
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.photo-review [data-photo-review-select][aria-pressed="true"] {
  outline: 2px solid var(--wire-accent, var(--primary));
  outline-offset: 2px;
}
@media (min-width: 1000px) {
  .photo-review-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }
  .photo-review-workspace .photo-review-detail {
    display: block;
    position: sticky;
    top: 8px;
    max-height: calc(100dvh - 180px);
    overflow: auto;
  }
  .photo-review-workspace.detail-open .photo-review-list {
    display: block;
  }
  .photo-review-workspace .photo-review-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.profile-photo-comparison:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-photo-comparison figure {
  margin: 0;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.profile-photo-comparison figcaption {
  font-weight: 600;
  margin-bottom: 8px;
}
.profile-photo-comparison img {
  width: 100%;
  height: 220px;
  object-fit: contain;
}
@media (max-width: 480px) {
  .profile-photo-comparison img {
    height: 140px;
  }
}
