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

.ld {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 360px;
}

.ld__hint {
  margin: 0;
  font-weight: 700;
  font-size: clamp(10px, 2.8vw, 12px);
  line-height: 1.35;
  color: rgba(255, 247, 230, 0.78);
  text-align: center;
}

.ld__field {
  position: relative;
  height: 208px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff7e6;
  box-shadow: inset 0 0 0 1px rgba(23, 20, 26, 0.16);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ld__field:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

.c3__scene {
  perspective: clamp(280px, 60vw, 420px);
}

.c3__cube {
  position: relative;
  width: 92px;
  height: 92px;
  transform-style: preserve-3d;
}

.c3__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: #fff7e6;
  background: #0a4fe8;
  backface-visibility: hidden;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.c3__face--front {
  transform: translateZ(46px);
}

.c3__face--right {
  transform: rotateY(90deg) translateZ(46px);
  background: rgb(3.2604116027%, 25.757251661%, 75.6415491817%);
}

.c3__face--back {
  transform: rotateY(180deg) translateZ(46px);
}

.c3__face--left {
  transform: rotateY(-90deg) translateZ(46px);
  background: rgb(3.2604116027%, 25.757251661%, 75.6415491817%);
}

.ld__badge {
  position: absolute;
  right: 8px;
  top: 8px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.78);
  color: #fff7e6;
  font-weight: 700;
  font-size: 11px;
}

.ld__badgeNum {
  font-size: 13px;
  color: #ffd23f;
}

.ld__badgeUnit {
  font-weight: 700;
}

@media (max-width: 340px) {
  .ld {
    gap: 4px;
  }
  .ld__field {
    height: 124px;
  }
  .c3__cube {
    width: 64px;
    height: 64px;
  }
  .c3__face--front, .c3__face--back {
    transform: translateZ(32px);
  }
  .c3__face--right {
    transform: rotateY(90deg) translateZ(32px);
    background: rgb(3.2604116027%, 25.757251661%, 75.6415491817%);
  }
  .c3__face--left {
    transform: rotateY(-90deg) translateZ(32px);
    background: rgb(3.2604116027%, 25.757251661%, 75.6415491817%);
  }
  .c3__face--back {
    transform: rotateY(180deg) translateZ(32px);
  }
  .ld__badge {
    font-size: 10px;
    padding: 0 4px;
  }
  .ld__badgeNum {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ld.is-still .ld__field {
    cursor: default !important;
  }
  .ld.is-still .ld__badge {
    opacity: 0.92 !important;
  }
}
