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

.tz {
  box-sizing: border-box;
  width: min(300px, 90vw);
  color: #fff7e6;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.tz__rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tz__row {
  display: grid;
  grid-template-columns: 116px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  background-color: rgba(255, 247, 230, 0.07);
}

.tz__row--base {
  row-gap: 4px;
  background-color: rgba(76, 212, 166, 0.14);
}

.tz__city {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.tz__ic {
  display: inline-flex;
  flex: 0 0 auto;
  color: #4cd4a6;
}

.tz__ic svg {
  display: block;
}

.tz__name {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tz__slot {
  display: grid;
}

.tz__t,
.tz__f {
  grid-area: 1/1;
  justify-self: start;
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.tz__row--base .tz__t,
.tz__row--base .tz__f {
  font-size: 22px;
  line-height: 26px;
  color: #4cd4a6;
}

.tz__f {
  display: none;
}

.tz.is-demo .tz__f {
  display: block;
}

.tz.is-demo .tz__t {
  display: none;
}

.tz__ctl {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tz__nudge {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background-color: rgba(255, 247, 230, 0.14);
  color: #fff7e6;
  cursor: pointer;
}

.tz__nudge svg {
  display: block;
}

.tz__nudge:focus-visible,
.tz__rail:focus-visible {
  outline: 3px solid #4cd4a6;
  outline-offset: 2px;
}

.tz__rail {
  grid-column: 1/-1;
  position: relative;
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background-color: rgba(255, 247, 230, 0.18);
  cursor: ew-resize;
}

.tz__fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background-color: #4cd4a6;
  transform: scaleX(var(--p, 0.2979));
  transform-origin: left center;
}

.tz__badge {
  padding: 0 4px;
  border-radius: 4px;
  background-color: #2f6df6;
  color: #fff7e6;
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
}

.tz:not(.is-demo) .tz__row[data-next="1"] .tz__badge {
  opacity: 1;
}

.tz__live {
  position: absolute;
  margin: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

.tz.is-demo .tz__f[data-k=a] {
  animation-name: tz-a;
}

.tz.is-demo .tz__f[data-k=b] {
  animation-name: tz-b;
}

.tz.is-demo .tz__f[data-k=c] {
  animation-name: tz-c;
}

@keyframes tz-a {
  0% {
    opacity: 1;
  }
  30% {
    opacity: 0;
  }
  86% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@keyframes tz-b {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  58% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes tz-c {
  0% {
    opacity: 0;
  }
  58% {
    opacity: 1;
  }
  86% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.tz.is-demo .tz__fill {
  animation-name: tz-slide;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes tz-slide {
  0% {
    transform: scaleX(0.2979);
  }
  20% {
    transform: scaleX(0.2979);
  }
  30% {
    transform: scaleX(0.383);
  }
  48% {
    transform: scaleX(0.383);
  }
  58% {
    transform: scaleX(0.5106);
  }
  76% {
    transform: scaleX(0.5106);
  }
  86% {
    transform: scaleX(0.2979);
  }
  100% {
    transform: scaleX(0.2979);
  }
}
.tz.is-demo .tz__row[data-r="2"] .tz__badge {
  animation-name: tz-badge, tz-badge-pop;
  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;
}

@keyframes tz-badge {
  0% {
    opacity: 0;
  }
  58% {
    opacity: 1;
  }
  86% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes tz-badge-pop {
  0% {
    transform: translateY(7px);
  }
  58% {
    transform: translateY(7px);
  }
  67% {
    transform: translateY(0);
  }
  80% {
    transform: translateY(0);
  }
  86% {
    transform: translateY(7px);
  }
  100% {
    transform: translateY(7px);
  }
}
@media (max-width: 340px) {
  .tz__row {
    grid-template-columns: 104px 1fr auto;
    gap: 4px;
  }
  .tz__name {
    font-size: 11px;
    line-height: 14px;
  }
  .tz__t,
  .tz__f {
    font-size: 16px;
    line-height: 20px;
  }
  .tz__row--base .tz__t,
  .tz__row--base .tz__f {
    font-size: 19px;
    line-height: 22px;
  }
  .tz__nudge {
    width: 22px;
    height: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tz.is-demo .tz__f,
  .tz.is-demo .tz__fill,
  .tz.is-demo .tz__row[data-r="2"] .tz__badge {
    animation: none !important;
  }
  .tz.is-demo .tz__f[data-k=b],
  .tz.is-demo .tz__f[data-k=c] {
    display: none;
  }
}
