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

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

.tk__card {
  display: flex;
  width: min(100%, 380px);
  background: #fff7e6;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  overflow: hidden;
  -webkit-mask: radial-gradient(circle 10px at 72% 0, transparent 96%, #000 100%), radial-gradient(circle 10px at 72% 100%, transparent 96%, #000 100%);
  -webkit-mask-composite: destination-in;
  mask: radial-gradient(circle 10px at 72% 0, transparent 96%, #000 100%), radial-gradient(circle 10px at 72% 100%, transparent 96%, #000 100%);
  mask-composite: intersect;
}

.tk.is-demo .tk__card {
  animation: tkFloat 2s ease-in-out infinite;
}

.tk__main {
  flex: 1 1 72%;
  padding: 12px 16px;
  min-width: 0;
}

.tk__brand {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 800;
  font-size: clamp(9px, 2.6vw, 11px);
  letter-spacing: 0.14em;
  color: rgba(23, 20, 26, 0.72);
}

.tk__ico {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #2f6df6;
}

.tk__pct {
  margin: 4px 0 0;
  font-weight: 800;
  font-size: clamp(34px, 10vw, 46px);
  line-height: 1;
  color: #2f6df6;
}

.tk__pct i {
  font-style: normal;
  font-size: 0.55em;
}

.tk__label {
  margin: 4px 0 0;
  font-weight: 700;
  font-size: clamp(11px, 3.2vw, 13px);
  color: #17141a;
}

.tk__meta {
  margin: 4px 0 0;
  font-weight: 500;
  font-size: clamp(9px, 2.6vw, 10px);
  color: rgba(23, 20, 26, 0.68);
}

.tk__stub {
  flex: 0 0 28%;
  border-left: 2px dashed rgba(23, 20, 26, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
}

.tk__btn {
  position: relative;
  border: 0;
  cursor: pointer;
  background: #2f6df6;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 800;
  font-size: clamp(11px, 3vw, 12px);
  padding: 8px 16px;
  font-family: inherit;
  line-height: 1.2;
  transition: transform 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tk__btn:focus-visible {
  outline: 3px solid #ffd23f;
  outline-offset: 2px;
}

.tk__btnLabel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tk__btnLabel--done {
  position: absolute;
  inset: 0;
  justify-content: center;
  visibility: hidden;
}

.tk.is-saved .tk__btnLabel--save {
  visibility: hidden;
}

.tk.is-saved .tk__btnLabel--done {
  visibility: visible;
}

.tk__tick {
  width: 12px;
  height: 12px;
}

.tk__wallet {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  background: rgba(255, 247, 230, 0.14);
  color: #fff7e6;
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
  font-size: clamp(10px, 2.8vw, 12px);
}

.tk__wallet .tk__ico {
  color: #fff7e6;
}

.tk__count {
  position: relative;
  display: inline-block;
  min-width: 2.2em;
  text-align: right;
  font-weight: 800;
}

.tk__num {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.tk__num--one {
  visibility: hidden;
}

.tk.is-saved .tk__num--zero {
  visibility: hidden;
}

.tk.is-saved .tk__num--one {
  visibility: visible;
}

.tk__srNum {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  margin: 0;
}

@keyframes tkFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
.tk.is-demo .tk__btn {
  animation: tkPress 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@keyframes tkPress {
  0%, 40% {
    transform: scale(1);
  }
  43% {
    transform: scale(0.9);
  }
  47%, 100% {
    transform: scale(1);
  }
}
.tk.is-demo .tk__btnLabel--save {
  animation: tkCutSave 2s steps(1, end) infinite;
}

@keyframes tkCutSave {
  0%, 45% {
    visibility: visible;
  }
  45.5%, 89% {
    visibility: hidden;
  }
  89.5%, 100% {
    visibility: visible;
  }
}
.tk.is-demo .tk__btnLabel--done {
  animation: tkCutDone 2s steps(1, end) infinite;
}

@keyframes tkCutDone {
  0%, 45% {
    visibility: hidden;
  }
  45.5%, 89% {
    visibility: visible;
  }
  89.5%, 100% {
    visibility: hidden;
  }
}
.tk.is-demo .tk__num--zero {
  animation: tkCutZero 2s steps(1, end) infinite;
}

@keyframes tkCutZero {
  0%, 54% {
    visibility: visible;
  }
  54.5%, 89% {
    visibility: hidden;
  }
  89.5%, 100% {
    visibility: visible;
  }
}
.tk.is-demo .tk__num--one {
  animation: tkCutOne 2s steps(1, end) infinite;
}

@keyframes tkCutOne {
  0%, 54% {
    visibility: hidden;
  }
  54.5%, 89% {
    visibility: visible;
  }
  89.5%, 100% {
    visibility: hidden;
  }
}
@media (max-width: 340px) {
  .tk__main {
    padding: 8px 12px;
  }
  .tk__stub {
    padding: 8px 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tk.is-demo .tk__card,
  .tk.is-demo .tk__btn,
  .tk.is-demo .tk__btnLabel--save,
  .tk.is-demo .tk__btnLabel--done,
  .tk.is-demo .tk__num--zero,
  .tk.is-demo .tk__num--one {
    animation: none !important;
  }
  .tk__btn {
    transition: none !important;
  }
}
