[data-dungeon-theme="clock"] .stage1-wall {
  background:
    radial-gradient(ellipse at 25% 78%, #647cad44, transparent 34%),
    radial-gradient(ellipse at 76% 78%, #647cad44, transparent 34%),
    repeating-linear-gradient(90deg, transparent 0 104px, #202735 104px 108px),
    repeating-linear-gradient(#343b51 0 38px, #293244 38px 43px, #202635 43px 47px);
}

[data-dungeon-theme="clock"] .stage1-floor {
  background:
    radial-gradient(ellipse at 50% 27%, #687c9838, transparent 60%),
    repeating-linear-gradient(90deg, transparent 0 72px, #252b38 72px 77px),
    repeating-linear-gradient(#3d4350 0 21px, #323747 21px 24px, #262b38 24px 28px);
}

[data-dungeon-theme="clock"] .corridor .stage1-floor::after {
  position: absolute;
  inset: auto 0 0;
  height: clamp(24px, 5svh, 44px);
  border-block-start: 3px solid #647087;
  background:
    repeating-linear-gradient(90deg, transparent 0 72px, #222835 72px 77px),
    linear-gradient(#4a5267, #353d50 76%, #222835 76%);
  content: "";
}

[data-dungeon-theme="cache"] .stage1-wall {
  border-bottom-color: #153638;
  background:
    radial-gradient(ellipse at 50% 85%, #69dbb43d, transparent 48%),
    repeating-linear-gradient(90deg, transparent 0 104px, #152b31 104px 108px),
    repeating-linear-gradient(#294247 0 38px, #20373e 38px 43px, #162b32 43px 47px);
}

[data-dungeon-theme="cache"] .stage1-floor {
  background:
    radial-gradient(ellipse at 50% 8%, #5db49355, transparent 66%),
    repeating-linear-gradient(90deg, transparent 0 72px, #223235 72px 77px),
    repeating-linear-gradient(#344c4a 0 21px, #2c403e 21px 24px, #233333 24px 28px);
}

#dungeon-cache-passage, #dungeon-cache-arch {
  display: none;
  --passage-center: calc(6% + (var(--passage-column) + .5) * 88% / var(--grid-columns));
  --passage-width: clamp(36px, calc(88% / var(--grid-columns)), 110px);
}

#dungeon-cache-passage, #dungeon-cache-arch {
  position: absolute;
  left: var(--passage-center);
  width: var(--passage-width);
  translate: -50%;
}

:is([data-tips-passage], [data-quiz-passage]) #dungeon-cache-passage { display: block; }

#dungeon-cache-passage {
  bottom: 0;
  height: 13%;
  border-inline: 4px solid #4c7974;
  background:
    linear-gradient(transparent, #091918a0),
    repeating-linear-gradient(#426663 0 8px, #2c4647 8px 10px);
}

[data-tips-passage]:not([data-cleared]) #dungeon-cache-passage::before {
  position: absolute;
  inset: 55% -4px auto;
  height: 10px;
  border-block: 2px solid #553d31;
  background: repeating-linear-gradient(135deg, #e0ad69 0 6px, #634139 6px 12px);
  content: "";
}

:is([data-cleared], [data-quiz-passage]) #dungeon-cache-passage::after {
  position: absolute;
  inset: auto 0 5px;
  margin-inline: auto;
  width: 16px;
  height: 12px;
  background: #a4e3b8;
  clip-path: polygon(33% 0, 67% 0, 67% 50%, 100% 50%, 50% 100%, 0 50%, 33% 50%);
  content: "";
}

:is([data-tips-arch], [data-quiz-arch]) #dungeon-cache-arch {
  display: block;
  bottom: calc(var(--floor-height) - 4%);
  height: clamp(49px, 11svh, 96px);
  padding: 6px 5px 0;
  background: #5b8982;
  clip-path: polygon(0 28%, 14% 28%, 14% 14%, 28% 14%, 28% 0, 72% 0, 72% 14%, 86% 14%, 86% 28%, 100% 28%, 100% 100%, 0 100%);
}

#dungeon-cache-arch::before {
  display: block;
  height: 100%;
  background: linear-gradient(#101e25 55%, #2e514d);
  clip-path: inherit;
  content: "";
}

#dungeon-monitor {
  width: 42px;
  height: 35px;
  background:
    linear-gradient(#3f5062, #3f5062) center 26px / 8px 5px no-repeat,
    linear-gradient(#303946, #303946) center bottom / 22px 4px no-repeat;
  transform-origin: bottom;
}

#dungeon-monitor::before {
  position: absolute;
  inset: 0 0 8px;
  border: 3px solid #60778a;
  box-shadow: 0 2px #242d3b;
  background:
    linear-gradient(#71cbb4, #71cbb4) 5px 4px / 22px 2px no-repeat,
    linear-gradient(#e7b370, #e7b370) 5px 9px / 16px 2px no-repeat,
    linear-gradient(#71cbb4, #71cbb4) 5px 14px / 25px 2px no-repeat,
    #16333b;
  content: "";
}

.timekeeper-sprite {
  width: 40px;
  height: 53px;
  transform-origin: bottom;
  background: linear-gradient(90deg, #353650 20%, #63748d 20% 78%, #414461 78%) center bottom / 31px 31px no-repeat;
}

.timekeeper-sprite::before {
  position: absolute;
  inset: 4px 7px 24px;
  background:
    linear-gradient(#333046, #333046) 6px 11px / 3px 3px no-repeat,
    linear-gradient(#333046, #333046) 17px 11px / 3px 3px no-repeat,
    linear-gradient(#a9b5cb 26%, #dfb69e 26% 73%, #9d89a1 73%);
  clip-path: polygon(16% 0, 84% 0, 84% 12%, 100% 12%, 100% 75%, 83% 75%, 83% 94%, 17% 94%, 17% 75%, 0 75%, 0 12%, 16% 12%);
  content: "";
}

.timekeeper-sprite > span {
  position: absolute;
  right: 0;
  bottom: 8px;
  width: 15px;
  height: 18px;
  border: 2px solid #cbab72;
  border-radius: 45%;
  background: linear-gradient(60deg, #6d5461 45%, #e6cca1 45% 55%, #6d5461 55%);
}
