@import url('/assets/base.css');
/* Optional input crop: same native-pixel polygon viewport as the result lasso. */
.draft-info{flex:1;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:4px}.draft-info>span{display:block;min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draft-info>small{display:block;flex-basis:100%;order:2;overflow-wrap:anywhere}.draft-info>small{font-size:10px;color:#547745;margin-top:4px}.draft-actions{display:flex;flex-wrap:wrap;gap:4px;margin:0}.draft-actions .draft-crop{color:#245b9d;background:#e5efff;border-radius:5px}.draft-row img{flex-shrink:0}
#input-selection-dialog{width:min(920px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 24px);overflow:auto;padding:20px;border:1px solid #d4ddcf;border-radius:16px;background:#f7f8f5;color:#203229;overscroll-behavior:contain}#input-selection-dialog::backdrop{background:#162119ad;backdrop-filter:blur(3px)}.input-selection-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.input-selection-heading>div{min-width:0}.input-selection-heading h2{font-size:18px}.input-selection-heading button{flex-shrink:0}#input-selection-name{overflow-wrap:anywhere;margin-top:5px}#input-selection-help{margin:14px 0}#input-selection-frame{aspect-ratio:auto;height:clamp(240px,48dvh,520px);min-height:0;overflow:hidden}#input-selection-image{inset:auto;left:var(--polygon-image-left);top:var(--polygon-image-top);width:var(--polygon-image-width);height:var(--polygon-image-height);max-width:none;max-height:none;object-fit:fill}#input-selection-overlay{position:absolute;inset:0;width:100%;height:100%;cursor:crosshair;touch-action:none;user-select:none;overflow:hidden}#input-selection-overlay:focus-visible{outline:2px solid #166bed;outline-offset:-3px}#input-selection-overlay>*{pointer-events:none}#input-selection-overlay[data-panning=true]{cursor:grabbing}#input-selection-status{overflow-wrap:anywhere;margin-top:12px}#input-selection-apply{margin-left:auto}@media(max-width:760px){#input-selection-dialog{padding:14px;width:calc(100vw - 20px)}.input-selection-heading h2{font-size:16px}#input-selection-frame{height:38dvh;min-height:220px}#input-selection-dialog .polygon-actions{gap:6px}#input-selection-apply{margin-left:0}}
.workspace{grid-template-columns:350px minmax(0,1fr)}.connection-status{font-size:12px;line-height:1.7;color:#566b49;margin:0 0 12px}.billing-note{font-size:11px;line-height:1.7;color:#7b7c69;padding-top:12px;border-top:1px solid #edf0e8;margin:14px 0 0}#key-form label,.output-settings label{display:block;font-size:12px;font-weight:550;margin:14px 0 8px}#key-form button{margin-top:10px}.actions{display:flex;gap:14px;flex-wrap:wrap}.external-link{display:inline-block}.output-settings{margin-top:17px}.output-settings summary{font-size:12px}.model-info{padding:12px;background:#f6f8f1;border-radius:8px;margin-top:13px;line-height:1.7}.model-info strong{display:block;font-size:12px}.model-info span{display:block;color:#859078;font-size:10px}select{font:inherit;font-size:12px;width:100%;padding:11px;border:1px solid #dbe2d5;border-radius:8px;background:#fcfdfa;color:#34452f;min-width:0}.result-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.history-row .row-actions{display:flex;gap:6px}.row-actions button{background:none;border:0;color:#748368;font-size:10px;padding:6px;cursor:pointer}.metadata{display:grid;grid-template-columns:110px minmax(0,1fr);font-size:11px;line-height:1.8;gap:7px 15px;margin-top:16px}.metadata dt{color:#89947f}.metadata dd{margin:0;overflow-wrap:anywhere;color:#5c6e51}.image-frame{aspect-ratio:1/1;min-height:210px}.locked{margin-top:25px}#technical summary{font-size:12px}@media(max-width:1000px){.workspace{grid-template-columns:310px minmax(0,1fr)}.result-actions{justify-content:flex-start}}@media(max-width:760px){.workspace{display:flex}.image-frame{min-height:160px}.result-actions{width:100%}.result-actions>*{flex:1}.history-row .row-actions{flex-direction:column}.metadata{grid-template-columns:90px minmax(0,1fr)}}
.workspace-tabs{display:flex;gap:5px;margin:0 0 25px;border-bottom:1px solid #dfe6d7}.workspace-tabs button{background:none;border:0;border-bottom:2px solid transparent;padding:13px 18px;color:#87937f;font-size:13px}.workspace-tabs button.active{color:#344f2d;border-color:#547745;font-weight:600}.analysis-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 22px}.analysis-intro h2{font-size:22px;margin-bottom:10px}.pair-upload{display:grid;grid-template-columns:1fr 1fr;gap:25px}.pair-upload h3{font-size:14px;font-weight:600;margin:0}.pair-upload .dropzone{margin-top:14px}.pair-footer{display:flex;gap:25px;align-items:center;justify-content:space-between;margin-top:20px;border-top:1px solid #e7ece2;padding-top:18px}.pair-footer .hint{margin:0;max-width:650px}.pair-footer button{white-space:nowrap}.pair-preview,.pair-history{margin-top:22px}.pair-preview .image-frame{aspect-ratio:1.3/1;max-height:440px}.pair-history .section-title{justify-content:space-between}.pair-image img{object-fit:contain}@media(max-width:760px){.analysis-intro{align-items:flex-start;flex-direction:column}.pair-upload{grid-template-columns:1fr}.pair-footer{flex-direction:column;align-items:stretch;gap:15px}.workspace-tabs button{font-size:12px;padding:12px}.pair-preview .comparison{grid-template-columns:1fr}.pair-preview .comparison figure+figure{margin-top:16px}}
/* Multiple submissions, durable queue and independent results. */
#image-form label[for=preset],.favorite-settings label{display:block;font-size:12px;font-weight:550;margin:16px 0 8px}.favorite-settings{margin-top:10px}.favorite-settings summary{font-size:11px}input[type=text],input[type=search]{width:100%;min-width:0;font:inherit;font-size:12px;border:1px solid #dbe2d5;border-radius:8px;background:#fcfdfa;padding:11px;color:#34452f}.draft-list{display:grid;gap:8px;margin-top:12px}.draft-row,.queue-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #edf0e7}.draft-row img,.queue-row img{width:42px;height:42px;object-fit:contain;border:1px solid #e4e8e0;border-radius:6px;background:#f5f6f2}.draft-row span,.queue-row .queue-text{min-width:0;flex:1;font-size:11px;overflow-wrap:anywhere}.draft-row button,.queue-row button{border:0;background:none;color:#65775c;font-size:11px;padding:7px}.queue-row strong{display:block;font-size:12px;font-weight:550;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.queue-row small{display:block;font-size:11px;color:#7e8a78;margin-top:5px}.queue-card .section-title{justify-content:space-between;flex-wrap:wrap}.queue-counters{display:flex;gap:20px;flex-wrap:wrap;font-size:12px;color:#84907c}.queue-counters strong{font-size:20px;color:#405d37;font-weight:550;margin-right:4px}.queue-row.processing .queue-text small,.queue-row.postprocessing .queue-text small{color:#497f35}.queue-row.failed .queue-text small{color:#a25436}.gallery-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 160px;gap:10px}.gallery-selection{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:14px 0 18px;flex-wrap:wrap}.gallery-selection label{font-size:11px;color:#6b7c60;display:flex;align-items:center;gap:6px}.gallery-selection input,.gallery-card input{accent-color:#41653a}.gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.gallery-card{min-width:0;border:1px solid #e2e8dc;border-radius:11px;overflow:hidden;background:#fbfcf9}.gallery-card.selected{outline:2px solid #648653}.gallery-image{position:relative;aspect-ratio:1;border-bottom:1px solid #e4e9df}.gallery-image>button{width:100%;height:100%;border:0;display:block;background:none;padding:9px}.gallery-image img{width:100%;height:100%;object-fit:contain;display:block}.gallery-image>label{position:absolute;top:6px;left:6px;background:white;border-radius:5px;padding:4px;display:flex}.gallery-body{padding:11px}.gallery-body strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:550}.gallery-body small{font-size:10px;color:#839176;display:block;margin-top:6px;line-height:1.5}.gallery-body .error-text{color:#a35533}.gallery-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:10px}.gallery-actions button,.gallery-actions a{background:none;border:0;padding:0;font-size:11px;color:#557247;text-decoration:underline;cursor:pointer}.gallery-actions a{font-weight:600}.history .section-title{justify-content:space-between}.preview-card:target{scroll-margin-top:25px}.queue-counters span{white-space:nowrap}@media(max-width:1100px){.gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.gallery-toolbar{grid-template-columns:minmax(0,1fr) 130px}.gallery-selection .secondary{width:100%}.queue-card .pill{font-size:10px}.queue-counters{gap:14px}.gallery{gap:10px}.gallery-body{padding:9px}.gallery-actions{gap:10px}.draft-row img,.queue-row img{width:38px;height:38px}}
/* Manual ChatGPT → Photoshop reference examples. */
.workspace-tabs{flex-wrap:wrap}.protocol-progress-card{margin-bottom:20px}.protocol-progress-card>strong{font-size:16px;font-weight:600}.protocol-form>label,.protocol-notes>label{display:block;font-size:12px;font-weight:550;margin:14px 0 9px}.protocol-upload,.protocol-stages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.protocol-upload{margin-top:24px}.protocol-upload>div{min-width:0}.protocol-upload h3,.protocol-example h3{font-size:14px;font-weight:600;margin:0}.protocol-upload .hint{min-height:38px;margin:8px 0 12px}.protocol-upload .dropzone{min-height:210px}.protocol-upload .protocol-thumb{width:100%;height:100px;object-fit:contain}.protocol-upload .dropzone:has(.protocol-thumb:not([hidden])) .upload-icon{display:none}.protocol-form #protocol-prompt{min-height:115px}.protocol-notes{margin-top:15px}.protocol-notes textarea{min-height:90px}.protocol-saved{margin-top:32px}.protocol-example{margin-bottom:20px}.protocol-example>.preview-heading{align-items:flex-start;gap:16px}.protocol-stages .image-frame{aspect-ratio:1;min-height:180px}.protocol-stages figcaption{flex-wrap:wrap;gap:8px}.protocol-filename{font-size:11px;color:#718269;overflow-wrap:anywhere;margin:10px 0 0}.protocol-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.7;color:#526749}.protocol-reference{border-top:1px solid #e6ebe1;margin-top:20px;padding-top:16px}@media(max-width:900px){.protocol-upload,.protocol-stages{gap:12px}.protocol-stages .image-frame{min-height:120px}.protocol-upload .hint{min-height:55px}}@media(max-width:760px){.workspace-tabs{gap:0}.workspace-tabs button{padding:11px 10px}.protocol-upload,.protocol-stages{grid-template-columns:1fr;gap:20px}.protocol-upload .hint{min-height:0}.protocol-stages .image-frame{min-height:220px}.protocol-example>.preview-heading{flex-wrap:wrap}.protocol-saved>.preview-heading{gap:15px;align-items:flex-start}.protocol-upload .dropzone{min-height:180px}}

/* Isolate the generation comparison from the deterministic cleanup control. */
.protocol-verdict{padding:14px 16px;border-radius:9px;font-size:14px;font-weight:600}.protocol-verdict.match{background:#ecf4e6;color:#365929}.protocol-verdict.difference,.protocol-notice{background:#fff3e4;color:#805024}.protocol-notice{padding:14px;border-radius:9px;font-size:12px;line-height:1.7}.protocol-view-options{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0 16px}.protocol-view-options .active{background:#385930;color:white;border-color:#385930}.protocol-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.protocol-pair .image-frame{aspect-ratio:1;min-height:200px}.protocol-pair figcaption{flex-wrap:wrap;gap:8px}.protocol-image-actions{display:flex;flex-wrap:wrap;gap:16px;margin-top:12px}.protocol-image-actions a{font-size:11px}.protocol-measures{width:100%;border-collapse:collapse;font-size:12px;margin:16px 0}.protocol-measures th,.protocol-measures td{padding:9px;border-bottom:1px solid #e6ebe1;text-align:left;overflow-wrap:anywhere}.protocol-measures th{width:40%;font-weight:500}.protocol-reference .protocol-stages{margin-top:20px}@media(max-width:760px){.protocol-pair{grid-template-columns:1fr;gap:24px}.protocol-pair .image-frame{min-height:220px}.protocol-view-options .secondary{font-size:11px;padding:10px}.protocol-measures{table-layout:fixed}}

.protocol-prompt-trial{margin-top:22px}.protocol-prompt-trial h4{font-size:12px;font-weight:600;margin:18px 0 7px}.protocol-prompt-trial>.text-button{display:inline-block;margin-top:16px}.protocol-trial-stages .image-frame{display:flex;align-items:center;justify-content:center}.protocol-trial-stages .image-frame>.hint{padding:20px;text-align:center}.protocol-prompt-trial .protocol-view-options{margin-top:16px}

/* The standalone cleanup route shares the existing PNG treatment. */
.cleanup-layout{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(0,1.2fr);gap:24px;margin-top:24px}.cleanup-layout>div{min-width:0}.cleanup-upload{margin-top:24px}.install-steps{padding-left:22px;font-size:14px;line-height:1.7}.install-steps li{margin:12px 0}.install-steps code{overflow-wrap:anywhere;font-size:12px}.cleanup-device{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid var(--line,#e0e5db);font-size:13px}.cleanup-gallery .gallery-image>img{width:100%;height:100%;object-fit:contain;padding:14px}#cleanup-code{font:12px ui-monospace,monospace}#cleanup-workspace .analysis-intro{margin-top:28px}#cleanup-workspace .card{height:fit-content}.workspace-tabs{flex-wrap:wrap}@media(max-width:850px){.cleanup-layout{grid-template-columns:1fr}}

.clipboard-inspection{margin-top:24px}.clipboard-inspection>summary{font-weight:650;cursor:pointer}.clipboard-inspection-preview{padding:16px;border-radius:10px;background:repeating-conic-gradient(#33463b 0% 25%,#97a895 0% 50%) 50%/24px 24px}.clipboard-inspection-preview img{display:block;max-width:100%;max-height:300px;object-fit:contain;margin:auto}.clipboard-inspection-preview[hidden]{display:none}#clipboard-paste-target{resize:vertical;min-height:72px}
/* Faithful logo extraction and native-pixel inspection. */
label[for=extraction-mode]{display:block;font-size:12px;margin:16px 0 8px}.outline-option{display:flex;align-items:center;gap:9px;margin:17px 0;font-size:13px}.outline-option input{accent-color:#41653a;width:auto}.preview-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:16px}.preview-tools label{font-size:12px}.preview-tools select{width:auto}.preview-tools p{width:100%;margin:0}.image-frame.black{background:#000}.image-frame.gray{background:#808080}.image-frame.pixel-zoom{display:block;overflow:auto;max-height:600px}.image-frame.pixel-zoom img{position:static;max-width:none;max-height:none;width:auto;height:auto;object-fit:initial;margin:0}.image-frame.pixel-zoom.double-zoom img{zoom:2}#logo-diagnostic{overflow-wrap:anywhere}#logo-diagnostic ul{font-size:13px;line-height:1.8;padding-left:20px}#logo-diagnostic details{margin-top:18px}#logo-analysis-json{max-height:420px;overflow:auto}#logo-options details{margin:12px 0}#logo-options select{margin-top:8px}
#logo-options label[for=logo-instructions]{display:block;font-size:12px;font-weight:550;margin:16px 0 9px}#logo-instructions{min-height:145px;max-height:360px}#reset-logo-instructions{padding-top:7px}

.gallery-source-label{position:absolute;bottom:8px;left:8px;right:8px;padding:6px 8px;border-radius:5px;background:#fff;color:#384632;font-size:11px;font-weight:600;text-align:center;pointer-events:none;box-shadow:0 1px 4px #0002}
#output-empty{background:#fff;color:#425339;border-radius:8px;margin:8px}
.gallery-no-result{background:#fff7e9}.gallery-no-result>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:18px;color:#674718;text-align:center;cursor:pointer}.gallery-no-result strong{font-size:17px;line-height:1.35}.gallery-no-result span{font-size:12px}.gallery-no-result small{font-size:11px;text-decoration:underline}
.gallery-review-details{font-size:11px;color:#674718;line-height:1.6;margin-top:8px}.gallery-review-details summary{cursor:pointer}.gallery-review-details ul{padding-left:16px}.gallery-review-details li+li{margin-top:8px}

.logo-element-picker{margin-top:18px;padding:16px;border:1px solid #dae4d4;border-radius:12px;background:#f8faf5}.logo-element-picker h3{margin:0 0 8px;font-size:14px}.element-chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.element-chip{max-width:100%;display:flex;flex-direction:column;gap:4px;align-items:flex-start;text-align:left;border:1px solid #cdd8c6;border-radius:12px;padding:9px 12px;background:#fff;color:#52634b;cursor:pointer}.element-chip[aria-pressed=true]{background:#e4efdd;border-color:#648652;color:#26411a}.element-chip:focus-visible{outline:3px solid #8bab77;outline-offset:2px}.element-chip small{font-size:10px;line-height:1.5;opacity:.9}.element-chip-label{font-size:12px;font-weight:600;overflow-wrap:anywhere}#logo-element-target-row label{display:block;margin:16px 0 8px;font-size:12px}#logo-element-target{max-width:100%}#logo-element-warnings:empty,#logo-element-note:empty{display:none}#logo-element-warnings{padding-left:18px}#logo-elements-status{overflow-wrap:anywhere}.logo-element-picker .actions{flex-wrap:wrap}

/* Local edits retain the existing result outside the selected rectangle. */
#result-editor{width:min(1240px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 24px);overflow:auto;border:1px solid #d4ddcf;border-radius:14px;padding:20px;color:#30452a;background:#fff}#result-editor::backdrop{background:#13220bcc}#result-editor h2{font-size:20px;margin:0}#result-editor .preview-heading{gap:14px;margin-bottom:12px}.result-editor-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,1fr);gap:22px}.edit-preview-panel,.edit-instruction-panel{min-width:0}#result-editor label[for=result-edit-instruction]{display:block;font-size:13px;margin:0 0 9px}.edit-preview-tools{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:0 0 10px;font-size:12px}.edit-preview-tools select{width:auto;max-width:100%;padding:8px}.edit-preview-tools button{padding:7px 10px}#edit-pan[aria-pressed=true]{background:#e5efff;color:#245b9d}#edit-zoom-level{font-size:11px}.edit-canvas-scroll{height:clamp(220px,45dvh,620px);position:relative;overflow:hidden;background:#808080;border:1px solid #bcc8b5;border-radius:8px}.edit-canvas-scroll[data-background=white]{background:#fff}.edit-canvas-scroll[data-background=black]{background:#000}#edit-image{position:absolute;left:var(--polygon-image-left);top:var(--polygon-image-top);width:var(--polygon-image-width);height:var(--polygon-image-height);max-width:none;max-height:none;object-fit:fill}#edit-overlay{position:absolute;inset:0;width:100%;height:100%;touch-action:none;user-select:none;cursor:crosshair}#edit-overlay>*{pointer-events:none}#edit-overlay[data-pan-mode=true]{cursor:grab}#edit-overlay[data-panning=true]{cursor:grabbing}#edit-overlay:focus-visible{outline:2px solid #166bed;outline-offset:-3px}.edit-region-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}.edit-region-fields label{font-size:12px}.edit-region-fields input{margin-top:5px;min-width:0;width:100%}#result-edit-instruction{min-height:160px;max-height:35dvh}.edit-instruction-panel .primary{margin-top:18px;justify-content:center}#result-edit-diagnostic{overflow-wrap:anywhere}#result-edit-diagnostic details+details{margin-top:15px}@media(max-width:760px){#result-editor{padding:14px;width:calc(100vw - 16px)}.result-editor-layout{grid-template-columns:1fr;gap:18px}.edit-region-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.edit-canvas-scroll{height:34dvh;min-height:220px}#result-edit-instruction{min-height:100px}.edit-preview-tools{gap:6px}.edit-preview-tools button{padding:7px 8px}#edit-zoom-level{display:none}}


/* Full-resolution polygon extraction, drawn over the fitted PNG. */
#polygon-overlay{position:absolute;inset:0;width:100%;height:100%;cursor:crosshair;touch-action:none;user-select:none;overflow:hidden}#polygon-overlay:focus-visible{outline:2px solid #166bed;outline-offset:-3px}.polygon-line{fill:#3188ff26;stroke:#166bed;stroke-width:2;vector-effect:non-scaling-stroke;paint-order:stroke fill}.polygon-guide{stroke:#166bed;stroke-width:1.5;stroke-dasharray:5 4;vector-effect:non-scaling-stroke}.polygon-point,.polygon-first,.polygon-cursor{fill:#fff;stroke:#166bed;stroke-width:2;vector-effect:non-scaling-stroke}.polygon-first{fill:#166bed;stroke:#fff}.polygon-cursor{fill:#ffba00;stroke:#111}.polygon-tools{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.polygon-tools button{flex:1;padding:10px;font-size:12px}#job-preview[data-selecting=true] #output{inset:auto;left:var(--polygon-image-left);top:var(--polygon-image-top);width:var(--polygon-image-width);height:var(--polygon-image-height);max-width:none;max-height:none;object-fit:fill}#polygon-start[aria-pressed=true]{background:#e5efff;border-color:#9bbfe8;color:#245b9d}.polygon-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.polygon-actions button{padding:9px;font-size:11px}.polygon-keyboard{margin-top:12px}#polygon-status{color:#435c38;overflow-wrap:anywhere}@media(max-width:760px){#job-preview[data-selecting=true] .comparison{grid-template-columns:1fr}#job-preview[data-selecting=true] .comparison>figure:first-child{display:none}}

#polygon-overlay>*{pointer-events:none}.polygon-capture-shine{transform-box:fill-box;transform-origin:center}

/* Compact preparation and a single result dialog shared by every history item. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
body>header{height:56px}main{max-width:1600px;padding:0 28px}.intro{margin:18px 0 12px}.intro h1{font-size:25px;margin:0}.workspace-tabs{margin-bottom:16px}.workspace-tabs button{padding:10px 14px}.workspace{grid-template-columns:370px minmax(0,1fr);gap:20px}.controls,.results{gap:14px}.controls{position:sticky;top:16px}.workspace .card{padding:16px;border-radius:13px}.workspace .section-title{margin-bottom:12px}.composer-fields{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 2px 2px}.composer-fields select{padding:9px}.composer-fields>label[for=extraction-mode]{margin:10px 0 6px}#composer-card{display:flex;flex-direction:column;max-height:calc(100dvh - 88px)}#image-form{display:flex;flex-direction:column;min-height:0}.compact-upload{display:flex;align-items:center;gap:11px;padding:3px;border:1px dashed #cbd8c3;border-radius:10px;color:#6b7c60}.compact-upload.dragover{background:#edf4e7;border-color:#547745}.add-image{flex-shrink:0;width:32px;height:32px;border:1px solid #cbd8c3;border-radius:8px;background:#edf3e9;color:#35552b;font-size:27px;line-height:1}.compact-upload>span{font-size:11px}.composer-fields .draft-list{margin-top:6px;max-height:110px;overflow:auto;gap:0}.composer-fields .draft-list:empty{display:none}.composer-fields .draft-row{padding:5px 0}.composer-fields .draft-row img{width:32px;height:32px}.composer-fields .draft-row button{padding:6px}.composer-fields .logo-element-picker{margin-top:10px;padding:0;border:0;border-radius:0;background:none}#detect-logo-elements{width:100%;padding:9px;font-size:12px}.composer-fields .element-chips{margin:6px 0;gap:6px;max-height:125px;overflow:auto}.composer-fields .element-chips:empty,#logo-elements-status:empty{display:none}.composer-fields .element-chip{padding:6px 9px;border-radius:8px;display:block}.composer-fields .element-chip small{display:none}.composer-fields #logo-element-actions{gap:12px;margin:4px 0}.composer-fields #logo-options label[for=logo-instructions]{margin:10px 0 6px}.composer-fields #logo-instructions{min-height:68px;height:68px;padding:9px;font-size:12px;line-height:1.5}.composer-fields #reset-logo-instructions{font-size:10px;margin:4px 0 0;padding:2px 0}.composer-fields .outline-option{font-size:12px;margin:7px 0;gap:8px}.composer-fields #logo-options details{margin:8px 0}.composer-fields #logo-options summary{font-size:11px}.composer-fields #logo-element-target-row label{margin:8px 0 4px}.composer-submit{flex-shrink:0;padding-top:12px;border-top:1px solid #edf0e8;margin-top:10px;background:white}.composer-submit #submit{margin:0;padding:12px 8px;font-size:12px}.composer-submit .hint{margin-top:6px;font-size:10px}#api-connection .connection-status{margin-bottom:6px}#api-connection summary{font-size:11px}#api-connection .billing-note{margin-top:8px;padding-top:8px;font-size:10px}.queue-card .hint{margin-top:8px}
body:has(#job-dialog[open]),body:has(#result-editor[open]){overflow:hidden}
#job-dialog{width:min(1280px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 32px);padding:0;border:1px solid #d4ddcf;border-radius:16px;background:#f7f8f5;color:#203229;box-shadow:0 20px 80px #14241140;overflow:auto;overscroll-behavior:contain}#job-dialog::backdrop{background:#162119ad;backdrop-filter:blur(3px)}.job-dialog-header{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px;border-bottom:1px solid #e0e7db;background:#fff}.job-dialog-header h2{font-size:17px;overflow-wrap:anywhere}.job-dialog-header button{flex-shrink:0;padding:8px 12px}.job-dialog-header button span{font-size:19px;margin-left:9px}.job-dialog-body{padding:16px;display:grid;gap:14px}.job-dialog-body>section{min-width:0}#job-dialog-message{margin:12px 16px 0}.job-summary{margin-bottom:16px}.job-summary .hint{margin-top:6px}.job-summary .status{font-size:12px}.job-dialog-body .preview-heading{margin-bottom:12px}.job-dialog-body .preview-tools{gap:8px;margin-bottom:12px}.job-dialog-body .preview-tools button,.job-dialog-body .preview-tools select{padding:7px 10px;font-size:11px}.job-dialog-body .comparison{gap:16px}#job-dialog .image-frame{aspect-ratio:auto;height:clamp(220px,42dvh,470px);min-height:0;max-height:none}#job-dialog .image-frame.pixel-zoom{max-height:none}#job-dialog .result-footer{margin-top:14px;padding-top:14px}#job-dialog .result-actions{width:100%;align-items:center}#job-information{padding:0 2px}#job-information>summary{padding:6px 2px;font-size:13px;font-weight:600;cursor:pointer}#job-information>.card{margin-top:12px}#job-dialog .polygon-tools{margin-top:8px}#job-dialog .polygon-tools button{padding:9px}#job-dialog .protocol-text{max-height:340px;overflow:auto}
@media(max-width:1050px){.workspace{grid-template-columns:330px minmax(0,1fr)}main{padding:0 18px}}
@media(max-width:760px){body>header{height:52px;padding:0 18px}.intro{margin-top:14px}.intro h1{font-size:23px}.intro .environment{display:none}.workspace-tabs button{padding:9px 8px;font-size:11px}.workspace{display:flex}.controls{position:static;display:contents}.results{order:2}#composer-card{order:1;max-height:none;width:100%}#api-connection{order:3;margin-bottom:20px}.composer-fields{overflow:visible}.composer-submit{position:sticky;bottom:0;z-index:2;padding-bottom:8px}.workspace .card{padding:14px}.job-dialog-body{padding:10px;gap:10px}#job-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:12px}.job-dialog-header{padding:10px 14px}.job-dialog-header h2{font-size:15px}.job-dialog-header button{font-size:11px}.job-dialog-body .comparison{grid-template-columns:1fr;gap:14px}#job-dialog .image-frame{height:clamp(190px,33dvh,330px)}#job-dialog .result-actions>*{flex:auto}#job-dialog .preview-heading{gap:12px;flex-wrap:wrap}.job-dialog-body .preview-tools label{font-size:11px}}
/* Reserve the first screen for preparation, including the selected groups. */
body:has(#workspace:not([hidden])) .intro{display:none}#logo-recent-inventories>summary{font-size:12px;cursor:pointer}#logo-recent-inventories label{display:block;font-size:12px;margin:12px 0 6px}#logo-recent-inventories .actions{margin-top:10px}
@media(max-width:760px){#composer-card{max-height:none}#logo-recent-inventories{order:3}#api-connection{order:4}}

/* Navigation shares the brand row, with horizontal scrolling on small screens. */
body>header{gap:24px;padding:0 28px}.brand{flex-shrink:0}main{padding-top:16px}header #workspace-tabs{flex:1;min-width:0;align-self:stretch;align-items:stretch;justify-content:flex-end;flex-wrap:nowrap;gap:4px;margin:0;border:0;overflow-x:auto;scrollbar-width:thin}header #workspace-tabs button{flex-shrink:0;white-space:nowrap;padding:0 14px;font-size:12px}header #workspace-tabs button:focus-visible{outline:2px solid #547745;outline-offset:-4px}
@media(max-width:1050px){body>header{padding:0 18px;gap:20px}header .brand-divider,header .brand-name{display:none}header #workspace-tabs{justify-content:flex-start}header #workspace-tabs button{padding:0 12px}}
@media(max-width:760px){body>header{gap:14px}header .brand{font-size:22px}header #workspace-tabs{gap:0}header #workspace-tabs button{padding:0 10px;font-size:11px}main{padding-top:14px}}

#job-preview[data-selecting=true] #result-frame{overflow:hidden}#polygon-overlay[data-panning=true]{cursor:grabbing}.polygon-view-tools{display:flex;gap:8px;align-items:center;margin-top:10px}.polygon-view-tools button{padding:5px 10px;font-size:12px}.polygon-view-tools output{font-size:12px;min-width:52px;text-align:center}#logo-priority-settings summary{font-size:12px;cursor:pointer}#logo-priority-badge{color:#547745}#logo-priority-settings textarea{margin-top:7px}

/* Direct clipboard actions in history: native PNG and plain logo name. */
.gallery-title{display:flex;align-items:center;gap:6px;min-width:0}.gallery-title strong{flex:1;min-width:0}.gallery-body .history-copy-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:30px;height:30px;padding:6px;border:1px solid #dbe4d5;border-radius:7px;background:#f7faf4;color:#557247;text-decoration:none;cursor:pointer}.gallery-title .history-copy-button{width:28px;height:28px;padding:5px}.history-copy-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.history-copy-button:hover{background:#e9f1e2}.history-copy-button:focus-visible{outline:2px solid #41653a;outline-offset:2px}.history-copy-button:disabled{opacity:.5;cursor:wait}.history-copy-button[data-copy-state=copied]{color:#2d722e;background:#e8f5e6;border-color:#a8caa1}.history-copy-button[data-copy-state=copying]{animation:history-copy-pulse 1s ease-in-out infinite}.gallery-actions{align-items:center}.gallery-body .history-copy-status{color:#41653a;white-space:normal;overflow-wrap:anywhere}.gallery-body .history-copy-status.error-text{color:#a35533}@media(pointer:coarse){.gallery-body .history-copy-button{width:36px;height:36px;padding:8px}}@media(prefers-reduced-motion:reduce){.history-copy-button[data-copy-state=copying]{animation:none}}

@keyframes history-copy-pulse{50%{opacity:.25}}

.gallery-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px}.gallery-pagination[hidden]{display:none}#quota-form{display:grid;gap:10px;margin-top:12px}#quota-form input{width:100%}#quota-usage{font-weight:600;font-size:13px}

/* Optional prompt help keeps the current instruction intact until Apply. */
#prompt-assistant{width:min(680px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:22px;border:1px solid #d4ddcf;border-radius:16px;background:#f7f8f5;color:#203229;overflow:auto;overscroll-behavior:contain}#prompt-assistant::backdrop{background:#162119ad;backdrop-filter:blur(3px)}body:has(#prompt-assistant[open]){overflow:hidden}#prompt-assistant .preview-heading{gap:16px}#prompt-assistant h2{font-size:20px}#prompt-assistant label{display:block;margin:16px 0 8px;font-size:13px;font-weight:600}#prompt-assistant textarea{width:100%;resize:vertical;min-height:80px}#prompt-assistant button{margin-top:10px}#prompt-assistant p{line-height:1.65;overflow-wrap:anywhere;margin:12px 0}.prompt-assist-source{display:flex;align-items:center;gap:14px;margin-top:18px}.prompt-assist-source img{width:88px;height:88px;object-fit:contain;flex-shrink:0;background:#d4d9d0;border-radius:8px}.prompt-assist-source strong{overflow-wrap:anywhere}#prompt-assist-question-box{padding:12px;background:#e9efe3;border-radius:8px}#prompt-assist-choices{gap:8px}#prompt-assist-choices button{white-space:normal;text-align:left}#prompt-assist-proposal{min-height:200px}#result-edit-assist{margin-top:10px}@media(max-width:600px){#prompt-assistant{padding:16px}.prompt-assist-source{align-items:flex-start}#prompt-assist-apply{width:100%}}

.result-warning{padding:12px 14px;border:1px solid #d5a13b;border-radius:10px;background:#fff5dc;color:#704600;font-size:13px;line-height:1.55;overflow-wrap:anywhere}.gallery-body .result-warning{margin:8px 0;font-size:12px}

label[for=image-model],label[for=result-edit-model]{display:block;font-size:12px;font-weight:550;margin:14px 0 8px}.model-preference-status{font-size:11px;margin:6px 0 12px}
.svg-option{margin:14px 0;padding:12px;border:1px solid var(--border,#ddd);border-radius:8px}.svg-option label{display:flex;align-items:center;gap:8px;font-size:13px}.svg-option input{width:auto;margin:0}.svg-option .hint{margin:8px 0 0;font-size:11px}.svg-result{margin:16px 0;padding:14px;border:1px solid var(--border,#ddd);border-radius:8px}.svg-result>p{margin:0 0 10px}.svg-frame{height:auto;min-height:160px;max-height:480px;overflow:auto;margin:10px 0}.svg-frame img{display:block;max-width:100%;max-height:460px;margin:auto}.svg-gallery-status{margin-top:6px}
