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

.stage {
  align-items: flex-start;
  padding-top: 32px;
}

.np {
  position: relative;
  box-sizing: border-box;
  width: min(280px, 88vw);
  display: flex;
  justify-content: flex-end;
}

.np__bell {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 247, 230, 0.22);
  background: rgba(255, 247, 230, 0.06);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.np__bell-ic {
  width: 14px;
  height: 14px;
  border: 2px solid #fff7e6;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  position: relative;
  transform-origin: top center;
}

.np__bell-ic::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -4px;
  width: 20px;
  height: 2px;
  background: #fff7e6;
  border-radius: 4px;
}

.np__badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c2361a;
  color: #fff7e6;
  font-size: 9px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 0 0 2px #17141a;
}

.np__panel {
  box-sizing: border-box;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 232px;
  border-radius: 16px;
  background: #201c26;
  border: 1px solid rgba(255, 247, 230, 0.12);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  padding: 8px;
  transform-origin: top right;
  opacity: 0;
  transform: scale(0.9) translateY(-4px);
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.2, 1.4, 0.4, 1), transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.np__panel.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.np__panel-title {
  margin: 4px 8px 8px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 247, 230, 0.55);
}

.np__item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  text-align: left;
  transition: background 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.np__item:hover, .np__item:focus-visible {
  background: rgba(255, 247, 230, 0.06);
}

.np__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 4px;
  background: transparent;
}

.np__item.is-unread .np__dot {
  background: #2f6df6;
}

.np__item-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.np__item-body strong {
  font-size: 11px;
  color: #fff7e6;
}

.np__item-body span {
  font-size: 10px;
  color: rgba(255, 247, 230, 0.5);
}

.np__bell.is-demo .np__bell-ic {
  animation: np-ring 2s ease-in-out infinite;
}

.np__bell.is-demo + .np__panel {
  animation: np-pop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@keyframes np-ring {
  0%, 78%, 100% {
    transform: rotate(0deg);
  }
  82% {
    transform: rotate(14deg);
  }
  86% {
    transform: rotate(-12deg);
  }
  90% {
    transform: rotate(8deg);
  }
  94% {
    transform: rotate(0deg);
  }
}
@keyframes np-pop {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(-4px);
  }
  16%, 100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@media (max-width: 340px) {
  .np__panel {
    width: 200px;
  }
}
@media (max-height: 220px) {
  .stage {
    padding-top: 8px;
  }
  .np__panel {
    top: calc(100% + 4px);
    padding: 4px;
  }
  .np__panel-title {
    display: none;
  }
  .np__item {
    padding: 4px 4px;
    gap: 4px;
  }
  .np__item-body strong {
    font-size: 10px;
  }
  .np__item-body span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .np__bell.is-demo .np__bell-ic {
    animation: none !important;
  }
  .np__panel {
    animation: none !important;
    transition: none;
  }
}
