html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.iv {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
}

.iv__scene {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  width: 100%;
  height: clamp(110px, 32vh, 160px);
  border: 3px solid #17141a;
  border-radius: 16px;
  background: #fff7e6;
}

.iv__list {
  list-style: none;
  margin: 0;
  padding: 0 16px;
  display: grid;
  gap: 8px;
}

.iv__row {
  appearance: none;
  padding: 4px 8px;
  background: transparent;
  border: 0;
  color: #17141a;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(12px, 3.2vw, 15px);
  line-height: 1.5;
  text-align: left;
  white-space: nowrap;
  border-radius: 8px;
  cursor: pointer;
}

.iv__row:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

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

.iv__preview {
  position: absolute;
  left: 0;
  top: 0;
  width: 150px;
  height: 110px;
  border: 3px solid #17141a;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  will-change: transform;
}

.iv__art {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  transition: opacity 220ms ease-out;
}

.iv__art--night {
  background: radial-gradient(circle at 78% 24%, rgba(255, 210, 63, 0.95) 0 7%, rgba(255, 210, 63, 0) 9%), radial-gradient(circle at 22% 70%, rgba(255, 210, 63, 0.8) 0 4%, rgba(255, 210, 63, 0) 6%), linear-gradient(180deg, #0a4fe8 0%, #17141a 100%);
}

.iv__art--sea {
  background: radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.9) 0 9%, rgba(255, 255, 255, 0) 14%), linear-gradient(180deg, #6ec8ff 0%, #6ec8ff 52%, #4cd4a6 52%, #4cd4a6 100%);
}

.iv__art--forest {
  background: radial-gradient(circle at 26% 26%, rgba(255, 210, 63, 0.95) 0 10%, rgba(255, 210, 63, 0) 16%), linear-gradient(180deg, #4cd4a6 0%, #2b9d74 130%);
}

.iv__art--forest::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(135deg, transparent 0 18%, rgba(23, 20, 26, 0.8) 18% 32%, transparent 32% 48%, rgba(23, 20, 26, 0.8) 48% 66%, transparent 66%);
}

.iv__ribbon {
  position: absolute;
  left: -3px;
  top: 8px;
  padding: 4px 8px;
  background: #0a4fe8;
  color: #fff7e6;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 10px);
  line-height: 1.3;
  border-radius: 0 4px 4px 0;
}

.iv__hint {
  margin: 0;
  color: #17141a;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 11px);
}

.iv.is-demo .iv__preview {
  animation: ivTour 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes ivTour {
  0%, 8% {
    transform: translate3d(196px, 18px, 0) rotate(-3deg);
  }
  30%, 38% {
    transform: translate3d(232px, 48px, 0) rotate(3deg);
  }
  58%, 66% {
    transform: translate3d(210px, 78px, 0) rotate(-2deg);
  }
  88%, 100% {
    transform: translate3d(196px, 18px, 0) rotate(-3deg);
  }
}
@media (max-width: 340px) {
  .iv {
    gap: 8px;
  }
  .iv__scene {
    height: clamp(96px, 28vh, 130px);
  }
  .iv__preview {
    width: 120px;
    height: 88px;
  }
  .iv__list {
    padding: 0 8px;
  }
  .iv.is-demo .iv__preview {
    animation-name: ivTourNarrow;
  }
}
@keyframes ivTourNarrow {
  0%, 8% {
    transform: translate3d(148px, 14px, 0) rotate(-3deg);
  }
  30%, 38% {
    transform: translate3d(168px, 38px, 0) rotate(3deg);
  }
  58%, 66% {
    transform: translate3d(152px, 62px, 0) rotate(-2deg);
  }
  88%, 100% {
    transform: translate3d(148px, 14px, 0) rotate(-3deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .iv.is-demo .iv__preview {
    animation: none !important;
  }
  .iv.is-demo .iv__preview {
    transform: translate3d(196px, 40px, 0) rotate(0deg) !important;
  }
  .iv__art {
    transition: none;
  }
}
