/* =============================================================
   STG-UI-009 notifications
   Nav bell, dropdown, and full page aligned with tokens-stg.css.
   ============================================================= */

.nav-notif-wrap,
.nav-bell-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-bell {
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--stg-r-pill, 9999px);
  background: transparent;
  color: var(--stg-ink, #161a14);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--dur-1, 120ms) var(--ease, ease), color var(--dur-1, 120ms) var(--ease, ease);
}

.nav-bell:hover,
.nav-bell-wrap.is-open .nav-bell,
.nav-bell[aria-expanded="true"] {
  background: var(--stg-paper-deep, #f3f2ee);
}

.nav-bell.has-unread {
  color: var(--stg-ink, #161a14);
}

.nav-bell svg {
  display: block;
}

.bell-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: var(--stg-r-pill, 9999px);
  background: var(--stg-ink, #161a14);
  color: var(--stg-paper, #ffffff);
  border: 2px solid var(--stg-paper, #ffffff);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(400px, calc(100vw - 24px));
  background: var(--stg-paper, #ffffff);
  border: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
  border-radius: var(--stg-r-lg, 24px);
  box-shadow: var(--stg-lift-2, 0 2px 6px rgba(22, 26, 20, 0.06), 0 20px 60px -16px rgba(22, 26, 20, 0.16));
  overflow: hidden;
  z-index: 240;
}

.notif-dropdown.hidden {
  display: none !important;
}

.notif-dropdown-header {
  padding: var(--sp-4, 16px) var(--sp-5, 24px);
  border-bottom: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4, 16px);
}

.notif-dropdown-title {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--stg-ink, #161a14);
  flex: 1;
  min-width: 0;
}

.notif-dropdown-actions,
.notif-page-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.notif-prefs-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--stg-r-pill, 9999px);
  border: none;
  background: transparent;
  color: var(--stg-ink-3, #6b6b5f);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-1, 120ms) var(--ease, ease), color var(--dur-1, 120ms) var(--ease, ease);
}

.notif-prefs-btn:hover {
  background: var(--stg-paper-deep, #f3f2ee);
  color: var(--stg-ink, #161a14);
}

.notif-prefs-btn svg {
  display: block;
}

.notif-mark-all {
  border: none;
  background: transparent;
  color: var(--stg-ink-3, #6b6b5f);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-caption, 0.75rem);
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--stg-r-sm, 8px);
  cursor: pointer;
  transition: background var(--dur-1, 120ms) var(--ease, ease), color var(--dur-1, 120ms) var(--ease, ease);
}

.notif-mark-all:hover:not(:disabled) {
  background: var(--stg-paper-deep, #f3f2ee);
  color: var(--stg-ink, #161a14);
}

.notif-mark-all:disabled {
  opacity: 0.55;
  cursor: default;
}

.notif-dropdown-list {
  display: flex;
  flex-direction: column;
  max-height: min(420px, calc(100vh - 180px));
  overflow-y: auto;
}

.notif-dropdown-status {
  padding: var(--sp-5, 24px);
  color: var(--stg-ink-3, #6b6b5f);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
}

.notif-dropdown-footer {
  padding: var(--sp-3, 12px) var(--sp-5, 24px);
  border-top: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
  background: var(--stg-paper-2, #fafaf7);
  text-align: center;
}

.notif-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--stg-ink, #161a14);
  text-decoration: none;
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
}

.notif-view-all:hover {
  text-decoration: underline;
}

.notif-view-all svg {
  flex-shrink: 0;
}

.notif-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: var(--sp-3, 12px);
  align-items: start;
  padding: var(--sp-4, 16px) var(--sp-5, 24px);
  background: var(--stg-paper, #ffffff);
  border-bottom: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: background var(--dur-1, 120ms) var(--ease, ease);
}

.notif-row:last-child {
  border-bottom: none;
}

.notif-row:hover {
  background: var(--stg-paper-2, #fafaf7);
}

.notif-row.unread {
  background: var(--stg-paper-deep, #f3f2ee);
}

.notif-row.unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--stg-accent, #d9f274);
}

.notif-icon {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.notif-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--stg-r-pill, 9999px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--stg-ink, #161a14);
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.125rem;
  line-height: 1;
}

.notif-avatar svg {
  width: 22px;
  height: 22px;
}

.notif-avatar--sky {
  background: var(--stg-pop-sky, #b9dee6);
}

.notif-avatar--cream {
  background: var(--stg-pop-cream, #f4ecd8);
}

.notif-avatar--mint {
  background: var(--stg-pop-mint, #b8e6c9);
}

.notif-avatar--lavender {
  background: var(--stg-pop-lavender, #cbb9e0);
}

.notif-avatar--neutral {
  background: var(--stg-paper-deep, #f3f2ee);
}

.notif-avatar--system {
  background: var(--stg-accent, #d9f274);
  color: var(--stg-accent-ink, #161a14);
}

.notif-avatar.is-pattern {
  background: var(--stg-ink, #161a14);
  border-radius: var(--stg-r-sm, 8px);
}

.notif-type-badge {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 20px;
  height: 20px;
  border-radius: var(--stg-r-pill, 9999px);
  border: 2px solid var(--stg-paper, #ffffff);
  display: grid;
  place-items: center;
  color: var(--stg-paper, #ffffff);
}

.notif-row.unread .notif-type-badge {
  border-color: var(--stg-paper-deep, #f3f2ee);
}

.badge-like {
  background: var(--stg-pop-peach, #f6c7b8);
  color: var(--stg-ink, #161a14);
}

.badge-comment {
  background: var(--stg-pop-sky, #b9dee6);
  color: var(--stg-ink, #161a14);
}

.badge-reply {
  background: var(--stg-pop-mint, #b8e6c9);
  color: var(--stg-ink, #161a14);
}

.badge-forum {
  background: var(--stg-pop-lavender, #cbb9e0);
  color: var(--stg-ink, #161a14);
}

.badge-system {
  background: var(--stg-accent, #d9f274);
  color: var(--stg-accent-ink, #161a14);
}

.notif-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-top: 2px;
}

.notif-text {
  color: var(--stg-ink, #161a14);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-word;
}

.notif-text strong {
  font-weight: 600;
}

.notif-text .tm-profile-deep-link,
.notif-text .notif-actor-link {
  color: var(--stg-ink, #161a14);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 2px;
}

.notif-text .tm-profile-deep-link:hover,
.notif-text .notif-actor-link:hover {
  color: var(--stg-ink, #161a14);
  text-decoration: underline;
}

.notif-text em {
  font-style: normal;
  color: var(--stg-ink-2, #38382f);
}

.notif-preview {
  color: var(--stg-ink-3, #6b6b5f);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.8125rem;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-time {
  color: var(--stg-ink-4, #a6a59b);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.notif-time time {
  font: inherit;
  color: inherit;
}

.notif-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2, 8px);
  padding-top: 4px;
  flex-shrink: 0;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--stg-r-pill, 9999px);
  background: var(--stg-accent, #d9f274);
}

.notif-row:not(.unread) .notif-dot {
  display: none;
}

.notif-dismiss {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: var(--stg-r-pill, 9999px);
  background: transparent;
  color: var(--stg-ink-4, #a6a59b);
  display: grid;
  place-items: center;
  opacity: 0;
  cursor: pointer;
  transition: opacity var(--dur-1, 120ms) var(--ease, ease), background var(--dur-1, 120ms) var(--ease, ease), color var(--dur-1, 120ms) var(--ease, ease);
}

.notif-row:hover .notif-dismiss,
.notif-dismiss:focus-visible {
  opacity: 1;
}

.notif-dismiss:hover:not(:disabled) {
  background: var(--stg-paper-deep, #f3f2ee);
  color: var(--stg-ink, #161a14);
}

.notif-dismiss:disabled {
  cursor: default;
  opacity: 0;
}

.pad-grid {
  width: 100%;
  height: 100%;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
}

.pad-cell {
  border-radius: 2px;
  background: rgba(244, 236, 216, 0.14);
}

.pad-cell.on {
  background: var(--stg-pop-cream, #f4ecd8);
}

.pad-cell.on-2 {
  background: var(--stg-pop-mint, #b8e6c9);
}

#page-notifications {
  background: var(--stg-paper-2, #fafaf7);
}

#page-notifications .notif-page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-7, 48px) var(--sp-4, 16px) var(--sp-8, 64px);
}

.notif-page-head {
  margin-bottom: var(--sp-5, 24px);
}

.notif-page-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-2, 8px);
  margin-bottom: var(--sp-2, 8px);
  color: var(--stg-ink-4, #a6a59b);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.notif-page-eyebrow a {
  color: inherit;
  text-decoration: none;
}

.notif-page-eyebrow a:hover {
  color: var(--stg-ink, #161a14);
}

.notif-page-eyebrow .sep {
  opacity: 0.5;
}

.notif-page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4, 16px);
}

.notif-page-actions .notif-prefs-btn {
  width: 40px;
  height: 40px;
}

.notif-page-title {
  margin: 0;
  color: var(--stg-ink, #161a14);
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
}

.notif-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: var(--sp-5, 24px);
  border-radius: var(--stg-r-pill, 9999px);
  background: var(--stg-paper-deep, #f3f2ee);
}

.notif-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: var(--stg-r-pill, 9999px);
  background: transparent;
  color: var(--stg-ink-3, #6b6b5f);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-1, 120ms) var(--ease, ease), color var(--dur-1, 120ms) var(--ease, ease), box-shadow var(--dur-1, 120ms) var(--ease, ease);
}

.notif-tab:hover {
  color: var(--stg-ink, #161a14);
}

.notif-tab.active {
  background: var(--stg-paper, #ffffff);
  color: var(--stg-ink, #161a14);
  box-shadow: var(--stg-lift, 0 1px 2px rgba(22, 26, 20, 0.04), 0 6px 24px -8px rgba(22, 26, 20, 0.08));
}

.notif-tab-count {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--stg-r-pill, 9999px);
  background: var(--stg-ink, #161a14);
  color: var(--stg-paper, #ffffff);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.notif-tab:not(.active) .notif-tab-count {
  background: var(--stg-ink-4, #a6a59b);
}

.notif-page-content {
  display: flex;
  flex-direction: column;
}

.notif-page-msg {
  margin: 0;
  padding: var(--sp-4, 16px) 0;
  color: var(--stg-ink-3, #6b6b5f);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.9375rem;
}

.notif-page-msg--compact {
  padding: var(--sp-2, 8px) 0 0;
  font-size: 0.8125rem;
  text-align: center;
}

.notif-page-msg.hidden {
  display: none !important;
}

.notif-page-groups {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4, 16px);
}

.notif-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2, 8px);
}

.notif-group-label {
  padding: var(--sp-3, 12px) 0 var(--sp-2, 8px);
  color: var(--stg-ink-4, #a6a59b);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.notif-group-list {
  background: var(--stg-paper, #ffffff);
  border: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
  border-radius: var(--stg-r-lg, 24px);
  overflow: hidden;
  box-shadow: var(--stg-lift, 0 1px 2px rgba(22, 26, 20, 0.04), 0 6px 24px -8px rgba(22, 26, 20, 0.08));
}

.notif-group-list .notif-row {
  grid-template-columns: 52px minmax(0, 1fr) auto;
}

.notif-group-list .notif-icon,
.notif-group-list .notif-avatar {
  width: 52px;
  height: 52px;
}

.notif-group-list .notif-avatar {
  font-size: 1.25rem;
}

.notif-group-list .notif-preview {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notif-empty {
  background: var(--stg-paper, #ffffff);
  border: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
  border-radius: var(--stg-r-lg, 24px);
  box-shadow: var(--stg-lift, 0 1px 2px rgba(22, 26, 20, 0.04), 0 6px 24px -8px rgba(22, 26, 20, 0.08));
  text-align: center;
  padding: var(--sp-8, 64px) var(--sp-5, 24px);
}

.notif-empty.hidden {
  display: none !important;
}

.notif-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--sp-4, 16px);
  border-radius: var(--stg-r-pill, 9999px);
  background: var(--stg-paper-deep, #f3f2ee);
  color: var(--stg-ink-4, #a6a59b);
  display: grid;
  place-items: center;
}

.notif-empty-title {
  margin: 0 0 var(--sp-2, 8px);
  color: var(--stg-ink, #161a14);
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.15;
}

.notif-empty-sub {
  max-width: 360px;
  margin: 0 auto;
  color: var(--stg-ink-3, #6b6b5f);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.notif-load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--sp-4, 16px);
}

.notif-load-more.hidden {
  display: none !important;
}

.notif-load-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2, 8px);
  padding: 10px 24px;
  border: 1px solid var(--stg-border-strong, rgba(22, 26, 20, 0.16));
  border-radius: var(--stg-r-pill, 9999px);
  background: var(--stg-paper, #ffffff);
  color: var(--stg-ink-3, #6b6b5f);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: default;
  box-shadow: var(--stg-lift, 0 1px 2px rgba(22, 26, 20, 0.04), 0 6px 24px -8px rgba(22, 26, 20, 0.08));
}

.notif-load-btn svg {
  flex-shrink: 0;
}

.notif-load-btn:disabled {
  opacity: 0.92;
}

.notif-settings-row {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-5, 24px);
}

.notif-settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--stg-r-sm, 8px);
  color: var(--stg-ink-3, #6b6b5f);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: background var(--dur-1, 120ms) var(--ease, ease), color var(--dur-1, 120ms) var(--ease, ease);
}

.notif-settings-link:hover {
  background: var(--stg-paper-deep, #f3f2ee);
  color: var(--stg-ink, #161a14);
}

.notif-settings-link.is-disabled {
  opacity: 0.75;
  pointer-events: none;
}

/* ── Notification preferences page (#0.32) ─────────────────────────────── */

#page-notification-preferences {
  background: var(--stg-paper, #ffffff);
}

.notif-prefs-wrap {
  max-width: 640px;
}

.notif-prefs-lead {
  margin: var(--sp-3, 12px) 0 0;
  color: var(--stg-ink-3, #6b6b5f);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.notif-prefs-content {
  margin-top: var(--sp-5, 24px);
}

.notif-prefs-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6, 32px);
}

.notif-prefs-section {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4, 16px);
}

.notif-prefs-section-title {
  margin: 0;
  font-family: var(--font-display, "Fraunces", serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--stg-ink, #161a14);
}

.notif-prefs-section-note {
  margin: calc(var(--sp-2, 8px) * -1) 0 0;
  color: var(--stg-ink-3, #6b6b5f);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.notif-prefs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3, 12px);
}

.notif-prefs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4, 16px);
  padding: var(--sp-4, 16px) var(--sp-5, 24px);
  border: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
  border-radius: var(--stg-r-lg, 24px);
  background: var(--stg-paper, #ffffff);
  box-shadow: var(--stg-lift, 0 1px 2px rgba(22, 26, 20, 0.04), 0 6px 24px -8px rgba(22, 26, 20, 0.08));
}

.notif-prefs-item-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notif-prefs-item-label {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--stg-ink, #161a14);
}

.notif-prefs-item-desc {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--stg-ink-3, #6b6b5f);
}

.notif-prefs-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
}

.notif-prefs-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.notif-prefs-switch-ui {
  width: 44px;
  height: 26px;
  border-radius: var(--stg-r-pill, 9999px);
  background: var(--stg-paper-deep, #f3f2ee);
  border: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
  position: relative;
  transition: background var(--dur-1, 120ms) var(--ease, ease), border-color var(--dur-1, 120ms) var(--ease, ease);
}

.notif-prefs-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--stg-paper, #ffffff);
  box-shadow: 0 1px 3px rgba(22, 26, 20, 0.12);
  transition: transform var(--dur-1, 120ms) var(--ease, ease);
}

.notif-prefs-switch input:checked + .notif-prefs-switch-ui {
  background: var(--stg-ink, #161a14);
  border-color: var(--stg-ink, #161a14);
}

.notif-prefs-switch input:checked + .notif-prefs-switch-ui::after {
  transform: translateX(18px);
}

.notif-prefs-switch input:focus-visible + .notif-prefs-switch-ui {
  outline: 2px solid var(--stg-focus, #161a14);
  outline-offset: 2px;
}

.notif-prefs-email-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2, 8px);
}

.notif-prefs-select {
  max-width: 320px;
}

.notif-prefs-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3, 12px);
}

.notif-prefs-status {
  margin: 0;
  font-size: 0.875rem;
  color: var(--stg-ink-2, #3d3d36);
}

.notif-prefs-status.is-error {
  color: #9b2c2c;
}

.notif-prefs-switch:focus-visible,
.notif-prefs-actions .primary-btn:focus-visible,
.notif-prefs-select:focus-visible {
  outline: 2px solid var(--stg-focus, #161a14);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .notif-prefs-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

.nav-bell:focus-visible,
.notif-prefs-btn:focus-visible,
.notif-mark-all:focus-visible,
.notif-tab:focus-visible,
.notif-row:focus-visible,
.notif-load-btn:focus-visible,
.notif-dismiss:focus-visible,
.notif-view-all:focus-visible {
  outline: 2px solid var(--stg-focus, #161a14);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .notif-page-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .notif-dropdown {
    position: fixed;
    top: auto;
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    max-height: min(560px, calc(100vh - 24px));
    border-radius: var(--stg-r-xl, 32px);
  }

  .notif-dropdown-list {
    max-height: none;
  }

  #page-notifications .notif-page-wrap {
    padding: var(--sp-6, 32px) var(--sp-3, 12px) var(--sp-7, 48px);
  }

  .notif-row,
  .notif-group-list .notif-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    padding: var(--sp-4, 16px);
  }

  .notif-icon,
  .notif-avatar,
  .notif-group-list .notif-icon,
  .notif-group-list .notif-avatar {
    width: 44px;
    height: 44px;
  }
}

.notif-contrib-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-bell,
  .notif-mark-all,
  .notif-row,
  .notif-dismiss,
  .notif-tab {
    transition: none !important;
  }
}
