:root{color-scheme:dark;--bg:#111317;--panel:#1b1e24;--line:#34373f;--text:#eee9df;--muted:#aaaab0;--gold:#c8a96c}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 system-ui,Segoe UI,sans-serif}header{min-height:72px;display:flex;align-items:center;gap:24px;padding:14px 22px;border-bottom:1px solid var(--line);background:#181a1f}.brand{font:600 22px Georgia,serif;white-space:nowrap}.brand b{display:inline-grid;place-items:center;width:38px;height:38px;border:1px solid var(--gold);color:var(--gold);font-size:19px;margin-right:10px}a{color:var(--text);text-decoration:none}header>a:last-child{margin-left:auto;font-size:14px;color:var(--muted)}button,.upload{background:#262930;border:1px solid #44464e;border-radius:5px;color:var(--text);padding:8px 10px;cursor:pointer;font:inherit}button:hover,.upload:hover{border-color:var(--gold);background:#333136}button.active{color:#edce92;border-color:var(--gold);background:#3a3328}button:disabled{opacity:.35;cursor:default}.primary{background:var(--gold);color:#171717;border-color:var(--gold);font-weight:650}.actions,.row{display:flex;gap:6px;flex-wrap:wrap}main{display:grid;grid-template-columns:236px minmax(300px,1fr) 252px;height:calc(100dvh - 73px)}aside{overflow:auto;background:var(--panel);padding:16px}aside.left{border-right:1px solid var(--line)}aside.right{border-left:1px solid var(--line)}h2{font-size:14px;color:var(--gold);letter-spacing:.045em;margin:0 0 12px;text-transform:uppercase}section{padding:18px 0;border-bottom:1px solid var(--line)}section:first-child{padding-top:0}label{display:block;margin:12px 0;color:#cbc9c7}input:not([type=checkbox]),select{display:block;width:100%;background:#101216;border:1px solid var(--line);border-radius:4px;color:var(--text);font:inherit;padding:7px}input[type=range]{padding:0;accent-color:var(--gold);margin-top:7px}input[type=color]{height:35px;padding:3px}.check{display:flex;gap:8px;align-items:center}input[type=checkbox]{accent-color:var(--gold)}.tools{display:grid;grid-template-columns:1fr 1fr;gap:6px}.tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.tile{padding:5px;font-size:13px;overflow:hidden}.tile canvas{display:block;width:100%;height:49px;object-fit:contain;margin-bottom:4px;background:#121418}.hint,details{color:var(--muted);font-size:13px}.upload{text-align:center;font-size:13px}.workspace{display:flex;flex-direction:column;min-width:0;min-height:0}.bar{display:flex;align-items:center;gap:8px;padding:10px;background:#1b1e24;border-bottom:1px solid var(--line)}.bar input{max-width:280px;flex:1;min-width:60px}.bar span{white-space:nowrap;font-size:13px}#viewport{flex:1;min-height:200px;position:relative;overflow:hidden;background:#0e1013}#view{display:block;width:100%;height:100%;touch-action:none;outline:none}.status{display:flex;justify-content:space-between;gap:16px;padding:8px 12px;color:var(--muted);font-size:12px;border-top:1px solid var(--line);min-height:38px}#dimensions{white-space:nowrap}.layer{display:flex;align-items:center;gap:5px;margin-top:6px;border:1px solid var(--line);padding:5px;border-radius:4px}.layer.active{border-color:var(--gold);background:#332e25}.layer .title{flex:1;text-align:left;min-width:0;overflow:hidden;text-overflow:ellipsis;background:none;border:0;padding:4px}.layer>button:not(.title){font-size:12px;padding:4px}.layer small{color:var(--muted)}details{padding-top:16px}summary{cursor:pointer;color:var(--text)}dialog{width:420px;max-width:95vw;padding:25px;background:var(--panel);color:var(--text);border:1px solid var(--gold);border-radius:8px}dialog::backdrop{background:#000a}h1{font:25px Georgia,serif;margin:0 0 16px}:focus-visible{outline:2px solid var(--gold);outline-offset:2px}[hidden]{display:none!important}@media(max-width:1100px){header{flex-wrap:wrap;gap:10px}.actions{flex:1}main{height:calc(100dvh - 105px);grid-template-columns:200px minmax(250px,1fr) 220px}aside{padding:10px}}@media(max-width:760px){main{height:auto;grid-template-columns:1fr 1fr}.workspace{grid-column:1/-1;grid-row:1;height:65dvh}aside{max-height:65dvh}header>a:last-child{display:none}.brand{font-size:20px}.actions button{font-size:12px;padding:7px}.status{flex-wrap:wrap}.bar{flex-wrap:wrap}}

#architectureControls button{display:block;width:100%;margin:7px 0}.tile[draggable=true]{cursor:grab}.tile[draggable=true]:active{cursor:grabbing}

.materialGroup{padding-top:0;margin-bottom:12px}.materialGroup summary{margin-bottom:9px}.materialGroup .tiles{margin-top:6px}

[hidden]{display:none!important}body.starting main,body.starting header .actions{visibility:hidden}#startDialog{max-width:520px}#startError{color:#edb3a6}#wallShadowControls{border-top:1px solid var(--line);margin-top:16px}#assetSizeControls{padding:0 8px;border-left:2px solid var(--gold)}
/* Compact tool rail, contextual inspector, layer-only right panel. */
main{grid-template-columns:56px 244px minmax(260px,1fr) 224px}.toolRail{display:flex;flex-direction:column;gap:7px;padding:12px 7px;background:#15181e;border-right:1px solid var(--line);overflow:visible;z-index:3}.toolRail button{position:relative;width:40px;height:40px;padding:8px;flex-shrink:0}.toolRail svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.toolRail button:hover:after,.toolRail button:focus-visible:after{content:attr(data-tip);position:absolute;left:47px;top:2px;width:230px;padding:8px 12px;background:#101216;border:1px solid var(--gold);border-radius:4px;color:var(--text);text-align:left;pointer-events:none;box-shadow:0 5px 18px #0008}.inspector{padding:12px}.inspector>section{padding-top:12px}.right{padding:12px}#selectionPanel h2{font-size:12px}#selectionPanel .hint{line-height:1.6}@media(max-width:1000px){main{grid-template-columns:50px 210px minmax(220px,1fr) 190px}.toolRail{padding-left:4px;padding-right:4px}}@media(max-width:760px){main{grid-template-columns:46px 180px minmax(220px,1fr) 170px;overflow:auto}.toolRail{padding-left:3px;padding-right:3px}.toolRail button{width:38px}aside.right{display:block}}

@media(max-width:760px){main{height:calc(100dvh - 105px)}.workspace{grid-column:auto;grid-row:auto;height:auto}aside{max-height:none}}
.legacyTextures{grid-column:1/-1;margin-top:8px;border-top:1px solid var(--line);padding-top:8px}.legacyTextures summary{cursor:pointer;margin-bottom:6px}

.bar .freePlacement{margin:0 8px;white-space:nowrap;font-size:13px;flex-shrink:0}.bar{flex-wrap:wrap}.bar .freePlacement input{flex:none;width:auto}

#wallTextures{grid-template-columns:1fr}#wallTextures .wallTile{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px}#wallTextures .wallTile canvas{width:174px;max-width:100%;height:42px;object-fit:contain;margin:0;background:#121418}#wallTextures .wallTile span{display:block;text-align:center}

/* Four-column palettes, including architectural inserts and wall-strip previews. */
main{grid-template-columns:56px 408px minmax(260px,1fr) 224px}
#textures,#assets,#wallTextures,#floorObjectTextures{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
#textures .tile,#assets .tile,#wallTextures .wallTile,#floorObjectTextures .tile{min-width:0;padding:4px;font-size:11px;overflow-wrap:anywhere;line-height:1.35}
#textures .tile canvas,#assets .tile canvas,#floorObjectTextures .tile canvas{width:100%;height:60px;object-fit:contain}
#wallTextures .wallTile canvas{width:100%;height:42px;object-fit:contain}
@media(max-width:1100px){main{grid-template-columns:50px 360px minmax(260px,1fr) 180px}}
@media(max-width:760px){main{grid-template-columns:46px 344px minmax(260px,1fr) 170px;overflow:auto}}

#textureLoading{width:min(480px,calc(100vw - 40px));max-height:90vh}#textureLoading progress{width:100%;height:12px;accent-color:#d4ae68}#textureLoading::backdrop{background:#101319e8}#textureLoadingBadge{font-size:11px;padding:3px 8px;margin-left:auto}#textureLoadingBadge[hidden]{display:none}

.loadingCategories{list-style:none;padding:0;margin:18px 0}.loadingCategories li{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-bottom:1px solid var(--line)}.loadingCategories output{font-variant-numeric:tabular-nums;white-space:nowrap}.loadingCategories .complete{color:#b4d7a5}.loadingCategories .failed{color:#efaa91}

#assets .tile small{display:block;color:var(--muted);font-size:10px}

/* Storeys and object categories, v1.33 */
.storeyBar{display:flex;align-items:center;gap:10px;padding:7px 12px;background:#20242c;border-bottom:1px solid #3b414c;flex-wrap:wrap;flex-shrink:0}
.storeyBar label{margin:0;display:flex;align-items:center;gap:8px;font-size:12px}.storeyBar select{min-width:142px}.storeyBar .storeyOpacity{margin-left:auto;flex-wrap:wrap}.storeyOpacity input{width:110px}.storeyOpacity output{min-width:30px;color:#dcc18d}
#stairControls .active{border-color:#e5bb73;background:#574731}#objectCategoryControl,#objectImportCategoryControl{margin:10px 0}#objectCategoryControl select,#objectImportCategoryControl select{width:100%}

/* Keep reference transparency immediately before the storey selector. */
.storeyBar .storeyOpacity{margin-left:0;margin-right:8px}
