.family-tree-page{width:min(1080px,calc(100% - 32px));margin:20px auto 70px;color:#203d52;font:17px/1.65 Georgia,serif}.tree-heading{text-align:center;max-width:750px;margin:0 auto 42px}.tree-heading h1{font:400 clamp(34px,5vw,56px)/1.15 Georgia,serif;margin:12px 0 20px}.tree-eyebrow{font:700 14px/1.6 Arial,sans-serif;letter-spacing:.12em;color:#906d37}.tree-note{font:14px/1.65 Arial,sans-serif;color:#536779}.family-tree-page h2{font:400 27px/1.25 Georgia,serif;text-align:center;margin:38px 0 20px}.tree-parents{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;max-width:620px;margin:auto;position:relative}.tree-parents:after{content:'';position:absolute;left:50%;top:100%;height:35px;border-left:2px solid #c2ad86}.tree-person{padding:20px;background:#f5f8fa;border:1px solid #d3dee5;border-radius:15px;text-align:center;min-width:0;overflow-wrap:anywhere}.tree-person h3{font:600 20px/1.35 Georgia,serif;margin:12px 0 5px}.tree-person p{font:14px/1.6 Arial,sans-serif;margin:5px 0 12px}.tree-portrait{display:block;width:112px;height:112px;object-fit:contain;background:#e8eff3;border-radius:14px;margin:auto}.tree-initials{display:grid;place-items:center;font:32px Georgia,serif;color:#547185;border:1px dashed #a8bac7}.tree-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:13px}.tree-actions button,.tree-branches button{font:600 14px/1.45 Arial,sans-serif;border:1px solid #aac0ce;border-radius:22px;background:white;color:#224862;padding:10px 15px;cursor:pointer;transition:transform .2s,background .2s}.tree-actions button:hover,.tree-branches button:hover{transform:translateY(-2px);background:#e6eff5}.tree-actions button:focus-visible,.tree-branches button:focus-visible{outline:3px solid #a97c35;outline-offset:3px}.tree-branches{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin:24px 0}.tree-branches button[aria-pressed=true]{background:#173e5b;color:white;border-color:#173e5b}.tree-focus{max-width:430px;margin:0 auto;box-shadow:0 14px 35px #203b5212;background:#ecf3f8}.tree-children{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:25px;margin:28px 0 0;padding-top:20px;border-top:2px solid #c2ad86}.tree-children:before{content:'';position:absolute;left:50%;bottom:100%;height:28px;border-left:2px solid #c2ad86}.tree-branch{position:relative;min-width:0}.tree-branch:before{content:'';position:absolute;left:50%;bottom:100%;height:20px;border-left:2px solid #c2ad86}.tree-descendants{margin-top:12px}.tree-descendants>summary{padding:10px 15px;cursor:pointer;color:#224862;font:600 15px/1.5 Arial,sans-serif;background:#edf2f5;border-radius:8px}.tree-descendants .tree-children{grid-template-columns:1fr;margin-top:18px;border:0;padding-left:18px;border-left:2px solid #c2ad86;padding-top:0}.tree-descendants .tree-children:before,.tree-descendants .tree-branch:before{content:none}.tree-empty{font:14px/1.6 Arial,sans-serif;text-align:center;color:#667887}.tree-note-text{white-space:pre-wrap}.tree-dialog{width:min(520px,calc(100% - 30px));max-height:calc(100dvh - 40px);padding:0;border:0;border-radius:18px;background:#fff;color:#213f54;box-shadow:0 20px 80px #001b3a66}.tree-dialog::backdrop{background:#102338bd}.tree-dialog form{padding:30px;display:grid;gap:15px;position:relative}.tree-dialog h2{font:28px/1.25 Georgia,serif;margin:5px 35px 0 0}.tree-dialog label{display:grid;gap:6px;font:600 15px/1.5 Arial,sans-serif}.tree-dialog input,.tree-dialog textarea{box-sizing:border-box;max-width:100%;width:100%;border:1px solid #a9bdcb;border-radius:8px;padding:12px;font:16px Arial,sans-serif}.tree-dialog textarea{min-height:90px}.tree-dialog small{font:14px Arial,sans-serif}.tree-primary{background:#173e5b;color:#fff;border:0;border-radius:24px;padding:14px;font:600 16px Arial,sans-serif;cursor:pointer}.tree-primary:disabled{opacity:.6}.tree-close{position:absolute;right:15px;top:12px;background:none;border:0;font-size:30px;cursor:pointer;color:#234862}.tree-dialog .tree-trap{position:absolute;left:-9999px;width:1px}.tree-dialog p{margin:0}#tree-status,#tree-form-status{font:15px/1.6 Arial,sans-serif}#tree-unplaced[hidden]{display:none}.tree-branch{animation:tree-appear .35s ease both}@keyframes tree-appear{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@media(max-width:650px){.tree-parents{gap:10px}.tree-person{padding:16px 10px}.tree-parents .tree-portrait{width:80px;height:80px}.tree-children{grid-template-columns:1fr}.tree-branches{gap:8px}.tree-branches button{padding:10px 12px;flex:1 1 100px}.tree-person h3{font-size:19px}.tree-dialog form{padding:24px 20px}}@media(prefers-reduced-motion:reduce){.tree-branch{animation:none}.tree-actions button,.tree-branches button{transition:none}}
.tree-missing{text-align:center;margin:35px 0}.tree-note-text{overflow-wrap:anywhere}
/* Portrait constellation: one connected surface instead of columns of cards. */
body:has(.family-tree-page){background:#f4f7fa;margin:0}
body:has(.family-tree-page)>.page-art-banner{max-height:160px;overflow:hidden;margin-bottom:0}
body:has(.family-tree-page)>.page-art-banner img{height:160px;object-fit:cover}
.family-tree-page{width:min(1520px,calc(100% - 24px));margin-top:16px}
.tree-heading{margin-bottom:24px;max-width:860px}.tree-heading h1{margin:10px 0 12px;font-size:clamp(32px,4vw,48px)}.tree-heading p{margin:8px 0}.tree-heading .tree-note{font-size:14px}
.tree-map{border:1px solid #c8d5df;border-radius:22px;overflow:hidden;background:#fff;box-shadow:0 20px 70px #2447600c}
.tree-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 22px;border-bottom:1px solid #dfe7ed}.tree-toolbar p{font:16px/1.5 Arial,sans-serif;margin:0}.tree-map-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.tree-map-controls button,#tree-unplaced button{min-height:44px;border:1px solid #bbccd8;background:#fff;color:#173e5b;border-radius:24px;padding:10px 16px;cursor:pointer;font:600 14px/1.4 Arial,sans-serif}.tree-map-controls button:hover{background:#e7eff5}.tree-map-controls output{font:14px Arial,sans-serif;min-width:44px;text-align:center}.tree-map-hint{margin:0;padding:10px 20px;color:#546b7c;font:14px/1.5 Arial,sans-serif;background:#f5f8fb}
.tree-viewport{height:clamp(580px,75vh,900px);overflow:auto;position:relative;cursor:grab;overscroll-behavior:contain;background:radial-gradient(ellipse at center,#fff 0%,#edf3f8 100%);scrollbar-width:thin;touch-action:pan-x pan-y pinch-zoom}.tree-viewport:active{cursor:grabbing}#tree-surface{position:relative;min-width:100%;min-height:100%}#tree-stage{position:absolute;left:0;top:0;transform-origin:0 0}.tree-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.tree-line{fill:none;stroke:#7898ad;stroke-width:3;stroke-linecap:round}.tree-line.partner{stroke:#b68b47;stroke-dasharray:8 7;stroke-width:4}
.tree-node{position:absolute;width:218px;border:0;padding:0;background:none;color:#173e5b;transform:translate(-50%,-74px);display:flex;flex-direction:column;align-items:center;text-align:center;cursor:pointer;font-family:Georgia,serif;z-index:1}.tree-orb{width:144px;height:144px;box-sizing:border-box;border:4px solid #a8c1d2;border-radius:50%;background:radial-gradient(circle at 30% 20%,#fff,#dce9f1);display:grid;place-items:center;position:relative;box-shadow:0 10px 24px #2447601a;transition:transform .25s,border-color .25s}.tree-orb>span:first-child{font-size:44px;color:#54788f}.tree-orb img{display:block;width:100%;height:100%;object-fit:contain;border-radius:50%;background:#eef3f6}.tree-node strong{font-size:26px;line-height:1.2;font-weight:500;display:block;max-width:100%;margin-top:13px;background:#f4f8fbd9;border-radius:7px;padding:2px 5px}.tree-node small{font:18px/1.3 Arial,sans-serif;color:#566f80;margin-top:5px;max-width:220px;background:#f4f8fbd9}.tree-node-mario{z-index:2}.tree-node-mario .tree-orb{width:168px;height:168px;margin-top:-12px;border:5px solid #b9975b;box-shadow:0 0 0 12px #b9975b13,0 16px 30px #24476026}.tree-node-mario strong{font-weight:700}.tree-node-plus{position:absolute;right:-3px;bottom:-2px;width:36px;height:36px;border-radius:50%;background:#173e5b;color:#fff!important;border:3px solid white;display:grid;place-items:center;font:26px Arial,sans-serif!important}.tree-node:hover .tree-orb{transform:translateY(-5px) scale(1.04);border-color:#bd9859}.tree-node:focus-visible{outline:3px solid #a97c35;outline-offset:8px;border-radius:14px}
.tree-legend{display:flex;justify-content:center;gap:24px;padding:14px;flex-wrap:wrap;font:14px Arial,sans-serif;border-top:1px solid #dce5ec}.tree-legend span{display:flex;align-items:center;gap:9px}.tree-legend i{width:30px;border-top:2px solid #7898ad}.tree-legend i.partner{border-color:#b68b47;border-top-style:dashed}.tree-person-dialog{padding:35px 20px 20px}.tree-person-dialog .tree-person{border:0;box-shadow:none;background:none}.tree-person-dialog .tree-portrait{border-radius:50%;width:140px;height:140px}.tree-person-dialog .tree-close{z-index:3}#tree-unplaced .tree-children{display:flex;justify-content:center;flex-wrap:wrap;border:0;padding:0;margin:18px 0}#tree-unplaced .tree-children:before{display:none}#tree-unplaced>p{text-align:center;font:15px/1.6 Arial,sans-serif}
@media(max-width:650px){.tree-toolbar{padding:14px;gap:12px}.tree-toolbar p{font-size:15px}.tree-map-controls{gap:5px}.tree-map-controls button{padding:10px 12px}.tree-viewport{height:66dvh;min-height:470px}.tree-map-hint{padding:10px 14px}.tree-heading{padding:0 8px}.tree-heading>p:not(.tree-note):not(.tree-eyebrow){font-size:16px}.tree-map{border-radius:16px}}
@media(prefers-reduced-motion:reduce){.tree-orb{transition:none}}
.tree-node strong{font-size:var(--tree-name-size,26px)}.tree-node small{font-size:var(--tree-role-size,18px)}
.tree-dedication{max-width:790px;margin:24px auto;font:17px/1.8 Georgia,serif;color:#3c5364}.tree-dedication p{margin:0 0 14px}.tree-dedication .tree-author{color:#173e5b;font-style:italic;font-size:20px}.tree-birth-date{color:#315a73!important}.tree-dialog label[hidden],.tree-dialog small[hidden]{display:none!important}
.tree-relation-picker{display:grid;gap:8px;width:100%;margin-top:8px;text-align:left;font:600 15px/1.5 Arial,sans-serif}.tree-relation-picker select{width:100%;box-sizing:border-box;border:1px solid #aac0ce;border-radius:10px;padding:12px;background:#fff;color:#173e5b;font:16px Arial,sans-serif}.tree-line.relative{stroke:#6b7fa5;stroke-dasharray:3 9}.tree-legend i.relative{border-top:2px dotted #6b7fa5}
.tree-updated{display:inline-flex;align-items:center;justify-content:center;gap:9px;margin:0 auto 5px!important;padding:8px 14px;border:1px solid #bfd0dc;border-radius:999px;background:#eef5f8;color:#315a73;font:700 13px/1.45 Arial,sans-serif}.tree-updated span{color:#2d8a63;font-size:11px;animation:tree-update-pulse 2.4s ease-in-out infinite}@keyframes tree-update-pulse{50%{opacity:.35;transform:scale(.78)}}
.family-tree-page,.tree-map{min-width:0;max-width:100%;box-sizing:border-box}.tree-viewport{width:100%;box-sizing:border-box;touch-action:none}#tree-surface{overflow:hidden}.tree-overview .tree-node small{display:none}.tree-overview .tree-node strong{font-weight:600}
@media(max-width:650px){.tree-viewport{height:clamp(290px,52dvh,440px);min-height:290px}.tree-map-controls{width:100%;justify-content:center}.tree-toolbar p{width:100%;text-align:center}.tree-map-controls button{padding:10px}.tree-heading h1{font-size:30px}.tree-legend{gap:14px}.tree-map-hint{text-align:center}}
@media(prefers-reduced-motion:reduce){.tree-updated span{animation:none}}

/* Family photographs retain their original proportions; circles clip uploaded portraits. */
.tree-orb-wrap{position:relative;display:block;width:144px;height:144px;flex:none}
.tree-node-mario .tree-orb-wrap{width:168px;height:168px;margin-top:-12px}.tree-node-mario .tree-orb{margin-top:0}
.tree-orb{overflow:hidden;isolation:isolate;flex:none}.tree-orb img{object-fit:cover;object-position:center;max-width:none;min-width:0;min-height:0}
.tree-orb-wrap>.tree-node-plus{z-index:2}



/* Map navigation is immediate; dragging photographs pans the map. */
.tree-viewport{scroll-behavior:auto;overflow-anchor:none;user-select:none;-webkit-user-select:none}.tree-viewport img{-webkit-user-drag:none}.tree-viewport:active,.tree-viewport:active .tree-node{cursor:grabbing}
