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

.tk {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(300px, 88vw);
  padding: 12px;
  border-radius: 16px;
  background-color: #ffffff;
  color: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

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

.tk__ic svg {
  display: block;
}

.tk__warn {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  color: #c2361a;
}

.tk__field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background-color: #fff7e6;
  color: #17141a;
}

.tk__slot {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 24px;
}

.tk__val {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 13px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #17141a;
}

.tk__cover {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  border-radius: 4px;
  background-color: #17141a;
  background-image: radial-gradient(circle, #fff7e6 2px, transparent 2.5px);
  background-size: 12px 12px;
  background-position: right center;
}

.tk:not(.is-demo)[data-state=shown] .tk__cover {
  width: 0;
}

.tk:not(.is-demo)[data-state=burned] .tk__cover {
  width: 100%;
}

.tk__row {
  display: flex;
  gap: 8px;
}

.tk__btn {
  flex: 1 1 auto;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  height: 32px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  transition-property: background-color, color;
  transition-duration: 300ms;
  transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.tk__btn--issue {
  background-color: #17141a;
  color: #fff7e6;
}

.tk__btn--issue:disabled {
  opacity: 0.4;
  cursor: default;
}

.tk__btn--copy {
  background-color: #2f6df6;
  color: #fff7e6;
}

.tk__btn--copy[aria-disabled=true] {
  background-color: #fff7e6;
  color: #17141a;
  opacity: 0.45;
  cursor: default;
}

.tk__live {
  position: relative;
  margin: 0;
  height: 16px;
}

.tk__word {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  color: #17141a;
  opacity: 0;
}

.tk:not(.is-demo)[data-state=hidden] .tk__word[data-word=hidden],
.tk:not(.is-demo)[data-state=shown] .tk__word[data-word=shown],
.tk:not(.is-demo)[data-state=burned] .tk__word[data-word=burned] {
  opacity: 1;
}

.tk.is-demo .tk__cover {
  animation-name: tk-strip;
  animation-duration: 2s;
  animation-timing-function: steps(16, end);
  animation-iteration-count: infinite;
}

@keyframes tk-strip {
  0% {
    width: 100%;
  }
  10% {
    width: 100%;
  }
  56% {
    width: 0%;
  }
  100% {
    width: 0%;
  }
}
.tk.is-demo .tk__word {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.tk.is-demo .tk__word[data-word=hidden] {
  animation-name: tk-w-hidden;
}

.tk.is-demo .tk__word[data-word=shown] {
  animation-name: tk-w-shown;
}

@keyframes tk-w-hidden {
  0% {
    opacity: 1;
  }
  56% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes tk-w-shown {
  0% {
    opacity: 0;
  }
  56% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
.tk.is-demo .tk__btn--copy {
  animation-name: tk-copy-skin, tk-copy-pop;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite, infinite;
}

@keyframes tk-copy-skin {
  0% {
    background-color: #fff7e6;
    color: #17141a;
    opacity: 0.45;
  }
  56% {
    background-color: #2f6df6;
    color: #fff7e6;
    opacity: 1;
  }
  100% {
    background-color: #2f6df6;
    color: #fff7e6;
    opacity: 1;
  }
}
@keyframes tk-copy-pop {
  0% {
    transform: scale(1);
  }
  54% {
    transform: scale(1);
  }
  60% {
    transform: scale(1.06);
  }
  70% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
.tk.is-demo .tk__btn--issue {
  animation-name: tk-press;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes tk-press {
  0% {
    transform: translateY(0);
  }
  6% {
    transform: translateY(0);
  }
  10% {
    transform: translateY(3px);
  }
  18% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}
@media (max-width: 340px) {
  .tk {
    gap: 4px;
    padding: 8px;
  }
  .tk__field {
    padding: 4px;
  }
  .tk__slot {
    height: 20px;
  }
  .tk__val {
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 0;
  }
  .tk__btn {
    height: 28px;
    font-size: 12px;
  }
  .tk__warn {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tk.is-demo .tk__cover,
  .tk.is-demo .tk__word,
  .tk.is-demo .tk__btn--copy,
  .tk.is-demo .tk__btn--issue {
    animation: none !important;
  }
  .tk.is-demo .tk__cover {
    width: 0 !important;
  }
  .tk.is-demo .tk__word[data-word=shown] {
    opacity: 1 !important;
  }
  .tk.is-demo .tk__btn--copy {
    background-color: #2f6df6 !important;
    color: #fff7e6 !important;
    opacity: 1 !important;
  }
}
