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

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

.navcrayon {
  display: flex;
  align-items: center;
  gap: 16px;
  width: clamp(260px, 88vw, 380px);
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 3px solid #33261c;
}

.navcrayon__brand {
  flex-shrink: 0;
  color: #33261c;
  font-weight: 700;
  font-size: clamp(12px, 3vw, 14px);
  padding-left: 8px;
}

.navcrayon__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.navcrayon__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
}

.navcrayon__label {
  position: relative;
  z-index: 1;
  color: rgba(51, 38, 28, 0.72);
  font-weight: 600;
  font-size: clamp(10px, 2.6vw, 12px);
  white-space: nowrap;
}

.navcrayon__item--active .navcrayon__label {
  color: #33261c;
}

.navcrayon__loop {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 32px;
  transform: translate(-50%, -50%);
  overflow: visible;
  pointer-events: none;
  filter: url(#rough2);
}

.navcrayon__loop-path {
  fill: none;
  stroke: #dbb6b7;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 110;
  animation: loopDraw 2s ease-out infinite;
}

.navcrayon__cta {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: #d1c5a2;
  color: #33261c;
  padding: 8px 16px;
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 12px);
  white-space: nowrap;
}

.navcrayon__cta:focus-visible {
  outline: 3px solid #33261c;
  outline-offset: 2px;
}

@keyframes loopDraw {
  0% {
    stroke-dashoffset: 110;
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  55% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  85% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -110;
    opacity: 0;
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .navcrayon {
    gap: 8px;
    padding: 4px 8px;
  }
  .navcrayon__brand {
    display: none;
  }
  .navcrayon__list {
    gap: 4px;
  }
  .navcrayon__cta {
    padding: 4px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .navcrayon__loop-path {
    animation: none !important;
    stroke-dashoffset: 0;
    opacity: 1;
  }
}
