@font-face{font-family:Sky;src:url('../fonts/HelveticaNeueW23forSKY-Reg.woff') format('woff');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Sky;src:url('../fonts/HelveticaNeueW23forSKY-Bd.woff') format('woff');font-weight:700;font-style:normal;font-display:swap}
:root{--green:#3f7f47;--green-dark:#1e442d;--green-pale:#edf6ed;--ink:#10241b;--muted:#6e7d75;--line:#dce7df;--white:#fff;--sand:#d4a84e;--blue:#667da8;--bg:#f6f9f6;--danger:#b94a4a}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Sky,Arial,sans-serif;line-height:1.8}a{text-decoration:none;color:inherit}button,input,textarea,select{font:inherit}button{cursor:pointer}
.app-shell{min-height:100vh}.side-nav{position:fixed;right:0;top:0;bottom:0;width:100px;background:#fff;border-right:1px solid var(--line);z-index:30;display:flex;flex-direction:column;align-items:center;padding:22px 10px;box-shadow:-10px 0 35px rgba(31,68,45,.03)}
.brand{font-weight:700;color:var(--green);text-align:center;line-height:1.1;margin-bottom:30px}.brand-mark{display:block;font-size:22px}.side-nav nav{display:flex;flex-direction:column;gap:10px;width:100%}.side-nav nav a,.side-bottom a{display:flex;flex-direction:column;align-items:center;gap:3px;padding:12px 4px;border-radius:18px;color:#4f6358;font-size:13px}.side-nav nav a span,.side-bottom a span{font-size:17px}.side-nav nav a.active,.side-nav nav a:hover,.side-bottom a:hover{background:var(--green-pale);color:var(--green);font-weight:700}.side-bottom{margin-top:auto;width:100%}
.main-content{margin-right:100px;min-height:calc(100vh - 96px)}
.top-header {
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6vw;
    background: rgba(255,255,255,.76);
    border-bottom: 1px solid rgba(220,231,223,.7);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(14px);
    max-width: 1400px;
    margin: 0 auto;
}
.top-note{color:#496254;font-size:16px}.top-note:before{content:'✦';color:var(--sand);margin-left:9px}.top-action{color:var(--green);font-weight:700}.mobile-brand{display:none;color:var(--green);font-weight:700}
.hero{min-height:590px;padding:30px 7vw 45px;display:grid;grid-template-columns:1fr 1.08fr;gap:50px;align-items:center;background:radial-gradient(circle at 15% 45%,#e8f4e8 0 16%,transparent 45%),linear-gradient(135deg,#fbfdfb,#f0f7f0)}
.hero-copy{padding-right:2vw}.eyebrow{display:inline-flex;align-items:center;gap:8px;color:var(--green);font-weight:700;font-size:15px;margin-bottom:10px}.eyebrow:before{content:'';width:20px;height:2px;background:var(--sand);display:inline-block;border-radius:5px}.hero h1{font-size:clamp(42px,5vw,72px);line-height:1.15;margin:4px 0 22px;letter-spacing:-1px}.hero h1 em{font-style:normal;color:var(--green)}.hero-copy>p{font-size:19px;color:var(--muted);max-width:680px;margin-bottom:28px}.hero-actions{display:flex;gap:12px;flex-wrap:wrap}
.btn{border:0;border-radius:14px;padding:11px 20px;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-weight:700;transition:.2s;min-height:46px}.btn:hover{transform:translateY(-2px)}.btn-primary{background:var(--green);color:#fff;box-shadow:0 12px 25px rgba(63,127,71,.18)}.btn-secondary{background:var(--blue);color:#fff;box-shadow:0 10px 22px rgba(102,125,168,.16)}.btn-soft{background:var(--green-pale);color:var(--green)}.btn-ghost{background:#fff;color:var(--green);border:1px solid var(--line)}.btn-danger{background:#fff0f0;color:var(--danger);border:1px solid #f0cfcf}.btn-lg{padding:14px 24px}.btn-sm{min-height:34px;padding:6px 12px;font-size:13px}
.hero-tree-wrap{display:flex;justify-content:center}.demo-tree{width:min(560px,100%);height:440px;background:#fff;border:1px solid var(--line);border-radius:34px;box-shadow:0 25px 70px rgba(34,68,45,.10);position:relative;overflow:hidden}.demo-tree:before{content:'';position:absolute;inset:20px;background:radial-gradient(circle,#edf7ee 1px,transparent 1px);background-size:18px 18px;opacity:.65}.demo-person{position:absolute;width:126px;padding:10px 8px;background:#fff;border:1px solid #d8e7da;border-radius:18px;text-align:center;z-index:2;box-shadow:0 8px 20px rgba(20,50,30,.05)}.demo-person .avatar{width:52px;height:52px;border-radius:50%;background:#eef6ed;margin:0 auto 5px;display:grid;place-items:center;font-size:27px}.demo-person strong{display:block;font-size:15px}.demo-person small{color:#7b8a82}.root-person{top:28px;left:calc(50% - 63px)}.p1{top:170px;right:30px}.p2{top:170px;left:calc(50% - 63px)}.p3{top:170px;left:30px}.p4{top:310px;right:35px}.p5{top:310px;left:calc(50% - 63px)}.p6{top:310px;left:35px}.tree-line{position:absolute;background:#b6d0ba;z-index:1}.v1{width:2px;height:145px;top:105px;left:50%}.h1{height:2px;left:93px;right:93px;top:240px}.h2{height:2px;left:93px;right:93px;top:375px}
.benefits{margin:-25px 7vw 10px;position:relative;z-index:3;background:#fff;border:1px solid var(--line);border-radius:28px;display:grid;grid-template-columns:repeat(3,1fr);box-shadow:0 18px 45px rgba(35,70,48,.08)}.benefits>div{padding:15px;text-align:center;border-left:1px solid var(--line)}.benefits>div:last-child{border-left:0}.benefit-icon{font-size:23px;color:var(--sand)}.benefits h3{margin:4px 0 0;font-size:18px}.benefits p{margin:0;color:#9aaba2;font-size:13px}
.home-intro{margin:75px 7vw;padding:45px;background:#fff;border:1px solid var(--line);border-radius:30px;display:flex;justify-content:space-between;align-items:end;gap:30px}.home-intro h2{font-size:40px;margin:0}.home-intro p{color:var(--muted);max-width:700px}.text-link{color:var(--green);font-weight:700}
.site-footer{margin-right:100px;background:var(--green-dark);color:#fff}.footer-inner{min-height:88px;padding:22px 6vw;display:flex;align-items:center;justify-content:space-between;gap:25px}.footer-links{display:flex;gap:28px}.footer-links a{opacity:.95;font-size:14px;}.footer-links a:hover{color:#dcefdc}
.auth-page{min-height:calc(100vh - 88px);display:grid;place-items:center;padding:50px 20px;background:radial-gradient(circle at 80% 20%,#e8f3e8,transparent 40%)}.auth-card{width:min(520px,100%);background:#fff;border:1px solid var(--line);border-radius:28px;padding:42px;box-shadow:0 20px 55px rgba(30,68,45,.08)}.auth-card h1{font-size:42px;margin:8px 0}.muted{color:var(--muted)}.back-link{display:block;color:var(--green);margin-bottom:30px}.form-grid{display:grid;gap:14px}.form-grid label{display:grid;gap:6px;color:#51655a;font-weight:700}.form-grid input,.form-grid textarea,.form-grid select{width:100%;border:1px solid #d7e2da;background:#fbfdfb;border-radius:13px;padding:12px 14px;outline:0;color:var(--ink)}.form-grid input:focus,.form-grid textarea:focus,.form-grid select:focus{border-color:#9fbea4;box-shadow:0 0 0 3px #edf5ed}.form-grid textarea{resize:vertical}.form-error,.flash.error{background:#fff1f1;color:#a33d3d;border:1px solid #f2d0d0;border-radius:12px;padding:10px 14px;margin:12px 0}.flash{margin:15px 6vw;padding:12px 16px;border-radius:12px}.flash.success{background:#edf7ee;color:var(--green)}.captcha{display:flex;align-items:center;justify-content:space-between;gap:15px;color:#5d6d65}.captcha input{max-width:160px}.form-foot{text-align:center;color:var(--muted);margin-top:5px}.form-foot a{color:var(--green);font-weight:700}
.page-head,.content-page,.tree-editor-head{padding:55px 7vw 25px}.page-head h1,.content-page h1,.tree-editor-head h1{font-size:48px;line-height:1.2;margin:5px 0}.page-head p,.content-page>p{color:var(--muted);font-size:18px}.account-grid{padding:0 7vw 70px;display:grid;grid-template-columns:1.3fr .9fr;gap:22px}.panel{background:#fff;border:1px solid var(--line);border-radius:26px;padding:28px;box-shadow:0 12px 35px rgba(30,68,45,.05)}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.panel h2{margin:0;font-size:25px}.panel-head p{margin:2px 0;color:var(--muted)}.tree-row{padding:16px 0;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:15px}.tree-row>div:first-child{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.status{display:inline-block;border-radius:20px;padding:2px 10px;font-size:12px}.status.public{background:#edf6ed;color:var(--green)}.status.private{background:#f0f2f1;color:#69766f}.row-actions{display:flex;gap:7px;align-items:center}.icon-btn{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;border:0}.icon-btn.danger{background:#fff0f0;color:var(--danger)}.create-tree-form{border-top:1px solid var(--line);padding-top:18px;margin-top:10px;display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center}.create-tree-form input{border:1px solid var(--line);border-radius:12px;padding:11px 13px}.check{display:flex;align-items:center;gap:8px;color:#617168;font-size:14px}.check input{accent-color:var(--green)}.empty-state{text-align:center;padding:35px;color:var(--muted)}.empty-state div{font-size:35px;color:var(--sand)}.empty-state h3{color:var(--ink);margin:5px}.quick-links{margin-top:25px;border-top:1px solid var(--line);display:grid}.quick-links a{padding:15px 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;color:var(--green);font-weight:700}
.content-page{max-width:900px;margin:auto;padding-bottom:100px}.content-page p{font-size:18px;color:var(--muted)}.content-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-top:35px}.content-cards>div{background:#fff;border:1px solid var(--line);border-radius:20px;padding:25px}.content-cards b{color:var(--green);font-size:20px}.contact-card{display:flex;justify-content:space-between;background:#fff;border:1px solid var(--line);border-radius:20px;padding:20px;color:var(--green);font-weight:700}
.tree-editor-head{display:flex;justify-content:space-between;align-items:end;gap:20px}.tree-toolbar{display:flex;gap:10px}.editor-layout{padding:0 7vw 60px;display:grid;grid-template-columns:260px 1fr;gap:18px}.editor-panel{background:#fff;border:1px solid var(--line);border-radius:24px;padding:20px;height:max-content}.editor-panel h3{margin-top:0}.layout-switch{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:22px}.layout-switch span{grid-column:1/-1;color:var(--muted);font-size:14px}.layout-switch button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:8px;color:#617168}.layout-switch button.active{background:var(--green-pale);border-color:#c7ddca;color:var(--green);font-weight:700}.tip{margin-top:20px;background:#f6f9f6;border-radius:14px;padding:12px;color:#6b7b72;font-size:13px}.tree-canvas{height:680px;min-width:760px;background:#fff;border:1px solid var(--line);border-radius:26px;position:relative;overflow:auto;background-image:radial-gradient(#dfe9e2 1px,transparent 1px);background-size:20px 20px}.tree-grid{position:absolute;inset:0}.tree-node{position:absolute;width:145px;z-index:5;user-select:none;touch-action:none}.node-avatar{display:grid;place-items:center;width:76px;height:76px;border:5px solid #fff;border-radius:50%;background:#edf6ed;box-shadow:0 7px 20px rgba(30,68,45,.15);margin:auto;overflow:hidden}.node-avatar img{width:100%;height:100%;object-fit:cover}.node-avatar span{font-size:34px}.node-name{display:block;margin:6px auto 0;border:0;background:#fff;border-radius:12px;padding:5px 10px;box-shadow:0 5px 15px rgba(30,68,45,.08);font-weight:700;color:var(--ink);max-width:145px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tree-node.dragging{opacity:.75}.tree-node.dragging .node-avatar{box-shadow:0 15px 35px rgba(63,127,71,.25)}#treeLines{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}.canvas-empty{position:absolute;inset:0;display:grid;place-content:center;text-align:center;color:var(--muted);z-index:10}.canvas-empty div{font-size:45px;color:var(--sand)}.modal{display:none;position:fixed;inset:0;background:rgba(15,35,25,.38);backdrop-filter:blur(4px);z-index:100;padding:20px;align-items:center;justify-content:center}.modal.open{display:flex}.modal-box{width:min(620px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:26px;padding:30px;position:relative;box-shadow:0 30px 80px rgba(0,0,0,.18)}.modal-close{position:absolute;left:18px;top:15px;border:0;background:#f2f5f3;width:36px;height:36px;border-radius:50%;font-size:23px;color:#65736b}.modal-actions{display:flex;gap:10px}.delete-form{margin-top:12px}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.admin-login{min-height:100vh;display:grid;place-items:center;background:var(--bg)}.admin-body{background:var(--bg);min-height:100vh}.admin-top{height:74px;background:var(--green-dark);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 6vw}.admin-top nav{display:flex;gap:22px}.admin-top nav a{color:#e8f2e9}.admin-main{padding:50px 7vw}.admin-main h1{font-size:44px}.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.stats-grid>div{background:#fff;border:1px solid var(--line);border-radius:22px;padding:25px}.stats-grid b{display:block;font-size:42px;color:var(--green)}.stats-grid span{color:var(--muted)}.admin-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:22px}.admin-cards a{background:#fff;border:1px solid var(--line);border-radius:22px;padding:25px;display:grid;gap:6px}.admin-cards b{font-size:20px}.admin-cards span{color:var(--muted)}.admin-table{background:#fff;border:1px solid var(--line);border-radius:20px;overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:14px;text-align:right;border-bottom:1px solid var(--line);white-space:nowrap}th{color:#607067;background:#f8faf8}
@media(max-width:1050px){.hero{grid-template-columns:1fr}.hero-copy{padding:0}.account-grid{grid-template-columns:1fr}.editor-layout{grid-template-columns:1fr}.editor-panel{order:2}.tree-canvas{min-width:680px}.content-cards{grid-template-columns:1fr}.create-tree-form{grid-template-columns:1fr}.tree-editor-head{align-items:flex-start;flex-direction:column}}
@media(max-width:720px){.side-nav{position:fixed;top:auto;bottom:0;right:0;left:0;width:100%;height:70px;padding:6px 10px;flex-direction:row;justify-content:center;border-top:1px solid var(--line);border-right:0;box-shadow:0 -10px 30px rgba(30,68,45,.08)}.brand,.side-bottom{display:none}.side-nav nav{flex-direction:row;justify-content:space-around;gap:5px}.side-nav nav a{padding:4px 15px;border-radius:14px}.side-nav nav a span{font-size:15px}.main-content{margin-right:0;margin-bottom:70px}.site-footer{margin-right:0;margin-bottom:70px}.top-header{height:68px;padding:0 18px}.mobile-brand{display:block}.top-note{font-size:12px}.top-action{font-size:14px}.hero{padding:40px 20px 45px;gap:30px;min-height:auto}.hero h1{font-size:42px}.hero-copy>p{font-size:17px}.hero-actions .btn{width:100%}.demo-tree{height:390px;border-radius:24px}.demo-person{width:106px;padding:7px}.demo-person .avatar{width:45px;height:45px}.root-person{left:calc(50% - 53px)}.p1{right:10px}.p2{left:calc(50% - 53px)}.p3{left:10px}.p4{right:10px}.p5{left:calc(50% - 53px)}.p6{left:10px}.benefits{margin:0 20px;grid-template-columns:1fr}.benefits>div{border-left:0;border-bottom:1px solid var(--line)}.benefits>div:last-child{border-bottom:0}.home-intro{margin:35px 20px;padding:25px;display:block}.home-intro h2{font-size:32px}.page-head,.content-page,.tree-editor-head{padding:35px 20px 20px}.page-head h1,.content-page h1,.tree-editor-head h1{font-size:36px}.account-grid,.editor-layout{padding-left:20px;padding-right:20px}.panel{padding:20px}.tree-row{align-items:flex-start;flex-direction:column}.row-actions{width:100%}.row-actions .btn{flex:1}.auth-page{padding:30px 16px}.auth-card{padding:28px 20px;border-radius:22px}.auth-card h1{font-size:36px}.footer-inner{padding:22px 20px;flex-direction:column-reverse;align-items:stretch;text-align:center}.footer-links{justify-content:center;flex-wrap:wrap;gap:18px}.editor-layout{overflow:hidden}.tree-canvas{height:600px;min-width:620px}.tree-editor-head{padding-bottom:15px}.tree-toolbar{width:100%}.tree-toolbar .btn{flex:1}.two-col{grid-template-columns:1fr}.modal-box{padding:24px 18px}.admin-top{height:auto;min-height:74px;padding:15px 20px;gap:10px;align-items:flex-start;flex-direction:column}.admin-top nav{gap:12px;flex-wrap:wrap;font-size:13px}.admin-main{padding:30px 20px}.stats-grid,.admin-cards{grid-template-columns:1fr}}

html[data-tree-layout=free] .tree-node{width:185px}html[data-tree-layout=free] .node-avatar{width:58px;height:58px;float:right;margin:0 0 0 8px}html[data-tree-layout=free] .node-name{min-height:58px;display:flex;align-items:center;justify-content:center;margin:0;max-width:185px;padding:8px 12px;border:1px solid var(--line);box-shadow:0 7px 18px rgba(30,68,45,.08)}html[data-tree-layout=free] .tree-node:after{content:'';display:block;clear:both}
.public-tree-wrap{padding:0 7vw 80px}.public-canvas{min-height:700px;height:700px}.person-details{color:var(--muted)}.person-details>p{background:var(--bg);border-radius:14px;padding:15px}.person-details .two-col>div{background:var(--bg);border-radius:14px;padding:12px;display:grid;gap:2px}.person-details b{color:var(--ink)}

/* Home refinement v3 */
.side-nav{box-shadow:-18px 0 42px rgba(31,68,45,.13)}
.top-action-btn{display:inline-flex;align-items:center;justify-content:center;min-width:88px;min-height:42px;padding:8px 18px;border-radius:13px;background:#fff;border:1px solid var(--line);box-shadow:0 8px 22px rgba(30,68,45,.07);transition:.2s}
.top-action-btn:hover{background:var(--green-pale);border-color:#c7ddca;transform:translateY(-1px)}
.memory-banner{display:flex;align-items:center;gap:12px;width:max-content;max-width:100%;margin-bottom:22px;padding:10px 16px;border:1px solid #e2e8df;border-radius:16px;background:rgba(255,255,255,.82);box-shadow:0 10px 25px rgba(30,68,45,.06)}
.memory-banner>span{width:31px;height:31px;display:grid;place-items:center;border-radius:10px;background:#fbf3df;color:var(--sand);font-size:16px}
.memory-banner strong{color:var(--green);font-size:16px;line-height:1.2}
.memory-banner small{color:#87958d;font-size:12px;border-right:1px solid #dfe7e1;padding-right:12px}
.hero h1{font-size:clamp(38px,4.25vw,61px);margin-top:0}
.hero-tree-wrap{align-self:center}
.demo-tree-hierarchy{height:440px}
.demo-tree-hierarchy .root-person{top:28px}
.demo-tree-hierarchy .p1,.demo-tree-hierarchy .p2,.demo-tree-hierarchy .p3{top:170px}
.demo-tree-hierarchy .p4,.demo-tree-hierarchy .p5,.demo-tree-hierarchy .p6{top:310px}
.site-footer{margin-right:0;width:100%;position:relative;z-index:1}
.footer-inner {
    direction: ltr;
    padding-right: 120px;
    max-width: 1400px;
    margin: 0 auto;
}
.footer-inner .copyright{direction:rtl;text-align:left;font-size:14px;}
.footer-links{direction:rtl}
@media(max-width:720px){
  .top-action-btn{min-width:76px;min-height:38px;padding:6px 14px;border-radius:11px}
  .memory-banner{width:100%;justify-content:flex-start;margin-bottom:18px;padding:9px 12px}
  .memory-banner small{display:none}
  .hero h1{font-size:38px;line-height:1.18}
  .site-footer{margin-bottom:70px}
  .footer-inner{direction:rtl;padding:20px;align-items:center}
  .footer-inner .copyright{text-align:center;order:2}
  .footer-links{order:1}
}

/* Hero family tree — visual reference treatment */
.hero-tree-wrap{min-height:560px;align-items:center;position:relative}
.hero-tree-art{width:min(650px,100%);height:560px;position:relative;isolation:isolate}
.hero-tree-art>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block;z-index:0;filter:drop-shadow(0 22px 24px rgba(64,72,44,.10))}
.hero-tree-art .demo-person{width:112px;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;text-align:center;z-index:2}
.hero-tree-art .demo-person .avatar{width:74px;height:74px;border:6px solid rgba(255,255,255,.96);background:#eef7eb;margin:0 auto 4px;border-radius:50%;font-size:38px;box-shadow:0 8px 20px rgba(36,70,43,.18)}
.hero-tree-art .demo-person strong{display:block;background:rgba(255,255,255,.94);border-radius:0 0 14px 14px;padding:4px 7px 1px;font-size:14px;box-shadow:0 7px 18px rgba(35,60,40,.10)}
.hero-tree-art .demo-person small{display:block;background:rgba(255,255,255,.94);border-radius:0 0 12px 12px;color:#74847b;font-size:11px;padding:0 7px 4px;box-shadow:0 7px 18px rgba(35,60,40,.10)}
.hero-tree-art .root-person{top:105px;left:calc(50% - 56px)}
.hero-tree-art .p1{top:225px;left:9%}
.hero-tree-art .p2{top:218px;left:calc(50% - 56px)}
.hero-tree-art .p3{top:222px;right:8%}
.hero-tree-art .p4{top:360px;left:18%}
.hero-tree-art .p5{top:365px;left:calc(50% - 56px)}
.hero-tree-art .p6{top:365px;right:18%}
.login-icon{display:inline-grid;place-items:center;width:20px;height:20px;font-size:19px;line-height:1;margin-left:4px}
.top-action-btn{gap:6px}
@media(max-width:1050px){
  .hero-tree-wrap{min-height:500px}
  .hero-tree-art{height:500px}
}
@media(max-width:720px){
  .hero-tree-wrap{min-height:430px;margin-top:0}
  .hero-tree-art{height:430px;width:100%;max-width:520px}
  .hero-tree-art .demo-person{width:86px}
  .hero-tree-art .demo-person .avatar{width:58px;height:58px;border-width:5px;font-size:30px}
  .hero-tree-art .demo-person strong{font-size:11px;padding-top:2px}
  .hero-tree-art .demo-person small{font-size:9px;padding-bottom:3px}
  .hero-tree-art .root-person{top:72px;left:calc(50% - 43px)}
  .hero-tree-art .p1{top:172px;left:2%}
  .hero-tree-art .p2{top:168px;left:calc(50% - 43px)}
  .hero-tree-art .p3{top:172px;right:2%}
  .hero-tree-art .p4{top:282px;left:8%}
  .hero-tree-art .p5{top:288px;left:calc(50% - 43px)}
  .hero-tree-art .p6{top:282px;right:8%}
}

/* Family tree hero — handcrafted CSS tree, no image asset */
.hero-tree-wrap{min-height:560px;display:flex;align-items:center;justify-content:center;position:relative}
.hero-tree-art{width:min(650px,100%);height:560px;position:relative;isolation:isolate;overflow:visible}
.tree-ground{position:absolute;left:13%;right:13%;bottom:38px;height:42px;border-radius:50%;background:radial-gradient(ellipse,#d8dfbd 0%,rgba(216,223,189,.55) 42%,transparent 72%);filter:blur(1px);z-index:0}
.tree-crown{position:absolute;left:7%;right:7%;top:28px;height:300px;z-index:0;filter:drop-shadow(0 18px 18px rgba(50,90,45,.12))}
.crown-leaf{position:absolute;display:block;border-radius:52% 48% 48% 52%;background:radial-gradient(circle at 34% 28%,#d9e9b8 0,#a7c98e 25%,#65965c 67%,#3e7147 100%);box-shadow:inset -10px -12px 18px rgba(48,100,48,.16),inset 8px 7px 14px rgba(255,255,255,.18)}
.c1{width:180px;height:165px;left:7%;top:52px;transform:rotate(-13deg)}
.c2{width:210px;height:190px;left:24%;top:10px;transform:rotate(7deg)}
.c3{width:175px;height:160px;right:8%;top:48px;transform:rotate(14deg)}
.c4{width:185px;height:165px;left:0;top:132px;transform:rotate(9deg)}
.c5{width:230px;height:190px;left:23%;top:108px;transform:rotate(-4deg)}
.c6{width:190px;height:170px;right:0;top:135px;transform:rotate(-10deg)}
.c7{width:145px;height:130px;left:12%;top:205px;transform:rotate(-18deg)}
.c8{width:170px;height:145px;left:42%;top:190px;transform:rotate(8deg)}
.c9{width:145px;height:130px;right:11%;top:210px;transform:rotate(18deg)}
.tree-trunk{position:absolute;left:50%;bottom:54px;width:86px;height:305px;transform:translateX(-50%);border-radius:46% 54% 18% 18% / 12% 12% 8% 8%;background:linear-gradient(90deg,#5a2f18 0%,#8b5127 24%,#a96935 50%,#75401f 76%,#4d2917 100%);box-shadow:inset 10px 0 10px rgba(255,210,145,.12),inset -12px 0 14px rgba(50,20,8,.2),0 12px 20px rgba(55,35,20,.16);z-index:1}
.tree-trunk:before,.tree-trunk:after{content:'';position:absolute;background:inherit;transform-origin:bottom center;border-radius:100% 10% 30% 20%}
.tree-trunk:before{width:34px;height:150px;left:-13px;top:80px;transform:rotate(32deg)}
.tree-trunk:after{width:38px;height:165px;right:-15px;top:62px;transform:rotate(-31deg)}
.tree-branch{position:absolute;height:25px;border-radius:999px;background:linear-gradient(180deg,#8f572c,#5a3019);z-index:1;transform-origin:left center;box-shadow:inset 0 4px 5px rgba(255,210,145,.13)}
.branch-1{width:175px;left:43%;top:225px;transform:rotate(-148deg)}
.branch-2{width:165px;left:48%;top:205px;transform:rotate(-34deg)}
.branch-3{width:145px;left:47%;top:285px;transform:rotate(-158deg)}
.branch-4{width:140px;left:52%;top:280px;transform:rotate(-25deg)}
.branch-5{width:115px;left:46%;top:350px;transform:rotate(-164deg)}
.branch-6{width:120px;left:51%;top:350px;transform:rotate(-17deg)}
.tree-leaves{position:absolute;width:92px;height:48px;border-radius:90% 12% 90% 12%;background:linear-gradient(135deg,#82ad58,#4b824b);z-index:2;box-shadow:inset 8px 7px 9px rgba(255,255,255,.18),0 5px 9px rgba(48,90,45,.12)}
.tree-leaves:before,.tree-leaves:after{content:'';position:absolute;width:74px;height:38px;border-radius:90% 12% 90% 12%;background:linear-gradient(135deg,#9bc36e,#568d4d);top:-18px}
.tree-leaves:before{left:-24px;transform:rotate(-28deg)}
.tree-leaves:after{right:-26px;transform:rotate(28deg)}
.leaves-1{left:12%;top:190px;transform:rotate(-28deg)}
.leaves-2{right:10%;top:185px;transform:rotate(25deg)}
.leaves-3{left:23%;top:315px;transform:rotate(-12deg)}
.leaves-4{right:22%;top:318px;transform:rotate(14deg)}
.hero-tree-art .demo-person{position:absolute;width:112px;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;text-align:center;z-index:5}
.hero-tree-art .demo-person .avatar{width:74px;height:74px;border:6px solid rgba(255,255,255,.98);background:#eef7eb;margin:0 auto 4px;border-radius:50%;font-size:38px;box-shadow:0 9px 22px rgba(36,70,43,.22),0 0 0 2px rgba(74,126,75,.10)}
.hero-tree-art .demo-person strong{display:block;background:rgba(255,255,255,.94);border-radius:12px;padding:4px 7px 1px;font-size:14px;box-shadow:0 7px 18px rgba(35,60,40,.12);white-space:nowrap}
.hero-tree-art .demo-person small{display:block;background:rgba(255,255,255,.94);border-radius:0 0 12px 12px;color:#74847b;font-size:11px;padding:0 7px 4px;box-shadow:0 7px 18px rgba(35,60,40,.10)}
.hero-tree-art .root-person{top:88px;left:calc(50% - 56px)}
.hero-tree-art .p1{top:205px;left:11%}
.hero-tree-art .p2{top:198px;left:calc(50% - 56px)}
.hero-tree-art .p3{top:205px;right:10%}
.hero-tree-art .p4{top:335px;left:20%}
.hero-tree-art .p5{top:340px;left:calc(50% - 56px)}
.hero-tree-art .p6{top:335px;right:20%}
@media(max-width:1050px){.hero-tree-wrap{min-height:500px}.hero-tree-art{height:500px}.tree-crown{transform:scale(.92);transform-origin:top center}.tree-trunk{bottom:38px;transform:translateX(-50%) scale(.92);transform-origin:bottom center}.tree-branch,.tree-leaves{transform-origin:left center}.hero-tree-art .root-person{top:78px}.hero-tree-art .p1,.hero-tree-art .p2,.hero-tree-art .p3{top:188px}.hero-tree-art .p4,.hero-tree-art .p5,.hero-tree-art .p6{top:310px}}
@media(max-width:720px){.hero-tree-wrap{min-height:430px}.hero-tree-art{height:430px;max-width:520px}.tree-crown{top:22px;height:245px;transform:scale(.72);transform-origin:top center}.tree-trunk{height:240px;width:68px;bottom:42px}.tree-branch{height:18px}.branch-1{width:125px}.branch-2{width:120px}.branch-3{width:105px}.branch-4{width:105px}.branch-5{width:90px}.branch-6{width:90px}.tree-leaves{transform:scale(.7)}.hero-tree-art .demo-person{width:86px}.hero-tree-art .demo-person .avatar{width:58px;height:58px;border-width:5px;font-size:30px}.hero-tree-art .demo-person strong{font-size:11px;padding-top:2px}.hero-tree-art .demo-person small{font-size:9px;padding-bottom:3px}.hero-tree-art .root-person{top:60px;left:calc(50% - 43px)}.hero-tree-art .p1{top:150px;left:2%}.hero-tree-art .p2{top:145px;left:calc(50% - 43px)}.hero-tree-art .p3{top:150px;right:2%}.hero-tree-art .p4{top:265px;left:7%}.hero-tree-art .p5{top:270px;left:calc(50% - 43px)}.hero-tree-art .p6{top:265px;right:7%}}

/* ===== Family Tree visual refinement v2 ===== */
.brand-mark{width:48px;height:48px;margin:0 auto 8px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(145deg,#f3f9f1,#e6f1e5);border:1px solid #d7e7d8;color:var(--green);box-shadow:0 8px 20px rgba(35,78,45,.08)}
.brand-mark svg,.nav-icon,.mobile-brand svg,.top-action-btn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.brand-mark svg{width:30px;height:30px}
.side-nav nav a,.side-bottom a{gap:5px}
.side-nav nav a .nav-icon,.side-bottom a .nav-icon{display:block}
.top-action-btn{display:inline-flex;align-items:center;gap:7px;padding:10px 16px;border:1px solid var(--line);border-radius:15px;background:#fff;box-shadow:0 7px 18px rgba(30,68,45,.04)}
.mobile-brand{align-items:center;gap:7px}

.memory-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:10px;background:#fff8e8;color:var(--sand);font-size:15px}
.memory-banner{display:inline-flex;align-items:center;gap:10px;padding:7px 10px 7px 14px;border:1px solid var(--line);background:rgba(255,255,255,.78);border-radius:15px;box-shadow:0 7px 20px rgba(30,68,45,.04)}
.memory-banner strong{color:var(--green);font-size:15px}
.memory-banner small{padding-right:10px;border-right:1px solid var(--line);color:var(--muted)}

.hero-tree-wrap{min-height:500px}
.hero-family-scene{width:min(620px,100%);height:500px;position:relative}
.hero-tree-glow{position:absolute;inset:35px 25px 30px;border-radius:50%;background:radial-gradient(circle at 50% 45%,rgba(224,239,207,.95),rgba(224,239,207,.42) 38%,transparent 70%);filter:blur(3px)}
.hero-branch-svg{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 16px 20px rgba(53,92,49,.12))}
.hero-person{position:absolute;width:118px;text-align:center;z-index:4}
.hero-avatar{width:58px;height:58px;margin:0 auto 5px;display:grid;place-items:center;border-radius:50%;background:#fff;border:4px solid #fff;box-shadow:0 7px 20px rgba(35,70,43,.16),0 0 0 1px #d7e6d9;color:var(--green)}
.hero-avatar svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.hero-person strong{display:block;background:rgba(255,255,255,.96);border:1px solid #dfe9df;border-radius:10px;padding:3px 8px 1px;font-size:13px;box-shadow:0 5px 15px rgba(35,60,40,.08);white-space:nowrap}
.hero-person small{display:block;color:#829188;font-size:10px}
.hp-root{top:38px;left:calc(50% - 59px)}
.hp-left{top:180px;left:8%}
.hp-right{top:180px;right:8%}
.hp-child1{top:325px;left:20%}
.hp-child2{top:330px;left:calc(50% - 59px)}
.hp-child3{top:325px;right:20%}

.benefit-icon{width:34px;height:34px;margin:auto;display:grid;place-items:center;border-radius:11px;background:#fff7e5;color:var(--sand);font-size:17px}
.benefits h3{font-size:17px}

.tree-canvas{min-height:700px;height:700px;min-width:760px;overflow:auto;background-color:#fbfdfb;background-image:radial-gradient(circle,#dce8df 1px,transparent 1px);background-size:24px 24px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.7),0 18px 45px rgba(30,68,45,.06)}
.tree-canvas:before{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(255,255,255,.58),transparent 22%,transparent 78%,rgba(235,244,235,.4));z-index:0}
#treeLines{z-index:2;overflow:visible}
#treeLines .parent-line{stroke:#91b99a;stroke-width:2.5}
#treeLines .parent-rail{stroke:#a8c6ad;stroke-width:2.2}
#treeLines .spouse-line{stroke:#d2ae62;stroke-width:2.4;stroke-dasharray:5 4}
.tree-grid{z-index:0}
.tree-node{width:150px;z-index:5;text-align:center}
.tree-node:after{content:'';position:absolute;left:50%;bottom:-12px;width:8px;height:8px;border-radius:50%;background:#d7e7d9;transform:translateX(-50%);box-shadow:0 0 0 4px rgba(255,255,255,.8)}
.node-avatar{width:70px;height:70px;border:4px solid #fff;background:linear-gradient(145deg,#f1f8ef,#e5f1e4);box-shadow:0 8px 22px rgba(30,68,45,.14),0 0 0 1px #d7e6d9}
.node-avatar img{border-radius:50%}
.node-avatar .person-symbol{display:grid;place-items:center;color:var(--green)}
.node-avatar .person-symbol svg{width:36px;height:36px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.node-name{margin:7px auto 0;max-width:150px;min-width:105px;padding:5px 11px;background:#fff;border:1px solid #dce7df;border-radius:11px;box-shadow:0 5px 17px rgba(30,68,45,.07);font-size:14px;line-height:1.25}
.node-date{display:block;color:#829188;font-size:10px;line-height:1.3;margin-top:2px}
.editor-natural-art{position:absolute;inset:0;z-index:1;pointer-events:none;display:flex;align-items:flex-start;justify-content:center;overflow:hidden}
.editor-natural-art img{display:block;width:min(92%,760px);height:auto;max-height:none;object-fit:contain;user-select:none;-webkit-user-drag:none;filter:drop-shadow(0 18px 22px rgba(70,45,22,.08));opacity:.98}
.tree-layout-natural #treeLines{z-index:3}
.tree-layout-natural .tree-grid{z-index:0}
.tree-layout-natural .tree-node{cursor:grab}
.tree-layout-natural .tree-node:before{content:'';position:absolute;top:-10px;left:50%;width:5px;height:5px;border-radius:50%;background:var(--green);transform:translateX(-50%);opacity:.45}
.tree-legend{display:grid;gap:8px;margin-top:18px;padding-top:17px;border-top:1px solid var(--line);color:#718178;font-size:12px}
.tree-legend>div{display:flex;align-items:center;gap:8px}
.legend-line{display:inline-block;width:26px;height:2px;background:#91b99a}
.legend-line.spouse{height:0;border-top:2px dashed #d2ae62}
.empty-tree-icon{width:58px;height:58px;margin:auto;display:grid;place-items:center;border-radius:18px;background:#edf6ed;color:var(--green)}
.empty-tree-icon svg{width:34px;height:34px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.canvas-empty{background:rgba(251,253,251,.82);backdrop-filter:blur(2px)}
.canvas-empty h3{margin:8px 0 0;color:var(--ink)}
.canvas-empty p{margin:0 0 14px}

.captcha{background:#f7faf7;border:1px solid var(--line);border-radius:14px;padding:10px 12px}
.captcha-question{color:#5d6d65}
.captcha-question b{color:var(--green);font-size:18px}
.captcha input{max-width:110px;text-align:center;font-weight:700}

@media(max-width:1050px){
  .hero-tree-wrap{min-height:470px}
  .hero-family-scene{height:470px}
  .hp-root{top:28px}.hp-left,.hp-right{top:165px}.hp-child1,.hp-child2,.hp-child3{top:305px}
}
@media(max-width:720px){
  .mobile-brand{display:flex}
  .top-action-btn{padding:8px 11px}
  .hero-family-scene{height:430px}
  .hero-tree-wrap{min-height:430px}
  .hero-person{width:92px}
  .hero-avatar{width:50px;height:50px}
  .hero-avatar svg{width:26px;height:26px}
  .hero-person strong{font-size:11px}
  .hp-root{top:25px;left:calc(50% - 46px)}
  .hp-left{top:155px;left:3%}.hp-right{top:155px;right:3%}
  .hp-child1{top:292px;left:10%}.hp-child2{top:298px;left:calc(50% - 46px)}.hp-child3{top:292px;right:10%}
  .tree-canvas{min-width:720px;height:650px;min-height:650px}
  .tree-editor-head{padding-top:30px}
}


/* ===== Family Tree visual polish v3 ===== */
:root{--green:#3f8750;--green-deep:#245b36;--green-pale:#edf7ee;--sand:#c79a3b;--ink:#173024}
.side-nav{width:86px;padding:20px 8px;box-shadow:-10px 0 30px rgba(36,91,54,.07);border-right:1px solid #e3ece5}
.brand{margin-bottom:34px;font-size:12px}
.brand-mark{width:42px;height:42px;margin-bottom:7px;border-radius:14px;background:#f1f8f1;border-color:#d9e9db;box-shadow:none}
.brand-mark svg{width:25px;height:25px}
.side-nav nav{gap:6px}
.side-nav nav a,.side-bottom a{min-height:72px;padding:9px 3px;border-radius:16px;gap:6px;font-size:12px;font-weight:500;color:#607268}
.side-nav nav a span,.side-bottom a span{font-size:13px}
.side-nav nav a .nav-icon,.side-bottom a .nav-icon{width:20px;height:20px}
.side-nav nav a.active{background:#edf7ee;color:var(--green);font-weight:700}
.side-nav nav a.active .nav-icon{stroke-width:2}
.main-content{margin-right:86px}
.top-action-btn svg{width:18px;height:18px}
.auth-page{min-height:calc(100vh - 88px);padding:44px 20px;background:radial-gradient(circle at 78% 18%,#e8f4e8 0,rgba(232,244,232,.55) 24%,transparent 52%)}
.auth-card{width:min(500px,100%);border-radius:30px;padding:38px 42px;box-shadow:0 22px 60px rgba(36,91,54,.09)}
.verification-card{text-align:center}
.verification-icon{width:82px;height:82px;margin:0 auto 20px;display:grid;place-items:center;border-radius:25px;background:linear-gradient(145deg,#eef8ef,#e2f1e4);border:1px solid #d7e7d9;color:var(--green);box-shadow:0 12px 28px rgba(36,91,54,.09)}
.verification-icon svg{width:40px;height:40px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.verification-card h1{font-size:36px;line-height:1.2;margin:8px 0 12px;color:var(--ink)}
.verification-card .muted{font-size:16px;line-height:1.8;margin:0 auto 6px;max-width:390px}
.verification-email{display:inline-block;margin:0 auto 18px;padding:7px 13px;border-radius:10px;background:#f4f8f4;color:var(--green-deep);font-weight:700;direction:ltr}
.verification-form{display:grid;gap:10px;text-align:right;margin-top:6px}
.verification-form label{color:#53665a;font-weight:700;font-size:14px}
.verification-code{width:100%;height:64px;border:1px solid #d5e3d8;border-radius:15px;background:#fbfdfb;text-align:center;direction:ltr;letter-spacing:12px;padding:8px 12px 8px 20px;font-size:30px;font-weight:700;color:var(--green-deep);outline:none}
.verification-code:focus{border-color:#9dbfa3;box-shadow:0 0 0 4px #edf6ee}
.verification-code::placeholder{color:#c9d6cc;letter-spacing:10px}
.resend-form{margin-top:14px}
.resend-link{border:0;background:none;color:var(--green);font:inherit;font-weight:700;cursor:pointer;padding:7px}
.resend-link:hover{text-decoration:underline}
.form-success{background:#edf7ee;color:var(--green-deep);border:1px solid #d2e7d5;border-radius:12px;padding:10px 13px;margin:12px 0;text-align:right}
@media(max-width:720px){.side-nav{width:100%;height:68px;padding:5px 8px}.side-nav nav a,.side-bottom a{min-height:56px;padding:4px 13px}.side-nav nav a span,.side-bottom a span{font-size:11px}.side-nav nav a .nav-icon,.side-bottom a .nav-icon{width:19px;height:19px}.main-content{margin-right:0;margin-bottom:68px}.auth-page{padding:26px 15px}.auth-card{padding:30px 20px;border-radius:24px}.verification-icon{width:72px;height:72px}.verification-card h1{font-size:31px}.verification-code{height:58px;font-size:27px;letter-spacing:9px}}

/* Family Tree visual refinement v3 */
.side-nav{width:82px;padding:16px 7px;background:#fff;border-right:1px solid #e3ece5;box-shadow:-8px 0 28px rgba(36,91,54,.06)}
.main-content{margin-right:82px}
.brand{margin-bottom:28px;font-size:11px;line-height:1.15}
.brand-mark{width:38px;height:38px;margin:0 auto 6px;border-radius:13px;background:linear-gradient(145deg,#f4faf3,#e8f3e8);border:1px solid #d8e8da;color:var(--green);box-shadow:none}
.brand-logo{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.side-nav nav{gap:5px}
.side-nav nav a,.side-bottom a{min-height:66px;padding:8px 2px;border-radius:15px;gap:5px;color:#61736a;font-size:11px}
.side-nav nav a span,.side-bottom a span{font-size:12px}
.side-nav .nav-icon,.top-action-btn .nav-icon,.mobile-brand .nav-icon{display:block;width:18px;height:18px;fill:none!important;stroke:currentColor!important;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.side-nav nav a.active .nav-icon{stroke-width:2}
.top-action-btn{display:inline-flex;align-items:center;gap:6px}
.top-action-btn .nav-icon{width:17px;height:17px}
.mobile-brand{display:none;align-items:center;gap:7px}
.mobile-brand .brand-logo{width:24px;height:24px}
.verification-icon{width:68px;height:68px;margin:0 auto 18px;border-radius:21px;background:linear-gradient(145deg,#f0f8f0,#e3f1e5);border:1px solid #d6e7d8;color:var(--green);box-shadow:0 10px 24px rgba(36,91,54,.08)}
.verification-icon .nav-icon{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.auth-card.verification-card{padding:34px 40px}
.verification-card h1{font-size:34px}
.verification-code{border:1px solid #d7e4da!important;background:#fbfefb!important;color:var(--green)!important;box-shadow:inset 0 0 0 1px rgba(63,127,71,.02);font-weight:700}
.verification-code:focus{border-color:#9cbea2!important;box-shadow:0 0 0 4px #edf6ed!important}

@media(max-width:720px){
 .side-nav{width:100%;height:68px;padding:5px 8px}
 .main-content{margin-right:0;margin-bottom:68px}
 .side-nav nav a,.side-bottom a{min-height:56px;padding:4px 13px}
 .side-nav nav a span,.side-bottom a span{font-size:11px}
 .side-nav .nav-icon{width:18px;height:18px}
 .mobile-brand{display:flex}
 .auth-card.verification-card{padding:28px 20px}
}

/* Tree editor — local polish only */
.tree-editor-head .tree-editor-back{display:inline-flex;align-items:center;gap:8px;width:max-content;margin-bottom:18px;padding:9px 15px;border:1px solid #d8e5dc;border-radius:13px;background:#fff;color:var(--green);font-weight:700;box-shadow:0 7px 18px rgba(30,68,45,.06);transition:.2s}
.tree-editor-head .tree-editor-back:hover{background:var(--green-pale);border-color:#c5dbc9;transform:translateY(-1px);box-shadow:0 10px 22px rgba(30,68,45,.09)}
.tree-editor-head .tree-editor-back span{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:8px;background:#edf6ed;font-size:15px;line-height:1}
.tree-editor-head .eyebrow{display:block;margin-bottom:2px}
.tree-editor-head h1{margin-bottom:8px}
.tree-toolbar .btn{min-height:46px;padding-left:19px;padding-right:19px}
.editor-panel{box-shadow:0 12px 32px rgba(30,68,45,.06)}
.editor-panel h3{font-size:20px;margin-bottom:17px}
.editor-panel .form-grid{gap:12px}
.editor-panel .form-grid input{min-height:50px}
.editor-panel .check{padding:11px 12px;border:1px solid #e2ebe4;border-radius:13px;background:#f9fcf9;line-height:1.7}
.layout-switch{padding-top:18px;border-top:1px solid #e7eee9}
.tip{position:relative;padding:14px 14px 14px 40px;border:1px solid #e5ece7;background:#f8fbf8}
.tip:before{content:'✦';position:absolute;left:13px;top:12px;color:var(--sand);font-size:16px}
.tree-canvas{overflow:auto;scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior:contain}
.tree-canvas::-webkit-scrollbar{width:0;height:0;display:none}
.tree-node{cursor:grab}
.tree-node:active{cursor:grabbing}
.tree-node.dragging{z-index:20;opacity:.94;transform:scale(1.025);transition:transform .08s ease}
.tree-node.dragging .node-avatar,.tree-node.dragging .node-name{box-shadow:0 15px 34px rgba(63,127,71,.22)}
.tree-canvas.tree-layout-natural .tree-node{cursor:grab}
@media(max-width:1050px){.tree-editor-head .tree-editor-back{margin-bottom:14px}.tree-toolbar{width:100%}}
@media(max-width:720px){.tree-editor-head .tree-editor-back{margin-bottom:12px}.tree-toolbar .btn{min-height:44px}.editor-panel{border-radius:20px}.tree-canvas{border-radius:22px}.editor-natural-art img{width:760px;max-width:none;margin-top:-95px}}

/* Tree editor — stable pointer dragging */
.tree-node{cursor:grab;touch-action:none;will-change:left,top}
.tree-node.drag-ready{cursor:grabbing}
.tree-node.dragging{cursor:grabbing;transform:none;transition:none;z-index:20;opacity:.96}
.tree-node.dragging .node-avatar,.tree-node.dragging .node-name{box-shadow:0 16px 36px rgba(63,127,71,.24)}


/* Family tree: single free layout + visible person actions */
.layout-switch{display:none!important}
.tree-node{position:absolute}
.node-actions{position:absolute;top:-12px;left:50%;transform:translateX(-50%);display:flex;gap:5px;z-index:30;opacity:0;pointer-events:none;transition:opacity .18s ease}
.tree-node:hover .node-actions,.tree-node:focus-within .node-actions,.tree-node.dragging .node-actions{opacity:1;pointer-events:auto}
.node-action{width:30px;height:30px;border:1px solid #dce7df;border-radius:9px;background:rgba(255,255,255,.97);color:var(--green);display:grid;place-items:center;font-size:16px;line-height:1;box-shadow:0 7px 18px rgba(30,68,45,.12);cursor:pointer}
.node-action:hover{background:var(--green-pale);transform:translateY(-1px)}
.node-delete{color:#b55d5d}
.node-delete:hover{background:#fff1f1;border-color:#f0cccc;color:#a33f3f}
.node-edit{font-size:17px}
@media(max-width:720px){.node-actions{opacity:1;pointer-events:auto}.node-action{width:28px;height:28px}}


/* ===== Homepage tree preview — copied from the tree-create visual language ===== */
.hero-create-preview{width:min(500px,100%);margin:0 auto;display:flex;flex-direction:column;align-items:center;text-align:center;position:relative}
.hero-create-preview-art{width:min(390px,100%);height:355px;position:relative;display:flex;align-items:flex-end;justify-content:center}
.hero-create-preview-art img{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;mix-blend-mode:multiply;filter:drop-shadow(0 18px 20px rgba(36,91,54,.10));user-select:none;-webkit-user-drag:none}
.hero-create-badge{position:absolute;right:8px;bottom:18px;padding:6px 12px;border:1px solid #d9e8da;border-radius:999px;background:rgba(255,255,255,.84);color:var(--green);font-size:12px;font-weight:700;box-shadow:0 7px 18px rgba(30,68,45,.06);backdrop-filter:blur(8px)}
.hero-create-preview-copy{width:min(390px,100%);margin-top:-2px}
.hero-create-preview-copy h2{font-size:32px;line-height:1.25;margin:0 0 8px;color:var(--ink);letter-spacing:-.3px}
.hero-create-preview-copy p{margin:0 auto 17px;color:var(--muted);font-size:14px;line-height:1.9;max-width:360px}
.hero-create-features{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.hero-create-features div{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid #d9e7dc;border-radius:12px;background:rgba(255,255,255,.72);color:#52665a;font-size:11px;font-weight:700;box-shadow:0 7px 18px rgba(30,68,45,.035)}
.hero-create-features span{width:20px;height:20px;display:grid;place-items:center;border-radius:50%;background:#edf7ee;color:var(--green);font-size:12px;font-weight:700}

@media(max-width:1050px){
  .hero-create-preview-art{height:390px}
  .hero-create-preview-copy{width:min(430px,100%)}
}
@media(max-width:720px){
  .hero-create-preview{max-width:500px}
  .hero-create-preview-art{width:min(360px,100%);height:330px}
  .hero-create-preview-copy h2{font-size:28px}
  .hero-create-preview-copy p{font-size:13px}
  .hero-create-features{gap:6px}
  .hero-create-features div{font-size:10px;padding:7px 9px}
  .hero-create-badge{right:2px;bottom:14px}
}

/* ===== Homepage final sizing refinement ===== */
@media(min-width:1051px){
  .hero{
    grid-template-columns:minmax(0,560px) minmax(0,560px);
    justify-content:center;
    gap:42px;
    padding-left:30px;
    padding-right:30px;
  }
  .hero h1{font-size:64px}
  .hero-copy{padding-right:0}
  .hero-tree-wrap{min-height:540px}
  .hero-create-preview-art{width:440px;height:405px}
  .hero-create-preview-copy{width:390px}
  .hero-create-features{flex-wrap:nowrap;gap:7px;width:100%}
  .hero-create-features div{white-space:nowrap;flex:1;justify-content:center;padding:8px 8px}
  .benefits{
    width:min(calc(100% - 60px),1000px);
    margin-left:auto;
    margin-right:auto;
  }
}

@media(min-width:721px) and (max-width:1050px){
  .hero{grid-template-columns:minmax(0,1fr);padding-left:30px;padding-right:30px}
  .hero h1{font-size:56px}
  .hero-create-preview-art{width:420px;height:390px}
  .hero-create-features{flex-wrap:nowrap}
  .hero-create-features div{white-space:nowrap}
  .benefits{width:min(calc(100% - 40px),1000px);margin-left:auto;margin-right:auto}
}

@media(max-width:720px){
  .hero-create-preview-art{width:min(410px,100%);height:380px}
  .hero-create-features{flex-wrap:wrap}
}

/* Public families directory */
.families-head{width:min(1120px,calc(100% - 80px));margin:0 auto;padding:52px 0 26px;display:flex;align-items:flex-end;justify-content:space-between;gap:30px}.families-head h1{font-size:48px;line-height:1.15;margin:5px 0 8px}.families-head p{margin:0;color:var(--muted);font-size:18px}.families-head-badge{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:11px 15px;box-shadow:0 10px 25px rgba(30,68,45,.05);white-space:nowrap}.families-head-badge span{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:#fbf3df;color:var(--sand)}.families-head-badge strong{font-size:22px;color:var(--green)}.families-head-badge small{color:var(--muted)}
.families-page{width:min(1120px,calc(100% - 80px));margin:0 auto;padding:8px 0 75px}.families-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.family-card{background:#fff;border:1px solid var(--line);border-radius:24px;overflow:hidden;box-shadow:0 14px 35px rgba(30,68,45,.06);transition:transform .2s,box-shadow .2s}.family-card:hover{transform:translateY(-4px);box-shadow:0 20px 45px rgba(30,68,45,.10)}.family-card-art{height:145px;background:linear-gradient(145deg,#f1f8f1,#e8f2e9);display:flex;align-items:flex-end;justify-content:center;overflow:hidden;border-bottom:1px solid #e1ebe2}.family-card-art img{width:210px;height:210px;object-fit:contain;object-position:center bottom;transform:translateY(28px);filter:drop-shadow(0 12px 16px rgba(63,82,45,.10))}.family-card-body{padding:18px 19px 20px}.family-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}.family-public{font-size:12px;color:var(--green);background:var(--green-pale);border-radius:20px;padding:3px 9px}.family-public i{font-style:normal;margin-left:3px}.family-count{font-size:12px;color:#89978f}.family-card h2{font-size:23px;margin:0 0 2px;color:var(--ink)}.family-card-body>p{margin:0 0 16px;color:var(--muted);font-size:13px}.family-view-btn{width:100%;min-height:43px;font-size:14px}.family-view-btn span{font-size:17px}.families-empty{background:#fff;border:1px solid var(--line);border-radius:25px;padding:65px 25px;text-align:center;box-shadow:0 14px 35px rgba(30,68,45,.05)}.families-empty-icon{width:64px;height:64px;margin:0 auto 12px;display:grid;place-items:center;border-radius:19px;background:var(--green-pale);color:var(--green);font-size:34px}.families-empty h2{margin:0 0 5px;font-size:25px}.families-empty p{color:var(--muted);margin:0 0 20px}
@media(max-width:1050px){.families-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.families-head,.families-page{width:min(900px,calc(100% - 50px))}}
@media(max-width:720px){.families-head{width:calc(100% - 30px);padding:32px 0 20px;align-items:flex-start;flex-direction:column}.families-head h1{font-size:36px}.families-head p{font-size:15px}.families-head-badge{align-self:stretch}.families-page{width:calc(100% - 30px);padding-bottom:35px}.families-grid{grid-template-columns:1fr;gap:15px}.family-card-art{height:125px}.family-card-art img{width:185px;height:185px}}


/* =========================================================
   Home page — restored visual layout
   Scoped to the homepage only.
   ========================================================= */
.home-hero {
    min-height: 550px;
    padding: 8px 7vw 8px;
    display: block;
    background: radial-gradient(circle at 20% 46%,rgba(232,244,232,.95) 0 17%,transparent 45%),
    linear-gradient(135deg,#fbfdfb,#f0f7f0);
}
.home-hero-inner{
  width:min(1180px,100%);
  margin:0 auto;
  min-height:560px;
  display:grid;
  grid-template-columns:1fr 1.05fr;
  gap:55px;
  align-items:center;
}
.home-tree-column{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.home-tree-art{
  width:100%;
  max-width:500px;
  height:385px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  overflow:visible;
}
.home-tree-art img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 18px 24px rgba(53,79,49,.10));
}
.home-tree-message{
  width:min(500px,100%);
  margin-top:-8px;
}
.home-tree-message h2{
  margin:0 0 8px;
  color:var(--ink);
  font-size:31px;
  line-height:1.2;
}
.home-tree-message p{
  margin:0 auto;
  max-width:470px;
  color:var(--muted);
  font-size:13px;
  line-height:1.9;
}
.home-tree-badges{
  margin:18px auto 0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:nowrap;
}
.home-tree-badge{
  min-width:0;
  padding:8px 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  white-space:nowrap;
  background:rgba(255,255,255,.92);
  border:1px solid var(--line);
  border-radius:13px;
  box-shadow:0 7px 18px rgba(30,68,45,.06);
  color:#53665b;
  font-size:12px;
}
.home-tree-badge span{
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#edf7ee;
  color:var(--green);
  font-weight:700;
}
.home-copy{
  min-width:0;
  padding-right:1vw;
}
.home-memory-banner{
  width:max-content;
  max-width:100%;
  margin:0 0 20px auto;
  padding:10px 15px;
  display:flex;
  align-items:center;
  gap:10px;
  background:rgba(255,255,255,.82);
  border:1px solid #e0e8e1;
  border-radius:16px;
  box-shadow:0 9px 24px rgba(30,68,45,.06);
}
.home-memory-banner strong{
  color:var(--green);
  font-size:15px;
}
.home-memory-banner span{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#fbf3df;
  color:var(--sand);
}
.home-memory-banner small{
  color:#87958d;
  font-size:12px;
  border-right:1px solid #dfe7e1;
  padding-right:10px;
}
.home-copy h1 {
    font-size: clamp(34px,5vw,50px);
    line-height: 1.45;
    margin: 0 0 28px;
    letter-spacing: -1px;
}
.home-copy h1 em{
  font-style:normal;
  color:var(--green);
}
.home-copy>p{
  max-width:620px;
  margin:0 0 28px;
  color:var(--muted);
  font-size:18px;
  line-height:1.9;
}
.home-copy .hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.home-copy .btn-lg{
  min-height:56px;
  padding:14px 25px;
}

/* Keep the homepage composition visually stable instead of stretching. */
@media(min-width:721px){
  /* Homepage desktop composition: tree on the left, copy on the right. */
  .home-hero-inner{
    max-width:1180px;
    direction:ltr;
  }
  .home-tree-column,
  .home-copy{
    direction:rtl;
  }
  .home-tree-art{height:385px}
}

@media(max-width:1050px){
  .home-hero{padding-left:35px;padding-right:35px}
  .home-hero-inner{gap:30px}
  .home-tree-art{height:350px}
  .home-copy h1{font-size:48px}
}

@media(max-width:720px){
  .home-hero{
    padding:30px 20px 42px;
  }
  .home-hero-inner{
    display:flex;
    flex-direction:column-reverse;
    gap:25px;
    min-height:0;
  }
  .home-copy{
    width:100%;
    padding:0;
    text-align:center;
  }
  .home-memory-banner{
    margin:0 auto 18px;
  }
  .home-copy h1{
    font-size:40px;
  }
  .home-copy>p{
    font-size:16px;
  }
  .home-copy .hero-actions{
    justify-content:center;
  }
  .home-copy .btn-lg{
    width:100%;
  }
  .home-tree-art{
    height:330px;
    max-width:440px;
  }
  .home-tree-message h2{
    font-size:28px;
  }
  .home-tree-badges{
    gap:6px;
  }
  .home-tree-badge{
    padding:7px 8px;
    font-size:10px;
  }
  .home-tree-badge span{
    width:19px;
    height:19px;
    flex-basis:19px;
  }
}


/* Tree editor — requested UI refinement (does not affect homepage) */
.tree-editor-head .tree-editor-back{display:none!important}
.tree-toolbar #fitTreeBtn{display:none!important}
.editor-panel .check{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:52px;
  margin:0;
  padding:10px 13px;
  border:1px solid #dfe9e1;
  border-radius:14px;
  background:#f8fbf8;
  color:var(--ink);
  font-size:14px;
  font-weight:700;
  line-height:1.6;
  cursor:pointer;
}
.editor-panel .check input {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 44px;
    width: 12px;
    height: 12px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #d6e1d8;
    position: relative;
    cursor: pointer;
    transition: background .2s ease,box-shadow .2s ease;
    min-height: 25px;
    width: 20px;
}
.editor-panel .check input:before{
  content:'';
  position:absolute;
  top:3px;
  right:3px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 6px rgba(30,68,45,.18);
  transition:transform .2s ease;
}
.editor-panel .check input:checked{
  background:var(--green);
  box-shadow:0 0 0 3px rgba(63,127,71,.08);
}
.editor-panel .check input:checked:before{
  transform:translateX(-18px);
}
.editor-panel .check:has(input:checked){
  border-color:#c9ddcc;
  background:#f1f8f2;
}
@media(max-width:720px){
  .editor-panel .check{font-size:13px;padding:9px 11px}
}

/* =========================================================
   Homepage Hero — elegant geometric background + brand badge
   Scoped to the homepage only. No image assets added.
   ========================================================= */
.home-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    max-width: 1400px;
    margin: 0 auto;
}
.home-hero::before{
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
  opacity:.48;
  background-image:
    linear-gradient(30deg,transparent 49.65%,rgba(63,135,80,.075) 50%,transparent 50.35%),
    linear-gradient(150deg,transparent 49.65%,rgba(199,154,59,.055) 50%,transparent 50.35%),
    linear-gradient(90deg,transparent 49.7%,rgba(36,91,54,.035) 50%,transparent 50.3%);
  background-size:150px 150px,190px 190px,230px 230px;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 16%,#000 84%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 16%,#000 84%,transparent 100%);
}
.home-hero::after{
  content:'';
  position:absolute;
  width:520px;
  height:520px;
  left:-285px;
  top:-250px;
  border:1px solid rgba(63,135,80,.075);
  border-radius:50%;
  box-shadow:
    0 0 0 38px rgba(63,135,80,.028),
    0 0 0 78px rgba(199,154,59,.022),
    0 0 0 124px rgba(63,135,80,.018);
  pointer-events:none;
  z-index:0;
}
.home-hero-inner{
  position:relative;
  z-index:1;
}
.home-memory-banner{
  position:relative;
  min-height:48px;
  padding:6px 8px 6px 7px;
  gap:8px;
  border:1px solid #cfe0d2;
  border-radius:18px;
  background:linear-gradient(135deg,rgba(255,255,255,.97),rgba(244,250,245,.94));
  box-shadow:0 12px 28px rgba(36,91,54,.08),inset 0 1px 0 rgba(255,255,255,.9);
  overflow:hidden;
}

.home-memory-banner strong{
  position:relative;
  z-index:1;
  padding:7px 13px;
  border-radius:12px;
  background:linear-gradient(135deg,var(--green-dark),#2e7141);
  color:#fff;
  font-size:15px;
  letter-spacing:.1px;
  box-shadow:0 7px 16px rgba(36,91,54,.14);
}
.home-memory-banner span{
  width:32px;
  height:32px;
  border:1px solid #ead9ae;
  border-radius:11px;
  background:linear-gradient(145deg,#fff8e8,#f8edd2);
  color:var(--sand);
  box-shadow:0 5px 12px rgba(199,154,59,.10);
}
.home-memory-banner small{
  color:#718178;
  font-size:12px;
  padding-right:9px;
  border-right:1px solid #dbe6dd;
}
@media(max-width:720px){
  .home-hero::before{background-size:105px 105px,135px 135px,165px 165px;opacity:.32}
  .home-hero::after{width:360px;height:360px;left:-220px;top:-170px}
  .home-memory-banner{min-height:44px;padding:5px 7px}
  .home-memory-banner strong{padding:6px 10px;font-size:13px}
  .home-memory-banner span{width:28px;height:28px}
}

/* =========================================================
   Public families — refined card artwork
   Scoped to families.php only. No image assets required.
   ========================================================= */
.families-page .family-card-art{
  height:150px;
  position:relative;
  overflow:hidden;
  isolation:isolate;
  background:
    radial-gradient(circle at 50% 54%,rgba(255,255,255,.92) 0 19%,transparent 20%),
    linear-gradient(145deg,#f7fbf7,#e9f3ea);
  border-bottom:1px solid #e1ebe2;
}
.families-page .family-card-art:before{
  content:'';
  position:absolute;
  width:170px;height:170px;
  left:50%;top:50%;
  transform:translate(-50%,-50%);
  border:1px solid rgba(63,135,80,.12);
  border-radius:50%;
  box-shadow:0 0 0 18px rgba(255,255,255,.20),0 0 0 36px rgba(63,135,80,.035);
  z-index:0;
}
.family-emblem{
  position:absolute;
  left:50%;top:50%;
  width:58px;height:58px;
  transform:translate(-50%,-50%);
  display:grid;place-items:center;
  border-radius:18px;
  background:linear-gradient(145deg,#fff,#eef7ef);
  border:1px solid #cfe1d2;
  color:var(--green-deep);
  box-shadow:0 10px 25px rgba(30,68,45,.12),0 0 0 7px rgba(255,255,255,.62);
  z-index:4;
}
.family-emblem span{font-size:25px;font-weight:800;line-height:1}
.family-art-node{
  position:absolute;
  width:22px;height:22px;
  border-radius:50%;
  background:#fff;
  border:4px solid #dcebdd;
  box-shadow:0 5px 13px rgba(30,68,45,.10);
  z-index:3;
}
.family-art-node.node-a{left:24%;top:25%}.family-art-node.node-b{right:23%;top:25%}
.family-art-node.node-c{left:17%;bottom:23%}.family-art-node.node-d{right:17%;bottom:23%}
.family-art-node.node-e{left:50%;bottom:9%;transform:translateX(-50%);width:16px;height:16px;border-width:3px}
.family-art-line{position:absolute;height:2px;background:#9bc29f;transform-origin:left center;z-index:2;border-radius:2px}
.family-art-line.line-a{width:62px;left:34%;top:43%;transform:rotate(22deg)}
.family-art-line.line-b{width:62px;right:34%;top:43%;transform:rotate(-22deg)}
.family-art-line.line-c{width:67px;left:28%;top:65%;transform:rotate(-19deg)}
.family-art-line.line-d{width:67px;right:28%;top:65%;transform:rotate(19deg)}
.families-page .family-art-2{background:linear-gradient(145deg,#f8faf4,#edf3e4)}
.families-page .family-art-2 .family-emblem{border-radius:50%;color:#5f7747}
.families-page .family-art-2 .family-art-node{border-color:#dce7c9}
.families-page .family-art-2 .family-art-line{background:#b3c58e}
.families-page .family-art-3{background:linear-gradient(145deg,#f5faf8,#e6f1ef)}
.families-page .family-art-3 .family-emblem{border-radius:15px 24px 15px 24px;color:#327566}
.families-page .family-art-3 .family-art-node{border-color:#d2e6df}
.families-page .family-art-3 .family-art-line{background:#8fbeb2}
.families-page .family-art-4{background:linear-gradient(145deg,#fbfaf5,#f3eddd)}
.families-page .family-art-4 .family-emblem{color:#8a6a2b;border-color:#eadfc4}
.families-page .family-art-4 .family-art-node{border-color:#ebdfc3}
.families-page .family-art-4 .family-art-line{background:#d4bc7c}
.families-page .family-art-5{background:linear-gradient(145deg,#f6f8fb,#e9eff6)}
.families-page .family-art-5 .family-emblem{color:#4d6d7e;border-color:#d4e0e8}
.families-page .family-art-5 .family-art-node{border-color:#d8e3eb}
.families-page .family-art-5 .family-art-line{background:#9bb7c7}
.families-page .family-art-6{background:linear-gradient(145deg,#fbf7f8,#f3e9eb)}
.families-page .family-art-6 .family-emblem{color:#8b5865;border-color:#ead5db}
.families-page .family-art-6 .family-art-node{border-color:#ead8dd}
.families-page .family-art-6 .family-art-line{background:#c89eaa}

/* =========================================================
   Public family tree — visitor presentation
   Scoped to view.php only. Does not alter the editor or homepage.
   ========================================================= */
.public-tree-head{
  width:min(1120px,calc(100% - 80px));
  margin:0 auto;
  padding:42px 0 24px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:30px;
}
.public-tree-heading .eyebrow{display:block;margin:18px 0 3px}
.public-tree-heading h1{font-size:48px;line-height:1.15;margin:5px 0 7px;color:var(--ink)}
.public-tree-heading p{margin:0;color:var(--muted);font-size:16px}
.public-tree-heading p span{color:var(--sand);margin:0 4px}
.public-tree-back{
  display:inline-flex;align-items:center;gap:7px;
  padding:8px 13px;border:1px solid #d8e5dc;border-radius:12px;
  background:#fff;color:var(--green);font-weight:700;
  box-shadow:0 7px 18px rgba(30,68,45,.05);
}
.public-tree-back span{font-size:16px}
.public-tree-badge{
  display:flex;align-items:center;gap:9px;
  background:#fff;border:1px solid var(--line);border-radius:17px;
  padding:10px 14px;box-shadow:0 10px 25px rgba(30,68,45,.05);white-space:nowrap;
}
.public-tree-badge span{width:31px;height:31px;display:grid;place-items:center;border-radius:10px;background:#fbf3df;color:var(--sand)}
.public-tree-badge strong{color:var(--green);font-size:13px}
.public-tree-badge small{color:#87958e;font-size:11px}
.public-tree-wrap{padding:0 0 70px}
.public-tree-stage{
  width:min(1120px,calc(100% - 80px));
  min-height:650px;
  margin:0 auto;
  position:relative;
  overflow:hidden;
  border:1px solid #dbe7de;
  border-radius:30px;
  background:
    radial-gradient(circle at 50% 38%,rgba(236,247,236,.78),transparent 40%),
    linear-gradient(180deg,#fbfdfb,#f1f7f2);
  box-shadow:0 20px 50px rgba(30,68,45,.07);
  isolation:isolate;
}
.public-tree-stage:before{
  content:'';position:absolute;inset:0;pointer-events:none;z-index:0;
  background-image:radial-gradient(circle,#dce8df 1px,transparent 1px);
  background-size:24px 24px;opacity:.65;
}
.public-tree-art{
  position:absolute;inset:45px 50px 15px;
  display:flex;align-items:center;justify-content:center;
  z-index:1;pointer-events:none;opacity:1;
}
.public-tree-art .family-tree-art{width:min(700px,76%);height:auto;max-height:640px;display:block}
.public-tree-caption{
  position:absolute;top:22px;left:50%;transform:translateX(-50%);
  display:flex;align-items:center;gap:8px;padding:8px 13px;
  border:1px solid #dce8df;border-radius:999px;background:rgba(255,255,255,.86);
  box-shadow:0 8px 22px rgba(30,68,45,.06);backdrop-filter:blur(8px);
  color:#68776f;font-size:11px;z-index:6;white-space:nowrap;
}
.public-tree-caption span:first-child{color:var(--green);font-weight:700}
.public-tree-caption i{width:4px;height:4px;border-radius:50%;background:#c7d7cb}
.public-tree-caption span:last-child{color:#8a9891}
.public-tree-stage .tree-canvas{
  position:absolute;inset:0;
  width:100%;height:100%;min-width:0;min-height:0;
  border:0;border-radius:0;background:transparent!important;
  box-shadow:none;overflow:auto;z-index:4;
}
.public-tree-stage .tree-canvas:before{display:none}
.public-tree-stage .tree-grid{position:absolute;inset:0}
.public-tree-stage .tree-node{z-index:6}
.public-tree-stage .node-avatar{box-shadow:0 10px 24px rgba(30,68,45,.14),0 0 0 1px #d7e6d9}
.public-tree-stage .node-name{cursor:pointer}
.public-tree-empty{
  position:absolute;inset:0;display:grid;place-content:center;text-align:center;z-index:8;
  color:var(--muted);padding:30px;
}
.public-tree-empty-icon{width:62px;height:62px;margin:0 auto 12px;display:grid;place-items:center;border-radius:19px;background:#edf7ee;color:var(--green);font-size:26px}
.public-tree-empty h2{margin:0 0 6px;color:var(--ink);font-size:25px}
.public-tree-empty p{margin:0}

@media(max-width:1050px){
  .public-tree-head,.public-tree-stage{width:min(920px,calc(100% - 50px))}
  .public-tree-head{padding-top:34px}
  .public-tree-heading h1{font-size:42px}
  .public-tree-stage{min-height:650px}
}
@media(max-width:720px){
  .families-page .family-card-art{height:130px}
  .public-tree-head{width:calc(100% - 30px);padding:28px 0 18px;align-items:flex-start;flex-direction:column;gap:15px}
  .public-tree-heading .eyebrow{margin-top:14px}
  .public-tree-heading h1{font-size:36px}
  .public-tree-heading p{font-size:14px}
  .public-tree-badge{align-self:stretch}
  .public-tree-stage{width:calc(100% - 30px);min-height:620px;border-radius:22px}
  .public-tree-art{inset:55px 10px 10px}
  .public-tree-art .family-tree-art{width:95%;max-height:520px}
  .public-tree-caption{top:14px}
  .public-tree-stage .tree-canvas{height:100%;min-width:0}
}


/* ===== Desktop family-tree stability =====
   Desktop only: keep the tree coordinate space fixed so browser zoom cannot
   stretch the canvas, while the artwork is presented at a smaller visual size.
*/
@media (min-width:1051px){
  .editor-layout{
    grid-template-columns:260px 760px;
    justify-content:center;
  }
  .editor-layout .tree-editor-canvas{
    width:760px;
    min-width:760px;
    max-width:760px;
    height:700px;
    min-height:700px;
    max-height:700px;
  }
  .editor-natural-art img{
    width:620px;
    max-width:620px;
    height:620px;
    max-height:620px;
    object-fit:contain;
  }
  .public-tree-stage .tree-canvas{
    width:760px;
    min-width:760px;
    max-width:760px;
    height:700px;
    min-height:700px;
    max-height:700px;
    left:50%;
    right:auto;
    transform:translateX(-50%);
    overflow:visible;
  }
  .public-tree-original-art{
    position:absolute;
    inset:0;
    width:760px;
    height:700px;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    pointer-events:none;
    overflow:hidden;
    z-index:1;
  }
  .public-tree-original-art img{
    display:block;
    width:620px;
    max-width:620px;
    height:620px;
    max-height:620px;
    object-fit:contain;
  
    user-select:none;
    -webkit-user-drag:none;
  }
}

/* ===== Homepage performance + brand identity polish ===== */
.brand{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--green-dark);}
.brand-mark {
    width: 54px;
    height: 54px;
    margin: 0;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(145deg, #8da54c, #637d2d);
    border: 1px solid #d4a84e;
    color: #f4d37b;
    box-shadow: 0 10px 24px rgba(30,68,45,.16),inset 0 1px 0 rgba(255,255,255,.16);
    transform: rotate(-2deg);
}
.brand-symbol{font-family:Sky,Arial,sans-serif;font-size:31px;font-weight:700;line-height:1;transform:rotate(2deg);}
.brand-name{display:flex;flex-direction:column;align-items:center;line-height:1.55;font-size:12px;letter-spacing:.1px;}
.brand-name b:first-child{color:var(--green);}
.brand-name b:last-child{color:#b1842e;}
.mobile-brand .brand-symbol{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:linear-gradient(145deg,#1e442d,#2d6840);border:1px solid #d4a84e;color:#f4d37b;font-size:20px;transform:none;}
.mobile-brand{color:var(--green-dark);}
.home-tree-art>img{content-visibility:auto;}
@media(max-width:720px){.brand{gap:4px}.brand-mark{width:44px;height:44px;border-radius:14px}.brand-symbol{font-size:25px}.brand-name{font-size:10px}}


/* ===== Brand tree emblem ===== */
.brand-symbol{display:grid;place-items:center;width:100%;height:100%;line-height:1;}
.brand-symbol .brand-logo{width:34px;height:34px;fill:none;stroke:currentColor;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;}
.mobile-brand .brand-symbol .brand-logo{width:23px;height:23px;}
@media(max-width:720px){.brand-symbol .brand-logo{width:28px;height:28px}.mobile-brand .brand-symbol .brand-logo{width:23px;height:23px;}}

/* About page visual polish — scoped only to about.php */
.about-page{position:relative;overflow:hidden;background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(239,247,240,.78));border:1px solid var(--line);border-radius:28px;box-shadow:0 18px 45px rgba(30,68,45,.06);padding:58px 60px!important}
.about-page:before,.about-page:after{content:"";position:absolute;border:1px solid rgba(63,135,80,.12);border-radius:50%;pointer-events:none}
.about-page:before{width:330px;height:330px;left:-150px;top:-170px}
.about-page:after{width:240px;height:240px;right:-120px;bottom:-130px}
.about-page h1{position:relative;z-index:1;font-size:48px;letter-spacing:-.8px;margin-bottom:18px}
.about-page .about-lead{position:relative;z-index:1;max-width:850px;font-size:18px;line-height:2.05;color:var(--muted);margin-bottom:34px}
.about-page .content-cards{position:relative;z-index:1}
.about-page .content-cards>div{background:rgba(255,255,255,.86);border:1px solid var(--line);border-radius:20px;padding:25px 24px;box-shadow:0 12px 28px rgba(30,68,45,.05);transition:.2s}
.about-page .content-cards>div:hover{transform:translateY(-3px);border-color:#c9ddcf;box-shadow:0 18px 34px rgba(30,68,45,.08)}
.about-page .content-cards b{display:inline-flex;align-items:center;gap:8px;color:var(--green);font-size:20px}
.about-page .content-cards b:before{content:"✦";font-size:13px;color:var(--sand)}
.about-page .content-cards p{margin:12px 0 0;line-height:1.95}
@media(max-width:720px){.about-page{padding:34px 22px!important;border-radius:22px}.about-page h1{font-size:36px}.about-page .about-lead{font-size:15px}.about-page .content-cards{grid-template-columns:1fr}}
