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

.rs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.rs__frame {
  position: relative;
  height: clamp(110px, 60vh, 196px);
  aspect-ratio: 16/10;
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.rs__view {
  display: block;
  width: 100%;
  height: 100%;
}

.rs__ghost {
  display: none;
  position: absolute;
  inset: 0;
  background-image: var(--photo);
  background-size: cover;
}

.rs__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.42) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.42) 1px, transparent 1px);
  background-size: 33.34% 33.34%;
  background-position: 33.33% 33.33%;
}

.rs__ctl {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff7e6;
}

.rs__lab {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: clamp(9px, 2.4vw, 11px);
}

.rs__ico {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.rs__track {
  position: relative;
  flex: 0 0 auto;
  width: 120px;
  height: 6px;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.28);
}

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

.rs__thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transform: translate(-50%, -50%);
}

.rs__vals {
  position: relative;
  flex: 0 0 auto;
  display: inline-block;
  min-width: 84px;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
  font-family: ui-monospace, "Consolas", monospace;
  color: rgba(255, 247, 230, 0.82);
}

.rs__demo {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
}

.rs.is-demo .rs__view {
  visibility: hidden;
}

.rs.is-demo .rs__ghost {
  display: block;
  animation-name: rsTilt;
  animation-duration: 2s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes rsTilt {
  0%, 26% {
    transform: rotate(-12deg) scale(1.31);
  }
  56%, 76% {
    transform: rotate(0deg) scale(1);
  }
  78%, 100% {
    transform: rotate(-12deg) scale(1.31);
  }
}
.rs.is-demo .rs__thumb {
  animation-name: rsSlide;
  animation-duration: 2s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes rsSlide {
  0%, 26% {
    transform: translate(-50%, -50%) translateX(-48px);
  }
  56%, 76% {
    transform: translate(-50%, -50%);
  }
  78%, 100% {
    transform: translate(-50%, -50%) translateX(-48px);
  }
}
.rs.is-demo .rs__real {
  color: transparent;
}

.rs.is-demo .rs__demo {
  display: block;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.rs.is-demo .rs__demo--a {
  animation-name: rsValA;
}

.rs.is-demo .rs__demo--b {
  animation-name: rsValB;
}

@keyframes rsValA {
  0%, 40% {
    opacity: 1;
  }
  41%, 76% {
    opacity: 0;
  }
  77%, 100% {
    opacity: 1;
  }
}
@keyframes rsValB {
  0%, 40% {
    opacity: 0;
  }
  41%, 76% {
    opacity: 1;
  }
  77%, 100% {
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .rs__track {
    width: 84px;
  }
  .rs__ctl {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rs.is-demo .rs__ghost,
  .rs.is-demo .rs__thumb,
  .rs.is-demo .rs__demo {
    animation: none !important;
  }
  .rs.is-demo .rs__ghost {
    transform: rotate(-12deg) scale(1.31) !important;
  }
  .rs.is-demo .rs__thumb {
    transform: translate(-50%, -50%) translateX(-48px) !important;
  }
  .rs.is-demo .rs__demo--b {
    opacity: 0 !important;
  }
  .rs.is-demo .rs__demo--a {
    opacity: 1 !important;
  }
}
