:root{--sky:#2d8ec9;--ink:#283039;--muted:#707b84;--yellow:#ffd763;--yellow2:#f4bd31;--blue:#2678a8;--line:#536473;--white:#fff;--danger:#bb4949}
*{box-sizing:border-box}[hidden]{display:none!important}html,body{margin:0;height:100%;overflow:hidden}body{font:15px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:#8b5a2b none;transition:background-color .25s ease}body.theme-dark-gray{background:#000 none}button,input,select,textarea{font:inherit}button{cursor:pointer}
.app-header{height:72px;padding:0 28px;display:flex;align-items:center;justify-content:space-between;position:fixed;inset:0 0 auto;z-index:20;background:rgba(255,255,255,.86);backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.7);box-shadow:0 8px 30px rgba(28,78,106,.12)}
.tree-search{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(560px,42vw);display:grid;grid-template-columns:154px 1fr;gap:7px;padding:5px;border:1px solid #d8e6ed;border-radius:12px;background:rgba(255,255,255,.86);box-shadow:0 5px 18px rgba(34,91,122,.1)}.tree-search select,.tree-search input{height:36px;border:0;border-radius:8px;background:#edf4f7;color:#314b5a;padding:0 11px;outline:0;font-size:13px}.tree-search input{width:100%;background:#fff}.tree-search input:focus{box-shadow:0 0 0 2px rgba(38,120,168,.18)}.tree-search-field{position:relative}.tree-search-results{position:absolute;left:0;right:0;top:calc(100% + 10px);max-height:360px;overflow:auto;padding:7px;border:1px solid #d8e4e9;border-radius:12px;background:#fff;box-shadow:0 18px 48px rgba(20,59,80,.25)}.tree-search-result{width:100%;border:0;border-radius:8px;background:transparent;padding:10px 11px;text-align:left;color:#2f4653;display:grid;gap:2px}.tree-search-result:hover{background:#eaf4f9}.tree-search-result strong{font-size:14px}.tree-search-result small{color:#788993;font-size:11px}.tree-search-empty{padding:14px;text-align:center;color:#788993;font-size:13px}.account-export summary{display:flex;align-items:center;min-height:40px;padding:7px 12px!important;font-size:14px!important;color:var(--ink)!important;font-weight:750!important}.account-export summary::after{color:var(--blue)}.account-button .account-avatar{width:44px;border-radius:12px;font-size:12px}.export-dropdown-separator{height:1px;margin:3px 6px;background:#dfe8ec}
.logo{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-size:18px}.logo span{width:42px;height:42px;display:grid;place-items:center;overflow:hidden;border-radius:10px;background:#fff}.logo span img{width:100%;height:100%;object-fit:contain}.header-actions,.account-button{display:flex;align-items:center;gap:10px}.save-state{font-size:13px;color:var(--muted)}.export-menu{position:relative}.export-menu>summary{list-style:none;border:1px solid rgba(38,120,168,.25);border-radius:9px;background:rgba(255,255,255,.76);color:var(--blue);padding:7px 12px;font-size:13px;font-weight:750;cursor:pointer;user-select:none}.export-menu summary::-webkit-details-marker{display:none}.export-menu>summary::after{content:"⌄";margin-left:7px;font-size:12px}.export-menu[open]>summary{background:#fff;border-color:var(--blue)}.export-dropdown{position:absolute;right:0;top:calc(100% + 9px);width:210px;padding:7px;border-radius:12px;background:#fff;box-shadow:0 16px 42px rgba(24,66,91,.24);border:1px solid #dce7ec;display:grid;z-index:30}.export-dropdown a,.export-dropdown button,.export-submenu>summary{border:0;border-radius:8px;background:transparent;color:#314b5a;padding:10px 11px;text-align:left;text-decoration:none;font-size:13px;font-weight:650}.export-dropdown a:hover,.export-dropdown button:hover,.export-submenu>summary:hover{background:#eaf4f9;color:var(--blue)}.export-submenu>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;cursor:pointer}.export-submenu>summary::after{content:"›";font-size:20px;line-height:12px;transition:transform .15s}.export-submenu[open]>summary{background:#eaf4f9;color:var(--blue)}.export-submenu[open]>summary::after{transform:rotate(90deg)}.export-submenu-items{display:grid;margin:2px 0 4px 10px;padding-left:7px;border-left:2px solid #d9eaf2}.export-submenu-items a,.export-dropdown button,.export-submenu-items button{font-family:inherit}.export-submenu-items a,.export-submenu-items button{padding:8px 10px;font-size:12px}.account-button{border:0;background:transparent;color:var(--ink);font-weight:650}.account-avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--blue);color:white;font-weight:800;box-shadow:0 4px 12px rgba(38,120,168,.25)}
.tree-view-switch{position:absolute;left:220px;top:50%;transform:translateY(-50%);display:flex;gap:5px;padding:4px;border:1px solid #d5e3e9;border-radius:11px;background:#edf3f6}.tree-view-switch button{width:42px;height:42px;padding:4px;border:0;border-radius:8px;background:transparent;color:#657681;display:grid;place-items:center}.tree-view-switch button img{width:34px;height:34px;object-fit:cover;border-radius:6px}.tree-view-switch button[data-tree-view="table"] img{object-fit:contain;background:#fff}.tree-view-switch button.active{background:#fff;color:#2678a8;box-shadow:0 3px 9px rgba(31,72,94,.12)}
.tree-view-switch a{width:42px;height:42px;padding:4px;border:0;border-radius:8px;background:transparent;display:grid;place-items:center;text-decoration:none}.tree-view-switch a img{width:34px;height:34px;object-fit:cover;border-radius:6px}.tree-view-switch a[href*="table"] img{object-fit:contain;background:#fff}.tree-view-switch a:hover{background:#fff;box-shadow:0 3px 9px rgba(31,72,94,.12)}
.background-switcher{position:absolute;right:calc(50% + 292px);top:50%;transform:translateY(-50%);width:300px;height:44px;display:grid;grid-template-columns:repeat(3,1fr);align-items:center;padding:3px;border:1px solid #d5e3e9;border-radius:22px;background:#edf3f6;box-shadow:0 4px 14px rgba(28,78,106,.1);overflow:hidden}.background-switch-indicator{position:absolute;left:3px;top:3px;width:calc((100% - 6px)/3);height:36px;border-radius:18px;background:#fff;box-shadow:0 3px 9px rgba(31,72,94,.15);transition:transform .22s ease}.background-switcher[data-theme="pink"] .background-switch-indicator{transform:translateX(100%);background:#eab1c7}.background-switcher[data-theme="dark"] .background-switch-indicator{transform:translateX(200%);background:#45484e}.background-switcher button{position:relative;z-index:1;height:36px;padding:0 8px;border:0;border-radius:18px;background:transparent;color:#5e6f79;font-size:11px;font-weight:800;white-space:nowrap}.background-switcher button.active{color:#2678a8}.background-switcher[data-theme="dark"] button.active{color:#fff}
.workspace{height:100%;padding-top:72px;position:relative}.intro{position:absolute;left:30px;top:102px;z-index:6;width:330px;padding:20px 22px;border-radius:18px;background:rgba(255,255,255,.74);backdrop-filter:blur(15px);box-shadow:0 12px 38px rgba(33,92,125,.15)}.kicker{text-transform:uppercase;letter-spacing:.15em;font-weight:800;font-size:11px;color:var(--blue);margin:0 0 6px}.intro h1{font:600 35px/1.05 Georgia,serif;margin:0 0 10px}.intro p:last-child{margin:0;color:var(--muted)}
  .branch-panel{position:absolute;left:30px;top:102px;z-index:7;width:286px;max-height:calc(100vh - 145px);overflow:auto;padding:18px;border-radius:18px;background:rgba(255,255,255,.84);backdrop-filter:blur(15px);box-shadow:0 12px 38px rgba(33,92,125,.18);transition:width .2s,padding .2s}.branch-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.branch-panel-heading .kicker{margin-bottom:6px}.branch-panel h2{font:600 27px/1.1 Georgia,serif;margin:0 0 14px}.branch-collapse-button{flex:0 0 34px;width:34px;height:34px;border:0;border-radius:10px;background:#e8f2f7;color:#2678a8;font:700 27px/1 Georgia,serif;cursor:pointer;transition:transform .2s,background .15s}.branch-collapse-button:hover{background:#d9edf6}.branch-panel.is-collapsed{width:132px;padding:12px 13px;overflow:hidden}.branch-panel.is-collapsed .branch-panel-heading{align-items:center}.branch-panel.is-collapsed .branch-panel-heading .kicker,.branch-panel.is-collapsed .branch-panel-content{display:none}.branch-panel.is-collapsed h2{font-size:21px;margin:0}.branch-panel.is-collapsed .branch-collapse-button{transform:rotate(180deg)}.branch-section-label{margin:16px 2px 8px;color:#657681;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.branch-toggle{width:100%;display:grid;grid-template-columns:14px 1fr 24px;align-items:center;gap:10px;border:0;border-radius:10px;background:rgba(239,246,249,.9);padding:11px 10px;color:#314551;text-align:left;font-weight:700}.branch-toggle+.branch-toggle{margin-top:8px}.branch-toggle:hover{background:#e6f2f7}.branch-color{width:12px;height:12px;border-radius:3px;box-shadow:0 0 0 2px rgba(0,0,0,.06)}.branch-color.main{background:#ffe000}.branch-color.additional{background:#14d95b}.branch-eye{position:relative;width:20px;height:13px;border:2px solid #3d6d86;border-radius:70% 15%;transform:rotate(45deg)}.branch-eye::after{content:"";position:absolute;width:6px;height:6px;border-radius:50%;background:#3d6d86;left:50%;top:50%;transform:translate(-50%,-50%)}.branch-toggle.is-off{opacity:.52}.branch-toggle.is-off .branch-eye::before{content:"";position:absolute;width:25px;border-top:2px solid #b14545;left:-5px;top:4px;transform:rotate(-90deg)}
.tree-viewport{position:absolute;inset:72px 0 0;overflow:hidden;cursor:grab}.tree-viewport.dragging{cursor:grabbing}.tree-stage{width:2200px;height:1300px;position:absolute;left:calc(50% - 1100px);top:calc(50% - 546px);transform-origin:0 0;will-change:transform}.connections{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.connections path{fill:none;stroke:#14d95b;stroke-width:5.5;stroke-linecap:square;stroke-linejoin:miter;filter:drop-shadow(0 1px 0 rgba(255,255,255,.78))}.connections path.main-line{stroke:#14d95b;stroke-width:6}.connections path.additional-line{stroke:#14d95b;stroke-width:5.5}
.tree-stage.is-centering{transition:transform .38s ease}.branch-search{width:100%;height:38px;margin:0 0 10px;padding:0 11px;border:1px solid #cbdde5;border-radius:9px;background:#fff;color:#314551;font-size:13px;outline:0}.branch-search:focus{border-color:#65a8c8;box-shadow:0 0 0 3px rgba(38,120,168,.12)}.branch-search-empty{margin:9px 0 0;padding:10px;text-align:center;color:#71838d;font-size:12px}.branch-main-only{width:100%;margin:9px 0 0;padding:9px 10px;border:1px solid #9ec9dc;border-radius:9px;background:#fff;color:#2678a8;font-size:12px;font-weight:800;cursor:pointer}.branch-main-only:hover{background:#eef8fc}.branch-main-only:disabled{opacity:.45;cursor:default}
.tree-card{position:absolute;width:190px;height:166px;padding:14px 14px 12px;border:3px solid rgba(255,255,255,.75);border-radius:4px;background:linear-gradient(145deg,var(--yellow),var(--yellow2));box-shadow:0 15px 36px rgba(47,79,90,.25);text-align:center;user-select:none;transition:transform .15s,box-shadow .15s,border-color .15s;z-index:2;overflow:visible}.tree-card:hover{transform:translateY(-3px)}.tree-card.selected{border-color:white;box-shadow:0 0 0 4px var(--blue),0 18px 42px rgba(38,80,105,.35)}.main-card-star{position:absolute;right:7px;top:5px;color:#fff;font:900 25px/1 Georgia,serif;text-shadow:0 2px 5px rgba(83,61,7,.45);pointer-events:none;z-index:3}.card-photo{width:48px;height:48px;margin:0 auto 8px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.75);font-weight:800;color:#7e651f;background-position:center;background-size:cover}.card-name{height:42px;display:flex;flex-direction:column;align-items:center;justify-content:center;font:700 17px/1.15 Georgia,serif}.card-last,.card-first{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tree-card small{display:block;margin-top:5px;color:#6d5a25}.relation-tag{position:absolute;top:-16px;left:50%;transform:translateX(-50%);width:max-content;max-width:154px;background:white;border-radius:3px;padding:2px 8px;color:var(--blue);font-size:10px;line-height:1.15;text-align:center;text-transform:uppercase;letter-spacing:.08em;font-weight:800;white-space:normal}.match-chain{position:absolute;left:7px;bottom:7px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--blue);font:700 18px/1 system-ui;box-shadow:0 3px 9px rgba(38,120,168,.3)}.card-edit{position:absolute;right:7px;bottom:7px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.92);color:#735916;font:700 17px/1 system-ui;box-shadow:0 3px 9px rgba(74,57,15,.18);opacity:.72;transition:opacity .15s,transform .15s}.tree-card:hover .card-edit,.tree-card.selected .card-edit{opacity:1}.card-edit:hover{transform:scale(1.08)}.card-delete{position:absolute;right:-10px;top:-11px;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#a63f39;font:700 19px/1 system-ui;box-shadow:0 3px 10px rgba(74,30,25,.2);opacity:.8;transition:opacity .15s,transform .15s}.tree-card:hover .card-delete,.tree-card.selected .card-delete{opacity:1}.card-delete:hover{transform:scale(1.1);background:#fff0ef}
.connections path.relationship-focus-line{stroke:#ffe000;stroke-width:11;pointer-events:none;filter:drop-shadow(0 0 4px #fff7a8) drop-shadow(0 0 10px #ffbf00);animation:relationshipGlow 1.25s ease-in-out infinite alternate}.tree-card.relationship-focus-card{border-color:#ffe000;box-shadow:0 0 0 5px rgba(255,224,0,.92),0 0 26px 10px rgba(255,184,0,.72),0 18px 42px rgba(38,80,105,.35)}@keyframes relationshipGlow{from{stroke-width:9;opacity:.82}to{stroke-width:13;opacity:1}}
  .tree-stage.branch-hover .connections path,.tree-stage.branch-hover .tree-card{opacity:.18}.tree-stage.branch-hover .connections path.branch-highlight{opacity:1;stroke-width:8;filter:drop-shadow(0 0 5px rgba(255,255,255,.95))}.tree-stage.branch-hover .tree-card.branch-highlight{opacity:1;filter:brightness(1.08);box-shadow:0 0 0 4px rgba(255,255,255,.92),0 18px 42px rgba(25,76,101,.38)}
  .tree-stage.branch-main-hover .connections path.additional-line{opacity:.035!important;filter:none!important}
.tree-stage.relationship-focus-active .connections path.branch-highlight{stroke:#ffe000!important;stroke-width:11!important;opacity:1!important;filter:drop-shadow(0 0 4px #fff7a8) drop-shadow(0 0 10px #ffbf00)!important;animation:relationshipGlow 1.25s ease-in-out infinite alternate}
.workspace-help{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:5;background:rgba(255,255,255,.75);backdrop-filter:blur(10px);border-radius:20px;padding:7px 15px;color:#50616d;font-size:12px}
.workspace.is-table-view>.intro,.workspace.is-table-view>.branch-panel,.workspace.is-table-view>.tree-viewport,.workspace.is-table-view>.workspace-help{display:none!important}.table-view{position:absolute;inset:72px 0 0;z-index:8;padding:18px 22px 22px;background:rgba(238,247,251,.96);overflow:hidden}.table-view-heading{height:54px;display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.table-view-heading h1{margin:0;font:600 27px/1.05 Georgia,serif}.table-view-heading .kicker{margin-bottom:3px}.table-save-status{padding-top:12px;color:#2d7b4b;font-size:13px;font-weight:750}.table-save-status.error{color:#bb4949}.family-table-scroll{height:calc(100% - 54px);overflow:auto;border:1px solid #ccdde5;border-radius:13px;background:#fff;box-shadow:0 10px 30px rgba(30,75,99,.1)}.family-table{width:100%;min-width:1820px;border-collapse:separate;border-spacing:0;table-layout:fixed}.family-table th,.family-table td{border-right:1px solid #dce7ec;border-bottom:1px solid #dce7ec;padding:7px;vertical-align:top}.family-table th{position:sticky;top:0;z-index:4;height:46px;background:#e5f1f6;color:#315264;text-align:left;font-size:12px;line-height:1.2}.family-table th:nth-child(1){width:58px}.family-table th:nth-child(2),.family-table th:nth-child(3),.family-table th:nth-child(4){width:160px}.family-table th:nth-child(5){width:145px}.family-table th:nth-child(6){width:245px}.family-table th:nth-child(7){width:225px}.family-table th:nth-child(8){width:270px}.family-table th:nth-child(9){width:125px}.family-table th:nth-child(10){width:135px}.family-table td:first-child,.family-table th:first-child{position:sticky;left:0;z-index:3}.family-table th:first-child{z-index:6}.family-table td:first-child{background:#f3f8fa}.family-table tr:hover td{background-color:#f8fcfd}.family-table tr:hover td:first-child{background:#eaf4f8}.table-number{text-align:center;color:#657681;font-weight:800;padding-top:16px!important}.family-table input{width:100%;min-width:0;height:37px;border:1px solid #ccdce3;border-radius:7px;background:#fff;color:#2e424e;padding:0 9px;font-size:12px;outline:0}.family-table input:focus{border-color:#3386b2;box-shadow:0 0 0 3px rgba(38,120,168,.12)}.family-table input[readonly]{background:#edf4f1;color:#557064;cursor:not-allowed}.table-parents,.table-children{display:grid;gap:6px}.table-spouse{min-width:0}.table-child-list{display:grid;gap:5px}.table-add-child{width:31px;height:29px;border:1px solid #8cbdd3;border-radius:7px;background:#edf8fc;color:#2678a8;font-size:20px;font-weight:800;line-height:1}.table-add-child:hover{background:#dff2fa}
.modal{width:min(570px,calc(100% - 28px));max-height:calc(100vh - 32px);overflow:auto;border:0;border-radius:20px;padding:30px;background:#fff;box-shadow:0 35px 100px rgba(17,51,70,.4)}.modal::backdrop{background:rgba(19,57,78,.48);backdrop-filter:blur(5px)}.modal-close{position:absolute;right:16px;top:14px;width:34px;height:34px;border:0;border-radius:50%;background:#eef2f4;font-size:22px;color:#65737d}.modal h2{font:600 30px/1.15 Georgia,serif;margin:6px 0}.modal-subtitle{color:var(--muted);margin:0 0 22px}.auth-tabs{display:flex;gap:5px;background:#eff3f5;padding:4px;border-radius:12px;margin-bottom:24px}.auth-tabs button{flex:1;border:0;border-radius:9px;padding:10px;background:transparent;color:var(--muted);font-weight:700}.auth-tabs button.active{background:white;color:var(--ink);box-shadow:0 3px 10px rgba(31,62,80,.1)}
.auth-form{display:grid;gap:14px}.register-grid{grid-template-columns:1fr 1fr}.auth-form label{display:grid;gap:6px;font-size:12px;color:var(--muted);font-weight:700}.auth-form input,.auth-form select,.auth-form textarea{width:100%;border:1px solid #d7e0e4;border-radius:9px;padding:11px 12px;outline:0;color:var(--ink);background:white}.auth-form input:focus,.auth-form select:focus,.auth-form textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(38,120,168,.12)}.wide{grid-column:1/-1}.primary{border:0;border-radius:10px;background:var(--blue);color:white;padding:12px 18px;font-weight:800}.primary.ghost{background:#edf3f6;color:var(--blue);margin-top:18px}.text-button{border:0;background:transparent;color:var(--blue);padding:4px}.form-error{min-height:18px;color:var(--danger);font-size:13px}.status{padding:13px;border-radius:10px;margin:20px 0}.status.pending{background:#fff4ce;color:#846516}.status.approved{background:#e5f5ea;color:#2b6d42}.status.rejected{background:#f9e5e5;color:#8d3737}.modal-heading{display:flex;gap:15px;align-items:center}.modal-icon{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:var(--blue);color:white;font-weight:900}.modal-icon.large{width:68px;height:68px;margin:0 auto 18px;font-size:26px}.modal-heading p{margin:0;color:var(--muted)}.modal-heading h2{font-size:24px}.relation-picker{border-top:1px solid #e4eaed;margin-top:22px;padding-top:16px}.relation-picker[data-person-panel="add"]{min-height:190px;margin-top:0;padding:8px 0 0;border-top:0}.relation-picker h3{margin:0 0 10px;font-size:14px}.relation-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.relation-buttons button{border:1px solid #dbe3e6;background:#f5f8f9;border-radius:8px;padding:8px;color:#40515d}.relation-buttons button:hover{background:#e7f2f7;border-color:#9dc5d9}.compact-modal{text-align:center;width:min(440px,calc(100% - 28px))}
.profile-editor-form{margin-top:22px}
.profile-card-lock{padding:10px 12px;border-radius:9px;background:#e8f6ed;color:#267044;font-size:12px;font-weight:750}.person-fields-grid input[readonly],.person-fields-grid select:disabled{background:#f0f4f2;color:#617069;cursor:not-allowed}
.person-modal-relation{margin-bottom:18px;font-weight:750;color:#2678a8}
.person-modal{height:min(820px,calc(100dvh - 12px));max-height:calc(100dvh - 12px);box-sizing:border-box;overflow:hidden}.person-modal[open]{display:flex;flex-direction:column}.person-modal #person-form{flex:1 1 auto;min-height:0;grid-template-rows:auto minmax(0,1fr) auto auto;align-content:stretch}.person-modal .profile-card-lock{grid-row:1}.person-modal .person-tab-panel{grid-row:2;min-height:0;align-self:stretch}.person-modal #person-form-error{grid-row:3;align-self:end}.person-modal #person-save-button{grid-row:4;align-self:end}.person-modal .person-tab-panel:not([hidden]){display:grid;align-content:start}.person-modal .personal-fields:not([hidden]),.person-modal .note-panel:not([hidden]),.person-modal .gen-panel:not([hidden]),.person-modal .relation-picker:not([hidden]){height:100%}.person-modal .note-panel{grid-template-rows:1fr 1fr;gap:14px}.person-modal .note-panel label{min-height:0}.person-modal .note-panel textarea{height:100%;min-height:120px;resize:none}@media(max-height:680px){.person-modal{height:calc(100dvh - 8px);max-height:calc(100dvh - 8px);padding-top:22px;padding-bottom:22px;overflow:auto}.person-modal[open]{display:block}.person-modal #person-form{display:grid}.person-modal .person-tab-panel:not([hidden]){height:auto}.person-modal .note-panel textarea{height:120px}}
.person-fields-grid #maiden-name-field.maiden-name-placeholder{visibility:hidden;pointer-events:none}
  .person-tabs{display:flex;gap:5px;background:#eff3f5;padding:4px;border-radius:12px;margin:-8px 0 20px}.person-tabs button{flex:1;border:0;border-radius:9px;padding:9px 12px;background:transparent;color:var(--muted);font-weight:750}.person-tabs button.active{background:#fff;color:var(--ink);box-shadow:0 3px 10px rgba(31,62,80,.1)}.person-tabs .person-add-tab{flex:0 0 44px;padding:0;color:#2678a8;font-size:25px;line-height:1}.person-tabs .person-add-tab.active{background:#2678a8;color:#fff}.person-fields-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.personal-fields{min-height:124px;padding:8px 2px}.photo-upload-row{display:grid;grid-template-columns:82px 1fr;align-items:center;gap:16px;margin-bottom:18px;padding:14px;border:1px solid #cfe1e9;border-radius:14px;background:linear-gradient(135deg,#f7fbfd,#eaf5fa)}.photo-preview{width:78px;height:78px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#ffdf7a,#f4bd31) center/cover no-repeat;color:#735916;font-size:11px;font-weight:850;border:3px solid #fff;box-shadow:0 0 0 2px #b9d7e4,0 7px 18px rgba(38,92,119,.16)}.photo-upload-field{color:#4d6572!important}.photo-upload-row small{display:block;margin-top:5px;font-weight:550;color:#7c8d96}.photo-upload-row .photo-file-input{width:100%;min-height:46px;padding:5px!important;border:1px dashed #79acc4!important;border-radius:10px!important;background:#fff!important;color:#71818a;font-size:12px;cursor:pointer}.photo-file-input::file-selector-button{height:34px;margin-right:10px;padding:0 14px;border:0;border-radius:7px;background:#2678a8;color:#fff;font:750 12px system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer;transition:background .15s,transform .15s}.photo-file-input:hover::file-selector-button{background:#1f6790}.photo-file-input:active::file-selector-button{transform:translateY(1px)}.photo-file-input:disabled{cursor:not-allowed;opacity:.65}.photo-file-input:disabled::file-selector-button{cursor:not-allowed;background:#8ba7b5}.person-details-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0 0 18px}.person-details-grid label{display:grid;gap:6px;font-size:12px;color:var(--muted);font-weight:700}.person-details-grid input{width:100%;border:1px solid #d7e0e4;border-radius:9px;padding:11px 12px;outline:0;color:var(--ink);background:#fff}.person-details-grid input:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(38,120,168,.12)}.deceased-check{display:flex!important;grid-template-columns:22px 1fr;align-items:center;justify-content:start;gap:9px!important;width:max-content;font-size:14px!important;color:var(--ink)!important}.deceased-check input{width:19px!important;height:19px;margin:0;accent-color:var(--blue)}#death-date-field{margin-top:16px;max-width:250px}.relation-buttons button:disabled{opacity:.45;cursor:not-allowed;background:#edf0f2}.gen-panel{min-height:170px}.gen-owner-relation{padding:15px 17px;border-radius:12px;background:#eaf5fa;color:#244c61;margin-bottom:14px}.gen-owner-relation small{display:block;margin-bottom:4px;color:#6c8491;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.gen-owner-relation strong{font:700 20px/1.2 Georgia,serif}.gen-relations{display:grid;gap:7px}.gen-relation-row{display:grid;grid-template-columns:130px 1fr;gap:12px;padding:9px 11px;border-radius:9px;background:#f5f8f9;color:#344b58;font-size:13px}.gen-relation-row span:first-child{font-weight:750;color:#2678a8}.gen-empty{padding:28px 15px;text-align:center;color:#7c8991;background:#f5f8f9;border-radius:12px}
.death-controls{display:flex;align-items:flex-end;justify-content:flex-end;gap:14px;margin-top:18px}.death-controls .deceased-check{height:43px;margin:0;padding:0 5px}.death-controls #death-date-field{display:grid;gap:6px;width:185px;max-width:none;margin:0;font-size:12px;color:var(--muted);font-weight:700}.death-controls #death-date-field input{width:100%;height:43px;border:1px solid #d7e0e4;border-radius:9px;padding:0 11px;background:#fff;color:var(--ink);outline:0}.death-controls #death-date-field input:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(38,120,168,.12)}.death-controls #death-date-field.is-disabled{color:#9ba6ac}.death-controls #death-date-field input:disabled{background:#edf1f3;color:#9ba6ac;cursor:not-allowed}
.password-wrap{position:relative;display:block}.password-wrap input{padding-right:48px}.password-toggle{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:38px;height:34px;border:0;background:transparent;border-radius:7px;display:grid;place-items:center;color:#667783}.password-toggle:hover{background:#edf3f6}.eye-icon{position:relative;width:18px;height:12px;border:2px solid currentColor;border-radius:70% 15%;transform:rotate(45deg)}.eye-icon::after{content:"";position:absolute;width:5px;height:5px;border-radius:50%;background:currentColor;left:50%;top:50%;transform:translate(-50%,-50%)}.password-toggle.visible .eye-icon::before{content:"";position:absolute;width:22px;border-top:2px solid currentColor;left:-4px;top:4px;transform:rotate(-90deg)}
  .admin-panel-button{width:100%;margin-top:14px}
  .chat-header-button{position:relative;width:48px;height:48px;border:1px solid rgba(38,120,168,.25);border-radius:12px;background:rgba(255,255,255,.82);color:var(--blue);font-size:29px;line-height:1;display:grid;place-items:center;cursor:pointer}.chat-header-button:hover{background:#fff;border-color:var(--blue)}.chat-header-button>span{display:grid;place-items:center;transform:translateY(-1px)}.chat-header-button b{position:absolute;right:-5px;top:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:12px;background:#d94d47;color:#fff;font:800 11px/20px system-ui;text-align:center;box-shadow:0 2px 7px rgba(110,30,26,.25)}
  .tree-search-results:has(.global-search-result){width:min(680px,calc(100vw - 30px));left:50%;right:auto;transform:translateX(-50%)}.global-search-result{padding:9px;border-radius:11px;background:#f6f9fa}.global-search-result+.global-search-result{margin-top:8px}.global-search-pair{display:grid;grid-template-columns:minmax(0,1fr) 35px minmax(0,1fr);align-items:center;gap:8px}.global-search-arrow{text-align:center;color:#2a7fae;font-size:22px;font-weight:800}.search-person-card{position:relative;min-height:84px;padding:11px 12px 10px 55px;border:1px solid #d9e5ea;border-radius:10px;background:#fff;color:#314854}.search-person-card.owner{border-color:#a9d0e1;background:#eef8fc;padding-right:44px}.search-person-avatar{position:absolute;left:10px;top:13px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#ffd15a center/cover;color:#725c1e;font-size:11px;font-weight:850}.search-person-card strong,.search-person-card small,.search-person-card em{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.search-person-card strong{font-size:13px}.search-person-card small{margin-top:3px;color:#74858f;font-size:11px}.search-person-card em{margin-top:5px;color:#2678a8;font-size:11px;font-style:normal;font-weight:750}.search-owner-message{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:31px;height:31px!important;padding:0!important;border-radius:50%!important;background:#2678a8!important;color:#fff!important;text-align:center!important;font-size:15px!important;display:grid;place-items:center}.search-owner-message:hover{background:#1f6790!important}
  .chat-modal{width:min(900px,calc(100% - 28px));padding:26px 28px}.chat-title-row{display:flex;gap:12px;align-items:center;margin-right:40px}.chat-title-row h2{margin:0}.chat-title-row p{margin:3px 0 0;color:var(--muted);font-size:13px}.chat-title-icon{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;background:#2678a8;color:#fff;font-size:20px}.chat-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:12px;margin-top:18px}.chat-sidebar{height:436px;overflow:auto;padding:10px;border:1px solid #dbe5e9;border-radius:14px;background:#f5f9fb}.chat-sidebar-heading{padding:3px 5px 8px;color:#66808e;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.chat-conversations-heading{margin-top:14px;padding-top:12px;border-top:1px solid #dbe5e9}.chat-match-notifications,.chat-contacts{display:grid;gap:7px;margin:0;padding:0;overflow:visible}.match-notification{position:relative;width:100%;min-height:62px;display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:9px;padding:8px 30px 8px 8px;border:1px solid #d8e4e9;border-radius:11px;background:#fff;color:#344b58;text-align:left}.match-notification:hover,.match-notification.unread{border-color:#8fc4dc;background:#eaf6fb}.match-notification img{width:44px;height:44px;border-radius:10px;object-fit:contain;background:#111}.match-notification span{min-width:0;display:grid;gap:2px}.match-notification strong,.match-notification small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.match-notification strong{font-size:12px}.match-notification small{color:#71848e;font-size:10px}.match-notification b{position:absolute;right:7px;top:7px;min-width:19px;height:19px;border-radius:10px;background:#d94d47;color:#fff;font:800 10px/19px system-ui;text-align:center;box-shadow:0 2px 6px rgba(110,30,26,.24)}.chat-contact{position:relative;width:100%;max-width:none;border:1px solid #d8e4e9;border-radius:10px;background:#fff;padding:10px 32px 10px 11px;color:#344b58;text-align:left;font-size:12px;font-weight:750}.chat-contact.active,.chat-contact:hover{background:#e4f3fa;border-color:#91c3db}.chat-contact b{position:absolute;right:8px;top:50%;transform:translateY(-50%);min-width:19px;height:19px;border-radius:10px;background:#d94d47;color:#fff;font:800 10px/19px system-ui;text-align:center}.chat-thread{height:436px;border:1px solid #dbe5e9;border-radius:14px;background:#f7fafb;overflow:hidden}.chat-thread-empty{padding:54px 30px;text-align:center;color:#7b8b94}.chat-active h3{margin:0;padding:12px 16px;border-bottom:1px solid #dbe5e9;background:#fff;font-size:15px}.chat-messages{height:330px;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:15px}.chat-message{max-width:78%;padding:9px 11px;border-radius:12px 12px 12px 3px;background:#fff;box-shadow:0 2px 7px rgba(31,72,94,.09);white-space:pre-wrap;overflow-wrap:anywhere;color:#334954;font-size:13px}.chat-message.mine{align-self:flex-end;border-radius:12px 12px 3px 12px;background:#dff2fb}.chat-message time{display:block;margin-top:4px;color:#87959d;font-size:9px;text-align:right}.chat-compose{display:grid;grid-template-columns:1fr auto;gap:8px;padding:11px;border-top:1px solid #dbe5e9;background:#fff}.chat-compose textarea{resize:none;border:1px solid #ccdbe2;border-radius:9px;padding:10px 11px;outline:0}.chat-compose textarea:focus{border-color:#2678a8;box-shadow:0 0 0 3px rgba(38,120,168,.11)}.chat-compose .primary{align-self:stretch}.chat-error{min-height:18px;padding:0 12px 6px;background:#fff;color:#d14943;font-size:11px}.match-profile-preview{height:100%;padding:28px;display:grid;place-items:center}.match-profile-card{width:min(360px,100%);padding:25px;text-align:center;border:1px solid #cfe2ea;border-radius:18px;background:#fff;box-shadow:0 12px 35px rgba(28,78,106,.11)}.match-profile-avatar{width:94px;height:94px;margin:0 auto 12px;padding:0;display:grid;place-items:center;overflow:hidden;border:4px solid #fff;border-radius:50%;background:linear-gradient(145deg,#ffdf7a,#f4bd31);color:#705715;font-size:23px;font-weight:900;box-shadow:0 0 0 2px #9cc9dc,0 10px 24px rgba(38,92,119,.2)}.match-profile-avatar:hover{transform:translateY(-2px);box-shadow:0 0 0 3px #2678a8,0 12px 28px rgba(38,92,119,.25)}.match-profile-avatar img{width:100%;height:100%;object-fit:cover}.match-profile-card h3{margin:0;color:#2e4653;font:700 22px/1.2 Georgia,serif}.match-profile-city{margin:6px 0 0;color:#748690;font-size:12px}.match-profile-message{margin:18px 0;color:#425a67;font-size:14px}.match-profile-link{border:0;background:transparent;color:#2678a8;font-size:13px;font-weight:800;text-decoration:underline}.chat-profile-loading{color:#71838d}
  .chat-modal[open]{height:min(620px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr)}.chat-modal[open] .chat-layout{min-height:0}.chat-modal[open] .chat-sidebar,.chat-modal[open] .chat-thread{height:100%;min-height:0}.chat-modal[open] .chat-active:not([hidden]){height:100%;min-height:0;display:flex;flex-direction:column}.chat-modal[open] .chat-messages{height:auto;min-height:0;flex:1 1 auto}.chat-modal[open] .chat-compose{min-height:76px;grid-template-columns:minmax(260px,560px) auto;align-items:stretch;justify-content:center;padding:12px 20px}.chat-modal[open] .chat-compose textarea{min-width:0;height:64px;max-height:64px}.chat-modal[open] .chat-compose .primary{height:64px;min-height:64px;align-self:center}.chat-active-heading{display:grid;grid-template-columns:minmax(0,1fr) 48px;border-bottom:1px solid #dbe5e9;background:#fff}.chat-active-name{width:100%;margin:0;padding:12px 16px;border:0;background:#fff;color:#202b31;text-align:left;font-size:17px;font-weight:850;cursor:pointer}.chat-active-name:hover,.chat-active-name.can-view-tree{background:#eaf6fb;color:#2678a8}.chat-add-friend{width:38px;height:38px;align-self:center;justify-self:center;padding:0;border:1px solid #9fc8dc;border-radius:10px;background:#eef8fc;color:#2678a8;font:900 25px/34px system-ui}.chat-add-friend:hover{background:#2678a8;color:#fff}.chat-add-friend.is-friend{border-color:#9acbab;background:#e8f7ed;color:#23834a;font-size:0;cursor:default}.chat-add-friend.is-friend::after{content:"✓";font:900 20px/34px system-ui}.chat-tree-access{display:flex;align-items:center;gap:7px;min-height:38px;padding:7px 12px;border-bottom:1px solid #dbe5e9;background:#fff8dc;color:#705d1e;font-size:12px;font-weight:750}.chat-tree-access span{margin-right:auto}.chat-tree-access button{border:0;border-radius:7px;padding:6px 9px;color:#fff;font-weight:800}.chat-tree-access .allow{background:#258651}.chat-tree-access .reject{background:#c6524c}.chat-tree-access[hidden]{display:none!important}
  .chat-title-row p{font-size:14px;font-weight:600}.chat-sidebar-heading{font-size:13px;font-weight:900}.match-notification strong{font-size:14px;font-weight:850}.match-notification small{font-size:12px;font-weight:650}.chat-contact{font-size:14px;font-weight:800}.chat-active h3{font-size:17px;font-weight:850}.chat-message{font-size:16px;line-height:1.4;font-weight:650}.chat-message time{font-size:11px;font-weight:650}.chat-compose textarea{font-size:16px;line-height:1.35;font-weight:600}.chat-compose .primary{font-size:16px;font-weight:850}.chat-thread-empty{font-size:14px;font-weight:600}
.note-panel{min-height:210px;display:grid;gap:15px}.note-panel label{display:grid;gap:7px}.note-panel textarea{min-height:135px;resize:vertical;line-height:1.45}.menu-logout-form{display:contents}.registration-toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:80;max-width:calc(100vw - 32px);padding:13px 20px;border-radius:12px;background:#2678a8;color:#fff;font-weight:750;box-shadow:0 12px 30px rgba(20,65,90,.3)}.registration-toast[hidden]{display:none}
.family-table th:nth-child(5),.family-table td:nth-child(5){width:112px!important;min-width:112px!important;max-width:112px!important}.table-relation-control{position:relative;min-width:0}.table-relation-control:has(.table-create-person:not([hidden])) input{padding-right:39px}.table-create-person{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:27px;height:27px;padding:0;border:0;border-radius:7px;background:#25a85a;color:#fff;font:900 20px/27px system-ui;box-shadow:0 3px 8px rgba(26,119,64,.22)}.table-create-person:hover{background:#198b48;transform:translateY(-50%) scale(1.05)}.table-relative-modal{width:min(620px,calc(100% - 28px))}.table-relative-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0;padding:12px;border-radius:13px;background:#eef5f7}.table-relative-choices button{border:1px solid #cbdce3;border-radius:9px;background:#fff;color:#38515e;padding:10px;font-weight:750}.table-relative-choices button:hover:not(:disabled),.table-relative-choices button.active{border-color:#25a85a;background:#e5f6ec;color:#16723a;box-shadow:0 0 0 2px rgba(37,168,90,.12)}.table-relative-choices button:disabled{opacity:.38;cursor:not-allowed}.table-relative-form.awaiting-relation label{opacity:.48}.table-relative-form.awaiting-relation input,.table-relative-form.awaiting-relation select{pointer-events:none;background:#f1f4f5}.table-relative-form{padding-top:4px}
@media(max-width:1400px){.background-switcher{position:fixed;right:16px;top:82px;transform:none;z-index:19}}@media(max-width:1100px){.tree-view-switch{left:184px}.tree-search{width:min(430px,40vw)}}@media(max-width:900px){.tree-search{width:min(400px,45vw);grid-template-columns:1fr}.tree-search select{display:none}}@media(max-width:700px){.app-header{padding:0 10px;height:62px}.logo strong,.account-button>span:last-child{display:none}.logo span{width:42px;height:42px}.header-actions{gap:5px}.tree-view-switch{left:64px}.tree-search{left:164px;right:118px;width:auto;transform:translateY(-50%)}.tree-search input{height:34px}.background-switcher{right:10px;top:70px;width:270px}.background-switcher button{font-size:10px}.export-menu summary{padding:6px 8px;font-size:11px}.account-export summary{max-width:116px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.export-dropdown{right:-48px}.workspace{padding-top:62px}.tree-viewport{inset:62px 0 0}.table-view{inset:62px 0 0;padding:12px}.intro,.branch-panel{left:12px;right:12px;top:76px;width:auto;padding:14px 16px}.intro h1{font-size:27px}.intro p:last-child{font-size:13px}.branch-panel h2{font-size:23px}.workspace-help{display:none}.tree-card{width:165px}.register-grid,.person-fields-grid,.person-details-grid{grid-template-columns:1fr}.wide{grid-column:auto}.person-tab-panel.wide{grid-column:1/-1}.relation-buttons{grid-template-columns:repeat(2,1fr)}.modal{padding:25px 20px}}

.layout-editor-button span{font:800 24px/1 system-ui;color:#2678a8}
.tree-view-switch .layout-editor-button.active{background:#e3f7e9;box-shadow:inset 0 0 0 2px #2caa60,0 3px 9px rgba(31,72,94,.12)}
.tree-view-switch .layout-editor-button.active span{color:#198b49}
.tree-stage::before{display:none}
.tree-viewport::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;opacity:0;background-image:linear-gradient(to right,rgba(255,255,255,.28) 1px,transparent 1px),linear-gradient(to bottom,rgba(255,255,255,.28) 1px,transparent 1px);background-size:var(--editor-grid-x,95px) var(--editor-grid-y,83px);background-position:var(--editor-grid-left,0) var(--editor-grid-top,0);transition:opacity .15s}
.workspace.layout-editing .tree-viewport::before{opacity:1}
.workspace.layout-editing .tree-viewport{background:#000}
.tree-stage{z-index:1}
.connections{z-index:1}
.workspace.layout-editing .tree-card{cursor:grab;touch-action:none}
.workspace.layout-editing .tree-card:hover{transform:none}
.workspace.layout-editing .tree-card .card-edit,.workspace.layout-editing .tree-card .card-delete{pointer-events:none;opacity:.22}
.workspace.layout-editing .tree-card .card-edit{pointer-events:auto;opacity:1}
.workspace.layout-editing .tree-card.layout-selected{border-color:#fff;box-shadow:0 0 0 5px #fff,0 0 22px rgba(255,255,255,.82),0 18px 42px rgba(0,0,0,.68)}
.connections path.life-selected-line{stroke:#168eea!important;stroke-width:8!important;opacity:1!important;filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 7px rgba(255,255,255,.98)) drop-shadow(0 0 12px rgba(22,142,234,.9))!important}
.workspace.layout-card-dragging .tree-card.is-layout-dragging{cursor:grabbing;z-index:9;transition:none;transform:none}
.layout-selection-box{position:absolute;z-index:10;pointer-events:none;border:2px solid #fff;background:rgba(38,120,168,.18);box-shadow:0 0 0 1px #2678a8,0 5px 18px rgba(27,84,114,.18)}
.layout-eye-slot{position:absolute;width:190px;height:166px;z-index:1;pointer-events:none;border:3px solid #ffe24a;border-radius:6px;background:linear-gradient(to right,rgba(255,222,32,.24) 0 94px,rgba(255,246,151,.74) 94px 96px,rgba(255,222,32,.24) 96px 100%);box-shadow:0 0 0 3px rgba(255,193,7,.34),0 0 24px 8px rgba(255,209,35,.62),inset 0 0 22px rgba(255,244,128,.6);animation:layoutEyePulse .9s ease-in-out infinite alternate}@keyframes layoutEyePulse{from{opacity:.62}to{opacity:1}}
.tree-view-switch .layout-tool-button[hidden]{display:none!important}
.tree-view-switch .layout-tool-button span{font:800 24px/1 system-ui;color:#2678a8}
.tree-view-switch .layout-tool-button.active{background:#fff;box-shadow:inset 0 0 0 2px #2678a8,0 3px 9px rgba(31,72,94,.12)}
.workspace.layout-pencil-mode .tree-card{cursor:crosshair}
.workspace.layout-pencil-mode .tree-card.manual-connection-start{border-color:#fff;box-shadow:0 0 0 6px #ff9f1a,0 0 28px rgba(255,159,26,.85)}
.connections path.manual-line{fill:none;stroke:#14d95b;stroke-width:5.5;stroke-linecap:square;stroke-linejoin:miter;filter:drop-shadow(0 1px 0 rgba(255,255,255,.78))}
.tree-view-switch .eraser-symbol{display:block;transform:rotate(-32deg);color:#d55c4c}
.workspace.layout-eraser-mode .connections{z-index:7}
.workspace.layout-eraser-mode .connections path{pointer-events:stroke;cursor:not-allowed}
.workspace.layout-eraser-mode .tree-card{pointer-events:none;opacity:.82}
.tree-view-switch .stencil-symbol{display:grid;width:38px;height:38px;place-items:center;border:2px dashed #2678a8;border-radius:8px;background:rgba(232,246,252,.85);color:#2678a8!important;font:900 27px/1 system-ui!important}
.tree-view-switch .history-symbol{display:grid;width:42px;height:42px;place-items:center;border-radius:9px;background:#edf8fc;font:800 17px/1 "Segoe UI Emoji",system-ui;letter-spacing:-7px;padding-right:7px}
.tree-stage.same-blood-focus .tree-card,.tree-stage.same-blood-focus .connections path{opacity:.13}.tree-stage.same-blood-focus .tree-card:not(.same-blood-visible){pointer-events:none}.tree-stage.same-blood-focus .tree-card.same-blood-visible{opacity:1}.tree-stage.same-blood-focus .connections path.same-blood-visible-line{opacity:1}.tree-stage.same-blood-focus .connections path:not(.same-blood-visible-line){opacity:.13!important;filter:none!important}
.layout-history-modal{height:min(620px,calc(100vh - 32px))}.layout-history-list{display:grid;gap:9px;max-height:440px;overflow:auto;padding:2px}.layout-history-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:11px 12px;border-radius:11px;background:#f0f6f8}.layout-history-row strong,.layout-history-row small,.layout-history-members{display:block}.layout-history-members{max-width:390px;margin-top:4px;color:#3f5d6b;font-size:12px;line-height:1.35}.layout-history-row small{margin-top:3px;color:#71838e}.layout-history-row button{border:1px solid #9fc9dc;border-radius:8px;background:#fff;color:#2678a8;padding:8px 11px;font-weight:800}.layout-history-row button:hover{background:#e6f5fb}.layout-history-empty{padding:35px;text-align:center;color:#758691;background:#f3f7f9;border-radius:12px}
.workspace.layout-stencil-mode .tree-card{cursor:grab}
.layout-stencil-card{position:absolute;width:190px;height:166px;z-index:1;pointer-events:none;border:4px dashed rgba(255,255,255,.96);border-radius:5px;background:repeating-linear-gradient(135deg,rgba(38,120,168,.22) 0 10px,rgba(255,255,255,.16) 10px 20px);box-shadow:0 0 0 3px rgba(38,120,168,.88),0 0 28px rgba(255,255,255,.75)}
.layout-stencil-card::before{content:"ПРЕЖНЕЕ МЕСТО";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max-content;padding:5px 9px;border-radius:7px;background:#2678a8;color:#fff;font-size:10px;font-weight:900;letter-spacing:.08em}
.layout-stencil-card>span{position:absolute;left:50%;top:calc(50% + 32px);transform:translateX(-50%);max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px 7px;border-radius:6px;background:rgba(255,255,255,.92);color:#315364;font-size:10px;font-weight:800}
.layout-save-status{position:absolute;left:calc(100% + 9px);top:50%;transform:translateY(-50%);width:max-content;padding:7px 10px;border-radius:9px;background:#fff;color:#526773;font-size:12px;font-weight:800;box-shadow:0 4px 14px rgba(30,70,92,.16)}
.layout-save-status.saving{color:#2678a8}.layout-save-status.saved{color:#20884a;background:#e8f8ee}.layout-save-status.error{color:#b4423c;background:#fff0ef}
@media(max-width:700px){.chat-modal{padding:22px 16px}.chat-modal[open]{display:block;height:auto;max-height:calc(100dvh - 20px);overflow:auto}.chat-layout{grid-template-columns:1fr}.chat-sidebar{height:auto!important;max-height:190px}.chat-thread{height:380px!important}.chat-messages{height:274px}.chat-modal[open] .chat-compose{grid-template-columns:1fr;padding:10px}.chat-tree-access{flex-wrap:wrap}.chat-tree-access span{flex:1 0 100%}.match-profile-preview{padding:16px}.match-profile-card{padding:18px}.match-profile-avatar{width:78px;height:78px}}

/* Панель вида и всплывающие инструменты редактора */
.logo span{width:48px;height:48px;border-radius:12px}
.tree-view-switch{gap:7px;padding:4px 6px;overflow:visible}
.tree-view-group{display:flex;align-items:center;gap:4px}
.tree-view-separator{display:grid;place-items:center;height:38px;padding:0 2px;color:#9aabb4;font-size:23px;font-weight:300;line-height:1}
.tree-view-switch button{width:48px;height:48px;padding:3px}
.tree-view-switch button img{width:40px;height:40px;object-fit:cover;border-radius:8px}
.tree-view-switch a{width:48px;height:48px;padding:3px}
.tree-view-switch a img{width:40px;height:40px;object-fit:cover;border-radius:8px}
.tree-view-switch button[data-tree-view="table"] img{object-fit:cover;background:transparent}
.layout-editor-wrap{position:relative}
.layout-tools-popover{position:absolute;left:50%;top:calc(100% + 13px);transform:translateX(-50%);display:flex;flex-direction:column;gap:7px;padding:8px;border:1px solid #d6e3e9;border-radius:13px;background:#fff;box-shadow:0 16px 38px rgba(25,67,91,.25);z-index:40}
.layout-tools-popover::before{content:"";position:absolute;left:50%;top:-7px;width:13px;height:13px;transform:translateX(-50%) rotate(45deg);background:#fff;border-left:1px solid #d6e3e9;border-top:1px solid #d6e3e9}
.layout-tools-row{display:flex;justify-content:center;gap:7px}.layout-tools-expert{padding-top:0;border-top:0;flex-wrap:nowrap;max-width:none}
.layout-tools-popover .layout-tool-button{position:relative;width:52px;height:52px;padding:3px}
.layout-tools-popover .layout-tool-button img{width:44px;height:44px;object-fit:cover;border-radius:9px}
.layout-tools-popover .layout-tool-button.active{background:#e9f6fb;box-shadow:inset 0 0 0 2px #2678a8}
.workspace.layout-magnet-mode .tree-viewport,.workspace.layout-magnet-mode .tree-card{cursor:crosshair!important}
.connection-relation-modal{width:min(560px,calc(100vw - 28px))}
.connection-relation-modal h2{margin-bottom:8px}
.connection-relation-modal .modal-subtitle strong{color:#2678a8}
.connection-relation-hint{margin:18px 0 10px;color:#516672;font-size:13px;font-weight:750}
.connection-relation-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.connection-relation-buttons button{min-height:44px;border:1px solid #ccdde5;border-radius:10px;background:#f3f7f9;color:#304955;font-weight:750}
.connection-relation-buttons button:hover{border-color:#2678a8;background:#e7f4fa;color:#1f6d98}
.connection-relation-cancel{width:100%;margin-top:14px;min-height:42px;border:0;border-radius:10px;background:#edf1f3;color:#526773;font-weight:750}
@media(max-width:700px){
 .tree-app-header>.header-actions{position:absolute;right:10px;top:50%;transform:translateY(-50%)}
  .logo span{width:46px;height:46px}
  .tree-view-switch button{width:42px;height:42px}
  .tree-view-switch button img{width:35px;height:35px}
  .tree-view-separator{height:34px;font-size:20px}
  .layout-tools-popover{left:auto;right:-6px;transform:none}
  .layout-tools-popover::before{left:auto;right:23px;transform:rotate(45deg)}
}
.table-number{cursor:pointer}
.table-number:hover{color:#2678a8;text-decoration:underline}

/* Публичная демонстрационная семья */
.demo-family-banner{position:fixed;z-index:18;top:82px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:18px;padding:10px 12px 10px 15px;border:1px solid rgba(255,255,255,.72);border-radius:14px;background:rgba(255,255,255,.92);box-shadow:0 10px 28px rgba(24,72,97,.18);backdrop-filter:blur(12px)}
.demo-family-banner>div{display:grid;grid-template-columns:auto auto;align-items:center;column-gap:8px;min-width:max-content}
.demo-family-banner strong{color:#263f4c;font:700 16px/1.15 Georgia,serif}
.demo-family-banner small{grid-column:2;color:#71838d;font-size:11px}
.demo-family-label{grid-row:1/3;padding:5px 7px;border-radius:7px;background:#ffd15a;color:#725817;font-size:9px;font-weight:900;letter-spacing:.08em}
.demo-register-button{min-height:38px;padding:0 15px;border:0;border-radius:9px;background:#2678a8;color:#fff;font-size:12px;font-weight:800;white-space:nowrap;cursor:pointer;box-shadow:0 5px 13px rgba(38,120,168,.25)}
.demo-register-button:hover{background:#1e6893;transform:translateY(-1px)}
.card-details{font:900 14px/27px Georgia,serif!important}
.demo-hints{position:fixed;inset:0;z-index:17;pointer-events:none}
.demo-hint-cloud{position:absolute;width:300px;padding:20px 22px 21px;border:3px solid rgba(255,255,255,.96);border-radius:30px 30px 30px 10px;background:rgba(255,255,255,.94);color:#405865;box-shadow:0 15px 38px rgba(28,76,100,.2);backdrop-filter:blur(12px)}
.demo-hint-cloud[hidden]{display:none!important}
.demo-hint-close{position:absolute;z-index:2;right:9px;top:8px;width:27px;height:27px;padding:0;border:0;border-radius:50%;background:#e9f3f7;color:#2678a8;font:800 20px/25px system-ui;cursor:pointer;pointer-events:auto;box-shadow:0 2px 7px rgba(28,76,100,.14)}
.demo-hint-close:hover{background:#2678a8;color:#fff;transform:scale(1.06)}
.demo-hint-cloud::after{content:"";position:absolute;width:24px;height:24px;border-right:3px solid rgba(255,255,255,.96);border-bottom:3px solid rgba(255,255,255,.96);background:rgba(255,255,255,.94);transform:rotate(45deg);border-radius:0 0 7px 0}

.header-actions{gap:10px}
.background-switcher{position:relative;right:auto;top:auto;transform:none;flex:0 0 112px;width:112px;height:48px;grid-template-columns:repeat(2,1fr);padding:3px;border:1px solid rgba(38,120,168,.25);border-radius:12px;background:rgba(255,255,255,.82);box-shadow:none}
.background-switch-indicator{top:3px;height:40px;width:calc((100% - 6px)/2);border-radius:9px}
.background-switcher[data-theme="dark"] .background-switch-indicator{transform:translateX(100%)}
.background-switcher button{height:40px;padding:0;border-radius:9px}
.background-switcher button img{width:34px;height:34px;display:block;margin:auto;border-radius:50%;object-fit:cover}
.chat-header-button,.friends-header-button,.account-export>summary{height:48px;min-height:48px;border-radius:12px}.friends-header-button{width:48px;padding:4px;border:1px solid rgba(38,120,168,.25);background:rgba(255,255,255,.82);display:grid;place-items:center;overflow:hidden}.friends-header-button:hover{border-color:#2678a8;background:#fff;box-shadow:0 4px 13px rgba(38,120,168,.16)}.friends-header-button img{width:38px;height:38px;border-radius:8px;object-fit:cover}
.account-export>summary{position:relative;gap:8px}.application-count-badge{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:21px;padding:0 6px;border-radius:999px;background:#e32636;color:#fff;font:800 12px/1 system-ui,sans-serif;box-shadow:0 2px 7px rgba(174,19,34,.32)}.account-summary-badge{position:absolute;right:-9px;top:-9px}.account-applications-link{display:flex!important;align-items:center;justify-content:space-between;gap:10px}.account-menu-badge{display:none}.account-export[open]>summary .account-summary-badge{display:none}.account-export[open] .account-menu-badge{display:inline-flex}
.readonly-tree-banner{position:fixed;z-index:24;left:50%;top:82px;transform:translateX(-50%);max-width:min(620px,calc(100vw - 32px));padding:9px 16px;border:1px solid rgba(38,120,168,.35);border-radius:12px;background:rgba(255,255,255,.94);color:#38525f;font-size:13px;box-shadow:0 8px 24px rgba(25,70,94,.18);backdrop-filter:blur(8px)}.readonly-tree-banner strong{color:#2678a8}
.tree-viewers-widget{position:fixed;z-index:34;right:18px;top:82px}.tree-viewers-widget[hidden]{display:none}.tree-viewers-button{position:relative;width:58px;height:58px;padding:4px;border:2px solid #f7c948;border-radius:18px;background:#111;box-shadow:0 8px 24px rgba(0,0,0,.25),0 0 18px rgba(255,208,57,.45);cursor:pointer;overflow:visible}.tree-viewers-button img{width:100%;height:100%;display:block;border-radius:12px;object-fit:cover}.tree-viewers-button b{position:absolute;right:-7px;top:-7px;min-width:23px;height:23px;padding:0 5px;border:2px solid #fff;border-radius:13px;background:#d8403a;color:#fff;font:900 12px/19px system-ui;text-align:center}.tree-viewers-popover{position:absolute;right:0;top:68px;width:min(310px,calc(100vw - 36px));padding:14px;border:1px solid #d5e3e9;border-radius:15px;background:rgba(255,255,255,.97);color:#344b58;box-shadow:0 14px 36px rgba(20,58,78,.22);backdrop-filter:blur(10px)}.tree-viewers-popover[hidden]{display:none}.tree-viewers-popover>strong{display:block;margin-bottom:9px;color:#2678a8;font-size:14px}.tree-viewers-popover ul{display:grid;gap:6px;margin:0;padding:0;list-style:none}.tree-viewers-popover li{padding:8px 10px;border-radius:9px;background:#eef6f9;font-size:13px;font-weight:800}
.friends-drawer{position:fixed;z-index:36;right:0;top:72px;width:min(350px,calc(100vw - 20px));height:calc(100dvh - 72px);padding:22px 17px;border:0;border-left:1px solid #d4e2e8;border-radius:18px 0 0 18px;background:rgba(255,255,255,.97);box-shadow:-14px 0 38px rgba(20,58,78,.18);backdrop-filter:blur(12px);overflow:hidden}.friends-title-row{display:flex;align-items:center;gap:12px;margin:0 38px 18px 0}.friends-title-row>img{width:52px;height:52px;border-radius:12px;object-fit:cover;background:#111}.friends-title-row h2,.friends-title-row p{margin:0}.friends-title-row h2{font:700 27px/1.1 Georgia,serif}.friends-title-row p{margin-top:3px;color:#71838d;font-size:11px;line-height:1.3}.friends-list{display:grid;align-content:start;gap:9px;max-height:calc(100dvh - 190px);overflow:auto;padding:3px}.friends-row{display:grid;grid-template-columns:minmax(0,1fr) 42px 42px;align-items:center;gap:7px;padding:9px;border:1px solid #d8e4e9;border-radius:12px;background:#f3f8fa}.friends-row-info{min-width:0;display:grid;gap:2px}.friends-row-info strong,.friends-row-info small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.friends-row-info strong{color:#304955;font-size:13px}.friends-row-info small{color:#748690;font-size:10px}.friends-action{width:42px;height:42px;padding:4px;border:1px solid #bcd6e2;border-radius:10px;background:#fff;color:#2678a8;display:grid;place-items:center}.friends-action:hover:not(:disabled){border-color:#2678a8;background:#eaf6fb;transform:translateY(-1px)}.friends-action:disabled{opacity:.35;cursor:not-allowed}.friends-action img{width:32px;height:32px;border-radius:7px;object-fit:cover}.friends-message-icon{font:900 23px/1 system-ui}.friends-empty{padding:45px 14px;text-align:center;color:#71838d;background:#f3f8fa;border-radius:13px}.friends-error{min-height:20px;margin-top:8px;color:#d14943;font-size:12px}
.friends-drawer{left:auto;right:18px;top:84px;width:min(420px,calc(100vw - 20px));height:min(460px,calc(100dvh - 102px));max-height:none;padding:22px 17px;border:1px solid #d4e2e8;border-radius:14px;box-shadow:0 18px 50px rgba(20,58,78,.25);display:flex;flex-direction:column}.friends-title-row{flex:0 0 auto;cursor:grab;touch-action:none;user-select:none}.friends-drawer.is-dragging .friends-title-row{cursor:grabbing}.friends-drawer.is-dragging{box-shadow:0 24px 58px rgba(20,58,78,.34)}.friends-list{flex:1 1 auto;min-height:0;max-height:none}.friends-error{flex:0 0 auto}
.friends-row{cursor:context-menu}.friends-row .friends-action{cursor:pointer}.friends-row-info strong{cursor:inherit}.friends-row.has-incoming-request{border-color:#efc263;background:#fff8df}.friends-answer{padding:0;font-size:12px;font-weight:900}.friends-answer.allow{border-color:#74bd8c;background:#e7f7ec;color:#18753a}.friends-answer.allow:hover:not(:disabled){border-color:#23894a;background:#d5f1df}.friends-answer.reject{border-color:#e0a09c;background:#fff0ef;color:#a73c36}.friends-answer.reject:hover:not(:disabled){border-color:#c6524c;background:#ffe0de}.friend-context-menu{position:fixed;z-index:90;min-width:230px;padding:6px;border:1px solid #cddde4;border-radius:11px;background:#fff;box-shadow:0 14px 34px rgba(18,54,73,.28)}.friend-context-menu button{width:100%;padding:10px 12px;border:0;border-radius:8px;background:transparent;color:#304955;text-align:left;font-size:13px;font-weight:800}.friend-context-menu button:hover:not(:disabled){background:#e8f5fb;color:#2678a8}.friend-context-menu button:disabled{color:#94a1a8;cursor:default}
.friend-context-divider{height:1px;margin:5px 4px 7px;background:#dbe7ec}.friend-context-title{display:block;padding:0 7px 6px;color:#6f838e;font-size:11px;text-transform:uppercase}.friend-relation-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;max-height:min(310px,calc(100dvh - 150px));overflow:auto}.friend-relation-options button{padding:7px 9px}.friend-relation-options button.active{background:#e4f6eb;color:#18753a;box-shadow:inset 0 0 0 1px #89cda0}.friends-relation-status{overflow:hidden;color:#22934d;font-size:11px;font-style:normal;font-weight:900;text-overflow:ellipsis;white-space:nowrap}
.chat-active-heading{background:#eaf6fb}.chat-active-person{min-width:0;padding:9px 16px 8px;display:grid;align-content:center}.chat-active-name{padding:0;background:transparent}.chat-active-name:hover,.chat-active-name.can-view-tree{background:transparent;color:#2678a8}.chat-friend-status{display:block;margin-top:2px;color:#22934d;font-size:12px;font-weight:900;line-height:1.2}.chat-friend-status[hidden]{display:none!important}.chat-add-friend.is-friend{border-color:transparent;background:transparent;color:#22934d;box-shadow:none}.chat-add-friend.is-friend:hover{background:transparent;color:#22934d}
@media(max-width:700px){.header-actions{gap:5px}.background-switcher{flex-basis:96px;width:96px}.background-switcher button img{width:31px;height:31px}}
.demo-hint-cloud b,.demo-hint-cloud span{display:block}.demo-hint-cloud b{margin-bottom:7px;color:#2678a8;font-size:17px;line-height:1.15}.demo-hint-cloud span{font-size:14px;line-height:1.45}

/* Desktop header: the search uses only the space left between controls. */
.header-leading{display:contents}
@media(min-width:701px){
  .app-header{display:grid;grid-template-columns:max-content max-content minmax(120px,560px) minmax(max-content,1fr);justify-content:normal;column-gap:10px}
  .app-header>.logo{grid-column:1}
  .app-header>.tree-view-switch{grid-column:2;position:relative;left:auto;top:auto;transform:none}
  .app-header>.tree-search{grid-column:3;position:relative;left:auto;top:auto;transform:none;width:100%;min-width:0}
  .app-header>.header-actions{grid-column:4;min-width:0;justify-self:end}
  .account-export>summary>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tree-app-header{--header-side-width:0px;grid-template-columns:minmax(var(--header-side-width),1fr) minmax(120px,560px) minmax(var(--header-side-width),1fr)}
  .tree-app-header>.header-leading{grid-column:1;display:flex;align-items:center;justify-self:start;gap:10px;min-width:max-content}
  .tree-app-header .tree-view-switch{position:relative;left:auto;top:auto;transform:none}
  .tree-app-header>.tree-search{grid-column:2;justify-self:stretch}
  .tree-app-header>.header-actions{grid-column:3;justify-self:end}
}
@media(min-width:701px) and (max-width:1180px){
  .app-header>.logo strong,.tree-app-header .logo strong{display:none}
  .account-export>summary{max-width:clamp(160px,20vw,240px)}
}
@media(min-width:901px) and (max-width:1050px){
  .tree-app-header .background-switcher{flex-basis:96px;width:96px}
  .tree-app-header .header-actions{gap:8px}
  .tree-app-header .account-export>summary{max-width:180px}
  .tree-app-header>.tree-search{grid-template-columns:1fr}
  .tree-app-header>.tree-search select{display:none}
}
@media(min-width:701px) and (max-width:900px){
  .app-header{padding-inline:10px;grid-template-columns:max-content max-content minmax(80px,560px) minmax(max-content,1fr);column-gap:8px}
  .app-header>.tree-view-switch{gap:4px;padding-inline:4px}
  .app-header>.tree-view-switch button{width:42px;height:42px}
  .app-header>.tree-view-switch button img{width:35px;height:35px}
  .header-actions{gap:6px}
  .background-switcher{flex-basis:88px;width:88px}
  .chat-header-button,.friends-header-button{width:42px;height:48px}
  .account-export>summary{max-width:120px;padding-inline:9px!important}
  .tree-app-header{grid-template-columns:minmax(var(--header-side-width),1fr) minmax(80px,560px) minmax(var(--header-side-width),1fr)}
  .tree-app-header>.header-leading{gap:6px}
}

/* Administrator users section. */
.admin-section-nav{display:flex;gap:8px;margin:0 0 14px;padding:5px;border:1px solid #d5e3e9;border-radius:13px;background:#fff;box-shadow:0 7px 22px rgba(28,78,106,.08)}
.admin-section-nav a{display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:9px;color:#536a76;text-decoration:none;font-size:13px;font-weight:850}
.admin-section-nav a:hover{background:#edf6fa;color:#2678a8}.admin-section-nav a.active{background:#2678a8;color:#fff}
.admin-tab-badge{min-width:20px;height:20px;padding:0 6px;font-size:11px;box-shadow:none}
.admin-users-panel .panel-head p{margin:4px 0 0;color:#748690;font-size:12px}.admin-user-search{display:grid;gap:6px;margin:4px 0 16px;color:#60747f;font-size:12px;font-weight:800}.admin-user-search input{width:min(520px,100%);height:42px;padding:0 13px;border:1px solid #cbdde5;border-radius:10px;background:#fff;color:#304955;outline:0}.admin-user-search input:focus{border-color:#2678a8;box-shadow:0 0 0 3px rgba(38,120,168,.12)}
.admin-users-table-wrap{overflow:auto;border:1px solid #d9e5ea;border-radius:12px}.admin-users-table{min-width:820px;margin:0}.admin-users-table th{position:sticky;top:0;z-index:2;background:#eaf4f8}.admin-users-table td{vertical-align:middle}.admin-users-table td:nth-child(1),.admin-users-table th:nth-child(1){width:58px;text-align:center}.admin-users-table td:nth-child(2),.admin-users-table th:nth-child(2){width:145px}.admin-users-table td:nth-child(4),.admin-users-table th:nth-child(4){width:175px}.admin-users-table td:nth-child(5),.admin-users-table th:nth-child(5){width:175px;text-align:center}.admin-users-table td strong,.admin-users-table td small{display:block}.admin-users-table td small{margin-top:3px;color:#7a8b94}.admin-user-number{font-weight:900;color:#59707c}
.user-online-state{display:inline-flex;align-items:center;gap:8px;color:#7b8a92;font-size:12px;font-weight:800;white-space:nowrap}.user-online-state i{width:13px;height:13px;border-radius:50%;background:#aab5ba;box-shadow:0 0 0 4px rgba(148,161,168,.13)}.user-online-state.online{color:#208645}.user-online-state.online i{background:#27b15b;box-shadow:0 0 0 4px rgba(39,177,91,.15),0 0 10px rgba(39,177,91,.45)}
.expert-toggle-form{display:inline-block}.expert-checkbox{position:relative;display:inline-flex;cursor:pointer}.expert-checkbox input{position:absolute;opacity:0;pointer-events:none}.expert-checkbox span{width:48px;height:27px;padding:3px;border-radius:15px;background:#bec9ce;transition:.18s}.expert-checkbox span::after{content:"";display:block;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(33,65,81,.25);transition:.18s}.expert-checkbox input:checked+span{background:#28a95a}.expert-checkbox input:checked+span::after{transform:translateX(21px)}.expert-checkbox input:focus-visible+span{outline:3px solid rgba(38,120,168,.25);outline-offset:2px}.admin-users-empty{padding:25px;text-align:center;color:#71838d}
.demo-hint-relations{right:28px;top:150px}.demo-hint-relations::after{right:28px;bottom:-14px}
.demo-hint-move{left:330px;top:88px}.demo-hint-move::after{left:45px;top:-14px;transform:rotate(225deg)}
.demo-hint-views{left:350px;top:255px}.demo-hint-views::after{display:none}
.demo-hint-branches{left:34px;top:380px}.demo-hint-branches::after{display:none}
.demo-guide-arrow{position:absolute;overflow:visible;pointer-events:none;z-index:18}.demo-guide-arrow[hidden],.demo-hints:has(.demo-hint-views[hidden]) .demo-guide-views-arrow,.demo-hints:has(.demo-hint-branches[hidden]) .demo-guide-branches-arrow{display:none!important}.demo-guide-arrow path{fill:none;stroke:#168eea;stroke-width:7;stroke-linecap:round;stroke-linejoin:round}.demo-guide-arrow marker path{fill:#168eea;stroke:none}.demo-guide-views-arrow{left:190px;top:64px;width:330px;height:215px}.demo-guide-branches-arrow{left:18px;top:138px;width:120px;height:250px}
.demo-edit-hint{left:34px;bottom:105px;width:320px}.demo-edit-hint::after{display:none}
.workspace.is-table-view .demo-edit-hint{display:none}
@media(max-width:1300px) and (min-width:701px){.demo-hint-cloud{width:250px;padding:15px 17px 16px}.demo-hint-cloud b{font-size:15px}.demo-hint-cloud span{font-size:12px}.demo-hint-views{left:340px;top:245px}.demo-hint-branches{left:18px;top:365px}.demo-hint-relations{right:14px}.demo-hint-move{left:275px;top:88px}.demo-edit-hint{left:18px;width:270px}}
@media(max-width:700px){.demo-family-banner{top:72px;left:10px;right:10px;transform:none;justify-content:space-between;gap:8px;padding:8px 9px 8px 11px}.demo-family-banner strong{font-size:14px}.demo-family-banner small{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.demo-register-button{padding:0 10px;font-size:11px}.workspace:has(.demo-family-banner) .branch-panel{top:132px}.demo-hints{top:auto;right:8px;bottom:8px;left:8px;height:auto;display:flex;gap:8px;overflow-x:auto;pointer-events:auto}.demo-hint-cloud{position:relative!important;inset:auto!important;flex:0 0 245px;width:245px;padding:12px 14px;border-width:2px;border-radius:16px}.demo-hint-cloud b{font-size:14px}.demo-hint-cloud span{font-size:11px}.demo-hint-cloud::after,.demo-guide-arrow{display:none}}
.workspace.layout-editing .tree-card.drop-swap-target {
  border-color: #fff;
  box-shadow: 0 0 0 6px #ff9f1a, 0 0 28px rgba(255, 159, 26, .78), 0 18px 42px rgba(25, 76, 101, .38);
}

/* Guided "Свои рядом" workflow. */
.nearby-floating-panel{position:fixed;z-index:35;left:50%;top:84px;transform:translateX(-50%);width:min(650px,calc(100vw - 24px));padding:12px;border:1px solid #d5e3e9;border-radius:15px;background:rgba(255,255,255,.97);color:#304955;box-shadow:0 17px 46px rgba(16,54,74,.28);backdrop-filter:blur(12px)}
.nearby-floating-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;cursor:grab;touch-action:none;user-select:none}.nearby-floating-panel.is-dragging .nearby-floating-head{cursor:grabbing}.nearby-floating-head>div{min-width:0;display:grid;gap:3px}.nearby-floating-head strong{font:700 20px/1.1 Georgia,serif}.nearby-floating-head small{color:#6f838e;font-size:11px;line-height:1.35}.nearby-floating-head>button{flex:0 0 31px;width:31px;height:31px;padding:0;border:0;border-radius:50%;background:#edf2f4;color:#637781;font:700 22px/29px system-ui;cursor:pointer}.nearby-floating-head>button:hover{background:#dce9ee;color:#2678a8}
.nearby-floating-tools{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin-top:11px}.nearby-floating-tools button{min-height:66px;padding:5px 7px;border:1px solid #cbdde5;border-radius:11px;background:#f3f8fa;color:#304955;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:11px;font-weight:900}.nearby-floating-tools button:hover{border-color:#2678a8;background:#eaf6fb}.nearby-floating-tools button.active{border-color:#d74c43;background:#fff0ed;color:#a3312b;box-shadow:inset 0 0 0 2px rgba(215,76,67,.24)}.nearby-floating-tools button:disabled{opacity:.4;cursor:not-allowed}.nearby-floating-tools img{width:42px;height:42px;border-radius:9px;object-fit:cover}
.workspace.nearby-mode.nearby-has-anchor .tree-card:not(.nearby-magnetic-aura):not(.nearby-magnetic-anchor){opacity:.2;filter:grayscale(.85) brightness(.55)}
.workspace.nearby-mode.nearby-reveal-all .tree-card:not(.nearby-magnetic-aura):not(.nearby-magnetic-anchor){opacity:1;filter:none}
.tree-card.nearby-magnetic-aura{z-index:8;box-shadow:0 0 0 6px rgba(225,35,28,.96),0 0 34px 15px rgba(255,35,25,.88),0 0 62px 22px rgba(255,20,15,.5),0 9px 21px rgba(30,59,70,.25)!important;animation:nearby-magnetic-pulse .8s ease-in-out infinite alternate}.tree-card.nearby-magnetic-anchor{z-index:9;box-shadow:0 0 0 5px rgba(255,207,58,.96),0 0 25px 10px rgba(255,207,58,.7),0 9px 21px rgba(30,59,70,.25)!important}
@keyframes nearby-magnetic-pulse{from{filter:saturate(1.15);box-shadow:0 0 0 5px rgba(225,35,28,.9),0 0 25px 11px rgba(255,35,25,.72),0 0 48px 17px rgba(255,20,15,.38),0 9px 21px rgba(30,59,70,.25)}to{filter:saturate(1.4);box-shadow:0 0 0 8px rgba(235,20,15,1),0 0 42px 19px rgba(255,35,25,.98),0 0 72px 27px rgba(255,20,15,.62),0 9px 21px rgba(30,59,70,.25)}}
.workspace.nearby-anchor-mode .tree-viewport{cursor:crosshair}.workspace.nearby-anchor-mode .tree-card.nearby-magnetic-aura{cursor:pointer}.layout-selection-box.nearby-anchor-box{border-color:#d9473e;background:rgba(225,55,43,.14);box-shadow:0 0 0 1px #b92f29,0 5px 18px rgba(130,30,24,.22)}
.nearby-position-preview,.layout-card-trace{position:absolute;width:190px;height:166px;pointer-events:none;border-radius:5px;box-sizing:border-box}
.nearby-position-preview{z-index:7;display:flex;align-items:flex-end;justify-content:center;border:3px solid #ffe45b;background:rgba(255,226,55,.16);box-shadow:0 0 0 4px rgba(255,226,55,.26),0 0 30px 10px rgba(255,222,50,.72);animation:nearby-position-pulse .85s ease-in-out infinite alternate}
.nearby-position-preview span{max-width:calc(100% - 12px);margin:0 6px 7px;padding:3px 7px;border-radius:8px;background:rgba(55,45,10,.82);color:#fff4a4;font-size:11px;font-weight:900;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.layout-card-trace{z-index:6;border:3px solid #ffd42a;background:rgba(255,212,42,.07);box-shadow:0 0 0 3px rgba(255,212,42,.25),0 0 25px 8px rgba(255,204,25,.72)}
@keyframes nearby-position-pulse{from{opacity:.62;box-shadow:0 0 0 3px rgba(255,226,55,.22),0 0 20px 7px rgba(255,222,50,.5)}to{opacity:1;box-shadow:0 0 0 5px rgba(255,226,55,.34),0 0 35px 12px rgba(255,222,50,.8)}}
@media(max-width:700px){.nearby-floating-panel{top:70px}.nearby-floating-tools{grid-template-columns:repeat(3,minmax(0,1fr))}.nearby-floating-tools img{width:40px;height:40px}.nearby-floating-tools button{min-height:58px}}

.chat-contact-name{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:normal}
.chat-contact.chat-admin-contact{display:grid;grid-template-columns:minmax(0,80%) 20%;align-items:stretch;min-height:58px;padding:0;overflow:hidden;border-color:#e1bd36;background:#fff;text-align:left}
.chat-contact.chat-admin-contact .chat-contact-name{display:flex;align-items:center;padding:10px 12px;color:#263842;font-size:14px;font-weight:850}
.chat-contact.chat-admin-contact .chat-admin-mark{display:grid;place-items:center;align-self:stretch;min-height:58px;background:#ffd335;color:#000;font:950 31px/1 Arial,sans-serif}
.chat-contact.chat-admin-contact:hover,.chat-contact.chat-admin-contact.active{background:#fff7d2;border-color:#d9a900}
.chat-contact.chat-admin-contact b{right:calc(20% + 5px);top:5px;transform:none}

/* Search remains centered; it contracts from a field to a magnifier. */
.tree-search-toggle{display:none;position:relative;width:40px;height:40px;padding:0;border:0;border-radius:9px;background:#fff;color:#2678a8;font-size:0}
.tree-search-toggle::before{content:"";position:absolute;left:11px;top:9px;width:13px;height:13px;border:3px solid currentColor;border-radius:50%}
.tree-search-toggle::after{content:"";position:absolute;left:24px;top:24px;width:10px;border-top:3px solid currentColor;transform:rotate(45deg);transform-origin:left center;border-radius:3px}
.tree-search-toggle:hover{background:#eaf5fa}
@media(min-width:701px){
 .tree-app-header{--header-search-width:560px;grid-template-columns:minmax(var(--header-side-width),1fr) var(--header-search-width) minmax(var(--header-side-width),1fr);column-gap:10px}
 .tree-app-header>.tree-search{width:100%;min-width:0}
 .tree-app-header>.tree-search.is-compact{grid-template-columns:minmax(0,1fr)}
 .tree-app-header>.tree-search.is-compact>select{display:none}
 .tree-app-header>.tree-search.is-icon-only{width:48px;padding:3px;grid-template-columns:40px;justify-self:center}
 .tree-app-header>.tree-search.is-icon-only>.tree-search-field,.tree-app-header>.tree-search.is-icon-only>select{display:none}
 .tree-app-header>.tree-search.is-icon-only>.tree-search-toggle{display:block}
 .tree-app-header>.tree-search.is-icon-only.is-search-expanded{position:fixed;left:50%;top:78px;z-index:45;transform:translateX(-50%);width:min(420px,calc(100vw - 24px));padding:5px;grid-template-columns:minmax(0,1fr);box-shadow:0 15px 42px rgba(24,66,91,.28)}
 .tree-app-header>.tree-search.is-icon-only.is-search-expanded>.tree-search-field{display:block}
 .tree-app-header>.tree-search.is-icon-only.is-search-expanded>.tree-search-toggle{display:none}
}
@media(max-width:700px){
 .tree-app-header .account-export>summary{width:48px;min-width:48px;padding-inline:7px!important;justify-content:center}
 .tree-app-header .account-export>summary>span:first-child{display:none}
 .tree-app-header .account-export>summary::after{margin-left:0}
 .tree-app-header>.tree-search{position:absolute;left:50%;right:auto;top:50%;z-index:22;transform:translate(-50%,-50%);width:48px;padding:3px;grid-template-columns:40px}
 .tree-app-header>.tree-search>select,.tree-app-header>.tree-search>.tree-search-field{display:none}
 .tree-app-header>.tree-search>.tree-search-toggle{display:block}
 .tree-app-header>.tree-search.is-search-expanded{position:fixed;top:68px;transform:translateX(-50%);width:min(420px,calc(100vw - 20px));padding:5px;grid-template-columns:minmax(0,1fr);box-shadow:0 15px 42px rgba(24,66,91,.28)}
 .tree-app-header>.tree-search.is-search-expanded>.tree-search-field{display:block}
 .tree-app-header>.tree-search.is-search-expanded>.tree-search-toggle{display:none}
}
@media(max-width:560px){
 .tree-app-header{padding-inline:6px}
 .tree-app-header .logo{display:none}
 .tree-app-header .tree-view-switch{left:6px}
 .tree-app-header .header-actions{gap:4px}
 .tree-app-header .background-switcher{flex-basis:76px;width:76px}
 .tree-app-header .background-switcher button img{width:27px;height:27px}
 .tree-app-header .friends-header-button,.tree-app-header .chat-header-button{width:38px;min-width:38px}
 .tree-app-header .account-export>summary{width:40px;min-width:40px}
}
@media(max-width:480px){
 .tree-app-header .background-switcher{flex-basis:64px;width:64px}
 .tree-app-header .friends-header-button,.tree-app-header .chat-header-button{width:34px;min-width:34px}
 .tree-app-header .account-export>summary{width:36px;min-width:36px}
}
@media(max-width:420px){.tree-app-header .header-actions{transform:translateY(-50%) scale(.78);transform-origin:right center}}
@media(max-width:380px){.tree-app-header .tree-view-switch button{width:38px;height:38px}.tree-app-header .tree-view-switch button img{width:31px;height:31px}}
