.gen-image-editor{position:fixed;inset:0;top:0;margin:0;width:100vw;max-width:none;height:100dvh;max-height:none;border:0;padding:0;color:var(--text,#111);background:var(--bg,#fff);display:flex;flex-direction:column;overflow:hidden;z-index:10000;box-sizing:border-box;padding-top:env(safe-area-inset-top)}
.gen-image-editor:not([open]){display:none}.gen-image-editor::backdrop{background:#0008}.gie-top,.gie-tools{display:flex;align-items:center;gap:8px;padding:8px 12px;flex-shrink:0}.gie-top strong{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gie-top select{max-width:36vw}.gen-image-editor button,.gen-image-editor select{min-height:44px;min-width:44px;padding:8px 12px;color:inherit;border:1px solid #8885;border-radius:12px;background:transparent;font:inherit;touch-action:manipulation}.gen-image-editor button:disabled{opacity:.35}.gen-image-editor button[aria-pressed=true]{background:var(--text,#111);color:var(--bg,#fff)}.gie-tools{overflow:auto;scrollbar-width:thin}.gie-tools label{min-width:110px;font-size:12px}.gie-tools input{display:block;width:110px;min-height:32px;accent-color:currentColor}.gie-stage{position:relative;flex:1;min-height:100px;overflow:hidden;touch-action:none;background:#8881;overscroll-behavior:contain}.gie-surface{position:absolute;left:50%;top:50%;transform-origin:center;will-change:transform}.gie-surface img,.gie-surface canvas{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;user-select:none;-webkit-user-select:none}.gie-surface canvas{opacity:.5;touch-action:none}.gie-footer{display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));flex-shrink:0;background:inherit}.gie-footer textarea{grid-column:1;resize:none;min-height:60px;max-height:120px;box-sizing:border-box;min-width:0;width:100%;padding:10px;border:1px solid #8886;border-radius:12px;font:inherit;font-size:16px;color:inherit;background:transparent}.gie-footer .gie-apply{grid-column:2;grid-row:2;align-self:end;background:var(--text,#111);color:var(--bg,#fff)}.gie-hint,.gie-status{grid-column:1/-1;margin:0;font-size:12px;line-height:1.45}.gie-status:empty{display:none}.gen-edit-button{min-width:44px;min-height:44px}.gen-edit-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6}.gen-image-editor :focus-visible{outline:2px solid currentColor;outline-offset:2px}@media(max-height:450px){.gie-hint{display:none}.gie-tools{padding-block:2px}.gie-footer textarea{min-height:44px}.gie-footer{padding-top:4px}.gie-stage{min-height:60px}}@media(prefers-reduced-motion:reduce){.gie-surface{will-change:auto}}

.gen-image-editor[data-keyboard=true] .gie-tools{display:none}@media(max-height:320px){.gie-tools{display:none}.gie-stage{min-height:30px}.gie-top{padding-block:2px}.gie-footer{padding-block:4px}}

.gie-top,.gie-tools,.gie-footer{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}

.gie-tools>*{flex:0 0 auto}.gen-image-editor button{white-space:nowrap}.gie-footer textarea{grid-row:2}.gie-hint{grid-row:1}.gie-status{grid-row:3}@media(max-height:450px){.gie-footer textarea,.gie-footer .gie-apply{grid-row:1}.gie-status{grid-row:2}}
