/* PitchLink — football marketplace styles */
:root {
  --green-950: #062414;
  --green-900: #0a3d24;
  --green-800: #0f5132;
  --green-700: #166534;
  --green-600: #1a7a3c;
  --green-500: #22a34a;
  --green-100: #e8f7ee;
  --green-50: #f3faf6;
  --pitch: #c8e86c;
  --pitch-dim: #a8c955;
  --ink: #0f1a14;
  --ink-soft: #3d4f44;
  --muted: #5c6f64;
  --line: #d8e5dc;
  --surface: #ffffff;
  --surface-2: #f7faf8;
  --offer: #0e7490;
  --offer-bg: #ecfeff;
  --request: #b45309;
  --request-bg: #fff7ed;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --shadow: 0 1px 2px rgb(6 36 20 / 6%), 0 8px 24px rgb(6 36 20 / 8%);
  --shadow-lg: 0 4px 12px rgb(6 36 20 / 8%), 0 20px 48px rgb(6 36 20 / 12%);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Outfit", "DM Sans", system-ui, sans-serif;
  --header-h: 88px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface-2);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--green-700); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--green-900); }

h1, h2, h3, .logo-text {
  font-family: var(--display);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1, h2.h1 { font-size: clamp(1.85rem, 4vw, 2.75rem); margin: 0 0 0.6rem; font-weight: 750; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); margin: 0 0 0.4rem; font-weight: 700; }
h3 { font-size: 1.1rem; margin: 0 0 0.35rem; font-weight: 650; }

p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  background: var(--green-900);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}
.container.narrow { width: min(720px, calc(100% - 2rem)); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--green-900);
}
.logo:hover { color: var(--green-700); }
.logo-mark { color: var(--green-700); flex-shrink: 0; }
.logo-text { font-size: 1.35rem; font-weight: 750; }
.logo-text span { color: var(--pitch-dim); }

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  min-width: 0;
}
.fc-logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 10px;
}
.fc-logo-link:focus-visible {
  outline: 2px solid var(--green-700);
  outline-offset: 2px;
}
.fc-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  background: #fff;
}
.brand-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
  flex-shrink: 0;
}
.footer-brand .fc-logo {
  width: 96px;
  height: 96px;
  margin-bottom: 0.55rem;
}
.footer-brand .fc-logo-link {
  display: inline-block;
  margin-bottom: 0.35rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 550;
  font-size: 0.95rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--green-50);
  color: var(--green-800);
}
.nav a.nav-ext {
  color: var(--muted);
  font-weight: 500;
}
.nav a.nav-ext:hover {
  color: var(--brand);
}
.nav a.nav-cta {

  background: var(--green-800);
  color: white;
  margin-left: 0.35rem;
}
.nav a.nav-cta:hover {
  background: var(--green-900);
  color: white;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 120;
}
.menu-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  margin-inline: auto;
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  /* Above page content (main/sidebar z≈1); below mobile .nav (110) and .menu-toggle (120).
     Header is z=100 — backdrop sits under the sticky bar but over scrolled page content. */
  z-index: 90;
  background: rgba(6, 24, 14, 0.62);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
body.nav-open .nav-backdrop {
  display: block !important; /* beat [hidden] { display:none !important } */
  visibility: visible;
  pointer-events: auto;
}
body.nav-open { overflow: hidden; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--green-800);
  color: white;
  box-shadow: 0 4px 14px rgb(15 81 50 / 28%);
}
.btn-primary:hover { background: var(--green-900); color: white; }
.btn-secondary {
  background: white;
  color: var(--green-800);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--green-600); color: var(--green-900); background: var(--green-50); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.btn-ghost:hover { background: white; color: var(--ink); }
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fecaca;
}
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.875rem; }

.text-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--green-700);
  white-space: nowrap;
}
.text-link:hover { color: var(--green-900); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--green-950) 0%, var(--green-800) 55%, #1a5c38 100%);
  color: white;
  padding: 3.5rem 0 3.75rem;
}
.hero-pitch {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(90deg, transparent 49.5%, rgb(255 255 255 / 35%) 49.5%, rgb(255 255 255 / 35%) 50.5%, transparent 50.5%),
    repeating-linear-gradient(0deg, transparent, transparent 48px, rgb(255 255 255 / 12%) 48px, rgb(255 255 255 / 12%) 49px);
  pointer-events: none;
}
.hero-pitch::after {
  content: "";
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  width: min(420px, 48vw);
  aspect-ratio: 1;
  border: 2px solid rgb(255 255 255 / 25%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 70px transparent, inset 0 0 0 72px rgb(255 255 255 / 12%);
}
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pitch);
  margin-bottom: 0.85rem;
}
.hero h1, .hero h2.h1 { color: white; }
.hero-lead {
  font-size: 1.1rem;
  color: rgb(255 255 255 / 88%);
  max-width: 34rem;
  margin-bottom: 1.5rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.hero .btn-primary {
  background: var(--pitch);
  color: var(--green-950);
  box-shadow: 0 4px 16px rgb(200 232 108 / 30%);
}
.hero .btn-primary:hover { background: #d4f07a; color: var(--green-950); }
.hero .btn-secondary {
  background: transparent;
  color: white;
  border-color: rgb(255 255 255 / 35%);
}
.hero .btn-secondary:hover {
  background: rgb(255 255 255 / 10%);
  border-color: white;
  color: white;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgb(255 255 255 / 15%);
}
.hero-stats strong {
  display: block;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  color: white;
}
.hero-stats span {
  font-size: 0.85rem;
  color: rgb(255 255 255 / 70%);
}

.page-hero {
  background: var(--green-900);
  color: white;
  padding: 2.25rem 0 2rem;
}
.page-hero h1, .page-hero h2.h1 { color: white; }
.page-hero p { color: rgb(255 255 255 / 80%); margin: 0; max-width: 36rem; }

/* Sections */
.section { padding: 2.75rem 0; }
.section-head { margin-bottom: 1.5rem; }
.section-head p { color: var(--muted); margin: 0; }
.section-head.row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Category chips */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
  font-family: inherit;
}
.chip:hover {
  border-color: var(--green-600);
  color: var(--green-800);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.chip-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-800);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Cards & grid */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.15rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.listing-card {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.2rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  height: 100%;
}
.listing-card:hover {
  border-color: var(--green-600);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  color: inherit;
}
.listing-card:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
}

.card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
}
.badge-offer { background: var(--offer-bg); color: var(--offer); }
.badge-request { background: var(--request-bg); color: var(--request); }
.tag {
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  background: var(--green-50);
  color: var(--green-800);
}

.listing-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.listing-card .desc {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.price-pill {
  font-weight: 650;
  color: var(--green-800);
}

/* Filters */
.filters {
  display: grid;
  grid-template-columns: auto minmax(12rem, 1fr) minmax(9rem, 12rem) minmax(9rem, 12rem);
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.filters > .field {
  margin-bottom: 0;
}

.type-tabs {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.tab {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.45rem 0.95rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  background: white;
  color: var(--green-800);
  box-shadow: 0 1px 3px rgb(6 36 20 / 10%);
}
.tab:focus-visible { outline: 2px solid var(--green-600); outline-offset: 2px; }

.search-field { position: relative; }
.search-field .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-field input {
  padding-left: 2.5rem !important;
}

.results-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* Form */
.form-card { padding: 1.75rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

/* `hidden` must beat .field { display:flex } or auth fields stay visible */
.field[hidden],
#auth-cred-fields[hidden],
#auth-verify-field[hidden],
#auth-name-field[hidden],
[hidden] {
  display: none !important;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--ink-soft);
}
.optional { font-weight: 450; color: var(--muted); }
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgb(34 163 74 / 18%);
}
.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgb(185 28 28 / 12%);
}
.error {
  font-size: 0.82rem;
  color: var(--danger);
  min-height: 0;
}
.error:not(:empty) { margin-top: -0.15rem; margin-bottom: 0.25rem; }

.type-choice {
  border: none;
  padding: 0;
  margin: 0 0 1.25rem;
}
.type-choice legend {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--ink-soft);
  margin-bottom: 0.55rem;
}
.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.choice {
  display: flex;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--surface-2);
}
.choice:has(input:checked) {
  border-color: var(--green-600);
  background: var(--green-50);
}
.choice input { margin-top: 0.2rem; accent-color: var(--green-700); flex-shrink: 0; }
.choice strong { display: block; font-size: 0.95rem; }
.choice small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; line-height: 1.35; }

.form-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: -0.35rem 0 0.75rem;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

/* Detail */
.back-link {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1rem;
  color: var(--green-700);
}
.back-link:hover { color: var(--green-900); }

.detail-card { padding: 1.75rem; }
.detail-header { margin-bottom: 1.25rem; }
.detail-header h1, .detail-header h2.h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.detail-desc {
  white-space: pre-wrap;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  font-size: 1.02rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1.15rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
}
.detail-grid dt {
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.detail-grid dd { margin: 0; font-weight: 550; }

.contact-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(135deg, var(--green-50), white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}
.contact-box p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.contact-box strong { color: var(--ink); }
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Empty / CTA / Footer */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: white;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state h3 { margin-bottom: 0.35rem; }
.empty-state p { color: var(--muted); margin-bottom: 1.25rem; }
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.cta-band {
  background: var(--green-900);
  color: white;
  padding: 2.5rem 0;
  margin-top: 1rem;
}
.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.cta-band h2 { color: white; margin-bottom: 0.35rem; }
.cta-band p { color: rgb(255 255 255 / 78%); margin: 0; }
.cta-band .btn-primary {
  background: var(--pitch);
  color: var(--green-950);
  box-shadow: none;
  flex-shrink: 0;
}
.cta-band .btn-primary:hover { background: #d4f07a; color: var(--green-950); }

.site-footer {
  margin-top: auto;
  background: var(--green-950);
  color: rgb(255 255 255 / 75%);
  padding: 2.5rem 0;
  /* Extra bottom space so last content clears Wix Headless chrome/badge */
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px) + 5.5rem);
  font-size: 0.9rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}
.footer-brand .logo-text { color: white; display: inline-block; margin-bottom: 0.65rem; }
.footer-brand .logo-text span { color: var(--pitch); }
.footer-meta strong { color: white; }
.demo-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: rgb(255 255 255 / 50%);
  max-width: 28rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 550;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transition: transform 0.35s var(--ease);
  max-width: calc(100% - 2rem);
  text-align: center;
}
.toast.is-visible { transform: translateX(-50%) translateY(0); }


/* ========== Community Feed ========== */
.feed-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* DOM order is feed-main then sidebar; on desktop pull sidebar left via order.
   Scoped under #view-feed so Events (.events-layout) keeps its own sticky/order rules. */
#view-feed .feed-layout .feed-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  order: -1;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
}
#view-feed .feed-layout .feed-main {
  order: 0;
  min-width: 0;
  max-width: 100%;
}

/* Fallback sticky for any non-events feed-layout that still puts sidebar first */
.feed-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.feed-compose-title {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.feed-demo-note {
  margin-bottom: 1rem !important;
}

.feed-photo-preview {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: -0.35rem 0 1rem;
}

.feed-photo-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.feed-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feed-search-field {
  flex: 1;
  min-width: 180px;
  margin-bottom: 0;
}

.feed-sort-tabs {
  flex-shrink: 0;
}

.feed-active-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
  background: var(--green-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  max-width: 560px;
}

.feed-card {
  padding: 0;
  overflow: hidden;
}

.feed-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem 0.75rem;
}

.feed-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: white;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.feed-author-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.feed-author-name {
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-time {
  font-size: 0.78rem;
  color: var(--muted);
}

.feed-media {
  width: 100%;
  background: var(--green-950);
  aspect-ratio: 4 / 5;
  max-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

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

.feed-media-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  color: white;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.feed-media-placeholder span {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.feed-placeholder-0 { background: linear-gradient(145deg, #0a3d24, #1a7a3c 55%, #c8e86c); }
.feed-placeholder-1 { background: linear-gradient(160deg, #0f172a, #166534 50%, #22a34a); }
.feed-placeholder-2 { background: linear-gradient(135deg, #14532d, #0e7490 60%, #a5f3fc); }
.feed-placeholder-3 { background: linear-gradient(150deg, #1e3a2f, #b45309 70%, #fde68a); }
.feed-placeholder-4 { background: linear-gradient(140deg, #062414, #7c3aed 50%, #c4b5fd); }
.feed-placeholder-5 { background: linear-gradient(155deg, #0f5132, #be123c 55%, #fecdd3); }

.feed-card-body {
  padding: 0.85rem 1rem 1.05rem;
}

.feed-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.feed-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: white;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.feed-like-btn:hover {
  border-color: #f9a8d4;
  color: #be185d;
  background: #fdf2f8;
}

.feed-like-btn.is-liked {
  border-color: #f9a8d4;
  background: #fdf2f8;
  color: #be185d;
}

.feed-like-btn:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
}

.feed-like-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.feed-caption {
  font-size: 0.95rem;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  line-height: 1.5;
}

.feed-caption .hashtag {
  color: var(--green-700);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.feed-caption .hashtag:hover {
  color: var(--green-900);
  text-decoration: underline;
}

.feed-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.feed-tag-chip {
  display: inline-flex;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--green-50);
  color: var(--green-800);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.feed-tag-chip:hover {
  border-color: var(--green-600);
  background: var(--green-100);
}

.feed-tag-chip:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .feed-layout {
    grid-template-columns: 1fr;
  }
  /* Force unstick — beat base sticky + any order/z rules (Events has its own !important twin) */
  .feed-layout .feed-sidebar {
    position: static !important;
    top: auto !important;
  }
  #view-feed .feed-layout .feed-sidebar {
    order: 2;
    z-index: auto;
  }
  #view-feed .feed-layout .feed-main {
    order: 1;
  }
  .feed-list {
    max-width: none;
  }
}

/* FC Social compose disclosure (mobile collapse; desktop always open) */
.social-compose {
  border: none;
}
.social-compose > summary {
  list-style: none;
}
.social-compose > summary::-webkit-details-marker { display: none; }
.social-compose-summary {
  display: none; /* shown only on mobile */
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--green-700);
  background: var(--green-800);
  color: white;
  font-family: inherit;
  font-weight: 650;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgb(15 81 50 / 28%);
  box-sizing: border-box;
}
.social-compose-summary-label { flex: 1; text-align: left; }
.social-compose-summary-hint {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.85;
}
.social-compose-summary::after {
  content: "+";
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.social-compose[open] > .social-compose-summary::after { content: "−"; }
.social-compose-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 900px) {
  #view-feed .social-compose-summary {
    display: flex;
  }
  #view-feed .social-compose:not([open]) .social-compose-body {
    display: none;
  }
}

@media (min-width: 901px) {
  #view-feed .social-compose-summary { display: none !important; }
  #view-feed .social-compose-body { display: flex !important; }
}

/* FC Social cards / toolbar: no horizontal overflow on ~390px */
#view-feed .feed-toolbar,
#view-feed .feed-card,
#view-feed .feed-media,
#view-feed .feed-photo-preview,
#view-feed .feed-photo-preview img,
#view-feed .feed-media img {
  max-width: 100%;
}
#view-feed .feed-toolbar {
  min-width: 0;
  box-sizing: border-box;
}
#view-feed .feed-search-field {
  min-width: 0;
  flex: 1 1 140px;
}
#view-feed .feed-tag-row {
  max-width: 100%;
}
#view-feed .feed-caption {
  overflow-wrap: anywhere;
}

/* Responsive */
@media (max-width: 980px) {
  .filters {
    grid-template-columns: auto 1fr;
  }
  .filters > .type-tabs { grid-column: 1 / -1; }
  .filters > .search-field { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .filters {
    grid-template-columns: 1fr;
  }
  .filters > .type-tabs,
  .filters > .search-field { grid-column: auto; }
  .type-tabs { width: 100%; justify-content: stretch; }
  .type-tabs .tab { flex: 1; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .menu-toggle { display: flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 0.75rem;
    gap: 0.25rem;
    display: none;
    box-shadow: var(--shadow);
    z-index: 110;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.75rem 1rem; border-radius: 10px; min-height: 44px; }
  .nav a.nav-cta { margin-left: 0; text-align: center; }
  .nav .auth-btn { min-height: 44px; }
  .choice-row,
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 0 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Auth / modal ---------- */
.nav .auth-btn {
  margin-left: 0.25rem;
  padding: 0.35rem 0.7rem;
}
.auth-chip {
  display: none;
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: 0.5rem;
}
.auth-gate h2 { margin-top: 0; }
.auth-gate p { color: var(--muted); }
.feed-compose.is-gated { opacity: 0.55; pointer-events: none; }
body.modal-open { overflow: hidden; }
.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 28, 18, 0.55);
  backdrop-filter: blur(2px);
}
.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 1.5rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.auth-tabs { margin: 1rem 0; }
.auth-form .field { margin-bottom: 0.85rem; }
#auth-form-error:empty { display: none; }

@media (min-width: 900px) {
  .auth-chip { display: inline; }
}


/* ========== Community Events ========== */
/* DOM order is feed-main then sidebar; on desktop pull sidebar left via order */
.events-layout .feed-sidebar {
  position: sticky;
  top: 5.5rem;
  order: -1;
  z-index: 1;
}
.events-layout .feed-main {
  order: 0;
  min-width: 0;
}

.events-compose {
  border: none;
}
.events-compose > summary {
  list-style: none;
}
.events-compose > summary::-webkit-details-marker { display: none; }
.events-compose-summary {
  display: none; /* shown only on mobile */
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--green-700);
  background: var(--green-800);
  color: white;
  font-family: inherit;
  font-weight: 650;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgb(15 81 50 / 28%);
}
.events-compose-summary-label { flex: 1; text-align: left; }
.events-compose-summary-hint {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.85;
}
.events-compose-summary::after {
  content: "+";
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.events-compose[open] > .events-compose-summary::after { content: "−"; }
.events-compose-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.events-filters {
  /* Override shared .filters { display:grid; align-items:end } which left a ~95px empty gutter on mobile */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.events-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  align-self: stretch;
  min-width: 0;
}
/* Keyword reuses .search-field but has no icon — don't reserve icon gutter */
.events-filter-grid .search-field input {
  padding-left: 0.85rem !important;
}
.events-filter-grid .field {
  min-width: 0;
  margin-bottom: 0;
}
.events-filter-grid .field input,
.events-filter-grid .field select {
  max-width: 100%;
  min-width: 0;
}
.events-filter-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.events-filters .type-tabs {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  border-radius: 14px;
}
.events-filters .type-tabs .tab {
  flex: 1 1 auto;
  text-align: center;
  min-height: 44px;
  white-space: nowrap;
}
.listing-grid.events-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  min-width: 0;
}
.event-card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.event-card .card-top {
  flex-wrap: wrap;
}
.event-card .event-when {
  font-weight: 650;
  color: var(--green-800);
  font-size: 0.92rem;
  margin: 0 0 0.35rem;
}
.event-card .event-meta {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0 0 0.65rem;
}
.event-card .card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--muted);
}
.badge-free { background: #e8f7ec; color: #17633a; }
.badge-paid { background: #fff3d6; color: #8a5a00; }
.badge-age { background: var(--green-50); color: var(--green-800); }
.badge-category { background: #eef2ff; color: #3730a3; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.field-row > .field {
  min-width: 0;
}
.field-row .field input,
.field-row .field select {
  max-width: 100%;
  min-width: 0;
}
#events-form input[type="datetime-local"],
#events-form input[type="date"],
.events-filters input[type="date"] {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}
.checkbox-field input { width: auto; }
#events-form.is-gated,
#feed-form.is-gated {
  opacity: 0.55;
  pointer-events: none;
}

/* Events mobile: unstick sidebar, list first, collapse compose */
@media (max-width: 900px) {
  .events-layout .feed-sidebar {
    position: static !important;
    top: auto !important;
    order: 2;
    z-index: auto;
  }
  .events-layout .feed-main {
    order: 1;
  }
  .events-filter-grid { grid-template-columns: 1fr 1fr; }

  .events-compose-summary {
    display: flex;
  }
  /* Collapsed by default on mobile (no open attr from JS sync) */
  .events-compose:not([open]) .events-compose-body {
    display: none;
  }
}

@media (min-width: 901px) {
  /* Always show compose panel on desktop; hide disclosure chrome */
  .events-compose-summary { display: none !important; }
  .events-compose-body { display: flex !important; }
}

@media (max-width: 720px) {
  #view-events .page-hero {
    padding: 1.35rem 0 1.25rem;
  }
  #view-events .page-hero h1, #view-events .page-hero h2.h1 {
    font-size: clamp(1.45rem, 6.5vw, 1.85rem);
    margin-bottom: 0.4rem;
  }
  #view-events .page-hero p {
    font-size: 0.95rem;
    line-height: 1.45;
  }
  #view-events .section.events-layout {
    padding-top: 1.5rem;
    padding-bottom: 1.75rem;
  }
  .events-layout .field-row {
    grid-template-columns: 1fr;
  }
  .events-filters {
    padding: 0.85rem;
    gap: 0.75rem;
  }
  #events-form .field-row .field input[type="datetime-local"] {
    font-size: 0.95rem;
    padding-inline: 0.65rem;
  }
}

@media (max-width: 640px) {
  .events-filter-grid { grid-template-columns: 1fr; }
  .events-filters .type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 12px;
  }
  .events-filters .type-tabs .tab {
    flex: unset;
    width: 100%;
    font-size: 0.75rem;
    padding: 0.55rem 0.35rem;
    border-radius: 10px;
    white-space: nowrap;
    line-height: 1.15;
  }
  .listing-grid.events-grid {
    grid-template-columns: 1fr;
  }
  .events-filter-actions {
    justify-content: stretch;
  }
  .events-filter-actions .btn {
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 430px) {
  .events-filters {
    padding: 0.75rem;
  }
  .events-filter-grid {
    gap: 0.65rem;
  }
  #view-events .container {
    width: min(1120px, calc(100% - 1.25rem));
  }
  .events-filters .type-tabs .tab {
    font-size: 0.7rem;
    padding: 0.5rem 0.25rem;
    letter-spacing: -0.01em;
  }
}

/* ========== FC Social mobile polish (scoped; Events rules above stay intact) ========== */
@media (max-width: 720px) {
  #view-feed .page-hero {
    padding: 1.35rem 0 1.25rem;
  }
  #view-feed .page-hero h1, #view-feed .page-hero h2.h1 {
    font-size: clamp(1.45rem, 6.5vw, 1.85rem);
    margin-bottom: 0.4rem;
  }
  #view-feed .page-hero p {
    font-size: 0.95rem;
    line-height: 1.45;
  }
  #view-feed .section.feed-layout {
    padding-top: 1.5rem;
    padding-bottom: 1.75rem;
  }
  #view-feed .feed-toolbar {
    padding: 0.75rem;
    gap: 0.65rem;
  }
  #view-feed .feed-sort-tabs .tab {
    min-height: 44px;
    padding: 0.55rem 0.75rem;
  }
  #view-feed .feed-card-header {
    padding: 0.8rem 0.85rem 0.65rem;
  }
  #view-feed .feed-card-body {
    padding: 0.75rem 0.85rem 0.95rem;
  }
}

@media (max-width: 430px) {
  #view-feed .container {
    width: min(1120px, calc(100% - 1.25rem));
  }
  #view-feed .feed-media {
    max-height: 420px;
  }
  #view-feed .feed-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }
}

/* FC Social tap targets + photo field polish (scoped) */
#view-feed .feed-like-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.55rem 0.95rem;
  font-size: 0.95rem;
}
#view-feed .feed-like-btn svg {
  width: 20px;
  height: 20px;
}
#view-feed .feed-tag-chip {
  min-height: 36px;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  align-items: center;
}
#view-feed .feed-caption .hashtag {
  display: inline;
  padding: 0.1rem 0.05rem;
  line-height: 1.65;
}
#view-feed #feed-photo {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.65rem;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--green-50);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
  box-sizing: border-box;
}
#view-feed #feed-photo:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
}
#view-feed .feed-photo-preview {
  min-width: 0;
}


/* Static crawlable intro (marketplace) */
.seo-intro { padding-top: 0; }
.seo-intro p { color: var(--muted); max-width: 46rem; }
.seo-intro h3 { margin-top: 1rem; }
.seo-intro-cats { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0.5rem 0 0; }
.seo-intro-cats li { padding: 0.4rem 0.85rem; border: 1px solid var(--line); border-radius: 999px; background: white; font-size: 0.9rem; font-weight: 600; }
