.header-actions{position:relative}
.notification-control{display:flex;align-items:center}
.notification-popover{position:absolute;right:0;top:calc(100% + 18px);width:370px;max-width:calc(100vw - 32px);background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:12px;box-shadow:0 18px 50px #0006;z-index:120;overflow:hidden;color:var(--text);animation:notification-in .16s ease-out}
.notification-popover[hidden]{display:none}
.notification-popover>header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 12px;gap:16px}
.notification-popover h2{font-size:19px;font-weight:650;letter-spacing:-.3px;margin:0}
.notification-popover>header>a{display:grid;place-items:center;width:28px;height:28px;color:var(--muted);border-radius:6px}
.notification-popover>header>a:hover{background:var(--theme-raised);color:var(--theme-accent)}
.notification-popover>header .icon{width:17px;height:17px}
.notification-feed{max-height:min(440px,calc(100dvh - 180px));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--theme-border) transparent}
.notification-entry{display:block;padding:15px 20px;border-bottom:1px solid var(--theme-border);text-decoration:none;transition:background .15s}
.notification-entry:last-child{border-bottom:0}
.notification-entry:hover{background:var(--theme-raised)}
.notification-entry h3{font-size:14px;line-height:1.4;font-weight:600;margin:0 0 7px;color:var(--text)}
.notification-entry p{font-size:12px;line-height:1.5;margin:0 0 8px;color:var(--muted);overflow-wrap:anywhere}
.notification-entry time{font-size:11px;font-weight:600;color:var(--theme-accent)}
.notification-empty{text-align:center;padding:28px 22px 36px;color:var(--muted)}
.notification-empty>.icon{width:30px;height:30px;color:var(--theme-accent);margin-bottom:13px}
.notification-empty h3{font-size:14px;color:var(--text);margin:0 0 8px}
.notification-empty p,.notification-loading{font-size:12px;line-height:1.6;color:var(--muted);margin:0}
.notification-loading{padding:24px 20px 30px}
.notification-empty button{margin-top:12px;color:var(--theme-accent)}
@keyframes notification-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:640px){.notification-popover{position:fixed;left:12px;right:12px;top:102px;width:auto;max-width:none}.notification-feed{max-height:calc(100dvh - 190px)}}
@media(prefers-reduced-motion:reduce){.notification-popover{animation:none}.notification-entry{transition:none}}

.profile-notifications-link{position:relative;overflow:visible!important}
.notification-badge{position:absolute;top:-5px;right:-6px;min-width:19px;height:19px;padding:0 4px;border:2px solid var(--theme-header);border-radius:20px;background:var(--theme-primary);color:var(--theme-on-primary,#fff);font-size:10px;font-weight:750;line-height:15px;text-align:center;box-shadow:0 0 0 2px color-mix(in srgb,var(--theme-accent) 15%,transparent)}
.notification-badge[hidden]{display:none}.profile-notifications-link.has-unread{color:var(--theme-accent)}
.notification-popover{width:410px;border-radius:16px}
.notification-popover>header{padding:20px;gap:12px;border-bottom:1px solid var(--theme-border)}
.notification-popover>header>div{flex:1}.notification-popover [data-unread-summary]{display:block;margin-top:4px;font-size:11px;color:var(--muted)}
.notification-mark-read{border:0;background:none;color:var(--theme-accent);font-size:11px;font-weight:600;padding:6px 0;cursor:pointer;white-space:nowrap}.notification-mark-read:disabled{opacity:.4;cursor:default}
.notification-entry{padding:19px 22px;position:relative}.notification-entry.is-unread{background:color-mix(in srgb,var(--theme-accent) 5%,var(--theme-surface))}
.notification-entry h3{display:flex;align-items:baseline;justify-content:space-between;gap:14px;font-size:15px;font-weight:550;line-height:1.45}
.notification-entry p{font-size:13px;line-height:1.6}.notification-entry p strong{color:var(--text);font-weight:650}.notification-entry time{font-size:12px}
.notification-unread-dot{width:7px;height:7px;flex:none;border-radius:50%;background:var(--theme-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--theme-accent) 10%,transparent)}
.notification-feedback{margin:0;padding:12px 20px;color:var(--muted);font-size:12px}
.notification-alerts{position:fixed;top:100px;right:24px;z-index:500;display:flex;flex-direction:column;gap:10px;width:min(390px,calc(100vw - 32px));pointer-events:none}
.notification-toast{position:relative;pointer-events:auto;background:var(--theme-surface);border:1px solid var(--theme-border);border-left:3px solid var(--theme-accent);border-radius:13px;box-shadow:0 10px 35px #0005;animation:notification-in .25s ease-out;color:var(--text)}
.notification-toast>a{display:flex;gap:13px;padding:20px 40px 20px 17px;text-decoration:none;color:inherit}.notification-toast-icon{color:var(--theme-accent);flex:none;margin-top:2px}.notification-toast-icon .icon{width:20px;height:20px}
.notification-toast h3{font-size:14px;line-height:1.5;margin:0 0 6px}.notification-toast p{font-size:12px;line-height:1.5;margin:0 0 8px;color:var(--muted)}.notification-toast strong{color:var(--text)}.notification-toast time{font-size:11px;color:var(--theme-accent);font-weight:600}
.notification-toast>button{position:absolute;right:10px;top:10px;border:0;background:none;color:var(--muted);padding:4px;cursor:pointer}.notification-toast>button .icon{width:15px;height:15px}
@media(max-width:640px){.notification-popover{width:auto}.notification-alerts{right:16px;top:94px}}
@media(prefers-reduced-motion:reduce){.notification-toast{animation:none}}
