#family-profiles {
  display: flex;
  align-items: center;
  gap: .22rem;
  flex: 0 0 auto;
}
#family-profiles[hidden] { display: none; }
.profile-trigger {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  min-width: 44px;
  min-height: 50px;
  padding: .1rem .08rem;
  gap: .12rem;
  border: 0;
  background: transparent;
  color: #644337;
}
.profile-role { font-size: .66rem; line-height: 1.12; font-weight: 650; }
.profile-face {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 50%;
  background: #f4d9c4;
  color: #684332;
  font-weight: 650;
}
.profile-face[data-profile-avatar="preview-partner"] { background: #f0cfc8; color: #713f38; }
.profile-trigger .profile-face {
  width: 2.05rem;
  height: 2.05rem;
  border: 2px solid #fffdf8;
  box-shadow: 0 0 0 1px #ddc7ba;
}
.comment-avatar { width: 1.75rem; height: 1.75rem; font-size: .78rem; }
.profile-face > img, .memory .profile-face > img, .profile-dialog .profile-face > img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: inherit;
}
.profile-dialog {
  width: min(26rem, calc(100% - 2rem));
  border: 1px solid #e9d7c9;
  border-radius: 1.4rem;
  padding: 1.45rem;
  background: #fffaf5;
  color: #4a332b;
}
.profile-dialog .profile-form { display: grid; gap: .65rem; }
.profile-editor-head, .profile-picture-row, .profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.profile-editor-head h2 { margin: 0; font-size: 1.4rem; }
.profile-editor-head button, .profile-actions button { min-height: 44px; }
.profile-picture-row { justify-content: flex-start; margin: .5rem 0; }
.profile-preview {
  width: 5rem;
  height: 5rem;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ead3c2;
  font-size: 1.65rem;
}
.profile-picture-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.profile-picture-actions .profile-file-button, .profile-picture-actions .profile-remove {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  margin: 0;
  padding: .3rem .65rem;
  border: 1px solid #e3ccbb;
  border-radius: .7rem;
  background: #fff8ef;
  color: #67483a;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}
.profile-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.profile-file-button:focus-within { outline: 2px solid #a35e3f; outline-offset: 2px; }
.profile-picture-actions .profile-remove { border-color: transparent; background: transparent; }
.profile-remove:disabled { opacity: .5; }
.profile-form .profile-name-label { margin: .25rem 0 0; font-size: .9rem; }
.profile-form input[name="displayName"] { min-width: 0; width: 100%; min-height: 44px; }
.profile-form .profile-hint, .profile-form .profile-status { margin: 0; font-size: .85rem; color: #765e51; }
.profile-form .profile-status { color: #884329; }
.profile-status:empty { display: none; }
.profile-actions { justify-content: flex-end; margin-top: .4rem; }
.profile-session {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  border-top: 1px solid #ead9cd; margin-top: 1.1rem; padding-top: .65rem;
  color: #765e51; font-size: .8rem;
}
.home-head .profile-role {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
.home-head .profile-trigger { min-height: 44px; }
.home-head .profile-trigger .profile-face {
  width: 48px; height: 48px; border: 2px solid white; box-shadow: 0 0 0 1px var(--fm-line);
}
.home-head #family-profiles { gap: 4px; }
@media (max-width: 420px) {
  .profile-trigger .profile-face { width: 1.85rem; height: 1.85rem; }
  #family-profiles { gap: 0; }
}
