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

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

.cm {
  --cmGlow: 0;
  display: grid;
  gap: 16px;
  justify-items: center;
  width: min(92vw, 380px);
  background-image: radial-gradient(circle at 50% 30%, rgba(76, 212, 166, calc(var(--cmGlow, 0) * 0.2)), transparent 70%);
  border-radius: 16px;
}

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

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

.cm__circle {
  --drawGlow: 0;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 calc(var(--drawGlow, 0) * 18px) rgba(76, 212, 166, calc(var(--drawGlow, 0) * 0.85));
  background-image: radial-gradient(circle at 50% 50%, rgba(76, 212, 166, calc(var(--drawGlow, 0) * 0.35)), transparent 70%);
}

.cm__circle.is-active {
  background: #ffffff;
  border-color: #ffffff;
}

.cm__circle.is-active .cm__digit {
  color: #c93000;
}

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

.cm__digit {
  position: absolute;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.cm__check {
  position: absolute;
  width: 26px;
  height: 26px;
}

.cm__checkPath {
  fill: none;
  stroke: #4cd4a6;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.cm__label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.cm__connector {
  flex: 1 1 auto;
  height: 6px;
  min-width: 20px;
  margin: 20px 4px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.cm__status {
  margin: 0;
  font-size: 11px;
  color: #ffffff;
  font-weight: 700;
}

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

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

.cm__btn--primary {
  background: #17141a;
  border-color: #17141a;
}

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

.cm__btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .cm__circle {
    width: 34px;
    height: 34px;
  }
  .cm__check {
    width: 22px;
    height: 22px;
  }
  .cm__label {
    font-size: 9px;
  }
  .cm__connector {
    height: 4px;
    margin: 16px 4px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cm__checkPath {
    transition: none;
  }
}
