.notification-bell { position:relative; width:40px; height:36px; display:inline-flex; align-items:center; justify-content:center; }
.notification-bell svg { width:18px; height:18px; }
.notification-count { position:absolute; top:-6px; right:-6px; min-width:19px; height:19px; padding:0 4px; display:grid; place-items:center; background:var(--primary); color:var(--primary-foreground); border:2px solid var(--background); border-radius:12px; font-size:10px; font-weight:800; }
.notification-count[hidden], .notification-drawer[hidden], .notification-shade[hidden], .notification-preferences[hidden] { display:none !important; }
.notification-shade { position:fixed; inset:0; z-index:1080; background:rgba(6,12,18,.55); backdrop-filter:blur(3px); }
.notification-drawer { position:fixed; inset:12px 12px 12px auto; z-index:1090; width:min(440px,calc(100vw - 24px)); display:flex; flex-direction:column; background:var(--card); border:1px solid var(--border-color); border-radius:18px; box-shadow:0 24px 90px rgba(0,0,0,.4); color:var(--foreground); overflow:hidden; }
body.notifications-open { overflow:hidden; }
.notification-header { padding:22px 20px 16px; display:flex; gap:12px; align-items:flex-start; border-bottom:1px solid var(--border-color); }
.notification-heading { margin:0; font:800 21px var(--font-display); letter-spacing:-.5px; }
.notification-subtitle { margin:5px 0 0; color:var(--text-secondary); font-size:12px; line-height:1.5; }
.notification-header-copy { flex:1; min-width:0; }
.notification-icon-button { display:grid; place-items:center; width:40px; min-width:40px; height:40px; border:1px solid var(--border-color); border-radius:10px; background:transparent; color:var(--text-secondary); cursor:pointer; }
.notification-icon-button:hover { background:var(--accent); color:var(--foreground); }
.notification-icon-button svg { width:18px; height:18px; }
.notification-toolbar { padding:12px 16px; border-bottom:1px solid var(--border-color); display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.notification-filter { border:1px solid var(--border-color); background:var(--bg-input); color:var(--foreground); padding:8px; border-radius:8px; min-width:0; font:inherit; font-size:12px; }
.notification-read-all { margin-left:auto; background:none; border:0; color:var(--primary); font-size:12px; font-weight:700; cursor:pointer; padding:8px 0; }
.notification-read-all:disabled { opacity:.4; cursor:default; }
.notification-feed { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:8px 12px 16px; }
.notification-item { display:flex; gap:12px; padding:16px 10px; border-bottom:1px solid var(--border-color); position:relative; border-radius:10px; }
.notification-item.is-unread { background:color-mix(in srgb,var(--primary) 5%,transparent); }
.notification-item-icon { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border-radius:11px; background:var(--accent); color:var(--primary); }
.notification-item-icon svg { width:18px; height:18px; }
.notification-item[data-priority="high"] .notification-item-icon { background:var(--warning-surface); color:var(--warning); }
.notification-item-copy { min-width:0; flex:1; }
.notification-item-heading { margin:0; font-size:13px; line-height:1.5; font-weight:700; overflow-wrap:anywhere; }
.notification-item-message { margin:5px 0 8px; color:var(--text-secondary); font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.notification-item-meta { display:flex; align-items:center; gap:7px; flex-wrap:wrap; font-size:10px; color:var(--text-muted); }
.notification-item-state { color:var(--primary); }
.notification-item-actions { display:flex; gap:12px; margin-top:9px; flex-wrap:wrap; }
.notification-item-actions button { border:0; background:none; color:var(--primary); padding:6px 0; cursor:pointer; font-size:11px; font-weight:700; }
.notification-item-actions .notification-read { color:var(--text-secondary); }
.notification-unread-dot { width:6px; height:6px; background:var(--primary); border-radius:50%; flex-shrink:0; margin-top:7px; }
.notification-empty { padding:50px 22px; text-align:center; color:var(--text-secondary); font-size:12px; line-height:1.7; }
.notification-empty strong { display:block; color:var(--foreground); font-size:16px; margin-bottom:8px; }
.notification-footer { padding:10px 20px; border-top:1px solid var(--border-color); font-size:10px; color:var(--text-muted); display:flex; gap:8px; align-items:center; }
.notification-connection-dot { width:6px; height:6px; border-radius:50%; background:var(--primary); }
.notification-footer.is-delayed .notification-connection-dot { background:var(--warning); }
.notification-preferences { padding:16px 20px; border-bottom:1px solid var(--border-color); max-height:45dvh; overflow:auto; }
.notification-preferences h3 { margin:0 0 12px; font-size:13px; }
.notification-setting { display:flex; align-items:center; gap:10px; justify-content:space-between; font-size:12px; padding:7px 0; color:var(--text-secondary); }
.notification-setting input[type="checkbox"] { width:17px; height:17px; accent-color:var(--primary); }
.notification-setting input[type="range"] { max-width:150px; accent-color:var(--primary); }
.notification-prefs-note { font-size:10px; line-height:1.5; color:var(--text-muted); margin:8px 0 0; }
.notification-load-more { display:block; margin:12px auto 0; padding:10px 18px; border:1px solid var(--border-color); border-radius:8px; color:var(--primary); background:transparent; cursor:pointer; }
/* All feedback toasts share a compact, readable surface and one bounded queue. */
#toast-container { gap:10px; width:min(390px,calc(100vw - 32px)); max-width:calc(100vw - 32px); }
#toast-container .toast { min-width:0; width:100%; max-width:100%; border-radius:13px; background:var(--card); box-shadow:0 12px 40px rgba(0,0,0,.25); }
.notification-toast { display:flex; align-items:flex-start; gap:12px; padding:16px; border:1px solid var(--border-color); border-left:3px solid var(--primary); position:relative; }
.notification-toast[data-priority="high"] { border-left-color:var(--warning); }
.notification-toast[data-type="danger"] { border-left-color:var(--destructive); }
.notification-toast[data-type="danger"] .notification-item-icon { color:var(--destructive); background:color-mix(in srgb,var(--destructive) 12%,transparent); }
.notification-toast[data-type="danger"] .notification-toast-eyebrow { color:var(--destructive); }
.notification-toast-copy { min-width:0; flex:1; }
.notification-toast-eyebrow { margin-bottom:4px; font-size:9px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:var(--primary); }
.notification-toast[data-priority="high"] .notification-toast-eyebrow { color:var(--warning); }
.notification-toast h3 { margin:0; font-size:13px; line-height:1.45; color:var(--foreground); }
.notification-toast p { margin:5px 0 0; color:var(--text-secondary); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.notification-toast .notification-icon-button { width:28px; height:28px; min-width:28px; border:0; margin:-6px -6px 0 0; }
.notification-toast-action { padding:7px 0 0; border:0; background:none; color:var(--primary); cursor:pointer; font-size:11px; font-weight:700; }
@media (max-width:1024px) {
  .topbar { grid-template-columns:minmax(0,1fr) auto auto auto auto auto; }
  #notification-bell { grid-column:4; grid-row:1; min-height:44px; min-width:44px; }
  #btn-sound-toggle { grid-column:5; }
  #btn-theme-toggle { grid-column:6; }
}
@media (max-width:640px) {
  .topbar { grid-template-columns:minmax(0,1fr) auto auto auto auto; }
  #btn-sound-toggle { display:none; }
  #btn-theme-toggle { grid-column:5; }
  .notification-drawer { inset:0; width:100%; border:0; border-radius:0; height:100dvh; padding-top:env(safe-area-inset-top); padding-bottom:env(safe-area-inset-bottom); }
  .notification-header { padding:18px 16px 14px; }
  .notification-icon-button, .notification-read-all, .notification-item-actions button { min-height:44px; }
  .notification-item { padding:16px 8px; }
  .notification-item-actions { gap:18px; }
  .notification-filter { font-size:16px; min-height:44px; flex:1; }
  .notification-toolbar { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:4px 8px; }
  .notification-read-all { grid-column:1 / -1; justify-self:end; }
  .notification-setting { min-height:44px; }
  .notification-toast .notification-icon-button { min-height:36px; min-width:36px; }
}
