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

.scene {
  position: relative;
  width: 320px;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  background: linear-gradient(160deg, #fff1c2, #ffd23f 75%);
}

.grid {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.thumb {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.thumb:focus-visible .thumbImg {
  outline: 2px solid #c93000;
  outline-offset: 2px;
}

.thumbImg {
  display: block;
  width: 64px;
  height: 48px;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}
.thumbImg--a {
  background: linear-gradient(135deg, #2f6df6, #4cd4a6);
  height: 48px;
}
.thumbImg--b {
  background: linear-gradient(135deg, #ff9ebb, #b9a0ff);
  width: 56px;
  height: 56px;
}
.thumbImg--c {
  background: linear-gradient(135deg, #6ec8ff, #b9a0ff);
  width: 48px;
  height: 64px;
}

.thumbLabel {
  font-size: 10px;
  font-weight: 600;
  color: #17141a;
}

.backdrop {
  position: absolute;
  inset: 0;
  background: #17141a;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lightbox {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  visibility: hidden;
}

.fullImg {
  display: block;
  width: 200px;
  height: 150px;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  transform-origin: center;
}
.fullImg--a {
  background: linear-gradient(135deg, #2f6df6, #4cd4a6);
}
.fullImg--b {
  background: linear-gradient(135deg, #ff9ebb, #b9a0ff);
  width: 172px;
  height: 172px;
}
.fullImg--c {
  background: linear-gradient(135deg, #6ec8ff, #b9a0ff);
  width: 138px;
  height: 184px;
}

.ratioNote {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  color: #fff7e6;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 8px;
  border-radius: 8px;
}

.closeBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #17141a;
  background: rgba(255, 247, 230, 0.95);
  cursor: pointer;
}
.closeBtn:focus-visible {
  outline: 2px solid #c93000;
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .scene {
    width: 220px;
    height: 124px;
  }
  .fullImg {
    width: 140px;
    height: 104px;
  }
  .fullImg--b {
    width: 118px;
    height: 118px;
  }
  .fullImg--c {
    width: 96px;
    height: 128px;
  }
  .ratioNote {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .closeBtn, .thumb {
    transition: none;
  }
}
