html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.np {
  position: relative;
  width: min(100%, 320px);
  height: 200px;
}

.np__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  height: 100%;
  align-content: center;
}

.np__grid[hidden], .np__detail[hidden] {
  display: none;
}

.np__card {
  view-transition-name: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 16px;
  background: #fff7e6;
  cursor: pointer;
  padding: 16px 8px;
  height: 108px;
}

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

.np__badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #0a4fe8;
  color: #fff7e6;
  font: 700 15px/1 -apple-system, "Segoe UI", sans-serif;
}

.np__badge--lg {
  width: 56px;
  height: 56px;
  font-size: 22px;
}

.np__t {
  font: 600 12px/1 -apple-system, "Segoe UI", sans-serif;
  color: #17141a;
}

.np__detail {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  background: #fff7e6;
  padding: 16px;
}

.np__back {
  position: absolute;
  top: 12px;
  left: 12px;
  border: none;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.1);
  color: #17141a;
  font: 700 11px/1 -apple-system, sans-serif;
  padding: 4px 12px;
  cursor: pointer;
}

.np__title {
  margin: 0;
  font: 700 18px/1 -apple-system, "Segoe UI", sans-serif;
  color: #17141a;
}

.np__desc {
  margin: 0;
  font: 400 11px/1.4 -apple-system, sans-serif;
  color: rgba(23, 20, 26, 0.72);
  text-align: center;
}

.np__desc code {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.1);
  font: 700 11px/1.2 "Space Mono", monospace;
  color: #17141a;
}

::view-transition-group(np-shared) {
  animation-duration: 600ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 340px) {
  .np {
    height: 160px;
  }
  .np__card {
    height: 80px;
    padding: 8px 4px;
    gap: 4px;
  }
  .np__badge {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .np__detail {
    padding: 12px;
    gap: 4px;
  }
  .np__title {
    font-size: 15px;
  }
  .np__desc {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
