.tree-person {
  position:absolute;
  width:var(--node-width);
  height:var(--node-height);
}
.tree-person > .node { inset:0; }
.node-profile {
  position:absolute;
  z-index:4;
  top:-2px;
  right:-12px;
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  padding:0;
  border:1px solid #afbea8;
  border-radius:50%;
  color:#34553e;
  background:#fffef8;
  box-shadow:0 2px 6px #344e3520;
  opacity:0;
  pointer-events:none;
  transition:opacity .12s ease;
}
.tree-person:hover > .node-profile,
.tree-person:focus-within > .node-profile,
.tree-person:has(.node.chosen) > .node-profile {
  opacity:1;
  pointer-events:auto;
}
.node-profile:hover {
  background:#e4eedc;
  border-color:#6d8b66;
}
.node-profile:focus-visible {
  outline:3px solid #769782;
  outline-offset:2px;
}
.graph-view-controls {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px 18px;
  padding:11px 18px 14px;
  border-block:1px solid var(--line);
  background:#f7f9f3;
}
.graph-lineage-choice {
  display:grid;
  gap:6px;
  min-width:160px;
  flex:1 1 190px;
  max-width:320px;
}
.graph-lineage-choice > span {
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:.83rem;
  font-weight:600;
}
.graph-lineage-choice select {
  width:100%;
  min-width:0;
  min-height:41px;
  padding:8px 30px 8px 11px;
  border:1px solid #bbc8b6;
  border-radius:7px;
  background-color:white;
  color:var(--ink);
  font:inherit;
  text-overflow:ellipsis;
}
.graph-center-control {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
  max-width:100%;
}
.graph-center-control > span {
  max-width:100%;
  color:var(--muted);
  font-size:.83rem;
  overflow-wrap:anywhere;
}
.graph-center-control .button { min-height:41px; white-space:normal; }
.graph-view-note {
  margin:0;
  padding:9px 18px;
  border-bottom:1px solid var(--line);
  background:#fffdf3;
  color:var(--muted);
  font-size:.83rem;
  line-height:1.6;
}
.marriage-toggle {
  display:inline-flex;
  align-items:center;
  gap:3px;
  min-height:26px;
  padding:2px 4px;
  border:0;
  border-radius:4px;
  background:transparent;
  color:var(--muted);
  font-size:.78rem;
  cursor:pointer;
  list-style:none;
}
.marriage-toggle:hover { background:#edf2e8; color:var(--green); }
.marriage-toggle[aria-expanded="true"] svg, .profile-other-marriages[open] > summary svg { transform:rotate(90deg); }
.profile-other-marriages { margin-top:8px; }
.profile-other-marriages[open] > .kin-group { margin-inline-start:8px; padding-inline-start:12px; border-inline-start:1px solid var(--line); }
.inspector-actions { grid-template-columns:minmax(0,1fr); }
.inspector-actions .button { min-height:41px; padding:8px 10px; white-space:normal; }
@media (max-width:760px) {
  .graph-view-controls { padding:10px 12px 12px; gap:10px; align-items:stretch; }
  .graph-lineage-choice { max-width:none; flex-basis:100%; }
  .graph-center-control { flex:1; flex-direction:row; align-items:center; justify-content:space-between; }
  .graph-center-control .button { flex-shrink:0; font-size:.87rem; padding-inline:10px; }
  .graph-view-note { padding:9px 12px; }
}
@media (max-width:382px) {
  .graph-center-control { flex-wrap:wrap; }
  .graph-center-control .button { flex:1 1 100%; }
}
@media (prefers-reduced-motion:reduce) {
  .node-profile { transition:none; }
}
