.stage1-wall, .stage1-floor {
  position: absolute;
  inset-inline: 0;
}

.stage1-wall {
  inset-block: 0 var(--floor-height, 42%);
  background:
    linear-gradient(90deg, #110f18a8, transparent 55%, #110f18a8),
    repeating-linear-gradient(90deg, transparent 0 78px, #26202f 78px 82px),
    repeating-linear-gradient(#393044 0 33px, #30273a 33px 37px, #241e2d 37px 42px);
  border-bottom: 8px solid #211b29;
}

.stage1-floor {
  inset-block: calc(100% - var(--floor-height, 42%)) 0;
  background:
    linear-gradient(90deg, #16111b77, transparent 55%, #16111b77),
    repeating-linear-gradient(90deg, transparent 0 62px, #241d2b 62px 66px),
    repeating-linear-gradient(#4b4051 0 20px, #39303e 20px 23px, #2a2330 23px 26px);
}

.stage1-arch {
  position: absolute;
  inset: 18% auto calc(var(--floor-height, 42%) - 4%) 5%;
  width: 15%;
  background: #71617c;
  clip-path: polygon(0 24%, 12% 24%, 12% 12%, 25% 12%, 25% 0, 75% 0, 75% 12%, 88% 12%, 88% 24%, 100% 24%, 100% 100%, 0 100%);
}

.stage1-arch::before {
  position: absolute;
  inset: 8px clamp(5px, 1.2vw, 13px) 0;
  background: var(--inset);
  clip-path: inherit;
  content: "";
}

.stage1-torch {
  position: absolute;
  top: calc(var(--torch-area-top, 0px) + var(--torch-area-height, 100%) * .31);
  width: 5px;
  height: 21px;
  background: #81634e;
  box-shadow: 0 3px 0 3px #27202d;
}

.stage1-torch-left { left: 29%; }
.stage1-torch-right {
  left: 74%;
  --torch-flame-delay: -340ms;
}

.stage1-torch::before {
  position: absolute;
  inset: -19px -7px auto;
  height: 24px;
  background:
    linear-gradient(#fff3bc, #fff3bc) 8px 16px / 5px 6px no-repeat,
    linear-gradient(#e8733c 10px, #ffad56 10px 17px, #ffda82 17px);
  clip-path: polygon(9px 5px, 13px 5px, 13px 11px, 16px 11px, 16px 15px, 19px 15px, 19px 20px, 15px 20px, 15px 24px, 4px 24px, 4px 21px, 1px 21px, 1px 15px, 5px 15px, 5px 11px, 9px 11px);
  animation: stage1-torch-flicker 900ms step-end var(--torch-flame-delay, 0ms) infinite;
  content: "";
}

@keyframes stage1-torch-flicker {
  22% {
    clip-path: polygon(6px 0, 10px 0, 10px 4px, 13px 4px, 13px 11px, 16px 11px, 16px 17px, 18px 17px, 18px 21px, 15px 21px, 15px 24px, 4px 24px, 4px 20px, 1px 20px, 1px 13px, 4px 13px, 4px 6px, 6px 6px);
    filter: brightness(1.1);
  }

  49% {
    clip-path: polygon(12px 8px, 16px 8px, 16px 13px, 19px 13px, 19px 20px, 15px 20px, 15px 24px, 4px 24px, 4px 21px, 0 21px, 0 15px, 4px 15px, 4px 11px, 8px 11px, 8px 14px, 12px 14px);
    filter: brightness(.92);
  }

  74% {
    clip-path: polygon(11px 3px, 15px 3px, 15px 10px, 18px 10px, 18px 19px, 15px 19px, 15px 24px, 4px 24px, 4px 21px, 1px 21px, 1px 16px, 4px 16px, 4px 12px, 8px 12px, 8px 7px, 11px 7px);
    filter: brightness(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage1-torch::before { animation: none; }
}

.stage1-slime {
  width: 58px;
  height: 39px;
}

#question-host-avatar > .stage1-slime { translate: 0 10px; }

.stage1-slime .enemy-body {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#e2f7c7, #e2f7c7) 16px 7px / 9px 4px no-repeat,
    linear-gradient(#a4dc9b 0 46%, #79b18b 46% 82%, #467962 82%);
  clip-path: polygon(0 65%, 10% 65%, 10% 41%, 24% 41%, 24% 18%, 40% 18%, 40% 0, 71% 0, 71% 18%, 83% 18%, 83% 38%, 93% 38%, 93% 65%, 100% 65%, 100% 88%, 87% 88%, 87% 100%, 12% 100%, 12% 88%, 0 88%);
}

.stage1-slime .enemy-body::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 18px;
  width: 5px;
  height: 7px;
  background: #21352e;
  box-shadow: 16px 0 #21352e;
}
