/* Interface only: SVG annotations retain their screen-space layout and scale. */
@media screen {
  .constructor-focus>.app-shell>:is(.topbar,.project-modes) { display:none; }
  .constructor-mode>.app-shell>.topbar { min-height:56px; padding-block:6px; }
  .constructor-mode .brand-caption { display:none; }
  .constructor-mode>.app-shell>.project-modes { min-height:44px; padding-block:4px; }
}
.finish-surface { padding:10px 0; border-top:1px solid var(--line); }
.finish-surface>strong { display:block; font-size:13px; margin-bottom:8px; }
.finish-materials { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
.finish-material { display:flex; flex-direction:column; align-items:center; gap:5px; min-height:64px; padding:7px 2px; border:1px solid transparent; border-radius:8px; background:var(--color-page); color:var(--ink); font:500 11px/1.3 var(--font-ui); }
.finish-material[aria-pressed="true"] { border-color:var(--color-accent-ink); background:var(--color-accent-soft); }
.finish-cube { display:block; position:relative; width:27px; height:27px; border-radius:5px; background:linear-gradient(145deg,#ffffff55,transparent 60%),var(--sample); box-shadow:inset -4px -4px 0 #00000016,inset 1px 1px 0 #ffffff80,0 0 0 1px #00000015; }
.finish-oak,.finish-walnut,.finish-ash,.finish-board { background:repeating-linear-gradient(90deg,transparent 0 6px,#00000016 6px 7px),var(--sample); }
.finish-texture-heading { color:var(--color-secondary); font-size:11px; margin:10px 0 6px; }
.finish-textures { grid-template-columns:repeat(3,minmax(0,1fr)); }
.finish-laminate,.finish-wood { background:repeating-linear-gradient(90deg,transparent 0 5px,#0002 6px 7px),var(--sample); }
.finish-parquet { background:repeating-conic-gradient(#fff3 0% 25%,#0001 0% 50%) 0 0/14px 14px,var(--sample); }
.finish-carpet,.finish-vinyl { background:radial-gradient(#0002 20%,transparent 25%) 0 0/3px 3px,var(--sample); }
.finish-wallpaper { background:repeating-linear-gradient(90deg,transparent 0 5px,#0002 6px,transparent 7px 9px),var(--sample); }
.finish-tile { background:repeating-linear-gradient(0deg,transparent 0 12px,#ffffff88 12px 13px),repeating-linear-gradient(90deg,transparent 0 12px,#ffffff88 12px 13px),var(--sample); }
.finish-stone,.finish-concrete,.finish-plaster,.finish-linoleum { background:repeating-linear-gradient(130deg,transparent 0 9px,#ffffff30 10px 11px,transparent 12px 18px),var(--sample); }
.finish-colors { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; margin-top:9px; }
.finish-color,.finish-custom { position:relative; display:grid; place-items:center; min-height:33px; padding:3px; border:1px solid transparent; border-radius:6px; background:none; }
.finish-color .finish-cube { width:24px; height:24px; }
.finish-color[aria-pressed="true"] { border-color:var(--ink); }
.finish-color[aria-pressed="true"]::after { content:'✓'; position:absolute; right:0; bottom:0; font:700 10px/14px var(--font-ui); width:14px; height:14px; border-radius:50%; background:var(--ink); color:white; text-align:center; }
.finish-custom { cursor:pointer; border:1px dashed var(--line); color:var(--ink); font-size:20px; }
.finish-custom input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.finish-custom:focus-within { outline:2px solid var(--color-focus); }
.finish-direction { display:flex; align-items:center; justify-content:space-between; margin-top:9px; gap:8px; font-size:12px; }
.finish-direction .property-input { width:84px; margin:0; }
.finish-reset { width:100%; min-height:32px; font-size:12px; color:var(--ink-soft); background:var(--color-page); border-radius:7px; }
#palette.searching .palette-group:not(.expanded) .palette-items { display:none; }
#customFurnitureGroup.expanded #customFurnitureList { display:block; }
.custom-library-heading .palette-group-header { background:none; width:auto; height:auto; flex:1; font-size:13px; padding:0; grid-template-columns:minmax(0,1fr) auto 16px; margin-right:8px; }
.preset-edit-hint { display:none; }
.library-results:empty { display:none; }
@media screen {
  html[data-workspace] :is(button,input,select,textarea,summary,[contenteditable="true"]):focus-visible { outline:2px solid var(--color-focus); outline-offset:3px; }
  body { min-width:0; height:100vh; height:100dvh; overflow:hidden; }
  body>.app-shell { height:100%; min-height:0; }
  .topbar { min-height:76px; height:auto; flex-shrink:0; padding:12px 20px; gap:20px; background:var(--panel); }
  .brand-block { width:208px; }
  .brand-name { font-size:var(--text-title); line-height:1.1; }
  .brand-caption { font-size:var(--text-caption); letter-spacing:.025em; }
  .project-title { min-width:180px; }
  .title-row h1 { font-size:var(--text-heading); line-height:1.35; }
  .title-edit,.eyebrow,.section-kicker { font:500 var(--text-caption)/1.4 var(--font-ui); letter-spacing:.05em; }
  .save-state { font-size:var(--text-caption); }
  :is(.outline-button,.primary-button,.avatar-button,.project-modes button) { font-size:var(--text-ui); min-height:var(--control-height); border-radius:var(--radius-control); }
  .primary-button { font-weight:700; }
  .new-project-button { background:var(--color-accent-soft); border-color:var(--line); color:var(--ink); }
  .new-project-icon { color:var(--color-accent-ink); }
  .project-modes { height:auto; min-height:52px; padding:8px 20px; gap:8px; overflow-x:auto; }
  .project-modes button { padding:8px 12px; }
  .project-modes button span { font-size:var(--text-caption); font-family:var(--font-ui); }
  .project-file-actions button { font-size:var(--text-small); }
  .workspace,.workspace.inspector-open,.project-modes~.workspace { flex:1; min-height:0; height:auto; grid-template-columns:240px minmax(0,1fr) 312px; }
  #constructorWorkspace { flex:1; min-height:0; height:auto; }
  .left-panel { padding:16px 12px; scrollbar-gutter:stable; overscroll-behavior:contain; }
  .left-panel>* { flex-shrink:0; }
  .workspace .right-panel,.workspace.inspector-open .right-panel { display:flex; flex-direction:column; width:auto; padding:16px; overflow:hidden; }
  .right-panel .inspector-header { flex-shrink:0; }
  #inspectorContent { display:flex; flex-direction:column; flex:1; min-height:0; overflow:auto; }
  #inspectorContent:has(.compact-properties) { overflow:hidden; }
  #inspectorContent>.custom-inspector { flex-shrink:0; }
  .compact-properties { display:flex; flex-direction:column; flex:1; min-height:0; }
  .property-fields { min-height:0; overflow-y:auto; scrollbar-gutter:stable; overscroll-behavior:contain; padding:3px; }
  :is(.tool-button,.palette-group-header,.custom-library-heading,.quick-start-title) { font-size:var(--text-ui); }
  .tool-button { height:auto; min-height:40px; grid-template-columns:22px 1fr auto; gap:4px; padding:8px; line-height:1.35; }
  .section-heading { font-size:var(--text-caption); letter-spacing:.035em; }
  :is(.palette-instruction,.library-results,.library-empty,.custom-library-empty,.room-palette-help,.shortcut-hint,.version-label,.group-count,kbd) { font-size:var(--text-caption); line-height:1.5; color:var(--muted); }
  kbd { font-family:var(--font-data); letter-spacing:0; }
  .palette-section { padding:16px 0 0; }
  .palette-group-header { min-height:40px; }
  .palette-card { min-width:0; padding:10px 8px; border-radius:var(--radius-control); }
  .palette-card b,.interior-card b,.custom-card b { font-size:var(--text-small); font-weight:650; line-height:1.4; }
  .palette-card small,.interior-card small,.custom-card small,.preset-edit-hint { font-size:var(--text-caption); font-family:var(--font-ui); line-height:1.4; }
  .palette-card small { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
  .custom-card b { max-width:none; overflow-wrap:anywhere; }
  .custom-card-main>span { min-width:0; }
  .custom-card { grid-template-columns:minmax(0,1fr) 32px; }
  .custom-card-edit { height:32px; }
  #customFurnitureGroup,.custom-inspector { background:var(--color-accent-soft); border-color:var(--line); border-radius:var(--radius-control); }
  .library-search input { font-size:var(--text-ui); min-height:var(--control-height); }
  .preset-heading { font-size:var(--text-ui); }
  .preset-dimensions label,.preset-dimensions small,.preset-actions button,.preset-help,.preset-error { font-size:var(--text-caption); line-height:1.5; }
  .preset-dimensions input { font:500 var(--text-ui) var(--font-ui); height:var(--control-height); }
  .preset-actions button { min-height:34px; }
  .preset-error { color:var(--color-danger); }
  .canvas-toolbar { flex-shrink:0; min-height:52px; height:auto; padding:10px 16px; gap:8px; flex-wrap:wrap; }
  .canvas-action { font-size:var(--text-small); min-height:32px; }
  .breadcrumbs { font-size:var(--text-caption); }
  :is(.canvas-note,.scale-chip,.scale-label,.zoom-control>span,.navigation-help,.canvas-status,.status-key) { font-size:var(--text-caption); line-height:1.4; color:var(--muted); }
  .canvas-note { max-width:calc(100% - 36px); left:18px; top:16px; }
  .navigation-help { left:20px; right:20px; bottom:68px; padding:5px 8px; }
  .canvas-status { gap:10px; height:auto; min-height:36px; flex-shrink:0; padding:8px 12px; }
  .status-center { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .canvas-stage { min-height:0; }
  .right-panel .inspector-header h2 { font-size:var(--text-heading); line-height:1.35; }
  :is(.property-label,.compact-properties .property-label) { font:500 var(--text-caption)/1.5 var(--font-ui); letter-spacing:.025em; margin-bottom:6px; }
  :is(.property-input,.compact-properties .property-input) { height:var(--control-height); font:500 var(--text-ui) var(--font-ui); border-radius:var(--radius-control); padding:0 10px; }
  .compact-properties .property-row { gap:12px; margin-top:12px; }
  .workspace .right-panel .kitchen-plan-dimensions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:8px; margin-top:6px; }
  .workspace .right-panel .kitchen-plan-dimensions .property-label { display:grid; grid-template-rows:16px 30px; gap:4px; min-width:0; margin:0; font-size:11px; line-height:16px; letter-spacing:0; white-space:nowrap; }
  .workspace .right-panel .kitchen-plan-dimensions .property-input { width:100%; min-width:0; height:30px; margin:0; padding:0 8px; }
  :is(.room-tool-section summary,.compact-properties .room-tool-section summary,.property-help summary,.door-controls>strong,.compact-properties .door-controls>strong,.wall-split-controls>strong) { font-size:var(--text-ui); line-height:1.5; }
  :is(.room-tool-section summary span,.room-tool-help,.compact-properties .room-tool-help,.hint-text,.attachment-hint,.area-summary,.wall-actions-title,.property-help,.custom-inspector) { font:400 var(--text-caption)/1.5 var(--font-ui); letter-spacing:0; }
  :is(.contour-button,.compact-properties .contour-button,.wall-action,.connect-button,.disconnect-button,.mirror-button,.back-to-room,.shared-elements button,.wall-split-controls button) { font-size:var(--text-small); line-height:1.35; min-height:var(--control-height); border-radius:var(--radius-control); }
  .compact-properties .wall-action { min-height:40px; }
  .compact-properties .room-palette b { font-size:var(--text-small); }
  .compact-properties .room-palette small { font-size:var(--text-caption); }
  .compact-properties .room-palette .palette-card { grid-template-columns:22px minmax(0,1fr); }
  .interior-appearance label { font-size:var(--text-small); }
  .compact-properties .property-footer button { font-size:var(--text-small); min-height:var(--control-height); }
  .compact-properties .property-footer { flex-shrink:0; background:var(--panel); padding:10px 0 4px; }
  .delete-button { color:var(--color-danger); }
  .empty-inspector p,.quick-start-card p,.share-modal p { font-size:var(--text-ui); line-height:1.6; color:var(--ink-soft); }
  .share-modal { width:min(460px,calc(100vw - 32px)); border-radius:var(--radius-panel); box-shadow:var(--shadow-panel); }
  .share-modal h2 { font-size:var(--text-title); letter-spacing:-.02em; }
  .share-link { height:auto; min-height:48px; flex-wrap:wrap; padding:10px; font:400 var(--text-caption) var(--font-ui); }
  .share-link button { font-size:var(--text-small); min-height:36px; }
  .share-modal .share-local-note { margin-top:12px; font-size:var(--text-caption); }
  .toast { max-width:calc(100vw - 32px); font-size:var(--text-ui); line-height:1.45; border-radius:var(--radius-control); }
  .toast-mark { font-size:var(--text-caption); flex-shrink:0; }
  .project-3d-tools button { font-size:var(--text-ui); }
  .project-3d-tools .project-3d-zoom button { font-size:var(--text-title); }
  .project-3d-header kbd,.project-3d-note,.project-3d-footer { font-size:var(--text-caption); }
  .project-3d-heading h2 { font-size:var(--text-heading); }
  .project-3d-note { white-space:normal; text-align:center; width:max-content; max-width:calc(100% - 32px); }
}
@media screen and (max-width:1320px) {
  .topbar { gap:12px; padding-inline:16px; }
  .brand-block { width:180px; }
  .top-actions .save-state,.top-actions .avatar-button { display:none; }
  .outline-button,.primary-button { padding-inline:10px; font-size:var(--text-small); }
  .workspace,.workspace.inspector-open,.project-modes~.workspace { grid-template-columns:220px minmax(0,1fr) 292px; }
}
@media screen and (max-width:1080px) {
  .brand-block { width:auto; }
  .brand-caption,.back-button,.title-edit,.eyebrow { display:none; }
  .project-title { min-width:120px; }
  .project-title h1 { font-size:var(--text-ui); }
  .project-modes { padding-inline:12px; }
  .project-modes button { padding-inline:8px; font-size:var(--text-small); }
  .project-file-actions button { font-size:var(--text-caption); }
  .workspace,.workspace.inspector-open,.project-modes~.workspace { grid-template-columns:204px minmax(0,1fr) 272px; }
  .status-center,.canvas-note { display:none; }
  .workspace .right-panel,.workspace.inspector-open .right-panel { padding:12px; }
}
@media screen and (max-width:760px) {
  .topbar { flex-wrap:wrap; }
  .top-actions { width:100%; justify-content:flex-end; }
  .project-modes { gap:4px; }
  .project-file-actions { margin-left:0; }
  .workspace,.workspace.inspector-open,.project-modes~.workspace { grid-template-columns:180px minmax(260px,1fr) 272px; overflow-x:auto; }
}
/* Explicit selection: neighbouring furniture is never absorbed automatically. */
.kitchen-group-button{width:100%;padding:8px 10px;margin-bottom:8px;border:1px solid #b8c8b3;border-radius:6px;background:#f1f6ec;color:#4d6446;font-family:inherit;font-size:12px;font-weight:400;line-height:1.4;cursor:pointer}
.kitchen-group-dialog{max-width:460px}
.kitchen-group-dialog .kitchen-group-list{display:grid;gap:5px;max-height:300px;overflow:auto}
.kitchen-group-dialog .kitchen-group-list label{display:flex;align-items:center;gap:9px;padding:8px;border:1px solid #e1e6df;border-radius:5px;font-size:12px}
.kitchen-group-dialog .kitchen-group-list input{width:16px;height:16px;margin:0;flex:none;accent-color:#668849}
.kitchen-group-dialog .kitchen-group-list span{min-width:0;overflow-wrap:anywhere}
.kitchen-split-dialog .kitchen-group-list label{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,.75fr);gap:8px}
.kitchen-split-dialog .kitchen-group-list select{width:100%;min-width:0;height:30px;padding:3px 6px;border:1px solid #d9e1d7;border-radius:5px;background:#fff;color:inherit;font:inherit;font-size:11px}
.kitchen-split-dialog .kitchen-group-list select:focus-visible{outline:2px solid #668849;outline-offset:1px}
.kitchen-split-dialog .kitchen-split-status{font-size:11px;line-height:1.5;color:#687665}
.kitchen-split-dialog .kitchen-split-status.error{color:#a43d35}
.kitchen-depth-dialog{max-width:420px;width:calc(100% - 32px)}
.kitchen-depth-options{display:grid;gap:8px;margin:14px 0}
.kitchen-depth-options button{display:grid;gap:4px;text-align:left;padding:12px;border:1px solid #d9e2dd;border-radius:8px;background:#f7faf8;color:#34463d}
.kitchen-depth-options button:hover,.kitchen-depth-options button:focus-visible{border-color:#4b8f72;background:#edf5ef;outline:2px solid #4b8f7222}
.kitchen-depth-options b{font-size:13px;font-weight:600}
.kitchen-depth-options small{font-size:11px;line-height:1.4;font-weight:400;color:#617168}
