#layout-panel .small { margin: 5px 0; }
.layout-status { padding: 8px 10px; margin: 0 0 8px; border: 1px solid #dedee1; border-radius: 9px; background: #f4f4f6; line-height: 1.5; }
.layout-status.error { color: #8f3225; background: #fbf1ee; border-color: #e8cfc7; }
.layout-ai textarea { display: block; width: 100%; min-height: 60px; resize: vertical; padding: 8px 10px; margin: 8px 0; border: 1px solid #c2c2c8; border-radius: 9px; background: var(--field); color: var(--ink); font: inherit; }
.layout-allow { display: block; }
.layout-allow input { accent-color: var(--ink); }
.layout-view-switch { position: absolute; z-index: 1; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; padding: 4px; border: 1px solid #dedbd5; border-radius: 12px; background: #faf9f7ed; box-shadow: 0 3px 14px #302b2412; }
.layout-view-switch button { min-height: 35px; padding: 4px 14px; border: 0; border-radius: 8px; background: transparent; font-weight: 600; color: #56524e; white-space: nowrap; }
.layout-view-switch button:hover { background: #eeece8; }
.layout-view-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.layout-scale { position: absolute; bottom: 20px; right: 20px; display: grid; gap: 3px; justify-items: center; color: #56514b; font-size: 11px; pointer-events: none; }
.layout-scale i { display: block; height: 5px; border: solid currentColor; border-width: 0 1px 1px; }
.layout-proposal { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.layout-proposal ul, .layout-checks { padding-left: 17px; font-size: 13px; margin: 9px 0 3px; }
.layout-proposal .actions { margin-top: 9px; }
.layout-selection .actions, .layout-services { margin-top: 8px; }
.layout-size { display: flex; gap: 7px; align-items: end; margin-top: 10px; }
.layout-size label { display: grid; flex: 1; min-width: 0; gap: 4px; font-size: 12px; }
.layout-size input { width: 100%; min-height: 36px; padding: 4px 7px; border: 1px solid #c2c2c8; border-radius: 8px; background: var(--field); color: var(--ink); }
.layout-services { display: flex; flex-wrap: wrap; gap: 5px 9px; border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; font-size: 12px; }
.layout-services input { margin: 0 4px 0 0; accent-color: var(--ink); vertical-align: middle; }
.layout-room-list { margin-top: 8px; }
.layout-room-list details { margin: 4px 0; }
.layout-room-list details > summary { padding: 6px 0; }
.layout-room-list details > summary::after { content: none; }
.layout-room-list details > summary::before { content: '›'; font-weight: 400; }
.layout-room-list details[open] > summary::before { transform: rotate(90deg); }
.layout-room-list summary span { flex: 1; }
.layout-room-list .object-item { display: flex; gap: 8px; justify-content: space-between; }
.layout-room-list .item-source { color: var(--muted); font-size: 11px; flex: none; }
.layout-checks li { margin-bottom: 6px; line-height: 1.45; }
.layout-checks button { padding: 0; border: 0; background: transparent; color: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.layout-footer { flex: none; display: flex; gap: 8px; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.layout-footer p { margin: 0; }
.layout-footer .button { min-height: 36px; padding: 5px 8px; font-size: 13px; }
#layout-drawing, #layout-opening-ranges, #layout-annotations { pointer-events: none; }
:is(#layout-drawing, #layout-opening-ranges) path { vector-effect: non-scaling-stroke; fill-rule: evenodd; stroke-linecap: round; stroke-linejoin: round; }
.layout-room-floor { fill: #fcfbf8; }
.layout-adjacent-floor { fill: #e9e6e1; stroke: #c2bcb3; stroke-width: .6; }
.layout-wall { fill: #484542; }
.layout-railing { fill: #b6bfca; stroke: #8593a1; stroke-width: .6; }
.layout-stairs { fill: #eeeae5; stroke: #a39a90; stroke-width: .7; }
.layout-treads { fill: none; stroke: #b7afa5; stroke-width: .65; }
.layout-window { fill: #dce5ed; stroke: #788c9c; stroke-width: .8; }
.layout-door { fill: #f4f1eb; stroke: #aba39a; stroke-width: .45; }
.layout-window-track, .layout-door-track { fill: none; stroke: #748796; stroke-width: .95; }
.layout-door-track { stroke: #7b736a; }
.layout-sweep-fill { fill: #86796818; }
.layout-sweep-arc, .layout-open-leaf, .layout-slide-arrow { fill: none; stroke: #81766a; stroke-width: 1.15; }
.layout-sweep-arc { stroke-width: .85; }
[data-kind="window"] .layout-sweep-fill { fill: #61849e15; }
[data-kind="window"] :is(.layout-sweep-arc, .layout-open-leaf, .layout-slide-arrow) { stroke: #668297; }
.layout-estimated-opening :is(.layout-sweep-arc, .layout-open-leaf) { stroke-dasharray: 3 2; }
.layout-footprint { fill: #ddd2c0; stroke: #8e806f; stroke-width: .9; stroke-linejoin: round; vector-effect: non-scaling-stroke; fill-rule: evenodd; cursor: move; }
.layout-footprint[data-category="fixture"] { fill: #e7efeb; stroke: #80968b; }
.layout-footprint[data-locked="true"] { cursor: pointer; }
.layout-footprint:hover, .layout-footprint.active { stroke: #205e6e; stroke-width: 1.8; }
.layout-footprint.active { fill: #b5d6dc; }
.layout-footprint.proposed { fill: #9addc6de; stroke: #22664f; stroke-width: 1.6; stroke-dasharray: 5 3; pointer-events: none; }
.layout-footprint.removing { fill: #db9b8e80; stroke: #953d32; stroke-dasharray: 4 3; }
.layout-furniture-symbol { fill: none; stroke: #46534f8c; pointer-events: none; }
.layout-furniture-symbol > * { vector-effect: non-scaling-stroke; stroke-width: .65; stroke-linecap: round; }
.layout-room-name, .layout-proposal-label, .layout-selection-dimensions text { font-family: inherit; font-weight: 650; text-anchor: middle; dominant-baseline: central; fill: #46413c; paint-order: stroke; stroke: #fcfbf8; stroke-width: 2px; stroke-linejoin: round; pointer-events: none; user-select: none; }
.layout-room-name.secondary { fill: #655d55; stroke: #eeeae5; }
.layout-selection-dimensions { pointer-events: none; }
.layout-selection-dimensions path { fill: none; stroke: #205e6e; stroke-width: .9; vector-effect: non-scaling-stroke; }
.layout-selection-dimensions text { fill: #205e6e; }
.space-section { border: 1px solid var(--line); border-radius: 13px; padding: 12px; margin-bottom: 9px; background: var(--surface); }
.space-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.space-row h3, .space-ai summary { margin: 0; font-size: 14px; font-weight: 700; }
.space-row strong { font-size: 12px; }
.space-row .button, .space-ai .button { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.space-palette { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 9px 0 0; }
.space-furniture-tile { min-width: 0; display: grid; gap: 4px; justify-items: start; border-radius: 10px; padding: 9px; background: #faf9f7; border: 1px solid var(--line); color: var(--ink); text-align: left; font: inherit; cursor: grab; }
.space-furniture-tile:hover, .space-furniture-tile[aria-pressed="true"] { border-color: #a4998b; background: #f1ede7; }
.space-furniture-tile:disabled { cursor: default; opacity: .65; }
.space-furniture-tile strong { font-size: 13px; }
.space-furniture-tile span { font-size: 11px; color: #625a51; }
.space-room-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.space-room-options .button { min-height: 40px; padding: 7px 9px; text-align: left; font-size: 13px; }
.space-room-options [aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.space-room-extra { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 12px; }
.space-room-extra summary { cursor: pointer; }
.space-area-subareas { margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.space-area-subareas h4 { margin: 0; font-size: 13px; }
.space-area-tools { justify-content: flex-start; margin-bottom: 9px; }
.space-room-hit { fill: transparent; stroke: transparent; fill-rule: evenodd; vector-effect: non-scaling-stroke; pointer-events: fill; cursor: pointer; }
.space-room-hit:hover { fill: #88715415; }
.space-room-hit.active { fill: #88715413; stroke: #6e5f50; stroke-width: 1.5; }
.space-room-caption { fill: #5f5347; text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: #fcfbf8; stroke-width: 1.4; pointer-events: none; user-select: none; }
.space-picked { margin-top: 10px; }
.space-picked-actions { display: flex; gap: 5px; }
.space-scenarios { display: flex; flex-wrap: wrap; gap: 6px 13px; margin: 9px 0; font-size: 12px; }
.space-scenarios label { cursor: pointer; }
.space-scenarios input { accent-color: var(--ink); margin: 0 2px 0 0; vertical-align: middle; }
.space-route-option { display: flex; width: 100%; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 8px; padding: 7px 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.space-route-option:hover { background: #f6f4f1; }
.space-route-option[aria-pressed="true"] { background: #f0ede8; border-color: #d2c8ba; color: #3f3933; }
.space-scenario-switch { color: #625a51; font-size: 12px; }
.space-scenario-switch input { accent-color: var(--ink); vertical-align: middle; }
#layout-space-scenario-kitchen { padding: 6px 0; border-block-end: 1px solid var(--line); }
#layout-space-scenario-kitchen summary { cursor: pointer; font-size: 13px; }
.space-block.fridge { fill: #d9e1e8; stroke: #778a99; }
.space-fridge-front { fill: none; stroke: #506779; stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.space-scenario-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; color: var(--ink); }
.space-scenario-total strong { font-size: 23px; font-variant-numeric: tabular-nums; }
.space-scenario-review, .space-scenario-note { color: #625a51; }
.space-scenario-actions { margin: 8px 0 5px; justify-content: flex-start; flex-wrap: wrap; gap: 5px; }
.space-scenario-actions [aria-pressed="true"] { background: #ece6dd; border-color: #b6a796; }
.space-scenario-legs { margin: 7px 0; padding: 0; list-style: none; }
.space-scenario-legs li { margin-bottom: 3px; }
.space-scenario-leg { display: grid; grid-template-columns: 19px minmax(0, 1fr); gap: 3px 7px; }
.space-scenario-index { grid-row: span 2; border-radius: 50%; background: #eae2d7; line-height: 19px; text-align: center; }
.space-scenario-leg small { color: #625a51; font-size: 11px; }
.space-scenario-leg small.issue { color: #984722; }
.space-scenario-bands { opacity: .46; }
.space-scenario-band { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.space-scenario-center { fill: none; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.space-scenario-dimmed { opacity: .2; }
.space-scenario-direct { stroke: #5a5a58; stroke-width: .85; stroke-dasharray: 2.6 2; }
.space-scenario-marker { fill: #fcfbf8; stroke: #66594b; stroke-width: 1; }
.space-scenario-number { fill: #3f3933; font-weight: 750; dominant-baseline: central; text-anchor: middle; }
.space-scenario-turn { fill: #fdf7e7; stroke: #975726; stroke-width: 1; }
.space-scenario-blocked { fill: none; stroke: #993d23; stroke-width: 1.7; stroke-linecap: round; }
.space-workplace { display: grid; gap: 4px; color: #625a51; font-size: 12px; }
.space-workplace select { box-sizing: border-box; min-width: 0; width: 100%; padding: 6px; border: 1px solid #ddd6cd; border-radius: 6px; color: #403a34; background: #fcfbf9; font: inherit; }
.space-workplace { margin-top: 8px; }
.space-conflicts { margin: 8px 0 0; font-size: 12px; line-height: 1.55; border-radius: 6px; padding: 5px 7px; background: #faf1e8; color: #984722; }
.space-active { touch-action: none; }
.space-placing, .space-placing .space-block, .space-placing .space-zone-tag { cursor: crosshair; }
#layout-space-ghost { pointer-events: none; }
.space-ghost { fill: #7496b148; stroke: #476781; stroke-width: 1.5px; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }
.space-ghost.invalid { fill: #c15e4150; stroke: #962e20; }
.space-zone-band { fill: #b8c2dc41; stroke: #879ac181; stroke-width: .9; stroke-dasharray: 4 3; fill-rule: evenodd; vector-effect: non-scaling-stroke; pointer-events: none; }
.space-zone[data-space-purpose="dining"] .space-zone-band { fill: #f1d4a954; stroke: #bb976578; }
.space-zone.living .space-zone-band { fill: #c7c2d149; stroke: #9691a578; }
.space-zone.parent .space-zone-band { fill: #eee2d029; stroke: #a68c71a0; }
.space-zone.child .space-zone-band { fill: #ded1bc69; stroke: #a68c71b0; }
.space-zone-tag, .space-editing .space-block { cursor: move; pointer-events: auto; }
.space-zone-tag rect { fill: #fffefa; stroke: #9a9085; stroke-width: .9; vector-effect: non-scaling-stroke; }
.space-zone-tag:hover rect { stroke: #70665c; }
.space-zone-tag[tabindex]:focus { outline: none; }
.space-zone-tag:focus-visible rect { stroke: var(--focus); stroke-width: 1.8; }
.space-zone-tag { pointer-events: none; cursor: default; }
.space-area-editing :is(.space-zone-tag[tabindex], .space-zone.movable .space-zone-band) { pointer-events: auto; cursor: move; }
.space-zone.active .space-zone-band, .space-area-draft { stroke: #566e85; stroke-width: 1.6; }
.space-area-draft { fill: #8099b343; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.space-area-drawing, .space-area-drawing :is(.space-zone-tag[tabindex], .space-zone.movable .space-zone-band) { cursor: crosshair; }
.space-area-placing, .space-area-placing :is(.space-zone-tag[tabindex], .space-zone.movable .space-zone-band) { cursor: crosshair; }
.space-area-placement-room { fill: #8197af25; stroke: #617e9b; stroke-dasharray: 3 3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.space-area-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.space-area-actions .button { min-height: 32px; padding: 4px 9px; font-size: 12px; }
.space-area-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.space-workplace input { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--field); color: inherit; font: inherit; }
.space-block { fill: #dfd5c0; stroke: #8b7b58; stroke-width: 1px; fill-rule: evenodd; vector-effect: non-scaling-stroke; }
.space-block.cabinet { fill: #d5dce8; stroke: #75839b; }
.space-block.sofa { fill: #dcd3cc; stroke: #94857b; }
.space-block.chair { fill: #faecd5; }
.space-editing .space-block:hover, .space-block.active, .space-block:focus-visible { stroke: #115b78; stroke-width: 1.9px; }
.space-label, .space-dimension, .space-context-label { dominant-baseline: central; text-anchor: middle; font-family: inherit; fill: #3f3933; font-weight: 650; pointer-events: none; user-select: none; }
.space-dimension, .space-context-label { font-weight: 550; fill: #625a51; }
.space-notation, #layout-space-routes { pointer-events: none; }
.space-route-bottleneck { fill: #8f4c2a; stroke: #fcfbf8; stroke-width: 1; }
.space-chair-range, .space-chair-pulled { fill: #d28e323a; stroke: #a46827; stroke-width: 1; stroke-dasharray: 4 2; fill-rule: evenodd; vector-effect: non-scaling-stroke; pointer-events: none; }
.space-chair-pulled { fill: #ecd0a4a8; }
.space-chair-range.conflict { fill: #d872504a; stroke: #a54225; }
@media (max-width: 470px) {
  .view-tabs button { font-size: 11px; padding-inline: 3px; }
  .view-tabs button .ui-icon { display: none; }
  .layout-view-switch { top: 9px; }
  .layout-scale { bottom: 18px; right: 9px; }
}

.space-active :is(.space-block, .space-zone-tag[tabindex]) { cursor: pointer; pointer-events: auto; }
.space-active .space-block:hover { stroke: #115b78; stroke-width: 1.9px; }
