/* Roomwise palette: ivory, sand, taupe, burgundy and deep brown. */
:root{--rw-page:#f9f4ee;--rw-ivory:#f9f4ee;--rw-sand:#eadfd0;--rw-taupe:#ba9386;--rw-burgundy:#915851;--rw-ink:#321c17;--rw-wordmark:#511e22;--roomwise-highlight:var(--rw-sand);--pink:var(--rw-sand);--butter:var(--rw-sand);--accent:var(--rw-burgundy);--focus:var(--rw-taupe);--line:var(--rw-sand);--surface:var(--rw-ivory);--ink:var(--rw-ink);--muted:#886e64}
body,#welcome,.how-works,.setup,#editor,#editor header,#editor .workspace,#editor .library,#editor .details,#editor footer,.library-page,.library-page>header,.library-page footer{background:var(--rw-page);color:var(--rw-ink)}
#editor header,.library-page>header,header,footer,#editor .library,#editor .details{border-color:var(--rw-sand)}
.logo,.logo b,.welcome-word,.wordmark,.library-page>header>a:first-child{color:var(--rw-wordmark)}
body a,.library-browse,.budget-heading button,.account-switch button,.product-link a,#editor #selected .product-link a{color:var(--rw-burgundy)}
body .muted,body label,.library-page .card small,.library-price-tools p,.brand .project,.settings-nav small{color:#886e64}
#editor .furniture-actions{background:var(--rw-sand);border-color:#d9c6b7}
#editor .furniture-actions .muted{color:#80675e}
#editor .furniture-actions #addBtn,#editor .furniture-actions .library-download-button{background:var(--rw-burgundy);color:var(--rw-ivory);border-color:var(--rw-burgundy)}
#editor .furniture-actions #addBtn:hover,#editor .furniture-actions .library-download-button:hover{background:#7d4944;border-color:#7d4944}
#editor .furniture-actions .person-add{background:#f9f3edb3;border-color:#d5bfb0;color:var(--rw-burgundy)}
body button.dark,body button.primary,#addDialog .dark,#recommendationsDialog .dark,#recommendationsDialog .recommendation-card button,#costDialog #approveCost,.library-page .card a.use-model{background:var(--rw-burgundy);color:var(--rw-ivory);border-color:var(--rw-burgundy);box-shadow:none}
body button.dark:hover,body button.primary:hover,.library-page .card a.use-model:hover{background:#7d4944;border-color:#7d4944}
#editor button.active,#editor .piece.selected,#editor #roomTabs button.active,#editor #wallsBtn[aria-pressed=true],.library-page .filters button.active,.mac-select-option[aria-selected=true],.mac-select-option.focused,#sketchDialog button.active,#sketchDialog [aria-pressed=true],#sketchDialog .sketch-presets button[aria-pressed=true],#sketchDialog .sketch-presets button.active,#sketchDialog .sketch-point-tools button[aria-pressed=true],#sketchDialog #sketchWalls>button.active,#planEditTools [aria-pressed=true],#editDetected[aria-pressed=true],.character-choice[aria-pressed=true],.character-presets button.active,.settings-nav button.active{background:var(--rw-sand);border-color:var(--rw-taupe);color:var(--rw-burgundy)}
#editor .piece:hover{background:#efe3d9}.mac-select-button[aria-expanded=true]{border-color:var(--rw-taupe);box-shadow:0 0 0 3px #ac918526}
#editor input[type=checkbox],#editor input[type=range],dialog input[type=checkbox],dialog input[type=range],body input[type=checkbox]{accent-color:var(--rw-burgundy)}
#editor .statusdot{background:var(--rw-taupe)}
body button:focus-visible,body a:focus-visible,body input:focus-visible,body select:focus-visible{outline-color:var(--rw-taupe)}body input:focus,body select:focus,body textarea:focus{border-color:var(--rw-taupe)}
body dialog,.setup-inner,.library-page .card,.settings-card{background:#fdfaf7;border-color:var(--rw-sand)}
body input:not([type=range]):not([type=checkbox]):not([type=color]):not([data-price]),body textarea,.mac-select-button{background:#fffdfb;border-color:#dbcbbf;color:var(--rw-ink)}
.library-page .filters,.switch,.sketch-point-tools{background:#ede2d9}.library-page .card img{background:var(--rw-page)}
.rotation-control,.room-budget,.wall-picker-plan{border-color:var(--rw-sand)}.rotation-control{background:#f2e8df}.rotation-heading span{color:var(--rw-burgundy)}
#photoChoices button.active,#photoChoices img.active{border-color:var(--rw-taupe);box-shadow:0 0 0 3px #e7d8ca80}
.credit-packs>div,.person-photo-picker,.upload-card,.draw-apartment{background:#f0e5db;border-color:var(--rw-sand)}.upload-icon{background:var(--rw-sand);color:var(--rw-burgundy)}
#editor .room-budget progress::-webkit-progress-value{background:var(--rw-taupe)}#editor .room-budget progress::-moz-progress-bar{background:var(--rw-taupe)}
#sketchDialog>.brand-dialog-header{background:#f9f3edf2;border-color:var(--rw-sand)}
#addDialog .photo-cleanup-option{background:#f0e5db;border-color:var(--rw-sand);color:#74574c}

#sketchCanvas{background:var(--rw-ivory)}
/* Inverted furniture action panel. */
#editor .furniture-actions{background:#c17c70;border-color:#c17c70}
#editor .furniture-actions h2,#editor .furniture-actions .paneltitle{color:var(--rw-ivory)}
#editor .furniture-actions .paneltitle>span,#editor .furniture-actions .muted{color:var(--rw-sand)}
#editor .furniture-actions #addBtn,#editor .furniture-actions .library-download-button{background:var(--rw-ivory);border-color:var(--rw-ivory);color:var(--rw-burgundy)}
#editor .furniture-actions #addBtn:hover,#editor .furniture-actions .library-download-button:hover{background:var(--rw-sand);border-color:var(--rw-sand)}
#editor .furniture-actions .person-add{background:var(--rw-sand);border-color:var(--rw-sand);color:var(--rw-burgundy)}

#editor .recommendations-trigger.recommendations-simple{position:absolute;left:auto!important;top:auto!important;right:20px!important;bottom:94px!important;display:inline-flex!important;align-items:center;justify-content:center;width:auto!important;height:auto!important;min-height:38px;padding:10px 15px;background:#fdfaf7ed!important;color:var(--rw-burgundy);border:1px solid var(--rw-sand)!important;border-radius:12px;box-shadow:0 2px 12px #22070708!important;cursor:pointer;touch-action:manipulation;transform:none!important;font-size:12px;font-weight:600;z-index:3}
#editor .recommendations-simple:hover{background:var(--rw-sand)!important}
#editor .recommendations-simple:focus-visible{outline:2px solid var(--rw-taupe);outline-offset:3px;border-radius:12px}
@media(max-width:700px){#editor .recommendations-trigger.recommendations-simple{right:14px!important;bottom:74px!important;min-height:34px;padding:8px 11px;font-size:11px}}

/* Burgundy header, cream wordmark and muted rose accents. */
#editor header,.library-page>header,body>header{background:#511e22;border-bottom-color:#633036}
#editor header .logo,#editor header .logo b,.library-page>header>a:first-child,body>header .wordmark{color:#fff6cf}
#editor header .brand .project,.library-page>header>span{color:#d7c0b1}

#editor .selectedactions,#editor .movepiece,#editor #aiState{display:none!important}

#editor header .headright>button,.library-page>header .dashboard-back{background:var(--rw-ivory);border-color:var(--rw-ivory);color:#511e22}

#editor header .headright>button:hover,.library-page>header .dashboard-back:hover{background:var(--rw-sand);border-color:var(--rw-sand)}

/* Compact planner header, with touch targets preserved on phones. */
#editor header{height:68px;min-height:68px;flex:0 0 68px}
@media(max-width:700px){#editor header{height:64px;min-height:64px;flex-basis:64px;padding-top:8px;padding-bottom:8px}}
#editor .furniture-actions h2,#editor .furniture-actions .paneltitle,#editor .furniture-actions .paneltitle>span,#editor .furniture-actions .muted{color:#321c17}

/* Three equally discoverable ways to create a room. */
#setup .setup-layout{width:min(100%,960px);max-width:960px!important}
#setup .room-start-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:28px 0 0}
#setup .room-start-option{position:relative;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:13px;min-height:190px;padding:22px;border:1px solid var(--rw-sand);border-radius:18px;background:#fffdfb;color:var(--rw-ink);box-shadow:none}
#setup .room-start-option b{font-size:17px;line-height:1.3;letter-spacing:-.3px;max-width:190px}
#setup .room-start-description{font-size:12px;font-weight:400;color:#886e64;line-height:1.5;margin-top:auto;padding-right:16px}
#setup .room-start-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:var(--rw-page);color:var(--rw-burgundy)}
#setup .room-start-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#setup .room-start-arrow{position:absolute;right:18px;bottom:22px;color:var(--rw-burgundy);font-size:20px}
#setup .room-start-featured{background:var(--rw-sand);border-color:var(--rw-burgundy);box-shadow:0 2px 8px #511e220a}
#setup .room-start-featured .room-start-icon{background:var(--rw-burgundy);color:var(--rw-ivory)}
#setup .room-start-option:hover,#setup .room-start-option[aria-expanded=true]{border-color:var(--rw-burgundy);background:#f2e7df}
#setup #dimensionForm{margin-top:24px;padding-top:14px;border-top:1px solid var(--rw-sand)}
#setup #resumeRoom{margin-top:24px}
@media(max-width:700px){#setup .room-start-options{grid-template-columns:1fr;gap:12px}#setup .room-start-option{min-height:112px;padding:18px 44px 18px 76px;gap:6px;justify-content:center}#setup .room-start-icon{position:absolute;left:18px;top:50%;transform:translateY(-50%)}#setup .room-start-option b{max-width:none;font-size:16px}#setup .room-start-description{margin-top:0;padding:0}#setup .room-start-arrow{bottom:auto;top:50%;transform:translateY(-50%)}#setup .setup-layout .setup-inner{padding:24px}}

/* Keep the three room creation choices in one vertical list. */
#setup .setup-layout{width:min(100%,650px);max-width:650px!important}
#setup .room-start-options{grid-template-columns:1fr;gap:12px}
#setup .room-start-option{min-height:112px;padding:20px 52px 20px 82px;gap:6px;justify-content:center}
#setup .room-start-icon{position:absolute;left:22px;top:50%;transform:translateY(-50%)}
#setup .room-start-option b{max-width:none}
#setup .room-start-description{margin-top:0;padding:0}
#setup .room-start-arrow{bottom:auto;top:50%;transform:translateY(-50%)}
@media(max-width:700px){#setup .room-start-option{padding:18px 44px 18px 76px}#setup .room-start-icon{left:18px}}
.plan-countertops{margin:20px 0;padding:16px;border:1px solid var(--rw-sand);border-radius:14px;background:#f5e9e3}.plan-counter-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.plan-counter-heading h3{margin:0;font-size:14px}.plan-counter-heading>span{font-size:12px;color:var(--rw-burgundy)}.plan-countertops .muted{font-size:11px;margin:8px 0}.plan-countertops>label{font-size:11px}.plan-countertops input[type=number]{max-width:120px}.plan-countertops>button{width:100%;font-size:12px}.plan-countertops button[aria-pressed=true]{background:var(--rw-sand);border-color:var(--rw-burgundy)}#planFixtureList{display:grid;grid-template-columns:1fr 1fr;gap:5px;max-height:150px;overflow:auto}#planFixtureList label{display:flex;gap:7px;align-items:center;font-size:11px;margin:3px 0}.counter-category{display:block;color:var(--rw-burgundy);font-size:10px;margin-top:4px}

/* Visible, parallel choices make the space being built explicit. */
.plan-room-picker{margin:0 0 18px}.plan-room-picker h3{font-size:16px;margin:0 0 12px;color:var(--rw-ink)}
#planRoomChoices{display:grid;gap:9px;max-height:275px;overflow:auto;padding:3px;margin:-3px}
#planRoomChoices .plan-room-choice{position:relative;display:grid;grid-template-columns:56px minmax(0,1fr) 20px;align-items:center;gap:10px;margin:0;padding:12px;border:1px solid var(--rw-sand);border-radius:13px;background:#fffdfb;cursor:pointer;min-height:76px;transition:background .15s,border-color .15s}
#planRoomChoices .plan-room-choice:hover{border-color:var(--rw-burgundy)}
#planRoomChoices .plan-room-choice.is-selected{background:#f0e1d8;border-color:var(--rw-burgundy);box-shadow:0 1px 4px #511e220a}
#planRoomChoices .plan-room-choice input{position:absolute;width:1px;height:1px;opacity:0;margin:0;min-width:0;padding:0}
#planRoomChoices .plan-room-choice:has(input:focus-visible){outline:2px solid var(--rw-burgundy);outline-offset:1px}
.plan-room-choice svg{width:56px;height:44px;display:block}.plan-room-choice polygon{fill:#eee5dc;stroke:#ac9185;stroke-width:1.5;stroke-linejoin:round}.plan-room-choice.is-selected polygon{fill:#c17c7055;stroke:#915851}
.plan-room-choice-copy{display:grid;gap:5px;min-width:0}.plan-room-choice-copy b{font-size:13px;line-height:1.3;color:var(--rw-ink)}.plan-room-choice-copy small{font-size:11px;color:#886e64;font-weight:400}
.plan-room-choice-check{display:grid;place-items:center;width:19px;height:19px;border:1px solid #d0bbae;border-radius:50%;font-size:12px}.is-selected .plan-room-choice-check{background:var(--rw-burgundy);border-color:var(--rw-burgundy);color:#fffdfb}

/* Guided floor-plan review: space, countertops, scale. */
#floorDialog .plan-canvas-stage{height:min(66dvh,700px);min-width:0;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid var(--rw-sand);border-radius:14px;background:#fff}
#floorDialog .plan-canvas-stage canvas{width:auto;height:auto;max-width:100%;max-height:100%;border:0;border-radius:0}
.plan-review-controls{height:min(66dvh,700px);display:flex;flex-direction:column;min-width:0}
.plan-progress{display:flex;gap:8px;justify-content:space-between;margin:0 0 22px;padding:0;list-style:none;font-size:10px;color:#886e64}
.plan-progress li{display:flex;align-items:center;gap:5px;white-space:nowrap}.plan-progress li>span{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1px solid var(--rw-sand);font-size:11px}.plan-progress .current{color:var(--rw-burgundy);font-weight:600}.plan-progress .current>span,.plan-progress .complete>span{background:var(--rw-burgundy);border-color:var(--rw-burgundy);color:white}.plan-progress .complete{color:var(--rw-burgundy)}
#planStepPanels{flex:1;min-height:0;overflow:auto;padding:2px;margin:-2px}#planStepPanels>div>h3{font-size:18px;margin:0 0 16px}#planStepPanels h3:focus{outline:none}
.plan-step-actions{display:flex;gap:8px;padding-top:18px;margin-top:auto}.plan-step-actions button{min-height:44px;font-size:12px}.plan-step-actions .dark{flex:1;margin:0}.plan-step-actions #planStepBack{background:transparent;border-color:var(--rw-sand)}
.plan-counter-decision{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 18px}.plan-counter-decision button{font-size:13px;min-height:46px}.plan-counter-decision [aria-pressed=true]{background:#f0e1d8;border-color:var(--rw-burgundy);color:var(--rw-burgundy)}
#planCounterControls .plan-countertops{margin:0}#planStepPanels .plan-wall-scale{margin-top:0}#planStepPanels .plan-wall-scale h3{font-size:18px;margin-top:0}
@media(max-width:650px){#floorDialog .plan-canvas-stage{height:32dvh;min-height:200px}.plan-review-controls{height:auto;min-height:350px}.plan-progress{margin-top:0;margin-bottom:18px;font-size:11px}#planStepPanels{flex:initial;overflow:visible}.plan-step-actions{margin-top:18px}.planreview{gap:20px}}
.plan-wall-scale>button{width:100%;margin-top:10px}.plan-wall-scale #planScaleSource{margin:12px 0;font-weight:400}.plan-wall-scale #planScaleStatus:empty,.plan-wall-scale #planScaleSource:empty{display:none}.plan-scale-help{font-size:.85rem}
.image-dimension-dialog{width:min(760px,94vw)}.image-dimension-layout{display:grid;grid-template-columns:1.1fr 1fr;gap:24px}.image-dimension-layout img{width:100%;height:300px;object-fit:contain;background:#fff;border-radius:16px}.image-dimension-layout label{display:block;margin:12px 0}.image-dimension-layout button,.image-dimension-layout select{width:100%}#readImageDimensions{margin-top:12px;font-size:.85rem} @media(max-width:600px){.image-dimension-layout{grid-template-columns:1fr}.image-dimension-layout img{height:220px}}
#addDialog #specReview #bedDimensionNote:not([hidden]),#addDialog #specReview #artworkDimensionNote:not([hidden]){display:block!important;font-size:12px;line-height:1.5;margin:12px 0;color:var(--rw-muted,#8b7166)}

/* A product link is the primary entry; a photo is an alternative. */
#addDialog .urlrow{padding:20px;background:#f2e7df;border:1px solid #d9b7aa;border-radius:16px;align-items:center}
#addDialog .urlrow label{margin:0;color:var(--rw-ink);font-size:14px;font-weight:700}
#addDialog .urlrow input{border-color:#bd8a7d;min-height:48px}
#addDialog #productLinkHint{display:block;margin-top:9px;font-size:12px;line-height:1.5;font-weight:400;color:var(--rw-muted,#886e64)}
#addDialog .urlrow #fetchProduct{margin:0;min-height:48px;align-self:center;white-space:nowrap}
#addDialog .product-image-upload{margin:18px 0 8px;padding:0;border:0;background:transparent}
#addDialog .product-source-or{display:flex;align-items:center;gap:14px;margin:0 0 16px;font-size:12px;color:#97857c}
#addDialog .product-source-or:before,#addDialog .product-source-or:after{content:"";height:1px;flex:1;background:var(--rw-sand)}
#addDialog #uploadProductImage{background:transparent;border-color:var(--rw-sand);box-shadow:none;font-size:12px;min-height:38px;padding:8px 12px;color:#886e64}
#addDialog #productImageFilename{font-size:11px;color:#9b8a81}
@media(max-width:550px){#addDialog .urlrow{flex-direction:column;align-items:stretch;padding:16px}#addDialog .urlrow label{width:100%}#addDialog .urlrow #fetchProduct{align-self:stretch}#addDialog .image-upload-actions{flex-direction:row;align-items:center;flex-wrap:wrap}}

#addDialog #generationPhotoNote:not([hidden]){display:block!important;font-size:12px;line-height:1.5;margin:14px 0 0;color:#886e64}

/* Keep the primary build action in view while photos and measurements scroll. */
#addDialog>.custombuild{display:flex;flex-direction:column;flex:none;gap:10px;margin:16px 0 0;padding:16px 0 0;border-top:1px solid var(--rw-sand);background:#fcfbf8}
#addDialog:has(#productReview[hidden])>.custombuild,#addDialog.library-import>.custombuild{display:none!important}
#addDialog>.custombuild #customizeProduct{width:100%;min-height:52px;font-size:15px;font-weight:700;box-shadow:0 3px 8px #511e2214}
#addDialog>.custombuild .photo-cleanup-option{background:transparent;border:0;box-shadow:none;padding:2px 0!important;gap:9px;font-size:12px;font-weight:500;color:#886e64;align-items:flex-start}
#addDialog>.custombuild .photo-cleanup-option input{margin-top:2px}
#addDialog>.custombuild .photo-cleanup-option small{font-size:11px;line-height:1.5;color:#9b8a81;margin-top:3px}
#addDialog #cleanupPriceNote{font-size:11px;font-weight:400}
#addDialog:not(.library-import) .reviewhero{margin-top:12px;gap:20px}
#addDialog:not(.library-import) .reviewhero>img{height:250px;padding:12px}
#addDialog .reviewhero #photoChoices{gap:7px}
#addDialog .reviewhero #photoChoices img{width:56px;height:58px}
#addDialog #generationPhotoNote:not([hidden]){font-size:11px;margin-top:10px}
@media(max-width:600px){#addDialog:not(.library-import) .reviewhero>img{height:180px}#addDialog>.custombuild{padding-top:12px;margin-top:10px}#addDialog>.custombuild #customizeProduct{min-height:48px}}

#addDialog:not(.library-import) .modelcompare:not(.has-product-model),#addDialog .dialogbuttons:has(#placeProduct[hidden]){display:none!important}

.plan-scale-options{display:grid;gap:10px;margin:18px 0 22px}.plan-scale-options button{text-align:left;padding:16px;background:#fffdfa;border:1px solid var(--rw-sand);border-radius:14px;font-weight:400}.plan-scale-options strong{display:block;font-size:14px;color:var(--rw-ink)}.plan-scale-options small{display:block;font-size:12px;line-height:1.5;color:#886e64;margin-top:5px}.plan-scale-options button[aria-pressed=true]{background:#f0e0d9;border-color:var(--rw-burgundy);box-shadow:0 0 0 1px var(--rw-burgundy)}.plan-scale-options button:disabled{opacity:.65}#planScaleSource:empty,#planScaleStatus:empty{display:none}
#planProgress li[role="button"]{cursor:pointer;border-radius:8px}#planProgress li[role="button"]:focus-visible{outline:2px solid #998c42;outline-offset:5px}#planCanvas{touch-action:none}
/* Homepage: cream action with olive lettering and a compact room vignette. */
#welcome #startBtn{background:#511e22;border-color:#511e22;color:#fff6cf}
#welcome #startBtn span{color:inherit}
#welcome #startBtn:hover{background:#633036;border-color:#633036}
#welcomeRoom{scale:.77}

/* Advice always describes the generation source, independent of gallery browsing. */
#addDialog .photo-quality-advice:not([hidden]){display:block!important;padding:10px 12px;border:1px solid #d5d9c9;border-radius:12px;background:#f1f3eb;color:#526044;font-size:12px;line-height:1.45}
#addDialog .photo-quality-advice[data-level="recommended"],#addDialog .photo-quality-advice[data-level="replace"]{background:#fff8e8;border-color:#e0c68a;color:#795b2c}
#addDialog .photo-quality-advice strong{display:block;font-size:12px}
#addDialog .photo-quality-advice p{margin:3px 0 0;font-size:11px;color:inherit}
#addDialog .photo-quality-advice button:not([hidden]){margin-top:7px;padding:6px 10px;min-height:30px;font-size:11px;background:#fffdf7;border:1px solid #d0b477;color:#795b2c}

/* A horizontal workspace keeps the generated model and its action in view. */
#addDialog[open]{width:min(640px,94vw);max-width:94vw}
#addDialog[open]:has(#productReview:not([hidden])){width:min(920px,94vw)}
#addDialog #importEntryChoices{display:grid;grid-template-columns:minmax(0,1fr);gap:24px}
#addDialog #importEntryChoices .urlrow{display:flex;flex-wrap:wrap;gap:12px}
#addDialog #importEntryChoices .urlrow label{flex:1 1 280px;min-width:0}
#addDialog #importEntryChoices .product-image-upload{margin:0}
#addDialog:has(#productReview:not([hidden])) #importEntryChoices{display:none!important}
#addDialog[open]:has(#productReview:not([hidden])):not(.editing-source){display:flex;flex-direction:column;height:min(760px,94dvh);max-height:94dvh;padding:24px 28px}
#addDialog[open]:has(#productReview:not([hidden])):not(.editing-source)>#productReview{display:flex!important;flex:1;min-height:0;overflow:hidden;padding:0}
#addDialog #changeImportSource{position:absolute;top:23px;right:80px;margin:0}
#addDialog #importWorkspace{display:grid!important;grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr);gap:40px;width:100%;min-height:0;padding-top:44px}
#addDialog #importSourcePanel{min-width:0;min-height:0;overflow:auto;padding-right:6px;scrollbar-width:thin}
#addDialog #importSourcePanel .reviewhero{display:flex!important;flex-direction:column;gap:12px;margin:0}
#addDialog #importSourcePanel .reviewhero>div{display:contents}
#addDialog #importSourcePanel .reviewhero h3{order:-1;margin:0;font-size:16px;line-height:1.35}
#addDialog #importSourcePanel .reviewhero>img{width:100%;height:clamp(150px,25dvh,220px);max-height:none;padding:12px;object-fit:contain;box-sizing:border-box;border-radius:16px}
#addDialog #importSourcePanel #photoChoices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:0;width:100%;overflow:visible}
#addDialog #importSourcePanel #photoChoices button{width:100%;min-width:0;padding:4px;border-radius:11px}
#addDialog #importSourcePanel #photoChoices img{width:100%;height:46px;object-fit:contain}
#addDialog #importSourcePanel #generationPhotoNote{margin:10px 0;font-size:11px}
#addDialog #importModelPanel{position:relative;display:flex;flex-direction:column;min-height:0;min-width:0;gap:10px}
#addDialog #importModelHeading{margin:0;font-size:21px;line-height:1.35}
#addDialog #importModelPanel .modelcompare{display:block!important;flex:1;min-height:160px;max-height:360px;margin:0;overflow:hidden;border:1px solid #d8c6b6;border-radius:18px;background:#f4eee5;box-shadow:0 8px 24px #513a2412,0 1px 3px #513a2410}
#addDialog #importModelPanel .modelcompare figure{display:none!important}
#addDialog #importModelPanel .product-model-column,#addDialog #importModelPanel .modelpreview{height:100%;width:100%;margin:0;min-height:0;display:flex;flex-direction:column}
#addDialog #importModelPanel .modelpreview canvas{flex:1;min-height:0;width:100%;height:100%}
#addDialog #importModelPanel .modelpreview span{flex:none;padding:6px;font-size:10px}
#addDialog #importModelPlaceholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;height:100%;min-height:160px;padding:24px;text-align:center;box-sizing:border-box;color:#948478;font-size:12px}
#addDialog #importModelPlaceholder strong{font-size:16px;color:#706659}
#addDialog .modelcompare.has-product-model #importModelPlaceholder,#addDialog .modelcompare:not(.has-product-model) .product-model-column{display:none!important}
#addDialog #importModelPanel #specReview{flex:none;margin:0;padding:10px 0 0;border-top:1px solid var(--rw-sand)}
#addDialog #importModelPanel #specSummary{margin:0 0 8px;font-size:13px}
#addDialog #importModelPanel #specReview .three{gap:10px;margin:0}
#addDialog #importModelPanel #specReview label{margin:0;font-size:11px}
#addDialog #importModelPanel #specReview input{min-height:36px;padding:8px 10px}
#addDialog #importModelPanel #bedDimensionNote,#addDialog #importModelPanel #artworkDimensionNote{font-size:10px!important;margin:7px 0 0!important;line-height:1.4!important}
#addDialog #importModelPanel .custombuild{display:flex;flex-direction:column;flex:none;gap:8px;margin:0;padding:10px 0 0;border-top:1px solid var(--rw-sand)}
#addDialog #importModelPanel .custombuild #customizeProduct{order:0;width:100%;min-height:46px;font-size:14px;margin:0}
#addDialog #importModelPanel .photo-quality-advice{order:1}
#addDialog #importModelPanel .photo-cleanup-option{order:2;background:transparent;border:0;box-shadow:none;padding:0;font-size:11px;color:#886e64;gap:8px;align-items:flex-start}
#addDialog #importModelPanel .photo-cleanup-option small{font-size:10px;line-height:1.4;margin-top:3px}
#addDialog #importModelPanel .photo-cleanup-option input{margin-top:2px}
#addDialog #importModelPanel #customBuildStatus{order:3;margin:0;padding:10px;font-size:11px;max-height:70px;overflow:auto}
#addDialog #importModelPanel .dialogbuttons{order:-1;flex:none;margin:0;display:flex}
#addDialog #importModelPanel #placeProduct{width:100%;min-height:46px;font-size:15px;margin:0}
#addDialog.has-built-model #importModelPanel #customizeProduct{min-height:30px;width:auto;align-self:flex-end;padding:5px 12px;font-size:11px;background:transparent;color:#886e64;border:1px solid var(--rw-sand);box-shadow:none}
#addDialog.library-import #importModelPanel .custombuild>:not(.dialogbuttons){display:none!important}
@media(max-width:760px){
 #addDialog #importEntryChoices{grid-template-columns:1fr;gap:18px}
 #addDialog[open]:has(#productReview:not([hidden])):not(.editing-source){height:auto;max-height:94dvh;padding:22px 18px}
 #addDialog[open]:has(#productReview:not([hidden])):not(.editing-source)>#productReview{overflow-y:auto}
 #addDialog #importWorkspace{grid-template-columns:1fr;gap:20px;padding-top:40px}
 #addDialog #importSourcePanel{overflow:visible;padding:0}
 #addDialog #importSourcePanel .reviewhero>img{height:190px}
 #addDialog #importModelPanel .modelcompare{flex:none;height:320px}
 #addDialog.has-built-model #importSourcePanel .reviewhero>img{height:120px}
}


/* Distinct source and result columns, without crowding the narrower dialog. */
#addDialog #importModelPanel:before{content:"";position:absolute;left:-21px;top:0;bottom:0;width:1px;background:#d4c4b3}
#addDialog.has-built-model #customizeProduct,#addDialog.has-built-model .photo-cleanup-option,#addDialog.has-built-model #photoQualityAdvice{display:none!important}
@media(max-width:760px){#addDialog #importModelPanel:before{left:0;right:0;top:-12px;bottom:auto;width:auto;height:1px}}

#addDialog #importSourceHeading{margin:0 0 12px;font-size:14px;color:#887669;font-weight:600}

/* Simple photo surfaces and a real gutter keep selected photos separate. */
#addDialog #importSourcePanel #generationPhotoNote{display:none!important}
#addDialog #importSourcePanel .reviewhero>img{display:block;flex:none;padding:0;border:0;border-radius:6px;box-shadow:none;background:transparent}
#addDialog #importSourcePanel #photoChoices{margin:16px 0 0;padding:2px;gap:10px}
#addDialog #importSourcePanel #photoChoices button{padding:3px;border:1px solid #ded6cb;border-radius:6px;box-shadow:none;background:transparent;min-height:0}
#addDialog #importSourcePanel #photoChoices button.active,#addDialog #importSourcePanel #photoChoices button.chosen-view{border:2px solid #b59a63;padding:2px;background:#f8f4eb;box-shadow:none}
#addDialog #importSourcePanel #photoChoices img,#addDialog #importSourcePanel #photoChoices img.active{display:block;padding:0;border:0;border-radius:3px;background:transparent;box-shadow:none}

.window-resize-overlay{position:absolute;inset:0;pointer-events:none;z-index:4;overflow:hidden}
.window-resize-overlay svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.window-resize-overlay polygon{fill:none;stroke:#947265;stroke-width:1;vector-effect:non-scaling-stroke}
.window-resize-overlay .window-resize-handle{position:absolute;pointer-events:auto;height:24px;min-height:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;touch-action:none;transition:none}
.window-resize-handle:after{content:"";position:absolute;left:50%;top:50%;width:7px;height:7px;transform:translate(-50%,-50%) var(--handle-plane);background:#fffaf2;border:1px solid #8f6f61;border-radius:50%;box-shadow:0 1px 3px #321c171c}
.window-resize-handle.edge:after{width:14px;height:5px;border-radius:4px}
.window-resize-handle[data-edge=left]:after,.window-resize-handle[data-edge=right]:after{width:5px;height:14px}
.window-resize-overlay .window-resize-handle.corner{height:40px;z-index:2;border-radius:50%}
.window-resize-overlay .window-resize-handle.edge{height:28px;z-index:1}
.window-resize-handle:after{transition:background-color 120ms ease,border-color 120ms ease,box-shadow 120ms ease}
.window-resize-handle:hover:after,.window-resize-handle:focus-visible:after,.window-resize-handle.is-active:after{background:#511e22;border-color:#511e22;box-shadow:0 1px 3px #511e2240}
.window-resize-overlay.is-resizing .window-resize-handle:not(.is-active){visibility:hidden;pointer-events:none}
.window-resize-overlay .window-resize-handle:focus-visible{outline:none}

.window-live-dimension{position:absolute;transform:translate(-50%,-50%);padding:3px 7px;border-radius:5px;background:#fcf9f2ed;color:#70574e;font-size:11px;font-weight:500;font-variant-numeric:tabular-nums;line-height:1.25;white-space:nowrap;opacity:0;transition:opacity 180ms ease;pointer-events:none;box-shadow:0 1px 4px #321c170b}
.window-resize-overlay.is-dragging .window-live-dimension{opacity:1}
@media(prefers-reduced-motion:reduce){.window-live-dimension{transition:none}}

#editor header #homeLogo{display:inline-flex;align-items:center;gap:10px;line-height:1}
#editor header #homeLogo .roomwise-brand-mark{display:block;width:1.6em;height:1.6em;flex:none;object-fit:contain}

.library-more-status{min-height:40px;display:flex;align-items:center;justify-content:center;margin:20px 0 8px;color:var(--muted);font-size:12px}
.library-load-more{display:block;margin:0 auto 24px}
.library-load-more[hidden]{display:none}
.library-page .grid .card img{aspect-ratio:24/17;object-fit:contain;display:block}

/* Keep actions aligned even when titles, references, or price notes wrap. */
.library-page .grid .card{display:flex;flex-direction:column;align-items:stretch}
.library-page .grid .card img{flex-shrink:0}
.library-page .grid .card a.use-model{margin-top:auto;flex-shrink:0}
.library-page .grid .card .library-price-checked{margin-bottom:16px}

.library-filter-row{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:24px}
.library-page .library-filter-row .filters{margin-bottom:0}
.library-price-filter{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;min-height:44px;font-size:12px;color:#886e64;flex-wrap:wrap}
.library-price-filter input{width:88px;min-width:0;padding:10px;border-radius:9px;font:inherit}
.library-price-filter button{padding:10px 12px;border-radius:9px;font-size:12px}
.library-price-filter button[type=submit]{background:#511e22;color:#fff6cf;border-color:#511e22}
.library-price-filter button[hidden],.library-price-filter-message[hidden]{display:none}
.library-page .library-price-filter-message{font-size:12px;margin:-10px 0 20px;max-width:none}
.library-price-filter .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:650px){.library-price-filter{margin-left:0;justify-content:flex-start}.library-filter-row{gap:12px}.library-price-filter input{width:80px}}

.library-filter-menu{position:relative;margin-left:auto;color:#70574e;font-size:12px;z-index:5}
.library-filter-menu summary{list-style:none;cursor:pointer;padding:12px 18px;background:#fffdfb;border:1px solid #dbcbbf;border-radius:10px;min-height:44px;display:flex;align-items:center;gap:24px;font-weight:600}
.library-filter-menu summary::-webkit-details-marker{display:none}
.library-filter-menu[open] summary{background:#ede2d9}
.library-filter-menu .library-price-filter{position:absolute;right:0;top:calc(100% + 8px);width:290px;max-width:calc(100vw - 36px);padding:18px;background:#fffdfb;border:1px solid #dbcbbf;border-radius:14px;box-shadow:0 10px 30px #321c171c;justify-content:flex-start;gap:10px;margin:0}
.library-price-filter>strong{width:100%;font-size:13px;margin-bottom:2px}
.library-filter-menu .library-price-filter input{width:112px}
.library-sort-label{display:flex;flex-direction:column;gap:7px;width:100%;margin-top:8px}
.library-sort-label select{width:100%;padding:10px;border:1px solid #dbcbbf;border-radius:9px;background:#fffdfb;color:#321c17;font:inherit}
.library-filter-actions{display:flex;gap:8px;margin-top:6px;width:100%}
.library-filter-actions button{flex:1}
@media(max-width:650px){.library-filter-menu{margin-left:0}.library-filter-menu .library-price-filter{left:0;right:auto}}

/* Library previews share the current workspace instead of the retired dialog children. */
#addDialog.library-import #importWorkspace{grid-template-columns:1fr;gap:14px}
#addDialog.library-import #importSourcePanel{border:0;padding:0;overflow:visible;flex:none}
#addDialog.library-import #importSourceHeading,#addDialog.library-import #photoChoices,#addDialog.library-import #generationPhotoNote{display:none!important}
#addDialog.library-import #importSourcePanel .reviewhero{margin:0;display:block}
#addDialog.library-import #importSourcePanel .reviewhero h3{font-size:19px;margin:0}
#addDialog.library-import #importModelPanel{min-height:0;flex:1}
#addDialog.library-import #importModelHeading{font-size:14px;color:#886e64}

#addDialog.library-import>.brand-dialog-header,#addDialog.library-import>#importEntryChoices{display:none!important}
#addDialog.library-import #importSourcePanel .reviewhero{padding:0;min-height:0;height:auto}

.wall-opening-editor .wall-editor-area,.wall-opening-editor .window-editor-area{padding:12px;border:1px solid #e5dace;border-radius:12px;background:#fbf7f1;margin-top:12px;min-width:0}
.wall-opening-editor h4{margin:0 0 10px;font-size:13px;line-height:1.4;font-weight:600;color:#511e22}
.wall-opening-editor .wall-editor-area .wall-picker-plan{margin-top:0}
.wall-opening-editor .wall-editor-area>label{margin-bottom:0}
.wall-opening-editor .window-editor-area>.muted:first-of-type{margin:0 0 14px}
.wall-opening-editor .window-editor-area #windowList:empty{display:none}

/* Wall and Window are independent inspector sections. */
.wall-opening-editor{margin:0;padding:0;border:0}
.wall-opening-editor .wall-editor-area,.wall-opening-editor .window-editor-area{margin:20px 0;padding:18px 0;border:0;border-top:1px solid #e4dfd5;border-radius:0;background:transparent}
.wall-opening-editor .wall-editor-area>h3,.wall-opening-editor .window-editor-area>h3{margin:0 0 12px;font-size:14px;font-weight:600;color:var(--rw-ink)}

/* Keep library downloads compact; the wider workspace is reserved for photo imports. */
#addDialog.library-import[open]:has(#productReview:not([hidden])):not(.editing-source){width:min(640px,94vw);height:auto;max-height:90dvh;padding:22px 24px;overflow-y:auto}
#addDialog.library-import[open]:has(#productReview:not([hidden])):not(.editing-source)>#productReview{flex:none;overflow:visible}
#addDialog.library-import #importWorkspace{padding-top:28px;gap:12px}
#addDialog.library-import #importSourcePanel .reviewhero h3{font-size:17px}
#addDialog.library-import #sharedModelMatch{padding:9px 12px;margin-top:6px}
#addDialog.library-import #sharedModelMatch strong{font-size:12px}
#addDialog.library-import #sharedModelMatch p{font-size:11px;margin-top:3px}
#addDialog.library-import #importModelPanel .modelcompare{flex:none;height:clamp(200px,32dvh,280px);min-height:180px;max-height:280px;border-radius:14px}
#addDialog.library-import #importModelPanel #placeProduct{min-height:42px;font-size:14px}
@media(max-width:600px){#addDialog.library-import[open]:has(#productReview:not([hidden])):not(.editing-source){padding:18px}.library-import #specReview .three{gap:6px}}
#addDialog.library-import[open]:has(#productReview:not([hidden])):not(.editing-source){inset:50% auto auto 50%;transform:translate(-50%,-50%);margin:0}

#addDialog.library-import #sharedModelMatch{display:none!important}
#addDialog.library-import #importModelPanel:before{display:none}
#addDialog.library-import #importSourcePanel .reviewhero h3{font-size:22px;line-height:1.3;font-weight:700;letter-spacing:-.3px;text-align:left;margin:0;padding-right:32px}
#addDialog.library-import #importModelPanel #placeProduct{min-height:54px;padding:14px 18px;font-size:16px;font-weight:600;box-shadow:0 4px 10px #513a2418}
#addDialog.library-import #reviewTitle{font-size:22px!important;font-weight:700!important;line-height:1.3!important;text-align:left!important;align-self:stretch;width:100%;box-sizing:border-box}

#editor header .brand{gap:0;align-self:center}
#editor header .brand .project{line-height:1.25;margin-top:0;transform:translateY(-4px)}
.photo-upload-kind{display:block;margin:0 0 14px;font-size:12px}
.photo-upload-kind select{display:block;width:100%;margin-top:6px;padding:10px}
#uploadedImageOptions{margin:0 0 12px;font-size:11px}
#uploadedImageOptions[hidden],#uploadedImageOptions [hidden]{display:none!important}
#uploadedImageOptions label{display:block;margin:0 0 8px;font-size:11px}
#uploadedImageOptions select{display:block;width:100%;margin-top:5px;padding:9px}
#uploadedImageOptions button{font-size:11px;padding:7px 10px;min-height:30px}
#uploadedImageOptions p{font-size:10px;line-height:1.5;margin:8px 0;color:#886e64}
.artwork-crop-dialog{width:min(620px,94vw);max-height:92dvh;padding:24px;overflow:auto;border:1px solid #dbcbbf;border-radius:20px;background:#fdfaf7;color:#321c17}
.artwork-crop-dialog h2{font-size:22px;margin:0 0 8px}.artwork-crop-dialog p{font-size:12px;line-height:1.5;margin:0 0 16px}
.artwork-crop-dialog canvas{display:block;max-width:100%;height:auto;margin:0 auto 16px;touch-action:none;cursor:crosshair;border-radius:4px}
.artwork-crop-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.artwork-crop-fields label{font-size:11px}.artwork-crop-fields input{display:block;box-sizing:border-box;width:100%;padding:8px;margin-top:5px}
.artwork-crop-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:18px;flex-wrap:wrap}.artwork-crop-actions button{padding:10px 14px;font-size:12px}

/* The source confirmation now describes the actual submission, not browsing. */
#addDialog:not(.library-import) #importSourcePanel #generationPhotoNote:not([hidden]){display:block!important}

/* Keep the primary recommendation action and view controls aligned as one stack. */
#editor .scene-action-stack{position:absolute;right:20px;bottom:20px;display:flex;flex-direction:column;align-items:stretch;gap:10px;z-index:3}
#editor .scene-action-stack #recommendationsBtn{position:static!important;inset:auto!important;width:100%!important;height:auto!important;min-height:40px;padding:10px 16px;border:1px solid #511e22!important;border-radius:12px;background:#511e22!important;color:#fff6cf!important;cursor:pointer;box-shadow:0 4px 12px #511e2215;transform:none!important}
#editor .scene-action-stack #recommendationsBtn:hover{background:#64292e!important;border-color:#64292e!important}
#editor .scene-action-stack .scenecontrols{position:static!important;inset:auto!important;display:flex;justify-content:space-between;width:100%;box-sizing:border-box;margin:0}
@media(max-width:700px){#editor .scene-action-stack{right:14px;bottom:14px;gap:8px}#editor .scene-action-stack #recommendationsBtn{min-height:36px;padding:9px 13px}}

/* A generated result remains replaceable after review, including poor results. */
#addDialog.has-built-model.can-rebuild-model #customizeProduct{display:block!important}
#addDialog.has-built-model.can-rebuild-model .photo-cleanup-option:not([hidden]){display:flex!important}

#addDialog .sheet-close-dock #changeImportSource{top:17px;right:40px;min-height:30px;height:30px;margin:0;padding:6px 10px;pointer-events:auto}
#addDialog:has(#productReview[hidden]) #changeImportSource{display:none}
#addDialog #continueTrellis,#meshBuildTray #meshBuildContinue{background:#c17c70;border-color:#c17c70;color:#321c17;font-weight:700}
#addDialog #continueTrellis:hover,#meshBuildTray #meshBuildContinue:hover{background:#b66e63;border-color:#b66e63}

/* Each click target opens only its own inspector. */
#editor:not(.room-inspector) .details>.roomsettings{display:none}
#editor.window-inspector #selected,#editor.window-inspector #aiState{display:none}
#editor.window-inspector .details{display:flex!important;flex-direction:column}
#editor.window-inspector .selectiontitle{order:-1;margin-bottom:12px}
#editor #windowInspector[hidden]{display:none!important}
#editor #addRoomWindow{width:100%;margin:12px 0;background:var(--rw-sand);color:var(--rw-wordmark)}
#windowInspector .wall-editor-area{margin-top:0;border-top:0}
#windowInspector .wall-editor-area>h3{display:none}

/* The numbered room diagram is the entry point for window editing. */
#windowInspector .window-diagram-card{background:#f3eee6;border:1px solid #e5dace;border-radius:14px;padding:12px}
#windowInspector .window-diagram-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
#windowInspector .window-diagram-heading strong{font-size:12px;color:var(--rw-ink)}
#windowInspector #addDiagramWindow{background:#915851;color:#fff6e6;border-color:#915851;white-space:nowrap;min-height:34px;padding:7px 10px}
#windowInspector .wall-picker-plan{display:block;width:100%;height:auto;aspect-ratio:4/3;background:transparent;margin:10px 0}
#windowInspector .diagram-wall-hit{stroke:transparent;stroke-width:18}
#windowInspector .diagram-window-hit{stroke:transparent;stroke-width:20}
#windowInspector .diagram-window-opening{stroke:#915851;stroke-width:6;paint-order:stroke;filter:drop-shadow(0 1px 1px #fff)}
#windowInspector .diagram-window-leader{stroke:#ba9386;stroke-width:1}
#windowInspector .diagram-window-badge-hit{fill:transparent}
#windowInspector .diagram-window-badge{fill:#fffaf3;stroke:#915851;stroke-width:1.3}
#windowInspector .diagram-window text{font:600 10px Arial,sans-serif;fill:#511e22;stroke:none;pointer-events:none}
#windowInspector .diagram-window.is-editing .diagram-window-badge,#windowInspector .diagram-window:hover .diagram-window-badge,#windowInspector .diagram-window:focus .diagram-window-badge{fill:#511e22;stroke:#511e22}
#windowInspector .diagram-window.is-editing text,#windowInspector .diagram-window:hover text,#windowInspector .diagram-window:focus text{fill:#fff6cf}
#windowInspector .diagram-window.is-editing .diagram-window-opening{stroke:#511e22;stroke-width:7}
#windowInspector #windowDiagramHint{margin:0;color:#80695f;font-size:11px}
#windowInspector #windowList{display:grid;gap:6px;margin:12px 0}
#windowInspector .window-select-row{display:flex;width:100%;align-items:center;gap:9px;text-align:left;background:transparent;border-color:#e5dace;padding:10px;min-height:42px}
#windowInspector .window-select-row strong{font-size:12px}
#windowInspector .window-select-row span{flex:1;font-size:11px;font-weight:400;color:#886e64}
#windowInspector .window-select-row small{font-size:10px;color:#915851}
#windowInspector .window-select-row[aria-expanded=true]{background:#f2e6dc;border-color:#ba9386}
#windowInspector .window-select-row[aria-expanded=true] small{color:#511e22;font-weight:700}
#windowInspector .window-details-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}
#windowInspector .window-details-heading h3{margin:0;font-size:16px;color:#511e22}
#windowInspector #closeWindowDetails{border:0;background:transparent;font-size:20px;line-height:1;padding:2px 8px;min-height:28px;color:#886e64}
#windowInspector .window-editing-status{margin:5px 0 18px;font-size:11px;color:#915851;line-height:1.5}
#windowInspector #saveWindow{width:100%;background:#915851;border-color:#915851;color:#fff6e6}
#windowInspector #removeSelectedWindow{color:#915851;background:transparent;margin-top:8px}
/* Keep the diagram and its Add action visible while details scroll below. */
#editor.window-inspector .details{overflow:hidden}
#editor.window-inspector .selectiontitle{flex:none}
#windowInspector{display:flex;flex:1;min-height:0;flex-direction:column}
#windowInspector .wall-opening-editor{display:flex;flex:1;min-height:0;flex-direction:column}
#windowInspector .window-diagram-card{flex:none}
#windowInspector .wall-picker-plan{height:140px;aspect-ratio:auto;margin:6px 0}
#windowInspector #windowDetails{flex:1;min-height:0;overflow-y:auto;margin:12px 0 0;padding:12px 3px 12px 0;scrollbar-width:thin}
#windowInspector #windowList{flex:1;min-height:0;overflow-y:auto;align-content:start}
#windowInspector:has(#windowDetails:not([hidden])) #windowList{display:none}
.window-placement-guides{opacity:.7}
.window-placement-guides line{stroke:#947265;stroke-width:1;stroke-dasharray:3 4;vector-effect:non-scaling-stroke}
.window-placement-guides .guide-tick{stroke-dasharray:none}
.window-resize-overlay .window-placement-dimension{opacity:.9;font-size:10px;padding:3px 6px;background:#fcf9f2ed}
.window-resize-overlay.is-dragging .window-placement-guides,.window-resize-overlay.is-dragging .window-placement-dimension{opacity:1}
#windowInspector [data-window-wall]:hover line:not(.diagram-wall-hit),#windowInspector [data-window-wall]:focus line:not(.diagram-wall-hit){stroke:#915851;stroke-width:4}

/* Product sources and pattern/model controls use the same two-column workspace. */
#addDialog #importModelPanel #photoSurfaceControls{flex:none;margin:0;padding:12px 14px;border-radius:14px}
#addDialog #importModelPanel #photoSurfaceControls h3{font-size:14px;margin:0 0 8px}
#addDialog #importModelPanel #photoSurfaceControls label{font-size:12px;margin:0 0 8px}
#addDialog #importModelPanel #photoSurfaceControls p{font-size:11px;line-height:1.45;margin:8px 0}
#addDialog #importModelPanel #photoSurfaceControls #buildPhotoSurface{min-height:38px;font-size:13px;margin-top:6px;padding:9px 12px}
@media(min-width:601px){
 #addDialog[open]:has(#productReview:not([hidden])):not(.editing-source),#addDialog.library-import[open]:has(#productReview:not([hidden])):not(.editing-source){width:min(1000px,94vw);height:min(780px,94dvh);max-height:94dvh;overflow:hidden;padding:24px 28px}
 #addDialog[open]:has(#productReview:not([hidden])):not(.editing-source)>#productReview,#addDialog.library-import[open]:has(#productReview:not([hidden])):not(.editing-source)>#productReview{display:flex!important;flex:1;min-height:0;overflow:hidden}
 #addDialog #importWorkspace,#addDialog.library-import #importWorkspace{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:28px;padding-top:42px;min-height:0}
 #addDialog #importSourcePanel,#addDialog.library-import #importSourcePanel{min-height:0;overflow-y:auto;padding:0 6px 12px 0;scrollbar-width:thin}
 #addDialog #importModelPanel,#addDialog.library-import #importModelPanel{min-height:0;overflow-y:auto;padding:0 6px 12px 0;scrollbar-width:thin;gap:12px}
 #addDialog #importModelPanel .modelcompare,#addDialog.library-import #importModelPanel .modelcompare{flex:none;height:clamp(190px,30dvh,300px);min-height:190px;max-height:300px}
 #addDialog #importSourcePanel .reviewhero,#addDialog.library-import #importSourcePanel .reviewhero{display:flex!important;flex-direction:column;gap:14px}
 #addDialog #importSourcePanel .reviewhero>img,#addDialog.library-import #importSourcePanel .reviewhero>img{height:clamp(210px,36dvh,340px);width:100%;object-fit:contain;flex:none}
 #addDialog.library-import #importSourceHeading{display:block!important;font-size:14px;margin:0 0 14px}
 #addDialog.library-import #reviewTitle{font-size:20px!important;padding-right:0}
 #addDialog #importModelPanel:before{display:none}
}

/* A shared-library model for a real listing can be rebuilt: show the build controls on the library screen too. */
html body #addDialog.library-import.can-rebuild-model #importModelPanel .custombuild>#customizeProduct:not([hidden]){display:block!important}
html body #addDialog.library-import.can-rebuild-model #importModelPanel .custombuild>.photo-cleanup-option:not([hidden]){display:flex!important}
html body #addDialog.library-import.can-rebuild-model #importModelPanel .custombuild>#buildPlanNote:not([hidden]),html body #addDialog.library-import.can-rebuild-model #importModelPanel .custombuild>#customBuildStatus:not([hidden]){display:block!important}
/* Breathing room between the product photo and the photo buttons, and between the two buttons. */
html body #addDialog.library-import #importSourcePanel #cropBuildPhoto,html body #addDialog.library-import #importSourcePanel #cropBuildPhoto[hidden]+#replaceBuildPhoto{margin-top:20px!important}
html body #addDialog #importSourcePanel #cropBuildPhoto:not([hidden])+#replaceBuildPhoto{margin-top:10px!important}

/* Build progress: a calm bar that keeps moving, with the step and time left. */
.build-progress{display:flex;flex-direction:column;gap:7px;margin:2px 0 4px}
.build-progress[hidden],.build-progress-bar[hidden]{display:none!important}
.build-progress-bar{height:6px;border-radius:3px;background:#efe6dd;overflow:hidden}
.build-progress-bar>i{display:block;height:100%;width:0;border-radius:3px;background:linear-gradient(90deg,#b07a6c,#8f5b52);transition:width .6s ease}
.build-progress small{font-size:12px;color:#886e64;line-height:1.4}
.mesh-build-tray .build-progress-bar{margin:6px 0 4px;min-width:180px}
html body #addDialog.library-import.can-rebuild-model #importModelPanel .custombuild>#buildProgress:not([hidden]){display:flex!important}

/* Uploaded photos: the person names the item; show the name field with the dimensions. */
html body #addDialog.uploaded-item #specReview>label:has(#productName){display:block!important;margin:0 0 12px}
html body #addDialog.uploaded-item #specReview #productName{width:100%;box-sizing:border-box}
#addDialog label.needs-input input{border-color:#b9675a!important;box-shadow:0 0 0 3px #b9675a22}
/* Drop photos onto the import window. */
#addDialog.drop-target::after{content:'Drop photos to import';position:absolute;inset:14px;display:flex;align-items:center;justify-content:center;border:2px dashed #b07a6c;border-radius:18px;background:#faf6f1eb;color:#7a4f45;font-size:18px;font-weight:600;z-index:60;pointer-events:none}

/* Builder model downloads in the item panel. */
.model-export{margin:14px 0 4px;display:flex;flex-direction:column;gap:7px}
.model-export>span{font-size:12px;font-weight:600;color:#6d5a4f}
.model-export>div{display:flex;flex-wrap:wrap;gap:6px}
.model-export button{font-size:12px;padding:6px 10px;border-radius:9px;border:1px solid #e1d6cb;background:#fff;color:#5b463d;cursor:pointer}
.model-export button:disabled{opacity:.6;cursor:progress}
.model-export small{font-size:11px;color:#9b8a81}

/* Account at the top right: Sign in, or a round initial with a menu (like Google). */
header .account-area{position:relative;display:flex;align-items:center;margin-left:auto;padding-left:12px;z-index:40}
header .headright~.account-area{margin-left:12px}
html body .account-area .sign-in-top{min-height:36px;padding:8px 16px;border-radius:999px;border:1px solid #ffffffb8;background:transparent;color:#fff;font-size:13px;font-weight:600;cursor:pointer}
.account-area .sign-in-top:hover{background:#ffffff21}
html body .account-avatar{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;max-width:36px;min-height:36px;max-height:36px;flex:0 0 36px;aspect-ratio:1;box-sizing:border-box;border-radius:50%;background:#c98f6b;color:#fff;font-size:16px;font-weight:700;border:2px solid #ffffffd9;cursor:pointer;padding:0;line-height:1}
html body .account-avatar:hover,html body .account-avatar[aria-expanded="true"]{background:#b97c58;box-shadow:0 0 0 4px #ffffff33}
html body .account-avatar.large{width:44px;height:44px;min-width:44px;max-width:44px;min-height:44px;max-height:44px;flex-basis:44px;font-size:19px;border:0;cursor:default}
.account-menu{position:absolute;top:calc(100% + 10px);right:0;width:270px;background:#fffdf9;border:1px solid #e7ddd2;border-radius:16px;box-shadow:0 14px 40px #3b221a2e;padding:14px;display:flex;flex-direction:column;gap:12px}
.account-menu[hidden]{display:none}
.account-menu-head{display:flex;align-items:center;gap:12px;padding:2px 2px 12px;border-bottom:1px solid #efe6dc}
.account-menu-head strong{display:block;font-size:14px;color:#3f2a24;word-break:break-word}
.account-menu-head #creditBalance{font-size:12px;color:#8a7468}
.account-menu-items{display:flex;flex-direction:column;gap:2px}
html body .account-menu-items>button{display:block;width:100%;text-align:left;background:transparent!important;border:0!important;color:#4a3530!important;font-size:13px;font-weight:500;padding:9px 10px;border-radius:9px;min-height:0;box-shadow:none}
html body .account-menu-items>button:hover,html body .account-menu-items>button:focus-visible{background:#f3ebe3!important}
html body .account-menu-items>button[hidden]{display:none}

/* Eye-level walk view. */
.walk-start{width:100%;margin:0 0 12px}
.walk-bar{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);display:flex;align-items:center;gap:14px;max-width:min(860px,calc(100% - 32px));padding:12px 14px 12px 18px;background:#fffdf9f2;border:1px solid #e7ddd2;border-radius:16px;box-shadow:0 12px 34px #3b221a2e;z-index:30}
.walk-bar[hidden]{display:none}
.walk-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.walk-copy strong{font-size:14px;color:#3f2a24}
.walk-copy span{font-size:12px;color:#7a5e52}
.walk-copy small{font-size:11px;color:#9b8a81}
.walk-bar button{white-space:nowrap}
#room.walking{cursor:grab}
#room.walking:active{cursor:grabbing}
body.walk-mode .room-toolbar,body.walk-mode .view-switch{pointer-events:none;opacity:.35}

@media (hover:none),(max-width:820px){#viewWalk{display:none}}

.walk-stick{display:none;position:absolute;left:28px;bottom:96px;width:112px;height:112px;border-radius:50%;background:#ffffffd9;border:1px solid #e3d7cf;box-shadow:0 6px 20px #4a1f1f26;touch-action:none;user-select:none;z-index:6;cursor:grab}
body.walk-mode .walk-stick{display:block}
.walk-stick.active{cursor:grabbing;background:#fff}
.walk-stick-knob{position:absolute;left:50%;top:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;background:#8c4a42;box-shadow:0 3px 10px #4a1f1f4d;transition:transform .12s ease-out;pointer-events:none}
.walk-stick.active .walk-stick-knob{transition:none}
.walk-stick-arrow{position:absolute;font-size:10px;color:#b49a8f;pointer-events:none;line-height:1}
.walk-stick-arrow.up{top:8px;left:50%;transform:translateX(-50%)}.walk-stick-arrow.down{bottom:8px;left:50%;transform:translateX(-50%)}
.walk-stick-arrow.left{left:9px;top:50%;transform:translateY(-50%)}.walk-stick-arrow.right{right:9px;top:50%;transform:translateY(-50%)}

.walk-fast{display:none;position:absolute;left:28px;bottom:52px;width:112px;padding:8px 0;border-radius:999px;border:1px solid #e3d7cf;background:#fffdf9f2;color:#6b3b33;font-size:13px;font-weight:600;cursor:pointer;z-index:6}
body.walk-mode .walk-fast{display:block}
.walk-fast[aria-pressed="true"]{background:#8c4a42;border-color:#8c4a42;color:#fff}
.walk-stick{bottom:100px}
body.walk-mode .floor-picker{visibility:hidden}
/* Joystick stays out of the way: see-through until you reach for it. */
.walk-stick{background:#ffffff4d;border-color:#ffffff80;box-shadow:0 4px 14px #4a1f1f14;backdrop-filter:blur(2px);transition:background .2s,box-shadow .2s}
.walk-stick .walk-stick-knob{background:#8c4a42b3;box-shadow:0 2px 8px #4a1f1f26}
.walk-stick .walk-stick-arrow{color:#8c6a5ea6}
.walk-stick:hover,.walk-stick.active{background:#ffffffd9;box-shadow:0 6px 20px #4a1f1f26}
.walk-stick:hover .walk-stick-knob,.walk-stick.active .walk-stick-knob{background:#8c4a42}
.walk-fast{background:#ffffff4d;border-color:#ffffff80;color:#6b3b33cc;backdrop-filter:blur(2px);transition:background .2s,color .2s}
.walk-fast:hover{background:#fffdf9f2;color:#6b3b33}
.walk-fast[aria-pressed="true"]{background:#8c4a42d9;color:#fff}
.walk-help{width:36px;height:36px;padding:0;border-radius:50%;font-weight:700;flex:none}

/* Walk bar: compact and see-through so it covers less of the view; solid on hover. */
.walk-bar{bottom:14px;gap:10px;padding:7px 8px 7px 14px;background:#fffdf973;border-color:#ffffff99;box-shadow:0 6px 20px #3b221a1f;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);transition:background .2s}
.walk-bar:hover,.walk-bar:focus-within{background:#fffdf9e6}
.walk-copy strong{font-size:13px}
.walk-copy span{font-size:11.5px}
.walk-bar button{min-height:34px;height:34px;padding:0 14px;font-size:13px;border-radius:999px}
.walk-bar button:not(.dark){background:#ffffffa6}
.walk-bar .walk-help{width:34px;padding:0}
