#floor-editor [hidden] { display: none !important; }
.plan-decor { cursor: grab; outline: none; }
.plan-decor:active { cursor: grabbing; }
.decor-hit { fill: transparent; stroke: transparent; stroke-width: 2; vector-effect: non-scaling-stroke; }
.plan-decor.selected .decor-hit, .plan-decor:focus-visible .decor-hit { stroke: #3270a6; stroke-dasharray: 5 3; }
.decor-object { filter: drop-shadow(3px 5px 3px #33211355); pointer-events: none; }
.decor-rug { pointer-events: none; }
#asset-library { width: min(1000px, calc(100% - 32px)); max-height: 90vh; overflow: auto; padding: 24px; border: 1px solid #bca789; border-radius: 14px; background: #faf6ef; }
#asset-library::backdrop { background: #241b15bb; }
.library-filters { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.library-filters label { flex: 1; min-width: 180px; font-size: 13px; }
.library-filters input, .library-filters select { display: block; width: 100%; padding: 10px; border: 1px solid #bca789; border-radius: 6px; margin-top: 5px; }
.library-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 20px; }
.library-card { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; text-align: start; border: 1px solid #d5c8b4; border-radius: 10px; background: #fff; color: #48392b; cursor: pointer; font: inherit; }
.library-card:hover, .library-card:focus-visible { border-color: #3270a6; box-shadow: 0 0 0 2px #3270a644; }
.library-card img { width: 100%; height: 135px; object-fit: contain; background: #eee8dc; border-radius: 5px; }
.library-card span { font-size: 12px; color: #3270a6; }
.room-wall { fill: none; stroke: #948775; stroke-width: 14; pointer-events: none; filter: drop-shadow(3px 6px 4px #352b254d); }
.room-opening { cursor: grab; outline: none; }
.opening-hit { fill: #fdfbf7; }
.window-glass { fill: #c3d7d6; stroke: #4b3c30; stroke-width: 4; filter: drop-shadow(0 4px 2px #24190d66); }
.window-frame { fill: none; stroke: #4b3c30; stroke-width: 3; }
.window-photo-dot { fill: #3270a6; stroke: white; stroke-width: 2; }
.door-swing { fill: #fdfbf726; stroke: #947754; stroke-width: 1; stroke-dasharray: 5 4; }
.door-leaf { fill: none; stroke: #5b4028; stroke-width: 8; filter: drop-shadow(4px 3px 2px #352b2560); }
.room-opening.selected .opening-hit, .room-opening:focus-visible .opening-hit { fill: #a9cce7; stroke: #3270a6; stroke-width: 3; }
.decor-help, #opening-photo-fields .muted, #upload-status { font-size: 12px; margin-top: 12px; }
#opening-remove { display: block; margin-top: 14px; }
#opening-upload { width: 100%; }
#window-view { width: min(900px, calc(100% - 32px)); max-height: 90vh; overflow: auto; padding: 24px; border: 1px solid var(--border); border-radius: 14px; color: var(--text); }
#window-view::backdrop { background: #142634b8; }
.window-view-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.window-view-heading h2 { margin: 0; }
#window-view-image { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: 8px; }
.floor-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; padding: 18px; }
.room-picker { flex: 1; min-width: 180px; }
.room-picker label { display: block; font-size: 12px; font-weight: 600; margin-block-end: 4px; }
.room-picker select, .zoom-label select { min-height: 42px; border: 1px solid #b7b1aa; border-radius: 6px; padding: 7px 10px; background: white; color: var(--text); }
.room-picker select { width: 100%; }
.check-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; min-height: 42px; }
.floor-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0; font-size: 12px; }
#save-status[data-dirty="true"] { color: #8a5a11; font-weight: 600; }
#room-summary { margin-block-end: 14px; }
.text-button { border: 0; padding: 4px 0; color: var(--blue); background: transparent; font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.danger { color: #a0342c; }
#floor-editor button:disabled { opacity: .5; cursor: default; }
.floor-content { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.floor-main { min-width: 0; }
.plan-panel { overflow: hidden; }
.plan-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px; border-bottom: 1px solid var(--border); }
.plan-tools .button { padding: 8px 10px; font-size: 12px; }
.zoom-label { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-inline-start: auto; }
.zoom-label select { min-height: 34px; }
.plan-viewport { background: #e8e4de; padding: 20px; overflow: auto; max-height: 650px; min-height: 260px; direction: ltr; }
#plan-surface { width: 100%; }
#floor-canvas { display: block; width: 100%; height: auto; background: #fdfbf7; border: 1px solid #c0b5a6; touch-action: none; user-select: none; }
.floor-table { cursor: grab; outline: none; }
.floor-table:active { cursor: grabbing; }
.table-outline { fill: url(#table-wood); stroke: #796042; stroke-width: 2; filter: drop-shadow(4px 9px 5px #33211366); }
.table-sheen { fill: url(#table-sheen); stroke: #fff5db66; stroke-width: 1; pointer-events: none; }
.chair-photo { filter: drop-shadow(2px 4px 2px #36271a66); }
.floor-table.selected .table-outline, .floor-table:focus-visible .table-outline { stroke: #3270a6; stroke-width: 3; vector-effect: non-scaling-stroke; }
.table-plaque { fill: #fffaf0ed; stroke: #bca789; stroke-width: .8; pointer-events: none; }
.table-label { fill: #3b2e24; font-weight: 700; pointer-events: none; text-anchor: middle; }
.table-capacity { fill: #685644; font-weight: 400; }
.floor-stone { filter: saturate(.6) brightness(.9); }
.place-atmosphere { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; margin-bottom: 24px; background: #ede5d8; border: 1px solid #d5c8b4; border-radius: 12px; overflow: hidden; }
.place-atmosphere > img { width: 100%; height: 200px; object-fit: cover; }
.place-atmosphere > div { padding: 18px 22px 18px 0; }
.place-atmosphere h2 { font-family: Georgia, serif; font-weight: 400; font-size: 25px; margin-bottom: 8px; color: #4a3829; }
.place-atmosphere p:not(.eyebrow) { font-size: 13px; color: #665745; margin-bottom: 12px; }
#establishment-gallery { width: min(960px, calc(100% - 32px)); max-height: 90vh; overflow: auto; padding: 24px; border: 1px solid #bca789; border-radius: 14px; background: #faf6ef; }
#establishment-gallery::backdrop { background: #241b15bb; }
.establishment-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.establishment-photos figure { margin: 0; }
.establishment-photos img { width: 100%; height: 360px; object-fit: cover; border-radius: 6px; }
.establishment-photos figcaption { padding: 10px 0; font-size: 13px; color: #665745; }
@media (max-width: 900px) { .plan-inspector { grid-template-columns: 1fr !important; } }
@media (max-width: 680px) { .place-atmosphere { grid-template-columns: 1fr; gap: 0; } .place-atmosphere > img { height: 170px; } .place-atmosphere > div { padding: 20px; } .establishment-photos { grid-template-columns: 1fr; } }
.table-handle { fill: #3270a6; stroke: white; stroke-width: 2; vector-effect: non-scaling-stroke; }
.resize-handle { cursor: nwse-resize; }
.rotate-handle { cursor: crosshair; }
.handle-stem { stroke: #3270a6; stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.plan-footer { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; padding: 4px 16px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.plan-help { padding: 0 16px 15px; font-size: 11px; color: var(--muted); }
.inspector-panel { padding: 18px; margin-block-end: 16px; }
.inspector-panel h2 { font-size: 17px; margin-block-end: 14px; }
.inspector-panel fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.inspector-panel .field { margin-block-end: 12px; }
.inspector-panel .field input, .inspector-panel .field select { padding: 7px 9px; min-height: 38px; font-size: 13px; }
.inspector-panel .field label { font-size: 12px; }
.inspector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.compact-field { display: grid; grid-template-columns: 1fr 86px; gap: 8px; align-items: center; }
.compact-field label { margin: 0; }
.inspector-actions { display: flex; justify-content: space-between; margin-block-start: 10px; }
#archive-room { margin-block-start: 14px; }
.archive-panel { margin-block-start: 16px; padding: 14px 18px; font-size: 13px; }
.archive-panel summary { cursor: pointer; font-weight: 600; }
#table-archives { list-style: none; padding: 0; margin: 12px 0 0; }
#table-archives li { display: flex; justify-content: space-between; gap: 10px; margin-block: 8px; }
#new-room-dialog { width: min(460px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); }
#new-room-dialog::backdrop { background: #182d3e88; }
#new-room-dialog h2, #new-room-dialog .muted, #new-room-dialog .field { margin-block-end: 16px; }
#new-room-dialog .form-actions { margin-block-start: 24px; }
#plan-confirm { width: min(440px, calc(100% - 32px)); padding: 26px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); }
#plan-confirm::backdrop { background: #182d3e88; }
#plan-confirm .form-actions { margin-block-start: 24px; }
/* Keep drawing coordinates physical; only the surrounding interface follows RTL. */
[dir="rtl"] .sidebar { left: auto; right: 0; }
[dir="rtl"] .workspace { margin-left: 0; margin-right: 246px; }
[dir="rtl"] .nav-link.active { box-shadow: inset -3px 0 0 var(--accent); }
@media (max-width: 1200px) {
    .floor-content { grid-template-columns: minmax(0, 1fr); }
    .plan-inspector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
}
@media (max-width: 1000px) { [dir="rtl"] .workspace { margin-right: 214px; } }
@media (max-width: 680px) {
    .plan-inspector { grid-template-columns: 1fr; }
    .floor-toolbar { align-items: stretch; }
    .room-picker { flex-basis: 100%; }
    .floor-toolbar .button { flex: 1; }
    .plan-viewport { padding: 10px; }
    .zoom-label { margin-inline-start: 0; }
    [dir="rtl"] .workspace { margin: 0; }
}

/* Native dialog transitions retain focus, Escape and modal semantics. */
dialog { opacity: 0; transition: opacity .24s ease, display .24s allow-discrete, overlay .24s allow-discrete; }
dialog[open] { opacity: 1; }
dialog::backdrop { opacity: 0; transition: opacity .24s ease, display .24s allow-discrete, overlay .24s allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style { dialog[open], dialog[open]::backdrop { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { dialog, dialog::backdrop { transition: none; } }
.decor-handle { fill: #fff; stroke: #245b66; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: nwse-resize; }
circle.decor-handle { cursor: grab; }
.decor-handle-line { stroke: #245b66; stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.library-import { padding: 16px; border: 1px solid #d5d2c8; border-radius: 8px; margin: 16px 0; }
.library-import summary { cursor: pointer; font-weight: 600; }
.library-import label { display: grid; gap: 6px; margin-top: 12px; }
.library-import fieldset { border: 0; padding: 0; }

.selected-properties { border-color: #245b66; box-shadow: 0 0 0 2px #245b6620; }

/* The drawing always fits the available viewport; only the inspector scrolls. */
body:has(#floor-editor) { height: 100dvh; overflow: hidden; }
body:has(#floor-editor) .workspace { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
body:has(#floor-editor) .topbar { height: 36px; min-height: 36px; padding-block: 6px; flex-shrink: 0; }
body:has(#floor-editor) main { flex: 1; min-height: 0; padding: 12px 18px; display: flex; flex-direction: column; overflow: hidden; }
body:has(#floor-editor) .page-heading { margin: 0 0 8px; flex-shrink: 0; }
body:has(#floor-editor) .page-heading h1 { font-size: 24px; }
body:has(#floor-editor) .page-heading .eyebrow,
body:has(#floor-editor) .release-note,
body:has(#floor-editor) .workspace > footer { display: none; }
#floor-editor { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.floor-toolbar { padding: 8px; gap: 8px; flex-shrink: 0; }
.floor-status-row { margin: 5px 0; flex-shrink: 0; }
#room-summary { margin-bottom: 6px; font-size: 12px; flex-shrink: 0; }
.floor-content { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) 280px; align-items: stretch; gap: 12px; }
.floor-main { min-height: 0; display: flex; flex-direction: column; }
.plan-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; }
.plan-tools { padding: 6px; gap: 5px; flex-shrink: 0; }
.plan-viewport { flex: 1; min-height: 0; max-height: none; padding: 12px; overflow: hidden; }
#plan-surface { width: 100% !important; height: 100%; }
#floor-canvas { width: 100%; height: 100%; background: transparent; border: 0; }
.plan-footer { flex-shrink: 0; padding: 0 8px; }
.plan-help { display: none; }
.plan-inspector { display: block; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.archive-panel { flex-shrink: 0; margin: 6px 0 0; padding: 7px 10px; max-height: 100px; overflow: auto; }
#floor-error:not([hidden]) { max-height: 60px; overflow: auto; flex-shrink: 0; }
@media (max-width: 1100px) {
    .floor-content { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 3fr) minmax(0, 2fr); }
    .plan-inspector { display: block; }
    .floor-toolbar .room-picker { min-width: 120px; flex-basis: auto; }
    body:has(#floor-editor) main { padding: 8px; }
    .plan-tools .button { padding: 5px 7px; }
}
@media (max-height: 600px) {
    body:has(#floor-editor) .topbar, body:has(#floor-editor) .page-heading { display: none; }
    .plan-footer { display: none; }
    .floor-content { grid-template-columns: minmax(0, 1fr) 240px; grid-template-rows: minmax(0, 1fr); }
}
@media (max-width: 680px) {
    body:has(#floor-editor) { display: flex; flex-direction: column; }
    body:has(#floor-editor) .sidebar { flex-shrink: 0; padding: 4px 8px; }
    body:has(#floor-editor) .sidebar .brand, body:has(#floor-editor) .sidebar-footer { display: none; }
    body:has(#floor-editor) .sidebar nav { margin: 0; padding: 0; }
    body:has(#floor-editor) .workspace { flex: 1; height: auto; }
    .floor-content { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 3fr) minmax(0, 2fr); }
}
.library-recognized { align-self: start; padding: 2px 8px; border-radius: 999px; background: #dcebdf; color: #3f6b4b; font-size: 11px; font-weight: 600; }

/* Parametric furniture models */
.model-shadow { filter: drop-shadow(3px 6px 4px #33211355); }
.chair-model { filter: drop-shadow(1px 3px 2px #33211344); }
.library-model { width: 100%; height: 135px; background: #eee8dc; border-radius: 5px; }

/* Immersive renderings (prototype): shared by the studio and the booking plan. */
.immersive-canvas { position: absolute; inset: 0; display: block; cursor: grab; touch-action: none; outline: none; }
.immersive-canvas.is-panning { cursor: grabbing; }
.immersive-canvas:focus-visible { box-shadow: inset 0 0 0 3px #f2b45b; }
.immersive-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.immersive-label { position: absolute; left: 0; top: 0; padding: 2px 9px; border-radius: 999px; background: #fffcf6f0; color: #2b2118; font: 600 13px/1.4 system-ui, sans-serif; box-shadow: 0 1px 5px #0000004d; white-space: nowrap; transition: background .25s, color .25s; }
.immersive-label:not([data-state="available"]):not([data-state="idle"]) { background: #fffcf6b8; color: #7a7068; }
.immersive-label.is-selected { background: #c3923f; color: #fff; }
.immersive-tables { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.immersive-table-button { position: absolute; left: 0; top: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: transparent; font-size: 1px; pointer-events: none; }
.immersive-table-button:focus-visible { outline: 3px solid #f2b45b; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .immersive-label { transition: none; } }

/* Draft of the arrangement */
.layout-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 14px; margin-bottom: 10px; border-left: 4px solid #8a7a66; }
.layout-bar[data-state="draft"] { border-left-color: #c3923f; background: #fdf8ee; }
.layout-state { flex: 1 1 260px; font-size: 14px; color: #5b5145; }
.layout-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.layout-summary { flex-basis: 100%; margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; }
.layout-summary:empty { display: none; }
.layout-summary [data-level="warning"] { color: #9a4a12; }
.layout-lock { font-size: 13px; }
#layout-impact-list { max-height: 50vh; overflow: auto; }

/* Architecture of the plan: one geometry with the 3D scene */
.ref-wall { stroke: #a9977c; stroke-linecap: butt; }
.ref-low { stroke-opacity: .72; }
.ref-frame { stroke: #746b5b; }
.ref-glass { stroke: #bcd5d6; }
.ref-passage { stroke: #e6dfd2; stroke-dasharray: 8 6; }
.ref-door { stroke: #5b4028; }
.ref-post { fill: #5d5242; }
/* Equipment seen from above */
.plan-equipment { outline: none; }
.equipment-body { fill: #f1eee7; stroke: #8b8171; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.equipment-top { fill: #2b2a28; }
.kind-partition .equipment-body { fill: #cfc7b8; }
.kind-tall .equipment-body, .kind-storage .equipment-body { fill: #e7e2d8; }
.kind-buffet .equipment-body, .kind-divider .equipment-body { fill: #9a7a5c; }
.kind-wallUnits .equipment-body, .kind-hood .equipment-body, .kind-pendant .equipment-body { fill: #ffffff33; stroke-dasharray: 6 4; }
.equipment-hob { fill: #0d0d0e; stroke: #777; stroke-width: 1; }
.equipment-burner { fill: none; stroke: #aaa; stroke-width: 1.2; }
.equipment-sink { fill: #bfc3c4; stroke: #777; stroke-width: 1; }
.equipment-lamp { fill: #e8c88a; stroke: #8a6f3e; stroke-width: 1.5; }
.equipment-cross { fill: none; stroke: #8b8171; stroke-width: 1; vector-effect: non-scaling-stroke; }

/* Arrangement editor: library, surface, properties */
.floor-content { grid-template-columns: 196px minmax(0, 1fr) 280px; }
.plan-palette { min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 12px; padding: 8px; font-size: 13px; }
.plan-palette details { border-bottom: 1px solid var(--border); padding: 6px 2px; }
.plan-palette details:last-child { border-bottom: 0; }
.plan-palette summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.plan-palette .muted { font-size: 11.5px; margin: 5px 0; }
.palette-list, .palette-row { display: grid; gap: 4px; margin-top: 5px; }
.palette-item { text-align: start; padding: 5px 7px; border: 1px solid var(--border); border-radius: 7px; background: #fff; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); }
.palette-item:hover, .palette-item:focus-visible { border-color: #3270a6; box-shadow: 0 0 0 2px #3270a633; }
.palette-row .button { padding: 5px 7px; font-size: 12px; text-align: start; min-height: 0; }
.plan-tools .tool-gap { width: 8px; }
.align-tools { padding-block: 2px; min-height: 26px; font-size: 12px; }
.align-tools .text-button { font-size: 11.5px; }
.layout-checks { flex: none; max-height: 76px; overflow: auto; margin: 0; padding: 4px 8px 4px 24px; border-top: 1px solid var(--border); font-size: 12px; }
.layout-checks [data-level="warning"] { color: #9a4a12; cursor: pointer; }
.layout-checks [data-level="ok"] { color: #3f7350; }
.layout-bar { padding: 6px 12px; margin-bottom: 6px; flex-shrink: 0; }
.layout-state { font-size: 13px; }
#floor-notice:not([hidden]) { flex-shrink: 0; margin: 0 0 6px; padding: 6px 10px; font-size: 13px; }
#floor-canvas { cursor: default; }
.floor-main.has-preview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.floor-main.has-preview .archive-panel { grid-column: 1 / -1; }
.preview-panel { display: flex; flex-direction: column; min-height: 0; margin: 0; overflow: hidden; }
.preview-panel[hidden] { display: none; }
.preview-host { position: relative; flex: 1; min-height: 240px; background: #2c241d; overflow: hidden; }
.preview-failed { color: #f3ead9; padding: 16px; font-size: 13px; }
.plan-architecture.is-editable .arch-element { cursor: move; }
.plan-architecture.is-editable .arch-element:hover line, .plan-architecture.is-editable .arch-element:hover rect, .arch-element.selected line, .arch-element.selected rect, .arch-element.selected path { stroke: #3270a6; }
.plan-architecture.is-editable .ref-post:hover, .arch-element.selected .ref-post { fill: #3270a6; }
.plan-equipment { cursor: grab; }
.plan-equipment.selected .equipment-body { stroke: #3270a6; stroke-width: 3; }
.plan-equipment.is-locked, .floor-table.is-locked, .plan-decor.is-locked { cursor: not-allowed; }
.plan-equipment.is-locked .equipment-body, .plan-decor.is-locked .decor-hit { stroke: #7a6f60; stroke-dasharray: 2 3; stroke-width: 2; }
.floor-table.is-locked .table-outline { stroke: #7a6f60; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.has-conflict .equipment-body, .plan-decor.has-conflict .decor-hit { stroke: #c0392b; stroke-width: 3; stroke-dasharray: none; vector-effect: non-scaling-stroke; }
.floor-table.has-conflict .table-outline { stroke: #c0392b; stroke-width: 3; vector-effect: non-scaling-stroke; }
.plan-guide { stroke: #d6336c; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 6 4; }
.plan-multi { fill: #3270a61a; stroke: #3270a6; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 4 3; }
.plan-measure { stroke: #3270a6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan-measure-text, .plan-size { fill: #1f4e79; font-weight: 600; paint-order: stroke; stroke: #fffffff0; stroke-width: 3px; font-family: system-ui, sans-serif; }
@media (max-width: 1100px) {
    .floor-content { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 3fr) minmax(0, 2fr); }
    .plan-palette { max-height: 120px; }
    .floor-main.has-preview { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
}

/* The surface first: the chrome of the screen stays compact. */
body:has(#floor-editor) .page-heading { display: none; }
body:has(#floor-editor) .screen-tabs { margin-bottom: 6px; flex-shrink: 0; }
.floor-toolbar { padding: 5px 8px; }
.floor-status-row { margin: 2px 0; }
#room-summary { margin: 0 0 3px; }
.plan-footer .check-label { min-height: 26px; }
.footer-hint { font-size: 11px; }
.plan-tools { padding: 4px 6px; }
.plan-tools .button { padding: 4px 8px; min-height: 30px; }
.plan-viewport { padding: 4px; }
.align-tools[hidden] { display: none; }

/* Reading of a drawing */
.plan-read-dialog{width:min(1280px,96vw);max-height:94vh}
.plan-read-body{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}
#plan-read-view{width:100%;height:auto;max-height:76vh;background:#fff;border:1px solid #d8d2c6;border-radius:6px}
.read-space{fill:#8f8f8f;fill-opacity:.08;stroke:none;cursor:pointer}
.read-space.on{fill:#2f6fb5;fill-opacity:.18}
.read-wall{stroke:#c0392b;stroke-opacity:.85}
.read-hollow{stroke:#2e8b57}
.read-curved{stroke:#c0392b}
.read-window{stroke:#1f7ae0}
.read-door{stroke:#f08a00}
.read-passage{stroke:#e6c700}
.read-post{fill:#00a5b5;fill-opacity:.8}
.read-measure{stroke:#d6007a;fill:#d6007a}
.plan-read-side h3{margin:12px 0 4px}
#plan-read-scale[data-level=warning]{color:#9a4a00;font-weight:600}
.plan-zones,.plan-questions{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.plan-zones li{display:grid;grid-template-columns:auto 1fr auto;gap:6px;align-items:center}
#plan-zones li{grid-template-columns:minmax(0,1fr)}
#plan-zones input,#plan-zones select,#plan-read-spaces input[type=text]{min-width:0;width:100%}
.plan-questions li{border-left:3px solid #d08a1e;padding:4px 0 4px 8px}
.plan-questions p{margin:0 0 6px}
.zone-chip{display:inline-block;width:12px;height:12px;border-radius:2px;margin-right:4px;border:1px solid #0003;vertical-align:-1px}
.legend-read{font-size:12px;display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center}
.legend-read span{display:inline-block;width:14px;height:4px}
.k-wall{background:#c0392b}.k-hollow{background:#2e8b57}.k-window{background:#1f7ae0}.k-door{background:#f08a00}.k-passage{background:#e6c700}
.ref-passage-edit{stroke:#e6c700;stroke-opacity:.55;cursor:pointer}
@media (max-width:900px){.plan-read-body{grid-template-columns:1fr}}
