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

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

.rf__view {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 180px;
  height: 152px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 247, 230, 0.08);
}

.rf__paper {
  width: 84px;
  height: 132px;
  border-radius: 8px;
  background: linear-gradient(#ff4d1f 0 0) no-repeat 50% 8%/64% 7%, repeating-linear-gradient(0deg, transparent 0 18%, rgba(23, 20, 26, 0.56) 18% 21%, transparent 21% 26%), linear-gradient(#fff7e6, #fff7e6);
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transform-origin: center center;
  transform: rotate(0deg) scaleX(1);
}

.rf__bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rf__btn {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 247, 230, 0.14);
  color: #fff7e6;
  cursor: pointer;
}

.rf__btn:focus-visible {
  outline: 2px solid #fff7e6;
  outline-offset: 2px;
}

.rf__btn[aria-pressed=true] {
  background: #ffd23f;
  color: #17141a;
}

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

@keyframes rf-turn {
  0% {
    transform: rotate(0deg) scaleX(1);
  }
  22% {
    transform: rotate(90deg) scaleX(1);
  }
  44% {
    transform: rotate(180deg) scaleX(1);
  }
  46% {
    transform: rotate(180deg) scaleX(-1);
  }
  66% {
    transform: rotate(270deg) scaleX(-1);
  }
  84% {
    transform: rotate(360deg) scaleX(-1);
  }
  86% {
    transform: rotate(360deg) scaleX(1);
  }
  100% {
    transform: rotate(360deg) scaleX(1);
  }
}
@media (max-width: 360px) {
  .rf__view {
    width: 160px;
    height: 144px;
  }
  .rf__paper {
    width: 76px;
    height: 120px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rf.is-demo .rf__paper {
    animation: none !important;
    transform: rotate(90deg) scaleX(1);
  }
}
