.notification-shell { position: relative; flex: 0 0 auto; }
.notification-trigger { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--color-rule); border-radius: 50%; background: var(--color-surface); color: var(--color-ink); }
.notification-trigger svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notification-badge { position: absolute; top: -4px; right: -5px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid var(--color-surface); border-radius: 999px; background: var(--color-accent); color: var(--color-accent-ink); font: 600 10px/1 var(--font-body); }
body[data-view="library"] .notification-trigger { border-color: color-mix(in srgb, var(--color-nav-ink) 38%, transparent); background: color-mix(in srgb, var(--color-overlay) 42%, transparent); color: var(--color-nav-ink); }
body[data-view="library"] .notification-badge { border-color: transparent; }
.notification-panel { position: absolute; z-index: 30; top: calc(100% + 10px); right: 0; width: min(390px, calc(100vw - 24px)); max-height: min(600px, calc(100dvh - 100px)); overflow: hidden; border: 1px solid var(--color-rule); border-radius: 14px; background: var(--color-surface); color: var(--color-ink); box-shadow: 0 18px 60px var(--color-shadow); }
.notification-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--color-rule); }
.notification-heading > div > span { display: block; margin-bottom: 4px; color: var(--color-muted); font-size: 10px; }
.notification-heading h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.notification-heading > span { color: var(--color-accent); font-size: 11px; white-space: nowrap; }
.notification-feedback { padding: 28px 20px; color: var(--color-muted); font-size: 12px; line-height: 1.7; text-align: center; }
.notification-list { max-height: min(510px, calc(100dvh - 170px)); margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.notification-item { position: relative; display: block; padding: 15px 42px 15px 20px; border-bottom: 1px solid var(--color-rule); color: var(--color-ink); text-decoration: none; }
.notification-item:last-child { border-bottom: 0; }
.notification-item.is-unread { background: var(--color-accent-soft); }
.notification-item.is-unread::before { content: ''; position: absolute; top: 22px; right: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); }
.notification-item strong { display: -webkit-box; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.notification-item small { display: block; margin-top: 6px; color: var(--color-muted); font-size: 10px; line-height: 1.5; }
.notification-item span { display: block; margin-top: 8px; color: var(--color-accent); font-size: 11px; }
@media (hover: hover) and (pointer: fine) {
  .notification-trigger:hover { border-color: var(--color-accent); color: var(--color-accent); }
  body[data-view="library"] .notification-trigger:hover { border-color: var(--color-nav-ink); color: var(--color-nav-ink); }
  .notification-item:hover { background: var(--color-paper); }
  .notification-item.is-unread:hover { background: color-mix(in srgb, var(--color-accent-soft) 72%, var(--color-paper)); }
}
@media (max-width: 39.99rem) {
  .notification-trigger { width: 44px; height: 44px; }
  .notification-panel { position: fixed; top: 104px; right: 12px; left: 12px; width: auto; max-height: calc(100dvh - 116px); }
  .notification-list { max-height: calc(100dvh - 190px); }
}
@media (prefers-reduced-motion: reduce) {
  .notification-panel, .notification-panel * { transition: none !important; }
}
