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

.pg {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pg__hint {
  margin: 0;
  padding: 0 4px;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
  color: #17141a;
}

.pg__zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 8px 12px;
  border: 2px dashed rgba(23, 20, 26, 0.72);
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 220ms ease-out, background 220ms ease-out;
}

.pg__zone.is-over {
  border-color: #2f6df6;
  background: rgba(47, 109, 246, 0.08);
}

.pg__file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.pg__ic {
  width: 26px;
  height: 26px;
  color: #17141a;
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.pg__zone.is-over .pg__ic {
  transform: scale(1.15) rotate(-4deg);
}

.pg__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  min-height: 96px;
}

.pg__tile {
  --ratio: 1.5;
  flex: 0 1 auto;
  width: auto;
  height: clamp(64px, 28vw, 96px);
  max-width: 100%;
  aspect-ratio: var(--ratio);
  border-radius: 8px;
  overflow: hidden;
  background: #cfd8f5;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  display: grid;
  place-items: center;
}

.pg__tile.is-in {
  animation: pgIn 300ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

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

.pg__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 4px;
}

.pg__tag {
  font-weight: 700;
  font-size: 12px;
  color: #17141a;
}

.pg__unit {
  font-weight: 400;
  font-size: 10px;
  color: rgba(23, 20, 26, 0.72);
}

@keyframes pgIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (max-width: 340px) {
  .pg {
    max-width: 280px;
    gap: 4px;
  }
  .pg__hint {
    font-size: 9px;
    line-height: 1.25;
  }
  .pg__zone {
    min-height: 40px;
    padding: 4px 8px;
  }
  .pg__ic {
    width: 20px;
    height: 20px;
  }
  .pg__tile {
    height: clamp(40px, 14vw, 56px);
  }
  .pg__grid {
    gap: 4px;
    min-height: 48px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pg__tile.is-in {
    animation: none;
  }
  .pg__zone, .pg__ic {
    transition: none;
  }
  .pg__zone.is-over .pg__ic {
    transform: none;
  }
}
