/* Batch creation workspace: reuses the site theme, control hierarchy and text scale. */
.batch-workspace{max-width:1020px;margin:0 auto;padding:34px 0 20px;min-height:70vh}
.batch-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:22px;margin-bottom:22px}
.batch-heading h1{font-size:calc(26px * var(--ui-text-scale, 1));line-height:1.45;font-weight:600;margin:10px 0;overflow-wrap:anywhere}
.batch-heading h1 .draft-badge{vertical-align:middle}
.batch-heading p{font-size:calc(12px * var(--ui-text-scale, 1));color:var(--ui-muted, #62675d);margin:0;overflow-wrap:anywhere}
.batch-heading>.text-button,.batch-heading .text-button{flex-shrink:0}
.batch-panel{border:1px solid var(--line);border-radius:16px;background:var(--ui-surface);padding:24px;min-width:0}
.batch-form-fields{border:0;padding:0;margin:0;min-width:0}
.batch-form-fields[disabled]{border:0;padding:0;margin:0}
.batch-panel .form-grid{margin:0}
.batch-asset-row{display:flex;gap:8px;align-items:stretch;min-width:0}
.batch-asset-row select{flex:1;min-width:0}
.batch-form-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:18px}
.batch-total-hint{font-size:calc(12px * var(--ui-text-scale, 1));color:var(--ui-muted, #62675d);min-width:0;overflow-wrap:anywhere}
.batch-total-hint.over{color:#8b4141;font-weight:500}
.batch-foot-note{margin-top:14px}
.batch-actions-bar{display:flex;justify-content:flex-start;margin:0 0 18px}
.batch-empty,.batch-empty-list{border:1px dashed var(--ui-line);border-radius:16px;text-align:center;padding:70px 20px;background:var(--ui-surface);color:var(--ui-muted, #62675d)}
.batch-empty h1{font-size:calc(26px * var(--ui-text-scale, 1));margin:10px 0}
.batch-empty .inline-notice{text-align:left;max-width:520px;margin:18px auto 0}
.batch-empty-list p{font-size:calc(13px * var(--ui-text-scale, 1));line-height:1.9}
.batch-empty-list .inline-notice{text-align:left;max-width:520px;margin:16px auto 0}
.batch-rows{display:grid;gap:10px}
.batch-row{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--line);border-radius:12px;background:var(--ui-surface);padding:14px 18px;min-width:0}
.batch-row>div{min-width:0}
.batch-row strong{font-size:calc(14px * var(--ui-text-scale, 1));font-weight:500;display:block;overflow-wrap:anywhere}
.batch-row small{font-size:calc(11px * var(--ui-text-scale, 1));color:var(--ui-muted, #62675d);display:block;margin-top:4px;overflow-wrap:anywhere}
.batch-row .secondary-button{flex-shrink:0}
.batch-id-note{font-size:calc(11px * var(--ui-text-scale, 1));color:var(--ui-muted, #62675d);overflow-wrap:anywhere;margin:16px 2px 0}
.batch-loading{display:flex;align-items:center;gap:9px}
.batch-spinner{width:15px;height:15px;flex:0 0 15px;border-radius:50%;border:2px solid #ddd5f0;border-top-color:#8066bd;animation:task-spin 1.2s linear infinite}
/* Plan editor cards */
.batch-item-card{border:1px solid var(--line);border-radius:14px;background:var(--ui-surface);padding:18px;margin:0 0 14px;min-width:0}
.batch-item-head{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:14px;min-width:0}
.batch-kind{flex-shrink:0;font-size:calc(11px * var(--ui-text-scale, 1));background:#f0ecf7;color:#6e6086;border-radius:5px;padding:4px 7px}
.batch-purpose{flex:1;min-width:180px;display:block}
.batch-purpose>span{display:block;font-size:calc(12px * var(--ui-text-scale, 1));color:var(--ui-muted, #62675d);margin-bottom:6px}
.batch-purpose input{width:100%;max-width:100%;min-width:0;border:1px solid var(--ui-line);border-radius:9px;background:var(--ui-surface);color:var(--ui-ink);font-size:calc(13px * var(--ui-text-scale, 1));padding:8px 11px}
.batch-purpose input:focus{border-color:var(--ui-control-line)}
.batch-item-head>.text-button{flex-shrink:0;margin-bottom:2px}
.batch-editor-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:22px 0 30px}
.batch-editor-primary{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
/* Batch detail */
.batch-status-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px;min-width:0}
.batch-chip{display:inline-flex;align-items:center;gap:6px;font-size:calc(12px * var(--ui-text-scale, 1));color:var(--ui-muted);background:var(--ui-soft);border-radius:7px;padding:6px 10px;min-width:0}
.batch-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:0 0 16px;min-width:0}
.batch-controls .secondary-button{font-size:calc(12px * var(--ui-text-scale, 1));padding:8px 11px;min-height:34px}
.batch-controls .text-button{font-size:calc(12px * var(--ui-text-scale, 1))}
.batch-counts{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 18px;min-width:0}
.batch-count-chip{font-size:calc(11px * var(--ui-text-scale, 1));color:var(--ui-muted, #62675d);border:1px solid var(--ui-line);border-radius:6px;padding:4px 8px;background:var(--ui-surface)}
.batch-count-chip.warn{color:#8b4141;border-color:#e1c9c9;background:#fcf8f8}
.batch-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.batch-items>.inline-notice{grid-column:1/-1}
.batch-item{border:1px solid var(--line);border-radius:14px;background:var(--ui-surface);padding:18px;min-width:0;overflow-wrap:anywhere}
.batch-item .batch-item-head{margin-bottom:10px}
.batch-item .batch-purpose-text{flex:1;min-width:0;font-size:calc(14px * var(--ui-text-scale, 1));font-weight:500;overflow-wrap:anywhere}
.batch-item-status{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;font-size:calc(12px * var(--ui-text-scale, 1));color:var(--ui-muted)}
.batch-item-copy{font-size:calc(12px * var(--ui-text-scale, 1));line-height:1.8;color:var(--ui-muted, #62675d);margin:2px 0}
.batch-item-notice{font-size:calc(12px * var(--ui-text-scale, 1));line-height:1.8;color:#8b4141;background:#fcf8f8;border-radius:8px;padding:8px 10px;margin:10px 0 0}
.batch-media{margin-top:12px}
.batch-media:empty{display:none}
.batch-media video,.batch-media img{display:block;width:100%;max-height:300px;object-fit:contain;background:#f4f4f4;border-radius:10px}
.batch-downloads{margin-top:10px}
.batch-prompt-details{margin-top:10px;font-size:calc(11px * var(--ui-text-scale, 1));color:var(--ui-muted, #62675d)}
.batch-prompt-details summary{cursor:pointer;user-select:none}
.batch-prompt-details .task-prompt{max-height:240px}
.batch-conversation-label{display:block;margin:14px 0}
.batch-conversation-label>span{display:block;font-size:calc(12px * var(--ui-text-scale, 1));color:var(--ui-muted, #62675d);margin-bottom:7px}
.batch-conversation-label select{width:100%;max-width:100%;min-width:0;min-height:39px;border:1px solid var(--ui-line);border-radius:9px;padding:9px 11px;background:var(--ui-surface);color:var(--ui-ink);font-size:calc(13px * var(--ui-text-scale, 1))}
@media(prefers-reduced-motion:reduce){.batch-spinner{animation:none}}
@media(max-width:760px){
  .batch-workspace{padding-top:20px}
  .batch-heading{align-items:flex-start;flex-direction:column;gap:12px;margin-bottom:16px}
  .batch-heading h1{font-size:calc(22px * var(--ui-text-scale, 1))}
  .batch-panel{padding:16px;border-radius:13px}
  .batch-items{grid-template-columns:1fr}
  .batch-row{padding:12px 14px}
  .batch-form-actions{align-items:stretch;flex-direction:column}
  .batch-form-actions .primary-button{width:100%}
  .batch-editor-actions{align-items:stretch;flex-direction:column-reverse}
  .batch-editor-primary{flex-direction:column;align-items:stretch}
  .batch-editor-primary button{width:100%}
  .batch-controls{gap:7px}
}

#batchImageMode{display:flex;gap:6px;margin-top:7px;flex-wrap:wrap}
#batchImageMode button{padding:9px 16px;border:1px solid #dcdcd8;border-radius:6px;background:#fff;color:#42433e}
#batchImageMode [aria-pressed=true]{background:#242620;color:white;border-color:#242620}
.batch-params{display:flex;gap:clamp(10px,3vw,32px);align-items:start}.batch-params>label,.batch-params>div{flex:1;min-width:0}.batch-params select{width:100%}.batch-params [hidden]{display:none}
.batch-panel .batch-form-actions{justify-content:flex-end;align-items:center;gap:8px;border-top:1px solid #dededb;padding-top:12px}
.batch-panel .batch-params{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-right:auto}
.batch-panel .batch-params>label,.batch-panel .batch-params>div{flex:none;display:inline-flex;align-items:center;gap:4px}
.batch-panel .batch-params select{width:auto}
.batch-panel .batch-params [hidden],.batch-params.per-image>.image-reference-trigger,#batchReferenceAnchor,#batchImageIdeas:empty{display:none}
@media(max-width:680px){.batch-panel .batch-form-actions{flex-direction:row}.batch-panel .batch-params{width:100%}.batch-panel .batch-form-actions .primary-button{width:auto}}

#batchImageIdeas .batch-image-card{display:grid;justify-items:start;gap:8px;border:1px solid #ddd;border-radius:10px;padding:14px;margin-bottom:10px}
#batchImageIdeas .batch-image-card label{display:flex;align-items:center;gap:10px;font-weight:600}
.batch-image-card [data-enlarge] img{width:56px;height:56px;object-fit:contain}
#batchImageIdeas .batch-image-card textarea,#batchImageIdeas .image-reference-editor{width:100%;min-height:76px;box-sizing:border-box;padding:10px;border:1px solid #ccc;border-radius:6px}

.batch-image-card strong{font-size:18px}.batch-image-card [data-enlarge]{display:inline-flex;align-items:center;gap:8px;cursor:zoom-in;padding:4px 8px;border:1px solid #ddd;border-radius:6px;background:white}
