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

.fl {
  position: relative;
  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;
}

.fl__box {
  position: relative;
  box-sizing: border-box;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fl.is-up .fl__box {
  border-color: #2f6df6;
}

.fl.is-ok .fl__box {
  border-color: #4cd4a6;
}

.fl.is-bad .fl__box {
  border-color: #c2361a;
  background: rgba(194, 54, 26, 0.16);
}

.fl__input {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 20px 12px 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff7e6;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

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

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

.fl__label {
  position: absolute;
  left: 14px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  pointer-events: none;
  transform-origin: left top;
  transform: translateY(0) scale(1);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), color 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fl.is-up .fl__label {
  transform: translateY(-8px) scale(0.78);
  color: #2f6df6;
}

.fl.is-ok .fl__label {
  transform: translateY(-8px) scale(0.78);
  color: #4cd4a6;
}

.fl.is-bad .fl__label {
  transform: translateY(0) scale(1);
  color: #c2361a;
}

.fl__star {
  color: #c2361a;
}

.fl.is-bad .fl__star {
  color: #c2361a;
}

.fl__msg {
  position: relative;
  height: 16px;
  margin: 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
}

.fl__m1, .fl__m2 {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}

.fl__m1 {
  color: #c2361a;
}

.fl__m2 {
  color: #4cd4a6;
}

.fl.is-bad .fl__m1 {
  opacity: 1;
}

.fl.is-ok .fl__m2 {
  opacity: 1;
}

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

.fl.is-demo .fl__label {
  transition: none;
  animation-name: fl-label;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

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

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

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

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

@keyframes fl-type {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  12% {
    clip-path: inset(0 100% 0 0);
  }
  40% {
    clip-path: inset(0 0 0 0);
  }
  56% {
    clip-path: inset(0 0 0 0);
  }
  60% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 100% 0 0);
  }
}
@keyframes fl-label {
  0% {
    transform: translateY(0) scale(1);
    color: rgba(255, 255, 255, 0.52);
  }
  8% {
    transform: translateY(-8px) scale(0.78);
    color: #2f6df6;
  }
  44% {
    transform: translateY(-8px) scale(0.78);
    color: #4cd4a6;
  }
  60% {
    transform: translateY(0) scale(1);
    color: #c2361a;
  }
  87% {
    transform: translateY(0) scale(1);
    color: rgba(255, 255, 255, 0.52);
  }
  100% {
    transform: translateY(0) scale(1);
    color: rgba(255, 255, 255, 0.52);
  }
}
@keyframes fl-box {
  0% {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
  }
  8% {
    border-color: #2f6df6;
    background: rgba(255, 255, 255, 0.06);
  }
  44% {
    border-color: #4cd4a6;
    background: rgba(255, 255, 255, 0.06);
  }
  60% {
    border-color: #c2361a;
    background: rgba(194, 54, 26, 0.16);
  }
  82% {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
  }
  100% {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
  }
}
@keyframes fl-m1 {
  0% {
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  76% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes fl-m2 {
  0% {
    opacity: 0;
  }
  44% {
    opacity: 1;
  }
  60% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes fl-star {
  0% {
    color: #c2361a;
  }
  44% {
    color: #4cd4a6;
  }
  60% {
    color: #c2361a;
  }
  100% {
    color: #c2361a;
  }
}
@media (max-width: 360px) {
  .fl {
    gap: 4px;
  }
  .fl__box {
    height: 48px;
  }
  .fl__ghost {
    top: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fl.is-demo .fl__ghost,
  .fl.is-demo .fl__label,
  .fl.is-demo .fl__box,
  .fl.is-demo .fl__m1,
  .fl.is-demo .fl__m2,
  .fl.is-demo .fl__star {
    animation: none !important;
  }
  .fl.is-demo .fl__ghost {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
  .fl.is-demo .fl__label {
    transform: translateY(-8px) scale(0.78);
    color: #4cd4a6;
  }
  .fl.is-demo .fl__box {
    border-color: #4cd4a6;
  }
  .fl.is-demo .fl__m2 {
    opacity: 1;
  }
  .fl__label, .fl__box {
    transition: none;
  }
}
