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

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

.lm {
  box-sizing: border-box;
  position: relative;
  width: min(320px, 94vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
  color: #17141a;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

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

.lm__file {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(47, 109, 246, 0.1);
  color: #0a4fe8;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.2;
}

.lm__file-ic {
  display: inline-flex;
}

.lm__lab {
  font-weight: 700;
  font-size: 10px;
  line-height: 1.2;
  color: rgba(23, 20, 26, 0.62);
}

.lm__in {
  padding: 8px 12px;
  border: 1.5px solid rgba(23, 20, 26, 0.16);
  border-radius: 8px;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.2;
  color: #17141a;
}

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

.lm__in.is-shake {
  animation-name: lm-shake;
  animation-duration: 300ms;
  animation-timing-function: ease-out;
}

@keyframes lm-shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
.lm__agree {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}

.lm__cb {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #2f6df6;
}

.lm__btn {
  position: relative;
  overflow: hidden;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: #2f6df6;
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

.lm__btn-t {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.lm__btn-ic {
  display: inline-flex;
}

.lm__btn[disabled] {
  cursor: progress;
}

.lm__prog {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.34);
  transform: scaleX(0);
  transform-origin: left center;
}

.lm.is-busy .lm__prog {
  animation-name: lm-fill;
  animation-duration: 900ms;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

@keyframes lm-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
.lm__msg {
  margin: 0;
  min-height: 13px;
  font-weight: 500;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.6);
}

.lm__chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(76, 212, 166, 0.22);
  color: #17141a;
  font-weight: 800;
  font-size: 11px;
  line-height: 1.3;
  text-decoration: none;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 220ms ease-out, transform 300ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.lm__chip-ic {
  display: inline-flex;
  color: #4cd4a6;
}

.lm.is-done .lm__chip {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.stage.is-demo .lm__prog {
  animation-name: lm-loop-fill;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes lm-loop-fill {
  0% {
    transform: scaleX(0);
  }
  38% {
    transform: scaleX(1);
  }
  86% {
    transform: scaleX(1);
  }
  86.01% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(0);
  }
}
.stage.is-demo .lm__chip {
  animation-name: lm-loop-chip;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes lm-loop-chip {
  0%, 40% {
    opacity: 0;
    transform: translateY(10px);
  }
  40.01% {
    opacity: 1;
    transform: translateY(10px);
  }
  60% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.stage.is-demo .lm__in::placeholder {
  color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .lm__in.is-shake, .lm.is-busy .lm__prog, .stage.is-demo .lm__prog, .stage.is-demo .lm__chip, .lm__chip {
    animation: none !important;
    transition: none !important;
  }
  .stage.is-demo .lm__prog {
    transform: scaleX(1) !important;
  }
  .stage.is-demo .lm__chip {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .lm {
    width: min(288px, 92vw);
    gap: 4px;
    padding: 8px;
  }
  .lm__title {
    font-size: 12px;
  }
  .lm__file {
    padding: 0 4px;
    font-size: 9px;
  }
  .lm__file-ic svg {
    width: 12px;
    height: 12px;
  }
  .lm__lab {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .lm__in {
    padding: 4px 8px;
    font-size: 10px;
  }
  .lm__agree {
    font-size: 9px;
  }
  .lm__cb {
    width: 12px;
    height: 12px;
  }
  .lm__btn {
    padding: 4px 8px;
    font-size: 10px;
  }
  .lm__btn-ic svg {
    width: 12px;
    height: 12px;
  }
  .lm__msg {
    min-height: 0;
    font-size: 9px;
  }
  .lm__chip {
    padding: 0 4px;
    font-size: 9px;
  }
  .lm__chip-ic svg {
    width: 12px;
    height: 12px;
  }
}
