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

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

.ap {
  width: min(300px, 94vw);
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid rgba(23, 20, 26, 0.1);
  border-radius: 16px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  padding: 16px;
}

.ap__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap__ic {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #2f6df6;
}

.ap__tt {
  display: flex;
  flex-direction: column;
  font-family: inherit;
}

.ap__plan {
  margin: 0;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  color: #17141a;
}

.ap__sub {
  margin: 0;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(23, 20, 26, 0.72);
}

.ap__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1.5px solid rgba(47, 109, 246, 0.28);
  border-radius: 12px;
  background: rgba(47, 109, 246, 0.08);
  color: #0a4fe8;
  font-family: inherit;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

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

.ap__chev {
  transition: transform 300ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.ap.is-open .ap__chev {
  transform: rotate(180deg);
}

.ap__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.ap.is-open .ap__panel {
  grid-template-rows: 1fr;
}

.ap__panel-in {
  overflow: hidden;
}

.ap__stack {
  list-style: none;
  margin: 0;
  padding: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ap__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: inherit;
}

.ap__label {
  font-weight: 600;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(23, 20, 26, 0.72);
}

.ap__orig {
  position: relative;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  color: rgba(23, 20, 26, 0.72);
}

.ap__strike {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: #c2361a;
  border-radius: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.ap.is-open .ap__strike {
  transform: scaleX(1);
}

.ap__deal {
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  color: #2f6df6;
  font-variant-numeric: tabular-nums;
}

.ap__final {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  color: #17141a;
  font-variant-numeric: tabular-nums;
}

.ap__row--save {
  justify-content: flex-end;
}

.ap__save {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #c2361a;
  color: #fff7e6;
  font-weight: 800;
  font-size: 11px;
  line-height: 1.3;
}

.stage.is-demo .ap__panel {
  grid-template-rows: 1fr;
}

.stage.is-demo .ap__chev {
  transform: rotate(180deg);
}

.stage.is-demo .ap__row {
  animation-name: ap-rise;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
  animation-delay: calc(var(--i) * 80ms);
}

@keyframes ap-rise {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  12% {
    opacity: 1;
    transform: translateY(0);
  }
  74% {
    opacity: 1;
    transform: translateY(0);
  }
  78%, 100% {
    opacity: 0;
    transform: translateY(10px);
  }
}
.stage.is-demo .ap__strike {
  transition: none;
  animation-name: ap-strike;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
  animation-delay: 120ms;
}

@keyframes ap-strike {
  0% {
    transform: scaleX(0);
  }
  24%, 74% {
    transform: scaleX(1);
  }
  78%, 100% {
    transform: scaleX(0);
  }
}
.stage.is-demo .ap__save {
  animation-name: ap-pop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
  animation-delay: 240ms;
}

@keyframes ap-pop {
  0% {
    transform: scale(0.6);
  }
  18% {
    transform: scale(1.14);
  }
  28%, 74% {
    transform: scale(1);
  }
  78%, 100% {
    transform: scale(0.6);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ap__panel, .ap__chev, .ap__strike {
    transition: none !important;
  }
  .stage.is-demo .ap__row,
  .stage.is-demo .ap__strike,
  .stage.is-demo .ap__save {
    animation: none !important;
  }
  .stage.is-demo .ap__row {
    opacity: 1 !important;
    transform: none !important;
  }
  .stage.is-demo .ap__strike {
    transform: scaleX(1) !important;
  }
  .stage.is-demo .ap__save {
    transform: none !important;
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .ap {
    width: min(268px, 92vw);
    padding: 8px;
  }
  .ap__ic svg {
    width: 16px;
    height: 16px;
  }
  .ap__plan {
    font-size: 11px;
  }
  .ap__sub {
    font-size: 9px;
  }
  .ap__toggle {
    margin-top: 8px;
    padding: 4px 8px;
    font-size: 10px;
  }
  .ap__stack {
    padding: 8px 0 0;
    gap: 4px;
  }
  .ap__label {
    font-size: 9px;
  }
  .ap__orig {
    font-size: 11px;
  }
  .ap__deal {
    font-size: 17px;
  }
  .ap__final {
    font-size: 12px;
  }
  .ap__save {
    padding: 0 8px;
    font-size: 9px;
  }
}
