/* ============================================================================
 * app.css — reusable component classes, built ON the tokens in theme.css.
 *
 * Mobile-first. No `.phone` frame (that is a mockup-only presentation artifact):
 * real pages fill the viewport and center a single column. Class names mirror
 * mockups/styles.css where practical (.btn, .input, .card, .muted) so the visual
 * mockups translate cleanly. All styling is external (INV-HT-2: no inline styles
 * ship — the strict CSP's style-src 'self' forbids them).
 * ========================================================================== */

/* ---- App shell: centered single column for auth / form surfaces ---- */
.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-6) var(--space-4);
}
.shell-body {
  width: 100%;
  max-width: var(--content-max);
  margin: auto 0;                 /* vertical-center the column within the shell */
  display: flex;
  flex-direction: column;
}

/* ---- Wordmark ---- */
.wordmark {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.5px;
  color: var(--text);
  text-align: center;
}
.wordmark .dot {
  color: var(--accent);
}
.wordmark:hover {
  text-decoration: none;
}

/* ---- Typography helpers ---- */
.h-title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.3;
}
.h-sub {
  font-family: var(--font-display);
  font-size: 16px;
}
.lede {
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-muted);
}
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.center { text-align: center; }

/* Vertical rhythm utility */
.stack > * + * {
  margin-top: var(--space-4);
}
.stack-lg > * + * {
  margin-top: var(--space-6);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;               /* comfortable tap target (mobile-first) */
  transition: opacity 0.15s ease, background 0.15s ease;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-full { width: 100%; }

/* ---- Form fields ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 16px;                /* ≥16px avoids iOS zoom-on-focus */
  color: var(--text);
  width: 100%;
  font-family: var(--font-body);
  min-height: 44px;
}
.input::placeholder { color: var(--text-faint); }
.input:focus {
  outline: none;
  border-color: var(--accent);
}
.input[aria-invalid="true"] {
  border-color: var(--danger);
}
.input-wrap {
  position: relative;
}
/* Trailing status glyph inside an input (e.g. username availability ✓ / ✕) */
.input-wrap .input { padding-right: 40px; }
.input-status {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}
.input-status.ok { color: var(--success); }
.input-status.bad { color: var(--danger); }

/* Per-field hint / error line */
.hint {
  font-size: 12px;
  color: var(--text-muted);
}
.hint.ok { color: var(--success); }
.hint.bad { color: var(--danger); }

/* ---- Card ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

/* ---- Notice / banner (info / error / success) — for form-level messages ---- */
.notice {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.notice.error {
  border-color: var(--danger);
  background: var(--danger-soft);
}
.notice.success {
  border-color: var(--success);
  background: var(--accent-soft);
}
.notice[hidden] { display: none; }

/* ---- Footer link row (recovery / help links per Screen 5 + login footer) ---- */
.footer-links {
  margin-top: var(--space-6);
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}
.footer-links a {
  color: var(--text-muted);
}

/* Small print (community-guidelines line under the create-account button, etc.) */
.fine-print {
  font-size: 11px;
  text-align: center;
  color: var(--text-muted);
}

/* ---- JIT help hint (help-hint.js — compass D-054/D-056) ---- */
.help-hint {
  width: 100%;
  max-width: var(--content-max);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.help-hint-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.help-hint-body {
  margin-top: var(--space-2);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}
.help-hint-actions {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ---- Settings layout (Settings → Account, task 02 Chunk 3) ---- */
.settings-section {
  width: 100%;
  text-align: left;
}
.settings-section > h2 {
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
/* A single Account row: label + current value/status on the left, action right. */
.setting-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
}
.setting-row:last-of-type { border-bottom: 1px solid var(--border); }
.setting-row .setting-label { font-weight: 600; font-size: 14px; color: var(--text); }
.setting-row .setting-value { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.setting-row .setting-main { min-width: 0; flex: 1 1 60%; }
.setting-row .btn { flex: 0 0 auto; }
/* The reveal-on-edit inline form under a row. */
.setting-edit { width: 100%; margin-top: var(--space-3); }
.setting-edit[hidden] { display: none; }

/* ---- Transient toast (toast.js) — self-dismissing, aria-live ---- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: var(--toast-bottom, calc(env(safe-area-inset-bottom, 0px) + var(--space-5)));
  transform: translateX(-50%);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  width: max-content;
  max-width: min(92vw, var(--content-max));
  pointer-events: none; /* clicks fall through the host... */
}
.toast {
  pointer-events: auto; /* ...but a toast itself can be interacted with */
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.is-in {
  opacity: 1;
  transform: translateY(0);
}
/* Top-anchored variant (toast.js showTop) — for surfaces whose bottom is
   occupied, e.g. the map's timeline. --toast-top is set per-surface (map.css
   clears the 44px top bar); default sits just below the safe-area inset. */
.toast-host--top {
  top: var(--toast-top, calc(env(safe-area-inset-top, 0px) + var(--space-5)));
  bottom: auto;
}
.toast-host--top .toast {
  transform: translateY(-8px);          /* enter from above rather than below */
}
.toast-host--top .toast.is-in {
  transform: translateY(0);
}

/* ---- Segmented control (Settings → Appearance theme toggle, task 03 §7) ---- */
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.segmented-option {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.segmented-option[aria-checked="true"] {
  background: var(--accent);
  color: var(--on-accent);
}
/* Locked-to-Immediate security types (task 08 §2) — the Digest/Off buttons render
   disabled; the RLS WITH CHECK on notif_prefs_update_own is the server-side backstop. */
.segmented-option[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Settings → Notifications (task 08 §2/§3) ---- */
/* Section header with an inline "?" info affordance. */
.section-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.section-head > h2 { margin-bottom: 0; }
.info-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  min-height: 24px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.info-btn[aria-expanded="true"] {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
/* On-demand explainer panel (help_topics.full_body), toggled by the "?" button. */
.info-reveal {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}
.info-reveal[hidden] { display: none; }
.info-reveal-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.info-reveal-body + .info-reveal-body { margin-top: var(--space-2); }

/* Digest schedule sub-panel — visually grouped with a subtle border (Screen 8). */
.digest-schedule {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 var(--space-4);
  margin-bottom: var(--space-4);
}
.digest-schedule[hidden] { display: none; }
.digest-schedule .setting-row:first-child { border-top: none; }
.digest-schedule .setting-row:last-of-type { border-bottom: none; }

/* Native selects (time / day / timezone) — mirror .input. */
.select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 16px;                /* ≥16px avoids iOS zoom-on-focus */
  color: var(--text);
  font-family: var(--font-body);
  min-height: 44px;
  max-width: 100%;
}
.select:focus { outline: none; border-color: var(--accent); }

/* Per-type row: at a narrow width the segmented control wraps below its label. */
.notif-type-row .segmented { flex-wrap: wrap; }
.security-lock-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--space-2);
  font-style: italic;
}

/* Visually-hidden but screen-reader-available (skip-links, field context) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Peer-currency Send modal (currency-send.js, task 07 §4 Chunk 3) ----
   A page-global amount-picker dialog opened over the memory sheet. Mirrors the
   sheet's edit-history modal look, but fixed + viewport-centered so the same
   S.CurrencySend service works from any surface. z-index rides above the sheet
   (1600) and its history modal (1660). */
.currency-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1700;
  background: rgba(0, 0, 0, 0.55);
}
.currency-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1710;
  width: min(92vw, 400px);
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}
.currency-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.currency-modal-balance {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.currency-modal-error {
  margin: 0;
}
.currency-modal-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}
.currency-modal .btn:focus-visible,
.currency-modal-input:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* ---- Trust-level badge (moved here from map.css, task 07 Chunk 4) ----
   Labels + hues per mockups/styles.css .badge.trust.tN. Shared by the memory
   sheet byline (map.css surface) and the profile header. */
.ms-trust {
  display: inline-block;
  padding: 1px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--surface-2);
  color: var(--text);
}
.ms-trust--t1 {
  background: rgba(140, 140, 140, 0.15);
  color: var(--text-muted);
}
.ms-trust--t2 {
  background: rgba(95, 168, 212, 0.15);
  color: var(--pin-photo);
}
.ms-trust--t3 {
  background: var(--accent-soft);
  color: var(--accent);
}
.ms-trust--t4 {
  background: rgba(212, 106, 90, 0.18);
  color: var(--pin-video);
}
.ms-trust--t5 {
  background: var(--accent);
  color: var(--on-accent);
}

/* ---- Profile page (profile.js, task 07 §1 Chunk 4) ----
   Header + summary metric cards + reputation section + the D-063 Network
   Contribution line. Reuses .card / .btn* / .settings-section / .muted / .faint
   and theme tokens; adds only genuinely new selectors. */
.profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.profile-avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}
.profile-identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile-username {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}
.profile-badge-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.profile-bio {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}
.profile-area {
  margin: 0;
  font-size: 13px;
}

/* Three summary metric cards; wrap on narrow screens, currency card own-only. */
.profile-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.profile-metric-card {
  flex: 1 1 120px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}
.profile-metric-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.profile-metric-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Reputation section: one prominent score, the plain-language band, the readable
   breakdown, and the "How reputation works" info button. */
.profile-rep-score {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}
.profile-rep-band {
  margin: var(--space-2) 0 0;
  font-size: 15px;
  color: var(--text);
}
.profile-rep-breakdown {
  margin: var(--space-2) 0 0;
  font-size: 13px;
  line-height: 1.5;
}
.profile-rep-info {
  margin-top: var(--space-2);
  align-self: flex-start;
}
.profile-network {
  margin: 0;
  font-size: 13px;
}

/* ---- Reputation "How it works" info modal (profile.js) ----
   On-demand explainer read from help_topics.full_body. Same geometry family as
   .currency-modal so the two dialogs read consistently, kept as its own selectors
   so they don't couple. */
.info-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1700;
  background: rgba(0, 0, 0, 0.55);
}
.info-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1710;
  width: min(92vw, 440px);
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}
.info-modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.info-modal-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.info-modal-body p {
  margin: 0;
}
.info-modal-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}
.info-modal .btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* ---- §2 Referral codes (own profile only, profile.js Chunk 5) ----
   Unused-code count + a "Share a Code" modal (the .profile-share-* bits) + the
   my_invitees list. Reuses .settings-section / .btn* / .ms-trust badge + tokens. */
.profile-referral-count {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}
.profile-share-btn {
  align-self: flex-start;
}
.profile-invitees-heading {
  margin: 0 0 var(--space-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.profile-invitee-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.profile-invitee-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
}
.profile-invitee-link:hover {
  background: var(--surface-2);
}
.profile-invitee-link:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.profile-invitee-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.profile-invitee-score {
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}

/* The "Share a Code" modal reuses the .info-modal shell; these style its readonly
   URL field, the "Link copied" status line, and the "Code N of M" position line
   shown when the member cycles through several codes (BL-087). */
.profile-share-position {
  margin: 0 0 var(--space-1);
  font-size: 12px;
}
.profile-share-url {
  width: 100%;
  padding: var(--space-2);
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.profile-share-url:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.profile-share-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 12px;
}

/* ---- §3 Contributions grid (own + others, profile.js Chunk 5) ----
   Three-column square thumbnails (each a link to /map?memory=<id>) + an "All"
   button and a type dropdown + the "X memories contributed since <month year>"
   line. Square-cover cells mirror .ms-peek-thumb (map.css). */
.profile-contrib-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.profile-contrib-select {
  padding: var(--space-2);
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.profile-contrib-select:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.profile-contrib-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}
.profile-contrib-cell {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.profile-contrib-cell:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.profile-contrib-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-contrib-glyph {
  font-size: 28px;
}
.profile-contrib-empty {
  grid-column: 1 / -1;
  margin: 0;
}
.profile-contrib-summary {
  margin: 0;
  font-size: 13px;
}

/* ============================================================================
 * Notification center (/notifications) + the shared bell (task 08 §1, Chunk C).
 * Reuses .shell / .segmented / .btn* / .muted and the theme tokens; --accent is the
 * amber the Screen-7 unread border calls for, so no new theme var is needed.
 * ========================================================================== */

/* ---- Page top bar: back / title / mark-all-read (Screen 7) ---- */
.notif-topbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
}
.notif-topbar-back {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notif-topbar-title {
  flex: 1 1 auto;
  text-align: center;
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.notif-topbar-action {
  flex: 0 0 auto;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: var(--space-2);
  min-height: 40px;
  cursor: pointer;
}
.notif-topbar-action:hover { color: var(--accent); }

/* ---- Tabs (All / Unread): centered segmented control ---- */
.notif-tabs { align-self: center; }

/* ---- List + rows ---- */
.notif-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.notif-row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  width: 100%;
  text-align: left;
  text-decoration: none;
  padding: var(--space-3);
  border: none;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;    /* reserved so unread doesn't shift layout */
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  cursor: pointer;
}
.notif-row:hover { background: var(--surface-2); }
.notif-row--unread {
  border-left-color: var(--accent);      /* amber left border on unread (Screen 7) */
  background: var(--accent-soft);
}
.notif-avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}
.notif-avatar--system {
  background: var(--surface-2);
  color: var(--text-muted);
}
.notif-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notif-desc {
  margin: 0;
  line-height: 1.4;
  color: var(--text);
  overflow-wrap: anywhere;
}
.notif-time {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}
.notif-empty { gap: var(--space-4); padding: var(--space-6) 0; }
.notif-tab-empty { padding: var(--space-5) 0; }
.notif-manage { margin-top: var(--space-2); }

/* ---- Shared bell + unread badge (notif-bell.js) ---- */
.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  color: var(--text);
  text-decoration: none;
}
.notif-bell-glyph { font-size: 20px; line-height: 1; }
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
/* On the .shell pages (profile / settings) the bell floats top-right; on /map it
   sits inline in the .top-bar flex. .shell-bell must follow .notif-bell so its
   fixed position wins. */
.top-bar-bell { flex: 0 0 auto; }
.shell-bell {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 50;
}
