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

.cl {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  padding-bottom: 40px;
}

.cl__board {
  width: min(100%, 360px);
  background: #231f28;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  padding: 12px 12px 8px;
}

.cl__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
}

.cl__name {
  margin: 0;
}

.cl__sym {
  font-weight: 800;
  font-size: clamp(11px, 3vw, 13px);
  color: #fff7e6;
  letter-spacing: 0.04em;
}

.cl__unit {
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 10px);
  color: #9a93a6;
  margin-left: 4px;
}

.cl__now {
  font-weight: 800;
  font-size: clamp(12px, 3.4vw, 15px);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: #fff7e6;
}

.cl__now.is-up {
  color: #3ddc97;
}

.cl__now.is-down {
  color: #ff7a5e;
}

.cl__plot {
  position: relative;
  height: clamp(76px, 25vw, 116px);
  overflow: hidden;
}

.cl__track {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  width: 108.3333333333%;
  height: 100%;
}

.cl__slot {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.cl__slot:focus-visible {
  outline: 2px solid #9a93a6;
  outline-offset: -2px;
}

.cl__wick {
  position: absolute;
  left: calc(50% - 1px);
  width: 2px;
  background: #9a93a6;
}

.cl__wick--up {
  transform-origin: 50% 100%;
}

.cl__wick--dn {
  transform-origin: 50% 0;
}

.cl__slot--live .cl__wick, .cl__slot--next .cl__wick {
  background: #3ddc97;
}

.cl__body {
  box-sizing: border-box;
  position: absolute;
  left: 18%;
  right: 18%;
  border-radius: 4px;
}

.cl__body.is-up {
  border: 2px solid #3ddc97;
  background: transparent;
  transform-origin: 50% 100%;
}

.cl__body.is-down {
  border: 2px solid #ff7a5e;
  background: #ff7a5e;
  transform-origin: 50% 0;
}

.cl__tag {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 700;
  font-size: clamp(7px, 2vw, 9px);
  line-height: 1;
  color: #3ddc97;
}

.cl__tip {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0 12px;
  background: #231f28;
  border: 1px solid rgba(154, 147, 166, 0.45);
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  padding: 4px 8px;
  white-space: nowrap;
  max-width: 100%;
}

.cl__tipRow {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.cl__tipK {
  font-weight: 700;
  font-size: clamp(8px, 2.1vw, 9px);
  line-height: 1.6;
  color: #9a93a6;
}

.cl__tipV {
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.6;
  color: #fff7e6;
  font-variant-numeric: tabular-nums;
}

.cl:not(.is-demo) .cl__slot--next {
  opacity: 0;
}

.cl__slot--next .cl__tag {
  opacity: 0;
}

.cl.is-demo .cl__track {
  animation-name: clShift;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes clShift {
  0%, 70% {
    transform: translateX(0);
  }
  72%, 92% {
    transform: translateX(-7.6923076923%);
  }
  94%, 100% {
    transform: translateX(0);
  }
}
.cl.is-demo .cl__slot--live .cl__body,
.cl.is-demo .cl__slot--live .cl__wick,
.cl.is-demo .cl__slot--next .cl__body,
.cl.is-demo .cl__slot--next .cl__wick {
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

.cl.is-demo .cl__slot--live .cl__body {
  animation-name: clGrowBody;
}

.cl.is-demo .cl__slot--live .cl__wick--up {
  animation-name: clGrowUp;
}

.cl.is-demo .cl__slot--live .cl__wick--dn {
  animation-name: clGrowDn;
}

.cl.is-demo .cl__slot--next .cl__body,
.cl.is-demo .cl__slot--next .cl__wick {
  animation-name: clGrowNext;
}

@keyframes clGrowBody {
  0% {
    transform: scaleY(0.18);
  }
  12% {
    transform: scaleY(0.42);
  }
  24% {
    transform: scaleY(0.31);
  }
  38% {
    transform: scaleY(0.68);
  }
  52% {
    transform: scaleY(0.57);
  }
  70% {
    transform: scaleY(1);
  }
  92% {
    transform: scaleY(1);
    animation-timing-function: steps(1, end);
  }
  94%, 100% {
    transform: scaleY(0.18);
  }
}
@keyframes clGrowUp {
  0% {
    transform: scaleY(0.24);
  }
  12% {
    transform: scaleY(0.5);
  }
  24% {
    transform: scaleY(0.46);
  }
  38% {
    transform: scaleY(0.76);
  }
  52% {
    transform: scaleY(0.72);
  }
  70% {
    transform: scaleY(1);
  }
  92% {
    transform: scaleY(1);
    animation-timing-function: steps(1, end);
  }
  94%, 100% {
    transform: scaleY(0.24);
  }
}
@keyframes clGrowDn {
  0% {
    transform: scaleY(0.3);
  }
  24% {
    transform: scaleY(1);
  }
  92% {
    transform: scaleY(1);
    animation-timing-function: steps(1, end);
  }
  94%, 100% {
    transform: scaleY(0.3);
  }
}
@keyframes clGrowNext {
  0% {
    transform: scaleY(0);
  }
  70% {
    transform: scaleY(0);
    animation-timing-function: steps(1, end);
  }
  72% {
    transform: scaleY(0.26);
    animation-timing-function: ease-out;
  }
  84% {
    transform: scaleY(0.48);
  }
  92% {
    transform: scaleY(0.62);
    animation-timing-function: steps(1, end);
  }
  94%, 100% {
    transform: scaleY(0);
  }
}
.cl.is-demo .cl__slot--live .cl__tag,
.cl.is-demo .cl__slot--next .cl__tag {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.cl.is-demo .cl__slot--live .cl__tag {
  animation-name: clTagLive;
}

.cl.is-demo .cl__slot--next .cl__tag {
  animation-name: clTagNext;
}

@keyframes clTagLive {
  0%, 70% {
    opacity: 1;
  }
  72%, 92% {
    opacity: 0;
  }
  94%, 100% {
    opacity: 1;
  }
}
@keyframes clTagNext {
  0%, 70% {
    opacity: 0;
  }
  72%, 92% {
    opacity: 1;
  }
  94%, 100% {
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .cl {
    padding-bottom: 32px;
  }
  .cl__board {
    padding: 8px;
  }
  .cl__head {
    padding-bottom: 4px;
  }
  .cl__tip {
    gap: 0 8px;
    padding: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cl.is-demo .cl__track {
    animation: none !important;
    transform: none !important;
  }
  .cl.is-demo .cl__slot--live .cl__body,
  .cl.is-demo .cl__slot--live .cl__wick {
    animation: none !important;
    transform: none !important;
  }
  .cl.is-demo .cl__slot--next .cl__body,
  .cl.is-demo .cl__slot--next .cl__wick {
    animation: none !important;
    transform: scaleY(0) !important;
  }
  .cl.is-demo .cl__slot--live .cl__tag {
    animation: none !important;
    opacity: 1 !important;
  }
  .cl.is-demo .cl__slot--next .cl__tag {
    animation: none !important;
    opacity: 0 !important;
  }
}
