.lineage-shell { max-width:1280px; margin:auto; padding:120px 28px 48px; }
.lineage-hero { padding:12px 0 28px; min-height:0; border:0; border-radius:0; background:none; box-shadow:none; }
.lineage-hero::before { display:none; }
.lineage-heading { margin-top:0; }
.lineage-heading h1 { font-size:32px; letter-spacing:0; }
.lineage-tree-section { padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
.lineage-section-heading { display:block; margin:0 0 24px; }
.lineage-section-heading::after { content:none; }
.lineage-section-heading h2 { font-size:22px; margin:6px 0; }
.lineage-tree-scroll { overflow:visible; border:0; background:none; }
.lineage-tree { width:100%; min-width:0; height:auto; min-height:0; aspect-ratio:auto; margin:0; padding:26px 0 42px; background:#090d0b; isolation:isolate; }
.lineage-tree-backdrop { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.13; z-index:-1; pointer-events:none; }
.lineage-tree::after { display:none; }
.family-parents { position:relative; display:flex; justify-content:center; gap:90px; padding-bottom:48px; }
.family-parents::before { content:""; position:absolute; top:48px; left:calc(50% - 45px); width:90px; border-top:2px solid #d2b371; }
.family-parents::after { content:""; position:absolute; top:48px; bottom:0; left:50%; border-left:2px solid #d2b371; }
.family-branches { position:relative; display:grid; grid-template-columns:1fr 1fr; gap:36px; }
.family-branches::before { content:""; position:absolute; top:0; left:25%; right:25%; border-top:2px solid #d2b371; }
.family-branch { --branch-color:#75c5bb; position:relative; padding-top:32px; min-width:0; }
.family-2026 { --branch-color:#d38fbf; }
.family-branch::before { content:""; position:absolute; top:0; height:32px; left:50%; border-left:2px solid #d2b371; }
.family-branch h3 { width:max-content; margin:0 auto 30px; padding:8px 20px; border:1px solid var(--branch-color); border-radius:4px; background:#111914; color:var(--branch-color); font-size:16px; position:relative; }
.family-branch h3::after { content:""; position:absolute; top:100%; left:50%; height:30px; border-left:1px solid var(--branch-color); }
.family-children { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); row-gap:26px; padding:0 10px; }
.lineage-tree .lineage-node { position:relative; inset:auto; transform:none; width:auto; display:flex; flex-direction:column; align-items:center; gap:8px; margin:0; z-index:1; }
.lineage-tree .lineage-node[class*="node-"] { animation:family-reveal 600ms ease both; }
.lineage-tree .lineage-node::after { display:none; }
@keyframes family-reveal { from { opacity:0; } to { opacity:1; } }
.family-children .lineage-node { padding-top:22px; border-top:1px solid var(--branch-color); }
.family-children .lineage-node::before { content:""; position:absolute; top:0; height:22px; left:50%; border-left:1px solid var(--branch-color); }
.lineage-tree .lineage-node > span { display:flex; flex-direction:column; align-items:center; gap:2px; padding:0; border:0; background:none; box-shadow:none; width:auto; min-width:0; }
.lineage-tree .lineage-node strong { font-size:14px; color:#f5efdf; letter-spacing:0; }
.lineage-tree .lineage-node small { font-size:11px; color:#b9c2ba; }
.family-portrait { display:block; width:68px; height:68px; padding:0; border:0; border-radius:50%; background:none; cursor:zoom-in; }
.lineage-tree .lineage-node img { display:block; width:100%; height:100%; object-fit:cover; border:2px solid var(--branch-color,#d2b371); border-radius:50%; box-shadow:0 0 0 4px #101712; }
.family-parents .family-portrait { width:96px; height:96px; }
.family-parents .lineage-node strong { font-size:18px; }
.family-portrait:hover img { box-shadow:0 0 0 4px #354238; }
.family-photo-dialog { width:min(900px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); padding:12px; border:1px solid #b29b6d; border-radius:8px; color:#fff4df; background:#101411; }
.family-photo-dialog::backdrop { background:#000d; }
.family-photo-toolbar { display:flex; gap:8px; align-items:center; padding-bottom:12px; }
.family-photo-toolbar h2 { flex:1; margin:0; font-size:18px; min-width:0; }
.family-photo-dialog button { width:40px; height:40px; flex-shrink:0; padding:0; border:1px solid #667365; border-radius:4px; background:#202a22; color:white; font-size:24px; }
.family-photo-dialog button:disabled { opacity:.35; cursor:default; }
.family-photo-stage { overflow:auto; height:min(65dvh,640px); background:#080a08; }
.family-photo-stage img { display:block; width:calc(100% * var(--photo-zoom,1)); max-width:none; height:calc(100% * var(--photo-zoom,1)); object-fit:contain; }
.family-photo-navigation { display:flex; align-items:center; justify-content:center; gap:24px; padding-top:12px; }
body:has(.family-photo-dialog[open]) { overflow:hidden; }
@media(max-width:700px) {
  .lineage-footer .footer-brand { flex-direction:column; align-items:flex-start; }
  .lineage-footer .footer-logo { width:90px; }
  .lineage-footer { padding:20px; }
  .lineage-shell { padding:96px 14px 130px; }
  .lineage-heading h1 { font-size:27px; }
  .family-branches { grid-template-columns:1fr; gap:28px; padding-left:12px; border-left:2px solid #d2b371; margin-left:12px; }
  .family-branches::before { left:0; right:50%; }
  .family-branch::before { left:-14px; width:calc(50% + 14px); height:32px; border-left:0; border-top:2px solid #d2b371; }
  .family-branch h3::before { content:""; position:absolute; bottom:100%; left:50%; height:33px; border-left:2px solid #d2b371; }
  .family-parents { gap:64px; }
  .family-parents::before { width:64px; left:calc(50% - 32px); }
  .family-portrait { width:52px; height:52px; }
  .family-parents .family-portrait { width:86px; height:86px; }
  .lineage-tree .lineage-node strong { font-size:12px; }
  .family-children { padding:0 4px; }
  .family-photo-toolbar h2 { font-size:15px; }
}
@media(prefers-reduced-motion:reduce) { .lineage-tree .lineage-node[class*="node-"] { animation:none; } }
