/* Composition : même organisation que l'espace Éléments — trois cartes sous la barre du haut (liste des objets, scène
   avec sa barre et sa pastille d'outils, inspecteur à onglets), avec les composants de l'éditeur (.field, .switch-row,
   .segments, .btn, .section-label, .inspector-tabs, .scene-popover). Les conteneurs gardent leurs propres classes :
   des scripts ciblent .sidebar et .canvas-area d'Éléments, et des règles d'affichage réduit les masquent. */
#setup-dialog{--setup-side:252px;width:min(1500px,calc(100vw - 32px));height:min(900px,calc(100dvh - 32px));max-width:none;max-height:none;padding:0;border:0;background:transparent;color:var(--ink);box-shadow:none;overflow:visible}
#setup-dialog::backdrop{background:oklch(.21 .02 268 / .45);backdrop-filter:blur(4px)}
#setup-dialog.as-space{background:transparent;border:0;overflow:visible}
.setup-shell{position:relative;display:flex;gap:8px;height:100%;min-height:0}
.setup-sidebar{width:var(--setup-side);flex-shrink:0;display:flex;flex-direction:column;gap:6px;padding:20px 14px 14px;background:var(--panel);border:1px solid var(--line);border-radius:var(--r-lg);overflow:auto;scrollbar-width:thin}
.setup-sidebar>.note{margin:2px 0 6px}
.setup-sidebar .setup-show-hidden{margin:auto 0 0;padding-top:12px;border-top:1px solid var(--line)}
.setup-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.setup-toolbar{height:64px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:0 14px 0 20px;background:var(--panel);border:1px solid var(--line);border-radius:var(--r-lg)}
.setup-heading{min-width:0}.setup-toolbar h2{font-size:20px;font-weight:600;letter-spacing:-.02em;margin:2px 0 0}.setup-toolbar .eyebrow{font-size:10px;letter-spacing:.08em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.setup-toolbar .element-actions{align-items:center}
#setup-status{max-width:220px;margin-right:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;color:var(--muted)}
.setup-stage{position:relative;flex:1;min-width:0;min-height:0;overflow:hidden;background:var(--stage);border:1px solid var(--line);border-radius:var(--r-lg)}
#setup-canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}#setup-canvas:active{cursor:grabbing}
#setup-empty{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(300px,80%);padding:18px;text-align:center;font-size:18px;font-weight:600;letter-spacing:-.02em;color:var(--ink-2);pointer-events:none;background:oklch(1 0 0 / 0.85);border-radius:16px}
.setup-inspector{width:296px;flex-shrink:0;padding:20px 20px 15px;background:var(--panel);border:1px solid var(--line);border-radius:var(--r-lg);overflow:auto;scrollbar-width:thin}
.setup-inspector select,#setup-capture-popover select,#setup-image-quality{width:100%;padding:8px 10px;border:1px solid var(--line-strong);border-radius:10px;background:#fff;color:var(--ink);font-size:12px}
.setup-inspector input[type=color]{display:block;width:100%;height:34px;padding:2px;border:1px solid var(--line-strong);border-radius:10px;background:#fff;cursor:pointer}
.setup-inspector .segments{margin:4px 0 12px}.setup-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-radius:14px}.setup-presets button{border-radius:11px}
.setup-wide{width:100%;margin:0 0 14px}
/* Isometric artwork keeps its shared material palette inside the inspector. */
.setup-inspector .inspector-tabs .setup-tab-art{display:block;width:30px;height:30px;overflow:visible;flex:none}
.setup-inspector .inspector-tabs .setup-tab-art svg{width:100%;height:100%;stroke:none;stroke-width:0;fill:none}
.setup-inspector .inspector-tabs button{padding-top:5px;padding-bottom:7px}
.setup-inspector .inspector-tabs button[aria-selected=false] .setup-tab-art{opacity:.72}
.setup-lamp-helpers{margin:3px 0 12px}
.setup-lamp{margin:0 0 8px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.setup-lamp.is-selected{border-color:var(--accent-line)}
.setup-lamp summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px;cursor:pointer;list-style:none;font-size:12px;font-weight:500}
.setup-lamp summary::-webkit-details-marker{display:none}
.setup-lamp summary>span{display:flex;align-items:center;gap:7px;min-width:0}
.setup-lamp summary i{width:12px;height:12px;flex:none;border:1px solid var(--line-strong);border-radius:50%}
.setup-lamp summary small{color:var(--muted);font-size:10.5px;white-space:nowrap;font-variant-numeric:tabular-nums}
.setup-lamp-body{padding:0 10px 4px}
.setup-lamp-body .field{margin-bottom:12px}
.setup-lamp-options{display:flex;gap:14px;margin:0 0 9px}
.setup-lamp-options .switch-row{gap:6px;font-size:11px;margin:0}
.setup-lamp-colour{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;margin:0 0 12px;color:var(--ink-2);font-size:12px;text-align:left}
.setup-inspector .setup-lamp-colour input[type=color]{width:58px;height:28px;border-radius:8px}
.setup-light-extra{margin:12px 0;border-top:1px solid var(--line);padding-top:10px}
.setup-light-extra summary{font-size:12px;font-weight:500;cursor:pointer;margin-bottom:10px}
#setup-light-helpers{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:hidden}
#setup-light-helpers[hidden]{display:none}
.setup-light-marker{pointer-events:auto;cursor:pointer;outline:none}
.setup-light-marker .setup-light-panel{fill:var(--lamp-colour);fill-opacity:.22;stroke:#445365;stroke-width:1.2;vector-effect:non-scaling-stroke}
.setup-light-marker .setup-light-ray{stroke:#445365;stroke-width:1.2;stroke-dasharray:4 3;vector-effect:non-scaling-stroke}
.setup-light-marker .setup-light-edge{fill:none;stroke:#445365;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.setup-light-marker .setup-light-target{fill:#fff;stroke:#68778a;stroke-width:1.5;filter:drop-shadow(0 1px 3px rgb(0 0 0 / .13))}
.setup-light-marker text{fill:#253548;font-size:11px;font-weight:600;font-family:var(--font);pointer-events:none;user-select:none}
.setup-light-marker.is-off{opacity:.45}
.setup-light-marker.is-selected .setup-light-target,.setup-light-marker:focus-visible .setup-light-target{stroke:var(--accent);stroke-width:2.5}
.setup-light-marker:hover .setup-light-target{fill:var(--soft)}
.setup-object-head{display:flex;flex-direction:column;gap:10px;margin:2px 0 4px}.setup-object-head h3{margin:0;font-size:15px;font-weight:600;letter-spacing:-.01em}
.setup-booklet-controls{display:flex;gap:6px}.setup-booklet-controls .btn{flex:1;min-width:0;padding:6px 8px}.setup-booklet-controls .btn:disabled{opacity:.45;cursor:default}
/* Pastille d'outils et menu Capture, comme sur la scène d'Éléments */
.setup-tools{position:absolute;top:14px;right:14px;z-index:2;display:flex;gap:2px;padding:4px;border:1px solid var(--line);border-radius:999px;background:oklch(1 0 0 / .92);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.setup-tools button{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;color:var(--ink);transition:background-color .16s cubic-bezier(.23,1,.32,1)}
.setup-tools button:hover{background:var(--sunken)}.setup-tools button[aria-pressed=true],.setup-tools button[aria-expanded=true]{background:var(--accent);color:var(--accent-ink)}
.setup-tools svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#setup-capture-popover{top:60px;right:14px}#setup-capture-popover .btn{width:100%}#setup-capture-popover .btn.small{margin-top:-4px}
@media(max-width:1150px){#setup-dialog{--setup-side:216px}.setup-sidebar{padding:18px 12px}.setup-inspector{width:240px;padding:18px 14px}#setup-status{max-width:120px}}
@media(max-width:860px){.setup-shell{flex-direction:column;overflow:auto}.setup-sidebar{width:auto;max-height:190px;flex-shrink:0}.setup-main{min-height:62dvh;flex-shrink:0}.setup-toolbar{height:auto;padding:10px 14px;flex-wrap:wrap}.setup-inspector{width:auto;overflow:visible}}

.setup-element{position:relative;padding:10px 8px;border:1px solid transparent;border-radius:12px;cursor:pointer}.setup-element:hover{background:var(--sunken)}.setup-element.selected{background:var(--soft);border-color:var(--accent-line)}
.setup-element label{display:flex;flex-direction:row;align-items:center;gap:9px;padding-right:30px;text-align:left;cursor:pointer}.setup-element input{margin:0;accent-color:var(--accent)}.setup-element span{min-width:0}
.setup-element strong,.setup-element small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.setup-element strong{font-size:12.5px;line-height:1.45;font-weight:500}.setup-element small{font-size:11px;color:var(--muted);margin-top:2px}
.setup-added{display:block;margin:6px 0 0 24px;font-size:10.5px;color:var(--accent-text)}
.setup-element.is-hidden{border:1px dashed #c8b3a7;background:var(--sunken)}
.setup-hidden-badge{display:inline-block!important;width:auto;min-width:0;margin:7px 0 0 24px;padding:3px 6px;border-radius:4px;background:#f2e7de;color:#80543d;font-size:10.5px;white-space:normal!important}
.setup-element.is-hidden.selected{background:#f3e9df}
.setup-add-instance{position:absolute;top:8px;right:8px;width:26px;height:26px;padding:0;border:1px solid var(--line-strong);border-radius:50%;background:#fff;color:var(--ink-2);font-size:15px;line-height:1;cursor:pointer}
.setup-add-instance:hover{background:var(--sunken);color:var(--ink)}
.setup-instances{display:flex;flex-wrap:wrap;gap:4px;margin:8px 0 0 24px}
.setup-instances button{min-width:26px;height:24px;padding:0 7px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink-2);font:500 11px/1 var(--font-num);cursor:pointer}
.setup-instances button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
#setup-frame{position:absolute;pointer-events:none;border:1.5px solid oklch(1 0 0 / .9);border-radius:4px;box-shadow:0 0 0 9999px oklch(.21 .02 268 / .3)}
#setup-guides,#vernis-floating-workspaces #setup-guides{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#setup-guides line{stroke:oklch(.6 .17 25);stroke-width:1.5;stroke-dasharray:6 5}
#setup-guides .setup-spacing-guide line{stroke-dasharray:none}
#setup-guides text{fill:oklch(.45 .16 25);stroke:#fff;stroke-width:3;paint-order:stroke;font:600 12px system-ui,sans-serif;text-anchor:middle}
.setup-view{position:absolute;top:14px;left:14px;z-index:1;display:flex;gap:2px;padding:3px;border:1px solid var(--line);border-radius:999px;background:oklch(.962 .004 265 / .94);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.setup-view button{height:28px;padding:0 12px;border:0;border-radius:999px;background:none;color:var(--ink-2);font-size:12px;font-weight:500;cursor:pointer}
.setup-view button:hover{color:var(--ink)}.setup-view button[aria-pressed=true]{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line-strong)}
.dress-panel{position:absolute;top:0;bottom:0;left:calc(var(--setup-side) + 8px);right:0;z-index:5;display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:8px;background:var(--bg)}
@media(max-width:860px){.dress-panel{left:0;grid-template-columns:1fr;overflow:auto}}
.dress-stage{display:flex;flex-direction:column;gap:10px;padding:12px;min-width:0;min-height:0;background:var(--panel);border:1px solid var(--line);border-radius:var(--r-lg)}
.dress-toolbar,.dress-variants{display:flex;align-items:center;gap:8px}.dress-spacer{flex:1}
.dress-seg{display:inline-flex;flex-wrap:wrap;gap:2px;padding:3px;border:1px solid var(--line);border-radius:999px;background:var(--sunken)}
.dress-seg button{height:28px;padding:0 12px;border:0;border-radius:999px;background:none;color:var(--ink-2);font-size:12px;font-weight:500;cursor:pointer}
.dress-seg button[aria-pressed=true]{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line-strong)}
.dress-image{flex:1;min-height:0;margin:0;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;padding:14px;border:1px solid var(--line);border-radius:18px;background:var(--panel)}
.dress-image img{max-width:100%;max-height:calc(100% - 28px);object-fit:contain;border-radius:8px}
.dress-image figcaption,.dress-image p{margin:0;font-size:11.5px;color:var(--muted)}
.dress-variants button{width:76px;height:48px;padding:0;border:2px solid transparent;border-radius:10px;overflow:hidden;background:none;cursor:pointer}
.dress-variants button[aria-pressed=true]{border-color:var(--accent)}.dress-variants img{display:block;width:100%;height:100%;object-fit:cover}
.dress-action,.dress-toolbar>button{display:inline-flex;align-items:center;height:32px;padding:0 14px;border:1px solid var(--line-strong);border-radius:999px;background:#fff;color:var(--ink);font-size:12px;white-space:nowrap;text-decoration:none;cursor:pointer}
.dress-side{display:flex;flex-direction:column;gap:12px;min-height:0;overflow:auto;padding:16px 18px;background:var(--panel);border:1px solid var(--line);border-radius:var(--r-lg)}
.dress-head span{font-size:11px;color:var(--muted)}.dress-head h3{margin:2px 0 0;font-size:20px;font-weight:600;letter-spacing:-.02em}
.dress-note{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border-radius:12px;background:var(--sunken);color:var(--ink-2);font-size:12px;line-height:1.5}
.dress-note.warn{background:oklch(.965 .045 85);color:oklch(.42 .08 60)}.dress-note button{align-self:flex-start;height:30px;padding:0 12px;border:1px solid currentColor;border-radius:999px;background:#fff;color:inherit;cursor:pointer}
.dress-settings h4,.dress-history h4{margin:10px 0 6px;font-size:12.5px;font-weight:600}
/* Photo-style scene picker: imagery carries the ambiance; labels and selection stay outside the photograph. */
.dress-ambiance-picker{min-width:0;border:0;padding:0;margin:24px 0}
.dress-ambiance-picker legend{padding:0;margin-bottom:12px;font-size:14px;font-weight:600;letter-spacing:-.01em}
.dress-ambiance-free{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 12px;margin-bottom:16px;border:1px solid var(--line-strong);border-radius:12px;background:var(--panel);color:var(--ink-2);text-align:left;font-size:12px;font-weight:500}
.dress-ambiance-free>svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.dress-ambiance-free>svg:last-child{width:18px;height:18px;margin-left:auto;visibility:hidden}
.dress-ambiance-free[aria-pressed=true]{border-color:var(--accent);background:var(--soft);color:var(--accent-text)}
.dress-ambiance-free[aria-pressed=true]>svg:last-child{visibility:visible}
.dress-ambiances{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 10px}
.dress-ambiances button{display:flex;min-width:0;flex-direction:column;gap:8px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--ink-2);font-size:11px;line-height:1.4;text-align:left;cursor:pointer}
.dress-ambiance-image{position:relative;display:block;width:100%;aspect-ratio:1;border:2px solid transparent;border-radius:10px;background-size:400% 300%;background-clip:padding-box;box-shadow:0 1px 3px rgb(20 24 36 / .08);transition:border-color .18s var(--ease)}
.dress-ambiance-check{position:absolute;right:5px;bottom:5px;display:grid;place-items:center;width:20px;height:20px;border:1px solid #fff;border-radius:50%;background:var(--accent);color:var(--accent-ink);opacity:0}
.dress-ambiance-check svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dress-ambiance-label{padding:0 2px;overflow-wrap:anywhere}
.dress-ambiances button[aria-pressed=true]{color:var(--ink);font-weight:600}
.dress-ambiances button[aria-pressed=true] .dress-ambiance-image{border-color:var(--accent);outline:2px solid var(--panel);outline-offset:-4px}
.dress-ambiances button[aria-pressed=true] .dress-ambiance-check{opacity:1}
.dress-ambiance-caption{margin:12px 0 0;font-size:11px;line-height:1.5;color:var(--muted)}
@media(hover:hover){.dress-ambiances button:not([aria-pressed=true]):hover:not(:disabled) .dress-ambiance-image{border-color:var(--accent-line)}.dress-ambiance-free:hover:not(:disabled){background:var(--sunken)}}
@media(prefers-reduced-motion:reduce){.dress-ambiance-image{transition:none}}
#dress-prompt{width:100%;min-height:64px;padding:8px 10px;border:1px solid var(--line-strong);border-radius:12px;font:inherit;font-size:12.5px;resize:vertical}
.dress-chips{display:flex;flex-wrap:wrap;gap:6px}
.dress-chips button{height:28px;padding:0 11px;border:1px solid var(--line);border-radius:999px;background:var(--sunken);color:var(--ink-2);font-size:12px;cursor:pointer}
.dress-chips button[aria-pressed=true]{border-color:var(--accent-line);background:var(--soft);color:var(--accent-text)}
.dress-generate{position:sticky;bottom:-16px;display:flex;flex-direction:column;gap:8px;margin:0 -18px;padding:12px 18px;border-top:1px solid var(--line);background:#fff}
.dress-primary{height:40px;border:0;border-radius:999px;background:var(--accent);color:var(--accent-ink);font-weight:600;cursor:pointer}.dress-primary:disabled{opacity:.45;cursor:default}
.dress-progress{display:grid;grid-template-columns:1fr auto;gap:6px 10px;align-items:center;color:var(--ink-2);font-size:12px}.dress-progress progress{grid-column:1/-1;width:100%}
.dress-progress button{height:28px;padding:0 12px;border:1px solid var(--line-strong);border-radius:999px;background:#fff;cursor:pointer}
.dress-error{margin:0;color:var(--danger);font-size:12px}
.dress-history{display:flex;flex-direction:column;gap:4px}.dress-history p{margin:0;color:var(--muted);font-size:12px}
.dress-history-entry{min-width:0;padding:6px;border:1px solid var(--line);border-radius:12px}
.dress-history-entry[data-selected]{border-color:var(--accent-line);background:var(--soft)}
.dress-history-entry>button{display:flex;align-items:center;gap:10px;width:100%;padding:0;border:0;background:none;color:var(--ink);text-align:left;cursor:pointer}
.dress-history img{flex:none;width:56px;height:36px;border-radius:6px;object-fit:cover}
.dress-history strong{display:block;font-size:12.5px;font-weight:500}.dress-history small{color:var(--muted);font-size:11px}
.dress-saved-prompt,.dress-history .dress-saved-prompt{margin:8px 0 0;padding:8px 10px;border-radius:8px;background:var(--sunken);color:var(--ink-2);font:inherit;font-size:12px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;cursor:pointer;user-select:text;-webkit-user-select:text}
.dress-saved-prompt:hover{background:var(--soft);color:var(--accent-text)}
.dress-saved-prompt:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.dress-saved-prompt[aria-disabled=true]{cursor:text}
.dress-result-prompt{max-height:100px;overflow:auto;flex:none}.dress-result-prompt:empty{display:none}.dress-result-prompt .dress-saved-prompt{margin:0}
.dress-history .dress-history-help{margin-bottom:4px;font-size:11px;line-height:1.5}
.dress-shot{position:relative;flex:1;min-height:0;width:100%;display:flex;align-items:center;justify-content:center}
.dress-image .dress-shot img{max-width:100%;max-height:100%}
.dress-zone-layer{position:absolute;cursor:crosshair;touch-action:none;border-radius:8px;box-shadow:inset 0 0 0 1px var(--accent-line)}
.dress-zone{position:absolute;border:2px solid var(--accent);border-radius:4px;background:color-mix(in oklch,var(--accent) 14%,transparent);pointer-events:none}
.dress-variants{flex-wrap:wrap}.dress-variants button{position:relative}
.dress-variants button span{position:absolute;left:3px;bottom:3px;padding:1px 5px;border-radius:999px;background:rgb(0 0 0 / .62);color:#fff;font-size:9.5px;line-height:14px}
.dress-variants button i{position:absolute;top:4px;right:4px;width:9px;height:9px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px #fff}
.dress-finish,.dress-retouch{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.dress-retouch p{flex-basis:100%;margin:0;font-size:12px;color:var(--ink-2)}
#dress-zone-prompt{flex:1;min-width:220px;height:32px;padding:0 12px;border:1px solid var(--line-strong);border-radius:999px;font:inherit;font-size:12.5px}
.dress-action.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600}
.dress-action[aria-pressed=true]{border-color:var(--accent-line);background:var(--soft);color:var(--accent-text)}
.dress-action:disabled{opacity:.45;cursor:default}
.dress-busy{margin:0;font-size:12px;color:var(--ink-2)}
@media(max-width:860px){.dress-panel{grid-template-columns:1fr;overflow:auto}.dress-side{border-left:0;border-top:1px solid var(--line)}}
/* Décor : accessoires (blockings) et table de la composition ; contrôles d'échelle des variantes. */
.setup-decor-list{display:flex;flex-direction:column;gap:4px}
.setup-decor-row{min-height:30px;padding:5px 10px;border:1px solid var(--line);border-radius:10px;background:var(--sunken);color:var(--ink-2);font-size:12px;text-align:left;cursor:pointer}
.setup-decor-row[aria-pressed=true]{border-color:var(--accent-line);background:var(--soft);color:var(--accent-text)}
.setup-decor-warning{padding:8px 10px;border-radius:10px;background:oklch(.965 .045 85);color:oklch(.42 .08 60)}
.setup-table-size{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:6px 0}
.setup-table-size label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:var(--muted)}
.setup-table-size input{width:100%;padding:6px 8px;border:1px solid var(--line-strong);border-radius:8px;background:#fff;color:var(--ink);font-size:12px}
.setup-stack-details{margin:10px 0;padding:10px;border:1px solid var(--line);border-radius:10px}
.setup-stack-details summary{cursor:pointer;font-size:12px;font-weight:500}
.setup-stack-controls{max-height:340px;overflow:auto;margin-top:8px}
.setup-stack-controls .field{margin-bottom:10px}
.dress-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.dress-badge{padding:3px 10px;border-radius:999px;background:oklch(.965 .045 85);color:oklch(.42 .08 60);font-size:12px}

/* Photographic finishes share the scene picker's imagery and precise selection treatment. */
.dress-side .dress-photo{display:flex;flex-direction:column;gap:16px;min-width:0;padding:4px 0 0}
.dress-photo-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.dress-photo-heading h4{margin:0;font-size:17px;font-weight:600;letter-spacing:-.02em}
.dress-photo-count{display:grid;place-items:center;min-width:30px;height:26px;padding:0 7px;border:1px solid var(--line);border-radius:8px;background:var(--sunken);font:11px var(--font-num);color:var(--muted)}
.dress-photo-tools{display:flex;align-items:center;gap:8px;margin-left:auto}
.dress-photo-tools .dress-seg{margin:0;border-radius:10px;padding:2px}
.dress-photo-tools .dress-seg button{min-width:56px;min-height:36px;border-radius:7px;padding:0 10px}
.dress-photo-zoom{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line-strong);border-radius:10px;background:var(--panel);color:var(--ink-2)}
.dress-photo-zoom svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.dress-photo-zoom[aria-pressed=true]{background:var(--soft);border-color:var(--accent);color:var(--accent-text)}
.dress-photo-collection{position:relative;display:block}
.dress-photo-collection>span{position:absolute;left:12px;top:7px;font-size:10px;line-height:1.3;color:var(--muted);pointer-events:none}
.dress-photo-collection select{width:100%;min-height:54px;padding:23px 34px 8px 11px;border:1px solid var(--line-strong);border-radius:10px;background:var(--panel);font:inherit;font-size:12px;font-weight:500;color:var(--ink);cursor:pointer}
.dress-photo-presets{max-height:240px;max-height:calc(50cqw + 84px);flex-shrink:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line-strong) transparent;padding:3px;margin:-3px}
.dress-photo-family[hidden]{display:none}
.dress-photo-family>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 9px;padding:1px}
.dress-photo-preset{display:flex;flex-direction:column;min-width:0;gap:6px;padding:0;border:0;border-radius:9px;background:none;text-align:left;color:var(--ink-2);font-size:11px;line-height:1.35;cursor:pointer}
.dress-photo-thumbnail{position:relative;display:grid;place-items:center;aspect-ratio:4/3;width:100%;border:2px solid transparent;border-radius:10px;background:var(--sunken);background-clip:padding-box;overflow:hidden;transition:border-color .18s var(--ease)}
.dress-photo-thumbnail>img{display:block;width:100%;height:100%;object-fit:contain}
.dress-photo-thumbnail>span:not(.dress-ambiance-check){padding:8px;text-align:center;font-size:10px;color:var(--muted)}
.dress-photo-placeholder{width:100%;height:100%;background:var(--line)}
.dress-photo-preset-label{padding:0 2px;min-height:30px;overflow-wrap:anywhere}
.dress-photo-preset[aria-pressed=true]{color:var(--ink);font-weight:600}
.dress-photo-preset[aria-pressed=true] .dress-photo-thumbnail{border-color:var(--accent);outline:2px solid var(--panel);outline-offset:-4px}
.dress-photo-preset[aria-pressed=true] .dress-ambiance-check{opacity:1}
.dress-photo-preview-hint{margin:0;font-size:10px;line-height:1.4;color:var(--muted)}
.dress-photo-sliders{display:grid;gap:14px}
.dress-photo-sliders label{display:grid;grid-template-columns:1fr auto;gap:8px 10px;font-size:12px;line-height:1.5}
.dress-photo-sliders output{font-family:var(--font-num);font-size:11.5px;font-variant-numeric:tabular-nums;color:var(--ink)}
.dress-photo-sliders input{grid-column:1/-1;width:100%;height:6px;accent-color:var(--accent)}
.dress-photo-grain{min-width:0;margin:0;padding:4px 0 0;border:0;border-top:1px solid var(--line);gap:8px}
.dress-photo-grain legend{padding:0 8px 0 0;font-size:12px;font-weight:600;color:var(--ink)}
.dress-photo-grain label{gap:4px 10px}
.dress-photo-grain input{height:20px;margin:0}
.dress-photo-status{margin:0;font-size:10.5px;line-height:1.5;color:var(--muted)}
.dress-photo-info{border-top:1px solid var(--line);padding-top:8px;color:var(--ink-2);font-size:11.5px;line-height:1.6}
.dress-photo-info summary{cursor:pointer;padding:4px 0}
.dress-photo-info p{margin:10px 0 0}
.dress-photo-actions{position:sticky;bottom:-16px;display:grid;gap:8px;margin:0 -18px -16px;padding:12px 18px 16px;border-top:1px solid var(--line);background:var(--panel);z-index:1}
.dress-photo-actions .dress-action{justify-content:center;min-height:44px;width:100%}
@media(hover:hover){.dress-photo-preset:not([aria-pressed=true]):hover:not(:disabled) .dress-photo-thumbnail{border-color:var(--accent-line)}.dress-photo-zoom:hover:not(:disabled){background:var(--sunken)}}
@media(prefers-reduced-motion:reduce){.dress-photo-thumbnail{transition:none}}
.dress-shot.is-zoomed{overflow:auto;display:block;min-height:0}.dress-image .dress-shot.is-zoomed img{max-width:none;max-height:none;width:auto;height:auto;display:block;margin:auto}
.dress-photo-surface{position:absolute;display:block;pointer-events:none}
.dress-shot.has-photo-surface>img{visibility:hidden}
.dress-shot.has-photo-surface .dress-compare-original{display:none}
@media(max-width:860px){
 .dress-panel{display:flex;flex-direction:column;gap:8px}
 .dress-stage{flex:none;min-height:0}
 .dress-image{flex:none;height:min(70vw,400px);min-height:200px}
 .dress-side{flex:none;overflow:visible;min-height:auto}
 .dress-photo-actions{position:static;margin-bottom:0}
}
/* Full-size layers share image bounds: moving the divider never rescales either version. */
.dress-compare-layer{position:absolute;overflow:hidden;border-radius:8px;pointer-events:none;isolation:isolate}
.dress-compare-layer[hidden]{display:none}
.dress-image .dress-shot .dress-compare-layer>img{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;border-radius:0;object-fit:contain;background:var(--stage);clip-path:inset(0 calc(100% - var(--compare-position)) 0 0)}
.dress-compare-divider{position:absolute;top:0;bottom:0;left:var(--compare-position);width:2px;transform:translateX(-50%);background:#fff;box-shadow:0 1px 4px #0006}
.dress-compare-handle{position:absolute;top:var(--compare-handle-y,50%);left:50%;display:grid;place-items:center;width:44px;height:44px;transform:translate(-50%,-50%);border:1px solid #fff;border-radius:50%;background:var(--ink);color:#fff;box-shadow:0 2px 10px #0004}
.dress-compare-handle svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.dress-compare-layer:focus-within .dress-compare-handle{outline:3px solid var(--accent);outline-offset:3px}
.dress-compare-label{position:absolute;top:12px;padding:5px 9px;border-radius:6px;background:rgb(20 24 36 / .8);color:white;font-size:11px;line-height:1.4}
.dress-compare-label.is-before{left:12px}.dress-compare-label.is-after{right:12px}
.dress-compare-layer #dress-photo-compare-position{position:absolute;inset:0 auto 0 -22px;width:calc(100% + 44px);height:100%;margin:0;padding:0;border:0;opacity:0;cursor:ew-resize;pointer-events:auto;touch-action:pan-y;-webkit-appearance:none;appearance:none;background:none}
#dress-photo-compare-position::-webkit-slider-thumb{-webkit-appearance:none;width:44px;height:44px}
#dress-photo-compare-position::-moz-range-thumb{width:44px;height:44px;border:0}
:is(.dress-shot.is-zoomed,.modern-photo-inline .dress-shot) #dress-photo-compare-position{top:calc(var(--compare-handle-y,50%) - 22px);bottom:auto;height:44px;touch-action:none}
.dress-photo-tools .dress-seg button{min-width:0;padding:0 10px}
.dress-toolbar{flex-wrap:wrap}
.dress-variant-comparison{display:grid;gap:20px;min-width:0}
.dress-variant-comparison h3{margin:4px 0 0;font-size:17px;font-weight:600;letter-spacing:-.02em}
.dress-variant-comparison>p{margin:0;color:var(--ink-2);font-size:12px;line-height:1.6}
.dress-variant-source{display:grid;gap:10px;min-width:0}
.dress-variant-source label{font-size:12px;font-weight:500;color:var(--ink)}
.dress-variant-source select{width:100%;min-height:44px;font-size:12px}
.dress-variant-source-preview{display:flex;align-items:center;gap:12px;min-width:0}
.dress-variant-source-preview>img{width:72px;height:56px;object-fit:contain;border-radius:8px;background:var(--stage)}
.dress-variant-source-preview>span{min-width:0;display:grid;gap:5px}
.dress-variant-source-preview strong{font-size:12px;font-weight:500;overflow-wrap:anywhere}
.dress-variant-source-preview small{font-size:11px;color:var(--muted);font-family:var(--font-num)}
.dress-variant-comparison .dress-action{justify-content:center;min-height:44px;width:100%}
.dress-variant-comparison .dress-action svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
/* The same focused photo workspace sits above an element or a composition. */
#photo-dialog{width:calc(100vw - 32px);max-width:1600px;height:calc(100dvh - 32px);max-height:100dvh;padding:8px;overflow:hidden;background:var(--bg);border:1px solid var(--line);border-radius:20px;color:var(--ink)}
#photo-dialog::backdrop{background:rgb(20 24 20 / .4)}
.dress-panel.is-photo-workspace{left:0}
#photo-dialog .dress-panel{inset:8px}
.is-photo-workspace .dress-toolbar>strong{font-size:14px;font-weight:600;margin-right:auto}
.photo-checker>img,.dress-image .photo-checker .dress-compare-layer>img{background-color:var(--photo-checker-bg,#fafafa);background-image:conic-gradient(var(--photo-checker-tile,#e6e8e4) 25%,transparent 0 50%,var(--photo-checker-tile,#e6e8e4) 0 75%,transparent 0);background-size:16px 16px}
@media(max-width:860px){#photo-dialog{width:100vw;height:100dvh;max-width:none;margin:0;border-radius:0;border:0}#photo-dialog .dress-panel{inset:0}.is-photo-workspace .dress-toolbar>strong{order:-1;flex:1 0 100%}}
.dress-photo-thumbnail>img{background-color:var(--photo-checker-bg,#fafafa);background-image:conic-gradient(var(--photo-checker-tile,#e6e8e4) 25%,transparent 0 50%,var(--photo-checker-tile,#e6e8e4) 0 75%,transparent 0);background-size:12px 12px}

.is-photo-workspace .dress-photo{gap:10px;container-type:inline-size}
.dress-photo-preset:focus-visible .dress-photo-thumbnail{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:1100px){.is-photo-workspace .dress-toolbar>.dress-photo-tools{flex:1 0 100%;justify-content:flex-end}}
@media(max-width:860px){.is-photo-workspace .dress-toolbar>.dress-photo-tools{justify-content:space-between}.dress-photo-tools .dress-seg button{min-height:44px;min-width:68px}.dress-photo-zoom{width:44px;height:44px}}

/* Favourites belong to the shared photo collection, independently of the applied filter. */
.dress-photo-heading>div{display:flex;align-items:center;gap:6px}
.dress-photo-favorites-tab{display:inline-flex;align-items:center;gap:5px;min-height:30px;padding:0 8px;border:1px solid var(--line);border-radius:8px;color:var(--ink-2);background:var(--panel);font-size:11px}
.dress-photo-favorites-tab svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
.dress-photo-favorites-tab[aria-pressed=true]{color:var(--accent-text);border-color:var(--accent-line);background:var(--soft)}
.dress-photo-favorites-tab[aria-pressed=true] svg{fill:currentColor}
.dress-photo-favorites-tab>span:last-child{font:10px var(--font-num);color:var(--muted)}
.dress-photo-card{position:relative;min-width:0}.dress-photo-card>.dress-photo-preset{width:100%}
.dress-photo-favorite{position:absolute;top:4px;right:4px;display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink-2);box-shadow:0 1px 3px rgb(0 0 0 / .08)}
.dress-photo-favorite svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.dress-photo-favorite[aria-pressed=true]{color:var(--accent-text);border-color:var(--accent-line)}.dress-photo-favorite[aria-pressed=true] svg{fill:currentColor}
.dress-photo-favorite:focus-visible{outline:2px solid var(--accent);outline-offset:2px;z-index:2}
.dress-photo-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:168px;padding:22px;text-align:center;background:var(--sunken);border:1px dashed var(--line-strong);border-radius:12px;color:var(--muted)}
.dress-photo-empty>svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linejoin:round}.dress-photo-empty p{margin:0;font-size:12px;line-height:1.6}
@media(hover:hover){.dress-photo-favorite:hover,.dress-photo-favorites-tab:hover{background:var(--soft);color:var(--accent-text)}}
@media(max-width:860px){.dress-photo-favorite{width:32px;height:32px}.dress-photo-favorites-tab{min-height:36px}}

.dress-photo-favorite-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
