:root{color-scheme:light;--ink:#192b3b;--muted:#607184;--blue:#2563eb;--line:#dce4ec;--bg:#f4f7fa;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#fff}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);cursor:pointer;white-space:nowrap;font-size:13px;font-weight:550}button:hover{border-color:#a5b5c8;background:#f6f8fc}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #93b7fd;outline-offset:2px}button:disabled{opacity:.35;cursor:default}button.primary{background:var(--blue);border-color:var(--blue);color:white}button.primary:hover{background:#1e50c7}button.quiet{border-color:transparent;background:transparent}button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;flex-shrink:0}[hidden]{display:none!important}#flowchart-app{position:relative;height:100dvh;min-height:580px;display:flex;flex-direction:column;isolation:isolate;overflow:hidden}.app-header{padding:19px 24px;display:flex;gap:16px;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);background:#fff;flex-shrink:0}.brand{display:flex;gap:13px;align-items:center;min-width:0}.brand-mark{display:grid;place-items:center;width:45px;height:45px;border-radius:12px;background:#edf3ff;color:var(--blue);flex-shrink:0}.brand-mark svg{width:29px;height:29px}h1{font-size:21px;line-height:1.2;margin:0;letter-spacing:-.6px}.brand p{font-size:11px;color:var(--muted);margin:5px 0 0}#save-status.failed{color:#a04422}.file-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.toolbar{display:flex;flex-wrap:wrap;gap:8px 0;padding:12px 14px;border-bottom:1px solid var(--line);background:#fff;flex-shrink:0;align-items:center}.tool-group{display:flex;gap:4px;align-items:center;padding:0 9px;border-right:1px solid var(--line)}.tool-group:last-child{border-right:0}.toolbar button{border-color:transparent;padding:7px 9px}.toolbar button:hover{background:#eef3fa}.toolbar button.active{color:#1e50c7;background:#eaf1ff;border-color:#c7d9fd}.toolbar .shapes button{gap:6px}.toolbar .shapes button[data-add=decision] svg{color:#a87615}.snap-option{display:flex;align-items:center;gap:5px;font-size:12px;white-space:nowrap;padding:5px}.snap-option input{accent-color:var(--blue)}#workspace{position:relative;flex:1;min-height:200px;overflow:auto;background:var(--bg);outline:none;overscroll-behavior:contain;overflow-anchor:none;scrollbar-color:#bdcbd9 #edf2f7}#surface{position:relative;background-image:radial-gradient(#cbd5e1 1px,transparent 1px);background-size:20px 20px;background-position:0 0;transform-origin:0 0}#surface.no-grid{background-image:none}#diagram{display:block;overflow:visible;touch-action:none;user-select:none}#workspace[data-mode=pan] #diagram,#workspace.space #diagram{cursor:grab}#workspace.dragging #diagram{cursor:grabbing}#workspace[data-mode=connect] #diagram{cursor:crosshair}.node-group{cursor:move;outline:none}.node-body{fill:white;stroke:#607184;stroke-width:1.6;vector-effect:non-scaling-stroke}.node-start .node-body{fill:#eff9f4;stroke:#6b9a80}.node-end .node-body{fill:#f0f3fa;stroke:#7d8ba6}.node-decision .node-body{fill:#fffaf0;stroke:#ba9552}.node-group.selected .node-body{stroke:var(--blue);stroke-width:2}.node-text{fill:#192b3b;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:14px;font-weight:500;pointer-events:none}.selection-outline{fill:none;stroke:#4d89f7;stroke-width:1;stroke-dasharray:5 4;vector-effect:non-scaling-stroke;pointer-events:none}.port{fill:white;stroke:#2563eb;stroke-width:1.5;cursor:crosshair;vector-effect:non-scaling-stroke}.port:hover{fill:#2563eb;stroke-width:3}.resize-handle{fill:#fff;stroke:#2563eb;stroke-width:1.4;cursor:nwse-resize;vector-effect:non-scaling-stroke}.node-plus{cursor:pointer;outline:none}.node-plus circle{fill:white;stroke:#b6c9e4;stroke-width:1.4;vector-effect:non-scaling-stroke}.node-plus:hover circle,.node-plus:focus-visible circle{fill:#eaf1ff;stroke:#2563eb}.node-plus text{fill:#2563eb;font-size:24px;pointer-events:none}.connector{cursor:pointer;outline:none}.connection-line{fill:none;stroke:#64748b;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}.connector.selected .connection-line{stroke:#2563eb;stroke-width:2.6}.connection-hit{fill:none;stroke:transparent;stroke-width:16;pointer-events:stroke;vector-effect:non-scaling-stroke}.connection-label{fill:#394b60;font:600 12px Inter,ui-sans-serif,system-ui,sans-serif;pointer-events:none}.connection-label-bg{fill:white;stroke:#dce4ec;stroke-width:1;vector-effect:non-scaling-stroke}.connector.selected .connection-label-bg{stroke:#93b7fd;fill:#eff5ff}.draft-line{fill:none;stroke:#2563eb;stroke-width:2;stroke-dasharray:6 4;pointer-events:none}.selection-box{fill:#2563eb12;stroke:#2563eb;stroke-width:1;vector-effect:non-scaling-stroke;pointer-events:none}.workspace-footer{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:8px 18px;border-top:1px solid var(--line);background:#fff;flex-shrink:0}.workspace-footer>span{font-size:11px;color:var(--muted)}.zoom-controls{display:flex;gap:3px;align-items:center}.zoom-controls button{font-size:12px;min-height:30px;padding:4px 9px}.zoom-controls #zoom-in,.zoom-controls #zoom-out{font-size:19px;min-width:31px}.zoom-controls #zoom-reset{min-width:64px}.floating-panel{position:absolute;z-index:4;right:20px;top:180px;width:280px;background:#fff;border:1px solid var(--line);box-shadow:0 8px 28px #192b3b20;border-radius:12px;padding:16px}.floating-panel>label{font-size:12px;font-weight:650;display:block;margin-bottom:8px}.label-row{display:flex;gap:6px}.label-row input{min-width:0;flex:1}.anchor-selects{display:flex;gap:10px;margin-top:13px}.anchor-selects label{font-size:11px;color:var(--muted);width:50%}.anchor-selects select{display:block;width:100%;margin-top:5px;padding:6px;font-size:12px}input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea{border:1px solid #cdd8e4;border-radius:7px;padding:9px 10px;background:white;color:var(--ink);font-size:13px}.popover{position:absolute;z-index:6;min-width:190px;max-width:calc(100% - 24px);padding:8px;border:1px solid var(--line);border-radius:12px;background:white;box-shadow:0 10px 35px #192b3b25;display:flex;flex-direction:column;gap:3px}.popover strong{font-size:11px;color:var(--muted);padding:8px 10px}.popover button{justify-content:flex-start;border:0;white-space:normal;text-align:left}.popover small{font-size:11px;color:var(--muted);line-height:1.5;padding:6px 10px;max-width:270px}.popover hr{width:100%;border:0;border-top:1px solid var(--line)}#toast{position:absolute;left:50%;bottom:62px;transform:translateX(-50%);z-index:10;background:#1b3047;color:white;padding:10px 17px;border-radius:9px;font-size:12px;box-shadow:0 4px 16px #192b3b25;max-width:calc(100% - 32px);text-align:center;pointer-events:none}#empty-note{position:fixed;pointer-events:none;left:50%;top:50%;transform:translate(-50%,-50%);text-align:center;color:var(--muted);max-width:80%;font-size:13px}#empty-note strong{font-size:17px;color:#344960}.text-editor{position:absolute;z-index:3;resize:none;text-align:center;line-height:20px!important;font-size:14px!important;border:2px solid #2563eb!important;border-radius:8px!important;padding:10px!important;box-shadow:0 0 0 4px #2563eb15;min-width:140px;transform-origin:top left}dialog{width:min(510px,calc(100% - 28px));max-height:calc(100dvh - 40px);padding:0;border:1px solid #dce4ec;border-radius:17px;color:var(--ink);box-shadow:0 25px 90px #14253845;overflow:auto}dialog::backdrop{background:#12283d65;backdrop-filter:blur(2px)}.dialog-content{position:relative;padding:30px;display:flex;flex-direction:column;gap:12px}.dialog-close{position:absolute;right:12px;top:10px;font-size:24px;border:0;background:transparent;min-width:34px;padding:0}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.3px;color:#5b78a0;margin-top:5px}h2{font-size:25px;letter-spacing:-.8px;margin:0 0 8px}.dialog-content>label{font-size:12px;font-weight:650;margin-top:4px}.dialog-content p{font-size:13px;line-height:1.6;margin:0}.dialog-content fieldset{display:flex;gap:18px;border:1px solid var(--line);border-radius:8px;padding:13px;font-size:13px;margin:2px 0}.dialog-content legend{font-size:12px;padding:0 5px;font-weight:650}.description{color:var(--muted);font-size:12px!important}.error{color:#b42318;background:#fff2f0;padding:10px;border-radius:7px}.file-drop{display:flex;flex-direction:column;gap:12px;padding:20px;border:1px dashed #9fb8d8;border-radius:9px;background:#f5f8fd}.file-drop input{max-width:100%;font-size:12px}.dialog-content details{font-size:12px}.dialog-content summary{cursor:pointer;padding:10px 0}.dialog-content textarea{width:100%;margin:4px 0 10px;font-family:ui-monospace,monospace}.help-list{padding-left:18px;margin:0;font-size:12px;line-height:1.65}.help-list li{margin-bottom:10px}.shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px;border-radius:8px;background:#f4f7fb;font-size:10px;color:var(--muted)}.shortcuts b{display:block;font-weight:550;color:var(--ink);margin-top:3px}@media(max-width:800px){.app-header{padding:14px}.brand-mark{width:37px;height:37px}.brand-mark svg{width:25px;height:25px}.brand{gap:9px}h1{font-size:19px}.file-actions button{font-size:12px;padding:7px 9px}.toolbar{padding:8px 5px;gap:7px 0}.tool-group{padding:0 5px}.tool-group.options{flex-wrap:wrap}.toolbar button{font-size:12px;padding:7px}.workspace-footer{padding:7px 9px}.workspace-footer>span{max-width:40%;line-height:1.5}.floating-panel{top:auto;bottom:58px;right:12px;width:260px}.toolbar .shapes{border-right:0}.dialog-content{padding:26px 22px}}@media(max-width:440px){.app-header{gap:8px;flex-wrap:wrap}.brand{flex:1}.brand p{font-size:10px}.file-actions{margin-left:auto}.toolbar{gap:5px 0}.tool-group.shapes{width:100%;justify-content:space-around;padding-bottom:5px;border-bottom:1px solid #edf1f6}.toolbar .shapes button{font-size:11px;padding:5px;gap:4px}.toolbar .options{width:100%;border-top:1px solid #edf1f6;padding-top:5px;justify-content:space-between}.toolbar button{min-height:33px}.workspace-footer>span{display:none}.zoom-controls{width:100%;justify-content:flex-end}.floating-panel{width:calc(100% - 24px);max-width:310px}.shortcuts{grid-template-columns:1fr 1fr}}

@media(max-width:440px){.app-header .brand{flex:1 0 100%}.app-header .file-actions{width:100%;justify-content:flex-end}.toolbar .tool-group.shapes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch}.toolbar .shapes button{width:100%}.toolbar .shapes svg{width:19px;height:19px}}
