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

.te {
  position: relative;
  box-sizing: border-box;
  width: min(320px, 92vw);
  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);
}

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

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

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

.te__view {
  height: 100px;
  overflow-y: auto;
  padding: 0 12px;
  outline: none;
}

.te__track {
  display: grid;
  gap: 8px;
  padding-bottom: 140px;
}

.te__card {
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 16px;
  border-radius: 12px;
  background: #0a4fe8;
  color: #fff7e6;
  opacity: 0;
  transition: opacity 600ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.te__card b {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}
.te__card span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.te__card[data-scroll=up] {
  transform: translateY(18px);
}

.te__card[data-scroll=left] {
  transform: translateX(-24px);
}

.te__card[data-scroll=right] {
  transform: translateX(24px);
}

.te__card[data-scroll=zoom] {
  transform: scale(0.82);
}

.te__card.is-visible {
  opacity: 1;
  transform: none;
}

.te__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid rgba(23, 20, 26, 0.12);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}
.te__foot b {
  color: #c93000;
}

.te__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2f6df6;
}

.te.is-demo .te__track {
  animation-name: te-flow;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.te.is-demo .te__card {
  animation-name: te-show, te-rise;
  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;
}
.te.is-demo .te__card:nth-child(1) {
  animation-delay: 0s, 0s;
}
.te.is-demo .te__card:nth-child(2) {
  animation-delay: 0.24s, 0.24s;
}
.te.is-demo .te__card:nth-child(3) {
  animation-delay: 0.48s, 0.48s;
}
.te.is-demo .te__card:nth-child(4) {
  animation-delay: 0.72s, 0.72s;
}
.te.is-demo .te__dot {
  animation-name: te-blink;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes te-flow {
  0%, 8% {
    transform: translateY(0);
  }
  46%, 54% {
    transform: translateY(-80px);
  }
  88%, 100% {
    transform: translateY(-160px);
  }
}
@keyframes te-show {
  0% {
    opacity: 0;
  }
  4%, 92% {
    opacity: 1;
  }
  96% {
    opacity: 0;
  }
}
@keyframes te-rise {
  0% {
    transform: translateY(18px);
  }
  28%, 92% {
    transform: none;
  }
  100% {
    transform: translateY(18px);
  }
}
@keyframes te-blink {
  0% {
    background: rgba(23, 20, 26, 0.2);
  }
  24% {
    background: #2f6df6;
  }
  90% {
    background: rgba(23, 20, 26, 0.2);
  }
}
@media (max-width: 340px) {
  .te {
    width: 100%;
  }
  .te__view {
    height: 72px;
  }
  .te__card {
    padding: 8px;
  }
  .te__card b {
    font-size: 16px;
  }
  .te__card span {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .te__card {
    transition: none !important;
  }
  .te.is-demo .te__track,
  .te.is-demo .te__card,
  .te.is-demo .te__dot {
    animation: none !important;
  }
  .te.is-demo .te__card {
    opacity: 1 !important;
    transform: none !important;
  }
  .te.is-demo .te__dot {
    background: #2f6df6 !important;
  }
}
