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

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

.mb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 384px;
}

.mb__viewport {
  box-sizing: border-box;
  width: 100%;
  padding: 4px 8px;
  border-radius: 16px;
  background: rgba(23, 20, 26, 0.92);
  overflow: hidden;
}

.mb__nav {
  display: grid;
}

.mb__wide,
.mb__narrow {
  grid-area: 1/1;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.mb__li {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.mb__sep {
  display: inline-flex;
  flex: none;
  color: rgba(255, 247, 230, 0.45);
}

.mb__crumb {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.18);
  color: #fff7e6;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

a.mb__crumb {
  cursor: pointer;
}

a.mb__crumb:hover {
  background: rgba(255, 247, 230, 0.34);
}

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

.mb__crumb--now {
  background: #fff7e6;
  color: #17141a;
  font-weight: 700;
}

.mb__narrow {
  opacity: 0;
  pointer-events: none;
}

.mb__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: #fff7e6;
  color: #17141a;
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  cursor: pointer;
}

.mb__back svg {
  flex: none;
}

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

.mb.is-narrow .mb__wide {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-14px);
}

.mb.is-narrow .mb__narrow {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.mb__wide {
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mb__narrow {
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mb__chips {
  display: flex;
  gap: 4px;
}

.mb__chip {
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.18);
  color: #17141a;
  box-shadow: inset 0 0 0 1px rgba(255, 247, 230, 0.4);
  font-family: inherit;
  font-size: 12px;
  line-height: 24px;
  font-weight: 700;
  cursor: pointer;
}

.mb__chip[aria-pressed=true] {
  background: #fff7e6;
  color: #17141a;
  box-shadow: none;
}

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

@keyframes mb-wide {
  0%, 10% {
    transform: translateX(0);
    opacity: 1;
  }
  34%, 62% {
    transform: translateX(-14px);
    opacity: 0;
  }
  86%, 100% {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes mb-narrow {
  0%, 10% {
    transform: translateX(14px);
    opacity: 0;
  }
  34%, 62% {
    transform: translateX(0);
    opacity: 1;
  }
  86%, 100% {
    transform: translateX(14px);
    opacity: 0;
  }
}
.mb.is-demo .mb__wide {
  animation-name: mb-wide;
}

.mb.is-demo .mb__narrow {
  animation-name: mb-narrow;
}

.mb.is-demo .mb__wide,
.mb.is-demo .mb__narrow {
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes mb-chip {
  0%, 33.9% {
    background: #fff7e6;
    color: #17141a;
    box-shadow: none;
  }
  34%, 85.9% {
    background: rgba(255, 247, 230, 0.18);
    color: #17141a;
    box-shadow: inset 0 0 0 1px rgba(255, 247, 230, 0.4);
  }
  86%, 100% {
    background: #fff7e6;
    color: #17141a;
    box-shadow: none;
  }
}
@keyframes mb-chip-n {
  0%, 33.9% {
    background: rgba(255, 247, 230, 0.18);
    color: #17141a;
    box-shadow: inset 0 0 0 1px rgba(255, 247, 230, 0.4);
  }
  34%, 85.9% {
    background: #fff7e6;
    color: #17141a;
    box-shadow: none;
  }
  86%, 100% {
    background: rgba(255, 247, 230, 0.18);
    color: #17141a;
    box-shadow: inset 0 0 0 1px rgba(255, 247, 230, 0.4);
  }
}
.mb.is-demo .mb__chip {
  animation-name: mb-chip;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.mb.is-demo #chip-narrow {
  animation-name: mb-chip-n;
}

@media (max-width: 340px) {
  .mb {
    gap: 8px;
  }
  .mb__viewport {
    padding: 0 4px;
    border-radius: 12px;
  }
  .mb__wide, .mb__narrow {
    gap: 0;
  }
  .mb__li {
    gap: 0;
  }
  .mb__crumb {
    padding: 0 4px;
    font-size: 11px;
    line-height: 16px;
  }
  .mb__sep svg {
    width: 10px;
    height: 10px;
  }
  .mb__back {
    padding: 0 8px;
    font-size: 11px;
    line-height: 20px;
  }
  .mb__back svg {
    width: 12px;
    height: 12px;
  }
  .mb__chip {
    padding: 0 8px;
    font-size: 11px;
    line-height: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mb.is-demo .mb__wide,
  .mb.is-demo .mb__narrow,
  .mb.is-demo .mb__chip {
    animation: none !important;
  }
  .mb__wide, .mb__narrow {
    transition: none;
  }
}
