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

.tp {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(280px, 86vw);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.tp__btn {
  position: relative;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 48px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background-color: #fff7e6;
  color: #17141a;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.tp__btn:focus-visible {
  outline: 3px solid #fff7e6;
  outline-offset: 3px;
}

.tp__face {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
}

.tp__ic {
  display: inline-flex;
  flex: 0 0 auto;
}

.tp__ic svg {
  display: block;
}

.tp__lab {
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.tp:not(.is-demo) .tp__btn[aria-pressed=false] .tp__face[data-face=off],
.tp:not(.is-demo) .tp__btn[aria-pressed=true] .tp__face[data-face=on] {
  opacity: 1;
}

.tp:not(.is-demo) .tp__btn[aria-pressed=true] {
  background-color: #17141a;
  color: #ffd23f;
}

.tp__btn.is-pop {
  animation-name: tp-tap;
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: 1;
}

@keyframes tp-tap {
  0% {
    transform: scale(0.94);
  }
  60% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}
.tp__note {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  color: #17141a;
}

.tp.is-demo .tp__face {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.tp.is-demo .tp__face[data-face=off] {
  animation-name: tp-off;
}

.tp.is-demo .tp__face[data-face=on] {
  animation-name: tp-on;
}

@keyframes tp-off {
  0% {
    opacity: 1;
  }
  40% {
    opacity: 0;
  }
  86% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@keyframes tp-on {
  0% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  86% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.tp.is-demo .tp__btn {
  animation-name: tp-skin, tp-pop;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite, infinite;
}

@keyframes tp-skin {
  0% {
    background-color: #fff7e6;
    color: #17141a;
  }
  40% {
    background-color: #17141a;
    color: #ffd23f;
  }
  86% {
    background-color: #fff7e6;
    color: #17141a;
  }
  100% {
    background-color: #fff7e6;
    color: #17141a;
  }
}
@keyframes tp-pop {
  0% {
    transform: scale(1);
  }
  38% {
    transform: scale(1);
  }
  43% {
    transform: scale(0.94);
  }
  52% {
    transform: scale(1.03);
  }
  60% {
    transform: scale(1);
  }
  84% {
    transform: scale(1);
  }
  89% {
    transform: scale(0.96);
  }
  96% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 340px) {
  .tp {
    gap: 8px;
  }
  .tp__btn {
    height: 44px;
  }
  .tp__lab {
    font-size: 13px;
    line-height: 18px;
  }
  .tp__note {
    font-size: 11px;
    line-height: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tp.is-demo .tp__face,
  .tp.is-demo .tp__btn,
  .tp__btn.is-pop {
    animation: none !important;
  }
  .tp.is-demo .tp__face[data-face=off] {
    opacity: 1;
  }
}
