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

.lb {
  position: relative;
  box-sizing: border-box;
  width: 288px;
  height: 168px;
}

.lb__grid {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 16px;
}

.lb__t {
  width: 84px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  cursor: zoom-in;
}

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

.lb__t--1 {
  background: radial-gradient(circle at 30% 28%, #ffd23f 0 16%, transparent 17%), linear-gradient(150deg, #ff4d1f, #ff9ebb 62%, #b9a0ff);
}

.lb__t--2 {
  background: radial-gradient(circle at 72% 70%, #fff7e6 0 12%, transparent 13%), linear-gradient(28deg, #2f6df6, #4cd4a6 70%, #ffd23f);
}

.lb__t--3 {
  background: repeating-linear-gradient(120deg, rgba(255, 247, 230, 0.3) 0 6%, transparent 6% 14%), linear-gradient(200deg, #17141a, #6ec8ff);
}

.lb__sheet {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
}

.lb.is-demo .lb__sheet {
  display: grid;
  pointer-events: none;
}

.lb.is-open .lb__sheet {
  display: grid;
  pointer-events: auto;
}

.lb__scrim {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(23, 20, 26, 0.72);
}

.lb__panel {
  position: relative;
  box-sizing: border-box;
  width: 240px;
  height: 120px;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  transform-origin: center center;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lb[data-i="1"] .lb__panel {
  background: radial-gradient(circle at 30% 28%, #ffd23f 0 16%, transparent 17%), linear-gradient(150deg, #ff4d1f, #ff9ebb 62%, #b9a0ff);
}

.lb[data-i="2"] .lb__panel {
  background: radial-gradient(circle at 72% 70%, #fff7e6 0 12%, transparent 13%), linear-gradient(28deg, #2f6df6, #4cd4a6 70%, #ffd23f);
}

.lb[data-i="3"] .lb__panel {
  background: repeating-linear-gradient(120deg, rgba(255, 247, 230, 0.3) 0 6%, transparent 6% 14%), linear-gradient(200deg, #17141a, #6ec8ff);
}

.lb__x {
  position: absolute;
  right: 8px;
  top: 8px;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 20, 26, 0.72);
  color: #fff7e6;
  cursor: pointer;
}

.lb__x:focus-visible {
  outline: 2px solid #fff7e6;
  outline-offset: 2px;
}

.lb.is-demo .lb__panel {
  transition: none;
  animation-name: lb-panel;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.lb.is-demo .lb__scrim {
  animation-name: lb-scrim;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes lb-panel {
  0% {
    opacity: 0;
    transform: translate(0, -36px) scale(0.35, 0.533);
  }
  9% {
    opacity: 0;
    transform: translate(0, -36px) scale(0.35, 0.533);
  }
  10% {
    opacity: 1;
    transform: translate(0, -36px) scale(0.35, 0.533);
  }
  40% {
    opacity: 1;
    transform: translate(0, 0) scale(1, 1);
  }
  70% {
    opacity: 1;
    transform: translate(0, 0) scale(1, 1);
  }
  86% {
    opacity: 1;
    transform: translate(0, -36px) scale(0.35, 0.533);
  }
  87% {
    opacity: 0;
    transform: translate(0, -36px) scale(0.35, 0.533);
  }
  100% {
    opacity: 0;
    transform: translate(0, -36px) scale(0.35, 0.533);
  }
}
@keyframes lb-scrim {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 0;
  }
  22% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  87% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@media (max-width: 360px) {
  .lb {
    height: 160px;
  }
  .lb__grid {
    padding-top: 8px;
  }
  .lb__panel {
    width: 224px;
    height: 112px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lb.is-demo .lb__panel,
  .lb.is-demo .lb__scrim {
    animation: none !important;
  }
  .lb.is-demo .lb__panel {
    opacity: 1;
    transform: translate(0, 0) scale(1, 1);
  }
  .lb.is-demo .lb__scrim {
    opacity: 1;
  }
  .lb__panel {
    transition: none;
  }
}
