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

.er {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
  width: min(90vw, 280px);
}

.er__glow {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: #c2361a;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.er__row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.er__node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.er__ring {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  border-radius: 50%;
  border: 2px solid #c2361a;
  opacity: 0;
  pointer-events: none;
}

.er__circle {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  color: #17141a;
  background: #ffffff;
  border: 2px solid rgba(23, 20, 26, 0.2);
}

.er__circle.is-active {
  border-color: #0a4fe8;
}

.er__circle.is-done {
  background: #17141a;
  color: #ffd23f;
  border-color: #17141a;
}

.er__circle.is-error {
  background: #ffe0d8;
  border-color: #c2361a;
  color: #c2361a;
}

.er__label {
  font-size: 9px;
  color: rgba(23, 20, 26, 0.7);
  font-weight: 600;
}

.er__connector {
  flex: 1 1 auto;
  height: 3px;
  min-width: 18px;
  margin: 20px 4px 0;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.18);
}

.er__field {
  display: grid;
  gap: 4px;
  width: 100%;
  max-width: 220px;
}

.er__fieldLabel {
  font-size: 10px;
  font-weight: 600;
  color: rgba(23, 20, 26, 0.75);
}

.er__input {
  border: 1px solid rgba(23, 20, 26, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  background: #ffffff;
  color: #17141a;
}

.er__status {
  margin: 0;
  min-height: 14px;
  font-size: 10px;
  font-weight: 700;
  color: #c93000;
}

.er__controls {
  display: flex;
  gap: 8px;
}

.er__btn {
  border: 1px solid rgba(23, 20, 26, 0.3);
  background: transparent;
  color: #17141a;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.er__btn--primary {
  background: #0a4fe8;
  border-color: #0a4fe8;
  color: #ffffff;
}

.er__btn:focus-visible, .er__input:focus-visible {
  outline: 2px solid #0a4fe8;
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .er {
    gap: 4px;
  }
  .er__circle {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
  .er__ring {
    width: 48px;
    height: 48px;
    margin-left: -24px;
    top: -6px;
  }
  .er__connector {
    margin-top: 16px;
  }
  .er__field {
    gap: 0;
  }
  .er__input {
    padding: 4px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .er__circle {
    transition: none;
  }
}
