/* ─── Defender Trophy — Land Rover Heritage Edition ──────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;0,900;1,700&family=Barlow:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* Land Rover Heritage Palette */
  --lr-green:      #2C4A2E;
  --lr-green-mid:  #3A6341;
  --lr-green-lt:   #5C8F5F;
  --lr-green-glow: #4a7c45;
  --lr-gold:       #B8943B;
  --lr-gold-lt:    #D4AA50;
  --lr-bronze:     #8B6A3A;
  --lr-mud:        #5C4A32;
  --lr-cream:      #F0EAD6;
  --lr-sand:       #C4A882;

  /* UI */
  --bg:        #0A0C09;
  --bg-2:      #111410;
  --bg-3:      #181C15;
  --bg-4:      #20261C;
  --bg-card:   #141810;
  --border:    rgba(255,255,255,0.07);
  --border-2:  rgba(255,255,255,0.12);
  --border-g:  rgba(92,143,95,0.25);
  --text:      #EDE8DC;
  --text-2:    #A8A090;
  --text-3:    #6A6258;
  --red:       #C94444;
  --radius:    10px;
  --shadow:    0 8px 32px rgba(0,0,0,0.6);
  --shadow-g:  0 4px 24px rgba(44,74,46,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: 'Barlow', sans-serif; font-size: 15px; line-height: 1.6; }
a { color: var(--lr-green-lt); text-decoration: none; }
a:hover { color: var(--lr-gold-lt); }
img { max-width: 100%; }

/* ─── App Shell ───────────────────────────────────────────────────────────── */
#app { min-height: 100vh; display: flex; flex-direction: column; }
.app-shell { display: flex; flex: 1; min-height: 0; }
.main-area { flex: 1; min-width: 0; max-width: 740px; margin: 0 auto; padding: 24px 20px 80px; }
.right-rail { width: 270px; flex-shrink: 0; padding: 24px 16px; }
@media (max-width: 1100px) { .right-rail { display: none; } }

/* ─── Top Bar ─────────────────────────────────────────────────────────────── */
.topbar {
  background: rgba(10,12,9,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-g);
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--text); }
.topbar-wordmark { display: flex; flex-direction: column; line-height: 1; }
.topbar-wordmark .line1 { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text); }
.topbar-wordmark .line2 { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--lr-gold); }
.lr-badge { width: 36px; height: 36px; background: var(--lr-green); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; border: 1px solid rgba(92,143,95,0.4); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.notif-btn { position: relative; background: none; border: none; color: var(--text-2); cursor: pointer; font-size: 18px; padding: 7px; border-radius: 8px; transition: all .15s; }
.notif-btn:hover { background: var(--bg-4); color: var(--text); }
.notif-badge { position: absolute; top: 1px; right: 1px; background: #C94444; color: #fff; font-size: 9px; font-weight: 700; border-radius: 10px; padding: 1px 4px; min-width: 16px; text-align: center; }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--bg-4); border: 2px solid var(--border-g); cursor: pointer; }
.avatar-sm.placeholder { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--lr-gold-lt); background: rgba(44,74,46,0.3); }

/* ─── Topbar User Menu ────────────────────────────────────────────────────── */
.topbar-avatar-wrap { position: relative; }
.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: var(--bg-2);
  border: 1px solid var(--border-g);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  z-index: 200;
  overflow: hidden;
  animation: menu-pop .15s ease;
}
@keyframes menu-pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.user-menu.hidden { display: none; }
.user-menu-name { padding: 12px 16px 8px; font-size: 13px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--border); font-family: 'Barlow Condensed', sans-serif; letter-spacing: .03em; font-size: 15px; }
.user-menu-item { display: flex; align-items: center; gap: 8px; padding: 11px 16px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background .12s; }
.user-menu-item:hover { background: var(--bg-3); color: var(--text); }
.user-menu-item.danger { color: var(--red); }
.user-menu-item.danger:hover { background: rgba(201,68,68,0.1); }
.user-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  background: var(--bg-2);
  border-right: 1px solid var(--border-g);
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
}
.sidebar-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(5,10,5,0.75) 0%, rgba(10,18,10,0.65) 100%),
    url('/public/images/web_IMG_4167.jpeg') center 30% / cover no-repeat;
}
.sidebar-logo { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); display: flex; align-items: center; }
.sidebar-tagline { font-size: 11px; color: var(--lr-gold); margin-top: 2px; font-style: italic; }
.sidebar-nav { padding: 10px 8px; flex: 1; }
.nav-section { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); padding: 12px 10px 5px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-2); transition: all .15s; margin-bottom: 2px; user-select: none; }
.nav-item:hover { background: var(--bg-3); color: var(--text); }
.nav-item.active { background: rgba(44,74,46,0.25); color: var(--lr-green-lt); border-left: 3px solid var(--lr-green-mid); padding-left: 7px; }
.nav-item .ni { font-size: 16px; width: 20px; text-align: center; }
.sidebar-user { padding: 14px 14px 18px; border-top: 1px solid var(--border); background: rgba(44,74,46,0.06); display: flex; align-items: center; gap: 10px; cursor: pointer; }
.sidebar-user:hover { background: rgba(44,74,46,0.12); }
.sidebar-user-name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { font-size: 10px; color: var(--lr-gold); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

/* ─── Home Page / Landing ─────────────────────────────────────────────────── */
.home-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ── Top Nav ── */
.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 64px;
  background: rgba(10,12,9,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184,148,59,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.home-nav::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--lr-green) 0%, var(--lr-gold) 50%, var(--lr-green) 100%);
}
.home-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  filter: drop-shadow(0 0 12px rgba(44,74,46,0.5));
}
.home-nav-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.hnw-main {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text);
}
.hnw-sub {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--lr-gold);
  margin-top: 2px;
}
.home-nav-actions { display: flex; align-items: center; gap: 10px; }

/* ── Hero ── */
.home-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.home-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(5,10,5,0.55) 0%, rgba(5,10,5,0.3) 40%, rgba(5,10,5,0.75) 100%),
    url('/public/images/web_IMG_4280.JPG') center center / cover no-repeat;
}
.home-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(44,74,46,0.06) 40px, rgba(44,74,46,0.06) 41px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(44,74,46,0.06) 40px, rgba(44,74,46,0.06) 41px);
  pointer-events: none;
}
.home-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 60px;
  padding: 80px 80px 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.home-hero-shield {
  flex-shrink: 0;
  filter: drop-shadow(0 0 40px rgba(44,74,46,0.7)) drop-shadow(0 0 80px rgba(184,148,59,0.25));
  animation: shieldPulse 4s ease-in-out infinite;
}
@keyframes shieldPulse {
  0%, 100% { filter: drop-shadow(0 0 40px rgba(44,74,46,0.7)) drop-shadow(0 0 80px rgba(184,148,59,0.25)); }
  50%       { filter: drop-shadow(0 0 60px rgba(44,74,46,0.9)) drop-shadow(0 0 100px rgba(184,148,59,0.4)); }
}
.home-hero-copy { flex: 1; }
.home-hero-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: var(--lr-gold);
  margin-bottom: 16px;
}
.home-hero-title {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
  margin-bottom: 20px;
}
.hht-line1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text);
}
.hht-line2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--lr-gold);
  text-shadow: 0 0 60px rgba(184,148,59,0.4);
}
.hht-line3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(28px, 4.5vw, 54px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--lr-green-lt);
}
.home-hero-tagline {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 600;
  font-style: italic;
  color: rgba(255,255,255,0.55);
  letter-spacing: .05em;
  margin-bottom: 32px;
}
.home-hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-outline-green {
  background: none;
  border: 2px solid var(--lr-green-mid);
  color: var(--lr-green-lt);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
}
.btn-outline-green:hover { background: rgba(44,74,46,0.2); border-color: var(--lr-green-lt); }

/* Era tabs at hero bottom */
.home-hero-bottom-bar {
  position: relative;
  z-index: 2;
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  overflow-x: auto;
  scrollbar-width: none;
}
.home-hero-bottom-bar::-webkit-scrollbar { display: none; }
.home-era-tab {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 10px;
  border-top: 3px solid var(--ec, var(--lr-green));
  cursor: default;
  transition: background .15s;
}
.home-era-tab:not(:last-child) { border-right: 1px solid rgba(255,255,255,0.06); }
.home-era-tab:hover { background: rgba(255,255,255,0.04); }
.het-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text);
  white-space: nowrap;
}
.het-years {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
}

/* ── Photo Strip ── */
.home-photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 220px;
  overflow: hidden;
}
.home-photo-tile {
  overflow: hidden;
  display: block;
}
.home-photo-tile img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
  filter: brightness(0.85) saturate(1.1);
}
.home-photo-tile:hover img { transform: scale(1.05); filter: brightness(1) saturate(1.2); }
@media (max-width: 600px) {
  .home-photo-strip { grid-template-columns: repeat(2, 1fr); height: 280px; }
  .home-photo-tile img { height: 140px; }
}

/* ── About / Feature Strip ── */
.home-about {
  background: var(--bg-2);
  border-top: 1px solid var(--border-g);
  border-bottom: 1px solid var(--border-g);
}
.home-about-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.home-feature {
  padding: 36px 32px;
  border-right: 1px solid var(--border);
  transition: background .2s;
}
.home-feature:last-child { border-right: none; }
.home-feature:hover { background: rgba(44,74,46,0.06); }
.home-feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
}
.home-feature-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text);
  margin-bottom: 8px;
}
.home-feature-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.7;
}

/* ── Quote Band ── */
.home-quote-band {
  background:
    linear-gradient(135deg, rgba(5,10,5,0.78) 0%, rgba(10,18,10,0.72) 100%),
    url('/public/images/web_IMG_4298.jpeg') center 70% / cover no-repeat;
  border-top: 1px solid rgba(184,148,59,0.25);
  border-bottom: 1px solid rgba(184,148,59,0.25);
  padding: 48px 40px;
  text-align: center;
  position: relative;
}
.home-quote-mark {
  font-family: Georgia, serif;
  font-size: 80px;
  color: var(--lr-gold);
  opacity: 0.2;
  line-height: 1;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}
.home-quote-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  max-width: 800px;
  margin: 0 auto 14px;
  position: relative;
  z-index: 1;
}
.home-quote-attr {
  font-size: 12px;
  color: var(--lr-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  position: relative;
  z-index: 1;
}

/* ── Auth Section ── */
.home-auth-section {
  padding: 64px 20px 80px;
  display: flex;
  justify-content: center;
  background:
    linear-gradient(to bottom, rgba(5,10,5,0.88) 0%, rgba(5,10,5,0.82) 100%),
    url('/public/images/web_IMG_4192.jpeg') center 40% / cover no-repeat;
}
.home-auth-card {
  background: var(--bg-2);
  border: 1px solid var(--border-g);
  border-radius: 16px;
  padding: 40px 40px 36px;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.home-auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--lr-green) 0%, var(--lr-gold) 100%);
  border-radius: 16px 16px 0 0;
}
.home-auth-shield {
  text-align: center;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px rgba(44,74,46,0.6));
}
.home-auth-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  color: var(--text);
  margin-bottom: 22px;
}

/* ── Auth shared ── */
.auth-tabs { display: flex; background: var(--bg-3); border-radius: 8px; padding: 3px; margin-bottom: 22px; border: 1px solid var(--border); }
.auth-tab { flex: 1; text-align: center; padding: 9px; font-size: 14px; font-weight: 700; cursor: pointer; border-radius: 6px; transition: all .15s; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-family: 'Barlow Condensed', sans-serif; }
.auth-tab.active { background: var(--lr-green); color: #fff; }
.auth-link { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 16px; }
.auth-link a { color: var(--lr-gold-lt); }

/* ── Footer ── */
.home-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.home-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  opacity: 0.7;
}
.home-footer-copy {
  font-size: 12px;
  color: var(--text-3);
}

/* ── btn-gold ── */
.btn-gold { background: var(--lr-gold); color: #fff; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border: none; border-radius: 8px; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; }
.btn-gold:hover { background: var(--lr-gold-lt); box-shadow: 0 4px 20px rgba(184,148,59,0.4); }

/* ── Mobile ── */
@media (max-width: 800px) {
  .home-hero-inner { flex-direction: column; padding: 60px 24px 20px; gap: 32px; text-align: center; }
  .home-hero-shield svg { width: 80px; height: auto; }
  .home-hero-ctas { justify-content: center; }
  .home-about-inner { grid-template-columns: 1fr; }
  .home-feature { border-right: none; border-bottom: 1px solid var(--border); padding: 24px 24px; }
  .home-feature:last-child { border-bottom: none; }
  .home-nav { padding: 0 16px; }
  .home-auth-card { padding: 28px 20px 24px; }
  .home-era-tab { min-width: 90px; padding: 10px 8px; }
  .het-name { font-size: 11px; }
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 8px; border: none; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; font-family: 'Barlow Condensed', sans-serif; letter-spacing: 0.05em; text-transform: uppercase; }
.btn-primary { background: var(--lr-green); color: #fff; border: 1px solid rgba(92,143,95,0.3); }
.btn-primary:hover { background: var(--lr-green-mid); box-shadow: var(--shadow-g); }
.btn-secondary { background: var(--bg-4); color: var(--text); border: 1px solid var(--border-2); }
.btn-secondary:hover { background: var(--bg-3); border-color: var(--border-g); }
.btn-gold { background: var(--lr-gold); color: #fff; }
.btn-gold:hover { background: var(--lr-gold-lt); }
.btn-ghost { background: none; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-4); color: var(--text); border-color: var(--border-g); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: .85; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 16px; padding: 5px 7px; border-radius: 6px; transition: all .15s; font-family: inherit; }
.btn-icon:hover { background: var(--bg-4); color: var(--text); }

/* ─── Cards ───────────────────────────────────────────────────────────────── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card-inset { background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 10px; }

/* ─── Section Titles ──────────────────────────────────────────────────────── */
.section-title { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; color: var(--text); }
.section-title span { font-family: 'Barlow', sans-serif; font-size: 13px; color: var(--text-3); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ─── Heritage Banner (feed top) ─────────────────────────────────────────── */
.heritage-banner {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
  position: relative;
  border: 1px solid var(--border-g);
  background:
    linear-gradient(to right, rgba(5,10,5,0.82) 0%, rgba(5,10,5,0.5) 50%, rgba(5,10,5,0.7) 100%),
    url('/public/images/web_IMG_1073.JPG') center 60% / cover no-repeat;
}
.heritage-banner::before { display: none; }
.heritage-banner-content {
  position: relative;
  z-index: 1;
  padding: 16px 18px 14px;
}

/* Era strip (scrollable chips) */
.heritage-era-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.heritage-era-strip::-webkit-scrollbar { display: none; }
.heritage-era-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  cursor: default;
  transition: background .15s;
  border-top: 2px solid var(--era-col, var(--lr-green));
}
.heritage-era-chip:hover { background: rgba(255,255,255,0.07); }
.era-chip-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text);
  white-space: nowrap;
}
.era-chip-years {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 600;
  white-space: nowrap;
}

/* Quote line */
.heritage-quote-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.heritage-qmark {
  font-family: Georgia, serif;
  font-size: 28px;
  color: var(--lr-gold);
  opacity: 0.7;
  line-height: 1;
  flex-shrink: 0;
}
.heritage-qtext {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: rgba(255,255,255,0.8);
  flex: 1;
}
.heritage-qattr {
  font-size: 11px;
  color: var(--lr-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
}

/* ─── Post Cards ──────────────────────────────────────────────────────────── */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.post-card:hover { border-color: var(--border-g); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.post-card.pinned { border-color: rgba(184,148,59,0.4); }
.post-card.pinned::before {
  content: '📌 PINNED';
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--lr-gold);
  background: rgba(184,148,59,0.08);
  padding: 6px 16px;
  border-bottom: 1px solid rgba(184,148,59,0.2);
}
.post-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; }
.post-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border-g); }
.post-avatar-placeholder { width: 42px; height: 42px; border-radius: 50%; background: rgba(44,74,46,0.3); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: var(--lr-gold-lt); flex-shrink: 0; border: 2px solid var(--border-g); font-family: 'Barlow Condensed', sans-serif; }
.post-meta { flex: 1; min-width: 0; }
.post-author { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-author a { color: var(--text); }
.post-author a:hover { color: var(--lr-gold-lt); }
.post-time { color: var(--text-3); font-weight: 400; font-size: 12px; }
.post-cat { display: inline-flex; align-items: center; font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 2px 8px; border-radius: 4px; background: rgba(44,74,46,0.2); color: var(--lr-green-lt); border: 1px solid rgba(44,74,46,0.35); }
.post-cat.race { background: rgba(184,148,59,0.15); color: var(--lr-gold-lt); border-color: rgba(184,148,59,0.35); }
.post-cat.build { background: rgba(139,106,58,0.15); color: #d4956a; border-color: rgba(139,106,58,0.3); }
.post-cat.media { background: rgba(80,120,170,0.15); color: #7ab0d4; border-color: rgba(80,120,170,0.3); }
.post-cat.team { background: rgba(150,80,80,0.12); color: #de9090; border-color: rgba(150,80,80,0.25); }
.post-cat.heritage { background: rgba(139,106,58,0.2); color: var(--lr-sand); border-color: rgba(139,106,58,0.4); }
.post-title { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text); margin: 2px 16px 6px; line-height: 1.2; }
.post-body { color: var(--text-2); font-size: 14px; line-height: 1.75; padding: 0 16px 12px; white-space: pre-wrap; }
.post-body.collapsed { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* Media grid */
.post-media-grid { display: grid; gap: 3px; margin-bottom: 12px; }
.post-media-grid.single { grid-template-columns: 1fr; }
.post-media-grid.dual { grid-template-columns: 1fr 1fr; }
.post-media-grid.triple { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.post-media-grid img, .post-media-grid video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.post-media-grid.single img, .post-media-grid.single video { max-height: 460px; object-fit: contain; background: #000; }
.post-media-grid.triple > :first-child { grid-row: 1/3; }

/* Post actions */
.post-actions { display: flex; align-items: center; gap: 2px; padding: 8px 10px; border-top: 1px solid var(--border); }
.post-action-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 7px; border: none; background: none; color: var(--text-3); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; font-family: inherit; }
.post-action-btn:hover { background: var(--bg-3); color: var(--text); }
.post-action-btn.liked { color: var(--lr-green-lt); }
.post-actions-right { margin-left: auto; display: flex; gap: 2px; }

/* ─── Comments ────────────────────────────────────────────────────────────── */
.inline-comments { border-top: 1px solid var(--border); padding: 12px 16px 14px; }
.comment-list-inline { margin-bottom: 0; }
.view-more-comments { margin-bottom: 10px; }
.view-more-comments a { font-size: 13px; font-weight: 700; color: var(--text-3); }
.view-more-comments a:hover { color: var(--lr-green-lt); }
.comments-section { border-top: 1px solid var(--border); padding: 14px 16px; }
.comment { display: flex; gap: 10px; margin-bottom: 12px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border-g); }
.comment-avatar-ph { width: 32px; height: 32px; border-radius: 50%; background: rgba(44,74,46,0.3); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--lr-gold-lt); flex-shrink: 0; font-family: 'Barlow Condensed', sans-serif; }
.comment-bubble { background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; flex: 1; min-width: 0; }
.comment-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; font-family: 'Barlow Condensed', sans-serif; letter-spacing: .03em; }
.comment-body { font-size: 13px; color: var(--text-2); white-space: pre-wrap; line-height: 1.6; }
.comment-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--text-3); }
.comment-input-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; }
.comment-input { flex: 1; background: var(--bg-3); border: 1px solid var(--border); border-radius: 18px; padding: 9px 14px; color: var(--text); font-size: 13px; font-family: inherit; resize: none; outline: none; transition: border .15s; min-height: 38px; max-height: 120px; overflow-y: auto; line-height: 1.5; }
.comment-input:focus { border-color: var(--border-g); box-shadow: 0 0 0 3px rgba(44,74,46,0.1); }

/* ─── New Post Box ────────────────────────────────────────────────────────── */
.new-post-box { background: var(--bg-card); border: 1px solid var(--border-g); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.new-post-row { display: flex; gap: 10px; align-items: center; }
.new-post-input { flex: 1; background: var(--bg-3); border: 1px solid var(--border); border-radius: 22px; padding: 10px 18px; color: var(--text-2); font-size: 14px; cursor: pointer; transition: all .15s; font-style: italic; }
.new-post-input:hover { border-color: var(--border-g); color: var(--text); }

/* Category filter */
.cat-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-pill { padding: 5px 14px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--bg-3); color: var(--text-2); font-size: 12px; font-weight: 700; cursor: pointer; transition: all .15s; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.cat-pill:hover, .cat-pill.active { background: var(--lr-green); border-color: var(--lr-green); color: #fff; }

/* ─── Forms ───────────────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); margin-bottom: 6px; font-family: 'Barlow Condensed', sans-serif; }
.field input, .field textarea, .field select { width: 100%; background: var(--bg-3); border: 1px solid var(--border-2); border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 14px; font-family: inherit; outline: none; transition: border .15s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(44,74,46,0.6); box-shadow: 0 0 0 3px rgba(44,74,46,0.1); }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.field select option { background: var(--bg-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: #f87171; font-size: 13px; margin-top: 4px; }
.form-hint { color: var(--text-3); font-size: 11px; margin-top: 3px; }

/* ─── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 200; backdrop-filter: blur(6px); }
.modal-box { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 201; background: var(--bg-2); border: 1px solid var(--border-g); border-radius: 14px; width: 90%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--lr-green) 0%, var(--lr-gold) 100%); border-radius: 14px 14px 0 0; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 14px; border-bottom: 1px solid var(--border); }
.modal-title { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }
.hidden { display: none !important; }

/* Post Composer */
.composer-textarea { width: 100%; background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; color: var(--text); font-size: 14px; font-family: inherit; resize: vertical; min-height: 100px; line-height: 1.75; outline: none; transition: border .15s; }
.composer-textarea:focus { border-color: var(--border-g); }
.composer-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.media-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.media-preview-item { position: relative; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; }
.media-preview-item img, .media-preview-item video { width: 100%; height: 100%; object-fit: cover; }
.media-preview-item .remove { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,0.8); border: none; color: #fff; width: 18px; height: 18px; border-radius: 50%; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ─── Members ─────────────────────────────────────────────────────────────── */
.member-count-banner { background: linear-gradient(135deg, rgba(44,74,46,0.25) 0%, rgba(184,148,59,0.12) 100%); border: 1px solid rgba(92,143,95,0.3); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px; text-align: center; position: relative; overflow: hidden; }
.member-count-banner::before { content: ''; position: absolute; inset: 0; background: url('/public/images/web_IMG_4167.jpeg') center / cover no-repeat; opacity: 0.08; }
.member-count-number { font-family: 'Barlow Condensed', sans-serif; font-size: 64px; font-weight: 900; color: var(--lr-gold-lt); line-height: 1; position: relative; text-shadow: 0 4px 20px rgba(184,148,59,0.3); }
.member-count-label { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700; color: var(--lr-green-lt); text-transform: uppercase; letter-spacing: .12em; position: relative; margin-top: 2px; }
.member-count-sub { font-size: 12px; color: var(--text-3); position: relative; margin-top: 6px; }
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.member-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 14px; text-align: center; cursor: pointer; transition: all .2s; }
.member-card:hover { border-color: var(--border-g); box-shadow: var(--shadow-g); transform: translateY(-2px); }
.member-avatar-lg { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; display: block; border: 3px solid var(--border-g); }
.member-avatar-ph { width: 68px; height: 68px; border-radius: 50%; background: rgba(44,74,46,0.25); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; color: var(--lr-gold-lt); margin: 0 auto 10px; border: 3px solid var(--border-g); font-family: 'Barlow Condensed', sans-serif; }
.member-name { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; }
.member-sub { font-size: 12px; color: var(--text-3); }
.role-badge { display: inline-block; font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: rgba(44,74,46,0.2); color: var(--lr-green-lt); border: 1px solid rgba(44,74,46,0.3); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }
.role-badge.admin { background: rgba(184,148,59,0.15); color: var(--lr-gold-lt); border-color: rgba(184,148,59,0.35); }
.role-badge.contributor { background: rgba(100,100,120,0.15); color: var(--text-3); border-color: rgba(100,100,120,0.25); }

/* ─── Competed Badge ──────────────────────────────────────────────────────── */
.competed-badge { display: inline-flex; align-items: center; gap: 3px; font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 4px; background: linear-gradient(135deg, rgba(184,148,59,0.25), rgba(212,170,80,0.15)); color: var(--lr-gold-lt); border: 1px solid rgba(184,148,59,0.45); text-transform: uppercase; letter-spacing: .08em; vertical-align: middle; margin-left: 5px; white-space: nowrap; }
.competed-badge-sm { display: inline-block; font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: linear-gradient(135deg, rgba(184,148,59,0.25), rgba(212,170,80,0.15)); color: var(--lr-gold-lt); border: 1px solid rgba(184,148,59,0.45); text-transform: uppercase; letter-spacing: .06em; margin-top: 5px; }
.competed-badge-profile { display: inline-flex; align-items: center; gap: 4px; font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 800; padding: 3px 10px; border-radius: 6px; background: linear-gradient(135deg, rgba(184,148,59,0.3), rgba(212,170,80,0.18)); color: var(--lr-gold-lt); border: 1px solid rgba(184,148,59,0.5); text-transform: uppercase; letter-spacing: .07em; vertical-align: middle; margin-left: 8px; box-shadow: 0 2px 8px rgba(184,148,59,0.15); }
.btn-competed { background: linear-gradient(135deg, #B8943B, #8B6A2A); color: #fff; border: 1px solid rgba(184,148,59,0.6); font-weight: 700; }
.btn-competed:hover { background: linear-gradient(135deg, #D4AA50, #B8943B); }

/* ─── Verified Check (blue, X/IG style) ──────────────────────────────────── */
.verified-check { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #3b82f6; color: #fff; font-size: 9px; font-weight: 900; font-style: normal; vertical-align: middle; margin-left: 3px; line-height: 1; flex-shrink: 0; box-shadow: 0 1px 4px rgba(59,130,246,0.5); }
.verified-check-lg { width: 20px; height: 20px; font-size: 11px; margin-left: 5px; box-shadow: 0 2px 8px rgba(59,130,246,0.45); }

/* ─── Profile ─────────────────────────────────────────────────────────────── */
.profile-hero { background: var(--bg-card); border: 1px solid var(--border-g); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.profile-hero-banner { height: 120px; background: linear-gradient(135deg, var(--lr-green) 0%, #1a3020 50%, #0f1f12 100%); position: relative; overflow: hidden; }
.profile-hero-banner img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.profile-hero-body { padding: 0 24px 20px; display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.profile-avatar-xl { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg-2); margin-top: -45px; flex-shrink: 0; }
.profile-avatar-ph { width: 90px; height: 90px; border-radius: 50%; background: rgba(44,74,46,0.3); display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 900; color: var(--lr-gold-lt); border: 4px solid var(--bg-2); margin-top: -45px; flex-shrink: 0; font-family: 'Barlow Condensed', sans-serif; }
.profile-avatar-edit-wrap { position: relative; width: 90px; flex-shrink: 0; margin-top: -45px; cursor: pointer; }
.profile-avatar-edit-wrap .profile-avatar-xl,
.profile-avatar-edit-wrap .profile-avatar-ph { margin-top: 0; width: 90px; height: 90px; }
.profile-avatar-cam { position: absolute; bottom: 2px; right: 2px; width: 26px; height: 26px; border-radius: 50%; background: var(--lr-green); border: 2px solid var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 13px; box-shadow: 0 2px 6px rgba(0,0,0,0.5); transition: transform .15s; }
.profile-avatar-edit-wrap:hover .profile-avatar-cam { transform: scale(1.15); }
.profile-avatar-edit-wrap:hover .profile-avatar-xl { border-color: var(--lr-green-lt); }
.profile-info { flex: 1; padding-top: 12px; }
.profile-name { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }
.profile-handle { font-size: 13px; color: var(--text-3); }
.profile-bio { font-size: 14px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }
.profile-details { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.profile-detail { font-size: 12px; color: var(--text-3); }
.profile-stats { display: flex; gap: 24px; margin-top: 12px; }
.profile-stat-n { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 800; color: var(--lr-gold-lt); }
.profile-stat-l { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; }

/* ─── Admin ───────────────────────────────────────────────────────────────── */
.admin-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tab { padding: 7px 16px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-3); color: var(--text-2); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.admin-tab.active { background: var(--lr-green); border-color: var(--lr-green); color: #fff; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); padding: 8px 12px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.admin-table tr:hover td { background: var(--bg-3); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--bg-3); border: 1px solid var(--border-g); border-radius: 10px; padding: 16px; }
.stat-n { font-family: 'Barlow Condensed', sans-serif; font-size: 30px; font-weight: 900; color: var(--lr-gold-lt); }
.stat-l { font-size: 11px; color: var(--text-3); margin-top: 2px; text-transform: uppercase; letter-spacing: .07em; font-family: 'Barlow Condensed', sans-serif; }

/* ─── Toast ───────────────────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: var(--bg-4); border: 1px solid var(--border-g); border-radius: 10px; padding: 12px 22px; font-size: 13px; font-weight: 700; z-index: 300; max-width: 340px; text-align: center; box-shadow: var(--shadow); transition: opacity .3s; pointer-events: none; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.toast.error { border-color: rgba(201,68,68,0.4); color: #f87171; }
.toast.success { border-color: var(--border-g); color: var(--lr-green-lt); }

/* ─── Right Rail ──────────────────────────────────────────────────────────── */
.rail-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.rail-title { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.rail-member { display: flex; align-items: center; gap: 9px; padding: 6px 0; cursor: pointer; transition: opacity .15s; }
.rail-member:hover { opacity: .8; }
.rail-member img, .rail-member .rail-member-ph { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border-g); }
.rail-member-ph { background: rgba(44,74,46,0.3); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--lr-gold-lt); font-family: 'Barlow Condensed', sans-serif; }
.rail-member-name { font-size: 13px; font-weight: 700; }
.rail-member-sub { font-size: 11px; color: var(--text-3); }

/* Heritage quote */
.lr-quote { background: linear-gradient(135deg, rgba(44,74,46,0.15) 0%, rgba(184,148,59,0.08) 100%); border: 1px solid var(--border-g); border-left: 3px solid var(--lr-gold); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
.lr-quote-text { font-family: 'Barlow Condensed', sans-serif; font-size: 17px; font-weight: 700; color: var(--text); font-style: italic; line-height: 1.4; }
.lr-quote-attr { font-size: 11px; color: var(--lr-gold); font-weight: 600; margin-top: 6px; text-transform: uppercase; letter-spacing: .08em; }

/* Rail quote card */
.rail-quote-card {
  background: linear-gradient(135deg, rgba(44,74,46,0.18) 0%, rgba(184,148,59,0.06) 100%);
  border: 1px solid rgba(184,148,59,0.25);
  border-left: 3px solid var(--lr-gold);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  position: relative;
}
.rail-quote-mark {
  font-family: Georgia, serif;
  font-size: 36px;
  color: var(--lr-gold);
  opacity: 0.4;
  line-height: 1;
  position: absolute;
  top: 8px;
  left: 12px;
}
.rail-quote-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  line-height: 1.4;
  padding-top: 10px;
}
.rail-quote-attr {
  font-size: 10px;
  color: var(--lr-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 8px;
}

/* Rail heritage spotlight card */
.rail-heritage-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--heritage-col, var(--lr-green)) 18%, transparent) 0%, rgba(10,12,9,0) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 3px solid var(--heritage-col, var(--lr-green));
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.rail-heritage-era {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text);
  line-height: 1;
}
.rail-heritage-years {
  font-size: 11px;
  color: var(--lr-gold);
  font-weight: 600;
  margin: 4px 0 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.rail-heritage-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
  font-style: italic;
}

/* ─── Settings ────────────────────────────────────────────────────────────── */
.settings-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.settings-section h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

/* ─── Divider ─────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ─── Toggle ──────────────────────────────────────────────────────────────── */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.toggle-row label { font-size: 14px; }
.toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--bg-4); border: 1px solid var(--border-2); border-radius: 24px; cursor: pointer; transition: .2s; }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: var(--text-3); border-radius: 50%; transition: .2s; }
.toggle input:checked + .toggle-slider { background: var(--lr-green); border-color: var(--lr-green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); background: #fff; }

/* ─── Lightbox ────────────────────────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.96); z-index: 500; display: flex; align-items: center; justify-content: center; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 6px; }
.lightbox-close { position: absolute; top: 20px; right: 20px; font-size: 28px; color: #fff; cursor: pointer; background: none; border: none; }

/* ─── Empty State ─────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty-state .empty-icon { font-size: 52px; margin-bottom: 14px; opacity: .4; display: block; }
.empty-state h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }

/* ─── Share Panel ────────────────────────────────────────────────────────── */
.share-panel { padding: 0 16px 16px; }
.share-panel-inner { background: var(--bg-3); border: 1px solid var(--border-g); border-radius: 12px; padding: 16px; position: relative; }
.share-panel-title { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin-bottom: 12px; }
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; border: none; cursor: pointer; text-decoration: none; transition: opacity .15s; }
.share-btn:hover { opacity: .85; }
.share-fb   { background: #1877F2; color: #fff; }
.share-x    { background: #000; color: #fff; }
.share-wa   { background: #25D366; color: #fff; }
.share-copy { background: var(--bg-4); color: var(--text); border: 1px solid var(--border-2); }
.share-close { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--text-3); font-size: 16px; cursor: pointer; padding: 2px 6px; }
.share-close:hover { color: var(--text); }

/* ─── Direct Messages ────────────────────────────────────────────────────── */
.dm-shell { display: flex; height: calc(100vh - 120px); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-card); }
.dm-list { width: 280px; flex-shrink: 0; border-right: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; }
.dm-list-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
.dm-thread-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background .15s; }
.dm-thread-item:hover { background: var(--bg-3); }
.dm-thread-item.active { background: rgba(44,74,46,0.15); border-right: 3px solid var(--lr-green); }
.dm-thread-info { flex: 1; min-width: 0; }
.dm-thread-name { font-size: 13px; font-weight: 700; }
.dm-thread-preview { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border-g); }
.dm-avatar.placeholder { background: rgba(44,74,46,0.3); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--lr-gold-lt); font-family: 'Barlow Condensed', sans-serif; }
.dm-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dm-chat-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.dm-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.dm-msg { display: flex; align-items: flex-end; gap: 8px; }
.dm-msg.mine { flex-direction: row-reverse; }
.dm-msg-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.dm-msg-avatar.placeholder { background: rgba(44,74,46,0.3); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: var(--lr-gold-lt); font-family: 'Barlow Condensed', sans-serif; }
.dm-bubble { max-width: 70%; background: var(--bg-3); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 9px 13px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.dm-msg.mine .dm-bubble { background: var(--lr-green); border-color: var(--lr-green); color: #fff; border-radius: 16px 16px 4px 16px; }
.dm-time { display: block; font-size: 10px; opacity: .5; margin-top: 4px; }
.dm-input-row { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.dm-empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-3); font-size: 14px; }
.dm-chat-loading { flex: 1; display: flex; align-items: center; justify-content: center; }
@media (max-width: 700px) {
  .dm-shell { height: calc(100vh - 80px); flex-direction: column; }
  .dm-list { width: 100%; max-height: 40vh; border-right: none; border-bottom: 1px solid var(--border); }
  .dm-chat { flex: 1; }
}

/* ─── YouTube Embed ──────────────────────────────────────────────────────── */
.yt-embed-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0 4px;
}
.yt-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ─── New Post Banner (SSE live update) ──────────────────────────────────── */
.new-post-banner {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--lr-green);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  border-radius: 8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(44,74,46,0.4);
  animation: npb-slide-in 0.3s ease;
}
.new-post-banner:hover { background: var(--lr-green-mid); }
.npb-x { margin-left: auto; opacity: 0.7; font-size: 16px; padding: 0 4px; line-height: 1; }
.npb-x:hover { opacity: 1; }
@keyframes npb-slide-in {
  from { transform: translateY(-40px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ─── Mobile ──────────────────────────────────────────────────────────────── */
.mobile-nav { display: none; position: sticky; bottom: 0; background: rgba(10,12,9,0.97); backdrop-filter: blur(12px); border-top: 1px solid var(--border-g); padding: 8px 0; padding-bottom: max(8px, env(safe-area-inset-bottom)); z-index: 50; flex-shrink: 0; }
.mob-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 700; color: var(--text-3); cursor: pointer; padding: 4px 0; transition: color .15s; position: relative; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.mob-nav-item.active { color: var(--lr-green-lt); }
.mob-nav-item:hover { color: var(--text); }
.mob-compose { color: var(--lr-gold-lt) !important; }

@media (max-width: 700px) {
  .mobile-nav { display: flex; }
  .sidebar { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .main-area { padding: 14px 12px 80px; }
  .auth-panel { max-width: 100%; padding: 28px 24px; border-left: none; }
  .heritage-banner-bg { height: 140px; }
  .heritage-banner-text h2 { font-size: 26px; }
}
