#studio{position:relative;flex:1;min-height:0;isolation:isolate;overflow:hidden;background:#f6f8f4;color:#26382f}
#chat-scroll{position:absolute;inset:0;overflow:hidden;touch-action:none;outline-offset:-2px;background-image:radial-gradient(#bac7bc 1px,transparent 1.2px);cursor:grab}
#chat-scroll:active{cursor:grabbing}
#messages{position:absolute;top:0;left:0;transform-origin:0 0}
.board-welcome{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);text-align:center;width:min(90%,430px);pointer-events:none}
.drop-art{display:inline-flex;align-items:center;justify-content:center;width:116px;height:98px;margin-bottom:10px;position:relative}
.drop-art:before,.drop-art:after{content:"";position:absolute;inset:6px 10px;background:#e5eee4;border:1px solid #cbd9ca;border-radius:15px;transform:rotate(-12deg);z-index:-1}
.drop-art:after{transform:rotate(7deg);background:#fff;box-shadow:0 4px 10px #284c3420}
.drop-art img{object-fit:contain;height:68px}
.board-welcome h1{font-size:clamp(24px,3vw,35px);letter-spacing:-.05em;margin:10px 0}
.board-welcome p{font-size:15px;color:#53645c;margin:0 0 22px}
.board-start{display:flex;gap:9px;justify-content:center;pointer-events:auto}
.board-start button,.asset-action,.node button.retry{border:1px solid #cbd5cd;background:white;padding:8px 15px;border-radius:9px}
.board-start button:first-child{color:white;background:#315c46;border-color:#315c46}
.board-tools,.board-zoom{position:absolute;bottom:16px;display:flex;align-items:center;background:#fff;box-shadow:0 4px 18px #263e3112;border:1px solid #d5ded6;border-radius:12px;padding:4px;gap:2px}
.board-tools{left:16px}.board-zoom{right:16px}
.board-tools button,.board-zoom button{display:grid;place-items:center;height:34px;min-width:31px;border-radius:7px;font-size:20px}
.board-zoom [data-board=reset]{font-size:13px;font-variant-numeric:tabular-nums}
.board-tools button[aria-pressed=true],.board-tools button:hover,.board-zoom button:hover{background:#e6efe7;color:#235039}
.board-tools button:disabled{opacity:.3}.board-tools i,.board-zoom i{width:1px;height:20px;background:#dce1db}
#board-status{position:absolute;left:14px;top:12px;background:#fff;border-radius:8px;padding:6px 12px;font-size:13px}
#studio.dragging{outline:3px solid #598869;outline-offset:-4px}
#selection-box{position:absolute;background:#408d6a25;border:1px solid #408d6a;pointer-events:none}
.node{position:absolute;touch-action:none;user-select:none;cursor:move;border:1px solid #c5d2c7;border-radius:13px;background:white;box-shadow:0 4px 14px #283c2b10;overflow:hidden}
.node.selected{outline:3px solid #448766;outline-offset:3px}
.node>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;font-weight:600;font-size:14px;border-bottom:1px solid #ebeee9;min-height:37px}
.node>header span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.node>header button{font-size:13px;white-space:nowrap;color:#476650}
.node>img,.node>video{width:100%;height:auto;max-height:480px;object-fit:contain;display:block;background:#f2f5f1}
.node>footer{padding:8px 12px;font-size:13px;color:#47604e}
.node .retry{margin:5px}.node .grip{position:absolute;bottom:0;right:0;width:18px;height:18px;background:linear-gradient(135deg,transparent 45%,#7e9785 47%,transparent 56%,#7e9785 66%,transparent 70%);cursor:nwse-resize}
.node article{padding:12px;max-height:540px;overflow:auto;touch-action:pan-y;user-select:text;cursor:auto}
.node article .assistant{margin:8px 0 0}.node article .assistant-icon{display:none}.node .user-message{margin:0;user-select:text}.node article .image-grid{display:flex;overflow-x:auto}.node .image-grid .image-card{flex:1 0 42%}.node .image-grid.single .image-card{flex-basis:100%}
#studio .composer-zone{position:absolute;z-index:4;left:12px;top:12px;width:min(620px,calc(100% - 24px));background:#fff;padding:0 0 6px;border:1px solid #b8cbbd;border-radius:16px;box-shadow:0 10px 45px #163f2826;max-height:calc(100% - 76px);overflow:auto}
#studio .composer-wrap{padding:0 8px}.compose-heading{display:flex;align-items:center;gap:8px;padding:9px 12px;color:#31573f}.compose-heading b{margin-right:auto}.compose-heading button{font-size:13px}.compose-heading button:last-child{font-size:20px}
#studio .toolbar{flex-wrap:wrap}#studio .composer-note{font-size:12px;margin:6px}#studio .popover{position:static}#studio .composer-zone[hidden],.board-welcome[hidden],.board-tools[hidden]{display:none}
@media(max-width:620px){.board-tools,.board-zoom{bottom:9px;gap:0;padding:2px}.board-tools{left:5px}.board-zoom{right:5px}.board-tools button,.board-zoom button{min-width:25px;height:32px;padding:2px}.board-zoom [data-board=reset]{font-size:12px}}
#studio .composer-zone .composer textarea{font-size:16px}
#studio .composer-zone .setting-toggle,#studio .composer-zone .compose-mode-row select,#studio .composer-zone .api-switch{font-size:13px}
#studio .composer-zone #reference-storage-note{font-size:12px}
.board-start{pointer-events:none}.board-start button{pointer-events:auto}

.node[data-graph-kind]{overflow:visible;border-radius:14px}
.node[data-graph-kind]>header{border-radius:14px 14px 0 0;min-height:35px;background:#fbfdfb}
.node[data-graph-kind]>img,.node[data-graph-kind]>video{border-radius:0 0 13px 13px}
.node audio,.graph-body audio{width:100%;min-height:64px}
.node .graph-more{padding:0 4px;font-size:18px;color:#456556}
.graph-body{padding:12px;min-height:74px}
.graph-body img,.graph-body video{display:block;width:100%;max-height:460px;object-fit:contain;border-radius:8px;background:#eff3ee}
.graph-body>p{margin:0 0 10px;color:#466258;white-space:pre-wrap;overflow-wrap:anywhere;max-height:92px;overflow:hidden;font-size:14px}
.graph-body>button{padding:6px 9px;border:1px solid #dce6dc;border-radius:7px;background:#f6faf6;color:#305845;font-size:13px}
.graph-body>button{margin-top:7px;margin-right:5px}
.graph-state{margin:7px 0;color:#345b48;font-size:13px}
.node article.graph-task{padding:4px 0;font-size:13px;color:#4d6154}
.graph-tag{max-width:70px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:3px 5px;border-radius:4px;color:#335542;background:#dcece0}
.node[data-graph-kind=group]{background:#edf5e7;border-color:#8fae87}
.graph-lines{position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible;pointer-events:none}
.graph-lines path{fill:none;stroke:#cbd1ce;stroke-width:2.75}
.graph-lines path.lit{stroke:#adb6b2;stroke-width:3.25}
.node .graph-port{position:absolute;z-index:3;top:50%;transform:translateY(-50%);border-radius:50%;background:#fff;border:1px solid #6b9e80;color:#2e674d;display:grid;place-items:center;touch-action:none}
.node .graph-port.out{right:-12px;width:24px;height:24px;padding:0;cursor:crosshair}
.node .graph-port.out svg{display:block;width:16px;height:16px}
.node .graph-port.out::after{content:"";position:absolute;inset:-6px;border-radius:50%}
.node .graph-port.out:hover,.node .graph-port.out:focus-visible{background:#315c46;color:white}
.node .graph-port.in{left:-5px;width:10px;height:10px;pointer-events:none}
.graph-editor{position:absolute;z-index:10;width:min(640px,calc(100% - 24px));display:flex;flex-direction:column;gap:10px;background:#fff;border:1px solid #dce3dd;border-radius:20px;padding:12px 16px 14px;color:#26382f;box-shadow:0 12px 36px #23433129}
.graph-editor[hidden]{display:none}
.graph-editor-head,.graph-editor-title,.graph-editor-tools,.graph-controls,.graph-inputs{display:flex;align-items:center;gap:8px;min-width:0}
.graph-editor-head{cursor:grab;touch-action:none;user-select:none}
.graph-editor-head:active{cursor:grabbing}
.graph-editor-title{flex:1;flex-wrap:wrap;gap:0 9px}
.graph-editor-title strong{font-size:15px;font-weight:650;white-space:nowrap}
.graph-editor-title span{font-size:13px;color:#51645a;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.graph-editor-icon{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:9px;background:#e8f1e9;color:#315c46}
.graph-editor-handle{width:20px;height:8px;border-block:2px solid #a5aea8;border-radius:2px}
.graph-editor-close{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:7px;color:#51645a;font-size:23px;line-height:1}
.graph-inputs{padding:4px;overflow-x:auto;scrollbar-width:thin}
.graph-reference,.graph-reference-add{position:relative;flex:none;width:62px;height:62px;border-radius:12px;background:#f0f3f0}
.graph-reference>button:first-child:not(.graph-reference-remove){display:block;width:100%;height:100%;border-radius:inherit;padding:0}
.graph-reference img{display:block;width:100%;height:100%;border-radius:inherit;object-fit:cover}
.graph-reference button.graph-reference-remove{position:absolute;top:3px;right:3px;display:grid;place-items:center;width:24px;height:24px;padding:0;border-radius:50%;background:#192c22de;color:white;font-size:18px;line-height:1}
.graph-reference-text{display:flex;align-items:end;width:auto;max-width:158px;padding:8px 10px;color:#315c46;font-size:13px}
.graph-reference-text span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.graph-reference-add{display:grid;place-items:center;padding:0;color:#496052;border:1px dashed #bbc9be}
.graph-reference-add:hover{background:#e8f1e9}
.graph-reference-add svg{display:block;width:23px;height:23px}
.graph-editor-prompt{position:relative;width:100%;height:clamp(102px,30dvh,245px);min-height:72px;max-height:42dvh;resize:vertical;display:block;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;padding:8px 4px;border:0;outline-offset:0;background:#fff;color:#26382f;font-size:16px;line-height:1.65;cursor:text}
.graph-editor-prompt[data-empty=true]::before{position:absolute;content:attr(data-placeholder);color:#51645a;pointer-events:none}
.graph-inline-reference{display:inline-grid;place-items:center;width:30px;height:30px;margin-inline:2px;vertical-align:middle;border-radius:6px;background:#e5ece6;cursor:default}
.graph-inline-reference img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.graph-inline-reference img:not([src]){visibility:hidden}
.graph-editor-prompt:focus-visible{outline:2px solid #74a58a;border-radius:6px}
.graph-editor-prompt:focus:not(:focus-visible){outline:none}
.graph-editor-tools{flex-wrap:wrap;gap:6px;border-top:1px solid #e1e8df;padding-top:10px}
.graph-controls{flex-wrap:wrap;gap:6px}
.graph-editor-tools button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:5px 9px;border:1px solid #d4dfd6;background:#f6f9f5;color:#26382f;border-radius:8px;font-size:14px;white-space:nowrap}
.graph-editor-tools button:hover,.graph-editor-tools button[aria-expanded=true]{background:#e8f1e9}
.graph-editor-tools .graph-mention{width:36px;color:#315c46;font-size:18px;font-weight:650}
.graph-editor-tools .graph-editor-more{width:36px;padding:0}
.graph-editor-tools .graph-primary{margin-left:auto;background:#315c46;border-color:#315c46;color:#fff;font-weight:600}
.graph-editor-tools .graph-primary:hover{background:#244b36}
.graph-parameter{max-width:100%}
.graph-parameter-value{overflow:hidden;text-overflow:ellipsis}
.graph-parameter-icon{display:grid;place-items:center;color:#51645a}
.graph-parameter-icon .icon{width:14px;height:14px}
.graph-chevron{flex:none;width:6px;height:6px;border-right:1.5px solid #51645a;border-bottom:1.5px solid #51645a;transform:translateY(-1px) rotate(45deg);margin-right:1px}
.graph-custom-ratio{display:flex;gap:8px;align-items:center;font-size:13px;color:#51645a}
.graph-custom-ratio label{display:flex;align-items:center;gap:5px}
.graph-custom-ratio input,.graph-name input{min-width:0;padding:5px 7px;border:1px solid #d6e4d8;border-radius:7px;background:#f9fcf9;color:#23392e}
.graph-custom-ratio input{width:70px}
.graph-mask-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#51645a;font-size:13px}
.graph-editor-menu{position:absolute;z-index:1;min-width:154px;width:max-content;max-width:min(310px,calc(100vw - 24px));padding:5px;overflow:auto;overscroll-behavior:contain;border:1px solid #d4dfd6;border-radius:11px;background:#fff;box-shadow:0 7px 24px #23433124}
.graph-menu-title,.graph-menu-empty{padding:5px 8px;color:#51645a;font-size:13px}
.graph-menu-item{display:flex;align-items:center;gap:8px;width:100%;min-height:35px;padding:6px 8px;text-align:left;border-radius:7px;font-size:14px}
.graph-menu-item:hover,.graph-menu-item.highlighted,.graph-menu-item[aria-checked=true]{background:#e8f1e9}
.graph-menu-item img{width:38px;height:29px;object-fit:cover;border-radius:5px;flex:none}
.graph-menu-caption{flex:1;min-width:0;overflow-wrap:anywhere}
.graph-menu-caption small{display:block;color:#51645a;font-size:12px}
.graph-option-check{color:#315c46}
.graph-name footer{display:flex;gap:6px;margin-top:12px;justify-content:end}
.graph-name button,.graph-project{padding:6px 9px;border:1px solid #dce6dc;border-radius:7px;background:#f6faf6;color:#305845;font-size:13px}
.graph-name .graph-primary{background:#305e47;color:#fff;border-color:#305e47}
.graph-project{padding:2px 8px}
@media(max-width:700px){
 .graph-editor{padding:10px;gap:7px}
 .graph-editor-tools button{font-size:13px;padding-inline:7px}
 .graph-parameter-icon{display:none}
}
@media(max-height:480px){
 .graph-editor{gap:4px;padding-block:8px}
 .graph-editor-prompt{min-height:60px;height:18dvh}
 .graph-reference,.graph-reference-add{width:45px;height:45px}
}
@media(pointer:coarse){.graph-editor-tools button,.graph-menu-item{min-height:42px}}
.graph-pan,.graph-pan .node{cursor:grab!important}
#board-status{left:62px}
.graph-picking{cursor:crosshair!important}.graph-picking .node{cursor:crosshair}
.graph-delete-dialog .dialog-button-row{margin-top:20px}
.graph-delete-dialog p{line-height:1.7}
