.factory {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 36px auto 0;
  overflow-x: clip;
}
.factory__stage { position: absolute; left: 50%; top: 0; transform-origin: top center; }

.landscape { position: absolute; left: 0; right: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.landscape__stage { position: absolute; left: 50%; top: 0; height: 100%; transform-origin: top center; }
.landscape__layer, .landscape__front { position: absolute; display: block; pointer-events: none; }
.landscape__front { z-index: 12; }
.ground { position: absolute; z-index: 11; overflow: visible; pointer-events: none; }
.garland { position: absolute; left: 0; top: 2px; z-index: 2; pointer-events: none; overflow: visible; }
.factory__roof, .factory__facade, .factory__plinth { position: absolute; left: 0; width: 100%; }
.factory__roof svg, .factory__facade svg, .factory__plinth svg { position: absolute; top: 0; overflow: visible; }
.factory__roof { top: 0; }
.factory__facade { z-index: 10; }
.factory__plinth { height: 46px; z-index: 10; }

.floor { position: absolute; left: 0; }
.room { position: absolute; top: 0; }
.room__wall, .room__light { position: absolute; inset: 0; pointer-events: none; }
.room__back, .room__front { position: absolute; left: 0; top: 0; overflow: visible; }
.room__back { z-index: 1; }
.room__front { z-index: 4; pointer-events: none; }

.room--storage .room__wall { background: var(--texture-wood) 0 0 / 132px 300px; }
.room--packing .room__wall {
  background:
    linear-gradient(#e8dcc0, #e8dcc0) 0 146px / 100% 4px no-repeat,
    linear-gradient(#22423a, #22423a) 0 150px / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 2px, transparent 2px 92px, rgba(0,0,0,.18) 92px 96px) 0 154px / 100% 80px no-repeat,
    linear-gradient(#335a4b, #2a4c3f) 0 154px / 100% 80px no-repeat,
    var(--texture-plaster) 0 0 / 160px 160px;
}
.room--workshop .room__wall { background: var(--texture-brick) 0 0 / 76px 36px; }
.room--parlour .room__wall {
  background:
    linear-gradient(#3a2416, #3a2416) 0 156px / 100% 5px no-repeat,
    linear-gradient(#8a5c36, #8a5c36) 0 161px / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 96px, rgba(0,0,0,.22) 96px 99px) 0 163px / 100% 72px no-repeat,
    linear-gradient(#6a4429, #573721) 0 163px / 100% 72px no-repeat,
    var(--texture-wallpaper) 0 0 / 44px 52px;
}

.pillar {
  position: absolute;
  top: 0;
  z-index: 9;
  width: 20px;
  height: 300px;
  background: linear-gradient(90deg, rgba(10, 6, 4, .45), rgba(10, 6, 4, .1) 50%, rgba(10, 6, 4, .4)), var(--texture-brick) 0 0 / 38px 18px;
}
.pillar--left { left: 0; }
.pillar--right { right: 0; }
.ceiling {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 14px;
  z-index: 2;
  background: linear-gradient(#4a3222, #2e1e13);
  box-shadow: 0 6px 12px rgba(10, 5, 2, .45);
}
.beam { position: absolute; left: 0; bottom: 0; z-index: 9; }
