:root{--bg:#f4f6f3;--panel:#fff;--ink:#17211c;--muted:#748078;--line:#cdd6d0;--line-strong:#8ea195;--accent:#234c3c;--accent-2:#dfe9e3;--danger:#8a2f2f;--radius:18px;--shadow:0 12px 35px rgba(33,54,44,.08)}*{box-sizing:border-box}html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}.topbar{height:68px;display:flex;align-items:center;gap:24px;padding:0 28px;background:rgba(255,255,255,.92);border-bottom:1px solid #e5e9e6;position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}.brand{display:flex;align-items:center;gap:10px;font-weight:800;white-space:nowrap}.brand-mark{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:var(--accent);color:white}.nav{display:flex;gap:18px;align-items:center;margin-left:auto}.nav a,.nav-search,.admin-link{border:0;background:none;color:#425047;cursor:pointer;font-weight:650}.nav a:hover,.nav-search:hover,.admin-link:hover{color:var(--accent)}.admin-link{margin-left:10px}.page{min-height:calc(100vh - 68px)}.tree-shell{padding:18px}.tree-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.tree-toolbar>div:first-child{display:flex;align-items:baseline;gap:12px}.toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:12px;padding:10px 14px;font-weight:750;cursor:pointer}.btn.primary{background:var(--accent);color:#fff}.btn.ghost{background:#fff;border-color:#dce3de;color:#314139}.btn.icon{width:42px;height:42px;padding:0;background:#fff;border-color:#dce3de}.tree-viewport{height:calc(100vh - 126px);min-height:540px;background:linear-gradient(#fff,#fbfcfb);border:1px solid #e0e6e2;border-radius:22px;overflow:hidden;position:relative;box-shadow:var(--shadow)}#treeSvg{width:100%;height:100%;touch-action:none;display:block}.tree-hint{position:absolute;left:16px;bottom:14px;background:rgba(255,255,255,.9);border:1px solid #e2e8e4;border-radius:999px;padding:7px 10px;font-size:12px;color:var(--muted);pointer-events:none}.muted{color:var(--muted);font-size:14px}.tree-edge{fill:none;stroke:var(--line-strong);stroke-width:1.7;stroke-linecap:round}.tree-edge.spouse{stroke:#b49776;stroke-dasharray:5 5}.tree-node-card{width:210px;height:112px;background:#fff;border:1px solid #dfe6e1;border-radius:17px;box-shadow:0 7px 22px rgba(43,64,54,.09);display:flex;gap:11px;padding:12px;align-items:center;transition:.18s ease}.tree-node-card:hover{transform:translateY(-2px);border-color:#b6c8bd;box-shadow:0 10px 28px rgba(43,64,54,.14)}.tree-node-card.focus{border:2px solid var(--accent);box-shadow:0 0 0 4px rgba(35,76,60,.08),0 10px 28px rgba(43,64,54,.12)}.tree-node-card .avatar{width:62px;height:76px;border-radius:14px;overflow:hidden;background:#e8eeea;flex:0 0 auto;display:grid;place-items:center;color:#587063;font-weight:800}.tree-node-card .avatar img{width:100%;height:100%;object-fit:cover}.tree-node-card .meta{min-width:0}.tree-node-card .name{font-size:13.5px;font-weight:800;line-height:1.25;margin-bottom:6px}.tree-node-card .dates,.tree-node-card .place{font-size:11.5px;color:#68756d;line-height:1.3}.tree-node-card .place{margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.compact-node rect{fill:#fff;stroke:#cbd6cf;rx:9}.compact-node.focus rect{stroke:var(--accent);stroke-width:2}.compact-node text{font-size:10px;fill:#33443b}.overlay{position:fixed;inset:0;background:rgba(15,22,18,.28);z-index:50;padding:90px 18px 18px}.overlay[hidden]{display:none}.search-box{max-width:680px;margin:auto;background:white;border-radius:20px;box-shadow:0 30px 80px #0002;padding:18px}.search-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.search-head button{border:0;background:none;font-size:28px;color:#68756d;cursor:pointer}.search-box input,.people-search input,.admin-form input,.admin-form textarea,.admin-form select{width:100%;border:1px solid #d8e0db;border-radius:12px;padding:12px 13px;background:#fff;outline:none}.search-box input:focus,.people-search input:focus,.admin-form input:focus,.admin-form textarea:focus,.admin-form select:focus{border-color:#93ab9d;box-shadow:0 0 0 3px #e8f0eb}.search-results{margin-top:10px;max-height:420px;overflow:auto}.search-item{display:flex;gap:10px;padding:9px;border-radius:12px;align-items:center}.search-item:hover{background:#f2f6f3}.search-item img,.search-initial{width:44px;height:50px;object-fit:cover;border-radius:10px;background:#e6ece8;display:grid;place-items:center}.search-item small{display:block;color:var(--muted);margin-top:2px}.person-page,.list-page{max-width:1180px;margin:0 auto;padding:42px 24px 70px}.person-hero{display:grid;grid-template-columns:280px 1fr;gap:34px;align-items:start}.person-photo{background:#e8eeea;overflow:hidden;display:grid;place-items:center;color:#486052;font-weight:850}.person-photo img{width:100%;height:100%;object-fit:cover}.person-photo.large{width:280px;height:340px;border-radius:24px;box-shadow:var(--shadow)}.person-photo.medium{width:74px;height:86px;border-radius:14px;flex:0 0 auto}.person-photo.small{width:48px;height:56px;border-radius:10px;flex:0 0 auto}.eyebrow{text-transform:uppercase;letter-spacing:.14em;color:#7b887f;font-size:12px;font-weight:850}.person-main h1,.list-head h1{font-size:clamp(34px,5vw,60px);line-height:.98;margin:8px 0 10px;letter-spacing:-.035em}.facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:26px 0}.facts>div{padding:14px 16px;background:#fff;border:1px solid #e1e7e3;border-radius:14px}.facts span{display:block;color:var(--muted);font-size:12px;margin-bottom:4px}.facts b{font-size:15px}.person-actions{display:flex;gap:9px;flex-wrap:wrap}.content-section{margin-top:42px;padding-top:26px;border-top:1px solid #dfe5e1;max-width:860px}.content-section p{font-size:17px;line-height:1.7}.kin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:42px}.kin-section{background:white;border:1px solid #e0e6e2;border-radius:18px;padding:18px}.kin-section h2{margin:0 0 12px;font-size:18px}.kin-list{display:flex;flex-direction:column;gap:8px}.kin-card{display:flex;gap:10px;align-items:center;padding:8px;border-radius:12px}.kin-card:hover{background:#f3f6f4}.kin-card b{font-size:13px}.kin-card small{display:block;color:var(--muted);margin-top:3px}.list-head{display:flex;justify-content:space-between;gap:20px;align-items:end}.people-search{display:flex;gap:8px;width:min(460px,100%)}.people-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:28px}.people-card{display:flex;gap:13px;align-items:center;background:white;border:1px solid #e0e6e2;border-radius:16px;padding:10px}.people-card:hover{border-color:#b9cabf}.people-card b,.people-card small,.people-card span{display:block}.people-card b{font-size:14px}.people-card small,.people-card span{color:var(--muted);font-size:12px;margin-top:3px}.admin-wrap{max-width:1100px;margin:0 auto;padding:34px 22px 70px}.admin-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.admin-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.stat{background:white;border:1px solid #e0e6e2;border-radius:16px;padding:18px}.stat b{font-size:30px;display:block}.admin-table{width:100%;border-collapse:collapse;background:white;border-radius:16px;overflow:hidden}.admin-table th,.admin-table td{text-align:left;padding:11px 12px;border-bottom:1px solid #edf0ee;font-size:13px}.admin-table th{color:#69776f;font-size:12px}.admin-actions{display:flex;gap:6px}.admin-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;background:white;border:1px solid #e0e6e2;border-radius:18px;padding:20px}.admin-form label{font-size:13px;font-weight:700}.admin-form label span{display:block;margin-bottom:6px}.admin-form .wide{grid-column:1/-1}.admin-form textarea{min-height:120px;resize:vertical}.notice{padding:12px 14px;border-radius:12px;background:#edf6f0;margin-bottom:14px}.danger{color:var(--danger)}@media(max-width:900px){.nav{display:none}.admin-link{margin-left:auto}.person-hero{grid-template-columns:1fr}.person-photo.large{width:min(100%,360px);height:auto;aspect-ratio:4/5}.kin-grid,.people-grid{grid-template-columns:1fr 1fr}.tree-toolbar{align-items:flex-start}.toolbar-actions .btn.ghost:first-child{display:none}}@media(max-width:640px){.topbar{height:60px;padding:0 14px}.brand span:last-child{font-size:14px}.page{min-height:calc(100vh - 60px)}.tree-shell{padding:8px}.tree-toolbar{padding:4px 2px}.tree-toolbar>div:first-child{display:block}.tree-toolbar .muted{display:block;margin-top:2px}.tree-viewport{height:calc(100vh - 118px);min-height:520px;border-radius:17px}.tree-hint{font-size:11px;left:8px;bottom:8px}.person-page,.list-page{padding:26px 14px 50px}.person-main h1,.list-head h1{font-size:38px}.facts{grid-template-columns:1fr}.kin-grid,.people-grid{grid-template-columns:1fr}.list-head{display:block}.people-search{margin-top:16px}.admin-form{grid-template-columns:1fr}.admin-form .wide{grid-column:auto}.toolbar-actions{gap:5px}.btn{padding:9px 11px}.btn.icon{width:38px;height:38px}}

/* ===== v3: modern family graph ===== */
.tree-shell{padding:14px 18px 18px}.tree-toolbar{margin-bottom:10px}.tree-toolbar strong{font-size:15px;letter-spacing:-.01em}.tree-viewport{background-color:#fbfcfa;background-image:radial-gradient(circle at 1px 1px,rgba(43,71,57,.085) 1px,transparent 0);background-size:22px 22px;border-color:#dfe6e1;box-shadow:0 16px 44px rgba(31,51,41,.065)}
.tree-edge{fill:none;vector-effect:non-scaling-stroke;pointer-events:none}.tree-edge.parent{stroke:#9daf9f;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.tree-edge.parent.trunk{stroke:#718a7b;stroke-width:2.15}.tree-edge.parent.sibling-bar{stroke:#9daf9f}.tree-edge.spouse{stroke:#355c49;stroke-width:2.5;stroke-dasharray:none;stroke-linecap:round}.family-junction{fill:#355c49;stroke:#fbfcfa;stroke-width:2;vector-effect:non-scaling-stroke}.parent-junction{fill:#718a7b;stroke:#fbfcfa;stroke-width:1.5;vector-effect:non-scaling-stroke}
.tree-node-card{width:238px;height:126px;background:rgba(255,255,255,.98);border:1px solid #dce5df;border-radius:20px;box-shadow:0 9px 26px rgba(31,54,42,.09);display:flex;gap:13px;padding:13px;align-items:center;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;cursor:pointer;overflow:hidden}.tree-node-card:hover{transform:translateY(-3px);border-color:#a9beb2;box-shadow:0 14px 34px rgba(31,54,42,.14)}.tree-node-card:focus-visible{outline:3px solid rgba(35,76,60,.24);outline-offset:2px}.tree-node-card.focus{border:2px solid #315f49;box-shadow:0 0 0 5px rgba(49,95,73,.09),0 14px 34px rgba(31,54,42,.13)}.tree-node-card .avatar{width:68px;height:88px;border-radius:16px;overflow:hidden;background:linear-gradient(145deg,#e5ece7,#f0f4f1);flex:0 0 auto;display:grid;place-items:center;color:#496657;font-size:15px;font-weight:850}.tree-node-card .avatar img{width:100%;height:100%;object-fit:cover}.tree-node-card .meta{min-width:0;flex:1}.tree-node-card .name{font-size:14px;font-weight:820;line-height:1.27;margin-bottom:7px;letter-spacing:-.012em}.tree-node-card .dates{font-size:12px;color:#6b796f;line-height:1.35}.tree-node-card .place{display:flex;align-items:center;gap:6px;font-size:11.5px;color:#53645a;line-height:1.3;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.place-dot{width:6px;height:6px;border-radius:50%;background:#789382;flex:0 0 auto}.tree-hint{box-shadow:0 4px 16px rgba(30,48,39,.06);backdrop-filter:blur(10px)}

.person-page{max-width:1160px;padding-top:48px}.person-hero{grid-template-columns:300px minmax(0,1fr);gap:42px}.person-photo.large{width:300px;height:370px;border-radius:28px;border:1px solid #dce5df;box-shadow:0 18px 46px rgba(31,52,41,.11)}.person-photo-button{padding:0;border:0;cursor:zoom-in;text-align:inherit}.person-photo-button[disabled]{cursor:default}.person-photo-button:not([disabled]) img{transition:transform .25s ease}.person-photo-button:not([disabled]):hover img{transform:scale(1.025)}.person-main{padding-top:8px}.person-main h1{max-width:760px}.facts{grid-template-columns:repeat(3,minmax(0,1fr));max-width:820px}.facts>div{background:rgba(255,255,255,.84);border-color:#dce5df;padding:15px 17px}.facts .fact-death{border-color:#e4ded8}.kin-section{box-shadow:0 8px 28px rgba(31,52,41,.045)}.kin-card{transition:background .15s ease,transform .15s ease}.kin-card:hover{background:#f1f5f2;transform:translateX(2px)}.kin-card span{display:block;color:var(--muted);font-size:11.5px;margin-top:3px}.photo-lightbox{position:fixed;inset:0;z-index:100;background:rgba(10,15,12,.88);display:flex;align-items:center;justify-content:center;padding:32px}.photo-lightbox[hidden]{display:none}.photo-lightbox img{max-width:min(94vw,1500px);max-height:90vh;width:auto;height:auto;object-fit:contain;border-radius:18px;box-shadow:0 30px 100px rgba(0,0,0,.45)}.photo-lightbox-close{position:absolute;top:22px;right:24px;width:46px;height:46px;border-radius:50%;border:1px solid rgba(255,255,255,.25);background:rgba(20,25,22,.55);color:white;font-size:30px;line-height:1;cursor:pointer;backdrop-filter:blur(8px)}

@media(max-width:900px){.person-hero{grid-template-columns:1fr}.person-photo.large{width:min(100%,390px);height:auto;aspect-ratio:4/5}.facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.tree-shell{padding:7px}.tree-viewport{min-height:560px}.toolbar-actions .btn.ghost{font-size:12px;padding:8px 9px}.toolbar-actions #focusTree{display:none}.tree-hint{max-width:calc(100% - 16px);white-space:normal;border-radius:14px}.facts{grid-template-columns:1fr}.photo-lightbox{padding:14px}.photo-lightbox img{max-width:96vw;max-height:86vh}.photo-lightbox-close{top:12px;right:12px}}

/* ===== v5: premium genealogy UI ===== */
:root{--bg:#f3f5f2;--panel:#ffffff;--ink:#16231d;--muted:#728078;--line:#d7dfda;--line-strong:#879b8f;--accent:#1f4c3a;--accent-deep:#17392d;--accent-soft:#e8f0eb;--warm:#9a7c5d;--danger:#8a3d3d;--radius:22px;--shadow:0 18px 55px rgba(28,52,39,.09)}
html{scroll-behavior:smooth}body{background:radial-gradient(circle at 20% -10%,#fff 0,#f5f7f4 38%,var(--bg) 72%);min-height:100vh}.overlay-open{overflow:hidden}
.topbar{height:72px;padding:0 30px;border-bottom:1px solid rgba(31,76,58,.09);background:rgba(249,251,249,.9);box-shadow:0 8px 30px rgba(28,52,39,.035)}
.brand{font-size:16px;letter-spacing:-.015em}.brand-mark{width:38px;height:38px;border-radius:13px;background:linear-gradient(145deg,#295d49,#173c2e);box-shadow:0 8px 18px rgba(31,76,58,.2)}
.nav{gap:24px}.nav a,.nav-search,.admin-link{font-size:14px;font-weight:750;transition:color .16s ease,opacity .16s ease}.admin-link{padding:9px 13px;border:1px solid #d8e2dc;border-radius:11px;background:#fff}.admin-link:hover{border-color:#b8c9bf}
.mobile-menu-toggle{display:none;margin-left:4px;width:42px;height:42px;border:1px solid #d9e2dc;border-radius:12px;background:#fff;align-items:center;justify-content:center;flex-direction:column;gap:4px;cursor:pointer}.mobile-menu-toggle span{display:block;width:18px;height:2px;border-radius:2px;background:#294539;transition:.2s}.mobile-menu-toggle.open span:nth-child(1){transform:translateY(6px) rotate(45deg)}.mobile-menu-toggle.open span:nth-child(2){opacity:0}.mobile-menu-toggle.open span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
.mobile-nav{position:sticky;top:72px;z-index:19;background:rgba(250,252,250,.98);border-bottom:1px solid #dfe6e1;padding:10px 14px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;box-shadow:0 12px 24px rgba(28,52,39,.06)}.mobile-nav[hidden]{display:none}.mobile-nav a,.mobile-nav button{min-height:44px;border:0;border-radius:11px;background:#fff;color:#274237;font-weight:760;font-size:12px;display:flex;align-items:center;justify-content:center;padding:8px;text-align:center}.mobile-nav button{cursor:pointer}
.btn{min-height:42px;border-radius:13px;font-weight:800;letter-spacing:-.01em;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease,background .15s ease}.btn:hover{transform:translateY(-1px)}.btn.primary{background:linear-gradient(145deg,#285c47,#1b4434);box-shadow:0 8px 20px rgba(31,76,58,.18)}.btn.primary:hover{box-shadow:0 11px 24px rgba(31,76,58,.24)}.btn.ghost{background:rgba(255,255,255,.94);border-color:#d9e2dc}.btn.ghost:hover{border-color:#aec0b5;background:#fff}.btn.icon{border-radius:13px;font-size:18px}

.tree-shell{padding:18px 22px 22px}.tree-toolbar{margin-bottom:12px}.tree-title{display:flex;align-items:center;gap:12px}.tree-title strong{font-size:16px}.toolbar-actions{align-items:center}.tree-viewport{height:calc(100vh - 136px);min-height:580px;border-radius:26px;border:1px solid #dce5df;background-color:#fafbf9;background-image:radial-gradient(circle at 1px 1px,rgba(32,76,58,.085) 1.1px,transparent 0);background-size:24px 24px;box-shadow:0 22px 70px rgba(26,49,37,.08);isolation:isolate}
#treeSvg{cursor:grab}#treeSvg:active{cursor:grabbing}.tree-hint{left:18px;bottom:16px;padding:9px 13px;border-radius:14px;background:rgba(255,255,255,.88);border:1px solid rgba(215,224,218,.95);box-shadow:0 8px 25px rgba(28,52,39,.07);backdrop-filter:blur(12px);font-weight:650;color:#77857d}
.tree-node-fo{overflow:visible;background:transparent}.tree-node-card{position:relative;width:252px;height:138px;background:linear-gradient(155deg,#fff 0%,#fdfefd 100%);border:1px solid #dbe4de;border-radius:22px;box-shadow:0 12px 32px rgba(27,52,39,.095);display:flex;gap:14px;padding:13px 14px;align-items:center;cursor:pointer;overflow:hidden;transition:transform .17s ease,border-color .17s ease,box-shadow .17s ease;background-clip:padding-box}.tree-node-card::before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:linear-gradient(90deg,transparent,#adc2b6 38%,#789887 62%,transparent);opacity:.36}.tree-node-card:hover{transform:translateY(-4px);border-color:#abc0b4;box-shadow:0 18px 40px rgba(27,52,39,.15)}.tree-node-card:focus-visible{outline:3px solid rgba(31,76,58,.2);outline-offset:3px}.tree-node-card.focus{border:2px solid #315f49;box-shadow:0 0 0 6px rgba(49,95,73,.085),0 18px 42px rgba(27,52,39,.15)}.tree-node-card.focus::before{opacity:.95;background:linear-gradient(90deg,#244f3d,#6d907e,#244f3d)}
.tree-node-card .avatar{width:72px;height:98px;border-radius:17px;overflow:hidden;background:linear-gradient(145deg,#e3ece6,#f2f5f3);flex:0 0 auto;display:grid;place-items:center;color:#476354;font-size:15px;font-weight:900;box-shadow:inset 0 0 0 1px rgba(46,79,62,.06)}.tree-node-card .avatar img{width:100%;height:100%;object-fit:cover}.tree-node-card .meta{min-width:0;flex:1;padding-right:15px}.tree-node-card .name{font-size:14px;font-weight:850;line-height:1.24;margin-bottom:7px;letter-spacing:-.015em;color:#17251e}.tree-node-card .dates{font-size:11.7px;color:#6d7a73;line-height:1.3;min-height:15px}.tree-node-card .place{display:flex;align-items:center;gap:6px;font-size:11.5px;color:#465a50;line-height:1.3;margin-top:7px;min-width:0}.tree-node-card .place-icon{font-size:13px;color:#698776;flex:0 0 auto}.tree-node-card .place-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.node-open{position:absolute;right:10px;top:10px;width:24px;height:24px;border-radius:8px;display:grid;place-items:center;background:#f0f5f2;color:#577064;font-size:12px;opacity:0;transform:translateY(2px);transition:.16s}.tree-node-card:hover .node-open,.tree-node-card:focus .node-open{opacity:1;transform:none}
.tree-edge{fill:none;vector-effect:non-scaling-stroke;pointer-events:none}.tree-edge.parent{stroke:#9bad9f;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round}.tree-edge.parent.trunk{stroke:#708a7a;stroke-width:2.25}.tree-edge.parent.sibling-bar{stroke:#9bad9f}.tree-edge.parent.child-drop{stroke:#93a79b}.tree-edge.spouse{stroke:#385d4c;stroke-width:2.7;stroke-linecap:round}.family-junction{fill:#385d4c;stroke:#fafbf9;stroke-width:2.2;vector-effect:non-scaling-stroke}.parent-junction{fill:#708a7a;stroke:#fafbf9;stroke-width:1.8;vector-effect:non-scaling-stroke}

.person-page{max-width:1200px;margin:0 auto;padding:46px 24px 76px}.person-hero-card{display:grid;grid-template-columns:310px minmax(0,1fr);gap:44px;align-items:center;padding:24px;background:rgba(255,255,255,.8);border:1px solid #dce5df;border-radius:30px;box-shadow:0 24px 70px rgba(28,52,39,.08);backdrop-filter:blur(10px)}.person-photo{background:linear-gradient(145deg,#e5ece8,#f0f4f1);overflow:hidden;display:grid;place-items:center;color:#486052;font-weight:850}.person-photo img{width:100%;height:100%;object-fit:cover}.person-photo.large{position:relative;width:310px;height:382px;border-radius:24px;border:1px solid #d8e2dc;box-shadow:0 18px 46px rgba(31,52,41,.12)}.person-photo.medium{width:74px;height:86px;border-radius:15px;flex:0 0 auto}.person-photo.small{width:52px;height:60px;border-radius:12px;flex:0 0 auto}.person-photo-button{padding:0;cursor:zoom-in;text-align:inherit}.person-photo-button[disabled]{cursor:default}.person-photo-button:not([disabled]) img{transition:transform .3s ease}.person-photo-button:not([disabled]):hover img{transform:scale(1.025)}.photo-zoom-badge{position:absolute;left:14px;bottom:14px;padding:7px 10px;border-radius:10px;background:rgba(16,27,21,.68);color:#fff;font-size:11px;font-weight:800;backdrop-filter:blur(8px);opacity:0;transition:.18s}.person-photo-button:hover .photo-zoom-badge{opacity:1}
.person-main{padding:8px 10px 8px 0}.person-kicker{display:flex;align-items:center;gap:10px;text-transform:uppercase;letter-spacing:.13em;color:#748179;font-size:11px;font-weight:850}.life-status{letter-spacing:0;text-transform:none;border-radius:999px;padding:5px 8px;font-size:10px}.life-status.alive{background:#e7f2eb;color:#2f674e}.life-status.deceased{background:#f2eeea;color:#7d654e}.person-main h1{font-size:clamp(38px,5.2vw,68px);line-height:.95;margin:14px 0 8px;letter-spacing:-.045em;max-width:780px}.maiden{margin:0;color:#758179;font-size:14px}.facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin:30px 0 26px;max-width:840px}.fact{padding:15px 17px;background:#fbfcfb;border:1px solid #dce5df;border-radius:16px;min-height:74px}.fact span{display:block;color:#7b8780;font-size:11px;margin-bottom:6px}.fact b{display:block;font-size:15px;line-height:1.3}.fact-residence{grid-column:span 1}.fact-death{border-color:#e4ded8}.person-actions{display:flex;gap:9px;flex-wrap:wrap}.content-section{margin-top:34px;padding:28px 30px;background:rgba(255,255,255,.72);border:1px solid #e0e7e2;border-radius:24px;max-width:none}.content-section .section-label{text-transform:uppercase;letter-spacing:.12em;color:#7e8a83;font-size:10px;font-weight:850}.content-section h2{margin:5px 0 12px;font-size:24px}.content-section p{font-size:17px;line-height:1.75;max-width:880px;margin-bottom:0}.kin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:20px}.kin-section{background:rgba(255,255,255,.82);border:1px solid #dce5df;border-radius:22px;padding:18px;box-shadow:0 12px 35px rgba(31,52,41,.045)}.kin-section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.kin-section-head h2{margin:0;font-size:17px}.kin-section-head span{min-width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:#eef3f0;color:#5e7167;font-size:11px;font-weight:850}.kin-list{display:flex;flex-direction:column;gap:7px}.kin-card{position:relative;display:flex;gap:11px;align-items:center;padding:9px 10px;border:1px solid transparent;border-radius:14px;transition:background .15s ease,transform .15s ease,border-color .15s ease}.kin-card:hover{background:#f4f7f5;border-color:#e2e9e4;transform:translateX(2px)}.kin-copy{min-width:0;flex:1}.kin-card b{font-size:13px;line-height:1.3}.kin-card small{display:block;color:#77827c;margin-top:3px;font-size:11px}.kin-place{display:block;color:#5a6b62;font-size:11px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kin-arrow{color:#819087;opacity:.6}.empty-state{margin:4px 0;color:#89938e;font-size:13px}
.photo-lightbox{position:fixed;inset:0;z-index:100;background:rgba(8,13,10,.91);display:flex;align-items:center;justify-content:center;padding:30px}.photo-lightbox[hidden]{display:none}.photo-lightbox-stage{display:flex;flex-direction:column;align-items:center;gap:10px;max-width:96vw;max-height:94vh}.photo-lightbox img{max-width:min(94vw,1600px);max-height:86vh;width:auto;height:auto;object-fit:contain;border-radius:18px;box-shadow:0 34px 110px rgba(0,0,0,.48)}.photo-lightbox-caption{color:rgba(255,255,255,.8);font-size:13px;font-weight:700}.photo-lightbox-close{position:absolute;top:20px;right:22px;width:48px;height:48px;border-radius:50%;border:1px solid rgba(255,255,255,.24);background:rgba(25,31,28,.58);color:white;font-size:30px;line-height:1;cursor:pointer;backdrop-filter:blur(8px)}

.list-page{max-width:1200px}.list-head{padding:18px 0}.people-grid{gap:14px}.people-card{border-radius:18px;padding:12px;background:rgba(255,255,255,.86);box-shadow:0 8px 28px rgba(31,52,41,.035);transition:.15s}.people-card:hover{transform:translateY(-2px);box-shadow:0 13px 32px rgba(31,52,41,.07)}

@media(max-width:900px){.nav{display:none}.admin-link{display:none}.mobile-menu-toggle{display:flex;margin-left:auto}.topbar{padding:0 16px}.tree-shell{padding:12px}.tree-toolbar{align-items:flex-start;flex-direction:column}.toolbar-actions{width:100%;overflow-x:auto;flex-wrap:nowrap;padding:2px 0 7px;scrollbar-width:none}.toolbar-actions::-webkit-scrollbar{display:none}.toolbar-actions .btn,.toolbar-actions .btn.ghost:first-child{display:inline-flex!important;flex:0 0 auto}.person-hero-card{grid-template-columns:1fr;gap:24px}.person-photo.large{width:min(100%,420px);height:auto;aspect-ratio:4/5}.person-main{padding:0}.facts{grid-template-columns:repeat(2,minmax(0,1fr))}.kin-grid,.people-grid{grid-template-columns:1fr 1fr}.tree-viewport{height:calc(100vh - 190px);min-height:560px}}
@media(max-width:640px){.topbar{height:62px}.mobile-nav{top:62px;grid-template-columns:repeat(2,minmax(0,1fr))}.mobile-nav a:last-child{grid-column:span 2}.brand span:last-child{font-size:14px}.page{min-height:calc(100vh - 62px)}.tree-shell{padding:8px}.tree-toolbar{margin-bottom:6px}.tree-title{width:100%;justify-content:space-between}.tree-title .muted{font-size:12px}.toolbar-actions{gap:6px}.toolbar-actions .btn.ghost{display:inline-flex!important;font-size:12px;padding:8px 10px}.toolbar-actions #focusTree{display:inline-flex!important}.toolbar-actions .btn.icon{width:38px;height:38px;min-height:38px}.tree-viewport{height:calc(100vh - 164px);min-height:520px;border-radius:19px}.tree-hint{font-size:10px;left:9px;bottom:9px;right:9px;white-space:normal;text-align:center}.person-page,.list-page{padding:18px 12px 46px}.person-hero-card{padding:14px;border-radius:22px}.person-photo.large{width:100%;max-width:none;border-radius:19px}.photo-zoom-badge{opacity:1}.person-main h1{font-size:38px;line-height:1}.facts{grid-template-columns:1fr;margin:22px 0 20px}.fact-residence{grid-column:auto}.person-actions{display:grid;grid-template-columns:1fr}.person-actions .btn{width:100%}.kin-grid,.people-grid{grid-template-columns:1fr}.content-section{padding:20px;border-radius:20px}.photo-lightbox{padding:12px}.photo-lightbox img{max-width:96vw;max-height:83vh}.photo-lightbox-close{top:10px;right:10px}.list-head{display:block}.people-search{margin-top:16px}.admin-form{grid-template-columns:1fr}.admin-form .wide{grid-column:auto}}

/* ===== v6 · Interactive graph visual system ===== */
:root{--bg:#f7f9fc;--panel:#fff;--ink:#10213a;--muted:#6f7f95;--line:#cfd8e6;--line-strong:#9aa9bd;--accent:#2563eb;--accent-2:#eaf1ff;--radius:18px;--shadow:0 12px 34px rgba(31,55,90,.08)}
html,body{background:var(--bg);color:var(--ink)}
.topbar{height:64px;padding:0 24px;background:rgba(255,255,255,.96);border-bottom:1px solid #e7ecf3;box-shadow:0 1px 0 rgba(16,33,58,.02);backdrop-filter:blur(14px)}
.brand{gap:11px}.brand-mark{width:34px;height:34px;border-radius:10px;background:#0f2747;color:#fff;font-size:13px;box-shadow:none}.brand-copy{display:flex;flex-direction:column;line-height:1.05}.brand-copy b{font-size:13px;letter-spacing:.06em}.brand-copy small{font-size:9px;color:#8a97a8;font-weight:600;margin-top:3px;letter-spacing:.03em}
.nav{gap:26px}.nav a,.nav-search,.admin-link{font-size:13px;font-weight:700;color:#536176}.nav a:hover,.nav-search:hover,.admin-link:hover{color:var(--accent)}
.btn{border-radius:11px;min-height:40px;padding:9px 13px;font-size:12.5px;box-shadow:none}.btn.primary{background:var(--accent);color:#fff}.btn.primary:hover{background:#1d4ed8}.btn.ghost,.btn.icon{background:#fff;border-color:#dde5ef;color:#263a55}.btn.ghost:hover,.btn.icon:hover{border-color:#bdc9da;background:#f9fbfe}
.tree-shell{padding:14px 16px 16px}.tree-toolbar{margin-bottom:10px;align-items:center}.tree-title{display:flex;align-items:end;gap:16px}.tree-title>div{display:flex;flex-direction:column;gap:2px}.tree-kicker{font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:#8794a5;font-weight:800}.tree-title strong{font-size:17px;letter-spacing:-.015em}.tree-title .muted{padding-bottom:1px}
.tree-viewport{height:calc(100vh - 124px);min-height:560px;background:#fff;background-image:radial-gradient(circle at 1px 1px,rgba(90,110,140,.13) 1px,transparent 0);background-size:24px 24px;border:1px solid #e4eaf2;border-radius:18px;box-shadow:none;overflow:hidden}
.tree-node-fo{overflow:visible;background:transparent!important}.tree-node-card{position:relative;width:252px;height:138px;padding:16px;background:#fff;border:1px solid #e3e9f1;border-radius:17px;box-shadow:0 8px 24px rgba(37,58,88,.07);display:flex;gap:14px;align-items:center;cursor:pointer;overflow:hidden;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;background-clip:padding-box}.tree-node-card::before{display:none}.tree-node-card:hover{transform:translateY(-3px);border-color:#c3cfdf;box-shadow:0 14px 34px rgba(37,58,88,.12)}.tree-node-card.focus{border:2px solid var(--accent);box-shadow:0 0 0 5px rgba(37,99,235,.09),0 14px 34px rgba(37,58,88,.11)}
.tree-node-card .avatar{width:68px;height:88px;border-radius:14px;overflow:hidden;background:#edf2f8;display:grid;place-items:center;flex:0 0 auto;color:#48617f;font-size:14px;font-weight:900;box-shadow:none}.tree-node-card .meta{min-width:0;flex:1;padding:0}.tree-node-card .name{font-size:14px;line-height:1.22;font-weight:800;color:#10213a;margin-bottom:8px;letter-spacing:-.01em}.tree-node-card .dates{font-size:11.5px;line-height:1.25;color:#7b8798;min-height:14px}.tree-node-card .place{display:flex;align-items:center;gap:6px;margin-top:8px;font-size:11.5px;color:#52657e;line-height:1.25}.tree-node-card .place-icon{font-size:7px;color:#8aa4c8}.tree-node-card .place-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.node-open{display:none!important}
.tree-edge.parent{stroke:#b6c1d0;stroke-width:1.55}.tree-edge.parent.trunk{stroke:#95a5b9;stroke-width:1.8}.tree-edge.parent.sibling-bar{stroke:#b6c1d0}.tree-edge.parent.child-drop{stroke:#b6c1d0}.tree-edge.spouse{stroke:#6e86a8;stroke-width:2}.family-junction{fill:#6e86a8;stroke:#fff;stroke-width:2}.parent-junction{fill:#95a5b9;stroke:#fff;stroke-width:1.7}
.tree-hint{left:14px;bottom:12px;padding:7px 10px;border-radius:10px;background:rgba(255,255,255,.94);border:1px solid #e4eaf2;color:#7c8999;font-size:11px;box-shadow:0 6px 18px rgba(36,56,84,.05)}
.person-peek{position:absolute;right:18px;bottom:18px;width:min(390px,calc(100% - 36px));display:grid;grid-template-columns:54px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 12px 12px 12px;background:rgba(255,255,255,.97);border:1px solid #dfe6ef;border-radius:16px;box-shadow:0 18px 44px rgba(35,55,84,.14);z-index:8;backdrop-filter:blur(12px)}.person-peek[hidden]{display:none}.person-peek-photo{width:54px;height:62px;border-radius:12px;overflow:hidden;background:#edf2f8;display:grid;place-items:center;font-weight:800;color:#536984}.person-peek-photo img{width:100%;height:100%;object-fit:cover}.person-peek-copy{display:flex;flex-direction:column;min-width:0}.person-peek-copy strong{font-size:13px;line-height:1.22}.person-peek-copy>span{font-size:11px;color:#7c899a;margin-top:3px}.person-peek-copy .peek-place{color:#53657d}.person-peek .btn{white-space:nowrap}.person-peek-close{position:absolute;top:-9px;right:-9px;width:28px;height:28px;border-radius:50%;border:1px solid #dce4ee;background:#fff;color:#65758b;cursor:pointer;box-shadow:0 6px 18px rgba(32,52,81,.11)}

.person-page{max-width:1140px;padding:38px 24px 72px}.person-hero-card{display:grid;grid-template-columns:250px minmax(0,1fr);gap:34px;align-items:center;padding:20px;background:#fff;border:1px solid #e4eaf2;border-radius:22px;box-shadow:0 10px 34px rgba(36,56,84,.055)}.person-photo.large{width:250px;height:320px;border-radius:18px;border:1px solid #e0e6ee;box-shadow:none}.person-main{padding:4px 8px 4px 0}.person-kicker{display:flex;gap:8px;align-items:center;color:#8491a2;font-size:10px;letter-spacing:.12em}.life-status.deceased{background:#f3f5f8;color:#526178;padding:4px 8px;border-radius:999px;font-size:10px}.person-main h1{font-size:clamp(34px,4.4vw,58px);line-height:.98;margin:12px 0 8px;letter-spacing:-.04em}.facts{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:24px 0 22px}.fact{background:#f9fbfd;border:1px solid #e5ebf2;border-radius:13px;min-height:70px;padding:13px 14px}.fact span{font-size:10.5px;color:#8995a5}.fact b{font-size:14px;color:#1a2c45}.fact-death{border-color:#e5e7eb}.person-actions{gap:8px}.kin-grid{margin-top:18px;gap:12px}.kin-section{background:#fff;border:1px solid #e4eaf2;border-radius:17px;padding:16px;box-shadow:none}.kin-section-head h2{font-size:15px}.kin-section-head span{background:#f0f4f9;color:#6e7d91}.kin-card:hover{background:#f7f9fc;border-color:#e5eaf1;transform:none}.kin-place{color:#64758c}.content-section{background:#fff;border:1px solid #e4eaf2;border-radius:18px;padding:22px 24px;margin-top:20px}.photo-zoom-badge{background:rgba(15,33,58,.72)}
.list-page{max-width:1140px}.list-head h1{font-size:44px}.people-card{background:#fff;border:1px solid #e4eaf2;border-radius:15px;box-shadow:none}.people-card:hover{border-color:#cbd6e4;box-shadow:0 10px 24px rgba(35,55,84,.06)}
.search-box{border-radius:18px;border:1px solid #e3e9f1;box-shadow:0 24px 70px rgba(28,45,68,.18)}

@media(max-width:900px){.tree-viewport{height:calc(100vh - 194px)}.person-hero-card{grid-template-columns:1fr}.person-photo.large{width:min(100%,390px);height:auto;aspect-ratio:4/5}.facts{grid-template-columns:repeat(2,minmax(0,1fr))}.person-peek{grid-template-columns:48px minmax(0,1fr);padding:10px}.person-peek-photo{width:48px;height:56px}.person-peek .btn{grid-column:1/-1;width:100%}}
@media(max-width:640px){.topbar{height:60px;padding:0 13px}.brand-copy small{display:none}.tree-shell{padding:8px}.tree-toolbar{align-items:flex-start;flex-direction:column}.tree-title{width:100%;justify-content:space-between;align-items:end}.toolbar-actions{width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px;scrollbar-width:none}.toolbar-actions::-webkit-scrollbar{display:none}.toolbar-actions .btn{display:inline-flex!important;flex:0 0 auto}.tree-viewport{height:calc(100vh - 170px);min-height:520px;border-radius:15px}.tree-hint{left:8px;right:8px;bottom:8px;text-align:center}.person-peek{right:8px;bottom:46px;width:calc(100% - 16px)}.person-page{padding:16px 10px 42px}.person-hero-card{padding:12px;border-radius:18px}.person-main h1{font-size:36px}.facts{grid-template-columns:1fr}.person-actions{display:grid;grid-template-columns:1fr}.person-actions .btn{width:100%}}


/* v7 — clean genealogy routing + desktop pan fixes */
.tree-viewport,.tree-viewport *{-webkit-user-select:none;user-select:none}
.tree-viewport{cursor:grab}
#treeSvg{width:100%;height:100%;touch-action:none;cursor:grab;-webkit-user-select:none;user-select:none}
.tree-node-fo,.tree-node-card{touch-action:none;-webkit-user-select:none;user-select:none}
#treeSvg.is-panning{cursor:grabbing}
.tree-node-fo{pointer-events:auto;overflow:visible;background:transparent!important}
.tree-node-card{cursor:pointer;isolation:isolate}
.tree-node-card img{-webkit-user-drag:none;user-drag:none;pointer-events:none}
.tree-edge{fill:none;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.tree-edge.spouse{stroke:#6f86a5;stroke-width:2.15}
.tree-edge.parent.trunk{stroke:#8fa0b6;stroke-width:1.85}
.tree-edge.parent.sibling-bar,.tree-edge.parent.child-drop{stroke:#aab7c8;stroke-width:1.55}

/* ===== v8 · final interactive graph polish ===== */
:root{
  --male:#78bce6;
  --male-strong:#3f97d2;
  --male-soft:#eef8fe;
  --female:#f2a5b6;
  --female-strong:#dc6f8b;
  --female-soft:#fff3f6;
  --unknown:#c6ced8;
  --unknown-strong:#8d99a8;
  --tree-line:#aebdcd;
  --tree-line-strong:#8398af;
  --tree-spouse:#718aa6;
}

/* Graph canvas: visually closer to the chosen “interactive graph” concept. */
.tree-viewport{
  background-color:#fbfdff;
  background-image:radial-gradient(circle at 1px 1px,rgba(111,137,166,.13) 1px,transparent 0);
  background-size:24px 24px;
  border-color:#e4eaf2;
}

/* Gender-coded cards — thin, calm and premium rather than saturated. */
.tree-node-card{
  border-width:1.5px;
  box-shadow:0 9px 26px rgba(39,61,89,.075);
  background:rgba(255,255,255,.985);
}
.tree-node-card.gender-male{border-color:var(--male)}
.tree-node-card.gender-female{border-color:var(--female)}
.tree-node-card.gender-unknown{border-color:var(--unknown)}
.tree-node-card.gender-male .avatar{background:var(--male-soft)}
.tree-node-card.gender-female .avatar{background:var(--female-soft)}
.tree-node-card.gender-unknown .avatar{background:#f2f4f7}
.tree-node-card.gender-male:hover{border-color:var(--male-strong);box-shadow:0 14px 32px rgba(63,151,210,.13)}
.tree-node-card.gender-female:hover{border-color:var(--female-strong);box-shadow:0 14px 32px rgba(220,111,139,.13)}
.tree-node-card.gender-unknown:hover{border-color:var(--unknown-strong)}
.tree-node-card.focus{border-width:2px;box-shadow:0 0 0 4px rgba(37,99,235,.08),0 14px 34px rgba(37,58,88,.12)}
.tree-node-card.gender-male.focus{border-color:var(--male-strong)}
.tree-node-card.gender-female.focus{border-color:var(--female-strong)}
.tree-node-card.gender-unknown.focus{border-color:var(--accent)}

.tree-node-card .name{font-size:14px;line-height:1.2;letter-spacing:-.012em}
.tree-node-card .dates{color:#738398}
.tree-node-card .place{color:#425a76;margin-top:7px}
.tree-node-card .place-icon{color:#86a1c0}

/* Clean family routing: spouse bond + one shared parent trunk + sibling bus. */
.tree-edge{shape-rendering:geometricPrecision;stroke-linecap:round;stroke-linejoin:round}
.tree-edge.spouse{stroke:var(--tree-spouse);stroke-width:2.2}
.tree-edge.parent.trunk{stroke:var(--tree-line-strong);stroke-width:1.95}
.tree-edge.parent.sibling-bar{stroke:var(--tree-line);stroke-width:1.65}
.tree-edge.parent.child-drop{stroke:var(--tree-line);stroke-width:1.65}

/* At far zoom levels reduce visual noise while preserving the genealogy. */
.tree-viewport.is-overview .tree-node-card .dates,
.tree-viewport.is-overview .tree-node-card .place{opacity:.18}
.tree-viewport.is-overview .tree-node-card{box-shadow:none}

/* Matching gender accents elsewhere for a consistent visual language. */
.people-card,.kin-card{border:1px solid #e4eaf2}
.people-card.gender-male,.kin-card.gender-male{border-color:rgba(120,188,230,.72)}
.people-card.gender-female,.kin-card.gender-female{border-color:rgba(242,165,182,.78)}
.people-card.gender-unknown,.kin-card.gender-unknown{border-color:#d7dde5}
.people-card.gender-male:hover,.kin-card.gender-male:hover{border-color:var(--male-strong)}
.people-card.gender-female:hover,.kin-card.gender-female:hover{border-color:var(--female-strong)}

/* Person page: keep status quiet — only the actual death fact is shown when present. */
.person-kicker{min-height:20px}
.fact-death{border-color:#e7eaf0;background:#fafbfc}

@media(max-width:640px){
  .tree-node-card{box-shadow:0 7px 20px rgba(39,61,89,.075)}
  .tree-node-card:hover{transform:none}
}

/* v9 — smooth premium genealogy routing. */
:root{
  --tree-line-v9:#aab8c7;
  --tree-line-strong-v9:#96a8bb;
  --tree-spouse-v9:#879bb2;
  --tree-line-hover-v9:#6f8eaf;
}
.tree-edge{
  fill:none;
  vector-effect:non-scaling-stroke;
  shape-rendering:geometricPrecision;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:stroke .16s ease,stroke-width .16s ease,opacity .16s ease;
}
.tree-edge.spouse{stroke:var(--tree-spouse-v9);stroke-width:2.05}
.tree-edge.parent.trunk{stroke:var(--tree-line-strong-v9);stroke-width:2.05}
.tree-edge.parent.child-branch{stroke:var(--tree-line-v9);stroke-width:1.9}
.tree-edge.is-related{stroke:var(--tree-line-hover-v9);stroke-width:2.25}


/* v10 wow polish */
:root{
  --tree-line-v10:#afbdcd;
  --tree-line-strong-v10:#93a6bc;
  --tree-line-hover-v10:#6e88aa;
  --tree-spouse-v10:#7087a6;
}
.tree-viewport{
  background:#fcfdff;
  background-image:radial-gradient(circle at 1px 1px,rgba(106,128,162,.12) 1px,transparent 0);
  background-size:24px 24px;
  border-color:#e5ebf3;
}
.tree-node-card{
  width:238px;
  height:126px;
  padding:14px;
  border-radius:18px;
  border-width:1.5px;
  box-shadow:0 10px 26px rgba(47,68,98,.07);
}
.tree-node-card:hover{transform:translateY(-2px) scale(1.01)}
.tree-node-card .avatar{width:62px;height:82px;border-radius:13px}
.tree-node-card .name{font-size:13.5px}
.tree-node-card .dates,.tree-node-card .place{font-size:11.25px}
.tree-node-card::after{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,0));
}
.tree-edge{
  shape-rendering:geometricPrecision;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.tree-edge.spouse{stroke:var(--tree-spouse-v10);stroke-width:2.05;opacity:.92}
.tree-edge.parent.trunk{stroke:var(--tree-line-strong-v10);stroke-width:2.05;opacity:.92}
.tree-edge.parent.child-branch{stroke:var(--tree-line-v10);stroke-width:1.82;opacity:.94}
.tree-edge.is-related{stroke:var(--tree-line-hover-v10)!important;stroke-width:2.2}
.parent-junction{fill:var(--tree-line-strong-v10);stroke:#fff;stroke-width:1.6}
.family-junction{fill:var(--tree-spouse-v10);stroke:#fff;stroke-width:1.8}


/* v11 tree polish */
.tree-viewport.is-overview .tree-node-card{box-shadow:0 6px 16px rgba(47,68,98,.05)}
.tree-node-card{width:236px;height:124px;padding:14px 14px 12px;border-radius:18px}
.tree-node-card .avatar{width:60px;height:80px;border-radius:14px}
.tree-edge{shape-rendering:geometricPrecision;fill:none;stroke-linecap:round;stroke-linejoin:round}
.tree-edge.spouse{stroke:#8fa0b5;stroke-width:2.05;opacity:.95}
.tree-edge.parent.trunk{stroke:#a6b6c8;stroke-width:2.02;opacity:.95}
.tree-edge.parent.bus{stroke:#aabacd;stroke-width:1.96;opacity:.95}
.tree-edge.parent.child-branch{stroke:#aebdd0;stroke-width:1.88;opacity:.94}
.tree-edge.is-related{stroke:#6f87a7!important;stroke-width:2.2!important;opacity:1}
.parent-junction,.branch-junction,.family-junction{stroke:#fff;stroke-width:1.5;fill:#9bacc1}
.family-junction{fill:#8497af}
.tree-instruction{backdrop-filter:blur(8px);background:rgba(255,255,255,.84);border-color:#e6ecf4}


/* v12 refined lines + favicon polish */
.tree-viewport{background:#fbfcfe;background-image:radial-gradient(circle at 1px 1px,rgba(112,133,165,.11) 1px,transparent 0);background-size:24px 24px;border-color:#e6edf5}
.tree-node-card{width:236px;height:124px;border-radius:18px;box-shadow:0 8px 22px rgba(29,53,87,.06)}
.tree-edge{fill:none;shape-rendering:geometricPrecision;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.tree-edge.spouse{stroke:#90a2ba;stroke-width:2.05;opacity:.98}
.tree-edge.parent.child-branch{stroke:#acbbce;stroke-width:1.95;opacity:.98}
.tree-edge.is-related{stroke:#6f87a7!important;stroke-width:2.25!important;opacity:1}
.parent-junction,.family-junction{fill:#96a8be;stroke:#fff;stroke-width:1.5}
.family-junction{fill:#8298b2}
.brand-mark{box-shadow:0 6px 14px rgba(29,53,87,.18)}


/* v13 line polish */
.tree-edge.spouse{stroke:#8fa2ba;stroke-width:2.02;opacity:.95}
.tree-edge.parent.trunk{stroke:#a9b9cc;stroke-width:1.94;opacity:.88}
.tree-edge.parent.bus{stroke:#afbdd0;stroke-width:1.82;opacity:.82}
.tree-edge.parent.bus.long-branch{stroke:#bcc8d8;stroke-width:1.6;opacity:.58}
.tree-edge.parent.child-branch{stroke:#abbbce;stroke-width:1.82;opacity:.9}
.tree-edge.is-related{stroke:#6f87a7!important;stroke-width:2.12!important;opacity:1}
.parent-junction{fill:#9aacc0;stroke:#fff;stroke-width:1.7}
.branch-junction{fill:#eef3f8;stroke:#aab9cc;stroke-width:1.5}
.family-junction{fill:#869cb5;stroke:#fff;stroke-width:1.8}


/* v14 final tree routing/layout */
.tree-edge{fill:none;stroke-linecap:round;stroke-linejoin:round;shape-rendering:geometricPrecision;vector-effect:non-scaling-stroke}
.tree-edge.spouse{stroke:#8ea1b9;stroke-width:2.0;opacity:.94}
.tree-edge.parent.trunk{stroke:#a1b1c4;stroke-width:1.9;opacity:.86}
.tree-edge.parent.child-branch{stroke:#acbbcd;stroke-width:1.82;opacity:.88}
.tree-edge.is-related{stroke:#6f87a7!important;stroke-width:2.12!important;opacity:1}
.parent-junction{fill:#93a6bc;stroke:#fff;stroke-width:1.5}
.tree-node-card{box-shadow:0 8px 22px rgba(29,53,87,.055)}
.tree-viewport.is-overview .tree-node-card{box-shadow:none}


/* v15 final family-node routing */
.tree-edge{fill:none;shape-rendering:geometricPrecision;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;transition:stroke .16s ease,stroke-width .16s ease,opacity .16s ease}
.tree-edge.spouse{stroke:#879bb3;stroke-width:2.05;opacity:.95}
.tree-edge.parent.trunk{stroke:#9fb0c4;stroke-width:1.95;opacity:.88}
.tree-edge.parent.child-branch{stroke:#a8b8cb;stroke-width:1.82;opacity:.88}
.tree-edge.is-related{stroke:#6883a5!important;stroke-width:2.15!important;opacity:1}
.family-node{fill:#8297b1;stroke:#fff;stroke-width:1.65}
.family-hub{fill:#9caec2;stroke:#fff;stroke-width:1.5}
.tree-viewport.is-overview .tree-edge.parent.child-branch{opacity:.72}


/* v17 final premium family lines — routing layer only */
:root{
  --tree-family-rail:#a8bacf;
  --tree-parent-line:#afc0d4;
  --tree-parent-soft:#b8c6d7;
  --tree-line-active:#718aaa;
}
.tree-edge{
  fill:none;
  shape-rendering:geometricPrecision;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
  pointer-events:none;
}
.tree-edge.family-rail{stroke:var(--tree-family-rail);stroke-width:2px;opacity:.96}
.tree-edge.parent.trunk{stroke:var(--tree-parent-line);stroke-width:2px;opacity:.92}
.tree-edge.parent.child-branch{stroke:var(--tree-parent-soft);stroke-width:1.95px;opacity:.91}
.tree-edge.is-related{stroke:var(--tree-line-active)!important;stroke-width:2.16px!important;opacity:1!important}
.family-node,.family-hub{opacity:0;pointer-events:none}
.tree-viewport.is-overview .tree-edge.parent.child-branch{opacity:.74}

/* v18 final relationship model: parents -> person; pair -> children */
:root{
  --tree-spouse-v18:#8ea4bd;
  --tree-family-bottom-v18:#a7b9ce;
  --tree-parent-v18:#afc0d4;
  --tree-parent-soft-v18:#b8c6d7;
}
.tree-edge{fill:none;shape-rendering:geometricPrecision;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none}
.tree-edge.spouse{stroke:var(--tree-spouse-v18);stroke-width:2px;opacity:.95}
.tree-edge.family-bottom{stroke:var(--tree-family-bottom-v18);stroke-width:2px;opacity:.96}
.tree-edge.parent.trunk{stroke:var(--tree-parent-v18);stroke-width:1.95px;opacity:.9}
.tree-edge.parent.children-bus{stroke:var(--tree-parent-soft-v18);stroke-width:1.9px;opacity:.88}
.tree-edge.parent.child-drop,.tree-edge.parent.child-branch{stroke:var(--tree-parent-soft-v18);stroke-width:1.9px;opacity:.9}
.tree-edge.is-related{stroke:#718aaa!important;stroke-width:2.14px!important;opacity:1!important}
.tree-viewport.is-overview .tree-edge.parent.child-branch,.tree-viewport.is-overview .tree-edge.parent.child-drop{opacity:.74}

/* v19 family polish: exact pair source, smooth routing, subtle marriage grouping */
:root{
  --tree-spouse-v19:#7f98b5;
  --tree-family-bottom-v19:#a5b8cd;
  --tree-parent-v19:#afc0d4;
  --tree-parent-soft-v19:#b7c6d7;
  --tree-pair-fill-v19:#e4edf7;
  --tree-pair-stroke-v19:#b8cde0;
}
.pair-highlight{
  fill:var(--tree-pair-fill-v19);
  fill-opacity:.82;
  stroke:var(--tree-pair-stroke-v19);
  stroke-width:1.35px;
  stroke-opacity:.98;
  vector-effect:non-scaling-stroke;
  pointer-events:none;
}
.tree-edge{
  fill:none;
  shape-rendering:geometricPrecision;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
  pointer-events:none;
}
.tree-edge.spouse{stroke:var(--tree-spouse-v19);stroke-width:2.6px;opacity:1}
.tree-edge.family-bottom{stroke:var(--tree-family-bottom-v19);stroke-width:2.05px;opacity:.97}
.tree-edge.parent.trunk{stroke:var(--tree-parent-v19);stroke-width:1.95px;opacity:.91}
.tree-edge.parent.child-branch{stroke:var(--tree-parent-soft-v19);stroke-width:1.9px;opacity:.91}
.tree-edge.parent.family-stem{stroke:var(--tree-family-bottom-v19);stroke-width:2.0px;opacity:.96}
.tree-edge.parent.children-bus{stroke:var(--tree-parent-soft-v19);stroke-width:1.88px;opacity:.93}
.tree-edge.is-related{stroke:#6f89aa!important;stroke-width:2.18px!important;opacity:1!important}
.tree-viewport.is-overview .pair-highlight{fill-opacity:.34;stroke-opacity:.5}
.tree-viewport.is-overview .tree-edge.parent.child-branch{opacity:.75}

/* v20 final line cleanup: clearer marriage grouping + calm local child rail */
:root{
  --tree-pair-fill-v20:#e3edf7;
  --tree-pair-stroke-v20:#abc4dc;
  --tree-children-rail-v20:#aebfd2;
}
.pair-highlight{
  fill:var(--tree-pair-fill-v20);
  fill-opacity:.9;
  stroke:var(--tree-pair-stroke-v20);
  stroke-width:1.5px;
  stroke-opacity:.98;
}
.tree-edge.parent.children-rail{
  stroke:var(--tree-children-rail-v20);
  stroke-width:1.9px;
  opacity:.92;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.tree-edge.parent.child-branch{
  stroke-linecap:round;
  stroke-linejoin:round;
}
.tree-viewport.is-overview .pair-highlight{fill-opacity:.5;stroke-opacity:.7}

/* v20.1: one smooth child router for every family size; calmer pair halo outline */
.pair-highlight{stroke-width:1.25px;stroke-opacity:.9}
.tree-edge.parent.child-branch{stroke-linecap:round;stroke-linejoin:round}
