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

.gt {
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  width: min(100%, 400px);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.gt__bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gt__ico {
  display: grid;
  place-items: center;
  color: #ffd23f;
  font-size: 15px;
}

.gt__name {
  flex: 1 1 auto;
  color: #fff7e6;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.4;
}

.gt__pill {
  display: grid;
  justify-items: center;
}

.gt__pill > * {
  grid-area: 1/1;
}

.gt__count, .gt__cv {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 210, 63, 0.14);
  color: #ffd23f;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}

.gt__cv {
  opacity: 0;
}

.gt__body {
  display: grid;
  grid-template-columns: 36px 1fr;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 8px;
  overflow: hidden;
}

.gt__gut {
  background: rgba(0, 0, 0, 0.35);
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.gt__gtrack {
  position: relative;
  box-sizing: border-box;
  padding: 8px 0 8px 8px;
  counter-reset: gtline;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-weight: 500;
  font-size: clamp(11px, 3vw, 13px);
  line-height: 20px;
}

.gt__num {
  position: relative;
  z-index: 1;
  display: block;
  height: 20px;
  padding-right: 8px;
  text-align: right;
  color: #beb7ad;
}

.gt__num::before {
  counter-increment: gtline;
  content: counter(gtline);
}

.gt__gcur {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 20px;
  background: rgba(255, 210, 63, 0.18);
  border-radius: 0 4px 4px 0;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gt__wrap {
  position: relative;
  display: grid;
  overflow: hidden;
  height: 116px;
}

.gt__wrap > * {
  grid-area: 1/1;
  min-height: 0;
}

.gt__ta {
  height: 100%;
}

.gt__track {
  position: relative;
  align-self: start;
  box-sizing: border-box;
  padding: 8px;
}

.gt__cur {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 20px;
  background: rgba(255, 210, 63, 0.18);
  border-radius: 0 4px 4px 0;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gt__hl {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-weight: 500;
  font-size: clamp(11px, 3vw, 13px);
  line-height: 20px;
  letter-spacing: 0;
  tab-size: 2;
  white-space: pre;
  overflow: hidden;
  color: #fff7e6;
}

.gt__ln {
  display: block;
}

.gt__ta {
  box-sizing: border-box;
  margin: 0;
  padding: 8px;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: #ffd23f;
  resize: none;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-weight: 500;
  font-size: clamp(11px, 3vw, 13px);
  line-height: 20px;
  letter-spacing: 0;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
  scrollbar-width: none;
}

.gt__ta::-webkit-scrollbar {
  display: none;
}

.gt__ta::selection {
  background: rgba(255, 210, 63, 0.32);
}

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

.gt__note {
  margin: 0;
  color: #beb7ad;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
}

.gt.is-demo .gt__ln, .gt.is-demo .gt__num {
  animation-name: gtLine;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.gt.is-demo .gt__ln:nth-child(1), .gt.is-demo .gt__num:nth-child(1) {
  animation-delay: 0s;
}

.gt.is-demo .gt__ln:nth-child(2), .gt.is-demo .gt__num:nth-child(2) {
  animation-delay: 0.04s;
}

.gt.is-demo .gt__ln:nth-child(3), .gt.is-demo .gt__num:nth-child(3) {
  animation-delay: 0.08s;
}

.gt.is-demo .gt__ln:nth-child(4), .gt.is-demo .gt__num:nth-child(4) {
  animation-delay: 0.3s;
}

.gt.is-demo .gt__ln:nth-child(5), .gt.is-demo .gt__num:nth-child(5) {
  animation-delay: 0.42s;
}

.gt.is-demo .gt__ln:nth-child(6), .gt.is-demo .gt__num:nth-child(6) {
  animation-name: gtLineCut;
}

.gt.is-demo .gt__count {
  color: transparent;
}

.gt.is-demo .gt__cv {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.gt.is-demo .gt__cv--1 {
  animation-name: gtCv1;
}

.gt.is-demo .gt__cv--2 {
  animation-name: gtCv2;
}

.gt.is-demo .gt__cv--3 {
  animation-name: gtCv3;
}

.gt.is-demo .gt__cv--4 {
  animation-name: gtCv4;
}

.gt.is-demo .gt__cv--5 {
  animation-name: gtCv5;
}

.gt.is-demo .gt__cur, .gt.is-demo .gt__gcur {
  animation-name: gtCurO, gtCurT;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: backwards, backwards;
  transition: none;
}

.gt.is-demo .gt__track, .gt.is-demo .gt__gtrack {
  animation-name: gtScroll;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes gtLine {
  0% {
    opacity: 0;
  }
  3%, 100% {
    opacity: 1;
  }
}
@keyframes gtLineCut {
  0%, 29% {
    opacity: 0;
  }
  30%, 79% {
    opacity: 1;
  }
  80%, 100% {
    opacity: 0;
  }
}
@keyframes gtCv1 {
  0%, 17% {
    opacity: 1;
  }
  18%, 100% {
    opacity: 0;
  }
}
@keyframes gtCv2 {
  0%, 17% {
    opacity: 0;
  }
  18%, 23% {
    opacity: 1;
  }
  24%, 100% {
    opacity: 0;
  }
}
@keyframes gtCv3 {
  0%, 23% {
    opacity: 0;
  }
  24%, 29% {
    opacity: 1;
  }
  30%, 100% {
    opacity: 0;
  }
}
@keyframes gtCv4 {
  0%, 29% {
    opacity: 0;
  }
  30%, 79% {
    opacity: 1;
  }
  80%, 100% {
    opacity: 0;
  }
}
@keyframes gtCv5 {
  0%, 79% {
    opacity: 0;
  }
  80%, 100% {
    opacity: 1;
  }
}
@keyframes gtCurO {
  0% {
    opacity: 0;
  }
  12%, 100% {
    opacity: 1;
  }
}
@keyframes gtCurT {
  0%, 12% {
    transform: translateY(40px);
  }
  21%, 24% {
    transform: translateY(60px);
  }
  27%, 30% {
    transform: translateY(80px);
  }
  33%, 44% {
    transform: translateY(100px);
  }
  50%, 100% {
    transform: translateY(40px);
  }
}
@keyframes gtScroll {
  0%, 65% {
    transform: translateY(0);
  }
  70%, 74% {
    transform: translateY(-20px);
  }
  79%, 100% {
    transform: translateY(0);
  }
}
@media (max-width: 340px) {
  .gt {
    gap: 4px;
    padding: 8px;
  }
  .gt__note {
    display: none;
  }
  .gt__body {
    grid-template-columns: 28px 1fr;
  }
  .gt__wrap {
    height: 68px;
  }
  .gt__gtrack {
    padding: 4px 0 4px 4px;
    font-size: 11px;
  }
  .gt__num {
    padding-right: 4px;
  }
  .gt__track {
    padding: 4px;
  }
  .gt__cur, .gt__gcur {
    top: 4px;
  }
  .gt__hl {
    font-size: 11px;
  }
  .gt__ta {
    padding: 4px;
    font-size: 11px;
  }
  .gt__note {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gt.is-demo .gt__ln, .gt.is-demo .gt__num, .gt.is-demo .gt__cv,
  .gt.is-demo .gt__cur, .gt.is-demo .gt__gcur, .gt.is-demo .gt__track, .gt.is-demo .gt__gtrack {
    animation: none !important;
  }
  .gt.is-demo .gt__ln, .gt.is-demo .gt__num {
    opacity: 1 !important;
  }
  .gt.is-demo .gt__cv {
    opacity: 0 !important;
  }
  .gt.is-demo .gt__count {
    color: #ffd23f !important;
  }
  .gt.is-demo .gt__cur, .gt.is-demo .gt__gcur {
    opacity: 1 !important;
  }
}
