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

.pricing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.18);
}

.toggle__btn {
  border: 0;
  border-radius: 999px;
  padding: 4px 16px;
  font-family: inherit;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.8;
  cursor: pointer;
  transition: background 300ms ease-out, color 300ms ease-out;
}

.toggle__btn.is-active {
  background: #fff7e6;
  color: #c93000;
}

.toggle__btn:not(.is-active) {
  background: transparent;
  color: #fff7e6;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 420px;
}

.plan {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.plan--featured {
  z-index: 1;
  background: #17141a;
  transform: scale(1.08);
}

.is-demo .plan--featured {
  animation: featured-scale-in 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes featured-scale-in {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}
.plan__badge {
  margin: 0;
  padding: 4px 8px;
  border-radius: 4px;
  background: #fff7e6;
  color: #c93000;
  font-weight: 700;
  font-size: 9px;
  line-height: 1.4;
}

.plan__name {
  margin: 0;
  color: #17141a;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.4;
}

.plan--featured .plan__name {
  color: #ffffff;
}

.plan__price {
  position: relative;
  margin: 0;
  min-height: 20px;
  width: 100%;
  text-align: center;
}

.plan__amount {
  position: absolute;
  inset: 0;
  color: #17141a;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 300ms ease-out;
}

.plan--featured .plan__amount {
  color: #ffffff;
}

.plan__amount--m {
  opacity: 1;
}

.plan__unit-row {
  position: relative;
  width: 100%;
  height: 13px;
  text-align: center;
}

.plan__unit {
  position: absolute;
  inset: 0;
  color: rgba(23, 20, 26, 0.72);
  font-weight: 400;
  font-size: 9px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 300ms ease-out;
}

.plan--featured .plan__unit {
  color: rgba(255, 255, 255, 0.78);
}

.plan__unit--m {
  opacity: 1;
}

.pricing.is-yearly .plan__amount--m,
.pricing.is-yearly .plan__unit--m {
  opacity: 0;
}

.pricing.is-yearly .plan__amount--y,
.pricing.is-yearly .plan__unit--y {
  opacity: 1;
}

.is-demo .plans > .plan:nth-child(1) .plan__amount--m,
.is-demo .plans > .plan:nth-child(1) .plan__unit--m {
  animation: fade-m-1 2s steps(1, end) infinite;
}

.is-demo .plans > .plan:nth-child(1) .plan__amount--y,
.is-demo .plans > .plan:nth-child(1) .plan__unit--y {
  animation: fade-y-1 2s steps(1, end) infinite;
}

.is-demo .plans > .plan:nth-child(2) .plan__amount--m,
.is-demo .plans > .plan:nth-child(2) .plan__unit--m {
  animation: fade-m-2 2s steps(1, end) infinite;
}

.is-demo .plans > .plan:nth-child(2) .plan__amount--y,
.is-demo .plans > .plan:nth-child(2) .plan__unit--y {
  animation: fade-y-2 2s steps(1, end) infinite;
}

.is-demo .plans > .plan:nth-child(3) .plan__amount--m,
.is-demo .plans > .plan:nth-child(3) .plan__unit--m {
  animation: fade-m-3 2s steps(1, end) infinite;
}

.is-demo .plans > .plan:nth-child(3) .plan__amount--y,
.is-demo .plans > .plan:nth-child(3) .plan__unit--y {
  animation: fade-y-3 2s steps(1, end) infinite;
}

@keyframes fade-m-1 {
  0%, 25% {
    opacity: 1;
  }
  30%, 100% {
    opacity: 0;
  }
}
@keyframes fade-y-1 {
  0%, 25% {
    opacity: 0;
  }
  30%, 100% {
    opacity: 1;
  }
}
@keyframes fade-m-2 {
  0%, 45% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}
@keyframes fade-y-2 {
  0%, 45% {
    opacity: 0;
  }
  50%, 100% {
    opacity: 1;
  }
}
@keyframes fade-m-3 {
  0%, 65% {
    opacity: 1;
  }
  70%, 100% {
    opacity: 0;
  }
}
@keyframes fade-y-3 {
  0%, 65% {
    opacity: 0;
  }
  70%, 100% {
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .plans {
    gap: 4px;
    max-width: 300px;
  }
  .plan {
    padding: 8px 4px;
  }
  .plan__amount {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-demo .plans > .plan:nth-child(1) .plan__amount--m,
  .is-demo .plans > .plan:nth-child(1) .plan__amount--y,
  .is-demo .plans > .plan:nth-child(1) .plan__unit--m,
  .is-demo .plans > .plan:nth-child(1) .plan__unit--y,
  .is-demo .plans > .plan:nth-child(2) .plan__amount--m,
  .is-demo .plans > .plan:nth-child(2) .plan__amount--y,
  .is-demo .plans > .plan:nth-child(2) .plan__unit--m,
  .is-demo .plans > .plan:nth-child(2) .plan__unit--y,
  .is-demo .plans > .plan:nth-child(3) .plan__amount--m,
  .is-demo .plans > .plan:nth-child(3) .plan__amount--y,
  .is-demo .plans > .plan:nth-child(3) .plan__unit--m,
  .is-demo .plans > .plan:nth-child(3) .plan__unit--y,
  .is-demo .plan--featured {
    animation: none;
  }
}
