/* ═══════════════════════════════════════════════════════
   ALT ORDO — modern, light & airy (Zillow / HipCamp feel)
   Brand palette:
     forest   #2f6b4f   (primary brand / accent green)
     pine     #1f4738   (deep brand, logo, dark surfaces)
     mist     #e7f1ea   (soft green tint / accent-soft)
     paper    #ffffff   (cards)
     canvas   #f8faf9   (page background)
     ink      #16201b   (near-black text)
   ═══════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Mulish:wght@500;600;700;800&family=Fraunces:ital,wght@0,500;0,600;0,700;1,500&display=swap");

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Surfaces */
  --bg:          #f8faf9;   /* canvas — airy off-white page bg */
  --bg-card:     #ffffff;   /* paper — elevated cards */
  --bg-input:    #ffffff;
  --bg-subtle:   #f1f4f2;   /* faint fill for chips / hovers */
  --bg-inverse:  #1f4738;   /* pine — dark bands / footer */

  /* Ink */
  --text:        #16201b;   /* near-black, faint green cast */
  --text-muted:  #5f6b63;
  --text-soft:   #8a948c;
  --text-on-olive: #ffffff;
  --text-inverse:  #ffffff;

  /* Brand + interactive */
  --accent:        #2f6b4f; /* forest green */
  --accent-hover:  #245540;
  --accent-soft:   #e7f1ea; /* mist — tinted fills */
  --accent-ring:   rgba(47,107,79,0.18);
  --olive:         #1f4738; /* pine (legacy alias) */
  --olive-deep:    #16332a;
  --sage:          #4f9e78;
  --cream:         #ffffff;

  /* Lines */
  --border:        #e3e7e4;
  --border-light:  #eef1ef;
  --border-strong: #d2d8d4;

  /* States */
  --danger:        #c0392b;
  --warning:       #b9821f;
  --success:       #2f6b4f;

  /* Shadows — soft, neutral, airy */
  --shadow-xs:     0 1px 2px rgba(16,32,27,0.05);
  --shadow:        0 1px 3px rgba(16,32,27,0.06), 0 6px 16px rgba(16,32,27,0.05);
  --shadow-lg:     0 12px 40px rgba(16,32,27,0.12);

  /* Type + shape */
  --font-heading: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif:   "Fraunces", Georgia, serif;
  --max-w:        1200px;
  --radius:       14px;
  --radius-sm:    10px;
  --radius-lg:    22px;
  --radius-pill:  999px;
}

/* ── Dark Mode (clean charcoal) ── */
html[data-theme="dark"] {
  --bg:           #0f1412;
  --bg-card:      #171d1a;
  --bg-input:     #1d2421;
  --bg-subtle:    #1f2723;
  --bg-inverse:   #0b0f0d;
  --text:         #e9ede9;
  --text-muted:   #9aa49c;
  --text-soft:    #707a72;
  --text-on-olive:#ffffff;
  --text-inverse: #0f1412;
  --accent:       #5fae84;
  --accent-hover: #74c197;
  --accent-soft:  #18342a;
  --accent-ring:  rgba(95,174,132,0.22);
  --olive:        #171d1a;
  --olive-deep:   #0b0f0d;
  --border:       #2a322d;
  --border-light: #222a25;
  --border-strong:#374039;
  --danger:       #e07a6c;
  --success:      #5fae84;
  --shadow-xs:    0 1px 2px rgba(0,0,0,0.4);
  --shadow:       0 1px 3px rgba(0,0,0,0.45), 0 6px 16px rgba(0,0,0,0.4);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.55);
}
html[data-theme="dark"] .map-container .leaflet-tile {
  filter: brightness(0.78) contrast(1.05) saturate(0.85);
}

html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Typography --- */
body { font-weight: 400; letter-spacing: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}
h1 { font-size: 2.35rem; margin-bottom: 0.4em; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 1.6rem; margin-bottom: 0.4em; }
h3 { font-size: 1.2rem; margin-bottom: 0.3em; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { margin-bottom: 1em; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
a:hover { color: var(--accent-hover); opacity: 0.7; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

/* ═══════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════ */
.navbar {
  background: var(--bg-card);
  color: var(--text);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 950;
  backdrop-filter: saturate(1.2) blur(8px);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Avenir Next", "Avenir", "Mulish", var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600; /* Avenir Next Semi Bold; Mulish 600 fallback for all viewers */
  color: var(--accent); /* always green */
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}
.navbar-brand:hover { color: var(--accent-hover); opacity: 1; } /* darker green on hover */
.navbar-wordmark { display: inline-block; text-transform: lowercase; }
.navbar-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .navbar-wordmark { display: none; }
}

/* Nav items — clean text links with a green active underline */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  flex-wrap: nowrap;
  height: 100%;
  margin-left: auto;
}
.navbar-links > li {
  display: flex; align-items: center;
}

.navbar-links .nav-item,
.navbar-links a.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  transition: background 0.15s, color 0.15s;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  line-height: 1;
  position: relative;
}
.navbar-links .nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text);
  opacity: 1;
}
.navbar-links .nav-item.active,
.navbar-links .nav-item[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}
.navbar-links .nav-item i { font-size: 0.95rem; opacity: 0.85; }
.navbar-links .nav-item-icon { padding: 0.5rem 0.6rem; }
.navbar-links .nav-item-icon i { font-size: 1.05rem; }

/* Collapse labels on narrower screens — icons only, tooltips still fire */
@media (max-width: 1020px) {
  .navbar-links .nav-label { display: none; }
  .navbar-links .nav-item { padding: 0.5rem 0.6rem; }
}

/* Sign-out tab */
.navbar-links .nav-signout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 0.7rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: background 0.15s, color 0.15s;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.navbar-links .nav-signout:hover {
  background: var(--bg-subtle);
  color: var(--danger);
}

/* CTA tab (logged-out "Create Account") — filled green pill */
.navbar-links .nav-cta {
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  box-shadow: var(--shadow-xs);
}
.navbar-links .nav-cta:hover { background: var(--accent-hover); color: #fff !important; }

.nav-locked {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.85rem; font-size: 0.82rem;
  color: var(--text-muted); font-style: italic;
}

.nav-help-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.65rem;
  line-height: 1.65;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: #ccc;
  border-radius: var(--radius);
  opacity: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid rgba(77,92,62,0.15);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 0.35rem;
  z-index: 1000;
  list-style: none;
  flex-direction: column;
  gap: 1px;
  margin: 0;
}
.nav-dropdown-menu li a {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.48rem 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 8px;
  transition: background 0.12s;
}
.nav-dropdown-menu li a:hover {
  background: var(--accent-soft);
  color: var(--olive-deep);
}
.nav-dropdown-menu li a i {
  width: 1.1em;
  text-align: center;
  opacity: 0.6;
  margin-right: 0.4rem;
}
.nav-dropdown-menu li a:hover i { opacity: 1; }
.nav-dropdown-hover:hover .nav-dropdown-menu { display: flex; }
.nav-dropdown-hover .nav-dropdown-menu { top: 100%; }
.nav-dropdown-hover .nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

/* ── Brand tagline ── */
.navbar-tagline {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: rgba(232,239,204,0.6);
  margin-left: 0.35rem;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
  align-self: center;
}


/* ═══════════════════════════════════════════════════════
   MANILA TAB BAR — Mini-App Navigation
   ═══════════════════════════════════════════════════════ */
.app-tab-bar {
  background: var(--border);
  padding: 0.45rem 0.75rem 0;
  position: relative;
  z-index: 900;
}

.app-tab-grid {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 3px;
  max-width: 960px;
  margin: 0 auto;
}

/* ── Individual tabs ── */
.app-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 6px 6px 0 0;
  text-decoration: none;
  font-family: var(--font-body);
  transition: background 0.15s, color 0.15s;
  position: relative;
  background: var(--border-light);
  color: #7a6f62;
  border: 1px solid var(--border);
  border-bottom: none;
}
.app-tab i {
  font-size: 0.8rem;
}
.app-tab span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Hover state ── */
.app-tab:hover {
  background: #ede6d8;
  color: #4a3f34;
}

/* ── Active tab ── */
.app-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  z-index: 2;
}
.app-tab.active i {
  color: #fff;
}

/* ── Locked tab ── */
.app-tab.locked {
  opacity: 0.35; cursor: not-allowed; pointer-events: none;
  position: relative;
}
.app-tab.locked .lock-icon {
  font-size: 0.5rem; position: absolute; top: 3px; right: 3px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .app-tab-bar { padding: 0.35rem 0.25rem 0; }
  .app-tab { padding: 0.3rem 0.5rem; gap: 0.25rem; }
  .app-tab span { display: none; }
  .app-tab i { font-size: 0.85rem; }
  .app-tab.locked .lock-icon { display: none; }
}

/* ═══════════════════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════════════════ */
.flash {
  max-width: var(--max-w);
  margin: 1rem auto 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  border: 1px solid var(--border);
}
.flash-notice {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-hover);
}
.flash-alert {
  background: #fdecea;
  border-color: #e7b3ac;
  color: var(--danger);
}
html[data-theme="dark"] .flash-notice {
  color: var(--accent);
}
html[data-theme="dark"] .flash-alert {
  background: #2e1a17;
  border-color: #5a322c;
  color: var(--danger);
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 0.75rem;
}
.footer-social a {
  color: var(--text-muted);
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-social a:hover {
  color: var(--accent);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.62rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background .15s, color .15s, box-shadow .15s;
  letter-spacing: 0;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  opacity: 1;
  box-shadow: 0 6px 18px var(--accent-ring);
}
.btn-outline {
  background: var(--bg-card);
  color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
  opacity: 1;
}
.btn-sm {
  font-size: 0.82rem;
  padding: 0.4rem 1rem;
}
.btn-block {
  display: flex;
  width: 100%;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════ */
.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.form-control {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text);
  transition: border-color 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.form-card {
  max-width: 420px;
  margin: 2rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.form-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}
.form-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.field-errors {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

/* ═══════════════════════════════════════════════════════
   HERO SLIDESHOW
   ═══════════════════════════════════════════════════════ */
.hero-slideshow {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: calc(-2rem + 1px);
  height: 85vh;
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
}

.slideshow-slides {
  position: absolute;
  inset: 0;
}

.slideshow-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.slideshow-slide.active {
  opacity: 1;
}

/* Dark overlay for text readability */
.slideshow-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.55) 50%,
    rgba(0, 0, 0, 0.70) 100%
  );
  z-index: 2;
}

.slideshow-overlay .hero-logo {
  width: 124px;
  height: 124px;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.95),
              0 14px 34px rgba(0,0,0,0.45);
}

.slideshow-overlay h1 {
  font-family: "Avenir Next", "Avenir", "Mulish", var(--font-heading);
  font-weight: 600; /* Avenir Next Semi Bold; Mulish 600 fallback for all viewers */
  font-size: 4rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.3em;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.slideshow-overlay .tagline {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.8;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.slideshow-overlay .hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.slideshow-overlay .btn-primary {
  background: #fff;
  color: #1a1a1a;
  border-color: #fff;
  font-size: 1rem;
  padding: 0.7rem 2rem;
}
.slideshow-overlay .btn-primary:hover {
  background: rgba(255,255,255,0.85);
  color: #1a1a1a;
}

.slideshow-overlay .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,0.7);
  font-size: 1rem;
  padding: 0.7rem 2rem;
}
.slideshow-overlay .btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
}

/* Slideshow dots */
.slideshow-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 3;
}
.slideshow-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}
.slideshow-dots .dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.2);
}
.slideshow-dots .dot:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.5);
}

/* Slideshow arrows */
.slideshow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slideshow-arrow:hover {
  background: rgba(0,0,0,0.6);
  border-color: rgba(255,255,255,0.5);
}
.slideshow-prev { left: 1.5rem; }
.slideshow-next { right: 1.5rem; }

/* ═══════════════════════════════════════════════════════
   HOME SECTION CARDS
   ═══════════════════════════════════════════════════════ */
.home-sections-wrapper {
  padding: 3rem 0 1rem;
}
.home-sections {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.home-section {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  cursor: pointer;
}
.home-section:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  opacity: 1;
}
.home-section .section-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
  color: var(--accent);
}
.home-section h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}
.home-section p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}
.home-section ul {
  list-style: none;
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.78rem;
  text-align: left;
}
.home-section ul li {
  padding: 0.25rem 0;
  color: var(--text-muted);
}
.home-section ul li i {
  width: 16px;
  text-align: center;
  margin-right: 0.3rem;
  font-size: 0.7rem;
}

/* ═══════════════════════════════════════════════════════
   APP HUB (2x2)
   ═══════════════════════════════════════════════════════ */
/* ── Why CTA Banner ── */
.app-why-cta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin-top: 1.5rem;
}
.app-why-cta.done {
  border-left-color: #3d6b3d;
  opacity: 0.85;
}
.app-why-cta-icon {
  position: relative;
  font-size: 2rem;
  color: var(--accent);
  flex-shrink: 0;
  width: 3rem;
  text-align: center;
}
.app-why-cta.done .app-why-cta-icon { color: #3d6b3d; }
.app-why-check {
  position: absolute;
  bottom: -2px;
  right: -4px;
  font-size: 0.9rem;
  color: #3d6b3d;
  background: var(--bg-card);
  border-radius: 50%;
  line-height: 1;
}
.app-why-cta-text { flex: 1; min-width: 0; }
.app-why-cta-text h3 {
  font-family: 'Special Elite', 'Courier Prime', monospace;
  font-size: 1.1rem;
  margin: 0 0 0.2rem;
  color: var(--fg);
}
.app-why-cta-text p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin: 0;
  line-height: 1.4;
}
.app-why-cta .btn {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .app-why-cta { flex-direction: column; text-align: center; gap: 0.8rem; }
  .app-why-cta .btn { width: 100%; }
}

.app-hub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (max-width: 700px) {
  .app-hub { grid-template-columns: 1fr; }
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.app-card:hover {
  box-shadow: var(--shadow-lg);
}
.app-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.2rem;
}
.app-card-header a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.app-card-header a:hover { opacity: 0.7; }
.app-card-icon {
  font-size: 1.4rem;
  color: var(--accent);
}
.app-card h2 {
  margin: 0;
  font-size: 1.5rem;
}
.app-card .subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  margin-left: 2.1rem;
}

.app-links {
  list-style: none;
}
.app-links li {
  border-top: 1px solid var(--border-light);
}
.app-links li:first-child {
  border-top: none;
}
.app-links a {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.3rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.15s;
}
.app-links a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
  opacity: 1;
}
.app-links .link-icon {
  width: 24px;
  text-align: center;
  margin-right: 0.7rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.app-links a:hover .link-icon {
  color: var(--accent);
}
.app-links .link-text {
  flex: 1;
}
.app-links .arrow {
  color: var(--border);
  font-size: 0.75rem;
  transition: color 0.15s;
}
.app-links a:hover .arrow {
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════
   MODAL OVERLAY
   ═══════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  padding: 2rem;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: slideUp 0.25s ease;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--accent); }

.modal h2 {
  margin-bottom: 0.3rem;
}
.modal .modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}
.modal-links {
  list-style: none;
}
.modal-links li {
  border-top: 1px solid var(--border-light);
}
.modal-links li:first-child { border-top: none; }
.modal-links a {
  display: flex;
  align-items: center;
  padding: 0.9rem 0.3rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.15s;
}
.modal-links a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
  opacity: 1;
}
.modal-links .link-icon {
  width: 28px;
  text-align: center;
  margin-right: 0.8rem;
  font-size: 1rem;
  color: var(--text-muted);
}
.modal-links a:hover .link-icon { color: var(--accent); }
.modal-links .link-text {
  flex: 1;
}
.modal-links .link-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.modal-links .arrow {
  color: var(--border);
  font-size: 0.75rem;
}
.modal-links a:hover .arrow { color: var(--accent); }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════
   COMING SOON PAGES
   ═══════════════════════════════════════════════════════ */
.coming-soon {
  text-align: center;
  padding: 4rem 1rem;
}
.coming-soon .section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.coming-soon p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.coming-soon .ornament {
  font-size: 1.5rem;
  color: var(--border);
  margin-bottom: 1.5rem;
  letter-spacing: 0.5em;
}

/* ═══════════════════════════════════════════════════════
   ADMIN DASHBOARD
   ═══════════════════════════════════════════════════════ */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 480px;
  margin: 0 auto;
}
.admin-card h3 { margin-bottom: 0.5rem; }
.admin-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   MINI-APP HEADER — Standardized across all mini-apps
   ═══════════════════════════════════════════════════════ */
.mini-app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.mini-app-header-left {
  flex: 1;
  min-width: 0;
}
.mini-app-header h1 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin: 0 0 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.mini-app-header h1 i {
  font-size: 1.1rem;
  opacity: 0.5;
}
.mini-app-header-stats {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
  position: relative;
  top: -1px;
}
.mini-app-header-sep {
  opacity: 0.35;
}
.mini-app-tagline {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.15rem;
}
.mini-app-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .mini-app-header { flex-direction: column; }
  .mini-app-header h1 { font-size: 1.2rem; }
  .mini-app-header-stats { margin-left: 0; display: flex; }
}

/* Legacy centered header (non-mini-app pages) */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
}
.page-header h1 {
  margin-bottom: 0.3em;
}
.page-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════
   BEGIN PAGE — Interactive Journey
   ═══════════════════════════════════════════════════════ */

/* Question slides — full-width breakout */
.begin-questions {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.begin-slide {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease;
}
.begin-slide.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Question icon */
.begin-icon {
  font-size: 2.4rem;
  color: var(--border);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}
.begin-slide.visible .begin-icon {
  opacity: 1;
  transform: scale(1);
}
.begin-icon--large {
  font-size: 3.2rem;
}

.begin-question {
  font-family: var(--font-heading);
  font-size: 3rem;
  text-align: center;
  max-width: 720px;
  line-height: 1.35;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* Bridge slide — "Here's how to begin" */
.begin-slide--bridge .begin-question {
  margin-bottom: 0.5rem;
}

.begin-scroll-hint {
  margin-top: 2rem;
  font-size: 1.2rem;
  color: var(--text-muted);
  animation: beginBounce 2s infinite;
}

@keyframes beginBounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(10px); opacity: 1; }
}

/* Steps intro heading */
.begin-steps-intro {
  text-align: center;
  padding: 5rem 1rem 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.begin-steps-intro.visible {
  opacity: 1;
  transform: translateY(0);
}
.begin-steps-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.begin-steps-heading {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--accent);
}

/* Step cards — 2x2 grid */
.begin-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem 0 3rem;
}

.begin-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.2s;
}
.begin-step.visible {
  opacity: 1;
  transform: translateY(0);
}
.begin-step:nth-child(2) { transition-delay: 0.12s; }
.begin-step:nth-child(3) { transition-delay: 0.24s; }
.begin-step:nth-child(4) { transition-delay: 0.36s; }

.begin-step:hover {
  box-shadow: var(--shadow-lg);
}

/* Step icon — matches grid-card-icon style */
.begin-step-icon {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.step-number {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.begin-step h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.step-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  font-style: italic;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.step-items {
  list-style: none;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  text-align: left;
  display: inline-block;
}
.step-items li {
  padding: 0.3rem 0;
  color: var(--text-muted);
}
.step-items li i {
  width: 18px;
  text-align: center;
  margin-right: 0.4rem;
  font-size: 0.75rem;
}

/* Final CTA */
.begin-cta {
  text-align: center;
  padding: 4rem 2rem 5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.begin-cta.visible {
  opacity: 1;
  transform: translateY(0);
}

.begin-ornament {
  font-size: 1.2rem;
  color: var(--border);
  letter-spacing: 0.3em;
  margin-bottom: 1.5rem;
}

.begin-cta h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}
.begin-cta p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 0;
}

.begin-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* ── WHY QUIZ — Interactive question cards ── */
.why-quiz {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}
.why-intro {
  min-height: 70vh;
}
.why-intro-heading {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 0.5rem;
  min-height: 4rem;
  border-right: 3px solid var(--accent);
  animation: blinkCaret 0.8s step-end infinite;
  display: inline-block;
  padding-right: 4px;
}
@keyframes blinkCaret {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: transparent; }
}
.why-intro-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

/* Subtitle under each question */
.why-q-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 580px;
  line-height: 1.5;
  margin: -1rem auto 1.5rem;
}

/* Space / keyboard hint */
.why-space-hint {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  animation: pulseHint 2s ease-in-out infinite;
  opacity: 0.6;
}
.why-space-hint kbd {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  margin: 0 0.15rem;
}
@keyframes pulseHint {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Navigation arrows */
.why-nav-arrows {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.why-arrow {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}
.why-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(184,150,78,0.08);
}
.begin-scroll-hint {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  margin-top: 1.5rem;
  animation: bounceArrow 2s ease-in-out infinite;
}
.begin-scroll-hint:hover {
  border-color: var(--accent);
  color: var(--accent);
}
@keyframes bounceArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Question sections */
.why-question {
  min-height: 85vh;
  padding: 3rem 2rem;
}
.why-q-number {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.why-q-icon {
  font-size: 2rem;
  color: var(--border);
  margin-bottom: 1rem;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}
.why-question.visible .why-q-icon {
  opacity: 1;
  transform: scale(1);
}
.why-q-text {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  text-align: center;
  max-width: 640px;
  line-height: 1.35;
  color: var(--accent);
  margin-bottom: 2rem;
}

/* Answer card grid */
.why-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  max-width: 760px;
}
.why-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 1.2rem;
  width: 140px;
  min-height: 90px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  color: var(--text);
  position: relative;
}
.why-card i {
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.why-card span {
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.3;
  font-weight: 500;
}
.why-card:hover {
  border-color: var(--accent);
  background: #ede6d8;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.why-card:hover i {
  color: var(--accent);
}
.why-card.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(26,26,26,0.2);
}
.why-card.selected i {
  color: #fff;
}

/* Tooltip icon on cards */
.why-card-tooltip {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.6rem;
  color: var(--text-muted);
  opacity: 0.4;
  cursor: help;
  transition: opacity 0.2s;
}
.why-card:hover .why-card-tooltip {
  opacity: 0.8;
}
.why-card.selected .why-card-tooltip {
  color: rgba(255,255,255,0.6);
}

/* Paint My Vision trigger */
.why-paint-trigger {
  min-height: 50vh;
  padding: 3rem 2rem;
}
.why-paint-btn {
  font-size: 1.1rem;
  padding: 0.9rem 2.5rem;
  margin-top: 1rem;
  transition: all 0.3s ease;
}
.why-paint-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.why-paint-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184,150,78,0.3);
}

/* Vision results — immersive section */
.why-vision-results {
  position: relative;
  min-height: 100vh;
  padding: 5rem 2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background slideshow */
.vision-bg-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.vision-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}
.vision-bg-slide.active {
  opacity: 1;
}
.vision-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 18, 0.82);
  z-index: 1;
}

/* Vision content */
.vision-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  text-align: center;
}
.why-vision-icon {
  font-size: 2.4rem;
  color: #d4a017;
  margin-bottom: 1rem;
}
.why-vision-heading {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: #d4a017;
  margin-bottom: 1.5rem;
}
.why-vision-body {
  max-width: 600px;
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.9);
  margin: 0 auto;
}
.why-vision-body strong {
  color: #d4a017;
}
.why-vision-body p {
  margin-bottom: 0.8rem;
}
.why-vision-placeholder {
  color: var(--text-muted);
  font-style: italic;
}
.why-vision-closing {
  margin-top: 1.5rem;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.7);
}
.vision-typewriter-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.9);
  text-align: left;
}

/* Vision steps */
.vision-steps {
  margin-top: 3rem;
  opacity: 0;
}
.vision-steps.fade-in {
  animation: visionFadeIn 0.6s ease forwards;
}
.vision-steps-heading {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.5rem;
  min-height: 1.6em;
}
.vision-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.vision-step-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.vision-step-card.revealed {
  opacity: 1;
  transform: translateY(0);
}
.vision-step-card i {
  font-size: 1.5rem;
  color: #d4a017;
  display: block;
  margin-bottom: 0.5rem;
}
.vision-step-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.25rem;
}
.vision-step-card span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
}

/* Vision factoid */
.vision-factoid {
  margin-top: 2.5rem;
  background: rgba(212,160,23,0.08);
  border: 1px solid rgba(212,160,23,0.2);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  opacity: 0;
}
.vision-factoid.fade-in {
  animation: visionFadeIn 0.6s ease forwards;
}
.vision-factoid i {
  color: #d4a017;
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.vision-factoid p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  margin: 0;
}

/* Fade-in animation */
@keyframes visionFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
#why-vision-cta.fade-in {
  animation: visionFadeIn 0.6s ease forwards;
}

/* Responsive */
@media (max-width: 600px) {
  .why-intro-heading { font-size: 2.2rem; }
  .why-q-text { font-size: 1.6rem; }
  .why-q-subtitle { font-size: 0.8rem; }
  .why-options { gap: 0.5rem; }
  .why-card { width: 110px; min-height: 80px; padding: 0.75rem 0.8rem; }
  .why-card i { font-size: 1.1rem; }
  .why-card span { font-size: 0.68rem; }
  .why-vision-body { font-size: 0.95rem; }
  .vision-steps-grid { grid-template-columns: repeat(2, 1fr); }
  .vision-step-card { padding: 1rem 0.5rem; }
}

/* ═══════════════════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════════════════ */
.breadcrumbs {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
}
.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--accent);
}
.breadcrumb-sep {
  margin: 0 0.35rem;
  opacity: 0.35;
  font-size: 0.65rem;
}
.breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   FREEDOM MAP
   ═══════════════════════════════════════════════════════ */
.map-wrapper {
  margin-bottom: 2.5rem;
  position: relative;
}

/* Black toolbar below map */
.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  border: 1px solid #000;
  border-top: none;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.map-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}
.map-mode-select {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #f5f0e8;
  font-family: var(--font-body);
  font-size: 0.72rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  appearance: auto;
}
.map-mode-select:focus {
  outline: 1px solid rgba(255,255,255,0.4);
}

/* Slider toggle — Dots ↔ Counties */
.map-slider-toggle {
  position: relative;
  display: inline-flex;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
}
.slider-option {
  position: relative;
  z-index: 2;
  padding: 0.3rem 1.1rem;
  min-width: 5.5rem;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: color 0.25s;
  user-select: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.slider-option i {
  font-size: 0.55rem;
}
.slider-option.active {
  color: var(--accent);
}
.slider-option:hover:not(.active) {
  color: rgba(255,255,255,0.8);
}

/* Sliding thumb background */
.slider-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  background: #f5f0e8;
  border-radius: 18px;
  z-index: 1;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Toolbar right group */
.map-toolbar-right-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Tile toggle — Map ↔ Satellite */
.map-tile-toggle {
  display: inline-flex;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
}
.tile-option {
  padding: 0.3rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  user-select: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.tile-option i {
  font-size: 0.6rem;
}
.tile-option.active {
  background: rgba(255,255,255,0.9);
  color: var(--accent);
  font-weight: 600;
}
.tile-option:hover:not(.active) {
  color: rgba(255,255,255,0.85);
}

/* County boundary tooltip */
.county-tooltip {
  font-family: var(--font-body);
  font-size: 0.78rem;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.25rem 0.5rem;
}

.map-container {
  width: 100%;
  height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: none;
  background: var(--bg-card);
}

/* Sepia-tinted tiles for vintage feel */
.map-container .leaflet-tile {
  filter: saturate(0.75) brightness(1.02);
}

/* Themed map controls */
.map-container .leaflet-control-zoom a {
  font-family: var(--font-body);
  background: var(--bg-card);
  color: var(--accent);
  border-color: var(--border);
}
.map-container .leaflet-control-zoom a:hover {
  background: var(--accent);
  color: #f5f0e8;
}

/* Map legend (inside black toolbar) */
.map-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.7);
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.3);
  display: inline-block;
}

/* Leaflet popup theme override */
.leaflet-popup-themed .leaflet-popup-content-wrapper {
  font-family: var(--font-body);
  font-size: 0.85rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}
.leaflet-popup-themed .leaflet-popup-tip {
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.leaflet-popup-themed .leaflet-popup-close-button {
  color: var(--text-muted);
}
.leaflet-control-attribution .leaflet-attribution-flag {
  display: none !important;
}
.leaflet-interactive:focus {
  outline: none !important;
}

.map-popup strong {
  font-family: var(--font-heading);
  font-size: 1rem;
  display: block;
  margin-bottom: 0.15rem;
}
.popup-state {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.6rem;
}
.popup-score {
  padding: 0.4rem 0 0.4rem 0.6rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.popup-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.popup-value {
  font-weight: 700;
  font-size: 1rem;
}
.popup-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.popup-metrics i {
  width: 14px;
  text-align: center;
  margin-right: 0.2rem;
  font-size: 0.7rem;
}
.popup-county-link {
  text-decoration: none;
  color: var(--text);
}
.popup-county-link:hover strong {
  text-decoration: underline;
}
.popup-profile-link {
  display: block;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  font-family: var(--font-body);
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.popup-profile-link:hover {
  text-decoration: underline;
}
.popup-profile-link i {
  font-size: 0.6rem;
  margin-left: 0.2rem;
}

/* ── Map Loading Overlay ── */
.map-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: var(--radius);
  transition: opacity 0.6s ease;
}
.map-loading-overlay.loaded {
  opacity: 0;
  pointer-events: none;
}
.map-loading-icon {
  font-size: 2.8rem;
  color: var(--success);
  animation: map-load-spin 2.5s ease-in-out infinite;
  margin-bottom: 1rem;
}
.map-loading-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.map-loading-bar {
  width: 140px;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}
.map-loading-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--success);
  border-radius: 2px;
  animation: map-load-bar 2.5s ease-in-out infinite;
}
@keyframes map-load-spin {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(90deg) scale(1.05); }
  50%  { transform: rotate(180deg); }
  75%  { transform: rotate(270deg) scale(1.05); }
  100% { transform: rotate(360deg); }
}
@keyframes map-load-bar {
  0%   { width: 0%; }
  50%  { width: 75%; }
  100% { width: 100%; }
}

/* ═══════════════════════════════════════════════════════
   COUNTY PROFILE PAGE
   ═══════════════════════════════════════════════════════ */
.county-profile {
  padding: 0 1.5rem;
}
.county-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.county-profile-header h1 {
  margin-bottom: 0.25rem;
}
.county-profile-state {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.map-connector-wrap {
  display: flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  gap: 40px;
}
.map-connector-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.map-labeled {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.map-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
  text-align: center;
  line-height: 1;
}
.county-mini-map {
  flex-shrink: 0;
  opacity: 0.65;
}

/* ── Satellite Mini-Map ── */
.sat-map-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.sat-mini-map {
  width: 100%;
  height: 100%;
}
.sat-mini-map .leaflet-control-container { display: none; }
.sat-expand-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  z-index: 500;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.15s;
}
.sat-expand-btn:hover { background: rgba(0,0,0,0.8); }

/* ── Satellite Modal ── */
.sat-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.sat-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90vw;
  max-width: 720px;
  padding: 1.2rem;
  position: relative;
  animation: slideUp 0.25s ease;
}
.sat-modal h3 {
  margin: 0 0 0.8rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text);
}
.sat-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.sat-modal-close:hover { color: var(--text); }
.sat-modal-map {
  width: 100%;
  height: 450px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
@media (max-width: 600px) {
  .sat-map-wrap { width: 90px; height: 90px; }
  .map-connector-wrap { gap: 24px; }
  .sat-modal-map { height: 300px; }
  .sat-modal { width: 95vw; padding: 0.8rem; }
}

.county-profile-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.state-description {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}
.state-description p { margin: 0; }
.badge-score {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  line-height: 1;
}
.badge-label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Metric cards */
.county-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
.metric-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.metric-icon {
  font-size: 1.4rem;
  color: var(--text-muted);
  width: 2rem;
  text-align: center;
  flex-shrink: 0;
  padding-top: 0.15rem;
}
.metric-info {
  flex: 1;
}
.metric-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.metric-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.metric-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}
.metric-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.metric-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* Quick facts */
.county-facts {
  margin-bottom: 2rem;
}
.county-facts h2 {
  margin-bottom: 1rem;
}
.facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.fact-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.fact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.fact-icon {
  margin-right: 0.35rem;
  font-size: 0.7rem;
  opacity: 0.7;
}
.fact-value {
  font-weight: 700;
  font-size: 0.85rem;
}

/* Regulation badges */
.reg-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.reg-yes       { background: #1b5e20; color: #c8e6c9; }
.reg-no        { background: #7a1010; color: #ffcdd2; }
.reg-sometimes { background: #8a6a10; color: #fff3cd; }
.reg-unknown   { background: #444; color: #aaa; }

.source-link {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--accent, #b8964e);
  font-size: 0.7rem;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.source-link:hover { opacity: 1; }

/* Research links */
.research-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.research-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.research-link:hover {
  border-color: var(--accent);
  background: var(--card-bg);
}
.research-link i {
  font-size: 1.1rem;
}

/* County actions */
.county-actions {
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-outline:hover {
  background: var(--accent);
  color: #f5f0e8;
}

/* State profile: top counties list */
.state-county-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.state-county-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.state-county-item:hover {
  background: var(--card-bg);
}
.state-county-rank {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}
.state-county-name {
  font-weight: 600;
  flex: 1;
  font-size: 0.9rem;
}
.state-county-city {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.state-county-pop {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  min-width: 5rem;
  text-align: right;
}
.state-county-score {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 2.5rem;
  text-align: right;
}
.state-county-more {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

/* County inline mini-map */
.state-county-map {
  flex-shrink: 0;
  opacity: 0.45;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Where page — inline buttons + empty state */
.where-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  justify-content: center;
}
.where-buttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.where-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}
.where-empty-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.5;
}
.where-empty-state p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 0.95rem;
}
.where-empty-state strong {
  color: var(--text-primary);
}
.where-empty-state h3,
.what-empty-state h3 {
  font-family: "Special Elite", cursive;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

/* ── Shared survey context lines (WHERE, WHAT, HOW empty states) ── */
.survey-context-block {
  margin-bottom: 1.5rem;
}
.survey-context-line {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.survey-context-line i {
  margin-right: 0.3rem;
  color: var(--success, #3d6b3d);
}
.survey-context-line.survey-context-missing i {
  color: var(--text-muted);
  opacity: 0.4;
}
.survey-context-line.survey-context-first i {
  color: var(--text, #1a1a1a);
}
.survey-context-line a {
  color: var(--text, #1a1a1a);
  font-weight: bold;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.survey-empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  animation: survey-pulse 2s ease-in-out infinite;
}
@keyframes survey-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 107, 61, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(61, 107, 61, 0); }
}

/* Category landing page cards (Where, How, Who, What) */
.category-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.category-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1rem;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.category-card:hover {
  background: var(--card-bg);
}
.category-card-icon {
  font-size: 1.4rem;
  width: 2.5rem;
  text-align: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.category-card-info {
  flex: 1;
}
.category-card-info h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.category-card-info p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.category-card .arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* USA States ranked list */
.usa-states-list {
  margin-top: 0.5rem;
}
.usa-states-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
}
.ush-rank { width: 1.5rem; text-align: center; }
.ush-state { flex: 1; }
.ush-counties { width: 4.5rem; text-align: right; }
.ush-pop { width: 6.5rem; text-align: right; }
.ush-land, .ush-water, .ush-solar { width: 3rem; text-align: right; }
.ush-score { width: 3rem; text-align: right; }

.usa-state-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.usa-state-row:hover {
  background: var(--card-bg);
}
.usr-rank {
  width: 1.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.usr-state {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.usr-state strong {
  font-weight: 600;
}
.usr-abbr {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
}
.usr-counties {
  width: 4.5rem;
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.usr-pop {
  width: 6.5rem;
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.usr-land, .usr-water, .usr-solar {
  width: 3rem;
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.usr-score {
  width: 3rem;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .county-metrics-grid { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .county-profile-header { flex-direction: column; gap: 1rem; }
  .state-county-city, .state-county-pop { display: none; }
  .hide-mobile { display: none; }
}

/* ═══════════════════════════════════════════════════════
   COUNTY EXPLORATION
   ═══════════════════════════════════════════════════════ */
.explore-filters {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--bg-card, var(--card-bg));
}
.explore-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.filter-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
}
.filter-group .form-control {
  width: 100%;
  font-size: 0.8rem;
}
.explore-filters-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.explore-active-filters {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0.4rem 0;
}
.explore-active-filters i { color: var(--accent); margin-right: 0.3rem; }

.explore-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}
.explore-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.explore-table thead th {
  padding: 0.5rem 0.5rem;
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.explore-table tbody td {
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.explore-row { cursor: pointer; transition: background 0.15s; }
.explore-row:hover { background: var(--bg-card, var(--card-bg)); }

.explore-th-rank { width: 2rem; text-align: center; }
.explore-th-name { min-width: 10rem; }
.explore-th-state { width: 4rem; }
.explore-th-score { width: 3.5rem; text-align: center; }
.explore-th-reg { width: 2.5rem; text-align: center; }
.explore-th-num { width: 5rem; text-align: right; }

.explore-rank {
  text-align: center;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.explore-name strong { font-weight: 600; }
.explore-city {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.explore-state {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
}
.explore-score { text-align: center; }
.explore-score-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-mono, monospace);
  min-width: 2rem;
  text-align: center;
}
.explore-reg { text-align: center; }
.explore-num {
  text-align: right;
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.reg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.65rem;
  color: #fff;
}
.reg-yes       { background: #3d6b3d; }
.reg-sometimes { background: #b8a830; }
.reg-no        { background: #a02a18; }
.reg-unknown   { background: #666; }

.sort-link {
  text-decoration: none;
  color: var(--text-muted);
  white-space: nowrap;
}
.sort-link:hover { color: var(--text-primary, var(--text)); }
.sort-active { color: var(--text-primary, var(--text)); font-weight: 700; }

.explore-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}
.explore-page-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
}
.explore-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.explore-empty p { margin-top: 0.5rem; }

@media (max-width: 600px) {
  .explore-filters-grid { grid-template-columns: 1fr 1fr; }
  .explore-th-name { min-width: auto; }
}

/* ═══════════════════════════════════════════════════════
   COUNTY TABLE
   ═══════════════════════════════════════════════════════ */
.county-section {
  margin-top: 1rem;
}
.county-section h2 {
  margin-bottom: 0.2rem;
}

/* Table filters bar */
.table-filters {
  display: flex;
  gap: 0.8rem;
  align-items: flex-end;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.filter-group label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.filter-group select.form-control,
.filter-group input.form-control {
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  min-width: 120px;
}
.filter-search {
  flex: 1;
  min-width: 150px;
}
.filter-actions {
  flex-direction: row;
  gap: 0.5rem;
  align-items: flex-end;
  padding-bottom: 1px;
}

/* Table wrapper for horizontal scroll */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg-card);
}

.county-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.county-table thead {
  background: var(--accent);
  color: #f5f0e8;
}
.county-table th {
  padding: 0.65rem 0.8rem;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-bottom: 2px solid #000;
}
.county-table th a.sort-link {
  color: #f5f0e8;
  text-decoration: none;
}
.county-table th a.sort-link:hover {
  color: #fff;
  opacity: 1;
}
.county-table th a.sort-active {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.county-table td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.county-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}
.county-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.015);
}
.county-table tbody tr:nth-child(even):hover {
  background: rgba(0, 0, 0, 0.035);
}

.th-rank, .td-rank {
  width: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.td-county {
  font-weight: 700;
}
.county-name-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.county-name-link:hover {
  border-bottom-color: var(--accent);
}

/* Score bar cell */
.score-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 100px;
}
.score-bar {
  height: 8px;
  border-radius: 4px;
  min-width: 10px;
  transition: width 0.3s;
}
.score-num {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.5rem;
  padding-bottom: 1rem;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-card);
  transition: all 0.15s;
}
.page-link:hover {
  background: var(--accent);
  color: #f5f0e8;
  border-color: var(--accent);
  opacity: 1;
}
.page-link.active {
  background: var(--accent);
  color: #f5f0e8;
  border-color: var(--accent);
  font-weight: 700;
}
.page-ellipsis {
  padding: 0 0.3rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════ */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  .slideshow-overlay h1 { font-size: 2.4rem; }
  .hero-slideshow { height: 70vh; min-height: 400px; }
  .slideshow-arrow { display: none; }
  .container { padding: 1.5rem 1rem; }
  .navbar { padding: 0 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .navbar-links { gap: 0; }
  .home-sections { grid-template-columns: 1fr 1fr; }
  .modal { padding: 1.5rem; margin: 1rem; }
  .begin-question { font-size: 2.2rem; }
  .begin-steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .begin-step:nth-child(2) { transition-delay: 0s; }
  .begin-step:nth-child(3) { transition-delay: 0s; }
  .begin-step:nth-child(4) { transition-delay: 0s; }
  .map-container { height: 350px; }
  .hide-mobile { display: none; }
  .table-filters { flex-direction: column; }
  .filter-search { min-width: 100%; }
}
@media (max-width: 480px) {
  .slideshow-overlay h1 { font-size: 2rem; }
  .slideshow-overlay .tagline { font-size: 0.95rem; }
  .hero-slideshow { height: 65vh; min-height: 350px; }
  .home-sections { grid-template-columns: 1fr; }
  .begin-question { font-size: 1.8rem; }
  .begin-slide { min-height: 80vh; }
  .begin-steps-heading { font-size: 1.8rem; }
}

/* ═══════════════════════════════════════════════════════
   Final Plan — Capstone Story Page
   ═══════════════════════════════════════════════════════ */

/* ── App Index CTA ── */
.app-final-plan-cta {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}
.app-final-plan-cta .btn-lg {
  font-size: 1.1rem;
  padding: 0.9rem 2.5rem;
  letter-spacing: 0.03em;
}

/* ── Incomplete Checklist ── */
.plan-incomplete {
  text-align: center;
  padding: 4rem 1.5rem;
  max-width: 500px;
  margin: 0 auto;
}
.plan-incomplete-icon {
  font-size: 3rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.plan-incomplete-heading {
  font-family: "Special Elite", cursive;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.plan-incomplete-sub {
  color: var(--muted);
  margin-bottom: 2rem;
}
.plan-checklist {
  text-align: left;
}
.plan-check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}
.plan-check-item:last-child { border-bottom: none; }
.plan-check-dot {
  font-size: 1.2rem;
  color: var(--muted);
  width: 1.5rem;
  text-align: center;
}
.plan-check-item.done .plan-check-dot { color: #3d6b3d; }
.plan-check-label {
  font-family: "Special Elite", cursive;
  font-size: 1.1rem;
  font-weight: bold;
  min-width: 60px;
}
.plan-check-desc {
  flex: 1;
  color: var(--muted);
  font-size: 0.85rem;
}
.plan-check-link {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: underline;
}

/* ── Story Slides ── */
.plan-story { padding-bottom: 2rem; }

.plan-slide {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.plan-slide.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Title slide */
.plan-slide--title { min-height: 70vh; }
.plan-ornament {
  font-size: 1.5rem;
  color: var(--muted);
  letter-spacing: 0.5rem;
  margin-bottom: 1.5rem;
}
.plan-title {
  font-family: "Special Elite", cursive;
  font-size: 3rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
.plan-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  font-style: italic;
}
.plan-date {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.plan-scroll-hint {
  margin-top: 2rem;
  font-size: 1.5rem;
  color: var(--muted);
  animation: plan-bounce 2s infinite;
}
@keyframes plan-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Section headings */
.plan-section-icon {
  font-size: 2.5rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}
.plan-slide.visible .plan-section-icon {
  opacity: 1;
  transform: scale(1);
}
.plan-section-heading {
  font-family: "Special Elite", cursive;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Narrative block (WHY) */
.plan-narrative {
  max-width: 650px;
  background: #f5f0e8;
  border-radius: 12px;
  padding: 2rem 2.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #3a2e22;
  text-align: center;
}

/* Destination (WHERE) */
.plan-destination {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 2rem;
  margin-bottom: 1.5rem;
}
.plan-destination-text { display: flex; flex-direction: column; }
.plan-destination-name {
  font-family: "Special Elite", cursive;
  font-size: 1.4rem;
}
.plan-destination-detail {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Chips */
.plan-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 700px;
  margin-bottom: 1.5rem;
}
.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text);
}
.plan-chip i { color: var(--muted); font-size: 0.8rem; }
.plan-chip--accent {
  background: #3d6b3d;
  color: #faf7f2;
  border-color: #3d6b3d;
}
.plan-chip--accent i { color: #c5e1a5; }

/* Stats (WHAT) */
.plan-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.plan-stat {
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  min-width: 140px;
}
.plan-stat-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.plan-stat-value {
  font-family: "Special Elite", cursive;
  font-size: 1.3rem;
}

/* Progress bar (HOW) */
.plan-progress-section {
  width: 100%;
  max-width: 500px;
  margin-top: 1rem;
}
.plan-progress-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.plan-progress-bar {
  height: 12px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.plan-progress-fill {
  height: 100%;
  background: #3d6b3d;
  border-radius: 6px;
  transition: width 1s ease;
}
.plan-progress-text {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
  text-align: center;
}

/* Tags (WHO hobbies/activities) */
.plan-tags-section {
  max-width: 600px;
  margin-top: 1rem;
  text-align: center;
}
.plan-tags-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.4rem;
  margin-top: 0.75rem;
}
.plan-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}
.plan-tag {
  background: #e8dece;
  border-radius: 14px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  color: #3a2e22;
}

/* Closing slide */
.plan-closing-heading {
  font-family: "Special Elite", cursive;
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
.plan-closing-sub {
  color: var(--muted);
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
}
.plan-closing-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .plan-slide { min-height: 70vh; padding: 2rem 1rem; }
  .plan-title { font-size: 2.2rem; }
  .plan-section-heading { font-size: 1.5rem; }
  .plan-narrative { padding: 1.5rem; font-size: 0.95rem; }
  .plan-destination { flex-direction: column; text-align: center; }
  .plan-stats { flex-direction: column; align-items: center; }
  .plan-closing-heading { font-size: 1.6rem; }
}

/* ═══════════════════════════════════════════════════════
   Admin Section
   ═══════════════════════════════════════════════════════ */

.admin-layout {
  display: flex;
  gap: 0;
  min-height: 70vh;
  /* Break out of .container max-width to go full-width */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: -2rem;
  margin-bottom: -2rem;
}
.admin-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #1a1a1a;
  border-right: 1px solid #333;
  padding: 1.5rem 0;
}
.admin-sidebar-title {
  color: #999;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid #333;
  margin-bottom: 0.5rem;
}
.admin-nav {
  display: flex;
  flex-direction: column;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.25rem;
  color: #aaa;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s, color 0.15s;
}
.admin-nav-link:hover {
  background: #2a2a2a;
  color: #eee;
}
.admin-nav-link.active {
  background: #2a2a2a;
  color: #fff;
  border-left: 3px solid var(--success);
  padding-left: calc(1.25rem - 3px);
}
.admin-nav-link i {
  width: 18px;
  text-align: center;
  font-size: 0.8rem;
}
.admin-main {
  flex: 1;
  padding: 2rem 2.5rem;
  min-width: 0;
  overflow-x: auto;
}
.admin-main h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}
.admin-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Admin Cards Grid */
.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.admin-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.admin-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.admin-card-icon {
  font-size: 1.4rem;
  color: var(--text-muted);
  width: 36px;
  text-align: center;
}
.admin-card-body h3 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}
.admin-card-count {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

/* Admin Section */
.admin-section {
  margin-bottom: 2rem;
}
.admin-section h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}
.admin-tools {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th {
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--border);
}
.admin-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.admin-table tbody tr:hover {
  background: rgba(0,0,0,0.02);
}
.admin-table .actions {
  white-space: nowrap;
  text-align: right;
}
.admin-table .actions a,
.admin-table .actions button {
  margin-left: 0.4rem;
}
.admin-table .truncate {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Admin Filters */
.admin-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}
.admin-filters input[type="text"],
.admin-filters select {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
}
.admin-filters input[type="text"] { min-width: 220px; }
.admin-filters .btn { font-size: 0.85rem; }

/* Admin Form */
.admin-form {
  max-width: 700px;
}
.admin-form .form-group {
  margin-bottom: 1.25rem;
}
.admin-form label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="number"],
.admin-form textarea,
.admin-form select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
}
.admin-form textarea {
  min-height: 120px;
  resize: vertical;
}
.admin-form .form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.admin-form .form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Detail show view */
.admin-detail {
  max-width: 800px;
}
.admin-detail-row {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
}
.admin-detail-label {
  width: 160px;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-detail-value {
  flex: 1;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-pending   { background: #e8e0d4; color: #666; }
.badge-running   { background: #d4e8d4; color: #2d5a2d; }
.badge-completed { background: #c4dcc4; color: #1a4a1a; }
.badge-failed    { background: #e8d4d4; color: #6b1a1a; }
.badge-yes       { background: #c4dcc4; color: #1a4a1a; }
.badge-no        { background: #e8e0d4; color: #666; }

/* Pagination */
.admin-pagination {
  display: flex;
  gap: 0.35rem;
  margin-top: 1.5rem;
  align-items: center;
  justify-content: center;
}
.admin-pagination a,
.admin-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}
.admin-pagination a:hover {
  background: var(--bg-card);
  border-color: var(--border);
}
.admin-pagination .current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.admin-pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}
.admin-pagination .info {
  border: none;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Batch Operations */
.batch-terminal {
  background: #1a1a1a;
  color: #6b8e23;
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid #333;
  height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.5;
}
.batch-progress-bar {
  height: 24px;
  background: #e8e0d4;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-light);
}
.batch-progress-fill {
  height: 100%;
  background: var(--success);
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: #fff;
  font-weight: 700;
}
.batch-progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.batch-new-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

/* Admin header bar */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.admin-header h1 {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 0.75rem 0; }
  .admin-nav { flex-direction: row; overflow-x: auto; }
  .admin-nav-link { white-space: nowrap; padding: 0.5rem 0.75rem; }
  .admin-nav-link.active { border-left: none; border-bottom: 3px solid var(--success); padding-left: 0.75rem; }
  .admin-main { padding: 1rem; }
  .admin-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════
   MEMBER DIRECTORY
   ══════════════════════════════════════════════ */

/* Stats bar */
.directory-stats {
  display: flex; gap: 2rem; justify-content: center;
  padding: 1rem 0; margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}
.directory-stat { text-align: center; }
.directory-stat-num {
  display: block; font-family: var(--font-heading);
  font-size: 2rem; line-height: 1; color: var(--text);
}
.directory-stat-label {
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
}

/* Map toolbar */
.directory-map-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-top: none; border-radius: 0 0 8px 8px;
  font-size: 0.8rem; flex-wrap: wrap; gap: 0.5rem;
}
.directory-toolbar-left { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.directory-toolbar-right { display: flex; gap: 1rem; align-items: center; }
.directory-layer-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  cursor: pointer; font-family: var(--font-body);
  color: var(--text-muted); user-select: none;
}
.directory-layer-toggle input[type="checkbox"] {
  width: 14px; height: 14px; accent-color: var(--accent);
}
.directory-legend-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}

/* Filters */
.directory-filters {
  margin: 1.5rem 0; padding: 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px;
}
.directory-filter-row {
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end;
}
.directory-filter-group {
  display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 140px;
}
.directory-filter-group label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted);
  font-family: var(--font-body);
}
.directory-filter-group .pf-select {
  font-size: 0.82rem; padding: 0.4rem 0.5rem;
}
.directory-filter-hint {
  font-size: 0.65rem; color: var(--text-muted); font-style: italic;
}
.directory-filter-actions {
  display: flex; gap: 0.5rem; align-items: flex-end;
  padding-bottom: 1px;
}
.directory-filter-actions .btn {
  font-size: 0.8rem; padding: 0.45rem 0.9rem;
}

/* Card grid */
.directory-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-bottom: 2rem;
}

/* Individual card */
.directory-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.65rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.directory-card:hover {
  border-color: var(--accent); box-shadow: var(--shadow);
}

.directory-card-top { margin-bottom: 0.15rem; }
.directory-card-name {
  font-family: var(--font-heading); font-size: 1.15rem;
  line-height: 1.2;
}
.directory-card-meta {
  font-size: 0.7rem; color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Badges */
.directory-badges {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
}
.directory-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.55rem; border-radius: 20px;
  font-size: 0.7rem; font-family: var(--font-body);
  border: 1px solid var(--border-light);
}
.directory-badge i { font-size: 0.65rem; }
.badge-personality { background: #e8e0d4; color: #3d3020; }
.badge-lifestyle { background: #d4dde8; color: #20303d; }
.badge-vibe { background: #d8e8d4; color: #203d20; }
.badge-flag { background: var(--bg); color: var(--text-muted); }

/* Hobbies */
.directory-hobbies {
  display: flex; flex-wrap: wrap; gap: 0.25rem;
}
.directory-hobby {
  display: inline-block; padding: 0.12rem 0.45rem;
  background: var(--bg); border-radius: 10px;
  font-size: 0.65rem; font-family: var(--font-body);
  color: var(--text-muted);
}
.directory-hobby-more {
  font-style: italic; color: var(--text-muted);
}

/* Social flags */
.directory-flags {
  display: flex; gap: 0.6rem; color: var(--text-muted);
  font-size: 0.85rem; min-height: 1.1rem;
}
.directory-flag { cursor: default; }
.directory-flag:hover { color: var(--accent); }

/* Location */
.directory-location {
  font-size: 0.72rem; color: var(--text-muted);
  font-family: var(--font-body);
}
.directory-location i { margin-right: 0.2rem; font-size: 0.65rem; }

/* View button */
.directory-view-btn {
  margin-top: auto; align-self: flex-start;
  font-size: 0.78rem; padding: 0.35rem 0.75rem;
}

/* Empty state */
.directory-empty {
  text-align: center; padding: 3rem 1rem;
  color: var(--text-muted);
}
.directory-empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.directory-empty h3 {
  font-family: var(--font-heading); font-size: 1.3rem;
  color: var(--text); margin-bottom: 0.5rem;
}

/* ── Profile Modal ── */
.directory-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.directory-modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; width: 100%; max-width: 480px;
  max-height: 85vh; overflow-y: auto;
  padding: 1.75rem; position: relative;
  box-shadow: var(--shadow-lg);
}
.directory-modal-close {
  position: absolute; top: 0.75rem; right: 1rem;
  background: none; border: none; font-size: 1.6rem;
  color: var(--text-muted); cursor: pointer;
  line-height: 1; padding: 0;
}
.directory-modal-close:hover { color: var(--text); }

.directory-modal-header { margin-bottom: 1.25rem; }
.directory-modal-nickname {
  font-family: var(--font-heading); font-size: 1.5rem;
  line-height: 1.2;
}
.directory-modal-since {
  font-size: 0.72rem; color: var(--text-muted);
  margin-top: 0.2rem;
}

.directory-modal-section {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}
.directory-modal-section:last-child { border-bottom: none; }
.directory-modal-label {
  font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  margin-bottom: 0.4rem; font-family: var(--font-body);
}
.directory-modal-label i { margin-right: 0.3rem; }

.directory-modal-email a {
  font-family: var(--font-heading); font-size: 1rem;
  color: var(--accent); text-decoration: underline;
}
.directory-modal-email a:hover { color: var(--accent-hover); }

.directory-modal-badges {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.directory-modal-chips {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
}
.directory-modal-chip {
  display: inline-block; padding: 0.18rem 0.55rem;
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: 12px; font-size: 0.72rem;
  font-family: var(--font-body);
}

/* Social energy meter */
.directory-modal-meter {
  display: flex; gap: 0.3rem; margin-bottom: 0.3rem;
}
.meter-step {
  width: 50px; height: 8px; border-radius: 4px;
  background: var(--border-light);
  transition: background 0.2s ease;
}
.meter-step.active { background: #3d6b3d; }
.meter-step.active[data-step="2"] { background: #6b8a3d; }
.meter-step.active[data-step="3"] { background: #b8860b; }
.directory-modal-meter-label {
  font-size: 0.72rem; color: var(--text-muted);
  font-family: var(--font-body);
}

/* Modal footer */
.directory-modal-footer {
  margin-top: 1.25rem; padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
}
.directory-modal-profile-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1.25rem; font-size: 0.85rem;
  font-family: var(--font-heading);
}

/* Name link in table */
.directory-name-link {
  color: var(--accent); text-decoration: none;
  font-family: var(--font-heading); font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.directory-name-link:hover {
  border-bottom-color: var(--accent);
}

/* Smaller badges in table view */
.directory-table .directory-badge {
  font-size: 0.62rem; padding: 0.12rem 0.35rem;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════
   OPPORTUNITIES
   ═══════════════════════════════════════════════════════ */

/* Compact header */
.opp-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.opp-header-left {
  display: flex; flex-direction: column; gap: 0.15rem;
}
.opp-header-top {
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
}
.opp-header-tagline {
  font-size: 0.82rem; color: var(--text-muted);
  font-family: var(--font-body); font-style: italic;
}
.opp-title {
  font-family: var(--font-heading); font-size: 1.6rem;
  margin: 0; line-height: 1.2;
}
.opp-header-stats {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--text-muted);
  font-family: var(--font-body);
}
.opp-header-sep { opacity: 0.4; }
.opp-header-stat { white-space: nowrap; }

/* Filters */
.opp-filters {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  align-items: flex-end;
  padding: 1rem 1.25rem;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius); margin-bottom: 1.25rem;
}
.opp-filter-group { display: flex; flex-direction: column; gap: 0.2rem; }
.opp-filter-label {
  font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  font-family: var(--font-body);
}
.opp-clear-link {
  font-size: 0.78rem; color: var(--text-muted);
  text-decoration: underline; align-self: center;
}

/* Map legend */
.opp-map-legend {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: center; margin-bottom: 1.25rem;
  font-size: 0.72rem; color: var(--text-muted);
  font-family: var(--font-body);
}
.opp-legend-item {
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.opp-legend-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; border: 1px solid rgba(0,0,0,0.15);
}

/* Map pin styles */
.opp-map-pin { background: transparent !important; border: none !important; }
.opp-you-pin { background: transparent !important; border: none !important; }
.opp-you-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: #e63946; border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.3), 0 1px 4px rgba(0,0,0,0.3);
  animation: opp-pulse 2s ease-in-out infinite;
}
@keyframes opp-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.3), 0 1px 4px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(230, 57, 70, 0.1), 0 1px 4px rgba(0,0,0,0.3); }
}

/* View bar */
.opp-view-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.opp-results-count {
  font-size: 0.85rem; color: var(--text-muted);
  font-family: var(--font-body);
}
.opp-radius-note {
  font-size: 0.75rem; color: var(--text-muted); font-style: italic;
  margin-left: 0.3rem;
}

/* Table view */
.opp-table-wrap {
  overflow-x: auto; margin-bottom: 2rem;
  border: 1px solid var(--border-light); border-radius: var(--radius);
}
.opp-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.85rem; font-family: var(--font-body);
}
.opp-table th {
  text-align: left; padding: 0.6rem 0.75rem;
  font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  font-family: var(--font-body); white-space: nowrap;
}
.opp-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.opp-table-row:hover { background: rgba(0,0,0,0.02); }
.opp-table-title { max-width: 280px; }
.opp-name-link {
  color: var(--accent); text-decoration: none;
  font-family: var(--font-heading); font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.opp-name-link:hover { border-bottom-color: var(--accent); }
.opp-table-date { white-space: nowrap; }
.opp-table-loc { white-space: nowrap; color: var(--text-muted); }
.opp-table-author { white-space: nowrap; }
.opp-table-muted { color: var(--text-muted); font-style: italic; }
.opp-badge-sm { font-size: 0.62rem; padding: 0.12rem 0.35rem; }

/* Grid */
.opp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* Card */
.opp-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 8px; padding: 1.25rem;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.opp-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.opp-card-category {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.opp-card-title {
  font-family: var(--font-heading); font-size: 1.15rem;
  line-height: 1.3; margin: 0.15rem 0;
}
.opp-card-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  font-size: 0.78rem; color: var(--text-muted);
  align-items: center;
}
.opp-card-location {
  font-size: 0.78rem; color: var(--text-muted);
}
.opp-card-location i { margin-right: 0.2rem; }
.opp-card-desc {
  font-size: 0.82rem; color: var(--text-muted);
  line-height: 1.5; margin: 0;
}
.opp-card-footer {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; color: var(--text-muted);
  margin-top: auto; padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}
.opp-card-author { flex: 1; }
.opp-card-actions {
  display: flex; gap: 0.4rem; margin-top: 0.35rem;
}

/* Badges */
.opp-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.55rem; border-radius: 12px;
  font-size: 0.7rem; font-family: var(--font-body);
  line-height: 1.4; white-space: nowrap;
}
.opp-badge-category {
  background: var(--bg); border: 1px solid var(--border-light);
  color: var(--text);
}
.opp-badge-offering {
  background: #e8f0e8; border: 1px solid #b5ccb5;
  color: #3d6b3d;
}
.opp-badge-seeking {
  background: #f5edd8; border: 1px solid #d4c49a;
  color: #8b6914;
}
.opp-badge-recurrence {
  background: var(--bg); border: 1px solid var(--border-light);
  color: var(--text-muted); font-size: 0.65rem;
}
.opp-badge-own {
  background: #f0ece4; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.62rem;
}
.opp-ongoing { color: var(--text-muted); font-style: italic; }

/* Empty state */
.opp-empty {
  text-align: center; padding: 3rem 1rem;
  color: var(--text-muted);
}
.opp-empty i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.opp-empty h3 {
  font-family: var(--font-heading); font-size: 1.3rem;
  color: var(--text); margin-bottom: 0.5rem;
}
.opp-empty p { margin-bottom: 1.25rem; }

/* ── Modals ── */
.opp-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.opp-modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; width: 100%; max-width: 520px;
  max-height: 85vh; overflow-y: auto;
  padding: 1.75rem; position: relative;
  box-shadow: var(--shadow-lg);
}
.opp-modal-wide { max-width: 600px; }
.opp-modal-close {
  position: absolute; top: 0.75rem; right: 1rem;
  background: none; border: none; font-size: 1.6rem;
  color: var(--text-muted); cursor: pointer;
  line-height: 1; padding: 0;
}
.opp-modal-close:hover { color: var(--text); }
.opp-modal-title {
  font-family: var(--font-heading); font-size: 1.35rem;
  line-height: 1.3; margin-bottom: 1rem;
}

/* Detail modal sections */
.opp-detail-header {
  display: flex; gap: 0.4rem; margin-bottom: 0.5rem;
}
.opp-detail-section {
  margin-bottom: 0.85rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}
.opp-detail-section:last-child { border-bottom: none; }
.opp-detail-label {
  font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  margin-bottom: 0.3rem; font-family: var(--font-body);
}
.opp-detail-label i { margin-right: 0.25rem; }
.opp-detail-desc {
  font-size: 0.88rem; line-height: 1.6;
  white-space: pre-wrap;
}
.opp-detail-author { font-family: var(--font-heading); font-size: 1rem; }
.opp-detail-since {
  font-size: 0.72rem; color: var(--text-muted);
  margin-left: 0.5rem; font-family: var(--font-body);
}
.opp-detail-actions {
  margin-top: 1rem; padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  display: flex; gap: 0.5rem;
}

/* ── Create Form ── */
.opp-create-form { display: flex; flex-direction: column; gap: 0.85rem; }
.opp-form-group { display: flex; flex-direction: column; gap: 0.25rem; }
.opp-form-label {
  font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted);
  font-family: var(--font-body);
}
.opp-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.opp-radio-row { display: flex; gap: 1.25rem; align-items: center; padding-top: 0.3rem; }
.opp-radio-label {
  font-size: 0.88rem; font-family: var(--font-body);
  display: flex; align-items: center; gap: 0.3rem;
  cursor: pointer;
}
.opp-form-actions {
  display: flex; gap: 0.75rem; padding-top: 0.5rem;
}
.opp-form-errors {
  background: #fdf0ed; border: 1px solid #e5c2b8;
  border-radius: var(--radius); padding: 0.75rem;
  font-size: 0.82rem; color: var(--danger);
}
.opp-form-errors p { margin: 0.15rem 0; }

/* Location search */
.opp-location-wrap { position: relative; }
.opp-location-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); z-index: 100;
  max-height: 200px; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.opp-location-option {
  padding: 0.5rem 0.75rem; cursor: pointer;
  font-size: 0.85rem; font-family: var(--font-body);
  border-bottom: 1px solid var(--border-light);
}
.opp-location-option:last-child { border-bottom: none; }
.opp-location-option:hover { background: var(--bg); }
.opp-location-option small { color: var(--text-muted); }
.opp-location-selected {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.65rem; margin-top: 0.3rem;
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: 12px; font-size: 0.82rem;
  font-family: var(--font-body);
}
.opp-location-clear {
  background: none; border: none; font-size: 1.1rem;
  cursor: pointer; color: var(--text-muted); padding: 0; line-height: 1;
}
.opp-location-clear:hover { color: var(--danger); }

/* Button helpers */
.btn-sm {
  padding: 0.3rem 0.7rem; font-size: 0.78rem;
  font-family: var(--font-heading);
}
.btn-muted {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-muted:hover { background: var(--border-light); }
.btn-danger {
  background: var(--danger); color: #fff; border: none;
}
.btn-danger:hover { opacity: 0.9; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .opp-grid { grid-template-columns: repeat(2, 1fr); }
  .opp-form-row-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .opp-grid { grid-template-columns: 1fr; }
  .opp-filters { flex-direction: column; }
  .opp-header { flex-direction: column; align-items: flex-start; }
  .opp-header-left { flex-direction: column; gap: 0.25rem; }
  .opp-modal { padding: 1.25rem; }
  .opp-modal-title { font-size: 1.15rem; }
}

/* ── Map Cluster & Popup Styles ── */
.directory-cluster { background: transparent !important; }

/* Kill default MarkerCluster blue hover/spiderfy highlight */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow { transition: none !important; }
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large { background: transparent !important; }
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div { background: transparent !important; }
.marker-cluster { background: transparent !important; }
.leaflet-marker-icon.leaflet-interactive:focus { outline: none !important; }

/* Flow arrowheads */
.flow-arrowhead { background: transparent !important; border: none !important; }
.cluster-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 0.85rem;
  font-weight: bold; color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.cluster-current { background: #2d5a27; }
.cluster-dest { background: #d48a1a; }

.map-popup-title {
  font-family: var(--font-heading); font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.map-popup-count {
  font-size: 0.75rem; color: #666; margin-bottom: 0.5rem;
}
.map-popup-member {
  font-size: 0.78rem; padding: 0.15rem 0;
  border-bottom: 1px solid #eee;
}
.map-popup-member:last-child { border-bottom: none; }
.map-popup-badge {
  display: inline-block; font-size: 0.6rem;
  background: #e8e0d4; padding: 0.1rem 0.35rem;
  border-radius: 8px; margin-left: 0.3rem;
}
.map-popup-more {
  font-size: 0.7rem; color: #999; font-style: italic;
  padding-top: 0.25rem;
}

/* Pulse animation for user's pin */
.pulse-pin {
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { stroke-opacity: 0.6; stroke-width: 2; }
  50% { stroke-opacity: 0.2; stroke-width: 4; }
  100% { stroke-opacity: 0.6; stroke-width: 2; }
}

/* ── View Toggle Bar ── */
.directory-view-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem; padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}
.directory-result-count {
  font-size: 0.8rem; color: var(--text-muted);
  font-family: var(--font-body);
}
.directory-view-toggle {
  display: flex; gap: 0; border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
}
.view-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 32px; font-size: 0.85rem;
  color: var(--text-muted); background: var(--bg-card);
  text-decoration: none; transition: all 0.12s ease;
  border-right: 1px solid var(--border);
}
.view-toggle-btn:last-child { border-right: none; }
.view-toggle-btn:hover { color: var(--text); background: var(--bg); }
.view-toggle-btn.active {
  color: #fff; background: var(--accent);
}

/* ── List / Table View ── */
.directory-table-wrap {
  overflow-x: auto; margin-bottom: 1.5rem;
  border: 1px solid var(--border); border-radius: 8px;
}
.directory-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem; font-family: var(--font-body);
}
.directory-table th {
  text-align: left; padding: 0.6rem 0.75rem;
  font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  background: var(--bg); border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.directory-table td {
  padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.directory-table-row { transition: background 0.1s ease; }
.directory-table-row:hover { background: var(--bg); }
.directory-table-name strong {
  font-family: var(--font-heading); font-size: 0.9rem;
  display: block;
}
.directory-table-meta {
  font-size: 0.65rem; color: var(--text-muted);
}
.directory-table-loc {
  font-size: 0.78rem; color: var(--text-muted); white-space: nowrap;
}
.directory-table .directory-badge { font-size: 0.65rem; padding: 0.15rem 0.4rem; }
.directory-table .directory-view-btn {
  font-size: 0.72rem; padding: 0.25rem 0.5rem;
}

/* ── Directory Responsive ── */
@media (max-width: 900px) {
  .directory-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .directory-grid { grid-template-columns: 1fr; }
  .directory-stats { gap: 1rem; }
  .directory-stat-num { font-size: 1.5rem; }
  .directory-filter-row { flex-direction: column; }
  .directory-filter-group { min-width: 100%; }
  .directory-modal { padding: 1.25rem; }
  .directory-modal-nickname { font-size: 1.25rem; }
  .meter-step { width: 40px; }
  .directory-table th:nth-child(4),
  .directory-table td:nth-child(4),
  .directory-table th:nth-child(6),
  .directory-table td:nth-child(6) { display: none; }
}

/* ═══════════════════════════════════════════════════════
   MARKETPLACE
   ═══════════════════════════════════════════════════════ */

/* Compact header */
.mkt-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.mkt-header-left {
  display: flex; flex-direction: column; gap: 0.15rem;
}
.mkt-header-top {
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
}
.mkt-title {
  font-family: var(--font-heading); font-size: 1.6rem;
  margin: 0; line-height: 1.2;
}
.mkt-header-tagline {
  font-size: 0.82rem; color: var(--text-muted);
  font-family: var(--font-body); font-style: italic;
}
.mkt-header-stats {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--text-muted);
  font-family: var(--font-body);
}
.mkt-header-sep { opacity: 0.4; }
.mkt-header-stat { white-space: nowrap; }

/* Filters */
.mkt-filters {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  align-items: flex-end;
  padding: 1rem; background: var(--bg-card);
  border: 1px solid var(--border-light); border-radius: var(--radius);
  margin-bottom: 1.25rem;
}
.mkt-filter-group { display: flex; flex-direction: column; gap: 0.2rem; min-width: 140px; flex: 1; }
.mkt-filter-label {
  display: block; font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  margin-bottom: 0.3rem; font-family: var(--font-body);
}
.mkt-search-wrap { position: relative; flex: 2; min-width: 180px; }
.mkt-search-input {
  width: 100%; padding-left: 2.2rem !important;
}
.mkt-search-icon {
  position: absolute; left: 0.75rem; bottom: 0.65rem;
  color: var(--text-muted); opacity: 0.5; font-size: 0.85rem; pointer-events: none;
}
.mkt-clear-link {
  font-size: 0.78rem; color: var(--text-muted);
  text-decoration: underline; white-space: nowrap;
  align-self: flex-end; padding-bottom: 0.6rem;
}

/* View bar */
.mkt-view-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem; padding: 0.5rem 0; flex-wrap: wrap; gap: 0.5rem;
}
.mkt-results-count {
  font-size: 0.82rem; color: var(--text-muted); font-family: var(--font-body);
}
.mkt-radius-note { font-size: 0.75rem; opacity: 0.7; }

/* Card grid */
.mkt-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.mkt-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s; cursor: default;
  display: flex; flex-direction: column;
}
.mkt-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* Card photo */
.mkt-card-photo {
  height: 180px; overflow: hidden; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.mkt-card-photo img {
  width: 100%; height: 100%; object-fit: cover;
}
.mkt-card-photo-placeholder {
  font-size: 2.5rem; color: var(--text-muted); opacity: 0.3;
}

/* Card body */
.mkt-card-body { padding: 0.85rem 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.mkt-card-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.mkt-card-title {
  font-family: var(--font-heading); font-size: 1rem;
  margin: 0; line-height: 1.3;
}
.mkt-card-price {
  font-family: var(--font-heading); font-size: 1.1rem;
  color: var(--success);
}
.mkt-card-meta {
  font-size: 0.75rem; color: var(--text-muted);
  display: flex; gap: 0.75rem; flex-wrap: wrap;
}
.mkt-card-desc {
  font-size: 0.8rem; color: var(--text-muted);
  margin: 0; line-height: 1.5; flex: 1;
}
.mkt-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.72rem; color: var(--text-muted); margin-top: auto;
  padding-top: 0.5rem; border-top: 1px solid var(--border-light);
}
.mkt-card-actions {
  display: flex; gap: 0.5rem; padding: 0.6rem 1rem;
  border-top: 1px solid var(--border-light);
}

/* Badges */
.mkt-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.55rem; border-radius: 12px;
  font-size: 0.7rem; font-family: var(--font-body);
  white-space: nowrap;
}
.mkt-badge-sm { font-size: 0.65rem; padding: 0.15rem 0.45rem; }
.mkt-badge-category {
  background: rgba(0,0,0,0.06); color: var(--text);
  border: 1px solid var(--border-light);
}
.mkt-badge-selling {
  background: rgba(61,107,61,0.1); color: var(--success);
  border: 1px solid rgba(61,107,61,0.3);
}
.mkt-badge-looking_for {
  background: rgba(139,37,0,0.08); color: var(--danger);
  border: 1px solid rgba(139,37,0,0.2);
}
.mkt-badge-condition {
  background: var(--bg); border: 1px solid var(--border-light);
  color: var(--text-muted);
}
.mkt-badge-own {
  background: rgba(0,0,0,0.04); color: var(--text-muted);
  font-size: 0.65rem;
}
.mkt-badge-free {
  background: rgba(61,107,61,0.1); color: #3d6b3d;
  font-weight: bold;
}
.mkt-badge-barter {
  background: rgba(139,94,60,0.12); color: #8b5e3c;
}

/* Table view */
.mkt-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
.mkt-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-body); font-size: 0.82rem;
}
.mkt-table th {
  text-align: left; padding: 0.5rem 0.6rem;
  font-size: 0.65rem; letter-spacing: 0.08em;
  color: var(--text-muted); border-bottom: 2px solid var(--border-light);
  white-space: nowrap; text-transform: uppercase;
}
.mkt-table td {
  padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.mkt-table-row:hover { background: rgba(0,0,0,0.02); }
.mkt-table-title { max-width: 220px; }
.mkt-table-thumb {
  width: 40px; height: 30px; border-radius: 4px;
  object-fit: cover; background: #e8e3d9;
}
.mkt-table-thumb-placeholder {
  width: 40px; height: 30px; border-radius: 4px;
  background: #e8e3d9; display: flex; align-items: center;
  justify-content: center; font-size: 0.7rem; color: var(--text-muted);
}
.mkt-table-price { font-family: var(--font-heading); white-space: nowrap; }
.mkt-table-muted { color: var(--text-muted); font-style: italic; }
.mkt-name-link {
  color: var(--text-dark); text-decoration: none;
  font-family: var(--font-heading);
}
.mkt-name-link:hover { text-decoration: underline; }

/* Empty state */
.mkt-empty {
  text-align: center; padding: 3rem 1rem;
  color: var(--text-muted);
}
.mkt-empty i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; opacity: 0.5; }
.mkt-empty h3 { font-family: var(--font-heading); margin-bottom: 0.5rem; }
.mkt-empty p { font-size: 0.85rem; margin-bottom: 1rem; }

/* Map legend */
.mkt-map-legend {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;
  margin-bottom: 1rem; font-size: 0.72rem; color: var(--text-muted);
}
.mkt-legend-item { display: flex; align-items: center; gap: 0.3rem; }
.mkt-legend-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; border: 1px solid rgba(255,255,255,0.5);
}

/* Modals */
.mkt-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.mkt-modal {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 10px; padding: 1.5rem; position: relative;
  max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.mkt-modal-wide { max-width: 640px; }
.mkt-modal-close {
  position: absolute; top: 0.75rem; right: 1rem;
  background: none; border: none; font-size: 1.5rem;
  color: var(--text-muted); cursor: pointer; line-height: 1;
}
.mkt-modal-close:hover { color: var(--text-dark); }
.mkt-modal-title {
  font-family: var(--font-heading); font-size: 1.3rem;
  margin: 0 0 1rem;
}

/* Create / edit form */
.mkt-create-form { display: flex; flex-direction: column; gap: 0.85rem; }
.mkt-form-group { display: flex; flex-direction: column; gap: 0.2rem; }
.mkt-form-label {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.005em;
  color: var(--text); font-family: var(--font-body); margin-bottom: 0.1rem;
}
.mkt-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.mkt-form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
.mkt-form-errors {
  background: #fef2f2; border: 1px solid #e8c4c4;
  border-radius: 6px; padding: 0.6rem 0.8rem; margin-bottom: 0.5rem;
}
.mkt-form-errors p { margin: 0; font-size: 0.78rem; color: #9b2c2c; }
.mkt-radio-row { display: flex; gap: 1rem; align-items: center; padding: 0.3rem 0; }
.mkt-radio-label { font-size: 0.85rem; cursor: pointer; display: flex; gap: 0.3rem; align-items: center; }
.mkt-form-actions { display: flex; gap: 0.75rem; padding-top: 0.5rem; }

/* ── Unified form inputs (pf-* used in modals & filters) ── */
.pf-input, .pf-select, .pf-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.pf-input::placeholder, .pf-textarea::placeholder { color: var(--text-soft); }
.pf-input:hover, .pf-select:hover, .pf-textarea:hover { border-color: var(--border-strong); }
.pf-input:focus, .pf-select:focus, .pf-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.pf-textarea { resize: vertical; min-height: 104px; }
.pf-select {
  cursor: pointer;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235f6b63'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px;
}
/* File picker buttons */
.mkt-photo-upload-input { font-family: var(--font-body); font-size: 0.85rem; color: var(--text-muted); }
.mkt-photo-upload-input::file-selector-button,
.pf-input[type="file"]::file-selector-button {
  font-family: var(--font-body); font-weight: 600; font-size: 0.82rem;
  background: var(--accent-soft); color: var(--accent-hover);
  border: none; border-radius: var(--radius-pill);
  padding: 0.45rem 0.95rem; margin-right: 0.8rem; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mkt-photo-upload-input::file-selector-button:hover,
.pf-input[type="file"]::file-selector-button:hover { background: var(--accent); color: #fff; }

/* Pricing conditional fields */
.mkt-pricing-field { display: none; }
.mkt-pricing-field.active { display: flex; }

/* Photo upload */
.mkt-photo-upload { margin-top: 0.25rem; }
.mkt-photo-upload-input {
  font-size: 0.8rem; font-family: var(--font-body);
}
.mkt-photo-previews {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem;
}
.mkt-photo-preview {
  width: 80px; height: 60px; border-radius: 6px;
  object-fit: cover; border: 1px solid var(--border-light);
}

/* Existing photos (edit form) */
.mkt-existing-photos {
  display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem;
}
.mkt-existing-photo {
  position: relative; width: 100px; height: 75px;
}
.mkt-existing-photo img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border-light);
}
.mkt-existing-photo label {
  position: absolute; top: -6px; right: -6px;
  background: #e63946; color: #fff; border-radius: 50%;
  width: 20px; height: 20px; display: flex;
  align-items: center; justify-content: center;
  font-size: 0.65rem; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.mkt-existing-photo input[type="checkbox"] { display: none; }
.mkt-existing-photo.marked-remove { opacity: 0.4; }

/* Location search (reuse opp pattern) */
.mkt-location-wrap { position: relative; }
.mkt-location-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-top: none; border-radius: 0 0 6px 6px;
  max-height: 200px; overflow-y: auto; z-index: 10;
}
.mkt-location-option {
  padding: 0.4rem 0.6rem; cursor: pointer;
  font-size: 0.82rem;
}
.mkt-location-option:hover { background: rgba(0,0,0,0.04); }
.mkt-location-selected {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.6rem; background: rgba(61,107,61,0.08);
  border-radius: 6px; font-size: 0.82rem; margin-top: 0.3rem;
}
.mkt-location-clear {
  background: none; border: none; font-size: 1.1rem;
  color: var(--text-muted); cursor: pointer; margin-left: auto;
}

/* Detail modal sections */
.mkt-detail-header { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.mkt-detail-section { margin-bottom: 0.85rem; }
.mkt-detail-label {
  font-size: 0.65rem; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 0.2rem;
  text-transform: uppercase;
}
.mkt-detail-desc {
  font-size: 0.85rem; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.mkt-detail-price {
  font-family: var(--font-heading); font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.mkt-detail-author {
  display: flex; align-items: center; gap: 0.5rem;
}
.mkt-detail-since { font-size: 0.72rem; color: var(--text-muted); }
.mkt-detail-actions {
  display: flex; gap: 0.5rem; margin-top: 1rem;
  padding-top: 0.75rem; border-top: 1px solid var(--border-light);
}

/* Photo gallery in detail modal */
.mkt-gallery { margin-bottom: 1rem; }
.mkt-gallery-main {
  width: 100%; aspect-ratio: 4/3; border-radius: 8px;
  overflow: hidden; background: #e8e3d9;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.mkt-gallery-main img {
  width: 100%; height: 100%; object-fit: contain;
  background: #e8e3d9;
}
.mkt-gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5); color: #fff;
  border: none; border-radius: 50%; width: 32px; height: 32px;
  cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.mkt-gallery-nav:hover { background: rgba(0,0,0,0.7); }
.mkt-gallery-prev { left: 8px; }
.mkt-gallery-next { right: 8px; }
.mkt-gallery-thumbs {
  display: flex; gap: 0.4rem; margin-top: 0.5rem; overflow-x: auto;
}
.mkt-gallery-thumb {
  width: 56px; height: 42px; border-radius: 4px;
  object-fit: cover; cursor: pointer; border: 2px solid transparent;
  opacity: 0.6; transition: opacity 0.15s, border-color 0.15s;
}
.mkt-gallery-thumb:hover, .mkt-gallery-thumb.active {
  opacity: 1; border-color: var(--text-dark);
}

/* Edit card */
.mkt-edit-card {
  max-width: 640px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 8px; padding: 1.5rem;
}

/* Profile sections for marketplace + opportunities */
.profile-section-listings {
  margin-top: 1.5rem; padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}
.profile-section-heading {
  font-family: var(--font-heading); font-size: 1rem;
  margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem;
}
.profile-section-count {
  font-family: var(--font-body); font-size: 0.72rem;
  color: var(--text-muted);
}
/* My Why on profile */
.why-profile-answers {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.why-profile-row {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.85rem; color: var(--text);
}
.why-profile-icon {
  width: 24px; text-align: center;
  color: var(--text-muted); font-size: 0.8rem;
}
.why-profile-label {
  font-family: var(--font-body);
}

.profile-listings-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
}
.profile-listing-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 6px; overflow: hidden; text-decoration: none;
  color: inherit; transition: box-shadow 0.2s;
}
.profile-listing-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.profile-listing-thumb {
  aspect-ratio: 3/2; overflow: hidden; background: #e8e3d9;
  display: flex; align-items: center; justify-content: center;
}
.profile-listing-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.profile-listing-thumb-placeholder {
  font-size: 1.5rem; color: var(--text-muted); opacity: 0.3;
}
.profile-listing-info { padding: 0.5rem; }
.profile-listing-title {
  font-family: var(--font-heading); font-size: 0.8rem;
  margin: 0 0 0.15rem; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-listing-price {
  font-size: 0.75rem; font-family: var(--font-heading);
}
.profile-opp-list { display: flex; flex-direction: column; gap: 0.5rem; }
.profile-opp-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.6rem; background: var(--bg-card);
  border: 1px solid var(--border-light); border-radius: 6px;
  text-decoration: none; color: inherit; font-size: 0.8rem;
  transition: box-shadow 0.15s;
}
.profile-opp-item:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.profile-opp-title {
  font-family: var(--font-heading); flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-opp-date { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.profile-view-all {
  display: block; text-align: center; font-size: 0.78rem;
  color: var(--text-muted); margin-top: 0.75rem;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .mkt-grid { grid-template-columns: repeat(2, 1fr); }
  .mkt-form-row-2 { grid-template-columns: 1fr; }
  .mkt-form-row-3 { grid-template-columns: 1fr; }
  .profile-listings-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .mkt-grid { grid-template-columns: 1fr; }
  .mkt-filters { flex-direction: column; }
  .mkt-filter-group { min-width: 100%; }
  .mkt-header { flex-direction: column; align-items: flex-start; }
  .mkt-header-left { flex-direction: column; gap: 0.25rem; }
  .mkt-modal { padding: 1.25rem; }
  .mkt-modal-title { font-size: 1.15rem; }
  .profile-listings-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   LAND LISTINGS — Zillow / HipCamp style browse + detail
   ═══════════════════════════════════════════════════════ */
.listings-page { margin-top: 0.25rem; }

.listings-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.listings-header-text h1 { font-size: 2rem; margin-bottom: 0.15em; }
.listings-sub { color: var(--text-muted); margin: 0; font-size: 1rem; }

/* ── Filter bar ── */
.listings-filters {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.lst-search {
  position: relative;
  flex: 1 1 280px;
  min-width: 220px;
}
.lst-search i {
  position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%);
  color: var(--text-soft); font-size: 0.9rem;
}
.lst-search input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lst-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.lst-pill-select {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.6rem 2rem 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235f6b63'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 14px;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.lst-pill-select:hover { border-color: var(--border-strong); }
.lst-pill-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.lst-pill-sort { margin-left: auto; }
.lst-clear {
  font-size: 0.88rem; font-weight: 600; color: var(--accent);
  text-decoration: none; padding: 0.5rem 0.5rem;
}
.lst-clear:hover { color: var(--accent-hover); opacity: 1; }

/* ── Split view ── */
.listings-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 1.75rem;
  align-items: start;
}
/* Expanded "map view" — map goes full-width and tall, results flow below */
.listings-split.map-expanded {
  grid-template-columns: 1fr;
}
.listings-split.map-expanded .listings-map-col {
  position: static;
  order: -1;
  margin-bottom: 1.75rem;
}
.listings-split.map-expanded #land-map {
  height: 78vh;
  min-height: 560px;
}
.listings-results { min-width: 0; }
.listings-results-head {
  display: flex; align-items: baseline; gap: 0.6rem;
  margin-bottom: 1rem;
}
.listings-results-count { font-size: 1.2rem; margin: 0; }
.listings-results-note { color: var(--text-muted); font-size: 0.95rem; }

.listings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
/* Dashboard saved-listings section */
.mc-saved-section { max-width: var(--max-w); margin: 0 auto 2rem; }
.mc-saved-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; }
.mc-saved-head h3 { font-family: var(--font-heading); font-size: 1.15rem; margin: 0; }
.mc-saved-head h3 i { color: #e0306a; margin-right: 0.4rem; }
.mc-saved-viewall { font-size: 0.85rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.mc-saved-viewall:hover { color: var(--accent-hover); opacity: 1; }

/* Full-width grid (no map) — favorites page, dashboard */
.listings-grid--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .listings-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .listings-grid--wide { grid-template-columns: 1fr; } }

/* ── Listing card ── */
.lst-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.lst-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  opacity: 1;
}
.lst-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-subtle);
  overflow: hidden;
}
.lst-card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.lst-card:hover .lst-card-media img { transform: scale(1.04); }

.lst-badge {
  position: absolute; top: 0.7rem; left: 0.7rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em;
  padding: 0.3rem 0.6rem; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.95); color: var(--text);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(2px);
}
.lst-badge-pop      { background: #fff3d6; color: #946200; }
.lst-badge-new      { background: var(--accent); color: #fff; }
.lst-badge-off_grid { background: #1f4738; color: #eafff3; }
.lst-badge-hybrid   { background: #e7f1ea; color: #2f6b4f; }
.lst-badge-on_grid  { background: #eef1ef; color: #5f6b63; }

.lst-heart {
  position: absolute; top: 0.55rem; right: 0.55rem;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(255,255,255,0.92);
  color: #9aa49c; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-xs);
  transition: transform 0.12s, color 0.15s, background 0.15s;
}
.lst-heart:hover { transform: scale(1.1); color: #e0607a; }
.lst-heart.saved { color: #e0306a; background: #fff; }

.lst-card-type {
  position: absolute; bottom: 0.7rem; left: 0.7rem;
  font-size: 0.72rem; font-weight: 600;
  padding: 0.25rem 0.6rem; border-radius: var(--radius-pill);
  background: rgba(22,32,27,0.78); color: #fff;
  backdrop-filter: blur(2px);
}

.lst-card-body { padding: 0.85rem 0.95rem 1rem; }
.lst-card-price {
  font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text); line-height: 1.1;
}
.lst-card-from { font-size: 0.72rem; font-weight: 600; color: var(--text-soft); margin-left: 0.2rem; }
.lst-card-title {
  font-weight: 600; font-size: 0.98rem; margin-top: 0.2rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lst-card-loc {
  color: var(--text-muted); font-size: 0.86rem; margin-top: 0.15rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lst-card-loc i { color: var(--text-soft); margin-right: 0.15rem; }
.lst-card-stats {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem;
  margin-top: 0.7rem; padding-top: 0.7rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem; color: var(--text-muted);
}
.lst-card-stats i { color: var(--accent); margin-right: 0.25rem; }

/* ── Sticky map column ── */
.listings-map-col { position: sticky; top: 84px; }
.listings-map-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.listings-map-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
}
.listings-map-head-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.listings-map-head strong { display: block; font-size: 0.95rem; }
.listings-map-head strong i { color: var(--accent); margin-right: 0.3rem; }
.listings-map-head span { font-size: 0.82rem; color: var(--text-muted); }
.lst-map-expand {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--bg-subtle); border: 1px solid var(--border);
  color: var(--text); font-weight: 600; font-size: 0.82rem;
  padding: 0.4rem 0.7rem; border-radius: var(--radius-pill);
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.lst-map-expand:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
.lst-map-expand i { font-size: 0.85rem; }
#land-map {
  height: calc(100vh - 150px);
  min-height: 620px;
  width: 100%;
  position: relative;
  background: var(--bg-subtle);
}

/* Price pin markers — color-coded by listing type */
.land-price-pin-wrap { background: transparent; border: none; }
.land-price-pin {
  background: var(--lst-sale, #2f6b4f);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.9);
  font-weight: 700; font-size: 0.78rem;
  padding: 0.22rem 0.6rem; border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(16,32,27,0.3);
  white-space: nowrap; text-align: center;
  transition: transform 0.12s, box-shadow 0.12s;
}
.land-price-pin--sale      { background: #2f6b4f; }  /* forest green */
.land-price-pin--rent      { background: #b45309; }  /* amber */
.land-price-pin--subdivide { background: #1a6b8a; }  /* teal-blue */
.land-price-pin--community { background: #6d4c9f; }  /* purple */
.land-price-pin-wrap:hover .land-price-pin {
  transform: scale(1.1); z-index: 1000;
  box-shadow: 0 4px 12px rgba(16,32,27,0.45);
}

/* Marker cluster bubbles (zoomed-out grouping) */
.land-cluster-wrap { background: transparent; }
.land-cluster {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff; font-weight: 700; font-size: 0.9rem;
  border: 3px solid rgba(255,255,255,0.92);
  box-shadow: 0 2px 8px rgba(16,32,27,0.35);
}
.land-cluster-wrap:hover .land-cluster { background: var(--accent-hover); }

/* Map legend */
.listings-map-legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem;
  margin-top: 0.6rem;
}
.lst-legend-item {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; color: var(--text-muted); font-weight: 500;
}
.lst-legend-dot {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.9);
  box-shadow: 0 1px 2px rgba(16,32,27,0.25);
  flex-shrink: 0;
}
.lst-legend-dot--sale      { background: #2f6b4f; }
.lst-legend-dot--rent      { background: #b45309; }
.lst-legend-dot--subdivide { background: #1a6b8a; }
.lst-legend-dot--community { background: #6d4c9f; }

/* ── Empty state ── */
.listings-empty {
  text-align: center; padding: 4rem 1rem; color: var(--text-muted);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.listings-empty i { font-size: 2.5rem; color: var(--accent); opacity: 0.5; }
.listings-empty h3 { margin: 1rem 0 0.3rem; color: var(--text); }
.listings-empty p { margin-bottom: 1.2rem; }

/* ═══════════════════════════════════════════════════════
   LAND LISTING — detail page
   ═══════════════════════════════════════════════════════ */
.ld-detail { margin-top: 0.25rem; }
.ld-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.9rem; font-weight: 600; color: var(--text-muted);
  text-decoration: none; margin-bottom: 1rem;
}
.ld-back:hover { color: var(--accent); opacity: 1; }

.ld-gallery { margin-bottom: 1.75rem; }
.ld-gallery-main {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 16 / 8; background: var(--bg-subtle); box-shadow: var(--shadow);
}
.ld-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ld-gallery-badge { top: 1rem; left: 1rem; font-size: 0.8rem; padding: 0.35rem 0.7rem; }
.ld-gallery-thumbs { display: flex; gap: 0.6rem; margin-top: 0.6rem; flex-wrap: wrap; }
.ld-thumb {
  width: 92px; height: 64px; object-fit: cover; border-radius: var(--radius-sm);
  cursor: pointer; opacity: 0.65; border: 2px solid transparent; transition: opacity 0.15s, border-color 0.15s;
}
.ld-thumb:hover { opacity: 1; }
.ld-thumb.active { opacity: 1; border-color: var(--accent); }

.ld-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start;
}
.ld-headline { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.ld-price { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; }
.ld-title { font-size: 1.5rem; margin: 0.1em 0 0.2em; }
.ld-loc { color: var(--text-muted); font-size: 1rem; }
.ld-loc i { color: var(--text-soft); margin-right: 0.25rem; }

.ld-save-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); font-weight: 600; font-size: 0.9rem;
  padding: 0.55rem 1rem; border-radius: var(--radius-pill); cursor: pointer;
  white-space: nowrap; transition: color 0.15s, border-color 0.15s;
}
.ld-save-btn:hover { color: #e0306a; border-color: #f0c2cf; }
.ld-save-btn.saved { color: #e0306a; border-color: #f0c2cf; background: #fff5f8; }
html[data-theme="dark"] .ld-save-btn.saved { background: #2a1820; }

.ld-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
  margin: 1.5rem 0; padding: 1.25rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-card);
}
.ld-stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.2rem; }
.ld-stat i { font-size: 1.1rem; color: var(--accent); margin-bottom: 0.2rem; }
.ld-stat-val { font-weight: 700; font-size: 0.95rem; }
.ld-stat-label { font-size: 0.75rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; }

.ld-section { margin-top: 1.75rem; }
.ld-section h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.ld-desc { color: var(--text); line-height: 1.7; }
.ld-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.1rem 1.5rem; }
.ld-fact {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border-light); font-size: 0.92rem;
}
.ld-fact-label { color: var(--text-muted); }
.ld-fact-val { font-weight: 600; text-align: right; }
#ld-map { height: 320px; width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }

/* Contact sidebar */
.ld-side { position: sticky; top: 84px; }
.ld-contact-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.4rem; background: var(--bg-card); box-shadow: var(--shadow);
}
.ld-contact-price { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.ld-contact-loc { color: var(--text-muted); font-size: 0.92rem; }
.ld-contact-rule { border: none; border-top: 1px solid var(--border-light); margin: 1rem 0; }
.ld-contact-owner { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.1rem; }
.ld-contact-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.ld-contact-nick { font-weight: 700; }
.ld-contact-since { font-size: 0.82rem; color: var(--text-soft); }
.ld-contact-card .btn { margin-bottom: 0.6rem; }
.ld-contact-card .btn:last-child { margin-bottom: 0; }

.ld-related { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.ld-related h3 { font-size: 1.25rem; margin-bottom: 1rem; }
.ld-related .listings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ── Responsive ── */
@media (max-width: 980px) {
  .listings-split { grid-template-columns: 1fr; }
  .listings-map-col { position: static; order: -1; }
  #land-map { height: 340px; min-height: 0; }
  .ld-grid { grid-template-columns: 1fr; }
  .ld-side { position: static; }
  .ld-related .listings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .listings-grid { grid-template-columns: 1fr; }
  .ld-stats { grid-template-columns: repeat(2, 1fr); }
  .ld-facts { grid-template-columns: 1fr; }
  .lst-pill-sort { margin-left: 0; }
  .ld-related .listings-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   HOME — property-listing landing page
   ═══════════════════════════════════════════════════════ */
.hp-hero {
  position: relative; width: 100vw; margin-left: calc(-50vw + 50%); margin-top: -2rem;
  min-height: 480px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 4.5rem 1.5rem;
}
.hp-hero-bg { position: absolute; inset: 0; z-index: 0; }
.hp-hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.4s ease-in-out;
}
.hp-hero-slide.active { opacity: 1; }
.hp-hero-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(16,32,27,0.5), rgba(16,32,27,0.72));
}
.hp-hero-credit {
  position: absolute; bottom: 0.6rem; right: 0.9rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; color: rgba(255,255,255,0.82); text-decoration: none;
  background: rgba(16,32,27,0.42); border: 1px solid rgba(255,255,255,0.18);
  padding: 0.22rem 0.6rem; border-radius: var(--radius-pill); backdrop-filter: blur(3px);
  max-width: 70vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.15s, background 0.15s;
}
.hp-hero-credit:hover { color: #fff; background: rgba(16,32,27,0.6); opacity: 1; }

/* Nav dots (lower-left) to cycle hero listings */
.hp-hero-dots { position: absolute; left: 1rem; bottom: 0.85rem; z-index: 2; display: flex; gap: 0.5rem; }
.hp-hero-dot {
  width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,0.45); box-shadow: 0 1px 3px rgba(0,0,0,0.35);
  transition: background 0.15s, transform 0.15s;
}
.hp-hero-dot:hover { background: rgba(255,255,255,0.8); }
.hp-hero-dot.active { background: #fff; transform: scale(1.3); }

/* Localized frosted-blur + scrim behind hero text for readability */
.hp-hero-inner { position: relative; z-index: 2; max-width: 760px; width: 100%; padding: 1.5rem 1rem; }
.hp-hero-inner::before {
  content: ""; position: absolute; inset: -0.5rem -1.5rem; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(16,32,27,0.55), rgba(16,32,27,0) 72%);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border-radius: 36px;
  -webkit-mask: radial-gradient(ellipse at center, #000 48%, transparent 78%);
          mask: radial-gradient(ellipse at center, #000 48%, transparent 78%);
}
.hp-hero h1 {
  font-family: "Avenir Next", "Avenir", "Mulish", var(--font-heading);
  font-weight: 600; font-size: 3rem; color: #fff; letter-spacing: -0.02em;
  text-shadow: 0 2px 18px rgba(0,0,0,0.7), 0 1px 4px rgba(0,0,0,0.55); margin-bottom: 0.3em;
}
.hp-hero-sub { font-size: 1.15rem; color: #fff; margin-bottom: 1.6rem; text-shadow: 0 1px 12px rgba(0,0,0,0.75), 0 1px 3px rgba(0,0,0,0.6); }
.hp-search {
  display: flex; gap: 0.5rem; align-items: center; max-width: 620px; margin: 0 auto;
  background: var(--bg-card); border-radius: var(--radius-pill);
  padding: 0.4rem 0.4rem 0.4rem 1.1rem; box-shadow: var(--shadow-lg);
}
.hp-search i { color: var(--text-soft); }
.hp-search input { flex: 1; border: none; outline: none; background: transparent; color: var(--text); font-family: var(--font-body); font-size: 1rem; padding: 0.55rem 0.2rem; }
.hp-search .btn { flex-shrink: 0; }
.hp-hero-chips { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
.hp-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill); font-size: 0.88rem; font-weight: 600; text-decoration: none;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.32); color: #fff;
  backdrop-filter: blur(4px); transition: background 0.15s;
}
.hp-chip:hover { background: rgba(255,255,255,0.3); color: #fff; opacity: 1; }
.hp-chip-light { background: var(--bg-subtle); border: 1px solid var(--border); color: var(--text); backdrop-filter: none; }
.hp-chip-light span { color: var(--text-soft); font-weight: 500; }
.hp-chip-light:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }

.hp-section { margin: 2.75rem 0; }
.hp-section-head { margin-bottom: 1.1rem; }
.hp-section-head h2 { font-size: 1.5rem; margin: 0; }
.hp-section-head h2 i { color: var(--accent); margin-right: 0.4rem; }
.hp-section-head p { color: var(--text-muted); margin: 0.25rem 0 0; }
.hp-section-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.hp-seeall { font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.hp-seeall:hover { color: var(--accent-hover); opacity: 1; }

/* Featured spotlight */
.hp-feature {
  display: grid; grid-template-columns: 1.15fr 1fr; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: box-shadow 0.2s, transform 0.2s;
}
.hp-feature:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); opacity: 1; }
.hp-feature-media { position: relative; min-height: 360px; background: var(--bg-subtle); }
.hp-feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-feature-media .lst-badge { top: 1rem; left: 1rem; font-size: 0.8rem; padding: 0.35rem 0.7rem; }
.hp-feature-body { padding: 1.9rem; display: flex; flex-direction: column; align-items: flex-start; }
.hp-feature-tag {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-hover);
  background: var(--accent-soft); padding: 0.3rem 0.65rem; border-radius: var(--radius-pill); margin-bottom: 0.85rem;
}
.hp-feature-tag i { color: #e0a800; }
.hp-feature-price { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.hp-feature-price span { font-size: 0.8rem; font-weight: 600; color: var(--text-soft); }
.hp-feature-title { font-size: 1.4rem; margin: 0.1em 0 0.2em; }
.hp-feature-loc { color: var(--text-muted); }
.hp-feature-loc i { color: var(--text-soft); margin-right: 0.25rem; }
.hp-feature-stats { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0.95rem 0; font-size: 0.9rem; color: var(--text-muted); }
.hp-feature-stats i { color: var(--accent); margin-right: 0.25rem; }
.hp-feature-desc { color: var(--text); line-height: 1.6; margin-bottom: 1.3rem; }
.hp-feature-body .btn { margin-top: auto; }

/* Categories */
.hp-cats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.75rem; }
.hp-cat {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem;
  padding: 1.15rem 0.5rem; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.hp-cat:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); opacity: 1; }
.hp-cat-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.hp-cat-label { font-weight: 600; font-size: 0.88rem; }
.hp-cat-count { font-size: 0.74rem; color: var(--text-soft); }

/* Region chips + map */
.hp-region-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
#hp-map { height: 460px; width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); position: relative; background: var(--bg-subtle); }

/* CTA strip */
.hp-cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem 2rem; margin: 2.75rem 0 1rem; }
.hp-cta h2 { margin: 0; font-size: 1.4rem; }
.hp-cta p { margin: 0.2rem 0 0; color: var(--text-muted); }
.btn-lg { font-size: 1rem; padding: 0.8rem 1.6rem; }

@media (max-width: 900px) {
  .hp-feature { grid-template-columns: 1fr; }
  .hp-feature-media { position: relative; min-height: 0; height: 240px; }
  .hp-cats { grid-template-columns: repeat(4, 1fr); }
  .hp-hero h1 { font-size: 2.2rem; }
}
@media (max-width: 560px) {
  .hp-cats { grid-template-columns: repeat(2, 1fr); }
  .hp-search { flex-wrap: wrap; padding: 0.6rem; }
  .hp-search input { width: 100%; }
  .hp-search .btn { width: 100%; }
  .hp-hero { min-height: 400px; }
}

/* ═══════════════════════════════════════════════════════
   COMMUNITY — artist portal, chat, forum, members
   ═══════════════════════════════════════════════════════ */
.cmty-wrap { max-width: 1080px; margin: 0 auto; padding: 2rem 0 4rem; }
.cmty-wrap-narrow { max-width: 780px; margin: 0 auto; padding: 2rem 0 4rem; }
.cmty-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.cmty-head h1 { font-size: 1.7rem; margin: 0; }
.cmty-head .sub { color: var(--text-muted, #6b7280); font-size: 0.95rem; margin-top: 0.2rem; }
.cmty-card {
  background: var(--bg-card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 14px); padding: 1.5rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}
.cmty-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 820px) { .cmty-grid { grid-template-columns: 1fr; } }
.cmty-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft, #e7f0eb); color: var(--accent, #2f6b4f);
  font-weight: 700; font-size: 0.95rem; text-transform: uppercase;
}
.cmty-avatar.lg { width: 72px; height: 72px; font-size: 1.6rem; }
.cmty-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill, 999px); font-weight: 700; font-size: 0.92rem;
  border: none; cursor: pointer; text-decoration: none; line-height: 1;
}
.cmty-btn.primary { background: var(--accent, #2f6b4f); color: #fff; }
.cmty-btn.primary:hover { filter: brightness(1.08); }
.cmty-btn.soft { background: var(--accent-soft, #e7f0eb); color: var(--accent, #2f6b4f); }
.cmty-btn.sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
.cmty-pill {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill, 999px); font-size: 0.75rem; font-weight: 600;
  background: var(--accent-soft, #e7f0eb); color: var(--accent, #2f6b4f);
}
.cmty-muted { color: var(--text-muted, #6b7280); }
.cmty-empty { text-align: center; color: var(--text-muted, #6b7280); padding: 2.5rem 1rem; }

/* Chat */
.chat-box { display: flex; flex-direction: column; height: calc(100vh - 240px); min-height: 420px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.15rem; }
.chat-msg { display: flex; gap: 0.7rem; padding: 0.45rem 0.6rem; border-radius: 10px; }
.chat-msg:hover { background: var(--accent-soft, #f0f5f2); }
.chat-msg .meta { display: flex; align-items: baseline; gap: 0.5rem; }
.chat-msg .who { font-weight: 700; font-size: 0.92rem; }
.chat-msg .when { font-size: 0.72rem; color: var(--text-muted, #9ca3af); }
.chat-msg .body { font-size: 0.95rem; white-space: pre-wrap; word-break: break-word; }
.chat-msg .chat-del { visibility: hidden; margin-left: auto; }
.chat-msg:hover .chat-del { visibility: visible; }
.chat-del button {
  background: none; border: none; cursor: pointer; color: var(--text-muted, #9ca3af); font-size: 0.8rem;
}
.chat-del button:hover { color: #b3261e; }
.chat-form { display: flex; gap: 0.6rem; padding: 0.9rem; border-top: 1px solid var(--border, #e5e7eb); }
.chat-form textarea {
  flex: 1; resize: none; border: 1px solid var(--border, #e5e7eb); border-radius: 10px;
  padding: 0.65rem 0.9rem; font: inherit; font-size: 0.95rem;
  background: var(--bg, #f8faf9); color: inherit; min-height: 44px; max-height: 130px;
}
.chat-form textarea:focus { outline: 2px solid var(--accent, #2f6b4f); outline-offset: -1px; }

/* Forum */
.forum-cats { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.forum-cats a {
  padding: 0.35rem 0.9rem; border-radius: var(--radius-pill, 999px); font-size: 0.85rem;
  font-weight: 600; text-decoration: none; color: var(--text-muted, #6b7280);
  border: 1px solid var(--border, #e5e7eb); background: var(--bg-card, #fff);
}
.forum-cats a.active { background: var(--accent, #2f6b4f); color: #fff; border-color: var(--accent, #2f6b4f); }
.forum-thread-row {
  display: flex; gap: 1rem; align-items: center; padding: 1rem 1.25rem;
  background: var(--bg-card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 14px); margin-bottom: 0.65rem; text-decoration: none; color: inherit;
}
.forum-thread-row:hover { border-color: var(--accent, #2f6b4f); }
.forum-thread-row .t-title { font-weight: 700; font-size: 1rem; }
.forum-thread-row .t-meta { font-size: 0.8rem; color: var(--text-muted, #6b7280); margin-top: 0.15rem; }
.forum-thread-row .t-count { margin-left: auto; text-align: center; flex-shrink: 0; }
.forum-thread-row .t-count .n { font-weight: 800; font-size: 1.1rem; display: block; }
.forum-thread-row .t-count .l { font-size: 0.7rem; color: var(--text-muted, #9ca3af); }
.forum-post { display: flex; gap: 0.9rem; padding: 1.25rem 0; border-top: 1px solid var(--border, #eef0f2); }
.forum-post .p-body { font-size: 0.97rem; white-space: pre-wrap; word-break: break-word; margin-top: 0.35rem; }
.forum-form textarea, .forum-form input[type="text"] {
  width: 100%; border: 1px solid var(--border, #e5e7eb); border-radius: 10px;
  padding: 0.7rem 0.9rem; font: inherit; font-size: 0.95rem;
  background: var(--bg, #f8faf9); color: inherit;
}
.forum-form textarea:focus, .forum-form input:focus { outline: 2px solid var(--accent, #2f6b4f); outline-offset: -1px; }
.forum-form label { font-weight: 700; font-size: 0.85rem; display: block; margin: 1rem 0 0.35rem; }
.forum-form select {
  border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 0.55rem 0.8rem;
  font: inherit; font-size: 0.92rem; background: var(--bg, #f8faf9); color: inherit;
}

/* Members */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.member-card {
  display: flex; gap: 0.8rem; align-items: center; padding: 1rem 1.1rem;
  background: var(--bg-card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 14px); text-decoration: none; color: inherit;
}
.member-card:hover { border-color: var(--accent, #2f6b4f); }
.member-card .m-name { font-weight: 700; font-size: 0.95rem; }
.member-card .m-since { font-size: 0.75rem; color: var(--text-muted, #9ca3af); }

/* Landing */
.cl-hero { text-align: center; padding: 4.5rem 1rem 3rem; max-width: 720px; margin: 0 auto; }
.cl-hero h1 { font-size: 2.6rem; margin: 0 0 1rem; line-height: 1.15; }
.cl-hero p { font-size: 1.1rem; color: var(--text-muted, #6b7280); margin: 0 0 2rem; }
.cl-hero .cl-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.cl-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; max-width: 920px; margin: 1rem auto 4rem; padding: 0 1rem; }
@media (max-width: 720px) { .cl-features { grid-template-columns: 1fr; } }
.cl-feature { text-align: center; padding: 1.75rem 1.25rem; }
.cl-feature i { font-size: 1.5rem; color: var(--accent, #2f6b4f); margin-bottom: 0.7rem; }
.cl-feature h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.cl-feature p { margin: 0; font-size: 0.9rem; color: var(--text-muted, #6b7280); }

/* Groups */
.grp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.grp-card {
  display: flex; flex-direction: column; gap: 0.6rem; padding: 1.4rem;
  background: var(--bg-card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 14px); color: inherit;
}
.grp-card .g-head { display: flex; align-items: center; gap: 0.75rem; }
.grp-card .g-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft, #e7f0eb); color: var(--accent, #2f6b4f); font-size: 1.15rem;
}
.grp-card .g-name { font-weight: 800; font-size: 1.05rem; }
.grp-card .g-members { font-size: 0.78rem; color: var(--text-muted, #9ca3af); }
.grp-card .g-desc { font-size: 0.88rem; color: var(--text-muted, #6b7280); flex: 1; margin: 0; }
.grp-card .g-actions { display: flex; gap: 0.5rem; align-items: center; }
.grp-hero {
  display: flex; align-items: center; gap: 1.25rem; padding: 1.75rem;
  background: var(--bg-card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 14px); margin-bottom: 1.25rem; flex-wrap: wrap;
}
.grp-hero .g-icon {
  width: 64px; height: 64px; border-radius: 16px; font-size: 1.7rem; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft, #e7f0eb); color: var(--accent, #2f6b4f);
}
.grp-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.grp-tabs a {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 1.1rem; border-radius: var(--radius-pill, 999px);
  font-size: 0.9rem; font-weight: 700; text-decoration: none;
  border: 1px solid var(--border, #e5e7eb); background: var(--bg-card, #fff); color: inherit;
}
.grp-tabs a.active, .grp-tabs a:hover { border-color: var(--accent, #2f6b4f); color: var(--accent, #2f6b4f); }

/* Showcase */
.show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.show-card {
  background: var(--bg-card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 14px); overflow: hidden; display: flex; flex-direction: column;
}
.show-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--accent-soft, #eef2ef); }
.show-card .s-body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.show-card .s-title { font-weight: 700; font-size: 0.98rem; }
.show-card .s-artist { font-size: 0.8rem; color: var(--text-muted, #9ca3af); }
.show-card .s-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.6rem; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.42rem 1rem; border-radius: var(--radius-pill, 999px);
  font-weight: 800; font-size: 0.88rem; cursor: pointer;
  border: 1px solid var(--border, #e5e7eb); background: var(--bg-card, #fff); color: inherit;
}
.vote-btn:hover { border-color: var(--accent, #2f6b4f); color: var(--accent, #2f6b4f); }
.vote-btn.voted { background: var(--accent, #2f6b4f); border-color: var(--accent, #2f6b4f); color: #fff; }
