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

.cs {
  --stageGlow: 0;
  display: grid;
  gap: 16px;
  justify-items: center;
  width: min(92vw, 420px);
  background-image: radial-gradient(circle at 50% 32%, rgba(91, 140, 248, calc(var(--stageGlow, 0) * 0.22)), transparent 70%);
  border-radius: 16px;
}

.cs__row {
  display: flex;
  align-items: flex-start;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

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

.cs__circle {
  --glow: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff7e6;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 calc(var(--glow, 0) * 16px) rgba(91, 140, 248, calc(var(--glow, 0) * 0.85));
  transition: background 220ms ease-out, border-color 220ms ease-out, color 220ms ease-out;
  cursor: pointer;
}

.cs__circle.is-active {
  background: #0a4fe8;
  border-color: #5b8cf8;
  color: #ffffff;
}

.cs__circle.is-done {
  background: #5b8cf8;
  border-color: #5b8cf8;
  color: #17141a;
}

.cs__label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

.cs__connector {
  flex: 1 1 auto;
  height: 8px;
  min-width: 20px;
  position: relative;
  margin: 20px 4px 0;
  border-radius: 999px;
  overflow: hidden;
}

.cs__connectorTrack,
.cs__connectorFill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.cs__connectorTrack {
  background: rgba(255, 255, 255, 0.16);
}

.cs__connectorFill {
  --glow: 0;
  background: #5b8cf8;
  transform-origin: left center;
  transform: scaleX(0);
  box-shadow: 0 0 calc(var(--glow, 0) * 14px) rgba(91, 140, 248, calc(var(--glow, 0) * 0.9));
  filter: brightness(calc(1 + var(--glow, 0) * 0.35));
}

.cs__status {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 600;
}

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

.cs__btn {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff7e6;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

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

.cs__btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.cs__btn:focus-visible,
.cs__circle:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .cs__circle {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .cs__label {
    font-size: 9px;
  }
  .cs__connector {
    height: 6px;
    margin: 16px 4px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cs__circle,
  .cs__connectorFill {
    transition: none;
  }
}
