/* Heirloom tree. Every selector is confined to the existing family tree. */
#family-tree-section{color:var(--h-teak);padding-top:28px}
#family-tree-section>h2{font:400 clamp(30px,3vw,42px)/1.2 var(--h-serif);letter-spacing:-.8px;margin-bottom:14px}
#family-tree-section>.subtitle{max-width:65ch;line-height:1.8;color:#78614c}
#family-tree-section .tree-controls{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start;margin:25px 0 14px}
#family-tree-section .tree-controls .tree-ctl{min-height:44px;padding:10px 16px;border:1px solid #d4bea1;border-radius:4px;background:#fffbf4;color:#49321f;font-size:13px;letter-spacing:0;box-shadow:none}
#family-tree-section .tree-controls .tree-ctl:hover{background:#ede0c9;transform:none}
#family-tree-section .tree-search,#family-tree-section .tree-search:focus{flex:1 1 210px;width:auto;min-height:44px;border-radius:4px;border-color:#d4bea1;background:#fffbf4}
#family-tree-section .tree-stats{color:#78614c;font-size:13px;text-align:left;margin-bottom:18px}
#family-tree-section .tree-canvas{height:650px;background:#f6efe2;background-image:none;border:1px solid #d4bea1;border-radius:5px;box-shadow:inset 0 0 60px #e5d6bb30;padding:0}
#family-tree-section .tree-card{box-sizing:border-box;padding:15px 12px 25px;gap:10px;background:#fffbf4;backdrop-filter:none;border:1px solid #d4bea1;border-radius:5px;box-shadow:0 4px 12px #36231609;transition:border-color .2s,box-shadow .2s;cursor:default}
#family-tree-section .tree-card.open{background:#f4e8d4;border-color:#ae8652;box-shadow:inset 0 -3px #8d432f}
#family-tree-section .tree-card.founder-card{background:#fffbf4;border-color:#b99251;box-shadow:0 5px 18px #3623160c}
#family-tree-section .tree-card:hover{transform:none;border-color:#a98657}
#family-tree-section .person-half{min-width:0;flex:1;padding:0;border-radius:2px;background:none}
#family-tree-section .person-open{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;height:100%;padding:4px;border:0;border-radius:3px;background:transparent;color:inherit;cursor:pointer}
#family-tree-section .person-open:hover{background:#eadac040}
#family-tree-section .half-avatar{width:52px;height:61px;flex-shrink:0;border:2px solid #fffbf4;outline:1px solid #b99251;border-radius:30px 30px 3px 3px;object-fit:cover;object-position:center 22%;background:#ede0c9;box-shadow:none}
#family-tree-section .person-name{font:400 18px/1.3 var(--h-serif);color:#362316;text-shadow:none;overflow-wrap:anywhere}
#family-tree-section .role-tag{font:12px/1.35 var(--h-sans);text-transform:none;letter-spacing:0;color:#78614c;max-height:33px;overflow:hidden}
#family-tree-section .couple-divider{width:1px;flex:none;margin:10px 0;background:#d4bea170}
#family-tree-section .branch-chevron{width:46px;height:38px;bottom:-19px;border:1px solid #b99251;border-radius:5px;background:#fffbf4;color:#7b4f30;font:22px/1 var(--h-sans);transform:translateX(-50%);box-shadow:0 2px 5px #3623160c;transition:background .2s}
#family-tree-section .open .branch-chevron{transform:translateX(-50%);background:#8d432f;color:#fff7e9;border-color:#8d432f}
#family-tree-section .tree-link{stroke:#b99251;stroke-width:1.25;stroke-linejoin:round;animation:none;filter:none}
#family-tree-section .tree-link.lineage{stroke:#8d432f;stroke-width:2}
#family-tree-section .gen-label{font:12px/1.5 var(--h-sans);letter-spacing:1px;color:#78614c}
#family-tree-section .tree-card.card-glow{border-color:#8d432f;box-shadow:0 0 0 3px #8d432f30;animation:none}
#family-tree-section .tree-canvas.editing .tree-card{border-style:dashed}
#family-tree-section .tree-edit-bar{top:-19px}
#family-tree-section .mini-btn{min-height:30px;border-radius:4px;background:#fffbf4;color:#73442e;border-color:#b99251;font-size:12px;text-transform:none;letter-spacing:0}
#family-tree-section .mini-del{top:0;right:0;width:28px;height:28px;min-height:28px;background:#fff6ef;color:#9a3023;border-color:#cf978b}
@media(min-width:601px){#family-tree-section .founder-card .person-open{display:grid;grid-template-columns:65px 1fr;grid-template-rows:1fr auto auto 1fr;column-gap:12px;text-align:left}#family-tree-section .founder-card .half-avatar{grid-row:1/5;width:65px;height:79px}#family-tree-section .founder-card .person-name{grid-column:2;grid-row:2;text-align:left;font-size:20px}#family-tree-section .founder-card .role-tag{grid-column:2;grid-row:3}}
@media(max-width:600px){
  #family-tree-section{padding:20px 0 36px}
  #family-tree-section>h2{margin:0 0 7px;font-size:clamp(29px,8vw,34px);text-align:left}
  #family-tree-section>.subtitle{margin:0 0 14px;text-align:left;font-size:14px;line-height:1.5}
  #family-tree-section .tree-controls{gap:6px;margin:0 0 9px}
  #family-tree-section .tree-search,#family-tree-section .tree-search:focus{flex:1 1 calc(100% - 90px);width:0;min-width:0;font-size:16px}
  #family-tree-section .tree-controls .tree-ctl{min-height:44px;padding:8px 9px;font-size:12px}
  #family-tree-section #tree-fit{flex:0 0 auto}
  #family-tree-section #tree-zoom-out,#family-tree-section #tree-zoom-in{flex:0 0 44px;width:44px;padding:0}
  #family-tree-section #tree-expand-all,#family-tree-section #tree-collapse-all{flex:1 1 auto}
  #family-tree-section .tree-stats{margin:0 0 9px;font-size:12px;line-height:1.4}
  #family-tree-section .tree-mobile-list{margin-bottom:10px;background:#fffbf4;border-color:#d4bea1}
  #family-tree-section .tree-canvas{height:560px}
  #family-tree-section .branch-chevron{height:52px;bottom:-26px;width:54px}
}
@media(prefers-reduced-motion:reduce){#family-tree-section .tree-card,#family-tree-section .tree-world,#family-tree-section .branch-chevron{transition:none!important}}
