.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:-webkit-grab;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;-webkit-animation:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:-webkit-grab;cursor:grab}.react-flow__node.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:-webkit-grab;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.sidebar{width:280px;height:100%;min-height:0;background:var(--bm-panel);border-right:1px solid var(--bm-rule);display:flex;flex-direction:column;color:var(--bm-text)}.sb-tabs{display:flex;gap:2px;padding:8px 10px 0;border-bottom:1px solid var(--bm-rule);flex:none}.sb-tab{flex:1;min-height:42px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--bm-muted);font-size:13px;font-weight:500;cursor:pointer}.sb-tab:hover{color:var(--bm-text)}.sb-tab[aria-selected=true]{color:var(--bm-text);font-weight:600;border-bottom-color:var(--bm-saffron)}.sb-panel{flex:1;min-height:0;overflow-y:auto}.sb-section{padding:18px 16px}.sb-heading{margin-bottom:14px;font-size:15px;font-weight:600}.sb-subheading{margin:18px 0 8px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--bm-muted)}.sb-hint{margin-bottom:14px;font-size:13px;line-height:1.5;color:var(--bm-muted)}.sb-row{display:flex;gap:10px}.sb-row>div{flex:1;min-width:0}.sb-segmented{margin-bottom:12px}.sb-segmented button{flex:1}.sb-disclosure{border-top:1px solid var(--bm-rule)}.sb-disclosure:last-child{border-bottom:1px solid var(--bm-rule)}.sb-disclosure-toggle{width:100%;min-height:48px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border:0;background:transparent;color:var(--bm-text);font-size:14px;font-weight:500;cursor:pointer;text-align:start}.sb-disclosure-toggle:hover{background:#efe7d60a}.sb-chevron{width:16px;height:16px;fill:none;stroke:var(--bm-muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}.sb-chevron.open{transform:rotate(180deg)}.sb-disclosure-body{padding:4px 16px 18px}.sb-tips{padding-inline-start:18px;font-size:13px;line-height:1.7;color:var(--bm-soft)}.sb-combobox{position:relative}.sb-combobox-list{position:absolute;top:calc(100% - 6px);left:0;right:0;z-index:40;max-height:200px;overflow-y:auto;padding:4px;background:var(--bm-panel);border:1px solid var(--bm-rule-strong);border-radius:8px;box-shadow:0 8px 24px #0006}.sb-combobox-option{display:block;width:100%;padding:8px 10px;border:0;border-radius:6px;background:transparent;color:var(--bm-text);font-size:13px;text-align:start;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.sb-combobox-option:hover{background:var(--bm-raised)}.sb-people{list-style:none;display:flex;flex-direction:column;gap:2px}.sb-person{width:100%;min-height:48px;display:flex;align-items:center;gap:10px;padding:6px 8px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--bm-text);text-align:start;cursor:pointer}.sb-person:hover{background:#efe7d60d}.sb-person[aria-current=true]{border-color:var(--bm-saffron);background:var(--bm-saffron-soft)}.sb-person-text{display:flex;flex-direction:column;min-width:0}.sb-person-name{font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sb-person-ctx{font-size:12px;color:var(--bm-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sb-empty{padding:12px 4px;font-size:13px;color:var(--bm-muted)}.bm-avatar{flex:none;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;font-weight:700;color:var(--bm-ground);background:var(--bm-teal)}.bm-avatar.is-female{background:var(--bm-rose)}.bm-avatar.is-dead{background:var(--bm-muted)}.sb-list{list-style:none;display:flex;flex-direction:column;gap:2px;margin-bottom:12px}.sb-list-row{display:flex;align-items:center;gap:2px;border:1px solid transparent;border-radius:8px}.sb-list-row.is-active{border-color:var(--bm-saffron);background:var(--bm-saffron-soft)}.sb-list-main{flex:1;min-width:0;min-height:42px;padding:0 10px;border:0;background:transparent;color:var(--bm-text);font-size:14px;text-align:start;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.sb-inline-input{flex:1;margin:2px}.sb-icon-btn{flex:none;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;color:var(--bm-muted);cursor:pointer}.sb-icon-btn:hover{color:var(--bm-text);background:#efe7d60f}.sb-icon-btn.is-danger:hover{color:var(--bm-danger)}.sb-icon-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sb-text-btn{border:0;background:transparent;color:var(--bm-saffron);font-size:13px;font-weight:600;cursor:pointer;min-height:32px;padding:0 4px}.sb-active-view{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px;padding:8px 10px;border:1px solid var(--bm-saffron);border-radius:8px;background:var(--bm-saffron-soft);font-size:13px}.sb-active-view strong{color:var(--bm-saffron);font-weight:600}.sb-confirm{margin-bottom:12px;padding:12px;border:1px solid var(--bm-danger-line);border-radius:10px;background:#f0807014;font-size:13px}.sb-confirm p{margin-bottom:10px}.sb-new-tree{display:flex;gap:8px}.sb-new-tree .btn{width:auto;flex:none}.sb-danger-zone{margin-top:18px;padding-top:16px;border-top:1px solid var(--bm-rule)}.family-node{position:relative;width:180px;min-height:60px;box-sizing:border-box;border-radius:12px;background:var(--bm-card);border:1px solid rgba(239,231,214,.16);box-shadow:0 4px 12px #00000040;color:var(--bm-text);transition:opacity .25s ease,box-shadow .25s ease,filter .25s ease,border-color .2s ease}.family-node:hover{border-color:#efe7d652}.family-node.is-dead{background:var(--bm-card-muted)}.family-node.selected{border:2px solid var(--bm-saffron);box-shadow:0 0 0 4px #e4a13c40,0 8px 20px #00000059}.family-node.connection-highlighted:not(.selected){border-color:#f2c078;box-shadow:0 0 0 3px #f2c07859,0 0 18px 2px #f2c07859}.family-node.pers-self{border:2px solid var(--bm-saffron);box-shadow:0 0 0 4px #e4a13c4d,0 0 24px 4px #e4a13c59}.family-node.pers-close{border-color:var(--bm-teal)}.fn-body{display:flex;align-items:center;gap:10px;padding:10px 12px;min-height:60px;box-sizing:border-box}.family-node.lod-far .fn-body{justify-content:center;padding:8px}.fn-avatar,.fn-photo{flex:none;width:32px;height:32px;border-radius:50%}.fn-avatar{display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;color:var(--bm-ground);background:var(--bm-teal)}.family-node.lod-close .fn-avatar,.family-node.lod-close .fn-photo{width:40px;height:40px}.fn-photo{object-fit:cover}.fn-avatar.is-female,.fn-dot.is-female{background:var(--bm-rose)}.fn-avatar.is-dead,.fn-dot.is-dead{background:var(--bm-muted)}.fn-dot{flex:none;width:12px;height:12px;border-radius:50%;background:var(--bm-teal)}.fn-text{display:flex;flex-direction:column;min-width:0;text-align:start}.fn-name{font-weight:600;font-size:14px;line-height:1.25;overflow-wrap:anywhere}.fn-name-far{font-size:20px}.fn-sub{font-size:11.5px;line-height:1.35;color:var(--bm-soft);text-transform:capitalize}.fn-role{color:#f2c078;font-weight:600}.fn-location{text-transform:none}.fn-relation{position:absolute;top:-12px;left:50%;transform:translate(-50%);padding:2px 10px;border-radius:999px;background:var(--bm-panel);border:1px solid var(--bm-rule-strong);color:var(--bm-text);font-size:11px;font-weight:600;white-space:nowrap;z-index:20;pointer-events:none}.fn-relation.is-self{background:var(--bm-saffron);border-color:var(--bm-saffron);color:var(--bm-ground)}.fn-generation{position:absolute;top:-9px;inset-inline-start:10px;padding:0 7px;border-radius:999px;background:var(--bm-ground);border:1px solid var(--bm-rule-strong);color:var(--bm-muted);font-size:10px;font-weight:600;line-height:16px;z-index:15;pointer-events:none}.fn-handle.react-flow__handle{width:12px;height:12px;border-radius:50%;border:2px solid var(--bm-card);transition:transform .15s ease}.fn-handle-kin.react-flow__handle{background:var(--bm-teal)}.fn-handle-spouse.react-flow__handle{background:var(--bm-saffron)}.fn-handle-ghost.react-flow__handle{background:transparent;border:none;z-index:1}.fn-handle-kin.react-flow__handle:hover,.fn-handle-spouse.react-flow__handle:hover,.fn-handle-kin.react-flow__handle-top:hover{transform:translate(-50%,-50%) scale(1.3)}.fn-handle-kin.react-flow__handle-bottom:hover{transform:translate(-50%,50%) scale(1.3)}.fn-handle-spouse.react-flow__handle-left:hover{transform:translate(-50%,-50%) scale(1.3)}.fn-handle-spouse.react-flow__handle-right:hover{transform:translate(50%,-50%) scale(1.3)}.fn-zone{position:absolute;display:flex;pointer-events:all}.fn-zone-top{top:-46px;left:50%;transform:translate(-50%);width:140px;height:46px;justify-content:center;align-items:flex-start}.fn-zone-bottom{bottom:-46px;left:50%;transform:translate(-50%);width:140px;height:46px;justify-content:center;align-items:flex-end}.fn-zone-right{right:-124px;top:50%;transform:translateY(-50%);width:124px;height:64px;justify-content:flex-end;align-items:center}.fn-zone-left{left:-124px;top:50%;transform:translateY(-50%);width:124px;height:64px;justify-content:flex-start;align-items:center}.fn-add{min-height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--bm-saffron);background:var(--bm-panel);color:var(--bm-text);font-family:inherit;font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;box-shadow:0 4px 10px #0000004d;display:inline-flex;align-items:center}.fn-add.is-primary{background:var(--bm-saffron);color:var(--bm-ground)}.fn-add:hover{filter:brightness(1.1)}.fn-add.is-disabled{border-color:var(--bm-rule-strong);color:var(--bm-muted);cursor:default;pointer-events:none}.node-editor{position:fixed;right:20px;top:20px;width:300px;background:#16233f;border:1px solid #22345A;border-radius:8px;padding:20px;z-index:1000;box-shadow:0 4px 20px #00000080}.editor-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;padding-bottom:10px;border-bottom:1px solid #22345A}.editor-header h3{margin:0;color:#efe7d6;font-size:18px}.close-btn{background:none;border:none;color:#efe7d6;font-size:24px;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.close-btn:hover{color:#f2a497}.editor-content{display:flex;flex-direction:column;gap:15px}.editor-field{display:flex;flex-direction:column;gap:5px}.editor-field label{color:#b4bed3;font-size:12px;font-weight:700}.editor-input{background:#0f1930;border:1px solid #22345A;border-radius:4px;padding:8px 12px;color:#efe7d6;font-size:14px}.editor-input:focus{outline:none;border-color:#86d1cd}.editor-actions{display:flex;gap:10px;margin-top:10px}.editor-actions .btn{flex:1;width:auto;margin-bottom:0}.edge-editor-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:999;background:transparent}.edge-editor{position:fixed;z-index:1000;width:260px;background:#16233f;border:1px solid #E4A13C;border-radius:10px;box-shadow:0 10px 30px #0000008c;color:#efe7d6;font-size:13px;padding:12px 14px;animation:edge-editor-pop .12s ease-out}@keyframes edge-editor-pop{0%{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.edge-editor-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.edge-editor-title{font-weight:600;color:#e4a13c;font-size:13px}.edge-editor-close{background:none;border:none;color:#8e9bb8;font-size:20px;line-height:1;cursor:pointer;padding:0 4px}.edge-editor-close:hover{color:#fff}.edge-editor-label{background:#ffffff0a;border:1px solid #2A3B5F;border-radius:6px;padding:6px 8px;margin-bottom:10px;color:#b4bed3;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.edge-editor-nature{margin-bottom:10px}.edge-editor-nature-label{display:block;color:#8e9bb8;font-size:11px;margin-bottom:4px}.edge-editor-nature-select{width:100%;padding:6px 8px;background:#0f1930;color:#efe7d6;border:1px solid #2A3B5F;border-radius:6px;font-size:12px;cursor:pointer}.edge-editor-nature-select:focus{outline:none;border-color:#e4a13c}.edge-editor-actions{display:flex;flex-direction:column;gap:6px}.edge-editor-actions .btn{width:100%;padding:7px 10px;border-radius:6px;border:1px solid transparent;cursor:pointer;font-size:12px;font-weight:500;transition:background .15s,border-color .15s}.btn-toggle-divorce{background:#c0392b2e;border-color:#e58a7a;color:#f2a497}.btn-toggle-divorce:hover{background:#c0392b52}.btn-toggle-remarry{background:#27ae602e;border-color:#27ae60;color:#7de3a8}.btn-toggle-remarry:hover{background:#27ae6052}.edge-editor-actions .btn-danger{background:#c0392b1a;border-color:#c0392b55;color:#f2a497}.edge-editor-actions .btn-danger:hover{background:#c0392b47;border-color:#e58a7a;color:#fff}.spouse-picker-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:999;background:transparent}.spouse-picker{position:fixed;z-index:1000;width:260px;max-height:400px;display:flex;flex-direction:column;background:#16233f;border:1px solid #E4A13C;border-radius:10px;box-shadow:0 10px 30px #0000008c;color:#efe7d6;font-size:13px;padding:12px 14px;animation:spouse-picker-pop .12s ease-out}.spouse-picker-search{width:100%;padding:6px 8px;margin-bottom:8px;background:#0f1930;color:#efe7d6;border:1px solid #2A3B5F;border-radius:6px;font-size:12px}.spouse-picker-search:focus{outline:none;border-color:#e4a13c}.spouse-picker-empty{color:#8e9bb8;font-size:12px;padding:8px 2px;text-align:center}@keyframes spouse-picker-pop{0%{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.spouse-picker-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.spouse-picker-title{font-weight:600;color:#e4a13c;font-size:13px}.spouse-picker-close{background:none;border:none;color:#8e9bb8;font-size:20px;line-height:1;cursor:pointer;padding:0 4px}.spouse-picker-close:hover{color:#fff}.spouse-picker-list{overflow-y:auto;margin-bottom:8px}.spouse-picker-candidate{width:100%;display:flex;align-items:center;gap:8px;padding:7px 10px;margin-bottom:4px;background:#ffffff0a;border:1px solid #2A3B5F;border-radius:6px;color:#efe7d6;font-size:12px;cursor:pointer;text-align:left;transition:background .15s,border-color .15s}.spouse-picker-candidate:hover{background:#f0a5001f;border-color:#e4a13c}.spouse-picker-candidate-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spouse-picker-candidate-father,.spouse-picker-candidate-year{color:#8e9bb8;font-weight:400}.spouse-picker-detail{min-height:34px;margin-bottom:8px;padding:8px 10px;background:#0f1930;border:1px solid #2A3B5F;border-radius:6px;font-size:11px;line-height:1.5;color:#b4bed3}.spouse-picker-detail-name{color:#e4a13c;font-weight:600;margin-bottom:2px}.spouse-picker-detail-hint{color:#8e9bb8;font-style:italic}.spouse-picker-sep{height:1px;background:#2a3b5f;margin:6px 0}.spouse-picker-new{width:100%;padding:8px 10px;border-radius:6px;border:1px solid #86D1CD;background:#4a90e21f;color:#86d1cd;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s}.spouse-picker-new:hover{background:#4a90e247}.edge-legend{position:absolute;bottom:16px;left:64px;z-index:1000;width:190px;background:#16233f;border:1px solid #22345A;border-radius:10px;box-shadow:0 4px 16px #00000080;color:#efe7d6;font-size:12px;padding:10px 12px}.edge-legend-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.edge-legend-title{font-weight:600;color:#e4a13c;font-size:12px}.edge-legend-close{background:none;border:none;color:#8e9bb8;font-size:16px;line-height:1;cursor:pointer;padding:0 2px}.edge-legend-close:hover{color:#fff}.edge-legend-section{color:#8e9bb8;font-size:10px;text-transform:uppercase;letter-spacing:.5px;margin:8px 0 4px}.edge-legend-row{display:flex;align-items:center;gap:8px;padding:2px 0}@media (max-width: 768px){.edge-legend{left:60px}}.toast-container{position:fixed;top:70px;right:20px;z-index:2000;display:flex;flex-direction:column;gap:8px;max-width:360px;pointer-events:none}.toast{pointer-events:auto;display:flex;align-items:flex-start;gap:10px;padding:10px 14px;border-radius:8px;background:#16233f;border:1px solid #2A3B5F;box-shadow:0 6px 24px #00000073;color:#efe7d6;font-size:13px;cursor:pointer;animation:toast-in .18s ease-out;min-width:240px}@keyframes toast-in{0%{opacity:0;transform:translate(20px)}to{opacity:1;transform:translate(0)}}.toast-icon{font-size:16px;line-height:1.2;flex-shrink:0}.toast-message{flex:1;line-height:1.4}.toast-success{border-color:#27ae60}.toast-success .toast-icon{color:#7de3a8}.toast-error{border-color:#e58a7a}.toast-error .toast-icon{color:#f2a497}.toast-info{border-color:#86d1cd}.toast-info .toast-icon{color:#86d1cd}.project-bar{display:flex;align-items:center;gap:8px;min-width:0}.project-bar-picker{display:flex;align-items:center;gap:8px;min-height:38px;min-width:0;padding-inline-start:12px;border:1px solid var(--bm-rule-strong);border-radius:var(--bm-radius);background:var(--bm-ground)}.project-bar-label{font-size:12px;color:var(--bm-muted)}.project-bar-select{min-width:0;max-width:220px;min-height:36px;padding:0 8px;border:0;border-radius:var(--bm-radius);background:transparent;color:var(--bm-text);font-size:14px;font-weight:600;cursor:pointer}.project-bar-select option{background:var(--bm-panel);color:var(--bm-text)}.project-menu-wrapper{position:relative}.project-menu{position:absolute;top:calc(100% + 6px);inset-inline-end:0;min-width:200px;padding:6px;display:flex;flex-direction:column;gap:2px;background:var(--bm-panel);border:1px solid var(--bm-rule-strong);border-radius:12px;box-shadow:0 12px 32px #00000073;z-index:1001}.project-menu button{min-height:38px;padding:0 12px;border:none;border-radius:8px;background:transparent;color:var(--bm-text);font-size:13px;text-align:start;cursor:pointer}.project-menu button:hover:not(:disabled){background:var(--bm-raised)}.project-menu button:disabled{color:var(--bm-muted);opacity:.6;cursor:not-allowed}.project-menu-sep{height:1px;margin:4px 0;background:var(--bm-rule)}.project-menu .project-menu-danger{color:var(--bm-danger)}.project-menu .project-menu-danger:hover:not(:disabled){background:#f080701f}@media (max-width: 768px){.project-bar{flex:1 1 auto}.project-bar-picker{flex:1}.project-bar-label{display:none}.project-bar-select{max-width:none;width:100%}}.inspector{width:300px;flex:none;height:100%;min-height:0;display:flex;flex-direction:column;background:var(--bm-panel);border-left:1px solid var(--bm-rule);color:var(--bm-text)}.insp-head{display:flex;align-items:flex-start;gap:14px;padding:18px 14px 14px 18px;border-bottom:1px solid var(--bm-rule)}.insp-head-text{flex:1;min-width:0}.insp-name{font-size:20px;font-weight:600;letter-spacing:-.01em;line-height:1.25;overflow-wrap:anywhere}.insp-meta{margin-top:2px;font-size:13px;color:var(--bm-soft)}.insp-close{flex:none;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;color:var(--bm-muted);cursor:pointer}.insp-close:hover{color:var(--bm-text);background:#efe7d60f}.insp-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.insp-body{flex:1;min-height:0;overflow-y:auto}.insp-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:14px 18px 18px}.insp-action{min-height:40px;border:1px solid var(--bm-rule-strong);border-radius:8px;background:transparent;color:var(--bm-text);font-size:13px;cursor:pointer}.insp-action:hover:not(:disabled){border-color:var(--bm-saffron)}.insp-action:disabled{opacity:.45;cursor:not-allowed}.insp-section{padding:16px 18px;border-top:1px solid var(--bm-rule)}.insp-section-title{margin-bottom:10px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--bm-muted)}.insp-foot{padding:12px 18px;border-top:1px solid var(--bm-rule)}.insp-foot .btn{margin-bottom:0}.insp-confirm p{margin-bottom:10px;font-size:13px}.conn-groups{display:flex;flex-direction:column;gap:12px}.conn-group-title{margin-bottom:4px;font-size:12px;font-weight:500;color:var(--bm-muted)}.conn-list{list-style:none}.conn-row{width:100%;min-height:40px;display:flex;align-items:center;gap:10px;padding:4px 6px;border:0;border-radius:8px;background:transparent;color:var(--bm-text);font-size:14px;text-align:start}button.conn-row{cursor:pointer}button.conn-row:hover{background:#efe7d60f}.conn-name{flex:1;min-width:0;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conn-role{font-size:12px;color:var(--bm-muted)}.conn-empty{font-size:13px;color:var(--bm-muted)}@media (max-width: 1024px){.inspector{position:fixed;left:8px;right:8px;bottom:8px;width:auto;height:auto;max-height:60vh;border:1px solid var(--bm-rule-strong);border-radius:16px;box-shadow:0 -12px 40px #00000073;z-index:1500}[dir=rtl] .inspector{border-right:1px solid var(--bm-rule-strong)}}.rel-slot{display:flex;flex-direction:column;gap:4px;margin-bottom:14px}.rel-slot-label{font-size:12px;font-weight:500;color:var(--bm-muted)}.rel-list{list-style:none;display:flex;flex-direction:column}.rel-row{display:flex;align-items:center;gap:4px}.rel-row .pp{flex:1;min-width:0}.rel-person{flex:1;min-width:0;min-height:40px;display:flex;align-items:center;gap:10px;padding:4px 6px;border:0;border-radius:8px;background:transparent;color:var(--bm-text);font-size:14px;text-align:start;cursor:pointer}.rel-person:hover{background:#efe7d60f}.rel-name{flex:1;min-width:0;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rel-text-btn{flex:none;min-height:36px;padding:0 8px;border:0;border-radius:8px;background:transparent;color:var(--bm-saffron);font-size:13px;font-weight:600;cursor:pointer}.rel-text-btn:hover{background:var(--bm-saffron-soft)}.rel-icon-btn{flex:none;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;color:var(--bm-muted);cursor:pointer}.rel-icon-btn:hover{color:var(--bm-danger);background:#f080701a}.rel-icon-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.rel-gender{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 0 8px;font-size:12px;color:var(--bm-muted)}.pp{position:relative}.pp-input{margin-bottom:8px}.pp-list{position:absolute;top:calc(100% - 6px);left:0;right:0;z-index:60;max-height:240px;overflow-y:auto;padding:4px;list-style:none;background:var(--bm-panel);border:1px solid var(--bm-rule-strong);border-radius:10px;box-shadow:0 12px 28px #00000073}.pp-option{width:100%;min-height:40px;display:flex;align-items:center;gap:10px;padding:4px 8px;border:0;border-radius:8px;background:transparent;color:var(--bm-text);font-size:14px;text-align:start;cursor:pointer}.pp-option.is-active{background:var(--bm-raised)}.pp-option.is-create .pp-name{color:var(--bm-saffron);font-weight:600}.pp-text{display:flex;flex-direction:column;min-width:0}.pp-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pp-ctx{font-size:12px;color:var(--bm-muted)}.gate{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:24px 16px;background-color:var(--bm-ground);background-image:radial-gradient(rgba(239,231,214,.09) 1px,transparent 1px);background-size:24px 24px;color:var(--bm-text);font-family:var(--bm-font)}.gate-card{width:min(380px,100%);display:flex;flex-direction:column;padding:36px 32px 28px;border-radius:20px;background:var(--bm-panel);border:1px solid var(--bm-rule);box-shadow:0 24px 60px #0006}.gate-brand{display:flex;flex-direction:column;align-items:center;gap:4px;margin-bottom:24px;text-align:center}.gate-brand img{margin-bottom:8px}.gate-brand h1{font-size:26px;font-weight:700;letter-spacing:-.02em}.gate-brand p{color:var(--bm-soft)}.gate-label{margin-bottom:8px;font-size:13px;color:var(--bm-soft)}.gate-input{min-height:46px;padding:0 14px;border:1px solid var(--bm-rule-strong);border-radius:10px;background:var(--bm-ground);color:var(--bm-text);font:inherit;font-size:15px}.gate-input:focus{outline:none;border-color:var(--bm-saffron);box-shadow:0 0 0 3px var(--bm-saffron-soft)}.gate-input.has-error{border-color:var(--bm-danger)}.gate-error{margin-top:8px;font-size:13px;color:var(--bm-danger)}.gate-submit{margin-top:18px;min-height:48px;border:0;border-radius:10px;background:var(--bm-saffron);color:var(--bm-ground);font:inherit;font-weight:600;cursor:pointer}.gate-submit:disabled{opacity:.55;cursor:not-allowed}.gate-note{display:flex;gap:10px;align-items:flex-start;margin-top:18px;font-size:13px;line-height:1.5;color:var(--bm-muted)}.gate-note svg{flex:none;width:16px;height:16px;margin-top:2px;color:var(--bm-teal)}.gate-home{display:inline-flex;align-items:center;min-height:44px;font-size:13px;color:var(--bm-soft);text-decoration:none}.gate-home:hover{color:var(--bm-saffron)}:root{--bm-ground: #0F1930;--bm-panel: #16233F;--bm-card: #1C2C4E;--bm-card-muted: #18223A;--bm-raised: #22345A;--bm-text: #EFE7D6;--bm-soft: #B4BED3;--bm-muted: #8E9BB8;--bm-saffron: #E4A13C;--bm-saffron-soft: rgba(228, 161, 60, .18);--bm-teal: #86D1CD;--bm-rose: #F0B9A4;--bm-danger: #F2A497;--bm-danger-line: rgba(240, 128, 112, .5);--bm-rule: rgba(239, 231, 214, .12);--bm-rule-strong: rgba(239, 231, 214, .2);--bm-radius: 10px;--bm-font: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif}*{margin:0;padding:0;box-sizing:border-box}body{font-family:var(--bm-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:var(--bm-ground);color:var(--bm-text)}button,input,select,textarea{font-family:inherit}:focus-visible{outline:2px solid var(--bm-saffron);outline-offset:2px}.app-container{display:flex;flex-direction:column;height:100vh;width:100vw;overflow:hidden;background:var(--bm-ground)}.app-container:fullscreen,.app-container.is-fullscreen{height:100vh;width:100vw;background:var(--bm-ground)}.app-body{flex:1;min-height:0;display:flex}.topbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:8px 14px;background:var(--bm-panel);border-bottom:1px solid var(--bm-rule);position:relative;z-index:1000}.topbar-brand{display:flex;align-items:center;gap:10px;padding-inline-end:6px}.topbar-brand img{width:34px;height:34px;flex:none}.topbar-brand-text{display:flex;flex-direction:column;line-height:1.15}.topbar-brand-name{font-weight:700;font-size:17px;letter-spacing:-.02em}.topbar-version{font-size:11px;color:var(--bm-muted)}.topbar-group{display:flex;align-items:center;gap:8px}.topbar-spacer{flex:1}.tb-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;min-width:38px;padding:0 12px;border:1px solid var(--bm-rule-strong);border-radius:var(--bm-radius);background:transparent;color:var(--bm-text);font-size:13px;font-weight:500;cursor:pointer;text-decoration:none;white-space:nowrap;transition:border-color .15s,background .15s}.tb-btn:hover{border-color:var(--bm-saffron)}.tb-btn.icon-only{padding:0;width:38px}.tb-btn.is-on{border-color:var(--bm-saffron);background:var(--bm-saffron-soft)}.tb-btn svg{width:16px;height:16px;flex:none}.tb-link{border-color:transparent;color:var(--bm-muted)}.segmented{display:flex;padding:3px;gap:2px;border-radius:var(--bm-radius);background:var(--bm-ground);border:1px solid var(--bm-rule)}.segmented button{min-height:32px;padding:0 12px;border:0;border-radius:7px;background:transparent;color:var(--bm-soft);font-size:13px;cursor:pointer}.segmented button[aria-pressed=true]{background:var(--bm-saffron);color:var(--bm-ground);font-weight:600}.save-status{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:0 10px;border:1px solid transparent;border-radius:var(--bm-radius);background:transparent;color:var(--bm-muted);font-size:12px;cursor:pointer}.save-status:hover{border-color:var(--bm-rule-strong);color:var(--bm-text)}.save-dot{width:7px;height:7px;border-radius:50%;background:var(--bm-teal)}.save-status.is-saving .save-dot{background:var(--bm-saffron)}.save-status.is-error{color:var(--bm-danger)}.save-status.is-error .save-dot{background:var(--bm-danger)}.tb-btn.needs-tidy{border-color:var(--bm-saffron);animation:pulse 2s infinite}@keyframes pulse{0%,to{box-shadow:0 0 #e4a13c59}50%{box-shadow:0 0 0 5px #e4a13c00}}@media (prefers-reduced-motion: reduce){.tb-btn.needs-tidy{animation:none}}.sidebar-input{width:100%;min-height:40px;padding:0 12px;margin-bottom:10px;background:var(--bm-ground);border:1px solid var(--bm-rule-strong);border-radius:8px;color:var(--bm-text);font-size:14px}select.sidebar-input{padding:0 8px}.sidebar-input:focus{outline:none;border-color:var(--bm-saffron);box-shadow:0 0 0 3px var(--bm-saffron-soft)}.sidebar-input::placeholder{color:var(--bm-muted)}.field-label{display:block;margin-bottom:6px;font-size:12px;color:var(--bm-soft)}.field-hint{color:var(--bm-muted)}.btn{width:100%;min-height:42px;padding:0 16px;margin-bottom:10px;border:1px solid transparent;border-radius:var(--bm-radius);cursor:pointer;font-weight:600;font-size:14px;transition:filter .15s,border-color .15s,background .15s}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--bm-saffron);color:var(--bm-ground)}.btn-primary:hover:not(:disabled){filter:brightness(1.08)}.btn-secondary{background:transparent;color:var(--bm-text);border-color:var(--bm-rule-strong);font-weight:500}.btn-secondary:hover:not(:disabled){border-color:var(--bm-saffron)}.btn-danger{background:transparent;color:var(--bm-danger);border-color:var(--bm-danger-line);font-weight:500}.btn-danger:hover:not(:disabled){background:#f080701a}.button-group{display:flex;gap:8px}.button-group .btn{margin-bottom:0}.reactflow-wrapper{flex:1;min-width:0;height:100%;position:relative}.react-flow{background:var(--bm-ground)}.react-flow__node{font-size:14px;font-weight:500}.react-flow__edge-path{stroke:var(--bm-teal);stroke-width:2}.react-flow__edge.selected .react-flow__edge-path{stroke:var(--bm-saffron);stroke-width:3}@keyframes edge-flow{to{stroke-dashoffset:-20}}.react-flow__edge.edge-connection-active .react-flow__edge-path{animation:edge-flow .6s linear infinite}@media (prefers-reduced-motion: reduce){.react-flow__edge.edge-connection-active .react-flow__edge-path{animation:none}}.react-flow__controls{background:var(--bm-panel)!important;border:1px solid var(--bm-rule)!important;border-radius:12px;overflow:hidden;box-shadow:none!important}.react-flow__controls-button{width:36px!important;height:36px!important;background:var(--bm-panel)!important;border-bottom:1px solid var(--bm-rule)!important;color:var(--bm-text)!important;fill:var(--bm-text)!important}.react-flow__controls-button svg{fill:var(--bm-text)!important}.react-flow__controls-button:hover{background:var(--bm-raised)!important}.react-flow__minimap{background:var(--bm-panel)!important;border:1px solid var(--bm-rule)!important;border-radius:12px;overflow:hidden}.react-flow__attribution{background:#16233fcc!important;padding:4px 8px;border-radius:4px;color:var(--bm-muted)!important}.fullscreen-exit{margin:12px!important}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--bm-raised);border-radius:4px}.bm-modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#080d1ab8;z-index:10000;display:flex;align-items:center;justify-content:center;padding:16px}.bm-modal{width:min(440px,100%);background:var(--bm-panel);color:var(--bm-text);padding:22px;border-radius:16px;border:1px solid var(--bm-rule-strong);box-shadow:0 24px 60px #00000073}.bm-modal-title{margin-bottom:8px;font-size:16px;font-weight:600}.bm-modal-body{margin-bottom:18px;color:var(--bm-soft);font-size:14px;line-height:1.5}.bm-modal input{width:100%;min-height:40px;padding:0 12px;background:var(--bm-ground);color:var(--bm-text);border:1px solid var(--bm-rule-strong);border-radius:8px;font-size:14px}.bm-modal-actions{display:flex;justify-content:flex-end;gap:8px}.bm-modal-actions .btn{width:auto;margin:0}[dir=rtl] .sidebar{border-right:none;border-left:1px solid var(--bm-rule)}[dir=rtl] .inspector{border-left:none;border-right:1px solid var(--bm-rule)}.mobile-sidebar-toggle,.mobile-sidebar-backdrop{display:none}@media (max-width: 900px){.topbar-hide-narrow{display:none!important}}@media (max-width: 768px){.mobile-sidebar-toggle{display:inline-flex}.mobile-sidebar-wrapper{position:fixed;inset:0 auto 0 0;width:min(320px,85vw);height:100%;z-index:2100;transform:translate(-100%);transition:transform .25s ease}[dir=rtl] .mobile-sidebar-wrapper{inset:0 0 0 auto;transform:translate(100%)}.mobile-sidebar-wrapper.open{transform:translate(0)}.mobile-sidebar-wrapper .sidebar{width:100%;height:100%;box-shadow:8px 0 24px #00000080}.mobile-sidebar-backdrop{display:block;position:fixed;top:0;right:0;bottom:0;left:0;background:#080d1a99;z-index:2050}.topbar{padding:8px 10px}.topbar-brand-text,.tb-label{display:none}.tb-btn{padding:0 10px}.react-flow__minimap{display:none}.node-editor,.edge-editor{width:auto!important;left:12px!important;right:12px!important;max-width:calc(100vw - 24px)}}.react-flow__node-family{background:transparent!important;border:none!important;padding:0!important;box-shadow:none!important;color:inherit!important}.bm-crescent{display:inline-block;vertical-align:-.1em;color:var(--bm-muted)}
