#projectFlowDialog{position:fixed;z-index:220000;inset:2vh 1vw;background:#081e32;color:#e9f6ff;border:1px solid #315775;border-radius:14px;box-shadow:0 30px 100px #000b;overflow:hidden;font:14px Sarabun,Inter,sans-serif}#projectFlowDialog[hidden]{display:none!important}body.pf-open{overflow:hidden}.pf-header{height:62px;display:flex;justify-content:space-between;align-items:center;background:#122e48;padding:8px 18px;border-bottom:1px solid #31516c}.pf-header strong{font-size:19px}.pf-header small{display:block;font-size:12px;font-weight:normal;color:#a8c9df}.pf-header button,.pf-centerbar button,.pf-inspector button,.pf-flow-main,#projectFlowOpen{border:1px solid #40627d;border-radius:7px;background:#193c5c;color:#e5f5ff;padding:9px 12px;cursor:pointer}.pf-layout{height:calc(100% - 62px);display:grid;grid-template-columns:240px minmax(0,1fr)275px}.pf-library,.pf-inspector{padding:14px;background:#10283f;overflow:auto}.pf-library{border-right:1px solid #31516c}.pf-inspector{border-left:1px solid #31516c}.pf-library h3,.pf-inspector h3{margin:4px 0 10px;font-size:16px}.pf-library p,.pf-inspector p{color:#a9c7df;font-size:12px}.pf-library input,.pf-inspector input:not([type=color]),.pf-inspector select,.pf-inspector textarea{width:100%;box-sizing:border-box;background:#092038;border:1px solid #3a6685;color:#e6f5ff;border-radius:6px;padding:10px;margin:5px 0 12px}.pf-inspector label{display:block;color:#aacde4;margin-top:12px;font-size:12px}.pf-inspector input[type=color]{width:60px;height:34px}.pf-inspector button{display:block;margin-top:12px;width:100%}.pf-inspector .pf-danger{background:#4b2132;border-color:#a14668;color:#ffdce7}.pf-tool{display:flex;align-items:center;gap:10px;width:100%;padding:11px;margin:5px 0;background:#193d5a;color:#ecf6ff;border:1px solid #335974;border-radius:7px;cursor:grab;text-align:left}.pf-tool i{font-size:18px;color:#40c4f5}.pf-center{display:flex;flex-direction:column;min-width:0}.pf-centerbar{background:#112d45;border-bottom:1px solid #31516c;display:flex;justify-content:space-between;align-items:center;padding:10px 14px;gap:8px}.pf-centerbar>div{display:flex;align-items:center;gap:4px}.pf-centerbar button{padding:7px}.pf-centerbar span{min-width:50px;text-align:center}#pf-viewport{position:relative;flex:1;overflow:auto;background-color:#071c31;background-image:radial-gradient(#21445d 1px,transparent 1px);background-size:20px 20px}#pf-world{position:relative;width:2200px;height:1600px;transform-origin:top left}#pf-lines{position:absolute;inset:0;pointer-events:none}#pf-edges{pointer-events:all}.pf-edge-hit{fill:none;stroke:transparent;stroke-width:19;cursor:pointer}.pf-edge-line{fill:none;stroke:#6ec7ff;stroke-width:2.4;pointer-events:none}.pf-edge-selected .pf-edge-line{stroke:#ffe19a;stroke-width:4}.pf-node{position:absolute;width:248px;min-height:88px;box-sizing:border-box;border:2px solid var(--accent);background:#103047;border-radius:12px;display:flex;align-items:center;gap:10px;padding:12px 18px;box-shadow:0 9px 24px #0007;cursor:grab;touch-action:none;user-select:none}.pf-node:focus,.pf-node.pf-selected{outline:3px solid #b3e9ff;outline-offset:2px}.pf-node-icon{display:grid;place-items:center;flex:0 0 45px;height:45px;font-size:24px;border-radius:9px;background:var(--accent);color:#05223b}.pf-node-main{min-width:0}.pf-node-main strong{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pf-node-main small{display:block;color:#bdd4e7;margin:2px 0}.pf-phase{font-size:11px;color:var(--accent)}.pf-terminal{width:150px;min-height:64px;border-radius:40px}.pf-port{position:absolute;width:13px;height:13px;border:2px solid #c6e9ff;background:#1971a4;border-radius:50%;top:calc(50% - 8px);cursor:crosshair}.pf-in{left:-9px}.pf-out{right:-9px}.pf-port:hover{background:#fff;transform:scale(1.35)}.pf-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:72px;background:#102a40;padding:7px 14px;border-top:1px solid #31516c;font-size:12px}.pf-foot>div{font-weight:bold}#pf-minimap{width:130px;height:41px;position:relative;border:1px solid #426987;background:#092137;border-radius:4px}#pf-minimap span{position:absolute;width:9px;height:5px;border-radius:2px}#projectFlowOpen{font-size:12px;padding:6px 9px}.pf-flow-main{margin-left:8px!important;font-weight:600}#pf-message{max-width:40%;color:#bed3e3}@media(max-width:1050px){.pf-layout{grid-template-columns:190px minmax(0,1fr)225px}}@media(max-width:730px){#projectFlowDialog{inset:0;border-radius:0}.pf-layout{grid-template-columns:145px minmax(0,1fr)}.pf-inspector{position:absolute;bottom:0;right:0;width:min(280px,62vw);height:38vh;box-shadow:0 0 20px #0008;z-index:4}.pf-header{height:auto;min-height:70px;flex-wrap:wrap}.pf-library{padding:6px}.pf-tool{padding:8px;font-size:12px}.pf-centerbar{flex-wrap:wrap}.pf-foot{font-size:10px}#pf-message{display:none}}

/* v2.1.3.2: Dedicated flow workspace, isolated from UML canvas */
#projectFlowDialog{inset:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;z-index:900000!important;display:flex!important;flex-direction:column!important;height:100dvh!important;width:100vw!important;max-width:none!important;max-height:none!important}#projectFlowDialog[hidden]{display:none!important}.pf-header{flex:0 0 auto;min-height:64px;height:auto;box-sizing:border-box}.pf-layout{flex:1;min-height:0;height:auto!important}.pf-center{min-height:0}.pf-library,.pf-inspector{min-height:0}.pf-tool{touch-action:pan-y}.pf-tool:active{cursor:grabbing}.pf-unlinked-hint{padding:10px;border:1px solid #bc9649;background:#443c27;border-radius:7px;color:#ffe4a5!important}@media(max-width:730px){.pf-layout{position:relative}.pf-header{gap:7px}.pf-header>div{display:flex;flex-wrap:wrap;gap:4px}}

/* v2.1.3.3 - Visual parity, bounded viewport and real bidirectional scroll */
#projectFlowDialog{background:#06172a!important;color:#eaf6ff!important;font-family:Inter,Sarabun,sans-serif!important}
.pf-header{background:linear-gradient(100deg,#0a233b,#0d304d)!important;border-bottom-color:#254968!important}
.pf-header strong{color:#eaf8ff;font-weight:800}.pf-header strong i{color:#27c7fa}
.pf-layout{grid-template-columns:minmax(212px,235px) minmax(0,1fr) minmax(240px,280px)!important}
.pf-library,.pf-inspector{background:#091f34!important;scrollbar-width:thin;scrollbar-color:#3d799c #0a2339}
.pf-library h3,.pf-inspector h3{text-transform:uppercase;letter-spacing:.045em;color:#a6d3ec}
.pf-center{background:#071a2c!important}.pf-centerbar{background:#0c263e!important;flex-wrap:wrap}
#pf-viewport{min-width:0;min-height:0;overflow:scroll!important;overscroll-behavior:contain;scrollbar-width:auto;scrollbar-color:#4daada #102b46;background-color:#06192b;background-image:radial-gradient(#265076 .95px,transparent .95px);background-size:20px 20px}
#pf-viewport::-webkit-scrollbar,.pf-library::-webkit-scrollbar,.pf-inspector::-webkit-scrollbar{height:12px;width:12px}#pf-viewport::-webkit-scrollbar-thumb{background:#326f94;border:2px solid #0b2741;border-radius:8px}#pf-viewport::-webkit-scrollbar-track{background:#0b2741}
#pf-scroll-space{position:relative;width:2400px;height:1700px}#pf-world{position:absolute;left:0;top:0;transform-origin:0 0;width:2400px;height:1700px}
.pf-node{background:linear-gradient(145deg,#123550,#091c32 90%)!important;box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 45%,transparent),0 9px 25px #0009,0 0 20px color-mix(in srgb,var(--accent) 17%,transparent)!important;border-width:2px!important;transition:box-shadow .12s ease}
.pf-node:hover{box-shadow:0 0 0 2px var(--accent),0 12px 28px #000b!important}.pf-node-icon{background:linear-gradient(140deg,var(--accent),color-mix(in srgb,var(--accent) 70%,#031e37))!important;color:#fff!important;box-shadow:0 4px 18px #0007}
.pf-node-main strong{color:#f2f9ff}.pf-node-main small{color:#b9d5e9}.pf-terminal{background:linear-gradient(130deg,color-mix(in srgb,var(--accent) 40%,#092639),#091f34)!important}
.pf-edge-line{stroke:#8d92ff;stroke-width:2.8;filter:drop-shadow(0 0 3px #495ce677)}.pf-edge-selected .pf-edge-line{stroke:#54f0df}
.pf-tool{background:#102d48;border-color:#264c69;transition:background .12s,transform .12s}.pf-tool:hover{background:#19496c;transform:translateX(2px)}.pf-tool[data-group=behavior] i{color:#36e3ac}.pf-tool[data-group=structural] i{color:#ffbf4f}.pf-tool[data-group=interaction] i{color:#ad81ff}.pf-tool[data-kind=start] i{color:#2bf3b4}.pf-tool[data-kind=end] i{color:#ff6483}
.pf-centerbar button,.pf-header button,.pf-inspector button{background:#173b5a;border-color:#3b6384}.pf-centerbar button:hover,.pf-header button:hover{background:#20608b}
.pf-foot{background:#082239;border-top-color:#265474}#pf-minimap{width:170px;height:65px;background-color:#071a2b;background-image:radial-gradient(#315571 .5px,transparent .5px);background-size:10px 10px}#pf-minimap span{height:7px;width:11px;box-shadow:0 0 7px #44a9e777}
@media(max-width:1050px){.pf-layout{grid-template-columns:190px minmax(0,1fr) 225px!important}}@media(max-width:760px){.pf-layout{grid-template-columns:145px minmax(0,1fr)!important}.pf-inspector{z-index:6}}

/* v2.1.3.5 Interactive Project Flow enhancement */
.pf-group{margin:9px 0;border:1px solid #315573;border-radius:10px;background:#102e48;overflow:hidden}.pf-group-head{display:flex;align-items:center;gap:9px;width:100%;padding:12px 10px;background:#163650;color:#ecf7ff;border:0;text-align:left;font-weight:700;cursor:pointer}.pf-group-head>span{flex:1}.pf-group-head>em{font-size:11px;font-style:normal;color:#a8cde6;background:#234b68;border-radius:12px;padding:2px 7px}.pf-group-head>.bi:first-child{color:#48c6fa}.pf-group[data-group="behavior"] .pf-group-head>.bi:first-child{color:#34d5a6}.pf-group[data-group="interaction"] .pf-group-head>.bi:first-child{color:#ba9dff}.pf-group-items{padding:5px}.pf-group-items .pf-tool{font-size:12px;margin:3px 0;padding:9px 7px;border-color:#264967}.pf-group-items .pf-tool:hover{background:#245777;border-color:#68bdf7}.pf-preview{fill:none;stroke:#48c6ff;stroke-width:3.5;stroke-dasharray:9 6;stroke-linecap:round;filter:drop-shadow(0 0 5px #4cd4ff);pointer-events:none}.pf-preview.pf-valid{stroke:#39f7b4;stroke-dasharray:none}.pf-preview-tip{fill:#4ecbff;stroke:#fff;stroke-width:2;pointer-events:none}.pf-preview-tip.pf-valid{fill:#39f7b4}.pf-connect-source{box-shadow:0 0 0 5px #2bceff45,0 0 23px #35cfff99!important}.pf-connect-source .pf-out{background:#50d7ff;transform:scale(1.55);box-shadow:0 0 0 7px #37caff55}.pf-connect-target{box-shadow:0 0 0 5px #25edab66,0 0 25px #25edab88!important}.pf-connect-target .pf-in{background:#40ffc0;transform:scale(1.55);box-shadow:0 0 0 8px #29e5a555}#pf-viewport{cursor:default}#pf-nodes{position:relative;pointer-events:none}#pf-nodes .pf-node{pointer-events:auto}#pf-lines{pointer-events:none}#pf-edges{pointer-events:all}

/* v2.1.3.5: unified pointer drag feedback */
#projectFlowDialog .pf-tool{touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
.pf-drag-ghost{position:fixed;z-index:950000;pointer-events:none;padding:11px 17px;border:1px solid #f3c268;border-radius:9px;background:#153852;color:#fff;box-shadow:0 8px 24px #000a;opacity:.88;font:600 13px Sarabun,Arial,sans-serif;white-space:nowrap}
.pf-drag-ghost.pf-valid-drop{border-color:#3cf5b1;background:#124c4c;box-shadow:0 0 0 3px #3cf5b144,0 10px 24px #0009}
#pf-viewport.pf-drop-active{outline:3px solid #28d7ad;outline-offset:-4px}

/* v2.1.3.8 smart add wizard */
#pf-add-dialog{border:1px solid #356387;border-radius:16px;color:#eaf6ff;background:#10273d;padding:0;width:min(510px,calc(100vw - 28px));max-height:90vh;box-shadow:0 24px 80px #0009;z-index:2147483646}
#pf-add-dialog::backdrop{background:#010916b8}
.pf-add-shell{padding:22px;display:grid;gap:15px;font:14px Sarabun, sans-serif}
.pf-add-shell header,.pf-add-shell footer{display:flex;align-items:center;justify-content:space-between;gap:10px}
.pf-add-shell h2{font-size:18px;margin:0;color:#f1faff}
.pf-add-shell label{display:grid;gap:7px;color:#d7e9fa}
.pf-add-options{display:grid;gap:9px;padding:12px;background:#193951;border-radius:10px}
.pf-add-options label{display:flex;align-items:center;gap:10px;cursor:pointer}
.pf-add-shell input:not([type=radio]),.pf-add-shell select{width:100%;box-sizing:border-box;background:#0b2035;color:white;border:1px solid #426784;border-radius:7px;padding:10px;font:inherit}
.pf-add-shell #pf-add-new-wrap{display:grid;gap:12px}
.pf-add-shell button{background:#1d4769;color:white;border:1px solid #3e6887;border-radius:7px;padding:9px 14px;cursor:pointer}
.pf-add-shell #pf-add-submit{background:#027eb3;border-color:#21b7ef}
.pf-add-note{font-size:12px;color:#b7d6e8;margin:0}
#pf-add-dialog [hidden]{display:none!important}
