@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{font-family:'DM Sans',sans-serif;color:#292d35;background:#f8f9fb;font-size:16px;--line:#e6e8ec;--lime:#c6f36b;--muted:#777e8b}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0;background:none;color:inherit;font-size:.875rem;font-weight:600;border-radius:8px;padding:10px 14px}button:hover{filter:brightness(.95);background-color:#edf0f4}button:focus-visible,a:focus-visible{outline:3px solid #84ac3f;outline-offset:3px}input,textarea,select{border:1px solid #dfe3e9;border-radius:7px;background:white;color:inherit;padding:10px;min-width:0}textarea{resize:vertical;line-height:1.6}input:focus,textarea:focus,select:focus{outline:2px solid #91b851;outline-offset:1px}.rail{width:76px;position:fixed;inset:0 auto 0 0;background:white;border-right:1px solid var(--line);display:flex;align-items:center;flex-direction:column;gap:14px;padding:26px 0;z-index:2}.logo{font-size:35px;font-weight:800;letter-spacing:-4px;color:#262d36;text-decoration:none;margin-bottom:48px}.logo span{color:#82b836}.railbtn{font-size:24px;width:46px;height:46px;padding:0;color:#818896}.railbtn.active{background:#edf4e2;color:#3d5b1c}.railbottom{margin-top:auto;background:#f0e9e2;border-radius:50%;font-size:12px;padding:12px;font-weight:700}.app{margin-left:76px}header{height:78px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 32px;background:#fff}.brand{font-family:Manrope,sans-serif;font-weight:800;font-size:19px;letter-spacing:-.7px}.brand>span{margin-left:16px;color:#b5bac2;font-weight:400}.brand .workspace{font:14px 'DM Sans',sans-serif;color:#727a86;letter-spacing:0}.headeractions{display:flex;gap:13px;align-items:center}#saved{font-size:12px;color:#778170}.primary{background:var(--lime);color:#27331a}.dark{background:#2b3039;color:white}.outline{border:1px solid #dfe3e9;background:#fff}.quiet{color:#68717e}.heading{padding:32px 34px 26px;display:flex;align-items:center;justify-content:space-between}.eyebrow{font-size:11px;letter-spacing:1.8px;font-weight:700;color:#7e8790}.heading input{font-family:Manrope,sans-serif;font-size:30px;font-weight:800;background:none;border:0;padding:7px 0;width:min(650px,55vw);letter-spacing:-1.1px}.heading p{margin:3px 0 0;font-size:14px;color:#828894}.toolbar{margin:0 32px;display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:14px}.tabs{display:flex;gap:6px}.tabs button{color:#7a8290}.tabs button.active{background:white;box-shadow:0 1px 5px #182c4110;color:#2c333c}.tabs span{margin-left:7px}.tools{display:flex;gap:9px}main{display:grid;grid-template-columns:minmax(0,1fr) 310px;margin:22px 32px 0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:white;min-height:550px}.surface{position:relative;background-color:#fbfcfd;background-image:radial-gradient(#d8dde3 .8px,transparent .8px);background-size:18px 18px;min-width:0;display:flex;flex-direction:column}.maptop{display:flex;justify-content:space-between;align-items:center;padding:20px 23px;gap:12px}.maptop>div{display:flex;gap:12px;align-items:center}.tiny{font-size:10px;letter-spacing:1.4px;color:#89919e;font-weight:700}.maptop select{font-size:13px;padding:8px 24px 8px 10px}.maphint{font-size:12px;color:#8c939f}.map{flex:1;overflow:auto;min-height:425px;position:relative}.graph{position:relative;transform-origin:0 0}.wires{position:absolute;inset:0;pointer-events:none}.node{position:absolute;text-align:left;width:190px;min-height:91px;border:1px solid #e0e4e9;border-radius:10px;background:white;padding:14px;box-shadow:0 3px 10px #23334b06;transition:box-shadow .15s}.node:hover{background:white;box-shadow:0 5px 14px #22334b18}.node.selected{outline:2px solid #9bbf58;outline-offset:3px}.node .ntype{font-size:10px;text-transform:uppercase;letter-spacing:1.2px;display:block;margin-bottom:9px;color:#808997}.node strong{font-size:14px;display:block}.node small{display:block;font-size:11px;color:#8b929e;margin-top:9px}.node.root{background:#2c333c;color:#fff;border:0}.node.root .ntype{color:#c6f36b}.node.root small{color:#b7c2cf}.node.feature{border-top:3px solid #a8c877}.node.screen{border-top:3px solid #99b8f5}.node.data{border-top:3px solid #c4a5dd}.node.rule{border-top:3px solid #e4b476}.node.dim{opacity:.24}.mapbottom{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;border-top:1px solid var(--line);background:#ffffffbd;font-size:11px;color:#7d8794;gap:12px}.mapbottom>span{display:flex;align-items:center;gap:7px}.legend{width:7px;height:7px;border-radius:2px;margin-left:10px}.feature.legend{background:#a8c877}.screen.legend{background:#99b8f5}.data.legend{background:#c4a5dd}.rule.legend{background:#e4b476}.mapbottom button{padding:5px 8px}.inspector{border-left:1px solid var(--line);background:white;padding:23px}.inspector h2{font-family:Manrope;font-size:18px;margin:8px 0}.inspector .sub{font-size:12px;color:#9299a3;line-height:1.7;margin:5px 0 25px}.badge{font-size:10px;letter-spacing:1px;background:#eef4e5;color:#67863d;padding:5px 8px;border-radius:4px;font-weight:700}.field{display:block;margin-top:17px}.field>span{display:block;font-size:12px;color:#68717e;font-weight:600;margin-bottom:7px}.field input,.field textarea,.field select{width:100%;font-size:13px}.field textarea{min-height:83px}.rolechecks{display:flex;gap:6px;flex-wrap:wrap}.rolechecks label{display:flex;gap:5px;align-items:center;font-size:12px;background:#f4f5f7;padding:6px;border-radius:5px}.rolechecks input{width:auto}.inspector .actions{display:flex;gap:7px;margin-top:23px;border-top:1px solid var(--line);padding-top:18px}.danger{color:#b45a54;font-size:12px}footer{padding:19px 34px;display:flex;justify-content:space-between;font-size:12px;color:#9ba2ac}.spark{color:#687e42;margin-left:12px}.rolespage,.briefpage{padding:25px;background:#fbfcfd;flex:1}.rolespage h2,.briefpage h2{font-family:Manrope;font-size:22px;margin-top:0}.rolecards{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.rolecard{padding:20px;background:white;border:1px solid var(--line);border-radius:12px}.rolecard h3{margin-top:0}.rolecard p{font-size:13px;color:#7b8390}.rolecard button{text-align:left;display:block;width:100%;font-size:13px;border-top:1px solid var(--line);border-radius:0;line-height:1.6}.rolecard button small{color:#9198a2;display:block;font-size:11px}.rolemanage{margin-top:22px;display:flex;gap:8px;flex-wrap:wrap}.briefpage pre{font:13px/1.8 'DM Sans',sans-serif;white-space:pre-wrap;overflow-wrap:anywhere;background:white;border:1px solid var(--line);padding:24px;border-radius:10px;max-height:490px;overflow:auto}.notice{font-size:13px;line-height:1.8;background:#f1f6e8;border-radius:8px;padding:12px;color:#627441}dialog{border:1px solid var(--line);border-radius:16px;width:min(750px,92vw);padding:28px;box-shadow:0 30px 100px #17223130}dialog::backdrop{background:#17223165;backdrop-filter:blur(3px)}.dialoghead{display:flex;justify-content:space-between}.dialoghead h2{margin:10px 0}dialog p{font-size:14px;color:#777f8a}#exportText{width:100%;height:48vh;font:13px/1.8 monospace;background:#fafbfc}.dialogactions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}#newDialog{max-width:460px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#2c333c;color:white;border-radius:9px;padding:12px 20px;font-size:14px;opacity:0;pointer-events:none;z-index:20}#toast.show{opacity:1}@media(min-width:1600px){main{min-height:650px}.map{min-height:525px}}@media(max-width:1100px){main{grid-template-columns:minmax(0,1fr) 280px;margin:16px}.maphint{display:none}.heading{padding:25px 20px}.toolbar{margin:0 16px}header{padding:0 20px}#saved{display:none}}@media(max-width:760px){.rail{display:none}.app{margin-left:0}header{height:65px;padding:0 14px}.workspace,.brand>span{display:none}.headeractions{gap:2px}.heading{padding:24px 16px}.heading input{font-size:25px}.heading p{font-size:12px;max-width:250px}.heading .outline{font-size:12px;padding:8px}.eyebrow{font-size:9px}.toolbar{flex-wrap:wrap;gap:10px}.tabs button{padding:10px}.tools{margin-left:auto}main{grid-template-columns:1fr}.inspector{border-left:0;border-top:1px solid var(--line)}.map{min-height:400px}.mapbottom{flex-wrap:wrap}.maptop{padding:16px}footer{padding:14px 18px}footer>span:last-child{display:none}.rolemanage input{width:150px}}

/* Direct editing controls stay available for mouse, touch, and keyboard. */
.node{height:232px;display:flex;flex-direction:column;padding:12px;cursor:default}
.node .ntype{margin-bottom:5px}
.node-title{width:100%;font-weight:700;font-size:14px;padding:6px 3px;border:1px solid transparent;background:transparent;color:inherit}
.node-description{width:100%;height:67px;min-height:67px;resize:none;margin-top:5px;padding:5px 3px;background:transparent;border:1px solid transparent;font-size:12px;line-height:1.5;color:#727d8a}
.node-title:hover,.node-description:hover{border-color:#dce2e8}
.node-title:focus,.node-description:focus{background:#fff;color:#292d35}
.node small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:7px}
.node-actions{display:flex;align-items:center;gap:2px;margin-top:auto;padding-top:8px;border-top:1px solid #e6e8ec}
.node-actions button{font-size:12px;padding:7px 5px;min-height:32px;white-space:nowrap}
.node-actions button:first-child{background:#eef4e5;color:#536f30}
.node-actions .node-remove{color:#a74b45}
.node.root .node-description{color:#c1cbd8}
.node.root .node-title::placeholder,.node.root .node-description::placeholder{color:#aebcca}
.node.root .node-description:focus{color:#292d35}
.node.root .node-actions{border-color:#54606d}
.node.root .node-actions button:hover{color:#292d35}
.node.dim:focus-within,.node.dim:hover{opacity:1}
#toast.show{pointer-events:auto}

body.locked .app,body.locked .rail{visibility:hidden}
#loginDialog{max-width:420px}#loginDialog::backdrop{background:#f8f9fb}
.login-username{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.remember{display:flex;align-items:center;gap:8px;margin:18px 0;font-size:14px}
#loginError{color:#a23d38;min-height:20px}#unlock{width:100%}
#cloudList{display:grid;gap:10px;margin:20px 0;max-height:50vh;overflow:auto}
#cloudList button{text-align:left;border:1px solid #e0e5eb;background:#fafbfc;padding:15px}
#cloudList small{display:block;font-weight:400;color:#77818c;margin-top:5px}
#cloudCopy{margin-top:18px}#saved{max-width:180px}#saveCloud{white-space:nowrap}
@media(max-width:1050px){header{height:auto;min-height:78px;flex-wrap:wrap;padding-top:14px;padding-bottom:14px;gap:10px}.headeractions{flex-wrap:wrap;gap:5px}}
