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

.sr {
  display: flex;
  justify-content: center;
  width: 100%;
}

.sr__card {
  width: min(100%, 340px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  overflow: hidden;
}

.sr__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #17141a;
  padding: 8px 12px;
}

.sr__order {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sr__orderLabel {
  font-weight: 800;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.72);
}

.sr__steps {
  display: flex;
  gap: 4px;
}

.sr__step {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 800;
  font-size: 9px;
  line-height: 1;
}

.sr__step.is-on {
  background: #2f6df6;
  border-color: #2f6df6;
  color: #ffffff;
}

.sr__btn {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: transparent;
  color: #ffffff;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 10px);
  padding: 4px 8px;
  line-height: 1.3;
}

.sr__btn:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 2px;
}

.sr__ico {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.sr__pad {
  position: relative;
  background: #fff7e6;
  aspect-ratio: 300/96;
  touch-action: none;
}

.sr__ink, .sr__play, .sr__ghost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sr__play {
  fill: none;
  pointer-events: none;
}

.sr__trace {
  stroke: #17141a;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.sr__rule {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 12%;
  height: 0;
  border-bottom: 1px dashed rgba(23, 20, 26, 0.42);
}

.sr__ghost {
  display: none;
  fill: none;
}

.sr__stroke {
  stroke: #17141a;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.sr__stroke--c {
  stroke-width: 8;
}

.sr__live {
  position: relative;
  margin: 0;
  padding: 4px 12px 8px;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
  color: rgba(23, 20, 26, 0.72);
}

.sr__liveDemo {
  display: none;
  position: absolute;
  left: 12px;
  top: 4px;
}

.sr.is-demo .sr__ink {
  visibility: hidden;
}

.sr.is-demo .sr__ghost {
  display: block;
}

.sr.is-demo .sr__liveReal {
  color: transparent;
}

.sr.is-demo .sr__liveDemo {
  display: block;
}

.sr.is-demo .sr__stroke {
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

.sr.is-demo .sr__stroke--a {
  animation-name: srDrawA;
}

.sr.is-demo .sr__stroke--b {
  animation-name: srDrawB;
}

.sr.is-demo .sr__stroke--c {
  animation-name: srDrawC;
}

@keyframes srDrawA {
  0%, 6% {
    stroke-dashoffset: 100;
  }
  36%, 86% {
    stroke-dashoffset: 0;
  }
  92%, 100% {
    stroke-dashoffset: 100;
  }
}
@keyframes srDrawB {
  0%, 38% {
    stroke-dashoffset: 100;
  }
  58%, 80% {
    stroke-dashoffset: 0;
  }
  86%, 100% {
    stroke-dashoffset: 100;
  }
}
@keyframes srDrawC {
  0%, 60% {
    stroke-dashoffset: 100;
  }
  64%, 72% {
    stroke-dashoffset: 0;
  }
  80%, 100% {
    stroke-dashoffset: 100;
  }
}
.sr.is-demo .sr__step {
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: backwards, backwards;
}

.sr.is-demo .sr__step--a {
  animation-name: srLitA, srPopA;
}

.sr.is-demo .sr__step--b {
  animation-name: srLitB, srPopB;
}

.sr.is-demo .sr__step--c {
  animation-name: srLitC, srPopC;
}

@keyframes srLitA {
  0%, 9% {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.34);
    color: rgba(255, 255, 255, 0.5);
  }
  10%, 91% {
    background: #2f6df6;
    border-color: #2f6df6;
    color: #ffffff;
  }
  92%, 100% {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.34);
    color: rgba(255, 255, 255, 0.5);
  }
}
@keyframes srLitB {
  0%, 39% {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.34);
    color: rgba(255, 255, 255, 0.5);
  }
  40%, 81% {
    background: #2f6df6;
    border-color: #2f6df6;
    color: #ffffff;
  }
  82%, 100% {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.34);
    color: rgba(255, 255, 255, 0.5);
  }
}
@keyframes srLitC {
  0%, 61% {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.34);
    color: rgba(255, 255, 255, 0.5);
  }
  62%, 73% {
    background: #2f6df6;
    border-color: #2f6df6;
    color: #ffffff;
  }
  74%, 100% {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.34);
    color: rgba(255, 255, 255, 0.5);
  }
}
@keyframes srPopA {
  0%, 8% {
    transform: scale(1);
  }
  12% {
    transform: scale(1.34);
  }
  20%, 100% {
    transform: scale(1);
  }
}
@keyframes srPopB {
  0%, 38% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.34);
  }
  50%, 100% {
    transform: scale(1);
  }
}
@keyframes srPopC {
  0%, 60% {
    transform: scale(1);
  }
  64% {
    transform: scale(1.34);
  }
  72%, 100% {
    transform: scale(1);
  }
}
.sr.is-demo .sr__btn {
  animation-name: srPress;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes srPress {
  0% {
    transform: scale(1);
  }
  3% {
    transform: scale(0.88);
  }
  10%, 100% {
    transform: scale(1);
  }
}
@media (max-width: 340px) {
  .sr__bar {
    padding: 4px 8px;
  }
  .sr__order {
    gap: 4px;
  }
  .sr__live {
    padding: 4px 8px;
  }
  .sr__liveDemo {
    left: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sr.is-demo .sr__stroke,
  .sr.is-demo .sr__step,
  .sr.is-demo .sr__btn {
    animation: none !important;
  }
  .sr.is-demo .sr__stroke {
    stroke-dashoffset: 0 !important;
  }
  .sr.is-demo .sr__step {
    background: #2f6df6 !important;
    border-color: #2f6df6 !important;
    color: #ffffff !important;
  }
}
