/* rrmyers social app — Matrix green (matched to rrmyers-static) */

:root {
  --bg: #101010;
  --panel: #0d0d0d;
  --panel-border: #1b5e20;
  --text: #78787f;
  --headings: #ffffff;
  --logo: #ffffff;
  --link: #66bb6a;
  --link-hover: #32cd32;
  --accent: #2e7d32;
  --lime: #39ff14;
  --menu-bg: #1b5e20;
  --menu-bg-scroll: rgba(27, 94, 32, 0.95);
  --footer-bg: #0d1f0e;
  --footer-text: #a0a0a0;
  --footer-link: #0bb4aa;
  --footer-link-hover: #076c65;
  --danger: #e57373;
  --danger-bg: rgba(229, 115, 115, 0.12);
  --ok: #66bb6a;
  --ok-bg: rgba(102, 187, 106, 0.12);
  --input-bg: #141414;
  --input-border: #2a2a2a;
  --max-width: 560px;
  --header-height: 64px;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-heading: "Onest", "Inter", system-ui, sans-serif;
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--link-hover);
}

::selection {
  background: var(--lime);
  color: #000;
}

/* ----- Config banner ----- */
.config-banner {
  background: #3e2723;
  color: #ffccbc;
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  text-align: center;
  border-bottom: 1px solid #5d4037;
}

.config-banner code {
  font-size: 0.8em;
  color: #fff;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--menu-bg);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--logo);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.site-logo:hover,
.site-logo:focus {
  color: var(--logo);
}

.site-logo span {
  color: var(--lime);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85em;
  margin-left: 0.35rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: #fff;
  width: 42px;
  height: 42px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
}

.site-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  color: #fff;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-slot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-slot a:not(.btn) {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  color: #fff;
}

/* Beat .site-nav a { color:#fff } so Sign up stays black on the lime pill */
.site-nav a.btn--primary,
.auth-slot a.btn--primary,
a.btn.btn--primary {
  color: #0a0a0a !important;
  text-decoration: none !important;
}

.site-nav a.btn--primary:hover,
.site-nav a.btn--primary:focus,
.auth-slot a.btn--primary:hover,
.auth-slot a.btn--primary:focus,
a.btn.btn--primary:hover,
a.btn.btn--primary:focus {
  color: #0a0a0a !important;
  text-decoration: none !important;
}

/* Log in outline stays white */
.site-nav a.btn--outline,
.auth-slot a.btn--outline,
a.btn.btn--outline {
  color: #ffffff !important;
  text-decoration: none !important;
}

.site-nav a.btn--outline:hover,
.site-nav a.btn--outline:focus,
.auth-slot a.btn--outline:hover,
.auth-slot a.btn--outline:focus,
a.btn.btn--outline:hover,
a.btn.btn--outline:focus {
  color: #39ff14 !important;
  text-decoration: none !important;
}

/* ----- Main ----- */
.app-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.app-main--wide {
  max-width: 720px;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--headings);
  line-height: 1.3;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.lede {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

.muted,
.is-muted {
  color: var(--text);
  opacity: 0.85;
}

/* ----- Panels ----- */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: 0 0 24px rgba(46, 125, 50, 0.12);
}

.panel + .panel {
  margin-top: 1.25rem;
}

.panel-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--lime);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-heading);
}

/* ----- Forms ----- */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--headings);
  margin-bottom: 0.35rem;
}

.field .hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text);
  margin-top: 0.3rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--headings);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(50, 205, 50, 0.2);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.25rem;
}

.form-footer {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  text-align: center;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.field-label-row label {
  margin-bottom: 0;
}

.field-aside {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
  text-decoration: none;
}

.btn-link:hover,
.btn-link:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ----- Buttons (pill style matched to www.rrmyers.com nav) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: #39ff14;
  color: #0a0a0a !important;
  border-color: #39ff14;
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.55);
}

.btn--primary:hover,
.btn--primary:focus {
  background: #7cff6b;
  border-color: #7cff6b;
  color: #0a0a0a !important;
  box-shadow: 0 0 22px rgba(57, 255, 20, 0.75);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover,
.btn--ghost:focus {
  border-color: #39ff14;
  color: #39ff14;
}

.btn--outline {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--outline:hover,
.btn--outline:focus {
  border-color: #39ff14;
  color: #39ff14;
  background: rgba(57, 255, 20, 0.08);
}

.btn--sm {
  padding: 0.45rem 1.05rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

/* Auth nav slot: keep pills tight in the header */
.auth-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.auth-slot a:not(.btn) {
  color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

/* ----- Alerts ----- */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert[hidden] {
  display: none !important;
}

.alert--error {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: #ffcdd2;
}

.alert--success {
  background: var(--ok-bg);
  border-color: var(--ok);
  color: #c8e6c9;
}

.alert--info {
  background: rgba(27, 94, 32, 0.35);
  border-color: var(--accent);
  color: #dcedc8;
}

/* ----- Home ----- */
.hero-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.hero-card .mark {
  display: inline-block;
  background: var(--menu-bg);
  color: var(--lime);
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 700;
  border: 1px solid var(--lime);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.feed-placeholder {
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--text);
  background: rgba(13, 13, 13, 0.6);
}

.feed-placeholder strong {
  color: var(--lime);
  font-family: var(--font-heading);
}

/* ----- Profile ----- */
.profile-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.avatar {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--lime);
  background: #1a1a1a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(50, 205, 50, 0.25);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--lime);
}

.profile-meta h1 {
  margin-bottom: 0.15rem;
}

.profile-username {
  color: var(--link);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.profile-bio {
  margin: 0;
  white-space: pre-wrap;
}

.owner-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.owner-actions[hidden],
.admin-member-actions[hidden] {
  display: none !important;
}

.status-line {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 1.75rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--footer-link);
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--footer-link-hover);
}

.footer-copy {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}

/* ----- Mobile ----- */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--menu-bg-scroll);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .site-nav.is-open {
    max-height: 480px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  }

  .site-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
  }

  .site-nav a,
  .auth-slot {
    display: block;
    padding: 0.65rem 1.25rem;
  }

  .auth-slot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .app-main {
    padding: 1.5rem 1rem 2.5rem;
  }

}

/* ----- Phase A: toast ----- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--menu-bg);
  color: var(--lime);
  border: 1px solid var(--lime);
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.35);
  z-index: 2000;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ----- Phase A: nav user chip ----- */
.nav-user-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  color: #fff !important;
  text-decoration: none !important;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  max-width: 160px;
}

.nav-user-chip:hover,
.nav-user-chip:focus {
  color: var(--lime) !important;
  text-decoration: none !important;
}

.nav-user-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar--nav {
  width: 28px;
  height: 28px;
  border-width: 1.5px;
  box-shadow: none;
}

.avatar-fallback--nav {
  font-size: 0.75rem;
}

/* ----- Phase A: profile polish ----- */
.panel--profile {
  background: linear-gradient(160deg, rgba(27, 94, 32, 0.18) 0%, var(--panel) 45%);
}

.avatar--lg {
  width: 104px;
  height: 104px;
}

.profile-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.profile-share-open {
  font-size: 0.9rem;
}

.avatar-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.avatar-upload-status {
  margin-top: 0 !important;
  color: var(--lime);
}

/* ----- Phase A: online now ----- */
.online-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  margin-left: 0.45rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(57, 255, 20, 0.15);
  border: 1px solid var(--lime);
  color: var(--lime);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: 0;
  text-transform: none;
}

.online-empty {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.online-empty[hidden] {
  display: none !important;
}

.online-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.online-item {
  margin: 0;
}

.online-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.online-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: var(--headings);
  text-decoration: none !important;
  transition: background 0.15s ease;
}

.online-follow-btn {
  flex-shrink: 0;
  min-width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(57, 255, 20, 0.55);
  background: transparent;
  color: var(--lime);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.online-follow-btn:hover,
.online-follow-btn:focus {
  background: rgba(57, 255, 20, 0.12);
  outline: none;
}

.online-follow-btn.is-following {
  min-width: auto;
  padding: 0 0.7rem;
  border-color: rgba(102, 187, 106, 0.65);
  color: #9ae69a;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.online-follow-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.online-link:hover,
.online-link:focus {
  background: rgba(57, 255, 20, 0.08);
  color: var(--lime);
}

.avatar--sm {
  width: 40px;
  height: 40px;
  border-width: 1.5px;
  box-shadow: 0 0 10px rgba(50, 205, 50, 0.2);
}

.avatar-fallback--sm {
  font-size: 1rem;
}

.online-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.online-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-handle {
  font-size: 0.8rem;
  color: var(--link);
}

.online-dot {
  width: 8px;
  height: 8px;
  margin-right: 0.65rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  flex-shrink: 0;
}


/* ----- Phase B: feed + posts + likes ----- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.home-member-hero {
  margin-bottom: 1.25rem;
}

.home-hero-identity {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  margin: 0.35rem 0 0.15rem;
}

.home-hero-identity h1 {
  margin: 0;
}


.avatar--hero {
  width: 84px;
  height: 84px;
  border-width: 2px;
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.28);
  flex-shrink: 0;
}

a.avatar--hero {
  text-decoration: none !important;
}

a.avatar--hero:hover,
a.avatar--hero:focus {
  box-shadow: 0 0 22px rgba(57, 255, 20, 0.5);
}

.avatar-fallback--hero {
  font-size: 1.85rem;
}

.compose-panel {
  margin-top: 0 !important;
  margin-bottom: 1.25rem;
  background: linear-gradient(145deg, rgba(27, 94, 32, 0.16), var(--panel) 55%);
}

.compose-panel textarea {
  min-height: 125px;
}

.compose-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.4rem;
}

.compose-meta .hint {
  margin: 0;
}

.compose-count {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--link);
}

.compose-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.compose-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 0.35rem;
}

.visibility-toggle {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(46, 125, 50, 0.85);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(13, 13, 13, 0.55);
}

.visibility-option {
  position: relative;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.visibility-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.visibility-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.25rem 0.9rem;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted, #9aa39a);
  transition: background 0.15s ease, color 0.15s ease;
}

.visibility-option input:checked + span {
  background: rgba(57, 255, 20, 0.16);
  color: var(--lime);
}

.visibility-option:hover span {
  color: var(--headings);
}

.visibility-option input:focus-visible + span {
  outline: 2px solid var(--lime);
  outline-offset: -2px;
}

.post-visibility-badge {
  display: inline-flex;
  align-items: center;
  margin: 0.55rem 0 0.15rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.55);
  color: var(--lime);
}

.join-feed-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.join-feed-prompt[hidden] {
  display: none !important;
}

.join-feed-prompt p {
  margin: 0;
  max-width: 36rem;
}

.join-feed-prompt strong {
  color: var(--headings);
}

.feed-shell {
  margin-top: 1.75rem;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.feed-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.feed-heading .panel-title {
  margin: 0;
}

.feed-status {
  margin: 0;
  padding: 1.25rem;
  text-align: center;
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius);
  background: rgba(13, 13, 13, 0.55);
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.post-card {
  padding: 1.1rem 1.15rem 0.85rem;
  background: linear-gradient(150deg, rgba(27, 94, 32, 0.11), var(--panel) 42%);
  border: 1px solid rgba(46, 125, 50, 0.75);
  border-radius: var(--radius);
  box-shadow: 0 0 18px rgba(46, 125, 50, 0.08);
  min-width: 0;
  overflow-x: clip;
}

.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: var(--headings);
  text-decoration: none !important;
}

a.post-author:hover,
a.post-author:focus {
  color: var(--lime);
}

.avatar--post {
  width: 46px;
  height: 46px;
  border-width: 1.5px;
  box-shadow: 0 0 12px rgba(50, 205, 50, 0.18);
}

.avatar-fallback--post {
  font-size: 1.1rem;
}

.post-author-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.post-author-name {
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
}

.post-author-handle {
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--link);
  font-size: 0.8rem;
}

.post-time {
  flex-shrink: 0;
  padding-top: 0.15rem;
  color: var(--text);
  font-size: 0.78rem;
  white-space: nowrap;
}

.post-body {
  margin: 0.95rem 0 0.8rem;
  color: #dedee2;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.55rem;
  min-height: 2rem;
  min-width: 0;
  border-top: 1px solid rgba(46, 125, 50, 0.28);
  padding-top: 0.65rem;
}

.like-button {
  min-width: 4.2rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid rgba(102, 187, 106, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--link);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease,
    box-shadow 0.15s ease;
}

.like-button:hover:not(:disabled),
.like-button:focus-visible:not(:disabled) {
  color: var(--lime);
  border-color: var(--lime);
  background: rgba(57, 255, 20, 0.08);
}

.like-button.is-liked {
  color: var(--lime);
  border-color: var(--lime);
  background: rgba(57, 255, 20, 0.1);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.12);
}

.like-button:disabled {
  cursor: default;
  opacity: 0.7;
}

/* Own-post delete: ghost/danger text, secondary to Like */
.delete-post-button {
  margin-left: auto;
  padding: 0.28rem 0.55rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(229, 115, 115, 0.78);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.delete-post-button:hover:not(:disabled),
.delete-post-button:focus-visible:not(:disabled) {
  color: var(--danger);
  background: var(--danger-bg);
  outline: none;
}


.delete-post-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

/* Own-post edit: sits left of Delete */
.edit-post-button {
  margin-left: auto;
  padding: 0.28rem 0.55rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(102, 187, 106, 0.85);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.edit-post-button:hover:not(:disabled),
.edit-post-button:focus-visible:not(:disabled) {
  color: var(--lime);
  background: rgba(57, 255, 20, 0.08);
  outline: none;
}

.edit-post-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

/* When Edit is present, Delete should not also pull margin-left */
.post-actions .edit-post-button + .delete-post-button {
  margin-left: 0;
}

/* Compose media picker */
.compose-media-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.15rem;
}

.compose-media-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  margin: 0;
}

.compose-media-preview {
  margin-top: 0.55rem;
  padding: 0.45rem;
  border: 1px dashed rgba(46, 125, 50, 0.65);
  border-radius: var(--radius);
  background: rgba(13, 13, 13, 0.45);
}

.compose-media-preview[hidden] {
  display: none !important;
}

.compose-preview-media {
  max-height: 220px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 8px;
}

/* Post media display */
.post-media-wrap {
  margin: 0.65rem 0 0.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(46, 125, 50, 0.45);
  background: #0a0a0a;
}

.post-media {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #0a0a0a;
}

.post-media--video {
  max-height: 420px;
}

/* Inline edit form */
.post-edit-form {
  margin: 0.75rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.post-edit-body {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--headings);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
}

.post-edit-body:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.35);
}

.post-edit-toolbar {
  margin-top: 0;
}


@media (max-width: 640px) {
  .post-card {
    padding: 1rem 0.95rem 0.8rem;
  }

  .post-header {
    gap: 0.6rem;
  }

  .avatar--post {
    width: 40px;
    height: 40px;
  }

  .post-author-name,
  .post-author-handle {
    max-width: 12rem;
  }

  .post-actions {
    gap: 0.4rem;
  }

  .like-button,
  .comment-toggle {
    min-width: 0;
    padding: 0.28rem 0.55rem;
    font-size: 0.78rem;
  }

  .bookmark-button,
  .report-button {
    padding: 0.28rem 0.5rem;
    font-size: 0.72rem;
  }

  .edit-post-button,
  .delete-post-button {
    margin-left: 0;
    padding: 0.28rem 0.4rem;
  }

  /* Keep Edit+Delete together on the right of a wrapped row */
  .post-actions .edit-post-button {
    margin-left: auto;
  }

  .post-actions .edit-post-button + .delete-post-button {
    margin-left: 0;
  }
}

/* ----- Phase C: follows + comments ----- */

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin: 0.65rem 0 0.15rem;
  color: var(--text);
  font-size: 0.9rem;
}

.profile-stat strong {
  color: var(--headings);
  font-family: var(--font-heading);
  font-weight: 600;
  margin-right: 0.25rem;
}

.profile-follow-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.profile-follow-row[hidden] {
  display: none !important;
}

.profile-follow-row .btn.is-following,
[data-follow-toggle].is-following {
  border-color: rgba(102, 187, 106, 0.55);
  color: var(--lime);
}

.comment-toggle {
  min-width: 4.2rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid rgba(102, 187, 106, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--link);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease,
    box-shadow 0.15s ease;
}

.comment-toggle:hover,
.comment-toggle:focus-visible {
  color: var(--lime);
  border-color: var(--lime);
  background: rgba(57, 255, 20, 0.08);
  outline: none;
}

.comment-toggle.is-expanded {
  color: var(--lime);
  border-color: var(--lime);
  background: rgba(57, 255, 20, 0.1);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.12);
}

.comments-thread {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(46, 125, 50, 0.22);
}

.comments-status,
.comments-guest {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}

.comments-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.comment-item {
  position: relative;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(46, 125, 50, 0.35);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.55);
}

.comment-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.comment-author {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  color: var(--headings);
  text-decoration: none !important;
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 600;
}

a.comment-author:hover,
a.comment-author:focus {
  color: var(--lime);
}

.comment-author-handle {
  color: var(--link);
  font-size: 0.76rem;
  font-weight: 500;
}

.comment-time {
  flex-shrink: 0;
  color: var(--text);
  font-size: 0.72rem;
  white-space: nowrap;
}

.comment-body {
  margin: 0;
  color: #dedee2;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.delete-comment-button {
  margin-top: 0.45rem;
  padding: 0.15rem 0.4rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(229, 115, 115, 0.78);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.delete-comment-button:hover:not(:disabled),
.delete-comment-button:focus-visible:not(:disabled) {
  color: var(--danger);
  background: var(--danger-bg);
  outline: none;
}

.delete-comment-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.comment-compose {
  margin-top: 0.85rem;
}

.comment-compose textarea {
  min-height: 4.25rem;
  resize: vertical;
}

.comment-compose-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.comment-compose-actions {
  margin-top: 0.55rem;
}

@media (max-width: 640px) {
  .profile-stats {
    gap: 0.55rem 1rem;
  }

  .comment-item-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}

/* ----- Admin → Users v1 ----- */
.admin-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-hero h1 {
  margin-bottom: 0.35rem;
}

.admin-panel {
  padding-top: 1.25rem;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.admin-toolbar .panel-title {
  margin: 0;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 220px;
  max-width: 420px;
}

.admin-search input[type="search"] {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.admin-status {
  margin: 0 0 0.75rem;
}

.admin-empty {
  margin: 0.5rem 0 0;
}

.admin-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-user-item {
  margin: 0;
}

.admin-user-link {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: 8px;
  color: var(--headings);
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-user-link:hover,
.admin-user-link:focus {
  background: rgba(57, 255, 20, 0.08);
  border-color: rgba(57, 255, 20, 0.25);
  color: var(--lime);
}

.admin-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 0.15rem;
}

.admin-user-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}

.admin-user-handle {
  font-size: 0.85rem;
  color: var(--link);
}

.admin-user-dates {
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid var(--lime);
  color: var(--lime);
}

.admin-badge[hidden] {
  display: none !important;
}

.admin-online-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--lime);
  text-transform: none;
  letter-spacing: 0;
}

.admin-mod-note {
  margin: 1.1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(57, 255, 20, 0.15);
}

@media (max-width: 640px) {
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-search {
    max-width: none;
  }
}

.admin-user-link--static {
  cursor: default;
  opacity: 0.92;
}

.admin-user-link--static:hover,
.admin-user-link--static:focus {
  background: transparent;
  border-color: transparent;
  color: var(--headings);
}


/* ----- Admin create account ----- */
.admin-create-lede {
  margin: 0.35rem 0 1rem;
}

.admin-create-form .form-row {
  margin-bottom: 0.85rem;
}

.admin-create-form .form-row label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-create-form .req {
  color: var(--lime);
}

.admin-create-form input {
  width: 100%;
  max-width: 420px;
}

.admin-create-form .hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}

.admin-create-form .form-actions {
  margin-top: 0.5rem;
}

.admin-panel code {
  font-size: 0.85em;
}

/* ----- Phase D: direct messages ----- */
.dm-panel {
  padding-top: 1.25rem;
}

.dm-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.dm-heading .panel-title {
  margin: 0;
}

.dm-lede {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.dm-inbox-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dm-inbox-item {
  margin: 0;
}

.dm-inbox-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: 8px;
  color: var(--headings);
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dm-inbox-link:hover,
.dm-inbox-link:focus {
  background: rgba(57, 255, 20, 0.08);
  border-color: rgba(57, 255, 20, 0.25);
  color: var(--lime);
}

.dm-inbox-avatar {
  flex-shrink: 0;
}

.avatar--dm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 94, 32, 0.45);
  border: 1px solid rgba(57, 255, 20, 0.35);
}

.avatar--dm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar--dm .avatar-fallback {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--lime);
}

.dm-inbox-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 0.15rem;
}

.dm-inbox-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.dm-inbox-handle {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--link);
}

.dm-inbox-snippet {
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-inbox-time {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--text);
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 0.15rem;
}

.dm-thread-panel {
  display: flex;
  flex-direction: column;
  min-height: min(70vh, 640px);
}

.dm-thread-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(46, 125, 50, 0.28);
}

.dm-back {
  flex-shrink: 0;
}

.dm-thread-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.dm-thread-titles {
  min-width: 0;
}

.dm-thread-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--headings);
  line-height: 1.25;
}

.dm-thread-handle {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  color: var(--link);
}

.dm-thread-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

.dm-message-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  overflow-y: auto;
  max-height: min(48vh, 420px);
  scroll-behavior: smooth;
}

.dm-bubble {
  max-width: min(85%, 420px);
  padding: 0.55rem 0.75rem 0.4rem;
  border-radius: 12px;
  border: 1px solid rgba(46, 125, 50, 0.35);
  background: rgba(13, 13, 13, 0.7);
}

.dm-bubble--mine {
  align-self: flex-end;
  background: rgba(27, 94, 32, 0.35);
  border-color: rgba(57, 255, 20, 0.35);
}

.dm-bubble--theirs {
  align-self: flex-start;
}

.dm-bubble-body {
  margin: 0;
  color: #dedee2;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dm-bubble-time {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: var(--text);
  text-align: right;
}

.dm-compose {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(46, 125, 50, 0.28);
}

.dm-compose textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.profile-dm-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.profile-dm-row[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .dm-thread-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dm-thread-actions {
    margin-left: 0;
  }

  .dm-inbox-link {
    align-items: flex-start;
  }
}


/* ----- People panel: online / offline status ----- */
.people-subtitle {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.85rem;
}

.presence-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-right: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.presence-status-label {
  line-height: 1;
}

.presence-status--online {
  color: var(--lime);
}

.presence-status--offline {
  color: #7a857a;
}

.offline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b736b;
  box-shadow: none;
  flex-shrink: 0;
}

.online-item.is-offline .online-name {
  color: #b7c0b7;
}

.online-item.is-offline .online-handle {
  opacity: 0.75;
}

/* Keep status column aligned when follow button is absent (self / guest) */
.online-row .presence-status {
  min-width: 4.5rem;
  justify-content: flex-end;
}

/* ----- Follow activity cards ----- */
.post-card--activity {
  background: linear-gradient(150deg, rgba(27, 94, 32, 0.06), var(--panel) 48%);
  border-style: dashed;
  border-color: rgba(46, 125, 50, 0.45);
  box-shadow: none;
}

.post-body--activity {
  font-size: 0.98rem;
  color: var(--text);
}

.activity-target-link {
  color: var(--lime);
  font-weight: 600;
  text-decoration: none !important;
}

.activity-target-link:hover,
.activity-target-link:focus {
  text-decoration: underline !important;
}

.post-actions--activity {
  justify-content: flex-end;
}

.hide-activity-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #c5cfc5;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.hide-activity-button:hover,
.hide-activity-button:focus {
  border-color: rgba(255, 82, 82, 0.55);
  color: #ff8a80;
  outline: none;
}


/* ----- Admin edit any member ----- */
.admin-user-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
}

.admin-user-row .admin-user-link {
  flex: 1;
  min-width: 0;
}

.admin-user-actions {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.5rem 0.55rem 0;
  flex-shrink: 0;
}

.admin-user-item.is-editing {
  border: 1px solid rgba(57, 255, 20, 0.35);
  border-radius: 8px;
  background: rgba(57, 255, 20, 0.04);
}

.admin-edit-panel {
  margin: 0 0 1rem;
  padding: 1rem 1rem 0.85rem;
  border: 1px solid rgba(57, 255, 20, 0.28);
  border-radius: 10px;
  background: rgba(57, 255, 20, 0.05);
}

.admin-edit-heading {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.admin-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-member-actions {
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .admin-user-row {
    flex-direction: column;
  }

  .admin-user-actions {
    padding: 0 0.75rem 0.7rem;
    width: 100%;
  }

  .admin-user-actions .btn {
    width: 100%;
  }
}

/* ----- Phase E ----- */
.site-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(57, 255, 20, 0.35);
  border-radius: 10px;
  background: rgba(57, 255, 20, 0.08);
  color: #d8ffd0;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.search-panel .search-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.search-panel input[type="search"] {
  flex: 1;
  min-width: 12rem;
}

.search-section-title {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.95rem;
}

.search-people-list,
.search-posts-list,
.saved-list,
.admin-reports-list,
.admin-audit-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-people-list li,
.search-posts-list li,
.saved-list li,
.admin-report-item,
.admin-audit-item {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mention-link {
  color: #39ff14;
  text-decoration: none;
  font-weight: 600;
}

.mention-link:hover,
.mention-link:focus {
  text-decoration: underline;
}

.bookmark-button,
.report-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #c5cfc5;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.bookmark-button.is-saved {
  border-color: rgba(57, 255, 20, 0.45);
  color: #39ff14;
}

.report-button:hover,
.bookmark-button:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.admin-badge--banned {
  background: rgba(229, 115, 115, 0.2);
  color: #ff8a80;
  border: 1px solid rgba(229, 115, 115, 0.45);
}

.admin-user-actions {
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 16rem;
  justify-content: flex-end;
}

.admin-danger-btn {
  color: #ff8a80 !important;
}

.admin-report-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
}

.admin-report-actions {
  display: flex;
  gap: 0.35rem;
}

.profile-website a {
  color: #39ff14;
}

.profile-restrict-row,
.profile-admin-mod-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.profile-restrict-row[hidden],
.profile-admin-mod-row[hidden] {
  display: none !important;
}

.danger-zone {
  border-color: rgba(229, 115, 115, 0.35) !important;
}

.notif-wrap {
  position: relative;
}

.notif-bell {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
  padding: 0.25rem 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 500;
}

.notif-bell-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.notif-bell-label {
  font-size: 15px;
  line-height: 1;
  color: #fff;
}

/* Badge sits on the icon, not the whole labeled button */
.notif-bell .notif-badge {
  right: auto;
  left: 1.05rem;
}

.notif-badge {
  position: absolute;
  top: -0.15rem;
  right: -0.25rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #e57373;
  color: #111;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notif-page-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.4rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #e57373;
  color: #111;
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: middle;
  line-height: 1;
}

.notif-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(0, 0, 0, 0.45);
}

.notif-backdrop[hidden],
.notif-panel[hidden] {
  display: none !important;
}

/* Body-mounted portal — fixed so .site-nav overflow cannot clip it */
.notif-panel {
  position: fixed;
  right: 1rem;
  top: calc(var(--header-height) + 0.5rem);
  width: min(22rem, 92vw);
  max-height: min(70vh, 24rem);
  overflow: auto;
  z-index: 1100;
  background: #0d140d;
  border: 1px solid rgba(57, 255, 20, 0.28);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  padding: 0.65rem 0.75rem;
}

@media (max-width: 640px) {
  .notif-panel {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    top: calc(var(--header-height) + 0.5rem);
    max-height: min(70vh, 24rem);
  }
}

@media (min-width: 641px) {
  .notif-backdrop {
    display: none !important;
  }
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
}

.notif-item {
  display: block;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-item.is-unread {
  background: rgba(57, 255, 20, 0.05);
}

.notif-item-link {
  display: block;
  padding: 0.55rem 0.25rem;
  color: #dedee2;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
}

/* Legacy: panel is body-mounted; keep in case links ever nest under nav */
.site-nav .notif-item-link {
  display: block;
  padding: 0.55rem 0.25rem;
  color: #dedee2;
  font-size: 0.86rem;
  font-weight: 500;
}

.notif-item-link:hover,
.site-nav .notif-item-link:hover {
  color: #39ff14;
}

.notif-item-text {
  display: block;
}

.notif-snippet {
  display: inline;
}
