@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@600;700&display=swap');

.tree-layout .tree-name-action {
  display: block;
  min-width: 0;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: #47205f;
  background: transparent;
  box-shadow: none;
  white-space: normal;
  text-align: center;
}
.tree-layout .tree-name-action:hover,
.tree-layout .profile-icon:hover { background: transparent; box-shadow: none; }
.tree-layout .tree-name-action.romanized,
.tree-layout .landing-nimir-placeholder .romanized {
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: var(--profile-name-size, 18px) !important;
  line-height: 1.19;
  font-weight: 700;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.tree-layout .person-card-name-line {
  grid-template-columns: auto minmax(0, 1fr);
  max-width: 255px;
  margin-inline: auto;
  padding-inline: 2px;
}
.tree-layout .tree-child-wrap .person-card-name-line { justify-self: stretch; }
.profile-card-portrait { position: relative; display: inline-grid; place-items: center; }
.profile-card-portrait .portrait-add-badge { display: none !important; }
.tree-layout .profile-icon, #detail .profile-icon {
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  margin: 0;
  background: transparent;
  color: #713384;
  box-shadow: none;
}
.tree-layout .profile-photo-edit { position: absolute; inset-inline-start: -10px; bottom: -13px; }
.tree-layout .profile-photo-edit .portrait-camera {
  position: relative;
  box-sizing: content-box;
  width: 13px;
  height: 9px;
  background: #fff;
  border: 1px solid currentColor;
  border-radius: 3px;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px #e4cce9;
}
.profile-pencil-glyph { font: 700 17px/1 'DM Sans', system-ui, sans-serif; }
.profile-dates { display: grid; justify-items: center; }
.profile-year-line { position: relative; display: flex; align-items: center; justify-content: center; min-height: 27px; }
.profile-year-line > bdi { font: 700 13px/1.2 'DM Sans', system-ui, sans-serif; }
.profile-year-line > bdi + .profile-year-edit { position: absolute; inset-inline-end: 100%; }
.profile-year-line > .profile-year-edit:only-child { height: 44px; }
.profile-age { margin-top: 1px; font: 700 12px/1.25 Tajawal, 'DM Sans', sans-serif; }
:lang(en) .profile-age, .profile-age bdi { font-family: 'DM Sans', system-ui, sans-serif; white-space: nowrap; }
.year-edit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.year-edit-fields input { min-width: 0; }
.landing-branch-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(12px,2vw,24px); align-items: start; }
.landing-branch { min-width: 0; padding: 12px 8px 15px; background: transparent; border-radius: 14px; }
.landing-branch .tree-parent { text-align: center; margin-bottom: 10px; }
.landing-branch .children { grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-rows: 1fr; justify-items: stretch; margin-inline: 0; direction: inherit; }
.landing-branch-empty { text-align: center; }
.landing-nimir-placeholder { max-width: 280px; margin: 0 auto 10px; text-align: center; }
.landing-configure { display: block; margin: 8px auto 0; }
@media (max-width:1000px) {
  .landing-branch .children { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:680px) {
  .landing-branch-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width:420px) {
  .tree-layout .tree-child-wrap .person-card-name-line:has(.romanized) { grid-template-columns: minmax(0,1fr); justify-items: center; }
}
.tree-layout[lang="en"] .children { direction: ltr; }


.landing-branch .current-view { margin-top: 0; }
.profile-management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid #e9d5ef;
  padding-top: 8px;
}
.profile-management-actions button { margin: 0; }
#editPersonFields[hidden], #editLinkHelp[hidden], #editLinkSearchRow[hidden] { display: none; }
