/* Оболочка истории — общий voice.css. Только рабочая область изображений. */
.image-page .image-history-text{display:flex;flex:1;flex-direction:column;gap:2px;min-width:0;overflow:hidden}.image-page .image-history-text .voice-history-label{display:block;min-width:0;width:100%}.image-page .image-history-model{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px;color:var(--un-muted);font-weight:400}.image-page .voice-history-item:has(.image-history-text){min-height:60px;align-items:center}
body.image-page{--un-side:#f0f3f8;--un-hover:#e2ebf5;--un-accent:#4d78a6;--ink:#282735;--muted:#787582;--accent:#4d78a6;--line:#e1e5ec;margin:0;height:100dvh;overflow:hidden;background:#f7f8fb;color:var(--ink);font:14px/1.45 system-ui,sans-serif}
.image-page .voice-work{height:100dvh;min-height:0;overflow:hidden}.image-page .voice-header{height:52px;min-height:52px;padding:0 18px;gap:14px;border-bottom:1px solid var(--line);background:white}.image-page .voice-header strong{font-size:14px}.image-page .help{font-size:12px;margin-left:auto}.image-page .account{margin-left:auto}.image-page .voice-brand{margin-bottom:18px}.image-page .voice-side{padding-top:20px}.image-page .voice-history{min-height:0}.image-page .voice-side-bottom{font-size:12px}.image-page .voice-side-backdrop{inset:52px 0 0}.image-page button,.image-page input,.image-page select,.image-page textarea{font:inherit}.image-page [hidden]{display:none!important}.image-page a{color:var(--accent)}.image-page .home-return{white-space:nowrap}
#image-workspace{display:grid;grid-template-columns:minmax(270px,var(--image-editor-width,34%)) 12px minmax(0,1fr);gap:0;padding:18px 20px;flex:1;min-width:0;min-height:0;overflow:hidden}.composer{overflow:auto;min-width:0;min-height:0;padding-right:14px;scrollbar-width:thin}.result{display:flex;flex-direction:column;min-width:0;min-height:0;padding-left:14px;overflow:hidden}.section-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.section-top h1,.section-top h2{font-size:19px;font-weight:600;line-height:1.3;margin:0;min-width:0}.section-top h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.section-top button{white-space:nowrap}#workspace-divider{cursor:col-resize;touch-action:none;position:relative}#workspace-divider:after{content:'';position:absolute;width:2px;inset:0 auto 0 5px;background:var(--line)}#workspace-divider:hover:after,#workspace-divider:focus:after{background:var(--accent)}
.image-page main button{border:1px solid var(--line);border-radius:9px;background:white;padding:7px 10px;min-height:32px;color:var(--ink);cursor:pointer;box-shadow:none}.image-page main button:hover{background:#edf3fa}.image-page button:disabled{opacity:.5;cursor:default}.image-page .primary{background:var(--accent);border-color:var(--accent);color:white}.image-page .primary:hover{background:#3b648e}.image-page main label{font-size:12px;color:#696777;display:block}.image-page main textarea,.image-page main input:not([type=checkbox]),.image-page main select{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #dce1e8;border-radius:9px;background:white;color:var(--ink);min-height:0;margin-top:4px;font-size:13px}.image-page main textarea{height:132px;min-height:90px;max-height:160px;resize:vertical;line-height:1.5}.prompt-tabs{display:flex;gap:3px;margin-bottom:8px;flex-wrap:wrap}.image-page .prompt-tabs button{padding:6px 8px;font-size:12px;border:0;background:transparent}.image-page .prompt-tabs button[aria-selected=true]{background:#e2ebf5;color:#355e87}.prompt-actions{display:flex;gap:6px;margin-top:6px;flex-wrap:wrap}.image-page .prompt-actions button{font-size:12px}.muted{font-size:11px;color:var(--muted);margin:6px 0;line-height:1.4}.original-choice{display:flex!important;align-items:center;gap:6px;margin:8px 0}.original-choice input{width:14px;height:14px;margin:0}.settings{display:grid;grid-template-columns:1fr 1fr;gap:8px}.advanced{border-top:1px solid var(--line);padding-top:10px;margin-top:12px}.advanced h3{margin:0;font-size:12px;font-weight:600}.advanced>label{max-width:160px}#quality-settings{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}#quality-settings label:last-child{grid-column:1/-1}.advanced>p:last-child{font-size:10px}.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}#status{font-size:12px}#error{color:#a5323e;font-size:12px;margin:6px 0}.result>.section-top{min-height:28px;flex:none}#charge{flex:none;font-size:10px;max-width:140px;text-align:right}#results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px;flex:1;min-height:0;overflow:hidden}#results.single{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr)}#results figure{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:4px;min-width:0;min-height:0;margin:0;overflow:hidden}#results img{display:block;width:100%;height:100%;min-height:0;object-fit:contain;border-radius:10px;background:#edf0f5;cursor:zoom-in}#results figcaption{display:flex;gap:4px;flex-wrap:wrap;align-items:center;font-size:10px;line-height:1.3}#results figcaption>span{width:100%;font-size:10px;color:var(--muted)}.image-page #results figcaption button,#results figcaption a{padding:4px 6px;font-size:11px;min-height:24px}.empty{grid-column:1/-1;grid-row:1/-1;display:grid;place-content:center;text-align:center;border:1px dashed #d1dbe7;border-radius:16px;color:#8190a3;min-height:0}.empty>span{font-size:65px}.empty p{font-size:15px}#metrics{flex:none;max-height:100px;overflow:auto;font-size:11px}#metrics pre{white-space:pre-wrap;overflow-wrap:anywhere}.image-page dialog{max-width:560px;width:calc(100% - 30px);padding:24px;border:1px solid var(--line);border-radius:15px;box-shadow:0 25px 100px #14243430}.image-page dialog::backdrop{background:#20263366}.image-page dialog .close{float:right;padding:0 8px;border:0;background:white;font-size:24px}.image-page dialog h2{font-size:21px}.image-page dialog button{cursor:pointer}.image-page dialog textarea{width:100%;min-height:120px}html:has(#image-preview[open]){overflow:hidden;scrollbar-gutter:auto}.image-page #image-preview{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:fit-content;height:fit-content;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:8px;background:transparent;box-shadow:none;overflow:visible}.image-page #image-preview[open]{display:flex;align-items:center;justify-content:center}.image-page #image-preview::backdrop{background:#10151de0}.image-page #image-preview img{display:block;width:auto;height:auto;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);object-fit:contain;margin:auto;border-radius:8px}.image-page #image-preview .preview-tools{position:fixed;top:12px;right:12px;z-index:1;display:flex;gap:8px}.image-page #image-preview .preview-tools button{float:none;min-width:44px;min-height:44px;padding:6px 12px;border:1px solid #ffffff66;border-radius:9px;background:#17202ee6;color:white;font-size:14px}.image-page #image-preview .preview-tools .close{font-size:26px;line-height:1}.image-page #image-preview.is-zoomed{display:block;width:calc(100vw - 32px);height:calc(100dvh - 32px);overflow:auto;border-radius:0}.image-page #image-preview.is-zoomed img{max-width:none;max-height:none;border-radius:0}.mobile-tabs{display:none}
@media(max-width:850px){.image-page .help{display:none}#image-workspace{padding:10px;grid-template-columns:1fr}.composer{padding-right:0}.result{display:none;padding:0}#workspace-divider{display:none}.mobile-tabs{display:flex;gap:8px;padding:6px 12px}.mobile-tabs button{flex:1;border:0;border-radius:8px;background:transparent;padding:8px}.mobile-tabs button[aria-pressed=true]{background:#e2ebf5}.image-results-view .composer{display:none}.image-results-view .result{display:flex}#results figcaption>span{font-size:9px}.image-page .voice-header{padding:0 10px;gap:8px}.image-page .voice-header strong{font-size:12px}.image-page .home-return{font-size:12px}}
@media(max-width:600px){.image-page .voice-side{inset:52px auto 0 0}.image-page .voice-brand{display:none}.image-page #results{gap:8px}.image-page .voice-work{margin-left:0}.image-page .voice-header .home-return{display:none}.image-page .voice-side-resize{display:none}.image-page #results figcaption button,.image-page #results figcaption a{font-size:10px;padding:4px}.image-page #charge{max-width:110px}}
.image-page .original-choice input{flex:0 0 14px!important;width:14px!important;height:14px!important;min-width:14px!important;margin:0!important}.image-page .composer>.actions{position:sticky;bottom:0;background:#f7f8fb;padding:10px 0;margin-bottom:0;z-index:2}.image-page main textarea{height:112px}.image-page .original-choice{justify-content:flex-start!important}

.appearance-setting{margin:10px 0}.image-page #variant-picker{display:flex;align-items:center;gap:8px;margin-top:6px}.image-page #prompt-variant{width:auto;flex:1;margin-top:0}.image-page #russian,.image-page #english{height:160px}

/* Единая карточка: прежняя полноэкранная оболочка и разделители сохранены. */
.image-page .mode-switch{display:grid;grid-template-columns:1fr 1.15fr 1.2fr;gap:4px;padding:4px;margin-bottom:9px;background:#e8eef6;border-radius:11px}.image-page .mode-switch button{padding:7px 4px;min-height:44px;font-size:12px;line-height:1.2;border:0;border-radius:8px;background:transparent}.image-page .mode-switch button[aria-pressed=true]{background:white;color:#355e87;box-shadow:0 1px 4px #26394b12}
.image-page .model-badge{font-size:10px;white-space:nowrap;color:#526d89;background:#e7eef6;padding:4px 7px;border-radius:6px}
.image-page .composer>.section-top{margin-bottom:16px}.image-page .prompt-heading{margin-top:16px;margin-bottom:8px}.image-page .prompt-heading h2,.image-page #sources-title{font-size:14px}
.image-page #sources{margin-top:12px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#f0f3f8}.image-page #sources .section-top{margin-bottom:8px}
.image-page #input-list{display:grid;gap:7px}.image-page .input-card{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:8px;padding:7px;background:white;border-radius:8px;border:1px solid var(--line)}
.image-page .input-card img{width:54px;height:54px;object-fit:contain;background:#f3f5f8;border-radius:5px}.image-page .input-card strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.image-page .input-card .muted{margin:2px 0;font-size:10px}.image-page .input-tools{display:flex;gap:3px;flex-wrap:wrap;justify-content:flex-end;max-width:95px}.image-page .input-tools button{font-size:11px;padding:3px 6px;min-height:28px}.image-page .input-tools button[aria-pressed=true]{background:#e2ebf5;color:#355e87}.image-page #input-note{margin-bottom:0}
.image-page #edited{height:160px;max-height:300px}.image-page .settings{margin-top:14px}.image-page .muted{color:#676675}.image-page #access-note{margin-bottom:10px}.image-page .advanced summary{cursor:pointer;font-size:12px}.image-page .advanced label{max-width:190px;margin-top:8px}
.image-page .result-actions{display:flex;align-items:flex-start;gap:10px;margin-top:9px;flex:none;max-height:25vh;overflow:auto}.image-page .result-actions>button{white-space:nowrap}.image-page #run-data{flex:1;min-width:0;font-size:11px}.image-page #run-data summary{cursor:pointer;padding:6px}.image-page #run-data pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:10px;max-height:160px;overflow:auto;background:#eff2f6;border-radius:7px;padding:10px}
.image-page button:focus-visible,.image-page select:focus-visible,.image-page textarea:focus-visible,.image-page input:focus-visible{outline:2px solid #547fae;outline-offset:2px}
@media(max-width:600px){.image-page .model-badge{font-size:9px}.image-page .input-card{grid-template-columns:45px minmax(0,1fr) auto}.image-page .input-card img{width:45px;height:45px}.image-page .result-actions{max-height:20vh}.image-page .composer>.actions{padding:8px 0}}

/* Управление текущей klein: справка, микрофон, число и пропорции. */
.image-page .image-help-links{display:flex;align-items:center;gap:12px;margin-left:auto;font-size:12px}.image-page .image-help-links .help{margin-left:0}.image-help-menu{position:relative}.image-help-menu summary{cursor:pointer;padding:8px 5px;list-style:none;color:var(--accent)}.image-help-menu summary::-webkit-details-marker{display:none}.image-help-menu summary:after{content:' ▾'}.image-help-menu>div{position:absolute;right:0;top:100%;width:270px;max-width:85vw;padding:7px;border:1px solid var(--line);border-radius:10px;background:white;box-shadow:0 10px 35px #20334c22;z-index:30}.image-help-menu a{display:block;padding:11px 9px;text-decoration:none;border-radius:6px}.image-help-menu a:hover{background:#edf3fa}.image-page .voice-header .account{margin-left:0}
.image-page .prompt-field{position:relative}.image-page .prompt-field textarea{display:block;height:150px;min-height:130px;max-height:300px;padding:10px 62px 52px 10px}.image-page .prompt-field #edited{height:180px}.image-page main .prompt-mic{position:absolute;right:10px;bottom:11px;display:grid;place-items:center;width:44px;height:44px;padding:10px;border-radius:50%;color:#3e688f;background:#edf3fa;border-color:#d6e1ee}.prompt-mic .mic-symbol{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.prompt-mic .stop-symbol{display:none;width:13px;height:13px;background:currentColor;border-radius:2px}.prompt-mic[data-recording=true] .mic-symbol{display:none}.prompt-mic[data-recording=true] .stop-symbol{display:block}.image-page main .prompt-mic[data-recording=true]{color:#a23e4d;background:#fbecef;border-color:#e8b7c0}
.image-page .setting-label{display:block;font-size:12px;color:#696777;margin:14px 0 7px}.image-page .ratio-switch{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.image-page .ratio-switch button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;font-size:12px;padding:7px 5px;line-height:1.2}.image-page .ratio-switch button[aria-pressed=true]{background:#e2ebf5;border-color:#9eb7d2;color:#355e87}.ratio-icon{display:block;flex:none;border:1.5px solid currentColor;border-radius:2px}.ratio-square{width:14px;height:14px}.ratio-4x3{width:16px;height:12px}.ratio-3x4{width:12px;height:16px}.ratio-16x9{width:18px;height:10px}.ratio-9x16{width:10px;height:18px}.ratio-3x2{width:18px;height:12px}.ratio-2x3{width:12px;height:18px}.ratio-source{width:15px;height:13px;border-style:dashed}.image-page .settings{display:block}.image-page .settings>label{max-width:100%}
.image-page .seed-setting{border-top:1px solid var(--line);padding-top:10px;margin-top:12px}.image-page .seed-control{display:flex;gap:7px;align-items:center;margin-top:4px}.image-page main .seed-control input{margin-top:0;min-width:0;flex:1;font-variant-numeric:tabular-nums}.image-page main #random-seed{width:40px;height:40px;min-height:40px;flex:0 0 40px;display:grid;place-items:center;padding:9px}.seed-control svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.5}.seed-control svg circle{fill:currentColor;stroke:none}
@media(max-width:850px){.image-page .image-help-links{margin-left:auto;gap:4px}.image-help-menu summary{padding:10px 4px}.image-page .voice-header{gap:9px}.image-page .ratio-switch button{min-height:44px}}

/* Уровни размера и прозрачный расчёт двух этапов. */
.image-page .quality-switch{display:flex;flex-wrap:wrap;gap:5px}.image-page .quality-switch button{min-height:44px;padding:8px 12px;font-size:12px;flex:1 0 auto;white-space:nowrap}.image-page .quality-switch button[aria-pressed=true]{background:#e2ebf5;border-color:#9eb7d2;color:#355e87}.image-page #quality-note{margin-bottom:0}.image-page #quote-stages{white-space:pre-line;line-height:1.6;padding:10px;background:#edf3fa;border-radius:8px}.image-page #quote-stages:empty{display:none}.image-page #results figcaption{flex-wrap:wrap}

#image-trash-dialog{font:inherit;width:min(560px,calc(100vw - 32px));max-height:85vh;overflow:auto;padding:24px;box-sizing:border-box}
#image-trash-dialog h2{font-size:1.3rem;margin:0 0 12px}#image-trash-dialog p{line-height:1.5;margin:8px 0 16px}
.image-trash-entry{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:14px 0;border-top:1px solid #e0e5e7}
#image-trash-dialog .image-trash-entry p{flex-basis:100%;margin:0;overflow-wrap:anywhere}.image-trash-entry small{flex:1;min-width:160px;line-height:1.5}
