/* Final visual authority. See DESIGN.md for roles, scales and responsive rules. */
:root{--ui-ink:#28374b;--ui-secondary:#687268;--ui-muted:#767c72;--ui-bg:#f5f3ee;--ui-panel:#fffefa;--ui-border:#dfdfd5;--ui-soft:#f0f1ea;--ui-accent:#56785f;--ui-danger:#c44740;--ui-radius:8px;--ui-control:40px;--ui-compact:36px;--ui-gap:12px;--ink:var(--ui-ink);--muted:var(--ui-muted);--line:var(--ui-border);--cream:var(--ui-bg)}
body{display:flex;flex-direction:column;min-height:100dvh}.header{flex-shrink:0}main{flex:1;min-height:0;height:auto}.app-footer{flex:0 0 30px;min-height:30px;padding:0 24px;background:var(--ui-panel);border-top:1px solid var(--ui-border);display:flex;align-items:center;color:var(--ui-secondary);font-size:11px;line-height:1.5}.save-indicator{display:flex;align-items:center;gap:8px}.app-footer #save-status{white-space:normal}
.header .project{justify-content:flex-start;padding-left:12px}.header .home-picker{flex:0 1 470px}.header .home-picker select{max-width:none}
.library{container-type:inline-size;padding-top:26px}.library h1{font-size:25px;line-height:1.4;margin:9px 0 8px}.library .search{margin:20px 0 18px;height:var(--ui-control);min-height:var(--ui-control);padding:0 10px;border-radius:var(--ui-radius);border-color:var(--ui-border)}.library .section-label{margin-bottom:12px;align-items:center}.section-label,.category-field,.field,.switch-row{color:var(--ui-secondary)}
.catalog{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px;padding:0 5px 18px 0;scrollbar-gutter:stable;min-height:120px}.asset-card{display:flex;flex-direction:column;align-items:stretch;align-self:start;gap:0;color:var(--ui-ink);border-radius:10px;outline-offset:4px}.asset-preview{width:100%;flex-shrink:0;background:#f0eee7;border:1px solid #e6e3d9;border-radius:10px}.asset-card:hover .asset-preview{background:#eaece3;border-color:#9eb39f}.asset-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:18px;font-weight:500;letter-spacing:-.1px;word-break:keep-all;overflow-wrap:anywhere;white-space:normal;height:36px;min-height:36px;margin:8px 1px 0;color:var(--ui-ink);text-decoration:none}.asset-kind{font-size:11px;line-height:16px;height:16px;margin:3px 1px 0;color:var(--ui-muted);white-space:nowrap}.asset-add{width:24px;height:24px;right:7px;bottom:7px;background:var(--ui-panel);color:var(--ui-accent);box-shadow:0 1px 4px #28374b10}.asset-add svg{width:12px;height:12px;stroke-width:1.8}.library-footer{padding:14px 0;gap:10px}.library-footer b{font-size:12px}.library-footer small{font-size:11px;line-height:1.5}
/* Native and hover-preview selects share one control silhouette. */
.field,.category-field{font-size:13px;line-height:20px}.field{margin-bottom:18px}.category-field>span{margin-bottom:8px}.field select:not(.preview-select-native),.category-field select,.home-picker select,.preview-select-trigger{box-sizing:border-box;display:block;width:100%;height:var(--ui-control);min-height:var(--ui-control);padding:0 36px 0 12px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);background-color:var(--ui-panel);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23556458' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:16px;appearance:none;-webkit-appearance:none;color:var(--ui-ink);font-size:13px;font-weight:400;line-height:20px;text-align:left;box-shadow:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.field select:not(.preview-select-native){margin-top:8px}.field>.preview-select{display:block;border:0;border-radius:0;padding:0;margin-top:8px;overflow:visible;background:none;box-shadow:none}.preview-select-trigger::after{content:none;display:none}.preview-select-trigger:hover,.field select:not(.preview-select-native):hover,.category-field select:hover{border-color:#aebcaf}.preview-select-trigger:disabled,.field select:disabled,.category-field select:disabled{background-color:#f3f3ee;color:#969b92;cursor:default}.preview-select-menu{padding:6px;border:1px solid var(--ui-border);border-radius:10px;background:var(--ui-panel);box-shadow:0 8px 25px #28374b1c}.preview-select-menu button{font-size:13px;line-height:20px;min-height:36px;padding:8px 10px;border-radius:6px}.preview-select-menu button:hover,.preview-select-menu button:focus{background:#eaf0e8;color:#355842}.preview-select-menu button[aria-selected=true]{background:#e4ece1;color:#355842;font-weight:600}
.field>div:not(.preview-select){border:1px solid var(--ui-border);border-radius:var(--ui-radius);margin-top:8px;min-height:var(--ui-control);background:var(--ui-panel)}.field input,.coordinate-row input{font-size:13px;line-height:20px;color:var(--ui-ink)}.coordinate-row input{height:var(--ui-control);border-color:var(--ui-border);border-radius:var(--ui-radius)}.field input:focus{outline:0}.field>div:not(.preview-select):focus-within{outline:2px solid #9db59e;outline-offset:2px}.btn,.home-picker button{border-radius:var(--ui-radius);font-size:13px;line-height:20px;min-height:var(--ui-control)}.btn{display:inline-flex;justify-content:center;align-items:center;gap:8px}.btn.primary{background:var(--ui-ink);border-color:var(--ui-ink)}.header-actions .btn.primary span{margin-left:4px}.header .home-picker select,.header .home-picker button{height:var(--ui-compact);min-height:var(--ui-compact)}.header .home-picker button{background:#edf2e9;border-color:#d4dfd0;color:#46634d}.view-controls button,.drag-mode-controls button{border-radius:6px;min-height:32px}.settings-divider{height:1px;min-height:1px;background:var(--ui-border);margin:20px 0}.rule{background:var(--ui-border);margin:22px 0}.inspector .surface-settings{display:block}.inspector .field,.inspector .switch-row{margin-bottom:18px}.switch-row{min-height:24px;font-size:13px;line-height:20px}.switch-row input{flex-shrink:0}.muted,.small{color:var(--ui-muted)}
.btn:focus-visible,.asset-card:focus-visible,.preview-select-trigger:focus-visible,select:focus-visible,.home-picker button:focus-visible{outline:2px solid #91aa93;outline-offset:3px}.view-controls button:hover,.drag-mode-controls button:hover{background-color:#edf1e9}.view-controls button.active,.drag-mode-controls button[aria-pressed=true]{background:var(--ui-ink);color:white}
@container(max-width:230px){.catalog{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 10px}.asset-name{font-size:12px;line-height:18px}.asset-kind{font-size:11px}}
@media(max-width:1180px){.header .project{flex-wrap:nowrap;padding-left:0}.header .home-picker{flex-basis:100%}.header-actions .btn{font-size:13px}.header .home-picker select{min-width:100px}}
@media(max-width:850px){body{height:auto}main{flex:none;height:auto}.app-footer{margin-top:auto}.header .project{flex-wrap:nowrap}.header .home-picker{flex:1}.inspector .settings-divider{grid-column:1/-1;margin:4px 0}.inspector .surface-settings{display:contents}.header-actions .btn{font-size:12px}.library h1{font-size:24px}.library-footer small{white-space:normal}}
@media(max-width:600px){.header .home-picker{flex-basis:auto}.header-actions .btn{font-size:11px;padding:8px}.catalog{grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:18px 12px}.app-footer{padding:0 16px}.library h1{font-size:24px}.inspector .field{min-width:0}.asset-name{font-size:12px}}
/* Keep predictable catalogue columns; preserve usable card width at each desktop size. */
@media(min-width:1181px) and (max-width:1499px){main{grid-template-columns:310px minmax(300px,1fr) 300px}}
@media(min-width:1500px){main{grid-template-columns:450px minmax(400px,1fr) 320px}.catalog{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:1900px){main{grid-template-columns:600px minmax(400px,1fr) 340px}.catalog{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px){.catalog{grid-template-columns:repeat(auto-fill,minmax(112px,1fr))}}

button:focus-visible,select:focus-visible{outline:2px solid #91aa93;outline-offset:3px}.search:focus-within{outline:2px solid #91aa93;outline-offset:2px}.search input:focus-visible,.field input:focus-visible{outline:0}
/* Help is an independent icon action beside the view switch group. */
.stage-tools{position:absolute;right:15px;top:14px;z-index:10;display:flex;align-items:flex-start;gap:8px;max-width:calc(100% - 28px)}
.stage-tools .view-controls{position:static;inset:auto;width:auto;max-width:100%;flex:0 1 auto;justify-content:flex-end}
.stage-tools #stage-tips-toggle{flex:0 0 36px;width:36px;height:36px;min-height:36px;margin-top:4px;display:grid;place-items:center;border:1px solid var(--ui-border);border-radius:50%;background:var(--ui-panel);color:var(--ui-secondary);padding:0}
.stage-tools #stage-tips-toggle span{display:block;border:0;font-size:16px;line-height:1;font-weight:650}
.stage-tools #stage-tips-toggle:hover{background:#edf1e9;color:var(--ui-accent)}
@container(max-width:660px){.stage-tools{right:10px;max-width:calc(100% - 20px)}.stage-tools .view-controls{left:auto;right:auto;width:auto;max-width:100%}}
/* Compact catalogue: category on the image, one-line title, details on demand. */
.asset-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:normal;-webkit-line-clamp:unset;height:18px;min-height:18px;margin:8px 1px 0;font-size:12px;line-height:18px}
.asset-preview .asset-kind{position:absolute;top:0;left:0;right:0;transform:none;z-index:1;display:block;width:100%;max-width:100%;height:25px;min-height:25px;margin:0;padding:4px 6px;border:0;border-bottom:1px solid #d9dfd280;border-radius:0;background:#fffefad9;box-shadow:none;backdrop-filter:blur(2px);color:#5d6d59;font-size:11px;line-height:16px;font-weight:500;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.catalog{row-gap:18px}.asset-preview img{padding-top:16px;object-fit:contain}
.catalog-tooltip{position:fixed;z-index:180;max-width:min(280px,calc(100vw - 16px));padding:12px 14px;border:1px solid var(--ui-border);border-radius:10px;background:var(--ui-panel);color:var(--ui-ink);box-shadow:0 6px 24px #28374b24;pointer-events:none;line-height:1.5;text-align:left}
.catalog-tooltip strong{display:block;font-size:13px;font-weight:650;line-height:1.5;overflow-wrap:anywhere;margin-bottom:5px}.catalog-tooltip span{display:block;font-size:11px;line-height:1.6;color:var(--ui-secondary);overflow-wrap:anywhere}.catalog-tooltip span+span{margin-top:3px}
/* Home selection is centered in the title bar, independent of the end actions. */
.header .project{justify-content:center;padding-left:0}
@media(min-width:851px){.header{grid-template-columns:minmax(0,1fr) minmax(0,clamp(280px,calc(100vw - 540px),470px)) minmax(0,1fr)}.header .brand{justify-self:start}.header .project{width:100%;justify-self:center}.header-actions{justify-self:end}.header .home-picker{flex:1;max-width:470px}}
/* Home lifecycle and stage utilities. */
.header .home-picker .icon-action{flex:0 0 32px;width:32px;min-width:32px;padding:0;display:grid;place-items:center;color:var(--ui-secondary);background:var(--ui-panel)}.icon-action svg{width:17px;height:17px;fill:currentColor}.header .home-picker #home-delete{color:#ac5248}.danger-fill{background:#c44740;color:white;border-color:#c44740}
.no-home-state{display:none;position:absolute;inset:0;z-index:20;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:28px;background:#ece9e0;border-radius:inherit}.no-home-state h3{font-size:22px;margin:0 0 12px}.no-home-state p{font-size:13px;color:var(--ui-secondary);margin:0 0 22px;line-height:1.7}.no-home .no-home-state{display:flex}.no-home #viewport>:not(#no-home-state):not(#loading){visibility:hidden}.no-home-inspector{display:none;font-size:13px;color:var(--ui-secondary);line-height:1.7}.no-home .inspector>:not(h2):not(.eyebrow):not(.no-home-inspector){display:none}.no-home .no-home-inspector{display:block}.no-home .library .asset-card{opacity:.45;cursor:default}.no-home .library .asset-add{display:none}.no-home #home-name{cursor:default}
.inspector .room-map{height:220px}.inspector .room-map[data-mode=wall]{height:322px}.inspector .preview-label{margin:0 0 8px}.preview-select-native[hidden]{display:none!important}.field>.preview-select{border:0!important;outline:0!important;box-shadow:none!important}
.history{flex-wrap:wrap;justify-content:flex-end}.history #placed-items,.history #screenshot{width:auto;height:32px;padding:0 9px;font-size:12px;white-space:nowrap}.scene-bottom{left:12px;right:auto;bottom:76px;max-width:calc(100% - 24px);display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:10px 12px;border:1px solid #e0e2d5;border-radius:8px;background:#fffefad9;color:#586551;opacity:1!important;text-align:left;line-height:1.6;font-size:11px;box-shadow:0 2px 10px #28374b0c}.scene-bottom span{display:block;white-space:normal}.scene-bottom #drag-mode-hint{font-weight:500}.wall-editing .scene-bottom{display:none}
.placed-dialog{width:min(1000px,calc(100vw - 32px));max-height:85dvh;padding:24px;border:1px solid var(--ui-border);border-radius:14px;background:var(--ui-panel);color:var(--ui-ink);box-shadow:0 20px 90px #28374b33}.placed-dialog::backdrop{background:#26334766}.placed-heading{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:20px}.placed-heading h2{margin:0 0 6px}.placed-table-wrap{overflow:auto;max-height:60dvh}.placed-dialog table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}.placed-dialog th{position:sticky;top:0;background:#eef1e9;color:#52634d;font-weight:600;white-space:nowrap}.placed-dialog th,.placed-dialog td{padding:10px 12px;border-bottom:1px solid var(--ui-border);vertical-align:middle}.placed-dialog td:first-child{min-width:150px;font-weight:500}.placed-dialog td:nth-child(3),.placed-dialog td:nth-child(4){white-space:nowrap}.placed-dialog .btn{min-height:32px;padding:5px 10px;font-size:12px}
@container(max-width:500px){.scene-bottom{font-size:11px;padding:8px 10px;max-height:125px;overflow:hidden}.workspace-heading .history{max-width:240px;gap:5px}}
.no-home .workspace-footer{visibility:hidden}

/* Title tools, persistent help, and keyboard-shaped stage guidance. */
.header-actions{position:relative;z-index:110;flex-shrink:0}.header-actions-panel{display:flex;align-items:center;gap:8px}.header-actions-panel .btn{white-space:nowrap;min-height:36px;padding:8px 12px}#header-menu-toggle{display:none;width:38px;height:38px;padding:8px}#header-menu-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.scene-bottom,.stage-tips{background:#fffefad9;box-shadow:0 2px 10px #28374b0c;backdrop-filter:blur(5px)}.scene-bottom{gap:6px;max-height:none;width:max-content;max-width:calc(100% - 24px)}.scene-bottom .shortcut-grid{display:grid;grid-template-columns:repeat(2,minmax(0,auto));gap:6px 16px;width:100%}.scene-bottom .shortcut-grid>span{display:flex;align-items:center;gap:5px;min-width:0;line-height:1.5}.scene-bottom kbd,.stage-tips kbd{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:21px;padding:2px 5px;border:1px solid #c9cfc1;border-bottom-width:2px;border-radius:4px;background:#ffffffa8;color:#465443;font-family:inherit;font-size:10px;font-weight:500;line-height:1.2;white-space:nowrap}.scene-bottom #drag-mode-hint{font-weight:400}.stage-tips{border-color:#e0e2d5}.library .catalog{padding-bottom:16px}
@media(max-width:1400px){#header-menu-toggle{display:inline-flex}.header-actions-panel{display:none;position:absolute;top:calc(100% + 10px);right:0;width:190px;padding:8px;background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:10px;box-shadow:0 8px 28px #28374b26;flex-direction:column;align-items:stretch}.header-actions.actions-open .header-actions-panel{display:flex}.header-actions-panel .btn{justify-content:flex-start;width:100%;font-size:13px!important}.header-actions-panel .btn.primary{justify-content:space-between}}
@container(max-width:500px){.scene-bottom{padding:8px;max-height:none;font-size:10px}.scene-bottom .shortcut-grid{gap:5px 10px}.scene-bottom kbd{padding:2px 4px;font-size:9px}}

/* Installed furniture is an item inventory, grouped by catalogue ID. */
.placed-dialog{width:min(640px,calc(100vw - 32px))}.placed-dialog th:first-child,.placed-dialog td:first-child{width:88px;min-width:0;padding-right:0}.placed-dialog td:nth-child(3){width:84px;text-align:right;font-size:15px;font-weight:650;color:var(--ui-ink)}.placed-dialog th:last-child{text-align:right}.placed-item-preview{width:72px;height:72px;display:grid;place-items:center;background:#f0eee7;border:1px solid #e6e3d9;border-radius:9px;overflow:hidden}.placed-item-preview img{display:block;width:72px;height:72px;object-fit:contain}.placed-item-preview>span{font-size:24px;color:var(--ui-muted)}.placed-item-name strong{display:block;font-size:13px;font-weight:550;line-height:1.5;overflow-wrap:anywhere}.placed-item-name span{display:block;font-size:11px;color:var(--ui-muted);margin-top:5px}.placed-dialog td:nth-child(2){white-space:normal}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:600px){.placed-dialog{padding:16px}.placed-dialog th,.placed-dialog td{padding:10px 8px}.placed-dialog th:first-child,.placed-dialog td:first-child{width:68px}.placed-item-preview,.placed-item-preview img{width:56px;height:56px}}

/* Keep the two-line wordmark inside the icon height and align its text edges. */
.header .brand{align-items:center}.header .brand-copy{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}.header .brand-title{display:block;line-height:1.15}.header .brand-copy small{display:block;margin:0;padding:0;font-size:11px;line-height:1.2;letter-spacing:2.4px;text-align:left}
.workspace-heading h2 #home-name{display:inline-flex;align-items:center;gap:8px;line-height:1.3}.workspace-heading h2 #home-name::after{content:none}.workspace-heading h2 #home-name .home-name-label{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.name-edit-icon{display:block;flex:0 0 16px;width:16px;height:16px;fill:none;stroke:#8b7967;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.no-home .name-edit-icon{display:none}
.workspace-heading h2 #home-name .home-name-label{font:inherit;color:inherit;background:transparent;padding:0;border-radius:0;letter-spacing:inherit;margin:0}

.wall-map-viewport{position:relative;overflow:hidden;border-radius:9px;isolation:isolate}.wall-map-viewport>svg{display:block;width:100%;height:220px}.wall-map-tools{position:absolute;top:7px;right:7px;display:flex;gap:4px}.wall-map-tools button{display:grid;place-items:center;width:28px;height:28px;padding:0;border:1px solid #d8dcd3;border-radius:6px;background:#fffefaee;color:#33483d;font-size:20px;cursor:pointer}.wall-map-tools button svg{width:16px;height:16px}.wall-slide-controls{margin:12px 0}.wall-slide-controls label{font-size:13px;display:flex;justify-content:space-between;gap:8px}.wall-slide-controls output{font-size:11px;color:var(--ui-muted)}.wall-slide-controls>div{display:flex;align-items:center;gap:6px;margin-top:8px}.wall-slide-controls input{width:100%;min-width:0;accent-color:#39835a}.wall-slide-controls button{width:28px;height:28px;border:1px solid #d8dcd3;border-radius:6px;background:#fffefa;color:#33483d;font-size:20px;flex-shrink:0}

.asset-tile{position:relative;min-width:0;align-self:start}.asset-tile>.asset-card{width:100%}.asset-favorite{position:absolute;right:6px;top:29px;width:25px;height:25px;padding:0;border:0;border-radius:0;background:transparent;color:#8f958e;font-size:20px;line-height:1;display:grid;place-items:center;z-index:2}.catalog-filters{display:flex;margin:10px 0 4px}.catalog-filters button{display:flex;align-items:center;gap:7px;padding:6px 10px;background:#fffefa;border:1px solid #e3dfd4;border-radius:7px;font-size:12px;color:#6e786d}.catalog-filters button[aria-pressed=true]{background:#fff5d8;color:#8d651b;border-color:#dec68e}.catalog-filters span{font-size:11px;color:inherit}

/* Wall map: show one label at a time, keep SVG icons out of map sizing rules. */
.room-map[data-mode="wall"] .wall-map-tools button svg{width:16px;height:16px;padding:0;flex:none}.wall-map-readout{position:absolute;bottom:6px;left:8px;right:8px;margin:0;padding:4px 8px;border-radius:6px;background:#fffefae6;color:#4b5a4c;font-size:11px;line-height:1.5;text-align:center;pointer-events:none}.wall-map-viewport>svg{overflow:hidden}.wall-map-viewport g[role="button"]:focus-visible{outline:none}

/* Icons use geometric boxes centered vertically, never font glyph baselines. */
button svg{display:block;flex-shrink:0;align-self:center}
.favorite-icon{width:18px;height:18px;fill:currentColor;pointer-events:none}
.asset-favorite{top:auto;bottom:33px;right:6px;width:28px;height:28px;color:#b1baaa;background:transparent;display:grid;place-items:center}
.asset-favorite[aria-pressed="true"]{color:#efb523}
.asset-favorite .favorite-icon{width:18px;height:18px;stroke:#fffefa;stroke-width:1;paint-order:stroke fill;filter:drop-shadow(0 1px 1px #28374b30);transition:transform .16s ease,filter .16s ease}
.asset-favorite:hover:not(:disabled){color:#929f89;background:transparent;filter:none}
.asset-favorite[aria-pressed="true"]:hover:not(:disabled){color:#dfa00c}
.asset-favorite:hover:not(:disabled) .favorite-icon{transform:scale(1.12);filter:drop-shadow(0 2px 2px #28374b40)}
.asset-favorite:active:not(:disabled) .favorite-icon{transform:scale(.96)}
.asset-favorite:focus-visible{outline:2px solid #91aa93;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.asset-favorite .favorite-icon{transition:none}.asset-favorite:hover:not(:disabled) .favorite-icon,.asset-favorite:active:not(:disabled) .favorite-icon{transform:none}}
.catalog-filters button{min-height:32px;display:inline-flex;align-items:center;justify-content:center}
#favorites-toggle>.favorite-icon{color:#efb523}


/* One centered icon button per row, anchored above the bottom wall readout. */
.wall-map-tools{top:auto;bottom:38px;right:7px;display:grid;grid-template-columns:32px;gap:4px}.wall-map-tools button{width:32px;height:32px;display:grid;place-items:center;line-height:1}.room-map[data-mode="wall"] .wall-map-tools button svg{display:block;width:16px;height:16px;padding:0;margin:0;align-self:center}

/* Let the interactive map fill the preview, rather than leaving a fixed SVG at the top. */
.inspector .room-map[data-mode="wall"]{display:flex;flex-direction:column}
.room-map[data-mode="wall"]>.wall-map-viewport{flex:1 1 0;min-height:0;width:100%}
.room-map[data-mode="wall"] .wall-map-viewport>svg{width:100%;height:100%;padding:0;display:block;touch-action:none}
.room-map[data-mode="wall"]>.room-map-caption{flex:0 0 auto;padding:5px 8px 8px}

/* Keep the five outer actions comfortably inside the radial backdrop. */
.selection-toolbar-actions button{width:36px;height:36px;min-width:36px;box-shadow:0 1px 4px #26334718}
.selection-toolbar-actions .handler-icon{width:20px;height:20px}
.selection-toolbar-actions #duplicate{left:56px;top:8px}
.selection-toolbar-actions #rotate-left{left:10px;top:41px}
.selection-toolbar-actions #rotate-right{left:102px;right:auto;top:41px}
.selection-toolbar-actions #delete{left:84px;top:95px;bottom:auto}
.selection-toolbar-actions #move-furniture{left:28px;top:95px}
#box-select{width:auto!important;min-width:72px;white-space:nowrap;flex-shrink:0;height:32px;padding:0 10px;border:1px solid var(--ui-border);border-radius:7px;background:var(--ui-panel);color:var(--ui-ink);font-size:12px}
#box-select[aria-pressed="true"]{background:#e1ede2;border-color:#8eae92;color:#315a3e}
.furniture-selection-box{position:absolute;z-index:105;pointer-events:none;border:1px solid #39835a;background:#39835a1f;box-shadow:0 0 0 1px #fff8}
.furniture-selection-box::after{content:attr(data-count) '개 선택';position:absolute;left:0;bottom:100%;padding:3px 7px;background:#39835a;color:white;border-radius:4px;font-size:11px;white-space:nowrap}

.scene-bottom{pointer-events:none}

/* Align visible glyph edges, including the Korean font's leading side bearing. */
.header .brand-title{letter-spacing:-.4px;position:relative;left:-.087em}
.header .brand-copy small{letter-spacing:1.6px}
.library>h1{letter-spacing:-.5px;position:relative;left:-.08em;text-indent:0;text-align:left}
.library>.eyebrow{letter-spacing:1.1px;position:relative;left:1px;text-indent:0;text-align:left}
.library>.muted{letter-spacing:0;text-indent:0;text-align:left}
.workspace-footer>span:first-child{display:inline-flex;align-items:center;gap:6px}
.workspace-footer .mini-dot{display:block;flex:0 0 4px;width:4px;height:4px;margin:0}

/* Remix SVGs share a fixed box and align with the center of the label row. */
.ui-icon{display:block;width:18px;height:18px;flex:0 0 18px;fill:currentColor;stroke:none;pointer-events:none}
.header .home-picker #home-add,#empty-home-add,.stage-tools .view-controls button{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.header-actions #export>span{margin:0}
.header .home-picker .icon-action .ui-icon{width:17px;height:17px;flex-basis:17px}
.stage-tools #stage-tips-toggle{display:inline-flex;align-items:center;justify-content:center}
.stage-tools #stage-tips-toggle .ui-icon{width:20px;height:20px;flex-basis:20px}
.stage-tools #reset-view{width:32px;padding:0;flex-shrink:0}

/* One visibility control per row, aligned beneath the preview label. */
.stage-visibility{position:absolute;left:18px;top:52px;z-index:10;display:flex;flex-direction:column;gap:7px}
.stage-visibility button{display:flex;align-items:center;justify-content:center;width:36px;height:36px;min-height:36px;padding:0;border:1px solid #7c998c;border-radius:8px;background:rgba(237,244,237,.88);color:#426b55;box-shadow:0 2px 7px #2633470d;backdrop-filter:blur(8px);cursor:pointer;transition:background .15s,color .15s,border-color .15s}
.stage-visibility button[aria-pressed=false]{background:rgba(255,254,250,.78);color:#aaa79f;border-color:#dedbd3}
.stage-visibility button:hover{background:#e0ebdf;color:#315a43;border-color:#789582}
.stage-visibility button[aria-pressed=false]:hover{background:#f3f0e9;color:#77786e}
.stage-visibility button:focus-visible{outline:2px solid #426b55;outline-offset:3px}
.stage-visibility .ui-icon{display:block;width:19px;height:19px;flex:0 0 19px;fill:currentColor}
.no-home .stage-visibility{display:none}
@container(max-width:660px){.stage-visibility{left:12px;top:51px}.scene-tag{left:12px;display:flex}}

/* Keep the left visibility column clear when plan rotation controls wrap. */
.stage-tools{max-width:calc(100% - 76px);pointer-events:none}
.stage-tools>button,.stage-tools .view-controls{pointer-events:auto}
.stage-tools .view-controls{min-width:0;flex-wrap:wrap}
@container(max-width:660px){.stage-tools{max-width:calc(100% - 122px)}}

/* Stage view controls share the same centered icon grid. */
.stage-view-toggle{position:relative;display:flex;align-items:center;justify-content:center;width:36px;height:36px;min-height:36px;padding:0;border:1px solid #dedbd3;border-radius:8px;background:rgba(255,254,250,.78);color:#aaa79f;box-shadow:0 2px 7px #2633470d;backdrop-filter:blur(8px);cursor:pointer;transition:background .15s,color .15s,border-color .15s}
.stage-view-toggle input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.stage-view-toggle:has(input:checked){border-color:#7c998c;background:rgba(237,244,237,.88);color:#426b55}
.stage-view-toggle:hover{background:#e0ebdf;color:#315a43;border-color:#789582}
.stage-view-toggle:has(input:focus-visible){outline:2px solid #426b55;outline-offset:3px}
.selection-lock-row{display:flex;justify-content:center;margin:0 0 9px;pointer-events:auto}
.selection-lock-row .btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:6px 14px;border:1px solid #fffefa;border-radius:10px;background:#28374b;color:#fffefa;font-size:13px;font-weight:600;line-height:22px;white-space:nowrap;box-shadow:0 0 0 2px #fffefa99,0 4px 12px #17233130}
.selection-lock-row .btn[aria-pressed=true]{background:#ffe7a3;color:#69490a;border-color:#fff3cd;box-shadow:0 0 0 2px #fffefa99,0 4px 12px #17233130}
.selection-lock-row .btn:hover{background:#3b506a;color:#fffefa;transform:translateY(-1px)}
.selection-lock-row .btn[aria-pressed=true]:hover{background:#ffda78;color:#593d04}
.selection-lock-row .btn:focus-visible{outline:2px solid #28374b;outline-offset:4px}
.selection-lock-row .ui-icon{display:block;width:18px;height:18px;fill:currentColor;flex:0 0 18px}

.scene-bottom .shortcut-section{width:100%;margin:0;padding:0}
.scene-bottom .shortcut-section+.shortcut-section{border-top:1px solid #bdc5b66b;padding-top:6px;margin-top:1px}
.scene-bottom .shortcut-section h3{margin:0 0 5px;font-size:10px;line-height:1.3;font-weight:650;color:#71806d;letter-spacing:0}
.scene-bottom .shortcut-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 12px}
@container(max-width:500px){.scene-bottom{left:60px;max-width:calc(100% - 72px);padding:7px;font-size:10px}.scene-bottom .shortcut-grid{gap:4px 7px}.scene-bottom .shortcut-section h3{font-size:9px;margin-bottom:4px}.scene-bottom .shortcut-section+.shortcut-section{padding-top:5px}.scene-bottom kbd{min-height:18px;font-size:9px;padding:2px 3px}.scene-bottom .shortcut-grid>span{gap:3px}}

.stage-control-tooltip{position:fixed;z-index:1000;width:max-content;max-width:min(280px,calc(100vw - 16px));padding:7px 10px;border:1px solid #ffffff24;border-radius:7px;background:#28374bf2;color:#fffefa;box-shadow:0 4px 14px #17233124;font-size:12px;line-height:1.5;font-weight:400;text-align:left;white-space:normal;overflow-wrap:anywhere;pointer-events:none;backdrop-filter:blur(6px)}
.stage-control-tooltip[hidden]{display:none}

/* One persistent guide in the lower-left, controlled by the round help button. */
#stage-tips-toggle{position:absolute;left:12px;bottom:21px;z-index:11;display:flex;align-items:center;justify-content:center;width:30px;height:30px;min-height:30px;padding:0;border:1px solid #cbd2c4;border-radius:50%;background:#fffefad9;color:#586551;box-shadow:0 2px 10px #28374b0c;backdrop-filter:blur(5px)}
#stage-tips-toggle .ui-icon{display:block;width:16px;height:16px;fill:currentColor}
#stage-tips-toggle:hover{background:#e0ebdf;color:#315a43;border-color:#789582}
#stage-tips-toggle[aria-expanded=true]{background:#e7eee2dc;border-color:#9bab92;color:#426b55}
#stage-shortcuts-panel{pointer-events:auto;flex-wrap:nowrap;max-height:calc(100% - 150px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b2bdab transparent}
#stage-shortcuts-panel .shortcut-section{flex:0 0 auto;min-width:0}
#stage-shortcuts-panel[hidden]{display:none}
@container(max-width:500px){.scene-bottom .shortcut-grid{grid-template-columns:minmax(0,1fr)}}
.wall-editing #stage-shortcuts-panel:not([hidden]){display:flex}
.no-home #stage-tips-toggle,.no-home #stage-shortcuts-panel{display:none}

.screenshot-dialog{width:min(960px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:20px;border:1px solid #dddcd3;border-radius:14px;background:#fffefa;color:#263347;box-shadow:0 16px 60px #1723313d;overflow:auto}
.screenshot-dialog::backdrop{background:#1b283c75;backdrop-filter:blur(3px)}
.screenshot-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.screenshot-heading h2{margin:0;font-size:20px;line-height:1.4}
.screenshot-heading p{margin:5px 0 0;color:#7b837b;font-size:12px;line-height:1.5}
.screenshot-heading .btn,.screenshot-footer .btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}
.screenshot-image-wrap{display:flex;align-items:center;justify-content:center;min-height:120px;border:1px solid #e5e2d9;border-radius:9px;background:#eeebe4;overflow:hidden}
.screenshot-image-wrap img{display:block;max-width:100%;max-height:65dvh;object-fit:contain;width:auto;height:auto}
.screenshot-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px}
#screenshot-filename{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7b837b;font-size:12px}
@media(max-width:600px){.screenshot-dialog{padding:14px;width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}.screenshot-heading{gap:10px;margin-bottom:12px;align-items:flex-start}.screenshot-heading h2{font-size:17px}.screenshot-heading p{font-size:11px}.screenshot-footer{gap:10px;margin-top:12px}}

/* Tour keeps the stage and the selected furniture inspector visible. */
body.tour-active main{grid-template-columns:minmax(0,1fr) 300px}
.tour-active .library,.tour-active .workspace-edit-tools,.tour-active #layout-tools-open,.tour-active #drag-mode-controls,.tour-active #selection-toolbar,.tour-active #welcome,.tour-active .stage-visibility label{display:none!important}
.tour-active .inspector>:not(#tour-inspector){display:none!important}
#tour-inspector h2{display:block;margin-bottom:20px}#tour-selection-image{display:block;width:100%;max-height:220px;object-fit:contain;background:#f3f1eb;border-radius:10px;margin-bottom:18px}
#tour-selection-name{font-size:18px;line-height:1.5}#tour-selection-category,#tour-selection-size{font-size:13px;line-height:1.6}
#tour-movement{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(3,36px);gap:5px;z-index:10;touch-action:none}
#tour-movement button{width:36px;height:36px;display:flex;align-items:center;justify-content:center;padding:0;border:1px solid #d9d6cc;border-radius:7px;background:#fffefad9;color:#33483d;touch-action:none}
#tour-movement button:first-child{grid-column:2}#tour-movement button:nth-child(2){grid-column:1}
#tour-movement button:active{background:#dbe8db}#tour-movement .ui-icon{width:19px;height:19px}
@media(max-width:850px){body.tour-active main{display:flex;flex-direction:column}.tour-active .inspector{display:block}.tour-active .workspace{min-height:600px}.tour-active .inspector #tour-inspector{display:block}.tour-active #tour-selection-image{max-height:140px}}

.tour-active .name-edit-icon{display:none}.tour-active .workspace-footer>span:first-child{visibility:hidden}

/* Keep editing gestures; suppress browser image/text drag ghosts. */
img{-webkit-user-drag:none}

/* Catalog details keep the existing thumbnail at its original pixel dimensions. */
.catalog-tooltip{width:286px;max-width:calc(100vw - 16px);box-sizing:border-box}
.catalog-tooltip-image{display:block;width:256px;height:256px;max-width:100%;object-fit:contain;margin:0 auto 10px;border-radius:6px}
.backup-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.backup-heading p{margin:0}.backup-heading button{flex-shrink:0}
.backup-browser{display:grid;grid-template-columns:minmax(210px,280px) minmax(0,1fr);gap:24px;align-items:start}.backup-browser h3{font-size:14px;margin:0 0 12px}.backup-history{min-width:0}.backup-snapshot{min-width:0}.backup-snapshot .plan-preview{width:100%;margin:0 0 16px}.backup-snapshot>p{font-size:12px;margin:0 0 12px}
#backup-records{display:flex;flex-direction:column;gap:8px;max-height:560px;overflow:auto;padding:1px}.backup-record{display:flex;flex-direction:column;align-items:flex-start;gap:5px;width:100%;padding:12px 14px;border:1px solid var(--ui-border);border-radius:9px;background:var(--ui-panel);color:var(--ui-ink);text-align:left}.backup-record strong{font-size:13px}.backup-record span{font-size:12px;color:var(--ui-secondary)}.backup-record:hover{background:#eef2eb}.backup-record[aria-pressed=true]{border-color:#52785c;background:#eaf0e7;box-shadow:inset 3px 0 #52785c}
.selection-toolbar.docked{position:relative!important;left:auto!important;top:auto!important;bottom:auto!important;transform:none!important;margin:12px auto 20px;max-width:100%;z-index:auto}
@media(max-width:640px){.backup-browser{grid-template-columns:minmax(125px,36%) minmax(0,1fr);gap:12px}.backup-record{padding:10px 8px}.backup-heading{align-items:flex-start}.backup-record span{font-size:11px}}

.room-map[data-mode="wall"]>.wall-map-readout{position:static;flex:0 0 auto;margin:6px 8px 0;padding:4px 8px;min-height:24px;box-sizing:border-box}
.room-map[data-mode="wall"] .wall-map-tools{bottom:8px}

.variant-create{margin-top:24px}.variant-create>.field{margin-top:0}
.transfer-home-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start;margin:18px 0 24px}.transfer-home-fields>section{min-width:0}.transfer-home-preview{display:block;width:100%;height:auto;border:1px solid var(--ui-border);border-radius:10px;margin:14px 0 0}.transfer-home-preview[hidden]{display:none}.transfer-section-title{font-size:16px;margin:26px 0 14px}.transfer-position-field{margin:22px 0 16px}
.wall-placement-guide-open{width:100%;margin:4px 0 10px;font-size:12px}.wall-placement-guide{width:min(940px,94vw);max-height:90vh;padding:24px;border:1px solid var(--ui-border);border-radius:14px;background:var(--ui-panel);color:var(--ui-ink)}.wall-placement-guide::backdrop{background:#28374b66;backdrop-filter:blur(3px)}.wall-guide-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.wall-guide-heading h2{font-size:20px;margin:0}.wall-guide-steps{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.wall-guide-steps li{min-width:0}.wall-guide-steps svg{display:block;width:100%;height:auto}.wall-guide-steps h3{display:flex;align-items:center;gap:8px;font-size:15px;margin:16px 0 8px}.wall-guide-steps h3 span{display:grid;place-items:center;width:24px;height:24px;flex:none;border-radius:50%;background:#52785c;color:#fffefa;font-size:12px}.wall-guide-steps p{font-size:13px;line-height:1.7;margin:0;color:var(--ui-secondary)}
@media(max-width:640px){.transfer-home-fields{gap:12px}.wall-guide-steps{grid-template-columns:1fr;gap:24px}.wall-guide-steps svg{max-height:185px}.wall-placement-guide{padding:18px}}

/* App chrome must not create browser text selections when a drag starts
   between controls. Keep native text editing inside editable fields. */
body{-webkit-user-select:none;user-select:none}
input,textarea,[contenteditable="true"],[contenteditable="plaintext-only"]{-webkit-user-select:text;user-select:text}

.archive-import-picker{width:min(900px,calc(100vw - 32px));max-width:900px}
.archive-import-modes{display:flex;gap:20px;flex-wrap:wrap;border:0;margin:16px 0;padding:0}
.archive-import-modes legend{margin-bottom:10px;color:#677269;font-size:13px}
.archive-import-modes label{display:flex;align-items:center;gap:7px}
.archive-home-actions{display:flex;gap:8px;margin:12px 0}
.archive-home-columns{display:grid;grid-template-columns:minmax(200px,1fr) minmax(0,1.3fr);gap:16px}
#archive-home-list{max-height:380px;overflow:auto;border:1px solid #e3e1d7;border-radius:10px;padding:6px}
#archive-home-list label{display:flex;gap:10px;align-items:center;padding:12px;border-radius:6px;cursor:pointer}
#archive-home-list label.active{background:#edf2e9}
#archive-home-list strong,#archive-home-list small{display:block}
#archive-home-list small{font-size:12px;color:#7c8478;margin-top:5px}
.archive-home-preview{align-self:start;border:1px solid #e3e1d7;border-radius:10px;overflow:hidden}
#archive-home-plan{display:block;width:100%;height:auto}
@media(max-width:600px){.archive-home-columns{grid-template-columns:1fr}.archive-home-preview{max-height:280px;overflow:auto}}

.window-placement-banner{position:absolute;left:50%;top:76px;transform:translateX(-50%);z-index:18;display:flex;align-items:center;gap:14px;padding:10px 14px;border:1px solid #d8ddce;border-radius:10px;background:#fffdf5;box-shadow:0 5px 20px #25352920;white-space:nowrap;font-size:14px}
