/* All rules are scoped to .dsfv. No body,heading,button or form resets leak out. */
.dsfv{--dsfv-ink:#102139;--dsfv-muted:#627083;--dsfv-bg:#f5f5f3;--dsfv-line:#dce2e6;--dsfv-blue:#add9f1;--dsfv-active:#e9f5fc;font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.5;color:var(--dsfv-ink);background:var(--dsfv-bg);width:100%;padding:clamp(18px,3vw,40px);border-radius:18px;isolation:isolate;box-sizing:border-box;text-align:left;container-type:inline-size}.dsfv *:not(.viz-estimate *),.dsfv *:not(.viz-estimate *)::before,.dsfv *:not(.viz-estimate *)::after{box-sizing:border-box}.dsfv [hidden]:not(.viz-estimate *){display:none!important}.dsfv button:not(.viz-estimate *),.dsfv input:not(.viz-estimate *),.dsfv select:not(.viz-estimate *){font:inherit;letter-spacing:normal;text-transform:none}.dsfv button:not(.viz-estimate *),.dsfv a:not(.viz-estimate *){touch-action:manipulation}.dsfv button:not(.viz-estimate *){appearance:none;cursor:pointer;color:var(--dsfv-ink);background:#fff;border:1px solid var(--dsfv-line);border-radius:9px;box-shadow:none;margin:0;line-height:1.4}.dsfv button:not(.viz-estimate *):disabled{cursor:not-allowed;opacity:.45}.dsfv button:not(.viz-estimate *):focus-visible,.dsfv a:not(.viz-estimate *):focus-visible,.dsfv input:not(.viz-estimate *):focus-visible{outline:3px solid #216caa;outline-offset:4px}.dsfv button:not(.viz-estimate *):hover:not(:disabled){border-color:#7c97ae}
.dsfv .dsfv-brand{display:flex;align-items:center;gap:10px;margin-bottom:25px;font-size:12px;font-weight:700;letter-spacing:2px}
.dsfv .dsfv-brand-mark{display:grid;place-items:center;width:27px;height:27px;font-size:26px;line-height:1}
.dsfv .dsfv-heading{font:700 clamp(27px,3.2vw,44px)/1.12 Arial,Helvetica,sans-serif;letter-spacing:-1.1px;color:var(--dsfv-ink);margin:0 0 12px;border:0;padding:0;background:none}
.dsfv .dsfv-intro{margin:0 0 27px;font-size:16px;line-height:1.6;color:var(--dsfv-muted);max-width:760px}
.dsfv .dsfv-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:26px;align-items:start}
.dsfv .dsfv-stage{position:relative;border-radius:12px;overflow:hidden;background:#dce1e2;line-height:0;aspect-ratio:4/3}
.dsfv .dsfv-photo,.dsfv .dsfv-canvas{display:block;width:100%;height:100%;object-fit:contain;border:0;margin:0;border-radius:0;max-width:none}
.dsfv .dsfv-canvas{position:absolute;inset:0}
.dsfv .dsfv-stage.dsfv-editing .dsfv-canvas{cursor:crosshair;touch-action:none}
.dsfv .dsfv-photo-label{position:absolute;top:15px;left:15px;padding:8px 12px;background:#fffffff0;border-radius:6px;font-size:12px;line-height:1.3;box-shadow:0 2px 9px #0000000a}
.dsfv .dsfv-compare-badge{position:absolute;bottom:15px;left:15px;line-height:1.3;border-radius:6px;background:#102139e8;color:#fff;padding:9px 12px;font-size:12px;pointer-events:none}
.dsfv .dsfv-expand{position:absolute;right:15px;top:15px;padding:8px 12px;font-size:12px;background:#fffffff0;min-height:36px}
.dsfv .dsfv-stage:fullscreen{width:100vw;height:100vh;border-radius:0;background:#141923;aspect-ratio:auto}
.dsfv .dsfv-stage:fullscreen .dsfv-canvas,.dsfv .dsfv-stage:fullscreen .dsfv-photo{object-fit:contain}
.dsfv .dsfv-compare{display:flex;align-items:center;gap:12px;padding:14px 0 4px}
.dsfv .dsfv-compare span{font-size:12px;white-space:nowrap}
.dsfv .dsfv-compare input{accent-color:var(--dsfv-ink);width:100%;min-width:30px;height:26px;margin:0;background:transparent;cursor:ew-resize}
.dsfv .dsfv-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:14px}
.dsfv .dsfv-scene{padding:4px;text-align:left;overflow:hidden;min-width:0;border:2px solid transparent;background:#fff}
.dsfv .dsfv-scene[aria-pressed=true]{border-color:var(--dsfv-ink)}
.dsfv .dsfv-scene img{display:block;width:100%;height:auto;aspect-ratio:1.8;object-fit:cover;border-radius:5px;margin:0}
.dsfv .dsfv-scene span{display:block;padding:7px 5px 3px;font-size:12px;font-weight:700}
.dsfv .dsfv-upload{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:12px;border:1px dashed #aab8c4;background:transparent;min-width:0;font-size:12px}
.dsfv .dsfv-upload-icon{font-size:27px;line-height:1.2}
.dsfv .dsfv-side{padding:24px;background:#fff;border-radius:13px;box-shadow:0 6px 25px #14203505}
.dsfv .dsfv-side-title{margin:0 0 22px;font-size:23px;font-weight:700;letter-spacing:-.5px}
.dsfv .dsfv-label{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:700;margin:0 0 12px}
.dsfv .dsfv-step{font-size:11px;font-weight:400;color:#82909e;letter-spacing:1px}
.dsfv .dsfv-finishes{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:24px}
.dsfv .dsfv-spaces{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:24px}
.dsfv .dsfv-space{padding:13px 3px;font-size:12px}
.dsfv .dsfv-space[aria-pressed=true]{background:var(--dsfv-active);border-color:#294e72}
.dsfv .dsfv-finish{padding:12px 4px;font-size:12px;text-align:center;min-width:0}
.dsfv .dsfv-finish[aria-pressed=true]{background:var(--dsfv-active);border-color:#294e72}
.dsfv .dsfv-finish-mark{display:block;height:25px;width:25px;margin:0 auto 7px;border-radius:4px;background:#bec4c9}
.dsfv .dsfv-finish-mark[data-look=Flake]{background-color:#929ca6;background-image:radial-gradient(#f4f4ef 0 1.2px,transparent 1.6px),radial-gradient(#27384c 0 1px,transparent 1.7px);background-size:7px 6px,5px 9px;background-position:0 0,3px 2px}
.dsfv .dsfv-finish-mark[data-look=Metallic]{background:repeating-linear-gradient(150deg,#485867,#d2d8dc 15%,#65778a 28%,#e5e7e8 40%)}
.dsfv .dsfv-swatches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 9px}
.dsfv .dsfv-swatch{border:0;background:transparent;padding:0;text-align:left;min-width:0;position:relative}
.dsfv .dsfv-swatch img{display:block;width:100%;aspect-ratio:1.05;object-fit:cover;border-radius:7px;border:2px solid transparent;margin:0}
.dsfv .dsfv-swatch[aria-pressed=true] img{border-color:#173b60;box-shadow:0 0 0 2px #fff inset}
.dsfv .dsfv-swatch[aria-pressed=true]::after{content:'✓';position:absolute;right:5px;top:5px;background:#173b60;color:#fff;border-radius:50%;width:19px;height:19px;text-align:center;font-size:12px;line-height:19px}
.dsfv .dsfv-swatch span{display:block;margin-top:5px;font-size:11px;color:#314358}
.dsfv .dsfv-chosen{margin-top:24px;padding-top:19px;border-top:1px solid #e6eaed}
.dsfv .dsfv-color-name{font-size:21px;font-weight:700;margin:0;color:var(--dsfv-ink)}
.dsfv .dsfv-description{font-size:12px;color:var(--dsfv-muted);margin:4px 0 0}
.dsfv .dsfv-actions{display:grid;gap:9px;margin-top:20px}
.dsfv .dsfv-cta{display:block;text-align:center;text-decoration:none;background:var(--dsfv-blue);color:#0c2942;border-radius:8px;padding:14px 10px;font-weight:700;font-size:14px;border:1px solid transparent;line-height:1.4}
.dsfv .dsfv-cta:hover{background:#98cde9;color:#0c2942}
.dsfv .dsfv-save{padding:12px;font-size:13px}
.dsfv .dsfv-small{font-size:11px;line-height:1.6;color:#788490;margin:13px 0 0}
.dsfv .dsfv-tools{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.dsfv .dsfv-tools button{padding:9px 12px;font-size:12px;min-height:38px}
.dsfv .dsfv-tools .dsfv-apply{background:var(--dsfv-ink);color:#fff;border-color:var(--dsfv-ink)}
.dsfv .dsfv-editor-note{font-size:13px;color:#3e5368;background:#e8f3fa;padding:12px 14px;border-radius:7px;line-height:1.5;margin:12px 0 0}
.dsfv .dsfv-status{font-size:12px;color:#4c6175;min-height:18px;margin:12px 0 0}
.dsfv .dsfv-file{display:none}
.dsfv .dsfv-footer{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:21px;border-top:1px solid #dde3e7;padding-top:16px;color:#6f7e8a;font-size:11px}
.dsfv .dsfv-footer a{color:#45627a;text-decoration:underline;text-underline-offset:3px}
@container(max-width:820px){.dsfv .dsfv-layout{grid-template-columns:minmax(0,1fr);gap:20px}.dsfv .dsfv-side{padding:21px}.dsfv .dsfv-side-title{font-size:22px}.dsfv .dsfv-swatches{grid-template-columns:repeat(6,minmax(0,1fr))}.dsfv .dsfv-finishes{max-width:420px}.dsfv .dsfv-actions{grid-template-columns:1fr 1fr}.dsfv .dsfv-gallery{gap:9px}}
@container(max-width:440px){.dsfv .dsfv-swatches{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.dsfv .dsfv-actions{grid-template-columns:1fr}.dsfv .dsfv-heading{font-size:29px}.dsfv .dsfv-intro{font-size:14px}.dsfv .dsfv-brand{font-size:10px;letter-spacing:1.5px}.dsfv .dsfv-photo-label{top:10px;left:10px;font-size:10px;padding:6px 8px}.dsfv .dsfv-expand{top:10px;right:10px;font-size:10px;padding:6px 8px}.dsfv .dsfv-scene span{font-size:10px}.dsfv .dsfv-upload{font-size:11px;padding:6px}.dsfv .dsfv-side{padding:18px}.dsfv .dsfv-compare span{font-size:11px}.dsfv .dsfv-gallery{gap:7px}}
@media(prefers-reduced-motion:no-preference){.dsfv button:not(.viz-estimate *),.dsfv .dsfv-cta{transition:background-color .15s,border-color .15s}}

/* Compact desktop mode: keep the design tools beside a viewport-sized photo. */
@media(min-width:900px){.dsfv{padding:18px 22px}}
@container(min-width:821px){
 .dsfv .dsfv-heading{font-size:30px;line-height:1.12;margin-bottom:7px}
 .dsfv .dsfv-intro{font-size:13px;margin-bottom:16px;line-height:1.45}
 .dsfv .dsfv-layout{grid-template-columns:minmax(0,1fr) 278px;gap:20px}
 .dsfv .dsfv-stage{width:min(100%,calc((100svh - 250px) * var(--dsfv-ratio,1.333333)));margin-inline:auto}
 .dsfv .dsfv-side{padding:16px}
 .dsfv .dsfv-side-title{font-size:20px;margin-bottom:14px}
 .dsfv .dsfv-label{font-size:12px;margin-bottom:8px}
 .dsfv .dsfv-spaces,.dsfv .dsfv-finishes{margin-bottom:15px;gap:6px}
 .dsfv .dsfv-space{padding:9px 3px}
 .dsfv .dsfv-finish{padding:8px 3px}
 .dsfv .dsfv-finish-mark{width:19px;height:19px;margin-bottom:4px}
 .dsfv .dsfv-swatches{gap:9px 8px}
 .dsfv .dsfv-swatch img{aspect-ratio:1.5}
 .dsfv .dsfv-swatch span{margin-top:3px}
 .dsfv .dsfv-chosen{margin-top:14px;padding-top:12px}
 .dsfv .dsfv-color-name{font-size:18px}
 .dsfv .dsfv-description{font-size:11px;margin-top:2px}
 .dsfv .dsfv-actions{margin-top:13px;gap:7px}
 .dsfv .dsfv-cta{padding:11px 8px;font-size:13px}
 .dsfv .dsfv-save{padding:9px;font-size:12px}
 .dsfv .dsfv-small{font-size:10px;margin-top:9px;line-height:1.4}
 .dsfv .dsfv-compare{padding:8px 0 0;max-width:620px;margin:auto}
 .dsfv .dsfv-gallery{grid-template-columns:1fr;margin-top:8px}
 .dsfv .dsfv-gallery .dsfv-scene{display:none}
 .dsfv .dsfv-upload{flex-direction:row;gap:9px;padding:8px 14px;width:fit-content;justify-self:center}
 .dsfv .dsfv-upload-icon{font-size:17px}
 .dsfv .dsfv-footer{font-size:10px;margin-top:12px;padding-top:10px}
 .dsfv .dsfv-status:empty{display:none}
 .dsfv .dsfv-tools:has([data-action=outline][hidden]){display:none}
}/* Room selection,upload,and comparison now live in the right controls panel. */
.dsfv .dsfv-side .dsfv-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0 0 17px}
.dsfv .dsfv-side .dsfv-gallery .dsfv-scene{display:block;padding:3px}
.dsfv .dsfv-side .dsfv-scene img{aspect-ratio:1.8}
.dsfv .dsfv-side .dsfv-scene span{padding:4px 2px 2px;font-size:11px}
.dsfv .dsfv-side .dsfv-upload{grid-column:1/-1;width:100%;min-height:34px;flex-direction:row;gap:8px;padding:7px 10px;font-size:12px}
.dsfv .dsfv-side .dsfv-upload-icon{font-size:17px}
.dsfv .dsfv-side .dsfv-compare{padding:11px 0 0;gap:6px}
.dsfv .dsfv-side .dsfv-compare span{font-size:10px}
@container(min-width:821px){
 .dsfv .dsfv-layout{grid-template-columns:minmax(0,1fr) 286px}
 .dsfv .dsfv-stage{width:min(100%,calc((100svh - 166px) * var(--dsfv-ratio,1.333333)))}
 .dsfv .dsfv-side .dsfv-gallery{gap:6px;margin-bottom:14px}
 .dsfv .dsfv-side .dsfv-scene img{aspect-ratio:2}
 .dsfv .dsfv-side .dsfv-scene span{padding:3px 2px 1px;font-size:10px}
 .dsfv .dsfv-side .dsfv-upload{min-height:30px;padding:5px 9px;font-size:11px}
 .dsfv .dsfv-finish-mark{display:none}
 .dsfv .dsfv-finishes{margin-bottom:13px}
 .dsfv .dsfv-finish{padding:9px 3px}
 .dsfv .dsfv-swatch img{aspect-ratio:1.6}
 .dsfv .dsfv-chosen{margin-top:11px;padding-top:9px}
 .dsfv .dsfv-color-name{font-size:17px}
 .dsfv .dsfv-actions{margin-top:8px}
}

/* Independent clearcoat selection. */
.dsfv .dsfv-sheens{display:flex;align-items:center;gap:6px;margin-top:12px}
.dsfv .dsfv-sheens>span{font-size:12px;margin-right:auto;color:#576575}
.dsfv .dsfv-sheens button{font:inherit;font-size:11px;cursor:pointer;border:1px solid #dbe1e7;border-radius:6px;padding:6px 10px;background:#fff;color:#344356}
.dsfv .dsfv-sheens button[aria-pressed="true"]{background:#102139;color:#fff;border-color:#102139}
.dsfv .dsfv-sheens button:focus-visible{outline:3px solid #86b9df;outline-offset:2px}

/* Keep the live floor visible while the mobile controls scroll below it.
   A block layout lets sticky positioning span the entire controls panel.
   Hosts with a fixed header can set --dsfv-sticky-top on the widget. */
@container(max-width:820px){
 .dsfv .dsfv-layout{display:block}
 .dsfv .dsfv-main{position:sticky;top:calc(var(--dsfv-sticky-top,0px) + max(6px,env(safe-area-inset-top,0px)));z-index:3;margin-bottom:20px;padding:6px 0 10px;background:var(--dsfv-bg);border-radius:12px;box-shadow:0 8px 14px -12px #10213966}
 .dsfv .dsfv-stage:not(:fullscreen){width:min(100%,calc(min(34svh,260px) * var(--dsfv-ratio,1.333333)));margin-inline:auto}
 .dsfv .dsfv-status:empty{display:none}
 .dsfv .dsfv-tools:has([data-action=outline][hidden]){display:none}
 .dsfv.dsfv-is-editing .dsfv-main{position:relative;top:auto;z-index:auto;box-shadow:none}
 .dsfv.dsfv-is-editing .dsfv-stage:not(:fullscreen){width:100%}
 .dsfv .dsfv-side button,.dsfv .dsfv-side a,.dsfv .dsfv-side input{scroll-margin-top:calc(var(--dsfv-sticky-top,0px) + min(34svh,260px) + 28px)}
}

.dsfv .dsfv-photo-upload{position:absolute;bottom:12px;right:12px;min-height:44px;padding:9px 12px;font-size:12px;font-weight:700;line-height:1.3;background:#fffffff2;box-shadow:0 2px 12px #10213922}
.dsfv .dsfv-upload-guide{display:grid;gap:6px;padding:14px;margin-bottom:12px;background:#e9f5fc;border:2px solid #294e72;border-radius:9px;font-size:13px;line-height:1.45;scroll-margin-top:calc(var(--dsfv-sticky-top,0px) + 12px)}
.dsfv .dsfv-upload-guide strong{font-size:17px}
.dsfv .dsfv-point-count{font-weight:700;color:#294e72}
.dsfv.dsfv-is-editing .dsfv-tools .dsfv-apply{min-height:46px;font-weight:700}
.dsfv.dsfv-is-editing .dsfv-side .dsfv-label{opacity:.6}
@container(max-width:440px){
 .dsfv .dsfv-photo-upload{bottom:8px;right:8px;font-size:11px;padding:8px}
 .dsfv .dsfv-compare-badge{left:8px;bottom:8px;font-size:10px;padding:7px 8px;max-width:calc(100% - 156px)}
}/* Local automatic detection,with optional brush corrections after the preview. */
.dsfv .dsfv-detection{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:28px;text-align:center;color:#102139;background:#ffffffe8;pointer-events:none}
.dsfv .dsfv-detection strong{max-width:300px;font-size:17px;line-height:1.4}
.dsfv .dsfv-detection>span:last-child{font-size:12px;color:#4c6175}
.dsfv .dsfv-spinner{display:block;width:30px;height:30px;border:3px solid #d4e2ed;border-top-color:#294e72;border-radius:50%;animation:dsfv-spin .9s linear infinite}
@keyframes dsfv-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.dsfv .dsfv-spinner{animation:none;border-style:dashed}}
.dsfv .dsfv-correction-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:center;margin-top:10px}
.dsfv .dsfv-correction-actions button,.dsfv .dsfv-mask-tools button{font:inherit;font-size:12px;line-height:1.25;padding:9px 11px;background:#fff;border:1px solid #c9d5df;border-radius:6px;cursor:pointer;color:#294e72;min-height:38px}
.dsfv .dsfv-correction-actions [data-action=refine]{font-weight:700;background:#f0f7fc}
.dsfv .dsfv-correction-actions [data-action=outline]{font-size:11px;background:transparent;border-color:transparent;color:#667786;text-decoration:underline;text-underline-offset:3px}
.dsfv .dsfv-mask-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
.dsfv .dsfv-brush-modes{display:flex;gap:6px}
.dsfv .dsfv-mask-tools button[aria-pressed=true],.dsfv .dsfv-mask-tools .dsfv-apply{background:#102139;color:#fff;border-color:#102139}
.dsfv .dsfv-mask-tools button:disabled{opacity:.45;cursor:default}
.dsfv .dsfv-brush-size{display:flex;align-items:center;gap:8px;font-size:12px;color:#3e5368;margin-inline:6px}
.dsfv .dsfv-brush-size input{max-width:105px;accent-color:#294e72}
.dsfv.dsfv-is-editing .dsfv-mask-tools [data-mask-action=apply]{font-weight:700;min-width:80px}
.dsfv .dsfv-editing .dsfv-canvas{touch-action:none}
@container(max-width:440px){
 .dsfv .dsfv-correction-actions{gap:4px;margin-top:7px}
 .dsfv .dsfv-correction-actions button{font-size:10px;padding:6px 8px;min-height:32px}
 .dsfv .dsfv-correction-actions [data-action=outline]{font-size:10px}
 .dsfv .dsfv-compare-badge{bottom:62px;white-space:nowrap;max-width:calc(100% - 16px)}
 .dsfv .dsfv-detection strong{font-size:14px}
 .dsfv .dsfv-detection>span:last-child{font-size:10px}
 .dsfv .dsfv-mask-tools{gap:6px}
 .dsfv .dsfv-brush-size{width:100%;margin:0;padding:4px 0}
 .dsfv .dsfv-brush-size input{flex:1;max-width:180px}
}

/* Direct comparison handle. The image remains scrollable around its touch target. */
.dsfv .dsfv-divider{position:absolute;width:2px;background:#fff;pointer-events:none;box-shadow:0 0 2px #10213966}
.dsfv .dsfv-compare-handle{position:absolute;top:53%;left:50%;width:44px;height:44px;min-height:44px;padding:0;display:grid;place-items:center;transform:translate(calc(-50% + var(--dsfv-handle-shift,0px)),-50%);border:2px solid #fff;border-radius:50%;background:#fff;color:#102139;box-shadow:0 1px 8px #10213955;pointer-events:auto;touch-action:none;cursor:ew-resize;user-select:none;font:700 22px/1 Arial}
.dsfv .dsfv-compare-handle:hover:not(:disabled){border-color:#fff;background:#edf6fc}
.dsfv .dsfv-compare-handle span{pointer-events:none}
