html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ff4d1f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

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

.il__label {
  display: block;
  margin-bottom: 4px;
  color: #17141a;
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
}

.il__field {
  position: relative;
}

.il__input {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 2px solid rgba(255, 247, 230, 0.38);
  border-radius: 12px;
  background: rgba(23, 20, 26, 0.18);
  color: #fff7e6;
  font-family: inherit;
  font-size: 14px;
  line-height: 36px;
  font-weight: 700;
  transition: border-color 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.il__input::placeholder {
  color: rgba(255, 247, 230, 0.5);
  font-weight: 600;
}

.il__input:focus-visible {
  outline: 2px solid #fff7e6;
  outline-offset: 2px;
}

.il.is-bad .il__input {
  border-color: #4a0f04;
}

.il.is-good .il__input {
  border-color: #479075;
}

.il.is-demo .il__input::placeholder {
  color: transparent;
}

.il__ghost {
  position: absolute;
  left: 14px;
  top: 0;
  color: #fff7e6;
  font-size: 14px;
  line-height: 40px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}

.il__msg {
  position: relative;
  height: 16px;
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
}

.il__bad, .il__good {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  opacity: 0;
}

.il__bad {
  color: #4a0f04;
}

.il__good {
  color: #479075;
}

.il.is-bad .il__bad {
  opacity: 1;
}

.il.is-good .il__good {
  opacity: 1;
}

.il.is-demo .il__ghost {
  opacity: 1;
  animation-name: il-type;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.il.is-demo .il__input {
  transition: none;
  animation-name: il-input;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.il.is-demo .il__bad {
  animation-name: il-bad;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.il.is-demo .il__good {
  animation-name: il-good;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes il-type {
  0% {
    clip-path: inset(0 62% 0 0);
  }
  22% {
    clip-path: inset(0 46% 0 0);
  }
  38% {
    clip-path: inset(0 30% 0 0);
  }
  50% {
    clip-path: inset(0 14% 0 0);
  }
  62% {
    clip-path: inset(0 0 0 0);
  }
  84% {
    clip-path: inset(0 62% 0 0);
  }
  100% {
    clip-path: inset(0 62% 0 0);
  }
}
@keyframes il-input {
  0% {
    border-color: #4a0f04;
  }
  62% {
    border-color: #479075;
  }
  84% {
    border-color: #4a0f04;
  }
  100% {
    border-color: #4a0f04;
  }
}
@keyframes il-bad {
  0% {
    opacity: 1;
  }
  62% {
    opacity: 0;
  }
  84% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@keyframes il-good {
  0% {
    opacity: 0;
  }
  62% {
    opacity: 1;
  }
  78% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@media (max-width: 360px) {
  .il__input {
    height: 36px;
    line-height: 32px;
  }
  .il__ghost {
    line-height: 36px;
  }
  .il__msg {
    margin-top: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .il.is-demo .il__ghost,
  .il.is-demo .il__input,
  .il.is-demo .il__bad,
  .il.is-demo .il__good {
    animation: none !important;
  }
  .il.is-demo .il__ghost {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
  .il.is-demo .il__input {
    border-color: #479075;
  }
  .il.is-demo .il__good {
    opacity: 1;
  }
  .il__input {
    transition: none;
  }
}
