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

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

.st__hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.st__hud > p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.st__ico {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #17141a;
}

.st__label {
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.4;
  color: #17141a;
}

.st__num {
  font-weight: 800;
  font-size: clamp(13px, 3.6vw, 17px);
  line-height: 1;
  color: #17141a;
  font-variant-numeric: tabular-nums;
}

.st__field {
  position: relative;
  overflow: hidden;
  height: clamp(104px, 52vh, 180px);
  border: 2px solid rgba(23, 20, 26, 0.18);
  border-radius: 16px;
  background: rgba(23, 20, 26, 0.05);
  touch-action: manipulation;
  cursor: pointer;
}

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

.st__field::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 10px;
  height: 2px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.22);
}

.st__tower {
  position: absolute;
  left: 50%;
  bottom: 12px;
  will-change: transform;
}

.st__row, .st__mover, .st__chip {
  position: absolute;
  left: -64px;
  bottom: var(--by, 0px);
  width: 128px;
  height: 18px;
  border-radius: 4px;
  transform: translateX(var(--lx, 0px)) scaleX(var(--sx, 1));
  transform-origin: left center;
  will-change: transform;
}

.st__row {
  background: #2f6df6;
}

.st__row--base {
  background: #17141a;
}

.st__row.is-new {
  animation-name: stLand;
  animation-duration: 180ms;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes stLand {
  0% {
    transform: translateX(var(--lx, 0px)) scaleX(var(--sx, 1)) scaleY(1.35);
  }
  100% {
    transform: translateX(var(--lx, 0px)) scaleX(var(--sx, 1)) scaleY(1);
  }
}
.st__mover {
  background: #2f6df6;
  outline: 2px dashed rgba(23, 20, 26, 0.55);
  outline-offset: 2px;
}

.st__mover[hidden] {
  display: none;
}

.st__chip {
  background: rgba(23, 20, 26, 0.3);
  opacity: 0;
  pointer-events: none;
}

.st__chip.is-drop {
  opacity: 1;
  transition: transform 620ms ease-out, opacity 200ms linear 420ms;
}

.st__chip.is-fall {
  transform: translateX(var(--lx, 128px)) scaleX(var(--sx, 0.344)) translateY(150px) rotate(28deg);
  opacity: 0;
}

.st__flash {
  position: absolute;
  left: 50%;
  bottom: var(--fy, 44px);
  transform: translateX(-50%) translateY(10px) scale(0.6);
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: #0a4fe8;
  color: #fff7e6;
  font-weight: 800;
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.st__flash.is-show {
  animation-name: stFlashPop;
  animation-duration: 640ms;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-fill-mode: forwards;
}

@keyframes stFlashPop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px) scale(0.6);
  }
  30% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.05);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(1);
  }
}
.st__hint {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: #17141a;
  color: #ffffff;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.4;
  white-space: nowrap;
}

.st__hint[hidden] {
  display: none;
}

.st__over {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(23, 20, 26, 0.55);
}

.st__over[hidden] {
  display: none;
}

.st__overPanel {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: 16px;
  background: #fff7e6;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.st__overTitle {
  margin: 0;
  font-weight: 800;
  font-size: clamp(14px, 4vw, 18px);
  line-height: 1.2;
  color: #17141a;
}

.st__overScore {
  margin: 0;
  font-weight: 800;
  font-size: clamp(15px, 4.4vw, 20px);
  line-height: 1.2;
  color: #c93000;
}

.st__restart {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  background: #0a4fe8;
  color: #fff7e6;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1.6;
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.st__restart .st__ico {
  color: #fff7e6;
}

.st__restart:hover {
  transform: translateY(-2px) scale(1.04);
}

.st__restart:active {
  transform: translateY(0) scale(0.97);
}

.st__restart:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.st.is-demo .st__mover {
  animation-name: stSlide;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes stSlide {
  0% {
    transform: translateX(-148px) scaleX(1);
  }
  32% {
    transform: translateX(44px) scaleX(1);
  }
  38% {
    transform: translateX(44px) scaleX(0.656);
  }
  84% {
    transform: translateX(44px) scaleX(0.656);
  }
  88% {
    transform: translateX(-148px) scaleX(1);
  }
  100% {
    transform: translateX(-148px) scaleX(1);
  }
}
.st.is-demo .st__chip {
  bottom: 22px;
  animation-name: stChipDemoFall;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-delay: 760ms;
}

@keyframes stChipDemoFall {
  0% {
    transform: translateX(var(--lx, 128px)) scaleX(var(--sx, 0.344)) translateY(0) rotate(0deg);
    opacity: 1;
  }
  26% {
    transform: translateX(var(--lx, 128px)) scaleX(var(--sx, 0.344)) translateY(150px) rotate(28deg);
    opacity: 1;
  }
  27% {
    transform: translateX(var(--lx, 128px)) scaleX(var(--sx, 0.344)) translateY(150px) rotate(28deg);
    opacity: 0;
  }
  100% {
    transform: translateX(var(--lx, 128px)) scaleX(var(--sx, 0.344)) translateY(150px) rotate(28deg);
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .st {
    gap: 4px;
  }
  .st__field {
    height: clamp(96px, 46vh, 140px);
  }
  .st__row, .st__mover, .st__chip {
    height: 16px;
  }
  .st__overPanel {
    padding: 8px 12px;
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .st.is-demo .st__mover, .st.is-demo .st__chip {
    animation: none !important;
  }
  .st__row.is-new {
    animation: none !important;
  }
  .st__chip.is-drop {
    transition: none !important;
    opacity: 0 !important;
  }
  .st__flash.is-show {
    animation: none !important;
    opacity: 1 !important;
  }
  .st__restart {
    transition: none !important;
  }
}
