html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ff4d1f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.rd {
  position: relative;
  box-sizing: border-box;
  padding: 4px;
  border-radius: 16px;
  background: rgb(23.5764705882%, 11.4196078431%, 10.5098039216%);
  color: #fff7e6;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.rd__slot {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 96px;
  height: calc(100% - 8px);
  border: 2px dashed rgba(255, 247, 230, 0.42);
  border-radius: 8px;
  opacity: 0;
}

.rd__cols {
  position: relative;
  display: flex;
}

.rd__col {
  flex: 0 0 auto;
  width: 96px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: rgb(23.5764705882%, 11.4196078431%, 10.5098039216%);
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rd__col.is-lift {
  z-index: 2;
  background: rgb(39.9529411765%, 15.4431372549%, 10.862745098%);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  transition: none;
}

.rd__h {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-bottom: 2px solid rgba(255, 247, 230, 0.16);
  font-size: 11px;
  line-height: 26px;
  font-weight: 700;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.rd__col.is-lift .rd__h {
  cursor: grabbing;
}

.rd__grab {
  display: inline-flex;
  width: 11px;
  height: 11px;
  opacity: 0.55;
}

.rd__c {
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 26px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}

.rd__c + .rd__c {
  border-top: 1px solid rgba(255, 247, 230, 0.09);
}

.rd.is-demo .rd__col {
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.rd.is-demo .rd__col:nth-child(1),
.rd.is-demo .rd__col:nth-child(2) {
  animation-name: rd-aside;
}

.rd.is-demo .rd__col:nth-child(3) {
  animation-name: rd-carry;
}

.rd.is-demo .rd__col:nth-child(3) {
  z-index: 2;
}

.rd.is-demo .rd__slot {
  animation-name: rd-slot;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes rd-aside {
  0% {
    transform: translateX(0);
  }
  10% {
    transform: translateX(0);
  }
  38% {
    transform: translateX(96px);
  }
  58% {
    transform: translateX(96px);
  }
  84% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes rd-carry {
  0% {
    transform: translateX(0) translateY(0);
    box-shadow: none;
    background: rgb(23.5764705882%, 11.4196078431%, 10.5098039216%);
  }
  10% {
    transform: translateX(0) translateY(-16px);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
    background: rgb(39.9529411765%, 15.4431372549%, 10.862745098%);
  }
  38% {
    transform: translateX(-192px) translateY(-16px);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
    background: rgb(39.9529411765%, 15.4431372549%, 10.862745098%);
  }
  58% {
    transform: translateX(-192px) translateY(-16px);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
    background: rgb(39.9529411765%, 15.4431372549%, 10.862745098%);
  }
  84% {
    transform: translateX(0) translateY(0);
    box-shadow: none;
    background: rgb(23.5764705882%, 11.4196078431%, 10.5098039216%);
  }
  100% {
    transform: translateX(0) translateY(0);
    box-shadow: none;
    background: rgb(23.5764705882%, 11.4196078431%, 10.5098039216%);
  }
}
@keyframes rd-slot {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  58% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .rd {
    padding: 0;
  }
  .rd__slot {
    left: 0;
    top: 0;
    height: 100%;
  }
  .rd__h, .rd__c {
    padding: 0 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rd.is-demo .rd__col,
  .rd.is-demo .rd__slot {
    animation: none !important;
  }
  .rd.is-demo .rd__col:nth-child(3) {
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  }
  .rd__col {
    transition: none;
  }
}
