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

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

.sp {
  position: relative;
}

.sp__win {
  box-sizing: border-box;
  width: 288px;
  height: 168px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(#17141a, #2f2838);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  cursor: grab;
  touch-action: none;
}

.sp__win:focus-visible {
  outline: 3px solid #17141a;
  outline-offset: 2px;
}

.sp__track {
  display: flex;
  width: 1200%;
  height: 100%;
  transform: translateX(0);
}

.sp__f {
  position: relative;
  flex: 0 0 8.3333%;
  height: 100%;
  display: grid;
  place-items: center;
}

.sp__f > i {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
}

.sp__body {
  width: 92px;
  height: 108px;
  margin-left: -46px;
  margin-top: -54px;
  border-radius: 12px 12px 16px 16px;
  background: linear-gradient(90deg, #a96953 0 14%, #ff4d1f 38%, #ff9ebb 58%, #c2361a 100%);
  box-shadow: inset 0 -12px 20px rgba(23, 20, 26, 0.45);
  z-index: 1;
}

.sp__handle {
  width: 44px;
  height: 56px;
  margin-left: -22px;
  margin-top: -24px;
  border: 10px solid #b98272;
  border-radius: 50%;
  transform: translateX(calc(44px * var(--sin))) scaleX(var(--hs));
  z-index: var(--hz);
}

.sp__logo {
  width: 36px;
  height: 36px;
  margin-left: -18px;
  margin-top: -16px;
  border-radius: 50%;
  background: #ffd23f;
  opacity: var(--lo);
  transform: translateX(calc(-44px * var(--sin))) scaleX(var(--ls));
  z-index: 2;
}

.sp__f:nth-child(1) {
  --sin: .87;
  --hs: .87;
  --ls: .5;
  --hz: 2;
  --lo: 0;
}

.sp__f:nth-child(2) {
  --sin: 1;
  --hs: 1;
  --ls: 0;
  --hz: 2;
  --lo: 0;
}

.sp__f:nth-child(3) {
  --sin: .87;
  --hs: .87;
  --ls: .5;
  --hz: 0;
  --lo: 1;
}

.sp__f:nth-child(4) {
  --sin: .5;
  --hs: .5;
  --ls: .87;
  --hz: 0;
  --lo: 1;
}

.sp__f:nth-child(5) {
  --sin: 0;
  --hs: .06;
  --ls: 1;
  --hz: 0;
  --lo: 1;
}

.sp__f:nth-child(6) {
  --sin: -.5;
  --hs: .5;
  --ls: .87;
  --hz: 0;
  --lo: 1;
}

.sp__f:nth-child(7) {
  --sin: -.87;
  --hs: .87;
  --ls: .5;
  --hz: 0;
  --lo: 1;
}

.sp__f:nth-child(8) {
  --sin: -1;
  --hs: 1;
  --ls: 0;
  --hz: 2;
  --lo: 0;
}

.sp__f:nth-child(9) {
  --sin: -.87;
  --hs: .87;
  --ls: .5;
  --hz: 2;
  --lo: 0;
}

.sp__f:nth-child(10) {
  --sin: -.5;
  --hs: .5;
  --ls: .87;
  --hz: 2;
  --lo: 0;
}

.sp__f:nth-child(11) {
  --sin: 0;
  --hs: .06;
  --ls: 1;
  --hz: 2;
  --lo: 0;
}

.sp__f:nth-child(12) {
  --sin: .5;
  --hs: .5;
  --ls: .87;
  --hz: 2;
  --lo: 0;
}

.sp.is-demo .sp__track {
  animation-name: sp-spin;
  animation-duration: 2s;
  animation-timing-function: steps(12, end);
  animation-iteration-count: infinite;
}

@keyframes sp-spin {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}
@media (max-width: 360px) {
  .sp__win {
    height: 160px;
  }
  .sp__body {
    width: 84px;
    height: 100px;
    margin-left: -42px;
    margin-top: -50px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sp.is-demo .sp__track {
    animation: none !important;
    transform: translateX(-25%);
  }
}
