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

@property --p {
  syntax: "<integer>";
  inherits: true;
  initial-value: 45;
}
.gs {
  position: relative;
  box-sizing: border-box;
  width: 288px;
  max-width: 100%;
  padding: 12px;
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  font-family: inherit;
}

.gs * {
  box-sizing: border-box;
}

.gs__bar {
  position: relative;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  touch-action: none;
  background-image: linear-gradient(90deg, #ff4d1f 0%, #ffd23f calc(var(--p) * 1%), #2f6df6 100%);
}

.gs__stop {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.gs__stop--a {
  background: #ff4d1f;
  transform: translateX(0) translate(-50%, -50%);
}

.gs__stop--m {
  background: #ffd23f;
  cursor: ew-resize;
  touch-action: none;
  transform: translateX(calc(var(--p) * 2.64px)) translate(-50%, -50%);
}

.gs__stop--b {
  background: #2f6df6;
  transform: translateX(264px) translate(-50%, -50%);
}

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

.gs__code {
  display: block;
  margin-top: 8px;
  counter-set: cp calc(var(--p));
  word-break: break-all;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(23, 20, 26, 0.74);
}

.gs__code::after {
  content: "linear-gradient(90deg, #ff4d1f 0%, #ffd23f " counter(cp) "%, #2f6df6 100%)";
}

.gs__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.gs__pos {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.gs__pct {
  counter-set: cp calc(var(--p));
  font-weight: 800;
}

.gs__pct::after {
  content: counter(cp) "%";
}

.gs__copy {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid rgba(23, 20, 26, 0.16);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.gs__copy svg {
  width: 16px;
  height: 16px;
}

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

.gs__live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.gs.is-demo {
  animation-name: gsSlide;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes gsSlide {
  0% {
    --p: 45;
  }
  45% {
    --p: 78;
  }
  90%, 100% {
    --p: 45;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gs.is-demo {
    animation: none !important;
  }
}
