/* White background studio: reuse the workbench's existing surface and interaction tokens. */
#app .white-background{min-width:0;color:var(--text)}
#app .white-background .card{padding:var(--s-5,20px);margin-bottom:var(--s-5,20px);min-width:0}
#app .white-background h2{font-size:var(--fs-lg);margin:0;font-weight:var(--fw-semibold)}
#app .white-background p{line-height:1.6}
#app .white-background .wb-settings-top,#app .white-background .wb-section-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}
#app .white-background .wb-settings-top p,#app .white-background .wb-section-head p{margin:6px 0 0;color:var(--text-3);font-size:var(--fs-sm)}
#app .white-background .wb-fields{display:grid;grid-template-columns:minmax(220px,2fr) minmax(150px,1fr) minmax(180px,1fr);gap:20px;align-items:end}
#app .white-background .wb-fields label{display:grid;gap:8px;color:var(--text-2);font-size:var(--fs-sm)}
#app .white-background select{min-width:0;width:100%;max-width:100%;min-height:40px}
#app .white-background .wb-field-note,#app .white-background .wb-footnote{font-size:var(--fs-sm);color:var(--text-3);line-height:1.6}
#app .white-background .wb-footnote{margin:14px 0 0}
#app .white-background .wb-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:20px;min-width:0}
#app .white-background .wb-image{position:relative;min-width:0;align-self:start}
#app .white-background .wb-picture{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;background:var(--surface);padding:0;box-shadow:none;transition:transform var(--dur-2) var(--ease-out),box-shadow var(--dur-2) var(--ease-out)}
#app .white-background .wb-picture img{width:100%;height:100%;object-fit:contain;display:block}
#app .white-background .wb-image:hover .wb-picture{transform:translateY(-2px) rotate(.2deg);box-shadow:var(--shadow-lift)}
#app .white-background .wb-card-actions{display:flex;gap:4px;position:absolute;top:0;left:0;right:0;aspect-ratio:1;align-items:end;justify-content:center;padding:10px;pointer-events:none;opacity:0;transition:opacity var(--dur-hover) var(--ease-out)}
#app .white-background .wb-card-actions button,#app .white-background .wb-card-actions a{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:6px 12px;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:var(--r-sm);font-size:var(--fs-md);text-decoration:none;white-space:nowrap;box-shadow:var(--shadow-2)}
#app .white-background .wb-card-actions :is(button,a):hover{background:var(--surface-hover)}
#app .white-background .wb-image:hover .wb-card-actions,#app .white-background .wb-image:has(:focus-visible):not(:root[data-ui-input="pointer"] *) .wb-card-actions{opacity:1}
#app .white-background .wb-caption{display:flex;justify-content:space-between;align-items:start;gap:8px;margin:10px 0 0;font-size:var(--fs-sm)}
#app .white-background .wb-caption strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--fw-medium)}
#app .white-background .wb-caption span{color:var(--text-3);flex-shrink:0;font-size:var(--fs-xs)}
#app .white-background .wb-check{font-size:var(--fs-xs);color:var(--text-3);margin:6px 0 0}
#app .white-background .wb-upload-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;aspect-ratio:1;border:1px dashed var(--border-strong);border-radius:var(--r-lg);color:var(--text-2);background:var(--surface-2);padding:20px;transition:background var(--dur-hover) var(--ease-out)}
#app .white-background .wb-upload-tile>span{font-size:32px;font-weight:400}
#app .white-background .wb-upload-tile small{color:var(--text-3)}
#app .white-background .wb-upload-tile:hover{background:var(--surface-hover)}
#app .white-background .wb-results-layout{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:20px;align-items:start}
#app .white-background .wb-history-item{display:grid;gap:6px;width:100%;padding:14px 12px;text-align:left;background:transparent;border:1px solid transparent;border-radius:var(--r-md);margin:4px 0;box-shadow:none}
#app .white-background .wb-history-item span{font-size:var(--fs-sm);color:var(--text-3)}
#app .white-background .wb-history-item:hover{background:var(--surface-hover)}
#app .white-background .wb-history-item.is-selected{background:var(--surface-selected);border-color:var(--border-strong)}
#app .white-background .wb-history{max-height:620px;overflow:auto}
#app .white-background .wb-history .wb-section-head{gap:8px}
#app .white-background .wb-history .wb-section-head button{padding:4px 8px}
#app .white-background .wb-empty{text-align:center;padding:54px 20px;color:var(--text-3)}
#app .white-background .wb-empty>span{font-size:36px;display:block;margin-bottom:16px}
#app .white-background .wb-empty h3{margin:0;color:var(--text-2)}
#app .white-background .wb-alert,#app .white-background .wb-error{padding:12px;border:1px solid var(--border-strong);background:var(--surface-2);border-radius:var(--r-md);color:var(--text);font-size:var(--fs-sm);overflow-wrap:anywhere;white-space:pre-line;margin:12px 0}
#app .white-background .wb-review-note{border-top:1px solid var(--divider);margin-top:20px;padding-top:14px;font-size:var(--fs-sm);color:var(--text-3);line-height:1.6}
#app .white-background .wb-placeholder{color:var(--text-3);background:var(--surface-2)}
#app .white-background .wb-placeholder>span{display:flex;align-items:center;gap:10px;font-size:var(--fs-sm)}
#app .white-background .wb-spinner{width:18px;height:18px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:wb-spin 1s linear infinite}
@keyframes wb-spin{to{transform:rotate(360deg)}}
@media(hover:none){#app .white-background .wb-card-actions{opacity:1}}
@media(max-width:1100px){#app .white-background .wb-results-layout{grid-template-columns:1fr}#app .white-background .wb-history{max-height:260px}#app .white-background .wb-fields{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}#app .white-background .wb-field-note{grid-column:1/-1}}
@media(max-width:600px){#app .white-background .card{padding:16px}#app .white-background .wb-fields{grid-template-columns:1fr;gap:14px}#app .white-background .wb-section-head,#app .white-background .wb-settings-top{align-items:start;flex-wrap:wrap}#app .white-background .wb-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#app .white-background .wb-caption{display:block}#app .white-background .wb-caption strong{display:block}#app .white-background .wb-card-actions{padding:4px;gap:2px}#app .white-background .wb-card-actions :is(button,a){font-size:var(--fs-sm);padding:4px 6px;min-height:36px}#app .white-background .wb-upload-tile{padding:12px;gap:6px}#app .white-background .wb-upload-tile small{font-size:var(--fs-xs)}}
@media(prefers-reduced-motion:reduce){#app .white-background *,#app .white-background *::before{animation:none!important;transition:none!important;transform:none!important}}

:root[data-motion="reduce"] #app .white-background *{animation:none!important;transition:none!important;transform:none!important}
/* File intake: the whole white-background page receives Finder file drops. */
#app .white-background .wb-upload.wb-drag-over{outline:2px solid var(--accent);outline-offset:2px;background:var(--accent-soft)}
#app .white-background .wb-upload-status{margin:12px 0 0;color:var(--text-2);font-size:var(--fs-sm);line-height:var(--lh)}
#app .white-background .wb-upload-status>p{margin:0 0 8px}
#app .white-background .wb-upload-failure{display:flex;align-items:center;flex-wrap:wrap;gap:8px;border-top:1px solid var(--border);padding:10px 0;overflow-wrap:anywhere}
#app .white-background .wb-upload-failure>span{flex:1 1 240px;color:var(--danger)}
#app .white-background .wb-upload-failure button{flex-shrink:0;min-height:40px}
#app .white-background .wb-retry-note{display:block;max-width:280px;font-size:var(--fs-xs);color:var(--text-3);line-height:var(--lh)}
#app .white-background .wb-placeholder{position:relative}
#app .white-background .wb-source-in-task{display:block;width:100%;height:100%;padding:0;border:0;box-shadow:none;background:var(--surface)}
#app .white-background .wb-source-in-task img{width:100%;height:100%;object-fit:contain}
#app .white-background .wb-task-status{position:absolute;left:8px;right:8px;top:8px;display:flex;align-items:center;justify-content:center;gap:8px;padding:6px 8px;border:1px solid var(--border);background:var(--surface);border-radius:var(--r-sm);pointer-events:none}
/* Product source and destination use the existing dialog, form and image tokens. */
#app .white-background .wb-source-actions{display:flex;flex-wrap:wrap;gap:8px}
#app .white-background .wb-card-actions{flex-wrap:wrap;align-content:end}
.wb-product-dialog{width:min(840px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:0;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-3);overflow:auto}
.wb-product-dialog .modalhead{position:sticky;top:0;z-index:1;background:var(--surface)}
.wb-product-dialog .modalbody{padding:var(--s-5,20px)}
.wb-product-dialog h2{font-size:var(--fs-lg);margin:0}
.wb-product-dialog .wb-product-help{color:var(--text-3);font-size:var(--fs-sm);line-height:1.6;margin:0 0 16px}
.wb-product-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}
.wb-product-fields label{display:grid;gap:8px;color:var(--text-2);font-size:var(--fs-sm);min-width:0}
.wb-product-fields :is(input,select){width:100%;min-width:0;min-height:44px}
.wb-product-materials{min-height:120px;margin:20px 0}
.wb-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px}
.wb-product-image{position:relative;min-width:0}
.wb-product-image label{display:grid;gap:8px;cursor:pointer;min-width:0}
.wb-product-image img{width:100%;aspect-ratio:1;object-fit:contain;border:1px solid var(--border);border-radius:var(--r-md);background:var(--surface-2);transition:border-color var(--dur-hover) var(--ease-out)}
.wb-product-image label:hover img,.wb-product-image label:has(input:checked) img{border-color:var(--accent)}
.wb-product-image input{position:absolute;top:8px;left:8px;width:20px;height:20px;z-index:1}
.wb-product-image input:focus-visible+img{outline:3px solid var(--accent-ring);outline-offset:2px}
.wb-product-image label>span{overflow-wrap:anywhere;font-size:var(--fs-sm);color:var(--text-2)}
.wb-product-image button{min-height:44px;margin-top:8px}
.wb-product-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;border-top:1px solid var(--divider);padding-top:16px}
.wb-product-footer button{min-height:44px}
.wb-product-footer>span{color:var(--text-3);font-size:var(--fs-sm)}
.wb-product-error{color:var(--danger);font-size:var(--fs-sm);line-height:1.6;white-space:pre-line;overflow-wrap:anywhere}
.registration-material-drop{display:flex;flex-direction:column;align-items:center;gap:12px;padding:24px 16px;border:1px dashed var(--border-strong);border-radius:var(--r-md);background:var(--surface-2);color:var(--text-2);cursor:pointer;transition:background var(--dur-hover) var(--ease-out),border-color var(--dur-hover) var(--ease-out)}
.registration-material-drop>span{color:var(--text-3);font-size:var(--fs-sm)}
.registration-material-drop input{max-width:100%;min-width:0;min-height:44px}
.registration-material-drop:hover,.registration-material-drop:focus-within,.drag-over>.registration-material-drop{border-color:var(--accent);background:var(--accent-soft)}
@media(max-width:600px){.wb-product-fields{grid-template-columns:1fr}.wb-product-dialog .modalbody{padding:16px}.wb-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
@media(prefers-reduced-motion:reduce){.wb-product-dialog *,.registration-material-drop{animation:none!important;transition:none!important}}

/* White-background production shares the image studio's DS-2 layout and controls. */
html body #app#app#app#app .white-background{max-width:none;}
html body #app#app#app#app .white-background .wb-workspace{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);align-items:start;gap:var(--s-5);margin-bottom:var(--s-5);}
html body #app#app#app#app .white-background .wb-workspace>.card{min-width:0;margin:0;padding:var(--s-5);border:1px solid var(--border);border-radius:var(--r-lg);background:var(--surface);box-shadow:var(--shadow-1);}
html body #app#app#app#app .white-background .wb-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s-4);}
html body #app#app#app#app .white-background .wb-settings-top{display:flex;align-items:start;flex-direction:column;gap:var(--s-2);padding-bottom:var(--s-4);margin-bottom:var(--s-4);border-bottom:1px solid var(--divider);}
html body #app#app#app#app .white-background h2{display:flex;align-items:center;gap:var(--s-2);font-size:var(--fs-lg);font-weight:var(--fw-semibold);}
html body #app#app#app#app .white-background .wb-step{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:var(--control-h-sm);height:var(--control-h-sm);border-radius:var(--r-sm);background:var(--accent-soft);color:var(--accent-text);font-size:var(--fs-xs);font-weight:var(--fw-semibold);}
html body #app#app#app#app .white-background .wb-section-head{align-items:start;flex-wrap:wrap;gap:var(--s-3);margin-bottom:var(--s-4);}
html body #app#app#app#app .white-background .wb-source-actions{align-items:center;flex-wrap:wrap;gap:var(--s-2);}
html body #app#app#app#app .white-background .wb-gallery{grid-template-columns:repeat(auto-fill,minmax(min(180px,100%),1fr));gap:var(--s-4);}
html body #app#app#app#app .white-background .wb-upload-tile{min-height:180px;aspect-ratio:1;background:var(--surface-2);border-radius:var(--r-md);}
html body #app#app#app#app .white-background .wb-field-note{padding:var(--s-3);border:1px solid var(--border);border-radius:var(--r-md);background:var(--surface-2);color:var(--text-2);}
html body #app#app#app#app .white-background .wb-results-layout{grid-template-columns:minmax(0,1fr) minmax(220px,280px);gap:var(--s-5);}
html body #app#app#app#app .white-background .wb-results{min-width:0;padding:var(--s-5);}
html body #app#app#app#app .white-background .wb-history{min-width:0;padding:var(--s-4);max-height:620px;}
html body #app#app#app#app .white-background .wb-card-actions{gap:var(--s-1);padding:var(--s-2);}
html body #app#app#app#app .white-background .wb-card-actions :is(button,a){min-height:30px;padding:var(--s-1) var(--s-2);font-size:var(--fs-sm);box-shadow:var(--shadow-1);}
html body #app#app#app#app .white-background .wb-card-actions :is(button,a){pointer-events:none;}
html body #app#app#app#app .white-background .wb-image:is(:hover,:has(:focus-visible):not(:root[data-ui-input=pointer] *)) .wb-card-actions :is(button,a){pointer-events:auto;}
@media(max-width:1100px){html body #app#app#app#app .white-background .wb-workspace{grid-template-columns:minmax(0,1fr) minmax(240px,1fr);}html body #app#app#app#app .white-background .wb-results-layout{grid-template-columns:minmax(0,1fr);}html body #app#app#app#app .white-background .wb-history{max-height:280px;}}
@media(max-width:760px){html body #app#app#app#app .white-background .wb-workspace{display:flex;flex-direction:column;}html body #app#app#app#app .white-background .wb-workspace>.card{width:100%;padding:var(--s-4);}html body #app#app#app#app .white-background .wb-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s-3);}html body #app#app#app#app .white-background .wb-upload-tile{min-height:0;}html body #app#app#app#app .white-background .wb-results{padding:var(--s-4);}}
@media(hover:none){html body #app#app#app#app .white-background .wb-card-actions :is(button,a){pointer-events:auto;min-height:44px;}}
