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

.rm {
  width: min(260px, 86vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rm__label {
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  font-family: inherit;
  color: #fff7e6;
}

.rm__field {
  position: relative;
}

.rm__textarea {
  box-sizing: border-box;
  width: 100%;
  resize: none;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid #c2361a;
  background: rgba(255, 255, 255, 0.06);
  color: #fff7e6;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  font-family: inherit;
}

.rm__ring {
  position: absolute;
  inset: -4px;
  border: 2px solid #c2361a;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
}

.rm__msg {
  margin: 0;
  color: #ffe0d8;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.3;
  font-family: inherit;
}

@keyframes rm-shake {
  0%, 22%, 100% {
    transform: translateX(0);
  }
  2% {
    transform: translateX(-6px);
  }
  4% {
    transform: translateX(6px);
  }
  6% {
    transform: translateX(-6px);
  }
  8% {
    transform: translateX(6px);
  }
  10% {
    transform: translateX(-4px);
  }
  12% {
    transform: translateX(4px);
  }
  14% {
    transform: translateX(-2px);
  }
  16% {
    transform: translateX(2px);
  }
}
.rm__textarea.rm--invalid {
  animation: rm-shake 500ms ease-out;
}

.rm.is-demo .rm__textarea {
  animation: rm-shake 500ms ease-out infinite;
}

@keyframes rm-ring-pulse {
  0%, 100% {
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  75% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rm__textarea.rm--invalid,
  .rm.is-demo .rm__textarea {
    animation: none !important;
  }
  .rm__ring.rm--invalid {
    animation: rm-ring-pulse 2s ease-in-out;
  }
  .rm.is-demo .rm__ring {
    animation: rm-ring-pulse 2s ease-in-out infinite;
  }
}
