/* ─── Reset & base ─────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

body.community-page {
  background: #eef7f1;
  min-height: 100vh;
  font-family: "Inika", Georgia, serif;
  color: #1f4d35;
}

/* ─── Hero ──────────────────────────────────────────────────────── */
.community-hero {
  background:
    radial-gradient(circle at 20% 50%, rgba(47, 139, 88, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(214, 248, 220, 0.6) 0%, transparent 40%),
    linear-gradient(160deg, #e8f5ed 0%, #d5edde 50%, #c8e8d4 100%);
  border-bottom: 1px solid rgba(189, 228, 200, 0.5);
  padding: 60px 24px 48px;
}

.community-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.community-hero-kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2f8b58;
  background: rgba(47, 139, 88, 0.1);
  border: 1px solid rgba(47, 139, 88, 0.2);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 16px;
}

.community-hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  color: #113b28;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.community-hero-copy p {
  font-size: 1.08rem;
  color: #3a6b52;
  line-height: 1.65;
  max-width: 600px;
  margin: 0 0 28px;
}

.community-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.community-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: linear-gradient(135deg, #1c8a54, #2ca562);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(28, 138, 84, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.community-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(28, 138, 84, 0.34);
}

.community-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.7);
  color: #2f8b58;
  border: 1.5px solid rgba(47, 139, 88, 0.3);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.community-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(47, 139, 88, 0.55);
}

/* Stats bar */
.community-stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(189, 228, 200, 0.7);
  border-radius: 20px;
  padding: 20px 28px;
  backdrop-filter: blur(12px);
  width: fit-content;
}

.community-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
}

.community-stat strong {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1c8a54;
  line-height: 1;
}

.community-stat span {
  font-size: 0.8rem;
  color: #476755;
  margin-top: 3px;
}

.community-stat-sep {
  width: 1px;
  height: 40px;
  background: rgba(47, 139, 88, 0.15);
}

/* ─── Main layout ───────────────────────────────────────────────── */
.community-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.community-hero {
  background: transparent;
  border-bottom: none;
  padding: 32px 24px 10px;
}

.community-hero-inner {
  max-width: 1288px;
  margin: 0 auto;
  display: block;
}

.community-hero-shell {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(189, 228, 200, 0.78);
  background:
    radial-gradient(circle at 16% 18%, rgba(168, 237, 195, 0.28), transparent 28%),
    radial-gradient(circle at 84% 16%, rgba(255, 223, 170, 0.22), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(242, 250, 245, 0.86));
  box-shadow:
    0 28px 52px rgba(26, 77, 52, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  padding: 24px 22px;
}

.community-hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.44), transparent 32%),
    linear-gradient(180deg, transparent 68%, rgba(190, 234, 205, 0.18));
}

.community-identity-card,
.community-world-card,
.community-hero-panels {
  position: relative;
  z-index: 1;
}

.community-identity-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
}

.community-identity-avatar {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.56), transparent 45%),
    linear-gradient(145deg, #1c8a54, #43b56e);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 700;
  box-shadow:
    0 18px 36px rgba(28, 138, 84, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

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

.community-identity-copy {
  min-width: 0;
}

.community-identity-copy h1 {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #113b28;
  margin: 0 0 10px;
}

.community-identity-copy p {
  margin: 0;
  max-width: 700px;
  font-size: 1rem;
  line-height: 1.6;
  color: #446c57;
}

.community-hero-kicker {
  margin-bottom: 10px;
}

.community-hero-actions {
  justify-content: flex-end;
  align-items: center;
}

.community-world-card {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: 22px;
  align-items: stretch;
  border-radius: 28px;
  border: 1px solid rgba(189, 228, 200, 0.72);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(157, 227, 185, 0.22), transparent 28%),
    radial-gradient(circle at 84% 20%, rgba(255, 224, 181, 0.18), transparent 30%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(241, 249, 244, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 18px 36px rgba(32, 92, 61, 0.06);
}

.community-world-copy {
  padding: 24px 24px 22px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.community-world-copy h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #113b28;
}

.community-world-copy p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #446c57;
}

.community-world-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.community-world-metric {
  min-width: 0;
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(189, 228, 200, 0.68);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.community-world-metric strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
  color: #134930;
}

.community-world-metric span {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #58806a;
}

.community-world-metric--accent {
  background:
    radial-gradient(circle at top left, rgba(139, 227, 167, 0.28), transparent 50%),
    linear-gradient(145deg, rgba(235, 252, 240, 0.92), rgba(221, 245, 228, 0.82));
  border-color: rgba(88, 189, 118, 0.32);
}

.community-world-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.community-world-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(186, 224, 198, 0.72);
  background: rgba(255, 255, 255, 0.72);
  color: #21563b;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.community-world-chip--muted {
  color: #6b8a78;
  background: rgba(244, 250, 246, 0.76);
}

.community-world-map-panel {
  position: relative;
  min-height: 100%;
  padding: 18px 20px 18px 0;
}

.community-world-map-frame {
  position: relative;
  height: 100%;
  min-height: 328px;
  border-radius: 24px;
  border: 1px solid rgba(189, 228, 200, 0.68);
  background:
    radial-gradient(circle at 18% 22%, rgba(151, 224, 180, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(248, 252, 249, 0.96), rgba(237, 247, 241, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -20px 44px rgba(162, 212, 180, 0.08);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.community-world-map-frame.is-dragging {
  cursor: grabbing;
}

.community-world-map-toolbar {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(189, 228, 200, 0.72);
  background: rgba(255, 255, 255, 0.86);
  box-shadow:
    0 16px 28px rgba(34, 82, 56, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.community-world-map-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(172, 214, 187, 0.8);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(250, 253, 251, 0.96), rgba(239, 247, 242, 0.92));
  color: #20563b;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.community-world-map-control:hover {
  transform: translateY(-1px);
  border-color: rgba(63, 155, 100, 0.48);
  box-shadow: 0 10px 18px rgba(33, 84, 57, 0.08);
}

.community-world-map-hint {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  max-width: min(280px, calc(100% - 28px));
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid rgba(189, 228, 200, 0.72);
  background: rgba(255, 255, 255, 0.84);
  color: #4b735d;
  font-size: 0.79rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow:
    0 14px 22px rgba(34, 82, 56, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.community-world-map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 328px;
  pointer-events: none;
  opacity: 0;
  transform-origin: center center;
  transition: opacity 0.24s ease, transform 0.16s ease-out;
  will-change: transform;
}

.community-world-map.is-ready {
  opacity: 1;
}

.community-hero-panels {
  display: flex;
  gap: 22px;
  margin-top: 22px;
  align-items: stretch;
}

.community-progress-card,
.community-next-card,
.community-stats-bar {
  flex: 1 1 0;
  border-radius: 24px;
  border: 1px solid rgba(189, 228, 200, 0.68);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(242, 250, 245, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 18px rgba(37, 94, 62, 0.045);
}

.community-progress-card,
.community-next-card {
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 142px;
}

.community-progress-card {
  flex: 1.05 1 0;
}

.community-stats-bar {
  flex: 1.1 1 0;
}

.community-next-card {
  flex: 0.92 1 0;
}

.community-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.community-panel-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2f8b58;
}

#community-progress-percent {
  font-size: 1.28rem;
  color: #15492f;
  line-height: 1;
}

.community-progress-bar {
  position: relative;
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(192, 225, 202, 0.58);
}

#community-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #1c8a54 0%, #49c574 55%, #8ce09d 100%);
  box-shadow: 0 8px 16px rgba(28, 138, 84, 0.2);
  transition: width 0.35s ease;
}

#community-progress-copy,
#community-next-prompt {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.58;
  color: #456c58;
}

.community-stats-bar {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr) 1px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 18px 12px;
  min-width: 0;
  min-height: 142px;
}

.community-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  min-width: 0;
  text-align: center;
}

.community-stat strong {
  font-size: 1.55rem;
}

.community-stat-sep {
  width: 1px;
  align-self: stretch;
  justify-self: center;
  height: auto;
  background: rgba(47, 139, 88, 0.12);
}

/* ─── Controls ──────────────────────────────────────────────────── */
.community-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(189, 228, 200, 0.7);
  background: rgba(255, 255, 255, 0.65);
  color: #3a6b52;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.18s ease;
  white-space: nowrap;
}

.cat-pill:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(47, 139, 88, 0.45);
  color: #1f4d35;
}

.cat-pill.active {
  background: linear-gradient(135deg, #1c8a54, #2ca562);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(28, 138, 84, 0.22);
}

.sort-select {
  padding: 9px 36px 9px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(189, 228, 200, 0.7);
  background: rgba(255, 255, 255, 0.65);
  color: #3a6b52;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232f8b58' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.18s ease;
}

.sort-select:focus {
  outline: none;
  border-color: rgba(47, 139, 88, 0.5);
}

/* ─── Profile banner ────────────────────────────────────────────── */
.community-profile-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(189, 228, 200, 0.7);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 28px;
  backdrop-filter: blur(12px);
}

.profile-banner-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c8a54, #2ca562);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-banner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-banner-copy { flex: 1; }

.profile-banner-copy h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #113b28;
  margin: 0 0 4px;
}

.profile-banner-copy p {
  font-size: 0.85rem;
  color: #476755;
  margin: 0;
}

.banner-back-btn {
  padding: 8px 16px;
  background: none;
  border: 1.5px solid rgba(47, 139, 88, 0.3);
  border-radius: 999px;
  color: #2f8b58;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.banner-back-btn:hover {
  background: rgba(47, 139, 88, 0.08);
  border-color: rgba(47, 139, 88, 0.5);
}

.post-trust {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(47, 139, 88, 0.14);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.46), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(236, 247, 239, 0.62));
}

.post-trust--unverified {
  border-color: rgba(138, 152, 143, 0.18);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.5), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(243, 246, 244, 0.72));
}

.post-trust--author-verified,
.post-trust--community-verified,
.post-trust--community-trusted {
  border-color: rgba(47, 139, 88, 0.2);
}

.post-trust-score {
  display: grid;
  gap: 2px;
  min-width: 76px;
}

.post-trust-score strong {
  font-size: 1.15rem;
  color: #1b6d42;
  line-height: 1;
}

.post-trust-score span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #678372;
}

.post-trust-copy {
  display: grid;
  gap: 3px;
}

.post-trust-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #173e2b;
}

.post-trust-copy p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #547360;
}

.post-trust-validators {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.post-validator-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1c8a54, #2ca562);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(28, 138, 84, 0.16);
}

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

.post-validate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(47, 139, 88, 0.26);
  background: rgba(255, 255, 255, 0.78);
  color: #236b43;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  backdrop-filter: blur(10px);
}

.post-validate-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(47, 139, 88, 0.1);
  box-shadow: 0 10px 18px rgba(28, 138, 84, 0.15);
}

.post-validate-btn.is-validated {
  background: linear-gradient(135deg, #1c8a54, #2ca562);
  border-color: transparent;
  color: #fff;
}

.post-validate-btn.is-disabled,
.post-validate-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

/* ─── Posts grid ────────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

@media (min-width: 1100px) {
  .posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Post card ─────────────────────────────────────────────────── */
.post-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(189, 228, 200, 0.6);
  border-radius: 22px;
  overflow: hidden;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(28, 66, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 700px;
  max-height: 700px;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(28, 66, 42, 0.12);
}

/* Card image */
.post-card-image {
  position: relative;
  width: 100%;
  height: 212px;
  flex: 0 0 212px;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.04);
}

.post-card-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(17, 59, 40, 0.45), transparent);
  pointer-events: none;
}

/* Category badge */
.post-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.4);
  pointer-events: none;
}

.badge-generic         { background: rgba(58, 92, 72, 0.14); color: #214a33; }
.badge-restaurant      { background: rgba(249, 115, 22, 0.88); color: #431407; }
.badge-point-vue       { background: rgba(56, 189, 248, 0.2); color: #0f4c5c; }
.badge-coucher-soleil  { background: rgba(251, 146, 60, 0.22); color: #7c2d12; }
.badge-pique-nique     { background: rgba(52, 211, 153, 0.2); color: #14532d; }
.badge-balade          { background: rgba(45, 212, 191, 0.2); color: #134e4a; }
.badge-spot-photo      { background: rgba(167, 139, 250, 0.24); color: #4c1d95; }
.badge-baignade        { background: rgba(59, 130, 246, 0.2); color: #1d4ed8; }
.badge-pause-locale    { background: rgba(250, 204, 21, 0.22); color: #713f12; }

/* Inline category badge (no image) */
.post-category-inline {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Card header */
.post-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 0;
}

.post-author-link {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.post-author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c8a54, #2ca562);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.post-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.post-author-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1f4d35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-time {
  font-size: 0.76rem;
  color: #7a9e8a;
  display: block;
}

/* Card body */
.post-card-body {
  padding: 16px 20px 12px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.post-card-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.post-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.77rem;
  color: #2f8b58;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-title {
  font-size: 1.04rem;
  font-weight: 700;
  color: #113b28;
  line-height: 1.35;
  margin: 0;
}

.post-excerpt {
  font-size: 0.88rem;
  color: #476755;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-rating {
  display: flex;
  gap: 2px;
  margin-top: auto;
  font-size: 0.9rem;
}

.post-rating .star       { color: #f59e0b; }
.post-rating .star.empty { color: rgba(0, 0, 0, 0.12); }

/* Card footer */
.post-card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 8px 14px 12px;
  border-top: 1px solid rgba(189, 228, 200, 0.3);
  margin-top: 4px;
}

.post-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #476755;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
}

.post-action-btn:hover {
  background: rgba(47, 139, 88, 0.08);
  border-color: rgba(47, 139, 88, 0.2);
  color: #1f4d35;
}

.post-action-btn.liked {
  color: #e53e5a;
}

.post-action-btn.liked:hover {
  background: rgba(229, 62, 90, 0.08);
  border-color: rgba(229, 62, 90, 0.2);
}

.post-action-spacer { flex: 1; }

.post-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(209, 96, 96, 0.28);
  background: rgba(255, 243, 243, 0.88);
  color: #a43e3e;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.post-delete-btn:hover {
  color: #8d1e1e;
  background: rgba(255, 232, 232, 0.96);
  border-color: rgba(209, 96, 96, 0.44);
  transform: translateY(-1px);
}

.post-delete-btn--header {
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(169, 62, 62, 0.08);
}

.post-delete-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(209, 96, 96, 0.12);
  font-size: 0.96rem;
  line-height: 1;
}

/* ─── Comments inline ────────────────────────────────────────────── */
.post-comments {
  border-top: 1px solid rgba(189, 228, 200, 0.3);
  background: rgba(240, 250, 244, 0.45);
  padding: 12px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 186px;
  min-height: 186px;
  max-height: 186px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.post-comments::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.comment-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c8a54, #2ca562);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.comment-bubble {
  flex: 1;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(189, 228, 200, 0.4);
  border-radius: 14px;
  padding: 7px 12px;
}

.comment-author {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1f4d35;
}

.comment-text {
  font-size: 0.84rem;
  color: #476755;
  line-height: 1.55;
  margin: 2px 0 0;
}

.comment-meta {
  font-size: 0.71rem;
  color: #7a9e8a;
  margin-top: 3px;
}

.comment-add-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding-top: 8px;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(240, 250, 244, 0), rgba(240, 250, 244, 0.98) 28%);
}

.comment-input {
  flex: 1;
  padding: 7px 12px;
  border-radius: 14px;
  border: 1px solid rgba(189, 228, 200, 0.6);
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 0.83rem;
  color: #1f4d35;
  resize: none;
  transition: border-color 0.18s ease;
}

.comment-input:focus {
  outline: none;
  border-color: rgba(47, 139, 88, 0.5);
}

.comment-send-btn {
  padding: 7px 13px;
  background: linear-gradient(135deg, #1c8a54, #2ca562);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease;
}

.comment-send-btn:hover { transform: translateY(-1px); }

.view-all-comments-btn {
  background: none;
  border: none;
  color: #2f8b58;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Empty & skeleton ───────────────────────────────────────────── */
.posts-empty {
  text-align: center;
  padding: 80px 24px;
}

.posts-empty-icon { font-size: 3.5rem; margin-bottom: 16px; }

.posts-empty h3 {
  font-size: 1.3rem;
  color: #113b28;
  margin: 0 0 10px;
}

.posts-empty p {
  font-size: 0.95rem;
  color: #476755;
  max-width: 440px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.posts-skeleton {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (min-width: 1100px) { .posts-skeleton { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .posts-skeleton { grid-template-columns: 1fr; } }

.post-skeleton-card {
  border-radius: 22px;
  background: linear-gradient(90deg, rgba(215,238,224,0.6) 25%, rgba(235,248,239,0.8) 50%, rgba(215,238,224,0.6) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  height: 700px;
}

@media (max-width: 980px) {
  .post-card {
    height: 660px;
    max-height: 660px;
  }

  .post-card-image {
    height: 196px;
    flex-basis: 196px;
  }

  .post-comments {
    flex-basis: 176px;
    min-height: 176px;
    max-height: 176px;
  }

  .post-skeleton-card {
    height: 660px;
  }
}

@media (max-width: 700px) {
  .post-card {
    height: auto;
    max-height: none;
  }

  .post-card-image {
    height: auto;
    flex-basis: auto;
    aspect-ratio: 16 / 9;
  }

  .post-card-body,
  .post-comments {
    overflow: visible;
    max-height: none;
    min-height: 0;
  }

  .post-comments {
    flex-basis: auto;
  }

  .comment-add-row {
    position: static;
    background: none;
  }

  .post-skeleton-card {
    height: 320px;
  }
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Load more ─────────────────────────────────────────────────── */
.load-more-wrap {
  text-align: center;
  margin-top: 12px;
}

.load-more-btn {
  padding: 13px 34px;
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(47, 139, 88, 0.3);
  border-radius: 999px;
  color: #2f8b58;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.load-more-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(47, 139, 88, 0.55);
  transform: translateY(-1px);
}

/* ─── FAB ────────────────────────────────────────────────────────── */
.community-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #1c8a54, #2ca562);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(28, 138, 84, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.community-fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 38px rgba(28, 138, 84, 0.42);
}

.fab-icon { font-size: 1.3rem; line-height: 1; font-weight: 400; }

/* ─── Modal backdrop ─────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(17, 59, 40, 0.42);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-backdrop.hidden { display: none !important; }

.modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(189, 228, 200, 0.5);
  background: rgba(255, 255, 255, 0.7);
  color: #476755;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.modal-close-btn:hover { background: #fff; color: #1f4d35; }

/* ─── Create post modal ──────────────────────────────────────────── */
.create-post-modal {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(169, 236, 196, 0.24), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 223, 170, 0.18), transparent 32%),
    linear-gradient(160deg, rgba(255,255,255,0.98), rgba(244,251,246,0.95));
  border: 1px solid rgba(189, 228, 200, 0.82);
  border-radius: 34px;
  box-shadow:
    0 34px 72px rgba(17, 59, 40, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  width: 100%;
  max-width: 740px;
  max-height: min(92vh, 920px);
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(26px);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.create-post-modal::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.create-post-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.5), transparent 32%),
    linear-gradient(180deg, transparent 68%, rgba(184, 232, 201, 0.14));
  opacity: 0.92;
}

.create-modal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 30px 32px 18px;
  position: sticky;
  top: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.9) 76%, rgba(255,255,255,0.76));
  z-index: 2;
  border-radius: 34px 34px 0 0;
  border-bottom: 1px solid rgba(189, 228, 200, 0.4);
  backdrop-filter: blur(18px);
}

.create-modal-header h2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-size: clamp(1.42rem, 2vw, 1.86rem);
  font-weight: 700;
  color: #113b28;
  margin: 0;
  line-height: 1.08;
  max-width: 100%;
  min-width: 0;
}

.create-modal-header h2::before {
  content: "PARTAGE TRA-V";
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(161, 214, 179, 0.9);
  background: rgba(235, 249, 239, 0.92);
  color: #2c8d5c;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.create-post-form {
  position: relative;
  z-index: 1;
  padding: 26px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(194, 227, 204, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 252, 248, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 12px 28px rgba(37, 94, 62, 0.04);
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #2f7d57;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.form-required { color: #e53e5a; }
.form-optional { color: #7a9e8a; font-weight: 400; font-size: 0.82em; text-transform: none; letter-spacing: 0; }

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cat-option {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  min-height: 148px;
  padding: 18px 12px 16px;
  border-radius: 20px;
  border: 1px solid rgba(188, 222, 199, 0.86);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 250, 245, 0.8));
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.cat-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cat-option:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(47, 139, 88, 0.48);
  box-shadow: 0 16px 28px rgba(28, 138, 84, 0.08);
}

.cat-option.selected {
  background:
    radial-gradient(circle at top center, rgba(118, 215, 157, 0.18), transparent 60%),
    linear-gradient(135deg, rgba(29, 138, 84, 0.14), rgba(44, 165, 98, 0.08));
  border-color: rgba(47, 139, 88, 0.6);
  box-shadow:
    0 18px 30px rgba(28, 138, 84, 0.11),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.cat-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(235, 247, 239, 0.95);
  color: #2f7d57;
  font-size: 1.4rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.cat-option.selected .cat-option-icon {
  background: linear-gradient(135deg, rgba(46, 150, 89, 0.18), rgba(102, 204, 148, 0.24));
}

.cat-option-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1f4d35;
  line-height: 1.28;
  max-width: 100%;
}

.cat-option-copy {
  display: grid;
  gap: 5px;
}

.cat-option-hint {
  font-size: 0.7rem;
  line-height: 1.4;
  color: #6d8b79;
}

/* Location grid */
.form-location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field--full { grid-column: 1 / -1; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
}

.form-field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #3a6b52;
}

.form-field input,
.form-field textarea,
.form-field select {
  min-height: 54px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid rgba(188, 222, 199, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 247, 0.9));
  font-family: inherit;
  font-size: 0.94rem;
  color: #1f4d35;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 8px 18px rgba(23, 72, 48, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: rgba(47, 139, 88, 0.58);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.94),
    0 0 0 4px rgba(64, 170, 105, 0.12),
    0 14px 24px rgba(28, 138, 84, 0.08);
}

.form-field textarea {
  resize: vertical;
  min-height: 136px;
  line-height: 1.55;
  padding-top: 14px;
}

.form-field input::placeholder,
.form-field textarea::placeholder,
.form-field select {
  color: #6f8f7e;
}

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 54px;
  cursor: pointer;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 247, 0.9));
  background-repeat: no-repeat;
}

.form-field:has(select)::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: 16px;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background:
    rgba(228, 246, 233, 0.95)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.5L8 10.5L12 6.5' stroke='%232f7d57' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
  border: 1px solid rgba(182, 223, 196, 0.92);
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.form-field:has(select:disabled)::after {
  background:
    rgba(236, 242, 238, 0.96)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.5L8 10.5L12 6.5' stroke='%2394aa9c' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
  border-color: rgba(207, 219, 211, 0.96);
}

.form-location-grid .form-field:first-child::before,
.form-location-grid .form-field:nth-child(2)::before {
  position: absolute;
  right: 48px;
  bottom: 19px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #2f8b58;
  pointer-events: none;
  z-index: 1;
}

.form-location-grid .form-field:first-child::before { content: "TRA-V"; }
.form-location-grid .form-field:nth-child(2)::before { content: "REG"; }

.form-field select:disabled {
  cursor: not-allowed;
  opacity: 0.74;
  background-image: linear-gradient(180deg, rgba(245, 247, 246, 0.96), rgba(239, 244, 241, 0.92));
}

.char-counter {
  font-size: 0.74rem;
  color: #7a9e8a;
  text-align: right;
  margin-top: 2px;
}

/* Star rating */
.star-rating {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(194, 227, 204, 0.9);
  background: rgba(255,255,255,0.74);
}

.star-btn {
  font-size: 1.8rem;
  color: rgba(200, 200, 200, 0.45);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
  padding: 0;
  line-height: 1;
}

.star-btn:hover,
.star-btn.active {
  color: #f59e0b;
  transform: scale(1.15);
}

/* Photo upload */
.photo-upload-zone {
  display: block;
  border: 2px dashed rgba(47, 139, 88, 0.3);
  border-radius: 22px;
  padding: 32px 26px;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(239, 249, 242, 0.72), rgba(248, 252, 249, 0.88));
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.84);
}

.photo-upload-zone:hover,
.photo-upload-zone.dragover {
  border-color: rgba(47, 139, 88, 0.6);
  background: rgba(240, 250, 244, 0.82);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(28, 138, 84, 0.08);
}

.photo-upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.photo-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255,255,255,0.88);
  color: #2f8b58;
  font-size: 1.7rem;
  box-shadow: 0 12px 24px rgba(34, 108, 68, 0.08);
}

.photo-upload-inner p {
  font-size: 0.96rem;
  font-weight: 700;
  color: #2f8b58;
  margin: 0;
}

.photo-upload-hint { font-size: 0.78rem; color: #7a9e8a; }

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(189, 228, 200, 0.78);
  box-shadow: 0 10px 18px rgba(26, 88, 57, 0.08);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(19, 54, 38, 0.72);
  color: #fff;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Form messages */
.form-error {
  background: rgba(229, 62, 90, 0.1);
  border: 1px solid rgba(229, 62, 90, 0.3);
  border-radius: 16px;
  padding: 13px 16px;
  font-size: 0.9rem;
  color: #b32020;
  font-weight: 700;
}

.form-error.hidden { display: none; }

/* Form actions */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid rgba(189, 228, 200, 0.42);
  margin-top: 4px;
}

.form-cancel-btn {
  min-height: 50px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(189, 228, 200, 0.9);
  border-radius: 999px;
  color: #476755;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.form-cancel-btn:hover {
  background: #fff;
  border-color: rgba(47, 139, 88, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(28, 138, 84, 0.08);
}

.form-submit-btn {
  min-height: 50px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #1b8a53, #31b86b);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 12px 28px rgba(28, 138, 84, 0.26),
    inset 0 1px 0 rgba(255,255,255,0.26);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.form-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(28, 138, 84, 0.32);
}

.form-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─── Comments modal ─────────────────────────────────────────────── */
.comments-modal {
  background: linear-gradient(160deg, rgba(255,255,255,0.97), rgba(240,250,244,0.95));
  border: 1px solid rgba(189, 228, 200, 0.7);
  border-radius: 28px;
  box-shadow: 0 32px 64px rgba(17, 59, 40, 0.2);
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
}

.delete-post-modal {
  position: relative;
  width: min(100%, 520px);
  border-radius: 30px;
  border: 1px solid rgba(218, 160, 160, 0.34);
  background:
    radial-gradient(circle at top left, rgba(255, 223, 223, 0.42), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 245, 245, 0.68), transparent 30%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(252, 247, 247, 0.96));
  box-shadow:
    0 34px 70px rgba(78, 28, 28, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.delete-post-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.44), transparent 34%),
    linear-gradient(180deg, transparent 70%, rgba(239, 204, 204, 0.16));
}

.delete-post-modal-header,
.delete-post-modal-body,
.delete-post-actions {
  position: relative;
  z-index: 1;
}

.delete-post-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 0;
}

.delete-post-modal-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(209, 96, 96, 0.24);
  background: rgba(255, 244, 244, 0.88);
  color: #a43e3e;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.delete-post-modal-body {
  padding: 8px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}



.delete-post-modal-body h2 {
  margin: 0;
  color: #183a29;
  font-size: clamp(1.3rem, 2vw, 1.72rem);
  line-height: 1.08;
}

.delete-post-modal-copy {
  margin: 0;
  color: #5e7067;
  font-size: 0.98rem;
  line-height: 1.65;
}

.delete-post-target {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(221, 191, 191, 0.38);
  background: rgba(255, 255, 255, 0.72);
}

.delete-post-target-label {
  color: #a43e3e;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.delete-post-target strong {
  color: #163726;
  font-size: 1rem;
  line-height: 1.4;
}

.delete-post-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(209, 96, 96, 0.28);
  background: rgba(255, 239, 239, 0.88);
  color: #9f3030;
  font-size: 0.9rem;
  line-height: 1.5;
}

.delete-post-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 24px 24px;
}

.delete-post-cancel-btn,
.delete-post-confirm-btn {
  min-height: 50px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.delete-post-cancel-btn {
  border: 1px solid rgba(189, 228, 200, 0.62);
  background: rgba(255, 255, 255, 0.78);
  color: #2f5b46;
}

.delete-post-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.94);
  transform: translateY(-1px);
}

.delete-post-confirm-btn {
  border: 1px solid rgba(185, 57, 57, 0.28);
  background: linear-gradient(135deg, #c64545, #a72e2e);
  color: #fff;
  box-shadow: 0 18px 34px rgba(167, 46, 46, 0.24);
}

.delete-post-confirm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 38px rgba(167, 46, 46, 0.28);
}

.delete-post-confirm-btn:disabled,
.delete-post-cancel-btn:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.comments-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(189, 228, 200, 0.35);
  flex-shrink: 0;
}

.comments-modal-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #113b28;
  margin: 0;
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comments-empty {
  text-align: center;
  padding: 40px 20px;
  color: #7a9e8a;
  font-size: 0.9rem;
}

.comment-input-wrap {
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(189, 228, 200, 0.35);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}

.comment-input-wrap textarea {
  flex: 1;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(189, 228, 200, 0.6);
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 0.88rem;
  color: #1f4d35;
  resize: none;
  transition: border-color 0.18s ease;
}

.comment-input-wrap textarea:focus {
  outline: none;
  border-color: rgba(47, 139, 88, 0.5);
}

.comment-submit-btn {
  padding: 10px 18px;
  background: linear-gradient(135deg, #1c8a54, #2ca562);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease;
}

.comment-submit-btn:hover { transform: translateY(-1px); }

.comment-login-prompt {
  padding: 14px 20px 18px;
  text-align: center;
  font-size: 0.88rem;
  color: #7a9e8a;
  border-top: 1px solid rgba(189, 228, 200, 0.35);
}

.comment-login-prompt a {
  color: #2f8b58;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.comment-login-prompt.hidden { display: none; }

/* ─── Utility ────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .community-hero { padding: 48px 18px 36px; }
  .community-hero-copy h1 { font-size: 2rem; }

  .community-stats-bar {
    flex-wrap: wrap;
    padding: 14px 18px;
    width: 100%;
    justify-content: center;
  }

  .community-stat { padding: 0 16px; }

  .community-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .community-controls .sort-controls { align-self: flex-end; }
  .community-main { padding: 28px 16px 80px; }

  .create-post-modal,
  .comments-modal,
  .delete-post-modal {
    max-height: 95vh;
    border-radius: 22px;
  }

  .create-modal-header {
    padding: 24px 20px 16px;
    border-radius: 22px 22px 0 0;
  }

  .create-modal-header h2 {
    font-size: 1.24rem;
    gap: 10px;
    max-width: 100%;
  }

  .create-post-form {
    padding: 20px 20px 24px;
    gap: 14px;
  }

  .form-section {
    padding: 16px 14px 18px;
    border-radius: 18px;
  }

  .community-fab {
    bottom: 20px;
    right: 16px;
    padding: 12px 18px;
  }

  .form-location-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }

  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .delete-post-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .form-cancel-btn,
  .form-submit-btn {
    width: 100%;
  }

  .delete-post-cancel-btn,
  .delete-post-confirm-btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .modal-backdrop {
    padding: 12px;
    align-items: flex-end;
  }

  .create-post-modal,
  .delete-post-modal {
    max-width: none;
    border-radius: 24px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-option {
    min-height: 104px;
  }

  .photo-upload-zone {
    padding: 24px 18px;
  }
}

@media (max-width: 980px) {
  .community-hero {
    padding: 24px 16px 8px;
  }

  .community-hero-shell {
    padding: 20px;
    border-radius: 26px;
  }

  .community-identity-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .community-hero-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .community-world-card {
    grid-template-columns: 1fr;
  }

  .community-world-map-panel {
    padding: 0 20px 20px;
  }

  .community-world-map-frame,
  .community-world-map {
    min-height: 280px;
  }

  .community-world-map-toolbar {
    top: 12px;
    right: 12px;
    gap: 6px;
    padding: 6px;
  }

  .community-world-map-control {
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
  }

  .community-hero-panels {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .community-identity-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .community-identity-avatar {
    width: 72px;
    height: 72px;
    border-radius: 22px;
  }

  .community-identity-copy h1 {
    font-size: 1.72rem;
  }

  .community-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .community-cta-btn,
  .community-cta-secondary {
    justify-content: center;
    width: 100%;
  }

  .community-world-copy {
    padding: 20px 18px 18px;
  }

  .community-world-map-toolbar {
    left: 12px;
    right: 12px;
    justify-content: flex-end;
  }

  .community-world-map-hint {
    left: 12px;
    right: 12px;
    max-width: none;
    bottom: 12px;
  }

  .community-world-metrics {
    grid-template-columns: 1fr;
  }

  .community-world-chip {
    width: 100%;
    justify-content: center;
  }

  .community-stats-bar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .community-stat-sep {
    width: 100%;
    height: 1px;
  }
}
