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

.lk {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.lk__btn {
  box-sizing: border-box;
  margin: 0;
  padding: 8px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  border: 2px solid #17141a;
  border-radius: 999px;
  background-color: transparent;
  color: #17141a;
  cursor: pointer;
}

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

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

.lk__heart svg {
  display: block;
}

.lk__win {
  display: block;
  overflow: hidden;
  height: 22px;
  width: 46px;
}

.lk__roll {
  display: block;
  transform: translateY(0);
}

.lk__n {
  display: block;
  height: 22px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lk:not(.is-demo) .lk__roll {
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.lk:not(.is-demo) .lk__btn[aria-pressed=true] .lk__roll {
  transform: translateY(-22px);
}

.lk:not(.is-demo) .lk__btn[aria-pressed=true] {
  border-color: #ff4d1f;
  color: #ff4d1f;
}

.lk__btn.is-beat .lk__heart {
  animation-name: lk-beat;
  animation-duration: 300ms;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: 1;
}

@keyframes lk-beat {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.45);
  }
  70% {
    transform: scale(0.92);
  }
  100% {
    transform: scale(1);
  }
}
.lk__note {
  margin: 0;
  max-width: 260px;
  text-align: center;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  color: #17141a;
}

.lk.is-demo .lk__roll {
  animation-name: lk-roll;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes lk-roll {
  0% {
    transform: translateY(0);
  }
  32% {
    transform: translateY(0);
  }
  44% {
    transform: translateY(-22px);
  }
  78% {
    transform: translateY(-22px);
  }
  88% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}
.lk.is-demo .lk__heart {
  animation-name: lk-beat-loop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes lk-beat-loop {
  0% {
    transform: scale(1);
  }
  32% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.5);
  }
  50% {
    transform: scale(0.94);
  }
  58% {
    transform: scale(1);
  }
  78% {
    transform: scale(1);
  }
  84% {
    transform: scale(1.2);
  }
  90% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
.lk.is-demo .lk__btn {
  animation-name: lk-skin;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes lk-skin {
  0% {
    border-color: #17141a;
    color: #17141a;
  }
  36% {
    border-color: #ff4d1f;
    color: #ff4d1f;
  }
  82% {
    border-color: #17141a;
    color: #17141a;
  }
  100% {
    border-color: #17141a;
    color: #17141a;
  }
}
@media (max-width: 340px) {
  .lk {
    gap: 8px;
  }
  .lk__btn {
    height: 44px;
    padding: 8px 16px;
  }
  .lk__note {
    font-size: 11px;
    line-height: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lk.is-demo .lk__roll,
  .lk.is-demo .lk__heart,
  .lk.is-demo .lk__btn,
  .lk__btn.is-beat .lk__heart {
    animation: none !important;
  }
  .lk:not(.is-demo) .lk__roll {
    transition: none !important;
  }
}
