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

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

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

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

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

.fp__row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: min(100%, 300px);
}

.fp__ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 16.6666666667%;
  height: 100%;
  border: 2px solid #17141a;
  border-radius: 8px;
  pointer-events: none;
}

.fp__p {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  cursor: pointer;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #17141a;
  font-family: inherit;
  font-weight: 700;
}

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

.fp__sw {
  width: 100%;
  height: 20px;
  border-radius: 4px;
  background-image: var(--photo);
  background-size: cover;
  background-position: center;
}

.fp__sw--b {
  filter: grayscale(1) contrast(1.08);
}

.fp__sw--c {
  filter: sepia(0.75) saturate(1.2);
}

.fp__sw--d {
  filter: contrast(1.3) saturate(1.35);
}

.fp__sw--e {
  filter: saturate(0.55) brightness(1.08);
}

.fp__sw--f {
  filter: sepia(0.4) contrast(0.9) hue-rotate(-14deg);
}

.fp__name {
  font-size: clamp(8px, 2.2vw, 10px);
  line-height: 1.2;
}

.fp__code {
  position: relative;
  margin: 0;
  width: min(100%, 300px);
  height: 14px;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: clamp(8px, 2.1vw, 10px);
  color: rgba(23, 20, 26, 0.78);
  white-space: nowrap;
  overflow: hidden;
}

.fp__demo {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
}

.fp.is-demo .fp__view {
  visibility: hidden;
}

.fp.is-demo .fp__ghost {
  display: block;
  animation-name: fpChain;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes fpChain {
  0%, 10% {
    filter: grayscale(0) sepia(0) saturate(1) contrast(1) brightness(1) hue-rotate(0deg);
  }
  14%, 24% {
    filter: grayscale(1) sepia(0) saturate(1) contrast(1.08) brightness(1) hue-rotate(0deg);
  }
  28%, 38% {
    filter: grayscale(0) sepia(0.75) saturate(1.2) contrast(1) brightness(1) hue-rotate(0deg);
  }
  42%, 52% {
    filter: grayscale(0) sepia(0) saturate(1.35) contrast(1.3) brightness(1) hue-rotate(0deg);
  }
  56%, 66% {
    filter: grayscale(0) sepia(0) saturate(0.55) contrast(1) brightness(1.08) hue-rotate(0deg);
  }
  70%, 85% {
    filter: grayscale(0) sepia(0.4) saturate(1) contrast(0.9) brightness(1) hue-rotate(-14deg);
  }
  89%, 100% {
    filter: grayscale(0) sepia(0) saturate(1) contrast(1) brightness(1) hue-rotate(0deg);
  }
}
.fp.is-demo .fp__ring {
  animation-name: fpRing;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes fpRing {
  0%, 11% {
    transform: translateX(0);
  }
  12%, 25% {
    transform: translateX(100%);
  }
  26%, 39% {
    transform: translateX(200%);
  }
  40%, 53% {
    transform: translateX(300%);
  }
  54%, 67% {
    transform: translateX(400%);
  }
  68%, 86% {
    transform: translateX(500%);
  }
  87%, 100% {
    transform: translateX(0);
  }
}
.fp.is-demo .fp__real {
  color: transparent;
}

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

.fp.is-demo .fp__demo--a {
  animation-name: fpTextA;
}

.fp.is-demo .fp__demo--b {
  animation-name: fpTextB;
}

.fp.is-demo .fp__demo--c {
  animation-name: fpTextC;
}

.fp.is-demo .fp__demo--d {
  animation-name: fpTextD;
}

.fp.is-demo .fp__demo--e {
  animation-name: fpTextE;
}

.fp.is-demo .fp__demo--f {
  animation-name: fpTextF;
}

@keyframes fpTextA {
  0%, 11% {
    opacity: 1;
  }
  12%, 86% {
    opacity: 0;
  }
  87%, 100% {
    opacity: 1;
  }
}
@keyframes fpTextB {
  0%, 11% {
    opacity: 0;
  }
  12%, 25% {
    opacity: 1;
  }
  26%, 100% {
    opacity: 0;
  }
}
@keyframes fpTextC {
  0%, 25% {
    opacity: 0;
  }
  26%, 39% {
    opacity: 1;
  }
  40%, 100% {
    opacity: 0;
  }
}
@keyframes fpTextD {
  0%, 39% {
    opacity: 0;
  }
  40%, 53% {
    opacity: 1;
  }
  54%, 100% {
    opacity: 0;
  }
}
@keyframes fpTextE {
  0%, 53% {
    opacity: 0;
  }
  54%, 67% {
    opacity: 1;
  }
  68%, 100% {
    opacity: 0;
  }
}
@keyframes fpTextF {
  0%, 67% {
    opacity: 0;
  }
  68%, 86% {
    opacity: 1;
  }
  87%, 100% {
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .fp {
    gap: 4px;
  }
  .fp__sw {
    height: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fp.is-demo .fp__ghost,
  .fp.is-demo .fp__ring,
  .fp.is-demo .fp__demo {
    animation: none !important;
  }
  .fp.is-demo .fp__ghost {
    filter: grayscale(0) sepia(0.75) saturate(1.2) contrast(1) brightness(1) hue-rotate(0deg) !important;
  }
  .fp.is-demo .fp__ring {
    transform: translateX(200%) !important;
  }
  .fp.is-demo .fp__demo--a,
  .fp.is-demo .fp__demo--b,
  .fp.is-demo .fp__demo--d,
  .fp.is-demo .fp__demo--e,
  .fp.is-demo .fp__demo--f {
    opacity: 0 !important;
  }
  .fp.is-demo .fp__demo--c {
    opacity: 1 !important;
  }
}
