/* Interaction panels use viewport pixels; nodes remain in canvas coordinates. */
#canvas[data-tool=select]{cursor:default}#canvas[data-tool=hand],#canvas.space-pan{cursor:grab}#canvas.is-panning{cursor:grabbing}#canvas.is-panning *{cursor:grabbing!important}.canvas-marquee{position:absolute;z-index:4;pointer-events:none;border:1px solid #15c2e6;background:#0bbee51c;border-radius:2px}.node.multi-selected{border-color:#22bddc;box-shadow:0 0 0 1px #22bddc}.node[data-group] .nodehead:before{content:'▢';color:#0cc3e4;margin-right:3px}.node-popover,.canvas-panel,.canvas-menu,.shortcut-panel,.tutorial-menu,.floating-generator,dialog{overscroll-behavior:contain}.node-popover{max-height:min(550px,calc(100vh - 24px));max-width:calc(100vw - 16px);scrollbar-width:thin;scrollbar-color:#555 transparent}.model-popover{display:flex;flex-direction:column;overflow:hidden}.model-search{flex-shrink:0}#model-options{overflow-y:auto;overscroll-behavior:contain;min-height:0;scrollbar-width:thin}.model-note{flex-shrink:0}.node textarea.generator-prompt{resize:none!important;min-height:96px;max-height:96px;height:96px;overflow:auto}.generator-chips .prompt-expand{margin-left:auto;background:transparent;padding:0;width:26px;height:26px;color:#aaa}.prompt-expand svg{width:20px;height:20px}.generator-chips{padding-right:2px}.generator-controls{gap:2px}.generator-controls button{font-size:12px;padding:4px}.generator-controls .model-select{max-width:174px}.generator-controls .parameter-select{flex:1;min-width:140px;justify-content:flex-start}.generator-separator{height:16px;width:1px;background:#454545;flex-shrink:0;margin:0 4px}.generator-controls button:not(.model-select):not(.parameter-select):not(.generate-arrow){width:27px;flex-shrink:0;justify-content:center}.generator-controls .generate-arrow{flex-shrink:0}.generator-controls .style-control{position:relative}.generator-controls .style-control:after{content:'';width:4px;height:4px;background:#00c3eb;position:absolute;top:2px;right:3px;border-radius:50%}.generator-references{display:flex;gap:7px;padding:0 3px;flex-wrap:wrap}.generator-references:empty{display:none}.reference-chip{position:relative;margin:0 0 6px}.reference-chip>button:first-child{width:46px;height:46px;border-radius:9px;overflow:hidden;background:#333;padding:0;position:relative}.reference-chip img{width:100%;height:100%;object-fit:cover}.reference-chip span{position:absolute;bottom:0;left:0;right:0;background:#0007;font-size:10px;text-align:center}.remove-reference{position:absolute;right:-5px;top:-5px;width:15px;height:15px;background:#454545;border-radius:50%;font-size:13px;padding:0;opacity:0}.reference-chip:hover .remove-reference,.remove-reference:focus{opacity:1}.style-reference-node .nodehead strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:230px}.style-reference-node .preview-media{object-fit:cover!important}.style-reference-node .preview-surface{border-radius:12px}.style-reference-node{border-radius:12px}.expanded-prompt-dialog{width:min(900px,90vw);max-width:90vw;max-height:90vh;padding:24px}.expanded-prompt-dialog #expandedPrompt{width:100%;height:min(52vh,480px);min-height:180px;resize:none;border:0;outline:none;padding:16px 0;background:transparent;font-size:16px;line-height:1.8;color:#eee}.expanded-prompt-meta{display:flex;justify-content:space-between;color:#888;font-size:12px;padding-top:15px;border-top:1px solid #3b3b3b}.style-library-dialog{width:min(800px,92vw)}.style-library-note{font-size:13px;color:#999;margin:12px 0 20px}.style-library-dialog h3{font-size:13px;color:#888;font-weight:400;margin:20px 0 12px}.style-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.style-grid button{border:1px solid #444;background:#303030;border-radius:12px;overflow:hidden;padding:0;text-align:left}.style-grid button:hover{border-color:#aaa}.style-grid img{width:100%;height:140px;object-fit:cover}.style-grid span{display:block;padding:10px;font-size:12px}.style-grid p{grid-column:1/-1}#canvas-tooltip{position:fixed;z-index:10000;background:#333;border:1px solid #4a4a4a;box-shadow:0 3px 12px #0004;border-radius:6px;padding:6px 9px;color:#eee;font-size:12px;line-height:1.4;pointer-events:none;white-space:nowrap}.workspace-menu{transform:none;bottom:auto;width:214px;border-radius:20px;padding:7px 5px;background:#272727;border-color:#383838;box-shadow:0 10px 30px #0003}.workspace-menu button{font-size:15px;height:47px;padding:0 12px}.workspace-menu hr{border:0;border-top:1px solid #3a3a3a;margin:5px 0}.topcluster .workspace-menu-toggle[aria-expanded=true]{background:#3a3a3a;border-radius:8px}.toolbox .panel-active{background:#414141!important}.shortcut-panel{position:absolute;left:18px;right:18px;bottom:72px;z-index:12;background:#252525;border:1px solid #303030;border-radius:16px;box-shadow:0 4px 9px #0005;padding:22px;cursor:default;max-height:calc(100vh - 136px);overflow:auto}.shortcut-panel:after{content:'';position:absolute;bottom:-6px;left:61%;width:12px;height:12px;transform:rotate(45deg);background:#252525;border-right:1px solid #333;border-bottom:1px solid #333}.shortcut-columns{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.shortcut-columns>section{padding:0 22px;border-right:1px solid #383838}.shortcut-columns>section:first-child{padding-left:0}.shortcut-columns>section:last-child{border:0;padding-right:0}.shortcut-columns h3{font-size:13px;color:#00bce4;margin:0 0 18px;font-weight:600}.shortcut-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;color:#999;margin:0 0 12px;min-height:26px}.shortcut-row:last-child{margin:0}.shortcut-row>div{display:flex;gap:7px;align-items:center;white-space:nowrap;color:#ddd}.shortcut-row kbd{font-family:inherit;font-size:13px;font-weight:400;border:1px solid #383838;border-radius:8px;padding:5px 7px;min-width:26px;text-align:center}.shortcut-row kbd:last-child:first-letter{font-weight:400}.shortcut-row svg{width:25px;height:25px;color:#65d9f4}.shortcut-close{position:absolute;right:12px;top:12px;width:20px;height:20px;color:#ccc}.shortcut-close svg{width:18px;height:18px;fill:currentColor;stroke:none}.tutorial-menu{position:absolute;z-index:12;width:220px;background:#272727;border:1px solid #393939;border-radius:12px;padding:12px;box-shadow:0 6px 25px #0005}.tutorial-menu h3{font-size:12px;color:#888;font-weight:400;margin:0 0 10px}.tutorial-menu button{display:flex;width:100%;padding:10px 6px;font-size:13px;justify-content:space-between;border-radius:6px}.tutorial-menu button:hover{background:#3a3a3a}@media(max-width:950px){.shortcut-panel{padding:18px}.shortcut-columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.shortcut-columns>section{padding:0 12px}.shortcut-columns>section:nth-child(2){border:0}.shortcut-columns>section:nth-child(3){padding-left:0}.shortcut-row{font-size:12px}}@media(max-width:500px){.shortcut-columns{grid-template-columns:1fr}.shortcut-columns>section{padding:0;border:0}.style-grid{grid-template-columns:repeat(2,1fr)}.expanded-prompt-meta{flex-direction:column;gap:8px}}
/* overflow:hidden still permits focus to scroll the canvas element itself. */
#canvas{overflow:clip}.nodehead{touch-action:none}.canvas-marquee{touch-action:none}
.tutorial-menu{width:112px;padding:6px 4px;border-radius:13px}.tutorial-menu button,.tutorial-menu a{display:block;width:100%;text-align:left;padding:11px 12px;color:#ddd;text-decoration:none;font-size:13px;white-space:nowrap}.tutorial-menu a:hover{background:#3a3a3a;border-radius:6px}.tutorial-menu:after{content:'';position:absolute;bottom:-6px;left:calc(50% - 6px);width:12px;height:12px;transform:rotate(45deg);background:#272727;border-right:1px solid #393939;border-bottom:1px solid #393939}.has-reference .preview-placeholder>svg{margin:0}.connections path.style-edge{stroke:#5fbcf6;stroke-width:3;stroke-dasharray:16 100;animation:reference-flow 5s linear infinite;filter:drop-shadow(0 0 3px #5fbcf6)}@keyframes reference-flow{to{stroke-dashoffset:-232}}@media(prefers-reduced-motion:reduce){.connections path.style-edge{animation:none}}

/* Prompt editing stays visually integrated with its card when focused. */
.node textarea.generator-prompt:focus,.node textarea.generator-prompt:focus-visible{outline:none;box-shadow:none;border:0}
.generator-chips .style-control{gap:4px}
#canvas.is-linking .production-node .port.in,.production-node.link-source .port.out{display:block}
.production-node .port.connected{border-color:#aaa;color:#eee}
.production-node.link-source .port.out{border-color:#36c6eb;color:#36c6eb;background:#19333a}
#canvas.is-linking .port.in:hover{border-color:#36c6eb;color:#36c6eb;background:#19333a}

.production-node .preview-surface{cursor:grab;user-select:none}.production-node .preview-surface:active{cursor:grabbing}.production-node .preview-surface textarea{cursor:text;user-select:text}.production-node img{-webkit-user-drag:none}.production-node .nodehead{user-select:none}
