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);
}

.cs {
  box-sizing: border-box;
  width: min(300px, 92vw);
  padding: 12px;
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.cs * {
  box-sizing: border-box;
}

.cs__kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: rgba(23, 20, 26, 0.72);
}

.cs__band {
  position: relative;
  overflow: hidden;
  padding-top: 24px;
  border-radius: 8px;
}

.cs__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(23, 20, 26, 0.05);
}

.cs__thumb {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.16);
}

.cs__info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cs__name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs__price {
  font-size: 11px;
  line-height: 1.2;
  color: rgba(23, 20, 26, 0.62);
}

.cs__strip {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  margin: 0;
  padding: 0 8px;
  border-radius: 4px;
  background: #c2361a;
  color: #fff7e6;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  transform: translateY(-110%);
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.cs.is-over .cs__strip {
  transform: translateY(0);
}

.cs__strip svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.cs__qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.cs__left {
  font-size: 11px;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.62);
}

.cs__step {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid rgba(23, 20, 26, 0.2);
  border-radius: 12px;
  background: #ffffff;
}

.cs__step::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 2px solid #c2361a;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms linear;
}

.cs.is-over .cs__step::after {
  opacity: 1;
}

.cs__btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #17141a;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.cs__btn:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.cs__num {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 28px;
}

.cs__input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #17141a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  appearance: textfield;
}

.cs__input::-webkit-outer-spin-button,
.cs__input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.cs__input:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.cs__over {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #c2361a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}

@keyframes cs-strip {
  0%, 20% {
    transform: translateY(-110%);
  }
  25%, 71% {
    transform: translateY(0);
  }
  89%, 100% {
    transform: translateY(-110%);
  }
}
@keyframes cs-over {
  0%, 20% {
    opacity: 1;
  }
  25%, 100% {
    opacity: 0;
  }
}
@keyframes cs-bounce {
  0%, 25% {
    transform: translateY(0) scale(1);
  }
  29% {
    transform: translateY(-10px) scale(1.16);
  }
  40%, 100% {
    transform: translateY(0) scale(1);
  }
}
@keyframes cs-warn {
  0%, 20% {
    opacity: 0;
  }
  25%, 71% {
    opacity: 1;
  }
  89%, 100% {
    opacity: 0;
  }
}
.cs.is-demo .cs__strip {
  animation-name: cs-strip;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.cs.is-demo .cs__over {
  animation-name: cs-over;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.cs.is-demo .cs__num {
  animation-name: cs-bounce;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.cs.is-demo .cs__step::after {
  animation-name: cs-warn;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@media (max-width: 340px) {
  .cs {
    padding: 8px;
  }
  .cs__kicker {
    font-size: 10px;
  }
  .cs__thumb {
    width: 32px;
    height: 32px;
  }
  .cs__name {
    font-size: 11px;
  }
  .cs__price {
    font-size: 10px;
  }
  .cs__band {
    padding-top: 20px;
  }
  .cs__strip {
    height: 20px;
    font-size: 10px;
  }
  .cs__strip svg {
    width: 14px;
    height: 14px;
  }
  .cs__qty {
    margin-top: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cs.is-demo .cs__strip {
    animation: none !important;
    transform: translateY(0) !important;
  }
  .cs.is-demo .cs__over {
    animation: none !important;
    opacity: 0 !important;
  }
  .cs.is-demo .cs__num {
    animation: none !important;
    transform: none !important;
  }
  .cs.is-demo .cs__step::after {
    animation: none !important;
    opacity: 1 !important;
  }
  .cs__strip {
    transition: none !important;
  }
  .cs__step::after {
    transition: none !important;
  }
}
