/* ---------- Feed ---------- */

.topbar.bare .round-btn#menu-btn { visibility: hidden; }

.view-feed {
  overflow-y: auto;
  overflow-x: hidden;
  padding: calc(14px + env(safe-area-inset-top)) 0 calc(var(--tabbar-h) + var(--tabbar-gap) + 40px + env(safe-area-inset-bottom));
  scrollbar-width: none;
}
.view-feed::-webkit-scrollbar { display: none; }
.feed { max-width: var(--col); margin: 0 auto; }
/* Big "Feed" title on the top bar's row, level with the filter button (same as Goals). */
.view-feed .feed-title { max-width: var(--col); margin: 0 auto 2px; padding: 0 76px 0 18px; }

.post {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 14px;
  padding: 22px 16px 14px 12px;
  border-bottom: 1px solid var(--border);
}
.post-icon { font-size: 34px; line-height: 1; text-align: center; padding-top: 2px; }
.post-main { min-width: 0; }
.post-title { font-size: 1rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.post-body { margin-top: 4px; font-size: 0.875rem; line-height: 1.45; color: #2a2b2e; overflow-wrap: anywhere; }
.post-body a { color: var(--accent); text-decoration: none; }
.post-body a:hover { text-decoration: underline; }
.post-media { margin-top: 14px; }

.post-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  min-height: 40px;
}
.post-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px 0;
}
.post-actions svg { width: 26px; height: 26px; }
.post-actions .liked svg { fill: #e5484d; stroke: #e5484d; }
.post-actions .liked { animation: pop 0.25s ease; }
@keyframes pop { 50% { transform: scale(1.18); } }
.post-actions .spacer { flex: 1; }
.post-time { font-size: 1.0625rem; color: var(--text-3); }
.post-actions .info svg { width: 24px; height: 24px; }

/* Cards used in posts (alone or in a carousel) */
.card-verse {
  border-radius: 22px;
  padding: 26px 24px 22px;
  background: linear-gradient(150deg, #eef4fb 0%, #f8f2e9 100%);
  border: 1px solid #e9eef5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 200px;
}
.card-verse blockquote {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.375rem;
  line-height: 1.4;
  letter-spacing: -0.2px;
}
.card-verse cite {
  font-style: normal;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.card-stat {
  border-radius: 22px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(16, 17, 19, 0.04);
}
.card-stat .label { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.1em; color: var(--text-2); }
.card-stat .value { margin-top: 10px; font-size: 2.25rem; font-weight: 700; letter-spacing: -0.02em; }
.card-stat .sub { margin-top: 6px; font-size: 0.9375rem; color: var(--text-2); }
.card-image { width: 100%; border-radius: 22px; display: block; object-fit: cover; aspect-ratio: 1; background: var(--muted); }

.carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-right: -16px;
  padding-right: 16px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { flex: 0 0 82%; scroll-snap-align: start; }
.carousel .card-verse { min-height: 240px; }

.feed-empty { margin: 60px auto 0; max-width: 320px; text-align: center; color: var(--text-2); line-height: 1.55; padding: 0 16px; }
.feed-empty h2 { font-family: "Newsreader", Georgia, serif; font-size: 1.5rem; font-weight: 500; color: var(--text); margin-bottom: 8px; }

/* Prayers & memory inside Settings */
.memory-page .block { background: #fff; border-radius: 24px; border-top: 0; padding: 18px 20px; }
.memory-page .consent { background: #fff; }

.post-kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { text-decoration: underline; }
.card-image.wide { aspect-ratio: 16 / 9; }

/* Cover card: shown when a story has no usable photo */
.card-cover {
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  position: relative;
}
.cover-local { background: linear-gradient(135deg, #d8f0e6 0%, #bfe3f5 55%, #fbe7c6 100%); }
.cover-church { background: linear-gradient(135deg, #efe4d6 0%, #e7d9f2 60%, #f7efe3 100%); }
.cover-world { background: linear-gradient(135deg, #dce8f8 0%, #e9e2f7 55%, #f5ede1 100%); }
.cover-icon { font-size: 56px; line-height: 1; filter: drop-shadow(0 6px 12px rgba(16, 17, 19, 0.15)); }
.cover-source {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(16, 17, 19, 0.55);
}

/* Clay icons */
.post-icon img { width: 44px; height: 44px; display: block; margin: 0 auto; filter: drop-shadow(0 3px 5px rgba(16, 17, 19, 0.12)); }
.cover-icon img { width: 84px; height: 84px; display: block; }
.card-image { cursor: zoom-in; }

/* Photo viewer */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #2b2723;
  animation: fade 0.2s ease;
}
.lightbox.closing { animation: fade-out 0.18s ease forwards; }
.lb-bg {
  position: absolute;
  inset: -15%;
  background-size: cover;
  background-position: center;
  filter: blur(70px) saturate(1.3) brightness(0.62);
  transform: scale(1.2);
}
.lb-bg::after { content: ""; position: absolute; inset: 0; background: rgba(20, 18, 16, 0.35); }
.lb-img {
  position: relative;
  max-width: min(92vw, 1100px);
  max-height: 80vh;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  animation: zoom-in 0.28s cubic-bezier(0.3, 0.8, 0.25, 1);
  user-select: none;
}
@keyframes zoom-in { from { transform: scale(0.94); opacity: 0; } }
.lb-btn {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  cursor: pointer;
  z-index: 1;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.28); }
.lb-btn svg { width: 24px; height: 24px; stroke-width: 2; }
.lb-close { left: 16px; }
.lb-save { right: 16px; }
