/* Owner governance panels */
.governance-list{display:grid;gap:10px;max-height:60vh;overflow:auto}.governance-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #d9e0e9;border-radius:4px;padding:12px;background:#fbfcff}.governance-row small{color:#66768b}.governance-row button{margin-left:6px}
#person-form .editor-basics .editor-identity-choices{grid-column:1/-1}#person-form .editor-identity-choices{display:flex;align-items:center;gap:18px;flex-wrap:wrap}#person-form .editor-identity-choices .gender-choice{display:flex;align-items:center;gap:18px}#person-form .editor-identity-choices .gender-choice label{display:flex;align-items:center;gap:7px;margin:0;font-size:13px;color:#253147}#person-form .editor-identity-choices input{width:auto;height:auto;margin:0}#person-form .editor-personal{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;align-content:start}#person-form .editor-personal>.step-label,#person-form .editor-personal>.form-row,#person-form .editor-personal>.date-field,#person-form .editor-personal>label:has(textarea){grid-column:1/-1}#person-form .editor-family{display:grid;align-content:start;gap:10px}#person-form .editor-section.editor-rel-section{display:flex;flex-direction:column}@media(max-width:760px){#person-form .editor-personal{grid-template-columns:1fr 1fr;gap:6px 10px}#person-form .editor-personal>.step-label{margin-bottom:0}#person-form .editor-personal>.form-row{grid-template-columns:1fr;gap:6px 10px}}
.editor-basics{grid-column:1/-1}.editor-identity-choices{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.editor-identity-choices .gender-choice{display:flex;align-items:center;gap:18px}.editor-identity-choices .gender-choice label{display:flex;align-items:center;gap:7px;margin:0;font-size:13px;color:#253147}.editor-identity-choices input{width:auto;height:auto;margin:0}
*{box-sizing:border-box} :root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#20252c;background:#fff;font-synthesis:none}body{margin:0;font-size:14px}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button{cursor:pointer;background:white;border:1px solid #dfe3e8;border-radius:5px;padding:9px 12px;color:inherit}button:hover{background:#f1f4f8}button.primary{background:#2463eb;color:white;border-color:#2463eb}button.primary:hover{background:#1a50c6}a{color:inherit;text-decoration:none}header{height:76px;display:flex;align-items:center;border-bottom:1px solid #e6e8ec;padding:0 28px;gap:40px}.brand{font-size:27px;letter-spacing:-1.4px;font-weight:700;display:flex;align-items:center;gap:9px;width:204px}.brand-icon{color:#2463eb;font-size:34px}.beta{font:10px monospace;letter-spacing:1px;border:1px solid #ddd;padding:3px 5px;margin-left:4px;color:#848b95}.search{display:flex;align-items:center;gap:10px;max-width:400px;flex:1;color:#7c8490}.search>span{font-size:28px}.search input{border:0;width:100%;font-size:14px;outline:none}.search kbd{border:1px solid #e3e5e9;border-radius:3px;padding:3px 7px}.header-actions{display:flex;gap:10px;margin-left:auto}.app{display:grid;grid-template-columns:230px minmax(0,1fr) 296px;height:calc(100vh - 76px);min-height:650px}.sidebar{border-right:1px solid #e6e8ec;background:#fbfcfd;display:flex;flex-direction:column;padding:26px 16px}.workspace{display:flex;align-items:center;gap:11px;margin:0 6px 35px}.workspace-icon{padding:11px 13px;border:1px solid #dde2e9;border-radius:5px;background:white;font-weight:600}.workspace strong{font-size:14px}.workspace small{display:block;font-size:12px;color:#8a929d;margin-top:5px}.section-label{font-size:10px;font-weight:600;letter-spacing:1.6px;color:#949ca8;margin:0 10px 12px}nav{display:grid;gap:5px}nav button{display:flex;gap:12px;align-items:center;text-align:left;border:0;background:none;padding:12px;font-size:17px}nav button span{font-size:14px}nav button .key{margin-left:auto;color:#8c97a6;font:11px monospace}nav button.active{background:#eaf0fd;color:#2563eb;font-weight:600}nav button.active .key{color:#2563eb}.branches{margin-top:34px}#roots{display:grid;gap:4px}#roots button{border:0;background:none;text-align:left;color:#7c8490;padding:10px;font-size:13px}#roots button.selected-root{color:#252c35;font-weight:600}#roots button:before{content:'└';margin-right:10px;color:#acb6c4}.sidebar-bottom{margin-top:auto;padding:20px 10px 4px;border-top:1px solid #e5e9ef}.local-icon{font-size:22px;color:#75808f;margin-bottom:14px}.sidebar-bottom strong{font-size:13px}.sidebar-bottom p{font-size:12px;color:#8a929d;line-height:1.8}.sidebar-bottom a{font-size:12px;color:#526782}main{display:flex;flex-direction:column;min-width:0}.page-heading{display:flex;justify-content:space-between;align-items:center;padding:31px 30px 25px;gap:12px}.eyebrow{font-size:10px;color:#8a939f;letter-spacing:1.3px;font-weight:500}.eyebrow span{margin:0 8px;color:#c1c6cf}h1{font-size:28px;font-weight:600;letter-spacing:-1px;margin:13px 0 7px}.page-heading p{font-size:13px;color:#858e9b;margin:0}.saved{font-size:11px;color:#8591a0;white-space:nowrap}.view-toolbar{display:flex;justify-content:space-between;gap:10px;padding:0 24px;border-bottom:1px solid #e6e8ec;min-height:55px;align-items:center}.tabs{display:flex;gap:19px;align-self:stretch}.tabs button{border:0;border-radius:0;padding:14px 2px;font-size:12px;color:#7f8997;background:none;white-space:nowrap}.tabs button.active{color:#2463eb;border-bottom:2px solid #2463eb}.generation{font-size:11px;color:#929aa6;white-space:nowrap}.generation select{font-size:11px;border:0;background:#fff;color:#4d5664;margin-left:8px}.canvas-wrap{flex:1;min-height:390px;position:relative;overflow:hidden;background-color:#fafbfd;background-image:radial-gradient(#dce2eb .7px,transparent .7px);background-size:20px 20px}#canvas{height:100%;position:absolute;inset:0;overflow:auto}svg.tree{width:100%;height:100%;min-height:390px}.node{cursor:pointer}.node rect{fill:white;stroke:#d4dce7;stroke-width:1}.node text{font-family:Inter,"Segoe UI",sans-serif}.node .node-name{font-size:14px;fill:#26303f;font-weight:600}.node .node-meta{font-size:10px;fill:#8a95a5}.node .initial{font-size:13px;fill:#687991;font-weight:500}.connection{fill:none;stroke:#bdc9d9;stroke-width:1.2}.canvas-caption{position:absolute;top:22px;left:25px;font:10px monospace;letter-spacing:1px;color:#9ba5b3;pointer-events:none}.zoom{position:absolute;left:25px;bottom:22px;display:flex;align-items:center;border:1px solid #dce2ea;border-radius:5px;background:white;overflow:hidden}.zoom button{border:0;border-radius:0;padding:8px 12px;font-size:19px}.zoom span{font:11px monospace;padding:0 7px;color:#6b788c}.zoom button:last-child{border-left:1px solid #e4e8ee}footer{display:flex;justify-content:space-between;padding:14px 23px;border-top:1px solid #e6e8ec;font-size:10px;color:#919baa;gap:15px}.blue{color:#2463eb}.details{border-left:1px solid #e6e8ec;overflow:auto;background:white}.detail-top{padding:20px 22px;border-bottom:1px solid #e6e8ec;display:flex;justify-content:space-between;font-size:11px;color:#8d97a6;letter-spacing:1px}.detail-top span:last-child{font:11px monospace}.profile{padding:27px 24px 20px}.avatar{height:56px;width:56px;display:flex;align-items:center;justify-content:center;background:#edf3ff;color:#2463eb;font-size:20px;border:1px solid #d6e3ff;border-radius:6px;margin-bottom:17px}.profile h2{font-size:21px;letter-spacing:-.5px;margin:0 0 8px}.profile p{font-size:12px;color:#8993a2;margin:0 0 14px}.badge{font-size:10px;color:#64748b;padding:4px 6px;background:#f3f5f8;border:1px solid #e2e7ee;border-radius:3px}.detail-tabs{padding:0 23px;display:flex;gap:22px;border-bottom:1px solid #e8ebef}.detail-tabs button{border:0;border-radius:0;background:white;padding:12px 0;font-size:12px;color:#8a94a2}.detail-tabs .active{color:#2463eb;border-bottom:2px solid #2463eb}.detail-content{padding:23px}.detail-content h3{font-size:10px;letter-spacing:1.2px;color:#8e99a8;font-weight:500;margin:0 0 20px}.fact{display:grid;grid-template-columns:24px 1fr;margin-bottom:22px;gap:7px}.fact-icon{color:#97a2b3;font-size:16px}.fact small{display:block;font-size:11px;color:#97a0ac;margin-bottom:5px}.fact strong{font-size:13px;font-weight:500}.fact p{font-size:12px;color:#929dab;margin:5px 0 0}.divider{border-top:1px solid #e8ebef;margin:26px 0 23px}.relative{display:flex;align-items:center;width:100%;text-align:left;border:0;padding:8px 0;gap:11px}.mini-avatar{background:#f0f3f7;padding:9px;font-size:11px;color:#7f8ca0;border-radius:4px}.relative strong{font-size:12px;font-weight:500;display:block}.relative small{color:#929baa;font-size:10px}.edit-profile{width:100%;margin-top:22px;font-size:12px}.notes{font-size:13px;line-height:1.7;color:#78869a;white-space:pre-wrap;overflow-wrap:anywhere}.data-table{width:100%;border-collapse:collapse;background:white;text-align:left}.data-table th{font-size:11px;letter-spacing:.5px;font-weight:500;color:#8b97a7;padding:18px;border-bottom:1px solid #e2e7ed}.data-table td{padding:18px;font-size:13px;border-bottom:1px solid #edf0f4}.data-table tbody tr{cursor:pointer}.data-table tbody tr:hover{background:#f5f8ff}.empty{padding:60px 25px;text-align:center;color:#7e8b9e}.timeline{padding:50px;max-width:680px;margin:auto}.timeline-item{border-left:1px solid #cbd5e1;padding:0 0 28px 25px;position:relative}.timeline-item:before{content:'';width:7px;height:7px;border:2px solid #2463eb;background:#fff;border-radius:50%;position:absolute;left:-6px;top:3px}.timeline-item time{font:12px monospace;color:#2463eb}.timeline-item h3{font-size:15px;margin:10px 0}.timeline-item p{font-size:13px;color:#8793a4}.source-card{margin:22px;background:white;border:1px solid #e0e6ee;padding:22px}.source-card h3{font-size:15px}.source-card p{font-size:13px;line-height:1.7;white-space:pre-wrap}.source-card small{color:#8793a4}dialog{width:min(560px,calc(100% - 32px));max-height:90vh;overflow:auto;border:1px solid #d6dde7;border-radius:8px;padding:28px}dialog::backdrop{background:#18253a55}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.dialog-head h2{font-size:22px;margin:0;letter-spacing:-.5px}.dialog-head button{border:0;font-size:23px;padding:0 6px}form label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#798595;margin-bottom:16px}form input,form select,form textarea{width:100%;border:1px solid #d9e0e9;border-radius:4px;padding:10px;color:#253147;background:white}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:15px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}#form-error{font-size:13px;color:#ba3030}.export-option{display:block;width:100%;text-align:left;margin-top:15px;padding:20px}.export-option strong{display:block}.export-option strong span{float:right}.export-option small{display:block;margin-top:9px;color:#8490a0;line-height:1.7}#export-dialog>p{font-size:13px;color:#8592a3}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#202c40;color:#fff;border-radius:5px;padding:13px 20px;font-size:13px;display:none;z-index:10}pre{font-size:11px;white-space:pre-wrap;overflow-wrap:anywhere;color:#65748a;line-height:1.7}.delete{font-size:12px;color:#9b4545;background:transparent;border:0;margin-top:15px}.fan-label{font-size:12px;fill:#34435a;cursor:pointer}.legend{font:10px monospace;fill:#97a2b3}
@media(min-width:1500px){.app{grid-template-columns:245px minmax(0,1fr) 320px}.page-heading{padding:36px}.view-toolbar{padding:0 34px}}@media(max-width:1200px){.app{grid-template-columns:190px minmax(0,1fr) 265px}.sidebar{padding:24px 10px}.saved{display:none}.tabs{gap:13px}.view-toolbar{padding:0 16px}.generation{font-size:0}.generation select{font-size:11px}.page-heading{padding:26px 22px}.header-actions button{font-size:12px}header{gap:18px;padding:0 20px}.brand{width:160px}.details .profile,.detail-content{padding:20px}}@media(max-width:950px){.app{grid-template-columns:170px minmax(0,1fr)}.details{grid-column:1/-1;border-top:1px solid #e6e8ec;overflow:visible}.app{height:auto;min-height:calc(100vh - 76px)}main{min-height:690px}.sidebar-bottom{margin-top:60px}.search{max-width:260px}.header-actions #import{display:none}.details .detail-content{display:block}.details .profile{padding-bottom:5px}.details .avatar{float:left;margin-right:18px}}@media(max-width:650px){header{height:auto;min-height:70px;flex-wrap:wrap;padding:15px;gap:14px}.brand{font-size:24px;width:auto}.brand-icon{font-size:28px}.beta{display:none}.search{order:3;max-width:none;flex-basis:100%;border-top:1px solid #eef0f4;padding-top:10px}.header-actions{gap:6px}.header-actions button{font-size:11px;padding:8px}.app{display:block}.sidebar{padding:12px;border-right:0;border-bottom:1px solid #e6e8ec}.workspace,.section-label,#roots,.sidebar-bottom{display:none}nav{display:flex;justify-content:space-between}nav button{padding:8px;gap:5px}nav button span{font-size:11px}nav button .key{display:none}.page-heading{padding:25px 18px}.eyebrow{font-size:9px}h1{font-size:26px}.view-toolbar{padding:0 12px;flex-wrap:wrap;gap:0}.tabs{width:100%;justify-content:space-between;gap:10px}.tabs button{font-size:12px}.generation{padding:10px 0;font-size:11px}.canvas-wrap{min-height:440px}main{min-height:660px}footer{padding:12px;font-size:9px}.canvas-caption{top:14px;left:15px;font-size:9px}.timeline{padding:35px 25px}.data-table td,.data-table th{padding:12px 8px;font-size:11px}}
@media(max-width:650px){svg.tree{min-width:740px}.canvas-wrap{min-height:450px}header{gap:10px}.header-actions{margin-left:auto}}
[hidden]{display:none!important}header .brand{border:0;background:none;padding:0;white-space:nowrap}.landing{max-width:1080px;margin:60px auto;padding:0 28px}.landing h1{font-size:36px;margin-top:17px}.landing-intro{font-size:16px;color:#7c899b;margin-bottom:35px}#family-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:20px}.family-card{text-align:left;border:1px solid #dce3ee;padding:28px;min-height:220px;border-radius:6px}.family-card:hover{border-color:#2463eb;background:#f8faff}.family-card h2{font-size:19px;margin:20px 0 8px}.family-card p{color:#7c899b;font-size:14px}.family-symbol{color:#2463eb;font-size:30px}.enter-family{display:block;margin-top:24px;color:#2463eb;font-size:14px}.create-family{border-style:dashed}.create-family h2{font-weight:500}#migration{margin:35px 0;padding:25px;background:#f6f8fc;border-radius:5px}#migration:empty{display:none}#migration h2{font-size:19px}#migration p{font-size:14px;line-height:1.7}#notice:empty{display:none}#notice{padding:12px 25px;background:#eef4ff;color:#365b96;font-size:14px;display:flex;align-items:center;gap:18px}#notice button{font-size:13px}.sidebar .workspace{border:0;background:none;padding:0;text-align:left;width:100%;margin:0 0 30px}.focus-label{display:block;font-size:12px;color:#7c899b;padding:0 8px}.focus-label input{width:100%;border:1px solid #d9e1eb;padding:9px;margin:10px 0;border-radius:4px;font-size:13px}#roots{max-height:230px;overflow:auto}#roots small{display:block;padding-left:20px;font-size:11px;margin-top:5px}.sidebar-bottom{margin-top:auto}#refresh-data{font-size:12px}.app{min-height:740px}.details{min-width:0}.view-toolbar .tabs{gap:16px}.view-toolbar .tabs button{font-size:13px}#tree-options{display:flex;align-items:center;gap:16px;padding:12px 24px;border-bottom:1px solid #e5eaf2;flex-wrap:wrap;font-size:12px}#tree-options label{display:flex;align-items:center;gap:5px}#tree-options input{accent-color:#2463eb}#tree-options select{border:1px solid #dce3ee;background:white;border-radius:4px;padding:4px;font-size:12px}#tree-options button{font-size:12px;padding:6px 8px;margin-left:auto}.branch-toggle{cursor:pointer}.branch-toggle rect{fill:#fff;stroke:#c5d3e7}.branch-toggle:hover rect{fill:#eaf1ff;stroke:#2463eb}.branch-toggle text{font-size:12px;fill:#466383}.edge-label{font-size:10px;fill:#778ca7}.gender-avatar{font-size:14px;min-width:60px;width:auto;max-width:86px}.relationship-row{display:flex;align-items:center;gap:7px;border-bottom:1px solid #f0f2f6}.relationship-row .relative small{line-height:1.5;display:block;margin-top:4px}.relation-edit,.relation-remove{font-size:12px;border:0;padding:4px;background:none;color:#70829b}.relation-remove{font-size:19px}.chart-note{background:#f7f9fd;color:#6a7d96;font-size:12px;padding:14px 20px;line-height:1.6;margin:0}.step-label{font-size:11px;letter-spacing:1px;font-weight:600;color:#2463eb;margin:24px 0 14px}.mode-choice{display:grid;gap:4px;margin-bottom:15px}.mode-choice label{flex-direction:row;align-items:center;gap:10px;font-size:14px;color:#38495f}.mode-choice input{width:auto}.search-results{max-height:165px;overflow:auto;display:grid;gap:4px;margin-bottom:10px}.search-results button{font-size:13px;text-align:left;border:1px solid #e4eaf2;padding:10px}.search-results button.picked{border-color:#2463eb;background:#f0f5ff;color:#2463eb}.search-results small{display:block;font-size:11px;color:#8b97a7;margin-top:5px}.picked-target{font-size:13px;color:#2463eb}.relation-hint{font-size:12px;line-height:1.7;color:#8090a5}.form-error{font-size:13px;color:#b03030;line-height:1.6}.dialog-actions{position:sticky;bottom:-28px;background:white;border-top:1px solid #edf0f5;padding:18px 0 4px}button:disabled{cursor:wait;opacity:.55}#confirm-description{line-height:1.7;color:#64758a}form input,form select,form textarea{font-size:14px}.detail-top{font-size:12px}.detail-content h3{font-size:12px}.detail-content .notes{font-size:14px}.profile p{font-size:13px}.relative strong{font-size:14px}.relative small{font-size:12px}.fact strong{font-size:14px}.fact small{font-size:12px}.edit-profile{font-size:14px}.saved{white-space:normal}.page-heading{padding-bottom:20px}.canvas-caption{background:#fafbfde8;padding:4px 6px;border-radius:3px}.node .node-name{font-size:14px}.node .node-meta{font-size:11px}.node .initial{font-size:12px}.fan-label{font-size:12px}.sidebar-bottom p{font-size:12px}.zoom{position:absolute}.canvas-wrap{min-height:450px}.details pre{font-size:12px}button:focus-visible,[role=button]:focus-visible{outline:2px solid #2463eb}
@media(max-width:1200px){.app{grid-template-columns:185px minmax(0,1fr) 280px}.view-toolbar .tabs{gap:12px}.view-toolbar .tabs button{font-size:12px}#tree-options{padding:12px 16px;gap:10px}}
@media(max-width:1000px){.app{grid-template-columns:180px minmax(0,1fr);height:auto}.details{grid-column:1/-1;border-top:1px solid #e6e8ec}.app main{min-height:730px}.details .avatar{float:none}.details .profile{padding:24px}.details .detail-content{padding:24px}.focus-label{display:block}}
@media(max-width:650px){header{padding:12px}.header-actions #import{display:block}.header-actions button{font-size:11px;padding:7px}.brand{font-size:22px}.brand-icon{font-size:25px}.landing{margin:35px auto;padding:0 18px}.landing h1{font-size:29px}.landing-intro{line-height:1.7}#family-grid{grid-template-columns:1fr}.app{display:block}.sidebar .workspace{display:flex;width:auto;padding:0 4px;margin-bottom:12px}.sidebar .workspace small{font-size:11px}.sidebar .focus-label{display:block;margin-top:15px}.focus-label input{margin-bottom:0}#roots{display:flex;gap:4px;overflow:auto;max-height:90px}#roots button{white-space:nowrap;min-width:fit-content}.sidebar nav{display:grid;grid-template-columns:1fr 1fr;gap:3px}.sidebar nav button span{font-size:13px}.view-toolbar .tabs{width:100%;gap:7px}.view-toolbar .tabs button{font-size:12px}#tree-options{gap:12px;padding:12px}.canvas-wrap{min-height:460px}.tree{min-width:740px}.sidebar-bottom{display:none}#notice{padding:12px;display:block;font-size:13px}#notice button{margin-top:10px}.form-row{grid-template-columns:1fr}dialog{padding:20px}.dialog-actions{bottom:-20px}.detail-content .relationship-row{max-width:600px}}
/* Family connections and wide profile */
.app{grid-template-columns:220px minmax(0,1fr);grid-template-rows:minmax(690px,calc(100vh - 110px)) auto;height:auto}.app>.sidebar{grid-column:1;grid-row:1 / span 2}.app>main{grid-column:2;grid-row:1;min-height:690px}.app>.details{grid-column:2;grid-row:2;border-top:1px solid #dce4ef;border-left:0;overflow:visible}.profile-header{display:flex;align-items:center;gap:20px;padding:25px 28px}.profile-header .avatar{margin:0;min-width:80px;width:80px;height:80px;overflow:hidden}.profile-header .avatar img{width:100%;height:100%;object-fit:cover}.profile-header h2{font-size:24px;margin:0 0 9px}.profile-header p{margin:0 0 10px;color:#7e8b9e}.profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:24px;padding:28px}.profile-block{min-width:0;border:1px solid #e3e9f2;border-radius:6px;padding:20px}.profile-block h3{font-size:12px;letter-spacing:1px;color:#8290a4;margin:0 0 20px;display:flex;align-items:center;justify-content:space-between;gap:8px}.profile-block h3 select{width:auto;height:26px;padding:2px 6px;font-size:10px;letter-spacing:0;text-transform:none;color:#2463eb;border:1px solid #d8e0eb;border-radius:5px;background:#f8fafc}.profile-block dd .date-hint{display:block;margin-top:3px;color:#8993a2;font-size:11px;font-weight:400}.profile-block h3:not(:first-child){margin-top:25px}.profile-block dl{display:grid;grid-template-columns:90px 1fr;gap:15px 10px;font-size:14px;margin:0;line-height:1.6}.profile-block dt{color:#8b96a6}.profile-block dd{margin:0;overflow-wrap:anywhere}.profile-actions .edit-profile{margin:0 0 12px}.json-block{grid-column:span 2}.profile-block pre{margin:0}.photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(75px,1fr));gap:8px;margin:12px 0}.photo-gallery img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:4px;border:1px solid #e0e5ed}.media-capacity{font-size:12px;color:#7b899c}.parent-selectors{display:grid;grid-template-columns:1fr 1fr;gap:14px}.parent-picker{border:1px solid #dae3ef;padding:14px;border-radius:5px;min-width:0}.parent-picker .search-results{max-height:150px;margin-top:12px}.parent-current{font-size:12px;color:#2463eb;line-height:1.6;min-height:38px}.parent-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.parent-actions button{font-size:11px;padding:6px}.placeholder-node rect{stroke-dasharray:5 3;fill:#f3f6fa}.placeholder-node .node-name{font-size:12px}.upload-label{display:grid;gap:10px;border:1px dashed #b9c9df;padding:20px;border-radius:5px;font-size:13px}.media-item{display:grid;grid-template-columns:72px 1fr auto;gap:13px;align-items:center;padding:15px 0;border-bottom:1px solid #e6ebf2}.media-item img{width:72px;height:72px;object-fit:cover;border-radius:5px}.media-item strong{display:block;font-size:13px;overflow-wrap:anywhere}.media-item small{display:block;margin:5px 0;font-size:11px;color:#8190a5}.media-item label{display:flex;align-items:center;flex-direction:row;gap:6px;margin:9px 0 0}.media-item input{width:auto}.media-item button{font-size:12px}.capacity{font-size:13px;color:#2463eb}#media-dialog>form>p{font-size:13px;line-height:1.7;color:#6a7c92}#media-dialog .form-error{color:#b03030!important}.parent-picker label{font-size:13px}.parent-picker input{font-size:12px}.sidebar{align-self:stretch}.app>.sidebar .sidebar-bottom{margin-top:40px}
@media(max-width:1200px){.profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.app{grid-template-columns:190px minmax(0,1fr)}}
@media(max-width:850px){.app{grid-template-columns:165px minmax(0,1fr)}.profile-grid{gap:14px;padding:18px}.profile-block{padding:16px}.profile-block dl{grid-template-columns:1fr;gap:5px}.profile-block dd{margin-bottom:12px}}
@media(max-width:650px){.app{display:block}.app>main{min-height:700px}.profile-grid{grid-template-columns:1fr;padding:16px}.json-block{grid-column:auto}.profile-header{padding:22px 16px;gap:15px}.profile-header h2{font-size:21px}.profile-header .avatar{min-width:65px;width:65px;height:65px}.parent-selectors{grid-template-columns:1fr}.profile-block dl{grid-template-columns:90px 1fr;gap:12px}.profile-block dd{margin:0}.app>.sidebar .sidebar-bottom{display:none}}
.connection{pointer-events:stroke;transition:stroke .18s ease,stroke-width .18s ease,filter .18s ease}.marriage-connection{stroke:#b8c1cc;stroke-width:1.5}.marriage-icons{pointer-events:none}.highlight-connection-layer,.highlight-connection-layer .connection{pointer-events:none}.marriage-mark-backdrop{fill:#fff;stroke:#fff;stroke-width:6px}.marriage-mark{font:32px Inter,"Segoe UI",sans-serif;font-weight:700;fill:#b8c1cc;paint-order:stroke;stroke:#fff;stroke-width:8px;stroke-linejoin:round;transform-box:fill-box;transform-origin:center}.marriage-mark.divorced{font-size:30px}.marriage-mark.marriage-active{fill:#c53a3a}@media (hover:hover) and (pointer:fine){.marriage-mark.marriage-active{animation:marriage-heartbeat .9s ease-in-out infinite}}@keyframes marriage-heartbeat{0%,100%{transform:scale(1)}50%{transform:scale(1.35)}}
.connection,.sibling-connection,.step-connection,.custom-connection{stroke:#b8c1cc}.connection{stroke-width:1.5}.marriage-connection{stroke:#b8c1cc;stroke-width:1.5}.sibling-connection{stroke-dasharray:1 6;stroke-linecap:round;stroke-width:1.8}.step-connection{stroke-dasharray:9 4;stroke-linecap:butt;stroke-width:1.8}.custom-connection{stroke-dasharray:2 5;stroke-width:1.4}.connection.kinship-active{stroke-width:4px;filter:drop-shadow(0 0 3px currentColor)}.connection.kinship-parent{stroke:#c53a3a;color:#c53a3a}.connection.kinship-step{stroke:#318a52;color:#318a52}.connection.kinship-sibling{stroke:#c53a3a;color:#c53a3a}.connection.kinship-spouse{stroke:#c53a3a;color:#c53a3a}.mapping-preview{font-size:13px;line-height:1.6;color:#315c9b;background:#f1f5fd;border-left:2px solid #7ea2df;padding:9px 12px;margin:10px 0}.mapping-preview:empty{display:none}.custom-labels{display:grid;grid-template-columns:1fr 1fr;gap:12px}.custom-labels label{min-width:0}
.space-rename-form{display:flex;align-items:center;gap:6px;flex:1;min-width:240px}.space-rename-form input{height:38px;min-width:0;flex:1;padding:6px 9px;border:1px solid #cbd5e1;border-radius:4px;font:inherit}.space-rename-form button{white-space:nowrap}
@media(max-width:650px){.custom-labels{grid-template-columns:1fr}}
.infinite-mode{overflow:hidden!important;touch-action:none;cursor:grab}.infinite-mode.dragging{cursor:grabbing}.infinite-tree{display:block;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;user-select:none}.node-lineage{font-size:10.5px;fill:#667891}.infinite-mode .node{cursor:pointer}.zoom #center{border-left:1px solid #e4e8ee;font-size:12px;white-space:nowrap}
.ancestor-summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;padding:12px 20px;background:#fff;border-bottom:1px solid #e4eaf2;font-size:13px;color:#5f7088}.ancestor-summary strong{color:#29456c}.ancestor-table-wrap{overflow-x:auto}.ancestor-table td:first-child{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}.ancestor-table td small{display:block;font-weight:400;color:#8492a5;margin-top:3px}.ancestor-table .missing-ancestor{background:#f5f7fa;color:#8190a3}.ancestor-table .missing-ancestor:hover{background:#f5f7fa;cursor:default}.fan-chart{display:block;height:auto!important;min-width:0!important;min-height:0!important;margin:0 auto;max-width:none}.fan-sector path{fill:#fff;stroke:#cad6e5;stroke-width:1}.fan-sector.known{cursor:pointer}.fan-sector.known:hover path,.fan-sector.match path{fill:#eaf1ff;stroke:#2463eb}.fan-sector.missing path{fill:#eff2f7;stroke:#d5dce7}.fan-sector .selected-sector{fill:#eaf1ff;stroke:#2463eb;stroke-width:2}.fan-sector .fan-label{font-size:12px;fill:#3e5068;pointer-events:none}.fan-sector.missing .fan-label{fill:#9ca8b6}.fan-sector:focus-visible path{stroke:#2463eb;stroke-width:3}
#editor{width:min(760px,calc(100% - 32px))}#edit-relationship-panel{border-top:1px solid #e1e7f0;margin-top:22px;padding-top:4px}.branch-root-choice{flex-direction:row;align-items:center;font-size:14px;color:#34445c}.branch-root-choice input{width:auto}.editor-relation-row{display:flex;align-items:center;gap:10px;border-bottom:1px solid #edf1f6;padding:10px 0}.editor-relation-row span{flex:1;min-width:0}.editor-relation-row strong,.editor-relation-row small{display:block;overflow-wrap:anywhere}.editor-relation-row strong{font-size:14px}.editor-relation-row small{font-size:12px;color:#7b8ba0;margin-top:4px}.editor-relation-row button{font-size:12px;padding:6px 9px}#editor-add-relation{margin-top:15px;width:100%;text-align:left;border-style:dashed}#editor-rel-compose{border:1px solid #cfdced;border-radius:5px;background:#fbfcff;padding:18px;margin-top:16px}#editor-rel-compose h3{font-size:16px;margin:0 0 18px}#editor-rel-compose .dialog-actions{position:static;background:transparent}

/* Compact workspace and one-page member editor */
header{height:58px;padding:0 14px;gap:14px}.toolbar-icon{border:0;font-size:20px;padding:7px 9px}.brand{width:150px;font-size:23px}.brand-icon{font-size:27px}.header-actions{gap:6px}.header-actions button{padding:8px 10px}.app{grid-template-columns:190px minmax(0,1fr);grid-template-rows:minmax(650px,calc(100vh - 58px)) auto}.app.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}.app.sidebar-collapsed>.sidebar{display:none}.page-heading{padding:7px 16px;min-height:42px}.page-heading .eyebrow,.page-heading p{display:none}.page-heading h1{font-size:18px;margin:0}.view-toolbar{padding:0 14px;min-height:39px}.tabs{gap:16px}.tabs button{padding:9px 2px}#tree-options{padding:7px 14px;gap:14px}.sidebar{padding:14px 10px}.workspace{margin:0 4px 16px}.branches{margin-top:16px}.sidebar-bottom{margin-top:18px!important}.sidebar-bottom p{line-height:1.45}.canvas-wrap{min-height:500px}
#editor{width:min(1100px,calc(100% - 32px));padding:24px}.editor-intro{margin:-8px 0 20px;color:#66768b;font-size:13px}.editor-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(260px,.75fr);gap:16px;align-items:start}.editor-section{border:1px solid #e1e7f0;border-radius:6px;padding:18px;min-width:0}.editor-rel-section{grid-column:1/-1;margin-top:0!important;border-top:1px solid #e1e7f0!important;padding-top:18px!important}.editor-section .step-label{margin-bottom:16px}.editor-section label small{font-weight:400;color:#9aa4b2}.mode-choice{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mode-choice label{flex-direction:row;align-items:center;padding:10px;border:1px solid #e0e6ef;border-radius:5px;margin-bottom:10px}.mode-choice input{width:auto}.branch-root-choice{margin-top:20px}.editor-grid textarea{resize:vertical}
@media(max-width:760px){#toggle-sidebar{display:none}.editor-grid{grid-template-columns:1fr}.editor-rel-section{grid-column:auto}.app{grid-template-rows:auto}.page-heading{padding:8px 12px}.mode-choice{grid-template-columns:1fr}#editor{padding:18px}}
.derived-badge{font-size:10px;color:#2463eb;background:#edf3ff;border:1px solid #d4e1ff;border-radius:3px;padding:4px 6px;white-space:nowrap}
/* PC workspace: a single 48px header and a viewport-sized drawing surface. */
header>#title{font-size:16px;letter-spacing:0;margin:0;white-space:nowrap}
@keyframes viewing-pulse{0%,100%{opacity:1}50%{opacity:.4}}
.editor-relation-pending{border:1px solid #dfe9f6;border-radius:6px;background:#fff;padding:12px;margin:10px 0}
.editor-relation-pending-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.editor-relation-pending-head strong{font-size:13px;color:#34445c}
.editor-relation-pending-head button{font-size:12px;padding:5px 8px}
.editor-relation-pending .form-error:empty{display:none}
@media(max-width:760px){.editor-relation-pending{padding:9px;margin:7px 0}}
#status{color:#2463eb;animation:viewing-pulse 2s ease-in-out infinite}
.deceased-mark{pointer-events:none}.deceased-mark path{fill:#000}
#person-form .deceased-choice{display:flex;align-items:center;gap:8px;grid-column:1/-1;font-size:13px;color:#253147}
#person-form .deceased-choice input{width:auto;height:auto;margin:0}
header>#layouts{min-width:0;overflow-x:auto;align-items:center;gap:10px;flex:1;scrollbar-width:thin}
header>#layouts button{height:34px;padding:4px 2px;font-size:14px}
.actions-menu{position:relative;flex:none}.actions-menu summary{cursor:pointer;border:1px solid #dfe3e8;border-radius:5px;padding:7px 10px;white-space:nowrap;list-style:none}.actions-menu summary .actions-count{vertical-align:middle}
.actions-menu:not([open]) .header-actions{display:none}.actions-menu .header-actions{position:absolute;right:0;top:40px;z-index:30;background:white;border:1px solid #dfe3e8;padding:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 8px;width:min(420px,calc(100vw - 16px));min-width:min(340px,calc(100vw - 16px))}
.actions-menu .header-actions>button,.actions-menu .header-actions>.guide-link{min-width:0;min-height:40px;padding:8px 10px;text-align:left;line-height:1.3;white-space:normal}
.actions-menu .header-actions>#saved{grid-column:1/-1;margin-top:2px;padding:8px 2px 2px;border-top:1px solid #edf0f5;white-space:normal}
#filter-panel{position:fixed;inset:56px 16px auto auto;margin:0;max-width:calc(100vw - 32px);border:1px solid #dfe3e8;border-radius:6px;padding:8px;background:white}
#filter-panel #tree-options{display:flex;flex-wrap:wrap;padding:8px;gap:12px;max-width:430px}#filter-panel select,#filter-panel button{min-height:32px}
#exit-fullscreen{position:absolute;right:12px;top:12px;z-index:10;height:36px;background:white}
.canvas-wrap.canvas-fullscreen,.canvas-wrap:fullscreen{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;min-height:0!important;z-index:100;background-color:#fafbfd}
.canvas-wrap.canvas-fullscreen #canvas,.canvas-wrap:fullscreen #canvas{height:100%;min-height:0}.canvas-wrap.canvas-fullscreen svg.tree{min-height:0;min-width:0}
@media(min-width:1000px){
 body.workspace-open{height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column}
 body.workspace-open>header{height:48px;min-height:48px;flex:none;padding:0 10px;gap:10px;flex-wrap:nowrap}
 body.workspace-open header .brand{display:none}body.workspace-open header .search{flex:0 1 180px;min-width:110px;max-width:180px;gap:5px}
 body.workspace-open header .search kbd{display:none}body.workspace-open header>button{height:34px;padding:4px 8px;white-space:nowrap}
 body.workspace-open .app{flex:1;min-height:0;height:auto;grid-template-columns:190px minmax(0,1fr);grid-template-rows:minmax(0,1fr);position:relative;overflow:hidden}
 body.workspace-open .app.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}
 body.workspace-open .app>.sidebar{grid-row:1;min-height:0;overflow:auto}
 body.workspace-open .app>main{grid-column:2;grid-row:1;min-height:0;height:100%;position:relative}
 body.workspace-open .page-heading,body.workspace-open .view-toolbar{display:none}
 body.workspace-open .canvas-wrap{min-height:0;flex:1}body.workspace-open svg.tree{min-height:0}
 body.workspace-open main>footer{position:absolute;right:12px;bottom:10px;pointer-events:none;max-width:45%;padding:4px 8px;background:#fafbfde8;border:0;border-radius:3px}
 body.workspace-open .app>.details{display:none;position:absolute;right:0;top:0;bottom:0;width:min(600px,65vw);overflow:auto;z-index:20;border-left:1px solid #dce4ef;grid-column:auto;grid-row:auto}
 body.workspace-open .app.info-open>.details{display:block}body.workspace-open .details .profile-grid{grid-template-columns:1fr;padding:16px;gap:12px}
 body.workspace-open .details .json-block{grid-column:auto}
 body.workspace-open #notice:not(:empty){flex:none;max-height:90px;overflow:auto;margin:0}
 .canvas-caption{top:10px;left:10px}.zoom{left:12px;bottom:12px}
}
@media(max-width:999px){header{height:auto;flex-wrap:wrap;gap:8px;padding:10px}header>#layouts{order:5;flex-basis:100%;min-height:36px}header>#title{font-size:16px}header .search{min-width:130px}#filter-panel{top:100px}.page-heading{display:none}.view-toolbar{display:none}}
.family-card-with-menu{position:relative}.family-card-menu{position:absolute;right:10px;top:10px;z-index:3}.family-menu-trigger{width:32px;height:32px;padding:0;border:0;border-radius:50%;font-size:22px;line-height:1;color:#637187;background:transparent}.family-menu-trigger:hover,.family-menu-trigger:focus-visible{background:#eef2f7;color:#253147}.family-menu-dropdown{display:none;position:absolute;right:0;top:36px;min-width:150px;padding:5px;background:#fff;border:1px solid #dfe3e8;border-radius:5px;box-shadow:0 8px 24px #25314724}.family-menu-dropdown.open{display:block}.family-edit-action,.family-delete-action{display:block;width:100%;border:0;text-align:left;background:#fff;padding:9px 10px;white-space:nowrap}.family-edit-action:hover,.family-edit-action:focus-visible{background:#eef4ff;color:#1e4fa8}.family-delete-action{color:#ba3030}.family-delete-action:hover,.family-delete-action:focus-visible{background:#fff0f0;color:#982525}button.destructive{background:#ba3030;border-color:#ba3030;color:#fff}button.destructive:hover{background:#982525;border-color:#982525}
.profile-header-actions{display:flex;justify-content:flex-end;padding:0 28px 14px}.profile-header-actions .delete{color:#ba3030;border-color:#e7b9b9;background:#fff}.profile-header-actions .delete:hover{background:#fff0f0;color:#982525}
.gender-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}.profile-media-block{margin:0 20px 20px}.profile-media-block[hidden]{display:none}
.connection.kinship-spouse{stroke:#7c3aed;color:#7c3aed}.marriage-mark.marriage-active{fill:#7c3aed}
.node.kinship-hover-self rect,.node.kinship-target-spouse rect{stroke:#7c3aed;stroke-width:6px}.node.kinship-target-parent rect,.node.kinship-target-sibling rect,.node.kinship-target-grandparent rect,.node.kinship-target-child rect,.node.kinship-target-grandchild rect{stroke:#c53a3a;stroke-width:6px}.node.kinship-target-half-sibling rect{stroke:#e7a05a;stroke-width:6px}.node.kinship-target-step-sibling rect,.node.kinship-target-step rect,.node.kinship-target-step-grandparent rect,.node.kinship-target-step-child rect,.node.kinship-target-step-grandchild rect{stroke:#318a52;stroke-width:6px}
.search{position:relative}.search #clear-search{width:26px;height:26px;padding:0;border:0;background:transparent;font-size:20px;line-height:1;color:#718096;flex:none}.search #clear-search:hover{background:#eef2f7}.search #global-search-results{position:absolute;left:0;top:calc(100% + 10px);z-index:80;width:min(440px,calc(100vw - 24px));max-height:min(430px,60vh);overflow:auto;padding:6px;background:#fff;border:1px solid #dce3ee;border-radius:6px;box-shadow:0 14px 34px #1f293726;color:#20252c}.search #global-search-results button{display:block;width:100%;border:0;text-align:left;padding:11px 12px;background:#fff}.search #global-search-results button:hover,.search #global-search-results button[aria-selected="true"]{background:#eef4ff}.search #global-search-results strong,.search #global-search-results small{display:block;overflow-wrap:anywhere}.search #global-search-results small{margin-top:4px;color:#7c899b;font-size:11px}.search #global-search-results p{margin:0;padding:14px 12px;color:#7c899b}
.approval-intro{color:#66768b;line-height:1.6}.approval-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 0;border-bottom:1px solid #edf0f5}.approval-row span{min-width:0}.approval-row strong,.approval-row small{display:block}.approval-row small{margin-top:5px;color:#7c899b}.approval-row p{margin:9px 0 0;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.approval-row>div{display:flex;gap:8px;flex:none}#approval-message-label small{color:#7c899b;font-weight:400}@media(max-width:650px){.approval-row{align-items:flex-start;flex-direction:column}.approval-row>div{width:100%}.approval-row button{flex:1}}
.approval-count{display:inline-grid;place-items:center;min-width:19px;height:19px;margin-left:7px;padding:0 5px;border-radius:10px;background:#c93434;color:#fff;font-size:11px;font-weight:700;line-height:1}
.proposal-row{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:15px 0;border-bottom:1px solid #edf0f5}.proposal-row>div:first-child{min-width:0}.proposal-row strong,.proposal-row small{display:block}.proposal-row small{margin-top:5px;color:#6f7f93}.proposal-row p{margin:7px 0 0;color:#46566c;line-height:1.45}.proposal-row>div:last-child{display:flex;gap:8px;flex:none}.proposal-fields{display:grid;grid-template-columns:84px minmax(0,1fr);gap:5px 10px;margin:12px 0 0;line-height:1.45}.proposal-fields dt{color:#7c899b}.proposal-fields dd{margin:0;overflow-wrap:anywhere}.proposal-fields ul{margin:0;padding-left:18px}@media(max-width:650px){.proposal-row{display:block}.proposal-row>div:last-child{margin-top:12px}.proposal-row>div:last-child button{flex:1}.proposal-fields{grid-template-columns:76px minmax(0,1fr)}}
@media(max-width:650px){.search #global-search-results{left:-4px;top:calc(100% + 4px);width:calc(100vw - 24px);max-height:50vh}.search kbd{display:none}}

/* Compact member editor: keep core fields and actions in a single viewport. */
#editor{width:min(980px,calc(100vw - 32px));max-height:min(88vh,820px);height:min(88vh,820px);padding:0;border:0;border-radius:12px;overflow:hidden;box-shadow:0 24px 56px rgba(31,41,55,.18)}
#person-form{display:flex;flex-direction:column;height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;background:#fff}
#person-form>.dialog-head{flex:none;padding:18px 22px 12px;border-bottom:1px solid #edf0f5}
#person-form>.dialog-head h2{font-size:20px;line-height:1.2;margin:2px 0 0}
#person-form>.editor-intro{flex:none;margin:0;padding:10px 22px;color:#66768b;font-size:12px;line-height:1.45;border-bottom:1px solid #edf0f5}
#person-form>.editor-grid{display:grid;flex:none;grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr);gap:12px;padding:16px 22px 10px;min-height:0}
#person-form .editor-section{padding:14px;border:1px solid #e4e9f0;border-radius:8px;background:#fff;min-width:0}
#person-form .editor-section:first-child{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;align-content:start}
#person-form .editor-section:first-child>.step-label{grid-column:1/-1}
#person-form .editor-section:first-child>label:nth-last-child(-n+2),#person-form .editor-section:first-child>label:nth-child(2),#person-form .editor-section:first-child>label:nth-child(3){grid-column:1/-1}
#person-form .editor-section:first-child>.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;grid-column:1/-1}
#person-form .editor-section:first-child>label:has(textarea){grid-column:1/-1}
#person-form .editor-section:first-child>.date-field{grid-column:1/-1}
.date-field{display:block;margin:0}
.date-field-head{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:#53657c;margin-bottom:4px}
.date-field-head select{width:auto;height:28px;padding:3px 6px;font-size:11px}
.lunar-fields{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.lunar-fields input[data-lunar-day],.lunar-fields input[data-lunar-month]{width:78px;flex:none;height:32px}
.lunar-fields input[data-lunar-year]{flex:1;min-width:150px;height:32px}
.lunar-leap{display:flex;align-items:center;gap:4px;font-size:11px;white-space:nowrap;margin:0;color:#53657c}
.lunar-leap input{width:auto!important;height:auto!important;margin:0}
.lunar-year-options{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.lunar-year-options button{font-size:11px;padding:4px 8px;border:1px solid #d8e0eb;border-radius:5px;background:#f3f6fb;color:#2463eb;height:auto;width:auto}
.lunar-year-options button:hover{background:#e7edfa}
.date-hint{display:block;margin-top:5px;color:#7b8ba0;font-size:11px}
.date-guidance{display:block;margin:0 0 5px;color:#7b8ba0;font-size:11px;line-height:1.4}
.date-field input[aria-invalid="true"]{border-color:#b42318}
#person-form .editor-section .step-label{margin:0 0 2px;font-size:10px;letter-spacing:1px;color:#5671a4}
#person-form label{display:grid;gap:4px;font-size:12px;color:#53657c;margin:0}
#person-form label small{font-size:10px}
#person-form input,#person-form select{height:36px;padding:7px 9px;font-size:13px;border:1px solid #d8e0eb;border-radius:6px;background:#fff}
#person-form textarea{min-height:54px;max-height:54px;padding:7px 9px;font-size:13px;border:1px solid #d8e0eb;border-radius:6px;resize:none;background:#fff}
#person-form .editor-section:nth-child(2){display:grid;align-content:start;gap:10px}
#person-form .mode-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#person-form .mode-choice label{display:flex;align-items:center;min-height:36px;margin:0;padding:7px 9px;font-size:12px;border:1px solid #e0e6ef;border-radius:6px;background:#f8fafc}
#person-form .mode-choice input{width:auto;height:auto;margin:0 6px 0 0}
#person-form .branch-root-choice{display:flex;align-items:center;gap:8px;margin:0;padding-top:8px;border-top:1px solid #edf0f5}
#person-form .branch-root-choice input{width:auto;height:auto;margin:0}
#person-form .relation-hint{display:none}
#person-form .editor-account-role{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,240px) auto;align-items:end;gap:10px 12px}
#person-form .editor-account-role[hidden]{display:none}
#person-form .editor-account-role-copy .step-label{margin-bottom:4px}
#person-form .editor-account-role-copy p{margin:0;color:#53657c;font-size:12px}
#person-form .editor-account-role .form-error{grid-column:1/-1;margin:0}
@media(max-width:650px){#person-form .editor-account-role{grid-template-columns:1fr}}
#person-form .editor-grid>.editor-section.editor-rel-section{grid-column:1/-1;display:flex;flex-direction:column;gap:0;min-height:0;padding:12px 14px!important;margin:0!important;border-top:1px solid #e4e9f0!important;background:#fbfcff;border-radius:8px}
#person-form #editor-rel-list{min-height:0;padding-right:4px}
#person-form .editor-relation-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid #edf1f6}
#person-form .editor-relation-row:last-child{border-bottom:0}
#person-form .editor-relation-row span{flex:1;min-width:0}
#person-form .editor-relation-row strong{display:block;font-size:13px;overflow-wrap:anywhere}
#person-form .editor-relation-row small{display:block;font-size:11px;margin-top:2px;color:#7b8ba0;overflow-wrap:anywhere}
#person-form .editor-relation-row button{font-size:12px;padding:6px 9px}
#person-form #editor-add-relation{margin:0 0 6px;padding:7px 9px;font-size:12px}
#person-form #editor-add-relation::after{content:'Khi chọn “Thêm mối quan hệ…”, nên chọn là con, hoặc là cha/mẹ, anh trai, em gái… của ai đó (tìm trong danh sách cho đúng tên). Không nên chọn dì, chú, bác… vì có thể thiếu chính xác.';display:block;margin-top:7px;padding:7px 9px;border-left:3px solid #9bb8e8;background:#f1f6ff;color:#61728a;font-size:11px;font-weight:400;line-height:1.55;text-align:left;white-space:normal}
#person-form #editor-rel-compose{padding:12px;margin-top:9px;border:1px solid #dfe9f6;border-radius:6px;background:#fff}
#person-form>.dialog-actions{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0;padding:12px 22px 16px;background:#fff;border-top:1px solid #edf0f5;min-height:60px;position:sticky;bottom:0;z-index:2}
#person-form>.dialog-actions button{height:36px;padding:7px 13px}
#person-form>.dialog-actions .delete{display:inline-flex;align-items:center;justify-content:center;height:36px;margin:0;padding:7px 13px;border:1px solid #e7b9b9;border-radius:5px;background:#fff;color:#ba3030;white-space:nowrap;line-height:1}
#person-form>.dialog-actions .delete:hover{background:#fff0f0;color:#982525}
@media(max-width:760px){#editor{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);height:calc(100dvh - 16px)}#person-form>.dialog-head,#person-form>.editor-intro,#person-form>.dialog-actions{padding-left:14px;padding-right:14px}#person-form>.editor-grid{display:grid;grid-template-columns:1fr;gap:8px;padding:10px 14px 8px}#person-form .editor-section{padding:10px 12px}#person-form .editor-section:first-child{grid-template-columns:1fr 1fr;gap:6px 10px}#person-form .editor-section:first-child>.step-label{margin-bottom:0}#person-form .editor-section:first-child>.form-row{grid-template-columns:1fr;gap:6px 10px}#person-form .lunar-fields input[data-lunar-day],#person-form .lunar-fields input[data-lunar-month]{width:64px}#person-form label{gap:2px;font-size:11px}#person-form input,#person-form select{height:32px;padding:5px 7px;font-size:12px}#person-form textarea{min-height:40px;max-height:40px;padding:5px 7px;font-size:12px}#person-form .editor-section:nth-child(2){grid-template-columns:1fr 1fr;gap:7px 10px}#person-form .editor-section:nth-child(2)>.step-label,#person-form .editor-section:nth-child(2)>.mode-choice,#person-form .editor-section:nth-child(2)>.branch-root-choice{grid-column:1/-1}#person-form .mode-choice{grid-template-columns:1fr}#person-form .mode-choice label{min-height:30px;padding:5px 7px;font-size:11px}#person-form .branch-root-choice{padding-top:6px;font-size:11px}#person-form .editor-rel-section{padding:9px 12px!important}#person-form #editor-rel-list{max-height:none}#person-form .editor-relation-row{padding:5px 0}#person-form #editor-add-relation{margin:0 0 6px;padding:5px 7px}#person-form>.dialog-head{padding-top:13px;padding-bottom:10px}#person-form>.dialog-head h2{font-size:18px}#person-form>.editor-intro{display:block}}

/* Mobile workspace: keep navigation out of the canvas and dialogs within the viewport. */
@media (max-width:999px) {
 body.workspace-open { height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column; }
 body.workspace-open header { display:grid;grid-template-columns:40px minmax(0,1fr) auto minmax(100px,max-content) auto;gap:4px 6px;min-height:0;height:auto;flex:none;padding:6px 8px; }
 body.workspace-open header .brand { display:none; }
 body.workspace-open #toggle-sidebar { display:block;grid-column:1;grid-row:1; }
 body.workspace-open header>#title { grid-column:2;grid-row:1;margin:0;font-size:14px;overflow:hidden;text-overflow:ellipsis; }
 body.workspace-open #fullscreen-tree { grid-column:3;grid-row:1; }
 body.workspace-open #auth-button { grid-column:4;grid-row:1;white-space:nowrap; }
 body.workspace-open .actions-menu { grid-column:5;grid-row:1; }
 body.workspace-open header button,body.workspace-open .actions-menu summary { min-height:40px;padding:6px 8px;font-size:12px; }
 body.workspace-open header .search { grid-column:1/-1;grid-row:2;order:initial;min-width:0;max-width:none;width:100%;height:40px;padding:0 6px;border:1px solid #e6e8ec;border-radius:4px; }
 body.workspace-open header .search input { min-width:0;font-size:16px; }
 body.workspace-open header .search kbd { display:none; }
 body.workspace-open header>#layouts { grid-column:1/-1;grid-row:3;order:initial;min-height:40px;width:100%;gap:14px;justify-content:flex-start; }
 body.workspace-open header>#layouts button { min-height:40px;flex:none; }
 body.workspace-open #workspace { position:relative;display:flex;flex:1;min-height:0;height:auto;overflow:hidden; }
 body.workspace-open #workspace>main { min-height:0;height:100%;width:100%;flex:1;position:relative; }
 body.workspace-open .canvas-wrap { min-height:0;height:auto;flex:1; }
 body.workspace-open #workspace>.sidebar { position:absolute;inset:0 auto 0 0;z-index:30;width:min(320px,calc(100% - 32px));display:flex;overflow:auto;padding:12px;border-right:1px solid #dce4ef; }
 body.workspace-open #workspace.sidebar-collapsed>.sidebar { display:none; }
 body.workspace-open .sidebar .workspace { display:flex;width:100%;margin:0 0 12px; }
 body.workspace-open .sidebar #roots { display:grid;max-height:none;overflow:visible; }
 body.workspace-open .sidebar #roots button { min-width:0;white-space:normal; }
 body.workspace-open #workspace>.details { display:none;position:absolute;inset:0;z-index:20;width:100%;height:100%;overflow:auto;overscroll-behavior:contain; }
 body.workspace-open #workspace.info-open>.details { display:block; }
 body.workspace-open footer { position:absolute;bottom:0;right:0;max-width:100%;padding:4px 8px;background:#ffffffd9;pointer-events:none; }
 body.workspace-open #notice:not(:empty) { flex:none;max-height:80px;overflow:auto; }
 .search #global-search-results { left:0;width:100%;max-height:45dvh; }
 .actions-menu .header-actions { max-height:65dvh;overflow:auto;max-width:calc(100vw - 16px); }
 .detail-top,.profile-header { overflow-wrap:anywhere; }
 .profile-grid { grid-template-columns:minmax(0,1fr);padding:12px;gap:12px; }
 .profile-block h3 { flex-wrap:wrap; }
 .detail-tabs { overflow:auto;gap:18px; }
 .detail-tabs button { flex:none;min-height:44px; }
 .json-block { grid-column:auto; }
 #toast { width:max-content;max-width:calc(100vw - 24px);overflow-wrap:anywhere; }
 dialog { max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px;overscroll-behavior:contain; }
 dialog input,dialog select,dialog textarea,#person-form input,#person-form select,#person-form textarea { min-width:0;max-width:100%;font-size:16px; }
 dialog input:not([type=checkbox]):not([type=radio]),dialog select,#person-form input:not([type=checkbox]):not([type=radio]),#person-form select { height:40px; }
 dialog .dialog-actions { flex-wrap:wrap;gap:8px;bottom:-16px; }
 dialog .dialog-actions button { min-height:40px;height:auto;white-space:normal; }
 #editor { width:calc(100vw - 16px);max-width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);margin:auto; }
 #person-form>.editor-grid { grid-template-columns:minmax(0,1fr);padding:10px 12px; }
 #person-form .editor-section:first-child,#person-form .editor-section:nth-child(2) { grid-template-columns:minmax(0,1fr); }
 #person-form .editor-section { min-width:0;padding:10px; }
 #person-form>.dialog-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;bottom:0;padding:10px 12px max(10px,env(safe-area-inset-bottom)); }
 #person-form>.dialog-actions button { width:100%;height:auto;min-height:42px;padding:8px;font-size:13px;line-height:1.4;white-space:normal; }
 #person-form .date-field-head { flex-wrap:wrap; }
 #person-form .lunar-fields input[data-lunar-year] { min-width:100px; }
 #person-form textarea { min-height:64px;max-height:none;resize:vertical; }
 .parent-selectors,.custom-labels { grid-template-columns:minmax(0,1fr); }
 .media-item { grid-template-columns:56px minmax(0,1fr);gap:10px; }
 .media-item img { width:56px;height:56px; }
 .media-item>button { grid-column:2;justify-self:start; }
 .upload-label input { width:100%;min-width:0; }
}
@media (max-width:360px) {
 body.workspace-open header { grid-template-columns:36px minmax(0,1fr) minmax(92px,112px) auto;gap:4px; }
 body.workspace-open header button,body.workspace-open .actions-menu summary { padding:6px;font-size:11px; }
 body.workspace-open #fullscreen-tree { display:none; }
 body.workspace-open #auth-button { grid-column:3;grid-row:1;width:100%;white-space:normal;line-height:1.2; }
 body.workspace-open .actions-menu { grid-column:4;grid-row:1; }
 body.workspace-open header>#title { font-size:12px; }
 .profile-header { padding:16px;gap:12px; }
 .profile-header h2 { font-size:20px; }
}

/* Landscape phones keep the search on the first row and actions on one row. */
@media (min-width:600px) and (max-width:999px) {
 body.workspace-open header { grid-template-columns:40px auto minmax(120px,1fr) auto minmax(100px,max-content) auto; }
 body.workspace-open header .search { grid-column:3;grid-row:1; }
 body.workspace-open #fullscreen-tree { grid-column:4; }
 body.workspace-open #auth-button { grid-column:5;grid-row:1;white-space:nowrap; }
 body.workspace-open .actions-menu { grid-column:6; }
 body.workspace-open header>#layouts { grid-row:2; }
 #person-form>.dialog-actions { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:999px) and (max-height:500px) {
 #person-form>.dialog-head { padding-top:8px;padding-bottom:8px; }
 #person-form>.editor-intro { margin:8px 0;padding-top:0;padding-bottom:0; }
}
/* Profile dialog and editor use a consistent two-size type scale and row rhythm. */
#workspace{grid-template-columns:220px minmax(0,1fr)}
#workspace main{grid-column:2}
#workspace.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}
header>#layouts:empty{display:none!important}
#profile-dialog{width:min(760px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 28px);padding:0;border:1px solid #dce3ec;border-radius:8px;color:#20252c;background:#fff;box-shadow:0 24px 80px #17233b38;overflow:hidden}
#profile-dialog::backdrop{background:#15203378}
#profile-dialog .details{width:auto;max-height:calc(100dvh - 30px);overflow:auto;border:0;background:#fff}
#profile-dialog .detail-top{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;background:#fff;border-bottom:1px solid #e6ebf1}
#profile-dialog .detail-top [data-profile-close]{width:40px;height:40px;padding:0;font-size:14px;line-height:1}
#profile-dialog .profile-header{gap:12px;padding:16px}
#profile-dialog .profile-header-actions{display:flex;gap:12px;padding:0 16px 12px}
#profile-dialog .profile-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px 16px}
#profile-dialog .profile-block{display:grid;align-content:start;gap:12px;padding:14px}
#profile-dialog .detail-tabs{gap:12px;padding:0 16px}
#profile-dialog .detail-tabs button{padding:10px 0}
#profile-dialog .profile-header h2{font-size:20px;line-height:1.25}
#person-form,#person-form *{font-size:14px}
#person-form>.dialog-head h2{font-size:18px}
#person-form>.editor-grid{gap:12px}
#person-form .editor-section:first-child,#person-form .editor-section:nth-child(2){gap:12px}
#person-form label{gap:8px}
#person-form .editor-relation-row{gap:12px;padding:6px 0}
#person-form>.dialog-actions{gap:12px}
#profile-media .media-manager{display:grid;gap:12px}
#profile-media .upload-label{display:grid;gap:8px}
#profile-media .media-save{justify-self:start}
@media(max-width:650px){#profile-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}#profile-dialog .details{max-height:calc(100dvh - 18px)}#profile-dialog .profile-grid{grid-template-columns:1fr;padding:12px}#profile-dialog .profile-block{padding:12px}}
@media (hover:hover) and (pointer:fine){body.tree-workspace #canvas{cursor:default}body.tree-workspace #canvas.dragging{cursor:grabbing}body.tree-workspace #canvas .node,body.tree-workspace #canvas .fan-sector.known{cursor:pointer}}
body.workspace-open main>footer{font-size:30px}
.approval-row{display:grid;grid-template-columns:minmax(0,1fr)}.approval-row>div{width:100%;flex:none}
.approval-row>div{min-width:0;flex-wrap:wrap;align-items:center}.approval-row>div select,.approval-row>div input[data-user-new-name]{width:190px;min-width:0;height:40px}.approval-row>div [data-user-mode]{width:220px}.approval-row>div [data-user-new-name]{width:210px}
@media(max-width:650px){.approval-row>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.approval-row>div select,.approval-row>div input[data-user-new-name]{width:100%;min-width:0;max-width:none}.approval-row>div [data-user-new-name]{grid-column:1/-1}}
@media(max-width:650px){body.workspace-open main>footer{font-size:27px}}
.guide-link{display:flex;align-items:center;justify-content:flex-start;min-height:40px;padding:8px 10px;border:1px solid #dfe3e8;border-radius:5px;color:inherit;background:#fff;font-weight:400;white-space:normal}
.guide-link:hover,.guide-link:focus-visible{background:#f1f4f8;text-decoration:none}
.actions-menu .header-actions .guide-link,.actions-menu .header-actions #info-toggle{width:100%;min-height:40px}
#profile-dialog .detail-top{gap:6px;padding:6px 10px}
#profile-dialog .profile-column{display:flex;flex-direction:column;gap:4px;min-width:0}
#profile-dialog .profile-column>.profile-block{flex:none}
#profile-dialog .profile-column>.profile-media-block{margin:0;min-width:0}
#profile-dialog .profile-header{gap:8px;padding:8px 10px}
#profile-dialog .profile-header h2{margin-bottom:4px}
#profile-dialog .profile-header p{margin-bottom:4px}
#profile-dialog .profile-header-actions{gap:6px;padding:0 10px 6px}
#profile-dialog .detail-tabs{gap:8px;padding:0 10px}
#profile-dialog .detail-tabs button{padding:6px 0}
#profile-dialog .profile-grid{gap:4px;padding:4px 10px 8px}
#profile-dialog .profile-block{gap:4px;padding:8px}
#profile-dialog .profile-block h3{gap:4px;margin-bottom:4px}
#profile-dialog .profile-block h3:not(:first-child){margin-top:8px}
#profile-dialog .profile-block dl{gap:5px 8px}
#profile-dialog .profile-block .relative{gap:6px;padding:3px 0}
#profile-dialog .profile-block .relationship-row{gap:3px}
#profile-dialog .profile-block .relationship-row .relative small{margin-top:2px}
#profile-dialog .profile-block .fact{gap:4px;margin-bottom:4px}
#profile-dialog .profile-block .photo-gallery{gap:4px;margin:4px 0}
#profile-dialog .detail-top .profile-header-actions{align-items:center;gap:4px;margin-left:auto;padding:0}
#profile-dialog .detail-top .profile-header-actions button{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:40px;flex:0 1 auto;height:auto;min-height:40px;margin:0;padding:6px 10px;font-family:inherit;font-size:14px;font-weight:400;line-height:1.2;white-space:normal}
#profile-dialog .detail-top .profile-header-actions{flex-wrap:wrap}
#profile-dialog .detail-top [data-profile-close]{flex:0 0 40px;width:40px;height:40px;font-family:inherit;font-size:14px}
@media(max-width:650px){#profile-dialog{width:calc(100% - 24px);max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);margin-inline:auto}#profile-dialog .details{max-height:calc(100dvh - 26px)}#profile-dialog .detail-top{gap:4px;padding:6px}#profile-dialog .detail-top>span:first-child{min-width:0;font-size:12px;overflow-wrap:anywhere}#profile-dialog .detail-top>span:nth-child(2){display:none}#profile-dialog .detail-top .profile-header-actions button{min-width:40px;padding:6px 8px;font-size:12px}#profile-dialog .detail-top [data-profile-close]{flex-basis:40px;width:40px;height:40px;font-size:14px}}
/* Phone home header: brand, account and Menu share row one; search takes row two. */
@media(max-width:650px){body:not(.workspace-open) header{flex-wrap:wrap;align-items:center}body:not(.workspace-open) header .search{order:10;flex:1 1 100%}body:not(.workspace-open) #auth-button{flex:0 1 auto;min-width:0;max-width:calc(100% - 232px);margin-left:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body:not(.workspace-open) .actions-menu{flex:none}}
@media(max-width:400px){body:not(.workspace-open) header .brand{font-size:19px}body:not(.workspace-open) header .brand-icon{font-size:21px}body:not(.workspace-open) header{gap:6px}}

#proposal-dialog{width:min(760px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:0;border:1px solid #dce3ee;border-radius:10px;color:#20252c;box-shadow:0 24px 80px #17233b38;overflow:hidden}
#proposal-dialog::backdrop{background:#15203378}
#proposal-dialog[open]{display:flex;flex-direction:column}
#proposal-dialog>.dialog-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;margin:0;padding:16px 20px 12px;background:#fff;border-bottom:1px solid #edf0f5}
#proposal-dialog>.dialog-head>div{min-width:0}
#proposal-dialog>.dialog-head h2{margin:4px 0 0;font-size:20px;line-height:1.25;overflow-wrap:anywhere}
#proposal-dialog>.dialog-head button{flex:none;width:40px;height:40px;padding:0;font-size:22px;line-height:1}
#proposal-dialog>.approval-intro{flex:none;margin:0;padding:14px 20px 8px;color:#66768b;line-height:1.55}
#proposal-list{flex:1 1 auto;min-height:0;overflow:auto;padding:0 20px 16px;overscroll-behavior:contain}
#proposal-list>p{margin:12px 0;color:#66768b;line-height:1.5}
#proposal-dialog .proposal-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:start;padding:16px 0}
#proposal-dialog .proposal-row>div:first-child{display:block;min-width:0}
#proposal-dialog .proposal-row>div:first-child strong{overflow-wrap:anywhere}
#proposal-dialog .proposal-row>div:nth-child(2){display:flex;flex-wrap:wrap;gap:8px}
#proposal-dialog .proposal-row>div:nth-child(2) button{min-height:40px;white-space:normal}
#proposal-dialog .proposal-fields{grid-template-columns:minmax(76px,auto) minmax(0,1fr);gap:5px 10px}
#proposal-dialog .proposal-fields dt,#proposal-dialog .proposal-fields dd{min-width:0;overflow-wrap:anywhere}
#proposal-dialog .proposal-fields ul{padding-left:18px}
#proposal-error{flex:none;margin:0;padding:0 20px 12px}
@media(max-width:650px){
 #proposal-dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
 #proposal-dialog>.dialog-head{gap:10px;padding:12px 14px 10px}
 #proposal-dialog>.dialog-head h2{font-size:18px}
 #proposal-dialog>.approval-intro{padding:12px 14px 6px}
 #proposal-list{padding:0 14px 12px}
 #proposal-dialog .proposal-row{grid-template-columns:minmax(0,1fr);gap:10px;padding:14px 0}
 #proposal-dialog .proposal-row>div:first-child{margin-top:0}
 #proposal-dialog .proposal-row>div:nth-child(2){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 #proposal-dialog .proposal-row>div:nth-child(2) button{min-width:0;padding:9px 8px}
 #proposal-dialog .proposal-fields{grid-template-columns:minmax(68px,auto) minmax(0,1fr);gap:5px 8px}
 #proposal-error{padding:0 14px 10px}
}

#approval-dialog{display:none;width:min(900px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:0;border:1px solid #dce3ee;border-radius:10px;color:#20252c;box-shadow:0 24px 80px #17233b38;overflow:hidden}
#approval-dialog::backdrop{background:#15203378}
#approval-dialog[open]{display:flex;flex-direction:column}
#approval-dialog>.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;margin:0;padding:16px 20px 12px;background:#fff;border-bottom:1px solid #edf0f5}
#approval-dialog>.dialog-head>div{min-width:0}
#approval-dialog>.dialog-head h2{margin:4px 0 0;font-size:20px;line-height:1.25;overflow-wrap:anywhere}
#approval-dialog>.dialog-head button{flex:none;width:40px;height:40px;padding:0;font-size:22px;line-height:1}
#approval-dialog>.approval-intro{flex:0 1 auto;max-height:24dvh;overflow:auto;margin:0;padding:14px 20px 8px;color:#66768b;line-height:1.55}
#approval-list{flex:1 1 auto;min-height:0;overflow:auto;padding:0 20px 16px;overscroll-behavior:contain}
#approval-list>p{margin:12px 0;color:#66768b;line-height:1.5}
#approval-dialog .approval-row{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:start;padding:16px 0;border-bottom:1px solid #edf0f5}
#approval-dialog .approval-row>span{display:block;min-width:0}
#approval-dialog .approval-row strong{overflow-wrap:anywhere}
#approval-dialog .approval-row>div:last-child{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:8px;width:100%;min-width:0;align-items:center}
#approval-dialog .approval-row>div:last-child>select,#approval-dialog .approval-row>div:last-child>input[data-user-new-name]{width:100%;min-width:0;max-width:100%;height:40px}
#approval-dialog .approval-row>div:last-child>input[data-user-new-space-name]{width:100%;min-width:0;max-width:100%;height:40px}
#approval-dialog .approval-row>div:last-child>input[data-user-person-search]{width:100%;min-width:0;max-width:100%;height:40px}
#approval-dialog .approval-row>div:last-child>[data-user-person-search-empty]{grid-column:1/-1;color:#66768b;font-size:12px}
#approval-dialog .approval-row>div:last-child button{min-width:0;min-height:40px;white-space:normal}
#approval-dialog .approval-radio-choices{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%;margin:0;padding:0;border:0;min-width:0;box-sizing:border-box}
#approval-dialog .approval-radio-choices legend{grid-column:1/-1;margin-bottom:2px;color:#53657c;font-size:12px;font-weight:600}
#approval-dialog .approval-radio-choices label{display:flex;align-items:center;gap:9px;width:100%;min-width:0;min-height:42px;padding:9px 11px;border:1px solid #d8e0eb;border-radius:6px;background:#fff;color:#34445c;font-size:13px;line-height:1.35;overflow-wrap:anywhere;cursor:pointer}
#approval-dialog .approval-radio-choices label:has(input:checked){border-color:#2463eb;background:#f2f6ff;color:#194db7}
#approval-dialog .approval-radio-choices input[type=radio]{appearance:auto;flex:0 0 17px;width:17px;min-width:17px;max-width:17px;height:17px;min-height:17px;max-height:17px;margin:0;padding:0;accent-color:#2463eb}
#approval-dialog .approval-radio-choices label:focus-within{outline:3px solid #2463eb33;outline-offset:1px}
#approval-error{flex:none;margin:0;padding:0 20px 12px}
@media(max-width:650px){
 #approval-dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
 #approval-dialog>.dialog-head{gap:10px;padding:12px 14px 10px}
 #approval-dialog>.dialog-head h2{font-size:18px}
 #approval-dialog>.approval-intro{max-height:22dvh;padding:12px 14px 6px}
 #approval-list{padding:0 14px 12px}
 #approval-dialog .approval-row{gap:10px;padding:14px 0}
 #approval-dialog .approval-row>div:last-child{grid-template-columns:repeat(2,minmax(0,1fr))}
 #approval-dialog .approval-row>div:last-child [data-user-new-name]{grid-column:1/-1}
 #approval-dialog .approval-row>div:last-child button{padding:9px 8px}
 #approval-dialog .approval-radio-choices{grid-template-columns:1fr}
 #approval-error{padding:0 14px 10px}
}

#export-dialog{width:min(560px,calc(100% - 32px));max-width:calc(100% - 32px);max-height:calc(100dvh - 32px);padding:0;border:1px solid #dce3ee;border-radius:10px;color:#20252c;box-shadow:0 24px 80px #17233b38;overflow:auto}
#export-dialog::backdrop{background:#15203378}
#export-dialog>.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0;padding:16px 20px 12px;border-bottom:1px solid #edf0f5;background:#fff}
#export-dialog>.dialog-head h2{min-width:0;margin:0;font-size:20px;line-height:1.25;overflow-wrap:anywhere}
#export-dialog>.dialog-head button{flex:none;width:40px;height:40px;padding:0;font-size:22px;line-height:1}
#export-dialog>p{margin:0;padding:14px 20px 10px;color:#66768b;line-height:1.55}
#export-dialog>.export-option{display:grid;align-content:center;gap:4px;width:calc(100% - 40px);min-height:72px;margin:4px 20px;padding:12px 14px;border:1px solid #dce3ee;border-radius:7px;background:#fbfcff;text-align:left;line-height:1.45;overflow-wrap:anywhere}
#export-dialog>.export-option:hover{border-color:#b7c9e6;background:#f3f7ff}
#export-dialog>.export-option:focus-visible{outline:3px solid #2463eb33;outline-offset:2px}
#export-dialog>.export-option strong,#export-dialog>.export-option small{display:block}
#export-dialog>.export-option strong{color:#26354a}
#export-dialog>.export-option small{color:#66768b;font-size:12px}
#export-dialog>.export-option:last-child{margin-bottom:20px}
@media(max-width:650px){
 #export-dialog{width:calc(100% - 24px);max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);margin-inline:auto}
 #export-dialog>.dialog-head{gap:10px;padding:12px 14px 10px}
 #export-dialog>.dialog-head h2{font-size:18px}
 #export-dialog>p{padding:12px 14px 8px}
 #export-dialog>.export-option{width:calc(100% - 28px);min-height:68px;margin:4px 14px;padding:11px 12px}
 #export-dialog>.export-option:last-child{margin-bottom:14px}
}
#editor{height:min(94dvh,1100px);max-height:calc(100dvh - 24px)}
#person-form textarea[name="source"],#person-form textarea[name="notes"]{min-height:140px;max-height:none;resize:vertical}
#person-form textarea[name="notes"]{min-height:240px}
@media(max-width:760px){
 #editor{height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}
 #person-form textarea[name="source"]{min-height:120px}
 #person-form textarea[name="notes"]{min-height:200px}
}
.brand-icon{display:inline-flex;width:32px;height:32px;flex:none;color:#2463eb}
.brand-icon svg{display:block;width:100%;height:100%}
.owner-metrics{margin-top:auto;padding:18px 10px 4px;border-top:1px solid #e5e9ef}
.owner-metrics h2{margin:0 0 16px;font-size:13px}
.owner-metric{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:10px 0;color:#687589;font-size:12px}
.owner-metric strong{color:#20252c;font-size:14px;font-variant-numeric:tabular-nums}
#online-users{display:grid;gap:6px;max-height:132px;overflow:auto;margin:10px 0 0;padding:0;list-style:none}
#online-users li{overflow-wrap:anywhere;color:#526782;font-size:12px}
#online-users .owner-metrics-empty,.owner-metrics-period{color:#8a929d;font-size:11px}
.owner-metrics-period{margin:12px 0 0;line-height:1.5}
.owner-metrics-error{margin:10px 0 0;color:#b42318;font-size:11px;line-height:1.5}
