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

.pages {
  position: relative;
  width: min(300px, 88%);
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  background: #fff;
}

.page--grid {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  padding: clamp(12px, 5vw, 18px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page__tag {
  margin: 0;
  font-weight: 700;
  font-size: clamp(9px, 2.6vw, 11px);
  line-height: 1;
  font-family: inherit;
  letter-spacing: 0.12em;
  color: #17141a;
  opacity: 0.55;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}

.cell {
  border-radius: 8px;
  background: #17141a;
  opacity: 0.12;
}

.cell--focus {
  background: #17141a;
  opacity: 1;
}

.cell--focus {
  position: relative;
  animation: zoom-card 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.detail {
  position: absolute;
  inset: 0;
  background: #17141a;
  color: #fff;
  display: flex;
  align-items: flex-end;
  box-sizing: border-box;
  padding: clamp(12px, 5vw, 18px);
  opacity: 0;
  animation: zoom-detail 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.detail__body {
  margin: 0;
  font-weight: 400;
  font-size: clamp(11px, 3.2vw, 13px);
  line-height: 1.5;
  font-family: inherit;
}

@keyframes zoom-card {
  0%, 40% {
    transform: scale(1);
  }
  70% {
    transform: scale(4);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes zoom-detail {
  0%, 55% {
    opacity: 0;
  }
  75%, 90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cell--focus, .detail {
    animation: none !important;
  }
  .detail {
    opacity: 0;
  }
}
