.ig-page{max-width:1540px;margin:0 auto}.ig-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.ig-heading h2{margin:0 0 6px}.ig-heading p{margin:0;color:var(--text-muted,#586a76)}.ig-server{font-size:14px;color:#4a6b7e;background:#edf5f9;border:1px solid #d5e4ed;border-radius:20px;padding:7px 12px;white-space:nowrap}.ig-workspace{display:grid;grid-template-columns:minmax(340px,430px) minmax(0,1fr);gap:20px;align-items:start}.ig-editor,.ig-result-panel,.ig-history-panel{padding:20px;min-width:0}.ig-editor{display:flex;flex-direction:column;gap:12px}.ig-modes{display:flex;padding:4px;background:#edf5f9;border-radius:10px;margin-bottom:5px}.ig-modes button{flex:1;background:transparent;border:0;border-radius:7px;color:#466579;padding:9px;font:inherit;cursor:pointer}.ig-modes button.is-active{color:#2d4c63;background:#fff;box-shadow:0 2px 7px #2d4c6314;font-weight:600}.ig-label{font-weight:600;font-size:15px}.ig-optional{font-weight:400;color:#70818c;font-size:13px}.ig-editor textarea,.ig-editor input[type=number],.ig-editor select,.ig-reference-role{box-sizing:border-box;width:100%;border:1px solid #cedfe9;background:#fff;border-radius:8px;padding:10px 12px;font:inherit;color:inherit}.ig-editor textarea{resize:vertical;min-height:136px;line-height:1.5}.ig-editor textarea:focus,.ig-editor input:focus,.ig-editor select:focus{outline:2px solid #9fc5de;outline-offset:1px}.ig-hint{font-size:13px;line-height:1.5;color:#647783;margin:0}.ig-references-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.ig-dropzone{border:1px dashed #a9c8db;border-radius:10px;background:#f8fbfd;padding:16px 10px;display:flex;align-items:center;flex-direction:column;gap:9px;text-align:center}.ig-dropzone>span{font-size:12px;color:#71828d}.ig-dropzone.is-drag{border-color:#4a7a9a;background:#e6f2fa}.ig-references:empty{display:none}.ig-references{display:flex;flex-direction:column;gap:9px}.ig-reference{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:9px;align-items:start;border:1px solid #dce7ef;border-radius:9px;padding:8px}.ig-reference-thumb{padding:0;border:0;background:#edf5f9;cursor:pointer;border-radius:6px;overflow:hidden}.ig-reference-thumb img{display:block;width:56px;height:56px;object-fit:contain}.ig-reference-name{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;margin:0 0 4px}.ig-reference-role{padding:5px 7px;font-size:13px}.ig-reference-controls{display:flex;flex-direction:column;gap:4px}.ig-reference-controls button{width:26px;height:26px;padding:0}.ig-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ig-options label,.ig-seed-label{display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:600}.ig-options select{padding:9px 7px;font-weight:400;font-size:14px}.ig-options select:disabled{color:#617481;background:#f2f6f9}.ig-enhance{display:flex;align-items:flex-start;gap:9px;font-size:15px;cursor:pointer}.ig-enhance input{accent-color:#4a7a9a;width:17px;height:17px;flex:none;margin-top:3px}.ig-enhance small{display:block;font-size:12px;font-weight:400;color:#70818c;margin-top:2px}.ig-details{border-top:1px solid #e1eaf0;padding-top:11px}.ig-details summary{cursor:pointer;font-size:14px;color:#446b83;list-style:revert}.ig-details summary>i{margin-right:5px}.ig-seed-label{padding-top:10px;font-size:13px;font-weight:400}.ig-generate{width:100%;justify-content:center;min-height:44px;margin-top:2px}.ig-generate:disabled{opacity:.7;cursor:wait}.ig-private{text-align:center;font-size:12px}.ig-private i{margin-right:4px}.ig-message{font-size:14px;line-height:1.45;background:#edf5f9;border-radius:8px;padding:10px 12px;color:#35566e}.ig-message.is-error{background:#fff4eb;color:#925222;border:1px solid #ead0b9}.ig-results-column{display:grid;gap:20px;min-width:0}.ig-result-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.ig-result-head h3{font-size:20px;margin:0}.ig-empty{min-height:320px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:#f8fbfd;border:1px solid #e1eaf0;border-radius:10px;padding:30px}.ig-empty>i{font-size:44px;color:#a7c1d3;margin-bottom:18px}.ig-empty h3{font-size:20px;margin:0 0 10px;color:#3d6077}.ig-empty p{max-width:340px;font-size:15px;line-height:1.5;color:#71818c;margin:0}.ig-result-open{display:block;width:100%;border:0;padding:0;cursor:zoom-in;background:#f3f7fa;border-radius:10px;overflow:hidden}.ig-result-open img{display:block;max-width:100%;max-height:620px;width:auto;height:auto;margin:auto}.ig-result-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.ig-result-actions a{text-decoration:none;display:inline-flex;align-items:center;gap:8px}.ig-result-panel>#igResultNote{margin-top:12px}.ig-history{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:10px}.ig-history-item{border:2px solid transparent;border-radius:9px;padding:0;overflow:hidden;background:#f3f7fa;cursor:pointer;position:relative}.ig-history-item.is-active{border-color:#4a7a9a}.ig-history-item img{display:block;width:100%;aspect-ratio:1;object-fit:contain;background:#edf2f6}.ig-history-item span{font-size:11px;display:block;padding:5px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;color:#607786}.ig-history-panel #igHistoryEmpty{padding:12px 0}.ig-page [hidden],.ig-viewer [hidden]{display:none!important}.ig-editor .text-btn{color:#4a7a9a;border:0;background:none;text-align:left;cursor:pointer;font:inherit;font-size:13px;padding:2px}.ig-editor .icon-btn{color:#4a7a9a}.ig-queue-spin{animation:ig-spin 1.6s linear infinite}@keyframes ig-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.ig-queue-spin{animation:none}}@media(min-width:1500px){.ig-workspace{grid-template-columns:450px minmax(0,1fr)}}@media(max-width:1100px){.ig-workspace{grid-template-columns:minmax(300px,380px) minmax(0,1fr)}.ig-result-actions{gap:6px}.ig-result-actions button,.ig-result-actions a{font-size:13px;padding:8px 10px}}@media(max-width:850px){.ig-workspace{grid-template-columns:1fr}.ig-heading{align-items:flex-start}.ig-server{white-space:normal;text-align:right;max-width:140px}.ig-empty{min-height:230px}.ig-results-column{gap:16px}.ig-editor,.ig-result-panel,.ig-history-panel{padding:16px}.ig-history{grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}}@media(max-width:420px){.ig-heading{flex-direction:column;gap:8px}.ig-server{max-width:none;text-align:left;padding:5px 10px}.ig-options{gap:7px}.ig-options select{font-size:13px}.ig-result-actions{display:grid;grid-template-columns:1fr 1fr}.ig-result-actions a{grid-column:1/-1;justify-content:center}.ig-result-actions button{justify-content:center}}
.ig-more{margin-top:14px}
@media(max-width:850px){.ig-page{padding:0 12px 16px;box-sizing:border-box}.ig-workspace{gap:16px}}#igResultNote{overflow-wrap:anywhere}

#igReferenceGroup{display:grid;gap:10px}#igReferenceGroup[hidden]{display:none!important}
#igReferenceCount{white-space:nowrap;flex:none}.ig-references-head>.ig-label{min-width:0}

/* The preview, waiting animation and errors share one viewport. */
.ig-stage{position:relative;height:100%;min-height:0;overflow:hidden;border:1px solid #e1eaf0;border-radius:10px;background:#f3f7fa;isolation:isolate}
.ig-stage>.ig-empty{box-sizing:border-box;height:100%;min-height:0;border:0;border-radius:0;background:transparent}
.ig-stage>.ig-result-open{height:100%;display:flex;align-items:center;justify-content:center;border-radius:0}
.ig-stage .ig-result-open img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.ig-preview-status{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:14px;padding:20px;box-sizing:border-box;color:#647783;font-size:14px;background:#f3f7fa}
.ig-preview-status>i{font-size:24px;color:#4a7a9a}
.ig-result-footer{margin-top:14px;display:grid;gap:10px}
.ig-result-footer .ig-result-actions{margin:0;min-height:40px}
.ig-result-footer #igResultNote{height:39px;line-height:19.5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0;overflow-wrap:anywhere}
.ig-result-panel:not(.has-result) .ig-result-footer,.ig-result-panel.is-busy .ig-result-footer{visibility:hidden;pointer-events:none}
.ig-result-panel.is-busy .ig-stage>.ig-result-open,.ig-result-panel.is-busy .ig-stage>.ig-empty{visibility:hidden;pointer-events:none}
.ig-result-panel.is-busy #igResultSize{visibility:hidden}
.ig-result-body{position:relative;height:clamp(320px,44vw,620px);display:grid;grid-template-rows:minmax(0,1fr) auto;border-radius:10px;overflow:hidden}
.ig-result-panel.is-busy .ig-result-body{outline:1px solid #e1eaf0;outline-offset:-1px}
.ig-result-panel.is-busy .ig-stage{border-color:transparent}
.ig-active-jobs{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;overflow:auto;background:#f3f7fa}
.ig-activity-content{width:min(100%,500px);max-height:100%;display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;box-sizing:border-box}
.ig-activity-title{font-size:19px;line-height:1.3;color:#2d4c63}
.ig-activity-note{font-size:14px;line-height:1.5;color:#647783;margin:0;max-width:340px}
.ig-activity-cancel{min-width:124px;min-height:40px;justify-content:center;flex:none}
.ig-activity-cancel:disabled{cursor:wait;opacity:.65}
.ig-activity-warning{font-size:38px;color:#b17a42;margin:12px 0}
.ig-activity-dismiss{border:0;background:none;color:#4a7a9a;font:inherit;font-size:13px;cursor:pointer;padding:4px}
.ig-queue-details{width:100%;font-size:13px;color:#647783;margin-top:2px;text-align:left}
.ig-queue-details>summary{cursor:pointer;text-align:center;list-style-position:inside}
.ig-queue-list{max-height:124px;overflow:auto;margin-top:8px;border-top:1px solid #d9e6ee}
.ig-queue-row{display:grid;grid-template-columns:minmax(0,1fr) 30px;gap:8px;align-items:center;padding:6px 0;border-bottom:1px solid #e1eaf0}
.ig-queue-row>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ig-queue-row button{width:30px;height:30px;color:#4a7a9a}
.ig-wait-art{width:480px;max-width:100%;flex:none;line-height:0}.ig-wait-art canvas{display:block;width:100%;aspect-ratio:3/2;border:0;border-radius:0;box-shadow:none;background:transparent}

/* Private generator gallery: decode before reveal, fit to the available stage. */
.ig-viewer{width:min(1440px,96vw);height:94dvh;max-height:94dvh;max-width:96vw;padding:0;border:1px solid #c6dbe9;border-radius:12px;background:#f3f7fa;color:#2c3e4a;overflow:hidden}
.ig-viewer[open]{display:flex;flex-direction:column}
.ig-viewer::backdrop{background:#102736bf}
.ig-viewer-toolbar{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#fff;border-bottom:1px solid #d8e5ee;flex:none;min-width:0}
#igViewerTitle{font-size:16px;min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ig-viewer-counter{font-size:13px;color:#647783;white-space:nowrap;flex:none}
.ig-viewer-tools{display:flex;align-items:center;gap:6px;flex:none}
.ig-viewer-tools button,.ig-viewer-tools a{min-width:36px;height:36px;box-sizing:border-box;justify-content:center;padding:6px 10px}
.ig-viewer-tools output{font-size:13px;min-width:44px;text-align:center;color:#647783}
.ig-viewer-stage{flex:1;min-height:0;position:relative;overflow:hidden;touch-action:none;cursor:grab;background:#edf3f7}
.ig-viewer-stage:active{cursor:grabbing}
.ig-viewer-stage:focus-visible{outline:2px solid #9fc5de;outline-offset:-2px}
.ig-viewer-stage>img{position:absolute;left:50%;top:50%;max-width:none;max-height:none;object-fit:contain;user-select:none;-webkit-user-drag:none;transform-origin:center;will-change:transform}
.ig-viewer-status{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:24px;text-align:center;font-size:14px;color:#647783}
.ig-viewer-status>i{font-size:26px;color:#4a7a9a}.ig-viewer-status.is-error>i{display:none}
.ig-viewer-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;background:#fff;border-top:1px solid #d8e5ee;flex:none}
.ig-viewer-footer>span{font-size:13px;text-align:center;color:#647783}
.ig-viewer-footer button{width:42px;height:36px;padding:6px;justify-content:center;flex:none}
.ig-viewer button:disabled{opacity:.4;cursor:default}
@media(max-width:850px){.ig-result-body{height:clamp(480px,95vw,620px)}.ig-active-jobs{padding:18px}.ig-activity-content{gap:10px}.ig-wait-art{width:360px}.ig-activity-content{gap:8px}}
@media(max-width:650px){.ig-viewer{width:calc(100vw - 16px);max-width:calc(100vw - 16px);height:96dvh;max-height:96dvh}.ig-viewer-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:10px}.ig-viewer-tools{grid-column:1/-1;justify-content:space-between}.ig-viewer-footer{padding:8px 10px;gap:8px}.ig-viewer-footer>span{font-size:11px;max-width:190px}}
.ig-reference-slot{display:grid;gap:9px;min-width:0}.ig-donor{border-top:1px solid #e1eaf0;padding-top:10px}.ig-donor>summary{cursor:pointer;font-size:14px;color:#446b83}.ig-donor>summary>span{font-size:12px;color:#70818c;white-space:nowrap}.ig-donor>.ig-reference-slot{padding-top:12px}
.ig-reference{grid-template-columns:76px minmax(0,1fr) 32px;align-items:center;padding:10px;gap:10px}.ig-reference-thumb{width:76px;height:76px;display:grid;place-items:center}.ig-reference-thumb img{width:76px;height:76px;object-fit:contain}.ig-reference-info{min-width:0;display:grid;gap:3px}.ig-reference-title{font-size:14px;font-weight:600}.ig-reference-meta{font-size:12px;color:#647783}.ig-reference-replace{justify-self:start;background:none;border:0;color:#4a7a9a;cursor:pointer;font:inherit;font-size:13px;padding:2px 0;min-height:24px}
.ig-editor .ig-reference-remove{display:inline-flex;align-items:center;justify-content:center;flex:none;width:32px;height:32px;min-width:32px;min-height:32px;max-height:32px;box-sizing:border-box;padding:0;line-height:1;border:1px solid #cedfe9;border-radius:7px;background:#fff;color:#4a7a9a;cursor:pointer;font-size:14px;align-self:start}.ig-reference-remove:hover{background:#edf5f9}
.ig-donor-role-label{display:grid;gap:6px;font-size:13px}.ig-donor-role-label input{padding:9px 10px;font-size:14px}.ig-options.is-edit{grid-template-columns:1fr}.ig-options.is-edit>label:first-child{display:none}

/* History actions stay separate from the image button, including on touch screens. */
.ig-history-tools{display:flex;align-items:center;gap:8px}.ig-history-tools .outline-btn{font-size:13px;padding:7px 10px;gap:6px}.ig-history-tools [aria-pressed=true]{background:#edf5f9}
.ig-history-card{position:relative;min-width:0}.ig-history-card .ig-history-item{display:block;width:100%;height:100%}.ig-history-card .ig-history-item>span{padding-right:6px}
.ig-history-delete{position:absolute;top:5px;right:5px;z-index:1;width:34px;min-width:34px;height:34px;min-height:34px;padding:0;border:1px solid #cedfe9;border-radius:7px;background:#fffffff2;color:#71585a;box-shadow:0 2px 5px #18334712;display:flex;align-items:center;justify-content:center;cursor:pointer}
.ig-history-delete:hover,.ig-delete-button:hover{color:#8c3e39;background:#fff4ef}.ig-history-delete:focus-visible{outline:2px solid #4a7a9a;outline-offset:2px}.ig-delete-button{color:#8a554e}
.ig-history-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#edf5f9;border:1px solid #d7e6ef;border-radius:8px;padding:10px 12px;margin-bottom:14px;font-size:14px;color:#35566e}.ig-history-notice button{flex:none}
.ig-delete-dialog{width:min(420px,calc(100vw - 40px));max-width:calc(100vw - 40px);box-sizing:border-box;padding:24px;border:1px solid #cedfe9;border-radius:12px;background:#fff;color:#2c3e4a;box-shadow:0 20px 70px #10273640}.ig-delete-dialog::backdrop{background:#10273699}.ig-delete-dialog h3{margin:0 0 14px;font-size:22px}.ig-delete-dialog p{line-height:1.5}.ig-delete-dialog #igDeletePrompt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.ig-delete-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
@media(max-width:420px){.ig-history-tools{gap:4px}.ig-history-tools .outline-btn{font-size:12px;padding:7px}.ig-history-panel>.ig-result-head{gap:6px}.ig-history-panel h3{font-size:18px}.ig-history-notice{align-items:flex-start}.ig-result-actions #igDeleteResult{grid-column:1/-1}.ig-delete-dialog{padding:20px}.ig-delete-actions>*{flex:1;justify-content:center}}

/* Voice shares the prompt surface; recording controls replace the mic row. */
.ig-prompt-composer{border:1px solid #c9ddeb;border-radius:8px;background:#fff;overflow:hidden;min-width:0}
.ig-prompt-composer:focus-within{border-color:#4a7a9a;box-shadow:0 0 0 2px #4a7a9a14}
.ig-editor .ig-prompt-composer textarea{display:block;width:100%;box-sizing:border-box;border:0;border-radius:0;outline:0;box-shadow:none;min-height:112px;margin:0;resize:vertical}
.ig-voice-toolbar,.ig-voice-session{display:flex;align-items:center;gap:8px;min-height:40px;padding:0 8px 4px;box-sizing:border-box}
.ig-voice-toolbar[hidden],.ig-voice-session[hidden],.ig-voice-session [hidden]{display:none!important}
.ig-voice-button{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;padding:0;border:0;border-radius:7px;background:transparent;color:#4a7a9a;font-size:16px;cursor:pointer;flex:none}
.ig-voice-button:hover{background:#edf5f9}.ig-voice-button:focus-visible{outline:2px solid #4a7a9a;outline-offset:-2px}.ig-voice-button:disabled{opacity:.45;cursor:not-allowed}
.ig-voice-center{min-width:0;flex:1;display:flex;align-items:center;justify-content:center;color:#4a7a9a;font-size:13px;line-height:1.3;text-align:center}
.ig-voice-center canvas{display:block;width:100%;height:28px;color:#4a7a9a}
.ig-voice-stop{background:#edf5f9}.ig-voice-spinner{width:36px;text-align:center;color:#4a7a9a;flex:none}
@media(max-width:850px){.ig-voice-button{width:40px;height:40px;min-width:40px}.ig-voice-toolbar,.ig-voice-session{min-height:44px}}
