/* Direct manipulation lives in an unmirrored wall view; tool previews stay 3D. */
.design-history{display:flex;gap:5px}.design-history button{padding:7px 10px;font-size:12px}
body.wall-editing main{grid-template-columns:260px minmax(0,1fr)}
body.wall-editing main>.inspector{display:none}
body.wall-editing .workbench{position:static;max-height:none;overflow:visible}
#wallEditor{background:#fcfaf6;border:1px solid #c9c1b3;border-radius:14px;overflow:hidden}
.wall-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:13px 16px;border-bottom:1px solid #ded9ce}
.wall-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.wall-actions button{padding:8px 10px;font-size:13px}.wall-actions label{display:flex;align-items:center;gap:6px;margin:0;font-size:13px}
.wall-actions button[aria-pressed="true"]{background:#355f52;color:white;border-color:#355f52}
.wall-workspace{display:grid;grid-template-columns:minmax(220px,1fr) 225px}
.wall-drawing{background:#e8e5dc;min-width:0;padding:12px;display:flex;flex-direction:column;justify-content:center}
#wallCanvas{display:block;width:100%;height:clamp(300px,55vh,620px);touch-action:none;user-select:none}
.wall-outline{fill:#ddbc9f;stroke:#9a7155;stroke-width:1.5;vector-effect:non-scaling-stroke}
.wall-opening{fill:#f6efe4;stroke:#8b674f;stroke-width:2;vector-effect:non-scaling-stroke;cursor:move}
.wall-opening.selected{stroke:#235e50;stroke-width:4;fill:#e5f1e5}
.wall-opening.invalid{stroke:#b52d25;fill:#f6d9cc}
.wall-crossbar{stroke:#8b674f;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}
.wall-snap-guide{stroke:#235e50;stroke-dasharray:3 2;stroke-width:1;vector-effect:non-scaling-stroke;pointer-events:none}
.wall-center-guide{stroke:#416f88;stroke-dasharray:5 4;stroke-width:1;opacity:.65;vector-effect:non-scaling-stroke;pointer-events:none}
.wall-center-guide.wall-center{stroke:#8d5432;stroke-dasharray:7 3;opacity:.8}
.wall-center-guide.symmetric-center{stroke-dasharray:2 5;opacity:.45}
.wall-handle{fill:#fff;stroke:#235e50;stroke-width:2;vector-effect:non-scaling-stroke;cursor:nwse-resize}
.wall-handle[data-handle=nw],.wall-handle[data-handle=se]{cursor:nwse-resize}.wall-handle[data-handle=ne],.wall-handle[data-handle=sw]{cursor:nesw-resize}
.wall-properties{padding:15px;border-left:1px solid #ded9ce;background:#fcfaf6;min-width:0}
.wall-properties label{font-size:13px}.wall-properties .fields{gap:8px}.wall-properties input,.wall-properties select{font-size:14px;min-height:38px;padding:7px}
.wall-status{padding:10px 16px;margin:0;border-top:1px solid #ded9ce;font-size:13px;color:#355f52;line-height:1.5}.wall-status.invalid{color:#982d24;background:#fff0e9}
.wall-keyboard{margin:0;padding:0 16px 12px}.wall-drawing .hint{text-align:center;margin:10px 0 0}
.wall-selection{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:12px}.wall-selection button{padding:6px 8px;font-size:12px}.wall-selection button[aria-pressed=true]{background:#355f52;color:white}
@media(max-width:1050px){body.wall-editing main{grid-template-columns:225px minmax(0,1fr)}.wall-workspace{grid-template-columns:1fr}.wall-properties{border-left:0;border-top:1px solid #ded9ce}.wall-properties .fields{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){body.wall-editing main{display:flex}.wall-properties .fields{grid-template-columns:1fr 1fr}.wall-toolbar{padding:12px}#wallCanvas{height:360px}.segmented{flex-wrap:wrap}}
@media(pointer:coarse){.wall-properties input,.wall-properties select,.wall-actions button,.wall-selection button{min-height:44px;font-size:16px}}

@media(max-width:760px){body.wall-editing main>.workbench{position:static;max-height:none;z-index:auto}body.wall-editing main>aside:first-child{order:-2}}

/* Each settings section keeps its heading visible when folded away. */
.sidebar-section{border-top:1px solid var(--line);margin:16px 0 0;padding:0}
#houseChooser{border-top:0;margin-top:0}
.sidebar-section>summary.section-title{display:flex;align-items:center;gap:9px;min-height:48px;margin:0;padding:12px 0;list-style:none;border-radius:6px}
.sidebar-section>summary::-webkit-details-marker{display:none}
.sidebar-section>summary::after{content:'';width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);margin-left:auto;margin-right:5px;flex-shrink:0;opacity:.65}
.sidebar-section[open]>summary::after{transform:rotate(45deg)}
.sidebar-section>summary:hover{background:#f3f1eb}
.sidebar-section>summary h2,.sidebar-section>summary h3{margin:0;font-size:15px}
.sidebar-section-body{padding:4px 0 6px}
.sidebar-section-body>.hint:last-child{margin-bottom:0}
.section-unit{display:flex;align-items:center;justify-content:space-between;gap:10px}
.section-unit select{width:75px;margin-top:0}
#advancedControls>summary h2{margin:0}
.inspector .sidebar-section{margin-top:8px}
.wall-properties.sidebar-section{margin:0;border-top:0;border-radius:0}
.wall-properties.sidebar-section>summary{padding:0;min-height:32px}
.wall-properties.sidebar-section[open]>summary{margin-bottom:12px}
.wall-workspace:has(>.wall-properties:not([open])){grid-template-columns:1fr}
.wall-properties.sidebar-section:not([open]){border-left:0;border-top:1px solid var(--line);padding:10px 15px}
