.room-editor{--r-ink:var(--atelier-ink);--r-line:var(--atelier-line);--r-paper:#fff;min-width:0;color:var(--r-ink)}
.room-editor *{box-sizing:border-box}
.room-editor [data-room-section="start"]{margin-top:12px}
.room-editor [data-room-section="start"] summary{font-size:1.12rem}
.room-editor .room-view-options{padding:0 14px 10px}
.room-editor .room-view-options label{display:flex;flex-direction:row;align-items:center;gap:10px;font-size:.82rem}
.room-editor .room-view-options select{width:auto;max-width:80%;font-size:.9rem}
.room-editor .room-library{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:7px}
.room-editor .room-library button{padding:8px;display:flex;gap:7px;align-items:center;text-align:left;font-size:.86rem;border-color:#d6cbc1}
.room-editor .room-library small{display:block;font-size:.72rem;color:#705f57;font-weight:400}
.room-editor .room-swatch{width:30px;height:34px;display:grid;place-items:center;background:#f7f2ee;color:#694a3b;border-radius:4px;font-size:1.25rem;flex-shrink:0}
.room-editor .room-inline-status{color:#705f57;font-size:.9rem;line-height:1.45}
.room-editor .room-inline-status:empty{display:none}
.room-editor .room-advanced{padding-top:8px;border-top:1px solid var(--r-line)}
.room-editor .room-advanced>[data-toggle-advance]{width:100%;text-align:left;background:transparent}
.room-editor [data-toggle-advance]::after{content:'+';float:right}
.room-editor [data-toggle-advance][aria-expanded="true"]::after{content:'−'}
.room-editor .room-advanced>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr));align-items:end;gap:8px;padding-top:8px}
.room-editor [data-tool-status]{grid-column:1/-1;font-size:.9rem}
.room-editor [data-tool-status]:empty{display:none}
.room-swatch rect{stroke:#866750;fill:#e9dcd0}
.room-swatch path,.room-fixture{stroke:#674e3c;stroke-width:1.4;stroke-linejoin:round;stroke-linecap:round;fill:none}
.room-fixture{vector-effect:non-scaling-stroke}
.room-hotplate{fill:#413c39}
@media(max-width:520px){.room-editor #room-start label:has(select){grid-column:1/-1}}
.room-editor .room-legend b{font-weight:650;color:#401f16}
.room-map .room-detail,.room-map .room-frame,.room-map .room-guide,.room-map .room-wall-face,.room-elevation rect{vector-effect:non-scaling-stroke}
.room-map .room-detail{fill:none;stroke:#746153;stroke-width:1;pointer-events:none}
.room-map .room-detail.pull,.room-map .room-detail.tap{stroke:#513d31;stroke-width:1.6;stroke-linecap:round}
.room-map .room-detail.bowl{fill:#afbec1;stroke:#706b66}
.room-map .room-detail.inset{fill:#e2e6e5}
.room-map .room-detail.cooktop,.room-map .room-detail.oven{fill:#5b5550;stroke:#3c3835}
.room-map .room-detail.burner{stroke:#ede9df}
.room-map .room-wall-face{fill:#fff;stroke:#c9bbae}
.room-map .room-guide{fill:none;stroke:#d3c8bd;stroke-dasharray:4 4}
.room-map .room-frame{stroke:#618d90;fill:#deeeee}
.room-map .room-frame.door{stroke:#ac8865;fill:#efe6d5}
.room-map .room-dimension{fill:#401f16;font-family:system-ui,sans-serif;font-weight:550}
.room-map .room-measure{cursor:pointer}
.room-map .room-measure rect{fill:#faf8f6;fill-opacity:.92;stroke:transparent}
.room-map .room-measure:hover rect,.room-map .room-measure:focus-visible rect{stroke:#603149;vector-effect:non-scaling-stroke}
.room-editor .room-wall-edit{display:flex;flex-wrap:wrap;align-items:end;gap:6px;padding:8px 12px;background:#faf7f5}
.room-wall-edit label{flex:1 1 110px}
@media(max-width:480px){.room-editor .room-views{flex:1 0 100%}.room-editor .room-views button{flex:1;font-size:.8rem;padding:8px 5px}}
.room-editor [hidden]{display:none!important}
.room-editor .room-drawing,.room-editor details{background:var(--r-paper);border:1px solid var(--r-line);border-radius:8px}
.room-editor .room-drawing{overflow:hidden}
.room-editor .room-title{padding:16px 18px;display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}
.room-editor h2,.room-editor h3,.room-editor p{margin:0}
.room-editor h2{font:500 clamp(1.45rem,2vw,2.05rem)/1.14 var(--atelier-serif);letter-spacing:-.04em}
.room-editor h3{font-size:1rem;margin:1rem 0 .25rem}
.room-editor button,.room-editor select,.room-editor input{font:inherit;color:inherit;max-width:100%;min-width:0}
.room-editor button{border:1px solid #b8a79e;border-radius:7px;background:var(--r-paper);padding:9px 13px;min-height:44px;cursor:pointer;font-weight:600}
.room-editor button:hover{background:#f6f1f3}
.room-editor button:disabled{opacity:.5;cursor:default}
.room-editor button:focus-visible,.room-editor :is(select,input,summary):focus-visible{outline:3px solid #603149;outline-offset:2px}
.room-editor .room-views{display:flex;gap:3px;background:#f4efed;border-radius:8px;padding:3px}
.room-editor .room-views button{background:transparent;border:0;font-size:.88rem;padding:8px 12px}
.room-editor .room-views [aria-pressed="true"]{background:white;box-shadow:0 1px 3px #45221d20}
.room-editor .room-scroll{--map-h:clamp(290px,34vw,455px);height:var(--map-h);overflow:auto;overscroll-behavior:contain;background:#faf8f6}
.room-editor .room-map{width:100%;height:100%;display:block;background-color:#faf8f6;background-image:linear-gradient(#876a5420 1px,transparent 1px),linear-gradient(90deg,#876a5420 1px,transparent 1px);background-size:24px 24px}
.room-editor .room-scroll[data-zoom="true"] .room-map{width:200%;max-width:none;height:200%}
.room-editor .room-scroll[data-orbit="true"]{touch-action:pan-y pinch-zoom;overscroll-behavior-y:auto;user-select:none;cursor:grab}
.room-editor .room-scroll[data-orbit="true"]:focus-visible{outline:3px solid #603149;outline-offset:-3px}
.room-editor .room-scroll.is-turning,.room-editor .is-turning .room-cab{cursor:grabbing}
.room-editor .room-orbit-tools{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:8px 12px 0}
.room-editor .room-orbit-tools button{min-height:44px;padding:5px 8px;font-size:.85rem}
.room-editor .room-orbit-tools output{min-width:3ch;text-align:center;font-size:.82rem;font-variant-numeric:tabular-nums}
.room-editor .room-key{display:flex;align-items:center;gap:8px;justify-content:space-between;padding:8px 12px}
.room-editor .room-key button{font-size:.85rem;flex:0 0 auto}
.room-map polygon,.room-map polyline{stroke-linejoin:round;vector-effect:non-scaling-stroke}
.room-map .room-floor{fill:#fffcf8;stroke:#6d4d3f;stroke-width:2.2}
.room-map .room-cab{cursor:pointer;--face:#e4cdb0;--edge:#93725c;--side:#b49980;--cap:#ebdaca}
.room-map .room-upper{--face:#f4efe8;--edge:#918074;--side:#c8b6a4;--cap:#f1e9de}
.room-map .room-island{--face:#d8bfa0;--edge:#92744a;--side:#b69a77;--cap:#efe0c9}
.room-map .room-selected{--face:#e8d9d6;--edge:#603149;--side:#bca099;--cap:#e8d7d2}
.room-map .room-footprint,.room-map .room-face,.room-map .room-lid{stroke:var(--edge);stroke-width:1.1;fill:var(--face)}
.room-map .room-upper .room-footprint{stroke-dasharray:3 2}
.room-map .room-selected polygon{stroke-width:2}
.room-map .room-face.f1{fill:var(--side)}
.room-map .room-lid{fill:var(--cap)}
.room-map .room-index,.room-map .room-wall-label{font-family:system-ui,sans-serif;fill:#401f16;font-weight:600}
.room-map .room-opening{stroke:#267785;stroke-width:4;fill:none}
.room-map .room-opening.door{stroke:#a34a27;stroke-dasharray:6 2}
.room-map .room-opening.frame{stroke-width:1.5}
.room-map [data-opening]{cursor:pointer}
.room-map .room-opening-hit{fill:none;stroke:transparent;stroke-width:20;vector-effect:non-scaling-stroke;pointer-events:stroke}
.room-map .room-door-swing{fill:#d3a87b20;stroke:#986541;stroke-width:1.25;stroke-dasharray:3 2;pointer-events:none}
.room-map .room-door-swing.has-conflict{fill:#a1262133;stroke:#a12621;stroke-width:2.5;stroke-dasharray:none;vector-effect:non-scaling-stroke}
.room-map [data-opening]:focus-visible .room-opening-hit{stroke:#c9a7ba}
.room-editor .room-legend,.room-editor .room-help{font-size:.87rem;line-height:1.5;color:#705f57}
.room-editor .room-legend{padding:0}
.room-editor details{margin-top:10px;overflow:clip}
.room-editor summary{padding:14px 17px;min-height:44px;font-size:1.05rem;line-height:1.3;font-weight:650;cursor:pointer}
.room-editor details[open]>summary{border-bottom:1px solid var(--r-line)}
.room-editor .room-fields{display:grid;gap:12px;padding:15px 17px 18px}
.room-editor form,.room-editor fieldset{display:grid;gap:11px;margin:0;min-width:0;border:0;padding:0}
.room-editor fieldset.cooling-hinge{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:4px 12px}
.room-editor fieldset.cooling-hinge[hidden]{display:none}
.room-editor fieldset.cooling-hinge label{display:inline-flex;flex:1 1 140px;align-items:center;gap:8px;min-height:44px;padding-inline:8px;border:1px solid #dacde0;border-radius:8px}
.room-editor fieldset.cooling-hinge input{min-height:auto;width:1em;height:1em;margin:0}
.room-editor legend{padding:0 0 8px;font-weight:650}
.room-editor .room-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(135px,100%),1fr));gap:9px 12px}
.room-editor label{display:flex;flex-direction:column;align-items:stretch;gap:5px;font-size:.87rem;font-weight:570;min-width:0}
.room-editor input,.room-editor select{width:100%;min-height:44px;padding:8px 10px;border:1px solid #b8a79e;border-radius:6px;background:white;font-size:1rem;line-height:1.25}
.room-editor .room-actions,.room-editor .room-select-actions{display:flex;align-items:end;gap:7px;flex-wrap:wrap}
.room-editor .room-select-actions label{flex:1 1 220px}
.room-editor .room-apply{background:var(--atelier-plum);color:white;border-color:var(--atelier-plum);justify-self:start}
.room-editor .room-apply:hover{background:#492135}
.room-editor .room-bottom{margin:13px 0;align-items:center}
.room-editor .room-bottom button{font-size:.87rem}
.room-editor .room-feedback:empty,.room-editor .room-status:empty,.room-editor .room-error:empty{display:none}
.room-editor .room-feedback:not(:empty){margin:10px 0;padding:12px 16px;background:#fff4df;border:1px solid #ddcba6;border-radius:8px;color:#643e1d}
.room-editor .room-feedback ul{margin:5px 0;padding-left:18px;font-size:.93rem;line-height:1.45}
.room-editor .room-feedback .room-warnings:only-child{margin:0}
.room-editor .room-status,.room-editor .room-error{font-size:.9rem;line-height:1.4}
.room-editor .room-error{color:#963f22}
@media(max-width:520px){.room-editor .room-title{padding:12px}.room-editor .room-fields{padding:12px}.room-editor .room-scroll{--map-h:clamp(248px,72vw,350px)}.room-editor .room-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.room-editor .room-title{border-bottom:1px solid var(--r-line)}
.room-editor .room-view-options{padding:7px 14px;border-bottom:1px solid var(--r-line)}
.room-editor .room-view-options label{color:var(--atelier-muted)}
.room-editor .room-view-options select{min-height:32px;padding:3px 20px 3px 8px}
.room-editor .room-views [aria-pressed="true"]{color:var(--atelier-plum);box-shadow:0 1px 3px #482e2629}
.room-editor .room-key{align-items:flex-start;flex-wrap:wrap;padding:14px 17px;border-top:1px solid var(--r-line)}
.room-facts{flex:1 1 225px;min-width:0}
.room-facts dl{display:flex;flex-wrap:wrap;gap:8px 18px;margin:0 0 7px}
.room-facts dt{font-size:.75rem;color:var(--atelier-muted)}
.room-facts dd{margin:2px 0 0;font-size:.91rem;font-weight:640}
.room-key-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.room-editor .room-key-actions button:last-child{color:var(--atelier-plum);font-size:.82rem}
.room-editor .room-legend{font-size:.8rem}
.room-editor .room-number,.room-editor .room-grain{pointer-events:none}
.room-map .room-number circle{fill:#fffcf8;stroke:var(--edge);stroke-width:1;vector-effect:non-scaling-stroke}
.room-map .room-selected .room-number circle,.room-map [data-cab]:focus-visible .room-number circle{fill:var(--atelier-plum);stroke:white}
.room-map .room-selected .room-number text,.room-map [data-cab]:focus-visible .room-number text{fill:white}
.room-map [data-cab]:focus-visible{outline:none}
.room-map [data-cab]:focus-visible :is(.room-footprint,.room-face,.room-lid){stroke:var(--atelier-plum);stroke-width:3}
.room-editor .room-grain{fill:var(--grain,none);opacity:.70}
.room-editor .room-elevation .room-footprint{fill:var(--grain,var(--face))}
.room-editor[data-finish=oak]{--grain:url(#atelier-grain-oak)}
.room-editor[data-finish=veneer]{--grain:url(#atelier-grain-veneer)}
.room-editor[data-finish=oak] .room-cab{--face:#ceae88;--side:#bc9776;--cap:#e3ccab}
.room-editor[data-finish=enamel] .room-cab{--face:#f0e7d9;--side:#d7c7b6;--cap:#f7f0e7}
.room-editor[data-finish=veneer] .room-cab{--face:#b69579;--side:#96745b;--cap:#d5bca4}
.room-editor .room-cab.room-upper{--face:#f5ede4;--cap:#f1e5d8}
.room-editor .room-cab.room-selected{--edge:var(--atelier-plum)}
.room-editor .room-volume{background:#fcfaf8}
.room-editor .room-volume .room-floor{fill:#f2e8dd;stroke:#aa9582;stroke-width:1.2}
.room-editor summary::marker,.paper summary::marker{color:var(--atelier-plum)}
@media(max-width:520px){.room-editor .room-key{padding:12px}.room-editor .room-facts{flex-basis:100%}.room-key-actions button{padding:7px 11px}.room-editor .room-title{gap:8px}}
.room-map .room-measure line{stroke:#a38b78;stroke-width:1;vector-effect:non-scaling-stroke;pointer-events:none}
.room-map .room-measure .room-wall-hit{fill:transparent;stroke:none}
.room-map .room-wall-label{fill:#593b2c}
@media(max-width:520px){.room-editor .room-scroll{--map-h:clamp(265px,82vw,360px)}.room-editor .room-grid :is(input,select){font-size:16px}}

.room-editor .room-prop-placement{margin-top:13px;max-width:26rem}
.room-editor .room-prop-placement select{min-height:44px}
.room-editor .room-prop-shelf { margin-top:16px; }
.room-editor .room-prop-shelf h4,.room-editor .room-prop-current h4 { margin:0 0 8px; font-size:1rem; color:var(--site-heading,#30183e); }
.room-editor .room-prop-grid { display:grid; gap:7px; grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr)); }
.room-editor .room-prop-grid button {
  display:grid; text-align:left; align-content:start; min-height:54px; overflow-wrap:anywhere;
  padding:7px 10px; background:#faf6fc; border:1px solid #e1d4e9; color:#30183e;
}
.room-editor .room-prop-grid button:hover { background:#f1e5f8; border-color:#a973bf; }
.room-editor .room-prop-grid small { color:#62556b; font-size:.78rem; }
.room-editor .room-prop-preview { width:100%; height:78px; display:grid; place-items:center; border-radius:10px; background:linear-gradient(160deg,#fff,#f5edf8); }
.room-editor .room-prop-preview svg { display:block; width:100%; height:100%; }
@media (max-width:520px) {
  .room-editor .room-prop-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.room-editor .room-prop-current { padding:13px; border-radius:12px; background:#faf7fc; border:1px solid #e1d4e9; }
.room-editor .room-prop-notice { margin:8px 0; padding:9px 12px; background:#fff3df; border-radius:8px; }
.room-map .room-prop-footprint { stroke:#6b3b7e; stroke-width:2; fill:#ecddf6; fill-opacity:.85; vector-effect:non-scaling-stroke; }
.room-map .room-prop-footprint.on-counter { stroke:#4d6176; fill:#d7eafb; }
.room-map .room-prop-footprint.has-conflict {stroke:#a12621;fill:#fbe5e1;stroke-width:2.5;stroke-dasharray:4 3}
.room-map .room-prop-conflict-mark {fill:#8b1c17;font-weight:800;pointer-events:none}
.room-map .room-opening.door.has-conflict {stroke:#a12621}
.room-prop-notice > p{margin:0 0 6px}
.room-prop-notice button{min-height:44px}
.room-map [data-room-prop] { cursor:pointer; }
.room-map [data-room-prop]:is(:focus-visible,:hover) .room-prop-footprint { stroke:#75149d; stroke-width:3; }
.room-map .room-opening.doorway { stroke:#8752a2; stroke-dasharray:10 5; }
@media(max-width:430px) {
  .room-editor .room-prop-current .room-actions button { min-height:44px; }
}

.room-editor .room-scene-choice { display:grid; gap:6px; margin-bottom:16px; padding:12px; border:1px solid #e3d5ed; border-radius:12px; background:#faf6fc; }
.room-editor .room-scene-choice > label { font-weight:700; color:#421961; }
.room-editor .room-scene-choice select { width:100%; min-height:44px; margin-top:4px; }
.room-editor .room-scene-choice .room-help { margin:0; }
.room-editor [data-room-form="appearance"] .room-palette-grid { margin-top:14px; }
