/* Additive UI integration over the exact production framework. */
.ui-integrated #nodeLayer>.node.has-media-result{padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:12px!important}
.ui-integrated #nodeLayer>.node.has-media-result .node-body{padding:0!important;height:100%!important;min-height:0!important;overflow:hidden!important;border:0!important;box-shadow:none!important;border-radius:12px}
.ui-integrated #nodeLayer .has-media-result .nody-card-surface{width:100%;height:100%!important;min-height:0!important;border:0!important;outline:1px solid var(--uc-line)!important;outline-offset:-1px;box-shadow:0 2px 7px #17251d05!important;background:var(--uc-panel)!important;border-radius:12px!important;overflow:hidden!important}
.ui-integrated #nodeLayer>.node.has-media-result.selected .nody-card-surface{outline-color:var(--uc-brand)!important;box-shadow:0 0 0 1px color-mix(in srgb,var(--uc-brand) 18%,transparent)!important}
.ui-integrated #nodeLayer .has-media-result .node-media-shell{height:100%!important;min-height:0!important;border-radius:11px!important;overflow:hidden!important;background:var(--uc-panel-2)}
.ui-integrated #nodeLayer .has-media-result .node-media-preview{height:100%!important;min-height:0!important;padding:0!important;aspect-ratio:auto!important}
.ui-integrated #nodeLayer .has-media-result img.node-media,.ui-integrated #nodeLayer .has-media-result video.node-media{display:block;width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;object-fit:contain!important;border-radius:0!important}
.ui-integrated #nodeLayer .has-media-result .node-head{top:auto!important;bottom:calc(100% + 2px)!important;height:24px!important;min-height:24px!important;padding:0 2px!important;background:transparent!important;border:0!important}
.ui-integrated #nodeLayer .has-media-result .node-title{font-size:13px!important;font-weight:500!important}
.ui-integrated #nodeLayer .has-media-result .node-type-icon{width:19px!important;height:19px!important;border-radius:4px!important;background:transparent!important;color:var(--uc-muted)!important}
.ui-integrated #nodeLayer .has-media-result .node-result-stack,.ui-integrated #nodeLayer .has-media-result .nody-media-dimensions{display:none!important}
.if-node-tools{position:absolute;bottom:calc(100% + 44px);left:0;display:flex;gap:3px;padding:4px;border:1px solid var(--uc-line);border-radius:8px;background:var(--uc-panel);box-shadow:0 4px 16px #11251d0a;opacity:0;pointer-events:none;white-space:nowrap;z-index:15}
.node:hover .if-node-tools,.node.selected .if-node-tools{opacity:1;pointer-events:auto}
.if-node-tools button{display:flex;align-items:center;gap:5px;padding:6px 8px!important;min-height:28px!important;border:0!important;border-radius:5px;background:transparent!important;color:var(--uc-ink)!important;font-size:11px!important;line-height:15px!important;cursor:pointer}.if-node-tools button:hover{background:var(--uc-soft)!important;color:var(--uc-brand)!important}.if-node-tools i{font-size:14px}
.if-node-results{position:absolute;top:calc(100% + 10px);left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--uc-muted);font-size:11px;white-space:nowrap}
.if-node-results button{display:flex;align-items:center;gap:5px;border:0!important;background:transparent!important;color:inherit!important;padding:2px 0!important;font-size:11px!important;min-height:20px!important;cursor:pointer}.if-node-results span{font-size:10px}
.if-inline-editor{position:fixed!important;right:auto!important;bottom:auto!important;transform:none!important;z-index:70!important}
.if-inline-editor .node-editor-panel{display:flex!important;flex-direction:column;width:100%!important;min-width:0!important;transform:none!important;max-height:292px!important;height:auto!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;border-radius:12px!important;margin:0!important}
.if-inline-editor .node-editor-panel-head{min-height:38px!important;padding:6px 12px!important;gap:8px!important;flex-shrink:0}
.if-inline-editor .node-editor-type-pill{font-size:13px!important}.if-inline-editor .node-editor-icon-button{width:27px!important;height:27px!important;min-height:27px!important}
.if-inline-editor .node-editor-panel-body{padding:10px 12px!important;min-height:0;max-height:250px!important;overflow:auto!important;overscroll-behavior:contain}
.if-inline-editor .node-workbench,.if-inline-editor .node-workbench-main,.if-inline-editor .node-console,.if-inline-editor .node-workbench-scroll{max-height:none!important;min-height:0!important;overflow:visible!important;margin:0!important;padding:0!important}
.if-inline-editor .node-textarea{font-size:13px!important;line-height:1.65!important;min-height:72px!important;height:72px!important;padding:9px 11px!important}
.if-inline-editor .node-parameter-dock{position:relative!important;bottom:auto!important;margin-top:8px!important;min-height:48px!important}
:where(:root:not(.ui-standardized)) .if-inline-editor .node-parameter-dock{padding:0!important;gap:0!important}
.if-inline-editor .node-parameter-dock select{font-size:12px!important;min-height:30px!important}.if-inline-editor .node-parameter-label{font-size:10px!important}
.if-inline-editor .node-composer-generate{padding:7px!important}.if-inline-editor .node-editor-run{min-height:32px!important;font-size:11px!important;padding:7px 10px!important}
.if-inline-editor :is(.node-editor-panel-image,.node-editor-panel-video) .node-result-history,.if-inline-editor .node-editor-resize{display:none!important}
.if-inline-editor .console-tool{font-size:10px!important;min-height:25px!important;padding:4px 7px!important}.if-inline-editor .node-toolbar-row{gap:5px!important;margin:6px 0!important}
.if-inline-editor .video-prompt-reference-strip{font-size:11px!important;margin-bottom:7px!important}.if-inline-editor .platform-policy-note{font-size:10px!important;line-height:1.5!important}
.if-viewer{box-sizing:border-box;position:fixed;inset:0;margin:0;border:0;border-radius:0;padding:0;width:100vw;height:100dvh;max-width:none;max-height:none;background:var(--uc-bg,#f5f7f4);color:var(--uc-ink,#17251d);font:13px/1.5 "Microsoft YaHei","PingFang SC",sans-serif;overflow:hidden}
.if-viewer[open]{display:flex;flex-direction:column}.if-viewer::backdrop{background:#101a15aa}.if-viewer *{box-sizing:border-box}.if-viewer button,.if-viewer a{font:inherit;color:inherit;text-decoration:none;cursor:pointer}
.if-viewer button{min-height:30px;border:1px solid var(--uc-line);border-radius:6px;background:var(--uc-panel);padding:6px 10px;box-shadow:none}.if-viewer button:hover{background:var(--uc-soft);color:var(--uc-brand)}.if-viewer button:focus-visible{outline:2px solid var(--uc-brand);outline-offset:2px}
.if-review-top{display:flex;align-items:center;gap:14px;flex:0 0 68px;padding:0 22px;border-bottom:1px solid var(--uc-line);background:var(--uc-panel)}.if-review-title{display:flex;flex-direction:column;gap:3px;min-width:0;margin-right:auto}.if-review-title strong{font-size:14px;font-weight:600}.if-review-title small{font-size:11px;color:var(--uc-muted)}
.if-review-modes{display:flex;gap:3px;padding:3px;border:1px solid var(--uc-line);border-radius:8px}.if-review-modes button{border:0;background:transparent}.if-review-modes button.active,.if-filter.active{background:var(--uc-soft)!important;color:var(--uc-brand)!important}.if-viewer button.if-icon{width:32px;padding:0;border:0;background:transparent}.if-viewer .ph{font-size:16px;vertical-align:-2px}
.if-grid{flex:1;min-height:0;overflow:auto;padding:24px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:max-content;align-content:start;gap:18px;overscroll-behavior:contain}
.if-result{position:relative;min-width:0;overflow:hidden;border:1px solid var(--uc-line);border-radius:10px;background:var(--uc-panel)}.if-result.current{outline:2px solid var(--uc-brand);outline-offset:2px}
.if-viewer button.if-result-image{position:relative;display:block;width:100%;height:clamp(180px,28vh,310px);border:0;border-radius:0;background:var(--uc-panel-2);padding:0;overflow:hidden}.if-result-image img,.if-result-image video{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.if-result-body{display:flex;flex-direction:column;padding:12px;gap:7px}.if-result-body>div{display:flex;justify-content:space-between;align-items:center}.if-result-body strong{font-size:12px;font-weight:500}.if-result-body small{font-size:10px;color:var(--uc-muted)}.if-result-body button{font-size:11px}.if-result.current .if-result-body button{background:var(--uc-soft);color:var(--uc-brand);border-color:transparent}
.if-viewer button.if-star{position:absolute;right:10px;top:10px;width:30px;min-height:30px;height:30px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:var(--uc-panel);color:var(--uc-muted);z-index:2}.if-star.active{color:#ae873d!important}.if-current{position:absolute;left:10px;top:10px;background:var(--uc-brand);color:var(--uc-on-brand);font-size:10px;padding:4px 6px;border-radius:3px}.if-video-play{position:absolute;inset:0;display:grid;place-items:center;color:#fff}.if-video-play i{font-size:38px!important;filter:drop-shadow(0 2px 6px rgba(0,0,0,.42))}
.if-result-image img.if-video-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.if-result-image img.if-video-poster:not([data-preview-ready]){visibility:hidden}
.if-media video[data-canvas-video]:not([data-playback-ready]){visibility:hidden}
.if-video-status:not([hidden]){position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:16px;text-align:center;color:var(--uc-ink);font-size:13px}
.if-review-body{display:flex;flex:1;min-height:0;position:relative}.if-stage{position:relative;flex:1;min-width:0;overflow:hidden;touch-action:none}.if-media{position:absolute;inset:26px 60px;display:flex;align-items:center;justify-content:center;transform-origin:center;user-select:none}.if-media img,.if-media video{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}.if-viewer .if-arrow{position:absolute;top:50%;transform:translateY(-50%);width:38px;height:38px;padding:0;border-radius:50%;display:grid;place-items:center;z-index:2}.if-arrow.prev{left:18px}.if-arrow.next{right:18px}
.if-details{flex:0 0 290px;background:var(--uc-panel);border-left:1px solid var(--uc-line);padding:24px;overflow:auto}.if-details h3{font-size:16px;margin:0 0 22px}.if-details dt{color:var(--uc-muted);font-size:11px;margin:18px 0 6px}.if-details dd{margin:0;font-size:13px;line-height:1.8;white-space:pre-wrap}.if-details button{width:100%;margin-top:20px}.if-details p{font-size:11px;color:var(--uc-muted)}
.if-review-bottom{display:flex;align-items:center;gap:18px;flex:0 0 66px;padding:10px 22px;background:var(--uc-panel);border-top:1px solid var(--uc-line)}.if-review-bottom>span{font-size:12px;color:var(--uc-muted)}.if-review-bottom>small{font-size:11px;color:var(--uc-muted);margin-left:auto}.if-review-zoom{display:flex;gap:4px;margin:auto}.if-review-actions{display:flex;align-items:center;gap:8px}.if-review-actions>a{border:1px solid var(--uc-line);padding:6px 10px;border-radius:6px;font-size:12px}.if-viewer .if-primary{background:var(--uc-brand);color:var(--uc-on-brand);border-color:var(--uc-brand)}.if-empty{display:grid;place-items:center;flex:1;color:var(--uc-muted)}
@media(max-width:700px){.if-review-top{padding:0 10px;gap:6px;flex-basis:60px}.if-review-title strong{font-size:12px;max-width:110px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.if-review-title small{font-size:9px}.if-review-modes button{font-size:11px;padding:5px 7px}.if-filter{font-size:0!important}.if-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;gap:10px}.if-result-body{padding:8px}.if-result-body small{display:none}.if-media{inset:20px 28px}.if-viewer .if-arrow{width:28px;height:28px;min-height:28px}.if-arrow.prev{left:5px}.if-arrow.next{right:5px}.if-review-bottom{flex-wrap:wrap;flex-basis:auto;gap:8px;padding:10px}.if-review-actions{gap:4px;margin-left:auto}.if-review-actions button,.if-review-actions a{font-size:11px;padding:5px 7px}.if-details{position:absolute;right:0;top:0;bottom:0;width:270px;max-width:85vw;z-index:4}.if-inline-editor .node-parameter-dock{flex-wrap:wrap}.if-inline-editor .node-parameter-dock>*{flex:1 1 42%!important;min-width:0!important}.if-inline-editor .node-composer-generate{flex-basis:100%!important}.if-inline-editor .node-composer-generate button{width:100%}}

.soho-reference-inputs, .soho-output-options { display: grid; gap: 4px; min-width: 0; }
.soho-reference-inputs summary { cursor: pointer; color: var(--ink); font-size: 12px; }
.soho-reference-inputs details[open] > :not(summary) { margin-top: 6px; }
.soho-reference-inputs select[multiple], .soho-reference-inputs input[type=file] { max-width: 100%; width: 200px; }
.soho-output-options { gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.soho-reference-inputs label, .soho-output-options label, .soho-library-dialog label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.soho-library-dialog { color: var(--uc-text); }
.soho-library-dialog { width: min(560px, 92vw); max-height: 84vh; overflow: auto; padding: 20px; border: 1px solid var(--uc-line); border-radius: 12px; background: var(--uc-panel); }
.soho-library-dialog::backdrop { background: rgb(0 0 0 / 36%); }
.soho-library-dialog[open] { display: grid; gap: 12px; }
.soho-library-dialog header, .soho-library-dialog section { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.soho-library-dialog header { justify-content: space-between; }
.soho-library-dialog label select, .soho-library-dialog label input { max-width: 100%; min-width: 0; }
.soho-library-dialog output { overflow-wrap: anywhere; }
