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

.pg {
  width: min(420px, 95vw);
}

.pg__tabs {
  position: relative;
  display: flex;
  gap: 4px;
  margin: 0 0 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.06);
  box-sizing: border-box;
}

.pg__indicator {
  position: absolute;
  left: 4px;
  top: 4px;
  bottom: 4px;
  border-radius: 999px;
  background: #17141a;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), width 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pg__tab {
  position: relative;
  flex: 0 0 auto;
  padding: 4px 12px;
  border: 0;
  background: none;
  border-radius: 999px;
  color: rgba(23, 20, 26, 0.72);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.6;
  font-family: inherit;
  cursor: pointer;
  transition: color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pg__tab[aria-selected=true] {
  color: #fff7e6;
}

.pg__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.pg__card {
  overflow: hidden;
  border-radius: 16px;
  background: rgba(23, 20, 26, 0.04);
  padding: 4px;
  box-sizing: border-box;
  transition: opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pg__card.is-hidden {
  opacity: 0.18;
  transform: scale(0.94);
}

.pg__thumb {
  position: relative;
  display: block;
  overflow: hidden;
  height: 30px;
  border-radius: 8px;
  margin: 0 0 4px;
  background: rgba(23, 20, 26, 0.12);
}

.pg__thumb::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: pg-shimmer 2s linear infinite;
}

.pg__card:nth-child(2n) .pg__thumb::after {
  animation-delay: 400ms;
}

@keyframes pg-shimmer {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(300%);
  }
}
.pg__title {
  margin: 0;
  font-weight: 700;
  font-size: 10px;
  line-height: 1.3;
  font-family: inherit;
  color: #17141a;
}

.pg__tag {
  margin: 4px 0 0;
  font-weight: 600;
  font-size: 9px;
  line-height: 1;
  font-family: inherit;
  color: rgba(23, 20, 26, 0.72);
}

@media (max-width: 340px), (max-height: 220px) {
  .pg__tabs {
    margin-bottom: 4px;
  }
  .pg__tab {
    padding: 4px 8px;
    font-size: 10px;
    line-height: 1.2;
  }
  .pg__thumb {
    height: 26px;
  }
  .pg__grid {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pg__indicator, .pg__tab, .pg__card {
    transition: none;
  }
  .pg__thumb::after {
    animation: none !important;
  }
}
