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

.float-form {
  width: min(220px, 82vw);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.float-field {
  position: relative;
}

.float-field__input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 12px 4px;
  border: 1.5px solid #d8d2c4;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  font-family: inherit;
  color: #17141a;
  transition: border-color 220ms ease-out;
}

.float-field__label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #8a8272;
  font-family: inherit;
  pointer-events: none;
  transform-origin: left center;
  transition: transform 220ms ease-out, color 220ms ease-out;
}

.float-field__input:focus {
  outline: none;
  border-color: #2f6df6;
}

.float-field__input:focus + .float-field__label,
.float-field__input:not(:placeholder-shown) + .float-field__label {
  transform: translateY(-135%) scale(0.78);
  color: #2f6df6;
}

.float-form__btn {
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: #2f6df6;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 140ms ease-out;
}

.float-form__btn:hover, .float-form__btn:focus-visible {
  transform: translateY(-1px);
}

.float-form.is-demo .float-field--a .float-field__input {
  animation: ring-a 2s ease-out infinite;
}

.float-form.is-demo .float-field--a .float-field__label {
  animation: float-a 2s ease-out infinite;
}

.float-form.is-demo .float-field--b .float-field__input {
  animation: ring-b 2s ease-out infinite;
}

.float-form.is-demo .float-field--b .float-field__label {
  animation: float-b 2s ease-out infinite;
}

@keyframes float-a {
  0%, 8% {
    transform: translateY(-50%) scale(1);
    color: #8a8272;
  }
  20%, 45% {
    transform: translateY(-135%) scale(0.78);
    color: #2f6df6;
  }
  55%, 100% {
    transform: translateY(-50%) scale(1);
    color: #8a8272;
  }
}
@keyframes ring-a {
  0%, 8% {
    border-color: #d8d2c4;
  }
  20%, 45% {
    border-color: #2f6df6;
  }
  55%, 100% {
    border-color: #d8d2c4;
  }
}
@keyframes float-b {
  0%, 55% {
    transform: translateY(-50%) scale(1);
    color: #8a8272;
  }
  65%, 92% {
    transform: translateY(-135%) scale(0.78);
    color: #2f6df6;
  }
  100% {
    transform: translateY(-50%) scale(1);
    color: #8a8272;
  }
}
@keyframes ring-b {
  0%, 55% {
    border-color: #d8d2c4;
  }
  65%, 92% {
    border-color: #2f6df6;
  }
  100% {
    border-color: #d8d2c4;
  }
}
@media (prefers-reduced-motion: reduce) {
  .float-field__input, .float-field__label, .float-form__btn {
    transition: none;
  }
  .float-form.is-demo .float-field--a .float-field__input,
  .float-form.is-demo .float-field--a .float-field__label,
  .float-form.is-demo .float-field--b .float-field__input,
  .float-form.is-demo .float-field--b .float-field__label {
    animation: none;
  }
}
