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

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

.formcrayon {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: clamp(210px, 74vw, 260px);
}

.formcrayon__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.formcrayon__label {
  color: #33261c;
  font-weight: 700;
  font-size: 11px;
}

.formcrayon__input-wrap {
  position: relative;
  display: block;
}

.formcrayon__ring {
  position: absolute;
  inset: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  pointer-events: none;
  filter: url(#rough9);
}

.formcrayon__ring-rect {
  fill: none;
  stroke: #9cb8ce;
  stroke-width: 3;
  stroke-linecap: round;
  animation: ringBloom 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.formcrayon__input {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  border: 2px solid #33261c;
  border-radius: 12px;
  background: #ffffff;
  color: #33261c;
  padding: 8px 12px;
  font-weight: 500;
  font-size: 12px;
}

.formcrayon__input:focus-visible {
  outline: 3px solid #9cb8ce;
  outline-offset: 2px;
}

.formcrayon__btn-wrap {
  position: relative;
  display: inline-block;
}

.formcrayon__btn-frame {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  pointer-events: none;
  filter: url(#rough9);
}

.formcrayon__btn-rect {
  fill: none;
  stroke-width: 2.6;
}

.formcrayon__btn-rect--a {
  stroke: #dbb6b7;
  animation: lineShiftA 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.formcrayon__btn-rect--b {
  stroke: #9cb8ce;
  opacity: 0.85;
  animation: lineShiftB 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.formcrayon__btn {
  position: relative;
  border: 0;
  border-radius: 999px;
  background: #d1c5a2;
  color: #33261c;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 13px;
}

.formcrayon__btn:focus-visible {
  outline: 3px solid #33261c;
  outline-offset: 2px;
}

@keyframes ringBloom {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  35% {
    opacity: 1;
    transform: scale(1);
  }
  70% {
    opacity: 1;
    transform: scale(1.03);
  }
  100% {
    opacity: 0;
    transform: scale(1.06);
  }
}
@keyframes lineShiftA {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-2px, 1px);
  }
}
@keyframes lineShiftB {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(2px, -1px);
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .formcrayon {
    gap: 8px;
  }
  .formcrayon__btn {
    padding: 8px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .formcrayon__ring-rect, .formcrayon__btn-rect {
    animation: none !important;
    transform: none;
  }
  .formcrayon__ring-rect {
    opacity: 0.8;
  }
}
