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

.fe {
  box-sizing: border-box;
  width: min(300px, 86vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.fe__viewport {
  position: relative;
  height: 96px;
  overflow-y: auto;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.fe__track {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

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

.fe__cap {
  flex: 0 0 auto;
  width: 52px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
}

.fe__slot {
  box-sizing: border-box;
  flex: 1 1 auto;
  height: 32px;
  padding: 0 12px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #fff7e6;
  font-size: 13px;
  line-height: 28px;
  font-weight: 700;
  outline: 0 solid transparent;
  transition: outline-color 220ms ease-out, border-color 220ms ease-out;
}

.fe__slot[data-filled="0"] {
  border-color: #c2361a;
  outline: 3px solid transparent;
  outline-offset: 2px;
}

.fe__slot.is-hit,
.fe__slot:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 2px;
}

.fe__btn {
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: #fff7e6;
  color: #17141a;
  font-family: inherit;
  font-size: 13px;
  line-height: 34px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease-out;
}

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

.fe__btn:active {
  transform: scale(0.97);
}

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

.fe.is-demo .fe__track {
  animation-name: fe-scroll;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.fe.is-demo .fe__slot[data-filled="0"] {
  transition: none;
  animation-name: fe-ring;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.fe.is-demo .fe__btn {
  transition: none;
  animation-name: fe-btn;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes fe-scroll {
  0% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-40px);
  }
  76% {
    transform: translateY(-40px);
  }
  88% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}
@keyframes fe-ring {
  0% {
    outline-color: transparent;
  }
  40% {
    outline-color: #2f6df6;
  }
  74% {
    outline-color: transparent;
  }
  100% {
    outline-color: transparent;
  }
}
@keyframes fe-btn {
  0% {
    transform: scale(1);
  }
  24% {
    transform: scale(1);
  }
  26% {
    transform: scale(0.97);
  }
  30% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 360px) {
  .fe {
    gap: 4px;
  }
  .fe__viewport {
    height: 88px;
  }
  .fe__cap {
    width: 44px;
  }
  .fe__slot {
    height: 28px;
    line-height: 24px;
  }
  .fe__btn {
    height: 32px;
    line-height: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fe.is-demo .fe__track,
  .fe.is-demo .fe__slot[data-filled="0"],
  .fe.is-demo .fe__btn {
    animation: none !important;
  }
  .fe.is-demo .fe__track {
    transform: translateY(-40px);
  }
  .fe.is-demo .fe__slot[data-filled="0"] {
    outline: 3px solid #2f6df6;
    outline-offset: 2px;
  }
  .fe__slot, .fe__btn {
    transition: none;
  }
}
