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

.ace {
  width: 100%;
  max-width: 300px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.ace__row {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font: 600 13px/1 -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #fff7e6;
}

.ace__row b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.ace__grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), 1fr);
  gap: 8px;
  width: 132px;
  min-height: 8px;
}

.ace__cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #b9a0ff;
  animation: ace-pop 220ms cubic-bezier(0.2, 1.4, 0.4, 1) backwards;
}

@keyframes ace-pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.ace__btn {
  border: 0;
  border-radius: 12px;
  padding: 8px 16px;
  background: #fff7e6;
  color: #17141a;
  font: 700 14px/1 -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  cursor: pointer;
  transition: transform 140ms ease-out;
}
.ace__btn:active {
  transform: scale(0.96);
}

@media (max-width: 340px) {
  .ace {
    max-width: 220px;
  }
  .ace__grid {
    width: 100px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ace__btn {
    transition: none;
  }
  .ace__cell {
    animation: none;
  }
}
