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

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

.navm {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: clamp(232px, 76vw, 348px);
  padding: 4px;
  border-radius: 16px;
  background: #ffffff;
  border: 3px solid #241f26;
  box-shadow: 0 6px 0 #241f26;
}

.navm__tab {
  --on: #d5aea9;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 8px;
  border-radius: 12px;
  text-decoration: none;
}

.navm__tab:nth-child(1) {
  --on: #d5aea9;
}

.navm__tab:nth-child(2) {
  --on: #82adc2;
}

.navm__tab:nth-child(3) {
  --on: #71b9ab;
}

.navm__tab {
  animation: tabFill 2s steps(1, end) infinite;
}

.navm__tab:nth-child(2) {
  animation-delay: -0.6667s;
}

.navm__tab:nth-child(3) {
  animation-delay: -1.3333s;
}

.navm__tab:focus-visible {
  outline: 3px solid #241f26;
  outline-offset: 2px;
}

.navm__badge {
  display: block;
  width: 34px;
  height: 34px;
  animation: badgePop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

.navm__tab:nth-child(2) .navm__badge {
  animation-delay: -0.6667s;
}

.navm__tab:nth-child(3) .navm__badge {
  animation-delay: -1.3333s;
}

.navm__badge--circle {
  border-radius: 50%;
  background: var(--on);
  border: 3px solid #241f26;
}

.navm__badge--half {
  width: 40px;
  height: 22px;
  margin-bottom: 12px;
  border-radius: 999px 999px 0 0;
  background: var(--on);
  border: 3px solid #241f26;
}

.navm__badge--tri {
  width: 40px;
  height: 36px;
  background: var(--on);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.navm__label {
  color: #241f26;
  font-weight: 700;
  font-size: clamp(12px, 2.8vw, 14px);
  line-height: 1;
  font-family: inherit;
}

@keyframes tabFill {
  0%, 33.32% {
    background: var(--on);
  }
  33.33%, 100% {
    background: transparent;
  }
}
@keyframes badgePop {
  0% {
    transform: translateY(0);
  }
  6%, 28% {
    transform: translateY(-7px);
  }
  33.33%, 100% {
    transform: translateY(0);
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .navm {
    width: 220px;
  }
  .navm__tab {
    padding: 8px 4px;
  }
  .navm__badge {
    width: 26px;
    height: 26px;
  }
  .navm__badge--half {
    width: 30px;
    height: 16px;
    margin-bottom: 8px;
  }
  .navm__badge--tri {
    width: 30px;
    height: 27px;
  }
  .navm__label {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .navm__tab, .navm__badge {
    animation: none !important;
  }
  .navm__tab:nth-child(2) {
    background: #82adc2;
  }
}
