.person-card-name-line {
  display: grid;
  grid-template-columns: auto minmax(0, max-content);
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: start;
  margin-block: 2px;
}
.person-card-name-line .family-name { overflow-wrap: anywhere; }
.person-card-name-line .person-date-age { margin: 1px 0 0; }
.person-avatar {
  display: inline-grid;
  place-items: center;
  position: relative;
  inline-size: clamp(36px, 4vw, 48px);
  block-size: clamp(36px, 4vw, 48px);
  border-radius: 50%;
  border: 1px solid #d4b7e1;
  background: #f1e6f6;
  color: #63377a;
  font-weight: 800;
  flex: none;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.person-avatar [hidden], #portraitPreview[hidden] { display: none; }
.person-avatar.portrait-large {
  inline-size: 112px; block-size: 112px; border-radius: 50%;
}
.portrait-placeholder {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: #ede1f4;
}
.portrait-placeholder::before, .portrait-placeholder::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #8d6a9d;
}
.portrait-placeholder::before {
  inset-block-start: 17%;
  inline-size: 33%;
  block-size: 33%;
  border-radius: 50%;
}
.portrait-placeholder::after {
  inset-block-start: 51%;
  inline-size: 68%;
  block-size: 57%;
  border-radius: 50% 50% 20% 20%;
}
.portrait-add-badge {
  position: absolute;
  z-index: 1;
  inset-block-end: -3px;
  inset-inline-end: -3px;
  display: inline-flex;
  flex-direction: row;
  direction: ltr;
  align-items: center;
  justify-content: center;
  gap: 1px;
  inline-size: 21px;
  block-size: 21px;
  border-radius: 50%;
  border: 1px solid #ddd0e6;
  background: #fff;
  color: #663379;
  font: 800 10px/1 system-ui, sans-serif;
}
.portrait-camera {
  position: relative;
  display: inline-block;
  inline-size: 9px;
  block-size: 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.portrait-camera::before, .portrait-camera::after {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  transform: translateX(-50%);
}
.portrait-camera::before {
  inset-block-start: -3px;
  inline-size: 4px;
  block-size: 2px;
  border-radius: 1px 1px 0 0;
  background: currentColor;
}
.portrait-camera::after {
  inset-block-start: 1px;
  inline-size: 3px;
  block-size: 3px;
  border-radius: 50%;
  border: 1px solid currentColor;
}
.portrait-large .portrait-add-badge {
  inset-block-end: -4px;
  inset-inline-end: 1px;
  inline-size: 33px;
  block-size: 33px;
  font-size: 14px;
  gap: 2px;
}
.portrait-large .portrait-camera { transform: scale(1.35); margin-inline-end: 2px; }
.profile-portrait-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-block: 8px 14px; }
#portraitPreview { display: block; max-width: min(256px, 100%); max-height: 40dvh; border-radius: 12px; }
#galleryQueue textarea::placeholder, #galleryEditCaption::placeholder { color: #80628e; opacity: 1; }
#galleryQueue textarea, #galleryEditCaption { color: #402450; }
dialog.branch-paste-dialog { width: min(760px, calc(100vw - 24px)); }
.branch-paste-dialog label { display: flex; align-items: flex-start; gap: 8px; }
.branch-paste-dialog input[type=checkbox] { inline-size: 18px; block-size: 18px; flex: none; margin: 2px 0; accent-color: #75428b; }
.branch-paste-header { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.branch-paste-heading, .branch-paste-descendant {
  padding: 10px;
  background: #f9f3fb;
  border: 1px solid #dfcce8;
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.branch-paste-heading p, .branch-paste-descendant p { margin: 4px 0; }
.branch-paste-table { width: 100%; border-collapse: collapse; table-layout: fixed; overflow-wrap: anywhere; }
.branch-paste-table th, .branch-paste-table td { text-align: start; padding: 6px; border-block-end: 1px solid #e4d4ed; vertical-align: top; }
.branch-paste-table th:first-child { width: 28%; }
.branch-paste-descendant { margin-block: 6px; }
.branch-paste-descendant select { max-width: 100%; }
.branch-paste-grandchild { margin-inline-start: 14px; }
