body{background:#f7f7f7;margin:0;font-family:Arial,sans-serif}#root{padding:32px 40px}h1{margin:0 0 12px;font-size:22px;line-height:1.2}.main-layout{align-items:flex-start;gap:40px;display:flex}.tree{flex:1;min-width:0;padding:10px;overflow-x:auto}.tree>.person{width:fit-content;margin-left:auto;margin-right:auto}.tree-zoom-controls{z-index:10;gap:4px;margin-bottom:8px;display:flex;position:sticky;left:0}.tree-zoom-controls button{color:#333;cursor:pointer;background:#fff;border:1px solid #ccc;border-radius:6px;min-width:28px;padding:5px 8px;font-size:13px;font-weight:500}.tree-zoom-controls button:hover{background:#f0f0f0}.tree-content{transform-origin:top;width:max-content}.person{margin:6px 8px;position:relative}.person-card{box-sizing:border-box;text-align:center;cursor:pointer;background:#fff;border:1px solid #ccc;border-radius:8px;width:135px;padding:7px 10px;transition:box-shadow .15s;box-shadow:0 2px 8px #00000014}.person-card:hover{box-shadow:0 6px 16px #0000001f}.person-card.selected{outline-offset:2px;background:#fafafa;border:1px solid #333;outline:2px solid #333}.person-name{margin-bottom:3px;font-size:16px;font-weight:700}.person-age{color:#666;font-size:13px}.person-gender{color:#888;text-transform:capitalize;margin-top:3px;font-size:11px}.children{justify-content:center;gap:6px;width:fit-content;margin:0 auto;padding-top:10px;display:flex;position:relative}.children:before{content:"";background:#ccc;width:2px;height:11px;position:absolute;top:0;left:50%}.children:after{content:"";background:#ccc;height:2px;position:absolute;top:15px;left:0;right:0}.children>.person:before{content:"";background:#ccc;width:2px;height:10px;position:absolute;top:-10px;left:50%}.couple{justify-content:center;align-items:center;gap:4px;display:flex}.person-details{box-sizing:border-box;background:#fff;border:1px solid #ddd;border-radius:16px;flex:0 0 260px;align-self:flex-start;width:300px;margin-top:40px;padding:16px;position:sticky;top:16px;box-shadow:0 8px 24px #00000014}.person-details h2{margin-top:0}.person-details h3{margin-bottom:8px}.person-details button{cursor:pointer;font-size:13px}.person-details-header{margin-bottom:12px}.person-details-header h2{margin:0 0 6px}.person-details-header p{color:#666;margin:0;font-size:14px}.person-actions{gap:6px;margin-bottom:16px;display:flex}.relationship-section{border-top:1px solid #eee;margin-top:16px;padding-top:12px;padding-bottom:2px}.relationship-section h3{color:#333;margin-top:0;margin-bottom:10px;font-size:15px;font-weight:600}.delete-button{color:#c62828;cursor:pointer;background:#fff5f5;border:1px solid #e0b4b4;border-radius:6px;margin-top:16px;padding:6px 10px;font-size:13px;font-weight:500;display:inline-block}.delete-button:hover{background:#ffe8e8}.person-link{color:#333;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:6px;margin:2px 0;padding:4px 6px;font-size:13px;font-weight:500;display:block}.person-link:hover{background:#f5f5f5}.person-link:focus-visible{outline-offset:1px;outline:2px solid #333}.action-button{color:#444;cursor:pointer;background:#f7f7f7;border:1px solid #d5d5d5;border-radius:6px;margin:6px 0;padding:5px 9px;font-size:13px;font-weight:500;display:inline-block}.action-button:hover{background:#ededed}.primary-action-button{color:#fff;cursor:pointer;background:#333;border:1px solid #333;border-radius:6px;padding:6px 10px;font-size:14px;font-weight:500;display:inline-block}.primary-action-button:hover{background:#222}.primary-button{color:#fff;cursor:pointer;background:#333;border:1px solid #333;border-radius:6px;margin-bottom:16px;padding:6px 10px;font-size:13px;font-weight:500;display:inline-block}.primary-button:hover{background:#222}.add-person-section{box-sizing:border-box;background:#fafafa;border:1px solid #eee;border-radius:10px;width:300px;margin-bottom:24px;padding:16px}.add-person-section h3{margin-top:0;margin-bottom:12px}.add-person-section input[type=text],.add-person-section input[type=number]{box-sizing:border-box;background:#fff;border:1px solid #ccc;border-radius:8px;outline:none;width:100%;max-width:300px;margin:6px 0 12px;padding:9px 10px;font-size:14px;display:block}.add-person-section input[type=text]:focus,.add-person-section input[type=number]:focus{border-color:#999;box-shadow:0 0 0 2px #0000000f}.add-person-section label{color:#555;margin-bottom:12px;font-size:14px;display:block}.add-person-section select{box-sizing:border-box;color:#333;cursor:pointer;background:#fff;border:1px solid #ccc;border-radius:8px;width:100%;max-width:300px;margin-top:6px;padding:9px 10px;font-size:14px;display:block}.add-person-section h4{color:#333;margin:20px 0 10px;font-size:14px;font-weight:600}.add-person-section label:has(input[type=checkbox]){color:#444;cursor:pointer;align-items:center;gap:8px;margin:5px 0;display:flex}.add-person-section input[type=checkbox]{cursor:pointer;width:15px;height:15px;margin:0}.add-person-section button{color:#333;cursor:pointer;background:#fff;border:1px solid #ccc;border-radius:6px;margin-top:4px;margin-right:5px;padding:6px 10px;font-size:13px}.add-person-section button:hover{background:#f0f0f0}.add-person-section button:first-of-type{color:#fff;background:#333;border-color:#333}.add-person-section button:first-of-type:hover{background:#222}.form-actions{gap:6px;margin-top:6px;display:flex}.form-actions button{margin:0}.search{margin-bottom:12px}.search input{box-sizing:border-box;background:#fff;border:1px solid #ccc;border-radius:6px;outline:none;width:300px;padding:7px 10px;font-size:13px}.search input:focus{border-color:#999;box-shadow:0 0 0 2px #0000000f}.search-results{box-sizing:border-box;background:#fff;border:1px solid #ddd;border-radius:7px;flex-direction:column;gap:4px;width:300px;margin-top:8px;padding:4px;display:flex;box-shadow:0 8px 20px #00000014}.search-results button{box-sizing:border-box;cursor:pointer;text-align:left;background:#fff;border:1px solid #ddd;border-radius:6px;width:100%;padding:7px 9px}.search-results button:hover{background:#f5f5f5;border-color:#ccc}.search-result-name{color:#333;font-size:14px;font-weight:600}.search-result-meta{color:#777;text-transform:capitalize;margin-top:3px;font-size:12px}.no-search-results{color:#777;text-align:center;padding:10px 12px;font-size:13px}.edit-section{background:#fafafa;border:1px solid #eee;border-radius:8px;margin-top:12px;padding:12px}.edit-section h3{color:#555;margin-top:0;margin-bottom:12px;font-size:14px;font-weight:600}.edit-section input{box-sizing:border-box;background:#fff;border:1px solid #ccc;border-radius:6px;width:100%;margin:6px 0 12px;padding:7px 9px;font-size:13px;display:block}.edit-section label{color:#555;font-size:14px;display:block}.edit-section button{color:#333;cursor:pointer;background:#fff;border:1px solid #ccc;border-radius:8px;margin-right:6px;padding:8px 14px;font-size:14px}.edit-section button:hover{background:#f0f0f0}.edit-section button:first-of-type{color:#fff;background:#333;border-color:#333}.edit-section button:first-of-type:hover{background:#222}.tree-actions{border-top:1px solid #eee;flex-direction:column;gap:5px;margin-top:16px;padding-top:12px;display:flex}.tree-actions button{color:#333;cursor:pointer;text-align:left;background:#fff;border:1px solid #ccc;border-radius:8px;width:100%;padding:6px 9px;font-size:13px;font-weight:500}.tree-actions button:hover{background:#f5f5f5}.tree-actions button:last-child{color:#fff;background:#333;border-color:#333}.tree-actions button:last-child:hover{background:#222}.mobile-family-tree{display:none}@media (width<=768px){#root{height:auto;min-height:100vh;padding:20px 12px;overflow:visible}html,body{height:auto;min-height:100%;overflow-y:auto}h1{font-size:20px}.main-layout{padding-bottom:100px;display:block}.tree-zoom-controls,.tree{display:none}.mobile-family-tree{padding:8px 0;display:block}.mobile-family-node{border-bottom:1px solid #eee;align-items:center;gap:4px;min-height:40px;padding:8px 4px;font-size:15px;line-height:1.3;display:flex}.mobile-family-node span{cursor:pointer}.mobile-family-node.selected{font-weight:700}.mobile-family-toggle{color:#666;cursor:pointer;background:0 0;border:0;margin-left:auto;padding:8px 10px;font-size:12px}.mobile-family-branch{position:relative}.mobile-family-branch .mobile-family-branch{border-left:1px solid #ddd}.person-details{width:100%;margin-top:16px;position:static}.parent-search{box-sizing:border-box;border:1px solid #ccc;border-radius:8px;width:100%;margin-bottom:10px;padding:10px 12px;font-size:14px}.parent-result{cursor:pointer;background:#fff;border:1px solid #ddd;border-radius:8px;align-items:center;gap:10px;margin-bottom:6px;padding:10px 12px;display:flex}.parent-result:hover{background:#f5f5f5}.parent-result-info{flex-direction:column;gap:2px;display:flex}.parent-result-info div{color:#777;font-size:12px}.selected-parent{background:#f1f1f1;border-radius:8px;justify-content:space-between;align-items:center;margin-bottom:6px;padding:8px 10px;display:flex}.selected-parent button{color:#666;cursor:pointer;background:0 0;border:0}.edit-parents-button{color:#333;cursor:pointer;background:#fff;border:1px solid #ccc;border-radius:6px;margin-right:6px;padding:7px 12px;font-size:13px}.edit-parents-button:hover{background:#f5f5f5}}.person-actions{margin-bottom:8px}.delete-button{margin-top:0}
