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

.tg {
  box-sizing: border-box;
  width: min(430px, 100%);
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

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

.tg__title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.tg__attr {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}
.tg__attr code {
  font-family: "Consolas", "Menlo", monospace;
}

.tg__body {
  display: grid;
  grid-template-columns: 1fr 188px;
  gap: 12px;
  padding: 0 12px 8px;
}

.tg__view {
  box-sizing: border-box;
  height: 158px;
  overflow-y: auto;
  padding: 0 8px;
  outline: none;
  background: rgba(23, 20, 26, 0.05);
  border: 1px solid rgba(23, 20, 26, 0.14);
  border-radius: 8px;
}

.tg__track {
  position: relative;
  padding-top: 8px;
  padding-bottom: 24px;
}

.tg__lead {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  color: rgba(23, 20, 26, 0.72);
}

.tg__target {
  margin-top: 150px;
  box-sizing: border-box;
  height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #0a4fe8;
  color: #fff7e6;
}
.tg__target b {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}
.tg__target span {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.tg__panel {
  display: flex;
  flex-direction: column;
}

.tg__read {
  position: relative;
  height: 32px;
  margin: 0;
}

.tg__numcur,
.tg__nums b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tg__nums {
  display: none;
}

.tg__nums b {
  opacity: 0;
}

.tg.is-demo .tg__nums {
  display: block;
}

.tg.is-demo .tg__numcur {
  visibility: hidden;
}

.tg__gauge {
  position: relative;
  height: 10px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.14);
}

.tg__fill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #2f6df6;
  transform: scaleX(0);
  transform-origin: left center;
}

.tg__tick {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 16px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.35);
}

.tg__tick--0 {
  left: 0;
}

.tg__tick--25 {
  left: 25%;
}

.tg__tick--50 {
  left: 50%;
  transform: translateX(-1px);
}

.tg__tick--100 {
  left: 100%;
  transform: translateX(-2px);
}

.tg__scale {
  position: relative;
  height: 12px;
  margin: 4px 0 0;
  font-size: 9px;
  font-weight: 700;
  line-height: 12px;
  color: rgba(23, 20, 26, 0.72);
}

.tg__scale span {
  position: absolute;
}

.tg__s0 {
  left: 0;
}

.tg__s25 {
  left: 25%;
}

.tg__s50 {
  left: 50%;
  transform: translateX(-50%);
}

.tg__s100 {
  left: 100%;
  transform: translateX(-100%);
}

.tg__candt {
  margin: 8px 0 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}

.tg__cands {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.tg__cand {
  flex: 1 1 auto;
  padding: 4px 0;
  border: 1px solid rgba(23, 20, 26, 0.25);
  border-radius: 4px;
  background: none;
  color: rgba(23, 20, 26, 0.72);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

.tg__cand.is-on {
  border-color: #17141a;
  background: #17141a;
  color: #fff7e6;
}

.tg__lightline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
}

.tg__led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(23, 20, 26, 0.18);
}

.tg__led.is-on {
  background: #c93000;
}

.tg__state {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.tg__stcur {
  font-weight: 700;
}

.tg__stcur.is-on {
  color: #c93000;
}

.tg__sts {
  display: none;
}

.tg__sts b {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}

.tg__sts b:last-child {
  color: #c93000;
}

.tg.is-demo .tg__sts {
  display: block;
  position: absolute;
  inset: 0;
}

.tg.is-demo .tg__stcur {
  visibility: hidden;
}

.tg__foot {
  padding: 8px 12px;
  border-top: 1px solid rgba(23, 20, 26, 0.12);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}

.tg.is-demo .tg__track {
  animation-name: tg-flow;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}
.tg.is-demo .tg__nums b {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.tg.is-demo .tg__nums b:nth-child(1) {
  animation-name: tg-n1;
}
.tg.is-demo .tg__nums b:nth-child(2) {
  animation-name: tg-n2;
}
.tg.is-demo .tg__nums b:nth-child(3) {
  animation-name: tg-n3;
}
.tg.is-demo .tg__nums b:nth-child(4) {
  animation-name: tg-n4;
}
.tg.is-demo .tg__fill {
  animation-name: tg-fill;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.tg.is-demo .tg__led {
  animation-name: tg-led;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.tg.is-demo .tg__sts b {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.tg.is-demo .tg__sts b:nth-child(1) {
  animation-name: tg-st1;
}
.tg.is-demo .tg__sts b:nth-child(2) {
  animation-name: tg-st2;
}
.tg.is-demo .tg__cand.is-on {
  border-color: rgba(23, 20, 26, 0.25);
  background-color: transparent;
  color: rgba(23, 20, 26, 0.72);
}
.tg.is-demo .tg__cand {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.tg.is-demo .tg__cand:nth-child(1) {
  animation-name: tg-c1;
}
.tg.is-demo .tg__cand:nth-child(2) {
  animation-name: tg-c2;
}
.tg.is-demo .tg__cand:nth-child(3) {
  animation-name: tg-c3;
}
.tg.is-demo .tg__cand:nth-child(4) {
  animation-name: tg-c4;
}

@keyframes tg-flow {
  0%, 12% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-22px);
  }
  42% {
    transform: translateY(-44px);
  }
  58% {
    transform: translateY(-88px);
  }
  66%, 100% {
    transform: translateY(-110px);
  }
}
@keyframes tg-n1 {
  0% {
    opacity: 1;
  }
  30%, 100% {
    opacity: 0;
  }
}
@keyframes tg-n2 {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  42%, 100% {
    opacity: 0;
  }
}
@keyframes tg-n3 {
  0% {
    opacity: 0;
  }
  42% {
    opacity: 1;
  }
  58%, 100% {
    opacity: 0;
  }
}
@keyframes tg-n4 {
  0% {
    opacity: 0;
  }
  58%, 100% {
    opacity: 1;
  }
}
@keyframes tg-fill {
  0%, 12% {
    transform: scaleX(0);
  }
  30% {
    transform: scaleX(0.25);
  }
  42% {
    transform: scaleX(0.5);
  }
  58%, 100% {
    transform: scaleX(1);
  }
}
@keyframes tg-led {
  0% {
    background: rgba(23, 20, 26, 0.18);
  }
  30%, 100% {
    background: #c93000;
  }
}
@keyframes tg-c1 {
  0% {
    border-color: #17141a;
    background-color: #17141a;
    color: #fff7e6;
  }
  30%, 100% {
    border-color: rgba(23, 20, 26, 0.25);
    background-color: transparent;
    color: rgba(23, 20, 26, 0.72);
  }
}
@keyframes tg-c2 {
  0% {
    border-color: rgba(23, 20, 26, 0.25);
    background-color: transparent;
    color: rgba(23, 20, 26, 0.72);
  }
  30% {
    border-color: #17141a;
    background-color: #17141a;
    color: #fff7e6;
  }
  42%, 100% {
    border-color: rgba(23, 20, 26, 0.25);
    background-color: transparent;
    color: rgba(23, 20, 26, 0.72);
  }
}
@keyframes tg-c3 {
  0% {
    border-color: rgba(23, 20, 26, 0.25);
    background-color: transparent;
    color: rgba(23, 20, 26, 0.72);
  }
  42% {
    border-color: #17141a;
    background-color: #17141a;
    color: #fff7e6;
  }
  58%, 100% {
    border-color: rgba(23, 20, 26, 0.25);
    background-color: transparent;
    color: rgba(23, 20, 26, 0.72);
  }
}
@keyframes tg-c4 {
  0% {
    border-color: rgba(23, 20, 26, 0.25);
    background-color: transparent;
    color: rgba(23, 20, 26, 0.72);
  }
  58%, 100% {
    border-color: #17141a;
    background-color: #17141a;
    color: #fff7e6;
  }
}
@keyframes tg-st1 {
  0% {
    opacity: 1;
  }
  30%, 100% {
    opacity: 0;
  }
}
@keyframes tg-st2 {
  0% {
    opacity: 0;
  }
  30%, 100% {
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .tg__head {
    padding: 4px 8px;
  }
  .tg__body {
    grid-template-columns: 1fr 148px;
    gap: 8px;
    padding: 0 8px 4px;
  }
  .tg__view {
    height: 112px;
  }
  .tg__target {
    margin-top: 104px;
  }
  .tg__read {
    height: 26px;
  }
  .tg__numcur, .tg__nums b {
    font-size: 18px;
  }
  .tg__gauge {
    margin-top: 4px;
  }
  .tg__candt {
    margin-top: 4px;
  }
  .tg__lightline {
    margin-top: 4px;
  }
  .tg__foot {
    padding: 4px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tg.is-demo .tg__track,
  .tg.is-demo .tg__nums b,
  .tg.is-demo .tg__fill,
  .tg.is-demo .tg__led,
  .tg.is-demo .tg__sts b,
  .tg.is-demo .tg__cand {
    animation: none !important;
  }
  .tg.is-demo .tg__cand.is-on {
    border-color: #17141a;
    background-color: #17141a;
    color: #fff7e6;
  }
  .tg.is-demo .tg__nums,
  .tg.is-demo .tg__sts {
    display: none !important;
  }
  .tg.is-demo .tg__numcur,
  .tg.is-demo .tg__stcur {
    visibility: visible !important;
  }
}
