.sos-notifications {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
}
.notification-bell {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.notification-bell:hover,
.notification-bell[aria-expanded='true'] {
  background: var(--soft);
  border-color: var(--brand-blue);
}
.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #d6364f;
  color: white;
  border: 2px solid var(--paper);
  border-radius: 20px;
  font-size: 10px;
  min-width: 20px;
  padding: 2px 4px;
  font-weight: 800;
}
.notification-panel {
  position: absolute;
  right: 0;
  top: 54px;
  width: min(380px, calc(100vw - 32px));
  z-index: 100;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 55px #0b153333;
  color: var(--ink);
  text-align: left;
}
.notification-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.notification-top strong {
  display: block;
  font-size: 1rem;
}
.notification-top small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 5px;
}
.notification-close {
  border: 0;
  background: var(--soft);
  color: var(--ink);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 22px;
  cursor: pointer;
}
.notification-content {
  max-height: 380px;
  overflow: auto;
  overscroll-behavior: contain;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 20px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.notification-item:hover,
.notification-item.is-unread {
  background: var(--soft);
}
.notification-item small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  margin-bottom: 6px;
}
.notification-item strong {
  display: block;
  font-size: 0.85rem;
}
.notification-item p {
  font-size: 0.78rem;
  line-height: 1.6;
  margin: 5px 0 0;
  color: var(--muted);
}
.notification-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  margin-top: 5px;
  flex-shrink: 0;
}
.is-unread .notification-dot {
  background: var(--brand-blue);
}
.notification-empty {
  padding: 24px 20px;
  font-size: 0.88rem;
}
.notification-empty p {
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 0;
}
.notification-empty a {
  color: var(--brand-blue);
  font-weight: 700;
}
.notification-read {
  display: block;
  margin: 12px auto;
  border: 0;
  background: none;
  color: var(--brand-blue);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 8px;
}
.notification-foot {
  text-align: center;
  font-size: 0.68rem;
  color: var(--muted);
  padding: 12px;
  margin: 0;
}
.sos-notifications [hidden] {
  display: none !important;
}
.notification-bell:focus-visible,
.notification-panel a:focus-visible,
.notification-panel button:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}
@media (max-width: 560px) {
  .notification-panel {
    position: fixed;
    top: 100px;
    right: 16px;
    max-height: calc(100dvh - 120px);
    overflow: auto;
  }
  .notification-content {
    max-height: 45dvh;
  }
}
