.notification-bell { position: relative; }
.notification-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 3px;
  border: 1px solid var(--surface);
  border-radius: 10px;
  color: var(--on-action);
  background: var(--action);
  font: 700 10px/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.notification-badge[hidden] { display: none; }
html[data-theme] .parade-publish-compact { display: none; }

.notification-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 450px);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.notification-drawer::backdrop { background: rgba(9, 25, 24, .40); }
.notification-drawer .notification-view { display: flex; flex-direction: column; height: 100%; padding: 0; }
.notification-drawer .notification-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 18px; }
.notification-view { width: min(100%, 680px); margin-inline: auto; padding: 0 var(--gutter) 16px; }
.notification-view .notification-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; }
html.telegram-fullscreen .notification-view:has(.notification-back) {
  padding-top: max(0px, calc(104px - var(--header-size) - var(--safe-top)));
}
.notification-head, .notification-toolbar { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.notification-head { flex: none; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notification-head h2 { margin: 0; font: 700 23px/1.2 var(--serif); }
.notification-toolbar { flex: none; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px solid var(--line); }
.notification-drawer .notification-toolbar { padding-inline: 16px; }
.notification-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.notification-filters button, .notification-read-all {
  min-height: 38px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--green);
  font: 650 13px/1.2 system-ui, sans-serif;
}
.notification-filters button[aria-pressed="true"] { color: var(--ink); background: var(--subtle); }
.notification-read-all:disabled { color: var(--muted); opacity: .65; }
.notification-list h3 { margin: 16px 0 7px; font: 700 17px/1.2 var(--serif); }
.notification-list ul { margin: 0; padding: 0; list-style: none; }
.notification-list > button { margin-top: 8px; }
.notification-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 6px;
  align-items: center;
  gap: 8px;
  margin: 0 0 3px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.notification-row--unread { background: var(--subtle); border-color: var(--line); }
.notification-kind { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--raised); color: var(--green); }
.notification-copy { display: grid; gap: 3px; overflow-wrap: anywhere; }
.notification-copy strong { font: 650 14px/1.35 system-ui, sans-serif; }
.notification-preview, .notification-copy time { color: var(--muted); font: 400 12px/1.35 system-ui, sans-serif; }
.notification-preview { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.notification-thumbnail { width: 40px; aspect-ratio: 1; }
.notification-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.notification-dot { grid-column: -2; width: 6px; height: 6px; border-radius: 50%; }
.notification-row--unread .notification-dot { background: var(--green); }
.notification-status { padding: 18px 6px; text-align: center; color: var(--muted); }
.notification-error { color: var(--danger); }

@media (hover: hover) {
  .notification-row:hover, .notification-filters button:hover, .notification-read-all:not(:disabled):hover { background: var(--raised); }
}
@media (max-width: 435px) {
  .app-header:has(.notification-bell) .header-actions { gap: 4px; }
  .app-header:has(.notification-bell):has([data-action="frog-photos"]) .balance-pill { display: none; }
  html[data-theme] .app-header:has(.notification-bell):has([data-action="frog-photos"]) :is(.header-action, .header-back) { width: 36px; flex-basis: 36px; }
}
@media (max-width: 360px) {
  html[data-theme] .app-header:has(.notification-bell) :is(.header-action, .header-back) { width: 36px; height: 40px; flex-basis: 36px; }
  html[data-theme] .app-header:has(.notification-bell) .header-action[data-action="frog-photos"] { display: none; }
  .parade-feed-controls:has(.parade-publish-compact) { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: start; gap: 6px; }
  html[data-theme] .parade-publish-compact { display: inline-grid; width: 40px; height: 40px; }
  .notification-toolbar { gap: 4px; }
  .notification-filters button, .notification-read-all { padding-inline: 5px; }
}
