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

.gb {
  width: min(312px, 94vw);
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  padding: 16px;
}

.gb__title {
  margin: 0 0 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  color: #17141a;
  text-align: center;
}

.gb__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.gb__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gb__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.gb__badge:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
  border-radius: 8px;
}

.gb__stamp {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(47, 109, 246, 0.3);
  border-radius: 50%;
  background: rgba(47, 109, 246, 0.08);
  color: #2f6df6;
}

.gb__ic {
  grid-area: 1/1;
}

.gb__draw {
  grid-area: 1/1;
  color: #50a26e;
}

.gb__draw polyline {
  stroke-dasharray: 26;
  stroke-dashoffset: 0;
}

.gb__label {
  font-weight: 700;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.78);
  text-align: center;
}

.gb__more {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  transition: grid-template-rows 300ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.gb__cell.is-open .gb__more {
  grid-template-rows: 1fr;
}

.gb__more-in {
  overflow: hidden;
}

.gb__more p {
  margin: 0;
  padding: 4px 0 0;
  font-family: inherit;
  font-weight: 500;
  font-size: 9px;
  line-height: 1.4;
  color: rgba(23, 20, 26, 0.6);
  text-align: center;
}

.stage.is-demo .gb__stamp {
  animation-name: gb-stamp;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
  animation-delay: calc(var(--i) * 100ms);
}

@keyframes gb-stamp {
  0% {
    opacity: 0;
    transform: scale(1.4) rotate(var(--r));
  }
  6% {
    opacity: 1;
    transform: scale(1.16) rotate(0deg);
  }
  16% {
    opacity: 1;
    transform: scale(0.94) rotate(0deg);
  }
  24%, 70% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.4) rotate(var(--r));
  }
}
.stage.is-demo .gb__label {
  animation-name: gb-label;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
  animation-delay: calc(var(--i) * 100ms);
}

@keyframes gb-label {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  10% {
    opacity: 1;
    transform: translateY(2px);
  }
  22%, 70% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(5px);
  }
}
.stage.is-demo .gb__draw polyline {
  animation-name: gb-draw;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
  animation-delay: 160ms;
}

@keyframes gb-draw {
  0% {
    stroke-dashoffset: 26;
  }
  34%, 70% {
    stroke-dashoffset: 0;
  }
  74%, 100% {
    stroke-dashoffset: 26;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gb__more {
    transition: none !important;
  }
  .stage.is-demo .gb__stamp,
  .stage.is-demo .gb__label,
  .stage.is-demo .gb__draw polyline {
    animation: none !important;
  }
  .stage.is-demo .gb__stamp {
    opacity: 1 !important;
    transform: none !important;
  }
  .stage.is-demo .gb__label {
    opacity: 1 !important;
    transform: none !important;
  }
  .stage.is-demo .gb__draw polyline {
    stroke-dashoffset: 0 !important;
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .gb {
    width: min(272px, 92vw);
    padding: 8px;
  }
  .gb__title {
    margin: 0 0 8px;
    font-size: 11px;
  }
  .gb__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
  .gb__stamp {
    width: 28px;
    height: 28px;
    border-width: 1.5px;
  }
  .gb__ic, .gb__draw {
    width: 15px;
    height: 15px;
  }
  .gb__label {
    font-size: 9px;
    line-height: 1.2;
  }
  .gb__more p {
    padding: 0;
    font-size: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
