/* Shared image editing surface, following Hubitos × FlowStudio UI 2.0. */
.hie-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:0 14px;border:1px solid var(--fs-line-strong);border-radius:9px;background:var(--fs-surface);color:var(--fs-text-strong);font:500 12px/1.4 "Inter","PingFang SC",sans-serif;cursor:pointer;text-decoration:none;white-space:nowrap}
.hie-button:hover{background:var(--fs-bg-01)}.hie-primary{background:var(--fs-brand);border-color:var(--fs-brand);color:#192315}.hie-primary:hover{background:#8fc45f}.hie-button:disabled{opacity:.35;cursor:default}.hie-button svg{width:16px;height:16px}.hie-button:focus-visible,.hie-root button:focus-visible{outline:2px solid var(--fs-blue);outline-offset:3px}
.hie-root{position:fixed;inset:0;z-index:10000;display:grid;grid-template-rows:72px minmax(0,1fr) 36px;background:var(--fs-bg-01);color:var(--fs-text-strong);font:13px/1.5 "Inter","PingFang SC","Microsoft YaHei",sans-serif;text-align:left;isolation:isolate}.hie-root[hidden]{display:none}.hie-root *{box-sizing:border-box}.hie-root button,.hie-root input,.hie-root textarea,.hie-root select{font:inherit}.hie-root button{cursor:pointer}.hie-root svg{flex-shrink:0}.hie-topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 24px;border-bottom:1px solid var(--fs-line);background:var(--fs-surface)}.hie-top-left,.hie-top-actions{display:flex;align-items:center;gap:14px}.hie-back{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--fs-line);border-radius:10px;background:white}.hie-back svg{width:17px;height:17px}.hie-divider{width:1px;height:26px;background:var(--fs-line-strong)}.hie-file-name{font-size:14px;font-weight:600;max-width:270px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hie-file-meta{font-size:10px;color:var(--fs-text-soft);margin-top:3px}.hie-save-status{font-size:11px;color:var(--fs-text-muted)}.hie-save-status i{display:inline-block;width:5px;height:5px;background:var(--fs-brand);border-radius:50%;margin-right:6px}.hie-workspace{display:grid;grid-template-columns:72px 240px minmax(0,1fr) 272px;min-height:0}.hie-rail{display:flex;flex-direction:column;align-items:center;gap:8px;padding:17px 8px;background:var(--fs-surface);border-right:1px solid var(--fs-line)}.hie-tool{width:56px;height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:0;border-radius:10px;background:transparent;color:var(--fs-text-muted);font-size:10px!important}.hie-tool svg{width:21px;height:21px}.hie-tool:hover{background:var(--fs-bg-01)}.hie-tool.is-active{background:var(--fs-brand-soft);color:#4c742d}.hie-rail-bottom{margin-top:auto}.hie-library{background:var(--fs-surface);border-right:1px solid var(--fs-line);padding:24px 18px;overflow:auto}.hie-library h2,.hie-inspector h2{font-size:14px;margin:0 0 8px;font-weight:650}.hie-description{font-size:11px;line-height:1.8;color:var(--fs-text-soft);margin:0 0 24px}.hie-library h3{font-size:11px;color:var(--fs-text-muted);font-weight:500;margin:26px 0 12px}.hie-text-preset{display:block;width:100%;padding:20px 13px;margin:0 0 10px;border:1px solid var(--fs-line);border-radius:10px;background:var(--fs-bg-01);text-align:left;color:var(--fs-text-strong)}.hie-text-preset:hover{border-color:var(--fs-brand)}.hie-text-preset strong{font-size:22px;font-weight:700}.hie-text-preset.is-subtitle strong{font-size:17px;font-weight:500}.hie-text-preset.is-body strong{font-size:13px;font-weight:400}.hie-text-preset small{display:block;font-size:10px;color:var(--fs-text-soft);margin-top:4px}.hie-tip{padding:12px;border:1px solid var(--fs-line);border-radius:10px;font-size:10px;line-height:1.9;color:var(--fs-text-soft)}.hie-shapes{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.hie-shapes button{aspect-ratio:1;display:grid;place-items:center;background:var(--fs-bg-01);border:1px solid var(--fs-line);border-radius:10px}.hie-shapes svg{width:28px;height:28px;color:#7e986c}.hie-upload{width:100%;height:112px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:1px dashed var(--fs-line-strong);border-radius:12px;background:var(--fs-bg-01);color:var(--fs-text-muted)}.hie-upload svg{width:24px;height:24px}.hie-upload small{font-size:10px;color:var(--fs-text-soft)}.hie-badge-preset{border:0;border-radius:7px;margin:4px;padding:7px 10px;background:var(--fs-brand-soft);font-size:10px;color:#476033}.hie-source-thumb{width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px;border:1px solid var(--fs-line);margin-bottom:12px}.hie-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}.hie-choices button{min-height:62px;display:grid;place-items:center;gap:3px;padding:9px;border:1px solid var(--fs-line-strong);background:white;border-radius:9px;color:var(--fs-text-muted);font-size:12px}.hie-choices button small{font-size:9px;color:var(--fs-text-soft)}.hie-choices button.is-active{background:var(--fs-brand-soft);border-color:var(--fs-brand);color:#44692c}.hie-full{width:100%;margin-top:16px}.hie-stage{position:relative;min-width:0;min-height:0;display:flex;flex-direction:column;background:#eff1f3;overflow:hidden}.hie-stage-toolbar{display:flex;align-items:center;justify-content:space-between;padding:16px 22px;gap:10px}.hie-toolbar-group{display:flex;align-items:center;gap:3px;padding:3px;background:white;border:1px solid var(--fs-line);border-radius:9px}.hie-icon{display:grid;place-items:center;width:30px;height:29px;border:0;border-radius:6px;color:var(--fs-text-muted);background:transparent}.hie-icon:hover{background:var(--fs-bg-01)}.hie-icon:disabled{opacity:.25;cursor:default}.hie-icon svg{width:16px;height:16px}.hie-toolbar-label{padding:0 10px;font-size:10px;color:var(--fs-text-muted)}.hie-stage-label{font-size:10px;color:var(--fs-text-soft);letter-spacing:.2px}.hie-viewport{position:relative;flex:1;min-height:0;min-width:0;display:grid;place-items:center;overflow:auto;padding:34px 44px 50px;background-image:radial-gradient(#d6dadd .65px,transparent .65px);background-size:12px 12px}.hie-artboard{position:relative;flex-shrink:0;box-shadow:0 8px 36px #12141713;background:#fff;line-height:0}.hie-canvas{display:block;overflow:visible;touch-action:none;user-select:none}.hie-canvas [data-node]{cursor:move}.hie-canvas [data-locked="true"]{cursor:default}.hie-selection{pointer-events:none}.hie-resize{cursor:nwse-resize;pointer-events:all}.hie-canvas-caption{position:absolute;top:-25px;left:0;font-size:9px;line-height:1.5;color:var(--fs-text-soft);white-space:nowrap}.hie-stage-bottom{height:58px;flex-shrink:0;display:flex;justify-content:center;align-items:center;gap:6px}.hie-stage-bottom span{font-size:11px;color:var(--fs-text-soft)}.hie-stage-bottom button{border:0;background:transparent;color:var(--fs-text-muted);font-size:12px;padding:6px 10px}.hie-inspector{background:white;border-left:1px solid var(--fs-line);display:flex;flex-direction:column;min-height:0}.hie-properties{padding:24px 20px 20px;overflow:auto;min-height:0;flex:1}.hie-property-type{display:inline-flex;align-items:center;gap:7px;font-size:10px;color:var(--fs-text-soft);margin-bottom:22px}.hie-property-section{padding-top:18px;margin-top:18px;border-top:1px solid var(--fs-line)}.hie-section-heading{font-size:11px;font-weight:600;margin:0 0 12px}.hie-field{display:flex;flex-direction:column;gap:6px;font-size:10px;color:var(--fs-text-muted);margin-bottom:12px}.hie-field input:not([type="range"]):not([type="color"]),.hie-field textarea,.hie-field select{width:100%;min-width:0;height:34px;padding:7px 9px;color:var(--fs-text-strong);background:var(--fs-bg-01);border:1px solid transparent;border-radius:7px;font-size:11px;outline:none}.hie-field textarea{height:72px;resize:vertical;line-height:1.6}.hie-field input:focus,.hie-field textarea:focus{border-color:var(--fs-brand)!important}.hie-field input[type="color"]{width:32px;height:30px;padding:2px;border:1px solid var(--fs-line);border-radius:6px;background:white}.hie-field input[type="range"]{width:100%;accent-color:#7fad54}.hie-field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.hie-field-inline{display:flex;align-items:center;gap:8px}.hie-field-inline span{font-size:10px;color:var(--fs-text-muted)}.hie-range-label{display:flex;justify-content:space-between}.hie-toggles{display:flex;gap:5px;margin-bottom:12px}.hie-toggles button{height:30px;flex:1;border:1px solid var(--fs-line);border-radius:6px;background:white;font-size:12px}.hie-toggles button.is-active{background:var(--fs-brand-soft);border-color:var(--fs-brand)}.hie-layers{flex-shrink:0;border-top:1px solid var(--fs-line);padding:17px 12px 13px;max-height:35%;min-height:135px;overflow:auto}.hie-layers-head{display:flex;justify-content:space-between;align-items:center;margin:0 7px 10px}.hie-layers-head h2{font-size:12px;margin:0}.hie-layers-head small{font-size:9px;color:var(--fs-text-soft)}.hie-layer{display:flex;align-items:center;gap:5px;padding:7px 6px;border-radius:8px;margin-bottom:3px;border:1px solid transparent}.hie-layer.is-active{background:var(--fs-brand-soft);border-color:#9bcf6c40}.hie-layer-choose{display:flex;align-items:center;gap:8px;flex:1;min-width:0;padding:0;border:0;background:transparent;color:var(--fs-text);text-align:left}.hie-layer-choose>span{width:27px;height:27px;display:grid;place-items:center;background:#fff;border:1px solid var(--fs-line);border-radius:5px;font-size:13px}.hie-layer-choose img{width:26px;height:26px;object-fit:cover;border-radius:4px}.hie-layer-choose b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:500}.hie-layer .hie-icon{width:24px;height:24px}.hie-layer .hie-icon svg{width:12px;height:12px}.hie-layer.is-hidden{opacity:.5}.hie-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 20px;border-top:1px solid var(--fs-line);background:white;color:var(--fs-text-soft);font-size:9px}.hie-footer kbd{font:inherit;padding:2px 4px;border:1px solid var(--fs-line-strong);border-radius:3px;margin-right:3px}.hie-toast{position:absolute;bottom:54px;left:50%;transform:translateX(-50%);max-width:90%;padding:11px 18px;border-radius:9px;background:#252a22;color:#fff;box-shadow:var(--fs-shadow-float);font-size:12px;z-index:4}.hie-toast[hidden]{display:none}.hie-popup{border:1px solid var(--fs-line);border-radius:18px;padding:26px;width:min(420px,calc(100vw - 32px));color:var(--fs-text-strong);box-shadow:var(--fs-shadow-float);font:13px/1.6 "Inter","PingFang SC",sans-serif}.hie-popup::backdrop{background:#12141744;backdrop-filter:blur(4px)}.hie-popup h2{margin:0 0 8px;font-size:19px}.hie-popup p{font-size:12px;color:var(--fs-text-muted);margin:0 0 22px}.hie-popup-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}.hie-help-grid{display:grid;grid-template-columns:1fr auto;gap:10px;font-size:12px}.hie-help-grid kbd{color:var(--fs-text-muted)}
.chat-image-result{max-width:520px;border:1px solid var(--fs-line-strong,#e7e9e5);border-radius:14px;overflow:hidden;margin-top:18px;background:white}.chat-image-result>img{display:block;width:100%;max-height:390px;object-fit:contain;background:#f0f2ef}.chat-image-result-info{display:flex;justify-content:space-between;gap:12px;padding:15px;align-items:center}.chat-image-result-info strong{font-size:12px;color:#121417}.chat-image-result-info small{display:block;font-size:10px;color:#7b8277;margin-top:4px}.chat-image-result-actions{display:flex;gap:6px}.chat-image-result-actions .hie-button{min-height:33px;font-size:11px;padding:0 11px}.image-edit-card-wrap{position:relative;min-width:0}.image-edit-card-wrap>.ai-result-card{width:100%;display:block}.image-edit-card-wrap .hie-result-edit{position:absolute;right:12px;top:12px;min-height:29px;padding:0 10px;font-size:10px;box-shadow:0 3px 12px #12141712}.hie-media-entry{display:inline-flex!important;align-items:center;gap:6px;min-height:32px;padding:0 12px;border:1px solid #cbd9c0;border-radius:8px;background:#edf5e7;color:#3c5730;font-size:11px;cursor:pointer}
@media(max-width:1200px){.hie-workspace{grid-template-columns:64px 205px minmax(0,1fr) 240px}.hie-rail{padding-left:4px;padding-right:4px}.hie-library{padding:22px 14px}.hie-properties{padding:22px 16px}.hie-save-status{display:none}.hie-viewport{padding:30px 25px 45px}.hie-file-name{max-width:230px}}
@media(max-width:940px){.hie-workspace{grid-template-columns:58px 180px minmax(0,1fr)}.hie-inspector{display:none}.hie-tool{width:48px}.hie-stage-label{display:none}.hie-topbar{padding:0 16px}.hie-top-actions{gap:8px}.hie-file-meta{max-width:230px;white-space:nowrap;overflow:hidden}.hie-footer>span:last-child{display:none}}
@media(max-width:640px){.hie-root{grid-template-rows:64px minmax(0,1fr) 30px}.hie-topbar{padding:0 10px;gap:8px}.hie-top-left{gap:8px}.hie-file-name{font-size:11px;max-width:128px}.hie-file-meta{font-size:8px;max-width:130px}.hie-divider{display:none}.hie-top-actions .hie-button{font-size:10px;min-height:32px;padding:0 9px}.hie-workspace{grid-template-columns:50px minmax(0,1fr);grid-template-rows:minmax(0,1fr) 190px}.hie-rail{grid-row:1/3;gap:4px;padding:10px 2px}.hie-tool{width:44px;height:53px;font-size:9px!important}.hie-library{grid-column:2;grid-row:2;border-top:1px solid var(--fs-line);padding:14px 16px}.hie-library h2{font-size:12px}.hie-library .hie-description,.hie-library h3,.hie-library .hie-tip{display:none}.hie-text-preset{width:31%;display:inline-block;vertical-align:top;height:84px;margin:8px 1% 0 0;padding:12px 9px}.hie-text-preset strong{font-size:16px}.hie-text-preset.is-subtitle strong{font-size:14px}.hie-text-preset small{font-size:9px}.hie-stage{grid-column:2;grid-row:1}.hie-stage-toolbar{padding:10px}.hie-stage-bottom{height:40px}.hie-viewport{padding:25px 18px 30px}.hie-shapes{grid-template-columns:repeat(6,1fr);margin-top:12px}.hie-shapes button{min-width:0}.hie-shapes svg{width:22px;height:22px}.hie-source-thumb{display:none}.hie-choices{grid-template-columns:repeat(4,1fr);gap:5px}.hie-choices button{min-height:40px;font-size:10px}.hie-choices button small{display:none}.hie-full{margin-top:8px;min-height:30px}.hie-upload{height:95px}.hie-footer{padding:0 10px;font-size:8px}.hie-badge-preset{font-size:9px;margin:2px;padding:5px}.hie-mobile-text{width:100%;height:52px;border:1px solid var(--fs-line-strong);border-radius:7px;padding:8px;margin-top:8px}.chat-image-result-info{align-items:flex-start;flex-direction:column}}
/* The existing grid declares display:grid, so explicitly honor its hidden state. */
.ai-result-grid[hidden]{display:none!important}
