.xf3-style-gallery {padding:clamp(18px,3vw,38px);max-width:1600px;margin:auto}
.xf3-style-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.xf3-style-grid .xf3-style-tile {display:flex;flex-direction:column;padding:0;overflow:hidden;text-align:start;background:rgba(255,255,255,.88);border:1px solid #aec9d1;border-radius:14px;color:inherit;font:inherit;cursor:pointer;min-width:0}
.xf3-style-tile img {width:100%;height:auto;aspect-ratio:5/3;object-fit:contain}
.xf3-style-tile strong {padding:14px 16px;font-size:1.05rem;line-height:1.35}
.xf3-style-tile:hover,.xf3-style-tile:focus-visible {outline:2px solid #20738d;outline-offset:2px}
.xf3-style-controls {padding:24px;border:1px solid #aec9d1;border-radius:16px;background:rgba(255,255,255,.9);min-width:0;grid-column:1/-1}
.xf3-style-controls h2 {margin:12px 0 20px}
.xf3-style-controls .xf3-style-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.xf3-style-controls label {display:grid;gap:6px;min-width:0;font-weight:600}
.xf3-style-controls select {max-width:100%;min-width:0;width:100%;padding:12px;border-radius:8px;color:inherit;border:1px solid #aec9d1;background:white;font:inherit}
.xf3-style-controls p {line-height:1.5;margin:16px 0 0}
.xf3-style-controls button {font:inherit;cursor:pointer}
.xf3-style-controls .xf3-style-back {border:0;background:none;text-decoration:underline;padding:0;color:inherit}


.xf3-style-controls[hidden] {display:none!important}
@media(max-width:1000px){.xf3-style-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.xf3-style-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.xf3-style-tile strong{padding:10px;font-size:.95rem}.xf3-style-controls{padding:18px}.xf3-style-controls .xf3-style-fields{grid-template-columns:1fr}}
/* Keep the existing viewport clear of values belonging to the regular shelf. */

body .lab-page[data-style-preview="true"] .lab-viewer-shell [data-lab-viewer] {background:transparent!important}
.xf3-style-gallery h1 {font-size:clamp(2rem,3vw,3rem);margin:0 0 22px}
@media(min-width:1001px){.xf3-style-tile img{aspect-ratio:2.2}}
.lab-page[data-style-preview="true"] .xf3-wall-options label:has(input:disabled) {opacity:.45;cursor:not-allowed}

/* One unframed collection scene within the existing Store tab. */
html.xform3-themed body .lab-page .xf3-store-info-main.xf3-style-gallery {max-width:none;padding:12px 0 0;background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important}
.xf3-style-gallery h1 {margin:0 20px 8px;font-size:clamp(1.5rem,2.5vw,2.3rem)}
.xf3-style-gallery .xf3-style-grid.xf3-showroom {display:block;position:relative;width:100%;height:clamp(580px,48vw,780px);min-width:0;border:0;background:none;isolation:isolate}
.xf3-showroom canvas {touch-action:pan-y;cursor:default}
.xf3-showroom[data-hovered-family] canvas {cursor:pointer}
html.xform3-themed body .lab-page .xf3-showroom-label {appearance:none;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;color:#f2fbff!important;font:600 clamp(11px,1.1vw,15px)/1.25 var(--store-body,Arial,sans-serif)!important;padding:5px 8px!important;min-height:0!important;width:max-content;max-width:170px;text-align:center;white-space:normal;cursor:pointer;text-shadow:none!important}
html.xform3-themed body .lab-page .xf3-showroom-label:is(:hover,:focus-visible,.is-highlighted) {color:#91eeff!important;text-decoration:underline;text-underline-offset:4px}
html.xform3-themed body .lab-page .xf3-showroom-label:focus-visible {outline:2px solid #007da5!important;outline-offset:3px}
.xf3-showroom-loading {padding:100px 20px;text-align:center}
.xf3-showroom-fallback {margin:10px;border:0;background:transparent;text-decoration:underline;cursor:pointer}
@media(max-width:700px){
 .xf3-style-gallery {overflow-x:auto;overscroll-behavior-x:contain}
 .xf3-style-gallery .xf3-style-grid.xf3-showroom {width:1000px;height:670px}
 html.xform3-themed body .lab-page .xf3-showroom-label {font-size:13px!important;max-width:145px;padding:8px!important}
 .xf3-showroom canvas {touch-action:pan-x pan-y}
}

html.xform3-themed body [data-store-style-gallery] {padding:12px 0 0!important;margin:0!important}
html.xform3-themed body [data-store-style-gallery] h1 {font-size:32px!important;line-height:1.2!important;margin:0 20px 8px!important;padding:0!important}

/* Interactive shared wall display. */
.xf3-style-gallery .xf3-style-grid.xf3-showroom {height:auto;width:100%;overflow:hidden}
.xf3-showroom-interactive {width:100%;min-width:0}
.xf3-showroom-toolbar {display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;padding:8px 16px 12px}
.xf3-showroom-walls,.xf3-showroom-tools {display:flex;flex-wrap:wrap;align-items:center;gap:6px}
html.xform3-themed body .lab-page .xf3-showroom-toolbar button {display:inline-flex;align-items:center;gap:7px;padding:8px 11px;min-height:38px;font-size:14px;line-height:1.2;border:1px solid #90b2c0;border-radius:8px;background:#edf6f8;color:#184454;cursor:pointer}
html.xform3-themed body .lab-page .xf3-showroom-toolbar button[aria-pressed=true] {background:#caedf7;border-color:#176b85;box-shadow:inset 0 -2px #176b85}
.xf3-wall-swatch {display:inline-block;width:16px;height:16px;border:1px solid #618090;border-radius:50%;flex-shrink:0}
.xf3-showroom-viewport {height:clamp(590px,46vw,780px);overflow:hidden;position:relative;touch-action:none}
.xf3-showroom-viewport canvas {touch-action:none!important;cursor:grab}
.xf3-showroom-viewport canvas:active {cursor:grabbing}
html.xform3-themed body .lab-page .xf3-showroom[data-wall=none] .xf3-showroom-label {color:#163e50!important;background:#edf5f0dc!important;border-radius:6px!important}
@media(max-width:700px){
 .xf3-style-gallery {overflow-x:hidden}
 .xf3-showroom-toolbar {padding:8px;gap:8px}
 html.xform3-themed body .lab-page .xf3-showroom-toolbar button {font-size:12px;padding:7px 9px}
 .xf3-showroom-viewport {height:430px}
 html.xform3-themed body .lab-page .xf3-showroom-label {font-size:12px!important;max-width:135px}
}

/* Keep the wall immediately beneath the Store tabs, with controls below. */
html.xform3-themed body [data-store-style-gallery] {padding:0!important}
html.xform3-themed body [data-store-style-gallery] > h1 {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}
.xf3-showroom-viewport {height:clamp(430px,calc(100dvh - 250px),700px)}
.xf3-showroom-toolbar {padding:8px 12px 12px}
@media(max-width:700px){.xf3-showroom-viewport {height:430px}}

/* Use the window width for the shelf collection instead of a small centered board. */
html.xform3-themed body .lab-page[data-store-finish] .xf3-store-info-main[data-store-style-gallery] {padding:0!important;margin:0!important;width:calc(100vw - 32px)!important;max-width:none!important;position:relative;left:50%;transform:translateX(-50%)}
.xf3-showroom-viewport {height:calc((100vw - 32px)*.59);min-height:620px}
html.xform3-themed body .lab-page .xf3-showroom-label {max-width:210px;font-size:clamp(12px,1vw,16px)!important}
@media(max-width:700px){
 html.xform3-themed body .lab-page[data-store-finish] .xf3-store-info-main[data-store-style-gallery] {width:calc(100vw - 16px)!important}
 .xf3-showroom-viewport {height:500px;min-height:0}
 html.xform3-themed body .lab-page .xf3-showroom-label {font-size:12px!important;max-width:135px}
}

/* Native wall-plane text has a keyboard-accessible companion. */
html.xform3-themed body .lab-page .xf3-showroom-label {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
html.xform3-themed body .lab-page .xf3-showroom-label:focus-visible {width:max-content!important;height:auto!important;max-width:160px!important;padding:6px!important;clip-path:none!important;white-space:normal!important;background:#173b4c!important;font-size:12px!important;z-index:20}
/* Gallery viewport at left, controls in the right column. Preserve the clear sky. */
html.xform3-themed body .lab-page[data-store-finish] .xf3-store-info-main[data-store-style-gallery] {backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:transparent!important}
.xf3-showroom-interactive {display:grid;grid-template-columns:minmax(0,1fr) clamp(240px,22vw,340px);align-items:stretch;gap:12px}
.xf3-showroom-viewport {height:calc(100dvh - 205px);min-height:580px}
.xf3-showroom-toolbar {display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;align-self:stretch;gap:22px;padding:24px 20px 32px 8px;min-width:0}
.xf3-showroom-walls,.xf3-showroom-tools {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
html.xform3-themed body .lab-page .xf3-showroom-toolbar h2 {grid-column:1/-1;font-size:18px!important;line-height:1.3;margin:0 0 3px!important;padding:0!important}
html.xform3-themed body .lab-page .xf3-showroom-toolbar button {white-space:normal;min-width:0;justify-content:center;min-height:42px}
.xf3-showroom-tools [data-view-reset] {grid-column:1/-1}
@media(max-width:900px){
 .xf3-showroom-interactive {grid-template-columns:minmax(0,1fr);gap:0}
 .xf3-showroom-viewport {height:clamp(400px,70dvh,650px);min-height:0}
 .xf3-showroom-toolbar {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:12px 10px 24px;gap:16px}
}
@media(max-width:480px){.xf3-showroom-toolbar {grid-template-columns:1fr}.xf3-showroom-viewport {height:460px}}
/* Center the configurator-style controls alongside the opening composition. */
.xf3-showroom-interactive {grid-template-columns:minmax(0,1.9fr) minmax(300px,1fr);gap:24px}
.xf3-showroom-viewport {height:min(780px,calc(100dvh - 210px));min-height:560px}
.xf3-showroom-toolbar {align-self:center;justify-self:center;width:min(100%,380px);box-sizing:border-box;padding:22px;margin:0;gap:20px;border:1px solid #aec9d1;border-radius:16px;background:rgba(249,252,252,.93);box-shadow:0 4px 14px #17475e12;backdrop-filter:none}
.xf3-showroom-appearance {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.xf3-showroom-walls,.xf3-showroom-tools {padding-top:18px;border-top:1px solid #aec9d1}
@media(max-width:900px){.xf3-showroom-interactive {grid-template-columns:minmax(0,1fr);gap:12px}.xf3-showroom-viewport {height:clamp(400px,65dvh,600px);min-height:0}.xf3-showroom-toolbar {display:flex;flex-direction:column;width:calc(100% - 24px);max-width:560px;margin:0 auto 24px}.xf3-showroom-appearance,.xf3-showroom-walls,.xf3-showroom-tools {width:100%;box-sizing:border-box}}

@media(min-width:901px){.xf3-showroom-toolbar {position:relative;top:-60px}}
/* Match Store content edges and keep the controls compact. */
html.xform3-themed body .lab-page[data-store-finish] .xf3-store-info-main[data-store-style-gallery] {width:100%!important;max-width:100%!important;left:auto;transform:none;margin:0!important;box-sizing:border-box}
.xf3-showroom-interactive {grid-template-columns:minmax(0,1fr) clamp(280px,25%,360px);gap:18px;align-items:start}
.xf3-showroom-viewport {height:clamp(580px,calc(100dvh - 215px),900px);min-height:0}
.xf3-showroom-toolbar {position:static;top:auto;align-self:start;justify-self:stretch;justify-content:flex-start;width:100%;max-width:none;min-height:480px;margin:0;padding:18px;gap:0}
.xf3-showroom-compact-controls {display:grid;gap:10px;width:100%}
.xf3-showroom-control-row {display:grid;grid-template-columns:78px minmax(0,1fr);align-items:center;gap:8px;font-size:14px;font-weight:600}
.xf3-showroom-control-row select {font:inherit;font-weight:400;min-width:0;width:100%;height:34px;padding:4px 8px;border:1px solid #90b2c0;border-radius:7px;background:#edf6f8;color:#184454}
.xf3-showroom-wall-swatches,.xf3-showroom-view-buttons {display:flex;gap:5px;align-items:center;flex-wrap:wrap}
html.xform3-themed body .lab-page .xf3-showroom-toolbar button {width:32px;min-height:32px;height:32px;padding:4px;justify-content:center;font-size:18px;line-height:1}
.xf3-showroom-highlight {display:flex;align-items:center;gap:8px;font-size:14px;line-height:1.4;margin-top:2px}
.xf3-showroom-highlight input {width:17px;height:17px;margin:0;accent-color:#176b85}
@media(max-width:900px){.xf3-showroom-interactive {grid-template-columns:minmax(0,1fr);gap:12px}.xf3-showroom-viewport {height:auto;aspect-ratio:1.35;min-height:260px;max-height:580px}.xf3-showroom-toolbar {min-height:0;width:100%;margin:0 0 24px;padding:14px}.xf3-showroom-control-row {grid-template-columns:88px minmax(0,1fr)}}

/* Keep the grid slot fixed; expose the canvas only into the free left margin. */
[data-store-style-gallery].xf3-style-gallery,
.xf3-style-gallery .xf3-style-grid.xf3-showroom,
.xf3-showroom-viewport {overflow:visible}
.xf3-showroom-surface {position:absolute;inset:0;left:calc(-1 * var(--xf3-left-bleed, 0px));overflow:hidden}

/* Full-width gallery, with the regular viewer's wall picker below the scene. */
.xf3-showroom-interactive {display:flex;flex-direction:column;gap:10px}
.xf3-showroom-viewport {width:100%;height:clamp(580px,calc(100dvh - 265px),900px);flex:none}
html.xform3-themed body .lab-page .xf3-showroom-toolbar {
 order:1;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;
 flex-wrap:wrap;width:100%;min-height:0;max-width:none;margin:0;padding:0;gap:10px 20px;
 background:transparent;border:0;border-radius:0;box-shadow:none;box-sizing:border-box
}
html.xform3-themed body .lab-page .xf3-showroom-toolbar .xf3-wall-options {
 position:static!important;inset:auto!important;display:flex!important;align-items:center!important;
 flex-wrap:wrap!important;gap:8px!important;min-width:0;margin:0!important;padding:0!important;
 border:0!important;background:transparent!important;box-shadow:none!important;flex:0 1 auto
}
html.xform3-themed body .lab-page .xf3-showroom-toolbar .xf3-wall-options legend {
 float:left;flex:0 0 auto;margin:0 4px 0 0!important;white-space:nowrap
}
.xf3-showroom-appearance-picker {display:flex;align-items:center;gap:8px;font:600 13px/1.3 Arial,sans-serif;color:#204b60}
.xf3-showroom-appearance-picker select {width:auto;min-height:36px;padding:6px 10px;border:1px solid #779eaf;border-radius:8px;background:rgba(241,248,249,.9);color:#204b60;font:600 14px/1.2 Arial,sans-serif}
.xf3-showroom-toolbar .xf3-showroom-view-buttons {margin-left:auto;gap:6px}
html.xform3-themed body .lab-page .xf3-showroom-toolbar button {min-height:36px;padding:8px 12px;border:1px solid #779eaf;border-radius:8px;background:rgba(241,248,249,.9);color:#204b60;font:600 14px/1.2 Arial,sans-serif}
html.xform3-themed body .lab-page .xf3-showroom-toolbar button[aria-pressed=true] {background:#d6edf3;border-color:#246b87;box-shadow:inset 0 -2px #246b87}
@media(max-width:900px){
 .xf3-showroom-viewport {height:auto;aspect-ratio:1.35;min-height:260px;max-height:580px}
 html.xform3-themed body .lab-page .xf3-showroom-toolbar {gap:10px}
 .xf3-showroom-toolbar .xf3-showroom-view-buttons {margin-left:0;flex-wrap:wrap}
}
/* Existing regular viewer picker rules, scoped to its gallery instance. */
.xf3-showroom-toolbar .xf3-wall-options legend {font:600 13px/1.3 Arial,sans-serif!important;color:#204b60!important}
.xf3-showroom-toolbar .xf3-wall-options label {
 box-sizing:border-box!important;min-height:36px!important;padding:8px 12px!important;
 border:1px solid #779eaf!important;border-radius:8px!important;background:rgba(241,248,249,.9)!important;
 color:#204b60!important;font:600 14px/1.2 Arial,sans-serif!important;box-shadow:none!important;
 cursor:pointer!important;display:inline-flex!important;align-items:center!important;gap:6px!important;
 margin:0!important;white-space:nowrap;position:relative
}
.xf3-showroom-toolbar .xf3-wall-options label:has(input:checked) {background:#d6edf3!important;border-color:#246b87!important;box-shadow:inset 0 -2px #246b87!important}
.xf3-showroom-toolbar .xf3-wall-options label input {position:absolute!important;opacity:0!important;width:1px!important;height:1px!important}
.xf3-showroom-toolbar .xf3-wall-options label:focus-within {outline:2px solid #246b87;outline-offset:2px}
.xf3-showroom-toolbar .xf3-wall-options .xf3-shelf-highlight input {position:static!important;opacity:1!important;width:16px!important;height:16px!important;margin:0;flex-shrink:0;accent-color:#087ca8}
.xf3-showroom-toolbar .xf3-wall-options label.xf3-wall-swatch {width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;padding:0!important;border-radius:50%!important;flex:0 0 36px!important;background-image:var(--xf3-swatch-image)!important;background-size:cover!important;background-position:center!important;border:2px solid rgba(238,249,250,.95)!important;box-shadow:0 0 0 1px #52798d!important}
.xf3-showroom-toolbar .xf3-wall-options label.xf3-wall-swatch:has(input:checked) {box-shadow:0 0 0 3px #175977!important}
.xf3-showroom-toolbar .xf3-wall-options label.xf3-wall-swatch span {position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
.xf3-showroom-toolbar .xf3-wall-options label.xf3-wall-swatch:focus-within {outline:2px solid #175977!important;outline-offset:5px!important}
html.xform3-themed body .lab-page .xf3-showroom-toolbar button {width:auto;height:auto;white-space:nowrap}

.xf3-native-config-lock {display:contents;border:0;padding:0;margin:0;min-width:0}
.lab-page[data-style-preview="true"] [data-xf3-form] :disabled {cursor:not-allowed;opacity:.6}

.xf3-native-config-status p {font-size:.9rem;margin:.65rem 0}
.xf3-native-config-status button {font:inherit;margin:.3rem .5rem .3rem 0}

.lab-page[data-style-preview="true"]:not([data-catalog-family="narrow-tabs"]) [data-narrow-settings] {display:none!important}
.lab-page[data-style-preview="true"] :is([data-view-mode="svg"],[data-show-dimensions],[data-save-preview-shelf],[data-summary-quantity]):disabled {cursor:not-allowed}

/* Keep the controls clear and below the wall canvas. */
html.xform3-themed body .lab-page .xf3-showroom-toolbar {
 position:relative!important;left:auto;right:auto;bottom:auto;top:auto;z-index:3;
 margin:0!important;background:transparent!important;background-image:none!important;
 border:0!important;box-shadow:none!important;backdrop-filter:none!important;
 -webkit-backdrop-filter:none!important;pointer-events:auto;
}
