.topbar-actions { position: relative; }
.notification-wrap { position: relative; }
.notification-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--forest-2);
  font-size: 10px;
  font-weight: 800;
}
.notification-button:hover,
.notification-button:focus-visible,
.notification-button[aria-expanded="true"] { border-color: var(--line); background: var(--card); outline: none; }
.notification-button-icon { display: grid; place-items: center; width: 20px; height: 20px; }
.notification-button-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.notification-badge {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--peach);
  color: var(--forest);
  font: 700 8px 'DM Mono', monospace;
}
.notification-badge[hidden] { display: none; }
.notification-panel {
  position: absolute;
  z-index: 70;
  top: calc(100% + 12px);
  right: 0;
  width: min(390px, calc(100vw - 30px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  box-shadow: 0 22px 70px rgba(23, 44, 39, .18);
}
.notification-panel[aria-hidden="true"] { display: none; }
.notification-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 19px 19px 15px; border-bottom: 1px solid var(--line); }
.notification-panel-head .eyebrow { margin-bottom: 5px; }
.notification-panel-head h2 { margin: 0; font: 600 19px/1.1 Georgia, 'Times New Roman', serif; letter-spacing: -.6px; }
.notification-panel-head .text-btn { padding: 7px 0; font-size: 9px; white-space: nowrap; }
.notification-panel-actions { display: flex; align-items: center; gap: 12px; }
.notification-list { max-height: min(480px, 60vh); overflow-y: auto; }
.notification-empty { padding: 28px 19px; color: var(--muted); font: 500 17px/1.2 Georgia, 'Times New Roman', serif; }
.notification-item { display: grid; grid-template-columns: 9px 1fr; gap: 10px; width: 100%; padding: 14px 19px; border-bottom: 1px solid #efeee9; text-align: left; }
.notification-item:hover, .notification-item:focus-visible { background: #f8f6f1; outline: none; }
.notification-item.is-unread { background: #fbf5ef; }
.notification-item-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: transparent; }
.notification-item.is-unread .notification-item-dot { background: var(--peach); }
.notification-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notification-item-category { color: #91a097; font: 500 8px 'DM Mono', monospace; letter-spacing: 1px; text-transform: uppercase; }
.notification-item-time { flex: 0 0 auto; color: #9aa49d; font: 500 8px 'DM Mono', monospace; }
.notification-item strong { display: block; margin-top: 5px; color: var(--ink); font-size: 11px; }
.notification-item p { margin: 4px 0 0; color: #7f8c84; font-size: 10px; line-height: 1.45; }
.notification-item small { display: block; margin-top: 7px; color: #a0aaa1; font-size: 9px; }
.notification-panel-foot { margin: 0; padding: 12px 19px 15px; color: #99a49c; font: 500 8px/1.45 'DM Mono', monospace; }

.profile-notification-card { margin-top: 14px; }
.profile-notification-card .profile-section-head { margin-bottom: 17px; }
.profile-notification-card .profile-notification-intro { max-width: 58ch; margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.profile-notification-form { display: grid; gap: 1px; border-top: 1px solid var(--line); }
.profile-notification-option { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid #efeee9; cursor: pointer; }
.profile-notification-option input { width: 16px; height: 16px; accent-color: var(--forest-2); }
.profile-notification-option strong { display: block; font-size: 11px; }
.profile-notification-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.profile-notification-state { color: var(--forest-2); font: 500 8px 'DM Mono', monospace; text-transform: uppercase; }
.profile-notification-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.profile-notification-status { min-height: 14px; color: var(--forest-2); font-size: 9px; }

@media (max-width: 560px) {
  .notification-button-label { display: none; }
  .notification-button { padding: 5px 7px; }
  .notification-panel { position: fixed; top: 70px; right: 15px; width: calc(100vw - 30px); }
  .profile-notification-option { grid-template-columns: 20px 1fr; }
  .profile-notification-state { grid-column: 2; }
  .profile-notification-actions { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .notification-panel { scroll-behavior: auto; }
}
