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

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

.sw {
  box-sizing: border-box;
  width: min(300px, 82vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #fff7e6;
}

.sw__view {
  overflow: hidden;
  width: 100%;
  border-radius: 16px;
  touch-action: pan-y;
  cursor: grab;
}

.sw__track {
  --i: 0;
  --dx: 0px;
  --base: calc(-1 * var(--i) * (100% + 12px));
  display: flex;
  transform: translateX(calc(var(--base) + var(--dx)));
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sw__track.is-drag {
  transition: none;
}

.sw__card {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 100%;
  margin-right: 12px;
}

.sw__card:last-child {
  margin-right: 0;
}

.sw__inner {
  box-sizing: border-box;
  height: 100%;
  padding: 16px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.07);
}

.sw__name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
  color: #fff7e6;
}

.sw__nametext {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sw__tag {
  flex: 0 0 auto;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 999px;
  background-color: #6ec8ff;
  color: #17141a;
  font-size: 10px;
  line-height: 18px;
  font-weight: 700;
}

.sw__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 8px;
  margin-bottom: 8px;
  margin-left: 0;
  margin-right: 0;
}

.sw__amt {
  font-size: 26px;
  line-height: 32px;
  font-weight: 800;
  color: #6ec8ff;
}

.sw__per {
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
}

.sw__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sw__list li {
  position: relative;
  padding-left: 16px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  color: #fff7e6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sw__list li + li {
  margin-top: 4px;
}

.sw__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #6ec8ff;
}

.sw__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.sw__dot {
  position: relative;
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: width 300ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sw__dot[aria-current=true] {
  width: 22px;
  background-color: #6ec8ff;
}

.sw__dot:focus-visible {
  outline: 2px solid #6ec8ff;
  outline-offset: 2px;
}

.sw__vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.sw.is-demo .sw__track {
  animation-name: sw-slide;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes sw-slide {
  0% {
    transform: translateX(0);
  }
  22% {
    transform: translateX(0);
  }
  36% {
    transform: translateX(calc(-1 * (100% + 12px)));
  }
  50% {
    transform: translateX(calc(-1 * (100% + 12px)));
  }
  64% {
    transform: translateX(calc(-2 * (100% + 12px)));
  }
  74% {
    transform: translateX(calc(-2 * (100% + 12px)));
  }
  88% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(0);
  }
}
.sw.is-demo .sw__inner {
  animation-name: sw-lift;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes sw-lift {
  0% {
    transform: scale(1);
  }
  22% {
    transform: scale(1);
  }
  30% {
    transform: scale(0.95);
  }
  43% {
    transform: scale(1);
  }
  50% {
    transform: scale(1);
  }
  58% {
    transform: scale(0.95);
  }
  70% {
    transform: scale(1);
  }
  74% {
    transform: scale(1);
  }
  81% {
    transform: scale(0.95);
  }
  90% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
.sw.is-demo .sw__dot {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.sw.is-demo .sw__dot[data-go="0"] {
  animation-name: sw-dot-a;
}

.sw.is-demo .sw__dot[data-go="1"] {
  animation-name: sw-dot-b;
}

.sw.is-demo .sw__dot[data-go="2"] {
  animation-name: sw-dot-c;
}

@keyframes sw-dot-a {
  0% {
    width: 22px;
    background-color: #6ec8ff;
  }
  36% {
    width: 8px;
    background-color: rgba(255, 255, 255, 0.28);
  }
  88% {
    width: 22px;
    background-color: #6ec8ff;
  }
  100% {
    width: 22px;
    background-color: #6ec8ff;
  }
}
@keyframes sw-dot-b {
  0% {
    width: 8px;
    background-color: rgba(255, 255, 255, 0.28);
  }
  36% {
    width: 22px;
    background-color: #6ec8ff;
  }
  64% {
    width: 8px;
    background-color: rgba(255, 255, 255, 0.28);
  }
  100% {
    width: 8px;
    background-color: rgba(255, 255, 255, 0.28);
  }
}
@keyframes sw-dot-c {
  0% {
    width: 8px;
    background-color: rgba(255, 255, 255, 0.28);
  }
  64% {
    width: 22px;
    background-color: #6ec8ff;
  }
  88% {
    width: 8px;
    background-color: rgba(255, 255, 255, 0.28);
  }
  100% {
    width: 8px;
    background-color: rgba(255, 255, 255, 0.28);
  }
}
@media (max-width: 340px) {
  .sw {
    gap: 8px;
  }
  .sw__inner {
    padding: 8px;
  }
  .sw__name {
    gap: 4px;
    font-size: 12px;
    line-height: 18px;
  }
  .sw__tag {
    font-size: 9px;
    line-height: 16px;
  }
  .sw__price {
    margin-top: 4px;
    margin-bottom: 4px;
  }
  .sw__amt {
    font-size: 22px;
    line-height: 26px;
  }
  .sw__per {
    font-size: 11px;
    line-height: 16px;
  }
  .sw__list li {
    padding-left: 12px;
    font-size: 11px;
    line-height: 16px;
  }
  .sw__list li::before {
    top: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sw.is-demo .sw__track,
  .sw.is-demo .sw__inner,
  .sw.is-demo .sw__dot {
    animation: none !important;
  }
  .sw__track,
  .sw__dot {
    transition: none;
  }
}
