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

.cf {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(100%, 420px);
}

.cf:focus-visible {
  outline: 3px solid #17141a;
  outline-offset: 3px;
}

.cf__box {
  position: relative;
  width: 100%;
  height: clamp(96px, 46vh, 140px);
  perspective: 900px;
  perspective-origin: 50% 50%;
  overflow: hidden;
}

.cf__track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.cf__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(80px, 24vw, 112px);
  height: clamp(80px, 24vw, 112px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #17141a;
  cursor: pointer;
  backface-visibility: hidden;
  box-shadow: 0 0 0 2px rgba(255, 247, 230, 0.3), 0 14px 24px rgba(23, 20, 26, 0.32);
  transform: translate3d(calc(-50% + var(--d, 0) * clamp(48px, 15vw, 72px)), -50%, 0) rotateY(calc(var(--d, 0) * -34deg)) scale(calc(1 - 0.12 * var(--ad, 0)));
  opacity: calc(3 - var(--ad, 0));
  transition: transform 600ms ease-out, opacity 600ms ease-out;
}

.cf__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #17141a;
  opacity: calc(0.26 * var(--ad, 0));
  pointer-events: none;
  transition: opacity 600ms ease-out;
}

.cf__card[aria-current=true] {
  box-shadow: 0 0 0 3px #2f6df6, 0 14px 24px rgba(23, 20, 26, 0.32);
}

.cf__card:focus-visible {
  outline: 3px solid #17141a;
  outline-offset: 3px;
}

.cf__art {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
}

.cf__art--a {
  background-image: radial-gradient(circle at 36% 30%, rgba(255, 247, 230, 0.84), rgba(255, 247, 230, 0) 30%), linear-gradient(180deg, rgba(255, 247, 230, 0) 60%, rgba(255, 247, 230, 0.34) 60.4%, rgba(255, 247, 230, 0) 70%), linear-gradient(176deg, rgb(73.8431372549%, 88.3843137255%, 94.7058823529%) 0%, rgb(13.537254902%, 24.5960784314%, 51.6078431373%) 62%, rgb(11.0901960784%, 15.5215686275%, 29.1764705882%) 100%);
}

.cf__art--b {
  background-image: radial-gradient(circle at 68% 26%, rgba(255, 247, 230, 0.88), rgba(255, 247, 230, 0) 16%), linear-gradient(104deg, rgba(23, 20, 26, 0) 54%, rgb(36.3137254902%, 14.5490196078%, 10.7843137255%) 54.6%), linear-gradient(182deg, rgb(100%, 71.5294117647%, 60.5411764706%) 0%, #ff4d1f 46%, rgb(58.1490196078%, 19.9137254902%, 11.2549019608%) 100%);
}

.cf__art--c {
  background-image: linear-gradient(90deg, rgba(255, 210, 63, 0) 22%, rgba(255, 210, 63, 0.58) 22.6%, rgba(255, 210, 63, 0) 26%, rgba(255, 210, 63, 0) 48%, rgba(255, 210, 63, 0.46) 48.6%, rgba(255, 210, 63, 0) 52%, rgba(255, 210, 63, 0) 74%, rgba(255, 210, 63, 0.52) 74.6%, rgba(255, 210, 63, 0) 78%), linear-gradient(180deg, rgba(23, 20, 26, 0) 64%, rgb(25.3960784314%, 21.2549019608%, 12.8078431373%) 64.6%), linear-gradient(178deg, rgb(11.2784313725%, 16.2196078431%, 30.9019607843%) 0%, #17141a 84%);
}

.cf__art--d {
  background-image: radial-gradient(circle at 26% 22%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 28%), linear-gradient(86deg, rgba(76, 212, 166, 0) 44%, rgb(21.0745098039%, 51.5137254902%, 42.0392156863%) 44.6%), linear-gradient(174deg, rgb(70.431372549%, 87.2784313725%, 95.2941176471%) 0%, rgb(55.0745098039%, 89.2078431373%, 77.662745098%) 48%, rgb(18.5803921569%, 42.4784313725%, 35.4509803922%) 100%);
}

.cf__art--e {
  background-image: linear-gradient(118deg, rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, 0.82) 34.6%, rgba(255, 255, 255, 0.82) 44%, rgba(255, 255, 255, 0) 44.6%), linear-gradient(62deg, rgba(255, 255, 255, 0) 66%, rgba(255, 255, 255, 0.62) 66.6%, rgba(255, 255, 255, 0) 74%), linear-gradient(180deg, rgb(73.8431372549%, 90.0784313725%, 100%) 0%, rgb(31.2784313725%, 61.3019607843%, 98.3058823529%) 54%, rgb(14.6666666667%, 28.7843137255%, 61.9607843137%) 100%);
}

.cf__name {
  position: relative;
  padding: 4px 8px;
  background: #0a4fe8;
  color: #fff7e6;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.4;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.cf__nav {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(23, 20, 26, 0.72);
  color: #fff7e6;
  font-size: 17px;
  cursor: pointer;
  transition: transform 220ms ease-out;
}

.cf__nav:hover {
  transform: scale(1.12);
}

.cf__nav:focus-visible {
  outline: 3px solid #17141a;
  outline-offset: 2px;
}

.cf__dots {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.72);
}

.cf__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 247, 230, 0.52);
  cursor: pointer;
  transition: transform 220ms ease-out, background-color 220ms ease-out;
}

.cf__dot[aria-current=true] {
  background: #2f6df6;
  transform: scale(1.5);
}

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

@media (max-width: 360px) {
  .cf {
    gap: 4px;
  }
  .cf__nav {
    width: 24px;
    height: 24px;
    font-size: 15px;
  }
  .cf__dots {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cf__card,
  .cf__card::after,
  .cf__nav,
  .cf__dot {
    transition-duration: 0s;
  }
}
