.hmp-nc-bell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  border-radius: 14px;
  background: var(--surface, rgba(255, 255, 255, 0.06));
  color: inherit;
  cursor: pointer;
}

.hmp-nc-bell:focus-visible,
.hmp-nc-panel button:focus-visible {
  outline: 3px solid var(--primary, #ff8a00);
  outline-offset: 2px;
}

.hmp-nc-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid var(--bg, #111);
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.hmp-nc-host {
  position: fixed;
  z-index: 1300;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
  visibility: hidden;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 180ms ease;
}

.hmp-nc-host.is-open {
  visibility: visible;
  background: rgba(0, 0, 0, 0.48);
  pointer-events: auto;
}

.hmp-nc-panel {
  width: 100%;
  max-height: 85dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  border-radius: 24px 24px 0 0;
  background: var(--card, #181818);
  color: var(--text, #fff);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.28);
  transform: translateY(105%);
  transition: transform 220ms ease;
}

.hmp-nc-host.is-open .hmp-nc-panel {
  transform: translateY(0);
}

.hmp-nc-header,
.hmp-nc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}

.hmp-nc-header h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.hmp-nc-header small,
.hmp-nc-toolbar {
  color: var(--muted, #aaa);
  font-size: 12px;
}

.hmp-nc-close,
.hmp-nc-toolbar button,
.hmp-nc-state button,
.hmp-nc-read-toggle {
  border: 0;
  border-radius: 12px;
  padding: 9px 11px;
  background: var(--surface, rgba(255, 255, 255, 0.08));
  color: inherit;
  cursor: pointer;
}

.hmp-nc-list {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px 14px 24px;
}

.hmp-nc-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 8px 0;
  padding: 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  background: var(--surface, rgba(255, 255, 255, 0.04));
}

.hmp-nc-item.is-unread {
  border-color: color-mix(in srgb, var(--primary, #ff8a00) 65%, transparent);
  background: color-mix(in srgb, var(--primary, #ff8a00) 10%, var(--surface, #222));
}

.hmp-nc-item-main {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.hmp-nc-item-title,
.hmp-nc-item-body,
.hmp-nc-item time {
  display: block;
  overflow-wrap: anywhere;
}

.hmp-nc-item-title {
  margin-bottom: 5px;
  font-weight: 800;
}

.hmp-nc-item-body {
  color: var(--muted, #c0c0c0);
  line-height: 1.45;
}

.hmp-nc-item time {
  margin-top: 7px;
  color: var(--muted, #999);
  font-size: 11px;
}

.hmp-nc-read-toggle {
  align-self: center;
  white-space: nowrap;
  font-size: 11px;
}

.hmp-nc-state {
  margin: 18px;
  padding: 18px;
  border: 1px dashed var(--border, rgba(255, 255, 255, 0.18));
  border-radius: 16px;
  text-align: center;
}

.hmp-nc-state p {
  margin: 7px 0 0;
  color: var(--muted, #aaa);
}

.hmp-nc-state button {
  margin-top: 12px;
}

.hmp-nc-state.is-forbidden {
  border-color: rgba(229, 57, 53, 0.55);
}

@media (min-width: 768px) {
  .hmp-nc-host {
    align-items: stretch;
    justify-content: flex-end;
  }

  .hmp-nc-panel {
    width: min(100%, 420px);
    max-width: 420px;
    max-height: none;
    height: 100%;
    border-radius: 24px 0 0 24px;
    transform: translateX(105%);
  }

  .hmp-nc-host.is-open .hmp-nc-panel {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hmp-nc-host,
  .hmp-nc-panel {
    transition: none;
  }
}
